spotify/dist/assets/index-BailLCJ0.js
2025-10-16 15:52:07 +02:00

474 lines
459 KiB
JavaScript

function ty(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function cu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fh={exports:{}},Eo={},Ih={exports:{}},Y={};/**
* @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 qs=Symbol.for("react.element"),ny=Symbol.for("react.portal"),ry=Symbol.for("react.fragment"),sy=Symbol.for("react.strict_mode"),iy=Symbol.for("react.profiler"),oy=Symbol.for("react.provider"),ay=Symbol.for("react.context"),ly=Symbol.for("react.forward_ref"),uy=Symbol.for("react.suspense"),cy=Symbol.for("react.memo"),dy=Symbol.for("react.lazy"),Vc=Symbol.iterator;function fy(e){return e===null||typeof e!="object"?null:(e=Vc&&e[Vc]||e["@@iterator"],typeof e=="function"?e:null)}var zh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oh=Object.assign,$h={};function Fr(e,t,n){this.props=e,this.context=t,this.refs=$h,this.updater=n||zh}Fr.prototype.isReactComponent={};Fr.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")};Fr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bh(){}Bh.prototype=Fr.prototype;function du(e,t,n){this.props=e,this.context=t,this.refs=$h,this.updater=n||zh}var fu=du.prototype=new Bh;fu.constructor=du;Oh(fu,Fr.prototype);fu.isPureReactComponent=!0;var Fc=Array.isArray,Uh=Object.prototype.hasOwnProperty,hu={current:null},Wh={key:!0,ref:!0,__self:!0,__source:!0};function Hh(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Uh.call(t,r)&&!Wh.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:qs,type:e,key:i,ref:o,props:s,_owner:hu.current}}function hy(e,t){return{$$typeof:qs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function pu(e){return typeof e=="object"&&e!==null&&e.$$typeof===qs}function py(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ic=/\/+/g;function ra(e,t){return typeof e=="object"&&e!==null&&e.key!=null?py(""+e.key):t.toString(36)}function Ei(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case qs:case ny:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+ra(o,0):r,Fc(s)?(n="",e!=null&&(n=e.replace(Ic,"$&/")+"/"),Ei(s,t,n,"",function(c){return c})):s!=null&&(pu(s)&&(s=hy(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ic,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Fc(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+ra(i,a);o+=Ei(i,t,n,l,s)}else if(l=fy(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+ra(i,a++),o+=Ei(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function si(e,t,n){if(e==null)return e;var r=[],s=0;return Ei(e,r,"","",function(i){return t.call(n,i,s++)}),r}function my(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Oe={current:null},Ti={transition:null},gy={ReactCurrentDispatcher:Oe,ReactCurrentBatchConfig:Ti,ReactCurrentOwner:hu};function qh(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:si,forEach:function(e,t,n){si(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return si(e,function(){t++}),t},toArray:function(e){return si(e,function(t){return t})||[]},only:function(e){if(!pu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Fr;Y.Fragment=ry;Y.Profiler=iy;Y.PureComponent=du;Y.StrictMode=sy;Y.Suspense=uy;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gy;Y.act=qh;Y.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Oh({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=hu.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Uh.call(t,l)&&!Wh.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:qs,type:e.type,key:s,ref:i,props:r,_owner:o}};Y.createContext=function(e){return e={$$typeof:ay,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:oy,_context:e},e.Consumer=e};Y.createElement=Hh;Y.createFactory=function(e){var t=Hh.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:ly,render:e}};Y.isValidElement=pu;Y.lazy=function(e){return{$$typeof:dy,_payload:{_status:-1,_result:e},_init:my}};Y.memo=function(e,t){return{$$typeof:cy,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=Ti.transition;Ti.transition={};try{e()}finally{Ti.transition=t}};Y.unstable_act=qh;Y.useCallback=function(e,t){return Oe.current.useCallback(e,t)};Y.useContext=function(e){return Oe.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return Oe.current.useDeferredValue(e)};Y.useEffect=function(e,t){return Oe.current.useEffect(e,t)};Y.useId=function(){return Oe.current.useId()};Y.useImperativeHandle=function(e,t,n){return Oe.current.useImperativeHandle(e,t,n)};Y.useInsertionEffect=function(e,t){return Oe.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return Oe.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return Oe.current.useMemo(e,t)};Y.useReducer=function(e,t,n){return Oe.current.useReducer(e,t,n)};Y.useRef=function(e){return Oe.current.useRef(e)};Y.useState=function(e){return Oe.current.useState(e)};Y.useSyncExternalStore=function(e,t,n){return Oe.current.useSyncExternalStore(e,t,n)};Y.useTransition=function(){return Oe.current.useTransition()};Y.version="18.3.1";Ih.exports=Y;var k=Ih.exports;const Gs=cu(k),yy=ty({__proto__:null,default:Gs},[k]);/**
* @license React
* react-jsx-runtime.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 vy=k,xy=Symbol.for("react.element"),wy=Symbol.for("react.fragment"),by=Object.prototype.hasOwnProperty,Sy=vy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ky={key:!0,ref:!0,__self:!0,__source:!0};function Gh(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)by.call(t,r)&&!ky.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:xy,type:e,key:i,ref:o,props:s,_owner:Sy.current}}Eo.Fragment=wy;Eo.jsx=Gh;Eo.jsxs=Gh;Fh.exports=Eo;var m=Fh.exports,Ka={},Yh={exports:{}},et={},Kh={exports:{}},Xh={};/**
* @license React
* scheduler.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.
*/(function(e){function t(_,N){var F=_.length;_.push(N);e:for(;0<F;){var L=F-1>>>1,E=_[L];if(0<s(E,N))_[L]=N,_[F]=E,F=L;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var N=_[0],F=_.pop();if(F!==N){_[0]=F;e:for(var L=0,E=_.length,W=E>>>1;L<W;){var X=2*(L+1)-1,te=_[X],G=X+1,be=_[G];if(0>s(te,F))G<E&&0>s(be,te)?(_[L]=be,_[G]=F,L=G):(_[L]=te,_[X]=F,L=X);else if(G<E&&0>s(be,F))_[L]=be,_[G]=F,L=G;else break e}}return N}function s(_,N){var F=_.sortIndex-N.sortIndex;return F!==0?F:_.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.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,g=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(_){for(var N=n(c);N!==null;){if(N.callback===null)r(c);else if(N.startTime<=_)r(c),N.sortIndex=N.expirationTime,t(l,N);else break;N=n(c)}}function b(_){if(g=!1,w(_),!p)if(n(l)!==null)p=!0,A(S);else{var N=n(c);N!==null&&q(b,N.startTime-_)}}function S(_,N){p=!1,g&&(g=!1,v(j),j=-1),h=!0;var F=u;try{for(w(N),f=n(l);f!==null&&(!(f.expirationTime>N)||_&&!z());){var L=f.callback;if(typeof L=="function"){f.callback=null,u=f.priorityLevel;var E=L(f.expirationTime<=N);N=e.unstable_now(),typeof E=="function"?f.callback=E:f===n(l)&&r(l),w(N)}else r(l);f=n(l)}if(f!==null)var W=!0;else{var X=n(c);X!==null&&q(b,X.startTime-N),W=!1}return W}finally{f=null,u=F,h=!1}}var C=!1,P=null,j=-1,D=5,T=-1;function z(){return!(e.unstable_now()-T<D)}function V(){if(P!==null){var _=e.unstable_now();T=_;var N=!0;try{N=P(!0,_)}finally{N?U():(C=!1,P=null)}}else C=!1}var U;if(typeof y=="function")U=function(){y(V)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,Q=R.port2;R.port1.onmessage=V,U=function(){Q.postMessage(null)}}else U=function(){x(V,0)};function A(_){P=_,C||(C=!0,U())}function q(_,N){j=x(function(){_(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,A(S))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return u},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(_){switch(u){case 1:case 2:case 3:var N=3;break;default:N=u}var F=u;u=N;try{return _()}finally{u=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,N){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var F=u;u=_;try{return N()}finally{u=F}},e.unstable_scheduleCallback=function(_,N,F){var L=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?L+F:L):F=L,_){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=F+E,_={id:d++,callback:N,priorityLevel:_,startTime:F,expirationTime:E,sortIndex:-1},F>L?(_.sortIndex=F,t(c,_),n(l)===null&&_===n(c)&&(g?(v(j),j=-1):g=!0,q(b,F-L))):(_.sortIndex=E,t(l,_),p||h||(p=!0,A(S))),_},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(_){var N=u;return function(){var F=u;u=N;try{return _.apply(this,arguments)}finally{u=F}}}})(Xh);Kh.exports=Xh;var Cy=Kh.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 Py=k,Ze=Cy;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qh=new Set,ks={};function Kn(e,t){jr(e,t),jr(e+"Capture",t)}function jr(e,t){for(ks[e]=t,e=0;e<t.length;e++)Qh.add(t[e])}var Ot=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xa=Object.prototype.hasOwnProperty,jy=/^[: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]*$/,zc={},Oc={};function Ey(e){return Xa.call(Oc,e)?!0:Xa.call(zc,e)?!1:jy.test(e)?Oc[e]=!0:(zc[e]=!0,!1)}function Ty(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 Ny(e,t,n,r){if(t===null||typeof t>"u"||Ty(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 $e(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new $e(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new $e(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new $e(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new $e(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){_e[e]=new $e(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new $e(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new $e(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new $e(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new $e(e,5,!1,e.toLowerCase(),null,!1,!1)});var mu=/[\-:]([a-z])/g;function gu(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(mu,gu);_e[t]=new $e(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(mu,gu);_e[t]=new $e(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(mu,gu);_e[t]=new $e(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new $e(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new $e("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new $e(e,1,!1,e.toLowerCase(),null,!0,!0)});function yu(e,t,n,r){var s=_e.hasOwnProperty(t)?_e[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ny(t,n,s,r)&&(n=null),r||s===null?Ey(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Gt=Py.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ii=Symbol.for("react.element"),nr=Symbol.for("react.portal"),rr=Symbol.for("react.fragment"),vu=Symbol.for("react.strict_mode"),Qa=Symbol.for("react.profiler"),Zh=Symbol.for("react.provider"),Jh=Symbol.for("react.context"),xu=Symbol.for("react.forward_ref"),Za=Symbol.for("react.suspense"),Ja=Symbol.for("react.suspense_list"),wu=Symbol.for("react.memo"),Zt=Symbol.for("react.lazy"),ep=Symbol.for("react.offscreen"),$c=Symbol.iterator;function Hr(e){return e===null||typeof e!="object"?null:(e=$c&&e[$c]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Object.assign,sa;function rs(e){if(sa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);sa=t&&t[1]||""}return`
`+sa+e}var ia=!1;function oa(e,t){if(!e||ia)return"";ia=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),i=r.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{ia=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rs(e):""}function My(e){switch(e.tag){case 5:return rs(e.type);case 16:return rs("Lazy");case 13:return rs("Suspense");case 19:return rs("SuspenseList");case 0:case 2:case 15:return e=oa(e.type,!1),e;case 11:return e=oa(e.type.render,!1),e;case 1:return e=oa(e.type,!0),e;default:return""}}function el(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 rr:return"Fragment";case nr:return"Portal";case Qa:return"Profiler";case vu:return"StrictMode";case Za:return"Suspense";case Ja:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jh:return(e.displayName||"Context")+".Consumer";case Zh:return(e._context.displayName||"Context")+".Provider";case xu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wu:return t=e.displayName||null,t!==null?t:el(e.type)||"Memo";case Zt:t=e._payload,e=e._init;try{return el(e(t))}catch{}}return null}function _y(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 el(t);case 8:return t===vu?"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 vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ay(e){var t=tp(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 s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.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 oi(e){e._valueTracker||(e._valueTracker=Ay(e))}function np(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ui(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 tl(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vn(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 rp(e,t){t=t.checked,t!=null&&yu(e,"checked",t,!1)}function nl(e,t){rp(e,t);var n=vn(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")?rl(e,t.type,n):t.hasOwnProperty("defaultValue")&&rl(e,t.type,vn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uc(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 rl(e,t,n){(t!=="number"||Ui(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ss=Array.isArray;function vr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+vn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function sl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Wc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(ss(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:vn(n)}}function sp(e,t){var n=vn(t.value),r=vn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Hc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ip(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function il(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ip(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ai,op=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ai=ai||document.createElement("div"),ai.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ls={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},Ly=["Webkit","ms","Moz","O"];Object.keys(ls).forEach(function(e){Ly.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ls[t]=ls[e]})});function ap(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ls.hasOwnProperty(e)&&ls[e]?(""+t).trim():t+"px"}function lp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=ap(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Dy=fe({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 ol(e,t){if(t){if(Dy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function al(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 ll=null;function bu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ul=null,xr=null,wr=null;function qc(e){if(e=Xs(e)){if(typeof ul!="function")throw Error(M(280));var t=e.stateNode;t&&(t=Ao(t),ul(e.stateNode,e.type,t))}}function up(e){xr?wr?wr.push(e):wr=[e]:xr=e}function cp(){if(xr){var e=xr,t=wr;if(wr=xr=null,qc(e),t)for(e=0;e<t.length;e++)qc(t[e])}}function dp(e,t){return e(t)}function fp(){}var aa=!1;function hp(e,t,n){if(aa)return e(t,n);aa=!0;try{return dp(e,t,n)}finally{aa=!1,(xr!==null||wr!==null)&&(fp(),cp())}}function Ps(e,t){var n=e.stateNode;if(n===null)return null;var r=Ao(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var cl=!1;if(Ot)try{var qr={};Object.defineProperty(qr,"passive",{get:function(){cl=!0}}),window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch{cl=!1}function Ry(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var us=!1,Wi=null,Hi=!1,dl=null,Vy={onError:function(e){us=!0,Wi=e}};function Fy(e,t,n,r,s,i,o,a,l){us=!1,Wi=null,Ry.apply(Vy,arguments)}function Iy(e,t,n,r,s,i,o,a,l){if(Fy.apply(this,arguments),us){if(us){var c=Wi;us=!1,Wi=null}else throw Error(M(198));Hi||(Hi=!0,dl=c)}}function Xn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Gc(e){if(Xn(e)!==e)throw Error(M(188))}function zy(e){var t=e.alternate;if(!t){if(t=Xn(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Gc(s),e;if(i===r)return Gc(s),t;i=i.sibling}throw Error(M(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(M(189))}}if(n.alternate!==r)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function mp(e){return e=zy(e),e!==null?gp(e):null}function gp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gp(e);if(t!==null)return t;e=e.sibling}return null}var yp=Ze.unstable_scheduleCallback,Yc=Ze.unstable_cancelCallback,Oy=Ze.unstable_shouldYield,$y=Ze.unstable_requestPaint,ge=Ze.unstable_now,By=Ze.unstable_getCurrentPriorityLevel,Su=Ze.unstable_ImmediatePriority,vp=Ze.unstable_UserBlockingPriority,qi=Ze.unstable_NormalPriority,Uy=Ze.unstable_LowPriority,xp=Ze.unstable_IdlePriority,To=null,jt=null;function Wy(e){if(jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(To,e,void 0,(e.current.flags&128)===128)}catch{}}var gt=Math.clz32?Math.clz32:Gy,Hy=Math.log,qy=Math.LN2;function Gy(e){return e>>>=0,e===0?32:31-(Hy(e)/qy|0)|0}var li=64,ui=4194304;function is(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 Gi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=is(a):(i&=o,i!==0&&(r=is(i)))}else o=n&~s,o!==0?r=is(o):i!==0&&(r=is(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-gt(t),s=1<<n,r|=e[n],t&=~s;return r}function Yy(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ky(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-gt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=Yy(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function fl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wp(){var e=li;return li<<=1,!(li&4194240)&&(li=64),e}function la(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ys(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gt(t),e[t]=n}function Xy(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<n;){var s=31-gt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function ku(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Z=0;function bp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Sp,Cu,kp,Cp,Pp,hl=!1,ci=[],ln=null,un=null,cn=null,js=new Map,Es=new Map,tn=[],Qy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Kc(e,t){switch(e){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":un=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":js.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Es.delete(t.pointerId)}}function Gr(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Xs(t),t!==null&&Cu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Zy(e,t,n,r,s){switch(t){case"focusin":return ln=Gr(ln,e,t,n,r,s),!0;case"dragenter":return un=Gr(un,e,t,n,r,s),!0;case"mouseover":return cn=Gr(cn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return js.set(i,Gr(js.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Es.set(i,Gr(Es.get(i)||null,e,t,n,r,s)),!0}return!1}function jp(e){var t=Vn(e.target);if(t!==null){var n=Xn(t);if(n!==null){if(t=n.tag,t===13){if(t=pp(n),t!==null){e.blockedOn=t,Pp(e.priority,function(){kp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ni(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ll=r,n.target.dispatchEvent(r),ll=null}else return t=Xs(n),t!==null&&Cu(t),e.blockedOn=n,!1;t.shift()}return!0}function Xc(e,t,n){Ni(e)&&n.delete(t)}function Jy(){hl=!1,ln!==null&&Ni(ln)&&(ln=null),un!==null&&Ni(un)&&(un=null),cn!==null&&Ni(cn)&&(cn=null),js.forEach(Xc),Es.forEach(Xc)}function Yr(e,t){e.blockedOn===t&&(e.blockedOn=null,hl||(hl=!0,Ze.unstable_scheduleCallback(Ze.unstable_NormalPriority,Jy)))}function Ts(e){function t(s){return Yr(s,e)}if(0<ci.length){Yr(ci[0],e);for(var n=1;n<ci.length;n++){var r=ci[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ln!==null&&Yr(ln,e),un!==null&&Yr(un,e),cn!==null&&Yr(cn,e),js.forEach(t),Es.forEach(t),n=0;n<tn.length;n++)r=tn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<tn.length&&(n=tn[0],n.blockedOn===null);)jp(n),n.blockedOn===null&&tn.shift()}var br=Gt.ReactCurrentBatchConfig,Yi=!0;function e1(e,t,n,r){var s=Z,i=br.transition;br.transition=null;try{Z=1,Pu(e,t,n,r)}finally{Z=s,br.transition=i}}function t1(e,t,n,r){var s=Z,i=br.transition;br.transition=null;try{Z=4,Pu(e,t,n,r)}finally{Z=s,br.transition=i}}function Pu(e,t,n,r){if(Yi){var s=pl(e,t,n,r);if(s===null)va(e,t,r,Ki,n),Kc(e,r);else if(Zy(s,e,t,n,r))r.stopPropagation();else if(Kc(e,r),t&4&&-1<Qy.indexOf(e)){for(;s!==null;){var i=Xs(s);if(i!==null&&Sp(i),i=pl(e,t,n,r),i===null&&va(e,t,r,Ki,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else va(e,t,r,null,n)}}var Ki=null;function pl(e,t,n,r){if(Ki=null,e=bu(r),e=Vn(e),e!==null)if(t=Xn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ki=e,null}function Ep(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(By()){case Su:return 1;case vp:return 4;case qi:case Uy:return 16;case xp:return 536870912;default:return 16}default:return 16}}var sn=null,ju=null,Mi=null;function Tp(){if(Mi)return Mi;var e,t=ju,n=t.length,r,s="value"in sn?sn.value:sn.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Mi=s.slice(e,1<r?1-r:void 0)}function _i(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function di(){return!0}function Qc(){return!1}function tt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?di:Qc,this.isPropagationStopped=Qc,this}return fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),t}var Ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Eu=tt(Ir),Ks=fe({},Ir,{view:0,detail:0}),n1=tt(Ks),ua,ca,Kr,No=fe({},Ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kr&&(Kr&&e.type==="mousemove"?(ua=e.screenX-Kr.screenX,ca=e.screenY-Kr.screenY):ca=ua=0,Kr=e),ua)},movementY:function(e){return"movementY"in e?e.movementY:ca}}),Zc=tt(No),r1=fe({},No,{dataTransfer:0}),s1=tt(r1),i1=fe({},Ks,{relatedTarget:0}),da=tt(i1),o1=fe({},Ir,{animationName:0,elapsedTime:0,pseudoElement:0}),a1=tt(o1),l1=fe({},Ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u1=tt(l1),c1=fe({},Ir,{data:0}),Jc=tt(c1),d1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},h1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function p1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=h1[e])?!!t[e]:!1}function Tu(){return p1}var m1=fe({},Ks,{key:function(e){if(e.key){var t=d1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_i(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tu,charCode:function(e){return e.type==="keypress"?_i(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_i(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),g1=tt(m1),y1=fe({},No,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ed=tt(y1),v1=fe({},Ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tu}),x1=tt(v1),w1=fe({},Ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),b1=tt(w1),S1=fe({},No,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),k1=tt(S1),C1=[9,13,27,32],Nu=Ot&&"CompositionEvent"in window,cs=null;Ot&&"documentMode"in document&&(cs=document.documentMode);var P1=Ot&&"TextEvent"in window&&!cs,Np=Ot&&(!Nu||cs&&8<cs&&11>=cs),td=" ",nd=!1;function Mp(e,t){switch(e){case"keyup":return C1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _p(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sr=!1;function j1(e,t){switch(e){case"compositionend":return _p(t);case"keypress":return t.which!==32?null:(nd=!0,td);case"textInput":return e=t.data,e===td&&nd?null:e;default:return null}}function E1(e,t){if(sr)return e==="compositionend"||!Nu&&Mp(e,t)?(e=Tp(),Mi=ju=sn=null,sr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Np&&t.locale!=="ko"?null:t.data;default:return null}}var T1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!T1[e.type]:t==="textarea"}function Ap(e,t,n,r){up(r),t=Xi(t,"onChange"),0<t.length&&(n=new Eu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ds=null,Ns=null;function N1(e){Up(e,0)}function Mo(e){var t=ar(e);if(np(t))return e}function M1(e,t){if(e==="change")return t}var Lp=!1;if(Ot){var fa;if(Ot){var ha="oninput"in document;if(!ha){var sd=document.createElement("div");sd.setAttribute("oninput","return;"),ha=typeof sd.oninput=="function"}fa=ha}else fa=!1;Lp=fa&&(!document.documentMode||9<document.documentMode)}function id(){ds&&(ds.detachEvent("onpropertychange",Dp),Ns=ds=null)}function Dp(e){if(e.propertyName==="value"&&Mo(Ns)){var t=[];Ap(t,Ns,e,bu(e)),hp(N1,t)}}function _1(e,t,n){e==="focusin"?(id(),ds=t,Ns=n,ds.attachEvent("onpropertychange",Dp)):e==="focusout"&&id()}function A1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mo(Ns)}function L1(e,t){if(e==="click")return Mo(t)}function D1(e,t){if(e==="input"||e==="change")return Mo(t)}function R1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:R1;function Ms(e,t){if(xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Xa.call(t,s)||!xt(e[s],t[s]))return!1}return!0}function od(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ad(e,t){var n=od(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=od(n)}}function Rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vp(){for(var e=window,t=Ui();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ui(e.document)}return t}function Mu(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 V1(e){var t=Vp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rp(n.ownerDocument.documentElement,n)){if(r!==null&&Mu(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 s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=ad(n,i);var o=ad(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var F1=Ot&&"documentMode"in document&&11>=document.documentMode,ir=null,ml=null,fs=null,gl=!1;function ld(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gl||ir==null||ir!==Ui(r)||(r=ir,"selectionStart"in r&&Mu(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}),fs&&Ms(fs,r)||(fs=r,r=Xi(ml,"onSelect"),0<r.length&&(t=new Eu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var or={animationend:fi("Animation","AnimationEnd"),animationiteration:fi("Animation","AnimationIteration"),animationstart:fi("Animation","AnimationStart"),transitionend:fi("Transition","TransitionEnd")},pa={},Fp={};Ot&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete or.animationend.animation,delete or.animationiteration.animation,delete or.animationstart.animation),"TransitionEvent"in window||delete or.transitionend.transition);function _o(e){if(pa[e])return pa[e];if(!or[e])return e;var t=or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fp)return pa[e]=t[n];return e}var Ip=_o("animationend"),zp=_o("animationiteration"),Op=_o("animationstart"),$p=_o("transitionend"),Bp=new Map,ud="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Sn(e,t){Bp.set(e,t),Kn(t,[e])}for(var ma=0;ma<ud.length;ma++){var ga=ud[ma],I1=ga.toLowerCase(),z1=ga[0].toUpperCase()+ga.slice(1);Sn(I1,"on"+z1)}Sn(Ip,"onAnimationEnd");Sn(zp,"onAnimationIteration");Sn(Op,"onAnimationStart");Sn("dblclick","onDoubleClick");Sn("focusin","onFocus");Sn("focusout","onBlur");Sn($p,"onTransitionEnd");jr("onMouseEnter",["mouseout","mouseover"]);jr("onMouseLeave",["mouseout","mouseover"]);jr("onPointerEnter",["pointerout","pointerover"]);jr("onPointerLeave",["pointerout","pointerover"]);Kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Kn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var os="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),O1=new Set("cancel close invalid load scroll toggle".split(" ").concat(os));function cd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Iy(r,t,void 0,e),e.currentTarget=null}function Up(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;cd(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;cd(s,a,c),i=l}}}if(Hi)throw e=dl,Hi=!1,dl=null,e}function re(e,t){var n=t[bl];n===void 0&&(n=t[bl]=new Set);var r=e+"__bubble";n.has(r)||(Wp(t,e,2,!1),n.add(r))}function ya(e,t,n){var r=0;t&&(r|=4),Wp(n,e,r,t)}var hi="_reactListening"+Math.random().toString(36).slice(2);function _s(e){if(!e[hi]){e[hi]=!0,Qh.forEach(function(n){n!=="selectionchange"&&(O1.has(n)||ya(n,!1,e),ya(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,ya("selectionchange",!1,t))}}function Wp(e,t,n,r){switch(Ep(t)){case 1:var s=e1;break;case 4:s=t1;break;default:s=Pu}n=s.bind(null,t,n,e),s=void 0,!cl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function va(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Vn(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}hp(function(){var c=i,d=bu(n),f=[];e:{var u=Bp.get(e);if(u!==void 0){var h=Eu,p=e;switch(e){case"keypress":if(_i(n)===0)break e;case"keydown":case"keyup":h=g1;break;case"focusin":p="focus",h=da;break;case"focusout":p="blur",h=da;break;case"beforeblur":case"afterblur":h=da;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Zc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=s1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=x1;break;case Ip:case zp:case Op:h=a1;break;case $p:h=b1;break;case"scroll":h=n1;break;case"wheel":h=k1;break;case"copy":case"cut":case"paste":h=u1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ed}var g=(t&4)!==0,x=!g&&e==="scroll",v=g?u!==null?u+"Capture":null:u;g=[];for(var y=c,w;y!==null;){w=y;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,v!==null&&(b=Ps(y,v),b!=null&&g.push(As(y,b,w)))),x)break;y=y.return}0<g.length&&(u=new h(u,p,null,n,d),f.push({event:u,listeners:g}))}}if(!(t&7)){e:{if(u=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",u&&n!==ll&&(p=n.relatedTarget||n.fromElement)&&(Vn(p)||p[$t]))break e;if((h||u)&&(u=d.window===d?d:(u=d.ownerDocument)?u.defaultView||u.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?Vn(p):null,p!==null&&(x=Xn(p),p!==x||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(g=Zc,b="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=ed,b="onPointerLeave",v="onPointerEnter",y="pointer"),x=h==null?u:ar(h),w=p==null?u:ar(p),u=new g(b,y+"leave",h,n,d),u.target=x,u.relatedTarget=w,b=null,Vn(d)===c&&(g=new g(v,y+"enter",p,n,d),g.target=w,g.relatedTarget=x,b=g),x=b,h&&p)t:{for(g=h,v=p,y=0,w=g;w;w=tr(w))y++;for(w=0,b=v;b;b=tr(b))w++;for(;0<y-w;)g=tr(g),y--;for(;0<w-y;)v=tr(v),w--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=tr(g),v=tr(v)}g=null}else g=null;h!==null&&dd(f,u,h,g,!1),p!==null&&x!==null&&dd(f,x,p,g,!0)}}e:{if(u=c?ar(c):window,h=u.nodeName&&u.nodeName.toLowerCase(),h==="select"||h==="input"&&u.type==="file")var S=M1;else if(rd(u))if(Lp)S=D1;else{S=A1;var C=_1}else(h=u.nodeName)&&h.toLowerCase()==="input"&&(u.type==="checkbox"||u.type==="radio")&&(S=L1);if(S&&(S=S(e,c))){Ap(f,S,n,d);break e}C&&C(e,u,c),e==="focusout"&&(C=u._wrapperState)&&C.controlled&&u.type==="number"&&rl(u,"number",u.value)}switch(C=c?ar(c):window,e){case"focusin":(rd(C)||C.contentEditable==="true")&&(ir=C,ml=c,fs=null);break;case"focusout":fs=ml=ir=null;break;case"mousedown":gl=!0;break;case"contextmenu":case"mouseup":case"dragend":gl=!1,ld(f,n,d);break;case"selectionchange":if(F1)break;case"keydown":case"keyup":ld(f,n,d)}var P;if(Nu)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else sr?Mp(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Np&&n.locale!=="ko"&&(sr||j!=="onCompositionStart"?j==="onCompositionEnd"&&sr&&(P=Tp()):(sn=d,ju="value"in sn?sn.value:sn.textContent,sr=!0)),C=Xi(c,j),0<C.length&&(j=new Jc(j,e,null,n,d),f.push({event:j,listeners:C}),P?j.data=P:(P=_p(n),P!==null&&(j.data=P)))),(P=P1?j1(e,n):E1(e,n))&&(c=Xi(c,"onBeforeInput"),0<c.length&&(d=new Jc("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=P))}Up(f,t)})}function As(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ps(e,n),i!=null&&r.unshift(As(e,i,s)),i=Ps(e,t),i!=null&&r.push(As(e,i,s))),e=e.return}return r}function tr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function dd(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ps(n,i),l!=null&&o.unshift(As(n,l,a))):s||(l=Ps(n,i),l!=null&&o.push(As(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $1=/\r\n?/g,B1=/\u0000|\uFFFD/g;function fd(e){return(typeof e=="string"?e:""+e).replace($1,`
`).replace(B1,"")}function pi(e,t,n){if(t=fd(t),fd(e)!==t&&n)throw Error(M(425))}function Qi(){}var yl=null,vl=null;function xl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wl=typeof setTimeout=="function"?setTimeout:void 0,U1=typeof clearTimeout=="function"?clearTimeout:void 0,hd=typeof Promise=="function"?Promise:void 0,W1=typeof queueMicrotask=="function"?queueMicrotask:typeof hd<"u"?function(e){return hd.resolve(null).then(e).catch(H1)}:wl;function H1(e){setTimeout(function(){throw e})}function xa(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ts(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ts(t)}function dn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function pd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var zr=Math.random().toString(36).slice(2),kt="__reactFiber$"+zr,Ls="__reactProps$"+zr,$t="__reactContainer$"+zr,bl="__reactEvents$"+zr,q1="__reactListeners$"+zr,G1="__reactHandles$"+zr;function Vn(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$t]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pd(e);e!==null;){if(n=e[kt])return n;e=pd(e)}return t}e=n,n=e.parentNode}return null}function Xs(e){return e=e[kt]||e[$t],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ar(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function Ao(e){return e[Ls]||null}var Sl=[],lr=-1;function kn(e){return{current:e}}function ie(e){0>lr||(e.current=Sl[lr],Sl[lr]=null,lr--)}function J(e,t){lr++,Sl[lr]=e.current,e.current=t}var xn={},Ve=kn(xn),We=kn(!1),Un=xn;function Er(e,t){var n=e.type.contextTypes;if(!n)return xn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function He(e){return e=e.childContextTypes,e!=null}function Zi(){ie(We),ie(Ve)}function md(e,t,n){if(Ve.current!==xn)throw Error(M(168));J(Ve,t),J(We,n)}function Hp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(M(108,_y(e)||"Unknown",s));return fe({},n,r)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Un=Ve.current,J(Ve,e),J(We,We.current),!0}function gd(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=Hp(e,t,Un),r.__reactInternalMemoizedMergedChildContext=e,ie(We),ie(Ve),J(Ve,e)):ie(We),J(We,n)}var Lt=null,Lo=!1,wa=!1;function qp(e){Lt===null?Lt=[e]:Lt.push(e)}function Y1(e){Lo=!0,qp(e)}function Cn(){if(!wa&&Lt!==null){wa=!0;var e=0,t=Z;try{var n=Lt;for(Z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Lt=null,Lo=!1}catch(s){throw Lt!==null&&(Lt=Lt.slice(e+1)),yp(Su,Cn),s}finally{Z=t,wa=!1}}return null}var ur=[],cr=0,eo=null,to=0,it=[],ot=0,Wn=null,Dt=1,Rt="";function An(e,t){ur[cr++]=to,ur[cr++]=eo,eo=e,to=t}function Gp(e,t,n){it[ot++]=Dt,it[ot++]=Rt,it[ot++]=Wn,Wn=e;var r=Dt;e=Rt;var s=32-gt(r)-1;r&=~(1<<s),n+=1;var i=32-gt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Dt=1<<32-gt(t)+s|n<<s|r,Rt=i+e}else Dt=1<<i|n<<s|r,Rt=e}function _u(e){e.return!==null&&(An(e,1),Gp(e,1,0))}function Au(e){for(;e===eo;)eo=ur[--cr],ur[cr]=null,to=ur[--cr],ur[cr]=null;for(;e===Wn;)Wn=it[--ot],it[ot]=null,Rt=it[--ot],it[ot]=null,Dt=it[--ot],it[ot]=null}var Qe=null,Ke=null,le=!1,pt=null;function Yp(e,t){var n=at(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function yd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Qe=e,Ke=dn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Qe=e,Ke=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wn!==null?{id:Dt,overflow:Rt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=at(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Qe=e,Ke=null,!0):!1;default:return!1}}function kl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cl(e){if(le){var t=Ke;if(t){var n=t;if(!yd(e,t)){if(kl(e))throw Error(M(418));t=dn(n.nextSibling);var r=Qe;t&&yd(e,t)?Yp(r,n):(e.flags=e.flags&-4097|2,le=!1,Qe=e)}}else{if(kl(e))throw Error(M(418));e.flags=e.flags&-4097|2,le=!1,Qe=e}}}function vd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qe=e}function mi(e){if(e!==Qe)return!1;if(!le)return vd(e),le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xl(e.type,e.memoizedProps)),t&&(t=Ke)){if(kl(e))throw Kp(),Error(M(418));for(;t;)Yp(e,t),t=dn(t.nextSibling)}if(vd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ke=dn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ke=null}}else Ke=Qe?dn(e.stateNode.nextSibling):null;return!0}function Kp(){for(var e=Ke;e;)e=dn(e.nextSibling)}function Tr(){Ke=Qe=null,le=!1}function Lu(e){pt===null?pt=[e]:pt.push(e)}var K1=Gt.ReactCurrentBatchConfig;function Xr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var r=n.stateNode}if(!r)throw Error(M(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function gi(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xd(e){var t=e._init;return t(e._payload)}function Xp(e){function t(v,y){if(e){var w=v.deletions;w===null?(v.deletions=[y],v.flags|=16):w.push(y)}}function n(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function r(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function s(v,y){return v=mn(v,y),v.index=0,v.sibling=null,v}function i(v,y,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<y?(v.flags|=2,y):w):(v.flags|=2,y)):(v.flags|=1048576,y)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,y,w,b){return y===null||y.tag!==6?(y=Ea(w,v.mode,b),y.return=v,y):(y=s(y,w),y.return=v,y)}function l(v,y,w,b){var S=w.type;return S===rr?d(v,y,w.props.children,b,w.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Zt&&xd(S)===y.type)?(b=s(y,w.props),b.ref=Xr(v,y,w),b.return=v,b):(b=Ii(w.type,w.key,w.props,null,v.mode,b),b.ref=Xr(v,y,w),b.return=v,b)}function c(v,y,w,b){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=Ta(w,v.mode,b),y.return=v,y):(y=s(y,w.children||[]),y.return=v,y)}function d(v,y,w,b,S){return y===null||y.tag!==7?(y=$n(w,v.mode,b,S),y.return=v,y):(y=s(y,w),y.return=v,y)}function f(v,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Ea(""+y,v.mode,w),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ii:return w=Ii(y.type,y.key,y.props,null,v.mode,w),w.ref=Xr(v,null,y),w.return=v,w;case nr:return y=Ta(y,v.mode,w),y.return=v,y;case Zt:var b=y._init;return f(v,b(y._payload),w)}if(ss(y)||Hr(y))return y=$n(y,v.mode,w,null),y.return=v,y;gi(v,y)}return null}function u(v,y,w,b){var S=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(v,y,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ii:return w.key===S?l(v,y,w,b):null;case nr:return w.key===S?c(v,y,w,b):null;case Zt:return S=w._init,u(v,y,S(w._payload),b)}if(ss(w)||Hr(w))return S!==null?null:d(v,y,w,b,null);gi(v,w)}return null}function h(v,y,w,b,S){if(typeof b=="string"&&b!==""||typeof b=="number")return v=v.get(w)||null,a(y,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ii:return v=v.get(b.key===null?w:b.key)||null,l(y,v,b,S);case nr:return v=v.get(b.key===null?w:b.key)||null,c(y,v,b,S);case Zt:var C=b._init;return h(v,y,w,C(b._payload),S)}if(ss(b)||Hr(b))return v=v.get(w)||null,d(y,v,b,S,null);gi(y,b)}return null}function p(v,y,w,b){for(var S=null,C=null,P=y,j=y=0,D=null;P!==null&&j<w.length;j++){P.index>j?(D=P,P=null):D=P.sibling;var T=u(v,P,w[j],b);if(T===null){P===null&&(P=D);break}e&&P&&T.alternate===null&&t(v,P),y=i(T,y,j),C===null?S=T:C.sibling=T,C=T,P=D}if(j===w.length)return n(v,P),le&&An(v,j),S;if(P===null){for(;j<w.length;j++)P=f(v,w[j],b),P!==null&&(y=i(P,y,j),C===null?S=P:C.sibling=P,C=P);return le&&An(v,j),S}for(P=r(v,P);j<w.length;j++)D=h(P,v,j,w[j],b),D!==null&&(e&&D.alternate!==null&&P.delete(D.key===null?j:D.key),y=i(D,y,j),C===null?S=D:C.sibling=D,C=D);return e&&P.forEach(function(z){return t(v,z)}),le&&An(v,j),S}function g(v,y,w,b){var S=Hr(w);if(typeof S!="function")throw Error(M(150));if(w=S.call(w),w==null)throw Error(M(151));for(var C=S=null,P=y,j=y=0,D=null,T=w.next();P!==null&&!T.done;j++,T=w.next()){P.index>j?(D=P,P=null):D=P.sibling;var z=u(v,P,T.value,b);if(z===null){P===null&&(P=D);break}e&&P&&z.alternate===null&&t(v,P),y=i(z,y,j),C===null?S=z:C.sibling=z,C=z,P=D}if(T.done)return n(v,P),le&&An(v,j),S;if(P===null){for(;!T.done;j++,T=w.next())T=f(v,T.value,b),T!==null&&(y=i(T,y,j),C===null?S=T:C.sibling=T,C=T);return le&&An(v,j),S}for(P=r(v,P);!T.done;j++,T=w.next())T=h(P,v,j,T.value,b),T!==null&&(e&&T.alternate!==null&&P.delete(T.key===null?j:T.key),y=i(T,y,j),C===null?S=T:C.sibling=T,C=T);return e&&P.forEach(function(V){return t(v,V)}),le&&An(v,j),S}function x(v,y,w,b){if(typeof w=="object"&&w!==null&&w.type===rr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ii:e:{for(var S=w.key,C=y;C!==null;){if(C.key===S){if(S=w.type,S===rr){if(C.tag===7){n(v,C.sibling),y=s(C,w.props.children),y.return=v,v=y;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Zt&&xd(S)===C.type){n(v,C.sibling),y=s(C,w.props),y.ref=Xr(v,C,w),y.return=v,v=y;break e}n(v,C);break}else t(v,C);C=C.sibling}w.type===rr?(y=$n(w.props.children,v.mode,b,w.key),y.return=v,v=y):(b=Ii(w.type,w.key,w.props,null,v.mode,b),b.ref=Xr(v,y,w),b.return=v,v=b)}return o(v);case nr:e:{for(C=w.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(v,y.sibling),y=s(y,w.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Ta(w,v.mode,b),y.return=v,v=y}return o(v);case Zt:return C=w._init,x(v,y,C(w._payload),b)}if(ss(w))return p(v,y,w,b);if(Hr(w))return g(v,y,w,b);gi(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(v,y.sibling),y=s(y,w),y.return=v,v=y):(n(v,y),y=Ea(w,v.mode,b),y.return=v,v=y),o(v)):n(v,y)}return x}var Nr=Xp(!0),Qp=Xp(!1),no=kn(null),ro=null,dr=null,Du=null;function Ru(){Du=dr=ro=null}function Vu(e){var t=no.current;ie(no),e._currentValue=t}function Pl(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 Sr(e,t){ro=e,Du=dr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(Du!==e)if(e={context:e,memoizedValue:t,next:null},dr===null){if(ro===null)throw Error(M(308));dr=e,ro.dependencies={lanes:0,firstContext:e}}else dr=dr.next=e;return t}var Fn=null;function Fu(e){Fn===null?Fn=[e]:Fn.push(e)}function Zp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Fu(t)):(n.next=s.next,s.next=n),t.interleaved=n,Bt(e,r)}function Bt(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 Jt=!1;function Iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jp(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 Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Bt(e,n)}return s=r.interleaved,s===null?(t.next=t,Fu(r)):(t.next=s.next,s.next=t),r.interleaved=t,Bt(e,n)}function Ai(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,ku(e,n)}}function wd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=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};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 so(e,t,n,r){var s=e.updateQueue;Jt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=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(i!==null){var f=s.baseState;o=0,d=c=l=null,a=i;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,g=a;switch(u=t,h=n,g.tag){case 1:if(p=g.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=g.payload,u=typeof p=="function"?p.call(h,f,u):p,u==null)break e;f=fe({},f,u);break e;case 2:Jt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,u=s.effects,u===null?s.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=s.shared.pending,a===null)break;u=a,a=u.next,u.next=null,s.lastBaseUpdate=u,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);qn|=o,e.lanes=o,e.memoizedState=f}}function bd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(M(191,s));s.call(r)}}}var Qs={},Et=kn(Qs),Ds=kn(Qs),Rs=kn(Qs);function In(e){if(e===Qs)throw Error(M(174));return e}function zu(e,t){switch(J(Rs,t),J(Ds,e),J(Et,Qs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:il(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=il(t,e)}ie(Et),J(Et,t)}function Mr(){ie(Et),ie(Ds),ie(Rs)}function em(e){In(Rs.current);var t=In(Et.current),n=il(t,e.type);t!==n&&(J(Ds,e),J(Et,n))}function Ou(e){Ds.current===e&&(ie(Et),ie(Ds))}var ue=kn(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ba=[];function $u(){for(var e=0;e<ba.length;e++)ba[e]._workInProgressVersionPrimary=null;ba.length=0}var Li=Gt.ReactCurrentDispatcher,Sa=Gt.ReactCurrentBatchConfig,Hn=0,de=null,Se=null,je=null,oo=!1,hs=!1,Vs=0,X1=0;function Ae(){throw Error(M(321))}function Bu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0}function Uu(e,t,n,r,s,i){if(Hn=i,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Li.current=e===null||e.memoizedState===null?ev:tv,e=n(r,s),hs){i=0;do{if(hs=!1,Vs=0,25<=i)throw Error(M(301));i+=1,je=Se=null,t.updateQueue=null,Li.current=nv,e=n(r,s)}while(hs)}if(Li.current=ao,t=Se!==null&&Se.next!==null,Hn=0,je=Se=de=null,oo=!1,t)throw Error(M(300));return e}function Wu(){var e=Vs!==0;return Vs=0,e}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?de.memoizedState=je=e:je=je.next=e,je}function ct(){if(Se===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=je===null?de.memoizedState:je.next;if(t!==null)je=t,Se=e;else{if(e===null)throw Error(M(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},je===null?de.memoizedState=je=e:je=je.next=e}return je}function Fs(e,t){return typeof t=="function"?t(e):t}function ka(e){var t=ct(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=Se,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var d=c.lane;if((Hn&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,de.lanes|=d,qn|=d}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,xt(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,de.lanes|=i,qn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ca(e){var t=ct(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);xt(i,t.memoizedState)||(Ue=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function tm(){}function nm(e,t){var n=de,r=ct(),s=t(),i=!xt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ue=!0),r=r.queue,Hu(im.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,Is(9,sm.bind(null,n,r,s,t),void 0,null),Ee===null)throw Error(M(349));Hn&30||rm(n,t,s)}return s}function rm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=de.updateQueue,t===null?(t={lastEffect:null,stores:null},de.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sm(e,t,n,r){t.value=n,t.getSnapshot=r,om(t)&&am(e)}function im(e,t,n){return n(function(){om(t)&&am(e)})}function om(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xt(e,n)}catch{return!0}}function am(e){var t=Bt(e,1);t!==null&&yt(t,e,1,-1)}function Sd(e){var t=St();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fs,lastRenderedState:e},t.queue=e,e=e.dispatch=J1.bind(null,de,e),[t.memoizedState,e]}function Is(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=de.updateQueue,t===null?(t={lastEffect:null,stores:null},de.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function lm(){return ct().memoizedState}function Di(e,t,n,r){var s=St();de.flags|=e,s.memoizedState=Is(1|t,n,void 0,r===void 0?null:r)}function Do(e,t,n,r){var s=ct();r=r===void 0?null:r;var i=void 0;if(Se!==null){var o=Se.memoizedState;if(i=o.destroy,r!==null&&Bu(r,o.deps)){s.memoizedState=Is(t,n,i,r);return}}de.flags|=e,s.memoizedState=Is(1|t,n,i,r)}function kd(e,t){return Di(8390656,8,e,t)}function Hu(e,t){return Do(2048,8,e,t)}function um(e,t){return Do(4,2,e,t)}function cm(e,t){return Do(4,4,e,t)}function dm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fm(e,t,n){return n=n!=null?n.concat([e]):null,Do(4,4,dm.bind(null,t,e),n)}function qu(){}function hm(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pm(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mm(e,t,n){return Hn&21?(xt(n,t)||(n=wp(),de.lanes|=n,qn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n)}function Q1(e,t){var n=Z;Z=n!==0&&4>n?n:4,e(!0);var r=Sa.transition;Sa.transition={};try{e(!1),t()}finally{Z=n,Sa.transition=r}}function gm(){return ct().memoizedState}function Z1(e,t,n){var r=pn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ym(e))vm(t,n);else if(n=Zp(e,t,n,r),n!==null){var s=ze();yt(n,e,r,s),xm(n,t,r)}}function J1(e,t,n){var r=pn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ym(e))vm(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,xt(a,o)){var l=t.interleaved;l===null?(s.next=s,Fu(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Zp(e,t,s,r),n!==null&&(s=ze(),yt(n,e,r,s),xm(n,t,r))}}function ym(e){var t=e.alternate;return e===de||t!==null&&t===de}function vm(e,t){hs=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ku(e,n)}}var ao={readContext:ut,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},ev={readContext:ut,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:kd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Di(4194308,4,dm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){return Di(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();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=Z1.bind(null,de,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Sd,useDebugValue:qu,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Sd(!1),t=e[0];return e=Q1.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=de,s=St();if(le){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Ee===null)throw Error(M(349));Hn&30||rm(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,kd(im.bind(null,r,i,e),[e]),r.flags|=2048,Is(9,sm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=St(),t=Ee.identifierPrefix;if(le){var n=Rt,r=Dt;n=(r&~(1<<32-gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=X1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},tv={readContext:ut,useCallback:hm,useContext:ut,useEffect:Hu,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:pm,useReducer:ka,useRef:lm,useState:function(){return ka(Fs)},useDebugValue:qu,useDeferredValue:function(e){var t=ct();return mm(t,Se.memoizedState,e)},useTransition:function(){var e=ka(Fs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:tm,useSyncExternalStore:nm,useId:gm,unstable_isNewReconciler:!1},nv={readContext:ut,useCallback:hm,useContext:ut,useEffect:Hu,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:pm,useReducer:Ca,useRef:lm,useState:function(){return Ca(Fs)},useDebugValue:qu,useDeferredValue:function(e){var t=ct();return Se===null?t.memoizedState=e:mm(t,Se.memoizedState,e)},useTransition:function(){var e=Ca(Fs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:tm,useSyncExternalStore:nm,useId:gm,unstable_isNewReconciler:!1};function ft(e,t){if(e&&e.defaultProps){t=fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ro={isMounted:function(e){return(e=e._reactInternals)?Xn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ze(),s=pn(e),i=Ft(r,s);i.payload=t,n!=null&&(i.callback=n),t=fn(e,i,s),t!==null&&(yt(t,e,s,r),Ai(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ze(),s=pn(e),i=Ft(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fn(e,i,s),t!==null&&(yt(t,e,s,r),Ai(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ze(),r=pn(e),s=Ft(n,r);s.tag=2,t!=null&&(s.callback=t),t=fn(e,s,r),t!==null&&(yt(t,e,r,n),Ai(t,e,r))}};function Cd(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Ms(n,r)||!Ms(s,i):!0}function wm(e,t,n){var r=!1,s=xn,i=t.contextType;return typeof i=="object"&&i!==null?i=ut(i):(s=He(t)?Un:Ve.current,r=t.contextTypes,i=(r=r!=null)?Er(e,s):xn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ro,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Pd(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ro.enqueueReplaceState(t,t.state,null)}function El(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Iu(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ut(i):(i=He(t)?Un:Ve.current,s.context=Er(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(jl(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Ro.enqueueReplaceState(s,s.state,null),so(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function _r(e,t){try{var n="",r=t;do n+=My(r),r=r.return;while(r);var s=n}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Pa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Tl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var rv=typeof WeakMap=="function"?WeakMap:Map;function bm(e,t,n){n=Ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uo||(uo=!0,Il=r),Tl(e,t)},n}function Sm(e,t,n){n=Ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Tl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Tl(e,t),typeof r!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function jd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new rv;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=yv.bind(null,e,t,n),t.then(e,e))}function Ed(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Td(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ft(-1,1),t.tag=2,fn(n,t,1))),n.lanes|=1),e)}var sv=Gt.ReactCurrentOwner,Ue=!1;function Ie(e,t,n,r){t.child=e===null?Qp(t,null,n,r):Nr(t,e.child,n,r)}function Nd(e,t,n,r,s){n=n.render;var i=t.ref;return Sr(t,s),r=Uu(e,t,n,r,i,s),n=Wu(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ut(e,t,s)):(le&&n&&_u(t),t.flags|=1,Ie(e,t,r,s),t.child)}function Md(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!ec(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,km(e,t,i,r,s)):(e=Ii(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ms,n(o,r)&&e.ref===t.ref)return Ut(e,t,s)}return t.flags|=1,e=mn(i,r),e.ref=t.ref,e.return=t,t.child=e}function km(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ms(i,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,Ut(e,t,s)}return Nl(e,t,n,r,s)}function Cm(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(hr,Ye),Ye|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(hr,Ye),Ye|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,J(hr,Ye),Ye|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,J(hr,Ye),Ye|=r;return Ie(e,t,s,n),t.child}function Pm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Nl(e,t,n,r,s){var i=He(n)?Un:Ve.current;return i=Er(t,i),Sr(t,s),n=Uu(e,t,n,r,i,s),r=Wu(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ut(e,t,s)):(le&&r&&_u(t),t.flags|=1,Ie(e,t,n,s),t.child)}function _d(e,t,n,r,s){if(He(n)){var i=!0;Ji(t)}else i=!1;if(Sr(t,s),t.stateNode===null)Ri(e,t),wm(t,n,r),El(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=ut(c):(c=He(n)?Un:Ve.current,c=Er(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Pd(t,o,r,c),Jt=!1;var u=t.memoizedState;o.state=u,so(t,r,o,s),l=t.memoizedState,a!==r||u!==l||We.current||Jt?(typeof d=="function"&&(jl(t,n,d,r),l=t.memoizedState),(a=Jt||Cd(t,n,a,r,u,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Jp(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:ft(t.type,a),o.props=c,f=t.pendingProps,u=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ut(l):(l=He(n)?Un:Ve.current,l=Er(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||u!==l)&&Pd(t,o,r,l),Jt=!1,u=t.memoizedState,o.state=u,so(t,r,o,s);var p=t.memoizedState;a!==f||u!==p||We.current||Jt?(typeof h=="function"&&(jl(t,n,h,r),p=t.memoizedState),(c=Jt||Cd(t,n,c,r,u,p,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&u===e.memoizedState||(t.flags|=1024),r=!1)}return Ml(e,t,n,r,i,s)}function Ml(e,t,n,r,s,i){Pm(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&gd(t,n,!1),Ut(e,t,i);r=t.stateNode,sv.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Nr(t,e.child,null,i),t.child=Nr(t,null,a,i)):Ie(e,t,a,i),t.memoizedState=r.state,s&&gd(t,n,!0),t.child}function jm(e){var t=e.stateNode;t.pendingContext?md(e,t.pendingContext,t.pendingContext!==t.context):t.context&&md(e,t.context,!1),zu(e,t.containerInfo)}function Ad(e,t,n,r,s){return Tr(),Lu(s),t.flags|=256,Ie(e,t,n,r),t.child}var _l={dehydrated:null,treeContext:null,retryLane:0};function Al(e){return{baseLanes:e,cachePool:null,transitions:null}}function Em(e,t,n){var r=t.pendingProps,s=ue.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),J(ue,s&1),e===null)return Cl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Io(o,r,0,null),e=$n(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Al(n),t.memoizedState=_l,e):Gu(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return iv(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=mn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=mn(a,i):(i=$n(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Al(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=_l,r}return i=e.child,e=i.sibling,r=mn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gu(e,t){return t=Io({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yi(e,t,n,r){return r!==null&&Lu(r),Nr(t,e.child,null,n),e=Gu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iv(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Pa(Error(M(422))),yi(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Io({mode:"visible",children:r.children},s,0,null),i=$n(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Nr(t,e.child,null,o),t.child.memoizedState=Al(o),t.memoizedState=_l,i);if(!(t.mode&1))return yi(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(M(419)),r=Pa(i,r,void 0),yi(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ue||a){if(r=Ee,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Bt(e,s),yt(r,e,s,-1))}return Ju(),r=Pa(Error(M(421))),yi(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=vv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ke=dn(s.nextSibling),Qe=t,le=!0,pt=null,e!==null&&(it[ot++]=Dt,it[ot++]=Rt,it[ot++]=Wn,Dt=e.id,Rt=e.overflow,Wn=t),t=Gu(t,r.children),t.flags|=4096,t)}function Ld(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Pl(e.return,t,n)}function ja(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Tm(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=ue.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ld(e,n,t);else if(e.tag===19)Ld(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(J(ue,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ja(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&io(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ja(t,!0,n,null,i);break;case"together":ja(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ri(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=mn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ov(e,t,n){switch(t.tag){case 3:jm(t),Tr();break;case 5:em(t);break;case 1:He(t.type)&&Ji(t);break;case 4:zu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;J(no,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(J(ue,ue.current&1),t.flags|=128,null):n&t.child.childLanes?Em(e,t,n):(J(ue,ue.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);J(ue,ue.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Tm(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(ue,ue.current),r)break;return null;case 22:case 23:return t.lanes=0,Cm(e,t,n)}return Ut(e,t,n)}var Nm,Ll,Mm,_m;Nm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ll=function(){};Mm=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,In(Et.current);var i=null;switch(n){case"input":s=tl(e,s),r=tl(e,r),i=[];break;case"select":s=fe({},s,{value:void 0}),r=fe({},r,{value:void 0}),i=[];break;case"textarea":s=sl(e,s),r=sl(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qi)}ol(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ks.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ks.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&re("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};_m=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qr(e,t){if(!le)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function av(e,t,n){var r=t.pendingProps;switch(Au(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return He(t.type)&&Zi(),Le(t),null;case 3:return r=t.stateNode,Mr(),ie(We),ie(Ve),$u(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(mi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&($l(pt),pt=null))),Ll(e,t),Le(t),null;case 5:Ou(t);var s=In(Rs.current);if(n=t.type,e!==null&&t.stateNode!=null)Mm(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return Le(t),null}if(e=In(Et.current),mi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[kt]=t,r[Ls]=i,e=(t.mode&1)!==0,n){case"dialog":re("cancel",r),re("close",r);break;case"iframe":case"object":case"embed":re("load",r);break;case"video":case"audio":for(s=0;s<os.length;s++)re(os[s],r);break;case"source":re("error",r);break;case"img":case"image":case"link":re("error",r),re("load",r);break;case"details":re("toggle",r);break;case"input":Bc(r,i),re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},re("invalid",r);break;case"textarea":Wc(r,i),re("invalid",r)}ol(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&pi(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&pi(r.textContent,a,e),s=["children",""+a]):ks.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&re("scroll",r)}switch(n){case"input":oi(r),Uc(r,i,!0);break;case"textarea":oi(r),Hc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Qi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ip(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/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[kt]=t,e[Ls]=r,Nm(e,t,!1,!1),t.stateNode=e;e:{switch(o=al(n,r),n){case"dialog":re("cancel",e),re("close",e),s=r;break;case"iframe":case"object":case"embed":re("load",e),s=r;break;case"video":case"audio":for(s=0;s<os.length;s++)re(os[s],e);s=r;break;case"source":re("error",e),s=r;break;case"img":case"image":case"link":re("error",e),re("load",e),s=r;break;case"details":re("toggle",e),s=r;break;case"input":Bc(e,r),s=tl(e,r),re("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=fe({},r,{value:void 0}),re("invalid",e);break;case"textarea":Wc(e,r),s=sl(e,r),re("invalid",e);break;default:s=r}ol(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?lp(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&op(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Cs(e,l):typeof l=="number"&&Cs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ks.hasOwnProperty(i)?l!=null&&i==="onScroll"&&re("scroll",e):l!=null&&yu(e,i,l,o))}switch(n){case"input":oi(e),Uc(e,r,!1);break;case"textarea":oi(e),Hc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+vn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?vr(e,!!r.multiple,i,!1):r.defaultValue!=null&&vr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Qi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Le(t),null;case 6:if(e&&t.stateNode!=null)_m(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(M(166));if(n=In(Rs.current),In(Et.current),mi(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(i=r.nodeValue!==n)&&(e=Qe,e!==null))switch(e.tag){case 3:pi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kt]=t,t.stateNode=r}return Le(t),null;case 13:if(ie(ue),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(le&&Ke!==null&&t.mode&1&&!(t.flags&128))Kp(),Tr(),t.flags|=98560,i=!1;else if(i=mi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(M(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(M(317));i[kt]=t}else Tr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Le(t),i=!1}else pt!==null&&($l(pt),pt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ue.current&1?Ce===0&&(Ce=3):Ju())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return Mr(),Ll(e,t),e===null&&_s(t.stateNode.containerInfo),Le(t),null;case 10:return Vu(t.type._context),Le(t),null;case 17:return He(t.type)&&Zi(),Le(t),null;case 19:if(ie(ue),i=t.memoizedState,i===null)return Le(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Qr(i,!1);else{if(Ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Qr(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return J(ue,ue.current&1|2),t.child}e=e.sibling}i.tail!==null&&ge()>Ar&&(t.flags|=128,r=!0,Qr(i,!1),t.lanes=4194304)}else{if(!r)if(e=io(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!le)return Le(t),null}else 2*ge()-i.renderingStartTime>Ar&&n!==1073741824&&(t.flags|=128,r=!0,Qr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ge(),t.sibling=null,n=ue.current,J(ue,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return Zu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function lv(e,t){switch(Au(t),t.tag){case 1:return He(t.type)&&Zi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mr(),ie(We),ie(Ve),$u(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ou(t),null;case 13:if(ie(ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(ue),null;case 4:return Mr(),null;case 10:return Vu(t.type._context),null;case 22:case 23:return Zu(),null;case 24:return null;default:return null}}var vi=!1,Re=!1,uv=typeof WeakSet=="function"?WeakSet:Set,I=null;function fr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pe(e,t,r)}else n.current=null}function Dl(e,t,n){try{n()}catch(r){pe(e,t,r)}}var Dd=!1;function cv(e,t){if(yl=Yi,e=Vp(),Mu(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 s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.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||s!==0&&f.nodeType!==3||(a=o+s),f!==i||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===s&&(a=o),u===i&&++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(vl={focusedElem:e,selectionRange:n},Yi=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;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 g=p.memoizedProps,x=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ft(t.type,g),x);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(b){pe(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return p=Dd,Dd=!1,p}function ps(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Dl(t,n,i)}s=s.next}while(s!==r)}}function Vo(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 Rl(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 Am(e){var t=e.alternate;t!==null&&(e.alternate=null,Am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[Ls],delete t[bl],delete t[q1],delete t[G1])),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 Lm(e){return e.tag===5||e.tag===3||e.tag===4}function Rd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lm(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=Qi));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 Fl(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(Fl(e,t,n),e=e.sibling;e!==null;)Fl(e,t,n),e=e.sibling}var Ne=null,ht=!1;function Yt(e,t,n){for(n=n.child;n!==null;)Dm(e,t,n),n=n.sibling}function Dm(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(To,n)}catch{}switch(n.tag){case 5:Re||fr(n,t);case 6:var r=Ne,s=ht;Ne=null,Yt(e,t,n),Ne=r,ht=s,Ne!==null&&(ht?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(ht?(e=Ne,n=n.stateNode,e.nodeType===8?xa(e.parentNode,n):e.nodeType===1&&xa(e,n),Ts(e)):xa(Ne,n.stateNode));break;case 4:r=Ne,s=ht,Ne=n.stateNode.containerInfo,ht=!0,Yt(e,t,n),Ne=r,ht=s;break;case 0:case 11:case 14:case 15:if(!Re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Dl(n,t,o),s=s.next}while(s!==r)}Yt(e,t,n);break;case 1:if(!Re&&(fr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){pe(n,t,a)}Yt(e,t,n);break;case 21:Yt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Yt(e,t,n),Re=r):Yt(e,t,n);break;default:Yt(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 uv),t.forEach(function(r){var s=xv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function dt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ne=a.stateNode,ht=!1;break e;case 3:Ne=a.stateNode.containerInfo,ht=!0;break e;case 4:Ne=a.stateNode.containerInfo,ht=!0;break e}a=a.return}if(Ne===null)throw Error(M(160));Dm(i,o,s),Ne=null,ht=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){pe(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rm(t,e),t=t.sibling}function Rm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),bt(e),r&4){try{ps(3,e,e.return),Vo(3,e)}catch(g){pe(e,e.return,g)}try{ps(5,e,e.return)}catch(g){pe(e,e.return,g)}}break;case 1:dt(t,e),bt(e),r&512&&n!==null&&fr(n,n.return);break;case 5:if(dt(t,e),bt(e),r&512&&n!==null&&fr(n,n.return),e.flags&32){var s=e.stateNode;try{Cs(s,"")}catch(g){pe(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&rp(s,i),al(a,o);var c=al(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?lp(s,f):d==="dangerouslySetInnerHTML"?op(s,f):d==="children"?Cs(s,f):yu(s,d,f,c)}switch(a){case"input":nl(s,i);break;case"textarea":sp(s,i);break;case"select":var u=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?vr(s,!!i.multiple,h,!1):u!==!!i.multiple&&(i.defaultValue!=null?vr(s,!!i.multiple,i.defaultValue,!0):vr(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ls]=i}catch(g){pe(e,e.return,g)}}break;case 6:if(dt(t,e),bt(e),r&4){if(e.stateNode===null)throw Error(M(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){pe(e,e.return,g)}}break;case 3:if(dt(t,e),bt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ts(t.containerInfo)}catch(g){pe(e,e.return,g)}break;case 4:dt(t,e),bt(e);break;case 13:dt(t,e),bt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Xu=ge())),r&4&&Vd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Re=(c=Re)||d,dt(t,e),Re=c):dt(t,e),bt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(I=e,d=e.child;d!==null;){for(f=I=d;I!==null;){switch(u=I,h=u.child,u.tag){case 0:case 11:case 14:case 15:ps(4,u,u.return);break;case 1:fr(u,u.return);var p=u.stateNode;if(typeof p.componentWillUnmount=="function"){r=u,n=u.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){pe(r,n,g)}}break;case 5:fr(u,u.return);break;case 22:if(u.memoizedState!==null){Id(f);continue}}h!==null?(h.return=u,I=h):Id(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=ap("display",o))}catch(g){pe(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){pe(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dt(t,e),bt(e),r&4&&Vd(e);break;case 21:break;default:dt(t,e),bt(e)}}function bt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Lm(n)){var r=n;break e}n=n.return}throw Error(M(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Cs(s,""),r.flags&=-33);var i=Rd(e);Fl(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Rd(e);Vl(e,a,o);break;default:throw Error(M(161))}}catch(l){pe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dv(e,t,n){I=e,Vm(e)}function Vm(e,t,n){for(var r=(e.mode&1)!==0;I!==null;){var s=I,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||vi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Re;a=vi;var c=Re;if(vi=o,(Re=l)&&!c)for(I=s;I!==null;)o=I,l=o.child,o.tag===22&&o.memoizedState!==null?zd(s):l!==null?(l.return=o,I=l):zd(s);for(;i!==null;)I=i,Vm(i),i=i.sibling;I=s,vi=a,Re=c}Fd(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,I=i):Fd(e)}}function Fd(e){for(;I!==null;){var t=I;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Re||Vo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Re)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ft(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&bd(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bd(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ts(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}Re||t.flags&512&&Rl(t)}catch(u){pe(t,t.return,u)}}if(t===e){I=null;break}if(n=t.sibling,n!==null){n.return=t.return,I=n;break}I=t.return}}function Id(e){for(;I!==null;){var t=I;if(t===e){I=null;break}var n=t.sibling;if(n!==null){n.return=t.return,I=n;break}I=t.return}}function zd(e){for(;I!==null;){var t=I;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vo(4,t)}catch(l){pe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){pe(t,s,l)}}var i=t.return;try{Rl(t)}catch(l){pe(t,i,l)}break;case 5:var o=t.return;try{Rl(t)}catch(l){pe(t,o,l)}}}catch(l){pe(t,t.return,l)}if(t===e){I=null;break}var a=t.sibling;if(a!==null){a.return=t.return,I=a;break}I=t.return}}var fv=Math.ceil,lo=Gt.ReactCurrentDispatcher,Yu=Gt.ReactCurrentOwner,lt=Gt.ReactCurrentBatchConfig,K=0,Ee=null,we=null,Me=0,Ye=0,hr=kn(0),Ce=0,zs=null,qn=0,Fo=0,Ku=0,ms=null,Be=null,Xu=0,Ar=1/0,At=null,uo=!1,Il=null,hn=null,xi=!1,on=null,co=0,gs=0,zl=null,Vi=-1,Fi=0;function ze(){return K&6?ge():Vi!==-1?Vi:Vi=ge()}function pn(e){return e.mode&1?K&2&&Me!==0?Me&-Me:K1.transition!==null?(Fi===0&&(Fi=wp()),Fi):(e=Z,e!==0||(e=window.event,e=e===void 0?16:Ep(e.type)),e):1}function yt(e,t,n,r){if(50<gs)throw gs=0,zl=null,Error(M(185));Ys(e,n,r),(!(K&2)||e!==Ee)&&(e===Ee&&(!(K&2)&&(Fo|=n),Ce===4&&nn(e,Me)),qe(e,r),n===1&&K===0&&!(t.mode&1)&&(Ar=ge()+500,Lo&&Cn()))}function qe(e,t){var n=e.callbackNode;Ky(e,t);var r=Gi(e,e===Ee?Me:0);if(r===0)n!==null&&Yc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yc(n),t===1)e.tag===0?Y1(Od.bind(null,e)):qp(Od.bind(null,e)),W1(function(){!(K&6)&&Cn()}),n=null;else{switch(bp(r)){case 1:n=Su;break;case 4:n=vp;break;case 16:n=qi;break;case 536870912:n=xp;break;default:n=qi}n=Wm(n,Fm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fm(e,t){if(Vi=-1,Fi=0,K&6)throw Error(M(327));var n=e.callbackNode;if(kr()&&e.callbackNode!==n)return null;var r=Gi(e,e===Ee?Me:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fo(e,r);else{t=r;var s=K;K|=2;var i=zm();(Ee!==e||Me!==t)&&(At=null,Ar=ge()+500,On(e,t));do try{mv();break}catch(a){Im(e,a)}while(!0);Ru(),lo.current=i,K=s,we!==null?t=0:(Ee=null,Me=0,t=Ce)}if(t!==0){if(t===2&&(s=fl(e),s!==0&&(r=s,t=Ol(e,s))),t===1)throw n=zs,On(e,0),nn(e,r),qe(e,ge()),n;if(t===6)nn(e,r);else{if(s=e.current.alternate,!(r&30)&&!hv(s)&&(t=fo(e,r),t===2&&(i=fl(e),i!==0&&(r=i,t=Ol(e,i))),t===1))throw n=zs,On(e,0),nn(e,r),qe(e,ge()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(M(345));case 2:Ln(e,Be,At);break;case 3:if(nn(e,r),(r&130023424)===r&&(t=Xu+500-ge(),10<t)){if(Gi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ze(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=wl(Ln.bind(null,e,Be,At),t);break}Ln(e,Be,At);break;case 4:if(nn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-gt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fv(r/1960))-r,10<r){e.timeoutHandle=wl(Ln.bind(null,e,Be,At),r);break}Ln(e,Be,At);break;case 5:Ln(e,Be,At);break;default:throw Error(M(329))}}}return qe(e,ge()),e.callbackNode===n?Fm.bind(null,e):null}function Ol(e,t){var n=ms;return e.current.memoizedState.isDehydrated&&(On(e,t).flags|=256),e=fo(e,t),e!==2&&(t=Be,Be=n,t!==null&&$l(t)),e}function $l(e){Be===null?Be=e:Be.push.apply(Be,e)}function hv(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!xt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nn(e,t){for(t&=~Ku,t&=~Fo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gt(t),r=1<<n;e[n]=-1,t&=~r}}function Od(e){if(K&6)throw Error(M(327));kr();var t=Gi(e,0);if(!(t&1))return qe(e,ge()),null;var n=fo(e,t);if(e.tag!==0&&n===2){var r=fl(e);r!==0&&(t=r,n=Ol(e,r))}if(n===1)throw n=zs,On(e,0),nn(e,t),qe(e,ge()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ln(e,Be,At),qe(e,ge()),null}function Qu(e,t){var n=K;K|=1;try{return e(t)}finally{K=n,K===0&&(Ar=ge()+500,Lo&&Cn())}}function Gn(e){on!==null&&on.tag===0&&!(K&6)&&kr();var t=K;K|=1;var n=lt.transition,r=Z;try{if(lt.transition=null,Z=1,e)return e()}finally{Z=r,lt.transition=n,K=t,!(K&6)&&Cn()}}function Zu(){Ye=hr.current,ie(hr)}function On(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,U1(n)),we!==null)for(n=we.return;n!==null;){var r=n;switch(Au(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zi();break;case 3:Mr(),ie(We),ie(Ve),$u();break;case 5:Ou(r);break;case 4:Mr();break;case 13:ie(ue);break;case 19:ie(ue);break;case 10:Vu(r.type._context);break;case 22:case 23:Zu()}n=n.return}if(Ee=e,we=e=mn(e.current,null),Me=Ye=t,Ce=0,zs=null,Ku=Fo=qn=0,Be=ms=null,Fn!==null){for(t=0;t<Fn.length;t++)if(n=Fn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Fn=null}return e}function Im(e,t){do{var n=we;try{if(Ru(),Li.current=ao,oo){for(var r=de.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}oo=!1}if(Hn=0,je=Se=de=null,hs=!1,Vs=0,Yu.current=null,n===null||n.return===null){Ce=1,zs=t,we=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Me,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var u=d.alternate;u?(d.updateQueue=u.updateQueue,d.memoizedState=u.memoizedState,d.lanes=u.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=Ed(o);if(h!==null){h.flags&=-257,Td(h,o,a,i,t),h.mode&1&&jd(i,c,t),t=h,l=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break e}else{if(!(t&1)){jd(i,c,t),Ju();break e}l=Error(M(426))}}else if(le&&a.mode&1){var x=Ed(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Td(x,o,a,i,t),Lu(_r(l,a));break e}}i=l=_r(l,a),Ce!==4&&(Ce=2),ms===null?ms=[i]:ms.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=bm(i,l,t);wd(i,v);break e;case 1:a=l;var y=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(hn===null||!hn.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=Sm(i,a,t);wd(i,b);break e}}i=i.return}while(i!==null)}$m(n)}catch(S){t=S,we===n&&n!==null&&(we=n=n.return);continue}break}while(!0)}function zm(){var e=lo.current;return lo.current=ao,e===null?ao:e}function Ju(){(Ce===0||Ce===3||Ce===2)&&(Ce=4),Ee===null||!(qn&268435455)&&!(Fo&268435455)||nn(Ee,Me)}function fo(e,t){var n=K;K|=2;var r=zm();(Ee!==e||Me!==t)&&(At=null,On(e,t));do try{pv();break}catch(s){Im(e,s)}while(!0);if(Ru(),K=n,lo.current=r,we!==null)throw Error(M(261));return Ee=null,Me=0,Ce}function pv(){for(;we!==null;)Om(we)}function mv(){for(;we!==null&&!Oy();)Om(we)}function Om(e){var t=Um(e.alternate,e,Ye);e.memoizedProps=e.pendingProps,t===null?$m(e):we=t,Yu.current=null}function $m(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=lv(n,t),n!==null){n.flags&=32767,we=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ce=6,we=null;return}}else if(n=av(n,t,Ye),n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Ce===0&&(Ce=5)}function Ln(e,t,n){var r=Z,s=lt.transition;try{lt.transition=null,Z=1,gv(e,t,n,r)}finally{lt.transition=s,Z=r}return null}function gv(e,t,n,r){do kr();while(on!==null);if(K&6)throw Error(M(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Xy(e,i),e===Ee&&(we=Ee=null,Me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||xi||(xi=!0,Wm(qi,function(){return kr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=lt.transition,lt.transition=null;var o=Z;Z=1;var a=K;K|=4,Yu.current=null,cv(e,n),Rm(n,e),V1(vl),Yi=!!yl,vl=yl=null,e.current=n,dv(n),$y(),K=a,Z=o,lt.transition=i}else e.current=n;if(xi&&(xi=!1,on=e,co=s),i=e.pendingLanes,i===0&&(hn=null),Wy(n.stateNode),qe(e,ge()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(uo)throw uo=!1,e=Il,Il=null,e;return co&1&&e.tag!==0&&kr(),i=e.pendingLanes,i&1?e===zl?gs++:(gs=0,zl=e):gs=0,Cn(),null}function kr(){if(on!==null){var e=bp(co),t=lt.transition,n=Z;try{if(lt.transition=null,Z=16>e?16:e,on===null)var r=!1;else{if(e=on,on=null,co=0,K&6)throw Error(M(331));var s=K;for(K|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(I=c;I!==null;){var d=I;switch(d.tag){case 0:case 11:case 15:ps(8,d,i)}var f=d.child;if(f!==null)f.return=d,I=f;else for(;I!==null;){d=I;var u=d.sibling,h=d.return;if(Am(d),d===c){I=null;break}if(u!==null){u.return=h,I=u;break}I=h}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}I=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,I=o;else e:for(;I!==null;){if(i=I,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ps(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,I=v;break e}I=i.return}}var y=e.current;for(I=y;I!==null;){o=I;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,I=w;else e:for(o=y;I!==null;){if(a=I,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Vo(9,a)}}catch(S){pe(a,a.return,S)}if(a===o){I=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,I=b;break e}I=a.return}}if(K=s,Cn(),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(To,e)}catch{}r=!0}return r}finally{Z=n,lt.transition=t}}return!1}function $d(e,t,n){t=_r(n,t),t=bm(e,t,1),e=fn(e,t,1),t=ze(),e!==null&&(Ys(e,1,t),qe(e,t))}function pe(e,t,n){if(e.tag===3)$d(e,e,n);else for(;t!==null;){if(t.tag===3){$d(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r))){e=_r(n,e),e=Sm(t,e,1),t=fn(t,e,1),e=ze(),t!==null&&(Ys(t,1,e),qe(t,e));break}}t=t.return}}function yv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ze(),e.pingedLanes|=e.suspendedLanes&n,Ee===e&&(Me&n)===n&&(Ce===4||Ce===3&&(Me&130023424)===Me&&500>ge()-Xu?On(e,0):Ku|=n),qe(e,t)}function Bm(e,t){t===0&&(e.mode&1?(t=ui,ui<<=1,!(ui&130023424)&&(ui=4194304)):t=1);var n=ze();e=Bt(e,t),e!==null&&(Ys(e,t,n),qe(e,n))}function vv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bm(e,n)}function xv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),Bm(e,n)}var Um;Um=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||We.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,ov(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,le&&t.flags&1048576&&Gp(t,to,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ri(e,t),e=t.pendingProps;var s=Er(t,Ve.current);Sr(t,n),s=Uu(null,t,r,e,s,n);var i=Wu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,He(r)?(i=!0,Ji(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Iu(t),s.updater=Ro,t.stateNode=s,s._reactInternals=t,El(t,r,e,n),t=Ml(null,t,r,!0,i,n)):(t.tag=0,le&&i&&_u(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ri(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=bv(r),e=ft(r,e),s){case 0:t=Nl(null,t,r,e,n);break e;case 1:t=_d(null,t,r,e,n);break e;case 11:t=Nd(null,t,r,e,n);break e;case 14:t=Md(null,t,r,ft(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Nl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),_d(e,t,r,s,n);case 3:e:{if(jm(t),e===null)throw Error(M(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Jp(e,t),so(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=_r(Error(M(423)),t),t=Ad(e,t,r,n,s);break e}else if(r!==s){s=_r(Error(M(424)),t),t=Ad(e,t,r,n,s);break e}else for(Ke=dn(t.stateNode.containerInfo.firstChild),Qe=t,le=!0,pt=null,n=Qp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Tr(),r===s){t=Ut(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return em(t),e===null&&Cl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,xl(r,s)?o=null:i!==null&&xl(r,i)&&(t.flags|=32),Pm(e,t),Ie(e,t,o,n),t.child;case 6:return e===null&&Cl(t),null;case 13:return Em(e,t,n);case 4:return zu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Nr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Nd(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,J(no,r._currentValue),r._currentValue=o,i!==null)if(xt(i.value,o)){if(i.children===s.children&&!We.current){t=Ut(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Ft(-1,n&-n),l.tag=2;var c=i.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}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Pl(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(M(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Pl(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sr(t,n),s=ut(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=ft(r,t.pendingProps),s=ft(r.type,s),Md(e,t,r,s,n);case 15:return km(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Ri(e,t),t.tag=1,He(r)?(e=!0,Ji(t)):e=!1,Sr(t,n),wm(t,r,s),El(t,r,s,n),Ml(null,t,r,!0,e,n);case 19:return Tm(e,t,n);case 22:return Cm(e,t,n)}throw Error(M(156,t.tag))};function Wm(e,t){return yp(e,t)}function wv(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 at(e,t,n,r){return new wv(e,t,n,r)}function ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bv(e){if(typeof e=="function")return ec(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xu)return 11;if(e===wu)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=at(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 Ii(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")ec(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case rr:return $n(n.children,s,i,t);case vu:o=8,s|=8;break;case Qa:return e=at(12,n,t,s|2),e.elementType=Qa,e.lanes=i,e;case Za:return e=at(13,n,t,s),e.elementType=Za,e.lanes=i,e;case Ja:return e=at(19,n,t,s),e.elementType=Ja,e.lanes=i,e;case ep:return Io(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zh:o=10;break e;case Jh:o=9;break e;case xu:o=11;break e;case wu:o=14;break e;case Zt:o=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=at(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function $n(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Io(e,t,n,r){return e=at(22,e,r,t),e.elementType=ep,e.lanes=n,e.stateNode={isHidden:!1},e}function Ea(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function Ta(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sv(e,t,n,r,s){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=la(0),this.expirationTimes=la(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function tc(e,t,n,r,s,i,o,a,l){return e=new Sv(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=at(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iu(i),e}function kv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:nr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hm(e){if(!e)return xn;e=e._reactInternals;e:{if(Xn(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(He(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(He(n))return Hp(e,n,t)}return t}function qm(e,t,n,r,s,i,o,a,l){return e=tc(n,r,!0,e,s,i,o,a,l),e.context=Hm(null),n=e.current,r=ze(),s=pn(n),i=Ft(r,s),i.callback=t??null,fn(n,i,s),e.current.lanes=s,Ys(e,s,r),qe(e,r),e}function zo(e,t,n,r){var s=t.current,i=ze(),o=pn(s);return n=Hm(n),t.context===null?t.context=n:t.pendingContext=n,t=Ft(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fn(s,t,o),e!==null&&(yt(e,s,o,i),Ai(e,s,o)),o}function ho(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function nc(e,t){Bd(e,t),(e=e.alternate)&&Bd(e,t)}function Cv(){return null}var Gm=typeof reportError=="function"?reportError:function(e){console.error(e)};function rc(e){this._internalRoot=e}Oo.prototype.render=rc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));zo(e,t,null,null)};Oo.prototype.unmount=rc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gn(function(){zo(null,e,null,null)}),t[$t]=null}};function Oo(e){this._internalRoot=e}Oo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tn.length&&t!==0&&t<tn[n].priority;n++);tn.splice(n,0,e),n===0&&jp(e)}};function sc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ud(){}function Pv(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=ho(o);i.call(c)}}var o=qm(t,r,e,0,null,!1,!1,"",Ud);return e._reactRootContainer=o,e[$t]=o.current,_s(e.nodeType===8?e.parentNode:e),Gn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=ho(l);a.call(c)}}var l=tc(e,0,!1,null,null,!1,!1,"",Ud);return e._reactRootContainer=l,e[$t]=l.current,_s(e.nodeType===8?e.parentNode:e),Gn(function(){zo(t,l,n,r)}),l}function Bo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ho(o);a.call(l)}}zo(t,o,e,s)}else o=Pv(n,t,e,s,r);return ho(o)}Sp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=is(t.pendingLanes);n!==0&&(ku(t,n|1),qe(t,ge()),!(K&6)&&(Ar=ge()+500,Cn()))}break;case 13:Gn(function(){var r=Bt(e,1);if(r!==null){var s=ze();yt(r,e,1,s)}}),nc(e,1)}};Cu=function(e){if(e.tag===13){var t=Bt(e,134217728);if(t!==null){var n=ze();yt(t,e,134217728,n)}nc(e,134217728)}};kp=function(e){if(e.tag===13){var t=pn(e),n=Bt(e,t);if(n!==null){var r=ze();yt(n,e,t,r)}nc(e,t)}};Cp=function(){return Z};Pp=function(e,t){var n=Z;try{return Z=e,t()}finally{Z=n}};ul=function(e,t,n){switch(t){case"input":if(nl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Ao(r);if(!s)throw Error(M(90));np(r),nl(r,s)}}}break;case"textarea":sp(e,n);break;case"select":t=n.value,t!=null&&vr(e,!!n.multiple,t,!1)}};dp=Qu;fp=Gn;var jv={usingClientEntryPoint:!1,Events:[Xs,ar,Ao,up,cp,Qu]},Zr={findFiberByHostInstance:Vn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ev={bundleType:Zr.bundleType,version:Zr.version,rendererPackageName:Zr.rendererPackageName,rendererConfig:Zr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=mp(e),e===null?null:e.stateNode},findFiberByHostInstance:Zr.findFiberByHostInstance||Cv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wi.isDisabled&&wi.supportsFiber)try{To=wi.inject(Ev),jt=wi}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jv;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sc(t))throw Error(M(200));return kv(e,t,null,n)};et.createRoot=function(e,t){if(!sc(e))throw Error(M(299));var n=!1,r="",s=Gm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=tc(e,1,!1,null,null,n,!1,r,s),e[$t]=t.current,_s(e.nodeType===8?e.parentNode:e),new rc(t)};et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=mp(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return Gn(e)};et.hydrate=function(e,t,n){if(!$o(t))throw Error(M(200));return Bo(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!sc(e))throw Error(M(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Gm;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=qm(t,null,e,1,n??null,s,!1,i,o),e[$t]=t.current,_s(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Oo(t)};et.render=function(e,t,n){if(!$o(t))throw Error(M(200));return Bo(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!$o(e))throw Error(M(40));return e._reactRootContainer?(Gn(function(){Bo(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1};et.unstable_batchedUpdates=Qu;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$o(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return Bo(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function Ym(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ym)}catch(e){console.error(e)}}Ym(),Yh.exports=et;var Tv=Yh.exports,Wd=Tv;Ka.createRoot=Wd.createRoot,Ka.hydrateRoot=Wd.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 Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Os.apply(this,arguments)}var an;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(an||(an={}));const Hd="popstate";function Nv(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Bl("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:po(s)}return _v(t,n,null,e)}function ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Km(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mv(){return Math.random().toString(36).substr(2,8)}function qd(e,t){return{usr:e.state,key:e.key,idx:t}}function Bl(e,t,n,r){return n===void 0&&(n=null),Os({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Or(t):t,{state:n,key:t&&t.key||r||Mv()})}function po(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 Or(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 _v(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=an.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Os({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=an.Pop;let x=d(),v=x==null?null:x-c;c=x,l&&l({action:a,location:g.location,delta:v})}function u(x,v){a=an.Push;let y=Bl(g.location,x,v);c=d()+1;let w=qd(y,c),b=g.createHref(y);try{o.pushState(w,"",b)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(b)}i&&l&&l({action:a,location:g.location,delta:1})}function h(x,v){a=an.Replace;let y=Bl(g.location,x,v);c=d();let w=qd(y,c),b=g.createHref(y);o.replaceState(w,"",b),i&&l&&l({action:a,location:g.location,delta:0})}function p(x){let v=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof x=="string"?x:po(x);return y=y.replace(/ $/,"%20"),ve(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let g={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Hd,f),l=x,()=>{s.removeEventListener(Hd,f),l=null}},createHref(x){return t(s,x)},createURL:p,encodeLocation(x){let v=p(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:u,replace:h,go(x){return o.go(x)}};return g}var Gd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gd||(Gd={}));function Av(e,t,n){return n===void 0&&(n="/"),Lv(e,t,n)}function Lv(e,t,n,r){let s=typeof t=="string"?Or(t):t,i=ic(s.pathname||"/",n);if(i==null)return null;let o=Xm(e);Dv(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=qv(i);a=Uv(o[l],c)}return a}function Xm(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(ve(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=gn([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(ve(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Xm(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:$v(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Qm(i.path))s(i,o,l)}),t}function Qm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Qm(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function Dv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Bv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Rv=/^:[\w-]+$/,Vv=3,Fv=2,Iv=1,zv=10,Ov=-2,Yd=e=>e==="*";function $v(e,t){let n=e.split("/"),r=n.length;return n.some(Yd)&&(r+=Ov),t&&(r+=Fv),n.filter(s=>!Yd(s)).reduce((s,i)=>s+(Rv.test(i)?Vv:i===""?Iv:zv),r)}function Bv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Uv(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Wv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),u=l.route;if(!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:gn([i,f.pathname]),pathnameBase:Xv(gn([i,f.pathnameBase])),route:u}),f.pathnameBase!=="/"&&(i=gn([i,f.pathnameBase]))}return o}function Wv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Hv(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:u,isOptional:h}=d;if(u==="*"){let g=a[f]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?c[u]=void 0:c[u]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function Hv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Km(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=[],s="^"+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:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function qv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Km(!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 ic(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 Gv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Or(e):e;return{pathname:n?n.startsWith("/")?n:Yv(n,t):t,search:Qv(r),hash:Zv(s)}}function Yv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Na(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 <Link to="..."> and the router will parse it for you.'}function Kv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function oc(e,t){let n=Kv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ac(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Or(e):(s=Os({},e),ve(!s.pathname||!s.pathname.includes("?"),Na("?","pathname","search",s)),ve(!s.pathname||!s.pathname.includes("#"),Na("#","pathname","hash",s)),ve(!s.search||!s.search.includes("#"),Na("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.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;s.pathname=u.join("/")}a=f>=0?t[f]:"/"}let l=Gv(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const gn=e=>e.join("/").replace(/\/\/+/g,"/"),Xv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Jv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Zm=["post","put","patch","delete"];new Set(Zm);const ex=["get",...Zm];new Set(ex);/**
* 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 $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$s.apply(this,arguments)}const lc=k.createContext(null),tx=k.createContext(null),Pn=k.createContext(null),Uo=k.createContext(null),jn=k.createContext({outlet:null,matches:[],isDataRoute:!1}),Jm=k.createContext(null);function nx(e,t){let{relative:n}=t===void 0?{}:t;$r()||ve(!1);let{basename:r,navigator:s}=k.useContext(Pn),{hash:i,pathname:o,search:a}=t0(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:gn([r,o])),s.createHref({pathname:l,search:a,hash:i})}function $r(){return k.useContext(Uo)!=null}function En(){return $r()||ve(!1),k.useContext(Uo).location}function e0(e){k.useContext(Pn).static||k.useLayoutEffect(e)}function Wo(){let{isDataRoute:e}=k.useContext(jn);return e?mx():rx()}function rx(){$r()||ve(!1);let e=k.useContext(lc),{basename:t,future:n,navigator:r}=k.useContext(Pn),{matches:s}=k.useContext(jn),{pathname:i}=En(),o=JSON.stringify(oc(s,n.v7_relativeSplatPath)),a=k.useRef(!1);return e0(()=>{a.current=!0}),k.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=ac(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:gn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}function t0(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(Pn),{matches:s}=k.useContext(jn),{pathname:i}=En(),o=JSON.stringify(oc(s,r.v7_relativeSplatPath));return k.useMemo(()=>ac(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function sx(e,t){return ix(e,t)}function ix(e,t,n,r){$r()||ve(!1);let{navigator:s}=k.useContext(Pn),{matches:i}=k.useContext(jn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=En(),d;if(t){var f;let x=typeof t=="string"?Or(t):t;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||ve(!1),d=x}else d=c;let u=d.pathname||"/",h=u;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+u.replace(/^\//,"").split("/").slice(x.length).join("/")}let p=Av(e,{pathname:h}),g=cx(p&&p.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:gn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:gn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&g?k.createElement(Uo.Provider,{value:{location:$s({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:an.Pop}},g):g}function ox(){let e=px(),t=Jv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:s},n):null,null)}const ax=k.createElement(ox,null);class lx extends k.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?k.createElement(jn.Provider,{value:this.props.routeContext},k.createElement(Jm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ux(e){let{routeContext:t,match:n,children:r}=e,s=k.useContext(lc);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(jn.Provider,{value:t},r)}function cx(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ve(!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<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:u,errors:h}=n,p=f.route.loader&&u[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||p){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,u)=>{let h,p=!1,g=null,x=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||ax,l&&(c<0&&u===0?(gx("route-fallback"),p=!0,x=null):c===u&&(p=!0,x=f.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,u+1)),y=()=>{let w;return h?w=g:p?w=x:f.route.Component?w=k.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,k.createElement(ux,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||u===0)?k.createElement(lx,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:y(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):y()},null)}var n0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(n0||{}),r0=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}(r0||{});function dx(e){let t=k.useContext(lc);return t||ve(!1),t}function fx(e){let t=k.useContext(tx);return t||ve(!1),t}function hx(e){let t=k.useContext(jn);return t||ve(!1),t}function s0(e){let t=hx(),n=t.matches[t.matches.length-1];return n.route.id||ve(!1),n.route.id}function px(){var e;let t=k.useContext(Jm),n=fx(),r=s0();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function mx(){let{router:e}=dx(n0.UseNavigateStable),t=s0(r0.UseNavigateStable),n=k.useRef(!1);return e0(()=>{n.current=!0}),k.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,$s({fromRouteId:t},i)))},[e,t])}const Kd={};function gx(e,t,n){Kd[e]||(Kd[e]=!0)}function yx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vx(e){let{to:t,replace:n,state:r,relative:s}=e;$r()||ve(!1);let{future:i,static:o}=k.useContext(Pn),{matches:a}=k.useContext(jn),{pathname:l}=En(),c=Wo(),d=ac(t,oc(a,i.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return k.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:s}),[c,f,s,n,r]),null}function _t(e){ve(!1)}function xx(e){let{basename:t="/",children:n=null,location:r,navigationType:s=an.Pop,navigator:i,static:o=!1,future:a}=e;$r()&&ve(!1);let l=t.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:l,navigator:i,static:o,future:$s({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Or(r));let{pathname:d="/",search:f="",hash:u="",state:h=null,key:p="default"}=r,g=k.useMemo(()=>{let x=ic(d,l);return x==null?null:{location:{pathname:x,search:f,hash:u,state:h,key:p},navigationType:s}},[l,d,f,u,h,p,s]);return g==null?null:k.createElement(Pn.Provider,{value:c},k.createElement(Uo.Provider,{children:n,value:g}))}function wx(e){let{children:t,location:n}=e;return sx(Ul(t),n)}new Promise(()=>{});function Ul(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(r,s)=>{if(!k.isValidElement(r))return;let i=[...t,s];if(r.type===k.Fragment){n.push.apply(n,Ul(r.props.children,i));return}r.type!==_t&&ve(!1),!r.props.index||!r.props.children||ve(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ul(r.props.children,i)),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 Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wl.apply(this,arguments)}function bx(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Sx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kx(e,t){return e.button===0&&(!t||t==="_self")&&!Sx(e)}function Hl(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(s=>[n,s]):[[n,r]])},[]))}function Cx(e,t){let n=Hl(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Px=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],jx="6";try{window.__reactRouterVersion=jx}catch{}const Ex="startTransition",Xd=yy[Ex];function Tx(e){let{basename:t,children:n,future:r,window:s}=e,i=k.useRef();i.current==null&&(i.current=Nv({window:s,v5Compat:!0}));let o=i.current,[a,l]=k.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=k.useCallback(f=>{c&&Xd?Xd(()=>l(f)):l(f)},[l,c]);return k.useLayoutEffect(()=>o.listen(d),[o,d]),k.useEffect(()=>yx(r),[r]),k.createElement(xx,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Nx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zi=k.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,u=bx(t,Px),{basename:h}=k.useContext(Pn),p,g=!1;if(typeof c=="string"&&Mx.test(c)&&(p=c,Nx))try{let w=new URL(window.location.href),b=c.startsWith("//")?new URL(w.protocol+c):new URL(c),S=ic(b.pathname,h);b.origin===w.origin&&S!=null?c=S+b.search+b.hash:g=!0}catch{}let x=nx(c,{relative:s}),v=_x(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:f});function y(w){r&&r(w),w.defaultPrevented||v(w)}return k.createElement("a",Wl({},u,{href:p||x,onClick:g||i?r:y,ref:n,target:l}))});var Qd;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Qd||(Qd={}));var Zd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Zd||(Zd={}));function _x(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Wo(),c=En(),d=t0(e,{relative:o});return k.useCallback(f=>{if(kx(f,n)){f.preventDefault();let u=r!==void 0?r:po(c)===po(d);l(e,{replace:u,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,d,r,s,n,e,i,o,a])}function Ax(e){let t=k.useRef(Hl(e)),n=k.useRef(!1),r=En(),s=k.useMemo(()=>Cx(r.search,n.current?null:t.current),[r.search]),i=Wo(),o=k.useCallback((a,l)=>{const c=Hl(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}let Lx={data:""},Dx=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||Lx},Rx=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Vx=/\/\*[^]*?\*\/| +/g,Jd=/\n+/g,rn=(e,t)=>{let n="",r="",s="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":r+=i[1]=="f"?rn(o,i):i+"{"+rn(o,i[1]=="k"?"":t)+"}":typeof o=="object"?r+=rn(o,t?t.replace(/([^,])+/g,a=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=rn.p?rn.p(i,o):i+":"+o+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Nt={},i0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+i0(e[n]);return t}return e},Fx=(e,t,n,r,s)=>{let i=i0(e),o=Nt[i]||(Nt[i]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(i));if(!Nt[o]){let l=i!==e?e:(c=>{let d,f,u=[{}];for(;d=Rx.exec(c.replace(Vx,""));)d[4]?u.shift():d[3]?(f=d[3].replace(Jd," ").trim(),u.unshift(u[0][f]=u[0][f]||{})):u[0][d[1]]=d[2].replace(Jd," ").trim();return u[0]})(e);Nt[o]=rn(s?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Nt.g?Nt.g:null;return n&&(Nt.g=Nt[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)})(Nt[o],t,r,a),o},Ix=(e,t,n)=>e.reduce((r,s,i)=>{let o=t[i];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?"":rn(a,""):a===!1?"":a}return r+s+(o??"")},"");function Ho(e){let t=this||{},n=e.call?e(t.p):e;return Fx(n.unshift?n.raw?Ix(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,Dx(t.target),t.g,t.o,t.k)}let o0,ql,Gl;Ho.bind({g:1});let Wt=Ho.bind({k:1});function zx(e,t,n,r){rn.p=t,o0=e,ql=n,Gl=r}function Tn(e,t){let n=this||{};return function(){let r=arguments;function s(i,o){let a=Object.assign({},i),l=a.className||s.className;n.p=Object.assign({theme:ql&&ql()},a),n.o=/ *go\d+/.test(l),a.className=Ho.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Gl&&c[0]&&Gl(a),o0(c,a)}return s}}var Ox=e=>typeof e=="function",mo=(e,t)=>Ox(e)?e(t):e,$x=(()=>{let e=0;return()=>(++e).toString()})(),a0=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Bx=20,uc="default",l0=(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 l0(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:s}=t;return{...e,toasts:e.toasts.map(o=>o.id===s||s===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 i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Oi=[],u0={toasts:[],pausedAt:void 0,settings:{toastLimit:Bx}},Ct={},c0=(e,t=uc)=>{Ct[t]=l0(Ct[t]||u0,e),Oi.forEach(([n,r])=>{n===t&&r(Ct[t])})},d0=e=>Object.keys(Ct).forEach(t=>c0(e,t)),Ux=e=>Object.keys(Ct).find(t=>Ct[t].toasts.some(n=>n.id===e)),qo=(e=uc)=>t=>{c0(t,e)},Wx={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Hx=(e={},t=uc)=>{let[n,r]=k.useState(Ct[t]||u0),s=k.useRef(Ct[t]);k.useEffect(()=>(s.current!==Ct[t]&&r(Ct[t]),Oi.push([t,r]),()=>{let o=Oi.findIndex(([a])=>a===t);o>-1&&Oi.splice(o,1)}),[t]);let i=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)||Wx[o.type],style:{...e.style,...(c=e[o.type])==null?void 0:c.style,...o.style}}});return{...n,toasts:i}},qx=(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)||$x()}),Zs=e=>(t,n)=>{let r=qx(t,e,n);return qo(r.toasterId||Ux(r.id))({type:2,toast:r}),r.id},ke=(e,t)=>Zs("blank")(e,t);ke.error=Zs("error");ke.success=Zs("success");ke.loading=Zs("loading");ke.custom=Zs("custom");ke.dismiss=(e,t)=>{let n={type:3,toastId:e};t?qo(t)(n):d0(n)};ke.dismissAll=e=>ke.dismiss(void 0,e);ke.remove=(e,t)=>{let n={type:4,toastId:e};t?qo(t)(n):d0(n)};ke.removeAll=e=>ke.remove(void 0,e);ke.promise=(e,t,n)=>{let r=ke.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let i=t.success?mo(t.success,s):void 0;return i?ke.success(i,{id:r,...n,...n==null?void 0:n.success}):ke.dismiss(r),s}).catch(s=>{let i=t.error?mo(t.error,s):void 0;i?ke.error(i,{id:r,...n,...n==null?void 0:n.error}):ke.dismiss(r)}),e};var Gx=1e3,Yx=(e,t="default")=>{let{toasts:n,pausedAt:r}=Hx(e,t),s=k.useRef(new Map).current,i=k.useCallback((f,u=Gx)=>{if(s.has(f))return;let h=setTimeout(()=>{s.delete(f),o({type:4,toastId:f})},u);s.set(f,h)},[]);k.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&&ke.dismiss(h.id);return}return setTimeout(()=>ke.dismiss(h.id,t),p)});return()=>{u.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let o=k.useCallback(qo(t),[t]),a=k.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=k.useCallback((f,u)=>{o({type:1,toast:{id:f,height:u}})},[o]),c=k.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),d=k.useCallback((f,u)=>{let{reverseOrder:h=!1,gutter:p=8,defaultPosition:g}=u||{},x=n.filter(w=>(w.position||g)===(f.position||g)&&w.height),v=x.findIndex(w=>w.id===f.id),y=x.filter((w,b)=>b<v&&w.visible).length;return x.filter(w=>w.visible).slice(...h?[y+1]:[0,y]).reduce((w,b)=>w+(b.height||0)+p,0)},[n]);return k.useEffect(()=>{n.forEach(f=>{if(f.dismissed)i(f.id,f.removeDelay);else{let u=s.get(f.id);u&&(clearTimeout(u),s.delete(f.id))}})},[n,i]),{toasts:n,handlers:{updateHeight:l,startPause:a,endPause:c,calculateOffset:d}}},Kx=Wt`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,Xx=Wt`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,Qx=Wt`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,Zx=Tn("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${Kx} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${Xx} 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: ${Qx} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,Jx=Wt`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,e2=Tn("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: ${Jx} 1s linear infinite;
`,t2=Wt`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,n2=Wt`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,r2=Tn("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${t2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${n2} 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;
}
`,s2=Tn("div")`
position: absolute;
`,i2=Tn("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,o2=Wt`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,a2=Tn("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${o2} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,l2=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?k.createElement(a2,null,t):t:n==="blank"?null:k.createElement(i2,null,k.createElement(e2,{...r}),n!=="loading"&&k.createElement(s2,null,n==="error"?k.createElement(Zx,{...r}):k.createElement(r2,{...r})))},u2=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,c2=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,d2="0%{opacity:0;} 100%{opacity:1;}",f2="0%{opacity:1;} 100%{opacity:0;}",h2=Tn("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;
`,p2=Tn("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,m2=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=a0()?[d2,f2]:[u2(n),c2(n)];return{animation:t?`${Wt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Wt(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},g2=k.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?m2(e.position||t||"top-center",e.visible):{opacity:0},i=k.createElement(l2,{toast:e}),o=k.createElement(p2,{...e.ariaProps},mo(e.message,e));return k.createElement(h2,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:i,message:o}):k.createElement(k.Fragment,null,i,o))});zx(k.createElement);var y2=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let i=k.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 k.createElement("div",{ref:i,className:t,style:n},s)},v2=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:a0()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},x2=Ho`
z-index: 9999;
> * {
pointer-events: auto;
}
`,bi=16,w2=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,toasterId:i,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:c}=Yx(n,i);return k.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:bi,left:bi,right:bi,bottom:bi,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=v2(f,u);return k.createElement(y2,{id:d.id,key:d.id,onHeightUpdate:c.updateHeight,className:d.visible?x2:"",style:h},d.type==="custom"?mo(d.message,d):s?s(d):k.createElement(g2,{toast:d,position:f}))}))},he=ke;const f0=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Go=k.createContext({}),cc=k.createContext(null),Yo=typeof document<"u",b2=Yo?k.useLayoutEffect:k.useEffect,h0=k.createContext({strict:!1}),dc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),S2="framerAppearId",p0="data-"+dc(S2);function k2(e,t,n,r){const{visualElement:s}=k.useContext(Go),i=k.useContext(h0),o=k.useContext(cc),a=k.useContext(f0).reducedMotion,l=k.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:s,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;k.useInsertionEffect(()=>{c&&c.update(n,o)});const d=k.useRef(!!(n[p0]&&!window.HandoffComplete));return b2(()=>{c&&(c.render(),d.current&&c.animationState&&c.animationState.animateChanges())}),k.useEffect(()=>{c&&(c.updateFeatures(),!d.current&&c.animationState&&c.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),c}function pr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function C2(e,t,n){return k.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):pr(n)&&(n.current=r))},[t])}function Bs(e){return typeof e=="string"||Array.isArray(e)}function Ko(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const fc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hc=["initial",...fc];function Xo(e){return Ko(e.animate)||hc.some(t=>Bs(e[t]))}function m0(e){return!!(Xo(e)||e.variants)}function P2(e,t){if(Xo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Bs(n)?n:void 0,animate:Bs(r)?r:void 0}}return e.inherit!==!1?t:{}}function j2(e){const{initial:t,animate:n}=P2(e,k.useContext(Go));return k.useMemo(()=>({initial:t,animate:n}),[ef(t),ef(n)])}function ef(e){return Array.isArray(e)?e.join(" "):e}const tf={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"]},Us={};for(const e in tf)Us[e]={isEnabled:t=>tf[e].some(n=>!!t[n])};function E2(e){for(const t in e)Us[t]={...Us[t],...e[t]}}const g0=k.createContext({}),y0=k.createContext({}),T2=Symbol.for("motionComponentSymbol");function N2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&E2(e);function i(a,l){let c;const d={...k.useContext(f0),...a,layoutId:M2(a)},{isStatic:f}=d,u=j2(a),h=r(a,f);if(!f&&Yo){u.visualElement=k2(s,h,d,t);const p=k.useContext(y0),g=k.useContext(h0).strict;u.visualElement&&(c=u.visualElement.loadFeatures(d,g,e,p))}return k.createElement(Go.Provider,{value:u},c&&u.visualElement?k.createElement(c,{visualElement:u.visualElement,...d}):null,n(s,a,C2(h,u.visualElement,l),h,f,u.visualElement))}const o=k.forwardRef(i);return o[T2]=s,o}function M2({layoutId:e}){const t=k.useContext(g0).id;return t&&e!==void 0?t+"-"+e:e}function _2(e){function t(r,s={}){return N2(e(r,s))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,s)=>(n.has(s)||n.set(s,t(s)),n.get(s))})}const A2=["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 pc(e){return typeof e!="string"||e.includes("-")?!1:!!(A2.indexOf(e)>-1||/[A-Z]/.test(e))}const go={};function L2(e){Object.assign(go,e)}const Js=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qn=new Set(Js);function v0(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!go[e]||e==="opacity")}const Ge=e=>!!(e&&e.getVelocity),D2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},R2=Js.length;function V2(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,s){let i="";for(let o=0;o<R2;o++){const a=Js[o];if(e[a]!==void 0){const l=D2[a]||a;i+=`${l}(${e[a]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),s?i=s(e,r?"":i):n&&r&&(i="none"),i}const x0=e=>t=>typeof t=="string"&&t.startsWith(e),w0=x0("--"),Yl=x0("var(--"),F2=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,I2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,wn=(e,t,n)=>Math.min(Math.max(n,e),t),Zn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ys={...Zn,transform:e=>wn(0,1,e)},Si={...Zn,default:1},vs=e=>Math.round(e*1e5)/1e5,Qo=/(-)?([\d]*\.?[\d])+/g,b0=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,z2=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ei(e){return typeof e=="string"}const ti=e=>({test:t=>ei(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qt=ti("deg"),Tt=ti("%"),B=ti("px"),O2=ti("vh"),$2=ti("vw"),nf={...Tt,parse:e=>Tt.parse(e)/100,transform:e=>Tt.transform(e*100)},rf={...Zn,transform:Math.round},S0={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:Qt,rotateX:Qt,rotateY:Qt,rotateZ:Qt,scale:Si,scaleX:Si,scaleY:Si,scaleZ:Si,skew:Qt,skewX:Qt,skewY:Qt,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:ys,originX:nf,originY:nf,originZ:B,zIndex:rf,fillOpacity:ys,strokeOpacity:ys,numOctaves:rf};function mc(e,t,n,r){const{style:s,vars:i,transform:o,transformOrigin:a}=e;let l=!1,c=!1,d=!0;for(const f in t){const u=t[f];if(w0(f)){i[f]=u;continue}const h=S0[f],p=I2(u,h);if(Qn.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):s[f]=p}if(t.transform||(l||r?s.transform=V2(e.transform,n,d,r):s.transform&&(s.transform="none")),c){const{originX:f="50%",originY:u="50%",originZ:h=0}=a;s.transformOrigin=`${f} ${u} ${h}`}}const gc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function k0(e,t,n){for(const r in t)!Ge(t[r])&&!v0(r,n)&&(e[r]=t[r])}function B2({transformTemplate:e},t,n){return k.useMemo(()=>{const r=gc();return mc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function U2(e,t,n){const r=e.style||{},s={};return k0(s,r,e),Object.assign(s,B2(e,t,n)),e.transformValues?e.transformValues(s):s}function W2(e,t,n){const r={},s=U2(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,r}const H2=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 yo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||H2.has(e)}let C0=e=>!yo(e);function q2(e){e&&(C0=t=>t.startsWith("on")?!yo(t):e(t))}try{q2(require("@emotion/is-prop-valid").default)}catch{}function G2(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(C0(s)||n===!0&&yo(s)||!t&&!yo(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function sf(e,t,n){return typeof e=="string"?e:B.transform(t+n*e)}function Y2(e,t,n){const r=sf(t,e.x,e.width),s=sf(n,e.y,e.height);return`${r} ${s}`}const K2={offset:"stroke-dashoffset",array:"stroke-dasharray"},X2={offset:"strokeDashoffset",array:"strokeDasharray"};function Q2(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?K2:X2;e[i.offset]=B.transform(-r);const o=B.transform(t),a=B.transform(n);e[i.array]=`${o} ${a}`}function yc(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,f,u){if(mc(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:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=Y2(g,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&Q2(h,o,a,l,!1)}const P0=()=>({...gc(),attrs:{}}),vc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Z2(e,t,n,r){const s=k.useMemo(()=>{const i=P0();return yc(i,t,{enableHardwareAcceleration:!1},vc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};k0(i,e.style,e),s.style={...i,...s.style}}return s}function J2(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(pc(n)?Z2:W2)(r,i,o,n),d={...G2(r,typeof n=="string",e),...l,ref:s},{children:f}=r,u=k.useMemo(()=>Ge(f)?f.get():f,[f]);return k.createElement(n,{...d,children:u})}}function j0(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const E0=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 T0(e,t,n,r){j0(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(E0.has(s)?s:dc(s),t.attrs[s])}function xc(e,t){const{style:n}=e,r={};for(const s in n)(Ge(n[s])||t.style&&Ge(t.style[s])||v0(s,e))&&(r[s]=n[s]);return r}function N0(e,t){const n=xc(e,t);for(const r in e)if(Ge(e[r])||Ge(t[r])){const s=Js.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[s]=e[r]}return n}function wc(e,t,n,r={},s={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,s)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,s)),t}function ew(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const vo=e=>Array.isArray(e),tw=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),nw=e=>vo(e)?e[e.length-1]||0:e;function $i(e){const t=Ge(e)?e.get():e;return tw(t)?t.toValue():t}function rw({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,s,i){const o={latestValues:sw(r,s,i,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const M0=e=>(t,n)=>{const r=k.useContext(Go),s=k.useContext(cc),i=()=>rw(e,t,r,s);return n?i():ew(i)};function sw(e,t,n,r){const s={},i=r(e,{});for(const u in i)s[u]=$i(i[u]);let{initial:o,animate:a}=e;const l=Xo(e),c=m0(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"&&!Ko(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=wc(e,h);if(!p)return;const{transitionEnd:g,transition:x,...v}=p;for(const y in v){let w=v[y];if(Array.isArray(w)){const b=d?w.length-1:0;w=w[b]}w!==null&&(s[y]=w)}for(const y in g)s[y]=g[y]}),s}const ye=e=>e;class of{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 iw(e){let t=new of,n=new of,r=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,d=!1)=>{const f=d&&s,u=f?t:n;return c&&o.add(l),u.add(l)&&f&&s&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let c=0;c<r;c++){const d=t.order[c];d(l),o.has(d)&&(a.schedule(d),e())}s=!1,i&&(i=!1,a.process(l))}};return a}const ki=["prepare","read","update","preRender","render","postRender"],ow=40;function aw(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=ki.reduce((f,u)=>(f[u]=iw(()=>n=!0),f),{}),o=f=>i[f].process(s),a=()=>{const f=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(f-s.timestamp,ow),1),s.timestamp=f,s.isProcessing=!0,ki.forEach(o),s.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,s.isProcessing||e(a)};return{schedule:ki.reduce((f,u)=>{const h=i[u];return f[u]=(p,g=!1,x=!1)=>(n||l(),h.schedule(p,g,x)),f},{}),cancel:f=>ki.forEach(u=>i[u].cancel(f)),state:s,steps:i}}const{schedule:oe,cancel:Ht,state:De,steps:Ma}=aw(typeof requestAnimationFrame<"u"?requestAnimationFrame:ye,!0),lw={useVisualState:M0({scrapeMotionValuesFromProps:N0,createRenderState:P0,onMount:(e,t,{renderState:n,latestValues:r})=>{oe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),oe.render(()=>{yc(n,r,{enableHardwareAcceleration:!1},vc(t.tagName),e.transformTemplate),T0(t,n)})}})},uw={useVisualState:M0({scrapeMotionValuesFromProps:xc,createRenderState:gc})};function cw(e,{forwardMotionProps:t=!1},n,r){return{...pc(e)?lw:uw,preloadedFeatures:n,useRender:J2(t),createVisualElement:r,Component:e}}function Vt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Zo(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const dw=e=>t=>_0(t)&&e(t,Zo(t));function It(e,t,n,r){return Vt(e,t,dw(n),r)}const fw=(e,t)=>n=>t(e(n)),yn=(...e)=>e.reduce(fw);function A0(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const af=A0("dragHorizontal"),lf=A0("dragVertical");function L0(e){let t=!1;if(e==="y")t=lf();else if(e==="x")t=af();else{const n=af(),r=lf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function D0(){const e=L0(!0);return e?(e(),!1):!0}class Nn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function uf(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),s=(i,o)=>{if(i.pointerType==="touch"||D0())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&oe.update(()=>a[r](i,o))};return It(e.current,n,s,{passive:!e.getProps()[r]})}class hw extends Nn{mount(){this.unmount=yn(uf(this.node,!0),uf(this.node,!1))}unmount(){}}class pw extends Nn{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=yn(Vt(this.node.current,"focus",()=>this.onFocus()),Vt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const R0=(e,t)=>t?e===t?!0:R0(e,t.parentElement):!1;function _a(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Zo(n))}class mw extends Nn{constructor(){super(...arguments),this.removeStartListeners=ye,this.removeEndListeners=ye,this.removeAccessibleListeners=ye,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=It(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:d,globalTapTarget:f}=this.node.getProps();oe.update(()=>{!f&&!R0(this.node.current,a.target)?d&&d(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=It(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=yn(i,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||_a("up",(l,c)=>{const{onTap:d}=this.node.getProps();d&&oe.update(()=>d(l,c))})};this.removeEndListeners(),this.removeEndListeners=Vt(this.node.current,"keyup",o),_a("down",(a,l)=>{this.startPress(a,l)})},n=Vt(this.node.current,"keydown",t),r=()=>{this.isPressing&&_a("cancel",(i,o)=>this.cancelPress(i,o))},s=Vt(this.node.current,"blur",r);this.removeAccessibleListeners=yn(n,s)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&oe.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!D0()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&oe.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=It(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Vt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=yn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Kl=new WeakMap,Aa=new WeakMap,gw=e=>{const t=Kl.get(e.target);t&&t(e)},yw=e=>{e.forEach(gw)};function vw({root:e,...t}){const n=e||document;Aa.has(n)||Aa.set(n,{});const r=Aa.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(yw,{root:e,...t})),r[s]}function xw(e,t,n){const r=vw(t);return Kl.set(e,n),r.observe(e),()=>{Kl.delete(e),r.unobserve(e)}}const ww={some:0,all:1};class bw extends Nn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:ww[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!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 xw(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(Sw(t,n))&&this.startObserver()}unmount(){}}function Sw({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kw={inView:{Feature:bw},tap:{Feature:mw},focus:{Feature:pw},hover:{Feature:hw}};function V0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Cw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Pw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Jo(e,t,n){const r=e.getProps();return wc(r,t,n!==void 0?n:r.custom,Cw(e),Pw(e))}let bc=ye;const Bn=e=>e*1e3,zt=e=>e/1e3,jw={current:!1},F0=e=>Array.isArray(e)&&typeof e[0]=="number";function I0(e){return!!(!e||typeof e=="string"&&z0[e]||F0(e)||Array.isArray(e)&&e.every(I0))}const as=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,z0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:as([0,.65,.55,1]),circOut:as([.55,0,1,.45]),backIn:as([.31,.01,.66,-.59]),backOut:as([.33,1.53,.69,.99])};function O0(e){if(e)return F0(e)?as(e):Array.isArray(e)?e.map(O0):z0[e]}function Ew(e,t,n,{delay:r=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=O0(a);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function Tw(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const $0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nw=1e-7,Mw=12;function _w(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=$0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Nw&&++a<Mw);return o}function ni(e,t,n,r){if(e===t&&n===r)return ye;const s=i=>_w(i,0,1,e,n);return i=>i===0||i===1?i:$0(s(i),t,r)}const Aw=ni(.42,0,1,1),Lw=ni(0,0,.58,1),B0=ni(.42,0,.58,1),Dw=e=>Array.isArray(e)&&typeof e[0]!="number",U0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,W0=e=>t=>1-e(1-t),Sc=e=>1-Math.sin(Math.acos(e)),H0=W0(Sc),Rw=U0(Sc),q0=ni(.33,1.53,.69,.99),kc=W0(q0),Vw=U0(kc),Fw=e=>(e*=2)<1?.5*kc(e):.5*(2-Math.pow(2,-10*(e-1))),Iw={linear:ye,easeIn:Aw,easeInOut:B0,easeOut:Lw,circIn:Sc,circInOut:Rw,circOut:H0,backIn:kc,backInOut:Vw,backOut:q0,anticipate:Fw},cf=e=>{if(Array.isArray(e)){bc(e.length===4);const[t,n,r,s]=e;return ni(t,n,r,s)}else if(typeof e=="string")return Iw[e];return e},Cc=(e,t)=>n=>!!(ei(n)&&z2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),G0=(e,t,n)=>r=>{if(!ei(r))return r;const[s,i,o,a]=r.match(Qo);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zw=e=>wn(0,255,e),La={...Zn,transform:e=>Math.round(zw(e))},zn={test:Cc("rgb","red"),parse:G0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+La.transform(e)+", "+La.transform(t)+", "+La.transform(n)+", "+vs(ys.transform(r))+")"};function Ow(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Xl={test:Cc("#"),parse:Ow,transform:zn.transform},mr={test:Cc("hsl","hue"),parse:G0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Tt.transform(vs(t))+", "+Tt.transform(vs(n))+", "+vs(ys.transform(r))+")"},Fe={test:e=>zn.test(e)||Xl.test(e)||mr.test(e),parse:e=>zn.test(e)?zn.parse(e):mr.test(e)?mr.parse(e):Xl.parse(e),transform:e=>ei(e)?e:e.hasOwnProperty("red")?zn.transform(e):mr.transform(e)},ce=(e,t,n)=>-n*e+n*t+e;function Da(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 $w({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Da(l,a,e+1/3),i=Da(l,a,e),o=Da(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}const Ra=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Bw=[Xl,zn,mr],Uw=e=>Bw.find(t=>t.test(e));function df(e){const t=Uw(e);let n=t.parse(e);return t===mr&&(n=$w(n)),n}const Y0=(e,t)=>{const n=df(e),r=df(t),s={...n};return i=>(s.red=Ra(n.red,r.red,i),s.green=Ra(n.green,r.green,i),s.blue=Ra(n.blue,r.blue,i),s.alpha=ce(n.alpha,r.alpha,i),zn.transform(s))};function Ww(e){var t,n;return isNaN(e)&&ei(e)&&(((t=e.match(Qo))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(b0))===null||n===void 0?void 0:n.length)||0)>0}const K0={regex:F2,countKey:"Vars",token:"${v}",parse:ye},X0={regex:b0,countKey:"Colors",token:"${c}",parse:Fe.parse},Q0={regex:Qo,countKey:"Numbers",token:"${n}",parse:Zn.parse};function Va(e,{regex:t,countKey:n,token:r,parse:s}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(s)))}function xo(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Va(n,K0),Va(n,X0),Va(n,Q0),n}function Z0(e){return xo(e).values}function J0(e){const{values:t,numColors:n,numVars:r,tokenised:s}=xo(e),i=t.length;return o=>{let a=s;for(let l=0;l<i;l++)l<r?a=a.replace(K0.token,o[l]):l<r+n?a=a.replace(X0.token,Fe.transform(o[l])):a=a.replace(Q0.token,vs(o[l]));return a}}const Hw=e=>typeof e=="number"?0:e;function qw(e){const t=Z0(e);return J0(e)(t.map(Hw))}const bn={test:Ww,parse:Z0,createTransformer:J0,getAnimatableNone:qw},eg=(e,t)=>n=>`${n>0?t:e}`;function tg(e,t){return typeof e=="number"?n=>ce(e,t,n):Fe.test(e)?Y0(e,t):e.startsWith("var(")?eg(e,t):rg(e,t)}const ng=(e,t)=>{const n=[...e],r=n.length,s=e.map((i,o)=>tg(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}},Gw=(e,t)=>{const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=tg(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}},rg=(e,t)=>{const n=bn.createTransformer(t),r=xo(e),s=xo(t);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?yn(ng(r.values,s.values),n):eg(e,t)},Ws=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ff=(e,t)=>n=>ce(e,t,n);function Yw(e){return typeof e=="number"?ff:typeof e=="string"?Fe.test(e)?Y0:rg:Array.isArray(e)?ng:typeof e=="object"?Gw:ff}function Kw(e,t,n){const r=[],s=n||Yw(e[0]),i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||ye:t;a=yn(l,a)}r.push(a)}return r}function sg(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(bc(i===t.length),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Kw(t,r,s),a=o.length,l=c=>{let d=0;if(a>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=Ws(e[d],e[d+1],c);return o[d](f)};return n?c=>l(wn(e[0],e[i-1],c)):l}function Xw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Ws(0,t,r);e.push(ce(n,1,s))}}function Qw(e){const t=[0];return Xw(t,e.length-1),t}function Zw(e,t){return e.map(n=>n*t)}function Jw(e,t){return e.map(()=>t||B0).splice(0,e.length-1)}function wo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Dw(r)?r.map(cf):cf(r),i={done:!1,value:t[0]},o=Zw(n&&n.length===t.length?n:Qw(t),e),a=sg(o,t,{ease:Array.isArray(s)?s:Jw(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function ig(e,t){return t?e*(1e3/t):0}const e5=5;function og(e,t,n){const r=Math.max(t-e5,0);return ig(n-e(r),t-r)}const Fa=.001,t5=.01,n5=10,r5=.05,s5=1;function i5({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let s,i,o=1-t;o=wn(r5,s5,o),e=wn(t5,n5,zt(e)),o<1?(s=c=>{const d=c*o,f=d*e,u=d-n,h=Ql(c,o),p=Math.exp(-f);return Fa-u/h*p},i=c=>{const f=c*o*e,u=f*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,p=Math.exp(-f),g=Ql(Math.pow(c,2),o);return(-s(c)+Fa>0?-1:1)*((u-h)*p)/g}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-Fa+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=a5(s,i,a);if(e=Bn(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 o5=12;function a5(e,t,n){let r=n;for(let s=1;s<o5;s++)r=r-e(r)/t(r);return r}function Ql(e,t){return e*Math.sqrt(1-t*t)}const l5=["duration","bounce"],u5=["stiffness","damping","mass"];function hf(e,t){return t.some(n=>e[n]!==void 0)}function c5(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hf(e,u5)&&hf(e,l5)){const n=i5(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function ag({keyframes:e,restDelta:t,restSpeed:n,...r}){const s=e[0],i=e[e.length-1],o={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:d,velocity:f,isResolvedFromDuration:u}=c5({...r,velocity:-zt(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),g=i-s,x=zt(Math.sqrt(a/c)),v=Math.abs(g)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let y;if(p<1){const w=Ql(x,p);y=b=>{const S=Math.exp(-p*x*b);return i-S*((h+p*x*g)/w*Math.sin(w*b)+g*Math.cos(w*b))}}else if(p===1)y=w=>i-Math.exp(-x*w)*(g+(h+x*g)*w);else{const w=x*Math.sqrt(p*p-1);y=b=>{const S=Math.exp(-p*x*b),C=Math.min(w*b,300);return i-S*((h+p*x*g)*Math.sinh(C)+w*g*Math.cosh(C))/w}}return{calculatedDuration:u&&d||null,next:w=>{const b=y(w);if(u)o.done=w>=d;else{let S=h;w!==0&&(p<1?S=og(y,w,b):S=0);const C=Math.abs(S)<=n,P=Math.abs(i-b)<=t;o.done=C&&P}return o.value=o.done?i:b,o}}}function pf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],u={done:!1,value:f},h=j=>a!==void 0&&j<a||l!==void 0&&j>l,p=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let g=n*t;const x=f+g,v=o===void 0?x:o(x);v!==x&&(g=v-f);const y=j=>-g*Math.exp(-j/r),w=j=>v+y(j),b=j=>{const D=y(j),T=w(j);u.done=Math.abs(D)<=c,u.value=u.done?v:T};let S,C;const P=j=>{h(u.value)&&(S=j,C=ag({keyframes:[u.value,p(u.value)],velocity:og(w,j,u.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return P(0),{calculatedDuration:null,next:j=>{let D=!1;return!C&&S===void 0&&(D=!0,b(j),P(j)),S!==void 0&&j>S?C.next(j-S):(!D&&b(j),u)}}}const d5=e=>{const t=({timestamp:n})=>e(n);return{start:()=>oe.update(t,!0),stop:()=>Ht(t),now:()=>De.isProcessing?De.timestamp:performance.now()}},mf=2e4;function gf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mf;)t+=n,r=e.next(t);return t>=mf?1/0:t}const f5={decay:pf,inertia:pf,tween:wo,keyframes:wo,spring:ag};function bo({autoplay:e=!0,delay:t=0,driver:n=d5,keyframes:r,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:d,onUpdate:f,...u}){let h=1,p=!1,g,x;const v=()=>{x=new Promise(L=>{g=L})};v();let y;const w=f5[s]||wo;let b;w!==wo&&typeof r[0]!="number"&&(b=sg([0,100],r,{clamp:!1}),r=[0,100]);const S=w({...u,keyframes:r});let C;a==="mirror"&&(C=w({...u,keyframes:[...r].reverse(),velocity:-(u.velocity||0)}));let P="idle",j=null,D=null,T=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=gf(S));const{calculatedDuration:z}=S;let V=1/0,U=1/0;z!==null&&(V=z+o,U=V*(i+1)-o);let R=0;const Q=L=>{if(D===null)return;h>0&&(D=Math.min(D,L)),h<0&&(D=Math.min(L-U/h,D)),j!==null?R=j:R=Math.round(L-D)*h;const E=R-t*(h>=0?1:-1),W=h>=0?E<0:E>U;R=Math.max(E,0),P==="finished"&&j===null&&(R=U);let X=R,te=S;if(i){const Jn=Math.min(R,U)/V;let Mn=Math.floor(Jn),wt=Jn%1;!wt&&Jn>=1&&(wt=1),wt===1&&Mn--,Mn=Math.min(Mn,i+1),!!(Mn%2)&&(a==="reverse"?(wt=1-wt,o&&(wt-=o/V)):a==="mirror"&&(te=C)),X=wn(0,1,wt)*V}const G=W?{done:!1,value:r[0]}:te.next(X);b&&(G.value=b(G.value));let{done:be}=G;!W&&z!==null&&(be=h>=0?R>=U:R<=0);const ri=j===null&&(P==="finished"||P==="running"&&be);return f&&f(G.value),ri&&_(),G},A=()=>{y&&y.stop(),y=void 0},q=()=>{P="idle",A(),g(),v(),D=T=null},_=()=>{P="finished",d&&d(),A(),g()},N=()=>{if(p)return;y||(y=n(Q));const L=y.now();l&&l(),j!==null?D=L-j:(!D||P==="finished")&&(D=L),P==="finished"&&v(),T=D,j=null,P="running",y.start()};e&&N();const F={then(L,E){return x.then(L,E)},get time(){return zt(R)},set time(L){L=Bn(L),R=L,j!==null||!y||h===0?j=L:D=y.now()-L/h},get duration(){const L=S.calculatedDuration===null?gf(S):S.calculatedDuration;return zt(L)},get speed(){return h},set speed(L){L===h||!y||(h=L,F.time=zt(R))},get state(){return P},play:N,pause:()=>{P="paused",j=R},stop:()=>{p=!0,P!=="idle"&&(P="idle",c&&c(),q())},cancel:()=>{T!==null&&Q(T),q()},complete:()=>{P="finished"},sample:L=>(D=0,Q(L))};return F}function h5(e){let t;return()=>(t===void 0&&(t=e()),t)}const p5=h5(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),m5=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Ci=10,g5=2e4,y5=(e,t)=>t.type==="spring"||e==="backgroundColor"||!I0(t.ease);function v5(e,t,{onUpdate:n,onComplete:r,...s}){if(!(p5()&&m5.has(t)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const d=()=>{l=new Promise(w=>{a=w})};d();let{keyframes:f,duration:u=300,ease:h,times:p}=s;if(y5(t,s)){const w=bo({...s,repeat:0,delay:0});let b={done:!1,value:f[0]};const S=[];let C=0;for(;!b.done&&C<g5;)b=w.sample(C),S.push(b.value),C+=Ci;p=void 0,f=S,u=C-Ci,h="linear"}const g=Ew(e.owner.current,t,f,{...s,duration:u,ease:h,times:p}),x=()=>{c=!1,g.cancel()},v=()=>{c=!0,oe.update(x),a(),d()};return g.onfinish=()=>{c||(e.set(Tw(f,s)),r&&r(),v())},{then(w,b){return l.then(w,b)},attachTimeline(w){return g.timeline=w,g.onfinish=null,ye},get time(){return zt(g.currentTime||0)},set time(w){g.currentTime=Bn(w)},get speed(){return g.playbackRate},set speed(w){g.playbackRate=w},get duration(){return zt(u)},play:()=>{o||(g.play(),Ht(x))},pause:()=>g.pause(),stop:()=>{if(o=!0,g.playState==="idle")return;const{currentTime:w}=g;if(w){const b=bo({...s,autoplay:!1});e.setWithVelocity(b.sample(w-Ci).value,b.sample(w).value,Ci)}v()},complete:()=>{c||g.finish()},cancel:v}}function x5({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const s=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:ye,pause:ye,stop:ye,then:i=>(i(),Promise.resolve()),cancel:ye,complete:ye});return t?bo({keyframes:[0,1],duration:0,delay:t,onComplete:s}):s()}const w5={type:"spring",stiffness:500,damping:25,restSpeed:10},b5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),S5={type:"keyframes",duration:.8},k5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},C5=(e,{keyframes:t})=>t.length>2?S5:Qn.has(e)?e.startsWith("scale")?b5(t[1]):w5:k5,Zl=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(bn.test(t)||t==="0")&&!t.startsWith("url(")),P5=new Set(["brightness","contrast","saturate","opacity"]);function j5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qo)||[];if(!r)return e;const s=n.replace(r,"");let i=P5.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const E5=/([a-z-]*)\(.*?\)/g,Jl={...bn,getAnimatableNone:e=>{const t=e.match(E5);return t?t.map(j5).join(" "):e}},T5={...S0,color:Fe,backgroundColor:Fe,outlineColor:Fe,fill:Fe,stroke:Fe,borderColor:Fe,borderTopColor:Fe,borderRightColor:Fe,borderBottomColor:Fe,borderLeftColor:Fe,filter:Jl,WebkitFilter:Jl},Pc=e=>T5[e];function lg(e,t){let n=Pc(e);return n!==Jl&&(n=bn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ug=e=>/^0[^.\s]+$/.test(e);function N5(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||ug(e)}function M5(e,t,n,r){const s=Zl(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const o=r.from!==void 0?r.from:e.get();let a;const l=[];for(let c=0;c<i.length;c++)i[c]===null&&(i[c]=c===0?o:i[c-1]),N5(i[c])&&l.push(c),typeof i[c]=="string"&&i[c]!=="none"&&i[c]!=="0"&&(a=i[c]);if(s&&l.length&&a)for(let c=0;c<l.length;c++){const d=l[c];i[d]=lg(t,a)}return i}function _5({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}function jc(e,t){return e[t]||e.default||e}const A5={skipAnimations:!1},Ec=(e,t,n,r={})=>s=>{const i=jc(r,e)||{},o=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Bn(o);const l=M5(t,e,n,i),c=l[0],d=l[l.length-1],f=Zl(e,c),u=Zl(e,d);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(_5(i)||(h={...h,...C5(e,h)}),h.duration&&(h.duration=Bn(h.duration)),h.repeatDelay&&(h.repeatDelay=Bn(h.repeatDelay)),!f||!u||jw.current||i.type===!1||A5.skipAnimations)return x5(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=v5(t,e,h);if(p)return p}return bo(h)};function So(e){return!!(Ge(e)&&e.add)}const cg=e=>/^\-?\d*\.?\d+$/.test(e);function Tc(e,t){e.indexOf(t)===-1&&e.push(t)}function Nc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Mc{constructor(){this.subscriptions=[]}add(t){return Tc(this.subscriptions,t),()=>Nc(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L5=e=>!isNaN(parseFloat(e));class D5{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,s=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:o}=De;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,oe.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>oe.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=L5(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Mc);const r=this.events[t].add(n);return t==="change"?()=>{r(),oe.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?ig(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 Lr(e,t){return new D5(e,t)}const dg=e=>t=>t.test(e),R5={test:e=>e==="auto",parse:e=>e},fg=[Zn,B,Tt,Qt,$2,O2,R5],Jr=e=>fg.find(dg(e)),V5=[...fg,Fe,bn],F5=e=>V5.find(dg(e));function I5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lr(n))}function z5(e,t){const n=Jo(e,t);let{transitionEnd:r={},transition:s={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const o in i){const a=nw(i[o]);I5(e,o,a)}}function O5(e,t,n){var r,s;const i=Object.keys(t).filter(a=>!e.hasValue(a)),o=i.length;if(o)for(let a=0;a<o;a++){const l=i[a],c=t[l];let d=null;Array.isArray(c)&&(d=c[0]),d===null&&(d=(s=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&s!==void 0?s:t[l]),d!=null&&(typeof d=="string"&&(cg(d)||ug(d))?d=parseFloat(d):!F5(d)&&bn.test(c)&&(d=lg(l,c)),e.addValue(l,Lr(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function $5(e,t){return t?(t[e]||t.default||t).from:void 0}function B5(e,t,n){const r={};for(const s in e){const i=$5(s,t);if(i!==void 0)r[s]=i;else{const o=n.getValue(s);o&&(r[s]=o.get())}}return r}function U5({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function W5(e,t){const n=e.get();if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r]!==n)return!0}else return n!==t}function hg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const u=e.getValue(f),h=a[f];if(!u||h===void 0||d&&U5(d,f))continue;const p={delay:n,elapsed:0,...jc(i||{},f)};if(window.HandoffAppearAnimations){const v=e.getProps()[p0];if(v){const y=window.HandoffAppearAnimations(v,f,u,oe);y!==null&&(p.elapsed=y,p.isHandoff=!0)}}let g=!p.isHandoff&&!W5(u,h);if(p.type==="spring"&&(u.getVelocity()||p.velocity)&&(g=!1),u.animation&&(g=!1),g)continue;u.start(Ec(f,u,h,e.shouldReduceMotion&&Qn.has(f)?{type:!1}:p));const x=u.animation;So(l)&&(l.add(f),x.then(()=>l.remove(f))),c.push(x)}return o&&Promise.all(c).then(()=>{o&&z5(e,o)}),c}function eu(e,t,n={}){const r=Jo(e,t,n.custom);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(hg(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return H5(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,o]:[o,i];return l().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function H5(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(q5).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(eu(c,t,{...i,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function q5(e,t){return e.sortNodePosition(t)}function G5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>eu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=eu(e,t,n);else{const s=typeof t=="function"?Jo(e,t,n.custom):t;r=Promise.all(hg(e,s,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Y5=[...fc].reverse(),K5=fc.length;function X5(e){return t=>Promise.all(t.map(({animation:n,options:r})=>G5(e,n,r)))}function Q5(e){let t=X5(e);const n=J5();let r=!0;const s=(l,c)=>{const d=Jo(e,c);if(d){const{transition:f,transitionEnd:u,...h}=d;l={...l,...h,...u}}return l};function i(l){t=l(e)}function o(l,c){const d=e.getProps(),f=e.getVariantContext(!0)||{},u=[],h=new Set;let p={},g=1/0;for(let v=0;v<K5;v++){const y=Y5[v],w=n[y],b=d[y]!==void 0?d[y]:f[y],S=Bs(b),C=y===c?w.isActive:null;C===!1&&(g=v);let P=b===f[y]&&b!==d[y]&&S;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),w.protectedKeys={...p},!w.isActive&&C===null||!b&&!w.prevProp||Ko(b)||typeof b=="boolean")continue;let D=Z5(w.prevProp,b)||y===c&&w.isActive&&!P&&S||v>g&&S,T=!1;const z=Array.isArray(b)?b:[b];let V=z.reduce(s,{});C===!1&&(V={});const{prevResolvedValues:U={}}=w,R={...U,...V},Q=A=>{D=!0,h.has(A)&&(T=!0,h.delete(A)),w.needsAnimating[A]=!0};for(const A in R){const q=V[A],_=U[A];if(p.hasOwnProperty(A))continue;let N=!1;vo(q)&&vo(_)?N=!V0(q,_):N=q!==_,N?q!==void 0?Q(A):h.add(A):q!==void 0&&h.has(A)?Q(A):w.protectedKeys[A]=!0}w.prevProp=b,w.prevResolvedValues=V,w.isActive&&(p={...p,...V}),r&&e.blockInitialAnimation&&(D=!1),D&&(!P||T)&&u.push(...z.map(A=>({animation:A,options:{type:y,...l}})))}if(h.size){const v={};h.forEach(y=>{const w=e.getBaseTarget(y);w!==void 0&&(v[y]=w)}),u.push({animation:v})}let x=!!u.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?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:i,getState:()=>n}}function Z5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!V0(t,e):!1}function _n(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function J5(){return{animate:_n(!0),whileInView:_n(),whileHover:_n(),whileTap:_n(),whileDrag:_n(),whileFocus:_n(),exit:_n()}}class e3 extends Nn{constructor(t){super(t),t.animationState||(t.animationState=Q5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ko(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 t3=0;class n3 extends Nn{constructor(){super(...arguments),this.id=t3++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const r3={animation:{Feature:e3},exit:{Feature:n3}},yf=(e,t)=>Math.abs(e-t);function s3(e,t){const n=yf(e.x,t.x),r=yf(e.y,t.y);return Math.sqrt(n**2+r**2)}class pg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!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=za(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,h=s3(f.offset,{x:0,y:0})>=3;if(!u&&!h)return;const{point:p}=f,{timestamp:g}=De;this.history.push({...p,timestamp:g});const{onStart:x,onMove:v}=this.handlers;u||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,u)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ia(u,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(f,u)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=za(f.type==="pointercancel"?this.lastMoveEventInfo:Ia(u,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,x),p&&p(f,x)},!_0(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Zo(t),a=Ia(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=De;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,za(a,this.history)),this.removeListeners=yn(It(this.contextWindow,"pointermove",this.handlePointerMove),It(this.contextWindow,"pointerup",this.handlePointerUp),It(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ht(this.updatePoint)}}function Ia(e,t){return t?{point:t(e.point)}:e}function vf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function za({point:e},t){return{point:e,delta:vf(e,mg(t)),offset:vf(e,i3(t)),velocity:o3(t,.1)}}function i3(e){return e[0]}function mg(e){return e[e.length-1]}function o3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=mg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Bn(t)));)n--;if(!r)return{x:0,y:0};const i=zt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Je(e){return e.max-e.min}function tu(e,t=0,n=.01){return Math.abs(e-t)<=n}function xf(e,t,n,r=.5){e.origin=r,e.originPoint=ce(t.min,t.max,e.origin),e.scale=Je(n)/Je(t),(tu(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ce(n.min,n.max,e.origin)-e.originPoint,(tu(e.translate)||isNaN(e.translate))&&(e.translate=0)}function xs(e,t,n,r){xf(e.x,t.x,n.x,r?r.originX:void 0),xf(e.y,t.y,n.y,r?r.originY:void 0)}function wf(e,t,n){e.min=n.min+t.min,e.max=e.min+Je(t)}function a3(e,t,n){wf(e.x,t.x,n.x),wf(e.y,t.y,n.y)}function bf(e,t,n){e.min=t.min-n.min,e.max=e.min+Je(t)}function ws(e,t,n){bf(e.x,t.x,n.x),bf(e.y,t.y,n.y)}function l3(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ce(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ce(n,e,r.max):Math.min(e,n)),e}function Sf(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 u3(e,{top:t,left:n,bottom:r,right:s}){return{x:Sf(e.x,n,s),y:Sf(e.y,t,r)}}function kf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function c3(e,t){return{x:kf(e.x,t.x),y:kf(e.y,t.y)}}function d3(e,t){let n=.5;const r=Je(e),s=Je(t);return s>r?n=Ws(t.min,t.max-r,e.min):r>s&&(n=Ws(e.min,e.max-s,t.min)),wn(0,1,n)}function f3(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 nu=.35;function h3(e=nu){return e===!1?e=0:e===!0&&(e=nu),{x:Cf(e,"left","right"),y:Cf(e,"top","bottom")}}function Cf(e,t,n){return{min:Pf(e,t),max:Pf(e,n)}}function Pf(e,t){return typeof e=="number"?e:e[t]||0}const jf=()=>({translate:0,scale:1,origin:0,originPoint:0}),gr=()=>({x:jf(),y:jf()}),Ef=()=>({min:0,max:0}),xe=()=>({x:Ef(),y:Ef()});function st(e){return[e("x"),e("y")]}function gg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function p3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function m3(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 Oa(e){return e===void 0||e===1}function ru({scale:e,scaleX:t,scaleY:n}){return!Oa(e)||!Oa(t)||!Oa(n)}function Dn(e){return ru(e)||yg(e)||e.z||e.rotate||e.rotateX||e.rotateY}function yg(e){return Tf(e.x)||Tf(e.y)}function Tf(e){return e&&e!=="0%"}function ko(e,t,n){const r=e-n,s=t*r;return n+s}function Nf(e,t,n,r,s){return s!==void 0&&(e=ko(e,s,r)),ko(e,n,r)+t}function su(e,t=0,n=1,r,s){e.min=Nf(e.min,t,n,r,s),e.max=Nf(e.max,t,n,r,s)}function vg(e,{x:t,y:n}){su(e.x,t.translate,t.scale,t.originPoint),su(e.y,n.translate,n.scale,n.originPoint)}function g3(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&yr(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,vg(e,o)),r&&Dn(i.latestValues)&&yr(e,i.latestValues))}t.x=Mf(t.x),t.y=Mf(t.y)}function Mf(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function en(e,t){e.min=e.min+t,e.max=e.max+t}function _f(e,t,[n,r,s]){const i=t[s]!==void 0?t[s]:.5,o=ce(e.min,e.max,i);su(e,t[n],t[r],o,t.scale)}const y3=["x","scaleX","originX"],v3=["y","scaleY","originY"];function yr(e,t){_f(e.x,t,y3),_f(e.y,t,v3)}function xg(e,t){return gg(m3(e.getBoundingClientRect(),t))}function x3(e,t,n){const r=xg(e,n),{scroll:s}=t;return s&&(en(r.x,s.offset.x),en(r.y,s.offset.y)),r}const wg=({current:e})=>e?e.ownerDocument.defaultView:null,w3=new WeakMap;class b3{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=xe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Zo(d,"page").point)},i=(d,f)=>{const{drag:u,dragPropagation:h,onDragStart:p}=this.getProps();if(u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=L0(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),st(x=>{let v=this.getAxisMotionValue(x).get()||0;if(Tt.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const w=y.layout.layoutBox[x];w&&(v=Je(w)*(parseFloat(v)/100))}}this.originPoint[x]=v}),p&&oe.update(()=>p(d,f),!1,!0);const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:g}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:x}=f;if(h&&this.currentDirection===null){this.currentDirection=S3(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),g&&g(d,f)},a=(d,f)=>this.stop(d,f),l=()=>st(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 pg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:wg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&oe.update(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Pi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=l3(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&pr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=u3(s.layoutBox,n):this.constraints=!1,this.elastic=h3(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&st(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=f3(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=x3(r,s.root,this.visualElement.getTransformPagePoint());let o=c3(s.layout.layoutBox,i);if(n){const a=n(p3(o));this.hasMutatedConstraints=!!a,a&&(o=gg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=st(d=>{if(!Pi(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const u=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:r?t[d]:0,bounceStiffness:u,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Ec(t,r,0,n))}stopAnimation(){st(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){st(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(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){st(n=>{const{drag:r}=this.getProps();if(!Pi(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-ce(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};st(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();s[o]=d3({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),st(o=>{if(!Pi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ce(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;w3.set(this.visualElement,this);const t=this.visualElement.current,n=It(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();pr(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),r();const o=Vt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(st(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(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=nu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Pi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class k3 extends Nn{constructor(t){super(t),this.removeGroupControls=ye,this.removeListeners=ye,this.controls=new b3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ye}unmount(){this.removeGroupControls(),this.removeListeners()}}const Af=e=>(t,n)=>{e&&oe.update(()=>e(t,n))};class C3 extends Nn{constructor(){super(...arguments),this.removePointerDownListener=ye}onPointerDown(t){this.session=new pg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Af(t),onStart:Af(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&oe.update(()=>s(i,o))}}}mount(){this.removePointerDownListener=It(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 P3(){const e=k.useContext(cc);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,s=k.useId();return k.useEffect(()=>r(s),[]),!t&&n?[!1,()=>n&&n(s)]:[!0]}const Bi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Lf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const es={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=Lf(e,t.target.x),r=Lf(e,t.target.y);return`${n}% ${r}%`}},j3={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=bn.parse(e);if(s.length>5)return r;const i=bn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=ce(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}};class E3 extends Gs.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;L2(T3),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Bi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||oe.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:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bg(e){const[t,n]=P3(),r=k.useContext(g0);return Gs.createElement(E3,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(y0),isPresent:t,safeToRemove:n})}const T3={borderRadius:{...es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:es,borderTopRightRadius:es,borderBottomLeftRadius:es,borderBottomRightRadius:es,boxShadow:j3},Sg=["TopLeft","TopRight","BottomLeft","BottomRight"],N3=Sg.length,Df=e=>typeof e=="string"?parseFloat(e):e,Rf=e=>typeof e=="number"||B.test(e);function M3(e,t,n,r,s,i){s?(e.opacity=ce(0,n.opacity!==void 0?n.opacity:1,_3(r)),e.opacityExit=ce(t.opacity!==void 0?t.opacity:1,0,A3(r))):i&&(e.opacity=ce(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<N3;o++){const a=`border${Sg[o]}Radius`;let l=Vf(t,a),c=Vf(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Rf(l)===Rf(c)?(e[a]=Math.max(ce(Df(l),Df(c),r),0),(Tt.test(c)||Tt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ce(t.rotate||0,n.rotate||0,r))}function Vf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _3=kg(0,.5,H0),A3=kg(.5,.95,ye);function kg(e,t,n){return r=>r<e?0:r>t?1:n(Ws(e,t,r))}function Ff(e,t){e.min=t.min,e.max=t.max}function rt(e,t){Ff(e.x,t.x),Ff(e.y,t.y)}function If(e,t,n,r,s){return e-=t,e=ko(e,1/n,r),s!==void 0&&(e=ko(e,1/s,r)),e}function L3(e,t=0,n=1,r=.5,s,i=e,o=e){if(Tt.test(t)&&(t=parseFloat(t),t=ce(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ce(i.min,i.max,r);e===i&&(a-=t),e.min=If(e.min,t,n,a,s),e.max=If(e.max,t,n,a,s)}function zf(e,t,[n,r,s],i,o){L3(e,t[n],t[r],t[s],t.scale,i,o)}const D3=["x","scaleX","originX"],R3=["y","scaleY","originY"];function Of(e,t,n,r){zf(e.x,t,D3,n?n.x:void 0,r?r.x:void 0),zf(e.y,t,R3,n?n.y:void 0,r?r.y:void 0)}function $f(e){return e.translate===0&&e.scale===1}function Cg(e){return $f(e.x)&&$f(e.y)}function V3(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 Pg(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 Bf(e){return Je(e.x)/Je(e.y)}class F3{constructor(){this.members=[]}add(t){Tc(this.members,t),t.scheduleRender()}remove(t){if(Nc(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(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!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 Uf(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y;if((s||i)&&(r=`translate3d(${s}px, ${i}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 I3=(e,t)=>e.depth-t.depth;class z3{constructor(){this.children=[],this.isDirty=!1}add(t){Tc(this.children,t),this.isDirty=!0}remove(t){Nc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(I3),this.isDirty=!1,this.children.forEach(t)}}function O3(e,t){const n=performance.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ht(r),e(i-t))};return oe.read(r,!0),()=>Ht(r)}function $3(e){window.MotionDebug&&window.MotionDebug.record(e)}function B3(e){return e instanceof SVGElement&&e.tagName!=="svg"}function U3(e,t,n){const r=Ge(e)?e:Lr(e);return r.start(Ec("",r,t,n)),r.animation}const Wf=["","X","Y","Z"],W3={visibility:"hidden"},Hf=1e3;let H3=0;const Rn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function jg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=H3++,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,Rn.totalNodes=Rn.resolvedTargetDeltas=Rn.recalculatedProjection=0,this.nodes.forEach(Y3),this.nodes.forEach(J3),this.nodes.forEach(e4),this.nodes.forEach(K3),$3(Rn)},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;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new z3)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mc),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=B3(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const u=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=O3(u,250),Bi.hasAnimatedSinceResize&&(Bi.hasAnimatedSinceResize=!1,this.nodes.forEach(Gf))})}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 g=this.options.transition||d.getDefaultTransition()||i4,{onLayoutAnimationStart:x,onLayoutAnimationComplete:v}=d.getProps(),y=!this.targetLayout||!Pg(this.targetLayout,p)||h,w=!u&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||u&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const b={...jc(g,"layout"),onPlay:x,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else u||Gf(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,Ht(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(t4),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;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(qf);return}this.isUpdating||this.nodes.forEach(Q3),this.isUpdating=!1,this.nodes.forEach(Z3),this.nodes.forEach(q3),this.nodes.forEach(G3),this.clearAllSnapshots();const a=performance.now();De.delta=wn(0,1e3/60,a-De.timestamp),De.timestamp=a,De.isProcessing=!0,Ma.update.process(De),Ma.preRender.process(De),Ma.render.process(De),De.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(X3),this.sharedNodes.forEach(n4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.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<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Cg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Dn(this.latestValues)||d)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),o4(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return xe();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(en(a.x,l.offset.x),en(a.y,l.offset.y)),a}removeElementScroll(o){const a=xe();rt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;if(c!==this.root&&d&&f.layoutScroll){if(d.isRoot){rt(a,o);const{scroll:u}=this.root;u&&(en(a.x,-u.offset.x),en(a.y,-u.offset.y))}en(a.x,d.offset.x),en(a.y,d.offset.y)}}return a}applyTransform(o,a=!1){const l=xe();rt(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&yr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Dn(d.latestValues)&&yr(l,d.latestValues)}return Dn(this.latestValues)&&yr(l,this.latestValues),l}removeTransform(o){const a=xe();rt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Dn(c.latestValues))continue;ru(c.latestValues)&&c.updateSnapshot();const d=xe(),f=c.measurePageBox();rt(d,f),Of(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Dn(this.latestValues)&&Of(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==De.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=De.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xe(),this.relativeTargetOrigin=xe(),ws(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),rt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=xe(),this.targetWithTransforms=xe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rt(this.target,this.layout.layoutBox),vg(this.target,this.targetDelta)):rt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xe(),this.relativeTargetOrigin=xe(),ws(this.relativeTargetOrigin,this.target,h.target),rt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Rn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ru(this.parent.latestValues)||yg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===De.timestamp&&(c=!1),c)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;rt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,h=this.treeScale.y;g3(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=gr(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=gr(),this.projectionDeltaWithTransform=gr());const g=this.projectionTransform;xs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Uf(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==u||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Rn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},f=gr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const u=xe(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,x=this.getStack(),v=!x||x.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(s4));this.animationProgress=0;let w;this.mixTargetDelta=b=>{const S=b/1e3;Yf(f.x,o.x,S),Yf(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ws(u,this.layout.layoutBox,this.relativeParent.layout.layoutBox),r4(this.relativeTarget,this.relativeTargetOrigin,u,S),w&&V3(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=xe()),rt(w,this.relativeTarget)),g&&(this.animationValues=d,M3(d,c,this.latestValues,S,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},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&&(Ht(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{Bi.hasAnimatedSinceResize=!0,this.currentAnimation=U3(0,Hf,{...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(Hf),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&&Eg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||xe();const f=Je(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const u=Je(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+u}rt(a,l),yr(a,d),xs(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new F3),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<Wf.length;d++){const f="rotate"+Wf[d];l[f]&&(c[f]=l[f],o.setStaticValue(f,0))}o.render();for(const d in c)o.setStaticValue(d,c[d]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return W3;const c={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=$i(o==null?void 0:o.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=$i(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Dn(this.latestValues)&&(g.transform=d?d({},""):"none",this.hasProjected=!1),g}const u=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Uf(this.projectionDeltaWithTransform,this.treeScale,u),d&&(c.transform=d(u,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=u.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:c.opacity=f===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in go){if(u[g]===void 0)continue;const{correct:x,applyTo:v}=go[g],y=c.transform==="none"?u[g]:x(u[g],f);if(v){const w=v.length;for(let b=0;b<w;b++)c[v[b]]=y}else c[g]=y}return this.options.layoutId&&(c.pointerEvents=f===this?$i(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(qf),this.root.sharedNodes.clear()}}}function q3(e){e.updateLayout()}function G3(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:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?st(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Je(u);u.min=r[f].min,u.max=u.min+h}):Eg(i,n.layoutBox,r)&&st(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Je(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=gr();xs(a,r,n.layoutBox);const l=gr();o?xs(l,e.applyTransform(s,!0),n.measuredBox):xs(l,r,n.layoutBox);const c=!Cg(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=xe();ws(p,n.layoutBox,u.layoutBox);const g=xe();ws(g,r,h.layoutBox),Pg(p,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,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 Y3(e){Rn.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 K3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function X3(e){e.clearSnapshot()}function qf(e){e.clearMeasurements()}function Q3(e){e.isLayoutDirty=!1}function Z3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function J3(e){e.resolveTargetDelta()}function e4(e){e.calcProjection()}function t4(e){e.resetRotation()}function n4(e){e.removeLeadSnapshot()}function Yf(e,t,n){e.translate=ce(t.translate,0,n),e.scale=ce(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Kf(e,t,n,r){e.min=ce(t.min,n.min,r),e.max=ce(t.max,n.max,r)}function r4(e,t,n,r){Kf(e.x,t.x,n.x,r),Kf(e.y,t.y,n.y,r)}function s4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const i4={duration:.45,ease:[.4,0,.1,1]},Xf=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Qf=Xf("applewebkit/")&&!Xf("chrome/")?Math.round:ye;function Zf(e){e.min=Qf(e.min),e.max=Qf(e.max)}function o4(e){Zf(e.x),Zf(e.y)}function Eg(e,t,n){return e==="position"||e==="preserve-aspect"&&!tu(Bf(t),Bf(n),.2)}const a4=jg({attachResizeListener:(e,t)=>Vt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$a={current:void 0},Tg=jg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$a.current){const e=new a4({});e.mount(window),e.setOptions({layoutScroll:!0}),$a.current=e}return $a.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),l4={pan:{Feature:C3},drag:{Feature:k3,ProjectionNode:Tg,MeasureLayout:bg}},u4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function c4(e){const t=u4.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function iu(e,t,n=1){const[r,s]=c4(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return cg(o)?parseFloat(o):o}else return Yl(s)?iu(s,t,n+1):s}function d4(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(s=>{const i=s.get();if(!Yl(i))return;const o=iu(i,r);o&&s.set(o)});for(const s in t){const i=t[s];if(!Yl(i))continue;const o=iu(i,r);o&&(t[s]=o,n||(n={}),n[s]===void 0&&(n[s]=i))}return{target:t,transitionEnd:n}}const f4=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ng=e=>f4.has(e),h4=e=>Object.keys(e).some(Ng),Jf=e=>e===Zn||e===B,eh=(e,t)=>parseFloat(e.split(", ")[t]),th=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/);if(s)return eh(s[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?eh(i[1],e):0}},p4=new Set(["x","y","z"]),m4=Js.filter(e=>!p4.has(e));function g4(e){const t=[];return m4.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 Dr={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:th(4,13),y:th(5,14)};Dr.translateX=Dr.x;Dr.translateY=Dr.y;const y4=(e,t,n)=>{const r=t.measureViewportBox(),s=t.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{a[c]=Dr[c](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const d=t.getValue(c);d&&d.jump(a[c]),e[c]=Dr[c](l,i)}),e},v4=(e,t,n={},r={})=>{t={...t},r={...r};const s=Object.keys(t).filter(Ng);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],f=Jr(d);const u=t[l];let h;if(vo(u)){const p=u.length,g=u[0]===null?1:0;d=u[g],f=Jr(d);for(let x=g;x<p&&u[x]!==null;x++)h?bc(Jr(u[x])===h):h=Jr(u[x])}else h=Jr(u);if(f!==h)if(Jf(f)&&Jf(h)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof u=="string"?t[l]=parseFloat(u):Array.isArray(u)&&h===B&&(t[l]=u.map(parseFloat))}else f!=null&&f.transform&&(h!=null&&h.transform)&&(d===0||u===0)?d===0?c.set(h.transform(d)):t[l]=f.transform(u):(o||(i=g4(e),o=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],c.jump(u))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=y4(t,e,a);return i.length&&i.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),Yo&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function x4(e,t,n,r){return h4(t)?v4(e,t,n,r):{target:t,transitionEnd:r}}const w4=(e,t,n,r)=>{const s=d4(e,t,r);return t=s.target,r=s.transitionEnd,x4(e,t,n,r)},ou={current:null},Mg={current:!1};function b4(){if(Mg.current=!0,!!Yo)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ou.current=e.matches;e.addListener(t),t()}else ou.current=!1}function S4(e,t,n){const{willChange:r}=t;for(const s in t){const i=t[s],o=n[s];if(Ge(i))e.addValue(s,i),So(r)&&r.add(s);else if(Ge(o))e.addValue(s,Lr(i,{owner:e})),So(r)&&r.remove(s);else if(o!==i)if(e.hasValue(s)){const a=e.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(s);e.addValue(s,Lr(a!==void 0?a:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const nh=new WeakMap,_g=Object.keys(Us),k4=_g.length,rh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],C4=hc.length;class P4{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,visualState:i},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=()=>oe.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=Xo(n),this.isVariantNode=m0(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&&Ge(u)&&(u.set(a[f],!1),So(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,nh.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)),Mg.current||b4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ou.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){nh.delete(this.current),this.projection&&this.projection.unmount(),Ht(this.notifyUpdate),Ht(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=Qn.has(t),s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&oe.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,s,i){let o,a;for(let l=0;l<k4;l++){const c=_g[l],{isEnabled:d,Feature:f,ProjectionNode:u,MeasureLayout:h}=Us[c];u&&(o=u),d(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),h&&(a=h))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:d,dragConstraints:f,layoutScroll:u,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!d||f&&pr(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:i,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):xe()}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;r<rh.length;r++){const s=rh[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=t["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=S4(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<C4;r++){const s=hc[r],i=this.props[s];(Bs(i)||i===!1)&&(n[s]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.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=Lr(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,s=typeof r=="string"||typeof r=="object"?(n=wc(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ge(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ag extends P4{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:s},i){let o=B5(r,t||{},this);if(s&&(n&&(n=s(n)),r&&(r=s(r)),o&&(o=s(o))),i){O5(this,r,o);const a=w4(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function j4(e){return window.getComputedStyle(e)}class E4 extends Ag{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(Qn.has(n)){const r=Pc(n);return r&&r.default||0}else{const r=j4(t),s=(w0(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xg(t,n)}build(t,n,r,s){mc(t,n,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,n){return xc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,s){j0(t,n,r,s)}}class T4 extends Ag{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=Pc(n);return r&&r.default||0}return n=E0.has(n)?n:dc(n),t.getAttribute(n)}measureInstanceViewportBox(){return xe()}scrapeMotionValuesFromProps(t,n){return N0(t,n)}build(t,n,r,s){yc(t,n,r,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,r,s){T0(t,n,r,s)}mount(t){this.isSVGTag=vc(t.tagName),super.mount(t)}}const N4=(e,t)=>pc(e)?new T4(t,{enableHardwareAcceleration:!1}):new E4(t,{enableHardwareAcceleration:!0}),M4={layout:{ProjectionNode:Tg,MeasureLayout:bg}},_4={...r3,...kw,...l4,...M4},O=_2((e,t)=>cw(e,t,_4,N4)),A4={},sh=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))}},s=()=>t,l={setState:r,getState:s,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(A4?"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,s,l);return l},L4=e=>e?sh(e):sh;var Lg={exports:{}},Dg={},Rg={exports:{}},Vg={};/**
* @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 Rr=k;function D4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var R4=typeof Object.is=="function"?Object.is:D4,V4=Rr.useState,F4=Rr.useEffect,I4=Rr.useLayoutEffect,z4=Rr.useDebugValue;function O4(e,t){var n=t(),r=V4({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return I4(function(){s.value=n,s.getSnapshot=t,Ba(s)&&i({inst:s})},[e,n,t]),F4(function(){return Ba(s)&&i({inst:s}),e(function(){Ba(s)&&i({inst:s})})},[e]),z4(n),n}function Ba(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!R4(e,n)}catch{return!0}}function $4(e,t){return t()}var B4=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$4:O4;Vg.useSyncExternalStore=Rr.useSyncExternalStore!==void 0?Rr.useSyncExternalStore:B4;Rg.exports=Vg;var U4=Rg.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 ea=k,W4=U4;function H4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var q4=typeof Object.is=="function"?Object.is:H4,G4=W4.useSyncExternalStore,Y4=ea.useRef,K4=ea.useEffect,X4=ea.useMemo,Q4=ea.useDebugValue;Dg.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=Y4(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=X4(function(){function l(h){if(!c){if(c=!0,d=h,h=r(h),s!==void 0&&o.hasValue){var p=o.value;if(s(p,h))return f=p}return f=h}if(p=f,q4(d,h))return p;var g=r(h);return s!==void 0&&s(p,g)?(d=h,p):(d=h,f=g)}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,s]);var a=G4(e,i[0],i[1]);return K4(function(){o.hasValue=!0,o.value=a},[a]),Q4(a),a};Lg.exports=Dg;var Z4=Lg.exports;const J4=cu(Z4),Fg={},{useDebugValue:eb}=Gs,{useSyncExternalStoreWithSelector:tb}=J4;let ih=!1;const nb=e=>e;function rb(e,t=nb,n){(Fg?"production":void 0)!=="production"&&n&&!ih&&(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"),ih=!0);const r=tb(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return eb(r),r}const sb=e=>{(Fg?"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"?L4(e):e,n=(r,s)=>rb(t,r,s);return Object.assign(n,t),n},ib=e=>sb,ob={};function ab(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var i;const o=l=>l===null?null:JSON.parse(l,void 0),a=(i=n.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>n.setItem(s,JSON.stringify(i,void 0)),removeItem:s=>n.removeItem(s)}}const Hs=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Hs(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hs(r)(n)}}}},lb=(e,t)=>(n,r,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,v)=>({...v,...x}),...t},o=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...x)},r,s);const d=Hs(i.serialize),f=()=>{const x=i.partialize({...r()});let v;const y=d({state:x,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{v=w});if(v)throw v;return y},u=s.setState;s.setState=(x,v)=>{u(x,v),f()};const h=e((...x)=>{n(...x),f()},r,s);let p;const g=()=>{var x;if(!c)return;o=!1,a.forEach(y=>y(r()));const v=((x=i.onRehydrateStorage)==null?void 0:x.call(i,r()))||void 0;return Hs(c.getItem.bind(c))(i.name).then(y=>{if(y)return i.deserialize(y)}).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==i.version){if(i.migrate)return i.migrate(y.state,y.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return y.state}).then(y=>{var w;return p=i.merge(y,(w=r())!=null?w:h),n(p,!0),f()}).then(()=>{v==null||v(p,void 0),o=!0,l.forEach(y=>y(p))}).catch(y=>{v==null||v(void 0,y)})};return s.persist={setOptions:x=>{i={...i,...x},x.getStorage&&(c=x.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(l.add(x),()=>{l.delete(x)})},g(),p||h},ub=(e,t)=>(n,r,s)=>{let i={storage:ab(()=>localStorage),partialize:g=>g,version:0,merge:(g,x)=>({...x,...g}),...t},o=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...g)},r,s);const d=()=>{const g=i.partialize({...r()});return c.setItem(i.name,{state:g,version:i.version})},f=s.setState;s.setState=(g,x)=>{f(g,x),d()};const u=e((...g)=>{n(...g),d()},r,s);s.getInitialState=()=>u;let h;const p=()=>{var g,x;if(!c)return;o=!1,a.forEach(y=>{var w;return y((w=r())!=null?w:u)});const v=((x=i.onRehydrateStorage)==null?void 0:x.call(i,(g=r())!=null?g:u))||void 0;return Hs(c.getItem.bind(c))(i.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==i.version){if(i.migrate)return[!0,i.migrate(y.state,y.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var w;const[b,S]=y;if(h=i.merge(S,(w=r())!=null?w:u),n(h,!0),b)return d()}).then(()=>{v==null||v(h,void 0),h=r(),o=!0,l.forEach(y=>y(h))}).catch(y=>{v==null||v(void 0,y)})};return s.persist={setOptions:g=>{i={...i,...g},g.storage&&(c=g.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},i.skipHydration||p(),h||u},cb=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ob?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),lb(e,t)):ub(e,t),db=cb,oh={currentUser:null,partnerUser:null,isLoading:!1,error:null,currentTrack:null,isPlaying:!1},ae=ib()(db(e=>({...oh,mixedPlaylists:[],memoryLane:[],theme:"green",setCurrentUser:t=>e({currentUser:t}),setPartnerUser:t=>e({partnerUser:t}),logout:()=>e({currentUser:null,partnerUser:null,currentTrack:null,isPlaying:!1,mixedPlaylists:[],memoryLane:[],error:null}),setLoading:t=>e({isLoading:t}),setError:t=>e({error:t}),setCurrentTrack:t=>e({currentTrack:t}),setIsPlaying:t=>e({isPlaying:t}),addMixedPlaylist:t=>e(n=>({mixedPlaylists:[...n.mixedPlaylists,t]})),removeMixedPlaylist:t=>e(n=>({mixedPlaylists:n.mixedPlaylists.filter(r=>r.id!==t)})),setMixedPlaylists:t=>e({mixedPlaylists:t}),addMemoryLaneItem:t=>e(n=>({memoryLane:[...n.memoryLane,t].sort((r,s)=>new Date(s.date).getTime()-new Date(r.date).getTime())})),removeMemoryLaneItem:t=>e(n=>({memoryLane:n.memoryLane.filter(r=>r.id!==t)})),setTheme:t=>e({theme:t}),clearAllData:()=>e({...oh,mixedPlaylists:[],memoryLane:[]})}),{name:"spotify-app-settings",partialize:e=>({theme:e.theme})}));function fb(){{const e="/api";try{const t=typeof window<"u"&&window.location.protocol==="https:",n=new URL(e,window.location.origin);if(t&&n.protocol==="http:"&&n.hostname==="159.195.9.107"&&(n.port==="8081"||n.port===""))return"https://159.195.9.107:3443"}catch{}return e}}const Br=fb();function qt(){try{const e=localStorage.getItem("spotify-user");if(!e)return null;const t=JSON.parse(e);return(t==null?void 0:t.jwt)||(t==null?void 0:t.token)||null}catch{return null}}async function Pt(e,t,n){const r=await fetch(`${Br}${e}`,{method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:`Bearer ${n}`}:qt()?{Authorization:`Bearer ${qt()}`}:{}},body:t?JSON.stringify(t):void 0});if(!r.ok){const s=await r.text();throw new Error(s||`Request failed: ${r.status}`)}return r.json()}async function se(e,t){const n=await fetch(`${Br}${e}`,{headers:{...t?{Authorization:`Bearer ${t}`}:qt()?{Authorization:`Bearer ${qt()}`}:{}}});if(!n.ok){const r=await n.text();throw new Error(r||`Request failed: ${n.status}`)}return n.json()}function hb(e){const t=qt(),n=new URL(`${Br}${e}`,window.location.origin);return t&&n.searchParams.set("token",t),new EventSource(n.toString())}async function pb(e,t,n){const r=await fetch(`${Br}${e}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",...qt()?{Authorization:`Bearer ${qt()}`}:{}},body:new URLSearchParams(t).toString()});if(!r.ok){const s=await r.text();throw new Error(s||`Request failed: ${r.status}`)}return r.json()}async function mb(e,t){const n=await fetch(`${Br}${e}`,{method:"DELETE",headers:{...t?{Authorization:`Bearer ${t}`}:qt()?{Authorization:`Bearer ${qt()}`}:{}}});if(!n.ok){const r=await n.text();throw new Error(r||`Request failed: ${n.status}`)}return n.json()}const Vr=e=>{const t={green:{primary:"bg-theme-green-primary text-white",secondary:"bg-theme-green-secondary text-white",accent:"bg-theme-green-accent text-white",border:"border-theme-green-primary",text:"text-theme-green-primary",gradient:"from-theme-green-primary to-theme-green-secondary",glass:"bg-theme-green-primary/10 border-theme-green-primary/30",hover:"hover:bg-theme-green-primary/20",cssVars:{primary:"#1db954",secondary:"#1ed760",accent:"#00e676"}},pink:{primary:"bg-theme-pink-primary text-white",secondary:"bg-theme-pink-secondary text-white",accent:"bg-theme-pink-accent text-white",border:"border-theme-pink-primary",text:"text-theme-pink-primary",gradient:"from-theme-pink-primary to-theme-pink-secondary",glass:"bg-theme-pink-primary/10 border-theme-pink-primary/30",hover:"hover:bg-theme-pink-primary/20",cssVars:{primary:"#ec4899",secondary:"#f472b6",accent:"#fb7185"}},blue:{primary:"bg-theme-blue-primary text-white",secondary:"bg-theme-blue-secondary text-white",accent:"bg-theme-blue-accent text-white",border:"border-theme-blue-primary",text:"text-theme-blue-primary",gradient:"from-theme-blue-primary to-theme-blue-secondary",glass:"bg-theme-blue-primary/10 border-theme-blue-primary/30",hover:"hover:bg-theme-blue-primary/20",cssVars:{primary:"#3b82f6",secondary:"#60a5fa",accent:"#93c5fd"}},red:{primary:"bg-theme-red-primary text-white",secondary:"bg-theme-red-secondary text-white",accent:"bg-theme-red-accent text-white",border:"border-theme-red-primary",text:"text-theme-red-primary",gradient:"from-theme-red-primary to-theme-red-secondary",glass:"bg-theme-red-primary/10 border-theme-red-primary/30",hover:"hover:bg-theme-red-primary/20",cssVars:{primary:"#dc2626",secondary:"#ef4444",accent:"#f87171"}},purple:{primary:"bg-theme-purple-primary text-white",secondary:"bg-theme-purple-secondary text-white",accent:"bg-theme-purple-accent text-white",border:"border-theme-purple-primary",text:"text-theme-purple-primary",gradient:"from-theme-purple-primary to-theme-purple-secondary",glass:"bg-theme-purple-primary/10 border-theme-purple-primary/30",hover:"hover:bg-theme-purple-primary/20",cssVars:{primary:"#8b5cf6",secondary:"#a78bfa",accent:"#c4b5fd"}},yellow:{primary:"bg-theme-yellow-primary text-black",secondary:"bg-theme-yellow-secondary text-black",accent:"bg-theme-yellow-accent text-black",border:"border-theme-yellow-primary",text:"text-theme-yellow-primary",gradient:"from-theme-yellow-primary to-theme-yellow-secondary",glass:"bg-theme-yellow-primary/10 border-theme-yellow-primary/30",hover:"hover:bg-theme-yellow-primary/20",cssVars:{primary:"#eab308",secondary:"#f59e0b",accent:"#fbbf24"}},turquoise:{primary:"bg-theme-turquoise-primary text-white",secondary:"bg-theme-turquoise-secondary text-white",accent:"bg-theme-turquoise-accent text-white",border:"border-theme-turquoise-primary",text:"text-theme-turquoise-primary",gradient:"from-theme-turquoise-primary to-theme-turquoise-secondary",glass:"bg-theme-turquoise-primary/10 border-theme-turquoise-primary/30",hover:"hover:bg-theme-turquoise-primary/20",cssVars:{primary:"#06b6d4",secondary:"#22d3ee",accent:"#67e8f9"}}},n=t[e]||t.green;if(typeof document<"u"){const r=document.documentElement;r.style.setProperty("--theme-primary",n.cssVars.primary),r.style.setProperty("--theme-secondary",n.cssVars.secondary),r.style.setProperty("--theme-accent",n.cssVars.accent)}return n},ah=e=>({green:120,pink:300,blue:360,red:245,purple:280,yellow:200,turquoise:40})[e]||120;function bs(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function au(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function gb(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function lh(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function uh(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function yb(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function vb(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function Ua(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function xb(e,t){let n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(n*n+r*r+s*s)}function wb(e,t){let n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return n*n+r*r+s*s}function ch(e){let t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function bb(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function Sb(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function lu(e,t){let n=t[0],r=t[1],s=t[2],i=n*n+r*r+s*s;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function Ig(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function dh(e,t,n){let r=t[0],s=t[1],i=t[2],o=n[0],a=n[1],l=n[2];return e[0]=s*l-i*a,e[1]=i*o-r*l,e[2]=r*a-s*o,e}function kb(e,t,n,r){let s=t[0],i=t[1],o=t[2];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=o+r*(n[2]-o),e}function Cb(e,t,n,r,s){const i=Math.exp(-r*s);let o=t[0],a=t[1],l=t[2];return e[0]=n[0]+(o-n[0])*i,e[1]=n[1]+(a-n[1])*i,e[2]=n[2]+(l-n[2])*i,e}function Pb(e,t,n){let r=t[0],s=t[1],i=t[2],o=n[3]*r+n[7]*s+n[11]*i+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*s+n[8]*i+n[12])/o,e[1]=(n[1]*r+n[5]*s+n[9]*i+n[13])/o,e[2]=(n[2]*r+n[6]*s+n[10]*i+n[14])/o,e}function jb(e,t,n){let r=t[0],s=t[1],i=t[2],o=n[3]*r+n[7]*s+n[11]*i+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*s+n[8]*i)/o,e[1]=(n[1]*r+n[5]*s+n[9]*i)/o,e[2]=(n[2]*r+n[6]*s+n[10]*i)/o,e}function Eb(e,t,n){let r=t[0],s=t[1],i=t[2];return e[0]=r*n[0]+s*n[3]+i*n[6],e[1]=r*n[1]+s*n[4]+i*n[7],e[2]=r*n[2]+s*n[5]+i*n[8],e}function Tb(e,t,n){let r=t[0],s=t[1],i=t[2],o=n[0],a=n[1],l=n[2],c=n[3],d=a*i-l*s,f=l*r-o*i,u=o*s-a*r,h=a*u-l*f,p=l*d-o*u,g=o*f-a*d,x=c*2;return d*=x,f*=x,u*=x,h*=2,p*=2,g*=2,e[0]=r+d+h,e[1]=s+f+p,e[2]=i+u+g,e}const Nb=function(){const e=[0,0,0],t=[0,0,0];return function(n,r){au(e,n),au(t,r),lu(e,e),lu(t,t);let s=Ig(e,t);return s>1?0:s<-1?Math.PI:Math.acos(s)}}();function Mb(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}class mt 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):(gb(this,t,n,r),this)}copy(t){return au(this,t),this}add(t,n){return n?lh(this,t,n):lh(this,this,t),this}sub(t,n){return n?uh(this,t,n):uh(this,this,t),this}multiply(t){return t.length?yb(this,this,t):Ua(this,this,t),this}divide(t){return t.length?vb(this,this,t):Ua(this,this,1/t),this}inverse(t=this){return Sb(this,t),this}len(){return bs(this)}distance(t){return t?xb(this,t):bs(this)}squaredLen(){return ch(this)}squaredDistance(t){return t?wb(this,t):ch(this)}negate(t=this){return bb(this,t),this}cross(t,n){return n?dh(this,t,n):dh(this,this,t),this}scale(t){return Ua(this,this,t),this}normalize(){return lu(this,this),this}dot(t){return Ig(this,t)}equals(t){return Mb(this,t)}applyMatrix3(t){return Eb(this,this,t),this}applyMatrix4(t){return Pb(this,this,t),this}scaleRotateMatrix4(t){return jb(this,this,t),this}applyQuaternion(t){return Tb(this,this,t),this}angle(t){return Nb(this,t)}lerp(t,n){return kb(this,this,t,n),this}smoothLerp(t,n,r){return Cb(this,this,t,n,r),this}clone(){return new mt(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],s=this[2];return this[0]=t[0]*n+t[4]*r+t[8]*s,this[1]=t[1]*n+t[5]*r+t[9]*s,this[2]=t[2]*n+t[6]*r+t[10]*s,this.normalize()}}const fh=new mt;let _b=1,Ab=1,hh=!1;class Lb{constructor(t,n={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=n,this.id=_b++,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=Ab++,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:s})=>{if(!this.attributes[r]){console.warn(`active attribute ${r} not being supplied`);return}const i=this.attributes[r];this.gl.bindBuffer(i.target,i.buffer),this.glState.boundBuffer=i.buffer;let o=1;s===35674&&(o=2),s===35675&&(o=3),s===35676&&(o=4);const a=i.size/o,l=o===1?0:o*o*4,c=o===1?0:o*4;for(let d=0;d<o;d++)this.gl.vertexAttribPointer(n+d,a,i.type,i.normalized,i.stride+l,i.offset+d*c),this.gl.enableVertexAttribArray(n+d),this.gl.renderer.vertexAttribDivisor(n+d,i.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:t,mode:n=this.gl.TRIANGLES}){var s;this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((i,{name:o})=>{const a=this.attributes[o];a.needsUpdate&&this.updateAttribute(a)});let r=2;((s=this.attributes.index)==null?void 0:s.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(!hh)return console.warn("No position buffer data found to compute bounds"),hh=!0}computeBoundingBox(t){t||(t=this.getPosition());const n=t.data,r=t.size;this.bounds||(this.bounds={min:new mt,max:new mt,center:new mt,scale:new mt,radius:1/0});const s=this.bounds.min,i=this.bounds.max,o=this.bounds.center,a=this.bounds.scale;s.set(1/0),i.set(-1/0);for(let l=0,c=n.length;l<c;l+=r){const d=n[l],f=n[l+1],u=n[l+2];s.x=Math.min(d,s.x),s.y=Math.min(f,s.y),s.z=Math.min(u,s.z),i.x=Math.max(d,i.x),i.y=Math.max(f,i.y),i.z=Math.max(u,i.z)}a.sub(i,s),o.add(s,i).divide(2)}computeBoundingSphere(t){t||(t=this.getPosition());const n=t.data,r=t.size;this.bounds||this.computeBoundingBox(t);let s=0;for(let i=0,o=n.length;i<o;i+=r)fh.fromArray(n,i),s=Math.max(s,this.bounds.center.squaredDistance(fh));this.bounds.radius=Math.sqrt(s)}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}}let Db=1;const ph={};class Rb{constructor(t,{vertex:n,fragment:r,uniforms:s={},transparent:i=!1,cullFace:o=t.BACK,frontFace:a=t.CCW,depthTest:l=!0,depthWrite:c=!0,depthFunc:d=t.LEQUAL}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.uniforms=s,this.id=Db++,n||console.warn("vertex shader not supplied"),r||console.warn("fragment shader not supplied"),this.transparent=i,this.cullFace=o,this.frontFace=a,this.depthTest=l,this.depthWrite=c,this.depthFunc=d,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=t.createShader(t.VERTEX_SHADER),this.fragmentShader=t.createShader(t.FRAGMENT_SHADER),this.program=t.createProgram(),t.attachShader(this.program,this.vertexShader),t.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:n,fragment:r})}setShaders({vertex:t,fragment:n}){if(t&&(this.gl.shaderSource(this.vertexShader,t),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
Vertex Shader
${mh(t)}`)),n&&(this.gl.shaderSource(this.fragmentShader,n),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
Fragment Shader
${mh(n)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let o=0;o<r;o++){let a=this.gl.getActiveUniform(this.program,o);this.uniformLocations.set(a,this.gl.getUniformLocation(this.program,a.name));const l=a.name.match(/(\w+)/g);a.uniformName=l[0],a.nameComponents=l.slice(1)}this.attributeLocations=new Map;const s=[],i=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let o=0;o<i;o++){const a=this.gl.getActiveAttrib(this.program,o),l=this.gl.getAttribLocation(this.program,a.name);l!==-1&&(s[l]=a.name,this.attributeLocations.set(a,l))}this.attributeOrder=s.join("")}setBlendFunc(t,n,r,s){this.blendFunc.src=t,this.blendFunc.dst=n,this.blendFunc.srcAlpha=r,this.blendFunc.dstAlpha=s,t&&(this.transparent=!0)}setBlendEquation(t,n){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=n}setStencilFunc(t,n,r){this.stencilRef=n,this.stencilFunc.func=t,this.stencilFunc.ref=n,this.stencilFunc.mask=r}setStencilOp(t,n,r){this.stencilOp.stencilFail=t,this.stencilOp.depthFail=n,this.stencilOp.depthPass=r}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:t=!1}={}){let n=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((s,i)=>{let o=this.uniforms[i.uniformName];for(const a of i.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 gh(`Active uniform ${i.name} has not been supplied`);if(o&&o.value===void 0)return gh(`${i.name} uniform is missing a value parameter`);if(o.value.texture)return n=n+1,o.value.update(n),Wa(this.gl,i.type,s,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)}),Wa(this.gl,i.type,s,a)}Wa(this.gl,i.type,s,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 Wa(e,t,n,r){r=r.length?Vb(r):r;const s=e.renderer.state.uniformLocations.get(n);if(r.length)if(s===void 0||s.length!==r.length)e.renderer.state.uniformLocations.set(n,r.slice(0));else{if(Fb(s,r))return;s.set?s.set(r):Ib(s,r),e.renderer.state.uniformLocations.set(n,s)}else{if(s===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 mh(e){let t=e.split(`
`);for(let n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join(`
`)}function Vb(e){const t=e.length,n=e[0].length;if(n===void 0)return e;const r=t*n;let s=ph[r];s||(ph[r]=s=new Float32Array(r));for(let i=0;i<t;i++)s.set(e[i],i*n);return s}function Fb(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Ib(e,t){for(let n=0,r=e.length;n<r;n++)e[n]=t[n]}let Ha=0;function gh(e){Ha>100||(console.warn(e),Ha++,Ha>100&&console.warn("More than 100 program warnings - stopping logs."))}const qa=new mt;let zb=1;class Ob{constructor({canvas:t=document.createElement("canvas"),width:n=300,height:r=150,dpr:s=1,alpha:i=!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:i,depth:o,stencil:a,antialias:l,premultipliedAlpha:c,preserveDrawingBuffer:d,powerPreference:f};this.dpr=s,this.alpha=i,this.color=!0,this.depth=o,this.stencil=a,this.premultipliedAlpha=c,this.autoClear=u,this.id=zb++,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,s=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=s,this.gl.viewport(r,s,t,n))}setScissor(t,n,r=0,s=0){this.gl.scissor(r,s,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,s){this.state.blendFunc.src===t&&this.state.blendFunc.dst===n&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===s||(this.state.blendFunc.src=t,this.state.blendFunc.dst=n,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=s,r!==void 0?this.gl.blendFuncSeparate(t,n,r,s):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:s}){let i=[];if(n&&r&&n.updateFrustum(),t.traverse(o=>{if(!o.visible)return!0;o.draw&&(r&&o.frustumCulled&&n&&!n.frustumIntersectsMesh(o)||i.push(o))}),s){const o=[],a=[],l=[];i.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(qa),qa.applyMatrix4(n.projectionViewMatrix),c.zDepth=qa.z)}),o.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),i=o.concat(a,l)}return i}render({scene:t,camera:n,target:r=null,update:s=!0,sort:i=!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))),s&&t.updateMatrixWorld(),n&&n.updateMatrixWorld(),this.getRenderList({scene:t,camera:n,frustumCull:o,sort:i}).forEach(c=>{c.draw({camera:n})})}}function $b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Bb(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function Ub(e,t){let n=t[0],r=t[1],s=t[2],i=t[3],o=n*n+r*r+s*s+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=s*o,e[3]=i*o,e}function Wb(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Hb(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function qb(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 yh(e,t,n){let r=t[0],s=t[1],i=t[2],o=t[3],a=n[0],l=n[1],c=n[2],d=n[3];return e[0]=r*d+o*a+s*c-i*l,e[1]=s*d+o*l+i*a-r*c,e[2]=i*d+o*c+r*l-s*a,e[3]=o*d-r*a-s*l-i*c,e}function Gb(e,t,n){n*=.5;let r=t[0],s=t[1],i=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*a,e[1]=s*l+i*a,e[2]=i*l-s*a,e[3]=o*l-r*a,e}function Yb(e,t,n){n*=.5;let r=t[0],s=t[1],i=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l-i*a,e[1]=s*l+o*a,e[2]=i*l+r*a,e[3]=o*l-s*a,e}function Kb(e,t,n){n*=.5;let r=t[0],s=t[1],i=t[2],o=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+s*a,e[1]=s*l-r*a,e[2]=i*l+o*a,e[3]=o*l-i*a,e}function Xb(e,t,n,r){let s=t[0],i=t[1],o=t[2],a=t[3],l=n[0],c=n[1],d=n[2],f=n[3],u,h,p,g,x;return h=s*l+i*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),g=Math.sin((1-r)*u)/p,x=Math.sin(r*u)/p):(g=1-r,x=r),e[0]=g*s+x*l,e[1]=g*i+x*c,e[2]=g*o+x*d,e[3]=g*a+x*f,e}function Qb(e,t){let n=t[0],r=t[1],s=t[2],i=t[3],o=n*n+r*r+s*s+i*i,a=o?1/o:0;return e[0]=-n*a,e[1]=-r*a,e[2]=-s*a,e[3]=i*a,e}function Zb(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Jb(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 s=0;t[4]>t[0]&&(s=1),t[8]>t[s*3+s]&&(s=2);let i=(s+1)%3,o=(s+2)%3;r=Math.sqrt(t[s*3+s]-t[i*3+i]-t[o*3+o]+1),e[s]=.5*r,r=.5/r,e[3]=(t[i*3+o]-t[o*3+i])*r,e[i]=(t[i*3+s]+t[s*3+i])*r,e[o]=(t[o*3+s]+t[s*3+o])*r}return e}function eS(e,t,n="YXZ"){let r=Math.sin(t[0]*.5),s=Math.cos(t[0]*.5),i=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+s*i*a,e[1]=s*i*l-r*o*a,e[2]=s*o*a+r*i*l,e[3]=s*o*l-r*i*a):n==="YXZ"?(e[0]=r*o*l+s*i*a,e[1]=s*i*l-r*o*a,e[2]=s*o*a-r*i*l,e[3]=s*o*l+r*i*a):n==="ZXY"?(e[0]=r*o*l-s*i*a,e[1]=s*i*l+r*o*a,e[2]=s*o*a+r*i*l,e[3]=s*o*l-r*i*a):n==="ZYX"?(e[0]=r*o*l-s*i*a,e[1]=s*i*l+r*o*a,e[2]=s*o*a-r*i*l,e[3]=s*o*l+r*i*a):n==="YZX"?(e[0]=r*o*l+s*i*a,e[1]=s*i*l+r*o*a,e[2]=s*o*a-r*i*l,e[3]=s*o*l-r*i*a):n==="XZY"&&(e[0]=r*o*l-s*i*a,e[1]=s*i*l-r*o*a,e[2]=s*o*a+r*i*l,e[3]=s*o*l+r*i*a),e}const tS=$b,nS=Bb,rS=Wb,sS=Ub;class iS extends Array{constructor(t=0,n=0,r=0,s=1){super(t,n,r,s),this.onChange=()=>{},this._target=this;const i=["0","1","2","3"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&i.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 Hb(this._target),this.onChange(),this}set(t,n,r,s){return t.length?this.copy(t):(nS(this._target,t,n,r,s),this.onChange(),this)}rotateX(t){return Gb(this._target,this._target,t),this.onChange(),this}rotateY(t){return Yb(this._target,this._target,t),this.onChange(),this}rotateZ(t){return Kb(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return Qb(this._target,t),this.onChange(),this}conjugate(t=this._target){return Zb(this._target,t),this.onChange(),this}copy(t){return tS(this._target,t),this.onChange(),this}normalize(t=this._target){return sS(this._target,t),this.onChange(),this}multiply(t,n){return n?yh(this._target,t,n):yh(this._target,this._target,t),this.onChange(),this}dot(t){return rS(this._target,t)}fromMatrix3(t){return Jb(this._target,t),this.onChange(),this}fromEuler(t,n){return eS(this._target,t,t.order),n||this.onChange(),this}fromAxisAngle(t,n){return qb(this._target,t,n),this.onChange(),this}slerp(t,n){return Xb(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 oS=1e-6;function aS(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 lS(e,t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,x){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=i,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]=g,e[15]=x,e}function uS(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 cS(e,t){let n=t[0],r=t[1],s=t[2],i=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],g=t[13],x=t[14],v=t[15],y=n*a-r*o,w=n*l-s*o,b=n*c-i*o,S=r*l-s*a,C=r*c-i*a,P=s*c-i*l,j=d*g-f*p,D=d*x-u*p,T=d*v-h*p,z=f*x-u*g,V=f*v-h*g,U=u*v-h*x,R=y*U-w*V+b*z+S*T-C*D+P*j;return R?(R=1/R,e[0]=(a*U-l*V+c*z)*R,e[1]=(s*V-r*U-i*z)*R,e[2]=(g*P-x*C+v*S)*R,e[3]=(u*C-f*P-h*S)*R,e[4]=(l*T-o*U-c*D)*R,e[5]=(n*U-s*T+i*D)*R,e[6]=(x*b-p*P-v*w)*R,e[7]=(d*P-u*b+h*w)*R,e[8]=(o*V-a*T+c*j)*R,e[9]=(r*T-n*V-i*j)*R,e[10]=(p*C-g*b+v*y)*R,e[11]=(f*b-d*C-h*y)*R,e[12]=(a*D-o*z-l*j)*R,e[13]=(n*z-r*D+s*j)*R,e[14]=(g*w-p*S-x*y)*R,e[15]=(d*S-f*w+u*y)*R,e):null}function zg(e){let t=e[0],n=e[1],r=e[2],s=e[3],i=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],g=e[14],x=e[15],v=t*o-n*i,y=t*a-r*i,w=t*l-s*i,b=n*a-r*o,S=n*l-s*o,C=r*l-s*a,P=c*p-d*h,j=c*g-f*h,D=c*x-u*h,T=d*g-f*p,z=d*x-u*p,V=f*x-u*g;return v*V-y*z+w*T+b*D-S*j+C*P}function vh(e,t,n){let r=t[0],s=t[1],i=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],g=t[12],x=t[13],v=t[14],y=t[15],w=n[0],b=n[1],S=n[2],C=n[3];return e[0]=w*r+b*a+S*f+C*g,e[1]=w*s+b*l+S*u+C*x,e[2]=w*i+b*c+S*h+C*v,e[3]=w*o+b*d+S*p+C*y,w=n[4],b=n[5],S=n[6],C=n[7],e[4]=w*r+b*a+S*f+C*g,e[5]=w*s+b*l+S*u+C*x,e[6]=w*i+b*c+S*h+C*v,e[7]=w*o+b*d+S*p+C*y,w=n[8],b=n[9],S=n[10],C=n[11],e[8]=w*r+b*a+S*f+C*g,e[9]=w*s+b*l+S*u+C*x,e[10]=w*i+b*c+S*h+C*v,e[11]=w*o+b*d+S*p+C*y,w=n[12],b=n[13],S=n[14],C=n[15],e[12]=w*r+b*a+S*f+C*g,e[13]=w*s+b*l+S*u+C*x,e[14]=w*i+b*c+S*h+C*v,e[15]=w*o+b*d+S*p+C*y,e}function dS(e,t,n){let r=n[0],s=n[1],i=n[2],o,a,l,c,d,f,u,h,p,g,x,v;return t===e?(e[12]=t[0]*r+t[4]*s+t[8]*i+t[12],e[13]=t[1]*r+t[5]*s+t[9]*i+t[13],e[14]=t[2]*r+t[6]*s+t[10]*i+t[14],e[15]=t[3]*r+t[7]*s+t[11]*i+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],g=t[9],x=t[10],v=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]=g,e[10]=x,e[11]=v,e[12]=o*r+d*s+p*i+t[12],e[13]=a*r+f*s+g*i+t[13],e[14]=l*r+u*s+x*i+t[14],e[15]=c*r+h*s+v*i+t[15]),e}function fS(e,t,n){let r=n[0],s=n[1],i=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]*s,e[5]=t[5]*s,e[6]=t[6]*s,e[7]=t[7]*s,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function hS(e,t,n,r){let s=r[0],i=r[1],o=r[2],a=Math.hypot(s,i,o),l,c,d,f,u,h,p,g,x,v,y,w,b,S,C,P,j,D,T,z,V,U,R,Q;return Math.abs(a)<oS?null:(a=1/a,s*=a,i*=a,o*=a,l=Math.sin(n),c=Math.cos(n),d=1-c,f=t[0],u=t[1],h=t[2],p=t[3],g=t[4],x=t[5],v=t[6],y=t[7],w=t[8],b=t[9],S=t[10],C=t[11],P=s*s*d+c,j=i*s*d+o*l,D=o*s*d-i*l,T=s*i*d-o*l,z=i*i*d+c,V=o*i*d+s*l,U=s*o*d+i*l,R=i*o*d-s*l,Q=o*o*d+c,e[0]=f*P+g*j+w*D,e[1]=u*P+x*j+b*D,e[2]=h*P+v*j+S*D,e[3]=p*P+y*j+C*D,e[4]=f*T+g*z+w*V,e[5]=u*T+x*z+b*V,e[6]=h*T+v*z+S*V,e[7]=p*T+y*z+C*V,e[8]=f*U+g*R+w*Q,e[9]=u*U+x*R+b*Q,e[10]=h*U+v*R+S*Q,e[11]=p*U+y*R+C*Q,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function pS(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Og(e,t){let n=t[0],r=t[1],s=t[2],i=t[4],o=t[5],a=t[6],l=t[8],c=t[9],d=t[10];return e[0]=Math.hypot(n,r,s),e[1]=Math.hypot(i,o,a),e[2]=Math.hypot(l,c,d),e}function mS(e){let t=e[0],n=e[1],r=e[2],s=e[4],i=e[5],o=e[6],a=e[8],l=e[9],c=e[10];const d=t*t+n*n+r*r,f=s*s+i*i+o*o,u=a*a+l*l+c*c;return Math.sqrt(Math.max(d,f,u))}const $g=function(){const e=[1,1,1];return function(t,n){let r=e;Og(r,n);let s=1/r[0],i=1/r[1],o=1/r[2],a=n[0]*s,l=n[1]*i,c=n[2]*o,d=n[4]*s,f=n[5]*i,u=n[6]*o,h=n[8]*s,p=n[9]*i,g=n[10]*o,x=a+f+g,v=0;return x>0?(v=Math.sqrt(x+1)*2,t[3]=.25*v,t[0]=(u-p)/v,t[1]=(h-c)/v,t[2]=(l-d)/v):a>f&&a>g?(v=Math.sqrt(1+a-f-g)*2,t[3]=(u-p)/v,t[0]=.25*v,t[1]=(l+d)/v,t[2]=(h+c)/v):f>g?(v=Math.sqrt(1+f-a-g)*2,t[3]=(h-c)/v,t[0]=(l+d)/v,t[1]=.25*v,t[2]=(u+p)/v):(v=Math.sqrt(1+g-a-f)*2,t[3]=(l-d)/v,t[0]=(h+c)/v,t[1]=(u+p)/v,t[2]=.25*v),t}}();function gS(e,t,n,r){let s=bs([e[0],e[1],e[2]]);const i=bs([e[4],e[5],e[6]]),o=bs([e[8],e[9],e[10]]);zg(e)<0&&(s=-s),n[0]=e[12],n[1]=e[13],n[2]=e[14];const l=e.slice(),c=1/s,d=1/i,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,$g(t,l),r[0]=s,r[1]=i,r[2]=o}function yS(e,t,n,r){const s=e,i=t[0],o=t[1],a=t[2],l=t[3],c=i+i,d=o+o,f=a+a,u=i*c,h=i*d,p=i*f,g=o*d,x=o*f,v=a*f,y=l*c,w=l*d,b=l*f,S=r[0],C=r[1],P=r[2];return s[0]=(1-(g+v))*S,s[1]=(h+b)*S,s[2]=(p-w)*S,s[3]=0,s[4]=(h-b)*C,s[5]=(1-(u+v))*C,s[6]=(x+y)*C,s[7]=0,s[8]=(p+w)*P,s[9]=(x-y)*P,s[10]=(1-(u+g))*P,s[11]=0,s[12]=n[0],s[13]=n[1],s[14]=n[2],s[15]=1,s}function vS(e,t){let n=t[0],r=t[1],s=t[2],i=t[3],o=n+n,a=r+r,l=s+s,c=n*o,d=r*o,f=r*a,u=s*o,h=s*a,p=s*l,g=i*o,x=i*a,v=i*l;return e[0]=1-f-p,e[1]=d+v,e[2]=u-x,e[3]=0,e[4]=d-v,e[5]=1-c-p,e[6]=h+g,e[7]=0,e[8]=u+x,e[9]=h-g,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function xS(e,t,n,r,s){let i=1/Math.tan(t/2),o=1/(r-s);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(s+r)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*s*r*o,e[15]=0,e}function wS(e,t,n,r,s,i,o){let a=1/(t-n),l=1/(r-s),c=1/(i-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]=(s+r)*l,e[14]=(o+i)*c,e[15]=1,e}function bS(e,t,n,r){let s=t[0],i=t[1],o=t[2],a=r[0],l=r[1],c=r[2],d=s-n[0],f=i-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,g=c*d-a*u,x=a*f-l*d;return h=p*p+g*g+x*x,h===0&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,p=l*u-c*f,g=c*d-a*u,x=a*f-l*d,h=p*p+g*g+x*x),h=1/Math.sqrt(h),p*=h,g*=h,x*=h,e[0]=p,e[1]=g,e[2]=x,e[3]=0,e[4]=f*x-u*g,e[5]=u*p-d*x,e[6]=d*g-f*p,e[7]=0,e[8]=d,e[9]=f,e[10]=u,e[11]=0,e[12]=s,e[13]=i,e[14]=o,e[15]=1,e}function xh(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 wh(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 SS(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 Co extends Array{constructor(t=1,n=0,r=0,s=0,i=0,o=1,a=0,l=0,c=0,d=0,f=1,u=0,h=0,p=0,g=0,x=1){return super(t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,x),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,s,i,o,a,l,c,d,f,u,h,p,g,x){return t.length?this.copy(t):(lS(this,t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,x),this)}translate(t,n=this){return dS(this,n,t),this}rotate(t,n,r=this){return hS(this,r,t,n),this}scale(t,n=this){return fS(this,n,typeof t=="number"?[t,t,t]:t),this}add(t,n){return n?xh(this,t,n):xh(this,this,t),this}sub(t,n){return n?wh(this,t,n):wh(this,this,t),this}multiply(t,n){return t.length?n?vh(this,t,n):vh(this,this,t):SS(this,this,t),this}identity(){return uS(this),this}copy(t){return aS(this,t),this}fromPerspective({fov:t,aspect:n,near:r,far:s}={}){return xS(this,t,n,r,s),this}fromOrthogonal({left:t,right:n,bottom:r,top:s,near:i,far:o}){return wS(this,t,n,r,s,i,o),this}fromQuaternion(t){return vS(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return cS(this,t),this}compose(t,n,r){return yS(this,t,n,r),this}decompose(t,n,r){return gS(this,t,n,r),this}getRotation(t){return $g(t,this),this}getTranslation(t){return pS(t,this),this}getScaling(t){return Og(t,this),this}getMaxScaleOnAxis(){return mS(this)}lookAt(t,n,r){return bS(this,t,n,r),this}determinant(){return zg(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 kS(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 bh=new Co;class CS extends Array{constructor(t=0,n=t,r=t,s="YXZ"){super(t,n,r),this.order=s,this.onChange=()=>{},this._target=this;const i=["0","1","2"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&i.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 kS(this._target,t,n),this.onChange(),this}fromQuaternion(t,n=this.order,r){return bh.fromQuaternion(t),this._target.fromRotationMatrix(bh,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 PS{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new Co,this.worldMatrix=new Co,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new mt,this.quaternion=new iS,this.scale=new mt(1),this.rotation=new CS,this.up=new mt(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;n<r;n++)this.children[n].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(t){if(!t(this))for(let n=0,r=this.children.length;n<r;n++)this.children[n].traverse(t)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(t,n=!1){n?this.matrix.lookAt(this.position,t,this.up):this.matrix.lookAt(t,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function jS(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ES(e,t){let n=t[0],r=t[1],s=t[2],i=t[3],o=n+n,a=r+r,l=s+s,c=n*o,d=r*o,f=r*a,u=s*o,h=s*a,p=s*l,g=i*o,x=i*a,v=i*l;return e[0]=1-f-p,e[3]=d-v,e[6]=u+x,e[1]=d+v,e[4]=1-c-p,e[7]=h-g,e[2]=u-x,e[5]=h+g,e[8]=1-c-f,e}function TS(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}function NS(e,t,n,r,s,i,o,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=o,e[6]=a,e[7]=l,e[8]=c,e}function MS(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _S(e,t){let n=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],l=t[6],c=t[7],d=t[8],f=d*o-a*c,u=-d*i+a*l,h=c*i-o*l,p=n*f+r*u+s*h;return p?(p=1/p,e[0]=f*p,e[1]=(-d*r+s*c)*p,e[2]=(a*r-s*o)*p,e[3]=u*p,e[4]=(d*n-s*l)*p,e[5]=(-a*n+s*i)*p,e[6]=h*p,e[7]=(-c*n+r*l)*p,e[8]=(o*n-r*i)*p,e):null}function Sh(e,t,n){let r=t[0],s=t[1],i=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=n[0],h=n[1],p=n[2],g=n[3],x=n[4],v=n[5],y=n[6],w=n[7],b=n[8];return e[0]=u*r+h*o+p*c,e[1]=u*s+h*a+p*d,e[2]=u*i+h*l+p*f,e[3]=g*r+x*o+v*c,e[4]=g*s+x*a+v*d,e[5]=g*i+x*l+v*f,e[6]=y*r+w*o+b*c,e[7]=y*s+w*a+b*d,e[8]=y*i+w*l+b*f,e}function AS(e,t,n){let r=t[0],s=t[1],i=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=n[0],h=n[1];return e[0]=r,e[1]=s,e[2]=i,e[3]=o,e[4]=a,e[5]=l,e[6]=u*r+h*o+c,e[7]=u*s+h*a+d,e[8]=u*i+h*l+f,e}function LS(e,t,n){let r=t[0],s=t[1],i=t[2],o=t[3],a=t[4],l=t[5],c=t[6],d=t[7],f=t[8],u=Math.sin(n),h=Math.cos(n);return e[0]=h*r+u*o,e[1]=h*s+u*a,e[2]=h*i+u*l,e[3]=h*o-u*r,e[4]=h*a-u*s,e[5]=h*l-u*i,e[6]=c,e[7]=d,e[8]=f,e}function DS(e,t,n){let r=n[0],s=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=s*t[3],e[4]=s*t[4],e[5]=s*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function RS(e,t){let n=t[0],r=t[1],s=t[2],i=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],g=t[13],x=t[14],v=t[15],y=n*a-r*o,w=n*l-s*o,b=n*c-i*o,S=r*l-s*a,C=r*c-i*a,P=s*c-i*l,j=d*g-f*p,D=d*x-u*p,T=d*v-h*p,z=f*x-u*g,V=f*v-h*g,U=u*v-h*x,R=y*U-w*V+b*z+S*T-C*D+P*j;return R?(R=1/R,e[0]=(a*U-l*V+c*z)*R,e[1]=(l*T-o*U-c*D)*R,e[2]=(o*V-a*T+c*j)*R,e[3]=(s*V-r*U-i*z)*R,e[4]=(n*U-s*T+i*D)*R,e[5]=(r*T-n*V-i*j)*R,e[6]=(g*P-x*C+v*S)*R,e[7]=(x*b-p*P-v*w)*R,e[8]=(p*C-g*b+v*y)*R,e):null}class VS extends Array{constructor(t=1,n=0,r=0,s=0,i=1,o=0,a=0,l=0,c=1){return super(t,n,r,s,i,o,a,l,c),this}set(t,n,r,s,i,o,a,l,c){return t.length?this.copy(t):(NS(this,t,n,r,s,i,o,a,l,c),this)}translate(t,n=this){return AS(this,n,t),this}rotate(t,n=this){return LS(this,n,t),this}scale(t,n=this){return DS(this,n,t),this}multiply(t,n){return n?Sh(this,t,n):Sh(this,this,t),this}identity(){return MS(this),this}copy(t){return TS(this,t),this}fromMatrix4(t){return jS(this,t),this}fromQuaternion(t){return ES(this,t),this}fromBasis(t,n,r){return this.set(t[0],t[1],t[2],n[0],n[1],n[2],r[0],r[1],r[2]),this}inverse(t=this){return _S(this,t),this}getNormalMatrix(t){return RS(this,t),this}}let FS=0;class IS extends PS{constructor(t,{geometry:n,program:r,mode:s=t.TRIANGLES,frustumCulled:i=!0,renderOrder:o=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=FS++,this.geometry=n,this.program=r,this.mode=s,this.frustumCulled=i,this.renderOrder=o,this.modelViewMatrix=new Co,this.normalMatrix=new VS,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(t){return this.beforeRenderCallbacks.push(t),this}onAfterRender(t){return this.afterRenderCallbacks.push(t),this}draw({camera:t}={}){t&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=t.projectionMatrix,this.program.uniforms.cameraPosition.value=t.worldPosition,this.program.uniforms.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(r=>r&&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 zS(e,t){return e[0]=t[0],e[1]=t[1],e}function OS(e,t,n){return e[0]=t,e[1]=n,e}function kh(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Ch(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function $S(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function BS(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Ga(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function US(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function WS(e,t){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function Ph(e){var t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function HS(e){var t=e[0],n=e[1];return t*t+n*n}function qS(e,t){return e[0]=-t[0],e[1]=-t[1],e}function GS(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function YS(e,t){var n=t[0],r=t[1],s=n*n+r*r;return s>0&&(s=1/Math.sqrt(s)),e[0]=t[0]*s,e[1]=t[1]*s,e}function KS(e,t){return e[0]*t[0]+e[1]*t[1]}function jh(e,t){return e[0]*t[1]-e[1]*t[0]}function XS(e,t,n,r){var s=t[0],i=t[1];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e}function QS(e,t,n,r,s){const i=Math.exp(-r*s);let o=t[0],a=t[1];return e[0]=n[0]+(o-n[0])*i,e[1]=n[1]+(a-n[1])*i,e}function ZS(e,t,n){var r=t[0],s=t[1];return e[0]=n[0]*r+n[3]*s+n[6],e[1]=n[1]*r+n[4]*s+n[7],e}function JS(e,t,n){let r=t[0],s=t[1];return e[0]=n[0]*r+n[4]*s+n[12],e[1]=n[1]*r+n[5]*s+n[13],e}function ek(e,t){return e[0]===t[0]&&e[1]===t[1]}class _c 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):(OS(this,t,n),this)}copy(t){return zS(this,t),this}add(t,n){return n?kh(this,t,n):kh(this,this,t),this}sub(t,n){return n?Ch(this,t,n):Ch(this,this,t),this}multiply(t){return t.length?$S(this,this,t):Ga(this,this,t),this}divide(t){return t.length?BS(this,this,t):Ga(this,this,1/t),this}inverse(t=this){return GS(this,t),this}len(){return Ph(this)}distance(t){return t?US(this,t):Ph(this)}squaredLen(){return this.squaredDistance()}squaredDistance(t){return t?WS(this,t):HS(this)}negate(t=this){return qS(this,t),this}cross(t,n){return n?jh(t,n):jh(this,t)}scale(t){return Ga(this,this,t),this}normalize(){return YS(this,this),this}dot(t){return KS(this,t)}equals(t){return ek(this,t)}applyMatrix3(t){return ZS(this,this,t),this}applyMatrix4(t){return JS(this,this,t),this}lerp(t,n){return XS(this,this,t,n),this}smoothLerp(t,n,r){return QS(this,this,t,n,r),this}clone(){return new _c(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 tk extends Lb{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 nk=`
attribute vec2 position;
void main(){gl_Position=vec4(position,0.0,1.0);}
`,rk=`
#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 sk extends k.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||m.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 ik({hueShift:e=60,noiseIntensity:t=.03,scanlineIntensity:n=.08,speed:r=.4,scanlineFrequency:s=.6,warpAmount:i=.15,resolutionScale:o=1}){const a=k.useRef(null);return k.useEffect(()=>{const l=a.current;if(!l){console.error("DarkVeil: Canvas not found");return}let c,d,f;try{c=new Ob({dpr:Math.min(window.devicePixelRatio,2),canvas:l});const x=c.gl;if(!x){console.error("DarkVeil: WebGL context not available");return}const v=new tk(x);d=new Rb(x,{vertex:nk,fragment:rk,uniforms:{uTime:{value:0},uResolution:{value:new _c},uHueShift:{value:e},uNoise:{value:t},uScan:{value:n},uScanFreq:{value:s},uWarp:{value:i}}}),f=new IS(x,{geometry:v,program:d}),console.log("DarkVeil: Successfully initialized")}catch(x){console.error("DarkVeil: Initialization error:",x);return}const u=()=>{const x=window.innerWidth,v=window.innerHeight;c.setSize(x*o,v*o),d.uniforms.uResolution.value.set(x,v)};window.addEventListener("resize",u),u();const h=performance.now();let p=0;const g=()=>{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=s,d.uniforms.uWarp.value=i,c.render({scene:f}),p=requestAnimationFrame(g)};return g(),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",u)}},[e,t,n,r,s,i,o]),m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",background:"radial-gradient(circle at center, rgba(50,20,80,0.8) 0%, rgba(20,10,40,0.9) 50%, rgba(0,0,0,1) 100%)",zIndex:-10,pointerEvents:"none"}}),m.jsx("canvas",{ref:a,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:-5,pointerEvents:"none",display:"block"}})]})}function Eh(e){return m.jsx(sk,{children:m.jsx(ik,{...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 ok={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 ak=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ee=(e,t)=>{const n=k.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:a="",children:l,...c},d)=>k.createElement("svg",{ref:d,...ok,width:s,height:s,stroke:r,strokeWidth:o?Number(i)*24/Number(s):i,className:["lucide",`lucide-${ak(e)}`,a].join(" "),...c},[...t.map(([f,u])=>k.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 lk=ee("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 uk=ee("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 ck=ee("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 dk=ee("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 Po=ee("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 Bg=ee("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=ee("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 fk=ee("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 Th=ee("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 hk=ee("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 vt=ee("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 pk=ee("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 Ug=ee("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 Nh=ee("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 Ac=ee("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 Mh=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @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 Yn=ee("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 mk=ee("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 Wg=ee("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 gk=ee("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 Ss=ee("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 Hg=ee("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 yk=ee("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 vk=ee("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 xk=ee("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 _h=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function qg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=qg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=qg(e))&&(r&&(r+=" "),r+=t);return r}const Lc="-",bk=e=>{const t=kk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Lc);return a[0]===""&&a.length!==1&&a.shift(),Gg(a,t)||Sk(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Gg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Gg(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Lc);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Ah=/^\[(.+)\]$/,Sk=e=>{if(Ah.test(e)){const t=Ah.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kk=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Pk(Object.entries(e.classGroups),n).forEach(([i,o])=>{uu(o,r,i,t)}),r},uu=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Lh(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(Ck(s)){uu(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{uu(o,Lh(t,i),n,r)})})},Lh=(e,t)=>{let n=e;return t.split(Lc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ck=e=>e.isThemeGetter,Pk=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,jk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Yg="!",Ek=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,d=0,f;for(let x=0;x<a.length;x++){let v=a[x];if(c===0){if(v===s&&(r||a.slice(x,x+i)===t)){l.push(a.slice(d,x)),d=x+i;continue}if(v==="/"){f=x;continue}}v==="["?c++:v==="]"&&c--}const u=l.length===0?a:a.substring(d),h=u.startsWith(Yg),p=h?u.substring(1):u,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},Tk=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},Nk=e=>({cache:jk(e.cacheSize),parseClassName:Ek(e),...bk(e)}),Mk=/\s+/,_k=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(Mk);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,g=r(p?u.substring(0,h):u);if(!g){if(!p){a=c+(a.length>0?" "+a:a);continue}if(g=r(u),!g){a=c+(a.length>0?" "+a:a);continue}p=!1}const x=Tk(d).join(":"),v=f?x+Yg:x,y=v+g;if(i.includes(y))continue;i.push(y);const w=s(g,p);for(let b=0;b<w.length;++b){const S=w[b];i.push(v+S)}a=c+(a.length>0?" "+a:a)}return a};function Ak(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Kg(t))&&(r&&(r+=" "),r+=n);return r}const Kg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Kg(e[r]))&&(n&&(n+=" "),n+=t);return n};function Lk(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((d,f)=>f(d),e());return n=Nk(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=_k(l,n);return s(l,d),d}return function(){return i(Ak.apply(null,arguments))}}const ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Xg=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dk=/^\d+\/\d+$/,Rk=new Set(["px","full","screen"]),Vk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fk=/\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$/,Ik=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ok=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mt=e=>Cr(e)||Rk.has(e)||Dk.test(e),Kt=e=>Ur(e,"length",Yk),Cr=e=>!!e&&!Number.isNaN(Number(e)),Ya=e=>Ur(e,"number",Cr),ts=e=>!!e&&Number.isInteger(Number(e)),$k=e=>e.endsWith("%")&&Cr(e.slice(0,-1)),H=e=>Xg.test(e),Xt=e=>Vk.test(e),Bk=new Set(["length","size","percentage"]),Uk=e=>Ur(e,Bk,Qg),Wk=e=>Ur(e,"position",Qg),Hk=new Set(["image","url"]),qk=e=>Ur(e,Hk,Xk),Gk=e=>Ur(e,"",Kk),ns=()=>!0,Ur=(e,t,n)=>{const r=Xg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Yk=e=>Fk.test(e)&&!Ik.test(e),Qg=()=>!1,Kk=e=>zk.test(e),Xk=e=>Ok.test(e),Qk=()=>{const e=ne("colors"),t=ne("spacing"),n=ne("blur"),r=ne("brightness"),s=ne("borderColor"),i=ne("borderRadius"),o=ne("borderSpacing"),a=ne("borderWidth"),l=ne("contrast"),c=ne("grayscale"),d=ne("hueRotate"),f=ne("invert"),u=ne("gap"),h=ne("gradientColorStops"),p=ne("gradientColorStopPositions"),g=ne("inset"),x=ne("margin"),v=ne("opacity"),y=ne("padding"),w=ne("saturate"),b=ne("scale"),S=ne("sepia"),C=ne("skew"),P=ne("space"),j=ne("translate"),D=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",H,t],V=()=>[H,t],U=()=>["",Mt,Kt],R=()=>["auto",Cr,H],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],A=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",H],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Cr,H];return{cacheSize:500,separator:":",theme:{colors:[ns],spacing:[Mt,Kt],blur:["none","",Xt,H],brightness:L(),borderColor:[e],borderRadius:["none","","full",Xt,H],borderSpacing:V(),borderWidth:U(),contrast:L(),grayscale:N(),hueRotate:L(),invert:N(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[$k,Kt],inset:z(),margin:z(),opacity:L(),padding:V(),saturate:L(),scale:L(),sepia:N(),skew:L(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[Xt]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),H]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ts,H]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",ts,H]}],"grid-cols":[{"grid-cols":[ns]}],"col-start-end":[{col:["auto",{span:["full",ts,H]},H]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[ns]}],"row-start-end":[{row:["auto",{span:[ts,H]},H]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[Xt]},Xt]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xt,Kt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ya]}],"font-family":[{font:[ns]}],"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",H]}],"line-clamp":[{"line-clamp":["none",Cr,Ya]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mt,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mt,Kt]}],"underline-offset":[{"underline-offset":["auto",Mt,H]}],"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:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],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",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Wk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qk]}],"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:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[v]}],"border-style":[{border:[...A(),"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":[v]}],"divide-style":[{divide:A()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...A()]}],"outline-offset":[{"outline-offset":[Mt,H]}],"outline-w":[{outline:[Mt,Kt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Mt,Kt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xt,Gk]}],"shadow-color":[{shadow:[ns]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Xt,H]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"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":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",H]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[ts,H]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",H]}],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",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mt,Kt,Ya]}],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"]}}},Zk=Lk(Qk);function Dh(...e){return Zk(wk(e))}function Zg(e){const t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3);return`${t}:${n.toString().padStart(2,"0")}`}function Pr(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 Jk=()=>{var V,U,R,Q,A,q,_,N,F,L;const[e,t]=k.useState(!1),[n,r]=k.useState(!1),[s,i]=k.useState({x:0,y:0}),[o,a]=k.useState(!1),[l,c]=k.useState({x:0,y:0}),{currentUser:d,partnerUser:f,logout:u,theme:h,setTheme:p,setPartnerUser:g}=ae(),[x,v]=k.useState(""),[y,w]=k.useState(!1),[b,S]=k.useState(!1),C=En(),P=[{name:"Dashboard",href:"/",icon:Xe},{name:"Last Listened",href:"/last-listened",icon:vt},{name:"Mixed Playlist",href:"/mixed-playlist",icon:Ug},{name:"Memory Lane",href:"/memory-lane",icon:Yn}],j=()=>{u(),localStorage.removeItem("spotify-user"),localStorage.removeItem("spotify-partner")},D=async()=>{var E,W;if(!(!((E=d==null?void 0:d.user)!=null&&E.id)||!((W=f==null?void 0:f.user)!=null&&W.id))&&confirm(`Are you sure you want to remove ${f.user.display_name} as your partner?`)){S(!0);try{await Pt("/partners/remove",{partnerId:f.user.id})}catch(X){try{await Pt("/partners/clear",{userId:d.user.id})}catch(te){console.error("Failed to remove partner:",X,te)}}finally{g(null),localStorage.removeItem("spotify-partner"),S(!1)}}},T=Vr(h);k.useEffect(()=>{Vr(h)},[h]),k.useEffect(()=>{if(n){const E=Math.min(600,window.innerWidth-40),W=Math.min(window.innerHeight*.9,800),X=(window.innerWidth-E)/2,te=(window.innerHeight-W)/2;i({x:X,y:te})}},[n]),k.useEffect(()=>{const E=X=>{o&&i({x:X.clientX-l.x,y:X.clientY-l.y})},W=()=>{a(!1)};return o&&(document.addEventListener("mousemove",E),document.addEventListener("mouseup",W)),()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",W)}},[o,l]);const z=E=>{a(!0),c({x:E.clientX-s.x,y:E.clientY-s.y})};return m.jsxs(O.nav,{initial:{y:-100,opacity:0},animate:{y:0,opacity:1},className:"sticky top-0 z-50",style:{background:"rgba(0, 0, 0, 0.8)",backdropFilter:"blur(20px)",borderBottom:"1px solid rgba(255, 255, 255, 0.05)"},children:[m.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[m.jsxs("div",{className:"flex justify-between items-center h-16",children:[m.jsxs(zi,{to:"/",className:"flex items-center space-x-2",children:[m.jsx(O.div,{whileHover:{scale:1.1,rotate:5},className:"w-8 h-8 rounded-full flex items-center justify-center",style:{background:`linear-gradient(135deg, ${((V=T.cssVars)==null?void 0:V.primary)||"#1db954"} 0%, ${((U=T.cssVars)==null?void 0:U.secondary)||"#1ed760"} 100%)`},children:m.jsx(Xe,{className:"w-5 h-5 text-white"})}),m.jsx("span",{className:"text-xl font-bold gradient-text",children:"Our Musical Journey"})]}),m.jsx("div",{className:"hidden md:flex items-center space-x-1",children:P.map(E=>{var X,te,G,be;const W=C.pathname===E.href;return m.jsxs(zi,{to:E.href,className:Dh("flex items-center space-x-2 px-4 py-2 rounded-xl transition-all duration-300",W?"text-white":"text-white/60 hover:text-white hover:bg-white/5"),style:W?{background:`linear-gradient(135deg, ${((X=T.cssVars)==null?void 0:X.primary)||"#1db954"}15 0%, ${((te=T.cssVars)==null?void 0:te.secondary)||"#1ed760"}10 100%)`,border:`1px solid ${((G=T.cssVars)==null?void 0:G.primary)||"#1db954"}30`}:{},children:[m.jsx(E.icon,{className:"w-4 h-4",style:{color:W?(be=T.cssVars)==null?void 0:be.primary:void 0}}),m.jsx("span",{className:"font-medium",children:E.name})]},E.name)})}),m.jsxs("div",{className:"hidden md:flex items-center space-x-4",children:[!f&&m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{value:x,onChange:E=>v(E.target.value),placeholder:"Partner Spotify ID",className:"bg-white/10 text-white text-sm px-2 py-1 rounded"}),m.jsx("button",{disabled:y||!x,onClick:async()=>{var E;if(!(!((E=d==null?void 0:d.user)!=null&&E.id)||!x)){w(!0);try{await Pt("/partners/request",{toUid:x})}finally{w(!1)}}},className:`${T.primary} ${T.hover} text-white px-3 py-1 rounded text-sm disabled:opacity-50`,children:y?"Sending...":"Send Request"})]}),f&&m.jsxs(O.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center space-x-2 text-sm text-white/70",children:[m.jsx(Ss,{className:"w-4 h-4"}),m.jsxs("span",{children:["+ ",(R=f.user)==null?void 0:R.display_name]})]}),m.jsxs(O.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>r(!0),className:"flex items-center space-x-2 px-3 py-2 rounded-xl text-white/60 hover:text-white transition-all duration-300",style:{color:(Q=T.cssVars)==null?void 0:Q.primary},onMouseEnter:E=>{E.currentTarget.style.background="rgba(255, 255, 255, 0.05)"},onMouseLeave:E=>{E.currentTarget.style.background="transparent"},children:[m.jsx(Mh,{className:"w-4 h-4"}),m.jsx("span",{className:"hidden lg:block",children:"Settings"})]}),m.jsxs(O.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:j,className:"flex items-center space-x-2 px-3 py-2 rounded-xl text-white/60 hover:text-white transition-all duration-300",onMouseEnter:E=>{E.currentTarget.style.background="rgba(239, 68, 68, 0.1)"},onMouseLeave:E=>{E.currentTarget.style.background="transparent"},children:[m.jsx(Th,{className:"w-4 h-4"}),m.jsx("span",{className:"hidden lg:block",children:"Logout"})]})]}),m.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?m.jsx(_h,{className:"w-6 h-6"}):m.jsx(hk,{className:"w-6 h-6"})})]}),e&&m.jsx(O.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:m.jsxs("div",{className:"space-y-2",children:[P.map(E=>{var X,te,G,be;const W=C.pathname===E.href;return m.jsxs(zi,{to:E.href,onClick:()=>t(!1),className:Dh("flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-300",W?"text-white":"text-white/60 hover:text-white hover:bg-white/5"),style:W?{background:`linear-gradient(135deg, ${((X=T.cssVars)==null?void 0:X.primary)||"#1db954"}15 0%, ${((te=T.cssVars)==null?void 0:te.secondary)||"#1ed760"}10 100%)`,border:`1px solid ${((G=T.cssVars)==null?void 0:G.primary)||"#1db954"}30`}:{},children:[m.jsx(E.icon,{className:"w-5 h-5",style:{color:W?(be=T.cssVars)==null?void 0:be.primary:void 0}}),m.jsx("span",{className:"font-medium",children:E.name})]},E.name)}),m.jsxs("div",{className:"pt-4 border-t border-white/10",children:[f&&m.jsxs("div",{className:"flex items-center space-x-3 px-4 py-2 text-sm text-white/70",children:[m.jsx(Ss,{className:"w-4 h-4"}),m.jsxs("span",{children:["Connected with ",(A=f.user)==null?void 0:A.display_name]})]}),m.jsxs("button",{onClick:()=>{r(!0),t(!1)},className:"w-full flex items-center space-x-3 px-4 py-3 rounded-xl text-white/60 hover:text-white transition-all duration-300",style:{color:(q=T.cssVars)==null?void 0:q.primary},onMouseEnter:E=>{E.currentTarget.style.background="rgba(255, 255, 255, 0.05)"},onMouseLeave:E=>{E.currentTarget.style.background="transparent"},children:[m.jsx(Mh,{className:"w-5 h-5"}),m.jsx("span",{className:"font-medium",children:"Settings"})]}),m.jsxs("button",{onClick:j,className:"w-full flex items-center space-x-3 px-4 py-3 rounded-xl text-white/60 hover:text-white transition-all duration-300",onMouseEnter:E=>{E.currentTarget.style.background="rgba(239, 68, 68, 0.1)"},onMouseLeave:E=>{E.currentTarget.style.background="transparent"},children:[m.jsx(Th,{className:"w-5 h-5"}),m.jsx("span",{className:"font-medium",children:"Logout"})]})]})]})})]}),n&&m.jsxs(m.Fragment,{children:[m.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-md z-40",onClick:()=>r(!1)}),m.jsxs(O.div,{initial:{opacity:0,scale:.8,y:30},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:30},className:"fixed z-50 overflow-hidden",style:{left:s.x,top:s.y,width:Math.min(600,window.innerWidth-40),height:Math.min(window.innerHeight*.9,800),background:"linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(20,20,20,0.95) 50%, rgba(0,0,0,0.9) 100%)",backdropFilter:"blur(24px) saturate(180%)",WebkitBackdropFilter:"blur(24px) saturate(180%)",border:"1px solid rgba(255,255,255,0.2)",borderRadius:"16px",boxShadow:"0 25px 50px rgba(0,0,0,0.5)",cursor:o?"grabbing":"default"},children:[m.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-white/20 cursor-grab active:cursor-grabbing select-none",onMouseDown:z,style:{background:"linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)"},children:[m.jsxs("div",{className:"flex items-center space-x-3",children:[m.jsxs("div",{className:"flex space-x-2",children:[m.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),m.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),m.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"})]}),m.jsx("h2",{className:"text-lg font-semibold text-white",children:"Settings"})]}),m.jsx("button",{onClick:()=>r(!1),className:"text-white/70 hover:text-white hover:bg-white/10 p-2 rounded-lg transition-all duration-200",children:m.jsx(_h,{className:"w-5 h-5"})})]}),m.jsx("div",{className:"overflow-y-auto p-4 sm:p-6",style:{height:"calc(100% - 60px)"},children:m.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[(d==null?void 0:d.user)&&m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-semibold text-white mb-4 drop-shadow-md",children:"Your Account"}),m.jsxs("div",{className:"rounded-xl p-4 border border-white/20 transition-all duration-300 hover:border-white/30 hover:shadow-lg hover:shadow-white/5",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},onMouseEnter:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%)"},onMouseLeave:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)"},children:[m.jsx("div",{className:"text-sm text-white/70 mb-2 font-medium",children:"Spotify ID"}),m.jsx("div",{className:"text-white font-mono text-sm break-all rounded-lg p-3 mb-3",style:{background:"rgba(0,0,0,0.4)",border:"1px solid rgba(255,255,255,0.1)"},children:d.user.id}),m.jsxs("div",{className:"text-sm text-white/80",children:["Display Name: ",m.jsx("span",{className:"text-white font-medium",children:d.user.display_name})]})]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-semibold text-white mb-4 drop-shadow-md",children:"Partner"}),f?m.jsx("div",{className:"rounded-xl p-4 border border-white/20 transition-all duration-300 hover:border-white/30 hover:shadow-lg hover:shadow-white/5",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},onMouseEnter:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%)"},onMouseLeave:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)"},children:m.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between space-y-3 sm:space-y-0",children:[m.jsxs("div",{className:"flex items-center space-x-3 sm:space-x-4",children:[m.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 bg-gradient-to-br from-purple-500 to-pink-500 rounded-full flex items-center justify-center shadow-lg",children:m.jsx(Ss,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white"})}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"text-white font-semibold text-base sm:text-lg truncate",children:(_=f.user)==null?void 0:_.display_name}),m.jsx("div",{className:"text-xs text-white/70 break-all rounded px-2 py-1 mt-1 inline-block",style:{background:"rgba(0,0,0,0.3)",border:"1px solid rgba(255,255,255,0.1)"},children:(N=f.user)==null?void 0:N.id}),m.jsx("div",{className:"text-sm text-green-400 font-medium mt-2",children:"✓ Connected"})]})]}),m.jsxs("button",{onClick:D,disabled:b,className:"flex items-center space-x-2 p-2 sm:p-3 text-red-400 hover:text-red-300 rounded-xl transition-all duration-200 disabled:opacity-50 self-start sm:self-auto",style:{background:"rgba(239, 68, 68, 0.1)"},onMouseEnter:E=>{E.currentTarget.style.background="rgba(239, 68, 68, 0.2)"},onMouseLeave:E=>{E.currentTarget.style.background="rgba(239, 68, 68, 0.1)"},children:[m.jsx(Wg,{className:"w-4 h-4 sm:w-5 sm:h-5"}),m.jsx("span",{className:"text-sm sm:hidden",children:"Remove"})]})]})}):m.jsxs("div",{className:"rounded-xl p-4 border border-white/20 space-y-4 transition-all duration-300 hover:border-white/30 hover:shadow-lg hover:shadow-white/5",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},onMouseEnter:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%)"},onMouseLeave:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)"},children:[m.jsxs("div",{children:[m.jsx("label",{className:"text-sm text-white/70 mb-2 block font-medium",children:"Partner Spotify ID"}),m.jsx("input",{value:x,onChange:E=>v(E.target.value),placeholder:"Enter partner's Spotify ID...",className:"w-full text-white text-sm px-4 py-3 rounded-xl placeholder-white/50 border focus:outline-none transition-all",style:{background:"rgba(0,0,0,0.4)",border:"1px solid rgba(255,255,255,0.2)"},onFocus:E=>{E.target.style.border="1px solid rgba(255,255,255,0.4)"},onBlur:E=>{E.target.style.border="1px solid rgba(255,255,255,0.2)"}})]}),m.jsx("button",{disabled:y||!x,onClick:async()=>{var E;if(!(!((E=d==null?void 0:d.user)!=null&&E.id)||!x)){w(!0);try{await Pt("/partners/request",{toUid:x}),v("")}finally{w(!1)}}},className:"w-full text-white px-4 py-3 rounded-xl text-sm disabled:opacity-50 transition-all duration-200 font-medium",style:{background:`linear-gradient(135deg, ${((F=T.cssVars)==null?void 0:F.primary)||"#1db954"} 0%, ${((L=T.cssVars)==null?void 0:L.secondary)||"#1ed760"} 100%)`},onMouseEnter:E=>{var W;E.currentTarget.style.transform="translateY(-1px)",E.currentTarget.style.boxShadow=`0 8px 25px ${((W=T.cssVars)==null?void 0:W.primary)||"#1db954"}40`},onMouseLeave:E=>{E.currentTarget.style.transform="translateY(0)",E.currentTarget.style.boxShadow="none"},children:y?"Sending...":"Send Partner Request"})]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-semibold text-white mb-4 drop-shadow-md",children:"Color Theme"}),m.jsx("div",{className:"rounded-xl p-4 border border-white/20 transition-all duration-300 hover:border-white/30 hover:shadow-lg hover:shadow-white/5",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},onMouseEnter:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%)"},onMouseLeave:E=>{E.currentTarget.style.background="linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)"},children:m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3",children:[{name:"Green",value:"green",color:"from-green-500 to-emerald-500"},{name:"Pink",value:"pink",color:"from-pink-500 to-rose-500"},{name:"Blue",value:"blue",color:"from-blue-400 to-cyan-400"},{name:"Red",value:"red",color:"from-red-600 to-red-800"},{name:"Purple",value:"purple",color:"from-purple-500 to-violet-600"},{name:"Yellow",value:"yellow",color:"from-yellow-400 to-orange-500"},{name:"Turquoise",value:"turquoise",color:"from-cyan-400 to-blue-500"}].map(E=>{var W,X,te;return m.jsxs("button",{onClick:()=>p(E.value),className:"flex items-center space-x-3 p-3 rounded-xl border transition-all duration-200",style:{border:h===E.value?`2px solid ${((W=T.cssVars)==null?void 0:W.primary)||"#1db954"}`:"1px solid rgba(255,255,255,0.2)",background:h===E.value?`linear-gradient(135deg, ${((X=T.cssVars)==null?void 0:X.primary)||"#1db954"}15 0%, ${((te=T.cssVars)==null?void 0:te.secondary)||"#1ed760"}10 100%)`:"rgba(255,255,255,0.02)"},onMouseEnter:G=>{var be;h!==E.value?(G.currentTarget.style.background="rgba(255,255,255,0.08)",G.currentTarget.style.border="1px solid rgba(255,255,255,0.4)",G.currentTarget.style.transform="translateY(-2px)",G.currentTarget.style.boxShadow="0 4px 12px rgba(0,0,0,0.3)"):(G.currentTarget.style.transform="translateY(-1px)",G.currentTarget.style.boxShadow=`0 6px 20px ${((be=T.cssVars)==null?void 0:be.primary)||"#1db954"}30`)},onMouseLeave:G=>{h!==E.value?(G.currentTarget.style.background="rgba(255,255,255,0.02)",G.currentTarget.style.border="1px solid rgba(255,255,255,0.2)",G.currentTarget.style.transform="translateY(0)",G.currentTarget.style.boxShadow="none"):(G.currentTarget.style.transform="translateY(0)",G.currentTarget.style.boxShadow="none")},children:[m.jsx("div",{className:`w-5 h-5 rounded-full bg-gradient-to-r ${E.color} shadow-sm`}),m.jsx("span",{className:"text-white text-sm font-medium",children:E.name})]},E.value)})})})]})]})})]})]})]})};var Jg={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,s=null,i=function(u,h){return u.abort=h,u},o=function(u,h){var p;if(s!==null){var g=s.defer();u(function(x){g.resolve(x)},function(x){g.reject(x)}),p=g.promise}else window.Promise&&(p=new window.Promise(u));return p?new i(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(g){for(var x in g)g.hasOwnProperty(x)&&(h[x]=g[x])}),h},l=function(u,h){var p="";for(var g in h)if(h.hasOwnProperty(g)){var x=h[g];p+=encodeURIComponent(g)+"="+encodeURIComponent(x)+"&"}return p.length>0&&(p=p.substring(0,p.length-1),u=u+"?"+p),u},c=function(u,h){var p=new XMLHttpRequest,g=function(x,v){function y(C){x&&x(C),h&&h(null,C)}function w(){v&&v(p),h&&h(p,null)}var b=u.type||"GET";if(p.open(b,l(u.url,u.params)),r&&p.setRequestHeader("Authorization","Bearer "+r),p.onreadystatechange=function(){if(p.readyState===4){var C=null;try{C=p.responseText?JSON.parse(p.responseText):""}catch(P){console.error(P)}p.status>=200&&p.status<300?y(C):w()}},b==="GET")p.send(null);else{var S=null;u.postData&&(u.contentType==="image/jpeg"?(S=u.postData,p.setRequestHeader("Content-Type",u.contentType)):(S=JSON.stringify(u.postData),p.setRequestHeader("Content-Type","application/json"))),p.send(S)}};return h?(g(),null):o(g,function(){p.abort()})},d=function(u,h,p,g){var x={},v=null;typeof h=="object"?(x=h,v=p):typeof h=="function"&&(v=h);var y=u.type||"GET";return y!=="GET"&&u.postData&&!g?u.postData=a(u.postData,x):u.params=a(u.params,x),c(u,v)},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 g={url:n+"/me/tracks",type:"PUT",postData:u};return d(g,h,p)},f.prototype.removeFromMySavedTracks=function(u,h,p){var g={url:n+"/me/tracks",type:"DELETE",postData:u};return d(g,h,p)},f.prototype.containsMySavedTracks=function(u,h,p){var g={url:n+"/me/tracks/contains",params:{ids:u.join(",")}};return d(g,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 g={url:n+"/me/albums",type:"PUT",postData:u};return d(g,h,p)},f.prototype.removeFromMySavedAlbums=function(u,h,p){var g={url:n+"/me/albums",type:"DELETE",postData:u};return d(g,h,p)},f.prototype.containsMySavedAlbums=function(u,h,p){var g={url:n+"/me/albums/contains",params:{ids:u.join(",")}};return d(g,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 g={url:n+"/playlists/"+u+"/followers",type:"PUT",postData:{}};return d(g,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 g={url:n+"/playlists/"+u+"/followers/contains",type:"GET",params:{ids:h.join(",")}};return d(g,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 g={url:n+"/users/"+encodeURIComponent(u)};return d(g,h,p)},f.prototype.getUserPlaylists=function(u,h,p){var g;return typeof u=="string"?g={url:n+"/users/"+encodeURIComponent(u)+"/playlists"}:(g={url:n+"/me/playlists"},p=h,h=u),d(g,h,p)},f.prototype.getPlaylist=function(u,h,p){var g={url:n+"/playlists/"+u};return d(g,h,p)},f.prototype.getPlaylistTracks=function(u,h,p){var g={url:n+"/playlists/"+u+"/tracks"};return d(g,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 g={url:n+"/users/"+encodeURIComponent(u)+"/playlists",type:"POST",postData:h};return d(g,h,p)},f.prototype.changePlaylistDetails=function(u,h,p){var g={url:n+"/playlists/"+u,type:"PUT",postData:h};return d(g,h,p)},f.prototype.addTracksToPlaylist=function(u,h,p,g){var x={url:n+"/playlists/"+u+"/tracks",type:"POST",postData:{uris:h}};return d(x,p,g,!0)},f.prototype.replaceTracksInPlaylist=function(u,h,p){var g={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{uris:h}};return d(g,{},p)},f.prototype.reorderTracksInPlaylist=function(u,h,p,g,x){var v={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{range_start:h,insert_before:p}};return d(v,g,x)},f.prototype.removeTracksFromPlaylist=function(u,h,p){var g=h.map(function(v){return typeof v=="string"?{uri:v}:v}),x={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:g}};return d(x,{},p)},f.prototype.removeTracksFromPlaylistWithSnapshotId=function(u,h,p,g){var x=h.map(function(y){return typeof y=="string"?{uri:y}:y}),v={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:x,snapshot_id:p}};return d(v,{},g)},f.prototype.removeTracksFromPlaylistInPositions=function(u,h,p,g){var x={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{positions:h,snapshot_id:p}};return d(x,{},g)},f.prototype.uploadCustomPlaylistCoverImage=function(u,h,p){var g={url:n+"/playlists/"+u+"/images",type:"PUT",postData:h.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return d(g,{},p)},f.prototype.getAlbum=function(u,h,p){var g={url:n+"/albums/"+u};return d(g,h,p)},f.prototype.getAlbumTracks=function(u,h,p){var g={url:n+"/albums/"+u+"/tracks"};return d(g,h,p)},f.prototype.getAlbums=function(u,h,p){var g={url:n+"/albums/",params:{ids:u.join(",")}};return d(g,h,p)},f.prototype.getTrack=function(u,h,p){var g={};return g.url=n+"/tracks/"+u,d(g,h,p)},f.prototype.getTracks=function(u,h,p){var g={url:n+"/tracks/",params:{ids:u.join(",")}};return d(g,h,p)},f.prototype.getArtist=function(u,h,p){var g={url:n+"/artists/"+u};return d(g,h,p)},f.prototype.getArtists=function(u,h,p){var g={url:n+"/artists/",params:{ids:u.join(",")}};return d(g,h,p)},f.prototype.getArtistAlbums=function(u,h,p){var g={url:n+"/artists/"+u+"/albums"};return d(g,h,p)},f.prototype.getArtistTopTracks=function(u,h,p,g){var x={url:n+"/artists/"+u+"/top-tracks",params:{country:h}};return d(x,p,g)},f.prototype.getArtistRelatedArtists=function(u,h,p){var g={url:n+"/artists/"+u+"/related-artists"};return d(g,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 g={url:n+"/browse/categories/"+u};return d(g,h,p)},f.prototype.getCategoryPlaylists=function(u,h,p){var g={url:n+"/browse/categories/"+u+"/playlists"};return d(g,h,p)},f.prototype.search=function(u,h,p,g){var x={url:n+"/search/",params:{q:u,type:h.join(",")}};return d(x,p,g)},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 g=h||{};g.device_ids=u;var x={type:"PUT",url:n+"/me/player",postData:g};return d(x,h,p)},f.prototype.play=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,g={};["context_uri","uris","offset","position_ms"].forEach(function(y){y in u&&(g[y]=u[y])});var x={type:"PUT",url:n+"/me/player/play",params:p,postData:g},v=typeof u=="function"?u:{};return d(x,v,h)},f.prototype.queue=function(u,h,p){h=h||{};var g="device_id"in h?{uri:u,device_id:h.device_id}:{uri:u},x={type:"POST",url:n+"/me/player/queue",params:g};return d(x,h,p)},f.prototype.pause=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,g={type:"PUT",url:n+"/me/player/pause",params:p};return d(g,u,h)},f.prototype.skipToNext=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,g={type:"POST",url:n+"/me/player/next",params:p};return d(g,u,h)},f.prototype.skipToPrevious=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,g={type:"POST",url:n+"/me/player/previous",params:p};return d(g,u,h)},f.prototype.seek=function(u,h,p){h=h||{};var g={position_ms:u};"device_id"in h&&(g.device_id=h.device_id);var x={type:"PUT",url:n+"/me/player/seek",params:g};return d(x,h,p)},f.prototype.setRepeat=function(u,h,p){h=h||{};var g={state:u};"device_id"in h&&(g.device_id=h.device_id);var x={type:"PUT",url:n+"/me/player/repeat",params:g};return d(x,h,p)},f.prototype.setVolume=function(u,h,p){h=h||{};var g={volume_percent:u};"device_id"in h&&(g.device_id=h.device_id);var x={type:"PUT",url:n+"/me/player/volume",params:g};return d(x,h,p)},f.prototype.setShuffle=function(u,h,p){h=h||{};var g={state:u};"device_id"in h&&(g.device_id=h.device_id);var x={type:"PUT",url:n+"/me/player/shuffle",params:g};return d(x,h,p)},f.prototype.getShow=function(u,h,p){var g={};return g.url=n+"/shows/"+u,d(g,h,p)},f.prototype.getShows=function(u,h,p){var g={url:n+"/shows/",params:{ids:u.join(",")}};return d(g,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 g={url:n+"/me/shows",type:"PUT",postData:u};return d(g,h,p)},f.prototype.removeFromMySavedShows=function(u,h,p){var g={url:n+"/me/shows",type:"DELETE",postData:u};return d(g,h,p)},f.prototype.containsMySavedShows=function(u,h,p){var g={url:n+"/me/shows/contains",params:{ids:u.join(",")}};return d(g,h,p)},f.prototype.getShowEpisodes=function(u,h,p){var g={url:n+"/shows/"+u+"/episodes"};return d(g,h,p)},f.prototype.getEpisode=function(u,h,p){var g={};return g.url=n+"/episodes/"+u,d(g,h,p)},f.prototype.getEpisodes=function(u,h,p){var g={url:n+"/episodes/",params:{ids:u.join(",")}};return d(g,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(g){g()});typeof p.then=="function"&&typeof p.catch=="function"&&(h=!0)}catch(g){console.error(g)}if(h)s=u;else throw new Error("Unsupported implementation of Promises/A+")},f}();e.exports=t})(Jg);var e6=Jg.exports;const t6=cu(e6),n6="7cab80d02df44a5bb96725be60a45875",ey="https://159.195.9.107:3443/callback.html";console.log("🔍 Debug - Current redirect URI:",ey);console.log("🔍 Debug - Environment VITE_REDIRECT_URI:","https://159.195.9.107:3443/callback.html");const jo=new t6,r6=()=>{const e=["user-read-private","user-read-email","user-read-recently-played","user-top-read","playlist-read-private","playlist-read-collaborative","playlist-modify-public","playlist-modify-private","user-read-playback-state","user-modify-playback-state","user-read-currently-playing","ugc-image-upload"].join(" "),n=`https://accounts.spotify.com/authorize?${new URLSearchParams({client_id:n6,response_type:"code",redirect_uri:ey,scope:e,show_dialog:"true"}).toString()}`;return console.log("🔍 Debug - Generated Spotify Auth URL:",n),n},s6=async(e,t)=>{jo.setAccessToken(e),await jo.play({uris:[t]})},i6=async e=>{jo.setAccessToken(e),await jo.pause()},o6=()=>{const[e,t]=k.useState(!1),n=()=>{t(!0),window.location.href=r6()},r=[{icon:vt,title:"Last Listened",description:"Discover what your partner is listening to right now and play it instantly"},{icon:Yn,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 m.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 bg-black",children:m.jsxs("div",{className:"max-w-4xl w-full relative",children:[m.jsxs(O.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center mb-12",children:[m.jsx(O.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:m.jsx(Xe,{className:"w-10 h-10 text-white"})}),m.jsxs("h1",{className:"text-5xl md:text-6xl font-bold mb-4",children:[m.jsx("span",{className:"gradient-text",children:"Our Musical"}),m.jsx("br",{}),m.jsx("span",{className:"text-white",children:"Journey"})]}),m.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."})]}),m.jsx(O.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((s,i)=>m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5+i*.1},whileHover:{y:-8,scale:1.03},className:"glass-bubble rounded-3xl p-8 text-center group cursor-pointer",children:[m.jsx(O.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:m.jsx(s.icon,{className:"w-8 h-8 text-white"})}),m.jsx("h3",{className:"text-2xl font-bold text-white mb-3",children:s.title}),m.jsx("p",{className:"text-white/70 text-sm leading-relaxed",children:s.description})]},s.title))}),m.jsxs(O.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:[m.jsxs("div",{className:"text-center mb-8",children:[m.jsx(O.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:m.jsx(Hg,{className:"w-10 h-10 text-white"})}),m.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:"Begin Your Journey"}),m.jsx("p",{className:"text-white/70 text-lg",children:"Connect your Spotify account to start your musical love story"})]}),m.jsx(O.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?m.jsx("div",{className:"w-6 h-6 border-2 border-white border-t-transparent rounded-full animate-spin"}):m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-lg",children:"Connect with Spotify"}),m.jsx(lk,{className:"w-6 h-6"})]})}),m.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"})]}),m.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.6},className:"text-center mt-12",children:m.jsx("p",{className:"text-white/40 text-sm",children:"Made with 💕 for a special someone"})})]})})},a6=()=>{var P,j,D,T,z,V,U,R,Q,A,q,_,N,F,L,E,W,X,te,G,be,ri,Jn,Mn,wt,ta,Dc;const{currentUser:e,partnerUser:t,theme:n}=ae(),r=Vr(n),[s,i]=k.useState([]),[o,a]=k.useState(!1),[l,c]=k.useState(null),[d,f]=k.useState(""),[u,h]=k.useState(!1),[p,g]=k.useState(null),[x,v]=k.useState(null);k.useEffect(()=>{let $;const me=async()=>{var Pe,Te,nt;try{const er=(Pe=e==null?void 0:e.user)==null?void 0:Pe.id;if(er){const na=await se(`/users/${er}/recently-played`),Wr=ae.getState().currentUser;Wr&&ae.getState().setCurrentUser({...Wr,recentlyPlayed:na})}const Rc=(nt=(Te=ae.getState().partnerUser)==null?void 0:Te.user)==null?void 0:nt.id;if(Rc){const na=await se(`/users/${Rc}/recently-played`),Wr=ae.getState().partnerUser;Wr&&ae.getState().setPartnerUser({...Wr,recentlyPlayed:na})}}catch{}$=setTimeout(me,3e4)};return me(),()=>clearTimeout($)},[(P=e==null?void 0:e.user)==null?void 0:P.id,(j=t==null?void 0:t.user)==null?void 0:j.id]),k.useEffect(()=>{(async()=>{var me;if((me=e==null?void 0:e.user)!=null&&me.id){a(!0);try{const Pe=await se(`/partners/requests/${e.user.id}`);i(Pe)}catch{i([])}finally{a(!1)}}})()},[(D=e==null?void 0:e.user)==null?void 0:D.id]),k.useEffect(()=>{let $;const me=async()=>{var Te;if((Te=e==null?void 0:e.user)!=null&&Te.id)try{const nt=await se(`/users/${e.user.id}/status`);c(nt)}catch{}},Pe=()=>{if(!(l!=null&&l.nextSyncAt)){f("");return}const Te=l.nextSyncAt-Date.now();if(Te<=0){f("now");return}const nt=Math.floor(Te/6e4),er=Math.floor(Te%6e4/1e3);f(`${nt}m ${er}s`)};return me(),$=setInterval(()=>{Pe()},1e3),()=>clearInterval($)},[(T=e==null?void 0:e.user)==null?void 0:T.id,l==null?void 0:l.nextSyncAt]),k.useEffect(()=>{let $;const me=async()=>{var Pe,Te;try{const nt=(Pe=e==null?void 0:e.user)==null?void 0:Pe.id;nt&&(g(await se(`/users/${nt}/now-playing`)),(Te=t==null?void 0:t.user)!=null&&Te.id?v(await se(`/users/${t.user.id}/now-playing`)):v(null))}catch{}$=setTimeout(me,8e3)};return me(),()=>clearTimeout($)},[(z=e==null?void 0:e.user)==null?void 0:z.id,(V=t==null?void 0:t.user)==null?void 0:V.id]);const y=async()=>{var $;if(($=e==null?void 0:e.user)!=null&&$.id){h(!0);try{await Pt(`/users/${e.user.id}/sync`);const me=await se(`/users/${e.user.id}/status`);c(me);const[Pe,Te]=await Promise.all([se(`/users/${e.user.id}/recently-played`),se(`/users/${e.user.id}/top-tracks?time_range=short_term`)]),nt=ae.getState().currentUser;nt&&ae.getState().setCurrentUser({...nt,recentlyPlayed:Pe,topTracks:Te.map(er=>er.track)}),he.success("Synced latest data")}catch{he.error("Failed to sync")}finally{h(!1)}}},w=async $=>{await Pt(`/partners/requests/${$}/accept`),i(me=>me.filter(Pe=>Pe.id!==$))},b=async $=>{await Pt(`/partners/requests/${$}/decline`),i(me=>me.filter(Pe=>Pe.id!==$))},S=[{title:"Last Listened",description:"See what your partner is listening to right now",icon:vt,href:"/last-listened",primaryColor:((U=r.cssVars)==null?void 0:U.primary)||"#1db954",secondaryColor:((R=r.cssVars)==null?void 0:R.secondary)||"#1ed760",accentColor:((Q=r.cssVars)==null?void 0:Q.accent)||"#00e676"},{title:"Mixed Playlist",description:"Create AI-powered playlists blending both your tastes",icon:Ug,href:"/mixed-playlist",primaryColor:((A=r.cssVars)==null?void 0:A.secondary)||"#1ed760",secondaryColor:((q=r.cssVars)==null?void 0:q.accent)||"#00e676",accentColor:((_=r.cssVars)==null?void 0:_.primary)||"#1db954"},{title:"Memory Lane",description:"Your shared musical journey and memories",icon:Yn,href:"/memory-lane",primaryColor:((N=r.cssVars)==null?void 0:N.accent)||"#00e676",secondaryColor:((F=r.cssVars)==null?void 0:F.primary)||"#1db954",accentColor:((L=r.cssVars)==null?void 0:L.secondary)||"#1ed760"}],C=()=>{var $;return($=e==null?void 0:e.recentlyPlayed)!=null&&$[0]?Pr(e.recentlyPlayed[0].played_at):null};return m.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[m.jsxs("h1",{className:"text-4xl font-bold text-white mb-2",children:["Welcome back, ",m.jsx("span",{className:"gradient-text",children:(E=e==null?void 0:e.user)==null?void 0:E.display_name})]}),m.jsx("p",{className:"text-white/70 text-lg",children:"Ready to explore your musical connection together?"})]}),m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"grid md:grid-cols-2 gap-6 mb-8",children:[m.jsxs("div",{className:"glass rounded-2xl p-6",children:[m.jsx("div",{className:"text-white/70 mb-2",children:"You"}),p!=null&&p.is_playing&&(p!=null&&p.item)?m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("img",{src:((te=(X=(W=p.item.album)==null?void 0:W.images)==null?void 0:X[0])==null?void 0:te.url)||"/placeholder-album.png",className:"w-14 h-14 rounded"}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("div",{className:"text-white font-semibold truncate",children:p.item.name}),m.jsx("div",{className:"text-white/70 text-sm truncate",children:(G=p.item.artists)==null?void 0:G.map($=>$.name).join(", ")})]})]}):m.jsx("div",{className:"text-white/50",children:"Not playing"})]}),m.jsxs("div",{className:"glass rounded-2xl p-6",children:[m.jsx("div",{className:"text-white/70 mb-2",children:"Partner"}),x!=null&&x.is_playing&&(x!=null&&x.item)?m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("img",{src:((Jn=(ri=(be=x.item.album)==null?void 0:be.images)==null?void 0:ri[0])==null?void 0:Jn.url)||"/placeholder-album.png",className:"w-14 h-14 rounded"}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("div",{className:"text-white font-semibold truncate",children:x.item.name}),m.jsx("div",{className:"text-white/70 text-sm truncate",children:(Mn=x.item.artists)==null?void 0:Mn.map($=>$.name).join(", ")})]})]}):m.jsx("div",{className:"text-white/50",children:"Not playing"})]})]}),m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mb-8",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsx("div",{className:"text-white/70 text-sm",children:(l==null?void 0:l.lastSyncedAt)&&m.jsxs("span",{children:["Last sync: ",new Date(l.lastSyncedAt).toLocaleTimeString()," • Next in: ",d||"—"]})}),m.jsx("button",{onClick:y,disabled:u,className:"bg-white/10 hover:bg-white/20 text-white px-4 py-2 rounded-lg text-sm disabled:opacity-50",children:u?"Refreshing…":"Hard Refresh"})]}),t?m.jsx("div",{className:"glass-bubble rounded-3xl p-8 border border-spotify-green/30 glow",children:m.jsxs("div",{className:"flex items-center space-x-6",children:[m.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:m.jsx(Xe,{className:"w-8 h-8 text-white"})}),m.jsxs("div",{children:[m.jsxs("h3",{className:"text-xl font-semibold text-white",children:["Connected with ",(wt=t.user)==null?void 0:wt.display_name]}),m.jsx("p",{className:"text-white/70",children:"Your musical journey is ready to begin! 💕"})]})]})}):m.jsx("div",{className:"glass-bubble rounded-3xl p-8 border border-orange-500/30",children:m.jsxs("div",{className:"flex items-center space-x-6",children:[m.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:m.jsx(Ac,{className:"w-8 h-8 text-white"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-xl font-semibold text-white",children:"Invite your partner"}),m.jsx("p",{className:"text-white/70 mb-2",children:"Ask your partner to search you in the app and send a request."}),o?m.jsx("div",{className:"text-white/60",children:"Loading requests..."}):s.length>0?m.jsx("div",{className:"space-y-3",children:s.map($=>m.jsxs("div",{className:"flex items-center justify-between bg-white/5 rounded-lg p-3",children:[m.jsxs("div",{className:"text-white/80 text-sm",children:["Request from ",$.from_user_id]}),m.jsxs("div",{className:"space-x-2",children:[m.jsx("button",{onClick:()=>w($.id),className:"bg-spotify-green hover:bg-spotify-green/90 text-white px-3 py-1 rounded-md text-sm",children:"Accept"}),m.jsx("button",{onClick:()=>b($.id),className:"bg-white/10 hover:bg-white/20 text-white px-3 py-1 rounded-md text-sm",children:"Decline"})]})]},$.id))}):m.jsx("div",{className:"text-white/60 text-sm",children:"No incoming requests yet"})]})]})})]}),m.jsxs(O.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:[m.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:m.jsxs("div",{className:"flex items-center space-x-4",children:[m.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:m.jsx(Po,{className:"w-6 h-6 text-blue-400"})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-white/70 text-sm",children:"Your last played"}),m.jsx("p",{className:"text-white font-semibold",children:C()||"No recent plays"})]})]})}),m.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:m.jsxs("div",{className:"flex items-center space-x-4",children:[m.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:m.jsx(gk,{className:"w-6 h-6 text-green-400"})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-white/70 text-sm",children:"Top tracks analyzed"}),m.jsxs("p",{className:"text-white font-semibold",children:[((ta=e==null?void 0:e.topTracks)==null?void 0:ta.length)||0," songs"]})]})]})}),m.jsx("div",{className:"glass-bubble rounded-2xl p-6",children:m.jsxs("div",{className:"flex items-center space-x-4",children:[m.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:m.jsx(Ss,{className:"w-6 h-6 text-purple-400"})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-white/70 text-sm",children:"Recently played"}),m.jsxs("p",{className:"text-white font-semibold",children:[((Dc=e==null?void 0:e.recentlyPlayed)==null?void 0:Dc.length)||0," tracks"]})]})]})})]}),m.jsx(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"grid md:grid-cols-3 gap-6",children:S.map(($,me)=>m.jsx(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4+me*.1},whileHover:{y:-5,scale:1.02},children:m.jsx(zi,{to:$.href,children:m.jsxs("div",{className:`glass rounded-2xl p-6 h-full border ${$.borderColor} group cursor-pointer transition-all duration-300 hover:shadow-xl`,children:[m.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",style:{background:`linear-gradient(135deg, ${$.primaryColor}20 0%, ${$.secondaryColor}10 100%)`,border:`1px solid ${$.primaryColor}30`},children:m.jsx($.icon,{className:"w-6 h-6",style:{color:$.primaryColor}})}),m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:$.title}),m.jsx("p",{className:"text-white/70 text-sm leading-relaxed mb-4",children:$.description}),m.jsx("div",{className:"w-full h-1 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(90deg, ${$.primaryColor} 0%, ${$.secondaryColor} 100%)`}})]})})},$.title))}),(e==null?void 0:e.recentlyPlayed)&&e.recentlyPlayed.length>0&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"mt-8",children:[m.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Your Recent Activity"}),m.jsx("div",{className:"glass rounded-2xl p-6",children:m.jsx("div",{className:"space-y-4",children:e.recentlyPlayed.slice(0,3).map(($,me)=>{var Pe,Te;return m.jsxs(O.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.7+me*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors",children:[m.jsx("img",{src:((Pe=$.track.album.images[0])==null?void 0:Pe.url)||"/placeholder-album.png",alt:$.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h4",{className:"text-white font-medium",children:$.track.name}),m.jsx("p",{className:"text-white/70 text-sm",children:(Te=$.track.artists[0])==null?void 0:Te.name})]}),m.jsx("div",{className:"text-white/50 text-sm",children:Pr($.played_at)})]},$.track.id)})})})]})]})};let ji=!1;const Rh=()=>{const[e]=Ax(),t=Wo(),{setCurrentUser:n,setPartnerUser:r,currentUser:s}=ae(),[i,o]=k.useState("loading"),[a,l]=k.useState("");k.useEffect(()=>{(async()=>{if(ji){console.log("🔍 CallbackPage - Already processing globally, skipping...");return}ji=!0,console.log("🔍 CallbackPage - Global processing flag set to TRUE");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 with backend...");const p=await pb("/auth/exchange",{code:u});l("Syncing your music data..."),await Pt(`/users/${p.uid}/sync`,void 0,p.token),l("Loading your profile...");const[g,x,v]=await Promise.all([se(`/users/${p.uid}`),se(`/users/${p.uid}/recently-played`),se(`/users/${p.uid}/top-tracks?time_range=short_term`)]),y={user:g,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,recentlyPlayed:x,topTracks:v.map(w=>w.track),topArtists:[],jwt:p.token};localStorage.setItem("spotify-user",JSON.stringify(y)),s?(r(y),localStorage.setItem("spotify-partner",JSON.stringify(y)),l("Partner connected! Your musical journey begins...")):(n(y),l("Welcome! Setting up your musical journey...")),o("success"),he.success(s?"Partner connected successfully!":"Successfully connected to Spotify!",{duration:3e3}),setTimeout(()=>{t("/"),setTimeout(()=>{ji=!1,console.log("🔍 CallbackPage - Global processing flag set to FALSE (after success)")},1e3)},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"),he.error("Failed to connect to Spotify. Please try again."),setTimeout(()=>{t("/"),setTimeout(()=>{ji=!1,console.log("🔍 CallbackPage - Global processing flag set to FALSE (after error)")},1e3)},3e3)}})()},[e,t,n,r,s]);const c=()=>{switch(i){case"loading":return m.jsx(fk,{className:"w-12 h-12 text-spotify-green animate-spin"});case"success":return m.jsx(dk,{className:"w-12 h-12 text-green-400"});case"error":return m.jsx(xk,{className:"w-12 h-12 text-red-400"})}},d=()=>{switch(i){case"loading":return"border-spotify-green/30";case"success":return"border-green-400/30";case"error":return"border-red-400/30"}};return m.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 bg-black",children:m.jsxs(O.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:[m.jsx(O.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()}),m.jsxs(O.h2,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-2xl font-bold text-white mb-4",children:[i==="loading"&&"Connecting...",i==="success"&&"Success!",i==="error"&&"Connection Failed"]}),m.jsx(O.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"text-white/70 mb-6",children:a}),i==="loading"&&m.jsx(O.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},className:"w-full bg-white/10 rounded-full h-2 mb-4",children:m.jsx(O.div,{className:"bg-spotify-green h-2 rounded-full",initial:{width:0},animate:{width:"100%"},transition:{duration:3,ease:"easeInOut"}})}),i==="error"&&m.jsx(O.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"}),i==="success"&&m.jsx(O.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..."})]})})},l6=()=>{var g,x,v;const{currentUser:e,partnerUser:t,currentTrack:n,isPlaying:r,setCurrentTrack:s,setIsPlaying:i,theme:o}=ae(),a=Vr(o),[l,c]=k.useState(!1),[d,f]=k.useState(null),u=k.useMemo(()=>{const y=((e==null?void 0:e.recentlyPlayed)||[]).map(P=>({who:"you",played_at:new Date(P.played_at).getTime(),track:P.track,key:`you-${P.track.id}-${P.played_at}`})),w=((t==null?void 0:t.recentlyPlayed)||[]).map(P=>({who:"partner",played_at:new Date(P.played_at).getTime(),track:P.track,key:`partner-${P.track.id}-${P.played_at}`})),b=[...y,...w].sort((P,j)=>j.played_at-P.played_at).slice(0,30),S=new Set,C=new Set;return b.forEach(P=>{const j=P.track.id;S.has(j)?C.add(j):S.add(j)}),{items:b,overlaps:C}},[e==null?void 0:e.recentlyPlayed,t==null?void 0:t.recentlyPlayed]),h=async(y,w)=>{var b,S;if(!(e!=null&&e.accessToken)){he.error("Not authenticated with Spotify");return}try{c(!0),f(w),r&&d===w?(await i6(e.accessToken),i(!1),s(null),f(null)):(await s6(e.accessToken,y),i(!0),s(((S=(b=e.recentlyPlayed)==null?void 0:b.find(C=>C.track.id===w))==null?void 0:S.track)||null)),he.success(r&&d===w?"Paused":"Now playing")}catch(C){console.error("Playback error:",C),he.error("Failed to play track. Make sure Spotify is open on your device.")}finally{c(!1)}},p=({user:y,title:w,isPartner:b=!1})=>{var C,P,j,D,T;if(!((C=y==null?void 0:y.recentlyPlayed)!=null&&C.length))return m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[m.jsx(vt,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No recent activity"}),m.jsxs("p",{className:"text-white/70",children:[b?"Your partner":"You"," haven't played any music recently"]})]});const S=y.recentlyPlayed[0];return m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-6",children:[m.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[m.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center ${b?"bg-gradient-to-br from-pink-500 to-purple-600":"bg-gradient-to-br from-blue-500 to-cyan-600"}`,children:m.jsx(Ss,{className:"w-6 h-6 text-white"})}),m.jsxs("div",{children:[m.jsx("h2",{className:"text-2xl font-bold text-white",children:w}),m.jsxs("p",{className:"text-white/70",children:["Last played: ",Pr(S.played_at)]})]})]}),m.jsx(O.div,{whileHover:{scale:1.02},className:"bg-white/5 rounded-xl p-6 mb-6 border border-white/10",children:m.jsxs("div",{className:"flex items-center space-x-6",children:[m.jsxs("div",{className:"relative",children:[m.jsx("img",{src:((P=S.track.album.images[0])==null?void 0:P.url)||"/placeholder-album.png",alt:S.track.album.name,className:"w-20 h-20 rounded-lg object-cover"}),r&&d===S.track.id&&m.jsx("div",{className:"absolute inset-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${((j=a.cssVars)==null?void 0:j.primary)||"#1db954"}20`},children:m.jsx(yk,{className:"w-6 h-6",style:{color:((D=a.cssVars)==null?void 0:D.primary)||"#1db954"}})})]}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h3",{className:"text-xl font-semibold text-white mb-1",children:S.track.name}),m.jsx("p",{className:"text-white/70 mb-2",children:S.track.artists.map(z=>z.name).join(", ")}),m.jsxs("p",{className:"text-white/50 text-sm",children:[S.track.album.name," • ",Zg(S.track.duration_ms)]})]}),m.jsxs("div",{className:"flex items-center space-x-3",children:[m.jsx("button",{onClick:()=>h(S.track.external_urls.spotify,S.track.id),disabled:l,className:"w-12 h-12 rounded-full flex items-center justify-center transition-all duration-300 text-white disabled:opacity-50",style:{backgroundColor:r&&d===S.track.id?"#ef4444":((T=a.cssVars)==null?void 0:T.primary)||"#1db954"},onMouseEnter:z=>{l||(z.currentTarget.style.opacity="0.9")},onMouseLeave:z=>{l||(z.currentTarget.style.opacity="1")},children:l&&d===S.track.id?m.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):r&&d===S.track.id?m.jsx(pk,{className:"w-5 h-5"}):m.jsx(Nh,{className:"w-5 h-5 ml-0.5"})}),m.jsx("a",{href:S.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:m.jsx(Bg,{className:"w-4 h-4 text-white"})})]})]})}),m.jsxs("div",{children:[m.jsxs("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center space-x-2",children:[m.jsx(Po,{className:"w-5 h-5"}),m.jsx("span",{children:"Recent History"})]}),m.jsx("div",{className:"space-y-3",children:y.recentlyPlayed.slice(0,5).map((z,V)=>{var U,R,Q;return m.jsxs(O.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:V*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors group",children:[m.jsx("img",{src:((U=z.track.album.images[0])==null?void 0:U.url)||"/placeholder-album.png",alt:z.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h4",{className:"text-white font-medium group-hover:text-spotify-green transition-colors",children:z.track.name}),m.jsx("p",{className:"text-white/70 text-sm",children:(R=z.track.artists[0])==null?void 0:R.name})]}),m.jsx("div",{className:"text-white/50 text-sm",children:Pr(z.played_at)}),m.jsx("button",{onClick:()=>h(z.track.external_urls.spotify,z.track.id),disabled:l,className:"opacity-0 group-hover:opacity-100 w-8 h-8 rounded-full flex items-center justify-center transition-all disabled:opacity-50",style:{backgroundColor:((Q=a.cssVars)==null?void 0:Q.primary)||"#1db954"},onMouseEnter:A=>{l||(A.currentTarget.style.opacity="0.9")},onMouseLeave:A=>{l||(A.currentTarget.style.opacity="1")},children:m.jsx(Nh,{className:"w-4 h-4 text-white ml-0.5"})})]},z.track.id)})})]})]})};return m.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[m.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[m.jsx(Xe,{className:"w-10 h-10",style:{color:((g=a.cssVars)==null?void 0:g.primary)||"#1db954"}}),m.jsx("span",{children:"What's Playing"})]}),m.jsx("p",{className:"text-white/70 text-lg",children:"Discover what you and your partner are listening to right now"})]}),m.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[e&&m.jsx(p,{user:e,title:`${(x=e.user)==null?void 0:x.display_name}'s Music`,isPartner:!1}),t&&m.jsx(p,{user:t,title:`${(v=t.user)==null?void 0:v.display_name}'s Music`,isPartner:!0}),!t&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[m.jsx(Xe,{className:"w-16 h-16 mx-auto mb-4 text-pink-400"}),m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Waiting for your partner"}),m.jsx("p",{className:"text-white/70 mb-4",children:"Invite your partner to connect their Spotify account to see their music"}),m.jsx("button",{className:"bg-pink-500 hover:bg-pink-600 text-white px-6 py-3 rounded-lg transition-colors",children:"Send Invitation"})]})]}),e&&t&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 mt-8",children:[m.jsxs("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center space-x-2",children:[m.jsx(Po,{className:"w-5 h-5"}),m.jsx("span",{children:"Shared Timeline"})]}),m.jsx("div",{className:"space-y-3",children:u.items.map(y=>{var w,b,S,C,P;return m.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-white/5",children:[m.jsx("img",{src:((S=(b=(w=y.track.album)==null?void 0:w.images)==null?void 0:b[0])==null?void 0:S.url)||"/placeholder-album.png",alt:((C=y.track.album)==null?void 0:C.name)||"Album",className:"w-10 h-10 rounded"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-white font-medium truncate",children:y.track.name}),u.overlaps.has(y.track.id)&&m.jsx("span",{className:"text-pink-400 text-sm",children:"💕"})]}),m.jsx("div",{className:"text-white/70 text-sm truncate",children:(P=y.track.artists)==null?void 0:P.map(j=>j.name).join(", ")})]}),m.jsxs("div",{className:"text-white/50 text-xs w-32 text-right",children:[Pr(new Date(y.played_at).toISOString()),m.jsx("div",{className:"text-white/60",children:y.who==="you"?"You":"Partner"})]})]},y.key)})})]})]})},u6=({imageUrl:e,alt:t,fallbackGradient:n})=>{const[r,s]=k.useState(null),[i,o]=k.useState(!0),[a,l]=k.useState(!1);return k.useEffect(()=>{e.startsWith("http")?(s(e),o(!1)):(async()=>{try{const d=await fetch(`${Br}${e}`);if(d.ok){const f=await d.json();s(f.dataUrl)}else l(!0)}catch{l(!0)}finally{o(!1)}})()},[e]),i?m.jsx("div",{className:"w-full h-full bg-gradient-to-br from-gray-500 to-gray-600 flex items-center justify-center",children:m.jsx(vt,{className:"w-8 h-8 text-white animate-pulse"})}):a||!r?m.jsx("div",{className:`w-full h-full flex items-center justify-center ${n}`,children:m.jsx(vt,{className:"w-8 h-8 text-white"})}):m.jsx("img",{src:r,alt:t,className:"w-full h-full object-cover",onError:()=>l(!0)})};function Vh(e){var r;const t=(r=e.vibe)==null?void 0:r.toLowerCase(),n=e.genres||[];if(t)switch(t){case"energetic":return"bg-gradient-to-br from-red-500 to-orange-500";case"chill":return"bg-gradient-to-br from-blue-500 to-teal-500";case"romantic":return"bg-gradient-to-br from-pink-500 to-rose-500";case"party":return"bg-gradient-to-br from-purple-500 to-pink-500";case"workout":return"bg-gradient-to-br from-green-500 to-lime-500";case"study":return"bg-gradient-to-br from-indigo-500 to-blue-500";case"sad":return"bg-gradient-to-br from-gray-500 to-slate-500";case"happy":return"bg-gradient-to-br from-yellow-500 to-orange-500"}if(n.length>0)switch(n[0].toLowerCase()){case"pop":return"bg-gradient-to-br from-pink-500 to-purple-500";case"rock":return"bg-gradient-to-br from-red-500 to-black";case"hip-hop":case"rap":return"bg-gradient-to-br from-yellow-500 to-red-500";case"electronic":case"edm":return"bg-gradient-to-br from-cyan-500 to-blue-500";case"jazz":return"bg-gradient-to-br from-amber-500 to-orange-500";case"classical":return"bg-gradient-to-br from-slate-500 to-gray-600";case"country":return"bg-gradient-to-br from-green-600 to-yellow-600";case"r&b":return"bg-gradient-to-br from-purple-600 to-pink-600";case"indie":return"bg-gradient-to-br from-teal-500 to-green-500";case"alternative":return"bg-gradient-to-br from-gray-600 to-purple-600"}return"bg-gradient-to-br from-purple-500 to-pink-500"}const c6=()=>{var V,U,R,Q;const{currentUser:e,partnerUser:t,mixedPlaylists:n,addMixedPlaylist:r,removeMixedPlaylist:s,setMixedPlaylists:i,theme:o}=ae(),a=Vr(o),[l,c]=k.useState(!1),[d,f]=k.useState(!1),[u,h]=k.useState(null),[p,g]=k.useState(""),[x,v]=k.useState(""),[y,w]=k.useState(!0),[b,S]=k.useState(!1),C=x.split(",").map(A=>A.trim()).filter(A=>A.length>0);k.useEffect(()=>{(async()=>{if(e!=null&&e.jwt)try{console.log("Loading playlists from database...");const q=await se("/playlists/mixed",e.jwt);console.log("Loaded playlists:",q.playlists);const _=q.playlists.map(N=>{var L;const F=N.track_uris?JSON.parse(N.track_uris):[];return console.log("Processing playlist:",N.name,"track_uris count:",F.length,"raw track_uris:",((L=N.track_uris)==null?void 0:L.substring(0,100))+"..."),{id:N.id,name:N.name,description:N.description,tracks:[],createdAt:new Date(N.created_at),createdBy:"AI Magic ✨",spotifyId:N.creator_spotify_id,spotifyUrl:N.creator_spotify_url,partnerSpotifyId:N.partner_spotify_id,partnerSpotifyUrl:N.partner_spotify_url,vibe:N.vibe,genres:N.genres?JSON.parse(N.genres):[],trackUris:F,spotifyImageUrl:N.creator_spotify_image_url}});i(_)}catch(q){console.error("Failed to load playlists:",q)}})()},[e==null?void 0:e.jwt]);const P=async()=>{var A,q,_,N,F,L;if(!u||!((A=e==null?void 0:e.user)!=null&&A.id)){he.error("Unable to create playlist");return}if(!(e!=null&&e.jwt)){he.error("Please login again");return}f(!0);try{const E={partnerId:((q=t==null?void 0:t.user)==null?void 0:q.id)||e.user.id,createForBoth:!1,includeKnown:!0,name:u.name,description:u.description},W=await Pt("/playlists/mixed",E,e.jwt);r({...u,spotifyId:(N=(_=W==null?void 0:W.createdFor)==null?void 0:_.creator)==null?void 0:N.playlistId,spotifyUrl:(L=(F=W==null?void 0:W.createdFor)==null?void 0:F.creator)==null?void 0:L.url}),he.success("Playlist created on Spotify!"),h(null)}catch(E){console.error("Spotify playlist creation error:",E),he.error("Failed to create playlist on Spotify")}finally{f(!1)}},j=async()=>{var A,q,_,N;if(!((A=e==null?void 0:e.user)!=null&&A.id)||!((q=t==null?void 0:t.user)!=null&&q.id)){he.error("Missing users");return}if(!(e!=null&&e.jwt)){he.error("Please login again");return}f(!0);try{const F={partnerId:t.user.id,createForBoth:b,includeKnown:y,vibe:p||void 0,genres:C.length?C:void 0,description:(u==null?void 0:u.description)||"An AI-blended mix with fresh recommendations"},L=await Pt("/playlists/mixed",F,e.jwt);b&&L.createdFor.partnerError?he.success("Your playlist created! Partner sync failed: "+L.createdFor.partnerError):b&&L.createdFor.partner?he.success("Enhanced playlist created on both accounts!"):he.success("Enhanced playlist created!");const E={id:L.id,name:L.name,description:F.description,tracks:[],createdAt:new Date,createdBy:"AI Magic ✨",spotifyId:L.createdFor.creator.playlistId,spotifyUrl:L.createdFor.creator.url,partnerSpotifyId:(_=L.createdFor.partner)==null?void 0:_.playlistId,partnerSpotifyUrl:(N=L.createdFor.partner)==null?void 0:N.url,vibe:F.vibe,genres:F.genres||[],trackUris:L.trackUris||[],spotifyImageUrl:L.spotifyImageUrl};r(E),h(null)}catch(F){console.error(F),he.error("Failed to create enhanced playlist")}finally{f(!1)}},D=()=>{u&&(r(u),h(null),he.success("Playlist saved locally!"))},T=({playlist:A,isNew:q=!1})=>{var _;return m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{scale:1.02},className:`glass rounded-2xl p-6 ${q?"border-spotify-green/50":"border-white/10"}`,children:[m.jsxs("div",{className:"flex items-start justify-between mb-4",children:[m.jsxs("div",{className:"flex items-center space-x-4",children:[m.jsxs("div",{className:`w-16 h-16 rounded-xl flex items-center justify-center overflow-hidden ${q?"bg-gradient-to-br from-spotify-green to-green-600":"bg-gradient-to-br from-purple-500 to-pink-500"}`,children:[q?m.jsx(Yn,{className:"w-8 h-8 text-white"}):A.spotifyImageUrl?m.jsx(u6,{imageUrl:A.spotifyImageUrl,alt:A.name,fallbackGradient:Vh(A)}):null,!q&&m.jsx("div",{className:`w-full h-full flex items-center justify-center ${A.spotifyImageUrl?"bg-gradient-to-br from-purple-500 to-pink-500":Vh(A)}`,style:{display:A.spotifyImageUrl?"none":"flex"},children:m.jsx(vt,{className:"w-8 h-8 text-white"})})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-xl font-semibold text-white",children:A.name}),m.jsx("p",{className:"text-white/70 text-sm",children:A.description}),m.jsxs("div",{className:"flex flex-wrap gap-1 mt-1 mb-1",children:[A.vibe&&m.jsx("span",{className:"px-2 py-0.5 bg-blue-500/20 text-blue-300 text-xs rounded-full",children:A.vibe}),A.genres&&A.genres.length>0&&A.genres.slice(0,2).map((N,F)=>m.jsx("span",{className:"px-2 py-0.5 bg-green-500/20 text-green-300 text-xs rounded-full",children:N},F))]}),m.jsxs("p",{className:"text-white/50 text-xs",children:["Created ",q?"just now":new Date(A.createdAt).toLocaleDateString()," • ",A.tracks.length||((_=A.trackUris)==null?void 0:_.length)||0," tracks"]})]})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[A.spotifyUrl&&m.jsx("a",{href:A.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",title:"Open in Spotify",children:m.jsx(Bg,{className:"w-4 h-4 text-white"})}),A.partnerSpotifyUrl&&m.jsx("a",{href:A.partnerSpotifyUrl,target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full bg-pink-500/20 hover:bg-pink-500/30 flex items-center justify-center transition-colors",title:"Partner's playlist in Spotify",children:m.jsx(Xe,{className:"w-4 h-4 text-pink-400"})}),!q&&m.jsx("button",{onClick:async()=>{try{e!=null&&e.jwt&&await mb(`/playlists/mixed/${A.id}`,e.jwt),s(A.id),he.success("Playlist deleted successfully")}catch(N){console.error("Failed to delete playlist:",N),he.error("Failed to delete playlist")}},className:"w-8 h-8 rounded-full bg-red-500/20 hover:bg-red-500/30 flex items-center justify-center transition-colors",children:m.jsx(Wg,{className:"w-4 h-4 text-red-400"})})]})]}),m.jsx("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:A.tracks.length>0?m.jsxs(m.Fragment,{children:[A.tracks.slice(0,5).map((N,F)=>{var L,E,W,X,te,G;return m.jsxs(O.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:F*.1},className:"flex items-center space-x-3 p-2 rounded-lg hover:bg-white/5 transition-colors",children:[m.jsx("img",{src:((W=(E=(L=N.album)==null?void 0:L.images)==null?void 0:E[0])==null?void 0:W.url)||"/placeholder-album.png",alt:((X=N.album)==null?void 0:X.name)||"Unknown Album",className:"w-10 h-10 rounded-lg object-cover"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("h4",{className:"text-white font-medium truncate",children:N.name}),m.jsx("p",{className:"text-white/70 text-sm truncate",children:((G=(te=N.artists)==null?void 0:te[0])==null?void 0:G.name)||"Unknown Artist"})]}),m.jsx("div",{className:"text-white/50 text-sm",children:Zg(N.duration_ms)})]},N.id)}),A.tracks.length>5&&m.jsxs("div",{className:"text-center text-white/50 text-sm py-2",children:["+",A.tracks.length-5," more tracks"]})]}):A.trackUris&&A.trackUris.length>0?m.jsx("div",{className:"text-center py-4"}):m.jsx("div",{className:"text-center text-white/50 text-sm py-4",children:"No tracks available"})}),q&&m.jsxs("div",{className:"flex items-center space-x-3 mt-6 pt-4 border-t border-white/10",children:[m.jsx("button",{onClick:P,disabled:d||b,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:d?m.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):m.jsxs(m.Fragment,{children:[m.jsx(Ac,{className:"w-4 h-4"}),m.jsx("span",{children:b?"Disabled (using Create for both)":"Create on Spotify"})]})}),m.jsx("button",{onClick:D,className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Save Locally"})]})]})},z=(e==null?void 0:e.topTracks)&&(t==null?void 0:t.topTracks);return m.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[m.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[m.jsx(Yn,{className:"w-10 h-10",style:{color:((V=a.cssVars)==null?void 0:V.primary)||"#1db954"}}),m.jsx("span",{children:"Mixed Playlists"})]}),m.jsx("p",{className:"text-white/70 text-lg",children:"AI-powered playlists that perfectly blend your musical tastes together"})]}),z&&m.jsx(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mb-8",children:m.jsxs("div",{className:"glass rounded-2xl p-8 text-center",style:{borderColor:`${((U=a.cssVars)==null?void 0:U.primary)||"#1db954"}30`},children:[m.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full flex items-center justify-center",style:{background:`linear-gradient(135deg, ${((R=a.cssVars)==null?void 0:R.primary)||"#1db954"} 0%, ${((Q=a.cssVars)==null?void 0:Q.secondary)||"#1ed760"} 100%)`},children:m.jsx(vk,{className:"w-8 h-8 text-white"})}),m.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Create Your Perfect Mix"}),m.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"}),m.jsxs("div",{className:"mt-4 text-white/50 text-sm",children:["Analyzing ",e.topTracks.length+t.topTracks.length," tracks from both users"]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-left mt-8",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-white/80 text-sm mb-1",children:"Vibe"}),m.jsxs("select",{className:"w-full bg-white/10 text-white rounded-lg p-2 appearance-none focus:outline-none focus:ring-2 focus:ring-spotify-green",value:p,onChange:A=>g(A.target.value),children:[m.jsx("option",{value:"",children:"Auto"}),m.jsx("option",{value:"energetic",children:"Energetic"}),m.jsx("option",{value:"chill",children:"Chill"}),m.jsx("option",{value:"happy",children:"Happy"}),m.jsx("option",{value:"sad",children:"Sad"}),m.jsx("option",{value:"party",children:"Party"}),m.jsx("option",{value:"focus",children:"Focus"})]})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-white/80 text-sm mb-1",children:"Genres (comma-separated)"}),m.jsx("input",{className:"w-full bg-white/10 text-white rounded-lg p-2 placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-spotify-green",placeholder:"pop, rock, edm",value:x,onChange:A=>v(A.target.value)})]}),m.jsxs("label",{className:"flex items-center space-x-2 text-white/80",children:[m.jsx("input",{type:"checkbox",checked:y,onChange:A=>w(A.target.checked)}),m.jsx("span",{children:"Include songs we already know"})]}),m.jsxs("label",{className:"flex items-center space-x-2 text-white/80",children:[m.jsx("input",{type:"checkbox",checked:b,onChange:A=>S(A.target.checked)}),m.jsx("span",{children:"Create playlist on both accounts"}),b&&m.jsx("span",{className:"text-xs text-pink-400 ml-2",children:"✨ Synced"})]})]}),m.jsx("div",{className:"flex items-center justify-center gap-3 mt-6",children:m.jsx("button",{onClick:j,disabled:d,className:"bg-white/10 hover:bg-white/20 text-white font-semibold py-3 px-4 rounded-lg transition-colors disabled:opacity-50",children:"Create Enhanced Playlist"})})]})}),u&&m.jsxs(O.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"mb-8",children:[m.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"✨ Your New Playlist"}),m.jsx(T,{playlist:u,isNew:!0})]}),n.length>0&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[m.jsx("h2",{className:"text-2xl font-bold text-white mb-4",children:"Your Mixed Playlists"}),m.jsx("div",{className:"grid gap-6",children:n.map(A=>m.jsx(T,{playlist:A},A.id))})]}),!z&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[m.jsx(Xe,{className:"w-16 h-16 mx-auto mb-4 text-pink-400"}),m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:t?"Loading music data":"Waiting for your partner"}),m.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&&z&&!u&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[m.jsx(vt,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No playlists yet"}),m.jsx("p",{className:"text-white/70",children:"Create your first mixed playlist to start your musical journey together"})]})]})},d6=()=>{const{currentUser:e,partnerUser:t,memoryLane:n,addMemoryLaneItem:r}=ae(),[s,i]=k.useState(!1),[o,a]=k.useState({title:"",description:"",type:"milestone"});k.useEffect(()=>{var u,h,p,g,x,v,y,w,b,S,C,P;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)||"",((g=t.user)==null?void 0:g.id)||""]},{id:"2",type:"shared_track",title:"Shared Love for This Song",description:`Both of you have been listening to "${((v=(x=e.recentlyPlayed)==null?void 0:x[0])==null?void 0:v.track.name)||"Your favorite track"}" recently`,track:(w=(y=e.recentlyPlayed)==null?void 0:y[0])==null?void 0:w.track,date:new Date(Date.now()-2592e5),users:[((b=e.user)==null?void 0:b.id)||"",((S=t.user)==null?void 0:S.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:[((C=e.user)==null?void 0:C.id)||"",((P=t.user)==null?void 0:P.id)||""]}].forEach(D=>{r(D)})},[e,t,n.length,r]);const l=()=>{var h,p;if(!o.title.trim()||!o.description.trim()){he.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"}),i(!1),he.success("Memory added to your journey!")},c=u=>{switch(u){case"shared_track":return m.jsx(vt,{className:"w-5 h-5"});case"playlist_created":return m.jsx(Yn,{className:"w-5 h-5"});case"milestone":return m.jsx(mk,{className:"w-5 h-5"});default:return m.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,g;return m.jsxs(O.div,{initial:{opacity:0,x:-50},animate:{opacity:1,x:0},transition:{delay:h*.1},className:"relative",children:[h<n.length-1&&m.jsx("div",{className:"absolute left-8 top-16 w-0.5 h-full bg-gradient-to-b from-white/20 to-transparent"}),m.jsxs("div",{className:"flex items-start space-x-6",children:[m.jsx("div",{className:`w-16 h-16 rounded-full bg-gradient-to-br ${d(u.type)} flex items-center justify-center relative z-10`,children:c(u.type)}),m.jsxs(O.div,{whileHover:{scale:1.02},className:"glass rounded-2xl p-6 flex-1 border border-white/10",children:[m.jsxs("div",{className:"flex items-start justify-between mb-4",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:u.title}),m.jsx("p",{className:"text-white/70 leading-relaxed",children:u.description})]}),m.jsxs("div",{className:"flex items-center space-x-2 text-white/50 text-sm",children:[m.jsx(uk,{className:"w-4 h-4"}),m.jsx("span",{children:Pr(u.date)})]})]}),u.track&&m.jsxs("div",{className:"flex items-center space-x-4 p-4 bg-white/5 rounded-lg",children:[m.jsx("img",{src:((p=u.track.album.images[0])==null?void 0:p.url)||"/placeholder-album.png",alt:u.track.album.name,className:"w-12 h-12 rounded-lg object-cover"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h4",{className:"text-white font-medium",children:u.track.name}),m.jsx("p",{className:"text-white/70 text-sm",children:(g=u.track.artists[0])==null?void 0:g.name})]}),m.jsx("button",{className:"w-8 h-8 rounded-full bg-spotify-green hover:bg-spotify-green/90 flex items-center justify-center transition-colors",children:m.jsx(vt,{className:"w-4 h-4 text-white"})})]}),m.jsxs("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-white/10",children:[m.jsxs("div",{className:"flex items-center space-x-4 text-white/50 text-sm",children:[m.jsxs("div",{className:"flex items-center space-x-1",children:[m.jsx(Hg,{className:"w-4 h-4"}),m.jsx("span",{children:"Both of you"})]}),m.jsxs("div",{className:"flex items-center space-x-1",children:[m.jsx(Po,{className:"w-4 h-4"}),m.jsx("span",{children:new Date(u.date).toLocaleDateString()})]})]}),m.jsx("button",{className:"w-8 h-8 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:m.jsx(Xe,{className:"w-4 h-4 text-white"})})]})]})]})]})};return m.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[m.jsx(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsxs("h1",{className:"text-4xl font-bold text-white mb-2 flex items-center space-x-3",children:[m.jsx(Xe,{className:"w-10 h-10 text-pink-400"}),m.jsx("span",{children:"Memory Lane"})]}),m.jsx("p",{className:"text-white/70 text-lg",children:"Your beautiful musical journey together"})]}),m.jsxs(O.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>i(!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:[m.jsx(Ac,{className:"w-5 h-5"}),m.jsx("span",{children:"Add Memory"})]})]})}),s&&m.jsx(O.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:()=>i(!1),children:m.jsxs(O.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:[m.jsx("h3",{className:"text-2xl font-bold text-white mb-6",children:"Add a New Memory"}),m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Title"}),m.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?"})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Description"}),m.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..."})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-white/70 text-sm font-medium mb-2",children:"Type"}),m.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:[m.jsx("option",{value:"milestone",children:"Milestone"}),m.jsx("option",{value:"shared_track",children:"Shared Track"}),m.jsx("option",{value:"playlist_created",children:"Playlist Created"})]})]})]}),m.jsxs("div",{className:"flex items-center space-x-3 mt-6",children:[m.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"}),m.jsx("button",{onClick:()=>i(!1),className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Cancel"})]})]})}),m.jsx("div",{className:"space-y-8",children:n.length>0?n.map((u,h)=>m.jsx(f,{memory:u,index:h},u.id)):m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[m.jsx(ck,{className:"w-16 h-16 mx-auto mb-4 text-white/30"}),m.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No memories yet"}),m.jsx("p",{className:"text-white/70 mb-6",children:"Start creating beautiful musical memories together"}),m.jsx("button",{onClick:()=>i(!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&&m.jsxs(O.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:[m.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[m.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:m.jsx(Xe,{className:"w-6 h-6 text-white"})}),m.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.length}),m.jsx("p",{className:"text-white/70 text-sm",children:"Memories Created"})]}),m.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[m.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:m.jsx(vt,{className:"w-6 h-6 text-white"})}),m.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.filter(u=>u.type==="shared_track").length}),m.jsx("p",{className:"text-white/70 text-sm",children:"Shared Tracks"})]}),m.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[m.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:m.jsx(Yn,{className:"w-6 h-6 text-white"})}),m.jsx("h4",{className:"text-2xl font-bold text-white mb-1",children:n.filter(u=>u.type==="playlist_created").length}),m.jsx("p",{className:"text-white/70 text-sm",children:"Playlists Created"})]})]})]})};function f6(e,t){if(!e||!t)return 0;const n=["energy","valence"];let r=0,s=0;for(const i of n)typeof e[i]=="number"&&typeof t[i]=="number"&&(r+=1-Math.min(1,Math.abs(e[i]-t[i])),s++);return s?Math.round(r/s*100):0}const h6=()=>{var u,h;const{currentUser:e,partnerUser:t}=ae(),[n,r]=k.useState(null),[s,i]=k.useState(null),[o,a]=k.useState(null),[l,c]=k.useState(null);k.useEffect(()=>{let p;const g=async()=>{var x,v,y,w;try{const b=(x=e==null?void 0:e.user)==null?void 0:x.id;if(b){const C=await se(`/users/${b}/now-playing`);r(C);const P=(v=C==null?void 0:C.item)==null?void 0:v.id;if(P){const j=await se(`/users/${b}/audio-features?ids=${P}`);a(((j==null?void 0:j.audio_features)||[])[0]||null)}}const S=(y=t==null?void 0:t.user)==null?void 0:y.id;if(S){const C=await se(`/users/${S}/now-playing`);i(C);const P=(w=C==null?void 0:C.item)==null?void 0:w.id;if(P){const j=await se(`/users/${S}/audio-features?ids=${P}`);c(((j==null?void 0:j.audio_features)||[])[0]||null)}}}catch{}p=setTimeout(g,8e3)};return g(),()=>clearTimeout(p)},[(u=e==null?void 0:e.user)==null?void 0:u.id,(h=t==null?void 0:t.user)==null?void 0:h.id]);const d=k.useMemo(()=>f6(o,l),[o,l]),f=({data:p,who:g})=>{var v,y,w;if(!(p!=null&&p.is_playing)||!(p!=null&&p.item))return m.jsxs("div",{className:"glass rounded-2xl p-6 text-white/70",children:[g," is not playing"]});const x=p.item;return m.jsxs("div",{className:"glass rounded-2xl p-6 flex items-center gap-4",children:[m.jsx("img",{src:((w=(y=(v=x==null?void 0:x.album)==null?void 0:v.images)==null?void 0:y[0])==null?void 0:w.url)||"/placeholder-album.png",alt:x==null?void 0:x.name,className:"w-16 h-16 rounded"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"text-white font-semibold truncate",children:x==null?void 0:x.name}),m.jsx("div",{className:"text-white/70 text-sm truncate",children:((x==null?void 0:x.artists)||[]).map(b=>b.name).join(", ")})]}),m.jsx("div",{className:"flex gap-1",children:[...Array(12)].map((b,S)=>m.jsx("div",{className:"w-1 bg-spotify-green/60 animate-pulse",style:{height:`${(Math.sin(S)*.5+.5)*32+8}px`,animationDelay:`${S*50}ms`}},S))})]})};return m.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-6",children:[m.jsx("h1",{className:"text-3xl font-bold text-white",children:"Live Dashboard"}),m.jsx("p",{className:"text-white/70",children:"See what you are both playing right now"})]}),m.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[m.jsx(f,{data:n,who:"You"}),m.jsx(f,{data:s,who:"Partner"})]}),(n==null?void 0:n.is_playing)&&(s==null?void 0:s.is_playing)&&m.jsxs(O.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-6 mt-6 text-center",children:[m.jsx("div",{className:"text-white/80",children:"Harmony Match"}),m.jsxs("div",{className:"text-4xl font-extrabold text-white mt-1",children:[d,"%"]})]})]})};function p6(){var o,a;const{currentUser:e,partnerUser:t,isLoading:n,theme:r}=ae(),s=En();console.log("🔍 App - Current location:",s.pathname),k.useEffect(()=>{Vr(r)},[r]),k.useEffect(()=>{const l=localStorage.getItem("spotify-user"),c=localStorage.getItem("spotify-partner");if(l)try{const d=JSON.parse(l);ae.getState().setCurrentUser(d)}catch(d){console.error("Failed to parse stored user data:",d),localStorage.removeItem("spotify-user")}if(c)try{const d=JSON.parse(c);ae.getState().setPartnerUser(d)}catch(d){console.error("Failed to parse stored partner data:",d),localStorage.removeItem("spotify-partner")}},[]),k.useEffect(()=>{(async()=>{var d,f;const c=(f=(d=ae.getState().currentUser)==null?void 0:d.user)==null?void 0:f.id;if(c&&!ae.getState().partnerUser)try{const u=await se(`/partners/partner/${c}`);if(u.partnerId){const[h,p,g]=await Promise.all([se(`/users/${u.partnerId}`),se(`/users/${u.partnerId}/recently-played`),se(`/users/${u.partnerId}/top-tracks?time_range=short_term`)]);ae.getState().setPartnerUser({user:h,accessToken:null,refreshToken:null,isAuthenticated:!0,recentlyPlayed:p,topTracks:g.map(x=>x.track),topArtists:[]})}}catch{}})()},[(o=e==null?void 0:e.user)==null?void 0:o.id]),k.useEffect(()=>{var d,f;const l=(f=(d=ae.getState().currentUser)==null?void 0:d.user)==null?void 0:f.id;if(!l)return;const c=hb(`/partners/events/${l}`);return c.onmessage=async u=>{var h,p;if(u.data)try{const g=JSON.parse(u.data);if((g==null?void 0:g.type)==="partner:connected"||(g==null?void 0:g.type)==="partner:disconnected"){const x=await se(`/partners/partner/${l}`),v=((p=(h=ae.getState().partnerUser)==null?void 0:h.user)==null?void 0:p.id)||null;if(!(x!=null&&x.partnerId)&&v){ae.getState().setPartnerUser(null),localStorage.removeItem("spotify-partner");return}if(x!=null&&x.partnerId&&x.partnerId!==v)try{const[y,w,b]=await Promise.all([se(`/users/${x.partnerId}`),se(`/users/${x.partnerId}/recently-played`),se(`/users/${x.partnerId}/top-tracks?time_range=short_term`)]);ae.getState().setPartnerUser({user:y,accessToken:null,refreshToken:null,isAuthenticated:!0,recentlyPlayed:w,topTracks:b.map(S=>S.track),topArtists:[]})}catch{}}(g==null?void 0:g.type)==="partner:request"||(g==null||g.type)}catch{}},c.onerror=()=>{try{c.close()}catch{}},()=>{try{c.close()}catch{}}},[(a=e==null?void 0:e.user)==null?void 0:a.id]);const i=(e==null?void 0:e.isAuthenticated)||!1;return n?m.jsxs("div",{className:"min-h-screen flex items-center justify-center relative",children:[m.jsx(Eh,{hueShift:ah(r)}),m.jsxs(O.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-20",children:[m.jsx("div",{className:"w-16 h-16 border-4 border-t-transparent rounded-full animate-spin",style:{borderColor:"var(--theme-primary) var(--theme-primary) var(--theme-primary) transparent"}}),m.jsx("p",{className:"text-white font-medium text-lg",children:"Loading your musical journey..."})]})]}):m.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[m.jsx(Eh,{hueShift:ah(r)}),m.jsxs("div",{className:"relative z-20",children:[i&&m.jsx(Jk,{}),m.jsxs(wx,{children:[m.jsx(_t,{path:"/",element:i?m.jsx(a6,{}):m.jsx(o6,{})}),m.jsx(_t,{path:"/callback",element:m.jsx(Rh,{})}),m.jsx(_t,{path:"/callback.html",element:m.jsx(Rh,{})}),i&&m.jsxs(m.Fragment,{children:[m.jsx(_t,{path:"/last-listened",element:m.jsx(l6,{})}),m.jsx(_t,{path:"/mixed-playlist",element:m.jsx(c6,{})}),m.jsx(_t,{path:"/memory-lane",element:m.jsx(d6,{})}),m.jsx(_t,{path:"/live",element:m.jsx(h6,{})})]}),m.jsx(_t,{path:"*",element:m.jsx(vx,{to:"/",replace:!0})})]})]})]})}Ka.createRoot(document.getElementById("root")).render(m.jsx(Gs.StrictMode,{children:m.jsxs(Tx,{children:[m.jsx(p6,{}),m.jsx(w2,{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"}}})]})}));