var Jf=e=>{throw TypeError(e)};var Dl=(e,t,n)=>t.has(e)||Jf("Cannot "+n);var A=(e,t,n)=>(Dl(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Jf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(Dl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),De=(e,t,n)=>(Dl(e,t,"access private method"),n);var ys=(e,t,n,r)=>({set _(i){H(e,t,i,n)},get _(){return A(e,t,r)}});function qx(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function pg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mg={exports:{}},Ya={},gg={exports:{}},X={};/** * @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 ns=Symbol.for("react.element"),Zx=Symbol.for("react.portal"),Jx=Symbol.for("react.fragment"),e1=Symbol.for("react.strict_mode"),t1=Symbol.for("react.profiler"),n1=Symbol.for("react.provider"),r1=Symbol.for("react.context"),i1=Symbol.for("react.forward_ref"),o1=Symbol.for("react.suspense"),s1=Symbol.for("react.memo"),a1=Symbol.for("react.lazy"),eh=Symbol.iterator;function l1(e){return e===null||typeof e!="object"?null:(e=eh&&e[eh]||e["@@iterator"],typeof e=="function"?e:null)}var yg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vg=Object.assign,wg={};function Ii(e,t,n){this.props=e,this.context=t,this.refs=wg,this.updater=n||yg}Ii.prototype.isReactComponent={};Ii.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")};Ii.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xg(){}xg.prototype=Ii.prototype;function nd(e,t,n){this.props=e,this.context=t,this.refs=wg,this.updater=n||yg}var rd=nd.prototype=new xg;rd.constructor=nd;vg(rd,Ii.prototype);rd.isPureReactComponent=!0;var th=Array.isArray,Sg=Object.prototype.hasOwnProperty,id={current:null},Tg={key:!0,ref:!0,__self:!0,__source:!0};function Cg(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Sg.call(t,r)&&!Tg.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,B=k[U];if(0>>1;Ui(we,j))Nei(ee,we)?(k[U]=ee,k[Ne]=j,U=Ne):(k[U]=we,k[q]=j,U=q);else if(Nei(ee,j))k[U]=ee,k[Ne]=j,U=Ne;else break e}}return R}function i(k,R){var j=k.sortIndex-R.sortIndex;return j!==0?j:k.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,v=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(k){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=k)r(u),R.sortIndex=R.expirationTime,t(l,R);else break;R=n(u)}}function S(k){if(g=!1,y(k),!v)if(n(l)!==null)v=!0,$(C);else{var R=n(u);R!==null&&_(S,R.startTime-k)}}function C(k,R){v=!1,g&&(g=!1,p(P),P=-1),h=!0;var j=f;try{for(y(R),d=n(l);d!==null&&(!(d.expirationTime>R)||k&&!V());){var U=d.callback;if(typeof U=="function"){d.callback=null,f=d.priorityLevel;var B=U(d.expirationTime<=R);R=e.unstable_now(),typeof B=="function"?d.callback=B:d===n(l)&&r(l),y(R)}else r(l);d=n(l)}if(d!==null)var Y=!0;else{var q=n(u);q!==null&&_(S,q.startTime-R),Y=!1}return Y}finally{d=null,f=j,h=!1}}var E=!1,b=null,P=-1,D=5,N=-1;function V(){return!(e.unstable_now()-Nk||125U?(k.sortIndex=j,t(u,k),n(l)===null&&k===n(u)&&(g?(p(P),P=-1):g=!0,_(S,j-U))):(k.sortIndex=B,t(l,k),v||h||(v=!0,$(C))),k},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(k){var R=f;return function(){var j=f;f=R;try{return k.apply(this,arguments)}finally{f=j}}}})(Rg);Ag.exports=Rg;var w1=Ag.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 x1=x,at=w1;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Au=Object.prototype.hasOwnProperty,S1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rh={},ih={};function T1(e){return Au.call(ih,e)?!0:Au.call(rh,e)?!1:S1.test(e)?ih[e]=!0:(rh[e]=!0,!1)}function C1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function E1(e,t,n,r){if(t===null||typeof t>"u"||C1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function He(e,t,n,r,i,o,s){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=s}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new He(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){Me[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var sd=/[\-:]([a-z])/g;function ad(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(sd,ad);Me[t]=new He(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(sd,ad);Me[t]=new He(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(sd,ad);Me[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function ld(e,t,n,r){var i=Me.hasOwnProperty(t)?Me[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{jl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?oo(e):""}function b1(e){switch(e.tag){case 5:return oo(e.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return e=Il(e.type,!1),e;case 11:return e=Il(e.type.render,!1),e;case 1:return e=Il(e.type,!0),e;default:return""}}function Du(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 Hr:return"Fragment";case Wr:return"Portal";case Ru:return"Profiler";case ud:return"StrictMode";case Mu:return"Suspense";case Nu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Dg:return(e.displayName||"Context")+".Consumer";case Ng:return(e._context.displayName||"Context")+".Provider";case cd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dd:return t=e.displayName||null,t!==null?t:Du(e.type)||"Memo";case Rn:t=e._payload,e=e._init;try{return Du(e(t))}catch{}}return null}function P1(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 Du(t);case 8:return t===ud?"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 Yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Og(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k1(e){var t=Og(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xs(e){e._valueTracker||(e._valueTracker=k1(e))}function jg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Og(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ca(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Lu(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yn(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 Ig(e,t){t=t.checked,t!=null&&ld(e,"checked",t,!1)}function Ou(e,t){Ig(e,t);var n=Yn(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")?ju(e,t.type,n):t.hasOwnProperty("defaultValue")&&ju(e,t.type,Yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ah(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 ju(e,t,n){(t!=="number"||ca(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var so=Array.isArray;function ai(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ss.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ko(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var co={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},A1=["Webkit","ms","Moz","O"];Object.keys(co).forEach(function(e){A1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),co[t]=co[e]})});function Bg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||co.hasOwnProperty(e)&&co[e]?(""+t).trim():t+"px"}function zg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var R1=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 _u(e,t){if(t){if(R1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function Vu(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 Bu=null;function fd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zu=null,li=null,ui=null;function ch(e){if(e=os(e)){if(typeof zu!="function")throw Error(M(280));var t=e.stateNode;t&&(t=el(t),zu(e.stateNode,e.type,t))}}function $g(e){li?ui?ui.push(e):ui=[e]:li=e}function Ug(){if(li){var e=li,t=ui;if(ui=li=null,ch(e),t)for(e=0;e>>=0,e===0?32:31-(B1(e)/z1|0)|0}var Ts=64,Cs=4194304;function ao(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 pa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=ao(a):(o&=s,o!==0&&(r=ao(o)))}else s=n&~i,s!==0?r=ao(s):o!==0&&(r=ao(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 rs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function H1(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=ho),wh=" ",xh=!1;function uy(e,t){switch(e){case"keyup":return wS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kr=!1;function SS(e,t){switch(e){case"compositionend":return cy(t);case"keypress":return t.which!==32?null:(xh=!0,wh);case"textInput":return e=t.data,e===wh&&xh?null:e;default:return null}}function TS(e,t){if(Kr)return e==="compositionend"||!xd&&uy(e,t)?(e=ay(),Qs=yd=_n=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=Eh(n)}}function py(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?py(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function my(){for(var e=window,t=ca();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ca(e.document)}return t}function Sd(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 NS(e){var t=my(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&py(n.ownerDocument.documentElement,n)){if(r!==null&&Sd(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=bh(n,o);var s=bh(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Gr=null,Gu=null,mo=null,Qu=!1;function Ph(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qu||Gr==null||Gr!==ca(r)||(r=Gr,"selectionStart"in r&&Sd(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}),mo&&Lo(mo,r)||(mo=r,r=ya(Gu,"onSelect"),0Xr||(e.current=ec[Xr],ec[Xr]=null,Xr--)}function re(e,t){Xr++,ec[Xr]=e.current,e.current=t}var Xn={},_e=ir(Xn),qe=ir(!1),Rr=Xn;function Pi(e,t){var n=e.type.contextTypes;if(!n)return Xn;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 Ze(e){return e=e.childContextTypes,e!=null}function wa(){se(qe),se(_e)}function Lh(e,t,n){if(_e.current!==Xn)throw Error(M(168));re(_e,t),re(qe,n)}function Ey(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(M(108,P1(e)||"Unknown",i));return he({},n,r)}function xa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xn,Rr=_e.current,re(_e,e),re(qe,qe.current),!0}function Oh(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=Ey(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,se(qe),se(_e),re(_e,e)):se(qe),re(qe,n)}var rn=null,tl=!1,Xl=!1;function by(e){rn===null?rn=[e]:rn.push(e)}function US(e){tl=!0,by(e)}function or(){if(!Xl&&rn!==null){Xl=!0;var e=0,t=te;try{var n=rn;for(te=1;e>=s,i-=s,sn=1<<32-Lt(t)+i|n<P?(D=b,b=null):D=b.sibling;var N=f(p,b,y[P],S);if(N===null){b===null&&(b=D);break}e&&b&&N.alternate===null&&t(p,b),m=o(N,m,P),E===null?C=N:E.sibling=N,E=N,b=D}if(P===y.length)return n(p,b),le&&dr(p,P),C;if(b===null){for(;PP?(D=b,b=null):D=b.sibling;var V=f(p,b,N.value,S);if(V===null){b===null&&(b=D);break}e&&b&&V.alternate===null&&t(p,b),m=o(V,m,P),E===null?C=V:E.sibling=V,E=V,b=D}if(N.done)return n(p,b),le&&dr(p,P),C;if(b===null){for(;!N.done;P++,N=y.next())N=d(p,N.value,S),N!==null&&(m=o(N,m,P),E===null?C=N:E.sibling=N,E=N);return le&&dr(p,P),C}for(b=r(p,b);!N.done;P++,N=y.next())N=h(b,p,P,N.value,S),N!==null&&(e&&N.alternate!==null&&b.delete(N.key===null?P:N.key),m=o(N,m,P),E===null?C=N:E.sibling=N,E=N);return e&&b.forEach(function(I){return t(p,I)}),le&&dr(p,P),C}function w(p,m,y,S){if(typeof y=="object"&&y!==null&&y.type===Hr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ws:e:{for(var C=y.key,E=m;E!==null;){if(E.key===C){if(C=y.type,C===Hr){if(E.tag===7){n(p,E.sibling),m=i(E,y.props.children),m.return=p,p=m;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Rn&&Fh(C)===E.type){n(p,E.sibling),m=i(E,y.props),m.ref=Ji(p,E,y),m.return=p,p=m;break e}n(p,E);break}else t(p,E);E=E.sibling}y.type===Hr?(m=Pr(y.props.children,p.mode,S,y.key),m.return=p,p=m):(S=na(y.type,y.key,y.props,null,p.mode,S),S.ref=Ji(p,m,y),S.return=p,p=S)}return s(p);case Wr:e:{for(E=y.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(p,m.sibling),m=i(m,y.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=iu(y,p.mode,S),m.return=p,p=m}return s(p);case Rn:return E=y._init,w(p,m,E(y._payload),S)}if(so(y))return v(p,m,y,S);if(Qi(y))return g(p,m,y,S);Ms(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(p,m.sibling),m=i(m,y),m.return=p,p=m):(n(p,m),m=ru(y,p.mode,S),m.return=p,p=m),s(p)):n(p,m)}return w}var Ai=Ry(!0),My=Ry(!1),Ca=ir(null),Ea=null,Jr=null,bd=null;function Pd(){bd=Jr=Ea=null}function kd(e){var t=Ca.current;se(Ca),e._currentValue=t}function rc(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 di(e,t){Ea=e,bd=Jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if(bd!==e)if(e={context:e,memoizedValue:t,next:null},Jr===null){if(Ea===null)throw Error(M(308));Jr=e,Ea.dependencies={lanes:0,firstContext:e}}else Jr=Jr.next=e;return t}var mr=null;function Ad(e){mr===null?mr=[e]:mr.push(e)}function Ny(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ad(t)):(n.next=i.next,i.next=n),t.interleaved=n,dn(e,r)}function dn(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 Mn=!1;function Rd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dy(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 ln(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dn(e,n)}return i=r.interleaved,i===null?(t.next=t,Ad(r)):(t.next=i.next,i.next=t),r.interleaved=t,dn(e,n)}function Xs(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,pd(e,n)}}function _h(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 s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,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 ba(e,t,n,r){var i=e.updateQueue;Mn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,c=u=l=null,a=o;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,g=a;switch(f=t,h=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(h,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(h,d,f):v,f==null)break e;d=he({},d,f);break e;case 2:Mn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Dr|=s,e.lanes=s,e.memoizedState=d}}function Vh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Zl.transition;Zl.transition={};try{e(!1),t()}finally{te=n,Zl.transition=r}}function Yy(){return xt().memoizedState}function GS(e,t,n){var r=Gn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xy(e))qy(t,n);else if(n=Ny(e,t,n,r),n!==null){var i=Ue();Ot(n,e,r,i),Zy(n,t,r)}}function QS(e,t,n){var r=Gn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xy(e))qy(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,jt(a,s)){var l=t.interleaved;l===null?(i.next=i,Ad(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Ny(e,t,i,r),n!==null&&(i=Ue(),Ot(n,e,r,i),Zy(n,t,r))}}function Xy(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function qy(e,t){go=ka=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pd(e,n)}}var Aa={readContext:wt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},YS={readContext:wt,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:zh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zs(4194308,4,Wy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zs(4,2,e,t)},useMemo:function(e,t){var n=Bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bt();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=GS.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:Bh,useDebugValue:Fd,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=Bh(!1),t=e[0];return e=KS.bind(null,e[1]),Bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,i=Bt();if(le){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Pe===null)throw Error(M(349));Nr&30||Iy(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,zh(_y.bind(null,r,o,e),[e]),r.flags|=2048,zo(9,Fy.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bt(),t=Pe.identifierPrefix;if(le){var n=an,r=sn;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Wt]=t,e[Io]=r,lv(e,t,!1,!1),t.stateNode=e;e:{switch(s=Vu(n,r),n){case"dialog":oe("cancel",e),oe("close",e),i=r;break;case"iframe":case"object":case"embed":oe("load",e),i=r;break;case"video":case"audio":for(i=0;iNi&&(t.flags|=128,r=!0,eo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Pa(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),eo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!le)return Oe(t),null}else 2*ve()-o.renderingStartTime>Ni&&n!==1073741824&&(t.flags|=128,r=!0,eo(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ve(),t.sibling=null,n=ce.current,re(ce,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Ud(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?nt&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function rT(e,t){switch(Cd(t),t.tag){case 1:return Ze(t.type)&&wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ri(),se(qe),se(_e),Dd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nd(t),null;case 13:if(se(ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(ce),null;case 4:return Ri(),null;case 10:return kd(t.type._context),null;case 22:case 23:return Ud(),null;case 24:return null;default:return null}}var Ds=!1,Ie=!1,iT=typeof WeakSet=="function"?WeakSet:Set,F=null;function ei(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function fc(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Zh=!1;function oT(e,t){if(Yu=ma,e=my(),Sd(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 s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xu={focusedElem:e,selectionRange:n},ma=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;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 g=v.memoizedProps,w=v.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:kt(t.type,g),w);p.__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(M(163))}}catch(S){ge(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return v=Zh,Zh=!1,v}function yo(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&&fc(t,n,o)}i=i.next}while(i!==r)}}function il(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 hc(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 dv(e){var t=e.alternate;t!==null&&(e.alternate=null,dv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wt],delete t[Io],delete t[Ju],delete t[zS],delete t[$S])),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 fv(e){return e.tag===5||e.tag===3||e.tag===4}function Jh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fv(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 pc(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=va));else if(r!==4&&(e=e.child,e!==null))for(pc(e,t,n),e=e.sibling;e!==null;)pc(e,t,n),e=e.sibling}function mc(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(mc(e,t,n),e=e.sibling;e!==null;)mc(e,t,n),e=e.sibling}var ke=null,Nt=!1;function En(e,t,n){for(n=n.child;n!==null;)hv(e,t,n),n=n.sibling}function hv(e,t,n){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(Xa,n)}catch{}switch(n.tag){case 5:Ie||ei(n,t);case 6:var r=ke,i=Nt;ke=null,En(e,t,n),ke=r,Nt=i,ke!==null&&(Nt?(e=ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ke.removeChild(n.stateNode));break;case 18:ke!==null&&(Nt?(e=ke,n=n.stateNode,e.nodeType===8?Yl(e.parentNode,n):e.nodeType===1&&Yl(e,n),No(e)):Yl(ke,n.stateNode));break;case 4:r=ke,i=Nt,ke=n.stateNode.containerInfo,Nt=!0,En(e,t,n),ke=r,Nt=i;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&fc(n,t,s),i=i.next}while(i!==r)}En(e,t,n);break;case 1:if(!Ie&&(ei(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}En(e,t,n);break;case 21:En(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,En(e,t,n),Ie=r):En(e,t,n);break;default:En(e,t,n)}}function ep(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new iT),t.forEach(function(r){var i=pT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*aT(r/1960))-r,10e?16:e,Vn===null)var r=!1;else{if(e=Vn,Vn=null,Na=0,Z&6)throw Error(M(331));var i=Z;for(Z|=4,F=e.current;F!==null;){var o=F,s=o.child;if(F.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lve()-zd?br(e,0):Bd|=n),Je(e,t)}function Sv(e,t){t===0&&(e.mode&1?(t=Cs,Cs<<=1,!(Cs&130023424)&&(Cs=4194304)):t=1);var n=Ue();e=dn(e,t),e!==null&&(rs(e,t,n),Je(e,n))}function hT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sv(e,n)}function pT(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(M(314))}r!==null&&r.delete(t),Sv(e,n)}var Tv;Tv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,tT(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,le&&t.flags&1048576&&Py(t,Ta,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Js(e,t),e=t.pendingProps;var i=Pi(t,_e.current);di(t,n),i=Od(null,t,r,e,i,n);var o=jd();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,Ze(r)?(o=!0,xa(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rd(t),i.updater=rl,t.stateNode=i,i._reactInternals=t,oc(t,r,e,n),t=lc(null,t,r,!0,o,n)):(t.tag=0,le&&o&&Td(t),Be(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Js(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=gT(r),e=kt(r,e),i){case 0:t=ac(null,t,r,e,n);break e;case 1:t=Yh(null,t,r,e,n);break e;case 11:t=Gh(null,t,r,e,n);break e;case 14:t=Qh(null,t,r,kt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),ac(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Yh(e,t,r,i,n);case 3:e:{if(ov(t),e===null)throw Error(M(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Dy(e,t),ba(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Mi(Error(M(423)),t),t=Xh(e,t,r,n,i);break e}else if(r!==i){i=Mi(Error(M(424)),t),t=Xh(e,t,r,n,i);break e}else for(it=Wn(t.stateNode.containerInfo.firstChild),ot=t,le=!0,Dt=null,n=My(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ki(),r===i){t=fn(e,t,n);break e}Be(e,t,r,n)}t=t.child}return t;case 5:return Ly(t),e===null&&nc(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,qu(r,i)?s=null:o!==null&&qu(r,o)&&(t.flags|=32),iv(e,t),Be(e,t,s,n),t.child;case 6:return e===null&&nc(t),null;case 13:return sv(e,t,n);case 4:return Md(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ai(t,null,r,n):Be(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Gh(e,t,r,i,n);case 7:return Be(e,t,t.pendingProps,n),t.child;case 8:return Be(e,t,t.pendingProps.children,n),t.child;case 12:return Be(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,re(Ca,r._currentValue),r._currentValue=s,o!==null)if(jt(o.value,s)){if(o.children===i.children&&!qe.current){t=fn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ln(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),rc(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(M(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),rc(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Be(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,di(t,n),i=wt(i),r=r(i),t.flags|=1,Be(e,t,r,n),t.child;case 14:return r=t.type,i=kt(r,t.pendingProps),i=kt(r.type,i),Qh(e,t,r,i,n);case 15:return nv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Js(e,t),t.tag=1,Ze(r)?(e=!0,xa(t)):e=!1,di(t,n),Jy(t,r,i),oc(t,r,i,n),lc(null,t,r,!0,e,n);case 19:return av(e,t,n);case 22:return rv(e,t,n)}throw Error(M(156,t.tag))};function Cv(e,t){return Xg(e,t)}function mT(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 gt(e,t,n,r){return new mT(e,t,n,r)}function Hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gT(e){if(typeof e=="function")return Hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cd)return 11;if(e===dd)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=gt(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 na(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Hd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Hr:return Pr(n.children,i,o,t);case ud:s=8,i|=8;break;case Ru:return e=gt(12,n,t,i|2),e.elementType=Ru,e.lanes=o,e;case Mu:return e=gt(13,n,t,i),e.elementType=Mu,e.lanes=o,e;case Nu:return e=gt(19,n,t,i),e.elementType=Nu,e.lanes=o,e;case Lg:return sl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ng:s=10;break e;case Dg:s=9;break e;case cd:s=11;break e;case dd:s=14;break e;case Rn:s=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=gt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Pr(e,t,n,r){return e=gt(7,e,r,t),e.lanes=n,e}function sl(e,t,n,r){return e=gt(22,e,r,t),e.elementType=Lg,e.lanes=n,e.stateNode={isHidden:!1},e}function ru(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function iu(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yT(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=_l(0),this.expirationTimes=_l(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_l(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Kd(e,t,n,r,i,o,s,a,l){return e=new yT(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=gt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rd(o),e}function vT(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kv)}catch(e){console.error(e)}}kv(),kg.exports=lt;var as=kg.exports;const Av=pg(as);var Rv,lp=as;Rv=lp.createRoot,lp.hydrateRoot;const CT=1,ET=1e6;let ou=0;function bT(){return ou=(ou+1)%Number.MAX_SAFE_INTEGER,ou.toString()}const su=new Map,up=e=>{if(su.has(e))return;const t=setTimeout(()=>{su.delete(e),xo({type:"REMOVE_TOAST",toastId:e})},ET);su.set(e,t)},PT=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,CT)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?up(n):e.toasts.forEach(r=>{up(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ra=[];let ia={toasts:[]};function xo(e){ia=PT(ia,e),ra.forEach(t=>{t(ia)})}function kT({...e}){const t=bT(),n=i=>xo({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>xo({type:"DISMISS_TOAST",toastId:t});return xo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function AT(){const[e,t]=x.useState(ia);return x.useEffect(()=>(ra.push(t),()=>{const n=ra.indexOf(t);n>-1&&ra.splice(n,1)}),[e]),{...e,toast:kT,dismiss:n=>xo({type:"DISMISS_TOAST",toastId:n})}}function Ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function cp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mv(...e){return t=>{let n=!1;const r=e.map(i=>{const o=cp(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{var p;const{scope:f,children:h,...v}=d,g=((p=f==null?void 0:f[e])==null?void 0:p[l])||a,w=x.useMemo(()=>v,Object.values(v));return T.jsx(g.Provider,{value:w,children:h})};u.displayName=o+"Provider";function c(d,f){var g;const h=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,v=x.useContext(h);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,RT(i,...t)]}function RT(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(o)[`__scope${u}`];return{...a,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Oa(e){const t=NT(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find(LT);if(l){const u=l.props.children,c=a.map(d=>d===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return T.jsx(t,{...s,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,c):null})}return T.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var MT=Oa("Slot");function NT(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=jT(i),a=OT(o,i.props);return i.type!==x.Fragment&&(a.ref=r?Mv(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nv=Symbol("radix.slottable");function DT(e){const t=({children:n})=>T.jsx(T.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Nv,t}function LT(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nv}function OT(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function jT(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function IT(e){const t=e+"CollectionProvider",[n,r]=dl(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:w,children:p}=g,m=L.useRef(null),y=L.useRef(new Map).current;return T.jsx(i,{scope:w,itemMap:y,collectionRef:m,children:p})};s.displayName=t;const a=e+"CollectionSlot",l=Oa(a),u=L.forwardRef((g,w)=>{const{scope:p,children:m}=g,y=o(a,p),S=It(w,y.collectionRef);return T.jsx(l,{ref:S,children:m})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Oa(c),h=L.forwardRef((g,w)=>{const{scope:p,children:m,...y}=g,S=L.useRef(null),C=It(w,S),E=o(c,p);return L.useEffect(()=>(E.itemMap.set(S,{ref:S,...y}),()=>void E.itemMap.delete(S))),T.jsx(f,{[d]:"",ref:C,children:m})});h.displayName=c;function v(g){const w=o(e+"CollectionConsumer",g);return L.useCallback(()=>{const m=w.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((E,b)=>y.indexOf(E.ref.current)-y.indexOf(b.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},v,r]}var FT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=FT.reduce((e,t)=>{const n=Oa(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Dv(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function qn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _T(e,t=globalThis==null?void 0:globalThis.document){const n=qn(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var VT="DismissableLayer",xc="dismissableLayer.update",BT="dismissableLayer.pointerDownOutside",zT="dismissableLayer.focusOutside",dp,Lv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xd=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,u=x.useContext(Lv),[c,d]=x.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),v=It(t,b=>d(b)),g=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(w),m=c?g.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,S=m>=p,C=UT(b=>{const P=b.target,D=[...u.branches].some(N=>N.contains(P));!S||D||(i==null||i(b),s==null||s(b),b.defaultPrevented||a==null||a())},f),E=WT(b=>{const P=b.target;[...u.branches].some(N=>N.contains(P))||(o==null||o(b),s==null||s(b),b.defaultPrevented||a==null||a())},f);return _T(b=>{m===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},f),x.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(dp=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),fp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=dp)}},[c,f,n,u]),x.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),fp())},[c,u]),x.useEffect(()=>{const b=()=>h({});return document.addEventListener(xc,b),()=>document.removeEventListener(xc,b)},[]),T.jsx(tt.div,{...l,ref:v,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,C.onPointerDownCapture)})});Xd.displayName=VT;var $T="DismissableLayerBranch",Ov=x.forwardRef((e,t)=>{const n=x.useContext(Lv),r=x.useRef(null),i=It(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(tt.div,{...e,ref:i})});Ov.displayName=$T;function UT(e,t=globalThis==null?void 0:globalThis.document){const n=qn(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){jv(BT,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function WT(e,t=globalThis==null?void 0:globalThis.document){const n=qn(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&jv(zT,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fp(){const e=new CustomEvent(xc);document.dispatchEvent(e)}function jv(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Dv(i,o):i.dispatchEvent(o)}var HT=Xd,KT=Ov,Zn=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},GT="Portal",Iv=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=x.useState(!1);Zn(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Av.createPortal(T.jsx(tt.div,{...r,ref:t}),s):null});Iv.displayName=GT;function QT(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var qd=e=>{const{present:t,children:n}=e,r=YT(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=It(r.ref,XT(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};qd.displayName="Presence";function YT(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=QT(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=js(r.current);o.current=a==="mounted"?u:"none"},[a]),Zn(()=>{const u=r.current,c=i.current;if(c!==e){const f=o.current,h=js(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Zn(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const g=js(r.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=h=>{h.target===t&&(o.current=js(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function js(e){return(e==null?void 0:e.animationName)||"none"}function XT(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qT=bg[" useInsertionEffect ".trim().toString()]||Zn;function ZT({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=JT({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=x.useRef(e!==void 0);x.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const u=x.useCallback(c=>{var d;if(a){const f=eC(c)?c(e):c;f!==e&&((d=s.current)==null||d.call(s,f))}else o(c)},[a,e,o,s]);return[l,u]}function JT({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return qT(()=>{o.current=t},[t]),x.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function eC(e){return typeof e=="function"}var tC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nC="VisuallyHidden",fl=x.forwardRef((e,t)=>T.jsx(tt.span,{...e,ref:t,style:{...tC,...e.style}}));fl.displayName=nC;var rC=fl,Zd="ToastProvider",[Jd,iC,oC]=IT("Toast"),[Fv,WN]=dl("Toast",[oC]),[sC,hl]=Fv(Zd),_v=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:s}=e,[a,l]=x.useState(null),[u,c]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zd}\`. Expected non-empty \`string\`.`),T.jsx(Jd.Provider,{scope:t,children:T.jsx(sC,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>c(h=>h+1),[]),onToastRemove:x.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};_v.displayName=Zd;var Vv="ToastViewport",aC=["F8"],Sc="toast.viewportPause",Tc="toast.viewportResume",Bv=x.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=aC,label:i="Notifications ({hotkey})",...o}=e,s=hl(Vv,n),a=iC(n),l=x.useRef(null),u=x.useRef(null),c=x.useRef(null),d=x.useRef(null),f=It(t,d,s.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=s.toastCount>0;x.useEffect(()=>{const w=p=>{var y;r.length!==0&&r.every(S=>p[S]||p.code===S)&&((y=d.current)==null||y.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),x.useEffect(()=>{const w=l.current,p=d.current;if(v&&w&&p){const m=()=>{if(!s.isClosePausedRef.current){const E=new CustomEvent(Sc);p.dispatchEvent(E),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){const E=new CustomEvent(Tc);p.dispatchEvent(E),s.isClosePausedRef.current=!1}},S=E=>{!w.contains(E.relatedTarget)&&y()},C=()=>{w.contains(document.activeElement)||y()};return w.addEventListener("focusin",m),w.addEventListener("focusout",S),w.addEventListener("pointermove",m),w.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",y),()=>{w.removeEventListener("focusin",m),w.removeEventListener("focusout",S),w.removeEventListener("pointermove",m),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",y)}}},[v,s.isClosePausedRef]);const g=x.useCallback(({tabbingDirection:w})=>{const m=a().map(y=>{const S=y.ref.current,C=[S,...xC(S)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?m.reverse():m).flat()},[a]);return x.useEffect(()=>{const w=d.current;if(w){const p=m=>{var C,E,b;const y=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!y){const P=document.activeElement,D=m.shiftKey;if(m.target===w&&D){(C=u.current)==null||C.focus();return}const I=g({tabbingDirection:D?"backwards":"forwards"}),G=I.findIndex(O=>O===P);au(I.slice(G+1))?m.preventDefault():D?(E=u.current)==null||E.focus():(b=c.current)==null||b.focus()}};return w.addEventListener("keydown",p),()=>w.removeEventListener("keydown",p)}},[a,g]),T.jsxs(KT,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&T.jsx(Cc,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});au(w)}}),T.jsx(Jd.Slot,{scope:n,children:T.jsx(tt.ol,{tabIndex:-1,...o,ref:f})}),v&&T.jsx(Cc,{ref:c,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});au(w)}})]})});Bv.displayName=Vv;var zv="ToastFocusProxy",Cc=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=hl(zv,n);return T.jsx(fl,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const a=s.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});Cc.displayName=zv;var ls="Toast",lC="toast.swipeStart",uC="toast.swipeMove",cC="toast.swipeCancel",dC="toast.swipeEnd",$v=x.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...s}=e,[a,l]=ZT({prop:r,defaultProp:i??!0,onChange:o,caller:ls});return T.jsx(qd,{present:n||a,children:T.jsx(pC,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:qn(e.onPause),onResume:qn(e.onResume),onSwipeStart:Ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ce(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ce(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ce(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});$v.displayName=ls;var[fC,hC]=Fv(ls,{onClose(){}}),pC=x.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,g=hl(ls,n),[w,p]=x.useState(null),m=It(t,O=>p(O)),y=x.useRef(null),S=x.useRef(null),C=i||g.duration,E=x.useRef(0),b=x.useRef(C),P=x.useRef(0),{onToastAdd:D,onToastRemove:N}=g,V=qn(()=>{var Q;(w==null?void 0:w.contains(document.activeElement))&&((Q=g.viewport)==null||Q.focus()),s()}),I=x.useCallback(O=>{!O||O===1/0||(window.clearTimeout(P.current),E.current=new Date().getTime(),P.current=window.setTimeout(V,O))},[V]);x.useEffect(()=>{const O=g.viewport;if(O){const Q=()=>{I(b.current),u==null||u()},$=()=>{const _=new Date().getTime()-E.current;b.current=b.current-_,window.clearTimeout(P.current),l==null||l()};return O.addEventListener(Sc,$),O.addEventListener(Tc,Q),()=>{O.removeEventListener(Sc,$),O.removeEventListener(Tc,Q)}}},[g.viewport,C,l,u,I]),x.useEffect(()=>{o&&!g.isClosePausedRef.current&&I(C)},[o,C,g.isClosePausedRef,I]),x.useEffect(()=>(D(),()=>N()),[D,N]);const G=x.useMemo(()=>w?Yv(w):null,[w]);return g.viewport?T.jsxs(T.Fragment,{children:[G&&T.jsx(mC,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:G}),T.jsx(fC,{scope:n,onClose:V,children:as.createPortal(T.jsx(Jd.ItemSlot,{scope:n,children:T.jsx(HT,{asChild:!0,onEscapeKeyDown:Ce(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||V(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:T.jsx(tt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ce(e.onKeyDown,O=>{O.key==="Escape"&&(a==null||a(O.nativeEvent),O.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Ce(e.onPointerDown,O=>{O.button===0&&(y.current={x:O.clientX,y:O.clientY})}),onPointerMove:Ce(e.onPointerMove,O=>{if(!y.current)return;const Q=O.clientX-y.current.x,$=O.clientY-y.current.y,_=!!S.current,k=["left","right"].includes(g.swipeDirection),R=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,j=k?R(0,Q):0,U=k?0:R(0,$),B=O.pointerType==="touch"?10:2,Y={x:j,y:U},q={originalEvent:O,delta:Y};_?(S.current=Y,Is(uC,d,q,{discrete:!1})):hp(Y,g.swipeDirection,B)?(S.current=Y,Is(lC,c,q,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(Q)>B||Math.abs($)>B)&&(y.current=null)}),onPointerUp:Ce(e.onPointerUp,O=>{const Q=S.current,$=O.target;if($.hasPointerCapture(O.pointerId)&&$.releasePointerCapture(O.pointerId),S.current=null,y.current=null,Q){const _=O.currentTarget,k={originalEvent:O,delta:Q};hp(Q,g.swipeDirection,g.swipeThreshold)?Is(dC,h,k,{discrete:!0}):Is(cC,f,k,{discrete:!0}),_.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),mC=e=>{const{__scopeToast:t,children:n,...r}=e,i=hl(ls,t),[o,s]=x.useState(!1),[a,l]=x.useState(!1);return vC(()=>s(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:T.jsx(Iv,{asChild:!0,children:T.jsx(fl,{...r,children:o&&T.jsxs(T.Fragment,{children:[i.label," ",n]})})})},gC="ToastTitle",Uv=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return T.jsx(tt.div,{...r,ref:t})});Uv.displayName=gC;var yC="ToastDescription",Wv=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return T.jsx(tt.div,{...r,ref:t})});Wv.displayName=yC;var Hv="ToastAction",Kv=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?T.jsx(Qv,{altText:n,asChild:!0,children:T.jsx(ef,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Hv}\`. Expected non-empty \`string\`.`),null)});Kv.displayName=Hv;var Gv="ToastClose",ef=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=hC(Gv,n);return T.jsx(Qv,{asChild:!0,children:T.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ce(e.onClick,i.onClose)})})});ef.displayName=Gv;var Qv=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return T.jsx(tt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Yv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),wC(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Yv(r))}}),t}function Is(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Dv(i,o):i.dispatchEvent(o)}var hp=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n};function vC(e=()=>{}){const t=qn(e);Zn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function wC(e){return e.nodeType===e.ELEMENT_NODE}function xC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function au(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var SC=_v,Xv=Bv,qv=$v,Zv=Uv,Jv=Wv,e0=Kv,t0=ef;function n0(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;ttypeof e=="boolean"?`${e}`:e===0?"0":e,mp=r0,tf=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return mp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const f=pp(c)||pp(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(v=>{let[g,w]=v;return Array.isArray(w)?w.includes({...o,...a}[g]):{...o,...a}[g]===w})?[...u,d,f]:u},[]);return mp(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i0=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var CC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const EC=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>x.createElement("svg",{ref:l,...CC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:i0("lucide",i),...a},[...s.map(([u,c])=>x.createElement(u,c)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pl=(e,t)=>{const n=x.forwardRef(({className:r,...i},o)=>x.createElement(EC,{ref:o,iconNode:t,className:i0(`lucide-${TC(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bC=pl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PC=pl("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kC=pl("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AC=pl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),nf="-",RC=e=>{const t=NC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(nf);return a[0]===""&&a.length!==1&&a.shift(),o0(a,t)||MC(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},o0=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?o0(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(nf);return(s=t.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},gp=/^\[(.+)\]$/,MC=e=>{if(gp.test(e)){const t=gp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},NC=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return LC(Object.entries(e.classGroups),n).forEach(([o,s])=>{Ec(s,r,o,t)}),r},Ec=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:yp(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(DC(i)){Ec(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{Ec(s,yp(t,o),n,r)})})},yp=(e,t)=>{let n=e;return t.split(nf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},DC=e=>e.isThemeGetter,LC=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o);return[n,i]}):e,OC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},s0="!",jC=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,s=a=>{const l=[];let u=0,c=0,d;for(let w=0;wc?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},IC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},FC=e=>({cache:OC(e.cacheSize),parseClassName:jC(e),...RC(e)}),_C=/\s+/,VC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(_C);let a="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let v=!!h,g=r(v?f.substring(0,h):f);if(!g){if(!v){a=u+(a.length>0?" "+a:a);continue}if(g=r(f),!g){a=u+(a.length>0?" "+a:a);continue}v=!1}const w=IC(c).join(":"),p=d?w+s0:w,m=p+g;if(o.includes(m))continue;o.push(m);const y=i(g,v);for(let S=0;S0?" "+a:a)}return a};function BC(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(c),e());return n=FC(u),r=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=VC(l,n);return i(l,c),c}return function(){return o(BC.apply(null,arguments))}}const ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},l0=/^\[(?:([a-z-]+):)?(.+)\]$/i,$C=/^\d+\/\d+$/,UC=new Set(["px","full","screen"]),WC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,KC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,GC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,en=e=>hi(e)||UC.has(e)||$C.test(e),bn=e=>Vi(e,"length",nE),hi=e=>!!e&&!Number.isNaN(Number(e)),lu=e=>Vi(e,"number",hi),no=e=>!!e&&Number.isInteger(Number(e)),YC=e=>e.endsWith("%")&&hi(e.slice(0,-1)),K=e=>l0.test(e),Pn=e=>WC.test(e),XC=new Set(["length","size","percentage"]),qC=e=>Vi(e,XC,u0),ZC=e=>Vi(e,"position",u0),JC=new Set(["image","url"]),eE=e=>Vi(e,JC,iE),tE=e=>Vi(e,"",rE),ro=()=>!0,Vi=(e,t,n)=>{const r=l0.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},nE=e=>HC.test(e)&&!KC.test(e),u0=()=>!1,rE=e=>GC.test(e),iE=e=>QC.test(e),oE=()=>{const e=ie("colors"),t=ie("spacing"),n=ie("blur"),r=ie("brightness"),i=ie("borderColor"),o=ie("borderRadius"),s=ie("borderSpacing"),a=ie("borderWidth"),l=ie("contrast"),u=ie("grayscale"),c=ie("hueRotate"),d=ie("invert"),f=ie("gap"),h=ie("gradientColorStops"),v=ie("gradientColorStopPositions"),g=ie("inset"),w=ie("margin"),p=ie("opacity"),m=ie("padding"),y=ie("saturate"),S=ie("scale"),C=ie("sepia"),E=ie("skew"),b=ie("space"),P=ie("translate"),D=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",K,t],I=()=>[K,t],G=()=>["",en,bn],O=()=>["auto",hi,K],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],_=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],k=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",K],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[hi,K];return{cacheSize:500,separator:":",theme:{colors:[ro],spacing:[en,bn],blur:["none","",Pn,K],brightness:U(),borderColor:[e],borderRadius:["none","","full",Pn,K],borderSpacing:I(),borderWidth:G(),contrast:U(),grayscale:R(),hueRotate:U(),invert:R(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[YC,bn],inset:V(),margin:V(),opacity:U(),padding:I(),saturate:U(),scale:U(),sepia:R(),skew:U(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[Pn]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),K]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",no,K]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",no,K]}],"grid-cols":[{"grid-cols":[ro]}],"col-start-end":[{col:["auto",{span:["full",no,K]},K]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[ro]}],"row-start-end":[{row:["auto",{span:[no,K]},K]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[Pn]},Pn]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pn,bn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lu]}],"font-family":[{font:[ro]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",K]}],"line-clamp":[{"line-clamp":["none",hi,lu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",en,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",en,bn]}],"underline-offset":[{"underline-offset":["auto",en,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),ZC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:$()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[en,K]}],"outline-w":[{outline:[en,bn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[en,bn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pn,tE]}],"shadow-color":[{shadow:[ro]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Pn,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[no,K]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[en,bn,lu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},sE=zC(oE);function Ke(...e){return sE(r0(e))}const aE=SC,c0=x.forwardRef(({className:e,...t},n)=>T.jsx(Xv,{ref:n,className:Ke("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));c0.displayName=Xv.displayName;const lE=tf("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),d0=x.forwardRef(({className:e,variant:t,...n},r)=>T.jsx(qv,{ref:r,className:Ke(lE({variant:t}),e),...n}));d0.displayName=qv.displayName;const uE=x.forwardRef(({className:e,...t},n)=>T.jsx(e0,{ref:n,className:Ke("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));uE.displayName=e0.displayName;const f0=x.forwardRef(({className:e,...t},n)=>T.jsx(t0,{ref:n,className:Ke("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:T.jsx(AC,{className:"h-4 w-4"})}));f0.displayName=t0.displayName;const h0=x.forwardRef(({className:e,...t},n)=>T.jsx(Zv,{ref:n,className:Ke("text-sm font-semibold",e),...t}));h0.displayName=Zv.displayName;const p0=x.forwardRef(({className:e,...t},n)=>T.jsx(Jv,{ref:n,className:Ke("text-sm opacity-90",e),...t}));p0.displayName=Jv.displayName;function cE(){const{toasts:e}=AT();return T.jsxs(aE,{children:[e.map(function({id:t,title:n,description:r,action:i,...o}){return T.jsxs(d0,{...o,children:[T.jsxs("div",{className:"grid gap-1",children:[n&&T.jsx(h0,{children:n}),r&&T.jsx(p0,{children:r})]}),i,T.jsx(f0,{})]},t)}),T.jsx(c0,{})]})}var vp=["light","dark"],dE="(prefers-color-scheme: dark)",fE=x.createContext(void 0),hE={setTheme:e=>{},themes:[]},pE=()=>{var e;return(e=x.useContext(fE))!=null?e:hE};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,attrs:a,nonce:l})=>{let u=o==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?vp.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,g=!1,w=!0)=>{let p=s?s[v]:v,m=g?v+"|| ''":`'${p}'`,y="";return i&&w&&!g&&vp.includes(v)&&(y+=`d.style.colorScheme = '${v}';`),n==="class"?g||p?y+=`c.add(${m})`:y+="null":p&&(y+=`d[s](n,${m})`),y},h=e?`!function(){${c}${f(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${dE}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${f(s?"x[e]":"e",!0)}}${u?"":"else{"+f(o,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${f(s?"x[e]":"e",!0)}}else{${f(o,!1,!1)};}${d}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var mE=e=>{switch(e){case"success":return vE;case"info":return xE;case"warning":return wE;case"error":return SE;default:return null}},gE=Array(12).fill(0),yE=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},gE.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),vE=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),wE=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),xE=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SE=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),TE=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),CE=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},bc=1,EE=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:bc++,o=this.toasts.find(a=>a.id===i),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...e,id:i,title:n}),{...a,...e,id:i,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,s=r.then(async l=>{if(o=["resolve",l],L.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(PE(l)&&!l.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:c})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:c})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:c})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>s.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||bc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ge=new EE,bE=(e,t)=>{let n=(t==null?void 0:t.id)||bc++;return Ge.addToast({title:e,...t,id:n}),n},PE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",kE=bE,AE=()=>Ge.toasts,RE=()=>Ge.getActiveToasts(),ME=Object.assign(kE,{success:Ge.success,info:Ge.info,warning:Ge.warning,error:Ge.error,custom:Ge.custom,message:Ge.message,promise:Ge.promise,dismiss:Ge.dismiss,loading:Ge.loading},{getHistory:AE,getToasts:RE});function NE(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}NE(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);function Fs(e){return e.label!==void 0}var DE=3,LE="32px",OE="16px",wp=4e3,jE=356,IE=14,FE=20,_E=200;function bt(...e){return e.filter(Boolean).join(" ")}function VE(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var BE=e=>{var t,n,r,i,o,s,a,l,u,c,d;let{invert:f,toast:h,unstyled:v,interacting:g,setHeights:w,visibleToasts:p,heights:m,index:y,toasts:S,expanded:C,removeToast:E,defaultRichColors:b,closeButton:P,style:D,cancelButtonStyle:N,actionButtonStyle:V,className:I="",descriptionClassName:G="",duration:O,position:Q,gap:$,loadingIcon:_,expandByDefault:k,classNames:R,icons:j,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:B}=e,[Y,q]=L.useState(null),[we,Ne]=L.useState(null),[ee,Fr]=L.useState(!1),[vn,ar]=L.useState(!1),[wn,_r]=L.useState(!1),[xn,ps]=L.useState(!1),[Al,ms]=L.useState(!1),[Rl,Ki]=L.useState(0),[Vr,Gf]=L.useState(0),Gi=L.useRef(h.duration||O||wp),Qf=L.useRef(null),lr=L.useRef(null),$x=y===0,Ux=y+1<=p,ct=h.type,Br=h.dismissible!==!1,Wx=h.className||"",Hx=h.descriptionClassName||"",gs=L.useMemo(()=>m.findIndex(W=>W.toastId===h.id)||0,[m,h.id]),Kx=L.useMemo(()=>{var W;return(W=h.closeButton)!=null?W:P},[h.closeButton,P]),Yf=L.useMemo(()=>h.duration||O||wp,[h.duration,O]),Ml=L.useRef(0),zr=L.useRef(0),Xf=L.useRef(0),$r=L.useRef(null),[Gx,Qx]=Q.split("-"),qf=L.useMemo(()=>m.reduce((W,ne,ae)=>ae>=gs?W:W+ne.height,0),[m,gs]),Zf=CE(),Yx=h.invert||f,Nl=ct==="loading";zr.current=L.useMemo(()=>gs*$+qf,[gs,qf]),L.useEffect(()=>{Gi.current=Yf},[Yf]),L.useEffect(()=>{Fr(!0)},[]),L.useEffect(()=>{let W=lr.current;if(W){let ne=W.getBoundingClientRect().height;return Gf(ne),w(ae=>[{toastId:h.id,height:ne,position:h.position},...ae]),()=>w(ae=>ae.filter(St=>St.toastId!==h.id))}},[w,h.id]),L.useLayoutEffect(()=>{if(!ee)return;let W=lr.current,ne=W.style.height;W.style.height="auto";let ae=W.getBoundingClientRect().height;W.style.height=ne,Gf(ae),w(St=>St.find(Tt=>Tt.toastId===h.id)?St.map(Tt=>Tt.toastId===h.id?{...Tt,height:ae}:Tt):[{toastId:h.id,height:ae,position:h.position},...St])},[ee,h.title,h.description,w,h.id]);let Sn=L.useCallback(()=>{ar(!0),Ki(zr.current),w(W=>W.filter(ne=>ne.toastId!==h.id)),setTimeout(()=>{E(h)},_E)},[h,E,w,zr]);L.useEffect(()=>{if(h.promise&&ct==="loading"||h.duration===1/0||h.type==="loading")return;let W;return C||g||B&&Zf?(()=>{if(Xf.current{var ne;(ne=h.onAutoClose)==null||ne.call(h,h),Sn()},Gi.current)),()=>clearTimeout(W)},[C,g,h,ct,B,Zf,Sn]),L.useEffect(()=>{h.delete&&Sn()},[Sn,h.delete]);function Xx(){var W,ne,ae;return j!=null&&j.loading?L.createElement("div",{className:bt(R==null?void 0:R.loader,(W=h==null?void 0:h.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":ct==="loading"},j.loading):_?L.createElement("div",{className:bt(R==null?void 0:R.loader,(ne=h==null?void 0:h.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":ct==="loading"},_):L.createElement(yE,{className:bt(R==null?void 0:R.loader,(ae=h==null?void 0:h.classNames)==null?void 0:ae.loader),visible:ct==="loading"})}return L.createElement("li",{tabIndex:0,ref:lr,className:bt(I,Wx,R==null?void 0:R.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[ct],(n=h==null?void 0:h.classNames)==null?void 0:n[ct]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:b,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":ee,"data-promise":!!h.promise,"data-swiped":Al,"data-removed":vn,"data-visible":Ux,"data-y-position":Gx,"data-x-position":Qx,"data-index":y,"data-front":$x,"data-swiping":wn,"data-dismissible":Br,"data-type":ct,"data-invert":Yx,"data-swipe-out":xn,"data-swipe-direction":we,"data-expanded":!!(C||k&&ee),style:{"--index":y,"--toasts-before":y,"--z-index":S.length-y,"--offset":`${vn?Rl:zr.current}px`,"--initial-height":k?"auto":`${Vr}px`,...D,...h.style},onDragEnd:()=>{_r(!1),q(null),$r.current=null},onPointerDown:W=>{Nl||!Br||(Qf.current=new Date,Ki(zr.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(_r(!0),$r.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,ne,ae,St;if(xn||!Br)return;$r.current=null;let Tt=Number(((W=lr.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Tn=Number(((ne=lr.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ur=new Date().getTime()-((ae=Qf.current)==null?void 0:ae.getTime()),Ct=Y==="x"?Tt:Tn,Cn=Math.abs(Ct)/ur;if(Math.abs(Ct)>=FE||Cn>.11){Ki(zr.current),(St=h.onDismiss)==null||St.call(h,h),Ne(Y==="x"?Tt>0?"right":"left":Tn>0?"down":"up"),Sn(),ps(!0),ms(!1);return}_r(!1),q(null)},onPointerMove:W=>{var ne,ae,St,Tt;if(!$r.current||!Br||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;let Tn=W.clientY-$r.current.y,ur=W.clientX-$r.current.x,Ct=(ae=e.swipeDirections)!=null?ae:VE(Q);!Y&&(Math.abs(ur)>1||Math.abs(Tn)>1)&&q(Math.abs(ur)>Math.abs(Tn)?"x":"y");let Cn={x:0,y:0};Y==="y"?(Ct.includes("top")||Ct.includes("bottom"))&&(Ct.includes("top")&&Tn<0||Ct.includes("bottom")&&Tn>0)&&(Cn.y=Tn):Y==="x"&&(Ct.includes("left")||Ct.includes("right"))&&(Ct.includes("left")&&ur<0||Ct.includes("right")&&ur>0)&&(Cn.x=ur),(Math.abs(Cn.x)>0||Math.abs(Cn.y)>0)&&ms(!0),(St=lr.current)==null||St.style.setProperty("--swipe-amount-x",`${Cn.x}px`),(Tt=lr.current)==null||Tt.style.setProperty("--swipe-amount-y",`${Cn.y}px`)}},Kx&&!h.jsx?L.createElement("button",{"aria-label":U,"data-disabled":Nl,"data-close-button":!0,onClick:Nl||!Br?()=>{}:()=>{var W;Sn(),(W=h.onDismiss)==null||W.call(h,h)},className:bt(R==null?void 0:R.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(o=j==null?void 0:j.close)!=null?o:TE):null,h.jsx||x.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:L.createElement(L.Fragment,null,ct||h.icon||h.promise?L.createElement("div",{"data-icon":"",className:bt(R==null?void 0:R.icon,(s=h==null?void 0:h.classNames)==null?void 0:s.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Xx():null,h.type!=="loading"?h.icon||(j==null?void 0:j[ct])||mE(ct):null):null,L.createElement("div",{"data-content":"",className:bt(R==null?void 0:R.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},L.createElement("div",{"data-title":"",className:bt(R==null?void 0:R.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?L.createElement("div",{"data-description":"",className:bt(G,Hx,R==null?void 0:R.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),x.isValidElement(h.cancel)?h.cancel:h.cancel&&Fs(h.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||N,onClick:W=>{var ne,ae;Fs(h.cancel)&&Br&&((ae=(ne=h.cancel).onClick)==null||ae.call(ne,W),Sn())},className:bt(R==null?void 0:R.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,x.isValidElement(h.action)?h.action:h.action&&Fs(h.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||V,onClick:W=>{var ne,ae;Fs(h.action)&&((ae=(ne=h.action).onClick)==null||ae.call(ne,W),!W.defaultPrevented&&Sn())},className:bt(R==null?void 0:R.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function xp(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function zE(e,t){let n={};return[e,t].forEach((r,i)=>{let o=i===1,s=o?"--mobile-offset":"--offset",a=o?OE:LE;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${s}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=a:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var $E=x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:s,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:v=DE,toastOptions:g,dir:w=xp(),gap:p=IE,loadingIcon:m,icons:y,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:C}=e,[E,b]=L.useState([]),P=L.useMemo(()=>Array.from(new Set([r].concat(E.filter(B=>B.position).map(B=>B.position)))),[E,r]),[D,N]=L.useState([]),[V,I]=L.useState(!1),[G,O]=L.useState(!1),[Q,$]=L.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=L.useRef(null),k=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=L.useRef(null),j=L.useRef(!1),U=L.useCallback(B=>{b(Y=>{var q;return(q=Y.find(we=>we.id===B.id))!=null&&q.delete||Ge.dismiss(B.id),Y.filter(({id:we})=>we!==B.id)})},[]);return L.useEffect(()=>Ge.subscribe(B=>{if(B.dismiss){b(Y=>Y.map(q=>q.id===B.id?{...q,delete:!0}:q));return}setTimeout(()=>{Av.flushSync(()=>{b(Y=>{let q=Y.findIndex(we=>we.id===B.id);return q!==-1?[...Y.slice(0,q),{...Y[q],...B},...Y.slice(q+1)]:[B,...Y]})})})}),[]),L.useEffect(()=>{if(c!=="system"){$(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:Y})=>{$(Y?"dark":"light")})}catch{B.addListener(({matches:q})=>{try{$(q?"dark":"light")}catch(we){console.error(we)}})}},[c]),L.useEffect(()=>{E.length<=1&&I(!1)},[E]),L.useEffect(()=>{let B=Y=>{var q,we;i.every(Ne=>Y[Ne]||Y.code===Ne)&&(I(!0),(q=_.current)==null||q.focus()),Y.code==="Escape"&&(document.activeElement===_.current||(we=_.current)!=null&&we.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[i]),L.useEffect(()=>{if(_.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,j.current=!1)}},[_.current]),L.createElement("section",{ref:t,"aria-label":`${S} ${k}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((B,Y)=>{var q;let[we,Ne]=B.split("-");return E.length?L.createElement("ol",{key:B,dir:w==="auto"?xp():w,tabIndex:-1,ref:_,className:a,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":we,"data-lifted":V&&E.length>1&&!o,"data-x-position":Ne,style:{"--front-toast-height":`${((q=D[0])==null?void 0:q.height)||0}px`,"--width":`${jE}px`,"--gap":`${p}px`,...h,...zE(l,u)},onBlur:ee=>{j.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(j.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||j.current||(j.current=!0,R.current=ee.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{G||I(!1)},onDragEnd:()=>I(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},E.filter(ee=>!ee.position&&Y===0||ee.position===B).map((ee,Fr)=>{var vn,ar;return L.createElement(BE,{key:ee.id,icons:y,index:Fr,toast:ee,defaultRichColors:d,duration:(vn=g==null?void 0:g.duration)!=null?vn:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ar=g==null?void 0:g.closeButton)!=null?ar:s,interacting:G,position:B,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:E.filter(wn=>wn.position==ee.position),heights:D.filter(wn=>wn.position==ee.position),setHeights:N,expandByDefault:o,gap:p,loadingIcon:m,expanded:V,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const UE=({...e})=>{const{theme:t="system"}=pE();return T.jsx($E,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},WE=["top","right","bottom","left"],Jn=Math.min,rt=Math.max,ja=Math.round,_s=Math.floor,Qt=e=>({x:e,y:e}),HE={left:"right",right:"left",bottom:"top",top:"bottom"},KE={start:"end",end:"start"};function Pc(e,t,n){return rt(e,Jn(t,n))}function hn(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function Bi(e){return e.split("-")[1]}function rf(e){return e==="x"?"y":"x"}function of(e){return e==="y"?"height":"width"}const GE=new Set(["top","bottom"]);function Ht(e){return GE.has(pn(e))?"y":"x"}function sf(e){return rf(Ht(e))}function QE(e,t,n){n===void 0&&(n=!1);const r=Bi(e),i=sf(e),o=of(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Ia(s)),[s,Ia(s)]}function YE(e){const t=Ia(e);return[kc(e),t,kc(t)]}function kc(e){return e.replace(/start|end/g,t=>KE[t])}const Sp=["left","right"],Tp=["right","left"],XE=["top","bottom"],qE=["bottom","top"];function ZE(e,t,n){switch(e){case"top":case"bottom":return n?t?Tp:Sp:t?Sp:Tp;case"left":case"right":return t?XE:qE;default:return[]}}function JE(e,t,n,r){const i=Bi(e);let o=ZE(pn(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(kc)))),o}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>HE[t])}function eb(e){return{top:0,right:0,bottom:0,left:0,...e}}function m0(e){return typeof e!="number"?eb(e):{top:e,right:e,bottom:e,left:e}}function Fa(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Cp(e,t,n){let{reference:r,floating:i}=e;const o=Ht(t),s=sf(t),a=of(s),l=pn(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Bi(t)){case"start":h[s]-=f*(n&&u?-1:1);break;case"end":h[s]+=f*(n&&u?-1:1);break}return h}const tb=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Cp(u,r,l),f=r,h={},v=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=hn(e,t)||{};if(u==null)return{};const d=m0(c),f={x:n,y:r},h=sf(i),v=of(h),g=await s.getDimensions(u),w=h==="y",p=w?"top":"left",m=w?"bottom":"right",y=w?"clientHeight":"clientWidth",S=o.reference[v]+o.reference[h]-f[h]-o.floating[v],C=f[h]-o.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let b=E?E[y]:0;(!b||!await(s.isElement==null?void 0:s.isElement(E)))&&(b=a.floating[y]||o.floating[v]);const P=S/2-C/2,D=b/2-g[v]/2-1,N=Jn(d[p],D),V=Jn(d[m],D),I=N,G=b-g[v]-V,O=b/2-g[v]/2+P,Q=Pc(I,O,G),$=!l.arrow&&Bi(i)!=null&&O!==Q&&o.reference[v]/2-(OO<=0)){var V,I;const O=(((V=o.flip)==null?void 0:V.index)||0)+1,Q=b[O];if(Q&&(!(d==="alignment"?m!==Ht(Q):!1)||N.every(k=>k.overflows[0]>0&&Ht(k.placement)===m)))return{data:{index:O,overflows:N},reset:{placement:Q}};let $=(I=N.filter(_=>_.overflows[0]<=0).sort((_,k)=>_.overflows[1]-k.overflows[1])[0])==null?void 0:I.placement;if(!$)switch(h){case"bestFit":{var G;const _=(G=N.filter(k=>{if(E){const R=Ht(k.placement);return R===m||R==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(R=>R>0).reduce((R,j)=>R+j,0)]).sort((k,R)=>k[1]-R[1])[0])==null?void 0:G[0];_&&($=_);break}case"initialPlacement":$=a;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Ep(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bp(e){return WE.some(t=>e[t]>=0)}const ib=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=hn(e,t);switch(r){case"referenceHidden":{const o=await Uo(t,{...i,elementContext:"reference"}),s=Ep(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bp(s)}}}case"escaped":{const o=await Uo(t,{...i,altBoundary:!0}),s=Ep(o,n.floating);return{data:{escapedOffsets:s,escaped:bp(s)}}}default:return{}}}}},g0=new Set(["left","top"]);async function ob(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=pn(n),a=Bi(n),l=Ht(n)==="y",u=g0.has(s)?-1:1,c=o&&l?-1:1,d=hn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const sb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await ob(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},ab=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:p,y:m}=w;return{x:p,y:m}}},...l}=hn(e,t),u={x:n,y:r},c=await Uo(t,l),d=Ht(pn(i)),f=rf(d);let h=u[f],v=u[d];if(o){const w=f==="y"?"top":"left",p=f==="y"?"bottom":"right",m=h+c[w],y=h-c[p];h=Pc(m,h,y)}if(s){const w=d==="y"?"top":"left",p=d==="y"?"bottom":"right",m=v+c[w],y=v-c[p];v=Pc(m,v,y)}const g=a.fn({...t,[f]:h,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:o,[d]:s}}}}}},lb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=hn(e,t),c={x:n,y:r},d=Ht(i),f=rf(d);let h=c[f],v=c[d];const g=hn(a,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=f==="y"?"height":"width",S=o.reference[f]-o.floating[y]+w.mainAxis,C=o.reference[f]+o.reference[y]-w.mainAxis;hC&&(h=C)}if(u){var p,m;const y=f==="y"?"width":"height",S=g0.has(pn(i)),C=o.reference[d]-o.floating[y]+(S&&((p=s.offset)==null?void 0:p[d])||0)+(S?0:w.crossAxis),E=o.reference[d]+o.reference[y]+(S?0:((m=s.offset)==null?void 0:m[d])||0)-(S?w.crossAxis:0);vE&&(v=E)}return{[f]:h,[d]:v}}}},ub=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=hn(e,t),c=await Uo(t,u),d=pn(i),f=Bi(i),h=Ht(i)==="y",{width:v,height:g}=o.floating;let w,p;d==="top"||d==="bottom"?(w=d,p=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(p=d,w=f==="end"?"top":"bottom");const m=g-c.top-c.bottom,y=v-c.left-c.right,S=Jn(g-c[w],m),C=Jn(v-c[p],y),E=!t.middlewareData.shift;let b=S,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=m),E&&!f){const N=rt(c.left,0),V=rt(c.right,0),I=rt(c.top,0),G=rt(c.bottom,0);h?P=v-2*(N!==0||V!==0?N+V:rt(c.left,c.right)):b=g-2*(I!==0||G!==0?I+G:rt(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:b});const D=await s.getDimensions(a.floating);return v!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function ml(){return typeof window<"u"}function zi(e){return y0(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(y0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function y0(e){return ml()?e instanceof Node||e instanceof st(e).Node:!1}function Ft(e){return ml()?e instanceof Element||e instanceof st(e).Element:!1}function Zt(e){return ml()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function Pp(e){return!ml()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}const cb=new Set(["inline","contents"]);function us(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!cb.has(i)}const db=new Set(["table","td","th"]);function fb(e){return db.has(zi(e))}const hb=[":popover-open",":modal"];function gl(e){return hb.some(t=>{try{return e.matches(t)}catch{return!1}})}const pb=["transform","translate","scale","rotate","perspective"],mb=["transform","translate","scale","rotate","perspective","filter"],gb=["paint","layout","strict","content"];function af(e){const t=lf(),n=Ft(e)?_t(e):e;return pb.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||mb.some(r=>(n.willChange||"").includes(r))||gb.some(r=>(n.contain||"").includes(r))}function yb(e){let t=er(e);for(;Zt(t)&&!Di(t);){if(af(t))return t;if(gl(t))return null;t=er(t)}return null}function lf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vb=new Set(["html","body","#document"]);function Di(e){return vb.has(zi(e))}function _t(e){return st(e).getComputedStyle(e)}function yl(e){return Ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(zi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pp(e)&&e.host||Jt(e);return Pp(t)?t.host:t}function v0(e){const t=er(e);return Di(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&us(t)?t:v0(t)}function Wo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=v0(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=st(i);if(o){const a=Ac(s);return t.concat(s,s.visualViewport||[],us(i)?i:[],a&&n?Wo(a):[])}return t.concat(i,Wo(i,[],n))}function Ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function w0(e){const t=_t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zt(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=ja(n)!==o||ja(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function uf(e){return Ft(e)?e:e.contextElement}function pi(e){const t=uf(e);if(!Zt(t))return Qt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=w0(t);let s=(o?ja(n.width):n.width)/r,a=(o?ja(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const wb=Qt(0);function x0(e){const t=st(e);return!lf()||!t.visualViewport?wb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function Or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=uf(e);let s=Qt(1);t&&(r?Ft(r)&&(s=pi(r)):s=pi(e));const a=xb(o,n,r)?x0(o):Qt(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const f=st(o),h=r&&Ft(r)?st(r):r;let v=f,g=Ac(v);for(;g&&r&&h!==v;){const w=pi(g),p=g.getBoundingClientRect(),m=_t(g),y=p.left+(g.clientLeft+parseFloat(m.paddingLeft))*w.x,S=p.top+(g.clientTop+parseFloat(m.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=y,u+=S,v=st(g),g=Ac(v)}}return Fa({width:c,height:d,x:l,y:u})}function cf(e,t){const n=yl(e).scrollLeft;return t?t.left+n:Or(Jt(e)).left+n}function S0(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:cf(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function Sb(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Jt(r),a=t?gl(t.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Qt(1);const c=Qt(0),d=Zt(r);if((d||!d&&!o)&&((zi(r)!=="body"||us(s))&&(l=yl(r)),Zt(r))){const h=Or(r);u=pi(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=s&&!d&&!o?S0(s,l,!0):Qt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Tb(e){return Array.from(e.getClientRects())}function Cb(e){const t=Jt(e),n=yl(e),r=e.ownerDocument.body,i=rt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=rt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+cf(e);const a=-n.scrollTop;return _t(r).direction==="rtl"&&(s+=rt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function Eb(e,t){const n=st(e),r=Jt(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const u=lf();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}const bb=new Set(["absolute","fixed"]);function Pb(e,t){const n=Or(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Zt(e)?pi(e):Qt(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:s,height:a,x:l,y:u}}function kp(e,t,n){let r;if(t==="viewport")r=Eb(e,n);else if(t==="document")r=Cb(Jt(e));else if(Ft(t))r=Pb(t,n);else{const i=x0(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fa(r)}function T0(e,t){const n=er(e);return n===t||!Ft(n)||Di(n)?!1:_t(n).position==="fixed"||T0(n,t)}function kb(e,t){const n=t.get(e);if(n)return n;let r=Wo(e,[],!1).filter(a=>Ft(a)&&zi(a)!=="body"),i=null;const o=_t(e).position==="fixed";let s=o?er(e):e;for(;Ft(s)&&!Di(s);){const a=_t(s),l=af(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&bb.has(i.position)||us(s)&&!l&&T0(e,s))?r=r.filter(c=>c!==s):i=a,s=er(s)}return t.set(e,r),r}function Ab(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?gl(t)?[]:kb(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{const d=kp(t,c,i);return u.top=rt(d.top,u.top),u.right=Jn(d.right,u.right),u.bottom=Jn(d.bottom,u.bottom),u.left=rt(d.left,u.left),u},kp(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Rb(e){const{width:t,height:n}=w0(e);return{width:t,height:n}}function Mb(e,t,n){const r=Zt(t),i=Jt(t),o=n==="fixed",s=Or(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Qt(0);function u(){l.x=cf(i)}if(r||!r&&!o)if((zi(t)!=="body"||us(i))&&(a=yl(t)),r){const h=Or(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?S0(i,a):Qt(0),d=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function uu(e){return _t(e).position==="static"}function Ap(e,t){if(!Zt(e)||_t(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jt(e)===n&&(n=n.ownerDocument.body),n}function C0(e,t){const n=st(e);if(gl(e))return n;if(!Zt(e)){let i=er(e);for(;i&&!Di(i);){if(Ft(i)&&!uu(i))return i;i=er(i)}return n}let r=Ap(e,t);for(;r&&fb(r)&&uu(r);)r=Ap(r,t);return r&&Di(r)&&uu(r)&&!af(r)?n:r||yb(e)||n}const Nb=async function(e){const t=this.getOffsetParent||C0,n=this.getDimensions,r=await n(e.floating);return{reference:Mb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Db(e){return _t(e).direction==="rtl"}const Lb={convertOffsetParentRelativeRectToViewportRelativeRect:Sb,getDocumentElement:Jt,getClippingRect:Ab,getOffsetParent:C0,getElementRects:Nb,getClientRects:Tb,getDimensions:Rb,getScale:pi,isElement:Ft,isRTL:Db};function E0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ob(e,t){let n=null,r;const i=Jt(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const v=_s(d),g=_s(i.clientWidth-(c+f)),w=_s(i.clientHeight-(d+h)),p=_s(c),y={rootMargin:-v+"px "+-g+"px "+-w+"px "+-p+"px",threshold:rt(0,Jn(1,l))||1};let S=!0;function C(E){const b=E[0].intersectionRatio;if(b!==l){if(!S)return s();b?s(!1,b):r=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!E0(u,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(C,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return s(!0),o}function jb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=uf(e),c=i||o?[...u?Wo(u):[],...Wo(t)]:[];c.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});const d=u&&a?Ob(u,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(p=>{let[m]=p;m&&m.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,g=l?Or(e):null;l&&w();function w(){const p=Or(e);g&&!E0(g,p)&&n(),g=p,v=requestAnimationFrame(w)}return n(),()=>{var p;c.forEach(m=>{i&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),d==null||d(),(p=h)==null||p.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const Ib=sb,Fb=ab,_b=rb,Vb=ub,Bb=ib,Rp=nb,zb=lb,$b=(e,t,n)=>{const r=new Map,i={platform:Lb,...n},o={...i.platform,_c:r};return tb(e,t,{...i,platform:o})};var Ub=typeof document<"u",Wb=function(){},oa=Ub?x.useLayoutEffect:Wb;function _a(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_a(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!_a(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function b0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mp(e,t){const n=b0(e);return Math.round(t*n)/n}function cu(e){const t=x.useRef(e);return oa(()=>{t.current=e}),t}function Hb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=x.useState(r);_a(f,r)||h(r);const[v,g]=x.useState(null),[w,p]=x.useState(null),m=x.useCallback(k=>{k!==E.current&&(E.current=k,g(k))},[]),y=x.useCallback(k=>{k!==b.current&&(b.current=k,p(k))},[]),S=o||v,C=s||w,E=x.useRef(null),b=x.useRef(null),P=x.useRef(c),D=l!=null,N=cu(l),V=cu(i),I=cu(u),G=x.useCallback(()=>{if(!E.current||!b.current)return;const k={placement:t,strategy:n,middleware:f};V.current&&(k.platform=V.current),$b(E.current,b.current,k).then(R=>{const j={...R,isPositioned:I.current!==!1};O.current&&!_a(P.current,j)&&(P.current=j,as.flushSync(()=>{d(j)}))})},[f,t,n,V,I]);oa(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[u]);const O=x.useRef(!1);oa(()=>(O.current=!0,()=>{O.current=!1}),[]),oa(()=>{if(S&&(E.current=S),C&&(b.current=C),S&&C){if(N.current)return N.current(S,C,G);G()}},[S,C,G,N,D]);const Q=x.useMemo(()=>({reference:E,floating:b,setReference:m,setFloating:y}),[m,y]),$=x.useMemo(()=>({reference:S,floating:C}),[S,C]),_=x.useMemo(()=>{const k={position:n,left:0,top:0};if(!$.floating)return k;const R=Mp($.floating,c.x),j=Mp($.floating,c.y);return a?{...k,transform:"translate("+R+"px, "+j+"px)",...b0($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:j}},[n,a,$.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:G,refs:Q,elements:$,floatingStyles:_}),[c,G,Q,$,_])}const Kb=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Rp({element:r.current,padding:i}).fn(n):{}:r?Rp({element:r,padding:i}).fn(n):{}}}},Gb=(e,t)=>({...Ib(e),options:[e,t]}),Qb=(e,t)=>({...Fb(e),options:[e,t]}),Yb=(e,t)=>({...zb(e),options:[e,t]}),Xb=(e,t)=>({..._b(e),options:[e,t]}),qb=(e,t)=>({...Vb(e),options:[e,t]}),Zb=(e,t)=>({...Bb(e),options:[e,t]}),Jb=(e,t)=>({...Kb(e),options:[e,t]});var eP="Arrow",P0=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return T.jsx(tt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});P0.displayName=eP;var tP=P0;function nP(e){const[t,n]=x.useState(void 0);return Zn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var k0="Popper",[A0,R0]=dl(k0),[HN,M0]=A0(k0),N0="PopperAnchor",D0=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=M0(N0,n),s=x.useRef(null),a=It(t,s);return x.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:T.jsx(tt.div,{...i,ref:a})});D0.displayName=N0;var df="PopperContent",[rP,iP]=A0(df),L0=x.forwardRef((e,t)=>{var ee,Fr,vn,ar,wn,_r;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,w=M0(df,n),[p,m]=x.useState(null),y=It(t,xn=>m(xn)),[S,C]=x.useState(null),E=nP(S),b=(E==null?void 0:E.width)??0,P=(E==null?void 0:E.height)??0,D=r+(o!=="center"?"-"+o:""),N=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},V=Array.isArray(u)?u:[u],I=V.length>0,G={padding:N,boundary:V.filter(sP),altBoundary:I},{refs:O,floatingStyles:Q,placement:$,isPositioned:_,middlewareData:k}=Hb({strategy:"fixed",placement:D,whileElementsMounted:(...xn)=>jb(...xn,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[Gb({mainAxis:i+P,alignmentAxis:s}),l&&Qb({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Yb():void 0,...G}),l&&Xb({...G}),qb({...G,apply:({elements:xn,rects:ps,availableWidth:Al,availableHeight:ms})=>{const{width:Rl,height:Ki}=ps.reference,Vr=xn.floating.style;Vr.setProperty("--radix-popper-available-width",`${Al}px`),Vr.setProperty("--radix-popper-available-height",`${ms}px`),Vr.setProperty("--radix-popper-anchor-width",`${Rl}px`),Vr.setProperty("--radix-popper-anchor-height",`${Ki}px`)}}),S&&Jb({element:S,padding:a}),aP({arrowWidth:b,arrowHeight:P}),f&&Zb({strategy:"referenceHidden",...G})]}),[R,j]=I0($),U=qn(v);Zn(()=>{_&&(U==null||U())},[_,U]);const B=(ee=k.arrow)==null?void 0:ee.x,Y=(Fr=k.arrow)==null?void 0:Fr.y,q=((vn=k.arrow)==null?void 0:vn.centerOffset)!==0,[we,Ne]=x.useState();return Zn(()=>{p&&Ne(window.getComputedStyle(p).zIndex)},[p]),T.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:_?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[(ar=k.transformOrigin)==null?void 0:ar.x,(wn=k.transformOrigin)==null?void 0:wn.y].join(" "),...((_r=k.hide)==null?void 0:_r.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(rP,{scope:n,placedSide:R,onArrowChange:C,arrowX:B,arrowY:Y,shouldHideArrow:q,children:T.jsx(tt.div,{"data-side":R,"data-align":j,...g,ref:y,style:{...g.style,animation:_?void 0:"none"}})})})});L0.displayName=df;var O0="PopperArrow",oP={top:"bottom",right:"left",bottom:"top",left:"right"},j0=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=iP(O0,r),s=oP[o.placedSide];return T.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:T.jsx(tP,{...i,ref:n,style:{...i.style,display:"block"}})})});j0.displayName=O0;function sP(e){return e!==null}var aP=e=>({name:"transformOrigin",options:e,fn(t){var w,p,m;const{placement:n,rects:r,middlewareData:i}=t,s=((w=i.arrow)==null?void 0:w.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=I0(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((p=i.arrow)==null?void 0:p.x)??0)+a/2,h=(((m=i.arrow)==null?void 0:m.y)??0)+l/2;let v="",g="";return u==="bottom"?(v=s?d:`${f}px`,g=`${-l}px`):u==="top"?(v=s?d:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,g=s?d:`${h}px`):u==="left"&&(v=`${r.floating.width+l}px`,g=s?d:`${h}px`),{data:{x:v,y:g}}}});function I0(e){const[t,n="center"]=e.split("-");return[t,n]}var lP=D0,uP=L0,cP=j0,[vl,KN]=dl("Tooltip",[R0]),ff=R0(),F0="TooltipProvider",dP=700,Np="tooltip.open",[fP,_0]=vl(F0),V0=e=>{const{__scopeTooltip:t,delayDuration:n=dP,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,s=x.useRef(!0),a=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),T.jsx(fP,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:x.useCallback(u=>{a.current=u},[]),disableHoverableContent:i,children:o})};V0.displayName=F0;var B0="Tooltip",[GN,wl]=vl(B0),Rc="TooltipTrigger",hP=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=wl(Rc,n),o=_0(Rc,n),s=ff(n),a=x.useRef(null),l=It(t,a,i.onTriggerChange),u=x.useRef(!1),c=x.useRef(!1),d=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),T.jsx(lP,{asChild:!0,...s,children:T.jsx(tt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Ce(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ce(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ce(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ce(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Ce(e.onBlur,i.onClose),onClick:Ce(e.onClick,i.onClose)})})});hP.displayName=Rc;var pP="TooltipPortal",[QN,mP]=vl(pP,{forceMount:void 0}),Li="TooltipContent",z0=x.forwardRef((e,t)=>{const n=mP(Li,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=wl(Li,e.__scopeTooltip);return T.jsx(qd,{present:r||s.open,children:s.disableHoverableContent?T.jsx($0,{side:i,...o,ref:t}):T.jsx(gP,{side:i,...o,ref:t})})}),gP=x.forwardRef((e,t)=>{const n=wl(Li,e.__scopeTooltip),r=_0(Li,e.__scopeTooltip),i=x.useRef(null),o=It(t,i),[s,a]=x.useState(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=x.useCallback(()=>{a(null),d(!1)},[d]),h=x.useCallback((v,g)=>{const w=v.currentTarget,p={x:v.clientX,y:v.clientY},m=SP(p,w.getBoundingClientRect()),y=TP(p,m),S=CP(g.getBoundingClientRect()),C=bP([...y,...S]);a(C),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&c){const v=w=>h(w,c),g=w=>h(w,l);return l.addEventListener("pointerleave",v),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",g)}}},[l,c,h,f]),x.useEffect(()=>{if(s){const v=g=>{const w=g.target,p={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),y=!EP(p,s);m?f():y&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,c,s,u,f]),T.jsx($0,{...e,ref:o})}),[yP,vP]=vl(B0,{isInside:!1}),wP=DT("TooltipContent"),$0=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,l=wl(Li,n),u=ff(n),{onClose:c}=l;return x.useEffect(()=>(document.addEventListener(Np,c),()=>document.removeEventListener(Np,c)),[c]),x.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),T.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:T.jsxs(uP,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[T.jsx(wP,{children:r}),T.jsx(yP,{scope:n,isInside:!0,children:T.jsx(rC,{id:l.contentId,role:"tooltip",children:i||r})})]})})});z0.displayName=Li;var U0="TooltipArrow",xP=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ff(n);return vP(U0,n).isInside?null:T.jsx(cP,{...i,...r,ref:t})});xP.displayName=U0;function SP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function TP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function CP(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function EP(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;or!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(i=!i)}return i}function bP(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),PP(t)}function PP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var kP=V0,W0=z0;const AP=kP,RP=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>T.jsx(W0,{ref:r,sideOffset:t,className:Ke("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));RP.displayName=W0.displayName;var xl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Sl=typeof window>"u"||"Deno"in globalThis;function At(){}function MP(e,t){return typeof e=="function"?e(t):e}function NP(e){return typeof e=="number"&&e>=0&&e!==1/0}function DP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mc(e,t){return typeof e=="function"?e(t):e}function LP(e,t){return typeof e=="function"?e(t):e}function Dp(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==hf(s,t.options))return!1}else if(!Ko(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function Lp(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ho(t.options.mutationKey)!==Ho(o))return!1}else if(!Ko(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function hf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ho)(e)}function Ho(e){return JSON.stringify(e,(t,n)=>Nc(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ko(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ko(e[n],t[n])):!1}function H0(e,t){if(e===t)return e;const n=Op(e)&&Op(t);if(n||Nc(e)&&Nc(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{},l=new Set(r);let u=0;for(let c=0;c{setTimeout(t,e)})}function jP(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?H0(e,t):t}function IP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function FP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pf=Symbol();function K0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var wr,Ln,yi,sg,_P=(sg=class extends xl{constructor(){super();J(this,wr);J(this,Ln);J(this,yi);H(this,yi,t=>{if(!Sl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,Ln)||this.setEventListener(A(this,yi))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,Ln))==null||t.call(this),H(this,Ln,void 0))}setEventListener(t){var n;H(this,yi,t),(n=A(this,Ln))==null||n.call(this),H(this,Ln,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){A(this,wr)!==t&&(H(this,wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof A(this,wr)=="boolean"?A(this,wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wr=new WeakMap,Ln=new WeakMap,yi=new WeakMap,sg),G0=new _P,vi,On,wi,ag,VP=(ag=class extends xl{constructor(){super();J(this,vi,!0);J(this,On);J(this,wi);H(this,wi,t=>{if(!Sl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,On)||this.setEventListener(A(this,wi))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,On))==null||t.call(this),H(this,On,void 0))}setEventListener(t){var n;H(this,wi,t),(n=A(this,On))==null||n.call(this),H(this,On,t(this.setOnline.bind(this)))}setOnline(t){A(this,vi)!==t&&(H(this,vi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return A(this,vi)}},vi=new WeakMap,On=new WeakMap,wi=new WeakMap,ag),Va=new VP;function BP(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function zP(e){return Math.min(1e3*2**e,3e4)}function Q0(e){return(e??"online")==="online"?Va.isOnline():!0}var Y0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function du(e){return e instanceof Y0}function X0(e){let t=!1,n=0,r=!1,i;const o=BP(),s=g=>{var w;r||(f(new Y0(g)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>G0.isFocused()&&(e.networkMode==="always"||Va.isOnline())&&e.canRun(),c=()=>Q0(e.networkMode)&&e.canRun(),d=g=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,g),i==null||i(),o.resolve(g))},f=g=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,g),i==null||i(),o.reject(g))},h=()=>new Promise(g=>{var w;i=p=>{(r||u())&&g(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;i=void 0,r||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(r)return;let g;const w=n===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(p){g=Promise.reject(p)}Promise.resolve(g).then(d).catch(p=>{var E;if(r)return;const m=e.retry??(Sl?0:3),y=e.retryDelay??zP,S=typeof y=="function"?y(n,p):y,C=m===!0||typeof m=="number"&&nu()?void 0:h()).then(()=>{t?f(p):v()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?v():h().then(v),o)}}var $P=e=>setTimeout(e,0);function UP(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=$P;const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ze=UP(),xr,lg,q0=(lg=class{constructor(){J(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),NP(this.gcTime)&&H(this,xr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sl?1/0:5*60*1e3))}clearGcTimeout(){A(this,xr)&&(clearTimeout(A(this,xr)),H(this,xr,void 0))}},xr=new WeakMap,lg),xi,Sr,ht,Tr,je,es,Cr,Rt,tn,ug,WP=(ug=class extends q0{constructor(t){super();J(this,Rt);J(this,xi);J(this,Sr);J(this,ht);J(this,Tr);J(this,je);J(this,es);J(this,Cr);H(this,Cr,!1),H(this,es,t.defaultOptions),this.setOptions(t.options),this.observers=[],H(this,Tr,t.client),H(this,ht,A(this,Tr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,H(this,xi,KP(this.options)),this.state=t.state??A(this,xi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,je))==null?void 0:t.promise}setOptions(t){this.options={...A(this,es),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,ht).remove(this)}setData(t,n){const r=jP(this.state.data,t,this.options);return De(this,Rt,tn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){De(this,Rt,tn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=A(this,je))==null?void 0:r.promise;return(i=A(this,je))==null||i.cancel(t),n?n.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,xi))}isActive(){return this.observers.some(t=>LP(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mc(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!DP(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,je))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,je))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(A(this,je)&&(A(this,Cr)?A(this,je).cancel({revert:!0}):A(this,je).cancelRetry()),this.scheduleGc()),A(this,ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Rt,tn).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,je))return A(this,je).continueRetry(),A(this,je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(H(this,Cr,!0),r.signal)})},o=()=>{const f=K0(this.options,n),v=(()=>{const g={client:A(this,Tr),queryKey:this.queryKey,meta:this.meta};return i(g),g})();return H(this,Cr,!1),this.options.persister?this.options.persister(f,v,this):f(v)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:A(this,Tr),state:this.state,fetchFn:o};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),H(this,Sr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&De(this,Rt,tn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,v,g,w;du(f)&&f.silent||De(this,Rt,tn).call(this,{type:"error",error:f}),du(f)||((v=(h=A(this,ht).config).onError)==null||v.call(h,f,this),(w=(g=A(this,ht).config).onSettled)==null||w.call(g,this.state.data,f,this)),this.scheduleGc()};return H(this,je,X0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,v,g,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(p){l(p);return}(v=(h=A(this,ht).config).onSuccess)==null||v.call(h,f,this),(w=(g=A(this,ht).config).onSettled)==null||w.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{De(this,Rt,tn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{De(this,Rt,tn).call(this,{type:"pause"})},onContinue:()=>{De(this,Rt,tn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),A(this,je).start()}},xi=new WeakMap,Sr=new WeakMap,ht=new WeakMap,Tr=new WeakMap,je=new WeakMap,es=new WeakMap,Cr=new WeakMap,Rt=new WeakSet,tn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...HP(r.data,this.options),fetchMeta:t.meta??null};case"success":return H(this,Sr,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return du(i)&&i.revert&&A(this,Sr)?{...A(this,Sr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,ht).notify({query:this,type:"updated",action:t})})},ug);function HP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Q0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function KP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var zt,cg,GP=(cg=class extends xl{constructor(t={}){super();J(this,zt);this.config=t,H(this,zt,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??hf(i,n);let s=this.get(o);return s||(s=new WP({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){A(this,zt).has(t.queryHash)||(A(this,zt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=A(this,zt).get(t.queryHash);n&&(t.destroy(),n===t&&A(this,zt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,zt).get(t)}getAll(){return[...A(this,zt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Dp(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},zt=new WeakMap,cg),$t,Ve,Er,Ut,kn,dg,QP=(dg=class extends q0{constructor(t){super();J(this,Ut);J(this,$t);J(this,Ve);J(this,Er);this.mutationId=t.mutationId,H(this,Ve,t.mutationCache),H(this,$t,[]),this.state=t.state||YP(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,$t).includes(t)||(A(this,$t).push(t),this.clearGcTimeout(),A(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){H(this,$t,A(this,$t).filter(n=>n!==t)),this.scheduleGc(),A(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,$t).length||(this.state.status==="pending"?this.scheduleGc():A(this,Ve).remove(this))}continue(){var t;return((t=A(this,Er))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,l,u,c,d,f,h,v,g,w,p,m,y,S,C,E,b,P;const n=()=>{De(this,Ut,kn).call(this,{type:"continue"})};H(this,Er,X0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,N)=>{De(this,Ut,kn).call(this,{type:"failed",failureCount:D,error:N})},onPause:()=>{De(this,Ut,kn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,Ve).canRun(this)}));const r=this.state.status==="pending",i=!A(this,Er).canStart();try{if(r)n();else{De(this,Ut,kn).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(o=A(this,Ve).config).onMutate)==null?void 0:s.call(o,t,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));N!==this.state.context&&De(this,Ut,kn).call(this,{type:"pending",context:N,variables:t,isPaused:i})}const D=await A(this,Er).start();return await((c=(u=A(this,Ve).config).onSuccess)==null?void 0:c.call(u,D,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,D,t,this.state.context)),await((v=(h=A(this,Ve).config).onSettled)==null?void 0:v.call(h,D,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,D,null,t,this.state.context)),De(this,Ut,kn).call(this,{type:"success",data:D}),D}catch(D){try{throw await((m=(p=A(this,Ve).config).onError)==null?void 0:m.call(p,D,t,this.state.context,this)),await((S=(y=this.options).onError)==null?void 0:S.call(y,D,t,this.state.context)),await((E=(C=A(this,Ve).config).onSettled)==null?void 0:E.call(C,void 0,D,this.state.variables,this.state.context,this)),await((P=(b=this.options).onSettled)==null?void 0:P.call(b,void 0,D,t,this.state.context)),D}finally{De(this,Ut,kn).call(this,{type:"error",error:D})}}finally{A(this,Ve).runNext(this)}}},$t=new WeakMap,Ve=new WeakMap,Er=new WeakMap,Ut=new WeakSet,kn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ze.batch(()=>{A(this,$t).forEach(r=>{r.onMutationUpdate(t)}),A(this,Ve).notify({mutation:this,type:"updated",action:t})})},dg);function YP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var on,Mt,ts,fg,XP=(fg=class extends xl{constructor(t={}){super();J(this,on);J(this,Mt);J(this,ts);this.config=t,H(this,on,new Set),H(this,Mt,new Map),H(this,ts,0)}build(t,n,r){const i=new QP({mutationCache:this,mutationId:++ys(this,ts)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){A(this,on).add(t);const n=Vs(t);if(typeof n=="string"){const r=A(this,Mt).get(n);r?r.push(t):A(this,Mt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,on).delete(t)){const n=Vs(t);if(typeof n=="string"){const r=A(this,Mt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&A(this,Mt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Vs(t);if(typeof n=="string"){const r=A(this,Mt).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Vs(t);if(typeof n=="string"){const i=(r=A(this,Mt).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ze.batch(()=>{A(this,on).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,on).clear(),A(this,Mt).clear()})}getAll(){return Array.from(A(this,on))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Lp(n,r))}findAll(t={}){return this.getAll().filter(n=>Lp(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(At))))}},on=new WeakMap,Mt=new WeakMap,ts=new WeakMap,fg);function Vs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ip(e){return{onFetch:(t,n)=>{var c,d,f,h,v;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],s=((v=t.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const w=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},p=K0(t.options,t.fetchOptions),m=async(y,S,C)=>{if(g)return Promise.reject();if(S==null&&y.pages.length)return Promise.resolve(y);const b=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return w(V),V})(),P=await p(b),{maxPages:D}=t.options,N=C?FP:IP;return{pages:N(y.pages,P,D),pageParams:N(y.pageParams,S,D)}};if(i&&o.length){const y=i==="backward",S=y?qP:Fp,C={pages:o,pageParams:s},E=S(r,C);a=await m(C,E,y)}else{const y=e??o.length;do{const S=l===0?s[0]??r.initialPageParam:Fp(r,a);if(l>0&&S==null)break;a=await m(a,S),l++}while(l{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Fp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qP(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var pe,jn,In,Si,Ti,Fn,Ci,Ei,hg,ZP=(hg=class{constructor(e={}){J(this,pe);J(this,jn);J(this,In);J(this,Si);J(this,Ti);J(this,Fn);J(this,Ci);J(this,Ei);H(this,pe,e.queryCache||new GP),H(this,jn,e.mutationCache||new XP),H(this,In,e.defaultOptions||{}),H(this,Si,new Map),H(this,Ti,new Map),H(this,Fn,0)}mount(){ys(this,Fn)._++,A(this,Fn)===1&&(H(this,Ci,G0.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,pe).onFocus())})),H(this,Ei,Va.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,pe).onOnline())})))}unmount(){var e,t;ys(this,Fn)._--,A(this,Fn)===0&&((e=A(this,Ci))==null||e.call(this),H(this,Ci,void 0),(t=A(this,Ei))==null||t.call(this),H(this,Ei,void 0))}isFetching(e){return A(this,pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,jn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,pe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=A(this,pe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Mc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return A(this,pe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=A(this,pe).get(r.queryHash),o=i==null?void 0:i.state.data,s=MP(t,o);if(s!==void 0)return A(this,pe).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>A(this,pe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,pe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=A(this,pe);ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=A(this,pe);return ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ze.batch(()=>A(this,pe).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(At).catch(At)}invalidateQueries(e,t={}){return ze.batch(()=>(A(this,pe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ze.batch(()=>A(this,pe).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(At)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(At)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=A(this,pe).build(this,t);return n.isStaleByTime(Mc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e.behavior=Ip(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e.behavior=Ip(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Va.isOnline()?A(this,jn).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,pe)}getMutationCache(){return A(this,jn)}getDefaultOptions(){return A(this,In)}setDefaultOptions(e){H(this,In,e)}setQueryDefaults(e,t){A(this,Si).set(Ho(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,Si).values()],n={};return t.forEach(r=>{Ko(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){A(this,Ti).set(Ho(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,Ti).values()],n={};return t.forEach(r=>{Ko(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,In).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,In).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,pe).clear(),A(this,jn).clear()}},pe=new WeakMap,jn=new WeakMap,In=new WeakMap,Si=new WeakMap,Ti=new WeakMap,Fn=new WeakMap,Ci=new WeakMap,Ei=new WeakMap,hg),JP=x.createContext(void 0),ek=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(JP.Provider,{value:e,children:t}));/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Z0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nk(){return Math.random().toString(36).substr(2,8)}function Vp(e,t){return{usr:e.state,key:e.key,idx:t}}function Dc(e,t,n,r){return n===void 0&&(n=null),Ba({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Tl(t):t,{state:n,key:t&&t.key||r||nk()})}function J0(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Tl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function rk(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Bn.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(Ba({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Bn.Pop;let w=c(),p=w==null?null:w-u;u=w,l&&l({action:a,location:g.location,delta:p})}function f(w,p){a=Bn.Push;let m=Dc(g.location,w,p);u=c()+1;let y=Vp(m,u),S=g.createHref(m);try{s.pushState(y,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}o&&l&&l({action:a,location:g.location,delta:1})}function h(w,p){a=Bn.Replace;let m=Dc(g.location,w,p);u=c();let y=Vp(m,u),S=g.createHref(m);s.replaceState(y,"",S),o&&l&&l({action:a,location:g.location,delta:0})}function v(w){let p=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof w=="string"?w:J0(w);return m=m.replace(/ $/,"%20"),et(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let g={get action(){return a},get location(){return e(i,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(_p,d),l=w,()=>{i.removeEventListener(_p,d),l=null}},createHref(w){return t(i,w)},createURL:v,encodeLocation(w){let p=v(w);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:f,replace:h,go(w){return s.go(w)}};return g}var Bp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Bp||(Bp={}));function ik(e,t,n){return n===void 0&&(n="/"),ok(e,t,n,!1)}function ok(e,t,n,r){let i=typeof t=="string"?Tl(t):t,o=nw(i.pathname||"/",n);if(o==null)return null;let s=ew(e);sk(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(et(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=mi([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ew(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:hk(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of tw(o.path))i(o,s,l)}),t}function tw(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=tw(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function sk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:pk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ak=/^:[\w-]+$/,lk=3,uk=2,ck=1,dk=10,fk=-2,zp=e=>e==="*";function hk(e,t){let n=e.split("/"),r=n.length;return n.some(zp)&&(r+=fk),t&&(r+=uk),n.filter(i=>!zp(i)).reduce((i,o)=>i+(ak.test(o)?lk:o===""?ck:dk),r)}function pk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function mk(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const v=a[d];return h&&!v?u[f]=void 0:u[f]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function gk(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Z0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function yk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Z0(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function nw(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const mi=e=>e.join("/").replace(/\/\/+/g,"/"),vk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function wk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rw=["post","put","patch","delete"];new Set(rw);const xk=["get",...rw];new Set(xk);/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},w,{params:Object.assign({},a,w.params),pathname:mi([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:mi([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&g?x.createElement(Cl.Provider,{value:{location:za({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Bn.Pop}},g):g}function Pk(){let e=Ok(),t=wk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const kk=x.createElement(Pk,null);class Ak extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(El.Provider,{value:this.props.routeContext},x.createElement(ow.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Rk(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(Sk);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(El.Provider,{value:t},r)}function Mk(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||et(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let h,v=!1,g=null,w=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||kk,l&&(u<0&&f===0?(v=!0,w=null):u===f&&(v=!0,w=d.route.hydrateFallbackElement||null)));let p=t.concat(s.slice(0,f+1)),m=()=>{let y;return h?y=g:v?y=w:d.route.Component?y=x.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=c,x.createElement(Rk,{match:d,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?x.createElement(Ak,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Lc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Lc||{});function Nk(e){let t=x.useContext(Tk);return t||et(!1),t}function Dk(e){let t=x.useContext(El);return t||et(!1),t}function Lk(e){let t=Dk(),n=t.matches[t.matches.length-1];return n.route.id||et(!1),n.route.id}function Ok(){var e;let t=x.useContext(ow),n=Nk(Lc.UseRouteError),r=Lk(Lc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function jk(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function sw(e){et(!1)}function Ik(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Bn.Pop,navigator:o,static:s=!1,future:a}=e;mf()&&et(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:o,static:s,future:za({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Tl(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:v="default"}=r,g=x.useMemo(()=>{let w=nw(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:v},navigationType:i}},[l,c,d,f,h,v,i]);return g==null?null:x.createElement(iw.Provider,{value:u},x.createElement(Cl.Provider,{children:n,value:g}))}function Fk(e){let{children:t,location:n}=e;return Ek(Oc(t),n)}new Promise(()=>{});function Oc(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,Oc(r.props.children,o));return}r.type!==sw&&et(!1),!r.props.index||!r.props.children||et(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Oc(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const _k="6";try{window.__reactRouterVersion=_k}catch{}const Vk="startTransition",Up=bg[Vk];function Bk(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=tk({window:i,v5Compat:!0}));let s=o.current,[a,l]=x.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=x.useCallback(d=>{u&&Up?Up(()=>l(d)):l(d)},[l,u]);return x.useLayoutEffect(()=>s.listen(c),[s,c]),x.useEffect(()=>jk(r),[r]),x.createElement(Ik,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var Wp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wp||(Wp={}));var Hp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hp||(Hp={}));const aw=x.createContext({});function zk(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const gf=typeof window<"u",$k=gf?x.useLayoutEffect:x.useEffect,yf=x.createContext(null);function vf(e,t){e.indexOf(t)===-1&&e.push(t)}function wf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const mn=(e,t,n)=>n>t?t:n{};const gn={},lw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function uw(e){return typeof e=="object"&&e!==null}const cw=e=>/^0[^.\s]+$/u.test(e);function xf(e){let t;return()=>(t===void 0&&(t=e()),t)}const vt=e=>e,Uk=(e,t)=>n=>t(e(n)),cs=(...e)=>e.reduce(Uk),Go=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Sf{constructor(){this.subscriptions=[]}add(t){return vf(this.subscriptions,t),()=>wf(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;oe*1e3,Xt=e=>e/1e3;function dw(e,t){return t?e*(1e3/t):0}const fw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Wk=1e-7,Hk=12;function Kk(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=fw(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Wk&&++aKk(o,0,1,e,n);return o=>o===0||o===1?o:fw(i(o),t,r)}const hw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pw=e=>t=>1-e(1-t),mw=ds(.33,1.53,.69,.99),Tf=pw(mw),gw=hw(Tf),yw=e=>(e*=2)<1?.5*Tf(e):.5*(2-Math.pow(2,-10*(e-1))),Cf=e=>1-Math.sin(Math.acos(e)),vw=pw(Cf),ww=hw(Cf),Gk=ds(.42,0,1,1),Qk=ds(0,0,.58,1),xw=ds(.42,0,.58,1),Yk=e=>Array.isArray(e)&&typeof e[0]!="number",Sw=e=>Array.isArray(e)&&typeof e[0]=="number",Kp={linear:vt,easeIn:Gk,easeInOut:xw,easeOut:Qk,circIn:Cf,circInOut:ww,circOut:vw,backIn:Tf,backInOut:gw,backOut:mw,anticipate:yw},Xk=e=>typeof e=="string",Gp=e=>{if(Sw(e)){$a(e.length===4);const[t,n,r,i]=e;return ds(t,n,r,i)}else if(Xk(e))return $a(Kp[e]!==void 0),Kp[e];return e},Bs=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Qp={value:null,addProjectionMetrics:null};function qk(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){s.has(d)&&(c.schedule(d),e()),l++,d(a)}const c={schedule:(d,f=!1,h=!1)=>{const g=h&&i?n:r;return f&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(a=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&Qp.value&&Qp.value.frameloop[t].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(d))}};return c}const Zk=40;function Tw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Bs.reduce((y,S)=>(y[S]=qk(o,t?S:void 0),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:v}=s,g=()=>{const y=gn.useManualTiming?i.timestamp:performance.now();n=!1,gn.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,Zk),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),v.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},w=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:Bs.reduce((y,S)=>{const C=s[S];return y[S]=(E,b=!1,P=!1)=>(n||w(),C.schedule(E,b,P)),y},{}),cancel:y=>{for(let S=0;S(sa===void 0&&Xe.set(Ae.isProcessing||gn.useManualTiming?Ae.timestamp:performance.now()),sa),set:e=>{sa=e,queueMicrotask(Jk)}},Cw=e=>t=>typeof t=="string"&&t.startsWith(e),Ef=Cw("--"),eA=Cw("var(--"),bf=e=>eA(e)?tA.test(e.split("/*")[0].trim()):!1,tA=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$i={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qo={...$i,transform:e=>mn(0,1,e)},zs={...$i,default:1},So=e=>Math.round(e*1e5)/1e5,Pf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function nA(e){return e==null}const rA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kf=(e,t)=>n=>!!(typeof n=="string"&&rA.test(n)&&n.startsWith(e)||t&&!nA(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ew=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Pf);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},iA=e=>mn(0,255,e),hu={...$i,transform:e=>Math.round(iA(e))},yr={test:kf("rgb","red"),parse:Ew("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+hu.transform(e)+", "+hu.transform(t)+", "+hu.transform(n)+", "+So(Qo.transform(r))+")"};function oA(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 jc={test:kf("#"),parse:oA,transform:yr.transform},fs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),An=fs("deg"),qt=fs("%"),z=fs("px"),sA=fs("vh"),aA=fs("vw"),Yp={...qt,parse:e=>qt.parse(e)/100,transform:e=>qt.transform(e*100)},ni={test:kf("hsl","hue"),parse:Ew("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qt.transform(So(t))+", "+qt.transform(So(n))+", "+So(Qo.transform(r))+")"},xe={test:e=>yr.test(e)||jc.test(e)||ni.test(e),parse:e=>yr.test(e)?yr.parse(e):ni.test(e)?ni.parse(e):jc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?yr.transform(e):ni.transform(e),getAnimatableNone:e=>{const t=xe.parse(e);return t.alpha=0,xe.transform(t)}},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Pf))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const bw="number",Pw="color",cA="var",dA="var(",Xp="${}",fA=/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 Yo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(fA,l=>(xe.test(l)?(r.color.push(o),i.push(Pw),n.push(xe.parse(l))):l.startsWith(dA)?(r.var.push(o),i.push(cA),n.push(l)):(r.number.push(o),i.push(bw),n.push(parseFloat(l))),++o,Xp)).split(Xp);return{values:n,split:a,indexes:r,types:i}}function kw(e){return Yo(e).values}function Aw(e){const{split:t,types:n}=Yo(e),r=t.length;return i=>{let o="";for(let s=0;stypeof e=="number"?0:xe.test(e)?xe.getAnimatableNone(e):e;function pA(e){const t=kw(e);return Aw(e)(t.map(hA))}const nr={test:uA,parse:kw,createTransformer:Aw,getAnimatableNone:pA};function pu(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 mA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=pu(l,a,e+1/3),o=pu(l,a,e),s=pu(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Ua(e,t){return n=>n>0?t:e}const de=(e,t,n)=>e+(t-e)*n,mu=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},gA=[jc,yr,ni],yA=e=>gA.find(t=>t.test(e));function qp(e){const t=yA(e);if(!t)return!1;let n=t.parse(e);return t===ni&&(n=mA(n)),n}const Zp=(e,t)=>{const n=qp(e),r=qp(t);if(!n||!r)return Ua(e,t);const i={...n};return o=>(i.red=mu(n.red,r.red,o),i.green=mu(n.green,r.green,o),i.blue=mu(n.blue,r.blue,o),i.alpha=de(n.alpha,r.alpha,o),yr.transform(i))},Ic=new Set(["none","hidden"]);function vA(e,t){return Ic.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function wA(e,t){return n=>de(e,t,n)}function Af(e){return typeof e=="number"?wA:typeof e=="string"?bf(e)?Ua:xe.test(e)?Zp:TA:Array.isArray(e)?Rw:typeof e=="object"?xe.test(e)?Zp:xA:Ua}function Rw(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>Af(o)(o,t[s]));return o=>{for(let s=0;s{for(const o in r)n[o]=r[o](i);return n}}function SA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=nr.createTransformer(t),r=Yo(e),i=Yo(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?Ic.has(e)&&!i.values.length||Ic.has(t)&&!r.values.length?vA(e,t):cs(Rw(SA(r,i),i.values),n):Ua(e,t)};function Mw(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?de(e,t,n):Af(e)(e,t)}const CA=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ue.update(t,n),stop:()=>tr(t),now:()=>Ae.isProcessing?Ae.timestamp:Xe.now()}},Nw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o=Wa?1/0:t}function EA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Rf(r),Wa);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:Xt(i)}}const bA=5;function Dw(e,t,n){const r=Math.max(t-bA,0);return dw(n-e(r),t-r)}const me={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},gu=.001;function PA({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let i,o,s=1-t;s=mn(me.minDamping,me.maxDamping,s),e=mn(me.minDuration,me.maxDuration,Xt(e)),s<1?(i=u=>{const c=u*s,d=c*e,f=c-n,h=Fc(u,s),v=Math.exp(-d);return gu-f/h*v},o=u=>{const d=u*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,v=Math.exp(-d),g=Fc(Math.pow(u,2),s);return(-i(u)+gu>0?-1:1)*((f-h)*v)/g}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-gu+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=AA(i,o,a);if(e=Yt(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const kA=12;function AA(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function NA(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!Jp(e,MA)&&Jp(e,RA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*mn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:me.mass,stiffness:i,damping:o}}else{const n=PA(e);t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function Ha(e=me.visualDuration,t=me.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],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=NA({...n,velocity:-Xt(n.velocity||0)}),v=f||0,g=u/(2*Math.sqrt(l*c)),w=s-o,p=Xt(Math.sqrt(l/c)),m=Math.abs(w)<5;r||(r=m?me.restSpeed.granular:me.restSpeed.default),i||(i=m?me.restDelta.granular:me.restDelta.default);let y;if(g<1){const C=Fc(p,g);y=E=>{const b=Math.exp(-g*p*E);return s-b*((v+g*p*w)/C*Math.sin(C*E)+w*Math.cos(C*E))}}else if(g===1)y=C=>s-Math.exp(-p*C)*(w+(v+p*w)*C);else{const C=p*Math.sqrt(g*g-1);y=E=>{const b=Math.exp(-g*p*E),P=Math.min(C*E,300);return s-b*((v+g*p*w)*Math.sinh(P)+C*w*Math.cosh(P))/C}}const S={calculatedDuration:h&&d||null,next:C=>{const E=y(C);if(h)a.done=C>=d;else{let b=C===0?v:0;g<1&&(b=C===0?Yt(v):Dw(y,C,E));const P=Math.abs(b)<=r,D=Math.abs(s-E)<=i;a.done=P&&D}return a.value=a.done?s:E,a},toString:()=>{const C=Math.min(Rf(S),Wa),E=Nw(b=>S.next(C*b).value,C,30);return C+"ms "+E},toTransition:()=>{}};return S}Ha.applyToOptions=e=>{const t=EA(e,100,Ha);return e.ease=t.ease,e.duration=Yt(t.duration),e.type="keyframes",e};function _c({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=P=>a!==void 0&&Pl,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)-g*Math.exp(-P/r),y=P=>p+m(P),S=P=>{const D=m(P),N=y(P);f.done=Math.abs(D)<=u,f.value=f.done?p:N};let C,E;const b=P=>{h(f.value)&&(C=P,E=Ha({keyframes:[f.value,v(f.value)],velocity:Dw(y,P,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return b(0),{calculatedDuration:null,next:P=>{let D=!1;return!E&&C===void 0&&(D=!0,S(P),b(P)),C!==void 0&&P>=C?E.next(P-C):(!D&&S(P),f)}}}function DA(e,t,n){const r=[],i=n||gn.mix||Mw,o=e.length-1;for(let s=0;st[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=DA(t,r,i),l=a.length,u=c=>{if(s&&c1)for(;du(mn(e[0],e[o-1],c)):u}function OA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Go(0,t,r);e.push(de(n,1,i))}}function jA(e){const t=[0];return OA(t,e.length-1),t}function IA(e,t){return e.map(n=>n*t)}function FA(e,t){return e.map(()=>t||xw).splice(0,e.length-1)}function To({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Yk(r)?r.map(Gp):Gp(r),o={done:!1,value:t[0]},s=IA(n&&n.length===t.length?n:jA(t),e),a=LA(s,t,{ease:Array.isArray(i)?i:FA(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const _A=e=>e!==null;function Mf(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(_A),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const VA={decay:_c,inertia:_c,tween:To,keyframes:To,spring:Ha};function Lw(e){typeof e.type=="string"&&(e.type=VA[e.type])}class Nf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const BA=e=>e/100;class Df extends Nf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Xe.now()&&this.tick(Xe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Lw(t);const{type:n=To,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const l=n||To;l!==To&&typeof a[0]!="number"&&(this.mixKeyframes=cs(BA,Mw(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Rf(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:v,onUpdate:g,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,S=r;if(d){const P=Math.min(this.currentTime,i)/a;let D=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&D--,D=Math.min(D,d+1),!!(D%2)&&(f==="reverse"?(N=1-N,h&&(N-=h/a)):f==="mirror"&&(S=s)),y=mn(0,1,N)*a}const C=m?{done:!1,value:c[0]}:S.next(y);o&&(C.value=o(C.value));let{done:E}=C;!m&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const b=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return b&&v!==_c&&(C.value=Mf(c,this.options,w,this.speed)),g&&g(C.value),b&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Xt(this.calculatedDuration)}get time(){return Xt(this.currentTime)}set time(t){var n;t=Yt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Xe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Xt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=CA,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Xe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function zA(e){for(let t=1;te*180/Math.PI,Vc=e=>{const t=vr(Math.atan2(e[1],e[0]));return Bc(t)},$A={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vc,rotateZ:Vc,skewX:e=>vr(Math.atan(e[1])),skewY:e=>vr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bc=e=>(e=e%360,e<0&&(e+=360),e),em=Vc,tm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),UA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tm,scaleY:nm,scale:e=>(tm(e)+nm(e))/2,rotateX:e=>Bc(vr(Math.atan2(e[6],e[5]))),rotateY:e=>Bc(vr(Math.atan2(-e[2],e[0]))),rotateZ:em,rotate:em,skewX:e=>vr(Math.atan(e[4])),skewY:e=>vr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function zc(e){return e.includes("scale")?1:0}function $c(e,t){if(!e||e==="none")return zc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=UA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=$A,i=a}if(!i)return zc(t);const o=r[t],s=i[1].split(",").map(HA);return typeof o=="function"?o(s):s[o]}const WA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $c(n,t)};function HA(e){return parseFloat(e.trim())}const Ui=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wi=new Set(Ui),rm=e=>e===$i||e===z,KA=new Set(["x","y","z"]),GA=Ui.filter(e=>!KA.has(e));function QA(e){const t=[];return GA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const kr={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:(e,{transform:t})=>$c(t,"x"),y:(e,{transform:t})=>$c(t,"y")};kr.translateX=kr.x;kr.translateY=kr.y;const Ar=new Set;let Uc=!1,Wc=!1,Hc=!1;function Ow(){if(Wc){const e=Array.from(Ar).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=QA(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,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Wc=!1,Uc=!1,Ar.forEach(e=>e.complete(Hc)),Ar.clear()}function jw(){Ar.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wc=!0)})}function YA(){Hc=!0,jw(),Ow(),Hc=!1}class Lf{constructor(t,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Ar.add(this),Uc||(Uc=!0,ue.read(jw),ue.resolveKeyframes(Ow))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}zA(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ar.delete(this)}cancel(){this.state==="scheduled"&&(Ar.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const XA=e=>e.startsWith("--");function qA(e,t,n){XA(t)?e.style.setProperty(t,n):e.style[t]=n}const ZA=xf(()=>window.ScrollTimeline!==void 0),JA={};function eR(e,t){const n=xf(e);return()=>JA[t]??n()}const Iw=eR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),uo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,im={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uo([0,.65,.55,1]),circOut:uo([.55,0,1,.45]),backIn:uo([.31,.01,.66,-.59]),backOut:uo([.33,1.53,.69,.99])};function Fw(e,t){if(e)return typeof e=="function"?Iw()?Nw(e,t):"ease-out":Sw(e)?uo(e):Array.isArray(e)?e.map(n=>Fw(n,t)||im.easeOut):im[e]}function tR(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Fw(a,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function _w(e){return typeof e=="function"&&"applyToOptions"in e}function nR({type:e,...t}){return _w(e)&&Iw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class rR extends Nf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,$a(typeof t.type!="string");const u=nR(t);this.animation=tR(n,r,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Mf(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):qA(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Xt(Number(t))}get time(){return Xt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Yt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ZA()?(this.animation.timeline=t,vt):n(this)}}const Vw={anticipate:yw,backInOut:gw,circInOut:ww};function iR(e){return e in Vw}function oR(e){typeof e.ease=="string"&&iR(e.ease)&&(e.ease=Vw[e.ease])}const om=10;class sR extends rR{constructor(t){oR(t),Lw(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Df({...s,autoplay:!1}),l=Yt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-om).value,a.sample(l).value,om),a.stop()}}const sm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nr.test(e)||e==="0")&&!e.startsWith("url("));function aR(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function dR(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return cR()&&n&&uR.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const fR=40;class hR extends Nf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var v;super(),this.stop=()=>{var g,w;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=Xe.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||Lf;this.keyframeResolver=new h(a,(g,w,p)=>this.onKeyframesResolved(g,w,f,!p),l,u,c),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Xe.now(),lR(t,o,s,a)||((gn.instantAnimations||!l)&&(c==null||c(Mf(t,r,n))),t[0]=t[t.length-1],Kc(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>fR?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&dR(f)?new sR({...f,element:f.motionValue.owner.current}):new Df(f);h.finished.then(()=>this.notifyFinished()).catch(vt),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),YA()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const pR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mR(e){const t=pR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Bw(e,t,n=1){const[r,i]=mR(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return lw(s)?parseFloat(s):s}return bf(i)?Bw(i,t,n+1):i}function Of(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const zw=new Set(["width","height","top","left","right","bottom",...Ui]),gR={test:e=>e==="auto",parse:e=>e},$w=e=>t=>t.test(e),Uw=[$i,z,qt,An,aA,sA,gR],am=e=>Uw.find($w(e));function yR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cw(e):!0}const vR=new Set(["brightness","contrast","saturate","opacity"]);function wR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Pf)||[];if(!r)return e;const i=n.replace(r,"");let o=vR.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const xR=/\b([a-z-]*)\(.*?\)/gu,Gc={...nr,getAnimatableNone:e=>{const t=e.match(xR);return t?t.map(wR).join(" "):e}},lm={...$i,transform:Math.round},SR={rotate:An,rotateX:An,rotateY:An,rotateZ:An,scale:zs,scaleX:zs,scaleY:zs,scaleZ:zs,skew:An,skewX:An,skewY:An,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Qo,originX:Yp,originY:Yp,originZ:z},jf={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,backgroundPositionX:z,backgroundPositionY:z,...SR,zIndex:lm,fillOpacity:Qo,strokeOpacity:Qo,numOctaves:lm},TR={...jf,color:xe,backgroundColor:xe,outlineColor:xe,fill:xe,stroke:xe,borderColor:xe,borderTopColor:xe,borderRightColor:xe,borderBottomColor:xe,borderLeftColor:xe,filter:Gc,WebkitFilter:Gc},Ww=e=>TR[e];function Hw(e,t){let n=Ww(e);return n!==Gc&&(n=nr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const CR=new Set(["auto","none","0"]);function ER(e,t,n){let r=0,i;for(;r{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function PR(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Kw=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function kR(e){return uw(e)&&"offsetHeight"in e}const um=30,AR=e=>!isNaN(parseFloat(e));class RR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Xe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Xe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=AR(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 Sf);const r=this.events[t].add(n);return t==="change"?()=>{r(),ue.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Xe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>um)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,um);return dw(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Oi(e,t){return new RR(e,t)}const{schedule:If,cancel:YN}=Tw(queueMicrotask,!1),Pt={x:!1,y:!1};function Gw(){return Pt.x||Pt.y}function MR(e){return e==="x"||e==="y"?Pt[e]?null:(Pt[e]=!0,()=>{Pt[e]=!1}):Pt.x||Pt.y?null:(Pt.x=Pt.y=!0,()=>{Pt.x=Pt.y=!1})}function Qw(e,t){const n=PR(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function cm(e){return!(e.pointerType==="touch"||Gw())}function NR(e,t,n={}){const[r,i,o]=Qw(e,n),s=a=>{if(!cm(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{cm(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Yw=(e,t)=>t?e===t?!0:Yw(e,t.parentElement):!1,Ff=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,DR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function LR(e){return DR.has(e.tagName)||e.tabIndex!==-1}const aa=new WeakSet;function dm(e){return t=>{t.key==="Enter"&&e(t)}}function yu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const OR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=dm(()=>{if(aa.has(n))return;yu(n,"down");const i=dm(()=>{yu(n,"up")}),o=()=>yu(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 fm(e){return Ff(e)&&!Gw()}function jR(e,t,n={}){const[r,i,o]=Qw(e,n),s=a=>{const l=a.currentTarget;if(!fm(a))return;aa.add(l);const u=t(l,a),c=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),aa.has(l)&&aa.delete(l),fm(h)&&typeof u=="function"&&u(h,{success:v})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||Yw(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),kR(a)&&(a.addEventListener("focus",u=>OR(u,i)),!LR(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Xw(e){return uw(e)&&"ownerSVGElement"in e}function IR(e){return Xw(e)&&e.tagName==="svg"}const Fe=e=>!!(e&&e.getVelocity),FR=[...Uw,xe,nr],_R=e=>FR.find($w(e)),qw=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function VR(e=!0){const t=x.useContext(yf);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=x.useId();x.useEffect(()=>{if(e)return i(o)},[e]);const s=x.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const Zw=x.createContext({strict:!1}),hm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ji={};for(const e in hm)ji[e]={isEnabled:t=>hm[e].some(n=>!!t[n])};function BR(e){for(const t in e)ji[t]={...ji[t],...e[t]}}const zR=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 Ka(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zR.has(e)}let Jw=e=>!Ka(e);function $R(e){typeof e=="function"&&(Jw=t=>t.startsWith("on")?!Ka(t):e(t))}try{$R(require("@emotion/is-prop-valid").default)}catch{}function UR(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Jw(i)||n===!0&&Ka(i)||!t&&!Ka(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const bl=x.createContext({});function Pl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xo(e){return typeof e=="string"||Array.isArray(e)}const _f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vf=["initial",..._f];function kl(e){return Pl(e.animate)||Vf.some(t=>Xo(e[t]))}function ex(e){return!!(kl(e)||e.variants)}function WR(e,t){if(kl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xo(n)?n:void 0,animate:Xo(r)?r:void 0}}return e.inherit!==!1?t:{}}function HR(e){const{initial:t,animate:n}=WR(e,x.useContext(bl));return x.useMemo(()=>({initial:t,animate:n}),[pm(t),pm(n)])}function pm(e){return Array.isArray(e)?e.join(" "):e}const qo={};function KR(e){for(const t in e)qo[t]=e[t],Ef(t)&&(qo[t].isCSSVariable=!0)}function tx(e,{layout:t,layoutId:n}){return Wi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qo[e]||e==="opacity")}const GR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QR=Ui.length;function YR(e,t,n){let r="",i=!0;for(let o=0;o({style:{},transform:{},transformOrigin:{},vars:{}});function nx(e,t,n){for(const r in t)!Fe(t[r])&&!tx(r,n)&&(e[r]=t[r])}function XR({transformTemplate:e},t){return x.useMemo(()=>{const n=zf();return Bf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function qR(e,t){const n=e.style||{},r={};return nx(r,n,e),Object.assign(r,XR(e,t)),r}function ZR(e,t){const n={},r=qR(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}const JR={offset:"stroke-dashoffset",array:"stroke-dasharray"},e2={offset:"strokeDashoffset",array:"strokeDasharray"};function t2(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?JR:e2;e[o.offset]=z.transform(-r);const s=z.transform(t),a=z.transform(n);e[o.array]=`${s} ${a}`}function rx(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(Bf(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&t2(d,i,o,s,!1)}const ix=()=>({...zf(),attrs:{}}),ox=e=>typeof e=="string"&&e.toLowerCase()==="svg";function n2(e,t,n,r){const i=x.useMemo(()=>{const o=ix();return rx(o,t,ox(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};nx(o,e.style,e),i.style={...o,...i.style}}return i}const r2=["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 $f(e){return typeof e!="string"||e.includes("-")?!1:!!(r2.indexOf(e)>-1||/[A-Z]/u.test(e))}function i2(e,t,n,{latestValues:r},i,o=!1){const a=($f(e)?n2:ZR)(t,r,i,e),l=UR(t,typeof e=="string",o),u=e!==x.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=x.useMemo(()=>Fe(c)?c.get():c,[c]);return x.createElement(e,{...u,children:d})}function mm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Uf(e,t,n,r){if(typeof t=="function"){const[i,o]=mm(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]=mm(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function la(e){return Fe(e)?e.get():e}function o2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:s2(n,r,i,e),renderState:t()}}function s2(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=la(o[f]);let{initial:s,animate:a}=e;const l=kl(e),u=ex(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?a:s;if(d&&typeof d!="boolean"&&!Pl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h(t,n)=>{const r=x.useContext(bl),i=x.useContext(yf),o=()=>o2(e,t,r,i);return n?o():zk(o)};function Wf(e,t,n){var o;const{style:r}=e,i={};for(const s in r)(Fe(r[s])||t.style&&Fe(t.style[s])||tx(s,e)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const a2=sx({scrapeMotionValuesFromProps:Wf,createRenderState:zf});function ax(e,t,n){const r=Wf(e,t,n);for(const i in e)if(Fe(e[i])||Fe(t[i])){const o=Ui.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const l2=sx({scrapeMotionValuesFromProps:ax,createRenderState:ix}),u2=Symbol.for("motionComponentSymbol");function ri(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function c2(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ri(n)&&(n.current=r))},[t])}const Hf=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),d2="framerAppearId",lx="data-"+Hf(d2),ux=x.createContext({});function f2(e,t,n,r,i){var g,w;const{visualElement:o}=x.useContext(bl),s=x.useContext(Zw),a=x.useContext(yf),l=x.useContext(qw).reducedMotion,u=x.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=x.useContext(ux);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&h2(u.current,n,i,d);const f=x.useRef(!1);x.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[lx],v=x.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return $k(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),v.current&&c.animationState&&c.animationState.animateChanges())}),x.useEffect(()=>{c&&(!v.current&&c.animationState&&c.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),v.current=!1),c.enteringChildren=void 0)}),c}function h2(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:cx(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&ri(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function cx(e){if(e)return e.options.allowProjection!==!1?e.projection:cx(e.parent)}function vu(e,{forwardMotionProps:t=!1}={},n,r){n&&BR(n);const i=$f(e)?l2:a2;function o(a,l){let u;const c={...x.useContext(qw),...a,layoutId:p2(a)},{isStatic:d}=c,f=HR(a),h=i(a,d);if(!d&&gf){m2();const v=g2(c);u=v.MeasureLayout,f.visualElement=f2(e,h,c,r,v.ProjectionNode)}return T.jsxs(bl.Provider,{value:f,children:[u&&f.visualElement?T.jsx(u,{visualElement:f.visualElement,...c}):null,i2(e,a,c2(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=x.forwardRef(o);return s[u2]=e,s}function p2({layoutId:e}){const t=x.useContext(aw).id;return t&&e!==void 0?t+"-"+e:e}function m2(e,t){x.useContext(Zw).strict}function g2(e){const{drag:t,layout:n}=ji;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function y2(e,t){if(typeof Proxy>"u")return vu;const n=new Map,r=(o,s)=>vu(o,s,e,t),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,vu(s,void 0,e,t)),n.get(s))})}function dx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function w2(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 wu(e){return e===void 0||e===1}function Qc({scale:e,scaleX:t,scaleY:n}){return!wu(e)||!wu(t)||!wu(n)}function hr(e){return Qc(e)||fx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fx(e){return gm(e.x)||gm(e.y)}function gm(e){return e&&e!=="0%"}function Ga(e,t,n){const r=e-n,i=t*r;return n+i}function ym(e,t,n,r,i){return i!==void 0&&(e=Ga(e,i,r)),Ga(e,n,r)+t}function Yc(e,t=0,n=1,r,i){e.min=ym(e.min,t,n,r,i),e.max=ym(e.max,t,n,r,i)}function hx(e,{x:t,y:n}){Yc(e.x,t.translate,t.scale,t.originPoint),Yc(e.y,n.translate,n.scale,n.originPoint)}const vm=.999999999999,wm=1.0000000000001;function x2(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;avm&&(t.x=1),t.yvm&&(t.y=1)}function ii(e,t){e.min=e.min+t,e.max=e.max+t}function xm(e,t,n,r,i=.5){const o=de(e.min,e.max,i);Yc(e,t,n,o,r)}function oi(e,t){xm(e.x,t.x,t.scaleX,t.scale,t.originX),xm(e.y,t.y,t.scaleY,t.scale,t.originY)}function px(e,t){return dx(w2(e.getBoundingClientRect(),t))}function S2(e,t,n){const r=px(e,n),{scroll:i}=t;return i&&(ii(r.x,i.offset.x),ii(r.y,i.offset.y)),r}const Sm=()=>({translate:0,scale:1,origin:0,originPoint:0}),si=()=>({x:Sm(),y:Sm()}),Tm=()=>({min:0,max:0}),ye=()=>({x:Tm(),y:Tm()}),Xc={current:null},mx={current:!1};function T2(){if(mx.current=!0,!!gf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xc.current=e.matches;e.addEventListener("change",t),t()}else Xc.current=!1}const C2=new WeakMap;function E2(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Fe(i))e.addValue(r,i);else if(Fe(o))e.addValue(r,Oi(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,Oi(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class b2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Lf,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 f=Xe.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),mx.current||T2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xc.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),tr(this.notifyUpdate),tr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Wi.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),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 ji){const n=ji[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):ye()}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=Oi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(lw(r)||cw(r))?r=parseFloat(r):!_R(r)&&nr.test(n)&&(r=Hw(t,n)),this.setBaseTarget(t,Fe(r)?r.get():r)),Fe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Uf(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Fe(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Sf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){If.render(this.render)}}class gx extends b2{constructor(){super(...arguments),this.KeyframeResolver=bR}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;Fe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function yx(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function P2(e){return window.getComputedStyle(e)}class k2 extends gx{constructor(){super(...arguments),this.type="html",this.renderInstance=yx}readValueFromInstance(t,n){var r;if(Wi.has(n))return(r=this.projection)!=null&&r.isProjecting?zc(n):WA(t,n);{const i=P2(t),o=(Ef(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return px(t,n)}build(t,n,r){Bf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Wf(t,n,r)}}const vx=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 A2(e,t,n,r){yx(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(vx.has(i)?i:Hf(i),t.attrs[i])}class R2 extends gx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Wi.has(n)){const r=Ww(n);return r&&r.default||0}return n=vx.has(n)?n:Hf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ax(t,n,r)}build(t,n,r){rx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){A2(t,n,r,i)}mount(t){this.isSVGTag=ox(t.tagName),super.mount(t)}}const M2=(e,t)=>$f(e)?new R2(t):new k2(t,{allowProjection:e!==x.Fragment});function gi(e,t,n){const r=e.getProps();return Uf(r,t,n!==void 0?n:r.custom,e)}const qc=e=>Array.isArray(e);function N2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oi(n))}function D2(e){return qc(e)?e[e.length-1]||0:e}function L2(e,t){const n=gi(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=D2(o[s]);N2(e,s,a)}}function O2(e){return!!(Fe(e)&&e.add)}function Zc(e,t){const n=e.getValue("willChange");if(O2(n))return n.add(t);if(!n&&gn.WillChange){const r=new gn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function wx(e){return e.props[lx]}const j2=e=>e!==null;function I2(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(j2),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const F2={type:"spring",stiffness:500,damping:25,restSpeed:10},_2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),V2={type:"keyframes",duration:.8},B2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},z2=(e,{keyframes:t})=>t.length>2?V2:Wi.has(e)?e.startsWith("scale")?_2(t[1]):F2:B2;function $2({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Kf=(e,t,n,r={},i,o)=>s=>{const a=Of(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Yt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};$2(a)||Object.assign(c,z2(e,c)),c.duration&&(c.duration=Yt(c.duration)),c.repeatDelay&&(c.repeatDelay=Yt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Kc(c),c.delay===0&&(d=!0)),(gn.instantAnimations||gn.skipAnimations)&&(d=!0,Kc(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=I2(c.keyframes,a);if(f!==void 0){ue.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Df(c):new hR(c)};function U2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function xx(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(o=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&U2(u,c))continue;const h={delay:n,...Of(o||{},c)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const p=wx(e);if(p){const m=window.MotionHandoffAnimation(p,c,ue);m!==null&&(h.startTime=m,g=!0)}}Zc(e,c),d.start(Kf(c,d,f,e.shouldReduceMotion&&zw.has(c)?{type:!1}:h,e,g));const w=d.animation;w&&l.push(w)}return s&&Promise.all(l).then(()=>{ue.update(()=>{s&&L2(e,s)})}),l}function Sx(e,t,n,r=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Jc(e,t,n={}){var l;const r=gi(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(xx(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return W2(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,s]:[s,o];return u().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function W2(e,t,n=0,r=0,i=0,o=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Jc(l,t,{...s,delay:n+(typeof r=="function"?0:r)+Sx(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function H2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Jc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Jc(e,t,n);else{const i=typeof t=="function"?gi(e,t,n.custom):t;r=Promise.all(xx(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Tx(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>H2(e,n,r)))}function X2(e){let t=Y2(e),n=Em(),r=!0;const i=l=>(u,c)=>{var f;const d=gi(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:v,...g}=d;u={...u,...g,...v}}return u};function o(l){t=l(e)}function s(l){const{props:u}=e,c=Cx(e.parent)||{},d=[],f=new Set;let h={},v=1/0;for(let w=0;wv&&S,D=!1;const N=Array.isArray(y)?y:[y];let V=N.reduce(i(p),{});C===!1&&(V={});const{prevResolvedValues:I={}}=m,G={...I,...V},O=_=>{P=!0,f.has(_)&&(D=!0,f.delete(_)),m.needsAnimating[_]=!0;const k=e.getValue(_);k&&(k.liveStyle=!1)};for(const _ in G){const k=V[_],R=I[_];if(h.hasOwnProperty(_))continue;let j=!1;qc(k)&&qc(R)?j=!Tx(k,R):j=k!==R,j?k!=null?O(_):f.add(_):k!==void 0&&f.has(_)?O(_):m.protectedKeys[_]=!0}m.prevProp=y,m.prevResolvedValues=V,m.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(P=!1);const Q=E&&b;P&&(!Q||D)&&d.push(...N.map(_=>{const k={type:p};if(typeof _=="string"&&r&&!Q&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,j=gi(R,_);if(R.enteringChildren&&j){const{delayChildren:U}=j.transition||{};k.delay=Sx(R.enteringChildren,e,U)}}return{animation:_,options:k}}))}if(f.size){const w={};if(typeof u.initial!="boolean"){const p=gi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(w.transition=p.transition)}f.forEach(p=>{const m=e.getBaseTarget(p),y=e.getValue(p);y&&(y.liveStyle=!0),w[p]=m??null}),d.push({animation:w})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=s(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Em(),r=!0}}}function q2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Tx(t,e):!1}function cr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Em(){return{animate:cr(!0),whileInView:cr(),whileHover:cr(),whileTap:cr(),whileDrag:cr(),whileFocus:cr(),exit:cr()}}class sr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Z2 extends sr{constructor(t){super(t),t.animationState||(t.animationState=X2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pl(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.call(this)}}let J2=0;class eM extends sr{constructor(){super(...arguments),this.id=J2++}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,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tM={animation:{Feature:Z2},exit:{Feature:eM}};function Zo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hs(e){return{point:{x:e.pageX,y:e.pageY}}}const nM=e=>t=>Ff(t)&&e(t,hs(t));function Co(e,t,n,r){return Zo(e,t,nM(n),r)}const Ex=1e-4,rM=1-Ex,iM=1+Ex,bx=.01,oM=0-bx,sM=0+bx;function $e(e){return e.max-e.min}function aM(e,t,n){return Math.abs(e-t)<=n}function bm(e,t,n,r=.5){e.origin=r,e.originPoint=de(t.min,t.max,e.origin),e.scale=$e(n)/$e(t),e.translate=de(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rM&&e.scale<=iM||isNaN(e.scale))&&(e.scale=1),(e.translate>=oM&&e.translate<=sM||isNaN(e.translate))&&(e.translate=0)}function Eo(e,t,n,r){bm(e.x,t.x,n.x,r?r.originX:void 0),bm(e.y,t.y,n.y,r?r.originY:void 0)}function Pm(e,t,n){e.min=n.min+t.min,e.max=e.min+$e(t)}function lM(e,t,n){Pm(e.x,t.x,n.x),Pm(e.y,t.y,n.y)}function km(e,t,n){e.min=t.min-n.min,e.max=e.min+$e(t)}function bo(e,t,n){km(e.x,t.x,n.x),km(e.y,t.y,n.y)}function ft(e){return[e("x"),e("y")]}const Px=({current:e})=>e?e.ownerDocument.defaultView:null,Am=(e,t)=>Math.abs(e-t);function uM(e,t){const n=Am(e.x,t.x),r=Am(e.y,t.y);return Math.sqrt(n**2+r**2)}class kx{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){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=Su(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,v=uM(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!v)return;const{point:g}=f,{timestamp:w}=Ae;this.history.push({...g,timestamp:w});const{onStart:p,onMove:m}=this.handlers;h||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=xu(h,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:v,onSessionEnd:g,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Su(f.type==="pointercancel"?this.lastMoveEventInfo:xu(h,this.transformPagePoint),this.history);this.startEvent&&v&&v(f,p),g&&g(f,p)},!Ff(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=hs(t),l=xu(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Ae;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Su(l,this.history)),this.removeListeners=cs(Co(this.contextWindow,"pointermove",this.handlePointerMove),Co(this.contextWindow,"pointerup",this.handlePointerUp),Co(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tr(this.updatePoint)}}function xu(e,t){return t?{point:t(e.point)}:e}function Rm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Su({point:e},t){return{point:e,delta:Rm(e,Ax(t)),offset:Rm(e,cM(t)),velocity:dM(t,.1)}}function cM(e){return e[0]}function Ax(e){return e[e.length-1]}function dM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Ax(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Yt(t)));)n--;if(!r)return{x:0,y:0};const o=Xt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function fM(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?de(n,e,r.max):Math.min(e,n)),e}function Mm(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 hM(e,{top:t,left:n,bottom:r,right:i}){return{x:Mm(e.x,n,i),y:Mm(e.y,t,r)}}function Nm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Go(t.min,t.max-r,e.min):r>i&&(n=Go(e.min,e.max-i,t.min)),mn(0,1,n)}function gM(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 ed=.35;function yM(e=ed){return e===!1?e=0:e===!0&&(e=ed),{x:Dm(e,"left","right"),y:Dm(e,"top","bottom")}}function Dm(e,t,n){return{min:Lm(e,t),max:Lm(e,n)}}function Lm(e,t){return typeof e=="number"?e:e[t]||0}const vM=new WeakMap;class wM{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=ye(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hs(d).point)},s=(d,f)=>{const{drag:h,dragPropagation:v,onDragStart:g}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=MR(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ft(p=>{let m=this.getAxisMotionValue(p).get()||0;if(qt.test(m)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[p];S&&(m=$e(S)*(parseFloat(m)/100))}}this.originPoint[p]=m}),g&&ue.postRender(()=>g(d,f)),Zc(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:g,onDrag:w}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=f;if(v&&this.currentDirection===null){this.currentDirection=xM(p),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),w&&w(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ft(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new kx(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Px(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ue.postRender(()=>a(r,i))}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||!$s(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=fM(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&ri(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=hM(r.layoutBox,t):this.constraints=!1,this.elastic=yM(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ft(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=gM(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ri(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=S2(r,i.root,this.visualElement.getTransformPagePoint());let s=pM(i.layout.layoutBox,o);if(n){const a=n(v2(s));this.hasMutatedConstraints=!!a,a&&(s=dx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ft(c=>{if(!$s(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Zc(this.visualElement,t),r.start(Kf(t,r,0,n,this.visualElement,!1))}stopAnimation(){ft(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ft(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?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){ft(n=>{const{drag:r}=this.getProps();if(!$s(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-de(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ri(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ft(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=mM({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ft(s=>{if(!$s(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(de(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;vM.set(this.visualElement,this);const t=this.visualElement.current,n=Co(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ri(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const s=Zo(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ft(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=ed,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function $s(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class SM extends sr{constructor(t){super(t),this.removeGroupControls=vt,this.removeListeners=vt,this.controls=new wM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Om=e=>(t,n)=>{e&&ue.postRender(()=>e(t,n))};class TM extends sr{constructor(){super(...arguments),this.removePointerDownListener=vt}onPointerDown(t){this.session=new kx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Px(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Om(t),onStart:Om(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&ue.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Co(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 ua={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const io={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(z.test(e))e=parseFloat(e);else return e;const n=jm(e,t.target.x),r=jm(e,t.target.y);return`${n}% ${r}%`}},CM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=nr.parse(e);if(i.length>5)return r;const o=nr.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=de(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};let Tu=!1;class EM extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;KR(bM),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Tu&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ua.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Tu=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ue.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),If.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Tu=!0,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 Rx(e){const[t,n]=VR(),r=x.useContext(aw);return T.jsx(EM,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(ux),isPresent:t,safeToRemove:n})}const bM={borderRadius:{...io,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:io,borderTopRightRadius:io,borderBottomLeftRadius:io,borderBottomRightRadius:io,boxShadow:CM};function PM(e,t,n){const r=Fe(e)?e:Oi(e);return r.start(Kf("",r,t,n)),r.animation}const kM=(e,t)=>e.depth-t.depth;class AM{constructor(){this.children=[],this.isDirty=!1}add(t){vf(this.children,t),this.isDirty=!0}remove(t){wf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kM),this.isDirty=!1,this.children.forEach(t)}}function RM(e,t){const n=Xe.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(tr(r),e(o-t))};return ue.setup(r,!0),()=>tr(r)}const Mx=["TopLeft","TopRight","BottomLeft","BottomRight"],MM=Mx.length,Im=e=>typeof e=="string"?parseFloat(e):e,Fm=e=>typeof e=="number"||z.test(e);function NM(e,t,n,r,i,o){i?(e.opacity=de(0,n.opacity??1,DM(r)),e.opacityExit=de(t.opacity??1,0,LM(r))):o&&(e.opacity=de(t.opacity??1,n.opacity??1,r));for(let s=0;srt?1:n(Go(e,t,r))}function Vm(e,t){e.min=t.min,e.max=t.max}function dt(e,t){Vm(e.x,t.x),Vm(e.y,t.y)}function Bm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zm(e,t,n,r,i){return e-=t,e=Ga(e,1/n,r),i!==void 0&&(e=Ga(e,1/i,r)),e}function OM(e,t=0,n=1,r=.5,i,o=e,s=e){if(qt.test(t)&&(t=parseFloat(t),t=de(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=de(o.min,o.max,r);e===o&&(a-=t),e.min=zm(e.min,t,n,a,i),e.max=zm(e.max,t,n,a,i)}function $m(e,t,[n,r,i],o,s){OM(e,t[n],t[r],t[i],t.scale,o,s)}const jM=["x","scaleX","originX"],IM=["y","scaleY","originY"];function Um(e,t,n,r){$m(e.x,t,jM,n?n.x:void 0,r?r.x:void 0),$m(e.y,t,IM,n?n.y:void 0,r?r.y:void 0)}function Wm(e){return e.translate===0&&e.scale===1}function Dx(e){return Wm(e.x)&&Wm(e.y)}function Hm(e,t){return e.min===t.min&&e.max===t.max}function FM(e,t){return Hm(e.x,t.x)&&Hm(e.y,t.y)}function Km(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lx(e,t){return Km(e.x,t.x)&&Km(e.y,t.y)}function Gm(e){return $e(e.x)/$e(e.y)}function Qm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class _M{constructor(){this.members=[]}add(t){vf(this.members,t),t.scheduleRender()}remove(t){if(wf(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 VM(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Cu=["","X","Y","Z"],BM=1e3;let zM=0;function Eu(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ox(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ox(r)}function jx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=zM++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(WM),this.nodes.forEach(QM),this.nodes.forEach(YM),this.nodes.forEach(HM)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;ue.read(()=>{d=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=RM(f,250),ua.hasAnimatedSinceResize&&(ua.hasAnimatedSinceResize=!1,this.nodes.forEach(qm)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||eN,{onLayoutAnimationStart:g,onLayoutAnimationComplete:w}=u.getProps(),p=!this.targetLayout||!Lx(this.targetLayout,h),m=!d&&f;if(this.options.layoutRoot||this.resumeFrom||m||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Of(v,"layout"),onPlay:g,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,m)}else d||qm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tr(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(XM),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ox(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$e(this.snapshot.measuredBox.x)&&!$e(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const C=S/1e3;Zm(d.x,s.x,C),Zm(d.y,s.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ZM(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&FM(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ye()),dt(y,this.relativeTarget)),g&&(this.animationValues=c,NM(c,u,this.latestValues,C,m,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(tr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{ua.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Oi(0)),this.currentAnimation=PM(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(BM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Ix(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ye();const d=$e(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=$e(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}dt(a,l),oi(a,c),Eo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new _M),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Eu("z",s,u,this.animationValues);for(let c=0;c{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ym),this.root.sharedNodes.clear()}}}function $M(e){e.updateLayout()}function UM(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?ft(d=>{const f=s?t.measuredBox[d]:t.layoutBox[d],h=$e(f);f.min=r[d].min,f.max=f.min+h}):Ix(o,t.layoutBox,r)&&ft(d=>{const f=s?t.measuredBox[d]:t.layoutBox[d],h=$e(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=si();Eo(a,r,t.layoutBox);const l=si();s?Eo(l,e.applyTransform(i,!0),t.measuredBox):Eo(l,r,t.layoutBox);const u=!Dx(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const v=ye();bo(v,t.layoutBox,f.layoutBox);const g=ye();bo(g,r,h.layoutBox),Lx(v,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function WM(e){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 HM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KM(e){e.clearSnapshot()}function Ym(e){e.clearMeasurements()}function Xm(e){e.isLayoutDirty=!1}function GM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function QM(e){e.resolveTargetDelta()}function YM(e){e.calcProjection()}function XM(e){e.resetSkewAndRotation()}function qM(e){e.removeLeadSnapshot()}function Zm(e,t,n){e.translate=de(t.translate,0,n),e.scale=de(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jm(e,t,n,r){e.min=de(t.min,n.min,r),e.max=de(t.max,n.max,r)}function ZM(e,t,n,r){Jm(e.x,t.x,n.x,r),Jm(e.y,t.y,n.y,r)}function JM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const eN={duration:.45,ease:[.4,0,.1,1]},eg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tg=eg("applewebkit/")&&!eg("chrome/")?Math.round:vt;function ng(e){e.min=tg(e.min),e.max=tg(e.max)}function tN(e){ng(e.x),ng(e.y)}function Ix(e,t,n){return e==="position"||e==="preserve-aspect"&&!aM(Gm(t),Gm(n),.2)}function nN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const rN=jx({attachResizeListener:(e,t)=>Zo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bu={current:void 0},Fx=jx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bu.current){const e=new rN({});e.mount(window),e.setOptions({layoutScroll:!0}),bu.current=e}return bu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),iN={pan:{Feature:TM},drag:{Feature:SM,ProjectionNode:Fx,MeasureLayout:Rx}};function rg(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&&ue.postRender(()=>o(t,hs(t)))}class oN extends sr{mount(){const{current:t}=this.node;t&&(this.unmount=NR(t,(n,r)=>(rg(this.node,r,"Start"),i=>rg(this.node,i,"End"))))}unmount(){}}class sN extends sr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=cs(Zo(this.node.current,"focus",()=>this.onFocus()),Zo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ig(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ue.postRender(()=>o(t,hs(t)))}class aN extends sr{mount(){const{current:t}=this.node;t&&(this.unmount=jR(t,(n,r)=>(ig(this.node,r,"Start"),(i,{success:o})=>ig(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const td=new WeakMap,Pu=new WeakMap,lN=e=>{const t=td.get(e.target);t&&t(e)},uN=e=>{e.forEach(lN)};function cN({root:e,...t}){const n=e||document;Pu.has(n)||Pu.set(n,{});const r=Pu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uN,{root:e,...t})),r[i]}function dN(e,t,n){const r=cN(t);return td.set(e,n),r.observe(e),()=>{td.delete(e),r.unobserve(e)}}const fN={some:0,all:1};class hN extends sr{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,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:fN[i]},a=l=>{const{isIntersecting:u}=l;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:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return dN(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(pN(t,n))&&this.startObserver()}unmount(){}}function pN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const mN={inView:{Feature:hN},tap:{Feature:aN},focus:{Feature:sN},hover:{Feature:oN}},gN={layout:{ProjectionNode:Fx,MeasureLayout:Rx}},yN={...tM,...mN,...iN,...gN},Hi=y2(yN,M2),vN=tf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",netflix:"bg-primary text-primary-foreground font-bold text-lg hover:scale-105 transition-all duration-300 rounded-md","cta-primary":"cta-primary cta-pulse min-w-[280px] h-14 rounded-xl text-base font-bold tracking-wide","cta-secondary":"cta-secondary min-w-[280px] h-14 rounded-xl text-base font-semibold tracking-wide"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Jo=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?MT:"button";return T.jsx(s,{className:Ke(vN({variant:t,size:n,className:e})),ref:o,...i})});Jo.displayName="Button";const _x=({className:e="",fixed:t=!1})=>{const n=t?"fixed z-50 left-1/2 transform -translate-x-1/2":"",r=()=>{const i=document.getElementById("premium-plans-section");i&&i.scrollIntoView({behavior:"smooth",block:"start"})};return T.jsxs("div",{className:`${n} ${e} flex flex-col sm:flex-row gap-4 justify-center items-center max-w-2xl mx-auto`,children:[T.jsx("a",{href:"https://links.flixora.help/IMAPTMW",target:"_blank",rel:"noopener noreferrer",className:"w-full sm:w-auto",children:T.jsx(Jo,{variant:"cta-primary",className:"w-full group",children:T.jsxs("span",{className:"flex items-center justify-center gap-3",children:[T.jsx("span",{className:"text-xl",children:"🤖"}),T.jsx("span",{className:"font-bold",children:"ASSISTA NO ANDROID"})]})})}),T.jsx("div",{className:"w-full sm:w-auto",children:T.jsx(Jo,{variant:"cta-primary",className:"w-full group",onClick:r,children:T.jsxs("span",{className:"flex items-center justify-center gap-3",children:[T.jsx("span",{className:"text-xl",children:"📱"}),T.jsx("span",{className:"font-semibold",children:"ASSISTA NO IPHONE E NA TV"})]})})})]})},wN=()=>T.jsx("header",{className:"fixed top-0 left-0 right-0 z-40 bg-black/90 backdrop-blur-md border-b border-red-900/20",children:T.jsxs("div",{className:"container mx-auto px-6 py-4 flex items-center justify-between",children:[T.jsx("div",{className:"flex items-center space-x-3",children:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(PC,{className:"text-red-600 w-8 h-8"}),T.jsxs("span",{className:"text-2xl font-black text-white tracking-tight",children:["Filmes ",T.jsx("span",{className:"text-red-600",children:"Favoritos"})]})]})}),T.jsx("div",{className:"hidden md:block",children:T.jsx(_x,{})})]})}),xN="4f5f43495afcc67e9553f6c684a82f84",SN="https://api.themoviedb.org/3";class TN{async fetchFromTMDB(t){try{const n=await fetch(`${SN}${t}?api_key=${xN}&language=pt-BR`);if(!n.ok)throw new Error("Failed to fetch from TMDB");return await n.json()}catch(n){return console.error("TMDB API Error:",n),null}}async getTrending(){var n;const t=await this.fetchFromTMDB("/trending/movie/day");return((n=t==null?void 0:t.results)==null?void 0:n.slice(0,20))||[]}async getPopularMovies(){var n;const t=await this.fetchFromTMDB("/movie/popular");return((n=t==null?void 0:t.results)==null?void 0:n.slice(0,20))||[]}async getPopularSeries(){var n;const t=await this.fetchFromTMDB("/tv/popular");return((n=t==null?void 0:t.results)==null?void 0:n.slice(0,20))||[]}async getTopRated(){var n;const t=await this.fetchFromTMDB("/movie/top_rated");return((n=t==null?void 0:t.results)==null?void 0:n.slice(0,20))||[]}async getMovieDetails(t){const n=await this.fetchFromTMDB(`/movie/${t}`),r=await this.fetchFromTMDB(`/movie/${t}/videos`);return n?{...n,videos:r||{results:[]}}:null}async searchMovies(t){var r;if(!t.trim())return[];const n=await this.fetchFromTMDB(`/search/movie?query=${encodeURIComponent(t)}`);return((r=n==null?void 0:n.results)==null?void 0:r.slice(0,20))||[]}getImageUrl(t,n="w500"){return t?`https://image.tmdb.org/t/p/${n}${t}`:"/placeholder.svg"}getYouTubeTrailerUrl(t){const n=t.find(r=>r.site==="YouTube"&&(r.type==="Trailer"||r.type==="Teaser"));return n?`https://www.youtube.com/embed/${n.key}`:null}}const Qa=new TN,CN=()=>{const[e,t]=x.useState([]),[n,r]=x.useState(0);return x.useEffect(()=>{(async()=>{const o=await Qa.getTrending();t(o.slice(0,4))})()},[]),x.useEffect(()=>{if(e.length===0)return;const i=setInterval(()=>{r(o=>(o+1)%e.length)},5e3);return()=>clearInterval(i)},[e.length]),e.length===0?T.jsx("section",{className:"relative h-[80vh] bg-black flex items-center justify-center",children:T.jsx("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-red-600"})}):T.jsxs("section",{className:"relative h-[80vh] overflow-hidden bg-black",children:[T.jsx("div",{className:"absolute inset-0",children:e.map((i,o)=>T.jsx("div",{className:`absolute inset-0 transition-opacity duration-1000 ${o===n?"opacity-100":"opacity-0"}`,children:T.jsx("img",{src:Qa.getImageUrl(i.backdrop_path,"original"),alt:i.title,className:"w-full h-full object-cover"})},i.id))}),T.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black via-black/80 to-black/30"}),T.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-transparent to-black/50"}),T.jsx("div",{className:"relative z-10 h-full flex items-center justify-center",children:T.jsxs("div",{className:"text-center max-w-4xl mx-auto px-6",children:[T.jsxs("h1",{className:"text-6xl md:text-8xl font-black text-white mb-4 tracking-tight",children:["ASSISTA FILMES",T.jsx("span",{className:"block text-red-600 mt-2",children:"E SÉRIES"})]}),T.jsx("p",{className:"text-2xl md:text-3xl text-white mb-10 font-medium",children:"ASSISTA SEUS FILMES AGORA👇🏾"}),T.jsx("div",{className:"mb-8",children:T.jsx(_x,{})})]})}),T.jsx("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 z-20",children:T.jsx("div",{className:"flex space-x-2",children:e.map((i,o)=>T.jsx("button",{onClick:()=>r(o),className:`w-3 h-3 rounded-full transition-all duration-300 ${o===n?"bg-red-600 scale-110":"bg-white/50 hover:bg-white/70"}`},o))})})]})},EN=({size:e="md",className:t=""})=>{const n={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12"};return T.jsx("div",{className:`flex items-center justify-center ${t}`,children:T.jsx(Hi.div,{className:`${n[e]} border-2 border-accent/30 border-t-accent rounded-full`,animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}})})},bN=()=>{const[e,t]=x.useState([]),[n,r]=x.useState(!0);return x.useEffect(()=>{(async()=>{try{const o=await Qa.getTrending();t(o.slice(0,18))}catch(o){console.error("Error fetching movies:",o)}finally{r(!1)}})()},[]),n?T.jsx("section",{className:"py-16 bg-black",children:T.jsx("div",{className:"container mx-auto px-6",children:T.jsx("div",{className:"flex justify-center",children:T.jsx(EN,{})})})}):T.jsx("section",{className:"py-16 bg-black",children:T.jsxs("div",{className:"container mx-auto px-6",children:[T.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-8",children:"Em Alta Hoje"}),T.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",children:e.map(i=>T.jsx("div",{className:"group cursor-pointer transform transition-all duration-300 hover:scale-105",children:T.jsxs("div",{className:"relative overflow-hidden rounded-lg",children:[T.jsx("img",{src:Qa.getImageUrl(i.poster_path,"w500"),alt:i.title,className:"w-full h-auto object-cover aspect-[2/3] group-hover:brightness-75 transition-all duration-300",loading:"lazy"}),T.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),T.jsx("div",{className:"absolute bottom-2 left-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:T.jsx("h3",{className:"text-white text-sm font-semibold line-clamp-2",children:i.title})})]})},i.id))})]})})},PN="/assets/movies-series-professional-BXgcqP2g.jpg",kN="/assets/kids-cartoons-popular-D0bh1648.jpg",AN="/assets/sports-professional-9OwVWjhn.jpg",RN="/assets/anime-characters-professional-nLbYnBb0.jpg",MN=[{id:"movies-series",title:"Filmes e Séries imperdíveis",description:"Acompanhe suas séries favoritas e descubra novas paixões. Temporadas completas e episódios atualizados para maratonar.",image:PN},{id:"kids",title:"Canais infantis",description:"Diversão garantida para as crianças com desenhos, filmes e programação educativa para todas as idades.",image:kN},{id:"sports",title:"Esportes ao vivo",description:"Não perca um só lance! Assista a futebol, basquete, lutas e muito mais, diretamente na sua TV.",image:AN},{id:"anime",title:"Os melhores animes",description:"Para os fãs de anime, uma seleção com títulos populares e novidades. Episódios atualizados e qualidade HD para você maratonar.",image:RN}],NN=({category:e,index:t})=>T.jsx(Hi.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:t*.1},viewport:{once:!0},className:"group cursor-pointer max-w-sm mx-auto",children:T.jsxs("div",{className:"bg-gradient-to-b from-red-900/90 to-red-950/95 rounded-2xl overflow-hidden shadow-2xl border border-red-800/50 hover:shadow-red-900/50 transition-all duration-300 hover:scale-105",children:[T.jsxs("div",{className:"relative overflow-hidden",children:[T.jsx("img",{src:e.image,alt:e.title,className:"w-full h-56 object-cover transition-transform duration-300 group-hover:scale-110"}),T.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-4",children:T.jsx("h4",{className:"text-white font-bold text-lg text-center",children:e.id==="movies-series"?"Filmes e Séries":e.id==="kids"?"Canais Infantis":e.id==="sports"?"Esportes":"Animes"})})]}),T.jsxs("div",{className:"p-6 text-center",children:[T.jsx("h3",{className:"text-xl font-bold text-white mb-4",children:e.title}),T.jsx("p",{className:"text-gray-300 leading-relaxed text-sm",children:e.description})]})]})}),DN=()=>T.jsx("section",{className:"py-20 px-4 bg-black/95",children:T.jsxs("div",{className:"max-w-7xl mx-auto",children:[T.jsxs(Hi.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[T.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-white mb-6",children:"Categorias Disponíveis"}),T.jsx("p",{className:"text-xl text-gray-300 max-w-3xl mx-auto",children:"Descubra todo o conteúdo disponível em nossa plataforma"})]}),T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-8 lg:gap-6",children:MN.map((e,t)=>T.jsx(NN,{category:e,index:t},e.id))})]})}),LN=tf("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function og({className:e,variant:t,...n}){return T.jsx("div",{className:Ke(LN({variant:t}),e),...n})}const Vx=x.forwardRef(({className:e,...t},n)=>T.jsx("div",{ref:n,className:Ke("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Vx.displayName="Card";const Bx=x.forwardRef(({className:e,...t},n)=>T.jsx("div",{ref:n,className:Ke("flex flex-col space-y-1.5 p-6",e),...t}));Bx.displayName="CardHeader";const ON=x.forwardRef(({className:e,...t},n)=>T.jsx("h3",{ref:n,className:Ke("text-2xl font-semibold leading-none tracking-tight",e),...t}));ON.displayName="CardTitle";const jN=x.forwardRef(({className:e,...t},n)=>T.jsx("p",{ref:n,className:Ke("text-sm text-muted-foreground",e),...t}));jN.displayName="CardDescription";const zx=x.forwardRef(({className:e,...t},n)=>T.jsx("div",{ref:n,className:Ke("p-6 pt-0",e),...t}));zx.displayName="CardContent";const IN=x.forwardRef(({className:e,...t},n)=>T.jsx("div",{ref:n,className:Ke("flex items-center p-6 pt-0",e),...t}));IN.displayName="CardFooter";const ku=768;function FN(){const[e,t]=x.useState(void 0);return x.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ku-1}px)`),r=()=>{t(window.innerWidthn.removeEventListener("change",r)},[]),!!e}const Us=[{id:1,title:"PLANO 1 MÊS",price:"R$ 14,90",originalPrice:null,badge:"Comece agora",badgeVariant:"secondary",isHighlighted:!1,buttonText:"ASSINAR 1 MÊS",paymentLink:"https://pay.kirvano.com/ce93c670-5759-41b7-9358-7da7aad92eeb?aff=4eed013c-01e6-463c-86e6-7beac4b86d97",benefits:["Assista em 1 tela","+40 mil conteúdos","Canais adultos (opcional)","Qualidade SD/HD/FHD/4K","Acesso em Smart TV, Smartphone, TV Box e Computador"]},{id:2,title:"PLANO 3 MESES",price:"R$ 29,90",originalPrice:null,badge:"MELHOR ESCOLHA",badgeVariant:"secondary",isHighlighted:!0,buttonText:"QUERO ASSINAR AGORA!",bestChoice:!0,paymentLink:"https://pay.kirvano.com/7f82666b-305c-418c-84e4-e00c739a6e1f?aff=4eed013c-01e6-463c-86e6-7beac4b86d97",benefits:["Assista em 1 tela","+40 mil conteúdos","Canais adultos (opcional)","Qualidade SD/HD/FHD/4K","Acesso em Smart TV, Smartphone, TV Box e Computador"],extras:"Pix e Cartão • Entrega imediata • Suporte 24h"},{id:3,title:"PLANO 2 MESES",price:"R$ 21,90",originalPrice:null,badge:"Mais economia",badgeVariant:"secondary",isHighlighted:!1,buttonText:"ASSINAR 2 MESES",paymentLink:"https://pay.kirvano.com/f69cf570-f9f8-4dc6-8803-45ff2c3105fd?aff=4eed013c-01e6-463c-86e6-7beac4b86d97",benefits:["Assista em 1 tela","+40 mil conteúdos","Canais adultos (opcional)","Qualidade SD/HD/FHD/4K","Acesso em Smart TV, Smartphone, TV Box e Computador"]}],Ws=({plan:e,index:t})=>T.jsx(Hi.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:t*.1},className:`relative ${e.isHighlighted?"md:scale-110":""}`,children:T.jsxs(Vx,{className:` relative border-2 transition-all duration-300 hover:scale-105 ${e.isHighlighted?"bg-white text-black border-red-600 shadow-2xl shadow-red-600/20":"bg-gray-900 text-white border-gray-700 hover:border-red-600/50"} `,children:[T.jsxs(Bx,{className:"text-center pb-4 pt-6",children:[e.bestChoice?T.jsxs(og,{className:"bg-green-600 hover:bg-green-700 text-white px-6 py-2 text-sm font-bold rounded-full shadow-lg border-2 border-green-500 mb-4 mx-auto w-fit flex items-center justify-center min-w-[140px]",children:[T.jsx(kC,{className:"w-4 h-4 mr-2 fill-current"}),"MELHOR ESCOLHA"]}):T.jsx(og,{variant:e.badgeVariant,className:"mb-3 mx-auto w-fit",children:e.badge}),T.jsx("h3",{className:`text-xl font-bold ${e.isHighlighted?"text-black":"text-white"}`,children:e.title}),e.originalPrice&&T.jsx("p",{className:"text-sm text-gray-500 line-through",children:e.originalPrice}),T.jsx("div",{className:`text-4xl font-bold ${e.isHighlighted?"text-red-600":"text-red-500"}`,children:e.price})]}),T.jsxs(zx,{className:"space-y-4",children:[T.jsx("div",{className:"space-y-3",children:e.benefits.map((n,r)=>T.jsxs("div",{className:"flex items-start gap-2",children:[T.jsx(bC,{className:`w-5 h-5 mt-0.5 flex-shrink-0 ${e.isHighlighted?"text-green-600":"text-green-500"}`}),T.jsx("span",{className:`text-sm ${e.isHighlighted?"text-gray-700":"text-gray-300"}`,children:n})]},r))}),e.paymentLink?T.jsx("a",{href:e.paymentLink,target:"_blank",rel:"noopener noreferrer",className:"block",children:T.jsx(Jo,{className:` w-full font-bold text-white uppercase tracking-wide ${e.isHighlighted?"py-4 text-lg":"py-3"} bg-gradient-to-r from-red-700 to-red-600 hover:from-red-800 hover:to-red-700 transition-all duration-300 hover:scale-105 `,children:e.buttonText})}):T.jsx(Jo,{className:` w-full font-bold text-white uppercase tracking-wide ${e.isHighlighted?"py-4 text-lg":"py-3"} bg-gradient-to-r from-red-700 to-red-600 hover:from-red-800 hover:to-red-700 transition-all duration-300 hover:scale-105 `,children:e.buttonText}),e.extras&&T.jsx("p",{className:"text-xs text-center text-gray-500 mt-2",children:e.extras})]})]})}),_N=()=>{const e=FN();return T.jsx("section",{id:"premium-plans-section",className:"py-20 bg-black text-white",children:T.jsxs("div",{className:"container mx-auto px-4",children:[T.jsxs(Hi.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-16",children:[T.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 text-white",children:"Escolha seu plano e assine já!"}),T.jsx("p",{className:"text-xl text-gray-300 max-w-2xl mx-auto",children:"Milhares de conteúdos, sem fidelidade."})]}),e?T.jsxs("div",{className:"flex flex-col gap-6 max-w-sm mx-auto",children:[T.jsx(Ws,{plan:Us[0],index:0}),T.jsx(Ws,{plan:Us[1],index:1}),T.jsx(Ws,{plan:Us[2],index:2})]}):T.jsx("div",{className:"flex flex-col gap-8 max-w-md mx-auto",children:Us.map((t,n)=>T.jsx(Ws,{plan:t,index:n},t.id))})]})})},VN=()=>{const[e,t]=x.useState(2847),n=["João Silva","Maria Santos","Pedro Oliveira","Ana Costa","Carlos Ferreira","Juliana Lima","Bruno Almeida","Fernanda Rodrigues","Rafael Pereira","Camila Souza","Lucas Martins","Letícia Ribeiro","Gabriel Carvalho","Mariana Barbosa","Thiago Nascimento","Amanda Gomes","Diego Araújo","Bárbara Melo","Rodrigo Dias","Isabela Castro"],r=["São Paulo, SP","Rio de Janeiro, RJ","Belo Horizonte, MG","Salvador, BA","Brasília, DF","Fortaleza, CE","Curitiba, PR","Recife, PE","Porto Alegre, RS","Manaus, AM","Goiânia, GO","Belém, PA","Guarulhos, SP","Campinas, SP","São Luís, MA","Maceió, AL","Natal, RN","Campo Grande, MS","João Pessoa, PB","Florianópolis, SC"],i=["acabou de baixar o aplicativo","se inscreveu agora mesmo","está assistindo online","começou a usar o app","fez o download"],o=()=>{try{const a=new Audio("/notification.mp3");a.volume=.3,a.play().catch(()=>{})}catch{}},s=()=>{const a=n[Math.floor(Math.random()*n.length)],l=r[Math.floor(Math.random()*r.length)],u=i[Math.floor(Math.random()*i.length)];o(),ME.success(`🎬 ${a} de ${l} ${u}`,{duration:4e3,position:"bottom-right",style:{background:"linear-gradient(135deg, #10b981, #059669)",border:"1px solid #065f46",color:"white",fontWeight:"500"}}),t(c=>c+1)};return x.useEffect(()=>{const a=setTimeout(()=>{s()},3e3),l=setInterval(()=>{s()},Math.random()*7e3+8e3);return()=>{clearTimeout(a),clearInterval(l)}},[]),T.jsx("div",{className:"fixed bottom-4 left-4 z-50 bg-black/80 backdrop-blur-sm rounded-lg px-3 py-2 text-white text-sm font-medium border border-white/20",children:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),T.jsxs("span",{children:[e.toLocaleString("pt-BR")," downloads hoje"]})]})})},BN=()=>T.jsxs(Hi.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},className:"min-h-screen bg-black text-white",children:[T.jsx(wN,{}),T.jsxs("main",{className:"pt-20",children:[T.jsx(CN,{}),T.jsx(bN,{}),T.jsx(DN,{}),T.jsx(_N,{})]}),T.jsx(VN,{})]}),zN=new ZP,$N=()=>T.jsx(ek,{client:zN,children:T.jsxs(AP,{children:[T.jsx(cE,{}),T.jsx(UE,{}),T.jsx(Bk,{children:T.jsx(Fk,{children:T.jsx(sw,{path:"/",element:T.jsx(BN,{})})})})]})});Rv(document.getElementById("root")).render(T.jsx($N,{}));