function Dg(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 s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gh={exports:{}},uo={},yh={exports:{}},$={};/** * @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 _i=Symbol.for("react.element"),Rg=Symbol.for("react.portal"),Vg=Symbol.for("react.fragment"),Fg=Symbol.for("react.strict_mode"),zg=Symbol.for("react.profiler"),Og=Symbol.for("react.provider"),Ig=Symbol.for("react.context"),$g=Symbol.for("react.forward_ref"),Bg=Symbol.for("react.suspense"),Ug=Symbol.for("react.memo"),Wg=Symbol.for("react.lazy"),vc=Symbol.iterator;function Hg(e){return e===null||typeof e!="object"?null:(e=vc&&e[vc]||e["@@iterator"],typeof e=="function"?e:null)}var vh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xh=Object.assign,wh={};function Cr(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||vh}Cr.prototype.isReactComponent={};Cr.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")};Cr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sh(){}Sh.prototype=Cr.prototype;function Gl(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||vh}var Yl=Gl.prototype=new Sh;Yl.constructor=Gl;xh(Yl,Cr.prototype);Yl.isPureReactComponent=!0;var xc=Array.isArray,kh=Object.prototype.hasOwnProperty,Kl={current:null},bh={key:!0,ref:!0,__self:!0,__source:!0};function Ph(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)kh.call(t,r)&&!bh.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,Z=j[D];if(0>>1;Di(Wn,z))zei(Sn,Wn)?(j[D]=Sn,j[ze]=z,D=ze):(j[D]=Wn,j[ut]=z,D=ut);else if(zei(Sn,z))j[D]=Sn,j[ze]=z,D=ze;else break e}}return R}function i(j,R){var z=j.sortIndex-R.sortIndex;return z!==0?z:j.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,u=3,h=!1,p=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=j)r(c),R.sortIndex=R.expirationTime,t(l,R);else break;R=n(c)}}function S(j){if(m=!1,x(j),!p)if(n(l)!==null)p=!0,H(k);else{var R=n(c);R!==null&&Pe(S,R.startTime-j)}}function k(j,R){p=!1,m&&(m=!1,y(E),E=-1),h=!0;var z=u;try{for(x(R),f=n(l);f!==null&&(!(f.expirationTime>R)||j&&!I());){var D=f.callback;if(typeof D=="function"){f.callback=null,u=f.priorityLevel;var Z=D(f.expirationTime<=R);R=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(l)&&r(l),x(R)}else r(l);f=n(l)}if(f!==null)var wn=!0;else{var ut=n(c);ut!==null&&Pe(S,ut.startTime-R),wn=!1}return wn}finally{f=null,u=z,h=!1}}var P=!1,C=null,E=-1,N=5,M=-1;function I(){return!(e.unstable_now()-Mj||125D?(j.sortIndex=z,t(c,j),n(l)===null&&j===n(c)&&(m?(y(E),E=-1):m=!0,Pe(S,z-D))):(j.sortIndex=Z,t(l,j),p||h||(p=!0,H(k))),j},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(j){var R=u;return function(){var z=u;u=R;try{return j.apply(this,arguments)}finally{u=z}}}})(Mh);jh.exports=Mh;var ry=jh.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 iy=b,Be=ry;function T(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"),Aa=Object.prototype.hasOwnProperty,sy=/^[: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]*$/,Sc={},kc={};function oy(e){return Aa.call(kc,e)?!0:Aa.call(Sc,e)?!1:sy.test(e)?kc[e]=!0:(Sc[e]=!0,!1)}function ay(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 ly(e,t,n,r){if(t===null||typeof t>"u"||ay(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 Me(e,t,n,r,i,s,o){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=s,this.removeEmptyString=o}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Me(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){ve[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xl=/[\-:]([a-z])/g;function Zl(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(Xl,Zl);ve[t]=new Me(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(Xl,Zl);ve[t]=new Me(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(Xl,Zl);ve[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jl(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function uy(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Bo(e.type,!1),e;case 11:return e=Bo(e.type.render,!1),e;case 1:return e=Bo(e.type,!0),e;default:return""}}function Va(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 Gn:return"Fragment";case qn:return"Portal";case La:return"Profiler";case eu:return"StrictMode";case Da:return"Suspense";case Ra:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ah:return(e.displayName||"Context")+".Consumer";case _h:return(e._context.displayName||"Context")+".Provider";case tu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nu:return t=e.displayName||null,t!==null?t:Va(e.type)||"Memo";case $t:t=e._payload,e=e._init;try{return Va(e(t))}catch{}}return null}function cy(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 Va(t);case 8:return t===eu?"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 ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dy(e){var t=Dh(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hi(e){e._valueTracker||(e._valueTracker=dy(e))}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ts(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 Fa(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ln(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 Vh(e,t){t=t.checked,t!=null&&Jl(e,"checked",t,!1)}function za(e,t){Vh(e,t);var n=ln(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")?Oa(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oa(e,t.type,ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cc(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 Oa(e,t,n){(t!=="number"||Ts(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wr=Array.isArray;function lr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=qi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yr={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},fy=["Webkit","ms","Moz","O"];Object.keys(Yr).forEach(function(e){fy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yr[t]=Yr[e]})});function Ih(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yr.hasOwnProperty(e)&&Yr[e]?(""+t).trim():t+"px"}function $h(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ih(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var hy=re({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 Ba(e,t){if(t){if(hy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Ua(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 Wa=null;function ru(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ha=null,ur=null,cr=null;function jc(e){if(e=Ri(e)){if(typeof Ha!="function")throw Error(T(280));var t=e.stateNode;t&&(t=mo(t),Ha(e.stateNode,e.type,t))}}function Bh(e){ur?cr?cr.push(e):cr=[e]:ur=e}function Uh(){if(ur){var e=ur,t=cr;if(cr=ur=null,jc(e),t)for(e=0;e>>=0,e===0?32:31-(Py(e)/Cy|0)|0}var Gi=64,Yi=4194304;function Hr(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 _s(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Hr(a):(s&=o,s!==0&&(r=Hr(s)))}else o=n&~i,o!==0?r=Hr(o):s!==0&&(r=Hr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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 Li(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function My(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=Qr),Fc=" ",zc=!1;function up(e,t){switch(e){case"keyup":return r1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yn=!1;function s1(e,t){switch(e){case"compositionend":return cp(t);case"keypress":return t.which!==32?null:(zc=!0,Fc);case"textInput":return e=t.data,e===Fc&&zc?null:e;default:return null}}function o1(e,t){if(Yn)return e==="compositionend"||!du&&up(e,t)?(e=ap(),ps=lu=Gt=null,Yn=!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=Bc(n)}}function pp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mp(){for(var e=window,t=Ts();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ts(e.document)}return t}function fu(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 m1(e){var t=mp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pp(n.ownerDocument.documentElement,n)){if(r!==null&&fu(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,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Uc(n,s);var o=Uc(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,Kn=null,Xa=null,Zr=null,Za=!1;function Wc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Za||Kn==null||Kn!==Ts(r)||(r=Kn,"selectionStart"in r&&fu(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}),Zr&&mi(Zr,r)||(Zr=r,r=Ds(Xa,"onSelect"),0Zn||(e.current=il[Zn],il[Zn]=null,Zn--)}function q(e,t){Zn++,il[Zn]=e.current,e.current=t}var un={},be=hn(un),Le=hn(!1),Rn=un;function gr(e,t){var n=e.type.contextTypes;if(!n)return un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function De(e){return e=e.childContextTypes,e!=null}function Vs(){K(Le),K(be)}function Xc(e,t,n){if(be.current!==un)throw Error(T(168));q(be,t),q(Le,n)}function Pp(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(T(108,cy(e)||"Unknown",i));return re({},n,r)}function Fs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,Rn=be.current,q(be,e),q(Le,Le.current),!0}function Zc(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=Pp(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,K(Le),K(be),q(be,e)):K(Le),q(Le,n)}var wt=null,go=!1,na=!1;function Cp(e){wt===null?wt=[e]:wt.push(e)}function T1(e){go=!0,Cp(e)}function pn(){if(!na&&wt!==null){na=!0;var e=0,t=W;try{var n=wt;for(W=1;e>=o,i-=o,St=1<<32-ot(t)+i|n<E?(N=C,C=null):N=C.sibling;var M=u(y,C,x[E],S);if(M===null){C===null&&(C=N);break}e&&C&&M.alternate===null&&t(y,C),v=s(M,v,E),P===null?k=M:P.sibling=M,P=M,C=N}if(E===x.length)return n(y,C),J&&Pn(y,E),k;if(C===null){for(;EE?(N=C,C=null):N=C.sibling;var I=u(y,C,M.value,S);if(I===null){C===null&&(C=N);break}e&&C&&I.alternate===null&&t(y,C),v=s(I,v,E),P===null?k=I:P.sibling=I,P=I,C=N}if(M.done)return n(y,C),J&&Pn(y,E),k;if(C===null){for(;!M.done;E++,M=x.next())M=f(y,M.value,S),M!==null&&(v=s(M,v,E),P===null?k=M:P.sibling=M,P=M);return J&&Pn(y,E),k}for(C=r(y,C);!M.done;E++,M=x.next())M=h(C,y,E,M.value,S),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?E:M.key),v=s(M,v,E),P===null?k=M:P.sibling=M,P=M);return e&&C.forEach(function(A){return t(y,A)}),J&&Pn(y,E),k}function w(y,v,x,S){if(typeof x=="object"&&x!==null&&x.type===Gn&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Wi:e:{for(var k=x.key,P=v;P!==null;){if(P.key===k){if(k=x.type,k===Gn){if(P.tag===7){n(y,P.sibling),v=i(P,x.props.children),v.return=y,y=v;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===$t&&td(k)===P.type){n(y,P.sibling),v=i(P,x.props),v.ref=Vr(y,P,x),v.return=y,y=v;break e}n(y,P);break}else t(y,P);P=P.sibling}x.type===Gn?(v=Ln(x.props.children,y.mode,S,x.key),v.return=y,y=v):(S=ks(x.type,x.key,x.props,null,y.mode,S),S.ref=Vr(y,v,x),S.return=y,y=S)}return o(y);case qn:e:{for(P=x.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),v=i(v,x.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=ca(x,y.mode,S),v.return=y,y=v}return o(y);case $t:return P=x._init,w(y,v,P(x._payload),S)}if(Wr(x))return p(y,v,x,S);if(_r(x))return m(y,v,x,S);ts(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,x),v.return=y,y=v):(n(y,v),v=ua(x,y.mode,S),v.return=y,y=v),o(y)):n(y,v)}return w}var vr=Mp(!0),Np=Mp(!1),Is=hn(null),$s=null,tr=null,gu=null;function yu(){gu=tr=$s=null}function vu(e){var t=Is.current;K(Is),e._currentValue=t}function al(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 fr(e,t){$s=e,gu=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ae=!0),e.firstContext=null)}function Je(e){var t=e._currentValue;if(gu!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if($s===null)throw Error(T(308));tr=e,$s.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var Mn=null;function xu(e){Mn===null?Mn=[e]:Mn.push(e)}function _p(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,xu(t)):(n.next=i.next,i.next=n),t.interleaved=n,_t(e,r)}function _t(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 Bt=!1;function wu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ap(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 Pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function en(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,_t(e,n)}return i=r.interleaved,i===null?(t.next=t,xu(r)):(t.next=i.next,i.next=t),r.interleaved=t,_t(e,n)}function gs(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,su(e,n)}}function nd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 Bs(e,t,n,r){var i=e.updateQueue;Bt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,d=c=l=null,a=s;do{var u=a.lane,h=a.eventTime;if((r&u)===u){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(u=t,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){f=p.call(h,f,u);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,u=typeof p=="function"?p.call(h,f,u):p,u==null)break e;f=re({},f,u);break e;case 2:Bt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,u=i.effects,u===null?i.effects=[a]:u.push(a))}else h={eventTime:h,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=f):d=d.next=h,o|=u;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;u=a,a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);zn|=o,e.lanes=o,e.memoizedState=f}}function rd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{W=n,ia.transition=r}}function Kp(){return et().memoizedState}function _1(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qp(e))Xp(t,n);else if(n=_p(e,t,n,r),n!==null){var i=Te();at(n,e,r,i),Zp(n,t,r)}}function A1(e,t,n){var r=nn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qp(e))Xp(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,lt(a,o)){var l=t.interleaved;l===null?(i.next=i,xu(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=_p(e,t,i,r),n!==null&&(i=Te(),at(n,e,r,i),Zp(n,t,r))}}function Qp(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Xp(e,t){Jr=Ws=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,su(e,n)}}var Hs={readContext:Je,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useInsertionEffect:xe,useLayoutEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useMutableSource:xe,useSyncExternalStore:xe,useId:xe,unstable_isNewReconciler:!1},L1={readContext:Je,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:sd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vs(4194308,4,Wp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return vs(4,2,e,t)},useMemo:function(e,t){var n=dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dt();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=_1.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:id,useDebugValue:ju,useDeferredValue:function(e){return dt().memoizedState=e},useTransition:function(){var e=id(!1),t=e[0];return e=N1.bind(null,e[1]),dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=dt();if(J){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),pe===null)throw Error(T(349));Fn&30||Vp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,sd(zp.bind(null,r,s,e),[e]),r.flags|=2048,bi(9,Fp.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=dt(),t=pe.identifierPrefix;if(J){var n=kt,r=St;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Si++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ft]=t,e[vi]=r,lm(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ua(n,r),n){case"dialog":Y("cancel",e),Y("close",e),i=r;break;case"iframe":case"object":case"embed":Y("load",e),i=r;break;case"video":case"audio":for(i=0;iSr&&(t.flags|=128,r=!0,Fr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Us(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!J)return we(t),null}else 2*se()-s.renderingStartTime>Sr&&n!==1073741824&&(t.flags|=128,r=!0,Fr(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=se(),t.sibling=null,n=ee.current,q(ee,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return Du(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Oe&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function $1(e,t){switch(pu(t),t.tag){case 1:return De(t.type)&&Vs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xr(),K(Le),K(be),bu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ku(t),null;case 13:if(K(ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(ee),null;case 4:return xr(),null;case 10:return vu(t.type._context),null;case 22:case 23:return Du(),null;case 24:return null;default:return null}}var rs=!1,ke=!1,B1=typeof WeakSet=="function"?WeakSet:Set,_=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function gl(e,t,n){try{n()}catch(r){ie(e,t,r)}}var gd=!1;function U1(e,t){if(Ja=As,e=mp(),fu(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,f=e,u=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)u=f,f=h;for(;;){if(f===e)break t;if(u===n&&++c===i&&(a=o),u===s&&++d===r&&(l=o),(h=f.nextSibling)!==null)break;f=u,u=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(el={focusedElem:e,selectionRange:n},As=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,w=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:nt(t.type,m),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){ie(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return p=gd,gd=!1,p}function ei(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 s=i.destroy;i.destroy=void 0,s!==void 0&&gl(t,n,s)}i=i.next}while(i!==r)}}function xo(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 yl(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 dm(e){var t=e.alternate;t!==null&&(e.alternate=null,dm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ft],delete t[vi],delete t[rl],delete t[C1],delete t[E1])),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 fm(e){return e.tag===5||e.tag===3||e.tag===4}function yd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fm(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 vl(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=Rs));else if(r!==4&&(e=e.child,e!==null))for(vl(e,t,n),e=e.sibling;e!==null;)vl(e,t,n),e=e.sibling}function xl(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(xl(e,t,n),e=e.sibling;e!==null;)xl(e,t,n),e=e.sibling}var ge=null,rt=!1;function Vt(e,t,n){for(n=n.child;n!==null;)hm(e,t,n),n=n.sibling}function hm(e,t,n){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(co,n)}catch{}switch(n.tag){case 5:ke||nr(n,t);case 6:var r=ge,i=rt;ge=null,Vt(e,t,n),ge=r,rt=i,ge!==null&&(rt?(e=ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ge.removeChild(n.stateNode));break;case 18:ge!==null&&(rt?(e=ge,n=n.stateNode,e.nodeType===8?ta(e.parentNode,n):e.nodeType===1&&ta(e,n),hi(e)):ta(ge,n.stateNode));break;case 4:r=ge,i=rt,ge=n.stateNode.containerInfo,rt=!0,Vt(e,t,n),ge=r,rt=i;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&gl(n,t,o),i=i.next}while(i!==r)}Vt(e,t,n);break;case 1:if(!ke&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ie(n,t,a)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,Vt(e,t,n),ke=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function vd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new B1),t.forEach(function(r){var i=Z1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*H1(r/1960))-r,10e?16:e,Yt===null)var r=!1;else{if(e=Yt,Yt=null,Ys=0,U&6)throw Error(T(331));var i=U;for(U|=4,_=e.current;_!==null;){var s=_,o=s.child;if(_.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lse()-Au?An(e,0):_u|=n),Re(e,t)}function Sm(e,t){t===0&&(e.mode&1?(t=Yi,Yi<<=1,!(Yi&130023424)&&(Yi=4194304)):t=1);var n=Te();e=_t(e,t),e!==null&&(Li(e,t,n),Re(e,n))}function X1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sm(e,n)}function Z1(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(T(314))}r!==null&&r.delete(t),Sm(e,n)}var km;km=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Le.current)Ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ae=!1,O1(e,t,n);Ae=!!(e.flags&131072)}else Ae=!1,J&&t.flags&1048576&&Ep(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xs(e,t),e=t.pendingProps;var i=gr(t,be.current);fr(t,n),i=Cu(null,t,r,e,i,n);var s=Eu();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,De(r)?(s=!0,Fs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wu(t),i.updater=vo,t.stateNode=i,i._reactInternals=t,ul(t,r,e,n),t=fl(null,t,r,!0,s,n)):(t.tag=0,J&&s&&hu(t),Ee(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ev(r),e=nt(r,e),i){case 0:t=dl(null,t,r,e,n);break e;case 1:t=hd(null,t,r,e,n);break e;case 11:t=dd(null,t,r,e,n);break e;case 14:t=fd(null,t,r,nt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),dl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),hd(e,t,r,i,n);case 3:e:{if(sm(t),e===null)throw Error(T(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Ap(e,t),Bs(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=wr(Error(T(423)),t),t=pd(e,t,r,n,i);break e}else if(r!==i){i=wr(Error(T(424)),t),t=pd(e,t,r,n,i);break e}else for(Ie=Jt(t.stateNode.containerInfo.firstChild),$e=t,J=!0,it=null,n=Np(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yr(),r===i){t=At(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return Lp(t),e===null&&ol(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,tl(r,i)?o=null:s!==null&&tl(r,s)&&(t.flags|=32),im(e,t),Ee(e,t,o,n),t.child;case 6:return e===null&&ol(t),null;case 13:return om(e,t,n);case 4:return Su(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):Ee(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),dd(e,t,r,i,n);case 7:return Ee(e,t,t.pendingProps,n),t.child;case 8:return Ee(e,t,t.pendingProps.children,n),t.child;case 12:return Ee(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,q(Is,r._currentValue),r._currentValue=o,s!==null)if(lt(s.value,o)){if(s.children===i.children&&!Le.current){t=At(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Pt(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),al(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),al(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ee(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,fr(t,n),i=Je(i),r=r(i),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,i=nt(r,t.pendingProps),i=nt(r.type,i),fd(e,t,r,i,n);case 15:return nm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:nt(r,i),xs(e,t),t.tag=1,De(r)?(e=!0,Fs(t)):e=!1,fr(t,n),Jp(t,r,i),ul(t,r,i,n),fl(null,t,r,!0,e,n);case 19:return am(e,t,n);case 22:return rm(e,t,n)}throw Error(T(156,t.tag))};function bm(e,t){return Qh(e,t)}function J1(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 Qe(e,t,n,r){return new J1(e,t,n,r)}function Vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ev(e){if(typeof e=="function")return Vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tu)return 11;if(e===nu)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=Qe(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 ks(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Vu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Gn:return Ln(n.children,i,s,t);case eu:o=8,i|=8;break;case La:return e=Qe(12,n,t,i|2),e.elementType=La,e.lanes=s,e;case Da:return e=Qe(13,n,t,i),e.elementType=Da,e.lanes=s,e;case Ra:return e=Qe(19,n,t,i),e.elementType=Ra,e.lanes=s,e;case Lh:return So(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _h:o=10;break e;case Ah:o=9;break e;case tu:o=11;break e;case nu:o=14;break e;case $t:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Qe(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ln(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function So(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=Lh,e.lanes=n,e.stateNode={isHidden:!1},e}function ua(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function ca(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tv(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=Wo(0),this.expirationTimes=Wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,i,s,o,a,l){return e=new tv(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qe(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wu(s),e}function nv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tm)}catch(e){console.error(e)}}Tm(),Th.exports=We;var av=Th.exports,Ed=av;_a.createRoot=Ed.createRoot,_a.hydrateRoot=Ed.hydrateRoot;/** * @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 Ci(){return Ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function jm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function uv(){return Math.random().toString(36).substr(2,8)}function jd(e,t){return{usr:e.state,key:e.key,idx:t}}function Pl(e,t,n,r){return n===void 0&&(n=null),Ci({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jr(t):t,{state:n,key:t&&t.key||r||uv()})}function Xs(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 jr(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 cv(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Kt.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Ci({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Kt.Pop;let w=d(),y=w==null?null:w-c;c=w,l&&l({action:a,location:m.location,delta:y})}function u(w,y){a=Kt.Push;let v=Pl(m.location,w,y);c=d()+1;let x=jd(v,c),S=m.createHref(v);try{o.pushState(x,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(w,y){a=Kt.Replace;let v=Pl(m.location,w,y);c=d();let x=jd(v,c),S=m.createHref(v);o.replaceState(x,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function p(w){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Xs(w);return v=v.replace(/ $/,"%20"),ae(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return a},get location(){return e(i,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Td,f),l=w,()=>{i.removeEventListener(Td,f),l=null}},createHref(w){return t(i,w)},createURL:p,encodeLocation(w){let y=p(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:u,replace:h,go(w){return o.go(w)}};return m}var Md;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Md||(Md={}));function dv(e,t,n){return n===void 0&&(n="/"),fv(e,t,n)}function fv(e,t,n,r){let i=typeof t=="string"?jr(t):t,s=$u(i.pathname||"/",n);if(s==null)return null;let o=Mm(e);hv(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(ae(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 c=sn([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(ae(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Mm(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:wv(c,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Nm(s.path))i(s,o,l)}),t}function Nm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Nm(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function hv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Sv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const pv=/^:[\w-]+$/,mv=3,gv=2,yv=1,vv=10,xv=-2,Nd=e=>e==="*";function wv(e,t){let n=e.split("/"),r=n.length;return n.some(Nd)&&(r+=xv),t&&(r+=gv),n.filter(i=>!Nd(i)).reduce((i,s)=>i+(pv.test(s)?mv:s===""?yv:vv),r)}function Sv(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 kv(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a{let{paramName:u,isOptional:h}=d;if(u==="*"){let m=a[f]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?c[u]=void 0:c[u]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function Pv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jm(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,(o,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 Cv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jm(!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 $u(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ev(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?jr(e):e;return{pathname:n?n.startsWith("/")?n:Tv(n,t):t,search:Nv(r),hash:_v(i)}}function Tv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function da(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function jv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Bu(e,t){let n=jv(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Uu(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=jr(e):(i=Ci({},e),ae(!i.pathname||!i.pathname.includes("?"),da("?","pathname","search",i)),ae(!i.pathname||!i.pathname.includes("#"),da("#","pathname","hash",i)),ae(!i.search||!i.search.includes("#"),da("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let u=o.split("/");for(;u[0]==="..";)u.shift(),f-=1;i.pathname=u.join("/")}a=f>=0?t[f]:"/"}let l=Ev(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const sn=e=>e.join("/").replace(/\/\/+/g,"/"),Mv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Nv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_v=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Av(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _m=["post","put","patch","delete"];new Set(_m);const Lv=["get",..._m];new Set(Lv);/** * 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 Ei(){return Ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),b.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Uu(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:sn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,s,e])}function Dm(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(mn),{matches:i}=b.useContext(gn),{pathname:s}=yn(),o=JSON.stringify(Bu(i,r.v7_relativeSplatPath));return b.useMemo(()=>Uu(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Fv(e,t){return zv(e,t)}function zv(e,t,n,r){Mr()||ae(!1);let{navigator:i}=b.useContext(mn),{matches:s}=b.useContext(gn),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=yn(),d;if(t){var f;let w=typeof t=="string"?jr(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||ae(!1),d=w}else d=c;let u=d.pathname||"/",h=u;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+u.replace(/^\//,"").split("/").slice(w.length).join("/")}let p=dv(e,{pathname:h}),m=Uv(p&&p.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:sn([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:sn([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&m?b.createElement(Eo.Provider,{value:{location:Ei({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Kt.Pop}},m):m}function Ov(){let e=Gv(),t=Av(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 b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const Iv=b.createElement(Ov,null);class $v extends b.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?b.createElement(gn.Provider,{value:this.props.routeContext},b.createElement(Am.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Bv(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(Wu);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(gn.Provider,{value:t},r)}function Uv(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ae(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,u)=>{let h,p=!1,m=null,w=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||Iv,l&&(c<0&&u===0?(Kv("route-fallback"),p=!0,w=null):c===u&&(p=!0,w=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,u+1)),v=()=>{let x;return h?x=m:p?x=w:f.route.Component?x=b.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,b.createElement(Bv,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||u===0)?b.createElement($v,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var Rm=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Rm||{}),Vm=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}(Vm||{});function Wv(e){let t=b.useContext(Wu);return t||ae(!1),t}function Hv(e){let t=b.useContext(Dv);return t||ae(!1),t}function qv(e){let t=b.useContext(gn);return t||ae(!1),t}function Fm(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||ae(!1),n.route.id}function Gv(){var e;let t=b.useContext(Am),n=Hv(),r=Fm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Yv(){let{router:e}=Wv(Rm.UseNavigateStable),t=Fm(Vm.UseNavigateStable),n=b.useRef(!1);return Lm(()=>{n.current=!0}),b.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ei({fromRouteId:t},s)))},[e,t])}const _d={};function Kv(e,t,n){_d[e]||(_d[e]=!0)}function Qv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Xv(e){let{to:t,replace:n,state:r,relative:i}=e;Mr()||ae(!1);let{future:s,static:o}=b.useContext(mn),{matches:a}=b.useContext(gn),{pathname:l}=yn(),c=To(),d=Uu(t,Bu(a,s.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return b.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function Ot(e){ae(!1)}function Zv(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Kt.Pop,navigator:s,static:o=!1,future:a}=e;Mr()&&ae(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:s,static:o,future:Ei({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=jr(r));let{pathname:d="/",search:f="",hash:u="",state:h=null,key:p="default"}=r,m=b.useMemo(()=>{let w=$u(d,l);return w==null?null:{location:{pathname:w,search:f,hash:u,state:h,key:p},navigationType:i}},[l,d,f,u,h,p,i]);return m==null?null:b.createElement(mn.Provider,{value:c},b.createElement(Eo.Provider,{children:n,value:m}))}function Jv(e){let{children:t,location:n}=e;return Fv(Cl(t),n)}new Promise(()=>{});function Cl(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,i)=>{if(!b.isValidElement(r))return;let s=[...t,i];if(r.type===b.Fragment){n.push.apply(n,Cl(r.props.children,s));return}r.type!==Ot&&ae(!1),!r.props.index||!r.props.children||ae(!1);let o={id:r.props.id||s.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&&(o.children=Cl(r.props.children,s)),n.push(o)}),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 */function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function tx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nx(e,t){return e.button===0&&(!t||t==="_self")&&!tx(e)}function Tl(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rx(e,t){let n=Tl(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const ix=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],sx="6";try{window.__reactRouterVersion=sx}catch{}const ox="startTransition",Ad=Qg[ox];function ax(e){let{basename:t,children:n,future:r,window:i}=e,s=b.useRef();s.current==null&&(s.current=lv({window:i,v5Compat:!0}));let o=s.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=b.useCallback(f=>{c&&Ad?Ad(()=>l(f)):l(f)},[l,c]);return b.useLayoutEffect(()=>o.listen(d),[o,d]),b.useEffect(()=>Qv(r),[r]),b.createElement(Zv,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const lx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ux=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bs=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,u=ex(t,ix),{basename:h}=b.useContext(mn),p,m=!1;if(typeof c=="string"&&ux.test(c)&&(p=c,lx))try{let x=new URL(window.location.href),S=c.startsWith("//")?new URL(x.protocol+c):new URL(c),k=$u(S.pathname,h);S.origin===x.origin&&k!=null?c=k+S.search+S.hash:m=!0}catch{}let w=Rv(c,{relative:i}),y=cx(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:f});function v(x){r&&r(x),x.defaultPrevented||y(x)}return b.createElement("a",El({},u,{href:p||w,onClick:m||s?r:v,ref:n,target:l}))});var Ld;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ld||(Ld={}));var Dd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Dd||(Dd={}));function cx(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=To(),c=yn(),d=Dm(e,{relative:o});return b.useCallback(f=>{if(nx(f,n)){f.preventDefault();let u=r!==void 0?r:Xs(c)===Xs(d);l(e,{replace:u,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,d,r,i,n,e,s,o,a])}function dx(e){let t=b.useRef(Tl(e)),n=b.useRef(!1),r=yn(),i=b.useMemo(()=>rx(r.search,n.current?null:t.current),[r.search]),s=To(),o=b.useCallback((a,l)=>{const c=Tl(typeof a=="function"?a(i):a);n.current=!0,s("?"+c,l)},[s,i]);return[i,o]}let fx={data:""},hx=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||fx},px=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,mx=/\/\*[^]*?\*\/| +/g,Rd=/\n+/g,qt=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?qt(o,s):s+"{"+qt(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=qt(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=qt.p?qt.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},yt={},zm=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+zm(e[n]);return t}return e},gx=(e,t,n,r,i)=>{let s=zm(e),o=yt[s]||(yt[s]=(l=>{let c=0,d=11;for(;c>>0;return"go"+d})(s));if(!yt[o]){let l=s!==e?e:(c=>{let d,f,u=[{}];for(;d=px.exec(c.replace(mx,""));)d[4]?u.shift():d[3]?(f=d[3].replace(Rd," ").trim(),u.unshift(u[0][f]=u[0][f]||{})):u[0][d[1]]=d[2].replace(Rd," ").trim();return u[0]})(e);yt[o]=qt(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&yt.g?yt.g:null;return n&&(yt.g=yt[o]),((l,c,d,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(yt[o],t,r,a),o},yx=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":qt(a,""):a===!1?"":a}return r+i+(o??"")},"");function jo(e){let t=this||{},n=e.call?e(t.p):e;return gx(n.unshift?n.raw?yx(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,hx(t.target),t.g,t.o,t.k)}let Om,jl,Ml;jo.bind({g:1});let Lt=jo.bind({k:1});function vx(e,t,n,r){qt.p=t,Om=e,jl=n,Ml=r}function vn(e,t){let n=this||{};return function(){let r=arguments;function i(s,o){let a=Object.assign({},s),l=a.className||i.className;n.p=Object.assign({theme:jl&&jl()},a),n.o=/ *go\d+/.test(l),a.className=jo.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Ml&&c[0]&&Ml(a),Om(c,a)}return i}}var xx=e=>typeof e=="function",Zs=(e,t)=>xx(e)?e(t):e,wx=(()=>{let e=0;return()=>(++e).toString()})(),Im=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Sx=20,Hu="default",$m=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return $m(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(o=>o.id===i||i===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},Ps=[],Bm={toasts:[],pausedAt:void 0,settings:{toastLimit:Sx}},ht={},Um=(e,t=Hu)=>{ht[t]=$m(ht[t]||Bm,e),Ps.forEach(([n,r])=>{n===t&&r(ht[t])})},Wm=e=>Object.keys(ht).forEach(t=>Um(e,t)),kx=e=>Object.keys(ht).find(t=>ht[t].toasts.some(n=>n.id===e)),Mo=(e=Hu)=>t=>{Um(t,e)},bx={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Px=(e={},t=Hu)=>{let[n,r]=b.useState(ht[t]||Bm),i=b.useRef(ht[t]);b.useEffect(()=>(i.current!==ht[t]&&r(ht[t]),Ps.push([t,r]),()=>{let o=Ps.findIndex(([a])=>a===t);o>-1&&Ps.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var a,l,c;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((a=e[o.type])==null?void 0:a.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||bx[o.type],style:{...e.style,...(c=e[o.type])==null?void 0:c.style,...o.style}}});return{...n,toasts:s}},Cx=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||wx()}),Fi=e=>(t,n)=>{let r=Cx(t,e,n);return Mo(r.toasterId||kx(r.id))({type:2,toast:r}),r.id},de=(e,t)=>Fi("blank")(e,t);de.error=Fi("error");de.success=Fi("success");de.loading=Fi("loading");de.custom=Fi("custom");de.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Mo(t)(n):Wm(n)};de.dismissAll=e=>de.dismiss(void 0,e);de.remove=(e,t)=>{let n={type:4,toastId:e};t?Mo(t)(n):Wm(n)};de.removeAll=e=>de.remove(void 0,e);de.promise=(e,t,n)=>{let r=de.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let s=t.success?Zs(t.success,i):void 0;return s?de.success(s,{id:r,...n,...n==null?void 0:n.success}):de.dismiss(r),i}).catch(i=>{let s=t.error?Zs(t.error,i):void 0;s?de.error(s,{id:r,...n,...n==null?void 0:n.error}):de.dismiss(r)}),e};var Ex=1e3,Tx=(e,t="default")=>{let{toasts:n,pausedAt:r}=Px(e,t),i=b.useRef(new Map).current,s=b.useCallback((f,u=Ex)=>{if(i.has(f))return;let h=setTimeout(()=>{i.delete(f),o({type:4,toastId:f})},u);i.set(f,h)},[]);b.useEffect(()=>{if(r)return;let f=Date.now(),u=n.map(h=>{if(h.duration===1/0)return;let p=(h.duration||0)+h.pauseDuration-(f-h.createdAt);if(p<0){h.visible&&de.dismiss(h.id);return}return setTimeout(()=>de.dismiss(h.id,t),p)});return()=>{u.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let o=b.useCallback(Mo(t),[t]),a=b.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=b.useCallback((f,u)=>{o({type:1,toast:{id:f,height:u}})},[o]),c=b.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),d=b.useCallback((f,u)=>{let{reverseOrder:h=!1,gutter:p=8,defaultPosition:m}=u||{},w=n.filter(x=>(x.position||m)===(f.position||m)&&x.height),y=w.findIndex(x=>x.id===f.id),v=w.filter((x,S)=>Sx.visible).slice(...h?[v+1]:[0,v]).reduce((x,S)=>x+(S.height||0)+p,0)},[n]);return b.useEffect(()=>{n.forEach(f=>{if(f.dismissed)s(f.id,f.removeDelay);else{let u=i.get(f.id);u&&(clearTimeout(u),i.delete(f.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:a,endPause:c,calculateOffset:d}}},jx=Lt` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,Mx=Lt` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,Nx=Lt` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,_x=vn("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${jx} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${Mx} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${Nx} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,Ax=Lt` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,Lx=vn("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; animation: ${Ax} 1s linear infinite; `,Dx=Lt` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,Rx=Lt` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,Vx=vn("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${Dx} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${Rx} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,Fx=vn("div")` position: absolute; `,zx=vn("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,Ox=Lt` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,Ix=vn("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${Ox} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,$x=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?b.createElement(Ix,null,t):t:n==="blank"?null:b.createElement(zx,null,b.createElement(Lx,{...r}),n!=="loading"&&b.createElement(Fx,null,n==="error"?b.createElement(_x,{...r}):b.createElement(Vx,{...r})))},Bx=e=>` 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} `,Ux=e=>` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} `,Wx="0%{opacity:0;} 100%{opacity:1;}",Hx="0%{opacity:1;} 100%{opacity:0;}",qx=vn("div")` display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; `,Gx=vn("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,Yx=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Im()?[Wx,Hx]:[Bx(n),Ux(n)];return{animation:t?`${Lt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Lt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Kx=b.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Yx(e.position||t||"top-center",e.visible):{opacity:0},s=b.createElement($x,{toast:e}),o=b.createElement(Gx,{...e.ariaProps},Zs(e.message,e));return b.createElement(qx,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:s,message:o}):b.createElement(b.Fragment,null,s,o))});vx(b.createElement);var Qx=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let s=b.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return b.createElement("div",{ref:s,className:t,style:n},i)},Xx=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Im()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Zx=jo` z-index: 9999; > * { pointer-events: auto; } `,os=16,Jx=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:s,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:c}=Tx(n,s);return b.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:os,left:os,right:os,bottom:os,pointerEvents:"none",...o},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(d=>{let f=d.position||t,u=c.calculateOffset(d,{reverseOrder:e,gutter:r,defaultPosition:t}),h=Xx(f,u);return b.createElement(Qx,{id:d.id,key:d.id,onHeightUpdate:c.updateHeight,className:d.visible?Zx:"",style:h},d.type==="custom"?Zs(d.message,d):i?i(d):b.createElement(Kx,{toast:d,position:f}))}))},Ne=de;const Hm=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),No=b.createContext({}),qu=b.createContext(null),_o=typeof document<"u",e2=_o?b.useLayoutEffect:b.useEffect,qm=b.createContext({strict:!1}),Gu=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t2="framerAppearId",Gm="data-"+Gu(t2);function n2(e,t,n,r){const{visualElement:i}=b.useContext(No),s=b.useContext(qm),o=b.useContext(qu),a=b.useContext(Hm).reducedMotion,l=b.useRef();r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;b.useInsertionEffect(()=>{c&&c.update(n,o)});const d=b.useRef(!!(n[Gm]&&!window.HandoffComplete));return e2(()=>{c&&(c.render(),d.current&&c.animationState&&c.animationState.animateChanges())}),b.useEffect(()=>{c&&(c.updateFeatures(),!d.current&&c.animationState&&c.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),c}function ir(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function r2(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ir(n)&&(n.current=r))},[t])}function Ti(e){return typeof e=="string"||Array.isArray(e)}function Ao(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Yu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ku=["initial",...Yu];function Lo(e){return Ao(e.animate)||Ku.some(t=>Ti(e[t]))}function Ym(e){return!!(Lo(e)||e.variants)}function i2(e,t){if(Lo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ti(n)?n:void 0,animate:Ti(r)?r:void 0}}return e.inherit!==!1?t:{}}function s2(e){const{initial:t,animate:n}=i2(e,b.useContext(No));return b.useMemo(()=>({initial:t,animate:n}),[Vd(t),Vd(n)])}function Vd(e){return Array.isArray(e)?e.join(" "):e}const Fd={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 Fd)ji[e]={isEnabled:t=>Fd[e].some(n=>!!t[n])};function o2(e){for(const t in e)ji[t]={...ji[t],...e[t]}}const Km=b.createContext({}),Qm=b.createContext({}),a2=Symbol.for("motionComponentSymbol");function l2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&o2(e);function s(a,l){let c;const d={...b.useContext(Hm),...a,layoutId:u2(a)},{isStatic:f}=d,u=s2(a),h=r(a,f);if(!f&&_o){u.visualElement=n2(i,h,d,t);const p=b.useContext(Qm),m=b.useContext(qm).strict;u.visualElement&&(c=u.visualElement.loadFeatures(d,m,e,p))}return b.createElement(No.Provider,{value:u},c&&u.visualElement?b.createElement(c,{visualElement:u.visualElement,...d}):null,n(i,a,r2(h,u.visualElement,l),h,f,u.visualElement))}const o=b.forwardRef(s);return o[a2]=i,o}function u2({layoutId:e}){const t=b.useContext(Km).id;return t&&e!==void 0?t+"-"+e:e}function c2(e){function t(r,i={}){return l2(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const d2=["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 Qu(e){return typeof e!="string"||e.includes("-")?!1:!!(d2.indexOf(e)>-1||/[A-Z]/.test(e))}const Js={};function f2(e){Object.assign(Js,e)}const zi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bn=new Set(zi);function Xm(e,{layout:t,layoutId:n}){return Bn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Js[e]||e==="opacity")}const Ve=e=>!!(e&&e.getVelocity),h2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},p2=zi.length;function m2(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let s="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),Jm=Zm("--"),Nl=Zm("var(--"),g2=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,y2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,cn=(e,t,n)=>Math.min(Math.max(n,e),t),Un={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ri={...Un,transform:e=>cn(0,1,e)},as={...Un,default:1},ii=e=>Math.round(e*1e5)/1e5,Do=/(-)?([\d]*\.?[\d])+/g,e0=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,v2=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Oi(e){return typeof e=="string"}const Ii=e=>({test:t=>Oi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),It=Ii("deg"),gt=Ii("%"),F=Ii("px"),x2=Ii("vh"),w2=Ii("vw"),zd={...gt,parse:e=>gt.parse(e)/100,transform:e=>gt.transform(e*100)},Od={...Un,transform:Math.round},t0={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,size:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,rotate:It,rotateX:It,rotateY:It,rotateZ:It,scale:as,scaleX:as,scaleY:as,scaleZ:as,skew:It,skewX:It,skewY:It,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:ri,originX:zd,originY:zd,originZ:F,zIndex:Od,fillOpacity:ri,strokeOpacity:ri,numOctaves:Od};function Xu(e,t,n,r){const{style:i,vars:s,transform:o,transformOrigin:a}=e;let l=!1,c=!1,d=!0;for(const f in t){const u=t[f];if(Jm(f)){s[f]=u;continue}const h=t0[f],p=y2(u,h);if(Bn.has(f)){if(l=!0,o[f]=p,!d)continue;u!==(h.default||0)&&(d=!1)}else f.startsWith("origin")?(c=!0,a[f]=p):i[f]=p}if(t.transform||(l||r?i.transform=m2(e.transform,n,d,r):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:u="50%",originZ:h=0}=a;i.transformOrigin=`${f} ${u} ${h}`}}const Zu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function n0(e,t,n){for(const r in t)!Ve(t[r])&&!Xm(r,n)&&(e[r]=t[r])}function S2({transformTemplate:e},t,n){return b.useMemo(()=>{const r=Zu();return Xu(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function k2(e,t,n){const r=e.style||{},i={};return n0(i,r,e),Object.assign(i,S2(e,t,n)),e.transformValues?e.transformValues(i):i}function b2(e,t,n){const r={},i=k2(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const P2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P2.has(e)}let r0=e=>!eo(e);function C2(e){e&&(r0=t=>t.startsWith("on")?!eo(t):e(t))}try{C2(require("@emotion/is-prop-valid").default)}catch{}function E2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(r0(i)||n===!0&&eo(i)||!t&&!eo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Id(e,t,n){return typeof e=="string"?e:F.transform(t+n*e)}function T2(e,t,n){const r=Id(t,e.x,e.width),i=Id(n,e.y,e.height);return`${r} ${i}`}const j2={offset:"stroke-dashoffset",array:"stroke-dasharray"},M2={offset:"strokeDashoffset",array:"strokeDasharray"};function N2(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?j2:M2;e[s.offset]=F.transform(-r);const o=F.transform(t),a=F.transform(n);e[s.array]=`${o} ${a}`}function Ju(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,f,u){if(Xu(e,c,d,u),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=T2(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&N2(h,o,a,l,!1)}const i0=()=>({...Zu(),attrs:{}}),ec=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _2(e,t,n,r){const i=b.useMemo(()=>{const s=i0();return Ju(s,t,{enableHardwareAcceleration:!1},ec(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};n0(s,e.style,e),i.style={...s,...i.style}}return i}function A2(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qu(n)?_2:b2)(r,s,o,n),d={...E2(r,typeof n=="string",e),...l,ref:i},{children:f}=r,u=b.useMemo(()=>Ve(f)?f.get():f,[f]);return b.createElement(n,{...d,children:u})}}function s0(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const o0=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 a0(e,t,n,r){s0(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(o0.has(i)?i:Gu(i),t.attrs[i])}function tc(e,t){const{style:n}=e,r={};for(const i in n)(Ve(n[i])||t.style&&Ve(t.style[i])||Xm(i,e))&&(r[i]=n[i]);return r}function l0(e,t){const n=tc(e,t);for(const r in e)if(Ve(e[r])||Ve(t[r])){const i=zi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function nc(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function L2(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const to=e=>Array.isArray(e),D2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),R2=e=>to(e)?e[e.length-1]||0:e;function Cs(e){const t=Ve(e)?e.get():e;return D2(t)?t.toValue():t}function V2({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const o={latestValues:F2(r,i,s,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const u0=e=>(t,n)=>{const r=b.useContext(No),i=b.useContext(qu),s=()=>V2(e,t,r,i);return n?s():L2(s)};function F2(e,t,n,r){const i={},s=r(e,{});for(const u in s)i[u]=Cs(s[u]);let{initial:o,animate:a}=e;const l=Lo(e),c=Ym(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;return f&&typeof f!="boolean"&&!Ao(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=nc(e,h);if(!p)return;const{transitionEnd:m,transition:w,...y}=p;for(const v in y){let x=y[v];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(i[v]=x)}for(const v in m)i[v]=m[v]}),i}const oe=e=>e;class $d{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function z2(e){let t=new $d,n=new $d,r=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,d=!1)=>{const f=d&&i,u=f?t:n;return c&&o.add(l),u.add(l)&&f&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let c=0;c(f[u]=z2(()=>n=!0),f),{}),o=f=>s[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,O2),1),i.timestamp=f,i.isProcessing=!0,ls.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:ls.reduce((f,u)=>{const h=s[u];return f[u]=(p,m=!1,w=!1)=>(n||l(),h.schedule(p,m,w)),f},{}),cancel:f=>ls.forEach(u=>s[u].cancel(f)),state:i,steps:s}}const{schedule:Q,cancel:Dt,state:Se,steps:fa}=I2(typeof requestAnimationFrame<"u"?requestAnimationFrame:oe,!0),$2={useVisualState:u0({scrapeMotionValuesFromProps:l0,createRenderState:i0,onMount:(e,t,{renderState:n,latestValues:r})=>{Q.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Q.render(()=>{Ju(n,r,{enableHardwareAcceleration:!1},ec(t.tagName),e.transformTemplate),a0(t,n)})}})},B2={useVisualState:u0({scrapeMotionValuesFromProps:tc,createRenderState:Zu})};function U2(e,{forwardMotionProps:t=!1},n,r){return{...Qu(e)?$2:B2,preloadedFeatures:n,useRender:A2(t),createVisualElement:r,Component:e}}function bt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const c0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ro(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const W2=e=>t=>c0(t)&&e(t,Ro(t));function Ct(e,t,n,r){return bt(e,t,W2(n),r)}const H2=(e,t)=>n=>t(e(n)),on=(...e)=>e.reduce(H2);function d0(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Bd=d0("dragHorizontal"),Ud=d0("dragVertical");function f0(e){let t=!1;if(e==="y")t=Ud();else if(e==="x")t=Bd();else{const n=Bd(),r=Ud();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function h0(){const e=f0(!0);return e?(e(),!1):!0}class xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Wd(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(s,o)=>{if(s.pointerType==="touch"||h0())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Q.update(()=>a[r](s,o))};return Ct(e.current,n,i,{passive:!e.getProps()[r]})}class q2 extends xn{mount(){this.unmount=on(Wd(this.node,!0),Wd(this.node,!1))}unmount(){}}class G2 extends xn{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=on(bt(this.node.current,"focus",()=>this.onFocus()),bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const p0=(e,t)=>t?e===t?!0:p0(e,t.parentElement):!1;function ha(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ro(n))}class Y2 extends xn{constructor(){super(...arguments),this.removeStartListeners=oe,this.removeEndListeners=oe,this.removeAccessibleListeners=oe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Ct(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:d,globalTapTarget:f}=this.node.getProps();Q.update(()=>{!f&&!p0(this.node.current,a.target)?d&&d(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=Ct(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=on(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||ha("up",(l,c)=>{const{onTap:d}=this.node.getProps();d&&Q.update(()=>d(l,c))})};this.removeEndListeners(),this.removeEndListeners=bt(this.node.current,"keyup",o),ha("down",(a,l)=>{this.startPress(a,l)})},n=bt(this.node.current,"keydown",t),r=()=>{this.isPressing&&ha("cancel",(s,o)=>this.cancelPress(s,o))},i=bt(this.node.current,"blur",r);this.removeAccessibleListeners=on(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Q.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!h0()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Q.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ct(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=bt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=on(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,pa=new WeakMap,K2=e=>{const t=_l.get(e.target);t&&t(e)},Q2=e=>{e.forEach(K2)};function X2({root:e,...t}){const n=e||document;pa.has(n)||pa.set(n,{});const r=pa.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Q2,{root:e,...t})),r[i]}function Z2(e,t,n){const r=X2(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const J2={some:0,all:1};class ew extends xn{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:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:J2[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),u=c?d:f;u&&u(l)};return Z2(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tw(t,n))&&this.startObserver()}unmount(){}}function tw({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const nw={inView:{Feature:ew},tap:{Feature:Y2},focus:{Feature:G2},hover:{Feature:q2}};function m0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function iw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Vo(e,t,n){const r=e.getProps();return nc(r,t,n!==void 0?n:r.custom,rw(e),iw(e))}let rc=oe;const Dn=e=>e*1e3,Et=e=>e/1e3,sw={current:!1},g0=e=>Array.isArray(e)&&typeof e[0]=="number";function y0(e){return!!(!e||typeof e=="string"&&v0[e]||g0(e)||Array.isArray(e)&&e.every(y0))}const Gr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,v0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gr([0,.65,.55,1]),circOut:Gr([.55,0,1,.45]),backIn:Gr([.31,.01,.66,-.59]),backOut:Gr([.33,1.53,.69,.99])};function x0(e){if(e)return g0(e)?Gr(e):Array.isArray(e)?e.map(x0):v0[e]}function ow(e,t,n,{delay:r=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=x0(a);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function aw(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const w0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lw=1e-7,uw=12;function cw(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=w0(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>lw&&++acw(s,0,1,e,n);return s=>s===0||s===1?s:w0(i(s),t,r)}const dw=$i(.42,0,1,1),fw=$i(0,0,.58,1),S0=$i(.42,0,.58,1),hw=e=>Array.isArray(e)&&typeof e[0]!="number",k0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,b0=e=>t=>1-e(1-t),ic=e=>1-Math.sin(Math.acos(e)),P0=b0(ic),pw=k0(ic),C0=$i(.33,1.53,.69,.99),sc=b0(C0),mw=k0(sc),gw=e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1))),yw={linear:oe,easeIn:dw,easeInOut:S0,easeOut:fw,circIn:ic,circInOut:pw,circOut:P0,backIn:sc,backInOut:mw,backOut:C0,anticipate:gw},Hd=e=>{if(Array.isArray(e)){rc(e.length===4);const[t,n,r,i]=e;return $i(t,n,r,i)}else if(typeof e=="string")return yw[e];return e},oc=(e,t)=>n=>!!(Oi(n)&&v2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),E0=(e,t,n)=>r=>{if(!Oi(r))return r;const[i,s,o,a]=r.match(Do);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},vw=e=>cn(0,255,e),ma={...Un,transform:e=>Math.round(vw(e))},_n={test:oc("rgb","red"),parse:E0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ma.transform(e)+", "+ma.transform(t)+", "+ma.transform(n)+", "+ii(ri.transform(r))+")"};function xw(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 Al={test:oc("#"),parse:xw,transform:_n.transform},sr={test:oc("hsl","hue"),parse:E0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+gt.transform(ii(t))+", "+gt.transform(ii(n))+", "+ii(ri.transform(r))+")"},Ce={test:e=>_n.test(e)||Al.test(e)||sr.test(e),parse:e=>_n.test(e)?_n.parse(e):sr.test(e)?sr.parse(e):Al.parse(e),transform:e=>Oi(e)?e:e.hasOwnProperty("red")?_n.transform(e):sr.transform(e)},te=(e,t,n)=>-n*e+n*t+e;function ga(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 ww({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=ga(l,a,e+1/3),s=ga(l,a,e),o=ga(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}const ya=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Sw=[Al,_n,sr],kw=e=>Sw.find(t=>t.test(e));function qd(e){const t=kw(e);let n=t.parse(e);return t===sr&&(n=ww(n)),n}const T0=(e,t)=>{const n=qd(e),r=qd(t),i={...n};return s=>(i.red=ya(n.red,r.red,s),i.green=ya(n.green,r.green,s),i.blue=ya(n.blue,r.blue,s),i.alpha=te(n.alpha,r.alpha,s),_n.transform(i))};function bw(e){var t,n;return isNaN(e)&&Oi(e)&&(((t=e.match(Do))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(e0))===null||n===void 0?void 0:n.length)||0)>0}const j0={regex:g2,countKey:"Vars",token:"${v}",parse:oe},M0={regex:e0,countKey:"Colors",token:"${c}",parse:Ce.parse},N0={regex:Do,countKey:"Numbers",token:"${n}",parse:Un.parse};function va(e,{regex:t,countKey:n,token:r,parse:i}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(i)))}function no(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&va(n,j0),va(n,M0),va(n,N0),n}function _0(e){return no(e).values}function A0(e){const{values:t,numColors:n,numVars:r,tokenised:i}=no(e),s=t.length;return o=>{let a=i;for(let l=0;ltypeof e=="number"?0:e;function Cw(e){const t=_0(e);return A0(e)(t.map(Pw))}const dn={test:bw,parse:_0,createTransformer:A0,getAnimatableNone:Cw},L0=(e,t)=>n=>`${n>0?t:e}`;function D0(e,t){return typeof e=="number"?n=>te(e,t,n):Ce.test(e)?T0(e,t):e.startsWith("var(")?L0(e,t):V0(e,t)}const R0=(e,t)=>{const n=[...e],r=n.length,i=e.map((s,o)=>D0(s,t[o]));return s=>{for(let o=0;o{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=D0(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}},V0=(e,t)=>{const n=dn.createTransformer(t),r=no(e),i=no(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?on(R0(r.values,i.values),n):L0(e,t)},Mi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Gd=(e,t)=>n=>te(e,t,n);function Tw(e){return typeof e=="number"?Gd:typeof e=="string"?Ce.test(e)?T0:V0:Array.isArray(e)?R0:typeof e=="object"?Ew:Gd}function jw(e,t,n){const r=[],i=n||Tw(e[0]),s=e.length-1;for(let o=0;ot[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=jw(t,r,i),a=o.length,l=c=>{let d=0;if(a>1)for(;dl(cn(e[0],e[s-1],c)):l}function Mw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Mi(0,t,r);e.push(te(n,1,i))}}function Nw(e){const t=[0];return Mw(t,e.length-1),t}function _w(e,t){return e.map(n=>n*t)}function Aw(e,t){return e.map(()=>t||S0).splice(0,e.length-1)}function ro({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=hw(r)?r.map(Hd):Hd(r),s={done:!1,value:t[0]},o=_w(n&&n.length===t.length?n:Nw(t),e),a=F0(o,t,{ease:Array.isArray(i)?i:Aw(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}function z0(e,t){return t?e*(1e3/t):0}const Lw=5;function O0(e,t,n){const r=Math.max(t-Lw,0);return z0(n-e(r),t-r)}const xa=.001,Dw=.01,Rw=10,Vw=.05,Fw=1;function zw({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=cn(Vw,Fw,o),e=cn(Dw,Rw,Et(e)),o<1?(i=c=>{const d=c*o,f=d*e,u=d-n,h=Ll(c,o),p=Math.exp(-f);return xa-u/h*p},s=c=>{const f=c*o*e,u=f*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Ll(Math.pow(c,2),o);return(-i(c)+xa>0?-1:1)*((u-h)*p)/m}):(i=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-xa+d*f},s=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=Iw(i,s,a);if(e=Dn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const Ow=12;function Iw(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Uw(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Yd(e,Bw)&&Yd(e,$w)){const n=zw(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function I0({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:d,velocity:f,isResolvedFromDuration:u}=Uw({...r,velocity:-Et(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=s-i,w=Et(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let v;if(p<1){const x=Ll(w,p);v=S=>{const k=Math.exp(-p*w*S);return s-k*((h+p*w*m)/x*Math.sin(x*S)+m*Math.cos(x*S))}}else if(p===1)v=x=>s-Math.exp(-w*x)*(m+(h+w*m)*x);else{const x=w*Math.sqrt(p*p-1);v=S=>{const k=Math.exp(-p*w*S),P=Math.min(x*S,300);return s-k*((h+p*w*m)*Math.sinh(P)+x*m*Math.cosh(P))/x}}return{calculatedDuration:u&&d||null,next:x=>{const S=v(x);if(u)o.done=x>=d;else{let k=h;x!==0&&(p<1?k=O0(v,x,S):k=0);const P=Math.abs(k)<=n,C=Math.abs(s-S)<=t;o.done=P&&C}return o.value=o.done?s:S,o}}}function Kd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],u={done:!1,value:f},h=E=>a!==void 0&&El,p=E=>a===void 0?l:l===void 0||Math.abs(a-E)-m*Math.exp(-E/r),x=E=>y+v(E),S=E=>{const N=v(E),M=x(E);u.done=Math.abs(N)<=c,u.value=u.done?y:M};let k,P;const C=E=>{h(u.value)&&(k=E,P=I0({keyframes:[u.value,p(u.value)],velocity:O0(x,E,u.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return C(0),{calculatedDuration:null,next:E=>{let N=!1;return!P&&k===void 0&&(N=!0,S(E),C(E)),k!==void 0&&E>k?P.next(E-k):(!N&&S(E),u)}}}const Ww=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Q.update(t,!0),stop:()=>Dt(t),now:()=>Se.isProcessing?Se.timestamp:performance.now()}},Qd=2e4;function Xd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Qd?1/0:t}const Hw={decay:Kd,inertia:Kd,tween:ro,keyframes:ro,spring:I0};function io({autoplay:e=!0,delay:t=0,driver:n=Ww,keyframes:r,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:d,onUpdate:f,...u}){let h=1,p=!1,m,w;const y=()=>{w=new Promise(D=>{m=D})};y();let v;const x=Hw[i]||ro;let S;x!==ro&&typeof r[0]!="number"&&(S=F0([0,100],r,{clamp:!1}),r=[0,100]);const k=x({...u,keyframes:r});let P;a==="mirror"&&(P=x({...u,keyframes:[...r].reverse(),velocity:-(u.velocity||0)}));let C="idle",E=null,N=null,M=null;k.calculatedDuration===null&&s&&(k.calculatedDuration=Xd(k));const{calculatedDuration:I}=k;let A=1/0,B=1/0;I!==null&&(A=I+o,B=A*(s+1)-o);let L=0;const me=D=>{if(N===null)return;h>0&&(N=Math.min(N,D)),h<0&&(N=Math.min(D-B/h,N)),E!==null?L=E:L=Math.round(D-N)*h;const Z=L-t*(h>=0?1:-1),wn=h>=0?Z<0:Z>B;L=Math.max(Z,0),C==="finished"&&E===null&&(L=B);let ut=L,Wn=k;if(s){const zo=Math.min(L,B)/A;let Bi=Math.floor(zo),kn=zo%1;!kn&&zo>=1&&(kn=1),kn===1&&Bi--,Bi=Math.min(Bi,s+1),!!(Bi%2)&&(a==="reverse"?(kn=1-kn,o&&(kn-=o/A)):a==="mirror"&&(Wn=P)),ut=cn(0,1,kn)*A}const ze=wn?{done:!1,value:r[0]}:Wn.next(ut);S&&(ze.value=S(ze.value));let{done:Sn}=ze;!wn&&I!==null&&(Sn=h>=0?L>=B:L<=0);const Lg=E===null&&(C==="finished"||C==="running"&&Sn);return f&&f(ze.value),Lg&&j(),ze},H=()=>{v&&v.stop(),v=void 0},Pe=()=>{C="idle",H(),m(),y(),N=M=null},j=()=>{C="finished",d&&d(),H(),m()},R=()=>{if(p)return;v||(v=n(me));const D=v.now();l&&l(),E!==null?N=D-E:(!N||C==="finished")&&(N=D),C==="finished"&&y(),M=N,E=null,C="running",v.start()};e&&R();const z={then(D,Z){return w.then(D,Z)},get time(){return Et(L)},set time(D){D=Dn(D),L=D,E!==null||!v||h===0?E=D:N=v.now()-D/h},get duration(){const D=k.calculatedDuration===null?Xd(k):k.calculatedDuration;return Et(D)},get speed(){return h},set speed(D){D===h||!v||(h=D,z.time=Et(L))},get state(){return C},play:R,pause:()=>{C="paused",E=L},stop:()=>{p=!0,C!=="idle"&&(C="idle",c&&c(),Pe())},cancel:()=>{M!==null&&me(M),Pe()},complete:()=>{C="finished"},sample:D=>(N=0,me(D))};return z}function qw(e){let t;return()=>(t===void 0&&(t=e()),t)}const Gw=qw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yw=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),us=10,Kw=2e4,Qw=(e,t)=>t.type==="spring"||e==="backgroundColor"||!y0(t.ease);function Xw(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Gw()&&Yw.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const d=()=>{l=new Promise(x=>{a=x})};d();let{keyframes:f,duration:u=300,ease:h,times:p}=i;if(Qw(t,i)){const x=io({...i,repeat:0,delay:0});let S={done:!1,value:f[0]};const k=[];let P=0;for(;!S.done&&P{c=!1,m.cancel()},y=()=>{c=!0,Q.update(w),a(),d()};return m.onfinish=()=>{c||(e.set(aw(f,i)),r&&r(),y())},{then(x,S){return l.then(x,S)},attachTimeline(x){return m.timeline=x,m.onfinish=null,oe},get time(){return Et(m.currentTime||0)},set time(x){m.currentTime=Dn(x)},get speed(){return m.playbackRate},set speed(x){m.playbackRate=x},get duration(){return Et(u)},play:()=>{o||(m.play(),Dt(w))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:x}=m;if(x){const S=io({...i,autoplay:!1});e.setWithVelocity(S.sample(x-us).value,S.sample(x).value,us)}y()},complete:()=>{c||m.finish()},cancel:y}}function Zw({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:oe,pause:oe,stop:oe,then:s=>(s(),Promise.resolve()),cancel:oe,complete:oe});return t?io({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Jw={type:"spring",stiffness:500,damping:25,restSpeed:10},e4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),t4={type:"keyframes",duration:.8},n4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},r4=(e,{keyframes:t})=>t.length>2?t4:Bn.has(e)?e.startsWith("scale")?e4(t[1]):Jw:n4,Dl=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(dn.test(t)||t==="0")&&!t.startsWith("url(")),i4=new Set(["brightness","contrast","saturate","opacity"]);function s4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Do)||[];if(!r)return e;const i=n.replace(r,"");let s=i4.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const o4=/([a-z-]*)\(.*?\)/g,Rl={...dn,getAnimatableNone:e=>{const t=e.match(o4);return t?t.map(s4).join(" "):e}},a4={...t0,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:Rl,WebkitFilter:Rl},ac=e=>a4[e];function $0(e,t){let n=ac(e);return n!==Rl&&(n=dn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B0=e=>/^0[^.\s]+$/.test(e);function l4(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||B0(e)}function u4(e,t,n,r){const i=Dl(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const o=r.from!==void 0?r.from:e.get();let a;const l=[];for(let c=0;ci=>{const s=lc(r,e)||{},o=s.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Dn(o);const l=u4(t,e,n,s),c=l[0],d=l[l.length-1],f=Dl(e,c),u=Dl(e,d);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(c4(s)||(h={...h,...r4(e,h)}),h.duration&&(h.duration=Dn(h.duration)),h.repeatDelay&&(h.repeatDelay=Dn(h.repeatDelay)),!f||!u||sw.current||s.type===!1||d4.skipAnimations)return Zw(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=Xw(t,e,h);if(p)return p}return io(h)};function so(e){return!!(Ve(e)&&e.add)}const U0=e=>/^\-?\d*\.?\d+$/.test(e);function cc(e,t){e.indexOf(t)===-1&&e.push(t)}function dc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class fc{constructor(){this.subscriptions=[]}add(t){return cc(this.subscriptions,t),()=>dc(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 s=0;s!isNaN(parseFloat(e));class h4{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:o}=Se;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Q.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Q.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=f4(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new fc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Q.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?z0(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function kr(e,t){return new h4(e,t)}const W0=e=>t=>t.test(e),p4={test:e=>e==="auto",parse:e=>e},H0=[Un,F,gt,It,w2,x2,p4],Or=e=>H0.find(W0(e)),m4=[...H0,Ce,dn],g4=e=>m4.find(W0(e));function y4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kr(n))}function v4(e,t){const n=Vo(e,t);let{transitionEnd:r={},transition:i={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const o in s){const a=R2(s[o]);y4(e,o,a)}}function x4(e,t,n){var r,i;const s=Object.keys(t).filter(a=>!e.hasValue(a)),o=s.length;if(o)for(let a=0;al.remove(f))),c.push(w)}return o&&Promise.all(c).then(()=>{o&&v4(e,o)}),c}function Vl(e,t,n={}){const r=Vo(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(q0(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return P4(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function P4(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(C4).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Vl(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function C4(e,t){return e.sortNodePosition(t)}function E4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Vl(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Vl(e,t,n);else{const i=typeof t=="function"?Vo(e,t,n.custom):t;r=Promise.all(q0(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const T4=[...Yu].reverse(),j4=Yu.length;function M4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>E4(e,n,r)))}function N4(e){let t=M4(e);const n=A4();let r=!0;const i=(l,c)=>{const d=Vo(e,c);if(d){const{transition:f,transitionEnd:u,...h}=d;l={...l,...h,...u}}return l};function s(l){t=l(e)}function o(l,c){const d=e.getProps(),f=e.getVariantContext(!0)||{},u=[],h=new Set;let p={},m=1/0;for(let y=0;ym&&k,M=!1;const I=Array.isArray(S)?S:[S];let A=I.reduce(i,{});P===!1&&(A={});const{prevResolvedValues:B={}}=x,L={...B,...A},me=H=>{N=!0,h.has(H)&&(M=!0,h.delete(H)),x.needsAnimating[H]=!0};for(const H in L){const Pe=A[H],j=B[H];if(p.hasOwnProperty(H))continue;let R=!1;to(Pe)&&to(j)?R=!m0(Pe,j):R=Pe!==j,R?Pe!==void 0?me(H):h.add(H):Pe!==void 0&&h.has(H)?me(H):x.protectedKeys[H]=!0}x.prevProp=S,x.prevResolvedValues=A,x.isActive&&(p={...p,...A}),r&&e.blockInitialAnimation&&(N=!1),N&&(!C||M)&&u.push(...I.map(H=>({animation:H,options:{type:v,...l}})))}if(h.size){const y={};h.forEach(v=>{const x=e.getBaseTarget(v);x!==void 0&&(y[v]=x)}),u.push({animation:y})}let w=!!u.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(u):Promise.resolve()}function a(l,c,d){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const u=o(d,l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n}}function _4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!m0(t,e):!1}function bn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function A4(){return{animate:bn(!0),whileInView:bn(),whileHover:bn(),whileTap:bn(),whileDrag:bn(),whileFocus:bn(),exit:bn()}}class L4 extends xn{constructor(t){super(t),t.animationState||(t.animationState=N4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ao(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let D4=0;class R4 extends xn{constructor(){super(...arguments),this.id=D4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const V4={animation:{Feature:L4},exit:{Feature:R4}},Zd=(e,t)=>Math.abs(e-t);function F4(e,t){const n=Zd(e.x,t.x),r=Zd(e.y,t.y);return Math.sqrt(n**2+r**2)}class G0{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Sa(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,h=F4(f.offset,{x:0,y:0})>=3;if(!u&&!h)return;const{point:p}=f,{timestamp:m}=Se;this.history.push({...p,timestamp:m});const{onStart:w,onMove:y}=this.handlers;u||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,u)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=wa(u,this.transformPagePoint),Q.update(this.updatePoint,!0)},this.handlePointerUp=(f,u)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Sa(f.type==="pointercancel"?this.lastMoveEventInfo:wa(u,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,w),p&&p(f,w)},!c0(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ro(t),a=wa(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=Se;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Sa(a,this.history)),this.removeListeners=on(Ct(this.contextWindow,"pointermove",this.handlePointerMove),Ct(this.contextWindow,"pointerup",this.handlePointerUp),Ct(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Dt(this.updatePoint)}}function wa(e,t){return t?{point:t(e.point)}:e}function Jd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sa({point:e},t){return{point:e,delta:Jd(e,Y0(t)),offset:Jd(e,z4(t)),velocity:O4(t,.1)}}function z4(e){return e[0]}function Y0(e){return e[e.length-1]}function O4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Y0(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Dn(t)));)n--;if(!r)return{x:0,y:0};const s=Et(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ue(e){return e.max-e.min}function Fl(e,t=0,n=.01){return Math.abs(e-t)<=n}function ef(e,t,n,r=.5){e.origin=r,e.originPoint=te(t.min,t.max,e.origin),e.scale=Ue(n)/Ue(t),(Fl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=te(n.min,n.max,e.origin)-e.originPoint,(Fl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function si(e,t,n,r){ef(e.x,t.x,n.x,r?r.originX:void 0),ef(e.y,t.y,n.y,r?r.originY:void 0)}function tf(e,t,n){e.min=n.min+t.min,e.max=e.min+Ue(t)}function I4(e,t,n){tf(e.x,t.x,n.x),tf(e.y,t.y,n.y)}function nf(e,t,n){e.min=t.min-n.min,e.max=e.min+Ue(t)}function oi(e,t,n){nf(e.x,t.x,n.x),nf(e.y,t.y,n.y)}function $4(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?te(n,e,r.max):Math.min(e,n)),e}function rf(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 B4(e,{top:t,left:n,bottom:r,right:i}){return{x:rf(e.x,n,i),y:rf(e.y,t,r)}}function sf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Mi(t.min,t.max-r,e.min):r>i&&(n=Mi(e.min,e.max-i,t.min)),cn(0,1,n)}function H4(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 zl=.35;function q4(e=zl){return e===!1?e=0:e===!0&&(e=zl),{x:of(e,"left","right"),y:of(e,"top","bottom")}}function of(e,t,n){return{min:af(e,t),max:af(e,n)}}function af(e,t){return typeof e=="number"?e:e[t]||0}const lf=()=>({translate:0,scale:1,origin:0,originPoint:0}),or=()=>({x:lf(),y:lf()}),uf=()=>({min:0,max:0}),le=()=>({x:uf(),y:uf()});function Ge(e){return[e("x"),e("y")]}function K0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function G4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Y4(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 ka(e){return e===void 0||e===1}function Ol({scale:e,scaleX:t,scaleY:n}){return!ka(e)||!ka(t)||!ka(n)}function En(e){return Ol(e)||Q0(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Q0(e){return cf(e.x)||cf(e.y)}function cf(e){return e&&e!=="0%"}function oo(e,t,n){const r=e-n,i=t*r;return n+i}function df(e,t,n,r,i){return i!==void 0&&(e=oo(e,i,r)),oo(e,n,r)+t}function Il(e,t=0,n=1,r,i){e.min=df(e.min,t,n,r,i),e.max=df(e.max,t,n,r,i)}function X0(e,{x:t,y:n}){Il(e.x,t.translate,t.scale,t.originPoint),Il(e.y,n.translate,n.scale,n.originPoint)}function K4(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a1.0000000000001||e<.999999999999?e:1}function Ut(e,t){e.min=e.min+t,e.max=e.max+t}function hf(e,t,[n,r,i]){const s=t[i]!==void 0?t[i]:.5,o=te(e.min,e.max,s);Il(e,t[n],t[r],o,t.scale)}const Q4=["x","scaleX","originX"],X4=["y","scaleY","originY"];function ar(e,t){hf(e.x,t,Q4),hf(e.y,t,X4)}function Z0(e,t){return K0(Y4(e.getBoundingClientRect(),t))}function Z4(e,t,n){const r=Z0(e,n),{scroll:i}=t;return i&&(Ut(r.x,i.offset.x),Ut(r.y,i.offset.y)),r}const J0=({current:e})=>e?e.ownerDocument.defaultView:null,J4=new WeakMap;class e3{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=le(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ro(d,"page").point)},s=(d,f)=>{const{drag:u,dragPropagation:h,onDragStart:p}=this.getProps();if(u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=f0(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ge(w=>{let y=this.getAxisMotionValue(w).get()||0;if(gt.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[w];x&&(y=Ue(x)*(parseFloat(y)/100))}}this.originPoint[w]=y}),p&&Q.update(()=>p(d,f),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:w}=f;if(h&&this.currentDirection===null){this.currentDirection=t3(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),m&&m(d,f)},a=(d,f)=>this.stop(d,f),l=()=>Ge(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new G0(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:J0(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Q.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!cs(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=$4(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ir(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=B4(i.layoutBox,n):this.constraints=!1,this.elastic=q4(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ge(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=H4(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ir(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Z4(r,i.root,this.visualElement.getTransformPagePoint());let o=U4(i.layout.layoutBox,s);if(n){const a=n(G4(o));this.hasMutatedConstraints=!!a,a&&(o=K0(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ge(d=>{if(!cs(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const u=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[d]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(uc(t,r,0,n))}stopAnimation(){Ge(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ge(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ge(n=>{const{drag:r}=this.getProps();if(!cs(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-te(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ir(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ge(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=W4({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ge(o=>{if(!cs(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(te(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;J4.set(this.visualElement,this);const t=this.visualElement.current,n=Ct(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ir(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=bt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ge(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=zl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function cs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function t3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class n3 extends xn{constructor(t){super(t),this.removeGroupControls=oe,this.removeListeners=oe,this.controls=new e3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oe}unmount(){this.removeGroupControls(),this.removeListeners()}}const pf=e=>(t,n)=>{e&&Q.update(()=>e(t,n))};class r3 extends xn{constructor(){super(...arguments),this.removePointerDownListener=oe}onPointerDown(t){this.session=new G0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:J0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:pf(t),onStart:pf(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Q.update(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ct(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function i3(){const e=b.useContext(qu);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=b.useId();return b.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Es={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ir={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(F.test(e))e=parseFloat(e);else return e;const n=mf(e,t.target.x),r=mf(e,t.target.y);return`${n}% ${r}%`}},s3={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=dn.parse(e);if(i.length>5)return r;const s=dn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=te(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class o3 extends Ai.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;f2(a3),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Es.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Q.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function eg(e){const[t,n]=i3(),r=b.useContext(Km);return Ai.createElement(o3,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(Qm),isPresent:t,safeToRemove:n})}const a3={borderRadius:{...Ir,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ir,borderTopRightRadius:Ir,borderBottomLeftRadius:Ir,borderBottomRightRadius:Ir,boxShadow:s3},tg=["TopLeft","TopRight","BottomLeft","BottomRight"],l3=tg.length,gf=e=>typeof e=="string"?parseFloat(e):e,yf=e=>typeof e=="number"||F.test(e);function u3(e,t,n,r,i,s){i?(e.opacity=te(0,n.opacity!==void 0?n.opacity:1,c3(r)),e.opacityExit=te(t.opacity!==void 0?t.opacity:1,0,d3(r))):s&&(e.opacity=te(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Mi(e,t,r))}function xf(e,t){e.min=t.min,e.max=t.max}function qe(e,t){xf(e.x,t.x),xf(e.y,t.y)}function wf(e,t,n,r,i){return e-=t,e=oo(e,1/n,r),i!==void 0&&(e=oo(e,1/i,r)),e}function f3(e,t=0,n=1,r=.5,i,s=e,o=e){if(gt.test(t)&&(t=parseFloat(t),t=te(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=te(s.min,s.max,r);e===s&&(a-=t),e.min=wf(e.min,t,n,a,i),e.max=wf(e.max,t,n,a,i)}function Sf(e,t,[n,r,i],s,o){f3(e,t[n],t[r],t[i],t.scale,s,o)}const h3=["x","scaleX","originX"],p3=["y","scaleY","originY"];function kf(e,t,n,r){Sf(e.x,t,h3,n?n.x:void 0,r?r.x:void 0),Sf(e.y,t,p3,n?n.y:void 0,r?r.y:void 0)}function bf(e){return e.translate===0&&e.scale===1}function rg(e){return bf(e.x)&&bf(e.y)}function m3(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ig(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Pf(e){return Ue(e.x)/Ue(e.y)}class g3{constructor(){this.members=[]}add(t){cc(this.members,t),t.scheduleRender()}remove(t){if(dc(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 s=this.members[i];if(s.isPresent!==!1){r=s;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 Cf(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y;if((i||s)&&(r=`translate3d(${i}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:c,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `)}const o=e.x.scale*t.x,a=e.y.scale*t.y;return(o!==1||a!==1)&&(r+=`scale(${o}, ${a})`),r||"none"}const y3=(e,t)=>e.depth-t.depth;class v3{constructor(){this.children=[],this.isDirty=!1}add(t){cc(this.children,t),this.isDirty=!0}remove(t){dc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(y3),this.isDirty=!1,this.children.forEach(t)}}function x3(e,t){const n=performance.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Dt(r),e(s-t))};return Q.read(r,!0),()=>Dt(r)}function w3(e){window.MotionDebug&&window.MotionDebug.record(e)}function S3(e){return e instanceof SVGElement&&e.tagName!=="svg"}function k3(e,t,n){const r=Ve(e)?e:kr(e);return r.start(uc("",r,t,n)),r.animation}const Ef=["","X","Y","Z"],b3={visibility:"hidden"},Tf=1e3;let P3=0;const Tn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function sg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=P3++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Tn.totalNodes=Tn.resolvedTargetDeltas=Tn.recalculatedProjection=0,this.nodes.forEach(T3),this.nodes.forEach(A3),this.nodes.forEach(L3),this.nodes.forEach(j3),w3(Tn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=x3(u,250),Es.hasAnimatedSinceResize&&(Es.hasAnimatedSinceResize=!1,this.nodes.forEach(Mf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:u,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||z3,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=d.getProps(),v=!this.targetLayout||!ig(this.targetLayout,p)||h,x=!u&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||u&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,x);const S={...lc(m,"layout"),onPlay:w,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else u||Mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Dt(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(D3),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;dthis.update()))}clearAllSnapshots(){this.nodes.forEach(M3),this.sharedNodes.forEach(R3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const k=S/1e3;Nf(f.x,o.x,k),Nf(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oi(u,this.layout.layoutBox,this.relativeParent.layout.layoutBox),V3(this.relativeTarget,this.relativeTargetOrigin,u,k),x&&m3(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=le()),qe(x,this.relativeTarget)),m&&(this.animationValues=d,u3(d,c,this.latestValues,k,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Dt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Q.update(()=>{Es.hasAnimatedSinceResize=!0,this.currentAnimation=k3(0,Tf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Tf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&og(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||le();const f=Ue(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const u=Ue(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+u}qe(a,l),ar(a,d),si(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new g3),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let d=0;d{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(jf),this.root.sharedNodes.clear()}}}function C3(e){e.updateLayout()}function E3(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?Ge(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Ue(u);u.min=r[f].min,u.max=u.min+h}):og(s,n.layoutBox,r)&&Ge(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Ue(r[f]);u.max=u.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=or();si(a,r,n.layoutBox);const l=or();o?si(l,e.applyTransform(i,!0),n.measuredBox):si(l,r,n.layoutBox);const c=!rg(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:u,layout:h}=f;if(u&&h){const p=le();oi(p,n.layoutBox,u.layoutBox);const m=le();oi(m,r,h.layoutBox),ig(p,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function T3(e){Tn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function j3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function M3(e){e.clearSnapshot()}function jf(e){e.clearMeasurements()}function N3(e){e.isLayoutDirty=!1}function _3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function A3(e){e.resolveTargetDelta()}function L3(e){e.calcProjection()}function D3(e){e.resetRotation()}function R3(e){e.removeLeadSnapshot()}function Nf(e,t,n){e.translate=te(t.translate,0,n),e.scale=te(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _f(e,t,n,r){e.min=te(t.min,n.min,r),e.max=te(t.max,n.max,r)}function V3(e,t,n,r){_f(e.x,t.x,n.x,r),_f(e.y,t.y,n.y,r)}function F3(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const z3={duration:.45,ease:[.4,0,.1,1]},Af=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Lf=Af("applewebkit/")&&!Af("chrome/")?Math.round:oe;function Df(e){e.min=Lf(e.min),e.max=Lf(e.max)}function O3(e){Df(e.x),Df(e.y)}function og(e,t,n){return e==="position"||e==="preserve-aspect"&&!Fl(Pf(t),Pf(n),.2)}const I3=sg({attachResizeListener:(e,t)=>bt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ba={current:void 0},ag=sg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ba.current){const e=new I3({});e.mount(window),e.setOptions({layoutScroll:!0}),ba.current=e}return ba.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$3={pan:{Feature:r3},drag:{Feature:n3,ProjectionNode:ag,MeasureLayout:eg}},B3=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function U3(e){const t=B3.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function $l(e,t,n=1){const[r,i]=U3(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return U0(o)?parseFloat(o):o}else return Nl(i)?$l(i,t,n+1):i}function W3(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const s=i.get();if(!Nl(s))return;const o=$l(s,r);o&&i.set(o)});for(const i in t){const s=t[i];if(!Nl(s))continue;const o=$l(s,r);o&&(t[i]=o,n||(n={}),n[i]===void 0&&(n[i]=s))}return{target:t,transitionEnd:n}}const H3=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),lg=e=>H3.has(e),q3=e=>Object.keys(e).some(lg),Rf=e=>e===Un||e===F,Vf=(e,t)=>parseFloat(e.split(", ")[t]),Ff=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Vf(i[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?Vf(s[1],e):0}},G3=new Set(["x","y","z"]),Y3=zi.filter(e=>!G3.has(e));function K3(e){const t=[];return Y3.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const br={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:Ff(4,13),y:Ff(5,14)};br.translateX=br.x;br.translateY=br.y;const Q3=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{a[c]=br[c](r,s)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const d=t.getValue(c);d&&d.jump(a[c]),e[c]=br[c](l,s)}),e},X3=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(lg);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],f=Or(d);const u=t[l];let h;if(to(u)){const p=u.length,m=u[0]===null?1:0;d=u[m],f=Or(d);for(let w=m;w=0?window.pageYOffset:null,c=Q3(t,e,a);return s.length&&s.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),_o&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Z3(e,t,n,r){return q3(t)?X3(e,t,n,r):{target:t,transitionEnd:r}}const J3=(e,t,n,r)=>{const i=W3(e,t,r);return t=i.target,r=i.transitionEnd,Z3(e,t,n,r)},Bl={current:null},ug={current:!1};function eS(){if(ug.current=!0,!!_o)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Bl.current=e.matches;e.addListener(t),t()}else Bl.current=!1}function tS(e,t,n){const{willChange:r}=t;for(const i in t){const s=t[i],o=n[i];if(Ve(s))e.addValue(i,s),so(r)&&r.add(i);else if(Ve(o))e.addValue(i,kr(s,{owner:e})),so(r)&&r.remove(i);else if(o!==s)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=e.getStaticValue(i);e.addValue(i,kr(a!==void 0?a:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const zf=new WeakMap,cg=Object.keys(ji),nS=cg.length,Of=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],rS=Ku.length;class iS{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Q.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=Lo(n),this.isVariantNode=Ym(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{});for(const f in d){const u=d[f];a[f]!==void 0&&Ve(u)&&(u.set(a[f],!1),so(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,zf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ug.current||eS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Bl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zf.delete(this.current),this.projection&&this.projection.unmount(),Dt(this.notifyUpdate),Dt(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Bn.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Q.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,s){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,layoutScroll:u,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):le()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=kr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=nc(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ve(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dg extends iS{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},s){let o=S4(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),s){x4(this,r,o);const a=J3(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function sS(e){return window.getComputedStyle(e)}class oS extends dg{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(Bn.has(n)){const r=ac(n);return r&&r.default||0}else{const r=sS(t),i=(Jm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Z0(t,n)}build(t,n,r,i){Xu(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return tc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){s0(t,n,r,i)}}class aS extends dg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Bn.has(n)){const r=ac(n);return r&&r.default||0}return n=o0.has(n)?n:Gu(n),t.getAttribute(n)}measureInstanceViewportBox(){return le()}scrapeMotionValuesFromProps(t,n){return l0(t,n)}build(t,n,r,i){Ju(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){a0(t,n,r,i)}mount(t){this.isSVGTag=ec(t.tagName),super.mount(t)}}const lS=(e,t)=>Qu(e)?new aS(t,{enableHardwareAcceleration:!1}):new oS(t,{enableHardwareAcceleration:!0}),uS={layout:{ProjectionNode:ag,MeasureLayout:eg}},cS={...V4,...nw,...$3,...uS},V=c2((e,t)=>U2(e,t,cS,lS)),dS={},If=e=>{let t;const n=new Set,r=(d,f)=>{const u=typeof d=="function"?d(t):d;if(!Object.is(u,t)){const h=t;t=f??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(p=>p(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(dS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},fS=e=>e?If(e):If;var fg={exports:{}},hg={},pg={exports:{}},mg={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Pr=b;function hS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pS=typeof Object.is=="function"?Object.is:hS,mS=Pr.useState,gS=Pr.useEffect,yS=Pr.useLayoutEffect,vS=Pr.useDebugValue;function xS(e,t){var n=t(),r=mS({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return yS(function(){i.value=n,i.getSnapshot=t,Pa(i)&&s({inst:i})},[e,n,t]),gS(function(){return Pa(i)&&s({inst:i}),e(function(){Pa(i)&&s({inst:i})})},[e]),vS(n),n}function Pa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pS(e,n)}catch{return!0}}function wS(e,t){return t()}var SS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wS:xS;mg.useSyncExternalStore=Pr.useSyncExternalStore!==void 0?Pr.useSyncExternalStore:SS;pg.exports=mg;var kS=pg.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Fo=b,bS=kS;function PS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CS=typeof Object.is=="function"?Object.is:PS,ES=bS.useSyncExternalStore,TS=Fo.useRef,jS=Fo.useEffect,MS=Fo.useMemo,NS=Fo.useDebugValue;hg.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=TS(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=MS(function(){function l(h){if(!c){if(c=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return f=p}return f=h}if(p=f,CS(d,h))return p;var m=r(h);return i!==void 0&&i(p,m)?(d=h,p):(d=h,f=m)}var c=!1,d,f,u=n===void 0?null:n;return[function(){return l(t())},u===null?void 0:function(){return l(u())}]},[t,n,r,i]);var a=ES(e,s[0],s[1]);return jS(function(){o.hasValue=!0,o.value=a},[a]),NS(a),a};fg.exports=hg;var _S=fg.exports;const AS=ql(_S),gg={},{useDebugValue:LS}=Ai,{useSyncExternalStoreWithSelector:DS}=AS;let $f=!1;const RS=e=>e;function VS(e,t=RS,n){(gg?"production":void 0)!=="production"&&n&&!$f&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),$f=!0);const r=DS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return LS(r),r}const Bf=e=>{(gg?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?fS(e):e,n=(r,i)=>VS(t,r,i);return Object.assign(n,t),n},FS=e=>e?Bf(e):Bf,Uf={currentUser:null,partnerUser:null,isLoading:!1,error:null,currentTrack:null,isPlaying:!1},Tt=FS((e,t)=>({...Uf,mixedPlaylists:[],memoryLane:[],setCurrentUser:n=>e({currentUser:n}),setPartnerUser:n=>e({partnerUser:n}),logout:()=>e({currentUser:null,partnerUser:null,currentTrack:null,isPlaying:!1,mixedPlaylists:[],memoryLane:[],error:null}),setLoading:n=>e({isLoading:n}),setError:n=>e({error:n}),setCurrentTrack:n=>e({currentTrack:n}),setIsPlaying:n=>e({isPlaying:n}),addMixedPlaylist:n=>e(r=>({mixedPlaylists:[...r.mixedPlaylists,n]})),removeMixedPlaylist:n=>e(r=>({mixedPlaylists:r.mixedPlaylists.filter(i=>i.id!==n)})),addMemoryLaneItem:n=>e(r=>({memoryLane:[...r.memoryLane,n].sort((i,s)=>new Date(s.date).getTime()-new Date(i.date).getTime())})),removeMemoryLaneItem:n=>e(r=>({memoryLane:r.memoryLane.filter(i=>i.id!==n)})),clearAllData:()=>e({...Uf,mixedPlaylists:[],memoryLane:[]})}));function ai(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function Ul(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function zS(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function Wf(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function Hf(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function OS(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function IS(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function Ca(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function $S(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function BS(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function qf(e){let t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function US(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function WS(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function Wl(e,t){let n=t[0],r=t[1],i=t[2],s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s)),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e}function yg(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Gf(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=i*l-s*a,e[1]=s*o-r*l,e[2]=r*a-i*o,e}function HS(e,t,n,r){let i=t[0],s=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e[2]=o+r*(n[2]-o),e}function qS(e,t,n,r,i){const s=Math.exp(-r*i);let o=t[0],a=t[1],l=t[2];return e[0]=n[0]+(o-n[0])*s,e[1]=n[1]+(a-n[1])*s,e[2]=n[2]+(l-n[2])*s,e}function GS(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*s+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*s+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*s+n[14])/o,e}function YS(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*s)/o,e[1]=(n[1]*r+n[5]*i+n[9]*s)/o,e[2]=(n[2]*r+n[6]*i+n[10]*s)/o,e}function KS(e,t,n){let r=t[0],i=t[1],s=t[2];return e[0]=r*n[0]+i*n[3]+s*n[6],e[1]=r*n[1]+i*n[4]+s*n[7],e[2]=r*n[2]+i*n[5]+s*n[8],e}function QS(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2],c=n[3],d=a*s-l*i,f=l*r-o*s,u=o*i-a*r,h=a*u-l*f,p=l*d-o*u,m=o*f-a*d,w=c*2;return d*=w,f*=w,u*=w,h*=2,p*=2,m*=2,e[0]=r+d+h,e[1]=i+f+p,e[2]=s+u+m,e}const XS=function(){const e=[0,0,0],t=[0,0,0];return function(n,r){Ul(e,n),Ul(t,r),Wl(e,e),Wl(t,t);let i=yg(e,t);return i>1?0:i<-1?Math.PI:Math.acos(i)}}();function ZS(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}class st extends Array{constructor(t=0,n=t,r=t){return super(t,n,r),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,n=t,r=t){return t.length?this.copy(t):(zS(this,t,n,r),this)}copy(t){return Ul(this,t),this}add(t,n){return n?Wf(this,t,n):Wf(this,this,t),this}sub(t,n){return n?Hf(this,t,n):Hf(this,this,t),this}multiply(t){return t.length?OS(this,this,t):Ca(this,this,t),this}divide(t){return t.length?IS(this,this,t):Ca(this,this,1/t),this}inverse(t=this){return WS(this,t),this}len(){return ai(this)}distance(t){return t?$S(this,t):ai(this)}squaredLen(){return qf(this)}squaredDistance(t){return t?BS(this,t):qf(this)}negate(t=this){return US(this,t),this}cross(t,n){return n?Gf(this,t,n):Gf(this,this,t),this}scale(t){return Ca(this,this,t),this}normalize(){return Wl(this,this),this}dot(t){return yg(this,t)}equals(t){return ZS(this,t)}applyMatrix3(t){return KS(this,this,t),this}applyMatrix4(t){return GS(this,this,t),this}scaleRotateMatrix4(t){return YS(this,this,t),this}applyQuaternion(t){return QS(this,this,t),this}angle(t){return XS(this,t)}lerp(t,n){return HS(this,this,t,n),this}smoothLerp(t,n,r){return qS(this,this,t,n,r),this}clone(){return new st(this[0],this[1],this[2])}fromArray(t,n=0){return this[0]=t[n],this[1]=t[n+1],this[2]=t[n+2],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t}transformDirection(t){const n=this[0],r=this[1],i=this[2];return this[0]=t[0]*n+t[4]*r+t[8]*i,this[1]=t[1]*n+t[5]*r+t[9]*i,this[2]=t[2]*n+t[6]*r+t[10]*i,this.normalize()}}const Yf=new st;let JS=1,e5=1,Kf=!1;class t5{constructor(t,n={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=n,this.id=JS++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let r in n)this.addAttribute(r,n[r])}addAttribute(t,n){if(this.attributes[t]=n,n.id=e5++,n.size=n.size||1,n.type=n.type||(n.data.constructor===Float32Array?this.gl.FLOAT:n.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),n.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,n.normalized=n.normalized||!1,n.stride=n.stride||0,n.offset=n.offset||0,n.count=n.count||(n.stride?n.data.byteLength/n.stride:n.data.length/n.size),n.divisor=n.instanced||0,n.needsUpdate=!1,n.usage=n.usage||this.gl.STATIC_DRAW,n.buffer||this.updateAttribute(n),n.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==n.count*n.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,n.count*n.divisor);this.instancedCount=n.count*n.divisor}else t==="index"?this.drawRange.count=n.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,n.count))}updateAttribute(t){const n=!t.buffer;n&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),n?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,n){this.drawRange.start=t,this.drawRange.count=n}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((n,{name:r,type:i})=>{if(!this.attributes[r]){console.warn(`active attribute ${r} not being supplied`);return}const s=this.attributes[r];this.gl.bindBuffer(s.target,s.buffer),this.glState.boundBuffer=s.buffer;let o=1;i===35674&&(o=2),i===35675&&(o=3),i===35676&&(o=4);const a=s.size/o,l=o===1?0:o*o*4,c=o===1?0:o*4;for(let d=0;d{const a=this.attributes[o];a.needsUpdate&&this.updateAttribute(a)});let r=2;((i=this.attributes.index)==null?void 0:i.type)===this.gl.UNSIGNED_INT&&(r=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r,this.instancedCount):this.gl.renderer.drawArraysInstanced(n,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r):this.gl.drawArrays(n,this.drawRange.start,this.drawRange.count)}getPosition(){const t=this.attributes.position;if(t.data)return t;if(!Kf)return console.warn("No position buffer data found to compute bounds"),Kf=!0}computeBoundingBox(t){t||(t=this.getPosition());const n=t.data,r=t.size;this.bounds||(this.bounds={min:new st,max:new st,center:new st,scale:new st,radius:1/0});const i=this.bounds.min,s=this.bounds.max,o=this.bounds.center,a=this.bounds.scale;i.set(1/0),s.set(-1/0);for(let l=0,c=n.length;l{let o=this.uniforms[s.uniformName];for(const a of s.nameComponents){if(!o)break;if(a in o)o=o[a];else{if(Array.isArray(o.value))break;o=void 0;break}}if(!o)return Zf(`Active uniform ${s.name} has not been supplied`);if(o&&o.value===void 0)return Zf(`${s.name} uniform is missing a value parameter`);if(o.value.texture)return n=n+1,o.value.update(n),Ea(this.gl,s.type,i,n);if(o.value.length&&o.value[0].texture){const a=[];return o.value.forEach(l=>{n=n+1,l.update(n),a.push(n)}),Ea(this.gl,s.type,i,a)}Ea(this.gl,s.type,i,o.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function Ea(e,t,n,r){r=r.length?i5(r):r;const i=e.renderer.state.uniformLocations.get(n);if(r.length)if(i===void 0||i.length!==r.length)e.renderer.state.uniformLocations.set(n,r.slice(0));else{if(s5(i,r))return;i.set?i.set(r):o5(i,r),e.renderer.state.uniformLocations.set(n,i)}else{if(i===r)return;e.renderer.state.uniformLocations.set(n,r)}switch(t){case 5126:return r.length?e.uniform1fv(n,r):e.uniform1f(n,r);case 35664:return e.uniform2fv(n,r);case 35665:return e.uniform3fv(n,r);case 35666:return e.uniform4fv(n,r);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return r.length?e.uniform1iv(n,r):e.uniform1i(n,r);case 35671:case 35667:return e.uniform2iv(n,r);case 35672:case 35668:return e.uniform3iv(n,r);case 35673:case 35669:return e.uniform4iv(n,r);case 35674:return e.uniformMatrix2fv(n,!1,r);case 35675:return e.uniformMatrix3fv(n,!1,r);case 35676:return e.uniformMatrix4fv(n,!1,r)}}function Xf(e){let t=e.split(` `);for(let n=0;n100||(console.warn(e),Ta++,Ta>100&&console.warn("More than 100 program warnings - stopping logs."))}const ja=new st;let a5=1;class l5{constructor({canvas:t=document.createElement("canvas"),width:n=300,height:r=150,dpr:i=1,alpha:s=!1,depth:o=!0,stencil:a=!1,antialias:l=!1,premultipliedAlpha:c=!1,preserveDrawingBuffer:d=!1,powerPreference:f="default",autoClear:u=!0,webgl:h=2}={}){const p={alpha:s,depth:o,stencil:a,antialias:l,premultipliedAlpha:c,preserveDrawingBuffer:d,powerPreference:f};this.dpr=i,this.alpha=s,this.color=!0,this.depth=o,this.stencil=a,this.premultipliedAlpha=c,this.autoClear=u,this.id=a5++,h===2&&(this.gl=t.getContext("webgl2",p)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",p)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(n,r),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,n){this.width=t,this.height=n,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=n*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:n+"px"})}setViewport(t,n,r=0,i=0){this.state.viewport.width===t&&this.state.viewport.height===n||(this.state.viewport.width=t,this.state.viewport.height=n,this.state.viewport.x=r,this.state.viewport.y=i,this.gl.viewport(r,i,t,n))}setScissor(t,n,r=0,i=0){this.gl.scissor(r,i,t,n)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,n,r,i){this.state.blendFunc.src===t&&this.state.blendFunc.dst===n&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=t,this.state.blendFunc.dst=n,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=i,r!==void 0?this.gl.blendFuncSeparate(t,n,r,i):this.gl.blendFunc(t,n))}setBlendEquation(t,n){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===n)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=n,n!==void 0?this.gl.blendEquationSeparate(t,n):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}setStencilMask(t){this.state.stencilMask!==t&&(this.state.stencilMask=t,this.gl.stencilMask(t))}setStencilFunc(t,n,r){this.state.stencilFunc===t&&this.state.stencilRef===n&&this.state.stencilFuncMask===r||(this.state.stencilFunc=t||this.gl.ALWAYS,this.state.stencilRef=n||0,this.state.stencilFuncMask=r||0,this.gl.stencilFunc(t||this.gl.ALWAYS,n||0,r||0))}setStencilOp(t,n,r){this.state.stencilFail===t&&this.state.stencilDepthFail===n&&this.state.stencilDepthPass===r||(this.state.stencilFail=t,this.state.stencilDepthFail=n,this.state.stencilDepthPass=r,this.gl.stencilOp(t,n,r))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:n=null}={}){this.state.framebuffer!==n&&(this.state.framebuffer=n,this.gl.bindFramebuffer(t,n))}getExtension(t,n,r){return n&&this.gl[n]?this.gl[n].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),n?this.extensions[t]?this.extensions[t][r].bind(this.extensions[t]):null:this.extensions[t])}sortOpaque(t,n){return t.renderOrder!==n.renderOrder?t.renderOrder-n.renderOrder:t.program.id!==n.program.id?t.program.id-n.program.id:t.zDepth!==n.zDepth?t.zDepth-n.zDepth:n.id-t.id}sortTransparent(t,n){return t.renderOrder!==n.renderOrder?t.renderOrder-n.renderOrder:t.zDepth!==n.zDepth?n.zDepth-t.zDepth:n.id-t.id}sortUI(t,n){return t.renderOrder!==n.renderOrder?t.renderOrder-n.renderOrder:t.program.id!==n.program.id?t.program.id-n.program.id:n.id-t.id}getRenderList({scene:t,camera:n,frustumCull:r,sort:i}){let s=[];if(n&&r&&n.updateFrustum(),t.traverse(o=>{if(!o.visible)return!0;o.draw&&(r&&o.frustumCulled&&n&&!n.frustumIntersectsMesh(o)||s.push(o))}),i){const o=[],a=[],l=[];s.forEach(c=>{c.program.transparent?c.program.depthTest?a.push(c):l.push(c):o.push(c),c.zDepth=0,!(c.renderOrder!==0||!c.program.depthTest||!n)&&(c.worldMatrix.getTranslation(ja),ja.applyMatrix4(n.projectionViewMatrix),c.zDepth=ja.z)}),o.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),s=o.concat(a,l)}return s}render({scene:t,camera:n,target:r=null,update:i=!0,sort:s=!0,frustumCull:o=!0,clear:a}){r===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(r),this.setViewport(r.width,r.height)),(a||this.autoClear&&a!==!1)&&(this.depth&&(!r||r.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!r||r.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&t.updateMatrixWorld(),n&&n.updateMatrixWorld(),this.getRenderList({scene:t,camera:n,frustumCull:o,sort:s}).forEach(c=>{c.draw({camera:n})})}}function u5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function c5(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function d5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=s*o,e}function f5(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function h5(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function p5(e,t,n){n=n*.5;let r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Jf(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=n[0],l=n[1],c=n[2],d=n[3];return e[0]=r*d+o*a+i*c-s*l,e[1]=i*d+o*l+s*a-r*c,e[2]=s*d+o*c+r*l-i*a,e[3]=o*d-r*a-i*l-s*c,e}function m5(e,t,n){n*=.5;let r=t[0],i=t[1],s=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*a,e[1]=i*l+s*a,e[2]=s*l-i*a,e[3]=o*l-r*a,e}function g5(e,t,n){n*=.5;let r=t[0],i=t[1],s=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l-s*a,e[1]=i*l+o*a,e[2]=s*l+r*a,e[3]=o*l-i*a,e}function y5(e,t,n){n*=.5;let r=t[0],i=t[1],s=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+i*a,e[1]=i*l-r*a,e[2]=s*l+o*a,e[3]=o*l-s*a,e}function v5(e,t,n,r){let i=t[0],s=t[1],o=t[2],a=t[3],l=n[0],c=n[1],d=n[2],f=n[3],u,h,p,m,w;return h=i*l+s*c+o*d+a*f,h<0&&(h=-h,l=-l,c=-c,d=-d,f=-f),1-h>1e-6?(u=Math.acos(h),p=Math.sin(u),m=Math.sin((1-r)*u)/p,w=Math.sin(r*u)/p):(m=1-r,w=r),e[0]=m*i+w*l,e[1]=m*s+w*c,e[2]=m*o+w*d,e[3]=m*a+w*f,e}function x5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n*n+r*r+i*i+s*s,a=o?1/o:0;return e[0]=-n*a,e[1]=-r*a,e[2]=-i*a,e[3]=s*a,e}function w5(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function S5(e,t){let n=t[0]+t[4]+t[8],r;if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);let s=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[i*3+i]-t[s*3+s]-t[o*3+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[s*3+o]-t[o*3+s])*r,e[s]=(t[s*3+i]+t[i*3+s])*r,e[o]=(t[o*3+i]+t[i*3+o])*r}return e}function k5(e,t,n="YXZ"){let r=Math.sin(t[0]*.5),i=Math.cos(t[0]*.5),s=Math.sin(t[1]*.5),o=Math.cos(t[1]*.5),a=Math.sin(t[2]*.5),l=Math.cos(t[2]*.5);return n==="XYZ"?(e[0]=r*o*l+i*s*a,e[1]=i*s*l-r*o*a,e[2]=i*o*a+r*s*l,e[3]=i*o*l-r*s*a):n==="YXZ"?(e[0]=r*o*l+i*s*a,e[1]=i*s*l-r*o*a,e[2]=i*o*a-r*s*l,e[3]=i*o*l+r*s*a):n==="ZXY"?(e[0]=r*o*l-i*s*a,e[1]=i*s*l+r*o*a,e[2]=i*o*a+r*s*l,e[3]=i*o*l-r*s*a):n==="ZYX"?(e[0]=r*o*l-i*s*a,e[1]=i*s*l+r*o*a,e[2]=i*o*a-r*s*l,e[3]=i*o*l+r*s*a):n==="YZX"?(e[0]=r*o*l+i*s*a,e[1]=i*s*l+r*o*a,e[2]=i*o*a-r*s*l,e[3]=i*o*l-r*s*a):n==="XZY"&&(e[0]=r*o*l-i*s*a,e[1]=i*s*l-r*o*a,e[2]=i*o*a+r*s*l,e[3]=i*o*l+r*s*a),e}const b5=u5,P5=c5,C5=f5,E5=d5;class T5 extends Array{constructor(t=0,n=0,r=0,i=1){super(t,n,r,i),this.onChange=()=>{},this._target=this;const s=["0","1","2","3"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&s.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){return h5(this._target),this.onChange(),this}set(t,n,r,i){return t.length?this.copy(t):(P5(this._target,t,n,r,i),this.onChange(),this)}rotateX(t){return m5(this._target,this._target,t),this.onChange(),this}rotateY(t){return g5(this._target,this._target,t),this.onChange(),this}rotateZ(t){return y5(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return x5(this._target,t),this.onChange(),this}conjugate(t=this._target){return w5(this._target,t),this.onChange(),this}copy(t){return b5(this._target,t),this.onChange(),this}normalize(t=this._target){return E5(this._target,t),this.onChange(),this}multiply(t,n){return n?Jf(this._target,t,n):Jf(this._target,this._target,t),this.onChange(),this}dot(t){return C5(this._target,t)}fromMatrix3(t){return S5(this._target,t),this.onChange(),this}fromEuler(t,n){return k5(this._target,t,t.order),n||this.onChange(),this}fromAxisAngle(t,n){return p5(this._target,t,n),this.onChange(),this}slerp(t,n){return v5(this._target,this._target,t,n),this.onChange(),this}fromArray(t,n=0){return this._target[0]=t[n],this._target[1]=t[n+1],this._target[2]=t[n+2],this._target[3]=t[n+3],this.onChange(),this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t[n+3]=this[3],t}}const j5=1e-6;function M5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function N5(e,t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=l,e[8]=c,e[9]=d,e[10]=f,e[11]=u,e[12]=h,e[13]=p,e[14]=m,e[15]=w,e}function _5(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function A5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],d=t[8],f=t[9],u=t[10],h=t[11],p=t[12],m=t[13],w=t[14],y=t[15],v=n*a-r*o,x=n*l-i*o,S=n*c-s*o,k=r*l-i*a,P=r*c-s*a,C=i*c-s*l,E=d*m-f*p,N=d*w-u*p,M=d*y-h*p,I=f*w-u*m,A=f*y-h*m,B=u*y-h*w,L=v*B-x*A+S*I+k*M-P*N+C*E;return L?(L=1/L,e[0]=(a*B-l*A+c*I)*L,e[1]=(i*A-r*B-s*I)*L,e[2]=(m*C-w*P+y*k)*L,e[3]=(u*P-f*C-h*k)*L,e[4]=(l*M-o*B-c*N)*L,e[5]=(n*B-i*M+s*N)*L,e[6]=(w*S-p*C-y*x)*L,e[7]=(d*C-u*S+h*x)*L,e[8]=(o*A-a*M+c*E)*L,e[9]=(r*M-n*A-s*E)*L,e[10]=(p*P-m*S+y*v)*L,e[11]=(f*S-d*P-h*v)*L,e[12]=(a*N-o*I-l*E)*L,e[13]=(n*I-r*N+i*E)*L,e[14]=(m*x-p*k-w*v)*L,e[15]=(d*k-f*x+u*v)*L,e):null}function vg(e){let t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],d=e[9],f=e[10],u=e[11],h=e[12],p=e[13],m=e[14],w=e[15],y=t*o-n*s,v=t*a-r*s,x=t*l-i*s,S=n*a-r*o,k=n*l-i*o,P=r*l-i*a,C=c*p-d*h,E=c*m-f*h,N=c*w-u*h,M=d*m-f*p,I=d*w-u*p,A=f*w-u*m;return y*A-v*I+x*M+S*N-k*E+P*C}function eh(e,t,n){let r=t[0],i=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=t[9],h=t[10],p=t[11],m=t[12],w=t[13],y=t[14],v=t[15],x=n[0],S=n[1],k=n[2],P=n[3];return e[0]=x*r+S*a+k*f+P*m,e[1]=x*i+S*l+k*u+P*w,e[2]=x*s+S*c+k*h+P*y,e[3]=x*o+S*d+k*p+P*v,x=n[4],S=n[5],k=n[6],P=n[7],e[4]=x*r+S*a+k*f+P*m,e[5]=x*i+S*l+k*u+P*w,e[6]=x*s+S*c+k*h+P*y,e[7]=x*o+S*d+k*p+P*v,x=n[8],S=n[9],k=n[10],P=n[11],e[8]=x*r+S*a+k*f+P*m,e[9]=x*i+S*l+k*u+P*w,e[10]=x*s+S*c+k*h+P*y,e[11]=x*o+S*d+k*p+P*v,x=n[12],S=n[13],k=n[14],P=n[15],e[12]=x*r+S*a+k*f+P*m,e[13]=x*i+S*l+k*u+P*w,e[14]=x*s+S*c+k*h+P*y,e[15]=x*o+S*d+k*p+P*v,e}function L5(e,t,n){let r=n[0],i=n[1],s=n[2],o,a,l,c,d,f,u,h,p,m,w,y;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*s+t[12],e[13]=t[1]*r+t[5]*i+t[9]*s+t[13],e[14]=t[2]*r+t[6]*i+t[10]*s+t[14],e[15]=t[3]*r+t[7]*i+t[11]*s+t[15]):(o=t[0],a=t[1],l=t[2],c=t[3],d=t[4],f=t[5],u=t[6],h=t[7],p=t[8],m=t[9],w=t[10],y=t[11],e[0]=o,e[1]=a,e[2]=l,e[3]=c,e[4]=d,e[5]=f,e[6]=u,e[7]=h,e[8]=p,e[9]=m,e[10]=w,e[11]=y,e[12]=o*r+d*i+p*s+t[12],e[13]=a*r+f*i+m*s+t[13],e[14]=l*r+u*i+w*s+t[14],e[15]=c*r+h*i+y*s+t[15]),e}function D5(e,t,n){let r=n[0],i=n[1],s=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function R5(e,t,n,r){let i=r[0],s=r[1],o=r[2],a=Math.hypot(i,s,o),l,c,d,f,u,h,p,m,w,y,v,x,S,k,P,C,E,N,M,I,A,B,L,me;return Math.abs(a)0?(y=Math.sqrt(w+1)*2,t[3]=.25*y,t[0]=(u-p)/y,t[1]=(h-c)/y,t[2]=(l-d)/y):a>f&&a>m?(y=Math.sqrt(1+a-f-m)*2,t[3]=(u-p)/y,t[0]=.25*y,t[1]=(l+d)/y,t[2]=(h+c)/y):f>m?(y=Math.sqrt(1+f-a-m)*2,t[3]=(h-c)/y,t[0]=(l+d)/y,t[1]=.25*y,t[2]=(u+p)/y):(y=Math.sqrt(1+m-a-f)*2,t[3]=(l-d)/y,t[0]=(h+c)/y,t[1]=(u+p)/y,t[2]=.25*y),t}}();function z5(e,t,n,r){let i=ai([e[0],e[1],e[2]]);const s=ai([e[4],e[5],e[6]]),o=ai([e[8],e[9],e[10]]);vg(e)<0&&(i=-i),n[0]=e[12],n[1]=e[13],n[2]=e[14];const l=e.slice(),c=1/i,d=1/s,f=1/o;l[0]*=c,l[1]*=c,l[2]*=c,l[4]*=d,l[5]*=d,l[6]*=d,l[8]*=f,l[9]*=f,l[10]*=f,wg(t,l),r[0]=i,r[1]=s,r[2]=o}function O5(e,t,n,r){const i=e,s=t[0],o=t[1],a=t[2],l=t[3],c=s+s,d=o+o,f=a+a,u=s*c,h=s*d,p=s*f,m=o*d,w=o*f,y=a*f,v=l*c,x=l*d,S=l*f,k=r[0],P=r[1],C=r[2];return i[0]=(1-(m+y))*k,i[1]=(h+S)*k,i[2]=(p-x)*k,i[3]=0,i[4]=(h-S)*P,i[5]=(1-(u+y))*P,i[6]=(w+v)*P,i[7]=0,i[8]=(p+x)*C,i[9]=(w-v)*C,i[10]=(1-(u+m))*C,i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function I5(e,t){let n=t[0],r=t[1],i=t[2],s=t[3],o=n+n,a=r+r,l=i+i,c=n*o,d=r*o,f=r*a,u=i*o,h=i*a,p=i*l,m=s*o,w=s*a,y=s*l;return e[0]=1-f-p,e[1]=d+y,e[2]=u-w,e[3]=0,e[4]=d-y,e[5]=1-c-p,e[6]=h+m,e[7]=0,e[8]=u+w,e[9]=h-m,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function $5(e,t,n,r,i){let s=1/Math.tan(t/2),o=1/(r-i);return e[0]=s/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*o,e[15]=0,e}function B5(e,t,n,r,i,s,o){let a=1/(t-n),l=1/(r-i),c=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*a,e[13]=(i+r)*l,e[14]=(o+s)*c,e[15]=1,e}function U5(e,t,n,r){let i=t[0],s=t[1],o=t[2],a=r[0],l=r[1],c=r[2],d=i-n[0],f=s-n[1],u=o-n[2],h=d*d+f*f+u*u;h===0?u=1:(h=1/Math.sqrt(h),d*=h,f*=h,u*=h);let p=l*u-c*f,m=c*d-a*u,w=a*f-l*d;return h=p*p+m*m+w*w,h===0&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,p=l*u-c*f,m=c*d-a*u,w=a*f-l*d,h=p*p+m*m+w*w),h=1/Math.sqrt(h),p*=h,m*=h,w*=h,e[0]=p,e[1]=m,e[2]=w,e[3]=0,e[4]=f*w-u*m,e[5]=u*p-d*w,e[6]=d*m-f*p,e[7]=0,e[8]=d,e[9]=f,e[10]=u,e[11]=0,e[12]=i,e[13]=s,e[14]=o,e[15]=1,e}function th(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function nh(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function W5(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e}class ao extends Array{constructor(t=1,n=0,r=0,i=0,s=0,o=1,a=0,l=0,c=0,d=0,f=1,u=0,h=0,p=0,m=0,w=1){return super(t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w){return t.length?this.copy(t):(N5(this,t,n,r,i,s,o,a,l,c,d,f,u,h,p,m,w),this)}translate(t,n=this){return L5(this,n,t),this}rotate(t,n,r=this){return R5(this,r,t,n),this}scale(t,n=this){return D5(this,n,typeof t=="number"?[t,t,t]:t),this}add(t,n){return n?th(this,t,n):th(this,this,t),this}sub(t,n){return n?nh(this,t,n):nh(this,this,t),this}multiply(t,n){return t.length?n?eh(this,t,n):eh(this,this,t):W5(this,this,t),this}identity(){return _5(this),this}copy(t){return M5(this,t),this}fromPerspective({fov:t,aspect:n,near:r,far:i}={}){return $5(this,t,n,r,i),this}fromOrthogonal({left:t,right:n,bottom:r,top:i,near:s,far:o}){return B5(this,t,n,r,i,s,o),this}fromQuaternion(t){return I5(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return A5(this,t),this}compose(t,n,r){return O5(this,t,n,r),this}decompose(t,n,r){return z5(this,t,n,r),this}getRotation(t){return wg(t,this),this}getTranslation(t){return V5(t,this),this}getScaling(t){return xg(t,this),this}getMaxScaleOnAxis(){return F5(this)}lookAt(t,n,r){return U5(this,t,n,r),this}determinant(){return vg(this)}fromArray(t,n=0){return this[0]=t[n],this[1]=t[n+1],this[2]=t[n+2],this[3]=t[n+3],this[4]=t[n+4],this[5]=t[n+5],this[6]=t[n+6],this[7]=t[n+7],this[8]=t[n+8],this[9]=t[n+9],this[10]=t[n+10],this[11]=t[n+11],this[12]=t[n+12],this[13]=t[n+13],this[14]=t[n+14],this[15]=t[n+15],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t[n+3]=this[3],t[n+4]=this[4],t[n+5]=this[5],t[n+6]=this[6],t[n+7]=this[7],t[n+8]=this[8],t[n+9]=this[9],t[n+10]=this[10],t[n+11]=this[11],t[n+12]=this[12],t[n+13]=this[13],t[n+14]=this[14],t[n+15]=this[15],t}}function H5(e,t,n="YXZ"){return n==="XYZ"?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):n==="YXZ"?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):n==="ZXY"?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):n==="ZYX"?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):n==="YZX"?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):n==="XZY"&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0)),e}const rh=new ao;class q5 extends Array{constructor(t=0,n=t,r=t,i="YXZ"){super(t,n,r),this.order=i,this.onChange=()=>{},this._target=this;const s=["0","1","2"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&s.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,n=t,r=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=n,this._target[2]=r,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,n=this.order){return H5(this._target,t,n),this.onChange(),this}fromQuaternion(t,n=this.order,r){return rh.fromQuaternion(t),this._target.fromRotationMatrix(rh,n),r||this.onChange(),this}fromArray(t,n=0){return this._target[0]=t[n],this._target[1]=t[n+1],this._target[2]=t[n+2],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t[n+2]=this[2],t}}class G5{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new ao,this.worldMatrix=new ao,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new st,this.quaternion=new T5,this.scale=new st(1),this.rotation=new q5,this.up=new st(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,n=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,n&&t&&t.addChild(this,!1)}addChild(t,n=!0){~this.children.indexOf(t)||this.children.push(t),n&&t.setParent(this,!1)}removeChild(t,n=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),n&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let n=0,r=this.children.length;nr&&r({mesh:this,camera:t}));let n=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:n}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:t}))}}function ak(e,t){return e[0]=t[0],e[1]=t[1],e}function lk(e,t,n){return e[0]=t,e[1]=n,e}function sh(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function oh(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function uk(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function ck(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Ma(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function dk(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function fk(e,t){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function ah(e){var t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function hk(e){var t=e[0],n=e[1];return t*t+n*n}function pk(e,t){return e[0]=-t[0],e[1]=-t[1],e}function mk(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function gk(e,t){var n=t[0],r=t[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function yk(e,t){return e[0]*t[0]+e[1]*t[1]}function lh(e,t){return e[0]*t[1]-e[1]*t[0]}function vk(e,t,n,r){var i=t[0],s=t[1];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e}function xk(e,t,n,r,i){const s=Math.exp(-r*i);let o=t[0],a=t[1];return e[0]=n[0]+(o-n[0])*s,e[1]=n[1]+(a-n[1])*s,e}function wk(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function Sk(e,t,n){let r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}function kk(e,t){return e[0]===t[0]&&e[1]===t[1]}class hc extends Array{constructor(t=0,n=t){return super(t,n),this}get x(){return this[0]}get y(){return this[1]}set x(t){this[0]=t}set y(t){this[1]=t}set(t,n=t){return t.length?this.copy(t):(lk(this,t,n),this)}copy(t){return ak(this,t),this}add(t,n){return n?sh(this,t,n):sh(this,this,t),this}sub(t,n){return n?oh(this,t,n):oh(this,this,t),this}multiply(t){return t.length?uk(this,this,t):Ma(this,this,t),this}divide(t){return t.length?ck(this,this,t):Ma(this,this,1/t),this}inverse(t=this){return mk(this,t),this}len(){return ah(this)}distance(t){return t?dk(this,t):ah(this)}squaredLen(){return this.squaredDistance()}squaredDistance(t){return t?fk(this,t):hk(this)}negate(t=this){return pk(this,t),this}cross(t,n){return n?lh(t,n):lh(this,t)}scale(t){return Ma(this,this,t),this}normalize(){return gk(this,this),this}dot(t){return yk(this,t)}equals(t){return kk(this,t)}applyMatrix3(t){return wk(this,this,t),this}applyMatrix4(t){return Sk(this,this,t),this}lerp(t,n){return vk(this,this,t,n),this}smoothLerp(t,n,r){return xk(this,this,t,n,r),this}clone(){return new hc(this[0],this[1])}fromArray(t,n=0){return this[0]=t[n],this[1]=t[n+1],this}toArray(t=[],n=0){return t[n]=this[0],t[n+1]=this[1],t}}class bk extends t5{constructor(t,{attributes:n={}}={}){Object.assign(n,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(t,n)}}const Pk=` attribute vec2 position; void main(){gl_Position=vec4(position,0.0,1.0);} `,Ck=` #ifdef GL_ES precision lowp float; #endif uniform vec2 uResolution; uniform float uTime; uniform float uHueShift; uniform float uNoise; uniform float uScan; uniform float uScanFreq; uniform float uWarp; #define iTime uTime #define iResolution uResolution vec4 buf[8]; float rand(vec2 c){return fract(sin(dot(c,vec2(12.9898,78.233)))*43758.5453);} mat3 rgb2yiq=mat3(0.299,0.587,0.114,0.596,-0.274,-0.322,0.211,-0.523,0.312); mat3 yiq2rgb=mat3(1.0,0.956,0.621,1.0,-0.272,-0.647,1.0,-1.106,1.703); vec3 hueShiftRGB(vec3 col,float deg){ vec3 yiq=rgb2yiq*col; float rad=radians(deg); float cosh=cos(rad),sinh=sin(rad); vec3 yiqShift=vec3(yiq.x,yiq.y*cosh-yiq.z*sinh,yiq.y*sinh+yiq.z*cosh); return clamp(yiq2rgb*yiqShift,0.0,1.0); } vec4 sigmoid(vec4 x){return 1./(1.+exp(-x));} vec4 cppn_fn(vec2 coordinate,float in0,float in1,float in2){ buf[6]=vec4(coordinate.x,coordinate.y,0.3948333106474662+in0,0.36+in1); buf[7]=vec4(0.14+in2,sqrt(coordinate.x*coordinate.x+coordinate.y*coordinate.y),0.,0.); buf[0]=mat4(vec4(6.5404263,-3.6126034,0.7590882,-1.13613),vec4(2.4582713,3.1660357,1.2219609,0.06276096),vec4(-5.478085,-6.159632,1.8701609,-4.7742867),vec4(6.039214,-5.542865,-0.90925294,3.251348))*buf[6]+mat4(vec4(0.8473259,-5.722911,3.975766,1.6522468),vec4(-0.24321538,0.5839259,-1.7661959,-5.350116),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(0.21808943,1.1243913,-1.7969975,5.0294676); buf[1]=mat4(vec4(-3.3522482,-6.0612736,0.55641043,-4.4719114),vec4(0.8631464,1.7432913,5.643898,1.6106541),vec4(2.4941394,-3.5012043,1.7184316,6.357333),vec4(3.310376,8.209261,1.1355612,-1.165539))*buf[6]+mat4(vec4(5.24046,-13.034365,0.009859298,15.870829),vec4(2.987511,3.129433,-0.89023495,-1.6822904),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-5.9457836,-6.573602,-0.8812491,1.5436668); buf[0]=sigmoid(buf[0]);buf[1]=sigmoid(buf[1]); buf[2]=mat4(vec4(-15.219568,8.095543,-2.429353,-1.9381982),vec4(-5.951362,4.3115187,2.6393783,1.274315),vec4(-7.3145227,6.7297835,5.2473326,5.9411426),vec4(5.0796127,8.979051,-1.7278991,-1.158976))*buf[6]+mat4(vec4(-11.967154,-11.608155,6.1486754,11.237008),vec4(2.124141,-6.263192,-1.7050359,-0.7021966),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-4.17164,-3.2281182,-4.576417,-3.6401186); buf[3]=mat4(vec4(3.1832156,-13.738922,1.879223,3.233465),vec4(0.64300746,12.768129,1.9141049,0.50990224),vec4(-0.049295485,4.4807224,1.4733979,1.801449),vec4(5.0039253,13.000481,3.3991797,-4.5561905))*buf[6]+mat4(vec4(-0.1285731,7.720628,-3.1425676,4.742367),vec4(0.6393625,3.714393,-0.8108378,-0.39174938),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-1.1811101,-21.621881,0.7851888,1.2329718); buf[2]=sigmoid(buf[2]);buf[3]=sigmoid(buf[3]); buf[4]=mat4(vec4(5.214916,-7.183024,2.7228765,2.6592617),vec4(-5.601878,-25.3591,4.067988,0.4602802),vec4(-10.57759,24.286327,21.102104,37.546658),vec4(4.3024497,-1.9625226,2.3458803,-1.372816))*buf[0]+mat4(vec4(-17.6526,-10.507558,2.2587414,12.462782),vec4(6.265566,-502.75443,-12.642513,0.9112289),vec4(-10.983244,20.741234,-9.701768,-0.7635988),vec4(5.383626,1.4819539,-4.1911616,-4.8444734))*buf[1]+mat4(vec4(12.785233,-16.345072,-0.39901125,1.7955981),vec4(-30.48365,-1.8345358,1.4542528,-1.1118771),vec4(19.872723,-7.337935,-42.941723,-98.52709),vec4(8.337645,-2.7312303,-2.2927687,-36.142323))*buf[2]+mat4(vec4(-16.298317,3.5471997,-0.44300047,-9.444417),vec4(57.5077,-35.609753,16.163465,-4.1534753),vec4(-0.07470326,-3.8656476,-7.0901804,3.1523974),vec4(-12.559385,-7.077619,1.490437,-0.8211543))*buf[3]+vec4(-7.67914,15.927437,1.3207729,-1.6686112); buf[5]=mat4(vec4(-1.4109162,-0.372762,-3.770383,-21.367174),vec4(-6.2103205,-9.35908,0.92529047,8.82561),vec4(11.460242,-22.348068,13.625772,-18.693201),vec4(-0.3429052,-3.9905605,-2.4626114,-0.45033523))*buf[0]+mat4(vec4(7.3481627,-4.3661838,-6.3037653,-3.868115),vec4(1.5462853,6.5488915,1.9701879,-0.58291394),vec4(6.5858274,-2.2180402,3.7127688,-1.3730392),vec4(-5.7973905,10.134961,-2.3395722,-5.965605))*buf[1]+mat4(vec4(-2.5132585,-6.6685553,-1.4029363,-0.16285264),vec4(-0.37908727,0.53738135,4.389061,-1.3024765),vec4(-0.70647055,2.0111287,-5.1659346,-3.728635),vec4(-13.562562,10.487719,-0.9173751,-2.6487076))*buf[2]+mat4(vec4(-8.645013,6.5546675,-6.3944063,-5.5933375),vec4(-0.57783127,-1.077275,36.91025,5.736769),vec4(14.283112,3.7146652,7.1452246,-4.5958776),vec4(2.7192075,3.6021907,-4.366337,-2.3653464))*buf[3]+vec4(-5.9000807,-4.329569,1.2427121,8.59503); buf[4]=sigmoid(buf[4]);buf[5]=sigmoid(buf[5]); buf[6]=mat4(vec4(-1.61102,0.7970257,1.4675229,0.20917463),vec4(-28.793737,-7.1390953,1.5025433,4.656581),vec4(-10.94861,39.66238,0.74318546,-10.095605),vec4(-0.7229728,-1.5483948,0.7301322,2.1687684))*buf[0]+mat4(vec4(3.2547753,21.489103,-1.0194173,-3.3100595),vec4(-3.7316632,-3.3792162,-7.223193,-0.23685838),vec4(13.1804495,0.7916005,5.338587,5.687114),vec4(-4.167605,-17.798311,-6.815736,-1.6451967))*buf[1]+mat4(vec4(0.604885,-7.800309,-7.213122,-2.741014),vec4(-3.522382,-0.12359311,-0.5258442,0.43852118),vec4(9.6752825,-22.853785,2.062431,0.099892326),vec4(-4.3196306,-17.730087,2.5184598,5.30267))*buf[2]+mat4(vec4(-6.545563,-15.790176,-6.0438633,-5.415399),vec4(-43.591583,28.551912,-16.00161,18.84728),vec4(4.212382,8.394307,3.0958717,8.657522),vec4(-5.0237565,-4.450633,-4.4768,-5.5010443))*buf[3]+mat4(vec4(1.6985557,-67.05806,6.897715,1.9004834),vec4(1.8680354,2.3915145,2.5231109,4.081538),vec4(11.158006,1.7294737,2.0738268,7.386411),vec4(-4.256034,-306.24686,8.258898,-17.132736))*buf[4]+mat4(vec4(1.6889864,-4.5852966,3.8534803,-6.3482175),vec4(1.3543309,-1.2640043,9.932754,2.9079645),vec4(-5.2770967,0.07150358,-0.13962056,3.3269649),vec4(28.34703,-4.918278,6.1044083,4.085355))*buf[5]+vec4(6.6818056,12.522166,-3.7075126,-4.104386); buf[7]=mat4(vec4(-8.265602,-4.7027016,5.098234,0.7509808),vec4(8.6507845,-17.15949,16.51939,-8.884479),vec4(-4.036479,-2.3946867,-2.6055532,-1.9866527),vec4(-2.2167742,-1.8135649,-5.9759874,4.8846445))*buf[0]+mat4(vec4(6.7790847,3.5076547,-2.8191125,-2.7028968),vec4(-5.743024,-0.27844876,1.4958696,-5.0517144),vec4(13.122226,15.735168,-2.9397483,-4.101023),vec4(-14.375265,-5.030483,-6.2599335,2.9848232))*buf[1]+mat4(vec4(4.0950394,-0.94011575,-5.674733,4.755022),vec4(4.3809423,4.8310084,1.7425908,-3.437416),vec4(2.117492,0.16342592,-104.56341,16.949184),vec4(-5.22543,-2.994248,3.8350096,-1.9364246))*buf[2]+mat4(vec4(-5.900337,1.7946124,-13.604192,-3.8060522),vec4(6.6583457,31.911177,25.164474,91.81147),vec4(11.840538,4.1503043,-0.7314397,6.768467),vec4(-6.3967767,4.034772,6.1714606,-0.32874924))*buf[3]+mat4(vec4(3.4992442,-196.91893,-8.923708,2.8142626),vec4(3.4806502,-3.1846354,5.1725626,5.1804223),vec4(-2.4009497,15.585794,1.2863957,2.0252278),vec4(-71.25271,-62.441242,-8.138444,0.50670296))*buf[4]+mat4(vec4(-12.291733,-11.176166,-7.3474145,4.390294),vec4(10.805477,5.6337385,-0.9385842,-4.7348723),vec4(-12.869276,-7.039391,5.3029537,7.5436664),vec4(1.4593618,8.91898,3.5101583,5.840625))*buf[5]+vec4(2.2415268,-6.705987,-0.98861027,-2.117676); buf[6]=sigmoid(buf[6]);buf[7]=sigmoid(buf[7]); buf[0]=mat4(vec4(1.6794263,1.3817469,2.9625452,0.),vec4(-1.8834411,-1.4806935,-3.5924516,0.),vec4(-1.3279216,-1.0918057,-2.3124623,0.),vec4(0.2662234,0.23235129,0.44178495,0.))*buf[0]+mat4(vec4(-0.6299101,-0.5945583,-0.9125601,0.),vec4(0.17828953,0.18300213,0.18182953,0.),vec4(-2.96544,-2.5819945,-4.9001055,0.),vec4(1.4195864,1.1868085,2.5176322,0.))*buf[1]+mat4(vec4(-1.2584374,-1.0552157,-2.1688404,0.),vec4(-0.7200217,-0.52666044,-1.438251,0.),vec4(0.15345335,0.15196142,0.272854,0.),vec4(0.945728,0.8861938,1.2766753,0.))*buf[2]+mat4(vec4(-2.4218085,-1.968602,-4.35166,0.),vec4(-22.683098,-18.0544,-41.954372,0.),vec4(0.63792,0.5470648,1.1078634,0.),vec4(-1.5489894,-1.3075932,-2.6444845,0.))*buf[3]+mat4(vec4(-0.49252132,-0.39877754,-0.91366625,0.),vec4(0.95609266,0.7923952,1.640221,0.),vec4(0.30616966,0.15693925,0.8639857,0.),vec4(1.1825981,0.94504964,2.176963,0.))*buf[4]+mat4(vec4(0.35446745,0.3293795,0.59547555,0.),vec4(-0.58784515,-0.48177817,-1.0614829,0.),vec4(2.5271258,1.9991658,4.6846647,0.),vec4(0.13042648,0.08864098,0.30187556,0.))*buf[5]+mat4(vec4(-1.7718065,-1.4033192,-3.3355875,0.),vec4(3.1664357,2.638297,5.378702,0.),vec4(-3.1724713,-2.6107926,-5.549295,0.),vec4(-2.851368,-2.249092,-5.3013067,0.))*buf[6]+mat4(vec4(1.5203838,1.2212278,2.8404984,0.),vec4(1.5210563,1.2651345,2.683903,0.),vec4(2.9789467,2.4364579,5.2347264,0.),vec4(2.2270417,1.8825914,3.8028636,0.))*buf[7]+vec4(-1.5468478,-3.6171484,0.24762098,0.); buf[0]=sigmoid(buf[0]); return vec4(buf[0].x,buf[0].y,buf[0].z,1.); } void mainImage(out vec4 fragColor,in vec2 fragCoord){ vec2 uv=fragCoord/uResolution.xy*2.-1.; uv.y*=-1.; uv+=uWarp*vec2(sin(uv.y*6.283+uTime*0.5),cos(uv.x*6.283+uTime*0.5))*0.05; fragColor=cppn_fn(uv,0.1*sin(0.3*uTime),0.1*sin(0.69*uTime),0.1*sin(0.44*uTime)); } void main(){ vec4 col;mainImage(col,gl_FragCoord.xy); col.rgb=hueShiftRGB(col.rgb,uHueShift); float scanline_val=sin(gl_FragCoord.y*uScanFreq)*0.5+0.5; col.rgb*=1.-(scanline_val*scanline_val)*uScan; col.rgb+=(rand(gl_FragCoord.xy+uTime)-0.5)*uNoise; gl_FragColor=vec4(clamp(col.rgb,0.0,1.0),1.0); } `;class Ek extends b.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught an error:",t,n)}render(){return this.state.hasError?this.props.fallback||g.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",background:"radial-gradient(circle at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,1) 100%)",zIndex:-1,pointerEvents:"none"}}):this.props.children}}function Tk({hueShift:e=30,noiseIntensity:t=.02,scanlineIntensity:n=.05,speed:r=.3,scanlineFrequency:i=.4,warpAmount:s=.1,resolutionScale:o=.5}){const a=b.useRef(null);return b.useEffect(()=>{const l=a.current;if(!l){console.error("DarkVeil: Canvas not found");return}let c,d,f;try{c=new l5({dpr:Math.min(window.devicePixelRatio,2),canvas:l});const w=c.gl;if(!w){console.error("DarkVeil: WebGL context not available");return}const y=new bk(w);d=new r5(w,{vertex:Pk,fragment:Ck,uniforms:{uTime:{value:0},uResolution:{value:new hc},uHueShift:{value:e},uNoise:{value:t},uScan:{value:n},uScanFreq:{value:i},uWarp:{value:s}}}),f=new ok(w,{geometry:y,program:d}),console.log("DarkVeil: Successfully initialized")}catch(w){console.error("DarkVeil: Initialization error:",w);return}const u=()=>{const w=window.innerWidth,y=window.innerHeight;c.setSize(w*o,y*o),d.uniforms.uResolution.value.set(w,y)};window.addEventListener("resize",u),u();const h=performance.now();let p=0;const m=()=>{d.uniforms.uTime.value=(performance.now()-h)/1e3*r,d.uniforms.uHueShift.value=e,d.uniforms.uNoise.value=t,d.uniforms.uScan.value=n,d.uniforms.uScanFreq.value=i,d.uniforms.uWarp.value=s,c.render({scene:f}),p=requestAnimationFrame(m)};return m(),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",u)}},[e,t,n,r,i,s,o]),g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",background:"radial-gradient(circle at center, rgba(20,10,30,0.9) 0%, rgba(0,0,0,1) 100%)",zIndex:-2,pointerEvents:"none"}}),g.jsx("canvas",{ref:a,style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:-1,pointerEvents:"none"}})]})}function uh(e){return g.jsx(Ek,{children:g.jsx(Tk,{...e})})}/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var jk={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.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),X=(e,t)=>{const n=b.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:l,...c},d)=>b.createElement("svg",{ref:d,...jk,width:i,height:i,stroke:r,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${Mk(e)}`,a].join(" "),...c},[...t.map(([f,u])=>b.createElement(f,u)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nk=X("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _k=X("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ak=X("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lk=X("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.294.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=X("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sg=X("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xe=X("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dk=X("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ch=X("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rk=X("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jt=X("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vk=X("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kg=X("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dh=X("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mc=X("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const an=X("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fk=X("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zk=X("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ok=X("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lo=X("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bg=X("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ik=X("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $k=X("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bk=X("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Uk=X("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=Gk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(gc);return a[0]===""&&a.length!==1&&a.shift(),Cg(a,t)||qk(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Cg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Cg(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(gc);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},fh=/^\[(.+)\]$/,qk=e=>{if(fh.test(e)){const t=fh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Gk=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Kk(Object.entries(e.classGroups),n).forEach(([s,o])=>{Hl(o,r,s,t)}),r},Hl=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:hh(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Yk(i)){Hl(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Hl(o,hh(t,s),n,r)})})},hh=(e,t)=>{let n=e;return t.split(gc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yk=e=>e.isThemeGetter,Kk=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,Qk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},Eg="!",Xk=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,d=0,f;for(let w=0;wd?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},Zk=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},Jk=e=>({cache:Qk(e.cacheSize),parseClassName:Xk(e),...Hk(e)}),eb=/\s+/,tb=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(eb);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:h}=n(c);let p=!!h,m=r(p?u.substring(0,h):u);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(u),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const w=Zk(d).join(":"),y=f?w+Eg:w,v=y+m;if(s.includes(v))continue;s.push(v);const x=i(m,p);for(let S=0;S0?" "+a:a)}return a};function nb(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(d),e());return n=Jk(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=tb(l,n);return i(l,d),d}return function(){return s(nb.apply(null,arguments))}}const G=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jg=/^\[(?:([a-z-]+):)?(.+)\]$/i,ib=/^\d+\/\d+$/,sb=new Set(["px","full","screen"]),ob=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ab=/\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$/,lb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ub=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vt=e=>pr(e)||sb.has(e)||ib.test(e),Ft=e=>Nr(e,"length",vb),pr=e=>!!e&&!Number.isNaN(Number(e)),Na=e=>Nr(e,"number",pr),$r=e=>!!e&&Number.isInteger(Number(e)),db=e=>e.endsWith("%")&&pr(e.slice(0,-1)),O=e=>jg.test(e),zt=e=>ob.test(e),fb=new Set(["length","size","percentage"]),hb=e=>Nr(e,fb,Mg),pb=e=>Nr(e,"position",Mg),mb=new Set(["image","url"]),gb=e=>Nr(e,mb,wb),yb=e=>Nr(e,"",xb),Br=()=>!0,Nr=(e,t,n)=>{const r=jg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},vb=e=>ab.test(e)&&!lb.test(e),Mg=()=>!1,xb=e=>ub.test(e),wb=e=>cb.test(e),Sb=()=>{const e=G("colors"),t=G("spacing"),n=G("blur"),r=G("brightness"),i=G("borderColor"),s=G("borderRadius"),o=G("borderSpacing"),a=G("borderWidth"),l=G("contrast"),c=G("grayscale"),d=G("hueRotate"),f=G("invert"),u=G("gap"),h=G("gradientColorStops"),p=G("gradientColorStopPositions"),m=G("inset"),w=G("margin"),y=G("opacity"),v=G("padding"),x=G("saturate"),S=G("scale"),k=G("sepia"),P=G("skew"),C=G("space"),E=G("translate"),N=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",O,t],A=()=>[O,t],B=()=>["",vt,Ft],L=()=>["auto",pr,O],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",O],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[pr,O];return{cacheSize:500,separator:":",theme:{colors:[Br],spacing:[vt,Ft],blur:["none","",zt,O],brightness:D(),borderColor:[e],borderRadius:["none","","full",zt,O],borderSpacing:A(),borderWidth:B(),contrast:D(),grayscale:R(),hueRotate:D(),invert:R(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[db,Ft],inset:I(),margin:I(),opacity:D(),padding:A(),saturate:D(),scale:D(),sepia:R(),skew:D(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",O]}],container:["container"],columns:[{columns:[zt]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:[...me(),O]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$r,O]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",O]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",$r,O]}],"grid-cols":[{"grid-cols":[Br]}],"col-start-end":[{col:["auto",{span:["full",$r,O]},O]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Br]}],"row-start-end":[{row:["auto",{span:[$r,O]},O]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",O]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",O]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",O,t]}],"min-w":[{"min-w":[O,t,"min","max","fit"]}],"max-w":[{"max-w":[O,t,"none","full","min","max","fit","prose",{screen:[zt]},zt]}],h:[{h:[O,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[O,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[O,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[O,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zt,Ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Na]}],"font-family":[{font:[Br]}],"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",O]}],"line-clamp":[{"line-clamp":["none",pr,Na]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vt,O]}],"list-image":[{"list-image":["none",O]}],"list-style-type":[{list:["none","disc","decimal",O]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vt,Ft]}],"underline-offset":[{"underline-offset":["auto",vt,O]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O]}],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",O]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"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":[y]}],"border-style":[{border:[...H(),"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":[y]}],"divide-style":[{divide:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[vt,O]}],"outline-w":[{outline:[vt,Ft]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[vt,Ft]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zt,yb]}],"shadow-color":[{shadow:[Br]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",zt,O]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",O]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",O]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",O]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[$r,O]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O]}],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",O]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",O]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vt,Ft,Na]}],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"]}}},kb=rb(Sb);function ph(...e){return kb(Wk(e))}function Ng(e){const t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3);return`${t}:${n.toString().padStart(2,"0")}`}function Ni(e){const t=new Date(e),r=(new Date().getTime()-t.getTime())/(1e3*60*60);return r<1?`${Math.floor(r*60)}m ago`:r<24?`${Math.floor(r)}h ago`:`${Math.floor(r/24)}d ago`}const bb=()=>{var l,c;const[e,t]=b.useState(!1),{currentUser:n,partnerUser:r,logout:i}=Tt(),s=yn(),o=[{name:"Dashboard",href:"/",icon:Xe},{name:"Last Listened",href:"/last-listened",icon:jt},{name:"Mixed Playlist",href:"/mixed-playlist",icon:kg},{name:"Memory Lane",href:"/memory-lane",icon:an}],a=()=>{i(),localStorage.removeItem("spotify-user"),localStorage.removeItem("spotify-partner")};return g.jsx(V.nav,{initial:{y:-100,opacity:0},animate:{y:0,opacity:1},className:"glass-fluid border-b border-white/10 sticky top-0 z-50",children:g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[g.jsxs("div",{className:"flex justify-between items-center h-16",children:[g.jsxs(bs,{to:"/",className:"flex items-center space-x-2",children:[g.jsx(V.div,{whileHover:{scale:1.1,rotate:5},className:"w-8 h-8 bg-gradient-to-br from-pink-500 to-red-500 rounded-full flex items-center justify-center",children:g.jsx(Xe,{className:"w-5 h-5 text-white"})}),g.jsx("span",{className:"text-xl font-bold gradient-text",children:"Our Musical Journey"})]}),g.jsx("div",{className:"hidden md:flex items-center space-x-1",children:o.map(d=>{const f=s.pathname===d.href;return g.jsxs(bs,{to:d.href,className:ph("flex items-center space-x-2 px-4 py-2 rounded-lg transition-all duration-300",f?"bg-spotify-green/20 text-spotify-green border border-spotify-green/30":"text-white/70 hover:text-white hover:bg-white/10"),children:[g.jsx(d.icon,{className:"w-4 h-4"}),g.jsx("span",{className:"font-medium",children:d.name})]},d.name)})}),g.jsxs("div",{className:"hidden md:flex items-center space-x-4",children:[r&&g.jsxs(V.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center space-x-2 text-sm text-white/70",children:[g.jsx(lo,{className:"w-4 h-4"}),g.jsxs("span",{children:["+ ",(l=r.user)==null?void 0:l.display_name]})]}),g.jsxs(V.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:a,className:"flex items-center space-x-2 px-3 py-2 rounded-lg text-white/70 hover:text-white hover:bg-red-500/20 transition-all duration-300",children:[g.jsx(ch,{className:"w-4 h-4"}),g.jsx("span",{className:"hidden lg:block",children:"Logout"})]})]}),g.jsx("button",{onClick:()=>t(!e),className:"md:hidden p-2 rounded-lg text-white/70 hover:text-white hover:bg-white/10 transition-all duration-300",children:e?g.jsx(Uk,{className:"w-6 h-6"}):g.jsx(Rk,{className:"w-6 h-6"})})]}),e&&g.jsx(V.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden py-4 border-t border-white/10",children:g.jsxs("div",{className:"space-y-2",children:[o.map(d=>{const f=s.pathname===d.href;return g.jsxs(bs,{to:d.href,onClick:()=>t(!1),className:ph("flex items-center space-x-3 px-4 py-3 rounded-lg transition-all duration-300",f?"bg-spotify-green/20 text-spotify-green border border-spotify-green/30":"text-white/70 hover:text-white hover:bg-white/10"),children:[g.jsx(d.icon,{className:"w-5 h-5"}),g.jsx("span",{className:"font-medium",children:d.name})]},d.name)}),g.jsxs("div",{className:"pt-4 border-t border-white/10",children:[r&&g.jsxs("div",{className:"flex items-center space-x-3 px-4 py-2 text-sm text-white/70",children:[g.jsx(lo,{className:"w-4 h-4"}),g.jsxs("span",{children:["Connected with ",(c=r.user)==null?void 0:c.display_name]})]}),g.jsxs("button",{onClick:a,className:"w-full flex items-center space-x-3 px-4 py-3 rounded-lg text-white/70 hover:text-white hover:bg-red-500/20 transition-all duration-300",children:[g.jsx(ch,{className:"w-5 h-5"}),g.jsx("span",{className:"font-medium",children:"Logout"})]})]})]})})]})})};var _g={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,i=null,s=function(u,h){return u.abort=h,u},o=function(u,h){var p;if(i!==null){var m=i.defer();u(function(w){m.resolve(w)},function(w){m.reject(w)}),p=m.promise}else window.Promise&&(p=new window.Promise(u));return p?new s(p,h):null},a=function(){var u=Array.prototype.slice.call(arguments),h=u[0],p=u.slice(1);return h=h||{},p.forEach(function(m){for(var w in m)m.hasOwnProperty(w)&&(h[w]=m[w])}),h},l=function(u,h){var p="";for(var m in h)if(h.hasOwnProperty(m)){var w=h[m];p+=encodeURIComponent(m)+"="+encodeURIComponent(w)+"&"}return p.length>0&&(p=p.substring(0,p.length-1),u=u+"?"+p),u},c=function(u,h){var p=new XMLHttpRequest,m=function(w,y){function v(P){w&&w(P),h&&h(null,P)}function x(){y&&y(p),h&&h(p,null)}var S=u.type||"GET";if(p.open(S,l(u.url,u.params)),r&&p.setRequestHeader("Authorization","Bearer "+r),p.onreadystatechange=function(){if(p.readyState===4){var P=null;try{P=p.responseText?JSON.parse(p.responseText):""}catch(C){console.error(C)}p.status>=200&&p.status<300?v(P):x()}},S==="GET")p.send(null);else{var k=null;u.postData&&(u.contentType==="image/jpeg"?(k=u.postData,p.setRequestHeader("Content-Type",u.contentType)):(k=JSON.stringify(u.postData),p.setRequestHeader("Content-Type","application/json"))),p.send(k)}};return h?(m(),null):o(m,function(){p.abort()})},d=function(u,h,p,m){var w={},y=null;typeof h=="object"?(w=h,y=p):typeof h=="function"&&(y=h);var v=u.type||"GET";return v!=="GET"&&u.postData&&!m?u.postData=a(u.postData,w):u.params=a(u.params,w),c(u,y)},f=function(){};return f.prototype={constructor:t},f.prototype.getGeneric=function(u,h){var p={url:u};return d(p,h)},f.prototype.getMe=function(u,h){var p={url:n+"/me"};return d(p,u,h)},f.prototype.getMySavedTracks=function(u,h){var p={url:n+"/me/tracks"};return d(p,u,h)},f.prototype.addToMySavedTracks=function(u,h,p){var m={url:n+"/me/tracks",type:"PUT",postData:u};return d(m,h,p)},f.prototype.removeFromMySavedTracks=function(u,h,p){var m={url:n+"/me/tracks",type:"DELETE",postData:u};return d(m,h,p)},f.prototype.containsMySavedTracks=function(u,h,p){var m={url:n+"/me/tracks/contains",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getMySavedAlbums=function(u,h){var p={url:n+"/me/albums"};return d(p,u,h)},f.prototype.addToMySavedAlbums=function(u,h,p){var m={url:n+"/me/albums",type:"PUT",postData:u};return d(m,h,p)},f.prototype.removeFromMySavedAlbums=function(u,h,p){var m={url:n+"/me/albums",type:"DELETE",postData:u};return d(m,h,p)},f.prototype.containsMySavedAlbums=function(u,h,p){var m={url:n+"/me/albums/contains",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getMyTopArtists=function(u,h){var p={url:n+"/me/top/artists"};return d(p,u,h)},f.prototype.getMyTopTracks=function(u,h){var p={url:n+"/me/top/tracks"};return d(p,u,h)},f.prototype.getMyRecentlyPlayedTracks=function(u,h){var p={url:n+"/me/player/recently-played"};return d(p,u,h)},f.prototype.followUsers=function(u,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:u.join(","),type:"user"}};return d(p,h)},f.prototype.followArtists=function(u,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:u.join(","),type:"artist"}};return d(p,h)},f.prototype.followPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u+"/followers",type:"PUT",postData:{}};return d(m,h,p)},f.prototype.unfollowUsers=function(u,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:u.join(","),type:"user"}};return d(p,h)},f.prototype.unfollowArtists=function(u,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:u.join(","),type:"artist"}};return d(p,h)},f.prototype.unfollowPlaylist=function(u,h){var p={url:n+"/playlists/"+u+"/followers",type:"DELETE"};return d(p,h)},f.prototype.isFollowingUsers=function(u,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:u.join(","),type:"user"}};return d(p,h)},f.prototype.isFollowingArtists=function(u,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:u.join(","),type:"artist"}};return d(p,h)},f.prototype.areFollowingPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u+"/followers/contains",type:"GET",params:{ids:h.join(",")}};return d(m,p)},f.prototype.getFollowedArtists=function(u,h){var p={url:n+"/me/following",type:"GET",params:{type:"artist"}};return d(p,u,h)},f.prototype.getUser=function(u,h,p){var m={url:n+"/users/"+encodeURIComponent(u)};return d(m,h,p)},f.prototype.getUserPlaylists=function(u,h,p){var m;return typeof u=="string"?m={url:n+"/users/"+encodeURIComponent(u)+"/playlists"}:(m={url:n+"/me/playlists"},p=h,h=u),d(m,h,p)},f.prototype.getPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u};return d(m,h,p)},f.prototype.getPlaylistTracks=function(u,h,p){var m={url:n+"/playlists/"+u+"/tracks"};return d(m,h,p)},f.prototype.getPlaylistCoverImage=function(u,h){var p={url:n+"/playlists/"+u+"/images"};return d(p,h)},f.prototype.createPlaylist=function(u,h,p){var m={url:n+"/users/"+encodeURIComponent(u)+"/playlists",type:"POST",postData:h};return d(m,h,p)},f.prototype.changePlaylistDetails=function(u,h,p){var m={url:n+"/playlists/"+u,type:"PUT",postData:h};return d(m,h,p)},f.prototype.addTracksToPlaylist=function(u,h,p,m){var w={url:n+"/playlists/"+u+"/tracks",type:"POST",postData:{uris:h}};return d(w,p,m,!0)},f.prototype.replaceTracksInPlaylist=function(u,h,p){var m={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{uris:h}};return d(m,{},p)},f.prototype.reorderTracksInPlaylist=function(u,h,p,m,w){var y={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{range_start:h,insert_before:p}};return d(y,m,w)},f.prototype.removeTracksFromPlaylist=function(u,h,p){var m=h.map(function(y){return typeof y=="string"?{uri:y}:y}),w={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:m}};return d(w,{},p)},f.prototype.removeTracksFromPlaylistWithSnapshotId=function(u,h,p,m){var w=h.map(function(v){return typeof v=="string"?{uri:v}:v}),y={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:w,snapshot_id:p}};return d(y,{},m)},f.prototype.removeTracksFromPlaylistInPositions=function(u,h,p,m){var w={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{positions:h,snapshot_id:p}};return d(w,{},m)},f.prototype.uploadCustomPlaylistCoverImage=function(u,h,p){var m={url:n+"/playlists/"+u+"/images",type:"PUT",postData:h.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return d(m,{},p)},f.prototype.getAlbum=function(u,h,p){var m={url:n+"/albums/"+u};return d(m,h,p)},f.prototype.getAlbumTracks=function(u,h,p){var m={url:n+"/albums/"+u+"/tracks"};return d(m,h,p)},f.prototype.getAlbums=function(u,h,p){var m={url:n+"/albums/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getTrack=function(u,h,p){var m={};return m.url=n+"/tracks/"+u,d(m,h,p)},f.prototype.getTracks=function(u,h,p){var m={url:n+"/tracks/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getArtist=function(u,h,p){var m={url:n+"/artists/"+u};return d(m,h,p)},f.prototype.getArtists=function(u,h,p){var m={url:n+"/artists/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getArtistAlbums=function(u,h,p){var m={url:n+"/artists/"+u+"/albums"};return d(m,h,p)},f.prototype.getArtistTopTracks=function(u,h,p,m){var w={url:n+"/artists/"+u+"/top-tracks",params:{country:h}};return d(w,p,m)},f.prototype.getArtistRelatedArtists=function(u,h,p){var m={url:n+"/artists/"+u+"/related-artists"};return d(m,h,p)},f.prototype.getFeaturedPlaylists=function(u,h){var p={url:n+"/browse/featured-playlists"};return d(p,u,h)},f.prototype.getNewReleases=function(u,h){var p={url:n+"/browse/new-releases"};return d(p,u,h)},f.prototype.getCategories=function(u,h){var p={url:n+"/browse/categories"};return d(p,u,h)},f.prototype.getCategory=function(u,h,p){var m={url:n+"/browse/categories/"+u};return d(m,h,p)},f.prototype.getCategoryPlaylists=function(u,h,p){var m={url:n+"/browse/categories/"+u+"/playlists"};return d(m,h,p)},f.prototype.search=function(u,h,p,m){var w={url:n+"/search/",params:{q:u,type:h.join(",")}};return d(w,p,m)},f.prototype.searchAlbums=function(u,h,p){return this.search(u,["album"],h,p)},f.prototype.searchArtists=function(u,h,p){return this.search(u,["artist"],h,p)},f.prototype.searchTracks=function(u,h,p){return this.search(u,["track"],h,p)},f.prototype.searchPlaylists=function(u,h,p){return this.search(u,["playlist"],h,p)},f.prototype.searchShows=function(u,h,p){return this.search(u,["show"],h,p)},f.prototype.searchEpisodes=function(u,h,p){return this.search(u,["episode"],h,p)},f.prototype.getAudioFeaturesForTrack=function(u,h){var p={};return p.url=n+"/audio-features/"+u,d(p,{},h)},f.prototype.getAudioFeaturesForTracks=function(u,h){var p={url:n+"/audio-features",params:{ids:u}};return d(p,{},h)},f.prototype.getAudioAnalysisForTrack=function(u,h){var p={};return p.url=n+"/audio-analysis/"+u,d(p,{},h)},f.prototype.getRecommendations=function(u,h){var p={url:n+"/recommendations"};return d(p,u,h)},f.prototype.getAvailableGenreSeeds=function(u){var h={url:n+"/recommendations/available-genre-seeds"};return d(h,{},u)},f.prototype.getMyDevices=function(u){var h={url:n+"/me/player/devices"};return d(h,{},u)},f.prototype.getMyCurrentPlaybackState=function(u,h){var p={url:n+"/me/player"};return d(p,u,h)},f.prototype.getMyCurrentPlayingTrack=function(u,h){var p={url:n+"/me/player/currently-playing"};return d(p,u,h)},f.prototype.transferMyPlayback=function(u,h,p){var m=h||{};m.device_ids=u;var w={type:"PUT",url:n+"/me/player",postData:m};return d(w,h,p)},f.prototype.play=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={};["context_uri","uris","offset","position_ms"].forEach(function(v){v in u&&(m[v]=u[v])});var w={type:"PUT",url:n+"/me/player/play",params:p,postData:m},y=typeof u=="function"?u:{};return d(w,y,h)},f.prototype.queue=function(u,h,p){h=h||{};var m="device_id"in h?{uri:u,device_id:h.device_id}:{uri:u},w={type:"POST",url:n+"/me/player/queue",params:m};return d(w,h,p)},f.prototype.pause=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={type:"PUT",url:n+"/me/player/pause",params:p};return d(m,u,h)},f.prototype.skipToNext=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={type:"POST",url:n+"/me/player/next",params:p};return d(m,u,h)},f.prototype.skipToPrevious=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,m={type:"POST",url:n+"/me/player/previous",params:p};return d(m,u,h)},f.prototype.seek=function(u,h,p){h=h||{};var m={position_ms:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/seek",params:m};return d(w,h,p)},f.prototype.setRepeat=function(u,h,p){h=h||{};var m={state:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/repeat",params:m};return d(w,h,p)},f.prototype.setVolume=function(u,h,p){h=h||{};var m={volume_percent:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/volume",params:m};return d(w,h,p)},f.prototype.setShuffle=function(u,h,p){h=h||{};var m={state:u};"device_id"in h&&(m.device_id=h.device_id);var w={type:"PUT",url:n+"/me/player/shuffle",params:m};return d(w,h,p)},f.prototype.getShow=function(u,h,p){var m={};return m.url=n+"/shows/"+u,d(m,h,p)},f.prototype.getShows=function(u,h,p){var m={url:n+"/shows/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getMySavedShows=function(u,h){var p={url:n+"/me/shows"};return d(p,u,h)},f.prototype.addToMySavedShows=function(u,h,p){var m={url:n+"/me/shows",type:"PUT",postData:u};return d(m,h,p)},f.prototype.removeFromMySavedShows=function(u,h,p){var m={url:n+"/me/shows",type:"DELETE",postData:u};return d(m,h,p)},f.prototype.containsMySavedShows=function(u,h,p){var m={url:n+"/me/shows/contains",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getShowEpisodes=function(u,h,p){var m={url:n+"/shows/"+u+"/episodes"};return d(m,h,p)},f.prototype.getEpisode=function(u,h,p){var m={};return m.url=n+"/episodes/"+u,d(m,h,p)},f.prototype.getEpisodes=function(u,h,p){var m={url:n+"/episodes/",params:{ids:u.join(",")}};return d(m,h,p)},f.prototype.getAccessToken=function(){return r},f.prototype.setAccessToken=function(u){r=u},f.prototype.setPromiseImplementation=function(u){var h=!1;try{var p=new u(function(m){m()});typeof p.then=="function"&&typeof p.catch=="function"&&(h=!0)}catch(m){console.error(m)}if(h)i=u;else throw new Error("Unsupported implementation of Promises/A+")},f}();e.exports=t})(_g);var Pb=_g.exports;const Cb=ql(Pb),Ag="7cab80d02df44a5bb96725be60a45875",yc="https://159.195.9.107:3443/callback.html";console.log("🔍 Debug - Current redirect URI:",yc);console.log("🔍 Debug - Environment VITE_REDIRECT_URI:","https://159.195.9.107:3443/callback.html");const Fe=new Cb,Eb=()=>{const e=["user-read-private","user-read-email","user-read-recently-played","user-top-read","playlist-read-private","playlist-read-collaborative","user-read-playback-state","user-modify-playback-state","user-read-currently-playing"].join(" "),n=`https://accounts.spotify.com/authorize?${new URLSearchParams({client_id:Ag,response_type:"code",redirect_uri:yc,scope:e,show_dialog:"true"}).toString()}`;return console.log("🔍 Debug - Generated Spotify Auth URL:",n),n},Tb=async e=>{const t=await fetch("https://accounts.spotify.com/api/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${btoa(`${Ag}:8c8da787e3bf443e90c2c4b1bf1f19a3`)}`},body:new URLSearchParams({grant_type:"authorization_code",code:e,redirect_uri:yc})});if(!t.ok)throw new Error("Failed to exchange code for token");return t.json()},jb=async e=>(Fe.setAccessToken(e),Fe.getMe()),Mb=async(e,t=20)=>(Fe.setAccessToken(e),(await Fe.getMyRecentlyPlayedTracks({limit:t})).items),Nb=async(e,t="short_term",n=20)=>(Fe.setAccessToken(e),(await Fe.getMyTopTracks({time_range:t,limit:n})).items),_b=async(e,t,n,r)=>(Fe.setAccessToken(e),await Fe.createPlaylist(t,{name:n,description:r,public:!1})),Ab=async(e,t,n)=>{Fe.setAccessToken(e),await Fe.addTracksToPlaylist(t,n)},Lb=async(e,t)=>{Fe.setAccessToken(e),await Fe.play({uris:[t]})},Db=async e=>{Fe.setAccessToken(e),await Fe.pause()},Rb=(e,t,n="Our Mixed Vibes")=>[...e,...t].filter((l,c,d)=>c===d.findIndex(f=>f.id===l.id)).sort((l,c)=>c.popularity-l.popularity).slice(0,30).sort(()=>Math.random()-.5).slice(0,25),Vb=()=>{const[e,t]=b.useState(!1),n=()=>{t(!0),window.location.href=Eb()},r=[{icon:jt,title:"Last Listened",description:"Discover what your partner is listening to right now and play it instantly"},{icon:an,title:"Mixed Playlist",description:"AI-powered playlists that blend your musical tastes perfectly"},{icon:Xe,title:"Memory Lane",description:"Create beautiful musical memories and shared experiences together"}];return g.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 bg-black",children:g.jsxs("div",{className:"max-w-4xl w-full relative",children:[g.jsxs(V.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center mb-12",children:[g.jsx(V.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:"w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-pink-500 to-red-500 rounded-full flex items-center justify-center",children:g.jsx(Xe,{className:"w-10 h-10 text-white"})}),g.jsxs("h1",{className:"text-5xl md:text-6xl font-bold mb-4",children:[g.jsx("span",{className:"gradient-text",children:"Our Musical"}),g.jsx("br",{}),g.jsx("span",{className:"text-white",children:"Journey"})]}),g.jsx("p",{className:"text-xl text-white/70 max-w-2xl mx-auto leading-relaxed",children:"A private space where two hearts connect through music. Discover, share, and create beautiful musical memories together."})]}),g.jsx(V.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.4,duration:.8},className:"grid md:grid-cols-3 gap-6 mb-12",children:r.map((i,s)=>g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5+s*.1},whileHover:{y:-8,scale:1.03},className:"glass-bubble rounded-3xl p-8 text-center group cursor-pointer",children:[g.jsx(V.div,{whileHover:{rotate:15,scale:1.15},className:"w-16 h-16 mx-auto mb-6 bg-gradient-to-br from-purple-500/30 via-blue-500/30 to-pink-500/30 rounded-2xl flex items-center justify-center backdrop-blur-sm",children:g.jsx(i.icon,{className:"w-8 h-8 text-white"})}),g.jsx("h3",{className:"text-2xl font-bold text-white mb-3",children:i.title}),g.jsx("p",{className:"text-white/70 text-sm leading-relaxed",children:i.description})]},i.title))}),g.jsxs(V.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.8,duration:.6},className:"glass-fluid rounded-3xl p-10 max-w-lg mx-auto",children:[g.jsxs("div",{className:"text-center mb-8",children:[g.jsx(V.div,{initial:{scale:0},animate:{scale:1},transition:{delay:1,type:"spring",stiffness:200},className:"w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-purple-500/30 via-blue-500/30 to-pink-500/30 rounded-2xl flex items-center justify-center backdrop-blur-sm",children:g.jsx(bg,{className:"w-10 h-10 text-white"})}),g.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:"Begin Your Journey"}),g.jsx("p",{className:"text-white/70 text-lg",children:"Connect your Spotify account to start your musical love story"})]}),g.jsx(V.button,{whileHover:{scale:1.05,boxShadow:"0 15px 40px rgba(147, 51, 234, 0.4)"},whileTap:{scale:.95},onClick:n,disabled:e,className:"w-full bg-gradient-to-r from-purple-600 via-blue-600 to-pink-600 hover:from-purple-700 hover:via-blue-700 hover:to-pink-700 text-white font-bold py-5 px-8 rounded-2xl transition-all duration-300 flex items-center justify-center space-x-3 disabled:opacity-50 shadow-2xl",children:e?g.jsx("div",{className:"w-6 h-6 border-2 border-white border-t-transparent rounded-full animate-spin"}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-lg",children:"Connect with Spotify"}),g.jsx(Nk,{className:"w-6 h-6"})]})}),g.jsx("p",{className:"text-sm text-white/60 text-center mt-6 leading-relaxed",children:"We'll only access your listening history and playlist data to create your personalized musical journey"})]}),g.jsx(V.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.6},className:"text-center mt-12",children:g.jsx("p",{className:"text-white/40 text-sm",children:"Made with 💕 for a special someone"})})]})})},Fb=()=>{var i,s,o,a;const{currentUser:e,partnerUser:t}=Tt(),n=[{title:"Last Listened",description:"See what your partner is listening to right now",icon:jt,href:"/last-listened",color:"from-blue-500 to-purple-600",bgColor:"bg-blue-500/10",borderColor:"border-blue-500/30"},{title:"Mixed Playlist",description:"Create AI-powered playlists blending both your tastes",icon:kg,href:"/mixed-playlist",color:"from-green-500 to-emerald-600",bgColor:"bg-green-500/10",borderColor:"border-green-500/30"},{title:"Memory Lane",description:"Your shared musical journey and memories",icon:an,href:"/memory-lane",color:"from-pink-500 to-rose-600",bgColor:"bg-pink-500/10",borderColor:"border-pink-500/30"}],r=()=>{var l;return(l=e==null?void 0:e.recentlyPlayed)!=null&&l[0]?Ni(e.recentlyPlayed[0].played_at):null};return g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2",children:["Welcome back, ",g.jsx("span",{className:"gradient-text",children:(i=e==null?void 0:e.user)==null?void 0:i.display_name})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"Ready to explore your musical connection together?"})]}),g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mb-8",children:t?g.jsx("div",{className:"glass-bubble rounded-3xl p-8 border border-spotify-green/30 glow",children:g.jsxs("div",{className:"flex items-center space-x-6",children:[g.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-spotify-green to-green-600 rounded-2xl flex items-center justify-center",children:g.jsx(Xe,{className:"w-8 h-8 text-white"})}),g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xl font-semibold text-white",children:["Connected with ",(s=t.user)==null?void 0:s.display_name]}),g.jsx("p",{className:"text-white/70",children:"Your musical journey is ready to begin! 💕"})]})]})}):g.jsx("div",{className:"glass-bubble rounded-3xl p-8 border border-orange-500/30",children:g.jsxs("div",{className:"flex items-center space-x-6",children:[g.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-orange-500 to-red-500 rounded-2xl flex items-center justify-center",children:g.jsx(mc,{className:"w-8 h-8 text-white"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-semibold text-white",children:"Invite your partner"}),g.jsx("p",{className:"text-white/70",children:"Share this link so your partner can connect their Spotify account"}),g.jsx("button",{className:"mt-2 bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-lg transition-colors",children:"Share Connection Link"})]})]})})}),g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[g.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500/30 to-cyan-500/30 rounded-xl flex items-center justify-center",children:g.jsx(pc,{className:"w-6 h-6 text-blue-400"})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-white/70 text-sm",children:"Your last played"}),g.jsx("p",{className:"text-white font-semibold",children:r()||"No recent plays"})]})]})}),g.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-green-500/30 to-emerald-500/30 rounded-xl flex items-center justify-center",children:g.jsx(Ok,{className:"w-6 h-6 text-green-400"})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-white/70 text-sm",children:"Top tracks analyzed"}),g.jsxs("p",{className:"text-white font-semibold",children:[((o=e==null?void 0:e.topTracks)==null?void 0:o.length)||0," songs"]})]})]})}),g.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-purple-500/30 to-pink-500/30 rounded-xl flex items-center justify-center",children:g.jsx(lo,{className:"w-6 h-6 text-purple-400"})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-white/70 text-sm",children:"Recently played"}),g.jsxs("p",{className:"text-white font-semibold",children:[((a=e==null?void 0:e.recentlyPlayed)==null?void 0:a.length)||0," tracks"]})]})]})})]}),g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"grid md:grid-cols-3 gap-6",children:n.map((l,c)=>g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4+c*.1},whileHover:{y:-5,scale:1.02},children:g.jsx(bs,{to:l.href,children:g.jsxs("div",{className:`glass rounded-2xl p-6 h-full border ${l.borderColor} group cursor-pointer transition-all duration-300 hover:shadow-xl`,children:[g.jsx("div",{className:`w-12 h-12 ${l.bgColor} rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300`,children:g.jsx(l.icon,{className:"w-6 h-6 text-white"})}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:l.title}),g.jsx("p",{className:"text-white/70 text-sm leading-relaxed mb-4",children:l.description}),g.jsx("div",{className:`w-full h-1 bg-gradient-to-r ${l.color} rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-300`})]})})},l.title))}),(e==null?void 0:e.recentlyPlayed)&&e.recentlyPlayed.length>0&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"mt-8",children:[g.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Your Recent Activity"}),g.jsx("div",{className:"glass rounded-2xl p-6",children:g.jsx("div",{className:"space-y-4",children:e.recentlyPlayed.slice(0,3).map((l,c)=>{var d,f;return g.jsxs(V.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.7+c*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors",children:[g.jsx("img",{src:((d=l.track.album.images[0])==null?void 0:d.url)||"/placeholder-album.png",alt:l.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h4",{className:"text-white font-medium",children:l.track.name}),g.jsx("p",{className:"text-white/70 text-sm",children:(f=l.track.artists[0])==null?void 0:f.name})]}),g.jsx("div",{className:"text-white/50 text-sm",children:Ni(l.played_at)})]},l.track.id)})})})]})]})},mh=()=>{const[e]=dx(),t=To(),{setCurrentUser:n,setPartnerUser:r,currentUser:i}=Tt(),[s,o]=b.useState("loading"),[a,l]=b.useState("");b.useEffect(()=>{(async()=>{try{const u=e.get("code"),h=e.get("error");if(console.log("🔍 CallbackPage - Code:",u),console.log("🔍 CallbackPage - Error:",h),h)throw new Error("Spotify authorization was denied");if(!u)throw new Error("No authorization code received");l("Exchanging authorization code..."),console.log("🔍 CallbackPage - Exchanging code for tokens...");const p=await Tb(u);console.log("🔍 CallbackPage - Token data received:",!!p.access_token),l("Fetching your profile..."),console.log("🔍 CallbackPage - Fetching user profile...");const m=await jb(p.access_token);console.log("🔍 CallbackPage - User profile received:",m.display_name),l("Loading your music data...");const[w,y]=await Promise.all([Mb(p.access_token),Nb(p.access_token)]),v={user:m,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,recentlyPlayed:w,topTracks:y,topArtists:[]};localStorage.setItem("spotify-user",JSON.stringify(v)),i?(r(v),localStorage.setItem("spotify-partner",JSON.stringify(v)),l("Partner connected! Your musical journey begins...")):(n(v),l("Welcome! Setting up your musical journey...")),o("success"),Ne.success(i?"Partner connected successfully!":"Successfully connected to Spotify!",{duration:3e3}),setTimeout(()=>{t("/")},2e3)}catch(u){console.error("🔍 CallbackPage - ERROR:",u),console.error("🔍 CallbackPage - Error details:",{message:u instanceof Error?u.message:"Unknown error",stack:u instanceof Error?u.stack:void 0}),o("error"),l(u instanceof Error?u.message:"An unexpected error occurred"),Ne.error("Failed to connect to Spotify. Please try again."),setTimeout(()=>{t("/")},3e3)}})()},[e,t,n,r,i]);const c=()=>{switch(s){case"loading":return g.jsx(Dk,{className:"w-12 h-12 text-spotify-green animate-spin"});case"success":return g.jsx(Lk,{className:"w-12 h-12 text-green-400"});case"error":return g.jsx(Bk,{className:"w-12 h-12 text-red-400"})}},d=()=>{switch(s){case"loading":return"border-spotify-green/30";case"success":return"border-green-400/30";case"error":return"border-red-400/30"}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 bg-black",children:g.jsxs(V.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"glass-fluid rounded-3xl p-10 max-w-md w-full text-center",children:[g.jsx(V.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:`w-20 h-20 mx-auto mb-6 rounded-full border-2 flex items-center justify-center ${d()}`,children:c()}),g.jsxs(V.h2,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-2xl font-bold text-white mb-4",children:[s==="loading"&&"Connecting...",s==="success"&&"Success!",s==="error"&&"Connection Failed"]}),g.jsx(V.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"text-white/70 mb-6",children:a}),s==="loading"&&g.jsx(V.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},className:"w-full bg-white/10 rounded-full h-2 mb-4",children:g.jsx(V.div,{className:"bg-spotify-green h-2 rounded-full",initial:{width:0},animate:{width:"100%"},transition:{duration:3,ease:"easeInOut"}})}),s==="error"&&g.jsx(V.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>t("/"),className:"bg-spotify-green hover:bg-spotify-green/90 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-300",children:"Try Again"}),s==="success"&&g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"text-spotify-green text-sm",children:"Redirecting you to your musical journey..."})]})})},zb=()=>{var u,h;const{currentUser:e,partnerUser:t,currentTrack:n,isPlaying:r,setCurrentTrack:i,setIsPlaying:s}=Tt(),[o,a]=b.useState(!1),[l,c]=b.useState(null),d=async(p,m)=>{var w,y;if(!(e!=null&&e.accessToken)){Ne.error("Not authenticated with Spotify");return}try{a(!0),c(m),r&&l===m?(await Db(e.accessToken),s(!1),i(null),c(null)):(await Lb(e.accessToken,p),s(!0),i(((y=(w=e.recentlyPlayed)==null?void 0:w.find(v=>v.track.id===m))==null?void 0:y.track)||null)),Ne.success(r&&l===m?"Paused":"Now playing")}catch(v){console.error("Playback error:",v),Ne.error("Failed to play track. Make sure Spotify is open on your device.")}finally{a(!1)}},f=({user:p,title:m,isPartner:w=!1})=>{var v,x;if(!((v=p==null?void 0:p.recentlyPlayed)!=null&&v.length))return g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[g.jsx(jt,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No recent activity"}),g.jsxs("p",{className:"text-white/70",children:[w?"Your partner":"You"," haven't played any music recently"]})]});const y=p.recentlyPlayed[0];return g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-6",children:[g.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[g.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center ${w?"bg-gradient-to-br from-pink-500 to-purple-600":"bg-gradient-to-br from-blue-500 to-cyan-600"}`,children:g.jsx(lo,{className:"w-6 h-6 text-white"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-2xl font-bold text-white",children:m}),g.jsxs("p",{className:"text-white/70",children:["Last played: ",Ni(y.played_at)]})]})]}),g.jsx(V.div,{whileHover:{scale:1.02},className:"bg-white/5 rounded-xl p-6 mb-6 border border-white/10",children:g.jsxs("div",{className:"flex items-center space-x-6",children:[g.jsxs("div",{className:"relative",children:[g.jsx("img",{src:((x=y.track.album.images[0])==null?void 0:x.url)||"/placeholder-album.png",alt:y.track.album.name,className:"w-20 h-20 rounded-lg object-cover"}),r&&l===y.track.id&&g.jsx("div",{className:"absolute inset-0 bg-spotify-green/20 rounded-lg flex items-center justify-center",children:g.jsx(Ik,{className:"w-6 h-6 text-spotify-green"})})]}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h3",{className:"text-xl font-semibold text-white mb-1",children:y.track.name}),g.jsx("p",{className:"text-white/70 mb-2",children:y.track.artists.map(S=>S.name).join(", ")}),g.jsxs("p",{className:"text-white/50 text-sm",children:[y.track.album.name," • ",Ng(y.track.duration_ms)]})]}),g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("button",{onClick:()=>d(y.track.external_urls.spotify,y.track.id),disabled:o,className:`w-12 h-12 rounded-full flex items-center justify-center transition-all duration-300 ${r&&l===y.track.id?"bg-red-500 hover:bg-red-600 text-white":"bg-spotify-green hover:bg-spotify-green/90 text-white"} disabled:opacity-50`,children:o&&l===y.track.id?g.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):r&&l===y.track.id?g.jsx(Vk,{className:"w-5 h-5"}):g.jsx(dh,{className:"w-5 h-5 ml-0.5"})}),g.jsx("a",{href:y.track.external_urls.spotify,target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:g.jsx(Sg,{className:"w-4 h-4 text-white"})})]})]})}),g.jsxs("div",{children:[g.jsxs("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center space-x-2",children:[g.jsx(pc,{className:"w-5 h-5"}),g.jsx("span",{children:"Recent History"})]}),g.jsx("div",{className:"space-y-3",children:p.recentlyPlayed.slice(0,5).map((S,k)=>{var P,C;return g.jsxs(V.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:k*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors group",children:[g.jsx("img",{src:((P=S.track.album.images[0])==null?void 0:P.url)||"/placeholder-album.png",alt:S.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h4",{className:"text-white font-medium group-hover:text-spotify-green transition-colors",children:S.track.name}),g.jsx("p",{className:"text-white/70 text-sm",children:(C=S.track.artists[0])==null?void 0:C.name})]}),g.jsx("div",{className:"text-white/50 text-sm",children:Ni(S.played_at)}),g.jsx("button",{onClick:()=>d(S.track.external_urls.spotify,S.track.id),disabled:o,className:"opacity-0 group-hover:opacity-100 w-8 h-8 rounded-full bg-spotify-green hover:bg-spotify-green/90 flex items-center justify-center transition-all disabled:opacity-50",children:g.jsx(dh,{className:"w-4 h-4 text-white ml-0.5"})})]},S.track.id)})})]})]})};return g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[g.jsx(Xe,{className:"w-10 h-10 text-spotify-green"}),g.jsx("span",{children:"What's Playing"})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"Discover what you and your partner are listening to right now"})]}),g.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[e&&g.jsx(f,{user:e,title:`${(u=e.user)==null?void 0:u.display_name}'s Music`,isPartner:!1}),t&&g.jsx(f,{user:t,title:`${(h=t.user)==null?void 0:h.display_name}'s Music`,isPartner:!0}),!t&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[g.jsx(Xe,{className:"w-16 h-16 mx-auto mb-4 text-pink-400"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Waiting for your partner"}),g.jsx("p",{className:"text-white/70 mb-4",children:"Invite your partner to connect their Spotify account to see their music"}),g.jsx("button",{className:"bg-pink-500 hover:bg-pink-600 text-white px-6 py-3 rounded-lg transition-colors",children:"Send Invitation"})]})]})]})},Ob=()=>{const{currentUser:e,partnerUser:t,mixedPlaylists:n,addMixedPlaylist:r,removeMixedPlaylist:i}=Tt(),[s,o]=b.useState(!1),[a,l]=b.useState(!1),[c,d]=b.useState(null),f=async()=>{var w,y;if(!(e!=null&&e.topTracks)||!(t!=null&&t.topTracks)){Ne.error("Both users need to have their music data loaded");return}o(!0);try{await new Promise(x=>setTimeout(x,2e3));const v=Rb(e.topTracks,t.topTracks,"Our Perfect Mix");d({id:Date.now().toString(),name:"Our Perfect Mix",description:`A beautiful blend of ${(w=e.user)==null?void 0:w.display_name} and ${(y=t.user)==null?void 0:y.display_name}'s musical tastes`,tracks:v,createdAt:new Date,createdBy:"AI Magic ✨"}),Ne.success("Playlist generated successfully!")}catch(v){console.error("Playlist generation error:",v),Ne.error("Failed to generate playlist")}finally{o(!1)}},u=async()=>{if(!c||!(e!=null&&e.accessToken)||!(e!=null&&e.user)){Ne.error("Unable to create playlist");return}l(!0);try{const w=await _b(e.accessToken,e.user.id,c.name,c.description),y=c.tracks.map(v=>v.external_urls.spotify);await Ab(e.accessToken,w.id,y),r({...c,spotifyId:w.id,spotifyUrl:w.external_urls.spotify}),Ne.success("Playlist created on Spotify!"),d(null)}catch(w){console.error("Spotify playlist creation error:",w),Ne.error("Failed to create playlist on Spotify")}finally{l(!1)}},h=()=>{c&&(r(c),d(null),Ne.success("Playlist saved locally!"))},p=({playlist:w,isNew:y=!1})=>g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{scale:1.02},className:`glass rounded-2xl p-6 ${y?"border-spotify-green/50":"border-white/10"}`,children:[g.jsxs("div",{className:"flex items-start justify-between mb-4",children:[g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("div",{className:`w-16 h-16 rounded-xl flex items-center justify-center ${y?"bg-gradient-to-br from-spotify-green to-green-600":"bg-gradient-to-br from-purple-500 to-pink-500"}`,children:y?g.jsx(an,{className:"w-8 h-8 text-white"}):g.jsx(jt,{className:"w-8 h-8 text-white"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-semibold text-white",children:w.name}),g.jsx("p",{className:"text-white/70 text-sm",children:w.description}),g.jsxs("p",{className:"text-white/50 text-xs mt-1",children:["Created ",y?"just now":new Date(w.createdAt).toLocaleDateString()," • ",w.tracks.length," tracks"]})]})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[w.spotifyUrl&&g.jsx("a",{href:w.spotifyUrl,target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:g.jsx(Sg,{className:"w-4 h-4 text-white"})}),!y&&g.jsx("button",{onClick:()=>i(w.id),className:"w-8 h-8 rounded-full bg-red-500/20 hover:bg-red-500/30 flex items-center justify-center transition-colors",children:g.jsx(zk,{className:"w-4 h-4 text-red-400"})})]})]}),g.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[w.tracks.slice(0,5).map((v,x)=>{var S,k;return g.jsxs(V.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:x*.1},className:"flex items-center space-x-3 p-2 rounded-lg hover:bg-white/5 transition-colors",children:[g.jsx("img",{src:((S=v.album.images[0])==null?void 0:S.url)||"/placeholder-album.png",alt:v.album.name,className:"w-10 h-10 rounded-lg object-cover"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h4",{className:"text-white font-medium truncate",children:v.name}),g.jsx("p",{className:"text-white/70 text-sm truncate",children:(k=v.artists[0])==null?void 0:k.name})]}),g.jsx("div",{className:"text-white/50 text-sm",children:Ng(v.duration_ms)})]},v.id)}),w.tracks.length>5&&g.jsxs("div",{className:"text-center text-white/50 text-sm py-2",children:["+",w.tracks.length-5," more tracks"]})]}),y&&g.jsxs("div",{className:"flex items-center space-x-3 mt-6 pt-4 border-t border-white/10",children:[g.jsx("button",{onClick:u,disabled:a,className:"flex-1 bg-spotify-green hover:bg-spotify-green/90 text-white font-semibold py-3 px-4 rounded-lg transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:a?g.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):g.jsxs(g.Fragment,{children:[g.jsx(mc,{className:"w-4 h-4"}),g.jsx("span",{children:"Create on Spotify"})]})}),g.jsx("button",{onClick:h,className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Save Locally"})]})]}),m=(e==null?void 0:e.topTracks)&&(t==null?void 0:t.topTracks);return g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[g.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[g.jsx(an,{className:"w-10 h-10 text-spotify-green"}),g.jsx("span",{children:"Mixed Playlists"})]}),g.jsx("p",{className:"text-white/70 text-lg",children:"AI-powered playlists that perfectly blend your musical tastes together"})]}),m&&g.jsx(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mb-8",children:g.jsxs("div",{className:"glass rounded-2xl p-8 text-center border border-spotify-green/30",children:[g.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-spotify-green to-green-600 rounded-full flex items-center justify-center",children:g.jsx($k,{className:"w-8 h-8 text-white"})}),g.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Create Your Perfect Mix"}),g.jsx("p",{className:"text-white/70 mb-6 max-w-2xl mx-auto",children:"Our AI analyzes both your music tastes and creates a playlist that represents your unique musical connection"}),g.jsx("button",{onClick:f,disabled:s,className:"bg-gradient-to-r from-spotify-green to-green-600 hover:from-spotify-green/90 hover:to-green-600/90 text-white font-semibold py-4 px-8 rounded-xl transition-all duration-300 flex items-center space-x-3 mx-auto disabled:opacity-50",children:s?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),g.jsx("span",{children:"Analyzing your music..."})]}):g.jsxs(g.Fragment,{children:[g.jsx(an,{className:"w-5 h-5"}),g.jsx("span",{children:"Generate Mixed Playlist"})]})}),g.jsxs("div",{className:"mt-4 text-white/50 text-sm",children:["Analyzing ",e.topTracks.length+t.topTracks.length," tracks from both users"]})]})}),c&&g.jsxs(V.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"mb-8",children:[g.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"✨ Your New Playlist"}),g.jsx(p,{playlist:c,isNew:!0})]}),n.length>0&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[g.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Your Mixed Playlists"}),g.jsx("div",{className:"grid gap-6",children:n.map(w=>g.jsx(p,{playlist:w},w.id))})]}),!m&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[g.jsx(Xe,{className:"w-16 h-16 mx-auto mb-4 text-pink-400"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:t?"Loading music data":"Waiting for your partner"}),g.jsx("p",{className:"text-white/70",children:t?"We need to analyze both your music tastes to create the perfect mixed playlist":"Invite your partner to connect their Spotify account to start creating mixed playlists"})]}),n.length===0&&m&&!c&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[g.jsx(jt,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No playlists yet"}),g.jsx("p",{className:"text-white/70",children:"Create your first mixed playlist to start your musical journey together"})]})]})},Ib=()=>{const{currentUser:e,partnerUser:t,memoryLane:n,addMemoryLaneItem:r}=Tt(),[i,s]=b.useState(!1),[o,a]=b.useState({title:"",description:"",type:"milestone"});b.useEffect(()=>{var u,h,p,m,w,y,v,x,S,k,P,C;e&&t&&n.length===0&&[{id:"1",type:"milestone",title:"First Musical Connection",description:`${(u=e.user)==null?void 0:u.display_name} and ${(h=t.user)==null?void 0:h.display_name} discovered their shared love for music`,date:new Date(Date.now()-6048e5),users:[((p=e.user)==null?void 0:p.id)||"",((m=t.user)==null?void 0:m.id)||""]},{id:"2",type:"shared_track",title:"Shared Love for This Song",description:`Both of you have been listening to "${((y=(w=e.recentlyPlayed)==null?void 0:w[0])==null?void 0:y.track.name)||"Your favorite track"}" recently`,track:(x=(v=e.recentlyPlayed)==null?void 0:v[0])==null?void 0:x.track,date:new Date(Date.now()-2592e5),users:[((S=e.user)==null?void 0:S.id)||"",((k=t.user)==null?void 0:k.id)||""]},{id:"3",type:"playlist_created",title:"Our First Mixed Playlist",description:"Created a beautiful blend of your musical tastes",date:new Date(Date.now()-864e5),users:[((P=e.user)==null?void 0:P.id)||"",((C=t.user)==null?void 0:C.id)||""]}].forEach(N=>{r(N)})},[e,t,n.length,r]);const l=()=>{var h,p;if(!o.title.trim()||!o.description.trim()){Ne.error("Please fill in both title and description");return}const u={id:Date.now().toString(),...o,date:new Date,users:[((h=e==null?void 0:e.user)==null?void 0:h.id)||"",((p=t==null?void 0:t.user)==null?void 0:p.id)||""]};r(u),a({title:"",description:"",type:"milestone"}),s(!1),Ne.success("Memory added to your journey!")},c=u=>{switch(u){case"shared_track":return g.jsx(jt,{className:"w-5 h-5"});case"playlist_created":return g.jsx(an,{className:"w-5 h-5"});case"milestone":return g.jsx(Fk,{className:"w-5 h-5"});default:return g.jsx(Xe,{className:"w-5 h-5"})}},d=u=>{switch(u){case"shared_track":return"from-blue-500 to-cyan-500";case"playlist_created":return"from-purple-500 to-pink-500";case"milestone":return"from-yellow-500 to-orange-500";default:return"from-pink-500 to-red-500"}},f=({memory:u,index:h})=>{var p,m;return g.jsxs(V.div,{initial:{opacity:0,x:-50},animate:{opacity:1,x:0},transition:{delay:h*.1},className:"relative",children:[hs(!0),className:"bg-gradient-to-r from-pink-500 to-red-500 hover:from-pink-600 hover:to-red-600 text-white font-semibold py-3 px-6 rounded-xl transition-all duration-300 flex items-center space-x-2",children:[g.jsx(mc,{className:"w-5 h-5"}),g.jsx("span",{children:"Add Memory"})]})]})}),i&&g.jsx(V.div,{initial:{opacity:0},animate:{opacity:1},className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:()=>s(!1),children:g.jsxs(V.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},onClick:u=>u.stopPropagation(),className:"glass rounded-2xl p-8 max-w-md w-full",children:[g.jsx("h3",{className:"text-2xl font-bold text-white mb-6",children:"Add a New Memory"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Title"}),g.jsx("input",{type:"text",value:o.title,onChange:u=>a({...o,title:u.target.value}),className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-spotify-green",placeholder:"What's this memory about?"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Description"}),g.jsx("textarea",{value:o.description,onChange:u=>a({...o,description:u.target.value}),className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-spotify-green h-24 resize-none",placeholder:"Tell the story of this memory..."})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Type"}),g.jsxs("select",{value:o.type,onChange:u=>a({...o,type:u.target.value}),className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white focus:outline-none focus:border-spotify-green",children:[g.jsx("option",{value:"milestone",children:"Milestone"}),g.jsx("option",{value:"shared_track",children:"Shared Track"}),g.jsx("option",{value:"playlist_created",children:"Playlist Created"})]})]})]}),g.jsxs("div",{className:"flex items-center space-x-3 mt-6",children:[g.jsx("button",{onClick:l,className:"flex-1 bg-spotify-green hover:bg-spotify-green/90 text-white font-semibold py-3 px-4 rounded-lg transition-colors",children:"Add Memory"}),g.jsx("button",{onClick:()=>s(!1),className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Cancel"})]})]})}),g.jsx("div",{className:"space-y-8",children:n.length>0?n.map((u,h)=>g.jsx(f,{memory:u,index:h},u.id)):g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[g.jsx(Ak,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),g.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No memories yet"}),g.jsx("p",{className:"text-white/70 mb-6",children:"Start creating beautiful musical memories together"}),g.jsx("button",{onClick:()=>s(!0),className:"bg-gradient-to-r from-pink-500 to-red-500 hover:from-pink-600 hover:to-red-600 text-white font-semibold py-3 px-6 rounded-xl transition-all duration-300",children:"Create First Memory"})]})}),n.length>0&&g.jsxs(V.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:[g.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[g.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-pink-500 to-red-500 rounded-full flex items-center justify-center",children:g.jsx(Xe,{className:"w-6 h-6 text-white"})}),g.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.length}),g.jsx("p",{className:"text-white/70 text-sm",children:"Memories Created"})]}),g.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[g.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center",children:g.jsx(jt,{className:"w-6 h-6 text-white"})}),g.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.filter(u=>u.type==="shared_track").length}),g.jsx("p",{className:"text-white/70 text-sm",children:"Shared Tracks"})]}),g.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[g.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-gradient-to-br from-purple-500 to-pink-500 rounded-full flex items-center justify-center",children:g.jsx(an,{className:"w-6 h-6 text-white"})}),g.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.filter(u=>u.type==="playlist_created").length}),g.jsx("p",{className:"text-white/70 text-sm",children:"Playlists Created"})]})]})]})};function $b(){const{currentUser:e,partnerUser:t,isLoading:n}=Tt(),r=yn();console.log("🔍 App - Current location:",r.pathname),b.useEffect(()=>{const s=localStorage.getItem("spotify-user"),o=localStorage.getItem("spotify-partner");if(s)try{const a=JSON.parse(s);Tt.getState().setCurrentUser(a)}catch(a){console.error("Failed to parse stored user data:",a),localStorage.removeItem("spotify-user")}if(o)try{const a=JSON.parse(o);Tt.getState().setPartnerUser(a)}catch(a){console.error("Failed to parse stored partner data:",a),localStorage.removeItem("spotify-partner")}},[]);const i=(e==null?void 0:e.isAuthenticated)||!1;return t!=null&&t.isAuthenticated,n?g.jsxs("div",{className:"min-h-screen flex items-center justify-center relative",children:[g.jsx(uh,{}),g.jsxs(V.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"glass-fluid rounded-3xl p-10 flex flex-col items-center space-y-6 relative z-10",children:[g.jsx("div",{className:"w-16 h-16 border-4 border-gradient-to-r from-purple-500 to-pink-500 border-t-transparent rounded-full animate-spin"}),g.jsx("p",{className:"text-white font-medium text-lg",children:"Loading your musical journey..."})]})]}):g.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[g.jsx(uh,{}),g.jsxs("div",{className:"relative z-10",children:[i&&g.jsx(bb,{}),g.jsxs(Jv,{children:[g.jsx(Ot,{path:"/",element:i?g.jsx(Fb,{}):g.jsx(Vb,{})}),g.jsx(Ot,{path:"/callback",element:g.jsx(mh,{})}),g.jsx(Ot,{path:"/callback.html",element:g.jsx(mh,{})}),i&&g.jsxs(g.Fragment,{children:[g.jsx(Ot,{path:"/last-listened",element:g.jsx(zb,{})}),g.jsx(Ot,{path:"/mixed-playlist",element:g.jsx(Ob,{})}),g.jsx(Ot,{path:"/memory-lane",element:g.jsx(Ib,{})})]}),g.jsx(Ot,{path:"*",element:g.jsx(Xv,{to:"/",replace:!0})})]})]})]})}_a.createRoot(document.getElementById("root")).render(g.jsx(Ai.StrictMode,{children:g.jsxs(ax,{children:[g.jsx($b,{}),g.jsx(Jx,{position:"top-right",toastOptions:{duration:4e3,style:{background:"rgba(255, 255, 255, 0.1)",backdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.2)",color:"#fff"}}})]})}));