(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var CP=Object.defineProperty,PP=Object.defineProperties;var kP=Object.getOwnPropertyDescriptors;var Pa=Object.getOwnPropertySymbols;var Dy=Object.prototype.hasOwnProperty,My=Object.prototype.propertyIsEnumerable;var ep=(Q,J)=>(J=Symbol[Q])?J:Symbol.for("Symbol."+Q),TP=Q=>{throw TypeError(Q)},tp=Math.pow,Ty=(Q,J,re)=>J in Q?CP(Q,J,{enumerable:!0,configurable:!0,writable:!0,value:re}):Q[J]=re,w=(Q,J)=>{for(var re in J||(J={}))Dy.call(J,re)&&Ty(Q,re,J[re]);if(Pa)for(var re of Pa(J))My.call(J,re)&&Ty(Q,re,J[re]);return Q},R=(Q,J)=>PP(Q,kP(J));var Y=(Q,J)=>{var re={};for(var Ee in Q)Dy.call(Q,Ee)&&J.indexOf(Ee)<0&&(re[Ee]=Q[Ee]);if(Q!=null&&Pa)for(var Ee of Pa(Q))J.indexOf(Ee)<0&&My.call(Q,Ee)&&(re[Ee]=Q[Ee]);return re};var fe=(Q,J,re)=>new Promise((Ee,Z)=>{var Ve=yt=>{try{nr(re.next(yt))}catch(Fi){Z(Fi)}},en=yt=>{try{nr(re.throw(yt))}catch(Fi){Z(Fi)}},nr=yt=>yt.done?Ee(yt.value):Promise.resolve(yt.value).then(Ve,en);nr((re=re.apply(Q,J)).next())}),DP=function(Q,J){this[0]=Q,this[1]=J};var Ii=Q=>{var J=Q[ep("asyncIterator")],re=!1,Ee,Z={};return J==null?(J=Q[ep("iterator")](),Ee=Ve=>Z[Ve]=en=>J[Ve](en)):(J=J.call(Q),Ee=Ve=>Z[Ve]=en=>{if(re){if(re=!1,Ve==="throw")throw en;return en}return re=!0,{done:!1,value:new DP(new Promise(nr=>{var yt=J[Ve](en);yt instanceof Object||TP("Object expected"),nr(yt)}),1)}}),Z[ep("iterator")]=()=>Z,Ee("next"),"throw"in J?Ee("throw"):Z.throw=Ve=>{throw Ve},"return"in J&&Ee("return"),Z};function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J={exports:{}},re={},Ee={exports:{}},Z={};/** * @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 Ve=Symbol.for("react.element"),en=Symbol.for("react.portal"),nr=Symbol.for("react.fragment"),yt=Symbol.for("react.strict_mode"),Fi=Symbol.for("react.profiler"),Ay=Symbol.for("react.provider"),Ly=Symbol.for("react.context"),Ny=Symbol.for("react.forward_ref"),Ry=Symbol.for("react.suspense"),Iy=Symbol.for("react.memo"),Fy=Symbol.for("react.lazy"),np=Symbol.iterator;function By(e){return e===null||typeof e!="object"?null:(e=np&&e[np]||e["@@iterator"],typeof e=="function"?e:null)}var rp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ip=Object.assign,op={};function Lr(e,t,n){this.props=e,this.context=t,this.refs=op,this.updater=n||rp}Lr.prototype.isReactComponent={},Lr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lp(){}lp.prototype=Lr.prototype;function ka(e,t,n){this.props=e,this.context=t,this.refs=op,this.updater=n||rp}var Ta=ka.prototype=new lp;Ta.constructor=ka,ip(Ta,Lr.prototype),Ta.isPureReactComponent=!0;var sp=Array.isArray,ap=Object.prototype.hasOwnProperty,Da={current:null},up={key:!0,ref:!0,__self:!0,__source:!0};function cp(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)ap.call(t,r)&&!up.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,W=S[z];if(0>>1;zi(st,V))Uei(gt,st)?(S[z]=gt,S[Ue]=V,z=Ue):(S[z]=st,S[Be]=V,z=Be);else if(Uei(gt,V))S[z]=gt,S[Ue]=V,z=Ue;else break e}}return N}function i(S,N){var V=S.sortIndex-N.sortIndex;return V!==0?V:S.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],d=1,f=null,p=3,g=!1,v=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(S){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=S)r(u),N.sortIndex=N.expirationTime,t(a,N);else break;N=n(u)}}function $(S){if(b=!1,y(S),!v)if(n(a)!==null)v=!0,D(k);else{var N=n(u);N!==null&&P($,N.startTime-S)}}function k(S,N){v=!1,b&&(b=!1,h(A),A=-1),g=!0;var V=p;try{for(y(N),f=n(a);f!==null&&(!(f.expirationTime>N)||S&&!T());){var z=f.callback;if(typeof z=="function"){f.callback=null,p=f.priorityLevel;var W=z(f.expirationTime<=N);N=e.unstable_now(),typeof W=="function"?f.callback=W:f===n(a)&&r(a),y(N)}else r(a);f=n(a)}if(f!==null)var Te=!0;else{var Be=n(u);Be!==null&&P($,Be.startTime-N),Te=!1}return Te}finally{f=null,p=V,g=!1}}var M=!1,I=null,A=-1,_=5,j=-1;function T(){return!(e.unstable_now()-j<_)}function E(){if(I!==null){var S=e.unstable_now();j=S;var N=!0;try{N=I(!0,S)}finally{N?B():(M=!1,I=null)}}else M=!1}var B;if(typeof m=="function")B=function(){m(E)};else if(typeof MessageChannel!="undefined"){var K=new MessageChannel,L=K.port2;K.port1.onmessage=E,B=function(){L.postMessage(null)}}else B=function(){x(E,0)};function D(S){I=S,M||(M=!0,B())}function P(S,N){A=x(function(){S(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(S){S.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,D(k))},e.unstable_forceFrameRate=function(S){0>S||125z?(S.sortIndex=V,t(u,S),n(a)===null&&S===n(u)&&(b?(h(A),A=-1):b=!0,P($,V-z))):(S.sortIndex=W,t(a,S),v||g||(v=!0,D(k))),S},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(S){var N=p;return function(){var V=p;p=N;try{return S.apply(this,arguments)}finally{p=V}}}})(vp),mp.exports=vp;var Gy=mp.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 Yy=c,ut=Gy;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}function Ze(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new Ze(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new Ze(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new Ze(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new Ze(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){Re[e]=new Ze(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new Ze(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Re[e]=new Ze(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Re[e]=new Ze(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Re[e]=new Ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ra=/[\-:]([a-z])/g;function Ia(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(Ra,Ia);Re[t]=new Ze(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(Ra,Ia);Re[t]=new Ze(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(Ra,Ia);Re[t]=new Ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new Ze(e,1,!1,e.toLowerCase(),null,!1,!1)}),Re.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Re[e]=new Ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function Fa(e,t,n,r){var i=Re.hasOwnProperty(t)?Re[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var a=` `+i[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{Ha=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ji(e):""}function e5(e){switch(e.tag){case 5:return ji(e.type);case 16:return ji("Lazy");case 13:return ji("Suspense");case 19:return ji("SuspenseList");case 0:case 2:case 15:return e=Ua(e.type,!1),e;case 11:return e=Ua(e.type.render,!1),e;case 1:return e=Ua(e.type,!0),e;default:return""}}function Wa(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 Ir:return"Fragment";case Rr:return"Portal";case Va:return"Profiler";case Ba:return"StrictMode";case Oa:return"Suspense";case Ka:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wp:return(e.displayName||"Context")+".Consumer";case xp:return(e._context.displayName||"Context")+".Provider";case ja:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case za:return t=e.displayName||null,t!==null?t:Wa(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return Wa(e(t))}catch(n){}}return null}function t5(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 Wa(t);case 8:return t===Ba?"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 Sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ep(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function n5(e){var t=Ep(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vl(e){e._valueTracker||(e._valueTracker=n5(e))}function Cp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ep(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gl(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Za(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Pp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function kp(e,t){t=t.checked,t!=null&&Fa(e,"checked",t,!1)}function Ga(e,t){kp(e,t);var n=Sn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ya(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ya(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ya(e,t,n){(t!=="number"||gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Oi=Array.isArray;function Fr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ki(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zi={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},r5=["Webkit","ms","Moz","O"];Object.keys(zi).forEach(function(e){r5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zi[t]=zi[e]})});function Rp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zi.hasOwnProperty(e)&&zi[e]?(""+t).trim():t+"px"}function Ip(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Rp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var i5=he({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 qa(e,t){if(t){if(i5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function Ja(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 eu=null;function tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nu=null,Br=null,Vr=null;function Fp(e){if(e=co(e)){if(typeof nu!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Kl(t),nu(e.stateNode,e.type,t))}}function Bp(e){Br?Vr?Vr.push(e):Vr=[e]:Br=e}function Vp(){if(Br){var e=Br,t=Vr;if(Vr=Br=null,Fp(e),t)for(e=0;e>>=0,e===0?32:31-(m5(e)/v5|0)|0}var $l=64,El=4194304;function Wi(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 Cl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=Wi(s):(o&=l,o!==0&&(r=Wi(o)))}else l=n&~i,l!==0?r=Wi(l):o!==0&&(r=Wi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Zi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-At(t),e[t]=n}function x5(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=to),fh=" ",ph=!1;function hh(e,t){switch(e){case"keyup":return G5.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kr=!1;function X5(e,t){switch(e){case"compositionend":return mh(t);case"keypress":return t.which!==32?null:(ph=!0,fh);case"textInput":return e=t.data,e===fh&&ph?null:e;default:return null}}function Q5(e,t){if(Kr)return e==="compositionend"||!xu&&hh(e,t)?(e=lh(),Ml=hu=kn=null,Kr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sh(n)}}function Eh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ch(){for(var e=window,t=gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=gl(e.document)}return t}function $u(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 l9(e){var t=Ch(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Eh(n.ownerDocument.documentElement,n)){if(r!==null&&$u(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=$h(n,o);var l=$h(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,zr=null,Eu=null,oo=null,Cu=!1;function Ph(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cu||zr==null||zr!==gl(r)||(r=zr,"selectionStart"in r&&$u(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),oo&&io(oo,r)||(oo=r,r=Vl(Eu,"onSelect"),0Zr||(e.current=Bu[Zr],Bu[Zr]=null,Zr--)}function se(e,t){Zr++,Bu[Zr]=e.current,e.current=t}var An={},je=Mn(An),Je=Mn(!1),lr=An;function Gr(e,t){var n=e.type.contextTypes;if(!n)return An;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function zl(){ce(Je),ce(je)}function Kh(e,t,n){if(je.current!==An)throw Error(O(168));se(je,t),se(Je,n)}function zh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(O(108,t5(e)||"Unknown",i));return he({},n,r)}function _l(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||An,lr=je.current,se(je,e),se(Je,Je.current),!0}function _h(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=zh(e,t,lr),r.__reactInternalMemoizedMergedChildContext=e,ce(Je),ce(je),se(je,e)):ce(Je),se(Je,n)}var on=null,Hl=!1,Vu=!1;function Hh(e){on===null?on=[e]:on.push(e)}function y9(e){Hl=!0,Hh(e)}function Ln(){if(!Vu&&on!==null){Vu=!0;var e=0,t=ne;try{var n=on;for(ne=1;e>=l,i-=l,ln=1<<32-At(t)+i|n<A?(_=I,I=null):_=I.sibling;var j=p(h,I,y[A],$);if(j===null){I===null&&(I=_);break}e&&I&&j.alternate===null&&t(h,I),m=o(j,m,A),M===null?k=j:M.sibling=j,M=j,I=_}if(A===y.length)return n(h,I),pe&&ar(h,A),k;if(I===null){for(;AA?(_=I,I=null):_=I.sibling;var T=p(h,I,j.value,$);if(T===null){I===null&&(I=_);break}e&&I&&T.alternate===null&&t(h,I),m=o(T,m,A),M===null?k=T:M.sibling=T,M=T,I=_}if(j.done)return n(h,I),pe&&ar(h,A),k;if(I===null){for(;!j.done;A++,j=y.next())j=f(h,j.value,$),j!==null&&(m=o(j,m,A),M===null?k=j:M.sibling=j,M=j);return pe&&ar(h,A),k}for(I=r(h,I);!j.done;A++,j=y.next())j=g(I,h,A,j.value,$),j!==null&&(e&&j.alternate!==null&&I.delete(j.key===null?A:j.key),m=o(j,m,A),M===null?k=j:M.sibling=j,M=j);return e&&I.forEach(function(E){return t(h,E)}),pe&&ar(h,A),k}function x(h,m,y,$){if(typeof y=="object"&&y!==null&&y.type===Ir&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ml:e:{for(var k=y.key,M=m;M!==null;){if(M.key===k){if(k=y.type,k===Ir){if(M.tag===7){n(h,M.sibling),m=i(M,y.props.children),m.return=h,h=m;break e}}else if(M.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===wn&&Xh(k)===M.type){n(h,M.sibling),m=i(M,y.props),m.ref=fo(h,M,y),m.return=h,h=m;break e}n(h,M);break}else t(h,M);M=M.sibling}y.type===Ir?(m=vr(y.props.children,h.mode,$,y.key),m.return=h,h=m):($=ys(y.type,y.key,y.props,null,h.mode,$),$.ref=fo(h,m,y),$.return=h,h=$)}return l(h);case Rr:e:{for(M=y.key;m!==null;){if(m.key===M)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=Ic(y,h.mode,$),m.return=h,h=m}return l(h);case wn:return M=y._init,x(h,m,M(y._payload),$)}if(Oi(y))return v(h,m,y,$);if(Vi(y))return b(h,m,y,$);Gl(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=Rc(y,h.mode,$),m.return=h,h=m),l(h)):n(h,m)}return x}var qr=Qh(!0),qh=Qh(!1),Yl=Mn(null),Xl=null,Jr=null,Hu=null;function Uu(){Hu=Jr=Xl=null}function Wu(e){var t=Yl.current;ce(Yl),e._currentValue=t}function Zu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ei(e,t){Xl=e,Hu=Jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tt=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if(Hu!==e)if(e={context:e,memoizedValue:t,next:null},Jr===null){if(Xl===null)throw Error(O(308));Jr=e,Xl.dependencies={lanes:0,firstContext:e}}else Jr=Jr.next=e;return t}var ur=null;function Gu(e){ur===null?ur=[e]:ur.push(e)}function Jh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Gu(t)):(n.next=i.next,i.next=n),t.interleaved=n,an(e,r)}function an(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 Nn=!1;function Yu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function e0(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 un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,an(e,n)}return i=r.interleaved,i===null?(t.next=t,Gu(r)):(t.next=i.next,i.next=t),r.interleaved=t,an(e,n)}function Ql(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uu(e,n)}}function t0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ql(e,t,n,r){var i=e.updateQueue;Nn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?o=u:l.next=u,l=a;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==l&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;l=0,d=u=a=null,s=o;do{var p=s.lane,g=s.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,b=s;switch(p=t,g=n,b.tag){case 1:if(v=b.payload,typeof v=="function"){f=v.call(g,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,p=typeof v=="function"?v.call(g,f,p):v,p==null)break e;f=he({},f,p);break e;case 2:Nn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else g={eventTime:g,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=g,a=f):d=d.next=g,l|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(d===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);fr|=l,e.lanes=l,e.memoizedState=f}}function n0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ec.transition;ec.transition={};try{e(!1),t()}finally{ne=n,ec.transition=r}}function w0(){return St().memoizedState}function S9(e,t,n){var r=Vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},S0(e))$0(t,n);else if(n=Jh(e,t,n,r),n!==null){var i=Ye();Bt(n,e,r,i),E0(n,t,r)}}function $9(e,t,n){var r=Vn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(S0(e))$0(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,Lt(s,l)){var a=t.interleaved;a===null?(i.next=i,Gu(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch(u){}finally{}n=Jh(e,t,i,r),n!==null&&(i=Ye(),Bt(n,e,r,i),E0(n,t,r))}}function S0(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function $0(e,t){vo=ts=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function E0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uu(e,n)}}var is={readContext:wt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},E9={readContext:wt,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:p0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ns(4194308,4,v0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){return ns(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=S9.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:d0,useDebugValue:sc,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=d0(!1),t=e[0];return e=w9.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,i=_t();if(pe){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Le===null)throw Error(O(349));dr&30||l0(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,p0(a0.bind(null,r,o,e),[e]),r.flags|=2048,bo(9,s0.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=_t(),t=Le.identifierPrefix;if(pe){var n=sn,r=ln;n=(r&~(1<<32-At(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=go++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Kt]=t,e[uo]=r,H0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ja(n,r),n){case"dialog":ue("cancel",e),ue("close",e),i=r;break;case"iframe":case"object":case"embed":ue("load",e),i=r;break;case"video":case"audio":for(i=0;ioi&&(t.flags|=128,r=!0,xo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Jl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!pe)return Ke(t),null}else 2*we()-o.renderingStartTime>oi&&n!==1073741824&&(t.flags|=128,r=!0,xo(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=we(),t.sibling=null,n=me.current,se(me,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return Ac(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pt&1073741824&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function L9(e,t){switch(Ou(t),t.tag){case 1:return et(t.type)&&zl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ti(),ce(Je),ce(je),Ju(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Qu(t),null;case 13:if(ce(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(me),null;case 4:return ti(),null;case 10:return Wu(t.type._context),null;case 22:case 23:return Ac(),null;case 24:return null;default:return null}}var as=!1,ze=!1,N9=typeof WeakSet=="function"?WeakSet:Set,H=null;function ri(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){be(e,t,r)}else n.current=null}function bc(e,t,n){try{n()}catch(r){be(e,t,r)}}var Z0=!1;function R9(e,t){if(Au=Tl,e=Ch(),$u(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch($){n=null;break e}var l=0,s=-1,a=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(s=l+i),f!==o||r!==0&&f.nodeType!==3||(a=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===n&&++u===i&&(s=l),p===o&&++d===r&&(a=l),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lu={focusedElem:e,selectionRange:n},Tl=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var b=v.memoizedProps,x=v.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?b:Rt(t.type,b),x);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch($){be(t,t.return,$)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return v=Z0,Z0=!1,v}function wo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bc(t,n,o)}i=i.next}while(i!==r)}}function us(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xc(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 G0(e){var t=e.alternate;t!==null&&(e.alternate=null,G0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kt],delete t[uo],delete t[Fu],delete t[v9],delete t[g9])),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 Y0(e){return e.tag===5||e.tag===3||e.tag===4}function X0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y0(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 wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ol));else if(r!==4&&(e=e.child,e!==null))for(wc(e,t,n),e=e.sibling;e!==null;)wc(e,t,n),e=e.sibling}function Sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sc(e,t,n),e=e.sibling;e!==null;)Sc(e,t,n),e=e.sibling}var Ie=null,It=!1;function In(e,t,n){for(n=n.child;n!==null;)Q0(e,t,n),n=n.sibling}function Q0(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Sl,n)}catch(s){}switch(n.tag){case 5:ze||ri(n,t);case 6:var r=Ie,i=It;Ie=null,In(e,t,n),Ie=r,It=i,Ie!==null&&(It?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(It?(e=Ie,n=n.stateNode,e.nodeType===8?Iu(e.parentNode,n):e.nodeType===1&&Iu(e,n),qi(e)):Iu(Ie,n.stateNode));break;case 4:r=Ie,i=It,Ie=n.stateNode.containerInfo,It=!0,In(e,t,n),Ie=r,It=i;break;case 0:case 11:case 14:case 15:if(!ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&bc(n,t,l),i=i.next}while(i!==r)}In(e,t,n);break;case 1:if(!ze&&(ri(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){be(n,t,s)}In(e,t,n);break;case 21:In(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,In(e,t,n),ze=r):In(e,t,n);break;default:In(e,t,n)}}function q0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new N9),t.forEach(function(r){var i=_9.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*F9(r/1960))-r,10e?16:e,Bn===null)var r=!1;else{if(e=Bn,Bn=null,hs=0,ee&6)throw Error(O(331));var i=ee;for(ee|=4,H=e.current;H!==null;){var o=H,l=o.child;if(H.flags&16){var s=o.deletions;if(s!==null){for(var a=0;awe()-Cc?hr(e,0):Ec|=n),rt(e,t)}function dm(e,t){t===0&&(e.mode&1?(t=El,El<<=1,!(El&130023424)&&(El=4194304)):t=1);var n=Ye();e=an(e,t),e!==null&&(Zi(e,t,n),rt(e,n))}function z9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dm(e,n)}function _9(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),dm(e,n)}var fm;fm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)tt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return tt=!1,M9(e,t,n);tt=!!(e.flags&131072)}else tt=!1,pe&&t.flags&1048576&&Uh(t,Wl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ss(e,t),e=t.pendingProps;var i=Gr(t,je.current);ei(t,n),i=nc(null,t,r,e,i,n);var o=rc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(r)?(o=!0,_l(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Yu(t),i.updater=os,t.stateNode=i,i._reactInternals=t,uc(t,r,e,n),t=pc(null,t,r,!0,o,n)):(t.tag=0,pe&&o&&ju(t),Ge(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ss(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=U9(r),e=Rt(r,e),i){case 0:t=fc(null,t,r,e,n);break e;case 1:t=V0(null,t,r,e,n);break e;case 11:t=N0(null,t,r,e,n);break e;case 14:t=R0(null,t,r,Rt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),fc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),V0(e,t,r,i,n);case 3:e:{if(j0(t),e===null)throw Error(O(387));r=t.pendingProps,o=t.memoizedState,i=o.element,e0(e,t),ql(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ni(Error(O(423)),t),t=O0(e,t,r,n,i);break e}else if(r!==i){i=ni(Error(O(424)),t),t=O0(e,t,r,n,i);break e}else for(ft=Dn(t.stateNode.containerInfo.firstChild),dt=t,pe=!0,Nt=null,n=qh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qr(),r===i){t=cn(e,t,n);break e}Ge(e,t,r,n)}t=t.child}return t;case 5:return r0(t),e===null&&zu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Nu(r,i)?l=null:o!==null&&Nu(r,o)&&(t.flags|=32),B0(e,t),Ge(e,t,l,n),t.child;case 6:return e===null&&zu(t),null;case 13:return K0(e,t,n);case 4:return Xu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=qr(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),N0(e,t,r,i,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,se(Yl,r._currentValue),r._currentValue=l,o!==null)if(Lt(o.value,l)){if(o.children===i.children&&!Je.current){t=cn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=un(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Zu(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(O(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Zu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Ge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ei(t,n),i=wt(i),r=r(i),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return r=t.type,i=Rt(r,t.pendingProps),i=Rt(r.type,i),R0(e,t,r,i,n);case 15:return I0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),ss(e,t),t.tag=1,et(r)?(e=!0,_l(t)):e=!1,ei(t,n),P0(t,r,i),uc(t,r,i,n),pc(null,t,r,!0,e,n);case 19:return _0(e,t,n);case 22:return F0(e,t,n)}throw Error(O(156,t.tag))};function pm(e,t){return Wp(e,t)}function H9(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,n,r){return new H9(e,t,n,r)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function U9(e){if(typeof e=="function")return Nc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ja)return 11;if(e===za)return 14}return 2}function On(e,t){var n=e.alternate;return n===null?(n=Et(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 ys(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Nc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Ir:return vr(n.children,i,o,t);case Ba:l=8,i|=8;break;case Va:return e=Et(12,n,t,i|2),e.elementType=Va,e.lanes=o,e;case Oa:return e=Et(13,n,t,i),e.elementType=Oa,e.lanes=o,e;case Ka:return e=Et(19,n,t,i),e.elementType=Ka,e.lanes=o,e;case Sp:return bs(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xp:l=10;break e;case wp:l=9;break e;case ja:l=11;break e;case za:l=14;break e;case wn:l=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=Et(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function vr(e,t,n,r){return e=Et(7,e,r,t),e.lanes=n,e}function bs(e,t,n,r){return e=Et(22,e,r,t),e.elementType=Sp,e.lanes=n,e.stateNode={isHidden:!1},e}function Rc(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function Ic(e,t,n){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W9(e,t,n,r,i){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=au(0),this.expirationTimes=au(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,i,o,l,s,a){return e=new W9(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Et(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yu(o),e}function Z9(e,t,n){var r=3e,isStatic:!1,reducedMotion:"never"});class J9 extends c.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function e6({children:e,isPresent:t}){const n=c.useId(),r=c.useRef(null),i=c.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=c.useContext(Kc);return c.useInsertionEffect(()=>{const{width:l,height:s,top:a,left:u}=i.current;if(t||!r.current||!l||!s)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return o&&(d.nonce=o),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${l}px !important; height: ${s}px !important; top: ${a}px !important; left: ${u}px !important; } `),()=>{document.head.removeChild(d)}},[t]),C.jsx(J9,{isPresent:t,childRef:r,sizeRef:i,children:c.cloneElement(e,{ref:r})})}const t6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:l})=>{const s=Ps(n6),a=c.useId(),u=c.useCallback(f=>{s.set(f,!0);for(const p of s.values())if(!p)return;r&&r()},[s,r]),d=c.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(s.set(f,!1),()=>s.delete(f))}),o?[Math.random(),u]:[n,u]);return c.useMemo(()=>{s.forEach((f,p)=>s.set(p,!1))},[n]),c.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),l==="popLayout"&&(e=C.jsx(e6,{isPresent:n,children:e})),C.jsx(ks.Provider,{value:d,children:e})};function n6(){return new Map}function wm(e=!0){const t=c.useContext(ks);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=c.useId();c.useEffect(()=>{e&&i(o)},[e]);const l=c.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const Ts=e=>e.key||"";function Sm(e){const t=[];return c.Children.forEach(e,n=>{c.isValidElement(n)&&t.push(n)}),t}const zc=typeof window!="undefined",_c=zc?c.useLayoutEffect:c.useEffect,Kn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1})=>{const[s,a]=wm(l),u=c.useMemo(()=>Sm(e),[e]),d=l&&!s?[]:u.map(Ts),f=c.useRef(!0),p=c.useRef(u),g=Ps(()=>new Map),[v,b]=c.useState(u),[x,h]=c.useState(u);_c(()=>{f.current=!1,p.current=u;for(let $=0;${const k=Ts($),M=l&&!s?!1:u===x||d.includes(k),I=()=>{if(g.has(k))g.set(k,!0);else return;let A=!0;g.forEach(_=>{_||(A=!1)}),A&&(y==null||y(),h(p.current),l&&(a==null||a()),r&&r())};return C.jsx(t6,{isPresent:M,initial:!f.current||n?void 0:!1,custom:M?void 0:t,presenceAffectsLayout:i,mode:o,onExitComplete:M?void 0:I,children:$},k)})})},Xe=e=>e;let r6=Xe,$m=Xe;function Hc(e){let t;return()=>(t===void 0&&(t=e()),t)}const gr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},fn=e=>e*1e3,pn=e=>e/1e3,i6={useManualTiming:!1};function o6(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function s(u){o.has(u)&&(a.schedule(u),e()),u(l)}const a={schedule:(u,d=!1,f=!1)=>{const g=f&&r?t:n;return d&&o.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(l=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,a.process(u))}};return a}const Ds=["read","resolveKeyframes","update","preRender","render","postRender"],l6=40;function Em(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Ds.reduce((h,m)=>(h[m]=o6(o),h),{}),{read:s,resolveKeyframes:a,update:u,preRender:d,render:f,postRender:p}=l,g=()=>{const h=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(h-i.timestamp,l6),1),i.timestamp=h,i.isProcessing=!0,s.process(i),a.process(i),u.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},v=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:Ds.reduce((h,m)=>{const y=l[m];return h[m]=($,k=!1,M=!1)=>(n||v(),y.schedule($,k,M)),h},{}),cancel:h=>{for(let m=0;mPm[e].some(n=>!!t[n])};function s6(e){for(const t in e)si[t]=w(w({},si[t]),e[t])}const a6=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 Ms(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||a6.has(e)}let km=e=>!Ms(e);function u6(e){e&&(km=t=>t.startsWith("on")?!Ms(t):e(t))}try{u6(require("@emotion/is-prop-valid").default)}catch(e){}function c6(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(km(i)||n===!0&&Ms(i)||!t&&!Ms(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function d6(e){if(typeof Proxy=="undefined")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const As=c.createContext({});function ko(e){return typeof e=="string"||Array.isArray(e)}function Ls(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Wc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zc=["initial",...Wc];function Ns(e){return Ls(e.animate)||Zc.some(t=>ko(e[t]))}function Tm(e){return!!(Ns(e)||e.variants)}function f6(e,t){if(Ns(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ko(n)?n:void 0,animate:ko(r)?r:void 0}}return e.inherit!==!1?t:{}}function p6(e){const{initial:t,animate:n}=f6(e,c.useContext(As));return c.useMemo(()=>({initial:t,animate:n}),[Dm(t),Dm(n)])}function Dm(e){return Array.isArray(e)?e.join(" "):e}const h6=Symbol.for("motionComponentSymbol");function ai(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function m6(e,t,n){return c.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ai(n)&&(n.current=r))},[t])}const Gc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Mm="data-"+Gc("framerAppearId"),{schedule:Yc}=Em(queueMicrotask,!1),Am=c.createContext({});function v6(e,t,n,r,i){var o,l;const{visualElement:s}=c.useContext(As),a=c.useContext(Cm),u=c.useContext(ks),d=c.useContext(Kc).reducedMotion,f=c.useRef(null);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const p=f.current,g=c.useContext(Am);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&g6(f.current,n,i,g);const v=c.useRef(!1);c.useInsertionEffect(()=>{p&&v.current&&p.update(n,u)});const b=n[Mm],x=c.useRef(!!b&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,b))&&((l=window.MotionHasOptimisedAnimation)===null||l===void 0?void 0:l.call(window,b)));return _c(()=>{p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Yc.render(p.render),x.current&&p.animationState&&p.animationState.animateChanges())}),c.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var h;(h=window.MotionHandoffMarkAsComplete)===null||h===void 0||h.call(window,b)}),x.current=!1))}),p}function g6(e,t,n,r){const{layoutId:i,layout:o,drag:l,dragConstraints:s,layoutScroll:a,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lm(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||s&&ai(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:u})}function Lm(e){if(e)return e.options.allowProjection!==!1?e.projection:Lm(e.parent)}function y6({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var o,l;e&&s6(e);function s(u,d){let f;const p=R(w(w({},c.useContext(Kc)),u),{layoutId:b6(u)}),{isStatic:g}=p,v=p6(u),b=r(u,g);if(!g&&zc){x6();const x=w6(p);f=x.MeasureLayout,v.visualElement=v6(i,b,p,t,x.ProjectionNode)}return C.jsxs(As.Provider,{value:v,children:[f&&v.visualElement?C.jsx(f,w({visualElement:v.visualElement},p)):null,n(i,u,m6(b,v.visualElement,d),b,g,v.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${(l=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&l!==void 0?l:""})`}`;const a=c.forwardRef(s);return a[h6]=i,a}function b6({layoutId:e}){const t=c.useContext(Oc).id;return t&&e!==void 0?t+"-"+e:e}function x6(e,t){c.useContext(Cm).strict}function w6(e){const{drag:t,layout:n}=si;if(!t&&!n)return{};const r=w(w({},t),n);return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const S6=["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 Xc(e){return typeof e!="string"||e.includes("-")?!1:!!(S6.indexOf(e)>-1||/[A-Z]/u.test(e))}function Nm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qc(e,t,n,r){if(typeof t=="function"){const[i,o]=Nm(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Nm(r);t=t(n!==void 0?n:e.custom,i,o)}return t}const qc=e=>Array.isArray(e),$6=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),E6=e=>qc(e)?e[e.length-1]||0:e,_e=e=>!!(e&&e.getVelocity);function Rs(e){const t=_e(e)?e.get():e;return $6(t)?t.toValue():t}function C6({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,o){const l={latestValues:P6(r,i,o,e),renderState:t()};return n&&(l.onMount=s=>n(w({props:r,current:s},l)),l.onUpdate=s=>n(s)),l}const Rm=e=>(t,n)=>{const r=c.useContext(As),i=c.useContext(ks),o=()=>C6(e,t,r,i);return n?o():Ps(o)};function P6(e,t,n,r){const i={},o=r(e,{});for(const g in o)i[g]=Rs(o[g]);let{initial:l,animate:s}=e;const a=Ns(e),u=Tm(e);t&&u&&!a&&e.inherit!==!1&&(l===void 0&&(l=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||l===!1;const f=d?s:l;if(f&&typeof f!="boolean"&&!Ls(f)){const g=Array.isArray(f)?f:[f];for(let v=0;vt=>typeof t=="string"&&t.startsWith(e),Fm=Im("--"),k6=Im("var(--"),Jc=e=>k6(e)?T6.test(e.split("/*")[0].trim()):!1,T6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Bm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},To=R(w({},ci),{transform:e=>Wt(0,1,e)}),Is=R(w({},ci),{default:1}),Do=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zn=Do("deg"),Zt=Do("%"),U=Do("px"),D6=Do("vh"),M6=Do("vw"),Vm=R(w({},Zt),{parse:e=>Zt.parse(e)/100,transform:e=>Zt.transform(e*100)}),A6={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,top:U,right:U,bottom:U,left:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,backgroundPositionX:U,backgroundPositionY:U},L6={rotate:zn,rotateX:zn,rotateY:zn,rotateZ:zn,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:zn,skewX:zn,skewY:zn,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:To,originX:Vm,originY:Vm,originZ:U},jm=R(w({},ci),{transform:Math.round}),ed=R(w(w({},A6),L6),{zIndex:jm,size:U,fillOpacity:To,strokeOpacity:To,numOctaves:jm}),N6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},R6=ui.length;function I6(e,t,n){let r="",i=!0;for(let o=0;o({style:{},transform:{},transformOrigin:{},vars:{}}),Km=()=>R(w({},rd()),{attrs:{}}),id=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zm(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const _m=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 Hm(e,t,n,r){zm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(_m.has(i)?i:Gc(i),t.attrs[i])}const Fs={};function O6(e){Object.assign(Fs,e)}function Um(e,{layout:t,layoutId:n}){return yr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fs[e]||e==="opacity")}function od(e,t,n){var r;const{style:i}=e,o={};for(const l in i)(_e(i[l])||t.style&&_e(t.style[l])||Um(l,e)||((r=n==null?void 0:n.getValue(l))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[l]=i[l]);return o}function Wm(e,t,n){const r=od(e,t,n);for(const i in e)if(_e(e[i])||_e(t[i])){const o=ui.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function K6(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch(n){t.dimensions={x:0,y:0,width:0,height:0}}}const Zm=["x","y","width","height","cx","cy","r"],z6={useVisualState:Rm({scrapeMotionValuesFromProps:Wm,createRenderState:Km,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let o=!!e.drag;if(!o){for(const s in i)if(yr.has(s)){o=!0;break}}if(!o)return;let l=!t;if(t)for(let s=0;s{K6(n,r),te.render(()=>{nd(r,i,id(n.tagName),e.transformTemplate),Hm(n,r)})})}})},_6={useVisualState:Rm({scrapeMotionValuesFromProps:od,createRenderState:rd})};function Gm(e,t,n){for(const r in t)!_e(t[r])&&!Um(r,n)&&(e[r]=t[r])}function H6({transformTemplate:e},t){return c.useMemo(()=>{const n=rd();return td(n,t,e),Object.assign({},n.vars,n.style)},[t])}function U6(e,t){const n=e.style||{},r={};return Gm(r,n,e),Object.assign(r,H6(e,t)),r}function W6(e,t){const n={},r=U6(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function Z6(e,t,n,r){const i=c.useMemo(()=>{const o=Km();return nd(o,t,id(r),e.transformTemplate),R(w({},o.attrs),{style:w({},o.style)})},[t]);if(e.style){const o={};Gm(o,e.style,e),i.style=w(w({},o),i.style)}return i}function G6(e=!1){return(n,r,i,{latestValues:o},l)=>{const a=(Xc(n)?Z6:W6)(r,o,l,n),u=c6(r,typeof n=="string",e),d=n!==c.Fragment?R(w(w({},u),a),{ref:i}):{},{children:f}=r,p=c.useMemo(()=>_e(f)?f.get():f,[f]);return c.createElement(n,R(w({},d),{children:p}))}}function Y6(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o=Xc(r)?z6:_6,l=R(w({},o),{preloadedFeatures:e,useRender:G6(i),createVisualElement:t,Component:r});return y6(l)}}function Ym(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class X6{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(Xm()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Q6 extends X6{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ld(e,t){return e?e[t]||e.default||e:void 0}const sd=2e4;function Qm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=sd?1/0:t}function ad(e){return typeof e=="function"}function qm(e,t){e.timeline=t,e.onfinish=null}const ud=e=>Array.isArray(e)&&typeof e[0]=="number",q6={linearEasing:void 0};function J6(e,t){const n=Hc(e);return()=>{var r;return(r=q6[t])!==null&&r!==void 0?r:n()}}const Vs=J6(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Jm=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mo([0,.65,.55,1]),circOut:Mo([.55,0,1,.45]),backIn:Mo([.31,.01,.66,-.59]),backOut:Mo([.33,1.53,.69,.99])};function t1(e,t){if(e)return typeof e=="function"&&Vs()?Jm(e,t):ud(e)?Mo(e):Array.isArray(e)?e.map(n=>t1(n,t)||cd.easeOut):cd[e]}const Vt={x:!1,y:!1};function n1(){return Vt.x||Vt.y}function r1(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const o=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function i1(e,t){const n=r1(e),r=new AbortController,i=R(w({passive:!0},t),{signal:r.signal});return[n,i,()=>r.abort()]}function o1(e){return t=>{t.pointerType==="touch"||n1()||e(t)}}function e8(e,t,n={}){const[r,i,o]=i1(e,n),l=o1(s=>{const{target:a}=s,u=t(s);if(typeof u!="function"||!a)return;const d=o1(f=>{u(f),a.removeEventListener("pointerleave",d)});a.addEventListener("pointerleave",d,i)});return r.forEach(s=>{s.addEventListener("pointerenter",l,i)}),o}const l1=(e,t)=>t?e===t?!0:l1(e,t.parentElement):!1,dd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,t8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function n8(e){return t8.has(e.tagName)||e.tabIndex!==-1}const Ao=new WeakSet;function s1(e){return t=>{t.key==="Enter"&&e(t)}}function fd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const r8=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=s1(()=>{if(Ao.has(n))return;fd(n,"down");const i=s1(()=>{fd(n,"up")}),o=()=>fd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function a1(e){return dd(e)&&!n1()}function i8(e,t,n={}){const[r,i,o]=i1(e,n),l=s=>{const a=s.currentTarget;if(!a1(s)||Ao.has(a))return;Ao.add(a);const u=t(s),d=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!a1(g)||!Ao.has(a))&&(Ao.delete(a),typeof u=="function"&&u(g,{success:v}))},f=g=>{d(g,n.useGlobalTarget||l1(a,g.target))},p=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(s=>{!n8(s)&&s.getAttribute("tabindex")===null&&(s.tabIndex=0),(n.useGlobalTarget?window:s).addEventListener("pointerdown",l,i),s.addEventListener("focus",u=>r8(u,i),i)}),o}function o8(e){return e==="x"||e==="y"?Vt[e]?null:(Vt[e]=!0,()=>{Vt[e]=!1}):Vt.x||Vt.y?null:(Vt.x=Vt.y=!0,()=>{Vt.x=Vt.y=!1})}const u1=new Set(["width","height","top","left","right","bottom",...ui]);let js;function l8(){js=void 0}const Gt={now:()=>(js===void 0&&Gt.set(Ne.isProcessing||i6.useManualTiming?Ne.timestamp:performance.now()),js),set:e=>{js=e,queueMicrotask(l8)}};function pd(e,t){e.indexOf(t)===-1&&e.push(t)}function hd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class md{constructor(){this.subscriptions=[]}add(t){return pd(this.subscriptions,t),()=>hd(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class a8{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Gt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=s8(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new md);const r=this.events[t].add(n);return t==="change"?()=>{r(),te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>c1)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,c1);return vd(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hn(e,t){return new a8(e,t)}function u8(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,hn(n))}function c8(e,t){let l=Bs(e,t)||{},{transitionEnd:r={},transition:i={}}=l,o=Y(l,["transitionEnd","transition"]);o=w(w({},o),r);for(const s in o){const a=E6(o[s]);u8(e,s,a)}}function d8(e){return!!(_e(e)&&e.add)}function gd(e,t){const n=e.getValue("willChange");if(d8(n))return n.add(t)}function d1(e){return e.props[Mm]}const f1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,f8=1e-7,p8=12;function h8(e,t,n,r,i){let o,l,s=0;do l=t+(n-t)/2,o=f1(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>f8&&++sh8(o,0,1,e,n);return o=>o===0||o===1?o:f1(i(o),t,r)}const p1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,h1=e=>t=>1-e(1-t),m1=Lo(.33,1.53,.69,.99),yd=h1(m1),v1=p1(yd),g1=e=>(e*=2)<1?.5*yd(e):.5*(2-Math.pow(2,-10*(e-1))),bd=e=>1-Math.sin(Math.acos(e)),y1=h1(bd),b1=p1(bd),x1=e=>/^0[^.\s]+$/u.test(e);function m8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||x1(e):!0}const No=e=>Math.round(e*1e5)/1e5,xd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function v8(e){return e==null}const g8=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,wd=(e,t)=>n=>!!(typeof n=="string"&&g8.test(n)&&n.startsWith(e)||t&&!v8(n)&&Object.prototype.hasOwnProperty.call(n,t)),w1=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,l,s]=r.match(xd);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:s!==void 0?parseFloat(s):1}},y8=e=>Wt(0,255,e),Sd=R(w({},ci),{transform:e=>Math.round(y8(e))}),br={test:wd("rgb","red"),parse:w1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Sd.transform(e)+", "+Sd.transform(t)+", "+Sd.transform(n)+", "+No(To.transform(r))+")"};function b8(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const $d={test:wd("#"),parse:b8,transform:br.transform},di={test:wd("hsl","hue"),parse:w1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zt.transform(No(t))+", "+Zt.transform(No(n))+", "+No(To.transform(r))+")"},He={test:e=>br.test(e)||$d.test(e)||di.test(e),parse:e=>br.test(e)?br.parse(e):di.test(e)?di.parse(e):$d.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?br.transform(e):di.transform(e)},x8=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function w8(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(x8))===null||n===void 0?void 0:n.length)||0)>0}const S1="number",$1="color",S8="var",$8="var(",E1="${}",E8=/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 Ro(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(E8,a=>(He.test(a)?(r.color.push(o),i.push($1),n.push(He.parse(a))):a.startsWith($8)?(r.var.push(o),i.push(S8),n.push(a)):(r.number.push(o),i.push(S1),n.push(parseFloat(a))),++o,E1)).split(E1);return{values:n,split:s,indexes:r,types:i}}function C1(e){return Ro(e).values}function P1(e){const{split:t,types:n}=Ro(e),r=t.length;return i=>{let o="";for(let l=0;ltypeof e=="number"?0:e;function P8(e){const t=C1(e);return P1(e)(t.map(C8))}const _n={test:w8,parse:C1,createTransformer:P1,getAnimatableNone:P8},k8=new Set(["brightness","contrast","saturate","opacity"]);function T8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xd)||[];if(!r)return e;const i=n.replace(r,"");let o=k8.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const D8=/\b([a-z-]*)\(.*?\)/gu,Ed=R(w({},_n),{getAnimatableNone:e=>{const t=e.match(D8);return t?t.map(T8).join(" "):e}}),M8=R(w({},ed),{color:He,backgroundColor:He,outlineColor:He,fill:He,stroke:He,borderColor:He,borderTopColor:He,borderRightColor:He,borderBottomColor:He,borderLeftColor:He,filter:Ed,WebkitFilter:Ed}),Cd=e=>M8[e];function k1(e,t){let n=Cd(e);return n!==Ed&&(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const A8=new Set(["auto","none","0"]);function L8(e,t,n){let r=0,i;for(;re===ci||e===U,D1=(e,t)=>parseFloat(e.split(", ")[t]),M1=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return D1(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?D1(o[1],e):0}},N8=new Set(["x","y","z"]),R8=ui.filter(e=>!N8.has(e));function I8(e){const t=[];return R8.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const fi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:M1(4,13),y:M1(5,14)};fi.translateX=fi.x,fi.translateY=fi.y;const xr=new Set;let Pd=!1,kd=!1;function A1(){if(kd){const e=Array.from(xr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=I8(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,l])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kd=!1,Pd=!1,xr.forEach(e=>e.complete()),xr.clear()}function L1(){xr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kd=!0)})}function F8(){L1(),A1()}class Td{constructor(t,n,r,i,o,l=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=l}scheduleResolve(){this.isScheduled=!0,this.isAsync?(xr.add(this),Pd||(Pd=!0,te.read(L1),te.resolveKeyframes(A1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),B8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V8(e){const t=B8.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n!=null?n:r}`,i]}function R1(e,t,n=1){const[r,i]=V8(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return N1(l)?parseFloat(l):l}return Jc(i)?R1(i,t,n+1):i}const I1=e=>t=>t.test(e),F1=[ci,U,Zt,zn,M6,D6,{test:e=>e==="auto",parse:e=>e}],B1=e=>F1.find(I1(e));class V1 extends Td{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a{n.getValue(a).set(u)}),this.resolveNoneKeyframes()}}const j1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function j8(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Os(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(K8),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const z8=40;class O1{constructor(a){var u=a,{autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:l="loop"}=u,s=Y(u,["autoplay","delay","type","repeat","repeatDelay","repeatType"]);this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Gt.now(),this.options=w({autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:l},s),this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>z8?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&F8(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Gt.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:l,onComplete:s,onUpdate:a,isGenerator:u}=this.options;if(!u&&!O8(t,r,i,o))if(l)this.options.duration=0;else{a&&a(Os(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved=w({keyframes:t,finalKeyframe:n},d),this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ge=(e,t,n)=>e+(t-e)*n;function Dd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _8({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const s=n<.5?n*(1+t):n+t-n*t,a=2*n-s;i=Dd(a,s,e+1/3),o=Dd(a,s,e),l=Dd(a,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Ks(e,t){return n=>n>0?t:e}const Md=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},H8=[$d,br,di],U8=e=>H8.find(t=>t.test(e));function K1(e){const t=U8(e);if(!t)return!1;let n=t.parse(e);return t===di&&(n=_8(n)),n}const z1=(e,t)=>{const n=K1(e),r=K1(t);if(!n||!r)return Ks(e,t);const i=w({},n);return o=>(i.red=Md(n.red,r.red,o),i.green=Md(n.green,r.green,o),i.blue=Md(n.blue,r.blue,o),i.alpha=ge(n.alpha,r.alpha,o),br.transform(i))},W8=(e,t)=>n=>t(e(n)),Io=(...e)=>e.reduce(W8),Ad=new Set(["none","hidden"]);function Z8(e,t){return Ad.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function G8(e,t){return n=>ge(e,t,n)}function Ld(e){return typeof e=="number"?G8:typeof e=="string"?Jc(e)?Ks:He.test(e)?z1:Q8:Array.isArray(e)?_1:typeof e=="object"?He.test(e)?z1:Y8:Ks}function _1(e,t){const n=[...e],r=n.length,i=e.map((o,l)=>Ld(o)(o,t[l]));return o=>{for(let l=0;l{for(const o in r)n[o]=r[o](i);return n}}function X8(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=_n.createTransformer(t),r=Ro(e),i=Ro(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ad.has(e)&&!i.values.length||Ad.has(t)&&!r.values.length?Z8(e,t):Io(_1(X8(r,i),i.values),n):Ks(e,t)};function H1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ge(e,t,n):Ld(e)(e,t)}const q8=5;function U1(e,t,n){const r=Math.max(t-q8,0);return vd(n-e(r),t-r)}const xe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},W1=.001;function J8({duration:e=xe.duration,bounce:t=xe.bounce,velocity:n=xe.velocity,mass:r=xe.mass}){let i,o,l=1-t;l=Wt(xe.minDamping,xe.maxDamping,l),e=Wt(xe.minDuration,xe.maxDuration,pn(e)),l<1?(i=u=>{const d=u*l,f=d*e,p=d-n,g=Nd(u,l),v=Math.exp(-f);return W1-p/g*v},o=u=>{const f=u*l*e,p=f*n+n,g=Math.pow(l,2)*Math.pow(u,2)*e,v=Math.exp(-f),b=Nd(Math.pow(u,2),l);return(-i(u)+W1>0?-1:1)*((p-g)*v)/b}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const s=5/e,a=t7(i,o,s);if(e=fn(e),isNaN(a))return{stiffness:xe.stiffness,damping:xe.damping,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:l*2*Math.sqrt(r*u),duration:e}}}const e7=12;function t7(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function i7(e){let t=w({velocity:xe.velocity,stiffness:xe.stiffness,damping:xe.damping,mass:xe.mass,isResolvedFromDuration:!1},e);if(!Z1(e,r7)&&Z1(e,n7))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Wt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t=R(w({},t),{mass:xe.mass,stiffness:i,damping:o})}else{const n=J8(e);t=R(w(w({},t),n),{mass:xe.mass}),t.isResolvedFromDuration=!0}return t}function G1(e=xe.visualDuration,t=xe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:a,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:g}=i7(R(w({},n),{velocity:-pn(n.velocity||0)})),v=p||0,b=u/(2*Math.sqrt(a*d)),x=l-o,h=pn(Math.sqrt(a/d)),m=Math.abs(x)<5;r||(r=m?xe.restSpeed.granular:xe.restSpeed.default),i||(i=m?xe.restDelta.granular:xe.restDelta.default);let y;if(b<1){const k=Nd(h,b);y=M=>{const I=Math.exp(-b*h*M);return l-I*((v+b*h*x)/k*Math.sin(k*M)+x*Math.cos(k*M))}}else if(b===1)y=k=>l-Math.exp(-h*k)*(x+(v+h*x)*k);else{const k=h*Math.sqrt(b*b-1);y=M=>{const I=Math.exp(-b*h*M),A=Math.min(k*M,300);return l-I*((v+b*h*x)*Math.sinh(A)+k*x*Math.cosh(A))/k}}const $={calculatedDuration:g&&f||null,next:k=>{const M=y(k);if(g)s.done=k>=f;else{let I=0;b<1&&(I=k===0?fn(v):U1(y,k,M));const A=Math.abs(I)<=r,_=Math.abs(l-M)<=i;s.done=A&&_}return s.value=s.done?l:M,s},toString:()=>{const k=Math.min(Qm($),sd),M=Jm(I=>$.next(k*I).value,k,30);return k+"ms "+M}};return $}function Y1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:s,max:a,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},g=A=>s!==void 0&&Aa,v=A=>s===void 0?a:a===void 0||Math.abs(s-A)-b*Math.exp(-A/r),y=A=>h+m(A),$=A=>{const _=m(A),j=y(A);p.done=Math.abs(_)<=u,p.value=p.done?h:j};let k,M;const I=A=>{g(p.value)&&(k=A,M=G1({keyframes:[p.value,v(p.value)],velocity:U1(y,A,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:A=>{let _=!1;return!M&&k===void 0&&(_=!0,$(A),I(A)),k!==void 0&&A>=k?M.next(A-k):(!_&&$(A),p)}}}const o7=Lo(.42,0,1,1),l7=Lo(0,0,.58,1),X1=Lo(.42,0,.58,1),s7=e=>Array.isArray(e)&&typeof e[0]!="number",a7={linear:Xe,easeIn:o7,easeInOut:X1,easeOut:l7,circIn:bd,circInOut:b1,circOut:y1,backIn:yd,backInOut:v1,backOut:m1,anticipate:g1},Q1=e=>{if(ud(e)){$m(e.length===4);const[t,n,r,i]=e;return Lo(t,n,r,i)}else if(typeof e=="string")return a7[e];return e};function u7(e,t,n){const r=[],i=n||H1,o=e.length-1;for(let l=0;lt[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=u7(t,r,i),a=s.length,u=d=>{if(l&&d1)for(;fu(Wt(e[0],e[o-1],d)):u}function c7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=gr(0,t,r);e.push(ge(n,1,i))}}function J1(e){const t=[0];return c7(t,e.length-1),t}function d7(e,t){return e.map(n=>n*t)}function f7(e,t){return e.map(()=>t||X1).splice(0,e.length-1)}function zs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=s7(r)?r.map(Q1):Q1(r),o={done:!1,value:t[0]},l=d7(n&&n.length===t.length?n:J1(t),e),s=q1(l,t,{ease:Array.isArray(i)?i:f7(t,i)});return{calculatedDuration:e,next:a=>(o.value=s(a),o.done=a>=e,o)}}const p7=e=>{const t=({timestamp:n})=>e(n);return{start:()=>te.update(t,!0),stop:()=>Ut(t),now:()=>Ne.isProcessing?Ne.timestamp:Gt.now()}},h7={decay:Y1,inertia:Y1,tween:zs,keyframes:zs,spring:G1},m7=e=>e/100;class Rd extends O1{constructor(t){super(t),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:a}=this.options;a&&a()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,l=(i==null?void 0:i.KeyframeResolver)||Td,s=(a,u)=>this.onKeyframesResolved(a,u);this.resolver=new l(o,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:l=0}=this.options,s=ad(n)?n:h7[n]||zs;let a,u;s!==zs&&typeof t[0]!="number"&&(a=Io(m7,H1(t[0],t[1])),t=[0,100]);const d=s(R(w({},this.options),{keyframes:t}));o==="mirror"&&(u=s(R(w({},this.options),{keyframes:[...t].reverse(),velocity:-l}))),d.calculatedDuration===null&&(d.calculatedDuration=Qm(d));const{calculatedDuration:f}=d,p=f+i,g=p*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:f,resolvedDuration:p,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:l,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return o.next(0);const{delay:p,repeat:g,repeatType:v,repeatDelay:b,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const h=this.currentTime-p*(this.speed>=0?1:-1),m=this.speed>=0?h<0:h>d;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let y=this.currentTime,$=o;if(g){const A=Math.min(this.currentTime,d)/f;let _=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&_--,_=Math.min(_,g+1),!!(_%2)&&(v==="reverse"?(j=1-j,b&&(j-=b/f)):v==="mirror"&&($=l)),y=Wt(0,1,j)*f}const k=m?{done:!1,value:a[0]}:$.next(y);s&&(k.value=s(k.value));let{done:M}=k;!m&&u!==null&&(M=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return I&&i!==void 0&&(k.value=Os(a,this.options,i)),x&&x(k.value),I&&this.finish(),k}get duration(){const{resolved:t}=this;return t?pn(t.calculatedDuration):0}get time(){return pn(this.currentTime)}set time(t){t=fn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=pn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=p7,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r!=null?r:this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}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(t){return this.startTime=0,this.tick(t,!0)}}const v7=new Set(["opacity","clipPath","filter","transform"]);function g7(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:l="loop",ease:s="easeInOut",times:a}={}){const u={[t]:n};a&&(u.offset=a);const d=t1(s,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"})}const y7=Hc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),_s=10,b7=2e4;function x7(e){return ad(e.type)||e.type==="spring"||!e1(e.ease)}function w7(e,t){const n=new Rd(R(w({},t),{keyframes:e,repeat:0,delay:0,isGenerator:!0}));let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(l,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:o,type:l,motionValue:s,name:a,startTime:u}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof o=="string"&&Vs()&&S7(o)&&(o=e2[o]),x7(this.options)){const f=this.options,{onComplete:p,onUpdate:g,motionValue:v,element:b}=f,x=Y(f,["onComplete","onUpdate","motionValue","element"]),h=w7(t,x);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,i=h.times,o=h.ease,l="keyframes"}const d=g7(s.owner.current,a,t,R(w({},this.options),{duration:r,times:i,ease:o}));return d.startTime=u!=null?u:this.calcStartTime(),this.pendingTimeline?(qm(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;s.set(Os(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return pn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return pn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xe;const{animation:r}=n;qm(r,t)}return Xe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:l,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const u=this.options,{motionValue:d,onUpdate:f,onComplete:p,element:g}=u,v=Y(u,["motionValue","onUpdate","onComplete","element"]),b=new Rd(R(w({},v),{keyframes:r,duration:i,type:o,ease:l,times:s,isGenerator:!0})),x=fn(this.time);d.setWithVelocity(b.sample(x-_s).value,b.sample(x).value,_s)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:l,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:u}=n.owner.getProps();return y7()&&r&&v7.has(r)&&!a&&!u&&!i&&o!=="mirror"&&l!==0&&s!=="inertia"}}const $7={type:"spring",stiffness:500,damping:25,restSpeed:10},E7=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),C7={type:"keyframes",duration:.8},P7={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},k7=(e,{keyframes:t})=>t.length>2?C7:yr.has(e)?e.startsWith("scale")?E7(t[1]):$7:P7;function T7(f){var p=f,{when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:l,repeatDelay:s,from:a,elapsed:u}=p,d=Y(p,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}const Id=(e,t,n,r={},i,o)=>l=>{const s=ld(r,e)||{},a=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-fn(a);let d=R(w({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity()},s),{delay:-u,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{l(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i});T7(s)||(d=w(w({},d),k7(e,d))),d.duration&&(d.duration=fn(d.duration)),d.repeatDelay&&(d.repeatDelay=fn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const p=Os(d.keyframes,s);if(p!==void 0)return te.update(()=>{d.onUpdate(p),d.onComplete()}),new Q6([])}return!o&&t2.supports(d)?new t2(d):new Rd(d)};function D7({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function n2(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let f=t,{transition:l=e.getDefaultTransition(),transitionEnd:s}=f,a=Y(f,["transition","transitionEnd"]);r&&(l=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const p in a){const g=e.getValue(p,(o=e.latestValues[p])!==null&&o!==void 0?o:null),v=a[p];if(v===void 0||d&&D7(d,p))continue;const b=w({delay:n},ld(l||{},p));let x=!1;if(window.MotionHandoffAnimation){const m=d1(e);if(m){const y=window.MotionHandoffAnimation(m,p,te);y!==null&&(b.startTime=y,x=!0)}}gd(e,p),g.start(Id(p,g,v,e.shouldReduceMotion&&u1.has(p)?{type:!1}:b,e,x));const h=g.animation;h&&u.push(h)}return s&&Promise.all(u).then(()=>{te.update(()=>{s&&c8(e,s)})}),u}function Fd(e,t,n={}){var r;const i=Bs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const l=i?()=>Promise.all(n2(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return M7(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[u,d]=a==="beforeChildren"?[l,s]:[s,l];return u().then(()=>d())}else return Promise.all([l(),s(n.delay)])}function M7(e,t,n=0,r=0,i=1,o){const l=[],s=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(A7).forEach((u,d)=>{u.notify("AnimationStart",t),l.push(Fd(u,t,R(w({},o),{delay:n+a(d)})).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(l)}function A7(e,t){return e.sortNodePosition(t)}function L7(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Fd(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Fd(e,t,n);else{const i=typeof t=="function"?Bs(e,t,n.custom):t;r=Promise.all(n2(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const N7=Zc.length;function r2(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?r2(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>L7(e,n,r)))}function B7(e){let t=F7(e),n=i2(),r=!0;const i=a=>(u,d)=>{var f;const p=Bs(e,d,a==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const g=p,{transition:v,transitionEnd:b}=g,x=Y(g,["transition","transitionEnd"]);u=w(w(w({},u),x),b)}return u};function o(a){t=a(e)}function l(a){const{props:u}=e,d=r2(e.parent)||{},f=[],p=new Set;let g={},v=1/0;for(let x=0;xv&&$,_=!1;const j=Array.isArray(y)?y:[y];let T=j.reduce(i(h),{});k===!1&&(T={});const{prevResolvedValues:E={}}=m,B=w(w({},E),T),K=P=>{A=!0,p.has(P)&&(_=!0,p.delete(P)),m.needsAnimating[P]=!0;const S=e.getValue(P);S&&(S.liveStyle=!1)};for(const P in B){const S=T[P],N=E[P];if(g.hasOwnProperty(P))continue;let V=!1;qc(S)&&qc(N)?V=!Ym(S,N):V=S!==N,V?S!=null?K(P):p.add(P):S!==void 0&&p.has(P)?K(P):m.protectedKeys[P]=!0}m.prevProp=y,m.prevResolvedValues=T,m.isActive&&(g=w(w({},g),T)),r&&e.blockInitialAnimation&&(A=!1),A&&(!(M&&I)||_)&&f.push(...j.map(P=>({animation:P,options:{type:h}})))}if(p.size){const x={};p.forEach(h=>{const m=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),x[h]=m!=null?m:null}),f.push({animation:x})}let b=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(f):Promise.resolve()}function s(a,u){var d;if(n[a].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(a,u)}),n[a].isActive=u;const f=l(a);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:l,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=i2(),r=!0}}}function V7(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ym(t,e):!1}function wr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i2(){return{animate:wr(!0),whileInView:wr(),whileHover:wr(),whileTap:wr(),whileDrag:wr(),whileFocus:wr(),exit:wr()}}class Hn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class j7 extends Hn{constructor(t){super(t),t.animationState||(t.animationState=B7(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let O7=0;class K7 extends Hn{constructor(){super(...arguments),this.id=O7++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const z7={animation:{Feature:j7},exit:{Feature:K7}};function Fo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Bo(e){return{point:{x:e.pageX,y:e.pageY}}}const _7=e=>t=>dd(t)&&e(t,Bo(t));function Vo(e,t,n,r){return Fo(e,t,_7(n),r)}const o2=(e,t)=>Math.abs(e-t);function H7(e,t){const n=o2(e.x,t.x),r=o2(e.y,t.y);return Math.sqrt(tp(n,2)+tp(r,2))}class l2{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!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 f=Vd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=H7(f.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:v}=f,{timestamp:b}=Ne;this.history.push(R(w({},v),{timestamp:b}));const{onStart:x,onMove:h}=this.handlers;p||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Bd(p,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vd(f.type==="pointercancel"?this.lastMoveEventInfo:Bd(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,x),v&&v(f,x)},!dd(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const l=Bo(t),s=Bd(l,this.transformPagePoint),{point:a}=s,{timestamp:u}=Ne;this.history=[R(w({},a),{timestamp:u})];const{onSessionStart:d}=n;d&&d(t,Vd(s,this.history)),this.removeListeners=Io(Vo(this.contextWindow,"pointermove",this.handlePointerMove),Vo(this.contextWindow,"pointerup",this.handlePointerUp),Vo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ut(this.updatePoint)}}function Bd(e,t){return t?{point:t(e.point)}:e}function s2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vd({point:e},t){return{point:e,delta:s2(e,a2(t)),offset:s2(e,U7(t)),velocity:W7(t,.1)}}function U7(e){return e[0]}function a2(e){return e[e.length-1]}function W7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=a2(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const o=pn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}const u2=1e-4,Z7=1-u2,G7=1+u2,c2=.01,Y7=0-c2,X7=0+c2;function ht(e){return e.max-e.min}function Q7(e,t,n){return Math.abs(e-t)<=n}function d2(e,t,n,r=.5){e.origin=r,e.originPoint=ge(t.min,t.max,e.origin),e.scale=ht(n)/ht(t),e.translate=ge(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Z7&&e.scale<=G7||isNaN(e.scale))&&(e.scale=1),(e.translate>=Y7&&e.translate<=X7||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){d2(e.x,t.x,n.x,r?r.originX:void 0),d2(e.y,t.y,n.y,r?r.originY:void 0)}function f2(e,t,n){e.min=n.min+t.min,e.max=e.min+ht(t)}function q7(e,t,n){f2(e.x,t.x,n.x),f2(e.y,t.y,n.y)}function p2(e,t,n){e.min=t.min-n.min,e.max=e.min+ht(t)}function Oo(e,t,n){p2(e.x,t.x,n.x),p2(e.y,t.y,n.y)}function J7(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ge(n,e,r.max):Math.min(e,n)),e}function h2(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eb(e,{top:t,left:n,bottom:r,right:i}){return{x:h2(e.x,n,i),y:h2(e.y,t,r)}}function m2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=gr(t.min,t.max-r,e.min):r>i&&(n=gr(e.min,e.max-i,t.min)),Wt(0,1,n)}function rb(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jd=.35;function ib(e=jd){return e===!1?e=0:e===!0&&(e=jd),{x:v2(e,"left","right"),y:v2(e,"top","bottom")}}function v2(e,t,n){return{min:g2(e,t),max:g2(e,n)}}function g2(e,t){return typeof e=="number"?e:e[t]||0}const y2=()=>({translate:0,scale:1,origin:0,originPoint:0}),pi=()=>({x:y2(),y:y2()}),b2=()=>({min:0,max:0}),Se=()=>({x:b2(),y:b2()});function Ct(e){return[e("x"),e("y")]}function x2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ob({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lb(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Od(e){return e===void 0||e===1}function Kd({scale:e,scaleX:t,scaleY:n}){return!Od(e)||!Od(t)||!Od(n)}function Sr(e){return Kd(e)||w2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function w2(e){return S2(e.x)||S2(e.y)}function S2(e){return e&&e!=="0%"}function Hs(e,t,n){const r=e-n,i=t*r;return n+i}function $2(e,t,n,r,i){return i!==void 0&&(e=Hs(e,i,r)),Hs(e,n,r)+t}function zd(e,t=0,n=1,r,i){e.min=$2(e.min,t,n,r,i),e.max=$2(e.max,t,n,r,i)}function E2(e,{x:t,y:n}){zd(e.x,t.translate,t.scale,t.originPoint),zd(e.y,n.translate,n.scale,n.originPoint)}const C2=.999999999999,P2=1.0000000000001;function sb(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let s=0;sC2&&(t.x=1),t.yC2&&(t.y=1)}function hi(e,t){e.min=e.min+t,e.max=e.max+t}function k2(e,t,n,r,i=.5){const o=ge(e.min,e.max,i);zd(e,t,n,o,r)}function mi(e,t){k2(e.x,t.x,t.scaleX,t.scale,t.originX),k2(e.y,t.y,t.scaleY,t.scale,t.originY)}function T2(e,t){return x2(lb(e.getBoundingClientRect(),t))}function ab(e,t,n){const r=T2(e,n),{scroll:i}=t;return i&&(hi(r.x,i.offset.x),hi(r.y,i.offset.y)),r}const D2=({current:e})=>e?e.ownerDocument.defaultView:null,ub=new WeakMap;class cb{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bo(d).point)},o=(d,f)=>{const{drag:p,dragPropagation:g,onDragStart:v}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=o8(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ct(x=>{let h=this.getAxisMotionValue(x).get()||0;if(Zt.test(h)){const{projection:m}=this.visualElement;if(m&&m.layout){const y=m.layout.layoutBox[x];y&&(h=ht(y)*(parseFloat(h)/100))}}this.originPoint[x]=h}),v&&te.postRender(()=>v(d,f)),gd(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(d,f)=>{const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:v,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=f;if(g&&this.currentDirection===null){this.currentDirection=db(x),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),b&&b(d,f)},s=(d,f)=>this.stop(d,f),a=()=>Ct(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new l2(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:s,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:D2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&te.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Us(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=J7(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ai(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=eb(i.layoutBox,n):this.constraints=!1,this.elastic=ib(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ct(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=rb(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ai(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=ab(r,i.root,this.visualElement.getTransformPagePoint());let l=tb(i.layout.layoutBox,o);if(n){const s=n(ob(l));this.hasMutatedConstraints=!!s,s&&(l=x2(s))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},u=Ct(d=>{if(!Us(d,n,this.currentDirection))return;let f=a&&a[d]||{};l&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,v=w(w({type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10},o),f);return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return gd(this.visualElement,t),r.start(Id(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ct(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ct(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ct(n=>{const{drag:r}=this.getProps();if(!Us(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:s}=i.layout.layoutBox[n];o.set(t[n]-ge(l,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ai(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ct(l=>{const s=this.getAxisMotionValue(l);if(s&&this.constraints!==!1){const a=s.get();i[l]=nb({min:a,max:a},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ct(l=>{if(!Us(l,t,null))return;const s=this.getAxisMotionValue(l),{min:a,max:u}=this.constraints[l];s.set(ge(a,u,i[l]))})}addListeners(){if(!this.visualElement.current)return;ub.set(this.visualElement,this);const t=this.visualElement.current,n=Vo(t,"pointerdown",a=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();ai(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),te.read(r);const l=Fo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ct(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=a[d].translate,f.set(f.get()+a[d].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=jd,dragMomentum:s=!0}=t;return R(w({},t),{drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:s})}}function Us(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function db(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class fb extends Hn{constructor(t){super(t),this.removeGroupControls=Xe,this.removeListeners=Xe,this.controls=new cb(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xe}unmount(){this.removeGroupControls(),this.removeListeners()}}const M2=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class pb extends Hn{constructor(){super(...arguments),this.removePointerDownListener=Xe}onPointerDown(t){this.session=new l2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:D2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:M2(t),onStart:M2(n),onMove:r,onEnd:(o,l)=>{delete this.session,i&&te.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Vo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function A2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ko={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(U.test(e))e=parseFloat(e);else return e;const n=A2(e,t.target.x),r=A2(e,t.target.y);return`${n}% ${r}%`}},hb={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=_n.parse(e);if(i.length>5)return r;const o=_n.createTransformer(e),l=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,a=n.y.scale*t.y;i[0+l]/=s,i[1+l]/=a;const u=ge(s,a,.5);return typeof i[2+l]=="number"&&(i[2+l]/=u),typeof i[3+l]=="number"&&(i[3+l]/=u),o(i)}};class mb extends c.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;O6(vb),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions(R(w({},o.options),{onExitComplete:()=>this.safeToRemove()}))),Ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,l=r.projection;return l&&(l.isPresent=o,i||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||te.postRender(()=>{const s=l.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function L2(e){const[t,n]=wm(),r=c.useContext(Oc);return C.jsx(mb,R(w({},e),{layoutGroup:r,switchLayoutGroup:c.useContext(Am),isPresent:t,safeToRemove:n}))}const vb={borderRadius:R(w({},Ko),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ko,borderTopRightRadius:Ko,borderBottomLeftRadius:Ko,borderBottomRightRadius:Ko,boxShadow:hb};function gb(e,t,n){const r=_e(e)?e:hn(e);return r.start(Id("",r,t,n)),r.animation}function yb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const bb=(e,t)=>e.depth-t.depth;class xb{constructor(){this.children=[],this.isDirty=!1}add(t){pd(this.children,t),this.isDirty=!0}remove(t){hd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(bb),this.isDirty=!1,this.children.forEach(t)}}function wb(e,t){const n=Gt.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ut(r),e(o-t))};return te.read(r,!0),()=>Ut(r)}const N2=["TopLeft","TopRight","BottomLeft","BottomRight"],Sb=N2.length,R2=e=>typeof e=="string"?parseFloat(e):e,I2=e=>typeof e=="number"||U.test(e);function $b(e,t,n,r,i,o){i?(e.opacity=ge(0,n.opacity!==void 0?n.opacity:1,Eb(r)),e.opacityExit=ge(t.opacity!==void 0?t.opacity:1,0,Cb(r))):o&&(e.opacity=ge(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;lrt?1:n(gr(e,t,r))}function V2(e,t){e.min=t.min,e.max=t.max}function Pt(e,t){V2(e.x,t.x),V2(e.y,t.y)}function j2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function O2(e,t,n,r,i){return e-=t,e=Hs(e,1/n,r),i!==void 0&&(e=Hs(e,1/i,r)),e}function Pb(e,t=0,n=1,r=.5,i,o=e,l=e){if(Zt.test(t)&&(t=parseFloat(t),t=ge(l.min,l.max,t/100)-l.min),typeof t!="number")return;let s=ge(o.min,o.max,r);e===o&&(s-=t),e.min=O2(e.min,t,n,s,i),e.max=O2(e.max,t,n,s,i)}function K2(e,t,[n,r,i],o,l){Pb(e,t[n],t[r],t[i],t.scale,o,l)}const kb=["x","scaleX","originX"],Tb=["y","scaleY","originY"];function z2(e,t,n,r){K2(e.x,t,kb,n?n.x:void 0,r?r.x:void 0),K2(e.y,t,Tb,n?n.y:void 0,r?r.y:void 0)}function _2(e){return e.translate===0&&e.scale===1}function H2(e){return _2(e.x)&&_2(e.y)}function U2(e,t){return e.min===t.min&&e.max===t.max}function Db(e,t){return U2(e.x,t.x)&&U2(e.y,t.y)}function W2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Z2(e,t){return W2(e.x,t.x)&&W2(e.y,t.y)}function G2(e){return ht(e.x)/ht(e.y)}function Y2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Mb{constructor(){this.members=[]}add(t){pd(this.members,t),t.scheduleRender()}remove(t){if(hd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ab(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((i||o||l)&&(r=`translate3d(${i}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const $r={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},zo=typeof window!="undefined"&&window.MotionDebug!==void 0,_d=["","X","Y","Z"],Lb={visibility:"hidden"},X2=1e3;let Nb=0;function Hd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Q2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=d1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Q2(r)}function q2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},s=t==null?void 0:t()){this.id=Nb++,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,zo&&($r.totalNodes=$r.resolvedTargetDeltas=$r.recalculatedProjection=0),this.nodes.forEach(Fb),this.nodes.forEach(Kb),this.nodes.forEach(zb),this.nodes.forEach(Bb),zo&&window.MotionDebug.record($r)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=wb(p,250),Ws.hasAnimatedSinceResize&&(Ws.hasAnimatedSinceResize=!1,this.nodes.forEach(ev))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||d.getDefaultTransition()||Zb,{onLayoutAnimationStart:x,onLayoutAnimationComplete:h}=d.getProps(),m=!this.targetLayout||!Z2(this.targetLayout,v)||g,y=!p&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||p&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const $=R(w({},ld(b,"layout")),{onPlay:x,onComplete:h});(d.shouldReduceMotion||this.options.layoutRoot)&&($.delay=0,$.type=!1),this.startAnimation($)}else p||ev(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ut(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(_b),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Q2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{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 a=0;a{const k=$/1e3;tv(f.x,l.x,k),tv(f.y,l.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oo(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ub(this.relativeTarget,this.relativeTargetOrigin,p,k),y&&Db(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Se()),Pt(y,this.relativeTarget)),b&&(this.animationValues=d,$b(d,u,this.latestValues,k,m,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{Ws.hasAnimatedSinceResize=!0,this.currentAnimation=gb(0,X2,R(w({},l),{onUpdate:s=>{this.mixTargetDelta(s),l.onUpdate&&l.onUpdate(s)},onComplete:()=>{l.onComplete&&l.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 l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(X2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:s,target:a,layout:u,latestValues:d}=l;if(!(!s||!a||!u)){if(this!==l&&this.layout&&u&&lv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||Se();const f=ht(this.layout.layoutBox.x);a.x.min=l.target.x.min,a.x.max=a.x.min+f;const p=ht(this.layout.layoutBox.y);a.y.min=l.target.y.min,a.y.max=a.y.min+p}Pt(s,a),mi(s,d),jo(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(l,s){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Mb),this.sharedNodes.get(l).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:s}=this.options;return s?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:s}=this.options;return s?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:s,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),l&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let s=!1;const{latestValues:a}=l;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(s=!0),!s)return;const u={};a.z&&Hd("z",l,u,this.animationValues);for(let d=0;d<_d.length;d++)Hd(`rotate${_d[d]}`,l,u,this.animationValues),Hd(`skew${_d[d]}`,l,u,this.animationValues);l.render();for(const d in u)l.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);l.scheduleRender()}getProjectionStyles(l){var s,a;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Lb;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Rs(l==null?void 0:l.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=Rs(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Sr(this.latestValues)&&(b.transform=d?d({},""):"none",this.hasProjected=!1),b}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Ab(this.projectionDeltaWithTransform,this.treeScale,p),d&&(u.transform=d(p,u.transform));const{x:g,y:v}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,f.animationValues?u.opacity=f===this?(a=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const b in Fs){if(p[b]===void 0)continue;const{correct:x,applyTo:h}=Fs[b],m=u.transform==="none"?p[b]:x(p[b],f);if(h){const y=h.length;for(let $=0;${var s;return(s=l.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(J2),this.root.sharedNodes.clear()}}}function Rb(e){e.updateLayout()}function Ib(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=n.source!==e.layout.source;o==="size"?Ct(f=>{const p=l?n.measuredBox[f]:n.layoutBox[f],g=ht(p);p.min=r[f].min,p.max=p.min+g}):lv(o,n.layoutBox,r)&&Ct(f=>{const p=l?n.measuredBox[f]:n.layoutBox[f],g=ht(r[f]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const s=pi();jo(s,r,n.layoutBox);const a=pi();l?jo(a,e.applyTransform(i,!0),n.measuredBox):jo(a,r,n.layoutBox);const u=!H2(s);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:g}=f;if(p&&g){const v=Se();Oo(v,n.layoutBox,p.layoutBox);const b=Se();Oo(b,r,g.layoutBox),Z2(v,b)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Fb(e){zo&&$r.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Bb(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vb(e){e.clearSnapshot()}function J2(e){e.clearMeasurements()}function jb(e){e.isLayoutDirty=!1}function Ob(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ev(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kb(e){e.resolveTargetDelta()}function zb(e){e.calcProjection()}function _b(e){e.resetSkewAndRotation()}function Hb(e){e.removeLeadSnapshot()}function tv(e,t,n){e.translate=ge(t.translate,0,n),e.scale=ge(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function nv(e,t,n,r){e.min=ge(t.min,n.min,r),e.max=ge(t.max,n.max,r)}function Ub(e,t,n,r){nv(e.x,t.x,n.x,r),nv(e.y,t.y,n.y,r)}function Wb(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zb={duration:.45,ease:[.4,0,.1,1]},rv=e=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),iv=rv("applewebkit/")&&!rv("chrome/")?Math.round:Xe;function ov(e){e.min=iv(e.min),e.max=iv(e.max)}function Gb(e){ov(e.x),ov(e.y)}function lv(e,t,n){return e==="position"||e==="preserve-aspect"&&!Q7(G2(t),G2(n),.2)}function Yb(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Xb=q2({attachResizeListener:(e,t)=>Fo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ud={current:void 0},sv=q2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ud.current){const e=new Xb({});e.mount(window),e.setOptions({layoutScroll:!0}),Ud.current=e}return Ud.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Qb={pan:{Feature:pb},drag:{Feature:fb,ProjectionNode:sv,MeasureLayout:L2}};function av(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&te.postRender(()=>o(t,Bo(t)))}class qb extends Hn{mount(){const{current:t}=this.node;t&&(this.unmount=e8(t,n=>(av(this.node,n,"Start"),r=>av(this.node,r,"End"))))}unmount(){}}class Jb extends Hn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(n){t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Io(Fo(this.node.current,"focus",()=>this.onFocus()),Fo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uv(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&te.postRender(()=>o(t,Bo(t)))}class ex extends Hn{mount(){const{current:t}=this.node;t&&(this.unmount=i8(t,n=>(uv(this.node,n,"Start"),(r,{success:i})=>uv(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wd=new WeakMap,Zd=new WeakMap,tx=e=>{const t=Wd.get(e.target);t&&t(e)},nx=e=>{e.forEach(tx)};function rx(n){var r=n,{root:e}=r,t=Y(r,["root"]);const i=e||document;Zd.has(i)||Zd.set(i,{});const o=Zd.get(i),l=JSON.stringify(t);return o[l]||(o[l]=new IntersectionObserver(nx,w({root:e},t))),o[l]}function ix(e,t,n){const r=rx(t);return Wd.set(e,n),r.observe(e),()=>{Wd.delete(e),r.unobserve(e)}}const ox={some:0,all:1};class lx extends Hn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ox[i]},s=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(a)};return ix(this.node.current,l,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(sx(t,n))&&this.startObserver()}unmount(){}}function sx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ax={inView:{Feature:lx},tap:{Feature:ex},focus:{Feature:Jb},hover:{Feature:qb}},ux={layout:{ProjectionNode:sv,MeasureLayout:L2}},Gd={current:null},cv={current:!1};function cx(){if(cv.current=!0,!!zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gd.current=e.matches;e.addListener(t),t()}else Gd.current=!1}const dx=[...F1,He,_n],fx=e=>dx.find(I1(e)),dv=new WeakMap;function px(e,t,n){for(const r in t){const i=t[r],o=n[r];if(_e(i))e.addValue(r,i);else if(_e(o))e.addValue(r,hn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,hn(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hx{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:l},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Td,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 v=Gt.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),cv.current||cx(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gd.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){dv.delete(this.current),this.projection&&this.projection.unmount(),Ut(this.notifyUpdate),Ut(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yr.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in si){const n=si[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=hn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(N1(i)||x1(i))?i=parseFloat(i):!fx(i)&&_n.test(n)&&(i=k1(t,n)),this.setBaseTarget(t,_e(i)?i.get():i)),_e(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=Qc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!_e(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new md),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pv extends hx{constructor(){super(...arguments),this.KeyframeResolver=V1}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_e(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function mx(e){return window.getComputedStyle(e)}class vx extends pv{constructor(){super(...arguments),this.type="html",this.renderInstance=zm}readValueFromInstance(t,n){if(yr.has(n)){const r=Cd(n);return r&&r.default||0}else{const r=mx(t),i=(Fm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return T2(t,n)}build(t,n,r){td(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return od(t,n,r)}}class gx extends pv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yr.has(n)){const r=Cd(n);return r&&r.default||0}return n=_m.has(n)?n:Gc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wm(t,n,r)}build(t,n,r){nd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Hm(t,n,r,i)}mount(t){this.isSVGTag=id(t.tagName),super.mount(t)}}const yx=(e,t)=>Xc(e)?new gx(t):new vx(t,{allowProjection:e!==c.Fragment}),bx=Y6(w(w(w(w({},z7),ax),Qb),ux),yx),ie=d6(bx);function xx(e,t,n){c.useInsertionEffect(()=>e.on(t,n),[e,t,n])}function hv(e,t){let n;const r=()=>{const{currentTime:i}=t,l=(i===null?0:i.value)/100;n!==l&&e(l),n=l};return te.update(r,!0),()=>Ut(r)}const Zs=new WeakMap;let Un;function wx(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function Sx({target:e,contentRect:t,borderBoxSize:n}){var r;(r=Zs.get(e))===null||r===void 0||r.forEach(i=>{i({target:e,contentSize:t,get size(){return wx(e,n)}})})}function $x(e){e.forEach(Sx)}function Ex(){typeof ResizeObserver!="undefined"&&(Un=new ResizeObserver($x))}function Cx(e,t){Un||Ex();const n=r1(e);return n.forEach(r=>{let i=Zs.get(r);i||(i=new Set,Zs.set(r,i)),i.add(t),Un==null||Un.observe(r)}),()=>{n.forEach(r=>{const i=Zs.get(r);i==null||i.delete(t),i!=null&&i.size||Un==null||Un.unobserve(r)})}}const Gs=new Set;let _o;function Px(){_o=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Gs.forEach(n=>n(t))},window.addEventListener("resize",_o)}function kx(e){return Gs.add(e),_o||Px(),()=>{Gs.delete(e),!Gs.size&&_o&&(_o=void 0)}}function Tx(e,t){return typeof e=="function"?kx(e):Cx(e,t)}const Dx=50,mv=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Mx=()=>({time:0,x:mv(),y:mv()}),Ax={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function vv(e,t,n,r){const i=n[t],{length:o,position:l}=Ax[t],s=i.current,a=n.time;i.current=e[`scroll${l}`],i.scrollLength=e[`scroll${o}`]-e[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=gr(0,i.scrollLength,i.current);const u=r-a;i.velocity=u>Dx?0:vd(i.current-s,u)}function Lx(e,t,n){vv(e,"x",t,n),vv(e,"y",t,n),t.time=n}function Nx(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const i=r.getBoundingClientRect();r=r.parentElement;const o=r.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(r instanceof SVGGraphicsElement){const{x:i,y:o}=r.getBBox();n.x+=i,n.y+=o;let l=null,s=r.parentNode;for(;!l;)s.tagName==="svg"&&(l=s),s=r.parentNode;r=l}else break;return n}const Yd={start:0,center:.5,end:1};function gv(e,t,n=0){let r=0;if(e in Yd&&(e=Yd[e]),typeof e=="string"){const i=parseFloat(e);e.endsWith("px")?r=i:e.endsWith("%")?e=i/100:e.endsWith("vw")?r=i/100*document.documentElement.clientWidth:e.endsWith("vh")?r=i/100*document.documentElement.clientHeight:e=i}return typeof e=="number"&&(r=t*e),n+r}const Rx=[0,0];function Ix(e,t,n,r){let i=Array.isArray(e)?e:Rx,o=0,l=0;return typeof e=="number"?i=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?i=e.split(" "):i=[e,Yd[e]?e:"0"]),o=gv(i[0],n,r),l=gv(i[1],t),o-l}const Fx={All:[[0,0],[1,1]]},Bx={x:0,y:0};function Vx(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function jx(e,t,n){const{offset:r=Fx.All}=n,{target:i=e,axis:o="y"}=n,l=o==="y"?"height":"width",s=i!==e?Nx(i,e):Bx,a=i===e?{width:e.scrollWidth,height:e.scrollHeight}:Vx(i),u={width:e.clientWidth,height:e.clientHeight};t[o].offset.length=0;let d=!t[o].interpolate;const f=r.length;for(let p=0;pOx(e,r.target,n),update:i=>{Lx(e,n,i),(r.offset||r.target)&&jx(e,n,r)},notify:()=>t(n)}}const Ho=new WeakMap,yv=new WeakMap,Xd=new WeakMap,bv=e=>e===document.documentElement?window:e;function Qd(e,r={}){var i=r,{container:t=document.documentElement}=i,n=Y(i,["container"]);let o=Xd.get(t);o||(o=new Set,Xd.set(t,o));const l=Mx(),s=Kx(t,e,l,n);if(o.add(s),!Ho.has(t)){const u=()=>{for(const v of o)v.measure()},d=()=>{for(const v of o)v.update(Ne.timestamp)},f=()=>{for(const v of o)v.notify()},p=()=>{te.read(u,!1,!0),te.read(d,!1,!0),te.update(f,!1,!0)};Ho.set(t,p);const g=bv(t);window.addEventListener("resize",p,{passive:!0}),t!==document.documentElement&&yv.set(t,Tx(t,p)),g.addEventListener("scroll",p,{passive:!0})}const a=Ho.get(t);return te.read(a,!1,!0),()=>{var u;Ut(a);const d=Xd.get(t);if(!d||(d.delete(s),d.size))return;const f=Ho.get(t);Ho.delete(t),f&&(bv(t).removeEventListener("scroll",f),(u=yv.get(t))===null||u===void 0||u(),window.removeEventListener("resize",f))}}function zx({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},i=Qd(o=>{r.value=o[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:i}}const qd=new Map;function xv({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),qd.has(t)||qd.set(t,{});const r=qd.get(t);return r[n]||(r[n]=Xm()?new ScrollTimeline({source:t,axis:n}):zx({source:t,axis:n})),r[n]}function _x(e){return e.length===2}function wv(e){return e&&(e.target||e.offset)}function Hx(e,t){return _x(e)||wv(t)?Qd(n=>{e(n[t.axis].progress,n)},t):hv(e,xv(t))}function Ux(e,t){if(e.flatten(),wv(t))return e.pause(),Qd(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=xv(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),hv(i=>{r.time=r.duration*i},n))):Xe}}function Wx(e,r={}){var i=r,{axis:t="y"}=i,n=Y(i,["axis"]);const o=w({axis:t},n);return typeof e=="function"?Hx(e,o):Ux(e,o)}function Sv(e,t){r6(!!(!t||t.current))}const Zx=()=>({scrollX:hn(0),scrollY:hn(0),scrollXProgress:hn(0),scrollYProgress:hn(0)});function Gx(i={}){var o=i,{container:e,target:t,layoutEffect:n=!0}=o,r=Y(o,["container","target","layoutEffect"]);const l=Ps(Zx);return(n?_c:c.useEffect)(()=>(Sv("target",t),Sv("container",e),Wx((a,{x:u,y:d})=>{l.scrollX.set(u.current),l.scrollXProgress.set(u.progress),l.scrollY.set(d.current),l.scrollYProgress.set(d.progress)},R(w({},r),{container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}))),[e,t,JSON.stringify(r.offset)]),l}const $v=c.createContext(null);c.createContext(null),c.createContext(null),c.createContext(null),c.createContext(null);const Ev=c.createContext({}),le=typeof document!="undefined"?F.useLayoutEffect:()=>{};function Pe(e){const t=c.useRef(null);return le(()=>{t.current=e},[e]),c.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function Yx(e){let[t,n]=c.useState(e),r=c.useRef(null),i=Pe(()=>{if(!r.current)return;let l=r.current.next();if(l.done){r.current=null;return}t===l.value?i():n(l.value)});le(()=>{r.current&&i()});let o=Pe(l=>{r.current=l(t),i()});return[t,o]}const Cv={prefix:String(Math.round(Math.random()*1e10)),current:0},Pv=F.createContext(Cv),Xx=F.createContext(!1);let Jd=new WeakMap;function Qx(e=!1){let t=c.useContext(Pv),n=c.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=Jd.get(o);l==null?Jd.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==l.state&&(t.current=l.id,Jd.delete(o))}n.current=++t.current}return n.current}function qx(e){let t=c.useContext(Pv),n=Qx(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Jx(e){let t=F.useId(),[n]=c.useState(Wn()),r=n?"react-aria":`react-aria${Cv.prefix}`;return e||`${r}-${t}`}const ew=typeof F.useId=="function"?Jx:qx;function tw(){return!1}function nw(){return!0}function rw(e){return()=>{}}function Wn(){return typeof F.useSyncExternalStore=="function"?F.useSyncExternalStore(rw,tw,nw):c.useContext(Xx)}let iw=!!(typeof window!="undefined"&&window.document&&window.document.createElement),vi=new Map,Uo;typeof FinalizationRegistry!="undefined"&&(Uo=new FinalizationRegistry(e=>{vi.delete(e)}));function mt(e){let[t,n]=c.useState(e),r=c.useRef(null),i=ew(t),o=c.useRef(null);if(Uo&&Uo.register(o,i),iw){const l=vi.get(i);l&&!l.includes(r)?l.push(r):vi.set(i,[r])}return le(()=>{let l=i;return()=>{Uo&&Uo.unregister(o),vi.delete(l)}},[i]),c.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),i}function ow(e,t){if(e===t)return e;let n=vi.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=vi.get(t);return r?(r.forEach(i=>i.current=e),e):t}function Ys(e=[]){let t=mt(),[n,r]=Yx(t),i=c.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return le(i,[t,i,...e]),n}function gi(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const oe=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},vt=e=>e&&"window"in e&&e.window===e?e:oe(e).defaultView||window;function lw(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function sw(e){return lw(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let aw=!1;function Xs(){return aw}function it(e,t){if(!Xs())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:sw(n)?n=n.host:n=n.parentNode}return!1}const Qe=(e=document)=>{var t;if(!Xs())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function $e(e){return Xs()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}class uw{get currentNode(){return this._currentNode}set currentNode(t){if(!it(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=t,i=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,s=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),r=i=l.host}else r=r.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(o),o.currentNode=i,this._currentSetFor.add(o),this._walkerStack=n}get doc(){return this._doc}firstChild(){let t=this.currentNode,n=this.nextNode();return it(t,n)?(n&&(this.currentNode=n),n):(this.currentNode=t,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(t):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(t)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let o=this.nextNode();return o&&(this.currentNode=o),o}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=t.previousNode();if(n){if(n.shadowRoot){var r;let o;if(typeof this.filter=="function"?o=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(o=this.filter.acceptNode(n)),o===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(t,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{if(l.nodeType===Node.ELEMENT_NODE){const a=l.shadowRoot;if(a){const u=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{var s;if(typeof this.filter=="function")return this.filter(l);if(!((s=this.filter)===null||s===void 0)&&s.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=n,this.filter=i!=null?i:null,this.whatToShow=r!=null?r:NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(t.createTreeWalker(n,r,this._acceptNode));const o=n.shadowRoot;if(o){const l=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}}function cw(e,t,n,r){return Xs()?new uw(e,t,n,r):e.createTreeWalker(t,n,r)}function kv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t=65&&i.charCodeAt(2)<=90?t[i]=gi(o,l):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof l=="string"?t[i]=dw(o,l):i==="id"&&o&&l?t.id=ow(o,l):t[i]=l!==void 0?l:o}}return t}function ef(...e){return e.length===1&&e[0]?e[0]:t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}const fw=new Set(["id"]),pw=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),hw=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mw=/^(data-.*)$/;function qe(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,o={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(fw.has(l)||n&&pw.has(l)||r&&hw.has(l)||i!=null&&i.has(l)||mw.test(l))&&(o[l]=e[l]);return o}function mn(e){if(vw())e.focus({preventScroll:!0});else{let t=gw(e);e.focus(),yw(t)}}let Qs=null;function vw(){if(Qs==null){Qs=!1;try{document.createElement("div").focus({get preventScroll(){return Qs=!0,!0}})}catch(e){}}return Qs}function gw(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeighte.test(n.brand)))||e.test(window.navigator.userAgent)}function tf(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function vn(e){let t=null;return()=>(t==null&&(t=e()),t)}const Er=vn(function(){return tf(/^Mac/i)}),bw=vn(function(){return tf(/^iPhone/i)}),Tv=vn(function(){return tf(/^iPad/i)||Er()&&navigator.maxTouchPoints>1}),Js=vn(function(){return bw()||Tv()}),xw=vn(function(){return Er()||Js()}),ww=vn(function(){return qs(/AppleWebKit/i)&&!Dv()}),Dv=vn(function(){return qs(/Chrome/i)}),nf=vn(function(){return qs(/Android/i)}),Sw=vn(function(){return qs(/Firefox/i)}),$w=c.createContext({isNative:!0,open:Cw,useHref:e=>e});function rf(){return c.useContext($w)}function Cr(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:l,altKey:s,shiftKey:a}=t;Sw()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Er()?o=!0:l=!0);let u=ww()&&Er()&&!Tv()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:l,altKey:s,shiftKey:a}):new MouseEvent("click",{metaKey:o,ctrlKey:l,altKey:s,shiftKey:a,bubbles:!0,cancelable:!0});Cr.isOpening=n,mn(e),e.dispatchEvent(u),Cr.isOpening=!1}Cr.isOpening=!1;function Ew(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function Cw(e,t){Ew(e,n=>Cr(n,t))}function Mv(e){let t=rf();var n;const r=t.useHref((n=e.href)!==null&&n!==void 0?n:"");return{"data-href":e.href?r:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}let yi=new Map,of=new Set;function Av(){if(typeof window=="undefined")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=yi.get(r.target);i||(i=new Set,yi.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=yi.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),yi.delete(r.target)),yi.size===0)){for(let o of of)o();of.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document!="undefined"&&(document.readyState!=="loading"?Av():document.addEventListener("DOMContentLoaded",Av));function Lv(e){requestAnimationFrame(()=>{yi.size===0?e():of.add(e)})}function ea(){let e=c.useRef(new Map),t=c.useCallback((i,o,l,s)=>{let a=s!=null&&s.once?(...u)=>{e.current.delete(l),l(...u)}:l;e.current.set(l,{type:o,eventTarget:i,fn:a,options:s}),i.addEventListener(o,a,s)},[]),n=c.useCallback((i,o,l,s)=>{var a;let u=((a=e.current.get(l))===null||a===void 0?void 0:a.fn)||l;i.removeEventListener(o,u,s),e.current.delete(l)},[]),r=c.useCallback(()=>{e.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return c.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Nv(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=mt(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Zn(e){const t=c.useRef(null);return c.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function Pw(e,t){const n=c.useRef(!0),r=c.useRef(null);c.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),c.useEffect(()=>{let i=r.current;n.current?n.current=!1:(!i||t.some((o,l)=>!Object.is(o,i[l])))&&e(),r.current=t},t)}function Rv(e,t){const n=c.useRef(!0),r=c.useRef(null);le(()=>(n.current=!0,()=>{n.current=!1}),[]),le(()=>{n.current?n.current=!1:(!r.current||t.some((i,o)=>!Object.is(i,r[o])))&&e(),r.current=t},t)}function lf(e,t){le(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Wo(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Gn(e,t){let n=e;for(Wo(n,t)&&(n=n.parentElement);n&&!Wo(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function kw(e,t){const n=[];for(;e&&e!==document.documentElement;)Wo(e,t)&&n.push(e),e=e.parentElement;return n}let kt=typeof document!="undefined"&&window.visualViewport;function Tw(){let e=Wn(),[t,n]=c.useState(()=>e?{width:0,height:0}:Iv());return c.useEffect(()=>{let r=()=>{n(i=>{let o=Iv();return o.width===i.width&&o.height===i.height?i:o})};return kt?kt.addEventListener("resize",r):window.addEventListener("resize",r),()=>{kt?kt.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Iv(){return{width:kt&&(kt==null?void 0:kt.width)||window.innerWidth,height:kt&&(kt==null?void 0:kt.height)||window.innerHeight}}let Dw=0;const sf=new Map;function af(e){let[t,n]=c.useState();return le(()=>{if(!e)return;let r=sf.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${Dw++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=e,document.body.appendChild(o),r={refCount:0,element:o},sf.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),sf.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function ta(e,t,n,r){let i=Pe(n),o=n==null;c.useEffect(()=>{if(o||!e.current)return;let l=e.current;return l.addEventListener(t,i,r),()=>{l.removeEventListener(t,i,r)}},[e,t,r,o,i])}function Fv(e,t){let n=Bv(e,t,"left"),r=Bv(e,t,"top"),i=t.offsetWidth,o=t.offsetHeight,l=e.scrollLeft,s=e.scrollTop,{borderTopWidth:a,borderLeftWidth:u,scrollPaddingTop:d,scrollPaddingRight:f,scrollPaddingBottom:p,scrollPaddingLeft:g}=getComputedStyle(e),v=l+parseInt(u,10),b=s+parseInt(a,10),x=v+e.clientWidth,h=b+e.clientHeight,m=parseInt(d,10)||0,y=parseInt(p,10)||0,$=parseInt(f,10)||0,k=parseInt(g,10)||0;n<=l+k?l=n-parseInt(u,10)-k:n+i>x-$&&(l+=n+i-x+$),r<=b+m?s=r-parseInt(a,10)-m:r+o>h-y&&(s+=r+o-h+y),e.scrollLeft=l,e.scrollTop=s}function Bv(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function Yn(e,t){if(e&&document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let a=kw(e);for(let u of a)Fv(u,e)}else{var n;let{left:a,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:d,top:f}=e.getBoundingClientRect();if(Math.abs(a-d)>1||Math.abs(u-f)>1){var r,i,o;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=e.scrollIntoView)===null||o===void 0||o.call(e,{block:"nearest"})}}}}function Vv(e){return e.mozInputSource===0&&e.isTrusted?!0:nf()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Mw(e){return!nf()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Aw(e,t,n){let r=c.useRef(t),i=Pe(()=>{n&&n(r.current)});c.useEffect(()=>{var o;let l=e==null||(o=e.current)===null||o===void 0?void 0:o.form;return l==null||l.addEventListener("reset",i),()=>{l==null||l.removeEventListener("reset",i)}},[e,i])}const Lw="react-aria-clear-focus",Nw="react-aria-focus";function bi(e){return Er()?e.metaKey:e.ctrlKey}function jv(e,t=!0){let[n,r]=c.useState(!0),i=n&&t;return le(()=>{if(i&&e.current&&"getAnimations"in e.current)for(let o of e.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[e,i]),Kv(e,i,c.useCallback(()=>r(!1),[])),i}function Ov(e,t){let[n,r]=c.useState(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open");break}let i=n==="exiting";return Kv(e,i,c.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Kv(e,t,n){le(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){n();return}let r=e.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Po.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[e,t,n])}const uf=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Rw=uf.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";uf.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Iw=uf.join(':not([hidden]):not([tabindex="-1"]),');function zv(e){return e.matches(Rw)}function Fw(e){return e.matches(Iw)}function cf(e,t,n){let[r,i]=c.useState(e||t),o=c.useRef(e!==void 0),l=e!==void 0;c.useEffect(()=>{o.current,o.current=l},[l]);let s=l?e:r,a=c.useCallback((u,...d)=>{let f=(p,...g)=>{n&&(Object.is(s,p)||n(p,...g)),l||(s=p)};typeof u=="function"?i((g,...v)=>{let b=u(l?s:g,...v);return f(b,...d),l?g:b}):(l||i(u),f(u,...d))},[l,s,n]);return[s,a]}const xi=Symbol("default");function Pr({values:e,children:t}){for(let[n,r]of e)t=F.createElement(n.Provider,{value:r},t);return t}function Yt(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:l,values:s}=e;return c.useMemo(()=>{let a,u,d;return typeof t=="function"?a=t(R(w({},s),{defaultClassName:i})):a=t,typeof n=="function"?u=n(R(w({},s),{defaultStyle:l||{}})):u=n,typeof r=="function"?d=r(R(w({},s),{defaultChildren:o})):r==null?d=o:d=r,{className:a!=null?a:i,style:u||l?w(w({},l),u):void 0,children:d!=null?d:o,"data-rac":""}},[t,n,r,i,o,l,s])}function Bw(e,t){return n=>t(typeof e=="function"?e(n):e,n)}function _v(e,t){let n=c.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=t||xi;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),o=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${i}.`)}return n.slots[r]}return n}function Xn(e,t,n){let a=_v(n,e.slot)||{},{ref:i}=a,o=Y(a,["ref"]),l=Zn(c.useMemo(()=>ef(t,i),[t,i])),s=q(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&(typeof o.style=="function"||typeof e.style=="function"?s.style=u=>{let d=typeof o.style=="function"?o.style(u):o.style,f=w(w({},u.defaultStyle),d),p=typeof e.style=="function"?e.style(R(w({},u),{defaultStyle:f})):e.style;return w(w({},f),p)}:s.style=w(w({},o.style),e.style)),[s,l]}function Vw(e=!0){let[t,n]=c.useState(e),r=c.useRef(!1),i=c.useCallback(o=>{r.current=!0,n(!!o)},[]);return le(()=>{r.current||n(!1)},[]),[i,t]}function Hv(e){const t=/^(data-.*)$/;let n={};for(const r in e)t.test(r)||(n[r]=e[r]);return n}class df{get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new df(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}constructor(t,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=t,this.key=n}}class ff{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(t),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(t){let n=this.keyMap.get(t);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(t){let n=this.keyMap.get(t);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,n=new t;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(t.key,t)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(t)}commit(t,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=n,this.frozen=!r}UNSTABLE_filter(t){let n=new ff,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),l=null;for(let s of this.getChildren(i.key))if(Uv(s,t,this,n)){let a=s.clone();l==null&&(o.firstChildKey=a.key),n.firstKey==null&&(n.firstKey=o.key),l&&l.parentKey===a.parentKey?(l.nextKey=a.key,a.prevKey=l.key):a.prevKey=null,a.nextKey=null,n.addNode(a),l=a}l&&(l.type!=="header"?(o.lastChildKey=l.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(l.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else{let o=i.clone();Uv(o,t,this,n)&&(n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function Uv(e,t,n,r){if(e.type==="subdialogtrigger"||e.type==="submenutrigger"){let i=[...n.getChildren(e.key)][0];if(i&&t(i.textValue)){let o=i.clone();return r.addNode(o),!0}else return!1}else return e.type==="header"?!0:t(e.textValue)}class Wv{*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||t.indexthis.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}}function Zv(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=e,l=c.useMemo(()=>new WeakMap,o);return c.useMemo(()=>{if(n&&typeof t=="function"){let u=[];for(let d of n){let f=l.get(d);if(!f){f=t(d);var s,a;let p=(a=(s=f.props.id)!==null&&s!==void 0?s:d.key)!==null&&a!==void 0?a:d.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),f=c.cloneElement(f,i?{key:p,id:p,value:d}:{key:p}),l.set(d,f)}u.push(f)}return u}else if(typeof t!="function")return t},[t,n,l,r,i])}if(typeof HTMLTemplateElement!="undefined"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const pf=c.createContext(!1);function Ow(e){if(c.useContext(pf))return F.createElement(F.Fragment,null,e.children);let n=F.createElement(pf.Provider,{value:!0},e.children);return F.createElement("template",{"data-react-aria-hidden":!0},n)}function Kw(e){let t=(n,r)=>c.useContext(pf)?null:e(n,r);return t.displayName=e.displayName||e.name,c.forwardRef(t)}function hf(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Gv(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Yv(e){let t=c.useRef({isFocused:!1,observer:null});le(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Pe(r=>{e==null||e(r)});return c.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,o=l=>{if(t.current.isFocused=!1,i.disabled){let s=hf(l);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var l;(l=t.current.observer)===null||l===void 0||l.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let na=!1;function zw(e){for(;e&&!zv(e);)e=e.parentElement;let t=vt(e),n=t.document.activeElement;if(!n||n===e)return;na=!0;let r=!1,i=d=>{(d.target===n||r)&&d.stopImmediatePropagation()},o=d=>{(d.target===n||r)&&(d.stopImmediatePropagation(),!e&&!r&&(r=!0,mn(n),a()))},l=d=>{(d.target===e||r)&&d.stopImmediatePropagation()},s=d=>{(d.target===e||r)&&(d.stopImmediatePropagation(),r||(r=!0,mn(n),a()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",l,!0);let a=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",l,!0),na=!1,r=!1},u=requestAnimationFrame(a);return a}let Si="default",mf="",ra=new WeakMap;function _w(e){if(Js()){if(Si==="default"){const t=oe(e);mf=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Si="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";ra.set(e,e.style[t]),e.style[t]="none"}}function Xv(e){if(Js()){if(Si!=="disabled")return;Si="restoring",setTimeout(()=>{Lv(()=>{if(Si==="restoring"){const t=oe(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=mf||""),mf="",Si="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ra.has(e)){let t=ra.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ra.delete(e)}}const Zo=F.createContext({register:()=>{}});Zo.displayName="PressResponderContext";function Hw(e,t){return t.get?t.get.call(e):t.value}function Qv(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Uw(e,t){var n=Qv(e,t,"get");return Hw(e,n)}function Ww(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zw(e,t,n){Ww(e,t),t.set(e,n)}function Gw(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function qv(e,t,n){var r=Qv(e,t,"set");return Gw(e,r,n),n}function Yw(e){let t=c.useContext(Zo);if(t){let n=t,{register:r}=n,i=Y(n,["register"]);e=q(i,e),r()}return lf(t,e.ref),e}var ia=new WeakMap;class oa{continuePropagation(){qv(this,ia,!1)}get shouldStopPropagation(){return Uw(this,ia)}constructor(t,n,r,i){Zw(this,ia,{writable:!0,value:void 0}),qv(this,ia,!0);var o;let l=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=l==null?void 0:l.getBoundingClientRect();let a,u=0,d,f=null;r.clientX!=null&&r.clientY!=null&&(d=r.clientX,f=r.clientY),s&&(d!=null&&f!=null?(a=d-s.left,u=f-s.top):(a=s.width/2,u=s.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=u}}const Jv=Symbol("linkClicked");function $i(e){let T=Yw(e),{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:l,isDisabled:s,isPressed:a,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:p}=T,g=Y(T,["onPress","onPressChange","onPressStart","onPressEnd","onPressUp","onClick","isDisabled","isPressed","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","ref"]),[v,b]=c.useState(!1),x=c.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:h,removeAllGlobalListeners:m}=ea(),y=Pe((E,B)=>{let K=x.current;if(s||K.didFirePressStart)return!1;let L=!0;if(K.isTriggeringEvent=!0,r){let D=new oa("pressstart",B,E);r(D),L=D.shouldStopPropagation}return n&&n(!0),K.isTriggeringEvent=!1,K.didFirePressStart=!0,b(!0),L}),$=Pe((E,B,K=!0)=>{let L=x.current;if(!L.didFirePressStart)return!1;L.didFirePressStart=!1,L.isTriggeringEvent=!0;let D=!0;if(i){let P=new oa("pressend",B,E);i(P),D=P.shouldStopPropagation}if(n&&n(!1),b(!1),t&&K&&!s){let P=new oa("press",B,E);t(P),D&&(D=P.shouldStopPropagation)}return L.isTriggeringEvent=!1,D}),k=Pe((E,B)=>{let K=x.current;if(s)return!1;if(o){K.isTriggeringEvent=!0;let L=new oa("pressup",B,E);return o(L),K.isTriggeringEvent=!1,L.shouldStopPropagation}return!0}),M=Pe(E=>{let B=x.current;if(B.isPressed&&B.target){B.didFirePressStart&&B.pointerType!=null&&$(Ei(B.target,E),B.pointerType,!1),B.isPressed=!1,B.isOverTarget=!1,B.activePointerId=null,B.pointerType=null,m(),f||Xv(B.target);for(let K of B.disposables)K();B.disposables=[]}}),I=Pe(E=>{d&&M(E)}),A=Pe(E=>{l==null||l(E)}),_=Pe((E,B)=>{if(l){let K=new MouseEvent("click",E);Gv(K,B),l(hf(K))}}),j=c.useMemo(()=>{let E=x.current,B={onKeyDown(L){if(gf(L.nativeEvent,L.currentTarget)&&it(L.currentTarget,$e(L.nativeEvent))){var D;eg($e(L.nativeEvent),L.key)&&L.preventDefault();let P=!0;if(!E.isPressed&&!L.repeat){E.target=L.currentTarget,E.isPressed=!0,E.pointerType="keyboard",P=y(L,"keyboard");let S=L.currentTarget,N=V=>{gf(V,S)&&!V.repeat&&it(S,$e(V))&&E.target&&k(Ei(E.target,V),"keyboard")};h(oe(L.currentTarget),"keyup",gi(N,K),!0)}P&&L.stopPropagation(),L.metaKey&&Er()&&((D=E.metaKeyEvents)===null||D===void 0||D.set(L.key,L.nativeEvent))}else L.key==="Meta"&&(E.metaKeyEvents=new Map)},onClick(L){if(!(L&&!it(L.currentTarget,$e(L.nativeEvent)))&&L&&L.button===0&&!E.isTriggeringEvent&&!Cr.isOpening){let D=!0;if(s&&L.preventDefault(),!E.ignoreEmulatedMouseEvents&&!E.isPressed&&(E.pointerType==="virtual"||Vv(L.nativeEvent))){let P=y(L,"virtual"),S=k(L,"virtual"),N=$(L,"virtual");A(L),D=P&&S&&N}else if(E.isPressed&&E.pointerType!=="keyboard"){let P=E.pointerType||L.nativeEvent.pointerType||"virtual";D=$(Ei(L.currentTarget,L),P,!0),E.isOverTarget=!1,A(L),M(L)}E.ignoreEmulatedMouseEvents=!1,D&&L.stopPropagation()}}},K=L=>{var D;if(E.isPressed&&E.target&&gf(L,E.target)){var P;eg($e(L),L.key)&&L.preventDefault();let N=$e(L),V=it(E.target,$e(L));$(Ei(E.target,L),"keyboard",V),V&&_(L,E.target),m(),L.key!=="Enter"&&vf(E.target)&&it(E.target,N)&&!L[Jv]&&(L[Jv]=!0,Cr(E.target,L,!1)),E.isPressed=!1,(P=E.metaKeyEvents)===null||P===void 0||P.delete(L.key)}else if(L.key==="Meta"&&(!((D=E.metaKeyEvents)===null||D===void 0)&&D.size)){var S;let N=E.metaKeyEvents;E.metaKeyEvents=void 0;for(let V of N.values())(S=E.target)===null||S===void 0||S.dispatchEvent(new KeyboardEvent("keyup",V))}};if(typeof PointerEvent!="undefined"){B.onPointerDown=P=>{if(P.button!==0||!it(P.currentTarget,$e(P.nativeEvent)))return;if(Mw(P.nativeEvent)){E.pointerType="virtual";return}E.pointerType=P.pointerType;let S=!0;if(!E.isPressed){E.isPressed=!0,E.isOverTarget=!0,E.activePointerId=P.pointerId,E.target=P.currentTarget,f||_w(E.target),S=y(P,E.pointerType);let N=$e(P.nativeEvent);"releasePointerCapture"in N&&N.releasePointerCapture(P.pointerId),h(oe(P.currentTarget),"pointerup",L,!1),h(oe(P.currentTarget),"pointercancel",D,!1)}S&&P.stopPropagation()},B.onMouseDown=P=>{if(it(P.currentTarget,$e(P.nativeEvent))&&P.button===0){if(u){let S=zw(P.target);S&&E.disposables.push(S)}P.stopPropagation()}},B.onPointerUp=P=>{!it(P.currentTarget,$e(P.nativeEvent))||E.pointerType==="virtual"||P.button===0&&k(P,E.pointerType||P.pointerType)},B.onPointerEnter=P=>{P.pointerId===E.activePointerId&&E.target&&!E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!0,y(Ei(E.target,P),E.pointerType))},B.onPointerLeave=P=>{P.pointerId===E.activePointerId&&E.target&&E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!1,$(Ei(E.target,P),E.pointerType,!1),I(P))};let L=P=>{if(P.pointerId===E.activePointerId&&E.isPressed&&P.button===0&&E.target){if(it(E.target,$e(P))&&E.pointerType!=null){let S=!1,N=setTimeout(()=>{E.isPressed&&E.target instanceof HTMLElement&&(S?M(P):(mn(E.target),E.target.click()))},80);h(P.currentTarget,"click",()=>S=!0,!0),E.disposables.push(()=>clearTimeout(N))}else M(P);E.isOverTarget=!1}},D=P=>{M(P)};B.onDragStart=P=>{it(P.currentTarget,$e(P.nativeEvent))&&M(P)}}return B},[h,s,u,m,f,M,I,$,y,k,A,_]);return c.useEffect(()=>{let E=p==null?void 0:p.current;E&&E instanceof vt(E).Element&&vt(E).getComputedStyle(E).touchAction==="auto"&&(E.style.touchAction="pan-x pan-y pinch-zoom")},[p]),c.useEffect(()=>{let E=x.current;return()=>{var B;f||Xv((B=E.target)!==null&&B!==void 0?B:void 0);for(let K of E.disposables)K();E.disposables=[]}},[f]),{isPressed:a||v,pressProps:q(g,j)}}function vf(e){return e.tagName==="A"&&e.hasAttribute("href")}function gf(e,t){const{key:n,code:r}=e,i=t,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof vt(i).HTMLInputElement&&!tg(i,n)||i instanceof vt(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&vf(i))&&n!=="Enter")}function Ei(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Xw(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!vf(e)}function eg(e,t){return e instanceof HTMLInputElement?!tg(e,t):Xw(e)}const Qw=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function tg(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Qw.has(e.type)}let gn=null,Go=new Set,Yo=new Map,kr=!1,yf=!1;const qw={Tab:!0,Escape:!0};function la(e,t){for(let n of Go)n(e,t)}function Jw(e){return!(e.metaKey||!Er()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function sa(e){kr=!0,Jw(e)&&(gn="keyboard",la("keyboard",e))}function Ci(e){gn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(kr=!0,la("pointer",e))}function ng(e){Vv(e)&&(kr=!0,gn="virtual")}function rg(e){e.target===window||e.target===document||na||!e.isTrusted||(!kr&&!yf&&(gn="virtual",la("virtual",e)),kr=!1,yf=!1)}function ig(){na||(kr=!1,yf=!0)}function aa(e){if(typeof window=="undefined"||Yo.get(vt(e)))return;const t=vt(e),n=oe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){kr=!0,r.apply(this,arguments)},n.addEventListener("keydown",sa,!0),n.addEventListener("keyup",sa,!0),n.addEventListener("click",ng,!0),t.addEventListener("focus",rg,!0),t.addEventListener("blur",ig,!1),typeof PointerEvent!="undefined"&&(n.addEventListener("pointerdown",Ci,!0),n.addEventListener("pointermove",Ci,!0),n.addEventListener("pointerup",Ci,!0)),t.addEventListener("beforeunload",()=>{og(e)},{once:!0}),Yo.set(t,{focus:r})}const og=(e,t)=>{const n=vt(e),r=oe(e);t&&r.removeEventListener("DOMContentLoaded",t),Yo.has(n)&&(n.HTMLElement.prototype.focus=Yo.get(n).focus,r.removeEventListener("keydown",sa,!0),r.removeEventListener("keyup",sa,!0),r.removeEventListener("click",ng,!0),n.removeEventListener("focus",rg,!0),n.removeEventListener("blur",ig,!1),typeof PointerEvent!="undefined"&&(r.removeEventListener("pointerdown",Ci,!0),r.removeEventListener("pointermove",Ci,!0),r.removeEventListener("pointerup",Ci,!0)),Yo.delete(n))};function eS(e){const t=oe(e);let n;return t.readyState!=="loading"?aa(e):(n=()=>{aa(e)},t.addEventListener("DOMContentLoaded",n)),()=>og(e,n)}typeof document!="undefined"&&eS();function bf(){return gn!=="pointer"}function ua(){return gn}function tS(e){gn=e,la(e,null)}function lg(){aa();let[e,t]=c.useState(gn);return c.useEffect(()=>{let n=()=>{t(gn)};return Go.add(n),()=>{Go.delete(n)}},[]),Wn()?null:e}const nS=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function rS(e,t,n){let r=oe(n==null?void 0:n.target);const i=typeof window!="undefined"?vt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window!="undefined"?vt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window!="undefined"?vt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window!="undefined"?vt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!nS.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!qw[n.key])}function iS(e,t,n){aa(),c.useEffect(()=>{let r=(i,o)=>{rS(!!(n!=null&&n.isTextInput),i,o)&&e(bf())};return Go.add(r),()=>{Go.delete(r)}},t)}function ot(e){const t=oe(e),n=Qe(t);if(ua()==="virtual"){let r=n;Lv(()=>{Qe(t)===r&&e.isConnected&&mn(e)})}else mn(e)}function sg(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=c.useCallback(a=>{if(a.target===a.currentTarget)return r&&r(a),i&&i(!1),!0},[r,i]),l=Yv(o),s=c.useCallback(a=>{const u=oe(a.target),d=u?Qe(u):Qe();a.target===a.currentTarget&&d===$e(a.nativeEvent)&&(n&&n(a),i&&i(!0),l(a))},[i,n,l]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?o:void 0}}}function ag(e){if(!e)return;let t=!0;return n=>{let r=R(w({},n),{preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}});e(r),t&&n.stopPropagation()}}function oS(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:ag(e.onKeyDown),onKeyUp:ag(e.onKeyUp)}}}let xf=F.createContext(null);function lS(e){let t=c.useContext(xf)||{};lf(t,e);let i=t,{ref:n}=i;return Y(i,["ref"])}function wf(e,t){let{focusProps:n}=sg(e),{keyboardProps:r}=oS(e),i=q(n,r),o=lS(t),l=e.isDisabled?{}:o,s=c.useRef(e.autoFocus);c.useEffect(()=>{s.current&&t.current&&ot(t.current),s.current=!1},[t]);let a=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(a=void 0),{focusableProps:q(R(w({},i),{tabIndex:a}),l)}}const sS=F.forwardRef((r,n)=>{var i=r,{children:e}=i,t=Y(i,["children"]);let o=c.useRef(!1),l=c.useContext(Zo);n=Zn(n||(l==null?void 0:l.ref));let s=q(l||{},R(w({},t),{ref:n,register(){o.current=!0,l&&l.register()}}));return lf(l,n),c.useEffect(()=>{o.current||(o.current=!0)},[]),F.createElement(Zo.Provider,{value:s},e)});function aS({children:e}){let t=c.useMemo(()=>({register:()=>{}}),[]);return F.createElement(Zo.Provider,{value:t},e)}function ca(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=c.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=ea(),a=c.useCallback(f=>{f.currentTarget.contains(f.target)&&o.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(f),i&&i(!1))},[n,i,o,s]),u=Yv(a),d=c.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=oe(f.target),g=Qe(p);if(!o.current.isFocusWithin&&g===$e(f.nativeEvent)){r&&r(f),i&&i(!0),o.current.isFocusWithin=!0,u(f);let v=f.currentTarget;l(p,"focus",b=>{if(o.current.isFocusWithin&&!it(v,b.target)){let x=new p.defaultView.FocusEvent("blur",{relatedTarget:b.target});Gv(x,v);let h=hf(x);a(h)}},{capture:!0})}},[r,i,u,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:a}}}let Sf=!1,$f=0;function uS(){Sf=!0,setTimeout(()=>{Sf=!1},50)}function ug(e){e.pointerType==="touch"&&uS()}function cS(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"&&document.addEventListener("pointerup",ug),$f++,()=>{$f--,!($f>0)&&typeof PointerEvent!="undefined"&&document.removeEventListener("pointerup",ug)}}function da(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,l]=c.useState(!1),s=c.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;c.useEffect(cS,[]);let{addGlobalListener:a,removeAllGlobalListeners:u}=ea(),{hoverProps:d,triggerHoverEnd:f}=c.useMemo(()=>{let p=(b,x)=>{if(s.pointerType=x,i||x==="touch"||s.isHovered||!b.currentTarget.contains(b.target))return;s.isHovered=!0;let h=b.currentTarget;s.target=h,a(oe(b.target),"pointerover",m=>{s.isHovered&&s.target&&!it(s.target,m.target)&&g(m,m.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:h,pointerType:x}),n&&n(!0),l(!0)},g=(b,x)=>{let h=s.target;s.pointerType="",s.target=null,!(x==="touch"||!s.isHovered||!h)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:h,pointerType:x}),n&&n(!1),l(!1))},v={};return typeof PointerEvent!="undefined"&&(v.onPointerEnter=b=>{Sf&&b.pointerType==="mouse"||p(b,b.pointerType)},v.onPointerLeave=b=>{!i&&b.currentTarget.contains(b.target)&&g(b,b.pointerType)}),{hoverProps:v,triggerHoverEnd:g}},[t,n,r,i,s,a,u]);return c.useEffect(()=>{i&&f({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:d,isHovered:o}}function dS(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,o=c.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Pe(a=>{n&&cg(a,t)&&(i&&i(a),o.current.isPointerDown=!0)}),s=Pe(a=>{n&&n(a)});c.useEffect(()=>{let a=o.current;if(r)return;const u=t.current,d=oe(u);if(typeof PointerEvent!="undefined"){let f=p=>{a.isPointerDown&&cg(p,t)&&s(p),a.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("pointerup",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("pointerup",f,!0)}}},[t,r,l,s])}function cg(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const fS=500;function pS(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=fS,accessibilityDescription:l}=e;const s=c.useRef(void 0);let{addGlobalListener:a,removeGlobalListener:u}=ea(),{pressProps:d}=$i({isDisabled:t,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(n&&n(R(w({},p),{type:"longpressstart"})),s.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),oe(p.target).activeElement!==p.target&&mn(p.target),i&&i(R(w({},p),{type:"longpress"})),s.current=void 0},o),p.pointerType==="touch")){let g=v=>{v.preventDefault()};a(p.target,"contextmenu",g,{once:!0}),a(window,"pointerup",()=>{setTimeout(()=>{u(p.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(p){s.current&&clearTimeout(s.current),r&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r(R(w({},p),{type:"longpressend"}))}}),f=af(i&&!t?l:void 0);return{longPressProps:q(d,f)}}var dg={exports:{}},fg={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Pi=c;function hS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mS=typeof Object.is=="function"?Object.is:hS,vS=Pi.useState,gS=Pi.useEffect,yS=Pi.useLayoutEffect,bS=Pi.useDebugValue;function xS(e,t){var n=t(),r=vS({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return yS(function(){i.value=n,i.getSnapshot=t,Ef(i)&&o({inst:i})},[e,n,t]),gS(function(){return Ef(i)&&o({inst:i}),e(function(){Ef(i)&&o({inst:i})})},[e]),bS(n),n}function Ef(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mS(e,n)}catch(r){return!0}}function wS(e,t){return t()}var SS=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?wS:xS;fg.useSyncExternalStore=Pi.useSyncExternalStore!==void 0?Pi.useSyncExternalStore:SS,dg.exports=fg;var $S=dg.exports;const pg=c.createContext(!1),Xo=c.createContext(null);function hg(e){if(c.useContext(Xo))return e.content;let{collection:n,document:r}=kS(e.createCollection);return F.createElement(F.Fragment,null,F.createElement(Ow,null,F.createElement(Xo.Provider,{value:r},e.content)),F.createElement(ES,{render:e.children,collection:n}))}function ES({collection:e,render:t}){return t(e)}function CS(e,t,n){let r=Wn(),i=c.useRef(r);i.current=r;let o=c.useCallback(()=>i.current?n():t(),[t,n]);return $S.useSyncExternalStore(e,o)}const PS=typeof F.useSyncExternalStore=="function"?F.useSyncExternalStore:CS;function kS(e){let[t]=c.useState(()=>new jw((e==null?void 0:e())||new ff)),n=c.useCallback(l=>t.subscribe(l),[t]),r=c.useCallback(()=>{let l=t.getCollection();return t.isSSR&&t.resetAfterSSR(),l},[t]),i=c.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]),o=PS(n,r,i);return le(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:o,document:t}}const Cf=c.createContext(null);function TS(e,t,n,r,i,o){let l=c.useCallback(a=>{a==null||a.setProps(t,n,r,o)},[t,n,r,o]),s=c.useContext(Cf);if(s){let a=s.ownerDocument.nodesByProps.get(t);return a||(a=s.ownerDocument.createElement(e),a.setProps(t,n,r,o),s.appendChild(a),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,a)),i?F.createElement(Cf.Provider,{value:a},i):null}return F.createElement(e,{ref:l},i)}function mg(e,t){let n=({node:i})=>t(i.props,i.props.ref,i),r=c.forwardRef((i,o)=>{let l=c.useContext(xf);if(!c.useContext(pg)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,o)}return TS(e,i,o,"children"in i?i.children:null,null,a=>F.createElement(xf.Provider,{value:l},F.createElement(n,{node:a})))});return r.displayName=t.name,r}function DS(e){return Zv(R(w({},e),{addIdAndValue:!0}))}const vg=c.createContext(null);function gg(e){let t=c.useContext(vg),n=((t==null?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope||(t==null?void 0:t.idScope),i=DS(R(w({},e),{idScope:r,dependencies:n}));return c.useContext(Xo)&&(i=F.createElement(MS,null,i)),t=c.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),F.createElement(vg.Provider,{value:t},i)}function MS({children:e}){let t=c.useContext(Xo),n=c.useMemo(()=>F.createElement(Xo.Provider,{value:null},F.createElement(pg.Provider,{value:!0},e)),[e]);return Wn()?F.createElement(Cf.Provider,{value:t},n):Po.createPortal(n,t)}const AS=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),LS=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function NS(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return AS.has(n.script)}let t=e.split("-")[0];return LS.has(t)}const RS=Symbol.for("react-aria.i18n.locale");function yg(){let e=typeof window!="undefined"&&window[RS]||typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:NS(e)?"rtl":"ltr"}}let Pf=yg(),Qo=new Set;function bg(){Pf=yg();for(let e of Qo)e(Pf)}function IS(){let e=Wn(),[t,n]=c.useState(Pf);return c.useEffect(()=>(Qo.size===0&&window.addEventListener("languagechange",bg),Qo.add(n),()=>{Qo.delete(n),Qo.size===0&&window.removeEventListener("languagechange",bg)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const FS=F.createContext(null);function ki(){let e=IS();return c.useContext(FS)||e}const BS=Symbol.for("react-aria.i18n.locale"),VS=Symbol.for("react-aria.i18n.strings");let Ti;class fa{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=jS(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window=="undefined")return null;let n=window[BS];if(Ti===void 0){let i=window[VS];if(!i)return null;Ti={};for(let o in i)Ti[o]=new fa({[n]:i[o]},n)}let r=Ti==null?void 0:Ti[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function jS(e,t,n="en-US"){if(t[e])return t[e];let r=OS(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function OS(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const xg=new Map,wg=new Map;class KS{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,l=xg.get(o);l||(l=new Intl.PluralRules(this.locale,{type:r}),xg.set(o,l));let s=l.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=wg.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),wg.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const Sg=new WeakMap;function zS(e){let t=Sg.get(e);return t||(t=new fa(e),Sg.set(e,t)),t}function _S(e,t){return t&&fa.getGlobalDictionaryForPackage(t)||zS(e)}function qo(e,t){let{locale:n}=ki(),r=_S(e,t);return c.useMemo(()=>new KS(n,r),[n,r])}let kf=new Map;function $g(e){let{locale:t}=ki(),n=t+(e?Object.entries(e).sort((i,o)=>i[0]new Af({scopeRef:s}),[s]);le(()=>{let p=a||ke.root;if(ke.getTreeNode(p.scopeRef)&&ae&&!pa(ae,p.scopeRef)){let g=ke.getTreeNode(ae);g&&(p=g)}p.addChild(u),ke.addNode(u)},[u,a]),le(()=>{let p=ke.getTreeNode(s);p&&(p.contain=!!n)},[n]),le(()=>{var p;let g=(p=o.current)===null||p===void 0?void 0:p.nextSibling,v=[],b=x=>x.stopPropagation();for(;g&&g!==l.current;)v.push(g),g.addEventListener(Tf,b),g=g.nextSibling;return s.current=v,()=>{for(let x of v)x.removeEventListener(Tf,b)}},[t]),QS(s,r,n),GS(s,n),qS(s,r,n),XS(s,i),c.useEffect(()=>{const p=Qe(oe(s.current?s.current[0]:void 0));let g=null;if(Tt(p,s.current)){for(let v of ke.traverse())v.scopeRef&&Tt(p,v.scopeRef.current)&&(g=v);g===ke.getTreeNode(s)&&(ae=g.scopeRef)}},[s]),le(()=>()=>{var p,g,v;let b=(v=(g=ke.getTreeNode(s))===null||g===void 0||(p=g.parent)===null||p===void 0?void 0:p.scopeRef)!==null&&v!==void 0?v:null;(s===ae||pa(s,ae))&&(!b||ke.getTreeNode(b))&&(ae=b),ke.removeTreeNode(s)},[s]);let d=c.useMemo(()=>ZS(s),[]),f=c.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return F.createElement(Cg.Provider,{value:f},F.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,F.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function ZS(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:l}=t;var s;let a=r||Qe(oe((s=n[0])!==null&&s!==void 0?s:void 0)),u=n[0].previousElementSibling,d=Tr(n),f=Dt(d,{tabbable:i,accept:l},n);f.currentNode=Tt(a,n)?a:u;let p=f.nextNode();return!p&&o&&(f.currentNode=u,p=f.nextNode()),p&&yn(p,!0),p},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:l}=t;var s;let a=r||Qe(oe((s=n[0])!==null&&s!==void 0?s:void 0)),u=n[n.length-1].nextElementSibling,d=Tr(n),f=Dt(d,{tabbable:i,accept:l},n);f.currentNode=Tt(a,n)?a:u;let p=f.previousNode();return!p&&o&&(f.currentNode=u,p=f.previousNode()),p&&yn(p,!0),p},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=Tr(n),l=Dt(o,{tabbable:r,accept:i},n);l.currentNode=n[0].previousElementSibling;let s=l.nextNode();return s&&yn(s,!0),s},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=Tr(n),l=Dt(o,{tabbable:r,accept:i},n);l.currentNode=n[n.length-1].nextElementSibling;let s=l.previousNode();return s&&yn(s,!0),s}}}function Tr(e){return e[0].parentElement}function Jo(e){let t=ke.getTreeNode(ae);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function GS(e,t){let n=c.useRef(void 0),r=c.useRef(void 0);le(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=oe(i?i[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Jo(e)||u.isComposing)return;let d=Qe(o),f=e.current;if(!f||!Tt(d,f))return;let p=Tr(f),g=Dt(p,{tabbable:!0},f);if(!d)return;g.currentNode=d;let v=u.shiftKey?g.previousNode():g.nextNode();v||(g.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,v=u.shiftKey?g.previousNode():g.nextNode()),u.preventDefault(),v&&yn(v,!0)},s=u=>{(!ae||pa(ae,e))&&Tt($e(u),e.current)?(ae=e,n.current=$e(u)):Jo(e)&&!Qn($e(u),e)?n.current?n.current.focus():ae&&ae.current&&Df(ae.current):Jo(e)&&(n.current=$e(u))},a=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let d=ua(),f=(d==="virtual"||d===null)&&nf()&&Dv(),p=Qe(o);if(!f&&p&&Jo(e)&&!Qn(p,e)){ae=e;let v=$e(u);if(v&&v.isConnected){var g;n.current=v,(g=n.current)===null||g===void 0||g.focus()}else ae.current&&Df(ae.current)}})};return o.addEventListener("keydown",l,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",a,!1)),()=>{o.removeEventListener("keydown",l,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",a,!1))}},[e,t]),le(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function kg(e){return Qn(e)}function Tt(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qn(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ke.traverse(ke.getTreeNode(t)))if(n&&Tt(e,n.current))return!0;return!1}function YS(e){return Qn(e,ae)}function pa(e,t){var n;let r=(n=ke.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function yn(e,t=!1){if(e!=null&&!t)try{ot(e)}catch(n){}else if(e!=null)try{e.focus()}catch(n){}}function Tg(e,t=!0){let n=e[0].previousElementSibling,r=Tr(e),i=Dt(r,{tabbable:t},e);i.currentNode=n;let o=i.nextNode();return t&&!o&&(r=Tr(e),i=Dt(r,{tabbable:!1},e),i.currentNode=n,o=i.nextNode()),o}function Df(e,t=!0){yn(Tg(e,t))}function XS(e,t){const n=F.useRef(t);c.useEffect(()=>{if(n.current){ae=e;const r=oe(e.current?e.current[0]:void 0);!Tt(Qe(r),ae.current)&&e.current&&Df(e.current)}n.current=!1},[e])}function QS(e,t,n){le(()=>{if(t||n)return;let r=e.current;const i=oe(r?r[0]:void 0);let o=l=>{let s=$e(l);Tt(s,e.current)?ae=e:kg(s)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(l=>l.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(l=>l.removeEventListener("focusin",o,!1))}},[e,t,n])}function Dg(e){let t=ke.getTreeNode(ae);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function qS(e,t,n){const r=c.useRef(typeof document!="undefined"?Qe(oe(e.current?e.current[0]:void 0)):null);le(()=>{let i=e.current;const o=oe(i?i[0]:void 0);if(!t||n)return;let l=()=>{(!ae||pa(ae,e))&&Tt(Qe(o),e.current)&&(ae=e)};return o.addEventListener("focusin",l,!1),i==null||i.forEach(s=>s.addEventListener("focusin",l,!1)),()=>{o.removeEventListener("focusin",l,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",l,!1))}},[e,n]),le(()=>{const i=oe(e.current?e.current[0]:void 0);if(!t)return;let o=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Jo(e)||l.isComposing)return;let s=i.activeElement;if(!Qn(s,e)||!Dg(e))return;let a=ke.getTreeNode(e);if(!a)return;let u=a.nodeToRestore,d=Dt(i.body,{tabbable:!0});d.currentNode=s;let f=l.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===i.body)&&(u=void 0,a.nodeToRestore=void 0),(!f||!Qn(f,e))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(Qn(f,e));l.preventDefault(),l.stopPropagation(),f?yn(f,!0):kg(u)?yn(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[e,t,n]),le(()=>{const i=oe(e.current?e.current[0]:void 0);if(!t)return;let o=ke.getTreeNode(e);if(o){var l;return o.nodeToRestore=(l=r.current)!==null&&l!==void 0?l:void 0,()=>{let s=ke.getTreeNode(e);if(!s)return;let a=s.nodeToRestore,u=Qe(i);if(t&&a&&(u&&Qn(u,e)||u===i.body&&Dg(e))){let d=ke.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let f=d.getTreeNode(e);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){Mg(f.nodeToRestore);return}f=f.parent}for(f=d.getTreeNode(e);f;){if(f.scopeRef&&f.scopeRef.current&&ke.getTreeNode(f.scopeRef)){let p=Tg(f.scopeRef.current,!0);Mg(p);return}f=f.parent}}})}}}},[e,t])}function Mg(e){e.dispatchEvent(new CustomEvent(Tf,{bubbles:!0,cancelable:!0}))&&yn(e)}function Dt(e,t,n){let r=t!=null&&t.tabbable?Fw:zv,i=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,o=oe(i),l=cw(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var a;return!(t==null||(a=t.from)===null||a===void 0)&&a.contains(s)?NodeFilter.FILTER_REJECT:r(s)&&Eg(s)&&(!n||Tt(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(l.currentNode=t.from),l}class Mf{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n!=null?n:null);if(!i)return;let o=new Af({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Tt(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*Ii(this.traverse(n))}clone(){var t;let n=new Mf;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Af({scopeRef:null}),this.fastMap.set(null,this.root)}}class Af{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let ke=new Mf;function Di(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=c.useRef({isFocused:!1,isFocusVisible:t||bf()}),[o,l]=c.useState(!1),[s,a]=c.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=c.useCallback(()=>a(i.current.isFocused&&i.current.isFocusVisible),[]),d=c.useCallback(g=>{i.current.isFocused=g,l(g),u()},[u]);iS(g=>{i.current.isFocusVisible=g,u()},[],{isTextInput:n});let{focusProps:f}=sg({isDisabled:r,onFocusChange:d}),{focusWithinProps:p}=ca({isDisabled:!r,onFocusWithinChange:d});return{isFocused:o,isFocusVisible:s,focusProps:r?p:f}}function JS(e,t){let n=t==null?void 0:t.isDisabled,[r,i]=c.useState(!1);return le(()=>{if(e!=null&&e.current&&!n){let o=()=>{if(e.current){let s=Dt(e.current,{tabbable:!0});i(!!s.nextNode())}};o();let l=new MutationObserver(o);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}function Ag(e){let t=n$(oe(e));t!==e&&(t&&e$(t,e),e&&t$(e,t))}function e$(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function t$(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function n$(e){let t=Qe(e),n=t==null?void 0:t.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const Lg=7e3;let Xt=null;function Lf(e,t="assertive",n=Lg){Xt?Xt.announce(e,t,n):(Xt=new r$,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest!="undefined")?Xt.announce(e,t,n):setTimeout(()=>{Xt!=null&&Xt.isAttached()&&(Xt==null||Xt.announce(e,t,n))},100))}class r${isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=Lg){var i,o;if(!this.node)return;let l=document.createElement("div");typeof t=="object"?(l.setAttribute("role","img"),l.setAttribute("aria-labelledby",t["aria-labelledby"])):l.textContent=t,n==="assertive"?(i=this.assertiveLog)===null||i===void 0||i.appendChild(l):(o=this.politeLog)===null||o===void 0||o.appendChild(l),t!==""&&setTimeout(()=>{l.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document!="undefined"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}const Ng={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Rg=R(w({},Ng),{customError:!0,valid:!1}),Mi={isInvalid:!1,validationDetails:Ng,validationErrors:[]},i$=c.createContext({}),ha="__formValidationState"+Date.now();function Ig(e){if(e[ha]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:o}=e[ha];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:o}}return o$(e)}function o$(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:o,validate:l,validationBehavior:s="aria"}=e;n&&(t||(t=n==="invalid"));let a=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:Rg}:null,u=c.useMemo(()=>{if(!l||i==null)return null;let j=l$(l,i);return Fg(j)},[l,i]);o!=null&&o.validationDetails.valid&&(o=void 0);let d=c.useContext(i$),f=c.useMemo(()=>r?Array.isArray(r)?r.flatMap(j=>Nf(d[j])):Nf(d[r]):[],[d,r]),[p,g]=c.useState(d),[v,b]=c.useState(!1);d!==p&&(g(d),b(!1));let x=c.useMemo(()=>Fg(v?[]:f),[v,f]),h=c.useRef(Mi),[m,y]=c.useState(Mi),$=c.useRef(Mi),k=()=>{if(!M)return;I(!1);let j=u||o||h.current;Rf(j,$.current)||($.current=j,y(j))},[M,I]=c.useState(!1);return c.useEffect(k),{realtimeValidation:a||x||u||o||Mi,displayValidation:s==="native"?a||x||m:a||x||u||o||m,updateValidation(j){s==="aria"&&!Rf(m,j)?y(j):h.current=j},resetValidation(){let j=Mi;Rf(j,$.current)||($.current=j,y(j)),s==="native"&&I(!1),b(!0)},commitValidation(){s==="native"&&I(!0),b(!0)}}}function Nf(e){return e?Array.isArray(e)?e:[e]:[]}function l$(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Nf(n)}return[]}function Fg(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Rg}:null}function Rf(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function s$(e,t,n){let{validationBehavior:r,focus:i}=e;le(()=>{if(r==="native"&&(n!=null&&n.current)&&!n.current.disabled){let a=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(a),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(u$(n.current))}});let o=Pe(()=>{t.resetValidation()}),l=Pe(a=>{var u;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(u=n.current)===null||u===void 0?void 0:u.form;if(!a.defaultPrevented&&n&&d&&c$(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),tS("keyboard")}a.preventDefault()}),s=Pe(()=>{t.commitValidation()});c.useEffect(()=>{let a=n==null?void 0:n.current;if(!a)return;let u=a.form;return a.addEventListener("invalid",l),a.addEventListener("change",s),u==null||u.addEventListener("reset",o),()=>{a.removeEventListener("invalid",l),a.removeEventListener("change",s),u==null||u.removeEventListener("reset",o)}},[n,l,s,o,r])}function a$(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function u$(e){return{isInvalid:!e.validity.valid,validationDetails:a$(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function c$(e){for(let t=0;t{$.stopPropagation(),t.setSelected($.target.checked)},{pressProps:g,isPressed:v}=$i({isDisabled:r}),{pressProps:b,isPressed:x}=$i({onPress(){var $;t.toggle(),($=n.current)===null||$===void 0||$.focus()},isDisabled:r||i}),{focusableProps:h}=wf(e,n),m=q(g,h),y=qe(e,{labelable:!0});return Aw(n,t.isSelected,t.setSelected),{labelProps:q(b,{onClick:$=>$.preventDefault()}),inputProps:q(y,w(R(w({"aria-invalid":f||d==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:p,disabled:r},o==null?{}:{value:o}),{name:l,type:"checkbox"}),m)),isSelected:t.isSelected,isPressed:v||x,isDisabled:r,isReadOnly:i,isInvalid:f||d==="invalid"}}function Bg(e,t,n){let r=Ig(R(w({},e),{value:t.isSelected})),{isInvalid:i,validationErrors:o,validationDetails:l}=r.displayValidation,{labelProps:s,inputProps:a,isSelected:u,isPressed:d,isDisabled:f,isReadOnly:p}=d$(R(w({},e),{isInvalid:i}),t,n);s$(e,r,n);let{isIndeterminate:g,isRequired:v,validationBehavior:b="aria"}=e;c.useEffect(()=>{n.current&&(n.current.indeterminate=!!g)});let{pressProps:x}=$i({isDisabled:f||p,onPress(){let{[ha]:h}=e,{commitValidation:m}=h||r;m()}});return{labelProps:q(s,x),inputProps:R(w({},a),{checked:u,"aria-required":v&&b==="aria"||void 0,required:v&&b==="native"}),isSelected:u,isPressed:d,isDisabled:f,isReadOnly:p,isInvalid:i,validationErrors:o,validationDetails:l}}const f$=new WeakMap;function p$(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=e;t=mt(t);let l=mt(),s={};n&&(r=r?`${l} ${r}`:l,s={id:l,htmlFor:o==="label"?t:void 0});let a=Nv({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:a}}function h$(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:o,fieldProps:l}=p$(e),s=Ys([!!t,!!n,r,i]),a=Ys([!!t,!!n,r,i]);return l=q(l,{"aria-describedby":[s,a,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:l,descriptionProps:{id:s},errorMessageProps:{id:a}}}function Vg(e={}){let{isReadOnly:t}=e,[n,r]=cf(e.isSelected,e.defaultSelected||!1,e.onChange);function i(l){t||r(l)}function o(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:o}}function m$(e,t,n){const r=Vg({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(x){x?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(x)}});let{name:i,descriptionId:o,errorMessageId:l,validationBehavior:s}=f$.get(t);var a;s=(a=e.validationBehavior)!==null&&a!==void 0?a:s;let{realtimeValidation:u}=Ig(R(w({},e),{value:r.isSelected,name:void 0,validationBehavior:"aria"})),d=c.useRef(Mi),f=()=>{t.setInvalid(e.value,u.isInvalid?u:d.current)};c.useEffect(f);let p=t.realtimeValidation.isInvalid?t.realtimeValidation:u,g=s==="native"?t.displayValidation:p;var v;let b=Bg(R(w({},e),{isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(v=e.isRequired)!==null&&v!==void 0?v:t.isRequired,validationBehavior:s,[ha]:{realtimeValidation:p,displayValidation:g,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(x){d.current=x,f()}}}),r,n);return R(w({},b),{inputProps:R(w({},b.inputProps),{"aria-describedby":[e["aria-describedby"],t.isInvalid?l:null,o].filter(Boolean).join(" ")||void 0})})}const jg={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function ma(e={}){let{style:t,isFocusable:n}=e,[r,i]=c.useState(!1),{focusWithinProps:o}=ca({isDisabled:!n,onFocusWithinChange:s=>i(s)}),l=c.useMemo(()=>r?t:t?w(w({},jg),t):jg,[r]);return{visuallyHiddenProps:R(w({},o),{style:l})}}function Og(e){let s=e,{children:t,elementType:n="div",isFocusable:r,style:i}=s,o=Y(s,["children","elementType","isFocusable","style"]),{visuallyHiddenProps:l}=ma(e);return F.createElement(n,q(o,l),t)}const v$=new WeakMap,Qt=[];function g$(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=e;c.useEffect(()=>{if(i&&!Qt.includes(t))return Qt.push(t),()=>{let v=Qt.indexOf(t);v>=0&&Qt.splice(v,1)}},[i,t]);let a=()=>{Qt[Qt.length-1]===t&&n&&n()},u=v=>{(!s||s(v.target))&&Qt[Qt.length-1]===t&&(v.stopPropagation(),v.preventDefault())},d=v=>{(!s||s(v.target))&&(Qt[Qt.length-1]===t&&(v.stopPropagation(),v.preventDefault()),a())},f=v=>{v.key==="Escape"&&!l&&!v.nativeEvent.isComposing&&(v.stopPropagation(),v.preventDefault(),a())};dS({ref:t,onInteractOutside:o&&i?d:void 0,onInteractOutsideStart:u});let{focusWithinProps:p}=ca({isDisabled:!r,onBlurWithin:v=>{!v.relatedTarget||YS(v.relatedTarget)||(!s||s(v.relatedTarget))&&(n==null||n())}}),g=v=>{v.target===v.currentTarget&&v.preventDefault()};return{overlayProps:w({onKeyDown:f},p),underlayProps:{onPointerDown:g}}}function y$(e,t,n){let{type:r}=e,{isOpen:i}=t;c.useEffect(()=>{n&&n.current&&v$.set(n.current,t.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let l=mt();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?l:void 0,onPress:t.toggle},overlayProps:{id:l}}}const If=typeof document!="undefined"&&window.visualViewport,b$=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let va=0,Ff;function x$(e={}){let{isDisabled:t}=e;le(()=>{if(!t)return va++,va===1&&(Js()?Ff=S$():Ff=w$()),()=>{va--,va===0&&Ff()}},[t])}function w$(){return gi(Ai(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ai(document.documentElement,"overflow","hidden"))}function S$(){let e,t,n=u=>{e=Gn(u.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=Ai(e,"overscrollBehavior","contain"))},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&u.preventDefault()},i=()=>{t&&t()},o=u=>{let d=u.target;$$(d)&&(s(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",If&&(If.height{Kg(d)}):If.addEventListener("resize",()=>Kg(d),{once:!0}))}))},l=null,s=()=>{if(l)return;let u=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset;l=gi(el(window,"scroll",u),Ai(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ai(document.documentElement,"overflow","hidden"),Ai(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(d,f)}),window.scrollTo(0,0)},a=gi(el(document,"touchstart",n,{passive:!1,capture:!0}),el(document,"touchmove",r,{passive:!1,capture:!0}),el(document,"touchend",i,{passive:!1,capture:!0}),el(document,"focus",o,!0));return()=>{t==null||t(),l==null||l(),a()}}function Ai(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function el(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Kg(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=Gn(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function $$(e){return e instanceof HTMLInputElement&&!b$.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const E$=c.createContext({});function C$(){var e;return(e=c.useContext(E$))!==null&&e!==void 0?e:{}}var zg={};zg={dismiss:"تجاهل"};var _g={};_g={dismiss:"Отхвърляне"};var Hg={};Hg={dismiss:"Odstranit"};var Ug={};Ug={dismiss:"Luk"};var Wg={};Wg={dismiss:"Schließen"};var Zg={};Zg={dismiss:"Απόρριψη"};var Gg={};Gg={dismiss:"Dismiss"};var Yg={};Yg={dismiss:"Descartar"};var Xg={};Xg={dismiss:"Lõpeta"};var Qg={};Qg={dismiss:"Hylkää"};var qg={};qg={dismiss:"Rejeter"};var Jg={};Jg={dismiss:"התעלם"};var e4={};e4={dismiss:"Odbaci"};var t4={};t4={dismiss:"Elutasítás"};var n4={};n4={dismiss:"Ignora"};var r4={};r4={dismiss:"閉じる"};var i4={};i4={dismiss:"무시"};var o4={};o4={dismiss:"Atmesti"};var l4={};l4={dismiss:"Nerādīt"};var s4={};s4={dismiss:"Lukk"};var a4={};a4={dismiss:"Negeren"};var u4={};u4={dismiss:"Zignoruj"};var c4={};c4={dismiss:"Descartar"};var d4={};d4={dismiss:"Dispensar"};var f4={};f4={dismiss:"Revocare"};var p4={};p4={dismiss:"Пропустить"};var h4={};h4={dismiss:"Zrušiť"};var m4={};m4={dismiss:"Opusti"};var v4={};v4={dismiss:"Odbaci"};var g4={};g4={dismiss:"Avvisa"};var y4={};y4={dismiss:"Kapat"};var b4={};b4={dismiss:"Скасувати"};var x4={};x4={dismiss:"取消"};var w4={};w4={dismiss:"關閉"};var S4={};S4={"ar-AE":zg,"bg-BG":_g,"cs-CZ":Hg,"da-DK":Ug,"de-DE":Wg,"el-GR":Zg,"en-US":Gg,"es-ES":Yg,"et-EE":Xg,"fi-FI":Qg,"fr-FR":qg,"he-IL":Jg,"hr-HR":e4,"hu-HU":t4,"it-IT":n4,"ja-JP":r4,"ko-KR":i4,"lt-LT":o4,"lv-LV":l4,"nb-NO":s4,"nl-NL":a4,"pl-PL":u4,"pt-BR":c4,"pt-PT":d4,"ro-RO":f4,"ru-RU":p4,"sk-SK":h4,"sl-SI":m4,"sr-SP":v4,"sv-SE":g4,"tr-TR":y4,"uk-UA":b4,"zh-CN":x4,"zh-TW":w4};function P$(e){return e&&e.__esModule?e.default:e}function k$(e){let l=e,{onDismiss:t}=l,n=Y(l,["onDismiss"]),r=qo(P$(S4),"@react-aria/overlays"),i=Nv(n,r.format("dismiss")),o=()=>{t&&t()};return F.createElement(Og,null,F.createElement("button",R(w({},i),{tabIndex:-1,onClick:o,style:{width:1,height:1}})))}let tl=new WeakMap,Mt=[];function T$(e,t=document.body){let n=new Set(e),r=new Set,i=a=>{for(let p of a.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(p);let u=p=>{if(n.has(p)||p.parentElement&&r.has(p.parentElement)&&p.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let g of n)if(p.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),f=u(a);if(f===NodeFilter.FILTER_ACCEPT&&o(a),f!==NodeFilter.FILTER_REJECT){let p=d.nextNode();for(;p!=null;)o(p),p=d.nextNode()}},o=a=>{var u;let d=(u=tl.get(a))!==null&&u!==void 0?u:0;a.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&a.setAttribute("aria-hidden","true"),r.add(a),tl.set(a,d+1))};Mt.length&&Mt[Mt.length-1].disconnect(),i(t);let l=new MutationObserver(a=>{for(let u of a)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(d=>d.contains(u.target))){for(let d of u.removedNodes)d instanceof Element&&(n.delete(d),r.delete(d));for(let d of u.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&i(d)}});l.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:n,hiddenNodes:r,observe(){l.observe(t,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return Mt.push(s),()=>{l.disconnect();for(let a of r){let u=tl.get(a);u!=null&&(u===1?(a.removeAttribute("aria-hidden"),tl.delete(a)):tl.set(a,u-1))}s===Mt[Mt.length-1]?(Mt.pop(),Mt.length&&Mt[Mt.length-1].observe()):Mt.splice(Mt.indexOf(s),1)}}const $4=F.createContext(null);function D$(e){let t=Wn(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,o]=c.useState(!1),l=c.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=C$();if(!e.portalContainer&&s&&(n=s()),!n)return null;let a=e.children;return e.disableFocusManagement||(a=F.createElement(Pg,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},a)),a=F.createElement($4.Provider,{value:l},F.createElement(aS,null,a)),q9.createPortal(a,n)}function E4(){let e=c.useContext($4),t=e==null?void 0:e.setContain;le(()=>{t==null||t(!0)},[t])}function M$(e,t,n){let{overlayProps:r,underlayProps:i}=g$(R(w({},e),{isOpen:t.isOpen,onClose:t.close}),n);return x$({isDisabled:!t.isOpen}),E4(),c.useEffect(()=>{if(t.isOpen&&n.current)return T$([n.current])},[t.isOpen,n]),{modalProps:q(r),underlayProps:i}}function Bf(e){return xw()?e.altKey:e.ctrlKey}function ga(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,o=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return o&&(i=`[data-collection="${CSS.escape(o)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const C4=new WeakMap;function A$(e){let t=mt();return C4.set(e,t),t}function L$(e){return C4.get(e)}const N$=1e3;function R$(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=c.useRef({search:"",timeout:void 0}).current,o=l=>{let s=I$(l.key);if(!(!s||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))){if(s===" "&&i.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),i.search+=s,t.getKeyForSearch!=null){let a=t.getKeyForSearch(i.search,n.focusedKey);a==null&&(a=t.getKeyForSearch(i.search)),a!=null&&(n.setFocusedKey(a),r&&r(a))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},N$)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:void 0}}}function I$(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function F$(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:l=!1,disallowSelectAll:s=!1,escapeKeyBehavior:a="clearSelection",selectOnFocus:u=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:p=!1,isVirtualized:g,scrollRef:v=r,linkBehavior:b="action"}=e,{direction:x}=ki(),h=rf(),m=D=>{var P;if(D.altKey&&D.key==="Tab"&&D.preventDefault(),!(!((P=r.current)===null||P===void 0)&&P.contains(D.target)))return;const S=(G,Mr)=>{if(G!=null){if(t.isLink(G)&&b==="selection"&&u&&!Bf(D)){Po.flushSync(()=>{t.setFocusedKey(G,Mr)});let Ar=ga(r,G),ky=t.getItemProps(G);Ar&&h.open(Ar,D,ky.href,ky.routerOptions);return}if(t.setFocusedKey(G,Mr),t.isLink(G)&&b==="override")return;D.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(G):u&&!Bf(D)&&t.replaceSelection(G)}};switch(D.key){case"ArrowDown":if(n.getKeyBelow){var N,V,z;let G=t.focusedKey!=null?(N=n.getKeyBelow)===null||N===void 0?void 0:N.call(n,t.focusedKey):(V=n.getFirstKey)===null||V===void 0?void 0:V.call(n);G==null&&o&&(G=(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n,t.focusedKey)),G!=null&&(D.preventDefault(),S(G))}break;case"ArrowUp":if(n.getKeyAbove){var W,Te,Be;let G=t.focusedKey!=null?(W=n.getKeyAbove)===null||W===void 0?void 0:W.call(n,t.focusedKey):(Te=n.getLastKey)===null||Te===void 0?void 0:Te.call(n);G==null&&o&&(G=(Be=n.getLastKey)===null||Be===void 0?void 0:Be.call(n,t.focusedKey)),G!=null&&(D.preventDefault(),S(G))}break;case"ArrowLeft":if(n.getKeyLeftOf){var st,Ue,gt;let G=t.focusedKey!=null?(st=n.getKeyLeftOf)===null||st===void 0?void 0:st.call(n,t.focusedKey):null;G==null&&o&&(G=x==="rtl"?(Ue=n.getFirstKey)===null||Ue===void 0?void 0:Ue.call(n,t.focusedKey):(gt=n.getLastKey)===null||gt===void 0?void 0:gt.call(n,t.focusedKey)),G!=null&&(D.preventDefault(),S(G,x==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var er,tr,dl;let G=t.focusedKey!=null?(er=n.getKeyRightOf)===null||er===void 0?void 0:er.call(n,t.focusedKey):null;G==null&&o&&(G=x==="rtl"?(tr=n.getLastKey)===null||tr===void 0?void 0:tr.call(n,t.focusedKey):(dl=n.getFirstKey)===null||dl===void 0?void 0:dl.call(n,t.focusedKey)),G!=null&&(D.preventDefault(),S(G,x==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&D.shiftKey)return;D.preventDefault();let G=n.getFirstKey(t.focusedKey,bi(D));t.setFocusedKey(G),G!=null&&(bi(D)&&D.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(G):u&&t.replaceSelection(G))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&D.shiftKey)return;D.preventDefault();let G=n.getLastKey(t.focusedKey,bi(D));t.setFocusedKey(G),G!=null&&(bi(D)&&D.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(G):u&&t.replaceSelection(G))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let G=n.getKeyPageBelow(t.focusedKey);G!=null&&(D.preventDefault(),S(G))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let G=n.getKeyPageAbove(t.focusedKey);G!=null&&(D.preventDefault(),S(G))}break;case"a":bi(D)&&t.selectionMode==="multiple"&&s!==!0&&(D.preventDefault(),t.selectAll());break;case"Escape":a==="clearSelection"&&!l&&t.selectedKeys.size!==0&&(D.stopPropagation(),D.preventDefault(),t.clearSelection());break;case"Tab":if(!p){if(D.shiftKey)r.current.focus();else{let G=Dt(r.current,{tabbable:!0}),Mr,Ar;do Ar=G.lastChild(),Ar&&(Mr=Ar);while(Ar);Mr&&!Mr.contains(document.activeElement)&&mn(Mr)}break}}},y=c.useRef({top:0,left:0});ta(v,"scroll",g?void 0:()=>{var D,P,S,N;y.current={top:(S=(D=v.current)===null||D===void 0?void 0:D.scrollTop)!==null&&S!==void 0?S:0,left:(N=(P=v.current)===null||P===void 0?void 0:P.scrollLeft)!==null&&N!==void 0?N:0}});let $=D=>{if(t.isFocused){D.currentTarget.contains(D.target)||t.setFocused(!1);return}if(D.currentTarget.contains(D.target)){if(t.setFocused(!0),t.focusedKey==null){var P,S;let z=Te=>{Te!=null&&(t.setFocusedKey(Te),u&&!t.isSelected(Te)&&t.replaceSelection(Te))},W=D.relatedTarget;var N,V;W&&D.currentTarget.compareDocumentPosition(W)&Node.DOCUMENT_POSITION_FOLLOWING?z((N=t.lastSelectedKey)!==null&&N!==void 0?N:(P=n.getLastKey)===null||P===void 0?void 0:P.call(n)):z((V=t.firstSelectedKey)!==null&&V!==void 0?V:(S=n.getFirstKey)===null||S===void 0?void 0:S.call(n))}else!g&&v.current&&(v.current.scrollTop=y.current.top,v.current.scrollLeft=y.current.left);if(t.focusedKey!=null&&v.current){let z=ga(r,t.focusedKey);z instanceof HTMLElement&&(!z.contains(document.activeElement)&&!f&&mn(z),ua()==="keyboard"&&Yn(z,{containingElement:r.current}))}}},k=D=>{D.currentTarget.contains(D.relatedTarget)||t.setFocused(!1)},M=c.useRef(!1);ta(r,Nw,f?D=>{let{detail:P}=D;D.stopPropagation(),t.setFocused(!0),(P==null?void 0:P.focusStrategy)==="first"&&(M.current=!0)}:void 0);let I=Pe(()=>{var D,P;let S=(P=(D=n.getFirstKey)===null||D===void 0?void 0:D.call(n))!==null&&P!==void 0?P:null;S==null?(Ag(r.current),t.collection.size>0&&(M.current=!1)):(t.setFocusedKey(S),M.current=!1)});Rv(()=>{M.current&&I()},[t.collection,I]);let A=Pe(()=>{t.collection.size>0&&(M.current=!1)});Rv(()=>{A()},[t.focusedKey,A]),ta(r,Lw,f?D=>{var P;D.stopPropagation(),t.setFocused(!1),!((P=D.detail)===null||P===void 0)&&P.clearFocusKey&&t.setFocusedKey(null)}:void 0);const _=c.useRef(i),j=c.useRef(!1);c.useEffect(()=>{if(_.current){var D,P;let V=null;var S;i==="first"&&(V=(S=(D=n.getFirstKey)===null||D===void 0?void 0:D.call(n))!==null&&S!==void 0?S:null);var N;i==="last"&&(V=(N=(P=n.getLastKey)===null||P===void 0?void 0:P.call(n))!==null&&N!==void 0?N:null);let z=t.selectedKeys;if(z.size){for(let W of z)if(t.canSelectItem(W)){V=W;break}}t.setFocused(!0),t.setFocusedKey(V),V==null&&!f&&r.current&&ot(r.current),t.collection.size>0&&(_.current=!1,j.current=!0)}});let T=c.useRef(t.focusedKey);c.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==T.current||j.current)&&v.current&&r.current){let D=ua(),P=ga(r,t.focusedKey);if(!(P instanceof HTMLElement))return;(D==="keyboard"||j.current)&&(Fv(v.current,P),D!=="virtual"&&Yn(P,{containingElement:r.current}))}!f&&t.isFocused&&t.focusedKey==null&&T.current!=null&&r.current&&ot(r.current),T.current=t.focusedKey,j.current=!1}),ta(r,"react-aria-focus-scope-restore",D=>{D.preventDefault(),t.setFocused(!0)});let E={onKeyDown:m,onFocus:$,onBlur:k,onMouseDown(D){v.current===D.target&&D.preventDefault()}},{typeSelectProps:B}=R$({keyboardDelegate:n,selectionManager:t});d||(E=q(B,E));let K;f||(K=t.focusedKey==null?0:-1);let L=A$(t.collection);return{collectionProps:q(E,{tabIndex:K,"data-collection":L})}}function B$(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:l,focus:s,isDisabled:a,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=e,p=rf();t=mt(t);let g=S=>{if(S.pointerType==="keyboard"&&Bf(S))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&i.current){let N=n.getItemProps(r);p.open(i.current,S,N.href,N.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):S&&S.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||S&&(bi(S)||S.pointerType==="touch"||S.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};c.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(l?Ag(i.current):s?s():document.activeElement!==i.current&&i.current&&ot(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,l]),a=a||n.isDisabled(r);let v={};!l&&!a?v={tabIndex:r===n.focusedKey?0:-1,onFocus(S){S.target===i.current&&n.setFocusedKey(r)}}:a&&(v.onMouseDown=S=>{S.preventDefault()});let b=n.isLink(r)&&f==="override",x=n.isLink(r)&&f!=="selection"&&f!=="none",h=!a&&n.canSelectItem(r)&&!b,m=(u||x)&&!a,y=m&&(n.selectionBehavior==="replace"?!h:!h||n.isEmpty),$=m&&h&&n.selectionBehavior==="replace",k=y||$,M=c.useRef(null),I=k&&h,A=c.useRef(!1),_=c.useRef(!1),j=S=>{if(u&&u(),x&&i.current){let N=n.getItemProps(r);p.open(i.current,S,N.href,N.routerOptions)}},T={ref:i};o?(T.onPressStart=S=>{M.current=S.pointerType,A.current=I,S.pointerType==="keyboard"&&(!k||k4())&&g(S)},d?(T.onPressUp=y?void 0:S=>{S.pointerType==="mouse"&&h&&g(S)},T.onPress=y?j:S=>{S.pointerType!=="keyboard"&&S.pointerType!=="mouse"&&h&&g(S)}):T.onPress=S=>{if(y||$&&S.pointerType!=="mouse"){if(S.pointerType==="keyboard"&&!P4())return;j(S)}else S.pointerType!=="keyboard"&&h&&g(S)}):(T.onPressStart=S=>{M.current=S.pointerType,A.current=I,_.current=y,h&&(S.pointerType==="mouse"&&!y||S.pointerType==="keyboard"&&(!m||k4()))&&g(S)},T.onPress=S=>{(S.pointerType==="touch"||S.pointerType==="pen"||S.pointerType==="virtual"||S.pointerType==="keyboard"&&k&&P4()||S.pointerType==="mouse"&&_.current)&&(k?j(S):h&&g(S))}),v["data-collection"]=L$(n.collection),v["data-key"]=r,T.preventFocusOnPress=l,l&&(T=q(T,{onPressStart(S){S.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(S){S.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}}));let{pressProps:E,isPressed:B}=$i(T),K=$?S=>{M.current==="mouse"&&(S.stopPropagation(),S.preventDefault(),j(S))}:void 0,{longPressProps:L}=pS({isDisabled:!I,onLongPress(S){S.pointerType==="touch"&&(g(S),n.setSelectionBehavior("toggle"))}}),D=S=>{M.current==="touch"&&A.current&&S.preventDefault()},P=n.isLink(r)?S=>{Cr.isOpening||S.preventDefault()}:void 0;return{itemProps:q(v,h||y||l?E:{},I?L:{},{onDoubleClick:K,onDragStartCapture:D,onClick:P,id:t},l?{onMouseDown:S=>S.preventDefault()}:void 0),isPressed:B,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:a,allowsSelection:h,hasAction:k}}function P4(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function k4(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}class T4{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?ga(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t==null?void 0:t.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t==null?void 0:t.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,o;return{x:(n=t==null?void 0:t.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t==null?void 0:t.scrollTop)!==null&&r!==void 0?r:0,width:(i=t==null?void 0:t.offsetWidth)!==null&&i!==void 0?i:0,height:(o=t==null?void 0:t.offsetHeight)!==null&&o!==void 0?o:0}}constructor(t){this.ref=t}}class ya{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let l=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(l,o)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Wo(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i!=null?i:this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Wo(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.xo||new ya({collection:n,disabledKeys:r,disabledBehavior:a,ref:i,collator:s,layoutDelegate:l}),[o,l,n,r,i,s,a]),{collectionProps:d}=F$(R(w({},e),{ref:i,selectionManager:t,keyboardDelegate:u}));return{listProps:d}}class j${build(t,n){return this.context=n,D4(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(F.isValidElement(n)&&n.type===F.Fragment)yield*Ii(this.iterateCollection({children:n.props.children,items:r}));else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*Ii(this.getFullNode({value:o,index:i},{renderer:n})),i++}else{let i=[];F.Children.forEach(n,l=>{l&&i.push(l)});let o=0;for(let l of i){let s=this.getFullNode({element:l,index:o},{});for(let a of s)o++,yield a}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var l;let s=(l=o.key)!==null&&l!==void 0?l:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(F.isValidElement(t.element)&&t.element.type===F.Fragment){let x=[];F.Children.forEach(t.element.props.children,m=>{x.push(m)});var o;let h=(o=t.index)!==null&&o!==void 0?o:0;for(const m of x)yield*Ii(this.getFullNode({element:m,index:h++},n,r,i));return}let l=t.element;if(!l&&t.value&&n&&n.renderer){let x=this.cache.get(t.value);if(x&&(!x.shouldInvalidate||!x.shouldInvalidate(this.context))){x.index=t.index,x.parentKey=i?i.key:null,yield x;return}l=n.renderer(t.value)}if(F.isValidElement(l)){let x=l.type;if(typeof x!="function"&&typeof x.getCollectionNode!="function"){let $=l.type;throw new Error(`Unknown element <${$}> in collection.`)}let h=x.getCollectionNode(l.props,this.context);var s;let m=(s=t.index)!==null&&s!==void 0?s:0,y=h.next();for(;!y.done&&y.value;){let $=y.value;t.index=m;var a;let k=(a=$.key)!==null&&a!==void 0?a:null;k==null&&(k=$.element?null:this.getKey(l,t,n,r));let I=[...this.getFullNode(R(w({},$),{key:k,index:m,wrapper:O$(t.wrapper,$.wrapper)}),this.getChildState(n,$),r?`${r}${l.key}`:l.key,i)];for(let A of I){var u,d;A.value=(d=(u=$.value)!==null&&u!==void 0?u:t.value)!==null&&d!==void 0?d:null,A.value&&this.cache.set(A.value,A);var f;if(t.type&&A.type!==t.type)throw new Error(`Unsupported type <${Vf(A.type)}> in <${Vf((f=i==null?void 0:i.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${Vf(t.type)}> is supported.`);m++,yield A}y=h.next(I)}return}if(t.key==null||t.type==null)return;let p=this;var g,v;let b={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(g=t.value)!==null&&g!==void 0?g:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(v=t.textValue)!==null&&v!==void 0?v:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:D4(function*(){if(!t.hasChildNodes||!t.childNodes)return;let x=0;for(let h of t.childNodes()){h.key!=null&&(h.key=`${b.key}${h.key}`);let m=p.getFullNode(R(w({},h),{index:x}),p.getChildState(n,h),b.key,b);for(let y of m)x++,yield y}})};yield b}constructor(){this.cache=new WeakMap}}function D4(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function O$(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Vf(e){return e[0].toUpperCase()+e.slice(1)}function K$(e,t,n){let r=c.useMemo(()=>new j$,[]),{children:i,items:o,collection:l}=e;return c.useMemo(()=>{if(l)return l;let a=r.build({children:i,items:o},n);return t(a)},[r,i,o,l,n,t])}function z$(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function _$(e){return H$(e)}function H$(e,t){for(let n of e)return n}function U$(e){let t;for(let n of e)t=n;return t}function jf(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...M4(e,t),t],i=[...M4(e,n),n],o=r.slice(0,i.length).findIndex((l,s)=>l!==i[s]);return o!==-1?(t=r[o],n=i[o],t.index-n.index):r.findIndex(l=>l===n)>=0?1:(i.findIndex(l=>l===t)>=0,-1)}function M4(e,t){let n=[],r=t;for(;(r==null?void 0:r.parentKey)!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}function W$(e,t){let{role:n="dialog"}=e,r=Ys();r=e["aria-label"]?void 0:r;let i=c.useRef(!1);return c.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){ot(t.current);let o=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),ot(t.current)),i.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),E4(),{dialogProps:R(w({},qe(e,{labelable:!0})),{role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:o=>{i.current&&o.stopPropagation()}}),titleProps:{id:r}}}const Of=new WeakMap;function Kf(e,t){var n;let{id:r}=(n=Of.get(e))!==null&&n!==void 0?n:{};if(!r)throw new Error("Unknown list");return`${r}-${Z$(t)}`}function Z$(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}var A4={};A4={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var L4={};L4={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var N4={};N4={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var R4={};R4={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var I4={};I4={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var F4={};F4={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var B4={};B4={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var V4={};V4={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var j4={};j4={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var O4={};O4={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var K4={};K4={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var z4={};z4={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var _4={};_4={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var H4={};H4={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var U4={};U4={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var W4={};W4={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var Z4={};Z4={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var G4={};G4={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var Y4={};Y4={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var X4={};X4={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var Q4={};Q4={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var q4={};q4={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var J4={};J4={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var e3={};e3={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var t3={};t3={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var n3={};n3={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var r3={};r3={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var i3={};i3={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var o3={};o3={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var l3={};l3={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var s3={};s3={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var a3={};a3={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var u3={};u3={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var c3={};c3={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var ba={};ba={"ar-AE":A4,"bg-BG":L4,"cs-CZ":N4,"da-DK":R4,"de-DE":I4,"el-GR":F4,"en-US":B4,"es-ES":V4,"et-EE":j4,"fi-FI":O4,"fr-FR":K4,"he-IL":z4,"hr-HR":_4,"hu-HU":H4,"it-IT":U4,"ja-JP":W4,"ko-KR":Z4,"lt-LT":G4,"lv-LV":Y4,"nb-NO":X4,"nl-NL":Q4,"pl-PL":q4,"pt-BR":J4,"pt-PT":e3,"ro-RO":t3,"ru-RU":n3,"sk-SK":r3,"sl-SI":i3,"sr-SP":o3,"sv-SE":l3,"tr-TR":s3,"uk-UA":a3,"zh-CN":u3,"zh-TW":c3};function G$(e){return e&&e.__esModule?e.default:e}function Y$(e,t){let{getRowText:n=s=>{var a,u,d,f;return(f=(a=(u=t.collection).getTextValue)===null||a===void 0?void 0:a.call(u,s))!==null&&f!==void 0?f:(d=t.collection.getItem(s))===null||d===void 0?void 0:d.textValue}}=e,r=qo(G$(ba),"@react-aria/grid"),i=t.selectionManager.rawSelection,o=c.useRef(i),l=Pe(()=>{var s;if(!t.selectionManager.isFocused||i===o.current){o.current=i;return}let a=d3(i,o.current),u=d3(o.current,i),d=t.selectionManager.selectionBehavior==="replace",f=[];if(t.selectionManager.selectedKeys.size===1&&d){if(t.collection.getItem(t.selectionManager.selectedKeys.keys().next().value)){let p=n(t.selectionManager.selectedKeys.keys().next().value);p&&f.push(r.format("selectedItem",{item:p}))}}else if(a.size===1&&u.size===0){let p=n(a.keys().next().value);p&&f.push(r.format("selectedItem",{item:p}))}else if(u.size===1&&a.size===0&&t.collection.getItem(u.keys().next().value)){let p=n(u.keys().next().value);p&&f.push(r.format("deselectedItem",{item:p}))}t.selectionManager.selectionMode==="multiple"&&(f.length===0||i==="all"||i.size>1||o.current==="all"||((s=o.current)===null||s===void 0?void 0:s.size)>1)&&f.push(i==="all"?r.format("selectedAll"):r.format("selectedCount",{count:i.size})),f.length>0&&Lf(f.join(" ")),o.current=i});Pw(()=>{if(t.selectionManager.isFocused)l();else{let s=requestAnimationFrame(l);return()=>cancelAnimationFrame(s)}},[i,t.selectionManager.isFocused])}function d3(e,t){let n=new Set;if(e==="all"||t==="all")return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function X$(e){return e&&e.__esModule?e.default:e}function Q$(e){let t=qo(X$(ba),"@react-aria/grid"),n=lg(),r=(n==="pointer"||n==="virtual"||n==null)&&typeof window!="undefined"&&"ontouchstart"in window,i=c.useMemo(()=>{let l=e.selectionManager.selectionMode,s=e.selectionManager.selectionBehavior,a;return r&&(a=t.format("longPressToSelect")),s==="replace"&&l!=="none"&&e.hasItemActions?a:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]);return af(i)}function q$(e){return e&&e.__esModule?e.default:e}function J$(e,t){let{key:n}=e,r=t.selectionManager,i=mt(),o=!t.selectionManager.canSelectItem(n),l=t.selectionManager.isSelected(n),s=()=>r.toggleSelection(n);const a=qo(q$(ba),"@react-aria/grid");return{checkboxProps:{id:i,"aria-label":a.format("select"),isSelected:l,isDisabled:o,onChange:s}}}function f3(e,t,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:o,onAction:l,disallowTypeAhead:s,linkBehavior:a="action",keyboardNavigationBehavior:u="arrow",escapeKeyBehavior:d="clearSelection"}=e;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:f}=V$({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:o,isVirtualized:r,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:e.shouldFocusWrap,linkBehavior:a,disallowTypeAhead:s,autoFocus:e.autoFocus,escapeKeyBehavior:d}),p=mt(e.id);Of.set(t,{id:p,onAction:l,linkBehavior:a,keyboardNavigationBehavior:u});let g=Q$({selectionManager:t.selectionManager,hasItemActions:!!l}),v=JS(n,{isDisabled:t.collection.size!==0}),b=qe(e,{labelable:!0}),x=q(b,{role:"grid",id:p,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:v?-1:0}:f,g);return r&&(x["aria-rowcount"]=t.collection.size,x["aria-colcount"]=1),Y$({},t),{gridProps:x}}const p3={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function h3(e,t,n){var r,i;let{node:o,isVirtualized:l,shouldSelectOnPressUp:s}=e,{direction:a}=ki(),{onAction:u,linkBehavior:d,keyboardNavigationBehavior:f}=Of.get(t),p=Ys(),g=c.useRef(null),v=()=>{var P;n.current!==null&&(g.current!=null&&o.key!==g.current||!(!((P=n.current)===null||P===void 0)&&P.contains(document.activeElement)))&&ot(n.current)},b={},x=e.hasChildItems,h=t.selectionManager.isLink(o.key);if(o!=null&&"expandedKeys"in t){var m,y,$;let P=(m=(y=t.collection).getChildren)===null||m===void 0?void 0:m.call(y,o.key);x=x||[...P!=null?P:[]].length>1,u==null&&!h&&t.selectionManager.selectionMode==="none"&&x&&(u=()=>t.toggleKey(o.key));let S=x?t.expandedKeys.has(o.key):void 0,N=1;var k;if(o.level>0&&(o==null?void 0:o.parentKey)!=null){let V=t.collection.getItem(o.parentKey);if(V){var M,I;let z=(M=(I=t.collection).getChildren)===null||M===void 0?void 0:M.call(I,V.key);N=U$(z).index+1}}else N=((k=($=[...t.collection].filter(V=>V.level===0).at(-1))===null||$===void 0?void 0:$.index)!==null&&k!==void 0?k:0)+1;b={"aria-expanded":S,"aria-level":o.level+1,"aria-posinset":(o==null?void 0:o.index)+1,"aria-setsize":N}}let D=B$({selectionManager:t.selectionManager,key:o.key,ref:n,isVirtualized:l,shouldSelectOnPressUp:s,onAction:u||!((r=o.props)===null||r===void 0)&&r.onAction?gi((i=o.props)===null||i===void 0?void 0:i.onAction,u?()=>u(o.key):void 0):void 0,focus:v,linkBehavior:d}),{itemProps:A}=D,_=Y(D,["itemProps"]),j=P=>{if(!P.currentTarget.contains(P.target)||!n.current||!document.activeElement)return;let S=Dt(n.current);if(S.currentNode=document.activeElement,"expandedKeys"in t&&document.activeElement===n.current){if(P.key===p3.expand[a]&&t.selectionManager.focusedKey===o.key&&x&&!t.expandedKeys.has(o.key)){t.toggleKey(o.key),P.stopPropagation();return}else if(P.key===p3.collapse[a]&&t.selectionManager.focusedKey===o.key&&x&&t.expandedKeys.has(o.key)){t.toggleKey(o.key),P.stopPropagation();return}}switch(P.key){case"ArrowLeft":if(f==="arrow"){let V=a==="rtl"?S.nextNode():S.previousNode();if(V)P.preventDefault(),P.stopPropagation(),ot(V),Yn(V,{containingElement:Gn(n.current)});else if(P.preventDefault(),P.stopPropagation(),a==="rtl")ot(n.current),Yn(n.current,{containingElement:Gn(n.current)});else{S.currentNode=n.current;let z=m3(S);z&&(ot(z),Yn(z,{containingElement:Gn(n.current)}))}}break;case"ArrowRight":if(f==="arrow"){let V=a==="rtl"?S.previousNode():S.nextNode();if(V)P.preventDefault(),P.stopPropagation(),ot(V),Yn(V,{containingElement:Gn(n.current)});else if(P.preventDefault(),P.stopPropagation(),a==="ltr")ot(n.current),Yn(n.current,{containingElement:Gn(n.current)});else{S.currentNode=n.current;let z=m3(S);z&&(ot(z),Yn(z,{containingElement:Gn(n.current)}))}}break;case"ArrowUp":case"ArrowDown":if(!P.altKey&&n.current.contains(P.target)){var N;P.stopPropagation(),P.preventDefault(),(N=n.current.parentElement)===null||N===void 0||N.dispatchEvent(new KeyboardEvent(P.nativeEvent.type,P.nativeEvent))}break;case"Tab":if(f==="tab"){let V=Dt(n.current,{tabbable:!0});V.currentNode=document.activeElement,(P.shiftKey?V.previousNode():V.nextNode())&&P.stopPropagation()}}},T=P=>{if(g.current=o.key,P.target!==n.current){bf()||t.selectionManager.setFocusedKey(o.key);return}},E=Mv(o.props),B=_.hasAction?E:{},K=q(A,B,{role:"row",onKeyDownCapture:j,onFocus:T,"aria-label":o.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(o.key)?t.selectionManager.isSelected(o.key):void 0,"aria-disabled":t.selectionManager.isDisabled(o.key)||void 0,"aria-labelledby":p&&o.textValue?`${Kf(t,o.key)} ${p}`:void 0,id:Kf(t,o.key)});l&&(K["aria-rowindex"]=o.index+1);let L={role:"gridcell","aria-colindex":1};return w({rowProps:w({},q(K,b)),gridCellProps:L,descriptionProps:{id:p}},_)}function m3(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function eE(e,t){let{key:n}=e;const{checkboxProps:r}=J$(e,t);return{checkboxProps:R(w({},r),{"aria-labelledby":`${r.id} ${Kf(t,n)}`})}}const v3=new WeakMap;function tE(e,t,n){let{direction:r}=ki(),i=e.keyboardDelegate||new ya({collection:t.collection,ref:n,orientation:"horizontal",direction:r,disabledKeys:t.disabledKeys,disabledBehavior:t.selectionManager.disabledBehavior}),{labelProps:o,fieldProps:l,descriptionProps:s,errorMessageProps:a}=h$(R(w({},e),{labelElementType:"span"})),{gridProps:u}=f3(R(w(w({},e),l),{keyboardDelegate:i,shouldFocusWrap:!0,linkBehavior:"override"}),t,n),[d,f]=c.useState(!1),{focusWithinProps:p}=ca({onFocusWithinChange:f}),g=qe(e),v=c.useRef(t.collection.size);return c.useEffect(()=>{n.current&&v.current>0&&t.collection.size===0&&d&&n.current.focus(),v.current=t.collection.size},[t.collection.size,d,n]),v3.set(t,{onRemove:e.onRemove}),{gridProps:q(u,g,w(w({role:t.collection.size?"grid":null,"aria-atomic":!1,"aria-relevant":"additions","aria-live":d?"polite":"off"},p),l)),labelProps:o,descriptionProps:s,errorMessageProps:a}}var g3={};g3={removeButtonLabel:"إزالة",removeDescription:"اضغط على مفتاح DELETE لإزالة علامة."};var y3={};y3={removeButtonLabel:"Премахване",removeDescription:"Натиснете Delete, за да премахнете маркера."};var b3={};b3={removeButtonLabel:"Odebrat",removeDescription:"Stisknutím klávesy Delete odeberete značku."};var x3={};x3={removeButtonLabel:"Fjern",removeDescription:"Tryk på Slet for at fjerne tag."};var w3={};w3={removeButtonLabel:"Entfernen",removeDescription:"Auf „Löschen“ drücken, um das Tag zu entfernen."};var S3={};S3={removeButtonLabel:"Κατάργηση",removeDescription:"Πατήστε Διαγραφή για να καταργήσετε την ετικέτα."};var $3={};$3={removeDescription:"Press Delete to remove tag.",removeButtonLabel:"Remove"};var E3={};E3={removeButtonLabel:"Quitar",removeDescription:"Pulse Eliminar para quitar la etiqueta."};var C3={};C3={removeButtonLabel:"Eemalda",removeDescription:"Sildi eemaldamiseks vajutage kustutusklahvi Delete."};var P3={};P3={removeButtonLabel:"Poista",removeDescription:"Poista tunniste painamalla Poista-painiketta."};var k3={};k3={removeButtonLabel:"Supprimer",removeDescription:"Appuyez sur Supprimer pour supprimer l’étiquette."};var T3={};T3={removeButtonLabel:"הסר",removeDescription:"לחץ על מחק כדי להסיר תג."};var D3={};D3={removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Delete za uklanjanje oznake."};var M3={};M3={removeButtonLabel:"Eltávolítás",removeDescription:"Nyomja meg a Delete billentyűt a címke eltávolításához."};var A3={};A3={removeButtonLabel:"Rimuovi",removeDescription:"Premi Elimina per rimuovere il tag."};var L3={};L3={removeButtonLabel:"削除",removeDescription:"タグを削除するには、Delete キーを押します。"};var N3={};N3={removeButtonLabel:"제거",removeDescription:"태그를 제거하려면 Delete 키를 누르십시오."};var R3={};R3={removeButtonLabel:"Pašalinti",removeDescription:"Norėdami pašalinti žymą, paspauskite „Delete“ klavišą."};var I3={};I3={removeButtonLabel:"Noņemt",removeDescription:"Nospiediet Delete [Dzēst], lai noņemtu tagu."};var F3={};F3={removeButtonLabel:"Fjern",removeDescription:"Trykk på Slett for å fjerne taggen."};var B3={};B3={removeButtonLabel:"Verwijderen",removeDescription:"Druk op Verwijderen om de tag te verwijderen."};var V3={};V3={removeButtonLabel:"Usuń",removeDescription:"Naciśnij Usuń, aby usunąć znacznik."};var j3={};j3={removeButtonLabel:"Remover",removeDescription:"Pressione Delete para remover a tag."};var O3={};O3={removeButtonLabel:"Eliminar",removeDescription:"Prima Delete para eliminar a tag."};var K3={};K3={removeButtonLabel:"Îndepărtaţi",removeDescription:"Apăsați pe Delete (Ștergere) pentru a elimina eticheta."};var z3={};z3={removeButtonLabel:"Удалить",removeDescription:"Нажмите DELETE, чтобы удалить тег."};var _3={};_3={removeButtonLabel:"Odstrániť",removeDescription:"Ak chcete odstrániť značku, stlačte kláves Delete."};var H3={};H3={removeButtonLabel:"Odstrani",removeDescription:"Pritisnite Delete, da odstranite oznako."};var U3={};U3={removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Obriši da biste uklonili oznaku."};var W3={};W3={removeButtonLabel:"Ta bort",removeDescription:"Tryck på Radera för att ta bort taggen."};var Z3={};Z3={removeButtonLabel:"Kaldır",removeDescription:"Etiketi kaldırmak için Sil tuşuna basın."};var G3={};G3={removeButtonLabel:"Вилучити",removeDescription:"Натисніть Delete, щоб вилучити тег."};var Y3={};Y3={removeButtonLabel:"删除",removeDescription:"按下“删除”以删除标记。"};var X3={};X3={removeButtonLabel:"移除",removeDescription:"按 Delete 鍵以移除標記。"};var Q3={};Q3={"ar-AE":g3,"bg-BG":y3,"cs-CZ":b3,"da-DK":x3,"de-DE":w3,"el-GR":S3,"en-US":$3,"es-ES":E3,"et-EE":C3,"fi-FI":P3,"fr-FR":k3,"he-IL":T3,"hr-HR":D3,"hu-HU":M3,"it-IT":A3,"ja-JP":L3,"ko-KR":N3,"lt-LT":R3,"lv-LV":I3,"nb-NO":F3,"nl-NL":B3,"pl-PL":V3,"pt-BR":j3,"pt-PT":O3,"ro-RO":K3,"ru-RU":z3,"sk-SK":_3,"sl-SI":H3,"sr-SP":U3,"sv-SE":W3,"tr-TR":Z3,"uk-UA":G3,"zh-CN":Y3,"zh-TW":X3};function nE(e){return e&&e.__esModule?e.default:e}function rE(e,t,n){let{item:r}=e,i=qo(nE(Q3),"@react-aria/tag"),o=mt(),{onRemove:l}=v3.get(t)||{},I=h3({node:r},t,n),{rowProps:s,gridCellProps:a}=I,u=Y(I,["rowProps","gridCellProps"]);delete s.onKeyDownCapture;let A=u,{descriptionProps:d}=A,f=Y(A,["descriptionProps"]),p=t.disabledKeys.has(r.key)||r.props.isDisabled,g=_=>{if(_.key==="Delete"||_.key==="Backspace"){if(p)return;_.preventDefault(),t.selectionManager.isSelected(r.key)?l==null||l(new Set(t.selectionManager.selectedKeys)):l==null||l(new Set([r.key]))}},v=lg();v==="virtual"&&typeof window!="undefined"&&"ontouchstart"in window&&(v="pointer");let b=l&&(v==="keyboard"||v==="virtual")?i.format("removeDescription"):"",x=af(b),h=r.key===t.selectionManager.focusedKey,m=t.selectionManager.focusedKey!=null,y=-1;!p&&(h||!m)&&(y=0);let $=qe(r.props),k=Mv(r.props),{focusableProps:M}=wf({isDisabled:p},n);return R(w({removeButtonProps:{"aria-label":i.format("removeButtonLabel"),"aria-labelledby":`${o} ${s.id}`,isDisabled:p,id:o,onPress:()=>l?l(new Set([r.key])):null,excludeFromTabOrder:!0},rowProps:q(M,s,$,k,{tabIndex:y,onKeyDown:l?g:void 0,"aria-describedby":x["aria-describedby"]}),gridCellProps:q(a,{"aria-errormessage":e["aria-errormessage"],"aria-label":e["aria-label"]})},f),{allowsRemoving:!!l})}const iE=c.createContext({}),oE=c.createContext(null),lE=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),xa=c.createContext({}),Li=Kw(function(t,n){[t,n]=Xn(t,n,xa),t=sE(t);let r=t,{isPending:i}=r,{buttonProps:o,isPressed:l}=HS(t,n),{focusProps:s,isFocused:a,isFocusVisible:u}=Di(t),{hoverProps:d,isHovered:f}=da(R(w({},t),{isDisabled:t.isDisabled||i})),p={isHovered:f,isPressed:(r.isPressed||l)&&!i,isFocused:a,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:i!=null?i:!1},g=Yt(R(w({},t),{values:p,defaultClassName:"react-aria-Button"})),v=mt(o.id),b=mt(),x=o["aria-labelledby"];i&&(x?x=`${x} ${b}`:o["aria-label"]&&(x=`${v} ${b}`));let h=c.useRef(i);return c.useEffect(()=>{let m={"aria-labelledby":x||v};(!h.current&&a&&i||h.current&&a&&!i)&&Lf(m,"assertive"),h.current=i},[i,a,x,v]),F.createElement("button",R(w(w(w({},qe(t,{propNames:lE})),q(o,s,d)),g),{type:o.type==="submit"&&i?"button":o.type,id:v,ref:n,"aria-labelledby":x,slot:t.slot||void 0,"aria-disabled":i?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":f||void 0,"data-focused":a||void 0,"data-pending":i||void 0,"data-focus-visible":u||void 0}),F.createElement(oE.Provider,{value:{id:b}},g.children))});function sE(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}const q3=c.createContext({});class J3{*[Symbol.iterator](){yield*Ii(this.iterable)}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let s of l.childNodes)n(s)};for(let l of t)n(l);let r=null,i=0;for(let[l,s]of this.keyMap)r?(r.nextKey=l,s.prevKey=r.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=i++),r=s,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}class jt extends Set{constructor(t,n,r){super(t),t instanceof jt?(this.anchorKey=n!=null?n:t.anchorKey,this.currentKey=r!=null?r:t.currentKey):(this.anchorKey=n!=null?n:null,this.currentKey=r!=null?r:null)}}function aE(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function uE(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=e,l=c.useRef(!1),[,s]=c.useState(!1),a=c.useRef(null),u=c.useRef(null),[,d]=c.useState(null),f=c.useMemo(()=>ey(e.selectedKeys),[e.selectedKeys]),p=c.useMemo(()=>ey(e.defaultSelectedKeys,new jt),[e.defaultSelectedKeys]),[g,v]=cf(f,p,e.onSelectionChange),b=c.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[x,h]=c.useState(i);i==="replace"&&x==="toggle"&&typeof g=="object"&&g.size===0&&h("replace");let m=c.useRef(i);return c.useEffect(()=>{i!==m.current&&(h(i),m.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:x,setSelectionBehavior:h,get isFocused(){return l.current},setFocused(y){l.current=y,s(y)},get focusedKey(){return a.current},get childFocusStrategy(){return u.current},setFocusedKey(y,$="first"){a.current=y,u.current=$,d(y)},selectedKeys:g,setSelectedKeys(y){(r||!aE(y,g))&&v(y)},disabledKeys:b,disabledBehavior:o}}function ey(e,t){return e?e==="all"?"all":new jt(e):t}class zf{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&jf(this.collection,i,t)<0)&&(t=i)}var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&jf(this.collection,i,t)>0)&&(t=i)}var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new jt([n],n,n);else{let l=this.state.selectedKeys;var i;let s=(i=l.anchorKey)!==null&&i!==void 0?i:n;r=new jt(l,s,n);var o;for(let a of this.getKeyRange(s,(o=l.currentKey)!==null&&o!==void 0?o:n))r.delete(a);for(let a of this.getKeyRange(n,s))this.canSelectItem(a)&&r.add(a)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?jf(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],o=t;for(;o!=null;){let l=this.collection.getItem(o);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new jt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new jt([n],n,n):new jt;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new jt;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let l=this.collection.getItem(r);(l==null?void 0:l.type)==="item"&&t.push(r);var o;l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&n((o=(i=_$(z$(l,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new jt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new zf(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function ty(e){let{filter:t,layoutDelegate:n}=e,r=uE(e),i=c.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=c.useCallback(u=>t?new J3(t(u)):new J3(u),[t]),l=c.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),s=K$(e,o,l),a=c.useMemo(()=>new zf(s,r,{layoutDelegate:n}),[s,r,n]);return cE(s,a),{collection:s,disabledKeys:i,selectionManager:a}}function cE(e,t){const n=c.useRef(null);c.useEffect(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&n.current){const d=n.current.getItem(t.focusedKey),f=[...n.current.getKeys()].map(h=>{const m=n.current.getItem(h);return(m==null?void 0:m.type)==="item"?m:null}).filter(h=>h!==null),p=[...e.getKeys()].map(h=>{const m=e.getItem(h);return(m==null?void 0:m.type)==="item"?m:null}).filter(h=>h!==null);var r,i;const g=((r=f==null?void 0:f.length)!==null&&r!==void 0?r:0)-((i=p==null?void 0:p.length)!==null&&i!==void 0?i:0);var o,l,s;let v=Math.min(g>1?Math.max(((o=d==null?void 0:d.index)!==null&&o!==void 0?o:0)-g+1,0):(l=d==null?void 0:d.index)!==null&&l!==void 0?l:0,((s=p==null?void 0:p.length)!==null&&s!==void 0?s:0)-1),b=null,x=!1;for(;v>=0;){if(!t.isDisabled(p[v].key)){b=p[v];break}if(v((a=d==null?void 0:d.index)!==null&&a!==void 0?a:0)&&(v=(u=d==null?void 0:d.index)!==null&&u!==void 0?u:0),v--}}t.setFocusedKey(b?b.key:null)}n.current=e},[e,t])}function ny(e){let[t,n]=cf(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=c.useCallback(()=>{n(!0)},[n]),i=c.useCallback(()=>{n(!1)},[n]),o=c.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:o}}function dE(e){let t=ny(e),[n,r]=c.useState(null),[i,o]=c.useState([]),l=()=>{o([]),t.close()},s=(u,d)=>{o(f=>d>f.length?f:[...f.slice(0,d),u])},a=(u,d)=>{o(f=>f[d]===u?f.slice(0,d):f)};return R(w({focusStrategy:n},t),{open(u=null){r(u),t.open()},toggle(u=null){r(u),t.toggle()},close(){l()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:a})}const fE=c.createContext(null),_f={CollectionRoot({collection:e,renderDropIndicator:t}){return ry(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return ry(e,t,n)}};function ry(e,t,n){return Zv({items:t?e.getChildren(t.key):e,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let l=r.key,s=e.getKeyAfter(l);return F.createElement(F.Fragment,null,n({type:"item",key:l,dropPosition:"before"}),o,(s==null||((i=e.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:l,dropPosition:"after"}))}})}const nl=c.createContext(_f);function pE(e){return c.useMemo(()=>e!=null?new Set([e]):null,[e])}const hE=c.createContext(null),mE=c.forwardRef(function(t,n){let j=t,{inputRef:r=null}=j,i=Y(j,["inputRef"]);[t,n]=Xn(i,n,$v);let{validationBehavior:o}=_v(fE)||{};var l,s;let a=(s=(l=t.validationBehavior)!==null&&l!==void 0?l:o)!==null&&s!==void 0?s:"native",u=c.useContext(hE),d=Zn(ef(r,t.inputRef!==void 0?t.inputRef:null)),{labelProps:f,inputProps:p,isSelected:g,isDisabled:v,isReadOnly:b,isPressed:x,isInvalid:h}=u?m$(R(w({},Hv(t)),{value:t.value,children:typeof t.children=="function"?!0:t.children}),u,d):Bg(R(w({},Hv(t)),{children:typeof t.children=="function"?!0:t.children,validationBehavior:a}),Vg(t),d),{isFocused:m,isFocusVisible:y,focusProps:$}=Di(),k=v||b,{hoverProps:M,isHovered:I}=da(R(w({},t),{isDisabled:k})),A=Yt(R(w({},t),{defaultClassName:"react-aria-Checkbox",values:{isSelected:g,isIndeterminate:t.isIndeterminate||!1,isPressed:x,isHovered:I,isFocused:m,isFocusVisible:y,isDisabled:v,isReadOnly:b,isInvalid:h,isRequired:t.isRequired||!1}})),_=qe(t);return delete _.id,F.createElement("label",R(w({},q(_,f,M,A)),{ref:n,slot:t.slot||void 0,"data-selected":g||void 0,"data-indeterminate":t.isIndeterminate||void 0,"data-pressed":x||void 0,"data-hovered":I||void 0,"data-focused":m||void 0,"data-focus-visible":y||void 0,"data-disabled":v||void 0,"data-readonly":b||void 0,"data-invalid":h||void 0,"data-required":t.isRequired||void 0}),F.createElement(Og,{elementType:"span"},F.createElement("input",R(w({},q(p,$)),{ref:d}))),A.children)}),wa=c.createContext({}),iy=c.createContext(null),vE=c.forwardRef(function(t,n){let{render:r}=c.useContext(iy);return F.createElement(F.Fragment,null,r(t,n))});function gE(e,t){var n;let r=e==null?void 0:e.renderDropIndicator,i=e==null||(n=e.isVirtualDragging)===null||n===void 0?void 0:n.call(e),o=c.useCallback(l=>{if(i||t!=null&&t.isDropTarget(l))return r?r(l):F.createElement(vE,{target:l})},[t==null?void 0:t.target,i,r]);return e!=null&&e.useDropIndicator?o:void 0}function yE(e,t,n){var r,i;let o=e.focusedKey,l=null;if(!(t==null||(r=t.isVirtualDragging)===null||r===void 0)&&r.call(t)&&(n==null||(i=n.target)===null||i===void 0?void 0:i.type)==="item"){l=n.target.key;var s;n.target.dropPosition==="after"&&(l=(s=n.collection.getKeyAfter(l))!==null&&s!==void 0?s:l)}return c.useMemo(()=>new Set([o,l].filter(a=>a!=null)),[o,l])}const Dr=c.createContext(null),bE=c.createContext(null),xE=c.createContext(null),oy=c.createContext(null),rl=c.createContext(null);function wE(e){let t=dE(e),n=c.useRef(null),{triggerProps:r,overlayProps:i}=y$({type:"dialog"},t,n);return r.id=mt(),i["aria-labelledby"]=r.id,F.createElement(Pr,{values:[[rl,t],[xE,t],[oy,i],[bE,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":i["aria-labelledby"]}]]},F.createElement(sS,R(w({},r),{ref:n,isPressed:t.isOpen}),e.children))}const SE=c.forwardRef(function(t,n){let r=t["aria-labelledby"];[t,n]=Xn(t,n,oy);let{dialogProps:i,titleProps:o}=W$(R(w({},t),{"aria-labelledby":r}),n),l=c.useContext(rl);!i["aria-label"]&&!i["aria-labelledby"]&&t["aria-labelledby"]&&(i["aria-labelledby"]=t["aria-labelledby"]);let s=Yt({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:(l==null?void 0:l.close)||(()=>{})}});return F.createElement("section",R(w(w(w({},qe(t)),i),s),{ref:n,slot:t.slot||void 0}),F.createElement(Pr,{values:[[Ev,{slots:{[xi]:{},title:R(w({},o),{level:2})}}],[xa,{slots:{[xi]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},s.children))}),$E=c.createContext(null),EE=c.forwardRef(function(t,n){return[t,n]=Xn(t,n,$E),F.createElement(hg,{content:F.createElement(gg,t)},r=>F.createElement(CE,{props:t,collection:r,gridListRef:n}))});function CE({props:e,collection:t,gridListRef:n}){let{dragAndDropHooks:r,keyboardNavigationBehavior:i="arrow",layout:o="stack"}=e,{CollectionRoot:l,isVirtualized:s,layoutDelegate:a,dropTargetDelegate:u}=c.useContext(nl),d=ty(R(w({},e),{collection:t,children:void 0,layoutDelegate:a})),f=$g({usage:"search",sensitivity:"base"}),{disabledBehavior:p,disabledKeys:g}=d.selectionManager,{direction:v}=ki(),b=c.useMemo(()=>new ya({collection:t,collator:f,ref:n,disabledKeys:g,disabledBehavior:p,layoutDelegate:a,layout:o,direction:v}),[t,n,o,g,p,a,f,v]),{gridProps:x}=f3(R(w({},e),{keyboardDelegate:b,keyboardNavigationBehavior:o==="grid"?"tab":i,isVirtualized:s}),d,n),h=d.selectionManager,m=!!(r!=null&&r.useDraggableCollectionState),y=!!(r!=null&&r.useDroppableCollectionState);c.useRef(m),c.useRef(y),c.useEffect(()=>{},[m,y]);let $,k,M,I=!1,A=null,_=c.useRef(null);if(m&&r){$=r.useDraggableCollectionState({collection:t,selectionManager:h,preview:r.renderDragPreview?_:void 0}),r.useDraggableCollection({},$,n);let P=r.DragPreview;A=r.renderDragPreview?F.createElement(P,{ref:_},r.renderDragPreview):null}if(y&&r){k=r.useDroppableCollectionState({collection:t,selectionManager:h});let P=new ya({collection:t,disabledKeys:h.disabledKeys,disabledBehavior:h.disabledBehavior,ref:n}),S=r.dropTargetDelegate||u||new r.ListDropTargetDelegate(t,n,{layout:o,direction:v});M=r.useDroppableCollection({keyboardDelegate:P,dropTargetDelegate:S},k,n),I=k.isDropTarget({type:"root"})}let{focusProps:j,isFocused:T,isFocusVisible:E}=Di(),B={isDropTarget:I,isEmpty:d.collection.size===0,isFocused:T,isFocusVisible:E,layout:o,state:d},K=Yt({className:e.className,style:e.style,defaultClassName:"react-aria-GridList",values:B}),L=null,D=null;if(d.collection.size===0&&e.renderEmptyState){let P=e.renderEmptyState(B);L=F.createElement("div",{role:"row",style:{display:"contents"}},F.createElement("div",{role:"gridcell",style:{display:"contents"}},P))}return F.createElement(Pg,null,F.createElement("div",R(w(w(w({},qe(e)),K),q(x,j,M==null?void 0:M.collectionProps,D)),{ref:n,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":I||void 0,"data-empty":d.collection.size===0||void 0,"data-focused":T||void 0,"data-focus-visible":E||void 0,"data-layout":o}),F.createElement(Pr,{values:[[Dr,d],[wa,{dragAndDropHooks:r,dragState:$,dropState:k}],[iy,{render:kE}]]},y&&F.createElement(ME,null),F.createElement(l,{collection:t,scrollRef:n,persistedKeys:yE(h,r,k),renderDropIndicator:gE(r,k)})),L,A))}const PE=mg("item",function(t,n,r){let i=c.useContext(Dr),{dragAndDropHooks:o,dragState:l,dropState:s}=c.useContext(wa),a=Zn(n),{isVirtualized:u}=c.useContext(nl),T=h3({node:r,shouldSelectOnPressUp:!!l,isVirtualized:u},i,a),{rowProps:d,gridCellProps:f,descriptionProps:p}=T,g=Y(T,["rowProps","gridCellProps","descriptionProps"]),{hoverProps:v,isHovered:b}=da({isDisabled:!g.allowsSelection&&!g.hasAction,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),{isFocusVisible:x,focusProps:h}=Di(),{checkboxProps:m}=eE({key:r.key},i),y=i.selectionManager.disabledBehavior==="all"&&g.isDisabled?{isDisabled:!0}:{},$=null;l&&o&&($=o.useDraggableItem({key:r.key,hasDragButton:!0},l));let k=null,M=c.useRef(null),{visuallyHiddenProps:I}=ma();s&&o&&(k=o.useDropIndicator({target:{type:"item",key:r.key,dropPosition:"on"}},s,M));let A=l&&l.isDragging(r.key),_=Yt(R(w({},t),{id:void 0,children:r.rendered,defaultClassName:"react-aria-GridListItem",values:R(w({},g),{isHovered:b,isFocusVisible:x,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!l,isDragging:A,isDropTarget:k==null?void 0:k.isDropTarget})})),j=c.useRef(null);return c.useEffect(()=>{l&&!j.current&&console.warn('Draggable items in a GridList must contain a