474 lines
453 KiB
JavaScript
474 lines
453 KiB
JavaScript
function ey(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 uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vh={exports:{}},jo={},Fh={exports:{}},q={};/**
|
|
* @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 Hs=Symbol.for("react.element"),ty=Symbol.for("react.portal"),ny=Symbol.for("react.fragment"),ry=Symbol.for("react.strict_mode"),sy=Symbol.for("react.profiler"),iy=Symbol.for("react.provider"),oy=Symbol.for("react.context"),ay=Symbol.for("react.forward_ref"),ly=Symbol.for("react.suspense"),uy=Symbol.for("react.memo"),cy=Symbol.for("react.lazy"),Vc=Symbol.iterator;function dy(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(){}},Ih=Object.assign,Oh={};function Fr(e,t,n){this.props=e,this.context=t,this.refs=Oh,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 $h(){}$h.prototype=Fr.prototype;function cu(e,t,n){this.props=e,this.context=t,this.refs=Oh,this.updater=n||zh}var du=cu.prototype=new $h;du.constructor=cu;Ih(du,Fr.prototype);du.isPureReactComponent=!0;var Fc=Array.isArray,Bh=Object.prototype.hasOwnProperty,fu={current:null},Uh={key:!0,ref:!0,__self:!0,__source:!0};function Wh(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)Bh.call(t,r)&&!Uh.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:Hs,type:e,key:i,ref:o,props:s,_owner:fu.current}}function fy(e,t){return{$$typeof:Hs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hs}function hy(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zc=/\/+/g;function na(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hy(""+e.key):t.toString(36)}function ji(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 Hs:case ty:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+na(o,0):r,Fc(s)?(n="",e!=null&&(n=e.replace(zc,"$&/")+"/"),ji(s,t,n,"",function(c){return c})):s!=null&&(hu(s)&&(s=fy(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(zc,"$&/")+"/")+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+na(i,a);o+=ji(i,t,n,l,s)}else if(l=dy(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+na(i,a++),o+=ji(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 ri(e,t,n){if(e==null)return e;var r=[],s=0;return ji(e,r,"","",function(i){return t.call(n,i,s++)}),r}function py(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},Ei={transition:null},my={ReactCurrentDispatcher:Oe,ReactCurrentBatchConfig:Ei,ReactCurrentOwner:fu};function Hh(){throw Error("act(...) is not supported in production builds of React.")}q.Children={map:ri,forEach:function(e,t,n){ri(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ri(e,function(){t++}),t},toArray:function(e){return ri(e,function(t){return t})||[]},only:function(e){if(!hu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};q.Component=Fr;q.Fragment=ny;q.Profiler=sy;q.PureComponent=cu;q.StrictMode=ry;q.Suspense=ly;q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=my;q.act=Hh;q.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=Ih({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=fu.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Bh.call(t,l)&&!Uh.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:Hs,type:e.type,key:s,ref:i,props:r,_owner:o}};q.createContext=function(e){return e={$$typeof:oy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:iy,_context:e},e.Consumer=e};q.createElement=Wh;q.createFactory=function(e){var t=Wh.bind(null,e);return t.type=e,t};q.createRef=function(){return{current:null}};q.forwardRef=function(e){return{$$typeof:ay,render:e}};q.isValidElement=hu;q.lazy=function(e){return{$$typeof:cy,_payload:{_status:-1,_result:e},_init:py}};q.memo=function(e,t){return{$$typeof:uy,type:e,compare:t===void 0?null:t}};q.startTransition=function(e){var t=Ei.transition;Ei.transition={};try{e()}finally{Ei.transition=t}};q.unstable_act=Hh;q.useCallback=function(e,t){return Oe.current.useCallback(e,t)};q.useContext=function(e){return Oe.current.useContext(e)};q.useDebugValue=function(){};q.useDeferredValue=function(e){return Oe.current.useDeferredValue(e)};q.useEffect=function(e,t){return Oe.current.useEffect(e,t)};q.useId=function(){return Oe.current.useId()};q.useImperativeHandle=function(e,t,n){return Oe.current.useImperativeHandle(e,t,n)};q.useInsertionEffect=function(e,t){return Oe.current.useInsertionEffect(e,t)};q.useLayoutEffect=function(e,t){return Oe.current.useLayoutEffect(e,t)};q.useMemo=function(e,t){return Oe.current.useMemo(e,t)};q.useReducer=function(e,t,n){return Oe.current.useReducer(e,t,n)};q.useRef=function(e){return Oe.current.useRef(e)};q.useState=function(e){return Oe.current.useState(e)};q.useSyncExternalStore=function(e,t,n){return Oe.current.useSyncExternalStore(e,t,n)};q.useTransition=function(){return Oe.current.useTransition()};q.version="18.3.1";Fh.exports=q;var k=Fh.exports;const qs=uu(k),gy=ey({__proto__:null,default:qs},[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 yy=k,vy=Symbol.for("react.element"),xy=Symbol.for("react.fragment"),wy=Object.prototype.hasOwnProperty,by=yy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sy={key:!0,ref:!0,__self:!0,__source:!0};function qh(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)wy.call(t,r)&&!Sy.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:vy,type:e,key:i,ref:o,props:s,_owner:by.current}}jo.Fragment=xy;jo.jsx=qh;jo.jsxs=qh;Vh.exports=jo;var m=Vh.exports,Ya={},Gh={exports:{}},Je={},Yh={exports:{}},Kh={};/**
|
|
* @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(M,D){var z=M.length;M.push(D);e:for(;0<z;){var R=z-1>>>1,E=M[R];if(0<s(E,D))M[R]=D,M[z]=E,z=R;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var D=M[0],z=M.pop();if(z!==D){M[0]=z;e:for(var R=0,E=M.length,Y=E>>>1;R<Y;){var Q=2*(R+1)-1,ce=M[Q],G=Q+1,we=M[G];if(0>s(ce,z))G<E&&0>s(we,ce)?(M[R]=we,M[G]=z,R=G):(M[R]=ce,M[Q]=z,R=Q);else if(G<E&&0>s(we,z))M[R]=we,M[G]=z,R=G;else break e}}return D}function s(M,D){var z=M.sortIndex-D.sortIndex;return z!==0?z:M.id-D.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,w=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 x(M){for(var D=n(c);D!==null;){if(D.callback===null)r(c);else if(D.startTime<=M)r(c),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(c)}}function b(M){if(g=!1,x(M),!p)if(n(l)!==null)p=!0,B(S);else{var D=n(c);D!==null&&K(b,D.startTime-M)}}function S(M,D){p=!1,g&&(g=!1,v(j),j=-1),h=!0;var z=u;try{for(x(D),f=n(l);f!==null&&(!(f.expirationTime>D)||M&&!F());){var R=f.callback;if(typeof R=="function"){f.callback=null,u=f.priorityLevel;var E=R(f.expirationTime<=D);D=e.unstable_now(),typeof E=="function"?f.callback=E:f===n(l)&&r(l),x(D)}else r(l);f=n(l)}if(f!==null)var Y=!0;else{var Q=n(c);Q!==null&&K(b,Q.startTime-D),Y=!1}return Y}finally{f=null,u=z,h=!1}}var C=!1,P=null,j=-1,_=5,T=-1;function F(){return!(e.unstable_now()-T<_)}function L(){if(P!==null){var M=e.unstable_now();T=M;var D=!0;try{D=P(!0,M)}finally{D?W():(C=!1,P=null)}}else C=!1}var W;if(typeof y=="function")W=function(){y(L)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,O=A.port2;A.port1.onmessage=L,W=function(){O.postMessage(null)}}else W=function(){w(L,0)};function B(M){P=M,C||(C=!0,W())}function K(M,D){j=w(function(){M(e.unstable_now())},D)}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(M){M.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,B(S))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return u},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(M){switch(u){case 1:case 2:case 3:var D=3;break;default:D=u}var z=u;u=D;try{return M()}finally{u=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,D){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var z=u;u=M;try{return D()}finally{u=z}},e.unstable_scheduleCallback=function(M,D,z){var R=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?R+z:R):z=R,M){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=z+E,M={id:d++,callback:D,priorityLevel:M,startTime:z,expirationTime:E,sortIndex:-1},z>R?(M.sortIndex=z,t(c,M),n(l)===null&&M===n(c)&&(g?(v(j),j=-1):g=!0,K(b,z-R))):(M.sortIndex=E,t(l,M),p||h||(p=!0,B(S))),M},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(M){var D=u;return function(){var z=u;u=D;try{return M.apply(this,arguments)}finally{u=z}}}})(Kh);Yh.exports=Kh;var ky=Yh.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 Cy=k,Qe=ky;function N(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 Xh=new Set,Ss={};function Yn(e,t){Pr(e,t),Pr(e+"Capture",t)}function Pr(e,t){for(Ss[e]=t,e=0;e<t.length;e++)Xh.add(t[e])}var Ot=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ka=Object.prototype.hasOwnProperty,Py=/^[: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]*$/,Ic={},Oc={};function jy(e){return Ka.call(Oc,e)?!0:Ka.call(Ic,e)?!1:Py.test(e)?Oc[e]=!0:(Ic[e]=!0,!1)}function Ey(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 Ty(e,t,n,r){if(t===null||typeof t>"u"||Ey(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 pu=/[\-:]([a-z])/g;function mu(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(pu,mu);_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(pu,mu);_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(pu,mu);_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 gu(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")&&(Ty(t,n,s,r)&&(n=null),r||s===null?jy(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 qt=Cy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,si=Symbol.for("react.element"),tr=Symbol.for("react.portal"),nr=Symbol.for("react.fragment"),yu=Symbol.for("react.strict_mode"),Xa=Symbol.for("react.profiler"),Qh=Symbol.for("react.provider"),Zh=Symbol.for("react.context"),vu=Symbol.for("react.forward_ref"),Qa=Symbol.for("react.suspense"),Za=Symbol.for("react.suspense_list"),xu=Symbol.for("react.memo"),Qt=Symbol.for("react.lazy"),Jh=Symbol.for("react.offscreen"),$c=Symbol.iterator;function Wr(e){return e===null||typeof e!="object"?null:(e=$c&&e[$c]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Object.assign,ra;function ns(e){if(ra===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ra=t&&t[1]||""}return`
|
|
`+ra+e}var sa=!1;function ia(e,t){if(!e||sa)return"";sa=!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{sa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ns(e):""}function Ny(e){switch(e.tag){case 5:return ns(e.type);case 16:return ns("Lazy");case 13:return ns("Suspense");case 19:return ns("SuspenseList");case 0:case 2:case 15:return e=ia(e.type,!1),e;case 11:return e=ia(e.type.render,!1),e;case 1:return e=ia(e.type,!0),e;default:return""}}function Ja(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 nr:return"Fragment";case tr:return"Portal";case Xa:return"Profiler";case yu:return"StrictMode";case Qa:return"Suspense";case Za:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zh:return(e.displayName||"Context")+".Consumer";case Qh:return(e._context.displayName||"Context")+".Provider";case vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xu:return t=e.displayName||null,t!==null?t:Ja(e.type)||"Memo";case Qt:t=e._payload,e=e._init;try{return Ja(e(t))}catch{}}return null}function My(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 Ja(t);case 8:return t===yu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ep(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _y(e){var t=ep(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 ii(e){e._valueTracker||(e._valueTracker=_y(e))}function tp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ep(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bi(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 el(e,t){var n=t.checked;return ue({},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=yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function np(e,t){t=t.checked,t!=null&&gu(e,"checked",t,!1)}function tl(e,t){np(e,t);var n=yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nl(e,t.type,n):t.hasOwnProperty("defaultValue")&&nl(e,t.type,yn(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 nl(e,t,n){(t!=="number"||Bi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rs=Array.isArray;function yr(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=""+yn(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 rl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return ue({},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(N(92));if(rs(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:yn(n)}}function rp(e,t){var n=yn(t.value),r=yn(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 sp(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 sl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var oi,ip=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(oi=oi||document.createElement("div"),oi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=oi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ks(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var as={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},Ay=["Webkit","ms","Moz","O"];Object.keys(as).forEach(function(e){Ay.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),as[t]=as[e]})});function op(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||as.hasOwnProperty(e)&&as[e]?(""+t).trim():t+"px"}function ap(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=op(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Ly=ue({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 il(e,t){if(t){if(Ly[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function ol(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 al=null;function wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ll=null,vr=null,xr=null;function qc(e){if(e=Ks(e)){if(typeof ll!="function")throw Error(N(280));var t=e.stateNode;t&&(t=_o(t),ll(e.stateNode,e.type,t))}}function lp(e){vr?xr?xr.push(e):xr=[e]:vr=e}function up(){if(vr){var e=vr,t=xr;if(xr=vr=null,qc(e),t)for(e=0;e<t.length;e++)qc(t[e])}}function cp(e,t){return e(t)}function dp(){}var oa=!1;function fp(e,t,n){if(oa)return e(t,n);oa=!0;try{return cp(e,t,n)}finally{oa=!1,(vr!==null||xr!==null)&&(dp(),up())}}function Cs(e,t){var n=e.stateNode;if(n===null)return null;var r=_o(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(N(231,t,typeof n));return n}var ul=!1;if(Ot)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){ul=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{ul=!1}function Dy(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 ls=!1,Ui=null,Wi=!1,cl=null,Ry={onError:function(e){ls=!0,Ui=e}};function Vy(e,t,n,r,s,i,o,a,l){ls=!1,Ui=null,Dy.apply(Ry,arguments)}function Fy(e,t,n,r,s,i,o,a,l){if(Vy.apply(this,arguments),ls){if(ls){var c=Ui;ls=!1,Ui=null}else throw Error(N(198));Wi||(Wi=!0,cl=c)}}function Kn(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 hp(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(Kn(e)!==e)throw Error(N(188))}function zy(e){var t=e.alternate;if(!t){if(t=Kn(e),t===null)throw Error(N(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(N(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(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function pp(e){return e=zy(e),e!==null?mp(e):null}function mp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mp(e);if(t!==null)return t;e=e.sibling}return null}var gp=Qe.unstable_scheduleCallback,Yc=Qe.unstable_cancelCallback,Iy=Qe.unstable_shouldYield,Oy=Qe.unstable_requestPaint,he=Qe.unstable_now,$y=Qe.unstable_getCurrentPriorityLevel,bu=Qe.unstable_ImmediatePriority,yp=Qe.unstable_UserBlockingPriority,Hi=Qe.unstable_NormalPriority,By=Qe.unstable_LowPriority,vp=Qe.unstable_IdlePriority,Eo=null,Pt=null;function Uy(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Eo,e,void 0,(e.current.flags&128)===128)}catch{}}var gt=Math.clz32?Math.clz32:qy,Wy=Math.log,Hy=Math.LN2;function qy(e){return e>>>=0,e===0?32:31-(Wy(e)/Hy|0)|0}var ai=64,li=4194304;function ss(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 qi(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=ss(a):(i&=o,i!==0&&(r=ss(i)))}else o=n&~s,o!==0?r=ss(o):i!==0&&(r=ss(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 Gy(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 Yy(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]=Gy(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function dl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xp(){var e=ai;return ai<<=1,!(ai&4194240)&&(ai=64),e}function aa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gs(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 Ky(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 Su(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 wp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bp,ku,Sp,kp,Cp,fl=!1,ui=[],an=null,ln=null,un=null,Ps=new Map,js=new Map,en=[],Xy="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":an=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":Ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function qr(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=Ks(t),t!==null&&ku(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Qy(e,t,n,r,s){switch(t){case"focusin":return an=qr(an,e,t,n,r,s),!0;case"dragenter":return ln=qr(ln,e,t,n,r,s),!0;case"mouseover":return un=qr(un,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ps.set(i,qr(Ps.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,js.set(i,qr(js.get(i)||null,e,t,n,r,s)),!0}return!1}function Pp(e){var t=Rn(e.target);if(t!==null){var n=Kn(t);if(n!==null){if(t=n.tag,t===13){if(t=hp(n),t!==null){e.blockedOn=t,Cp(e.priority,function(){Sp(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 Ti(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);al=r,n.target.dispatchEvent(r),al=null}else return t=Ks(n),t!==null&&ku(t),e.blockedOn=n,!1;t.shift()}return!0}function Xc(e,t,n){Ti(e)&&n.delete(t)}function Zy(){fl=!1,an!==null&&Ti(an)&&(an=null),ln!==null&&Ti(ln)&&(ln=null),un!==null&&Ti(un)&&(un=null),Ps.forEach(Xc),js.forEach(Xc)}function Gr(e,t){e.blockedOn===t&&(e.blockedOn=null,fl||(fl=!0,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,Zy)))}function Es(e){function t(s){return Gr(s,e)}if(0<ui.length){Gr(ui[0],e);for(var n=1;n<ui.length;n++){var r=ui[n];r.blockedOn===e&&(r.blockedOn=null)}}for(an!==null&&Gr(an,e),ln!==null&&Gr(ln,e),un!==null&&Gr(un,e),Ps.forEach(t),js.forEach(t),n=0;n<en.length;n++)r=en[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<en.length&&(n=en[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&en.shift()}var wr=qt.ReactCurrentBatchConfig,Gi=!0;function Jy(e,t,n,r){var s=Z,i=wr.transition;wr.transition=null;try{Z=1,Cu(e,t,n,r)}finally{Z=s,wr.transition=i}}function e1(e,t,n,r){var s=Z,i=wr.transition;wr.transition=null;try{Z=4,Cu(e,t,n,r)}finally{Z=s,wr.transition=i}}function Cu(e,t,n,r){if(Gi){var s=hl(e,t,n,r);if(s===null)ya(e,t,r,Yi,n),Kc(e,r);else if(Qy(s,e,t,n,r))r.stopPropagation();else if(Kc(e,r),t&4&&-1<Xy.indexOf(e)){for(;s!==null;){var i=Ks(s);if(i!==null&&bp(i),i=hl(e,t,n,r),i===null&&ya(e,t,r,Yi,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ya(e,t,r,null,n)}}var Yi=null;function hl(e,t,n,r){if(Yi=null,e=wu(r),e=Rn(e),e!==null)if(t=Kn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=hp(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 Yi=e,null}function jp(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($y()){case bu:return 1;case yp:return 4;case Hi:case By:return 16;case vp:return 536870912;default:return 16}default:return 16}}var rn=null,Pu=null,Ni=null;function Ep(){if(Ni)return Ni;var e,t=Pu,n=t.length,r,s="value"in rn?rn.value:rn.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 Ni=s.slice(e,1<r?1-r:void 0)}function Mi(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 ci(){return!0}function Qc(){return!1}function et(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)?ci:Qc,this.isPropagationStopped=Qc,this}return ue(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=ci)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ci)},persist:function(){},isPersistent:ci}),t}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ju=et(zr),Ys=ue({},zr,{view:0,detail:0}),t1=et(Ys),la,ua,Yr,To=ue({},Ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eu,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!==Yr&&(Yr&&e.type==="mousemove"?(la=e.screenX-Yr.screenX,ua=e.screenY-Yr.screenY):ua=la=0,Yr=e),la)},movementY:function(e){return"movementY"in e?e.movementY:ua}}),Zc=et(To),n1=ue({},To,{dataTransfer:0}),r1=et(n1),s1=ue({},Ys,{relatedTarget:0}),ca=et(s1),i1=ue({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),o1=et(i1),a1=ue({},zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),l1=et(a1),u1=ue({},zr,{data:0}),Jc=et(u1),c1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d1={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"},f1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=f1[e])?!!t[e]:!1}function Eu(){return h1}var p1=ue({},Ys,{key:function(e){if(e.key){var t=c1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?d1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eu,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),m1=et(p1),g1=ue({},To,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ed=et(g1),y1=ue({},Ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eu}),v1=et(y1),x1=ue({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),w1=et(x1),b1=ue({},To,{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}),S1=et(b1),k1=[9,13,27,32],Tu=Ot&&"CompositionEvent"in window,us=null;Ot&&"documentMode"in document&&(us=document.documentMode);var C1=Ot&&"TextEvent"in window&&!us,Tp=Ot&&(!Tu||us&&8<us&&11>=us),td=" ",nd=!1;function Np(e,t){switch(e){case"keyup":return k1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rr=!1;function P1(e,t){switch(e){case"compositionend":return Mp(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 j1(e,t){if(rr)return e==="compositionend"||!Tu&&Np(e,t)?(e=Ep(),Ni=Pu=rn=null,rr=!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 Tp&&t.locale!=="ko"?null:t.data;default:return null}}var E1={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"?!!E1[e.type]:t==="textarea"}function _p(e,t,n,r){lp(r),t=Ki(t,"onChange"),0<t.length&&(n=new ju("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var cs=null,Ts=null;function T1(e){Bp(e,0)}function No(e){var t=or(e);if(tp(t))return e}function N1(e,t){if(e==="change")return t}var Ap=!1;if(Ot){var da;if(Ot){var fa="oninput"in document;if(!fa){var sd=document.createElement("div");sd.setAttribute("oninput","return;"),fa=typeof sd.oninput=="function"}da=fa}else da=!1;Ap=da&&(!document.documentMode||9<document.documentMode)}function id(){cs&&(cs.detachEvent("onpropertychange",Lp),Ts=cs=null)}function Lp(e){if(e.propertyName==="value"&&No(Ts)){var t=[];_p(t,Ts,e,wu(e)),fp(T1,t)}}function M1(e,t,n){e==="focusin"?(id(),cs=t,Ts=n,cs.attachEvent("onpropertychange",Lp)):e==="focusout"&&id()}function _1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return No(Ts)}function A1(e,t){if(e==="click")return No(t)}function L1(e,t){if(e==="input"||e==="change")return No(t)}function D1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:D1;function Ns(e,t){if(vt(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(!Ka.call(t,s)||!vt(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 Dp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rp(){for(var e=window,t=Bi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bi(e.document)}return t}function Nu(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 R1(e){var t=Rp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dp(n.ownerDocument.documentElement,n)){if(r!==null&&Nu(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 V1=Ot&&"documentMode"in document&&11>=document.documentMode,sr=null,pl=null,ds=null,ml=!1;function ld(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ml||sr==null||sr!==Bi(r)||(r=sr,"selectionStart"in r&&Nu(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}),ds&&Ns(ds,r)||(ds=r,r=Ki(pl,"onSelect"),0<r.length&&(t=new ju("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sr)))}function di(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ir={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionend:di("Transition","TransitionEnd")},ha={},Vp={};Ot&&(Vp=document.createElement("div").style,"AnimationEvent"in window||(delete ir.animationend.animation,delete ir.animationiteration.animation,delete ir.animationstart.animation),"TransitionEvent"in window||delete ir.transitionend.transition);function Mo(e){if(ha[e])return ha[e];if(!ir[e])return e;var t=ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vp)return ha[e]=t[n];return e}var Fp=Mo("animationend"),zp=Mo("animationiteration"),Ip=Mo("animationstart"),Op=Mo("transitionend"),$p=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 bn(e,t){$p.set(e,t),Yn(t,[e])}for(var pa=0;pa<ud.length;pa++){var ma=ud[pa],F1=ma.toLowerCase(),z1=ma[0].toUpperCase()+ma.slice(1);bn(F1,"on"+z1)}bn(Fp,"onAnimationEnd");bn(zp,"onAnimationIteration");bn(Ip,"onAnimationStart");bn("dblclick","onDoubleClick");bn("focusin","onFocus");bn("focusout","onBlur");bn(Op,"onTransitionEnd");Pr("onMouseEnter",["mouseout","mouseover"]);Pr("onMouseLeave",["mouseout","mouseover"]);Pr("onPointerEnter",["pointerout","pointerover"]);Pr("onPointerLeave",["pointerout","pointerover"]);Yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Yn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var is="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(" "),I1=new Set("cancel close invalid load scroll toggle".split(" ").concat(is));function cd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Fy(r,t,void 0,e),e.currentTarget=null}function Bp(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(Wi)throw e=cl,Wi=!1,cl=null,e}function ne(e,t){var n=t[wl];n===void 0&&(n=t[wl]=new Set);var r=e+"__bubble";n.has(r)||(Up(t,e,2,!1),n.add(r))}function ga(e,t,n){var r=0;t&&(r|=4),Up(n,e,r,t)}var fi="_reactListening"+Math.random().toString(36).slice(2);function Ms(e){if(!e[fi]){e[fi]=!0,Xh.forEach(function(n){n!=="selectionchange"&&(I1.has(n)||ga(n,!1,e),ga(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fi]||(t[fi]=!0,ga("selectionchange",!1,t))}}function Up(e,t,n,r){switch(jp(t)){case 1:var s=Jy;break;case 4:s=e1;break;default:s=Cu}n=s.bind(null,t,n,e),s=void 0,!ul||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 ya(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=Rn(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}fp(function(){var c=i,d=wu(n),f=[];e:{var u=$p.get(e);if(u!==void 0){var h=ju,p=e;switch(e){case"keypress":if(Mi(n)===0)break e;case"keydown":case"keyup":h=m1;break;case"focusin":p="focus",h=ca;break;case"focusout":p="blur",h=ca;break;case"beforeblur":case"afterblur":h=ca;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=r1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=v1;break;case Fp:case zp:case Ip:h=o1;break;case Op:h=w1;break;case"scroll":h=t1;break;case"wheel":h=S1;break;case"copy":case"cut":case"paste":h=l1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ed}var g=(t&4)!==0,w=!g&&e==="scroll",v=g?u!==null?u+"Capture":null:u;g=[];for(var y=c,x;y!==null;){x=y;var b=x.stateNode;if(x.tag===5&&b!==null&&(x=b,v!==null&&(b=Cs(y,v),b!=null&&g.push(_s(y,b,x)))),w)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!==al&&(p=n.relatedTarget||n.fromElement)&&(Rn(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?Rn(p):null,p!==null&&(w=Kn(p),p!==w||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"),w=h==null?u:or(h),x=p==null?u:or(p),u=new g(b,y+"leave",h,n,d),u.target=w,u.relatedTarget=x,b=null,Rn(d)===c&&(g=new g(v,y+"enter",p,n,d),g.target=x,g.relatedTarget=w,b=g),w=b,h&&p)t:{for(g=h,v=p,y=0,x=g;x;x=er(x))y++;for(x=0,b=v;b;b=er(b))x++;for(;0<y-x;)g=er(g),y--;for(;0<x-y;)v=er(v),x--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=er(g),v=er(v)}g=null}else g=null;h!==null&&dd(f,u,h,g,!1),p!==null&&w!==null&&dd(f,w,p,g,!0)}}e:{if(u=c?or(c):window,h=u.nodeName&&u.nodeName.toLowerCase(),h==="select"||h==="input"&&u.type==="file")var S=N1;else if(rd(u))if(Ap)S=L1;else{S=_1;var C=M1}else(h=u.nodeName)&&h.toLowerCase()==="input"&&(u.type==="checkbox"||u.type==="radio")&&(S=A1);if(S&&(S=S(e,c))){_p(f,S,n,d);break e}C&&C(e,u,c),e==="focusout"&&(C=u._wrapperState)&&C.controlled&&u.type==="number"&&nl(u,"number",u.value)}switch(C=c?or(c):window,e){case"focusin":(rd(C)||C.contentEditable==="true")&&(sr=C,pl=c,ds=null);break;case"focusout":ds=pl=sr=null;break;case"mousedown":ml=!0;break;case"contextmenu":case"mouseup":case"dragend":ml=!1,ld(f,n,d);break;case"selectionchange":if(V1)break;case"keydown":case"keyup":ld(f,n,d)}var P;if(Tu)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 rr?Np(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Tp&&n.locale!=="ko"&&(rr||j!=="onCompositionStart"?j==="onCompositionEnd"&&rr&&(P=Ep()):(rn=d,Pu="value"in rn?rn.value:rn.textContent,rr=!0)),C=Ki(c,j),0<C.length&&(j=new Jc(j,e,null,n,d),f.push({event:j,listeners:C}),P?j.data=P:(P=Mp(n),P!==null&&(j.data=P)))),(P=C1?P1(e,n):j1(e,n))&&(c=Ki(c,"onBeforeInput"),0<c.length&&(d=new Jc("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=P))}Bp(f,t)})}function _s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ki(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Cs(e,n),i!=null&&r.unshift(_s(e,i,s)),i=Cs(e,t),i!=null&&r.push(_s(e,i,s))),e=e.return}return r}function er(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=Cs(n,i),l!=null&&o.unshift(_s(n,l,a))):s||(l=Cs(n,i),l!=null&&o.push(_s(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var O1=/\r\n?/g,$1=/\u0000|\uFFFD/g;function fd(e){return(typeof e=="string"?e:""+e).replace(O1,`
|
|
`).replace($1,"")}function hi(e,t,n){if(t=fd(t),fd(e)!==t&&n)throw Error(N(425))}function Xi(){}var gl=null,yl=null;function vl(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 xl=typeof setTimeout=="function"?setTimeout:void 0,B1=typeof clearTimeout=="function"?clearTimeout:void 0,hd=typeof Promise=="function"?Promise:void 0,U1=typeof queueMicrotask=="function"?queueMicrotask:typeof hd<"u"?function(e){return hd.resolve(null).then(e).catch(W1)}:xl;function W1(e){setTimeout(function(){throw e})}function va(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),Es(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Es(t)}function cn(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 Ir=Math.random().toString(36).slice(2),St="__reactFiber$"+Ir,As="__reactProps$"+Ir,$t="__reactContainer$"+Ir,wl="__reactEvents$"+Ir,H1="__reactListeners$"+Ir,q1="__reactHandles$"+Ir;function Rn(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$t]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pd(e);e!==null;){if(n=e[St])return n;e=pd(e)}return t}e=n,n=e.parentNode}return null}function Ks(e){return e=e[St]||e[$t],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function or(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function _o(e){return e[As]||null}var bl=[],ar=-1;function Sn(e){return{current:e}}function re(e){0>ar||(e.current=bl[ar],bl[ar]=null,ar--)}function J(e,t){ar++,bl[ar]=e.current,e.current=t}var vn={},Ve=Sn(vn),We=Sn(!1),Bn=vn;function jr(e,t){var n=e.type.contextTypes;if(!n)return vn;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 Qi(){re(We),re(Ve)}function md(e,t,n){if(Ve.current!==vn)throw Error(N(168));J(Ve,t),J(We,n)}function Wp(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(N(108,My(e)||"Unknown",s));return ue({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,Bn=Ve.current,J(Ve,e),J(We,We.current),!0}function gd(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Wp(e,t,Bn),r.__reactInternalMemoizedMergedChildContext=e,re(We),re(Ve),J(Ve,e)):re(We),J(We,n)}var At=null,Ao=!1,xa=!1;function Hp(e){At===null?At=[e]:At.push(e)}function G1(e){Ao=!0,Hp(e)}function kn(){if(!xa&&At!==null){xa=!0;var e=0,t=Z;try{var n=At;for(Z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}At=null,Ao=!1}catch(s){throw At!==null&&(At=At.slice(e+1)),gp(bu,kn),s}finally{Z=t,xa=!1}}return null}var lr=[],ur=0,Ji=null,eo=0,st=[],it=0,Un=null,Lt=1,Dt="";function _n(e,t){lr[ur++]=eo,lr[ur++]=Ji,Ji=e,eo=t}function qp(e,t,n){st[it++]=Lt,st[it++]=Dt,st[it++]=Un,Un=e;var r=Lt;e=Dt;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,Lt=1<<32-gt(t)+s|n<<s|r,Dt=i+e}else Lt=1<<i|n<<s|r,Dt=e}function Mu(e){e.return!==null&&(_n(e,1),qp(e,1,0))}function _u(e){for(;e===Ji;)Ji=lr[--ur],lr[ur]=null,eo=lr[--ur],lr[ur]=null;for(;e===Un;)Un=st[--it],st[it]=null,Dt=st[--it],st[it]=null,Lt=st[--it],st[it]=null}var Xe=null,Ke=null,ie=!1,pt=null;function Gp(e,t){var n=ot(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,Xe=e,Ke=cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xe=e,Ke=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Un!==null?{id:Lt,overflow:Dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xe=e,Ke=null,!0):!1;default:return!1}}function Sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kl(e){if(ie){var t=Ke;if(t){var n=t;if(!yd(e,t)){if(Sl(e))throw Error(N(418));t=cn(n.nextSibling);var r=Xe;t&&yd(e,t)?Gp(r,n):(e.flags=e.flags&-4097|2,ie=!1,Xe=e)}}else{if(Sl(e))throw Error(N(418));e.flags=e.flags&-4097|2,ie=!1,Xe=e}}}function vd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xe=e}function pi(e){if(e!==Xe)return!1;if(!ie)return vd(e),ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vl(e.type,e.memoizedProps)),t&&(t=Ke)){if(Sl(e))throw Yp(),Error(N(418));for(;t;)Gp(e,t),t=cn(t.nextSibling)}if(vd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ke=cn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ke=null}}else Ke=Xe?cn(e.stateNode.nextSibling):null;return!0}function Yp(){for(var e=Ke;e;)e=cn(e.nextSibling)}function Er(){Ke=Xe=null,ie=!1}function Au(e){pt===null?pt=[e]:pt.push(e)}var Y1=qt.ReactCurrentBatchConfig;function Kr(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(N(309));var r=n.stateNode}if(!r)throw Error(N(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(N(284));if(!n._owner)throw Error(N(290,e))}return e}function mi(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xd(e){var t=e._init;return t(e._payload)}function Kp(e){function t(v,y){if(e){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.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=pn(v,y),v.index=0,v.sibling=null,v}function i(v,y,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<y?(v.flags|=2,y):x):(v.flags|=2,y)):(v.flags|=1048576,y)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,y,x,b){return y===null||y.tag!==6?(y=ja(x,v.mode,b),y.return=v,y):(y=s(y,x),y.return=v,y)}function l(v,y,x,b){var S=x.type;return S===nr?d(v,y,x.props.children,b,x.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qt&&xd(S)===y.type)?(b=s(y,x.props),b.ref=Kr(v,y,x),b.return=v,b):(b=Fi(x.type,x.key,x.props,null,v.mode,b),b.ref=Kr(v,y,x),b.return=v,b)}function c(v,y,x,b){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Ea(x,v.mode,b),y.return=v,y):(y=s(y,x.children||[]),y.return=v,y)}function d(v,y,x,b,S){return y===null||y.tag!==7?(y=On(x,v.mode,b,S),y.return=v,y):(y=s(y,x),y.return=v,y)}function f(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=ja(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case si:return x=Fi(y.type,y.key,y.props,null,v.mode,x),x.ref=Kr(v,null,y),x.return=v,x;case tr:return y=Ea(y,v.mode,x),y.return=v,y;case Qt:var b=y._init;return f(v,b(y._payload),x)}if(rs(y)||Wr(y))return y=On(y,v.mode,x,null),y.return=v,y;mi(v,y)}return null}function u(v,y,x,b){var S=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(v,y,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case si:return x.key===S?l(v,y,x,b):null;case tr:return x.key===S?c(v,y,x,b):null;case Qt:return S=x._init,u(v,y,S(x._payload),b)}if(rs(x)||Wr(x))return S!==null?null:d(v,y,x,b,null);mi(v,x)}return null}function h(v,y,x,b,S){if(typeof b=="string"&&b!==""||typeof b=="number")return v=v.get(x)||null,a(y,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case si:return v=v.get(b.key===null?x:b.key)||null,l(y,v,b,S);case tr:return v=v.get(b.key===null?x:b.key)||null,c(y,v,b,S);case Qt:var C=b._init;return h(v,y,x,C(b._payload),S)}if(rs(b)||Wr(b))return v=v.get(x)||null,d(y,v,b,S,null);mi(y,b)}return null}function p(v,y,x,b){for(var S=null,C=null,P=y,j=y=0,_=null;P!==null&&j<x.length;j++){P.index>j?(_=P,P=null):_=P.sibling;var T=u(v,P,x[j],b);if(T===null){P===null&&(P=_);break}e&&P&&T.alternate===null&&t(v,P),y=i(T,y,j),C===null?S=T:C.sibling=T,C=T,P=_}if(j===x.length)return n(v,P),ie&&_n(v,j),S;if(P===null){for(;j<x.length;j++)P=f(v,x[j],b),P!==null&&(y=i(P,y,j),C===null?S=P:C.sibling=P,C=P);return ie&&_n(v,j),S}for(P=r(v,P);j<x.length;j++)_=h(P,v,j,x[j],b),_!==null&&(e&&_.alternate!==null&&P.delete(_.key===null?j:_.key),y=i(_,y,j),C===null?S=_:C.sibling=_,C=_);return e&&P.forEach(function(F){return t(v,F)}),ie&&_n(v,j),S}function g(v,y,x,b){var S=Wr(x);if(typeof S!="function")throw Error(N(150));if(x=S.call(x),x==null)throw Error(N(151));for(var C=S=null,P=y,j=y=0,_=null,T=x.next();P!==null&&!T.done;j++,T=x.next()){P.index>j?(_=P,P=null):_=P.sibling;var F=u(v,P,T.value,b);if(F===null){P===null&&(P=_);break}e&&P&&F.alternate===null&&t(v,P),y=i(F,y,j),C===null?S=F:C.sibling=F,C=F,P=_}if(T.done)return n(v,P),ie&&_n(v,j),S;if(P===null){for(;!T.done;j++,T=x.next())T=f(v,T.value,b),T!==null&&(y=i(T,y,j),C===null?S=T:C.sibling=T,C=T);return ie&&_n(v,j),S}for(P=r(v,P);!T.done;j++,T=x.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(L){return t(v,L)}),ie&&_n(v,j),S}function w(v,y,x,b){if(typeof x=="object"&&x!==null&&x.type===nr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case si:e:{for(var S=x.key,C=y;C!==null;){if(C.key===S){if(S=x.type,S===nr){if(C.tag===7){n(v,C.sibling),y=s(C,x.props.children),y.return=v,v=y;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qt&&xd(S)===C.type){n(v,C.sibling),y=s(C,x.props),y.ref=Kr(v,C,x),y.return=v,v=y;break e}n(v,C);break}else t(v,C);C=C.sibling}x.type===nr?(y=On(x.props.children,v.mode,b,x.key),y.return=v,v=y):(b=Fi(x.type,x.key,x.props,null,v.mode,b),b.ref=Kr(v,y,x),b.return=v,v=b)}return o(v);case tr:e:{for(C=x.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(v,y.sibling),y=s(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Ea(x,v.mode,b),y.return=v,v=y}return o(v);case Qt:return C=x._init,w(v,y,C(x._payload),b)}if(rs(x))return p(v,y,x,b);if(Wr(x))return g(v,y,x,b);mi(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=s(y,x),y.return=v,v=y):(n(v,y),y=ja(x,v.mode,b),y.return=v,v=y),o(v)):n(v,y)}return w}var Tr=Kp(!0),Xp=Kp(!1),to=Sn(null),no=null,cr=null,Lu=null;function Du(){Lu=cr=no=null}function Ru(e){var t=to.current;re(to),e._currentValue=t}function Cl(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 br(e,t){no=e,Lu=cr=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(Lu!==e)if(e={context:e,memoizedValue:t,next:null},cr===null){if(no===null)throw Error(N(308));cr=e,no.dependencies={lanes:0,firstContext:e}}else cr=cr.next=e;return t}var Vn=null;function Vu(e){Vn===null?Vn=[e]:Vn.push(e)}function Qp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Vu(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 Zt=!1;function Fu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zp(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 Vt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&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,Vu(r)):(t.next=s.next,s.next=t),r.interleaved=t,Bt(e,n)}function _i(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Su(e,n)}}function 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 ro(e,t,n,r){var s=e.updateQueue;Zt=!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=ue({},f,u);break e;case 2:Zt=!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);Hn|=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(N(191,s));s.call(r)}}}var Xs={},jt=Sn(Xs),Ls=Sn(Xs),Ds=Sn(Xs);function Fn(e){if(e===Xs)throw Error(N(174));return e}function zu(e,t){switch(J(Ds,t),J(Ls,e),J(jt,Xs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sl(t,e)}re(jt),J(jt,t)}function Nr(){re(jt),re(Ls),re(Ds)}function Jp(e){Fn(Ds.current);var t=Fn(jt.current),n=sl(t,e.type);t!==n&&(J(Ls,e),J(jt,n))}function Iu(e){Ls.current===e&&(re(jt),re(Ls))}var oe=Sn(0);function so(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 wa=[];function Ou(){for(var e=0;e<wa.length;e++)wa[e]._workInProgressVersionPrimary=null;wa.length=0}var Ai=qt.ReactCurrentDispatcher,ba=qt.ReactCurrentBatchConfig,Wn=0,le=null,be=null,je=null,io=!1,fs=!1,Rs=0,K1=0;function Ae(){throw Error(N(321))}function $u(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function Bu(e,t,n,r,s,i){if(Wn=i,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ai.current=e===null||e.memoizedState===null?J1:ev,e=n(r,s),fs){i=0;do{if(fs=!1,Rs=0,25<=i)throw Error(N(301));i+=1,je=be=null,t.updateQueue=null,Ai.current=tv,e=n(r,s)}while(fs)}if(Ai.current=oo,t=be!==null&&be.next!==null,Wn=0,je=be=le=null,io=!1,t)throw Error(N(300));return e}function Uu(){var e=Rs!==0;return Rs=0,e}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?le.memoizedState=je=e:je=je.next=e,je}function ct(){if(be===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=je===null?le.memoizedState:je.next;if(t!==null)je=t,be=e;else{if(e===null)throw Error(N(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},je===null?le.memoizedState=je=e:je=je.next=e}return je}function Vs(e,t){return typeof t=="function"?t(e):t}function Sa(e){var t=ct(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=be,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((Wn&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,le.lanes|=d,Hn|=d}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,vt(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,le.lanes|=i,Hn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ka(e){var t=ct(),n=t.queue;if(n===null)throw Error(N(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);vt(i,t.memoizedState)||(Ue=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function em(){}function tm(e,t){var n=le,r=ct(),s=t(),i=!vt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ue=!0),r=r.queue,Wu(sm.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,Fs(9,rm.bind(null,n,r,s,t),void 0,null),Ee===null)throw Error(N(349));Wn&30||nm(n,t,s)}return s}function nm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rm(e,t,n,r){t.value=n,t.getSnapshot=r,im(t)&&om(e)}function sm(e,t,n){return n(function(){im(t)&&om(e)})}function im(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vt(e,n)}catch{return!0}}function om(e){var t=Bt(e,1);t!==null&&yt(t,e,1,-1)}function Sd(e){var t=bt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vs,lastRenderedState:e},t.queue=e,e=e.dispatch=Z1.bind(null,le,e),[t.memoizedState,e]}function Fs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.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 am(){return ct().memoizedState}function Li(e,t,n,r){var s=bt();le.flags|=e,s.memoizedState=Fs(1|t,n,void 0,r===void 0?null:r)}function Lo(e,t,n,r){var s=ct();r=r===void 0?null:r;var i=void 0;if(be!==null){var o=be.memoizedState;if(i=o.destroy,r!==null&&$u(r,o.deps)){s.memoizedState=Fs(t,n,i,r);return}}le.flags|=e,s.memoizedState=Fs(1|t,n,i,r)}function kd(e,t){return Li(8390656,8,e,t)}function Wu(e,t){return Lo(2048,8,e,t)}function lm(e,t){return Lo(4,2,e,t)}function um(e,t){return Lo(4,4,e,t)}function cm(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 dm(e,t,n){return n=n!=null?n.concat([e]):null,Lo(4,4,cm.bind(null,t,e),n)}function Hu(){}function fm(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&$u(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hm(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&$u(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pm(e,t,n){return Wn&21?(vt(n,t)||(n=xp(),le.lanes|=n,Hn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n)}function X1(e,t){var n=Z;Z=n!==0&&4>n?n:4,e(!0);var r=ba.transition;ba.transition={};try{e(!1),t()}finally{Z=n,ba.transition=r}}function mm(){return ct().memoizedState}function Q1(e,t,n){var r=hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gm(e))ym(t,n);else if(n=Qp(e,t,n,r),n!==null){var s=Ie();yt(n,e,r,s),vm(n,t,r)}}function Z1(e,t,n){var r=hn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gm(e))ym(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,vt(a,o)){var l=t.interleaved;l===null?(s.next=s,Vu(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Qp(e,t,s,r),n!==null&&(s=Ie(),yt(n,e,r,s),vm(n,t,r))}}function gm(e){var t=e.alternate;return e===le||t!==null&&t===le}function ym(e,t){fs=io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Su(e,n)}}var oo={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},J1={readContext:ut,useCallback:function(e,t){return bt().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,Li(4194308,4,cm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){return Li(4,2,e,t)},useMemo:function(e,t){var n=bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Q1.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:Sd,useDebugValue:Hu,useDeferredValue:function(e){return bt().memoizedState=e},useTransition:function(){var e=Sd(!1),t=e[0];return e=X1.bind(null,e[1]),bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,s=bt();if(ie){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ee===null)throw Error(N(349));Wn&30||nm(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,kd(sm.bind(null,r,i,e),[e]),r.flags|=2048,Fs(9,rm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bt(),t=Ee.identifierPrefix;if(ie){var n=Dt,r=Lt;n=(r&~(1<<32-gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Rs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=K1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ev={readContext:ut,useCallback:fm,useContext:ut,useEffect:Wu,useImperativeHandle:dm,useInsertionEffect:lm,useLayoutEffect:um,useMemo:hm,useReducer:Sa,useRef:am,useState:function(){return Sa(Vs)},useDebugValue:Hu,useDeferredValue:function(e){var t=ct();return pm(t,be.memoizedState,e)},useTransition:function(){var e=Sa(Vs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:em,useSyncExternalStore:tm,useId:mm,unstable_isNewReconciler:!1},tv={readContext:ut,useCallback:fm,useContext:ut,useEffect:Wu,useImperativeHandle:dm,useInsertionEffect:lm,useLayoutEffect:um,useMemo:hm,useReducer:ka,useRef:am,useState:function(){return ka(Vs)},useDebugValue:Hu,useDeferredValue:function(e){var t=ct();return be===null?t.memoizedState=e:pm(t,be.memoizedState,e)},useTransition:function(){var e=ka(Vs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:em,useSyncExternalStore:tm,useId:mm,unstable_isNewReconciler:!1};function ft(e,t){if(e&&e.defaultProps){t=ue({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Pl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ue({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Do={isMounted:function(e){return(e=e._reactInternals)?Kn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ie(),s=hn(e),i=Vt(r,s);i.payload=t,n!=null&&(i.callback=n),t=dn(e,i,s),t!==null&&(yt(t,e,s,r),_i(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ie(),s=hn(e),i=Vt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=dn(e,i,s),t!==null&&(yt(t,e,s,r),_i(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ie(),r=hn(e),s=Vt(n,r);s.tag=2,t!=null&&(s.callback=t),t=dn(e,s,r),t!==null&&(yt(t,e,r,n),_i(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?!Ns(n,r)||!Ns(s,i):!0}function xm(e,t,n){var r=!1,s=vn,i=t.contextType;return typeof i=="object"&&i!==null?i=ut(i):(s=He(t)?Bn:Ve.current,r=t.contextTypes,i=(r=r!=null)?jr(e,s):vn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Do,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&&Do.enqueueReplaceState(t,t.state,null)}function jl(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Fu(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ut(i):(i=He(t)?Bn:Ve.current,s.context=jr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Pl(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&&Do.enqueueReplaceState(s,s.state,null),ro(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Mr(e,t){try{var n="",r=t;do n+=Ny(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 Ca(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function El(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var nv=typeof WeakMap=="function"?WeakMap:Map;function wm(e,t,n){n=Vt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){lo||(lo=!0,Fl=r),El(e,t)},n}function bm(e,t,n){n=Vt(-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(){El(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){El(e,t),typeof r!="function"&&(fn===null?fn=new Set([this]):fn.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 nv;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=gv.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=Vt(-1,1),t.tag=2,dn(n,t,1))),n.lanes|=1),e)}var rv=qt.ReactCurrentOwner,Ue=!1;function ze(e,t,n,r){t.child=e===null?Xp(t,null,n,r):Tr(t,e.child,n,r)}function Nd(e,t,n,r,s){n=n.render;var i=t.ref;return br(t,s),r=Bu(e,t,n,r,i,s),n=Uu(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ut(e,t,s)):(ie&&n&&Mu(t),t.flags|=1,ze(e,t,r,s),t.child)}function Md(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Ju(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Sm(e,t,i,r,s)):(e=Fi(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:Ns,n(o,r)&&e.ref===t.ref)return Ut(e,t,s)}return t.flags|=1,e=pn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Sm(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ns(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 Tl(e,t,n,r,s)}function km(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(fr,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(fr,Ye),Ye|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,J(fr,Ye),Ye|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,J(fr,Ye),Ye|=r;return ze(e,t,s,n),t.child}function Cm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tl(e,t,n,r,s){var i=He(n)?Bn:Ve.current;return i=jr(t,i),br(t,s),n=Bu(e,t,n,r,i,s),r=Uu(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ut(e,t,s)):(ie&&r&&Mu(t),t.flags|=1,ze(e,t,n,s),t.child)}function _d(e,t,n,r,s){if(He(n)){var i=!0;Zi(t)}else i=!1;if(br(t,s),t.stateNode===null)Di(e,t),xm(t,n,r),jl(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)?Bn:Ve.current,c=jr(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),Zt=!1;var u=t.memoizedState;o.state=u,ro(t,r,o,s),l=t.memoizedState,a!==r||u!==l||We.current||Zt?(typeof d=="function"&&(Pl(t,n,d,r),l=t.memoizedState),(a=Zt||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,Zp(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)?Bn:Ve.current,l=jr(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),Zt=!1,u=t.memoizedState,o.state=u,ro(t,r,o,s);var p=t.memoizedState;a!==f||u!==p||We.current||Zt?(typeof h=="function"&&(Pl(t,n,h,r),p=t.memoizedState),(c=Zt||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 Nl(e,t,n,r,i,s)}function Nl(e,t,n,r,s,i){Cm(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&gd(t,n,!1),Ut(e,t,i);r=t.stateNode,rv.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Tr(t,e.child,null,i),t.child=Tr(t,null,a,i)):ze(e,t,a,i),t.memoizedState=r.state,s&&gd(t,n,!0),t.child}function Pm(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 Er(),Au(s),t.flags|=256,ze(e,t,n,r),t.child}var Ml={dehydrated:null,treeContext:null,retryLane:0};function _l(e){return{baseLanes:e,cachePool:null,transitions:null}}function jm(e,t,n){var r=t.pendingProps,s=oe.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(oe,s&1),e===null)return kl(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=Fo(o,r,0,null),e=On(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=_l(n),t.memoizedState=Ml,e):qu(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return sv(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=pn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=pn(a,i):(i=On(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?_l(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Ml,r}return i=e.child,e=i.sibling,r=pn(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 qu(e,t){return t=Fo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gi(e,t,n,r){return r!==null&&Au(r),Tr(t,e.child,null,n),e=qu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sv(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Ca(Error(N(422))),gi(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Fo({mode:"visible",children:r.children},s,0,null),i=On(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Tr(t,e.child,null,o),t.child.memoizedState=_l(o),t.memoizedState=Ml,i);if(!(t.mode&1))return gi(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(N(419)),r=Ca(i,r,void 0),gi(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 Zu(),r=Ca(Error(N(421))),gi(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=yv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ke=cn(s.nextSibling),Xe=t,ie=!0,pt=null,e!==null&&(st[it++]=Lt,st[it++]=Dt,st[it++]=Un,Lt=e.id,Dt=e.overflow,Un=t),t=qu(t,r.children),t.flags|=4096,t)}function Ld(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Cl(e.return,t,n)}function Pa(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 Em(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ze(e,t,r.children,n),r=oe.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(oe,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&&so(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Pa(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&&so(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Pa(t,!0,n,null,i);break;case"together":Pa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Di(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),Hn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function iv(e,t,n){switch(t.tag){case 3:Pm(t),Er();break;case 5:Jp(t);break;case 1:He(t.type)&&Zi(t);break;case 4:zu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;J(to,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(J(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?jm(e,t,n):(J(oe,oe.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);J(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Em(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,km(e,t,n)}return Ut(e,t,n)}var Tm,Al,Nm,Mm;Tm=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}};Al=function(){};Nm=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Fn(jt.current);var i=null;switch(n){case"input":s=el(e,s),r=el(e,r),i=[];break;case"select":s=ue({},s,{value:void 0}),r=ue({},r,{value:void 0}),i=[];break;case"textarea":s=rl(e,s),r=rl(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xi)}il(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"&&(Ss.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"&&(Ss.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ne("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)}};Mm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xr(e,t){if(!ie)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 ov(e,t,n){var r=t.pendingProps;switch(_u(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)&&Qi(),Le(t),null;case 3:return r=t.stateNode,Nr(),re(We),re(Ve),Ou(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(Ol(pt),pt=null))),Al(e,t),Le(t),null;case 5:Iu(t);var s=Fn(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)Nm(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return Le(t),null}if(e=Fn(jt.current),pi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[St]=t,r[As]=i,e=(t.mode&1)!==0,n){case"dialog":ne("cancel",r),ne("close",r);break;case"iframe":case"object":case"embed":ne("load",r);break;case"video":case"audio":for(s=0;s<is.length;s++)ne(is[s],r);break;case"source":ne("error",r);break;case"img":case"image":case"link":ne("error",r),ne("load",r);break;case"details":ne("toggle",r);break;case"input":Bc(r,i),ne("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ne("invalid",r);break;case"textarea":Wc(r,i),ne("invalid",r)}il(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&&hi(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&hi(r.textContent,a,e),s=["children",""+a]):Ss.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ne("scroll",r)}switch(n){case"input":ii(r),Uc(r,i,!0);break;case"textarea":ii(r),Hc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Xi)}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=sp(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[St]=t,e[As]=r,Tm(e,t,!1,!1),t.stateNode=e;e:{switch(o=ol(n,r),n){case"dialog":ne("cancel",e),ne("close",e),s=r;break;case"iframe":case"object":case"embed":ne("load",e),s=r;break;case"video":case"audio":for(s=0;s<is.length;s++)ne(is[s],e);s=r;break;case"source":ne("error",e),s=r;break;case"img":case"image":case"link":ne("error",e),ne("load",e),s=r;break;case"details":ne("toggle",e),s=r;break;case"input":Bc(e,r),s=el(e,r),ne("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ue({},r,{value:void 0}),ne("invalid",e);break;case"textarea":Wc(e,r),s=rl(e,r),ne("invalid",e);break;default:s=r}il(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ap(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ip(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ks(e,l):typeof l=="number"&&ks(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ss.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ne("scroll",e):l!=null&&gu(e,i,l,o))}switch(n){case"input":ii(e),Uc(e,r,!1);break;case"textarea":ii(e),Hc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+yn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?yr(e,!!r.multiple,i,!1):r.defaultValue!=null&&yr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Xi)}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)Mm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Fn(Ds.current),Fn(jt.current),pi(t)){if(r=t.stateNode,n=t.memoizedProps,r[St]=t,(i=r.nodeValue!==n)&&(e=Xe,e!==null))switch(e.tag){case 3:hi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[St]=t,t.stateNode=r}return Le(t),null;case 13:if(re(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ie&&Ke!==null&&t.mode&1&&!(t.flags&128))Yp(),Er(),t.flags|=98560,i=!1;else if(i=pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(N(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(N(317));i[St]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Le(t),i=!1}else pt!==null&&(Ol(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||oe.current&1?ke===0&&(ke=3):Zu())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return Nr(),Al(e,t),e===null&&Ms(t.stateNode.containerInfo),Le(t),null;case 10:return Ru(t.type._context),Le(t),null;case 17:return He(t.type)&&Qi(),Le(t),null;case 19:if(re(oe),i=t.memoizedState,i===null)return Le(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Xr(i,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Xr(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(oe,oe.current&1|2),t.child}e=e.sibling}i.tail!==null&&he()>_r&&(t.flags|=128,r=!0,Xr(i,!1),t.lanes=4194304)}else{if(!r)if(e=so(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ie)return Le(t),null}else 2*he()-i.renderingStartTime>_r&&n!==1073741824&&(t.flags|=128,r=!0,Xr(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=he(),t.sibling=null,n=oe.current,J(oe,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return Qu(),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(N(156,t.tag))}function av(e,t){switch(_u(t),t.tag){case 1:return He(t.type)&&Qi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nr(),re(We),re(Ve),Ou(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Iu(t),null;case 13:if(re(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(oe),null;case 4:return Nr(),null;case 10:return Ru(t.type._context),null;case 22:case 23:return Qu(),null;case 24:return null;default:return null}}var yi=!1,Re=!1,lv=typeof WeakSet=="function"?WeakSet:Set,V=null;function dr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(e,t,r)}else n.current=null}function Ll(e,t,n){try{n()}catch(r){de(e,t,r)}}var Dd=!1;function uv(e,t){if(gl=Gi,e=Rp(),Nu(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(yl={focusedElem:e,selectionRange:n},Gi=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;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,w=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ft(t.type,g),w);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(b){de(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return p=Dd,Dd=!1,p}function hs(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&&Ll(t,n,i)}s=s.next}while(s!==r)}}function Ro(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 Dl(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 _m(e){var t=e.alternate;t!==null&&(e.alternate=null,_m(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[As],delete t[wl],delete t[H1],delete t[q1])),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 Am(e){return e.tag===5||e.tag===3||e.tag===4}function Rd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Am(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 Rl(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=Xi));else if(r!==4&&(e=e.child,e!==null))for(Rl(e,t,n),e=e.sibling;e!==null;)Rl(e,t,n),e=e.sibling}function Vl(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(Vl(e,t,n),e=e.sibling;e!==null;)Vl(e,t,n),e=e.sibling}var Ne=null,ht=!1;function Gt(e,t,n){for(n=n.child;n!==null;)Lm(e,t,n),n=n.sibling}function Lm(e,t,n){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Eo,n)}catch{}switch(n.tag){case 5:Re||dr(n,t);case 6:var r=Ne,s=ht;Ne=null,Gt(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?va(e.parentNode,n):e.nodeType===1&&va(e,n),Es(e)):va(Ne,n.stateNode));break;case 4:r=Ne,s=ht,Ne=n.stateNode.containerInfo,ht=!0,Gt(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)&&Ll(n,t,o),s=s.next}while(s!==r)}Gt(e,t,n);break;case 1:if(!Re&&(dr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){de(n,t,a)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Gt(e,t,n),Re=r):Gt(e,t,n);break;default:Gt(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 lv),t.forEach(function(r){var s=vv.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(N(160));Lm(i,o,s),Ne=null,ht=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){de(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dm(t,e),t=t.sibling}function Dm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),wt(e),r&4){try{hs(3,e,e.return),Ro(3,e)}catch(g){de(e,e.return,g)}try{hs(5,e,e.return)}catch(g){de(e,e.return,g)}}break;case 1:dt(t,e),wt(e),r&512&&n!==null&&dr(n,n.return);break;case 5:if(dt(t,e),wt(e),r&512&&n!==null&&dr(n,n.return),e.flags&32){var s=e.stateNode;try{ks(s,"")}catch(g){de(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&&np(s,i),ol(a,o);var c=ol(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?ap(s,f):d==="dangerouslySetInnerHTML"?ip(s,f):d==="children"?ks(s,f):gu(s,d,f,c)}switch(a){case"input":tl(s,i);break;case"textarea":rp(s,i);break;case"select":var u=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?yr(s,!!i.multiple,h,!1):u!==!!i.multiple&&(i.defaultValue!=null?yr(s,!!i.multiple,i.defaultValue,!0):yr(s,!!i.multiple,i.multiple?[]:"",!1))}s[As]=i}catch(g){de(e,e.return,g)}}break;case 6:if(dt(t,e),wt(e),r&4){if(e.stateNode===null)throw Error(N(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){de(e,e.return,g)}}break;case 3:if(dt(t,e),wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Es(t.containerInfo)}catch(g){de(e,e.return,g)}break;case 4:dt(t,e),wt(e);break;case 13:dt(t,e),wt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Ku=he())),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),wt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(V=e,d=e.child;d!==null;){for(f=V=d;V!==null;){switch(u=V,h=u.child,u.tag){case 0:case 11:case 14:case 15:hs(4,u,u.return);break;case 1:dr(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){de(r,n,g)}}break;case 5:dr(u,u.return);break;case 22:if(u.memoizedState!==null){zd(f);continue}}h!==null?(h.return=u,V=h):zd(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=op("display",o))}catch(g){de(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){de(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),wt(e),r&4&&Vd(e);break;case 21:break;default:dt(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Am(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ks(s,""),r.flags&=-33);var i=Rd(e);Vl(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Rd(e);Rl(e,a,o);break;default:throw Error(N(161))}}catch(l){de(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function cv(e,t,n){V=e,Rm(e)}function Rm(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var s=V,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||yi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Re;a=yi;var c=Re;if(yi=o,(Re=l)&&!c)for(V=s;V!==null;)o=V,l=o.child,o.tag===22&&o.memoizedState!==null?Id(s):l!==null?(l.return=o,V=l):Id(s);for(;i!==null;)V=i,Rm(i),i=i.sibling;V=s,yi=a,Re=c}Fd(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,V=i):Fd(e)}}function Fd(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Re||Ro(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&&Es(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}Re||t.flags&512&&Dl(t)}catch(u){de(t,t.return,u)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function zd(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Id(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ro(4,t)}catch(l){de(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){de(t,s,l)}}var i=t.return;try{Dl(t)}catch(l){de(t,i,l)}break;case 5:var o=t.return;try{Dl(t)}catch(l){de(t,o,l)}}}catch(l){de(t,t.return,l)}if(t===e){V=null;break}var a=t.sibling;if(a!==null){a.return=t.return,V=a;break}V=t.return}}var dv=Math.ceil,ao=qt.ReactCurrentDispatcher,Gu=qt.ReactCurrentOwner,lt=qt.ReactCurrentBatchConfig,X=0,Ee=null,xe=null,Me=0,Ye=0,fr=Sn(0),ke=0,zs=null,Hn=0,Vo=0,Yu=0,ps=null,Be=null,Ku=0,_r=1/0,_t=null,lo=!1,Fl=null,fn=null,vi=!1,sn=null,uo=0,ms=0,zl=null,Ri=-1,Vi=0;function Ie(){return X&6?he():Ri!==-1?Ri:Ri=he()}function hn(e){return e.mode&1?X&2&&Me!==0?Me&-Me:Y1.transition!==null?(Vi===0&&(Vi=xp()),Vi):(e=Z,e!==0||(e=window.event,e=e===void 0?16:jp(e.type)),e):1}function yt(e,t,n,r){if(50<ms)throw ms=0,zl=null,Error(N(185));Gs(e,n,r),(!(X&2)||e!==Ee)&&(e===Ee&&(!(X&2)&&(Vo|=n),ke===4&&tn(e,Me)),qe(e,r),n===1&&X===0&&!(t.mode&1)&&(_r=he()+500,Ao&&kn()))}function qe(e,t){var n=e.callbackNode;Yy(e,t);var r=qi(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?G1(Od.bind(null,e)):Hp(Od.bind(null,e)),U1(function(){!(X&6)&&kn()}),n=null;else{switch(wp(r)){case 1:n=bu;break;case 4:n=yp;break;case 16:n=Hi;break;case 536870912:n=vp;break;default:n=Hi}n=Um(n,Vm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Vm(e,t){if(Ri=-1,Vi=0,X&6)throw Error(N(327));var n=e.callbackNode;if(Sr()&&e.callbackNode!==n)return null;var r=qi(e,e===Ee?Me:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=co(e,r);else{t=r;var s=X;X|=2;var i=zm();(Ee!==e||Me!==t)&&(_t=null,_r=he()+500,In(e,t));do try{pv();break}catch(a){Fm(e,a)}while(!0);Du(),ao.current=i,X=s,xe!==null?t=0:(Ee=null,Me=0,t=ke)}if(t!==0){if(t===2&&(s=dl(e),s!==0&&(r=s,t=Il(e,s))),t===1)throw n=zs,In(e,0),tn(e,r),qe(e,he()),n;if(t===6)tn(e,r);else{if(s=e.current.alternate,!(r&30)&&!fv(s)&&(t=co(e,r),t===2&&(i=dl(e),i!==0&&(r=i,t=Il(e,i))),t===1))throw n=zs,In(e,0),tn(e,r),qe(e,he()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:An(e,Be,_t);break;case 3:if(tn(e,r),(r&130023424)===r&&(t=Ku+500-he(),10<t)){if(qi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ie(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=xl(An.bind(null,e,Be,_t),t);break}An(e,Be,_t);break;case 4:if(tn(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=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dv(r/1960))-r,10<r){e.timeoutHandle=xl(An.bind(null,e,Be,_t),r);break}An(e,Be,_t);break;case 5:An(e,Be,_t);break;default:throw Error(N(329))}}}return qe(e,he()),e.callbackNode===n?Vm.bind(null,e):null}function Il(e,t){var n=ps;return e.current.memoizedState.isDehydrated&&(In(e,t).flags|=256),e=co(e,t),e!==2&&(t=Be,Be=n,t!==null&&Ol(t)),e}function Ol(e){Be===null?Be=e:Be.push.apply(Be,e)}function fv(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(!vt(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 tn(e,t){for(t&=~Yu,t&=~Vo,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(X&6)throw Error(N(327));Sr();var t=qi(e,0);if(!(t&1))return qe(e,he()),null;var n=co(e,t);if(e.tag!==0&&n===2){var r=dl(e);r!==0&&(t=r,n=Il(e,r))}if(n===1)throw n=zs,In(e,0),tn(e,t),qe(e,he()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,An(e,Be,_t),qe(e,he()),null}function Xu(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(_r=he()+500,Ao&&kn())}}function qn(e){sn!==null&&sn.tag===0&&!(X&6)&&Sr();var t=X;X|=1;var n=lt.transition,r=Z;try{if(lt.transition=null,Z=1,e)return e()}finally{Z=r,lt.transition=n,X=t,!(X&6)&&kn()}}function Qu(){Ye=fr.current,re(fr)}function In(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,B1(n)),xe!==null)for(n=xe.return;n!==null;){var r=n;switch(_u(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qi();break;case 3:Nr(),re(We),re(Ve),Ou();break;case 5:Iu(r);break;case 4:Nr();break;case 13:re(oe);break;case 19:re(oe);break;case 10:Ru(r.type._context);break;case 22:case 23:Qu()}n=n.return}if(Ee=e,xe=e=pn(e.current,null),Me=Ye=t,ke=0,zs=null,Yu=Vo=Hn=0,Be=ps=null,Vn!==null){for(t=0;t<Vn.length;t++)if(n=Vn[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}Vn=null}return e}function Fm(e,t){do{var n=xe;try{if(Du(),Ai.current=oo,io){for(var r=le.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}io=!1}if(Wn=0,je=be=le=null,fs=!1,Rs=0,Gu.current=null,n===null||n.return===null){ke=1,zs=t,xe=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),Zu();break e}l=Error(N(426))}}else if(ie&&a.mode&1){var w=Ed(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Td(w,o,a,i,t),Au(Mr(l,a));break e}}i=l=Mr(l,a),ke!==4&&(ke=2),ps===null?ps=[i]:ps.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=wm(i,l,t);wd(i,v);break e;case 1:a=l;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(fn===null||!fn.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=bm(i,a,t);wd(i,b);break e}}i=i.return}while(i!==null)}Om(n)}catch(S){t=S,xe===n&&n!==null&&(xe=n=n.return);continue}break}while(!0)}function zm(){var e=ao.current;return ao.current=oo,e===null?oo:e}function Zu(){(ke===0||ke===3||ke===2)&&(ke=4),Ee===null||!(Hn&268435455)&&!(Vo&268435455)||tn(Ee,Me)}function co(e,t){var n=X;X|=2;var r=zm();(Ee!==e||Me!==t)&&(_t=null,In(e,t));do try{hv();break}catch(s){Fm(e,s)}while(!0);if(Du(),X=n,ao.current=r,xe!==null)throw Error(N(261));return Ee=null,Me=0,ke}function hv(){for(;xe!==null;)Im(xe)}function pv(){for(;xe!==null&&!Iy();)Im(xe)}function Im(e){var t=Bm(e.alternate,e,Ye);e.memoizedProps=e.pendingProps,t===null?Om(e):xe=t,Gu.current=null}function Om(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=av(n,t),n!==null){n.flags&=32767,xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,xe=null;return}}else if(n=ov(n,t,Ye),n!==null){xe=n;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);ke===0&&(ke=5)}function An(e,t,n){var r=Z,s=lt.transition;try{lt.transition=null,Z=1,mv(e,t,n,r)}finally{lt.transition=s,Z=r}return null}function mv(e,t,n,r){do Sr();while(sn!==null);if(X&6)throw Error(N(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(N(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Ky(e,i),e===Ee&&(xe=Ee=null,Me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||vi||(vi=!0,Um(Hi,function(){return Sr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=lt.transition,lt.transition=null;var o=Z;Z=1;var a=X;X|=4,Gu.current=null,uv(e,n),Dm(n,e),R1(yl),Gi=!!gl,yl=gl=null,e.current=n,cv(n),Oy(),X=a,Z=o,lt.transition=i}else e.current=n;if(vi&&(vi=!1,sn=e,uo=s),i=e.pendingLanes,i===0&&(fn=null),Uy(n.stateNode),qe(e,he()),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(lo)throw lo=!1,e=Fl,Fl=null,e;return uo&1&&e.tag!==0&&Sr(),i=e.pendingLanes,i&1?e===zl?ms++:(ms=0,zl=e):ms=0,kn(),null}function Sr(){if(sn!==null){var e=wp(uo),t=lt.transition,n=Z;try{if(lt.transition=null,Z=16>e?16:e,sn===null)var r=!1;else{if(e=sn,sn=null,uo=0,X&6)throw Error(N(331));var s=X;for(X|=4,V=e.current;V!==null;){var i=V,o=i.child;if(V.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(V=c;V!==null;){var d=V;switch(d.tag){case 0:case 11:case 15:hs(8,d,i)}var f=d.child;if(f!==null)f.return=d,V=f;else for(;V!==null;){d=V;var u=d.sibling,h=d.return;if(_m(d),d===c){V=null;break}if(u!==null){u.return=h,V=u;break}V=h}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}V=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,V=o;else e:for(;V!==null;){if(i=V,i.flags&2048)switch(i.tag){case 0:case 11:case 15:hs(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,V=v;break e}V=i.return}}var y=e.current;for(V=y;V!==null;){o=V;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,V=x;else e:for(o=y;V!==null;){if(a=V,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ro(9,a)}}catch(S){de(a,a.return,S)}if(a===o){V=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,V=b;break e}V=a.return}}if(X=s,kn(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Eo,e)}catch{}r=!0}return r}finally{Z=n,lt.transition=t}}return!1}function $d(e,t,n){t=Mr(n,t),t=wm(e,t,1),e=dn(e,t,1),t=Ie(),e!==null&&(Gs(e,1,t),qe(e,t))}function de(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"&&(fn===null||!fn.has(r))){e=Mr(n,e),e=bm(t,e,1),t=dn(t,e,1),e=Ie(),t!==null&&(Gs(t,1,e),qe(t,e));break}}t=t.return}}function gv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&n,Ee===e&&(Me&n)===n&&(ke===4||ke===3&&(Me&130023424)===Me&&500>he()-Ku?In(e,0):Yu|=n),qe(e,t)}function $m(e,t){t===0&&(e.mode&1?(t=li,li<<=1,!(li&130023424)&&(li=4194304)):t=1);var n=Ie();e=Bt(e,t),e!==null&&(Gs(e,t,n),qe(e,n))}function yv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$m(e,n)}function vv(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(N(314))}r!==null&&r.delete(t),$m(e,n)}var Bm;Bm=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,iv(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,ie&&t.flags&1048576&&qp(t,eo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Di(e,t),e=t.pendingProps;var s=jr(t,Ve.current);br(t,n),s=Bu(null,t,r,e,s,n);var i=Uu();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,Zi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Fu(t),s.updater=Do,t.stateNode=s,s._reactInternals=t,jl(t,r,e,n),t=Nl(null,t,r,!0,i,n)):(t.tag=0,ie&&i&&Mu(t),ze(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Di(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=wv(r),e=ft(r,e),s){case 0:t=Tl(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(N(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Tl(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(Pm(t),e===null)throw Error(N(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Zp(e,t),ro(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=Mr(Error(N(423)),t),t=Ad(e,t,r,n,s);break e}else if(r!==s){s=Mr(Error(N(424)),t),t=Ad(e,t,r,n,s);break e}else for(Ke=cn(t.stateNode.containerInfo.firstChild),Xe=t,ie=!0,pt=null,n=Xp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Er(),r===s){t=Ut(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return Jp(t),e===null&&kl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,vl(r,s)?o=null:i!==null&&vl(r,i)&&(t.flags|=32),Cm(e,t),ze(e,t,o,n),t.child;case 6:return e===null&&kl(t),null;case 13:return jm(e,t,n);case 4:return zu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tr(t,null,r,n):ze(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 ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(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(to,r._currentValue),r._currentValue=o,i!==null)if(vt(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=Vt(-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),Cl(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(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Cl(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}ze(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,br(t,n),s=ut(s),r=r(s),t.flags|=1,ze(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 Sm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Di(e,t),t.tag=1,He(r)?(e=!0,Zi(t)):e=!1,br(t,n),xm(t,r,s),jl(t,r,s,n),Nl(null,t,r,!0,e,n);case 19:return Em(e,t,n);case 22:return km(e,t,n)}throw Error(N(156,t.tag))};function Um(e,t){return gp(e,t)}function xv(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 ot(e,t,n,r){return new xv(e,t,n,r)}function Ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wv(e){if(typeof e=="function")return Ju(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vu)return 11;if(e===xu)return 14}return 2}function pn(e,t){var n=e.alternate;return n===null?(n=ot(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 Fi(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Ju(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case nr:return On(n.children,s,i,t);case yu:o=8,s|=8;break;case Xa:return e=ot(12,n,t,s|2),e.elementType=Xa,e.lanes=i,e;case Qa:return e=ot(13,n,t,s),e.elementType=Qa,e.lanes=i,e;case Za:return e=ot(19,n,t,s),e.elementType=Za,e.lanes=i,e;case Jh:return Fo(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qh:o=10;break e;case Zh:o=9;break e;case vu:o=11;break e;case xu:o=14;break e;case Qt:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=ot(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function On(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function Fo(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Jh,e.lanes=n,e.stateNode={isHidden:!1},e}function ja(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function Ea(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bv(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=aa(0),this.expirationTimes=aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aa(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ec(e,t,n,r,s,i,o,a,l){return e=new bv(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ot(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fu(i),e}function Sv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Wm(e){if(!e)return vn;e=e._reactInternals;e:{if(Kn(e)!==e||e.tag!==1)throw Error(N(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(N(171))}if(e.tag===1){var n=e.type;if(He(n))return Wp(e,n,t)}return t}function Hm(e,t,n,r,s,i,o,a,l){return e=ec(n,r,!0,e,s,i,o,a,l),e.context=Wm(null),n=e.current,r=Ie(),s=hn(n),i=Vt(r,s),i.callback=t??null,dn(n,i,s),e.current.lanes=s,Gs(e,s,r),qe(e,r),e}function zo(e,t,n,r){var s=t.current,i=Ie(),o=hn(s);return n=Wm(n),t.context===null?t.context=n:t.pendingContext=n,t=Vt(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=dn(s,t,o),e!==null&&(yt(e,s,o,i),_i(e,s,o)),o}function fo(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 tc(e,t){Bd(e,t),(e=e.alternate)&&Bd(e,t)}function kv(){return null}var qm=typeof reportError=="function"?reportError:function(e){console.error(e)};function nc(e){this._internalRoot=e}Io.prototype.render=nc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));zo(e,t,null,null)};Io.prototype.unmount=nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qn(function(){zo(null,e,null,null)}),t[$t]=null}};function Io(e){this._internalRoot=e}Io.prototype.unstable_scheduleHydration=function(e){if(e){var t=kp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<en.length&&t!==0&&t<en[n].priority;n++);en.splice(n,0,e),n===0&&Pp(e)}};function rc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Oo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ud(){}function Cv(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=fo(o);i.call(c)}}var o=Hm(t,r,e,0,null,!1,!1,"",Ud);return e._reactRootContainer=o,e[$t]=o.current,Ms(e.nodeType===8?e.parentNode:e),qn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=fo(l);a.call(c)}}var l=ec(e,0,!1,null,null,!1,!1,"",Ud);return e._reactRootContainer=l,e[$t]=l.current,Ms(e.nodeType===8?e.parentNode:e),qn(function(){zo(t,l,n,r)}),l}function $o(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=fo(o);a.call(l)}}zo(t,o,e,s)}else o=Cv(n,t,e,s,r);return fo(o)}bp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ss(t.pendingLanes);n!==0&&(Su(t,n|1),qe(t,he()),!(X&6)&&(_r=he()+500,kn()))}break;case 13:qn(function(){var r=Bt(e,1);if(r!==null){var s=Ie();yt(r,e,1,s)}}),tc(e,1)}};ku=function(e){if(e.tag===13){var t=Bt(e,134217728);if(t!==null){var n=Ie();yt(t,e,134217728,n)}tc(e,134217728)}};Sp=function(e){if(e.tag===13){var t=hn(e),n=Bt(e,t);if(n!==null){var r=Ie();yt(n,e,t,r)}tc(e,t)}};kp=function(){return Z};Cp=function(e,t){var n=Z;try{return Z=e,t()}finally{Z=n}};ll=function(e,t,n){switch(t){case"input":if(tl(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=_o(r);if(!s)throw Error(N(90));tp(r),tl(r,s)}}}break;case"textarea":rp(e,n);break;case"select":t=n.value,t!=null&&yr(e,!!n.multiple,t,!1)}};cp=Xu;dp=qn;var Pv={usingClientEntryPoint:!1,Events:[Ks,or,_o,lp,up,Xu]},Qr={findFiberByHostInstance:Rn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jv={bundleType:Qr.bundleType,version:Qr.version,rendererPackageName:Qr.rendererPackageName,rendererConfig:Qr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pp(e),e===null?null:e.stateNode},findFiberByHostInstance:Qr.findFiberByHostInstance||kv,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 xi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xi.isDisabled&&xi.supportsFiber)try{Eo=xi.inject(jv),Pt=xi}catch{}}Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pv;Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rc(t))throw Error(N(200));return Sv(e,t,null,n)};Je.createRoot=function(e,t){if(!rc(e))throw Error(N(299));var n=!1,r="",s=qm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ec(e,1,!1,null,null,n,!1,r,s),e[$t]=t.current,Ms(e.nodeType===8?e.parentNode:e),new nc(t)};Je.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(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=pp(t),e=e===null?null:e.stateNode,e};Je.flushSync=function(e){return qn(e)};Je.hydrate=function(e,t,n){if(!Oo(t))throw Error(N(200));return $o(null,e,t,!0,n)};Je.hydrateRoot=function(e,t,n){if(!rc(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=qm;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Hm(t,null,e,1,n??null,s,!1,i,o),e[$t]=t.current,Ms(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 Io(t)};Je.render=function(e,t,n){if(!Oo(t))throw Error(N(200));return $o(null,e,t,!1,n)};Je.unmountComponentAtNode=function(e){if(!Oo(e))throw Error(N(40));return e._reactRootContainer?(qn(function(){$o(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1};Je.unstable_batchedUpdates=Xu;Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Oo(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return $o(e,t,n,!1,r)};Je.version="18.3.1-next-f1338f8080-20240426";function Gm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gm)}catch(e){console.error(e)}}Gm(),Gh.exports=Je;var Ev=Gh.exports,Wd=Ev;Ya.createRoot=Wd.createRoot,Ya.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 Is(){return Is=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},Is.apply(this,arguments)}var on;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(on||(on={}));const Hd="popstate";function Tv(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return $l("",{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:ho(s)}return Mv(t,n,null,e)}function me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ym(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Nv(){return Math.random().toString(36).substr(2,8)}function qd(e,t){return{usr:e.state,key:e.key,idx:t}}function $l(e,t,n,r){return n===void 0&&(n=null),Is({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Or(t):t,{state:n,key:t&&t.key||r||Nv()})}function ho(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 Mv(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=on.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(Is({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=on.Pop;let w=d(),v=w==null?null:w-c;c=w,l&&l({action:a,location:g.location,delta:v})}function u(w,v){a=on.Push;let y=$l(g.location,w,v);c=d()+1;let x=qd(y,c),b=g.createHref(y);try{o.pushState(x,"",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(w,v){a=on.Replace;let y=$l(g.location,w,v);c=d();let x=qd(y,c),b=g.createHref(y);o.replaceState(x,"",b),i&&l&&l({action:a,location:g.location,delta:0})}function p(w){let v=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof w=="string"?w:ho(w);return y=y.replace(/ $/,"%20"),me(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(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Hd,f),l=w,()=>{s.removeEventListener(Hd,f),l=null}},createHref(w){return t(s,w)},createURL:p,encodeLocation(w){let v=p(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:u,replace:h,go(w){return o.go(w)}};return g}var Gd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gd||(Gd={}));function _v(e,t,n){return n===void 0&&(n="/"),Av(e,t,n)}function Av(e,t,n,r){let s=typeof t=="string"?Or(t):t,i=sc(s.pathname||"/",n);if(i==null)return null;let o=Km(e);Lv(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Hv(i);a=Bv(o[l],c)}return a}function Km(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("/")&&(me(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=mn([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(me(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Km(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Ov(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 Xm(i.path))s(i,o,l)}),t}function Xm(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=Xm(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 Lv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$v(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Dv=/^:[\w-]+$/,Rv=3,Vv=2,Fv=1,zv=10,Iv=-2,Yd=e=>e==="*";function Ov(e,t){let n=e.split("/"),r=n.length;return n.some(Yd)&&(r+=Iv),t&&(r+=Vv),n.filter(s=>!Yd(s)).reduce((s,i)=>s+(Dv.test(i)?Rv:i===""?Fv:zv),r)}function $v(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 Bv(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=Uv({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:mn([i,f.pathname]),pathnameBase:Kv(mn([i,f.pathnameBase])),route:u}),f.pathnameBase!=="/"&&(i=mn([i,f.pathnameBase]))}return o}function Uv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Wv(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 Wv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ym(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 Hv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ym(!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 sc(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 qv(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:Gv(n,t):t,search:Xv(r),hash:Qv(s)}}function Gv(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 Ta(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 Yv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ic(e,t){let n=Yv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function oc(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Or(e):(s=Is({},e),me(!s.pathname||!s.pathname.includes("?"),Ta("?","pathname","search",s)),me(!s.pathname||!s.pathname.includes("#"),Ta("#","pathname","hash",s)),me(!s.search||!s.search.includes("#"),Ta("#","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=qv(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const mn=e=>e.join("/").replace(/\/\/+/g,"/"),Kv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Xv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Zv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Qm=["post","put","patch","delete"];new Set(Qm);const Jv=["get",...Qm];new Set(Jv);/**
|
|
* 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 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)}const ac=k.createContext(null),ex=k.createContext(null),Cn=k.createContext(null),Bo=k.createContext(null),Pn=k.createContext({outlet:null,matches:[],isDataRoute:!1}),Zm=k.createContext(null);function tx(e,t){let{relative:n}=t===void 0?{}:t;$r()||me(!1);let{basename:r,navigator:s}=k.useContext(Cn),{hash:i,pathname:o,search:a}=e0(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:mn([r,o])),s.createHref({pathname:l,search:a,hash:i})}function $r(){return k.useContext(Bo)!=null}function jn(){return $r()||me(!1),k.useContext(Bo).location}function Jm(e){k.useContext(Cn).static||k.useLayoutEffect(e)}function Uo(){let{isDataRoute:e}=k.useContext(Pn);return e?px():nx()}function nx(){$r()||me(!1);let e=k.useContext(ac),{basename:t,future:n,navigator:r}=k.useContext(Cn),{matches:s}=k.useContext(Pn),{pathname:i}=jn(),o=JSON.stringify(ic(s,n.v7_relativeSplatPath)),a=k.useRef(!1);return Jm(()=>{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=oc(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:mn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}function e0(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(Cn),{matches:s}=k.useContext(Pn),{pathname:i}=jn(),o=JSON.stringify(ic(s,r.v7_relativeSplatPath));return k.useMemo(()=>oc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function rx(e,t){return sx(e,t)}function sx(e,t,n,r){$r()||me(!1);let{navigator:s}=k.useContext(Cn),{matches:i}=k.useContext(Pn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=jn(),d;if(t){var f;let w=typeof t=="string"?Or(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||me(!1),d=w}else d=c;let u=d.pathname||"/",h=u;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+u.replace(/^\//,"").split("/").slice(w.length).join("/")}let p=_v(e,{pathname:h}),g=ux(p&&p.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:mn([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:mn([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&g?k.createElement(Bo.Provider,{value:{location:Os({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:on.Pop}},g):g}function ix(){let e=hx(),t=Zv(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 ox=k.createElement(ix,null);class ax 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(Pn.Provider,{value:this.props.routeContext},k.createElement(Zm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lx(e){let{routeContext:t,match:n,children:r}=e,s=k.useContext(ac);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(Pn.Provider,{value:t},r)}function ux(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||me(!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,w=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||ox,l&&(c<0&&u===0?(mx("route-fallback"),p=!0,w=null):c===u&&(p=!0,w=f.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,u+1)),y=()=>{let x;return h?x=g:p?x=w:f.route.Component?x=k.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,k.createElement(lx,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||u===0)?k.createElement(ax,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:y(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):y()},null)}var t0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(t0||{}),n0=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}(n0||{});function cx(e){let t=k.useContext(ac);return t||me(!1),t}function dx(e){let t=k.useContext(ex);return t||me(!1),t}function fx(e){let t=k.useContext(Pn);return t||me(!1),t}function r0(e){let t=fx(),n=t.matches[t.matches.length-1];return n.route.id||me(!1),n.route.id}function hx(){var e;let t=k.useContext(Zm),n=dx(),r=r0();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function px(){let{router:e}=cx(t0.UseNavigateStable),t=r0(n0.UseNavigateStable),n=k.useRef(!1);return Jm(()=>{n.current=!0}),k.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Os({fromRouteId:t},i)))},[e,t])}const Kd={};function mx(e,t,n){Kd[e]||(Kd[e]=!0)}function gx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function yx(e){let{to:t,replace:n,state:r,relative:s}=e;$r()||me(!1);let{future:i,static:o}=k.useContext(Cn),{matches:a}=k.useContext(Pn),{pathname:l}=jn(),c=Uo(),d=oc(t,ic(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 Mt(e){me(!1)}function vx(e){let{basename:t="/",children:n=null,location:r,navigationType:s=on.Pop,navigator:i,static:o=!1,future:a}=e;$r()&&me(!1);let l=t.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:l,navigator:i,static:o,future:Os({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 w=sc(d,l);return w==null?null:{location:{pathname:w,search:f,hash:u,state:h,key:p},navigationType:s}},[l,d,f,u,h,p,s]);return g==null?null:k.createElement(Cn.Provider,{value:c},k.createElement(Bo.Provider,{children:n,value:g}))}function xx(e){let{children:t,location:n}=e;return rx(Bl(t),n)}new Promise(()=>{});function Bl(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,Bl(r.props.children,i));return}r.type!==Mt&&me(!1),!r.props.index||!r.props.children||me(!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=Bl(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 Ul(){return Ul=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},Ul.apply(this,arguments)}function wx(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 bx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Sx(e,t){return e.button===0&&(!t||t==="_self")&&!bx(e)}function Wl(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 kx(e,t){let n=Wl(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Cx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Px="6";try{window.__reactRouterVersion=Px}catch{}const jx="startTransition",Xd=gy[jx];function Ex(e){let{basename:t,children:n,future:r,window:s}=e,i=k.useRef();i.current==null&&(i.current=Tv({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(()=>gx(r),[r]),k.createElement(vx,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Tx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Nx=/^(?:[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=wx(t,Cx),{basename:h}=k.useContext(Cn),p,g=!1;if(typeof c=="string"&&Nx.test(c)&&(p=c,Tx))try{let x=new URL(window.location.href),b=c.startsWith("//")?new URL(x.protocol+c):new URL(c),S=sc(b.pathname,h);b.origin===x.origin&&S!=null?c=S+b.search+b.hash:g=!0}catch{}let w=tx(c,{relative:s}),v=Mx(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:f});function y(x){r&&r(x),x.defaultPrevented||v(x)}return k.createElement("a",Ul({},u,{href:p||w,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 Mx(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Uo(),c=jn(),d=e0(e,{relative:o});return k.useCallback(f=>{if(Sx(f,n)){f.preventDefault();let u=r!==void 0?r:ho(c)===ho(d);l(e,{replace:u,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,d,r,s,n,e,i,o,a])}function _x(e){let t=k.useRef(Wl(e)),n=k.useRef(!1),r=jn(),s=k.useMemo(()=>kx(r.search,n.current?null:t.current),[r.search]),i=Uo(),o=k.useCallback((a,l)=>{const c=Wl(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}let Ax={data:""},Lx=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||Ax},Dx=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Rx=/\/\*[^]*?\*\/| +/g,Jd=/\n+/g,nn=(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"?nn(o,i):i+"{"+nn(o,i[1]=="k"?"":t)+"}":typeof o=="object"?r+=nn(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+=nn.p?nn.p(i,o):i+":"+o+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Tt={},s0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+s0(e[n]);return t}return e},Vx=(e,t,n,r,s)=>{let i=s0(e),o=Tt[i]||(Tt[i]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(i));if(!Tt[o]){let l=i!==e?e:(c=>{let d,f,u=[{}];for(;d=Dx.exec(c.replace(Rx,""));)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);Tt[o]=nn(s?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Tt.g?Tt.g:null;return n&&(Tt.g=Tt[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)})(Tt[o],t,r,a),o},Fx=(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?"":nn(a,""):a===!1?"":a}return r+s+(o??"")},"");function Wo(e){let t=this||{},n=e.call?e(t.p):e;return Vx(n.unshift?n.raw?Fx(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,Lx(t.target),t.g,t.o,t.k)}let i0,Hl,ql;Wo.bind({g:1});let Wt=Wo.bind({k:1});function zx(e,t,n,r){nn.p=t,i0=e,Hl=n,ql=r}function En(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:Hl&&Hl()},a),n.o=/ *go\d+/.test(l),a.className=Wo.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),ql&&c[0]&&ql(a),i0(c,a)}return s}}var Ix=e=>typeof e=="function",po=(e,t)=>Ix(e)?e(t):e,Ox=(()=>{let e=0;return()=>(++e).toString()})(),o0=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),$x=20,lc="default",a0=(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 a0(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}))}}},Ii=[],l0={toasts:[],pausedAt:void 0,settings:{toastLimit:$x}},kt={},u0=(e,t=lc)=>{kt[t]=a0(kt[t]||l0,e),Ii.forEach(([n,r])=>{n===t&&r(kt[t])})},c0=e=>Object.keys(kt).forEach(t=>u0(e,t)),Bx=e=>Object.keys(kt).find(t=>kt[t].toasts.some(n=>n.id===e)),Ho=(e=lc)=>t=>{u0(t,e)},Ux={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Wx=(e={},t=lc)=>{let[n,r]=k.useState(kt[t]||l0),s=k.useRef(kt[t]);k.useEffect(()=>(s.current!==kt[t]&&r(kt[t]),Ii.push([t,r]),()=>{let o=Ii.findIndex(([a])=>a===t);o>-1&&Ii.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)||Ux[o.type],style:{...e.style,...(c=e[o.type])==null?void 0:c.style,...o.style}}});return{...n,toasts:i}},Hx=(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)||Ox()}),Qs=e=>(t,n)=>{let r=Hx(t,e,n);return Ho(r.toasterId||Bx(r.id))({type:2,toast:r}),r.id},Se=(e,t)=>Qs("blank")(e,t);Se.error=Qs("error");Se.success=Qs("success");Se.loading=Qs("loading");Se.custom=Qs("custom");Se.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Ho(t)(n):c0(n)};Se.dismissAll=e=>Se.dismiss(void 0,e);Se.remove=(e,t)=>{let n={type:4,toastId:e};t?Ho(t)(n):c0(n)};Se.removeAll=e=>Se.remove(void 0,e);Se.promise=(e,t,n)=>{let r=Se.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let i=t.success?po(t.success,s):void 0;return i?Se.success(i,{id:r,...n,...n==null?void 0:n.success}):Se.dismiss(r),s}).catch(s=>{let i=t.error?po(t.error,s):void 0;i?Se.error(i,{id:r,...n,...n==null?void 0:n.error}):Se.dismiss(r)}),e};var qx=1e3,Gx=(e,t="default")=>{let{toasts:n,pausedAt:r}=Wx(e,t),s=k.useRef(new Map).current,i=k.useCallback((f,u=qx)=>{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&&Se.dismiss(h.id);return}return setTimeout(()=>Se.dismiss(h.id,t),p)});return()=>{u.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let o=k.useCallback(Ho(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||{},w=n.filter(x=>(x.position||g)===(f.position||g)&&x.height),v=w.findIndex(x=>x.id===f.id),y=w.filter((x,b)=>b<v&&x.visible).length;return w.filter(x=>x.visible).slice(...h?[y+1]:[0,y]).reduce((x,b)=>x+(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}}},Yx=Wt`
|
|
from {
|
|
transform: scale(0) rotate(45deg);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1) rotate(45deg);
|
|
opacity: 1;
|
|
}`,Kx=Wt`
|
|
from {
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}`,Xx=Wt`
|
|
from {
|
|
transform: scale(0) rotate(90deg);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1) rotate(90deg);
|
|
opacity: 1;
|
|
}`,Qx=En("div")`
|
|
width: 20px;
|
|
opacity: 0;
|
|
height: 20px;
|
|
border-radius: 10px;
|
|
background: ${e=>e.primary||"#ff4b4b"};
|
|
position: relative;
|
|
transform: rotate(45deg);
|
|
|
|
animation: ${Yx} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
forwards;
|
|
animation-delay: 100ms;
|
|
|
|
&:after,
|
|
&:before {
|
|
content: '';
|
|
animation: ${Kx} 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: ${Xx} 0.15s ease-out forwards;
|
|
animation-delay: 180ms;
|
|
transform: rotate(90deg);
|
|
}
|
|
`,Zx=Wt`
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
`,Jx=En("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: ${Zx} 1s linear infinite;
|
|
`,e2=Wt`
|
|
from {
|
|
transform: scale(0) rotate(45deg);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1) rotate(45deg);
|
|
opacity: 1;
|
|
}`,t2=Wt`
|
|
0% {
|
|
height: 0;
|
|
width: 0;
|
|
opacity: 0;
|
|
}
|
|
40% {
|
|
height: 0;
|
|
width: 6px;
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
height: 10px;
|
|
}`,n2=En("div")`
|
|
width: 20px;
|
|
opacity: 0;
|
|
height: 20px;
|
|
border-radius: 10px;
|
|
background: ${e=>e.primary||"#61d345"};
|
|
position: relative;
|
|
transform: rotate(45deg);
|
|
|
|
animation: ${e2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
forwards;
|
|
animation-delay: 100ms;
|
|
&:after {
|
|
content: '';
|
|
box-sizing: border-box;
|
|
animation: ${t2} 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;
|
|
}
|
|
`,r2=En("div")`
|
|
position: absolute;
|
|
`,s2=En("div")`
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-width: 20px;
|
|
min-height: 20px;
|
|
`,i2=Wt`
|
|
from {
|
|
transform: scale(0.6);
|
|
opacity: 0.4;
|
|
}
|
|
to {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}`,o2=En("div")`
|
|
position: relative;
|
|
transform: scale(0.6);
|
|
opacity: 0.4;
|
|
min-width: 20px;
|
|
animation: ${i2} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
forwards;
|
|
`,a2=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?k.createElement(o2,null,t):t:n==="blank"?null:k.createElement(s2,null,k.createElement(Jx,{...r}),n!=="loading"&&k.createElement(r2,null,n==="error"?k.createElement(Qx,{...r}):k.createElement(n2,{...r})))},l2=e=>`
|
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
`,u2=e=>`
|
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
`,c2="0%{opacity:0;} 100%{opacity:1;}",d2="0%{opacity:1;} 100%{opacity:0;}",f2=En("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;
|
|
`,h2=En("div")`
|
|
display: flex;
|
|
justify-content: center;
|
|
margin: 4px 10px;
|
|
color: inherit;
|
|
flex: 1 1 auto;
|
|
white-space: pre-line;
|
|
`,p2=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=o0()?[c2,d2]:[l2(n),u2(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)`}},m2=k.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?p2(e.position||t||"top-center",e.visible):{opacity:0},i=k.createElement(a2,{toast:e}),o=k.createElement(h2,{...e.ariaProps},po(e.message,e));return k.createElement(f2,{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 g2=({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)},y2=(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:o0()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},v2=Wo`
|
|
z-index: 9999;
|
|
> * {
|
|
pointer-events: auto;
|
|
}
|
|
`,wi=16,x2=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,toasterId:i,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:c}=Gx(n,i);return k.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:wi,left:wi,right:wi,bottom:wi,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=y2(f,u);return k.createElement(g2,{id:d.id,key:d.id,onHeightUpdate:c.updateHeight,className:d.visible?v2:"",style:h},d.type==="custom"?po(d.message,d):s?s(d):k.createElement(m2,{toast:d,position:f}))}))},Pe=Se;const d0=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),qo=k.createContext({}),uc=k.createContext(null),Go=typeof document<"u",w2=Go?k.useLayoutEffect:k.useEffect,f0=k.createContext({strict:!1}),cc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),b2="framerAppearId",h0="data-"+cc(b2);function S2(e,t,n,r){const{visualElement:s}=k.useContext(qo),i=k.useContext(f0),o=k.useContext(uc),a=k.useContext(d0).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[h0]&&!window.HandoffComplete));return w2(()=>{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 hr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k2(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):hr(n)&&(n.current=r))},[t])}function $s(e){return typeof e=="string"||Array.isArray(e)}function Yo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const dc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fc=["initial",...dc];function Ko(e){return Yo(e.animate)||fc.some(t=>$s(e[t]))}function p0(e){return!!(Ko(e)||e.variants)}function C2(e,t){if(Ko(e)){const{initial:n,animate:r}=e;return{initial:n===!1||$s(n)?n:void 0,animate:$s(r)?r:void 0}}return e.inherit!==!1?t:{}}function P2(e){const{initial:t,animate:n}=C2(e,k.useContext(qo));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"]},Bs={};for(const e in tf)Bs[e]={isEnabled:t=>tf[e].some(n=>!!t[n])};function j2(e){for(const t in e)Bs[t]={...Bs[t],...e[t]}}const m0=k.createContext({}),g0=k.createContext({}),E2=Symbol.for("motionComponentSymbol");function T2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&j2(e);function i(a,l){let c;const d={...k.useContext(d0),...a,layoutId:N2(a)},{isStatic:f}=d,u=P2(a),h=r(a,f);if(!f&&Go){u.visualElement=S2(s,h,d,t);const p=k.useContext(g0),g=k.useContext(f0).strict;u.visualElement&&(c=u.visualElement.loadFeatures(d,g,e,p))}return k.createElement(qo.Provider,{value:u},c&&u.visualElement?k.createElement(c,{visualElement:u.visualElement,...d}):null,n(s,a,k2(h,u.visualElement,l),h,f,u.visualElement))}const o=k.forwardRef(i);return o[E2]=s,o}function N2({layoutId:e}){const t=k.useContext(m0).id;return t&&e!==void 0?t+"-"+e:e}function M2(e){function t(r,s={}){return T2(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 _2=["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 hc(e){return typeof e!="string"||e.includes("-")?!1:!!(_2.indexOf(e)>-1||/[A-Z]/.test(e))}const mo={};function A2(e){Object.assign(mo,e)}const Zs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xn=new Set(Zs);function y0(e,{layout:t,layoutId:n}){return Xn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mo[e]||e==="opacity")}const Ge=e=>!!(e&&e.getVelocity),L2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},D2=Zs.length;function R2(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,s){let i="";for(let o=0;o<D2;o++){const a=Zs[o];if(e[a]!==void 0){const l=L2[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 v0=e=>t=>typeof t=="string"&&t.startsWith(e),x0=v0("--"),Gl=v0("var(--"),V2=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,F2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,xn=(e,t,n)=>Math.min(Math.max(n,e),t),Qn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gs={...Qn,transform:e=>xn(0,1,e)},bi={...Qn,default:1},ys=e=>Math.round(e*1e5)/1e5,Xo=/(-)?([\d]*\.?[\d])+/g,w0=/(#[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 Js(e){return typeof e=="string"}const ei=e=>({test:t=>Js(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xt=ei("deg"),Et=ei("%"),U=ei("px"),I2=ei("vh"),O2=ei("vw"),nf={...Et,parse:e=>Et.parse(e)/100,transform:e=>Et.transform(e*100)},rf={...Qn,transform:Math.round},b0={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,size:U,top:U,right:U,bottom:U,left:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,rotate:Xt,rotateX:Xt,rotateY:Xt,rotateZ:Xt,scale:bi,scaleX:bi,scaleY:bi,scaleZ:bi,skew:Xt,skewX:Xt,skewY:Xt,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:gs,originX:nf,originY:nf,originZ:U,zIndex:rf,fillOpacity:gs,strokeOpacity:gs,numOctaves:rf};function pc(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(x0(f)){i[f]=u;continue}const h=b0[f],p=F2(u,h);if(Xn.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=R2(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 mc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function S0(e,t,n){for(const r in t)!Ge(t[r])&&!y0(r,n)&&(e[r]=t[r])}function $2({transformTemplate:e},t,n){return k.useMemo(()=>{const r=mc();return pc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function B2(e,t,n){const r=e.style||{},s={};return S0(s,r,e),Object.assign(s,$2(e,t,n)),e.transformValues?e.transformValues(s):s}function U2(e,t,n){const r={},s=B2(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 W2=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 go(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||W2.has(e)}let k0=e=>!go(e);function H2(e){e&&(k0=t=>t.startsWith("on")?!go(t):e(t))}try{H2(require("@emotion/is-prop-valid").default)}catch{}function q2(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(k0(s)||n===!0&&go(s)||!t&&!go(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function sf(e,t,n){return typeof e=="string"?e:U.transform(t+n*e)}function G2(e,t,n){const r=sf(t,e.x,e.width),s=sf(n,e.y,e.height);return`${r} ${s}`}const Y2={offset:"stroke-dashoffset",array:"stroke-dasharray"},K2={offset:"strokeDashoffset",array:"strokeDasharray"};function X2(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Y2:K2;e[i.offset]=U.transform(-r);const o=U.transform(t),a=U.transform(n);e[i.array]=`${o} ${a}`}function gc(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,f,u){if(pc(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=G2(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&&X2(h,o,a,l,!1)}const C0=()=>({...mc(),attrs:{}}),yc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Q2(e,t,n,r){const s=k.useMemo(()=>{const i=C0();return gc(i,t,{enableHardwareAcceleration:!1},yc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};S0(i,e.style,e),s.style={...i,...s.style}}return s}function Z2(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(hc(n)?Q2:U2)(r,i,o,n),d={...q2(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 P0(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 j0=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 E0(e,t,n,r){P0(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(j0.has(s)?s:cc(s),t.attrs[s])}function vc(e,t){const{style:n}=e,r={};for(const s in n)(Ge(n[s])||t.style&&Ge(t.style[s])||y0(s,e))&&(r[s]=n[s]);return r}function T0(e,t){const n=vc(e,t);for(const r in e)if(Ge(e[r])||Ge(t[r])){const s=Zs.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[s]=e[r]}return n}function xc(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 J2(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const yo=e=>Array.isArray(e),ew=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tw=e=>yo(e)?e[e.length-1]||0:e;function Oi(e){const t=Ge(e)?e.get():e;return ew(t)?t.toValue():t}function nw({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,s,i){const o={latestValues:rw(r,s,i,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const N0=e=>(t,n)=>{const r=k.useContext(qo),s=k.useContext(uc),i=()=>nw(e,t,r,s);return n?i():J2(i)};function rw(e,t,n,r){const s={},i=r(e,{});for(const u in i)s[u]=Oi(i[u]);let{initial:o,animate:a}=e;const l=Ko(e),c=p0(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"&&!Yo(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=xc(e,h);if(!p)return;const{transitionEnd:g,transition:w,...v}=p;for(const y in v){let x=v[y];if(Array.isArray(x)){const b=d?x.length-1:0;x=x[b]}x!==null&&(s[y]=x)}for(const y in g)s[y]=g[y]}),s}const pe=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 sw(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 Si=["prepare","read","update","preRender","render","postRender"],iw=40;function ow(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=Si.reduce((f,u)=>(f[u]=sw(()=>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,iw),1),s.timestamp=f,s.isProcessing=!0,Si.forEach(o),s.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,s.isProcessing||e(a)};return{schedule:Si.reduce((f,u)=>{const h=i[u];return f[u]=(p,g=!1,w=!1)=>(n||l(),h.schedule(p,g,w)),f},{}),cancel:f=>Si.forEach(u=>i[u].cancel(f)),state:s,steps:i}}const{schedule:se,cancel:Ht,state:De,steps:Na}=ow(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0),aw={useVisualState:N0({scrapeMotionValuesFromProps:T0,createRenderState:C0,onMount:(e,t,{renderState:n,latestValues:r})=>{se.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),se.render(()=>{gc(n,r,{enableHardwareAcceleration:!1},yc(t.tagName),e.transformTemplate),E0(t,n)})}})},lw={useVisualState:N0({scrapeMotionValuesFromProps:vc,createRenderState:mc})};function uw(e,{forwardMotionProps:t=!1},n,r){return{...hc(e)?aw:lw,preloadedFeatures:n,useRender:Z2(t),createVisualElement:r,Component:e}}function Rt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const M0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Qo(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const cw=e=>t=>M0(t)&&e(t,Qo(t));function Ft(e,t,n,r){return Rt(e,t,cw(n),r)}const dw=(e,t)=>n=>t(e(n)),gn=(...e)=>e.reduce(dw);function _0(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const af=_0("dragHorizontal"),lf=_0("dragVertical");function A0(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 L0(){const e=A0(!0);return e?(e(),!1):!0}class Tn{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"||L0())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&se.update(()=>a[r](i,o))};return Ft(e.current,n,s,{passive:!e.getProps()[r]})}class fw extends Tn{mount(){this.unmount=gn(uf(this.node,!0),uf(this.node,!1))}unmount(){}}class hw extends Tn{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=gn(Rt(this.node.current,"focus",()=>this.onFocus()),Rt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const D0=(e,t)=>t?e===t?!0:D0(e,t.parentElement):!1;function Ma(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Qo(n))}class pw extends Tn{constructor(){super(...arguments),this.removeStartListeners=pe,this.removeEndListeners=pe,this.removeAccessibleListeners=pe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Ft(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:d,globalTapTarget:f}=this.node.getProps();se.update(()=>{!f&&!D0(this.node.current,a.target)?d&&d(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=Ft(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gn(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()||Ma("up",(l,c)=>{const{onTap:d}=this.node.getProps();d&&se.update(()=>d(l,c))})};this.removeEndListeners(),this.removeEndListeners=Rt(this.node.current,"keyup",o),Ma("down",(a,l)=>{this.startPress(a,l)})},n=Rt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ma("cancel",(i,o)=>this.cancelPress(i,o))},s=Rt(this.node.current,"blur",r);this.removeAccessibleListeners=gn(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&&se.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!L0()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&se.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ft(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Rt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Yl=new WeakMap,_a=new WeakMap,mw=e=>{const t=Yl.get(e.target);t&&t(e)},gw=e=>{e.forEach(mw)};function yw({root:e,...t}){const n=e||document;_a.has(n)||_a.set(n,{});const r=_a.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(gw,{root:e,...t})),r[s]}function vw(e,t,n){const r=yw(t);return Yl.set(e,n),r.observe(e),()=>{Yl.delete(e),r.unobserve(e)}}const xw={some:0,all:1};class ww extends Tn{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:xw[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 vw(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(bw(t,n))&&this.startObserver()}unmount(){}}function bw({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Sw={inView:{Feature:ww},tap:{Feature:pw},focus:{Feature:hw},hover:{Feature:fw}};function R0(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 kw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Cw(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Zo(e,t,n){const r=e.getProps();return xc(r,t,n!==void 0?n:r.custom,kw(e),Cw(e))}let wc=pe;const $n=e=>e*1e3,zt=e=>e/1e3,Pw={current:!1},V0=e=>Array.isArray(e)&&typeof e[0]=="number";function F0(e){return!!(!e||typeof e=="string"&&z0[e]||V0(e)||Array.isArray(e)&&e.every(F0))}const os=([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:os([0,.65,.55,1]),circOut:os([.55,0,1,.45]),backIn:os([.31,.01,.66,-.59]),backOut:os([.33,1.53,.69,.99])};function I0(e){if(e)return V0(e)?os(e):Array.isArray(e)?e.map(I0):z0[e]}function jw(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=I0(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 Ew(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const O0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tw=1e-7,Nw=12;function Mw(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=O0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Tw&&++a<Nw);return o}function ti(e,t,n,r){if(e===t&&n===r)return pe;const s=i=>Mw(i,0,1,e,n);return i=>i===0||i===1?i:O0(s(i),t,r)}const _w=ti(.42,0,1,1),Aw=ti(0,0,.58,1),$0=ti(.42,0,.58,1),Lw=e=>Array.isArray(e)&&typeof e[0]!="number",B0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U0=e=>t=>1-e(1-t),bc=e=>1-Math.sin(Math.acos(e)),W0=U0(bc),Dw=B0(bc),H0=ti(.33,1.53,.69,.99),Sc=U0(H0),Rw=B0(Sc),Vw=e=>(e*=2)<1?.5*Sc(e):.5*(2-Math.pow(2,-10*(e-1))),Fw={linear:pe,easeIn:_w,easeInOut:$0,easeOut:Aw,circIn:bc,circInOut:Dw,circOut:W0,backIn:Sc,backInOut:Rw,backOut:H0,anticipate:Vw},cf=e=>{if(Array.isArray(e)){wc(e.length===4);const[t,n,r,s]=e;return ti(t,n,r,s)}else if(typeof e=="string")return Fw[e];return e},kc=(e,t)=>n=>!!(Js(n)&&z2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),q0=(e,t,n)=>r=>{if(!Js(r))return r;const[s,i,o,a]=r.match(Xo);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zw=e=>xn(0,255,e),Aa={...Qn,transform:e=>Math.round(zw(e))},zn={test:kc("rgb","red"),parse:q0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Aa.transform(e)+", "+Aa.transform(t)+", "+Aa.transform(n)+", "+ys(gs.transform(r))+")"};function Iw(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 Kl={test:kc("#"),parse:Iw,transform:zn.transform},pr={test:kc("hsl","hue"),parse:q0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Et.transform(ys(t))+", "+Et.transform(ys(n))+", "+ys(gs.transform(r))+")"},Fe={test:e=>zn.test(e)||Kl.test(e)||pr.test(e),parse:e=>zn.test(e)?zn.parse(e):pr.test(e)?pr.parse(e):Kl.parse(e),transform:e=>Js(e)?e:e.hasOwnProperty("red")?zn.transform(e):pr.transform(e)},ae=(e,t,n)=>-n*e+n*t+e;function La(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 Ow({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=La(l,a,e+1/3),i=La(l,a,e),o=La(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}const Da=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},$w=[Kl,zn,pr],Bw=e=>$w.find(t=>t.test(e));function df(e){const t=Bw(e);let n=t.parse(e);return t===pr&&(n=Ow(n)),n}const G0=(e,t)=>{const n=df(e),r=df(t),s={...n};return i=>(s.red=Da(n.red,r.red,i),s.green=Da(n.green,r.green,i),s.blue=Da(n.blue,r.blue,i),s.alpha=ae(n.alpha,r.alpha,i),zn.transform(s))};function Uw(e){var t,n;return isNaN(e)&&Js(e)&&(((t=e.match(Xo))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(w0))===null||n===void 0?void 0:n.length)||0)>0}const Y0={regex:V2,countKey:"Vars",token:"${v}",parse:pe},K0={regex:w0,countKey:"Colors",token:"${c}",parse:Fe.parse},X0={regex:Xo,countKey:"Numbers",token:"${n}",parse:Qn.parse};function Ra(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 vo(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ra(n,Y0),Ra(n,K0),Ra(n,X0),n}function Q0(e){return vo(e).values}function Z0(e){const{values:t,numColors:n,numVars:r,tokenised:s}=vo(e),i=t.length;return o=>{let a=s;for(let l=0;l<i;l++)l<r?a=a.replace(Y0.token,o[l]):l<r+n?a=a.replace(K0.token,Fe.transform(o[l])):a=a.replace(X0.token,ys(o[l]));return a}}const Ww=e=>typeof e=="number"?0:e;function Hw(e){const t=Q0(e);return Z0(e)(t.map(Ww))}const wn={test:Uw,parse:Q0,createTransformer:Z0,getAnimatableNone:Hw},J0=(e,t)=>n=>`${n>0?t:e}`;function eg(e,t){return typeof e=="number"?n=>ae(e,t,n):Fe.test(e)?G0(e,t):e.startsWith("var(")?J0(e,t):ng(e,t)}const tg=(e,t)=>{const n=[...e],r=n.length,s=e.map((i,o)=>eg(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}},qw=(e,t)=>{const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=eg(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}},ng=(e,t)=>{const n=wn.createTransformer(t),r=vo(e),s=vo(t);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?gn(tg(r.values,s.values),n):J0(e,t)},Us=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ff=(e,t)=>n=>ae(e,t,n);function Gw(e){return typeof e=="number"?ff:typeof e=="string"?Fe.test(e)?G0:ng:Array.isArray(e)?tg:typeof e=="object"?qw:ff}function Yw(e,t,n){const r=[],s=n||Gw(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]||pe:t;a=gn(l,a)}r.push(a)}return r}function rg(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(wc(i===t.length),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Yw(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=Us(e[d],e[d+1],c);return o[d](f)};return n?c=>l(xn(e[0],e[i-1],c)):l}function Kw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Us(0,t,r);e.push(ae(n,1,s))}}function Xw(e){const t=[0];return Kw(t,e.length-1),t}function Qw(e,t){return e.map(n=>n*t)}function Zw(e,t){return e.map(()=>t||$0).splice(0,e.length-1)}function xo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Lw(r)?r.map(cf):cf(r),i={done:!1,value:t[0]},o=Qw(n&&n.length===t.length?n:Xw(t),e),a=rg(o,t,{ease:Array.isArray(s)?s:Zw(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function sg(e,t){return t?e*(1e3/t):0}const Jw=5;function ig(e,t,n){const r=Math.max(t-Jw,0);return sg(n-e(r),t-r)}const Va=.001,e5=.01,t5=10,n5=.05,r5=1;function s5({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let s,i,o=1-t;o=xn(n5,r5,o),e=xn(e5,t5,zt(e)),o<1?(s=c=>{const d=c*o,f=d*e,u=d-n,h=Xl(c,o),p=Math.exp(-f);return Va-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=Xl(Math.pow(c,2),o);return(-s(c)+Va>0?-1:1)*((u-h)*p)/g}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-Va+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=o5(s,i,a);if(e=$n(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 i5=12;function o5(e,t,n){let r=n;for(let s=1;s<i5;s++)r=r-e(r)/t(r);return r}function Xl(e,t){return e*Math.sqrt(1-t*t)}const a5=["duration","bounce"],l5=["stiffness","damping","mass"];function hf(e,t){return t.some(n=>e[n]!==void 0)}function u5(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hf(e,l5)&&hf(e,a5)){const n=s5(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function og({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}=u5({...r,velocity:-zt(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),g=i-s,w=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 x=Xl(w,p);y=b=>{const S=Math.exp(-p*w*b);return i-S*((h+p*w*g)/x*Math.sin(x*b)+g*Math.cos(x*b))}}else if(p===1)y=x=>i-Math.exp(-w*x)*(g+(h+w*g)*x);else{const x=w*Math.sqrt(p*p-1);y=b=>{const S=Math.exp(-p*w*b),C=Math.min(x*b,300);return i-S*((h+p*w*g)*Math.sinh(C)+x*g*Math.cosh(C))/x}}return{calculatedDuration:u&&d||null,next:x=>{const b=y(x);if(u)o.done=x>=d;else{let S=h;x!==0&&(p<1?S=ig(y,x,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 w=f+g,v=o===void 0?w:o(w);v!==w&&(g=v-f);const y=j=>-g*Math.exp(-j/r),x=j=>v+y(j),b=j=>{const _=y(j),T=x(j);u.done=Math.abs(_)<=c,u.value=u.done?v:T};let S,C;const P=j=>{h(u.value)&&(S=j,C=og({keyframes:[u.value,p(u.value)],velocity:ig(x,j,u.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return P(0),{calculatedDuration:null,next:j=>{let _=!1;return!C&&S===void 0&&(_=!0,b(j),P(j)),S!==void 0&&j>S?C.next(j-S):(!_&&b(j),u)}}}const c5=e=>{const t=({timestamp:n})=>e(n);return{start:()=>se.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 d5={decay:pf,inertia:pf,tween:xo,keyframes:xo,spring:og};function wo({autoplay:e=!0,delay:t=0,driver:n=c5,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,w;const v=()=>{w=new Promise(R=>{g=R})};v();let y;const x=d5[s]||xo;let b;x!==xo&&typeof r[0]!="number"&&(b=rg([0,100],r,{clamp:!1}),r=[0,100]);const S=x({...u,keyframes:r});let C;a==="mirror"&&(C=x({...u,keyframes:[...r].reverse(),velocity:-(u.velocity||0)}));let P="idle",j=null,_=null,T=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=gf(S));const{calculatedDuration:F}=S;let L=1/0,W=1/0;F!==null&&(L=F+o,W=L*(i+1)-o);let A=0;const O=R=>{if(_===null)return;h>0&&(_=Math.min(_,R)),h<0&&(_=Math.min(R-W/h,_)),j!==null?A=j:A=Math.round(R-_)*h;const E=A-t*(h>=0?1:-1),Y=h>=0?E<0:E>W;A=Math.max(E,0),P==="finished"&&j===null&&(A=W);let Q=A,ce=S;if(i){const Zn=Math.min(A,W)/L;let Nn=Math.floor(Zn),xt=Zn%1;!xt&&Zn>=1&&(xt=1),xt===1&&Nn--,Nn=Math.min(Nn,i+1),!!(Nn%2)&&(a==="reverse"?(xt=1-xt,o&&(xt-=o/L)):a==="mirror"&&(ce=C)),Q=xn(0,1,xt)*L}const G=Y?{done:!1,value:r[0]}:ce.next(Q);b&&(G.value=b(G.value));let{done:we}=G;!Y&&F!==null&&(we=h>=0?A>=W:A<=0);const ni=j===null&&(P==="finished"||P==="running"&&we);return f&&f(G.value),ni&&M(),G},B=()=>{y&&y.stop(),y=void 0},K=()=>{P="idle",B(),g(),v(),_=T=null},M=()=>{P="finished",d&&d(),B(),g()},D=()=>{if(p)return;y||(y=n(O));const R=y.now();l&&l(),j!==null?_=R-j:(!_||P==="finished")&&(_=R),P==="finished"&&v(),T=_,j=null,P="running",y.start()};e&&D();const z={then(R,E){return w.then(R,E)},get time(){return zt(A)},set time(R){R=$n(R),A=R,j!==null||!y||h===0?j=R:_=y.now()-R/h},get duration(){const R=S.calculatedDuration===null?gf(S):S.calculatedDuration;return zt(R)},get speed(){return h},set speed(R){R===h||!y||(h=R,z.time=zt(A))},get state(){return P},play:D,pause:()=>{P="paused",j=A},stop:()=>{p=!0,P!=="idle"&&(P="idle",c&&c(),K())},cancel:()=>{T!==null&&O(T),K()},complete:()=>{P="finished"},sample:R=>(_=0,O(R))};return z}function f5(e){let t;return()=>(t===void 0&&(t=e()),t)}const h5=f5(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),p5=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ki=10,m5=2e4,g5=(e,t)=>t.type==="spring"||e==="backgroundColor"||!F0(t.ease);function y5(e,t,{onUpdate:n,onComplete:r,...s}){if(!(h5()&&p5.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(x=>{a=x})};d();let{keyframes:f,duration:u=300,ease:h,times:p}=s;if(g5(t,s)){const x=wo({...s,repeat:0,delay:0});let b={done:!1,value:f[0]};const S=[];let C=0;for(;!b.done&&C<m5;)b=x.sample(C),S.push(b.value),C+=ki;p=void 0,f=S,u=C-ki,h="linear"}const g=jw(e.owner.current,t,f,{...s,duration:u,ease:h,times:p}),w=()=>{c=!1,g.cancel()},v=()=>{c=!0,se.update(w),a(),d()};return g.onfinish=()=>{c||(e.set(Ew(f,s)),r&&r(),v())},{then(x,b){return l.then(x,b)},attachTimeline(x){return g.timeline=x,g.onfinish=null,pe},get time(){return zt(g.currentTime||0)},set time(x){g.currentTime=$n(x)},get speed(){return g.playbackRate},set speed(x){g.playbackRate=x},get duration(){return zt(u)},play:()=>{o||(g.play(),Ht(w))},pause:()=>g.pause(),stop:()=>{if(o=!0,g.playState==="idle")return;const{currentTime:x}=g;if(x){const b=wo({...s,autoplay:!1});e.setWithVelocity(b.sample(x-ki).value,b.sample(x).value,ki)}v()},complete:()=>{c||g.finish()},cancel:v}}function v5({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:pe,pause:pe,stop:pe,then:i=>(i(),Promise.resolve()),cancel:pe,complete:pe});return t?wo({keyframes:[0,1],duration:0,delay:t,onComplete:s}):s()}const x5={type:"spring",stiffness:500,damping:25,restSpeed:10},w5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),b5={type:"keyframes",duration:.8},S5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},k5=(e,{keyframes:t})=>t.length>2?b5:Xn.has(e)?e.startsWith("scale")?w5(t[1]):x5:S5,Ql=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wn.test(t)||t==="0")&&!t.startsWith("url(")),C5=new Set(["brightness","contrast","saturate","opacity"]);function P5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xo)||[];if(!r)return e;const s=n.replace(r,"");let i=C5.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const j5=/([a-z-]*)\(.*?\)/g,Zl={...wn,getAnimatableNone:e=>{const t=e.match(j5);return t?t.map(P5).join(" "):e}},E5={...b0,color:Fe,backgroundColor:Fe,outlineColor:Fe,fill:Fe,stroke:Fe,borderColor:Fe,borderTopColor:Fe,borderRightColor:Fe,borderBottomColor:Fe,borderLeftColor:Fe,filter:Zl,WebkitFilter:Zl},Cc=e=>E5[e];function ag(e,t){let n=Cc(e);return n!==Zl&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lg=e=>/^0[^.\s]+$/.test(e);function T5(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||lg(e)}function N5(e,t,n,r){const s=Ql(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]),T5(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]=ag(t,a)}return i}function M5({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 Pc(e,t){return e[t]||e.default||e}const _5={skipAnimations:!1},jc=(e,t,n,r={})=>s=>{const i=Pc(r,e)||{},o=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-$n(o);const l=N5(t,e,n,i),c=l[0],d=l[l.length-1],f=Ql(e,c),u=Ql(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(M5(i)||(h={...h,...k5(e,h)}),h.duration&&(h.duration=$n(h.duration)),h.repeatDelay&&(h.repeatDelay=$n(h.repeatDelay)),!f||!u||Pw.current||i.type===!1||_5.skipAnimations)return v5(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=y5(t,e,h);if(p)return p}return wo(h)};function bo(e){return!!(Ge(e)&&e.add)}const ug=e=>/^\-?\d*\.?\d+$/.test(e);function Ec(e,t){e.indexOf(t)===-1&&e.push(t)}function Tc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nc{constructor(){this.subscriptions=[]}add(t){return Ec(this.subscriptions,t),()=>Tc(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 A5=e=>!isNaN(parseFloat(e));class L5{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,se.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=()=>se.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=A5(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Nc);const r=this.events[t].add(n);return t==="change"?()=>{r(),se.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?sg(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 Ar(e,t){return new L5(e,t)}const cg=e=>t=>t.test(e),D5={test:e=>e==="auto",parse:e=>e},dg=[Qn,U,Et,Xt,O2,I2,D5],Zr=e=>dg.find(cg(e)),R5=[...dg,Fe,wn],V5=e=>R5.find(cg(e));function F5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ar(n))}function z5(e,t){const n=Zo(e,t);let{transitionEnd:r={},transition:s={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const o in i){const a=tw(i[o]);F5(e,o,a)}}function I5(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"&&(ug(d)||lg(d))?d=parseFloat(d):!V5(d)&&wn.test(c)&&(d=ag(l,c)),e.addValue(l,Ar(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function O5(e,t){return t?(t[e]||t.default||t).from:void 0}function $5(e,t,n){const r={};for(const s in e){const i=O5(s,t);if(i!==void 0)r[s]=i;else{const o=n.getValue(s);o&&(r[s]=o.get())}}return r}function B5({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function U5(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 fg(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&&B5(d,f))continue;const p={delay:n,elapsed:0,...Pc(i||{},f)};if(window.HandoffAppearAnimations){const v=e.getProps()[h0];if(v){const y=window.HandoffAppearAnimations(v,f,u,se);y!==null&&(p.elapsed=y,p.isHandoff=!0)}}let g=!p.isHandoff&&!U5(u,h);if(p.type==="spring"&&(u.getVelocity()||p.velocity)&&(g=!1),u.animation&&(g=!1),g)continue;u.start(jc(f,u,h,e.shouldReduceMotion&&Xn.has(f)?{type:!1}:p));const w=u.animation;bo(l)&&(l.add(f),w.then(()=>l.remove(f))),c.push(w)}return o&&Promise.all(c).then(()=>{o&&z5(e,o)}),c}function Jl(e,t,n={}){const r=Zo(e,t,n.custom);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(fg(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return W5(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 W5(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(H5).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Jl(c,t,{...i,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function H5(e,t){return e.sortNodePosition(t)}function q5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Jl(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Jl(e,t,n);else{const s=typeof t=="function"?Zo(e,t,n.custom):t;r=Promise.all(fg(e,s,n))}return r.then(()=>e.notify("AnimationComplete",t))}const G5=[...dc].reverse(),Y5=dc.length;function K5(e){return t=>Promise.all(t.map(({animation:n,options:r})=>q5(e,n,r)))}function X5(e){let t=K5(e);const n=Z5();let r=!0;const s=(l,c)=>{const d=Zo(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<Y5;v++){const y=G5[v],x=n[y],b=d[y]!==void 0?d[y]:f[y],S=$s(b),C=y===c?x.isActive:null;C===!1&&(g=v);let P=b===f[y]&&b!==d[y]&&S;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...p},!x.isActive&&C===null||!b&&!x.prevProp||Yo(b)||typeof b=="boolean")continue;let _=Q5(x.prevProp,b)||y===c&&x.isActive&&!P&&S||v>g&&S,T=!1;const F=Array.isArray(b)?b:[b];let L=F.reduce(s,{});C===!1&&(L={});const{prevResolvedValues:W={}}=x,A={...W,...L},O=B=>{_=!0,h.has(B)&&(T=!0,h.delete(B)),x.needsAnimating[B]=!0};for(const B in A){const K=L[B],M=W[B];if(p.hasOwnProperty(B))continue;let D=!1;yo(K)&&yo(M)?D=!R0(K,M):D=K!==M,D?K!==void 0?O(B):h.add(B):K!==void 0&&h.has(B)?O(B):x.protectedKeys[B]=!0}x.prevProp=b,x.prevResolvedValues=L,x.isActive&&(p={...p,...L}),r&&e.blockInitialAnimation&&(_=!1),_&&(!P||T)&&u.push(...F.map(B=>({animation:B,options:{type:y,...l}})))}if(h.size){const v={};h.forEach(y=>{const x=e.getBaseTarget(y);x!==void 0&&(v[y]=x)}),u.push({animation:v})}let w=!!u.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(u):Promise.resolve()}function a(l,c,d){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const u=o(d,l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n}}function Q5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!R0(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z5(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class J5 extends Tn{constructor(t){super(t),t.animationState||(t.animationState=X5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Yo(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 e3=0;class t3 extends Tn{constructor(){super(...arguments),this.id=e3++}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 n3={animation:{Feature:J5},exit:{Feature:t3}},yf=(e,t)=>Math.abs(e-t);function r3(e,t){const n=yf(e.x,t.x),r=yf(e.y,t.y);return Math.sqrt(n**2+r**2)}class hg{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=r3(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:w,onMove:v}=this.handlers;u||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,u)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Fa(u,this.transformPagePoint),se.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 w=za(f.type==="pointercancel"?this.lastMoveEventInfo:Fa(u,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,w),p&&p(f,w)},!M0(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Qo(t),a=Fa(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=gn(Ft(this.contextWindow,"pointermove",this.handlePointerMove),Ft(this.contextWindow,"pointerup",this.handlePointerUp),Ft(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ht(this.updatePoint)}}function Fa(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,pg(t)),offset:vf(e,s3(t)),velocity:i3(t,.1)}}function s3(e){return e[0]}function pg(e){return e[e.length-1]}function i3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=pg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>$n(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 Ze(e){return e.max-e.min}function eu(e,t=0,n=.01){return Math.abs(e-t)<=n}function xf(e,t,n,r=.5){e.origin=r,e.originPoint=ae(t.min,t.max,e.origin),e.scale=Ze(n)/Ze(t),(eu(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ae(n.min,n.max,e.origin)-e.originPoint,(eu(e.translate)||isNaN(e.translate))&&(e.translate=0)}function vs(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+Ze(t)}function o3(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+Ze(t)}function xs(e,t,n){bf(e.x,t.x,n.x),bf(e.y,t.y,n.y)}function a3(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ae(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 l3(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 u3(e,t){return{x:kf(e.x,t.x),y:kf(e.y,t.y)}}function c3(e,t){let n=.5;const r=Ze(e),s=Ze(t);return s>r?n=Us(t.min,t.max-r,e.min):r>s&&(n=Us(e.min,e.max-s,t.min)),xn(0,1,n)}function d3(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 tu=.35;function f3(e=tu){return e===!1?e=0:e===!0&&(e=tu),{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}),mr=()=>({x:jf(),y:jf()}),Ef=()=>({min:0,max:0}),ge=()=>({x:Ef(),y:Ef()});function rt(e){return[e("x"),e("y")]}function mg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function h3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function p3(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 Ia(e){return e===void 0||e===1}function nu({scale:e,scaleX:t,scaleY:n}){return!Ia(e)||!Ia(t)||!Ia(n)}function Ln(e){return nu(e)||gg(e)||e.z||e.rotate||e.rotateX||e.rotateY}function gg(e){return Tf(e.x)||Tf(e.y)}function Tf(e){return e&&e!=="0%"}function So(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=So(e,s,r)),So(e,n,r)+t}function ru(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 yg(e,{x:t,y:n}){ru(e.x,t.translate,t.scale,t.originPoint),ru(e.y,n.translate,n.scale,n.originPoint)}function m3(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&&gr(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,yg(e,o)),r&&Ln(i.latestValues)&&gr(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 Jt(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=ae(e.min,e.max,i);ru(e,t[n],t[r],o,t.scale)}const g3=["x","scaleX","originX"],y3=["y","scaleY","originY"];function gr(e,t){_f(e.x,t,g3),_f(e.y,t,y3)}function vg(e,t){return mg(p3(e.getBoundingClientRect(),t))}function v3(e,t,n){const r=vg(e,n),{scroll:s}=t;return s&&(Jt(r.x,s.offset.x),Jt(r.y,s.offset.y)),r}const xg=({current:e})=>e?e.ownerDocument.defaultView:null,x3=new WeakMap;class w3{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=ge(),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(Qo(d,"page").point)},i=(d,f)=>{const{drag:u,dragPropagation:h,onDragStart:p}=this.getProps();if(u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=A0(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),rt(w=>{let v=this.getAxisMotionValue(w).get()||0;if(Et.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[w];x&&(v=Ze(x)*(parseFloat(v)/100))}}this.originPoint[w]=v}),p&&se.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:w}=f;if(h&&this.currentDirection===null){this.currentDirection=b3(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),g&&g(d,f)},a=(d,f)=>this.stop(d,f),l=()=>rt(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 hg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:xg(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&&se.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||!Ci(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=a3(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&&hr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=l3(s.layoutBox,n):this.constraints=!1,this.elastic=f3(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&rt(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=d3(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=v3(r,s.root,this.visualElement.getTransformPagePoint());let o=u3(s.layout.layoutBox,i);if(n){const a=n(h3(o));this.hasMutatedConstraints=!!a,a&&(o=mg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=rt(d=>{if(!Ci(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(jc(t,r,0,n))}stopAnimation(){rt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rt(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){rt(n=>{const{drag:r}=this.getProps();if(!Ci(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]-ae(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};rt(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();s[o]=c3({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(),rt(o=>{if(!Ci(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ae(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;x3.set(this.visualElement,this);const t=this.visualElement.current,n=Ft(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();hr(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=Rt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(rt(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=tu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ci(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function b3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class S3 extends Tn{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new w3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Af=e=>(t,n)=>{e&&se.update(()=>e(t,n))};class k3 extends Tn{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new hg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xg(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&&se.update(()=>s(i,o))}}}mount(){this.removePointerDownListener=Ft(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 C3(){const e=k.useContext(uc);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 $i={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Lf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Jr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(U.test(e))e=parseFloat(e);else return e;const n=Lf(e,t.target.x),r=Lf(e,t.target.y);return`${n}% ${r}%`}},P3={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=wn.parse(e);if(s.length>5)return r;const i=wn.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=ae(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 j3 extends qs.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;A2(E3),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()})),$i.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()||se.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 wg(e){const[t,n]=C3(),r=k.useContext(m0);return qs.createElement(j3,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(g0),isPresent:t,safeToRemove:n})}const E3={borderRadius:{...Jr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jr,borderTopRightRadius:Jr,borderBottomLeftRadius:Jr,borderBottomRightRadius:Jr,boxShadow:P3},bg=["TopLeft","TopRight","BottomLeft","BottomRight"],T3=bg.length,Df=e=>typeof e=="string"?parseFloat(e):e,Rf=e=>typeof e=="number"||U.test(e);function N3(e,t,n,r,s,i){s?(e.opacity=ae(0,n.opacity!==void 0?n.opacity:1,M3(r)),e.opacityExit=ae(t.opacity!==void 0?t.opacity:1,0,_3(r))):i&&(e.opacity=ae(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<T3;o++){const a=`border${bg[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(ae(Df(l),Df(c),r),0),(Et.test(c)||Et.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ae(t.rotate||0,n.rotate||0,r))}function Vf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const M3=Sg(0,.5,W0),_3=Sg(.5,.95,pe);function Sg(e,t,n){return r=>r<e?0:r>t?1:n(Us(e,t,r))}function Ff(e,t){e.min=t.min,e.max=t.max}function nt(e,t){Ff(e.x,t.x),Ff(e.y,t.y)}function zf(e,t,n,r,s){return e-=t,e=So(e,1/n,r),s!==void 0&&(e=So(e,1/s,r)),e}function A3(e,t=0,n=1,r=.5,s,i=e,o=e){if(Et.test(t)&&(t=parseFloat(t),t=ae(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ae(i.min,i.max,r);e===i&&(a-=t),e.min=zf(e.min,t,n,a,s),e.max=zf(e.max,t,n,a,s)}function If(e,t,[n,r,s],i,o){A3(e,t[n],t[r],t[s],t.scale,i,o)}const L3=["x","scaleX","originX"],D3=["y","scaleY","originY"];function Of(e,t,n,r){If(e.x,t,L3,n?n.x:void 0,r?r.x:void 0),If(e.y,t,D3,n?n.y:void 0,r?r.y:void 0)}function $f(e){return e.translate===0&&e.scale===1}function kg(e){return $f(e.x)&&$f(e.y)}function R3(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 Cg(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 Ze(e.x)/Ze(e.y)}class V3{constructor(){this.members=[]}add(t){Ec(this.members,t),t.scheduleRender()}remove(t){if(Tc(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 F3=(e,t)=>e.depth-t.depth;class z3{constructor(){this.children=[],this.isDirty=!1}add(t){Ec(this.children,t),this.isDirty=!0}remove(t){Tc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F3),this.isDirty=!1,this.children.forEach(t)}}function I3(e,t){const n=performance.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ht(r),e(i-t))};return se.read(r,!0),()=>Ht(r)}function O3(e){window.MotionDebug&&window.MotionDebug.record(e)}function $3(e){return e instanceof SVGElement&&e.tagName!=="svg"}function B3(e,t,n){const r=Ge(e)?e:Ar(e);return r.start(jc("",r,t,n)),r.animation}const Wf=["","X","Y","Z"],U3={visibility:"hidden"},Hf=1e3;let W3=0;const Dn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Pg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=W3++,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,Dn.totalNodes=Dn.resolvedTargetDeltas=Dn.recalculatedProjection=0,this.nodes.forEach(G3),this.nodes.forEach(Z3),this.nodes.forEach(J3),this.nodes.forEach(Y3),O3(Dn)},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 Nc),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=$3(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=I3(u,250),$i.hasAnimatedSinceResize&&($i.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()||s4,{onLayoutAnimationStart:w,onLayoutAnimationComplete:v}=d.getProps(),y=!this.targetLayout||!Cg(this.targetLayout,p)||h,x=!u&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||u&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,x);const b={...Pc(g,"layout"),onPlay:w,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(e4),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(X3),this.isUpdating=!1,this.nodes.forEach(Q3),this.nodes.forEach(H3),this.nodes.forEach(q3),this.clearAllSnapshots();const a=performance.now();De.delta=xn(0,1e3/60,a-De.timestamp),De.timestamp=a,De.isProcessing=!0,Na.update.process(De),Na.preRender.process(De),Na.render.process(De),De.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(K3),this.sharedNodes.forEach(t4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.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=ge(),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&&!kg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||Ln(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)),i4(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return ge();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(Jt(a.x,l.offset.x),Jt(a.y,l.offset.y)),a}removeElementScroll(o){const a=ge();nt(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){nt(a,o);const{scroll:u}=this.root;u&&(Jt(a.x,-u.offset.x),Jt(a.y,-u.offset.y))}Jt(a.x,d.offset.x),Jt(a.y,d.offset.y)}}return a}applyTransform(o,a=!1){const l=ge();nt(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&&gr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ln(d.latestValues)&&gr(l,d.latestValues)}return Ln(this.latestValues)&&gr(l,this.latestValues),l}removeTransform(o){const a=ge();nt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ln(c.latestValues))continue;nu(c.latestValues)&&c.updateSnapshot();const d=ge(),f=c.measurePageBox();nt(d,f),Of(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ln(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=ge(),this.relativeTargetOrigin=ge(),xs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),nt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nt(this.target,this.layout.layoutBox),yg(this.target,this.targetDelta)):nt(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=ge(),this.relativeTargetOrigin=ge(),xs(this.relativeTargetOrigin,this.target,h.target),nt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Dn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||nu(this.parent.latestValues)||gg(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;nt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,h=this.treeScale.y;m3(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=mr(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=mr(),this.projectionDeltaWithTransform=mr());const g=this.projectionTransform;vs(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)),Dn.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=mr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const u=ge(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,w=this.getStack(),v=!w||w.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(r4));this.animationProgress=0;let x;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&&(xs(u,this.layout.layoutBox,this.relativeParent.layout.layoutBox),n4(this.relativeTarget,this.relativeTargetOrigin,u,S),x&&R3(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ge()),nt(x,this.relativeTarget)),g&&(this.animationValues=d,N3(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=se.update(()=>{$i.hasAnimatedSinceResize=!0,this.currentAnimation=B3(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&&jg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ge();const f=Ze(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const u=Ze(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+u}nt(a,l),gr(a,d),vs(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new V3),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 U3;const c={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Oi(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=Oi(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ln(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 mo){if(u[g]===void 0)continue;const{correct:w,applyTo:v}=mo[g],y=c.transform==="none"?u[g]:w(u[g],f);if(v){const x=v.length;for(let b=0;b<x;b++)c[v[b]]=y}else c[g]=y}return this.options.layoutId&&(c.pointerEvents=f===this?Oi(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 H3(e){e.updateLayout()}function q3(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"?rt(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Ze(u);u.min=r[f].min,u.max=u.min+h}):jg(i,n.layoutBox,r)&&rt(f=>{const u=o?n.measuredBox[f]:n.layoutBox[f],h=Ze(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=mr();vs(a,r,n.layoutBox);const l=mr();o?vs(l,e.applyTransform(s,!0),n.measuredBox):vs(l,r,n.layoutBox);const c=!kg(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=ge();xs(p,n.layoutBox,u.layoutBox);const g=ge();xs(g,r,h.layoutBox),Cg(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 G3(e){Dn.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 Y3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function K3(e){e.clearSnapshot()}function qf(e){e.clearMeasurements()}function X3(e){e.isLayoutDirty=!1}function Q3(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 Z3(e){e.resolveTargetDelta()}function J3(e){e.calcProjection()}function e4(e){e.resetRotation()}function t4(e){e.removeLeadSnapshot()}function Yf(e,t,n){e.translate=ae(t.translate,0,n),e.scale=ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Kf(e,t,n,r){e.min=ae(t.min,n.min,r),e.max=ae(t.max,n.max,r)}function n4(e,t,n,r){Kf(e.x,t.x,n.x,r),Kf(e.y,t.y,n.y,r)}function r4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const s4={duration:.45,ease:[.4,0,.1,1]},Xf=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Qf=Xf("applewebkit/")&&!Xf("chrome/")?Math.round:pe;function Zf(e){e.min=Qf(e.min),e.max=Qf(e.max)}function i4(e){Zf(e.x),Zf(e.y)}function jg(e,t,n){return e==="position"||e==="preserve-aspect"&&!eu(Bf(t),Bf(n),.2)}const o4=Pg({attachResizeListener:(e,t)=>Rt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Oa={current:void 0},Eg=Pg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Oa.current){const e=new o4({});e.mount(window),e.setOptions({layoutScroll:!0}),Oa.current=e}return Oa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),a4={pan:{Feature:k3},drag:{Feature:S3,ProjectionNode:Eg,MeasureLayout:wg}},l4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function u4(e){const t=l4.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function su(e,t,n=1){const[r,s]=u4(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return ug(o)?parseFloat(o):o}else return Gl(s)?su(s,t,n+1):s}function c4(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(!Gl(i))return;const o=su(i,r);o&&s.set(o)});for(const s in t){const i=t[s];if(!Gl(i))continue;const o=su(i,r);o&&(t[s]=o,n||(n={}),n[s]===void 0&&(n[s]=i))}return{target:t,transitionEnd:n}}const d4=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Tg=e=>d4.has(e),f4=e=>Object.keys(e).some(Tg),Jf=e=>e===Qn||e===U,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}},h4=new Set(["x","y","z"]),p4=Zs.filter(e=>!h4.has(e));function m4(e){const t=[];return p4.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 Lr={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)};Lr.translateX=Lr.x;Lr.translateY=Lr.y;const g4=(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]=Lr[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]=Lr[c](l,i)}),e},y4=(e,t,n={},r={})=>{t={...t},r={...r};const s=Object.keys(t).filter(Tg);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=Zr(d);const u=t[l];let h;if(yo(u)){const p=u.length,g=u[0]===null?1:0;d=u[g],f=Zr(d);for(let w=g;w<p&&u[w]!==null;w++)h?wc(Zr(u[w])===h):h=Zr(u[w])}else h=Zr(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===U&&(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=m4(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=g4(t,e,a);return i.length&&i.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),Go&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function v4(e,t,n,r){return f4(t)?y4(e,t,n,r):{target:t,transitionEnd:r}}const x4=(e,t,n,r)=>{const s=c4(e,t,r);return t=s.target,r=s.transitionEnd,v4(e,t,n,r)},iu={current:null},Ng={current:!1};function w4(){if(Ng.current=!0,!!Go)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>iu.current=e.matches;e.addListener(t),t()}else iu.current=!1}function b4(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),bo(r)&&r.add(s);else if(Ge(o))e.addValue(s,Ar(i,{owner:e})),bo(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,Ar(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,Mg=Object.keys(Bs),S4=Mg.length,rh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],k4=fc.length;class C4{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=()=>se.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=Ko(n),this.isVariantNode=p0(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),bo(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)),Ng.current||w4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:iu.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=Xn.has(t),s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&se.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<S4;l++){const c=Mg[l],{isEnabled:d,Feature:f,ProjectionNode:u,MeasureLayout:h}=Bs[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&&hr(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):ge()}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=b4(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<k4;r++){const s=fc[r],i=this.props[s];($s(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=Ar(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=xc(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 Nc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _g extends C4{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=$5(r,t||{},this);if(s&&(n&&(n=s(n)),r&&(r=s(r)),o&&(o=s(o))),i){I5(this,r,o);const a=x4(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function P4(e){return window.getComputedStyle(e)}class j4 extends _g{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(Xn.has(n)){const r=Cc(n);return r&&r.default||0}else{const r=P4(t),s=(x0(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return vg(t,n)}build(t,n,r,s){pc(t,n,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,n){return vc(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){P0(t,n,r,s)}}class E4 extends _g{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xn.has(n)){const r=Cc(n);return r&&r.default||0}return n=j0.has(n)?n:cc(n),t.getAttribute(n)}measureInstanceViewportBox(){return ge()}scrapeMotionValuesFromProps(t,n){return T0(t,n)}build(t,n,r,s){gc(t,n,r,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,r,s){E0(t,n,r,s)}mount(t){this.isSVGTag=yc(t.tagName),super.mount(t)}}const T4=(e,t)=>hc(e)?new E4(t,{enableHardwareAcceleration:!1}):new j4(t,{enableHardwareAcceleration:!0}),N4={layout:{ProjectionNode:Eg,MeasureLayout:wg}},M4={...n3,...Sw,...a4,...N4},I=M2((e,t)=>uw(e,t,M4,T4)),_4={},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:()=>{(_4?"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},A4=e=>e?sh(e):sh;var Ag={exports:{}},Lg={},Dg={exports:{}},Rg={};/**
|
|
* @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 Dr=k;function L4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var D4=typeof Object.is=="function"?Object.is:L4,R4=Dr.useState,V4=Dr.useEffect,F4=Dr.useLayoutEffect,z4=Dr.useDebugValue;function I4(e,t){var n=t(),r=R4({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return F4(function(){s.value=n,s.getSnapshot=t,$a(s)&&i({inst:s})},[e,n,t]),V4(function(){return $a(s)&&i({inst:s}),e(function(){$a(s)&&i({inst:s})})},[e]),z4(n),n}function $a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!D4(e,n)}catch{return!0}}function O4(e,t){return t()}var $4=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?O4:I4;Rg.useSyncExternalStore=Dr.useSyncExternalStore!==void 0?Dr.useSyncExternalStore:$4;Dg.exports=Rg;var B4=Dg.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 Jo=k,U4=B4;function W4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var H4=typeof Object.is=="function"?Object.is:W4,q4=U4.useSyncExternalStore,G4=Jo.useRef,Y4=Jo.useEffect,K4=Jo.useMemo,X4=Jo.useDebugValue;Lg.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=G4(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=K4(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,H4(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=q4(e,i[0],i[1]);return Y4(function(){o.hasValue=!0,o.value=a},[a]),X4(a),a};Ag.exports=Lg;var Q4=Ag.exports;const Z4=uu(Q4),Vg={},{useDebugValue:J4}=qs,{useSyncExternalStoreWithSelector:eb}=Z4;let ih=!1;const tb=e=>e;function nb(e,t=tb,n){(Vg?"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=eb(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return J4(r),r}const rb=e=>{(Vg?"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"?A4(e):e,n=(r,s)=>nb(t,r,s);return Object.assign(n,t),n},sb=e=>rb,ib={};function ob(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 Ws=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Ws(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ws(r)(n)}}}},ab=(e,t)=>(n,r,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,v)=>({...v,...w}),...t},o=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...w)},r,s);const d=Ws(i.serialize),f=()=>{const w=i.partialize({...r()});let v;const y=d({state:w,version:i.version}).then(x=>c.setItem(i.name,x)).catch(x=>{v=x});if(v)throw v;return y},u=s.setState;s.setState=(w,v)=>{u(w,v),f()};const h=e((...w)=>{n(...w),f()},r,s);let p;const g=()=>{var w;if(!c)return;o=!1,a.forEach(y=>y(r()));const v=((w=i.onRehydrateStorage)==null?void 0:w.call(i,r()))||void 0;return Ws(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 x;return p=i.merge(y,(x=r())!=null?x: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:w=>{i={...i,...w},w.getStorage&&(c=w.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},g(),p||h},lb=(e,t)=>(n,r,s)=>{let i={storage:ob(()=>localStorage),partialize:g=>g,version:0,merge:(g,w)=>({...w,...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,w)=>{f(g,w),d()};const u=e((...g)=>{n(...g),d()},r,s);s.getInitialState=()=>u;let h;const p=()=>{var g,w;if(!c)return;o=!1,a.forEach(y=>{var x;return y((x=r())!=null?x:u)});const v=((w=i.onRehydrateStorage)==null?void 0:w.call(i,(g=r())!=null?g:u))||void 0;return Ws(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 x;const[b,S]=y;if(h=i.merge(S,(x=r())!=null?x: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},ub=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ib?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),ab(e,t)):lb(e,t),cb=ub,oh={currentUser:null,partnerUser:null,isLoading:!1,error:null,currentTrack:null,isPlaying:!1},ve=sb()(cb(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)})),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})})),Mc="/api";function Rr(){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 Ct(e,t,n){const r=await fetch(`${Mc}${e}`,{method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:`Bearer ${n}`}:Rr()?{Authorization:`Bearer ${Rr()}`}:{}},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 ye(e,t){const n=await fetch(`${Mc}${e}`,{headers:{...Rr()?{Authorization:`Bearer ${Rr()}`}:{}}});if(!n.ok){const r=await n.text();throw new Error(r||`Request failed: ${n.status}`)}return n.json()}async function db(e,t,n){const r=await fetch(`${Mc}${e}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",...Rr()?{Authorization:`Bearer ${Rr()}`}:{}},body:new URLSearchParams(t).toString()});if(!r.ok){const s=await r.text();throw new Error(s||`Request failed: ${r.status}`)}return r.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 ws(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function ou(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function fb(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 hb(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function pb(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function Ba(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function mb(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 gb(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 yb(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function vb(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function au(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 Fg(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 xb(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 wb(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 bb(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 Sb(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 kb(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 Cb(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,w=c*2;return d*=w,f*=w,u*=w,h*=2,p*=2,g*=2,e[0]=r+d+h,e[1]=s+f+p,e[2]=i+u+g,e}const Pb=function(){const e=[0,0,0],t=[0,0,0];return function(n,r){ou(e,n),ou(t,r),au(e,e),au(t,t);let s=Fg(e,t);return s>1?0:s<-1?Math.PI:Math.acos(s)}}();function jb(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):(fb(this,t,n,r),this)}copy(t){return ou(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?hb(this,this,t):Ba(this,this,t),this}divide(t){return t.length?pb(this,this,t):Ba(this,this,1/t),this}inverse(t=this){return vb(this,t),this}len(){return ws(this)}distance(t){return t?mb(this,t):ws(this)}squaredLen(){return ch(this)}squaredDistance(t){return t?gb(this,t):ch(this)}negate(t=this){return yb(this,t),this}cross(t,n){return n?dh(this,t,n):dh(this,this,t),this}scale(t){return Ba(this,this,t),this}normalize(){return au(this,this),this}dot(t){return Fg(this,t)}equals(t){return jb(this,t)}applyMatrix3(t){return kb(this,this,t),this}applyMatrix4(t){return bb(this,this,t),this}scaleRotateMatrix4(t){return Sb(this,this,t),this}applyQuaternion(t){return Cb(this,this,t),this}angle(t){return Pb(this,t)}lerp(t,n){return xb(this,this,t,n),this}smoothLerp(t,n,r){return wb(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 Eb=1,Tb=1,hh=!1;class Nb{constructor(t,n={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=n,this.id=Eb++,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=Tb++,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 Mb=1;const ph={};class _b{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=Mb++,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),Ua(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)}),Ua(this.gl,i.type,s,a)}Ua(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 Ua(e,t,n,r){r=r.length?Ab(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(Lb(s,r))return;s.set?s.set(r):Db(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 Ab(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 Lb(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 Db(e,t){for(let n=0,r=e.length;n<r;n++)e[n]=t[n]}let Wa=0;function gh(e){Wa>100||(console.warn(e),Wa++,Wa>100&&console.warn("More than 100 program warnings - stopping logs."))}const Ha=new mt;let Rb=1;class Vb{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=Rb++,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(Ha),Ha.applyMatrix4(n.projectionViewMatrix),c.zDepth=Ha.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 Fb(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function zb(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function Ib(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 Ob(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function $b(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Bb(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 Ub(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 Wb(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 Hb(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 qb(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,w;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,w=Math.sin(r*u)/p):(g=1-r,w=r),e[0]=g*s+w*l,e[1]=g*i+w*c,e[2]=g*o+w*d,e[3]=g*a+w*f,e}function Gb(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 Yb(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Kb(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 Xb(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 Qb=Fb,Zb=zb,Jb=Ob,eS=Ib;class tS 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 $b(this._target),this.onChange(),this}set(t,n,r,s){return t.length?this.copy(t):(Zb(this._target,t,n,r,s),this.onChange(),this)}rotateX(t){return Ub(this._target,this._target,t),this.onChange(),this}rotateY(t){return Wb(this._target,this._target,t),this.onChange(),this}rotateZ(t){return Hb(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return Gb(this._target,t),this.onChange(),this}conjugate(t=this._target){return Yb(this._target,t),this.onChange(),this}copy(t){return Qb(this._target,t),this.onChange(),this}normalize(t=this._target){return eS(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 Jb(this._target,t)}fromMatrix3(t){return Kb(this._target,t),this.onChange(),this}fromEuler(t,n){return Xb(this._target,t,t.order),n||this.onChange(),this}fromAxisAngle(t,n){return Bb(this._target,t,n),this.onChange(),this}slerp(t,n){return qb(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 nS=1e-6;function rS(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 sS(e,t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,w){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]=w,e}function iS(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 oS(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],w=t[14],v=t[15],y=n*a-r*o,x=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*w-u*p,T=d*v-h*p,F=f*w-u*g,L=f*v-h*g,W=u*v-h*w,A=y*W-x*L+b*F+S*T-C*_+P*j;return A?(A=1/A,e[0]=(a*W-l*L+c*F)*A,e[1]=(s*L-r*W-i*F)*A,e[2]=(g*P-w*C+v*S)*A,e[3]=(u*C-f*P-h*S)*A,e[4]=(l*T-o*W-c*_)*A,e[5]=(n*W-s*T+i*_)*A,e[6]=(w*b-p*P-v*x)*A,e[7]=(d*P-u*b+h*x)*A,e[8]=(o*L-a*T+c*j)*A,e[9]=(r*T-n*L-i*j)*A,e[10]=(p*C-g*b+v*y)*A,e[11]=(f*b-d*C-h*y)*A,e[12]=(a*_-o*F-l*j)*A,e[13]=(n*F-r*_+s*j)*A,e[14]=(g*x-p*S-w*y)*A,e[15]=(d*S-f*x+u*y)*A,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],w=e[15],v=t*o-n*i,y=t*a-r*i,x=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,_=c*w-u*h,T=d*g-f*p,F=d*w-u*p,L=f*w-u*g;return v*L-y*F+x*T+b*_-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],w=t[13],v=t[14],y=t[15],x=n[0],b=n[1],S=n[2],C=n[3];return e[0]=x*r+b*a+S*f+C*g,e[1]=x*s+b*l+S*u+C*w,e[2]=x*i+b*c+S*h+C*v,e[3]=x*o+b*d+S*p+C*y,x=n[4],b=n[5],S=n[6],C=n[7],e[4]=x*r+b*a+S*f+C*g,e[5]=x*s+b*l+S*u+C*w,e[6]=x*i+b*c+S*h+C*v,e[7]=x*o+b*d+S*p+C*y,x=n[8],b=n[9],S=n[10],C=n[11],e[8]=x*r+b*a+S*f+C*g,e[9]=x*s+b*l+S*u+C*w,e[10]=x*i+b*c+S*h+C*v,e[11]=x*o+b*d+S*p+C*y,x=n[12],b=n[13],S=n[14],C=n[15],e[12]=x*r+b*a+S*f+C*g,e[13]=x*s+b*l+S*u+C*w,e[14]=x*i+b*c+S*h+C*v,e[15]=x*o+b*d+S*p+C*y,e}function aS(e,t,n){let r=n[0],s=n[1],i=n[2],o,a,l,c,d,f,u,h,p,g,w,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],w=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]=w,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+w*i+t[14],e[15]=c*r+h*s+v*i+t[15]),e}function lS(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 uS(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,w,v,y,x,b,S,C,P,j,_,T,F,L,W,A,O;return Math.abs(a)<nS?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],w=t[5],v=t[6],y=t[7],x=t[8],b=t[9],S=t[10],C=t[11],P=s*s*d+c,j=i*s*d+o*l,_=o*s*d-i*l,T=s*i*d-o*l,F=i*i*d+c,L=o*i*d+s*l,W=s*o*d+i*l,A=i*o*d-s*l,O=o*o*d+c,e[0]=f*P+g*j+x*_,e[1]=u*P+w*j+b*_,e[2]=h*P+v*j+S*_,e[3]=p*P+y*j+C*_,e[4]=f*T+g*F+x*L,e[5]=u*T+w*F+b*L,e[6]=h*T+v*F+S*L,e[7]=p*T+y*F+C*L,e[8]=f*W+g*A+x*O,e[9]=u*W+w*A+b*O,e[10]=h*W+v*A+S*O,e[11]=p*W+y*A+C*O,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function cS(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Ig(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 dS(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 Og=function(){const e=[1,1,1];return function(t,n){let r=e;Ig(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,w=a+f+g,v=0;return w>0?(v=Math.sqrt(w+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 fS(e,t,n,r){let s=ws([e[0],e[1],e[2]]);const i=ws([e[4],e[5],e[6]]),o=ws([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,Og(t,l),r[0]=s,r[1]=i,r[2]=o}function hS(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,w=o*f,v=a*f,y=l*c,x=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-x)*S,s[3]=0,s[4]=(h-b)*C,s[5]=(1-(u+v))*C,s[6]=(w+y)*C,s[7]=0,s[8]=(p+x)*P,s[9]=(w-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 pS(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,w=i*a,v=i*l;return e[0]=1-f-p,e[1]=d+v,e[2]=u-w,e[3]=0,e[4]=d-v,e[5]=1-c-p,e[6]=h+g,e[7]=0,e[8]=u+w,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 mS(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 gS(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 yS(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,w=a*f-l*d;return h=p*p+g*g+w*w,h===0&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,p=l*u-c*f,g=c*d-a*u,w=a*f-l*d,h=p*p+g*g+w*w),h=1/Math.sqrt(h),p*=h,g*=h,w*=h,e[0]=p,e[1]=g,e[2]=w,e[3]=0,e[4]=f*w-u*g,e[5]=u*p-d*w,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 vS(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 ko 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,w=1){return super(t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,w),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,w){return t.length?this.copy(t):(sS(this,t,n,r,s,i,o,a,l,c,d,f,u,h,p,g,w),this)}translate(t,n=this){return aS(this,n,t),this}rotate(t,n,r=this){return uS(this,r,t,n),this}scale(t,n=this){return lS(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):vS(this,this,t),this}identity(){return iS(this),this}copy(t){return rS(this,t),this}fromPerspective({fov:t,aspect:n,near:r,far:s}={}){return mS(this,t,n,r,s),this}fromOrthogonal({left:t,right:n,bottom:r,top:s,near:i,far:o}){return gS(this,t,n,r,s,i,o),this}fromQuaternion(t){return pS(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return oS(this,t),this}compose(t,n,r){return hS(this,t,n,r),this}decompose(t,n,r){return fS(this,t,n,r),this}getRotation(t){return Og(t,this),this}getTranslation(t){return cS(t,this),this}getScaling(t){return Ig(t,this),this}getMaxScaleOnAxis(){return dS(this)}lookAt(t,n,r){return yS(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 xS(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 ko;class wS 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 xS(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 bS{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new ko,this.worldMatrix=new ko,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new mt,this.quaternion=new tS,this.scale=new mt(1),this.rotation=new wS,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 SS(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 kS(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,w=i*a,v=i*l;return e[0]=1-f-p,e[3]=d-v,e[6]=u+w,e[1]=d+v,e[4]=1-c-p,e[7]=h-g,e[2]=u-w,e[5]=h+g,e[8]=1-c-f,e}function CS(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 PS(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 jS(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 ES(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],w=n[4],v=n[5],y=n[6],x=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+w*o+v*c,e[4]=g*s+w*a+v*d,e[5]=g*i+w*l+v*f,e[6]=y*r+x*o+b*c,e[7]=y*s+x*a+b*d,e[8]=y*i+x*l+b*f,e}function TS(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 NS(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 MS(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 _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=t[9],u=t[10],h=t[11],p=t[12],g=t[13],w=t[14],v=t[15],y=n*a-r*o,x=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*w-u*p,T=d*v-h*p,F=f*w-u*g,L=f*v-h*g,W=u*v-h*w,A=y*W-x*L+b*F+S*T-C*_+P*j;return A?(A=1/A,e[0]=(a*W-l*L+c*F)*A,e[1]=(l*T-o*W-c*_)*A,e[2]=(o*L-a*T+c*j)*A,e[3]=(s*L-r*W-i*F)*A,e[4]=(n*W-s*T+i*_)*A,e[5]=(r*T-n*L-i*j)*A,e[6]=(g*P-w*C+v*S)*A,e[7]=(w*b-p*P-v*x)*A,e[8]=(p*C-g*b+v*y)*A,e):null}class AS 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):(PS(this,t,n,r,s,i,o,a,l,c),this)}translate(t,n=this){return TS(this,n,t),this}rotate(t,n=this){return NS(this,n,t),this}scale(t,n=this){return MS(this,n,t),this}multiply(t,n){return n?Sh(this,t,n):Sh(this,this,t),this}identity(){return jS(this),this}copy(t){return CS(this,t),this}fromMatrix4(t){return SS(this,t),this}fromQuaternion(t){return kS(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 ES(this,t),this}getNormalMatrix(t){return _S(this,t),this}}let LS=0;class DS extends bS{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=LS++,this.geometry=n,this.program=r,this.mode=s,this.frustumCulled=i,this.renderOrder=o,this.modelViewMatrix=new ko,this.normalMatrix=new AS,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 RS(e,t){return e[0]=t[0],e[1]=t[1],e}function VS(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 FS(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function zS(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function qa(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function IS(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function OS(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 $S(e){var t=e[0],n=e[1];return t*t+n*n}function BS(e,t){return e[0]=-t[0],e[1]=-t[1],e}function US(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function WS(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 HS(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 qS(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 GS(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 YS(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 KS(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 XS(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):(VS(this,t,n),this)}copy(t){return RS(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?FS(this,this,t):qa(this,this,t),this}divide(t){return t.length?zS(this,this,t):qa(this,this,1/t),this}inverse(t=this){return US(this,t),this}len(){return Ph(this)}distance(t){return t?IS(this,t):Ph(this)}squaredLen(){return this.squaredDistance()}squaredDistance(t){return t?OS(this,t):$S(this)}negate(t=this){return BS(this,t),this}cross(t,n){return n?jh(t,n):jh(this,t)}scale(t){return qa(this,this,t),this}normalize(){return WS(this,this),this}dot(t){return HS(this,t)}equals(t){return XS(this,t)}applyMatrix3(t){return YS(this,this,t),this}applyMatrix4(t){return KS(this,this,t),this}lerp(t,n){return qS(this,this,t,n),this}smoothLerp(t,n,r){return GS(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 QS extends Nb{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 ZS=`
|
|
attribute vec2 position;
|
|
void main(){gl_Position=vec4(position,0.0,1.0);}
|
|
`,JS=`
|
|
#ifdef GL_ES
|
|
precision lowp float;
|
|
#endif
|
|
uniform vec2 uResolution;
|
|
uniform float uTime;
|
|
uniform float uHueShift;
|
|
uniform float uNoise;
|
|
uniform float uScan;
|
|
uniform float uScanFreq;
|
|
uniform float uWarp;
|
|
#define iTime uTime
|
|
#define iResolution uResolution
|
|
|
|
vec4 buf[8];
|
|
float rand(vec2 c){return fract(sin(dot(c,vec2(12.9898,78.233)))*43758.5453);}
|
|
|
|
mat3 rgb2yiq=mat3(0.299,0.587,0.114,0.596,-0.274,-0.322,0.211,-0.523,0.312);
|
|
mat3 yiq2rgb=mat3(1.0,0.956,0.621,1.0,-0.272,-0.647,1.0,-1.106,1.703);
|
|
|
|
vec3 hueShiftRGB(vec3 col,float deg){
|
|
vec3 yiq=rgb2yiq*col;
|
|
float rad=radians(deg);
|
|
float cosh=cos(rad),sinh=sin(rad);
|
|
vec3 yiqShift=vec3(yiq.x,yiq.y*cosh-yiq.z*sinh,yiq.y*sinh+yiq.z*cosh);
|
|
return clamp(yiq2rgb*yiqShift,0.0,1.0);
|
|
}
|
|
|
|
vec4 sigmoid(vec4 x){return 1./(1.+exp(-x));}
|
|
|
|
vec4 cppn_fn(vec2 coordinate,float in0,float in1,float in2){
|
|
buf[6]=vec4(coordinate.x,coordinate.y,0.3948333106474662+in0,0.36+in1);
|
|
buf[7]=vec4(0.14+in2,sqrt(coordinate.x*coordinate.x+coordinate.y*coordinate.y),0.,0.);
|
|
buf[0]=mat4(vec4(6.5404263,-3.6126034,0.7590882,-1.13613),vec4(2.4582713,3.1660357,1.2219609,0.06276096),vec4(-5.478085,-6.159632,1.8701609,-4.7742867),vec4(6.039214,-5.542865,-0.90925294,3.251348))*buf[6]+mat4(vec4(0.8473259,-5.722911,3.975766,1.6522468),vec4(-0.24321538,0.5839259,-1.7661959,-5.350116),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(0.21808943,1.1243913,-1.7969975,5.0294676);
|
|
buf[1]=mat4(vec4(-3.3522482,-6.0612736,0.55641043,-4.4719114),vec4(0.8631464,1.7432913,5.643898,1.6106541),vec4(2.4941394,-3.5012043,1.7184316,6.357333),vec4(3.310376,8.209261,1.1355612,-1.165539))*buf[6]+mat4(vec4(5.24046,-13.034365,0.009859298,15.870829),vec4(2.987511,3.129433,-0.89023495,-1.6822904),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-5.9457836,-6.573602,-0.8812491,1.5436668);
|
|
buf[0]=sigmoid(buf[0]);buf[1]=sigmoid(buf[1]);
|
|
buf[2]=mat4(vec4(-15.219568,8.095543,-2.429353,-1.9381982),vec4(-5.951362,4.3115187,2.6393783,1.274315),vec4(-7.3145227,6.7297835,5.2473326,5.9411426),vec4(5.0796127,8.979051,-1.7278991,-1.158976))*buf[6]+mat4(vec4(-11.967154,-11.608155,6.1486754,11.237008),vec4(2.124141,-6.263192,-1.7050359,-0.7021966),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-4.17164,-3.2281182,-4.576417,-3.6401186);
|
|
buf[3]=mat4(vec4(3.1832156,-13.738922,1.879223,3.233465),vec4(0.64300746,12.768129,1.9141049,0.50990224),vec4(-0.049295485,4.4807224,1.4733979,1.801449),vec4(5.0039253,13.000481,3.3991797,-4.5561905))*buf[6]+mat4(vec4(-0.1285731,7.720628,-3.1425676,4.742367),vec4(0.6393625,3.714393,-0.8108378,-0.39174938),vec4(0.,0.,0.,0.),vec4(0.,0.,0.,0.))*buf[7]+vec4(-1.1811101,-21.621881,0.7851888,1.2329718);
|
|
buf[2]=sigmoid(buf[2]);buf[3]=sigmoid(buf[3]);
|
|
buf[4]=mat4(vec4(5.214916,-7.183024,2.7228765,2.6592617),vec4(-5.601878,-25.3591,4.067988,0.4602802),vec4(-10.57759,24.286327,21.102104,37.546658),vec4(4.3024497,-1.9625226,2.3458803,-1.372816))*buf[0]+mat4(vec4(-17.6526,-10.507558,2.2587414,12.462782),vec4(6.265566,-502.75443,-12.642513,0.9112289),vec4(-10.983244,20.741234,-9.701768,-0.7635988),vec4(5.383626,1.4819539,-4.1911616,-4.8444734))*buf[1]+mat4(vec4(12.785233,-16.345072,-0.39901125,1.7955981),vec4(-30.48365,-1.8345358,1.4542528,-1.1118771),vec4(19.872723,-7.337935,-42.941723,-98.52709),vec4(8.337645,-2.7312303,-2.2927687,-36.142323))*buf[2]+mat4(vec4(-16.298317,3.5471997,-0.44300047,-9.444417),vec4(57.5077,-35.609753,16.163465,-4.1534753),vec4(-0.07470326,-3.8656476,-7.0901804,3.1523974),vec4(-12.559385,-7.077619,1.490437,-0.8211543))*buf[3]+vec4(-7.67914,15.927437,1.3207729,-1.6686112);
|
|
buf[5]=mat4(vec4(-1.4109162,-0.372762,-3.770383,-21.367174),vec4(-6.2103205,-9.35908,0.92529047,8.82561),vec4(11.460242,-22.348068,13.625772,-18.693201),vec4(-0.3429052,-3.9905605,-2.4626114,-0.45033523))*buf[0]+mat4(vec4(7.3481627,-4.3661838,-6.3037653,-3.868115),vec4(1.5462853,6.5488915,1.9701879,-0.58291394),vec4(6.5858274,-2.2180402,3.7127688,-1.3730392),vec4(-5.7973905,10.134961,-2.3395722,-5.965605))*buf[1]+mat4(vec4(-2.5132585,-6.6685553,-1.4029363,-0.16285264),vec4(-0.37908727,0.53738135,4.389061,-1.3024765),vec4(-0.70647055,2.0111287,-5.1659346,-3.728635),vec4(-13.562562,10.487719,-0.9173751,-2.6487076))*buf[2]+mat4(vec4(-8.645013,6.5546675,-6.3944063,-5.5933375),vec4(-0.57783127,-1.077275,36.91025,5.736769),vec4(14.283112,3.7146652,7.1452246,-4.5958776),vec4(2.7192075,3.6021907,-4.366337,-2.3653464))*buf[3]+vec4(-5.9000807,-4.329569,1.2427121,8.59503);
|
|
buf[4]=sigmoid(buf[4]);buf[5]=sigmoid(buf[5]);
|
|
buf[6]=mat4(vec4(-1.61102,0.7970257,1.4675229,0.20917463),vec4(-28.793737,-7.1390953,1.5025433,4.656581),vec4(-10.94861,39.66238,0.74318546,-10.095605),vec4(-0.7229728,-1.5483948,0.7301322,2.1687684))*buf[0]+mat4(vec4(3.2547753,21.489103,-1.0194173,-3.3100595),vec4(-3.7316632,-3.3792162,-7.223193,-0.23685838),vec4(13.1804495,0.7916005,5.338587,5.687114),vec4(-4.167605,-17.798311,-6.815736,-1.6451967))*buf[1]+mat4(vec4(0.604885,-7.800309,-7.213122,-2.741014),vec4(-3.522382,-0.12359311,-0.5258442,0.43852118),vec4(9.6752825,-22.853785,2.062431,0.099892326),vec4(-4.3196306,-17.730087,2.5184598,5.30267))*buf[2]+mat4(vec4(-6.545563,-15.790176,-6.0438633,-5.415399),vec4(-43.591583,28.551912,-16.00161,18.84728),vec4(4.212382,8.394307,3.0958717,8.657522),vec4(-5.0237565,-4.450633,-4.4768,-5.5010443))*buf[3]+mat4(vec4(1.6985557,-67.05806,6.897715,1.9004834),vec4(1.8680354,2.3915145,2.5231109,4.081538),vec4(11.158006,1.7294737,2.0738268,7.386411),vec4(-4.256034,-306.24686,8.258898,-17.132736))*buf[4]+mat4(vec4(1.6889864,-4.5852966,3.8534803,-6.3482175),vec4(1.3543309,-1.2640043,9.932754,2.9079645),vec4(-5.2770967,0.07150358,-0.13962056,3.3269649),vec4(28.34703,-4.918278,6.1044083,4.085355))*buf[5]+vec4(6.6818056,12.522166,-3.7075126,-4.104386);
|
|
buf[7]=mat4(vec4(-8.265602,-4.7027016,5.098234,0.7509808),vec4(8.6507845,-17.15949,16.51939,-8.884479),vec4(-4.036479,-2.3946867,-2.6055532,-1.9866527),vec4(-2.2167742,-1.8135649,-5.9759874,4.8846445))*buf[0]+mat4(vec4(6.7790847,3.5076547,-2.8191125,-2.7028968),vec4(-5.743024,-0.27844876,1.4958696,-5.0517144),vec4(13.122226,15.735168,-2.9397483,-4.101023),vec4(-14.375265,-5.030483,-6.2599335,2.9848232))*buf[1]+mat4(vec4(4.0950394,-0.94011575,-5.674733,4.755022),vec4(4.3809423,4.8310084,1.7425908,-3.437416),vec4(2.117492,0.16342592,-104.56341,16.949184),vec4(-5.22543,-2.994248,3.8350096,-1.9364246))*buf[2]+mat4(vec4(-5.900337,1.7946124,-13.604192,-3.8060522),vec4(6.6583457,31.911177,25.164474,91.81147),vec4(11.840538,4.1503043,-0.7314397,6.768467),vec4(-6.3967767,4.034772,6.1714606,-0.32874924))*buf[3]+mat4(vec4(3.4992442,-196.91893,-8.923708,2.8142626),vec4(3.4806502,-3.1846354,5.1725626,5.1804223),vec4(-2.4009497,15.585794,1.2863957,2.0252278),vec4(-71.25271,-62.441242,-8.138444,0.50670296))*buf[4]+mat4(vec4(-12.291733,-11.176166,-7.3474145,4.390294),vec4(10.805477,5.6337385,-0.9385842,-4.7348723),vec4(-12.869276,-7.039391,5.3029537,7.5436664),vec4(1.4593618,8.91898,3.5101583,5.840625))*buf[5]+vec4(2.2415268,-6.705987,-0.98861027,-2.117676);
|
|
buf[6]=sigmoid(buf[6]);buf[7]=sigmoid(buf[7]);
|
|
buf[0]=mat4(vec4(1.6794263,1.3817469,2.9625452,0.),vec4(-1.8834411,-1.4806935,-3.5924516,0.),vec4(-1.3279216,-1.0918057,-2.3124623,0.),vec4(0.2662234,0.23235129,0.44178495,0.))*buf[0]+mat4(vec4(-0.6299101,-0.5945583,-0.9125601,0.),vec4(0.17828953,0.18300213,0.18182953,0.),vec4(-2.96544,-2.5819945,-4.9001055,0.),vec4(1.4195864,1.1868085,2.5176322,0.))*buf[1]+mat4(vec4(-1.2584374,-1.0552157,-2.1688404,0.),vec4(-0.7200217,-0.52666044,-1.438251,0.),vec4(0.15345335,0.15196142,0.272854,0.),vec4(0.945728,0.8861938,1.2766753,0.))*buf[2]+mat4(vec4(-2.4218085,-1.968602,-4.35166,0.),vec4(-22.683098,-18.0544,-41.954372,0.),vec4(0.63792,0.5470648,1.1078634,0.),vec4(-1.5489894,-1.3075932,-2.6444845,0.))*buf[3]+mat4(vec4(-0.49252132,-0.39877754,-0.91366625,0.),vec4(0.95609266,0.7923952,1.640221,0.),vec4(0.30616966,0.15693925,0.8639857,0.),vec4(1.1825981,0.94504964,2.176963,0.))*buf[4]+mat4(vec4(0.35446745,0.3293795,0.59547555,0.),vec4(-0.58784515,-0.48177817,-1.0614829,0.),vec4(2.5271258,1.9991658,4.6846647,0.),vec4(0.13042648,0.08864098,0.30187556,0.))*buf[5]+mat4(vec4(-1.7718065,-1.4033192,-3.3355875,0.),vec4(3.1664357,2.638297,5.378702,0.),vec4(-3.1724713,-2.6107926,-5.549295,0.),vec4(-2.851368,-2.249092,-5.3013067,0.))*buf[6]+mat4(vec4(1.5203838,1.2212278,2.8404984,0.),vec4(1.5210563,1.2651345,2.683903,0.),vec4(2.9789467,2.4364579,5.2347264,0.),vec4(2.2270417,1.8825914,3.8028636,0.))*buf[7]+vec4(-1.5468478,-3.6171484,0.24762098,0.);
|
|
buf[0]=sigmoid(buf[0]);
|
|
return vec4(buf[0].x,buf[0].y,buf[0].z,1.);
|
|
}
|
|
|
|
void mainImage(out vec4 fragColor,in vec2 fragCoord){
|
|
vec2 uv=fragCoord/uResolution.xy*2.-1.;
|
|
uv.y*=-1.;
|
|
uv+=uWarp*vec2(sin(uv.y*6.283+uTime*0.5),cos(uv.x*6.283+uTime*0.5))*0.05;
|
|
fragColor=cppn_fn(uv,0.1*sin(0.3*uTime),0.1*sin(0.69*uTime),0.1*sin(0.44*uTime));
|
|
}
|
|
|
|
void main(){
|
|
vec4 col;mainImage(col,gl_FragCoord.xy);
|
|
col.rgb=hueShiftRGB(col.rgb,uHueShift);
|
|
float scanline_val=sin(gl_FragCoord.y*uScanFreq)*0.5+0.5;
|
|
col.rgb*=1.-(scanline_val*scanline_val)*uScan;
|
|
col.rgb+=(rand(gl_FragCoord.xy+uTime)-0.5)*uNoise;
|
|
gl_FragColor=vec4(clamp(col.rgb,0.0,1.0),1.0);
|
|
}
|
|
`;class ek extends 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 tk({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 Vb({dpr:Math.min(window.devicePixelRatio,2),canvas:l});const w=c.gl;if(!w){console.error("DarkVeil: WebGL context not available");return}const v=new QS(w);d=new _b(w,{vertex:ZS,fragment:JS,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 DS(w,{geometry:v,program:d}),console.log("DarkVeil: Successfully initialized")}catch(w){console.error("DarkVeil: Initialization error:",w);return}const u=()=>{const w=window.innerWidth,v=window.innerHeight;c.setSize(w*o,v*o),d.uniforms.uResolution.value.set(w,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(ek,{children:m.jsx(tk,{...e})})}/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/var nk={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 rk=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,...nk,width:s,height:s,stroke:r,strokeWidth:o?Number(i)*24/Number(s):i,className:["lucide",`lucide-${rk(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 sk=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 ik=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 ok=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 ak=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 Co=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 $g=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 at=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 lk=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 uk=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 It=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 ck=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 Bg=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 Gn=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 dk=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 Ug=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 fk=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 bs=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 Wg=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 hk=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 pk=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 mk=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 Hg(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=Hg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Hg(e))&&(r&&(r+=" "),r+=t);return r}const Lc="-",yk=e=>{const t=xk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Lc);return a[0]===""&&a.length!==1&&a.shift(),qg(a,t)||vk(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},qg=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?qg(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=/^\[(.+)\]$/,vk=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}},xk=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return bk(Object.entries(e.classGroups),n).forEach(([i,o])=>{lu(o,r,i,t)}),r},lu=(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(wk(s)){lu(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{lu(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},wk=e=>e.isThemeGetter,bk=(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,Sk=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)}}},Gg="!",kk=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 w=0;w<a.length;w++){let v=a[w];if(c===0){if(v===s&&(r||a.slice(w,w+i)===t)){l.push(a.slice(d,w)),d=w+i;continue}if(v==="/"){f=w;continue}}v==="["?c++:v==="]"&&c--}const u=l.length===0?a:a.substring(d),h=u.startsWith(Gg),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},Ck=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},Pk=e=>({cache:Sk(e.cacheSize),parseClassName:kk(e),...yk(e)}),jk=/\s+/,Ek=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(jk);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 w=Ck(d).join(":"),v=f?w+Gg:w,y=v+g;if(i.includes(y))continue;i.push(y);const x=s(g,p);for(let b=0;b<x.length;++b){const S=x[b];i.push(v+S)}a=c+(a.length>0?" "+a:a)}return a};function Tk(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yg(t))&&(r&&(r+=" "),r+=n);return r}const Yg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Yg(e[r]))&&(n&&(n+=" "),n+=t);return n};function Nk(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((d,f)=>f(d),e());return n=Pk(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=Ek(l,n);return s(l,d),d}return function(){return i(Tk.apply(null,arguments))}}const te=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Kg=/^\[(?:([a-z-]+):)?(.+)\]$/i,Mk=/^\d+\/\d+$/,_k=new Set(["px","full","screen"]),Ak=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lk=/\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$/,Dk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nt=e=>kr(e)||_k.has(e)||Mk.test(e),Yt=e=>Br(e,"length",Wk),kr=e=>!!e&&!Number.isNaN(Number(e)),Ga=e=>Br(e,"number",kr),es=e=>!!e&&Number.isInteger(Number(e)),Fk=e=>e.endsWith("%")&&kr(e.slice(0,-1)),H=e=>Kg.test(e),Kt=e=>Ak.test(e),zk=new Set(["length","size","percentage"]),Ik=e=>Br(e,zk,Xg),Ok=e=>Br(e,"position",Xg),$k=new Set(["image","url"]),Bk=e=>Br(e,$k,qk),Uk=e=>Br(e,"",Hk),ts=()=>!0,Br=(e,t,n)=>{const r=Kg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Wk=e=>Lk.test(e)&&!Dk.test(e),Xg=()=>!1,Hk=e=>Rk.test(e),qk=e=>Vk.test(e),Gk=()=>{const e=te("colors"),t=te("spacing"),n=te("blur"),r=te("brightness"),s=te("borderColor"),i=te("borderRadius"),o=te("borderSpacing"),a=te("borderWidth"),l=te("contrast"),c=te("grayscale"),d=te("hueRotate"),f=te("invert"),u=te("gap"),h=te("gradientColorStops"),p=te("gradientColorStopPositions"),g=te("inset"),w=te("margin"),v=te("opacity"),y=te("padding"),x=te("saturate"),b=te("scale"),S=te("sepia"),C=te("skew"),P=te("space"),j=te("translate"),_=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",H,t],L=()=>[H,t],W=()=>["",Nt,Yt],A=()=>["auto",kr,H],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",H],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[kr,H];return{cacheSize:500,separator:":",theme:{colors:[ts],spacing:[Nt,Yt],blur:["none","",Kt,H],brightness:R(),borderColor:[e],borderRadius:["none","","full",Kt,H],borderSpacing:L(),borderWidth:W(),contrast:R(),grayscale:D(),hueRotate:R(),invert:D(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Fk,Yt],inset:F(),margin:F(),opacity:R(),padding:L(),saturate:R(),scale:R(),sepia:D(),skew:R(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[Kt]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),H]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],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",es,H]}],basis:[{basis:F()}],"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:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",es,H]}],"grid-cols":[{"grid-cols":[ts]}],"col-start-end":[{col:["auto",{span:["full",es,H]},H]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ts]}],"row-start-end":[{row:["auto",{span:[es,H]},H]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"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",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[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:[Kt]},Kt]}],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",Kt,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ga]}],"font-family":[{font:[ts]}],"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",kr,Ga]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Nt,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:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Nt,Yt]}],"underline-offset":[{"underline-offset":["auto",Nt,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:L()}],"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:[...O(),Ok]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ik]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bk]}],"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:[...B(),"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:B()}],"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:["",...B()]}],"outline-offset":[{"outline-offset":[Nt,H]}],"outline-w":[{outline:[Nt,Yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Nt,Yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kt,Uk]}],"shadow-color":[{shadow:[ts]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kt,H]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],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":[x]}],"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:R()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:R()}],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:[es,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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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:[Nt,Yt,Ga]}],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"]}}},Yk=Nk(Gk);function Dh(...e){return Yk(gk(e))}function Qg(e){const t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3);return`${t}:${n.toString().padStart(2,"0")}`}function Cr(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 Kk=()=>{var L,W,A,O,B,K,M,D,z,R;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}=ve(),[w,v]=k.useState(""),[y,x]=k.useState(!1),[b,S]=k.useState(!1),C=jn(),P=[{name:"Dashboard",href:"/",icon:at},{name:"Last Listened",href:"/last-listened",icon:It},{name:"Mixed Playlist",href:"/mixed-playlist",icon:Bg},{name:"Memory Lane",href:"/memory-lane",icon:Gn}],j=()=>{u(),localStorage.removeItem("spotify-user"),localStorage.removeItem("spotify-partner")},_=async()=>{var E,Y;if(!(!((E=d==null?void 0:d.user)!=null&&E.id)||!((Y=f==null?void 0:f.user)!=null&&Y.id))&&confirm(`Are you sure you want to remove ${f.user.display_name} as your partner?`)){S(!0);try{await Ct("/partners/remove",{partnerId:f.user.id})}catch(Q){try{await Ct("/partners/clear",{userId:d.user.id})}catch(ce){console.error("Failed to remove partner:",Q,ce)}}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),Y=Math.min(window.innerHeight*.9,800),Q=(window.innerWidth-E)/2,ce=(window.innerHeight-Y)/2;i({x:Q,y:ce})}},[n]),k.useEffect(()=>{const E=Q=>{o&&i({x:Q.clientX-l.x,y:Q.clientY-l.y})},Y=()=>{a(!1)};return o&&(document.addEventListener("mousemove",E),document.addEventListener("mouseup",Y)),()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",Y)}},[o,l]);const F=E=>{a(!0),c({x:E.clientX-s.x,y:E.clientY-s.y})};return m.jsxs(I.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(I.div,{whileHover:{scale:1.1,rotate:5},className:"w-8 h-8 rounded-full flex items-center justify-center",style:{background:`linear-gradient(135deg, ${((L=T.cssVars)==null?void 0:L.primary)||"#1db954"} 0%, ${((W=T.cssVars)==null?void 0:W.secondary)||"#1ed760"} 100%)`},children:m.jsx(at,{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 Q,ce,G,we;const Y=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",Y?"text-white":"text-white/60 hover:text-white hover:bg-white/5"),style:Y?{background:`linear-gradient(135deg, ${((Q=T.cssVars)==null?void 0:Q.primary)||"#1db954"}15 0%, ${((ce=T.cssVars)==null?void 0:ce.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:Y?(we=T.cssVars)==null?void 0:we.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:w,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||!w,onClick:async()=>{var E;if(!(!((E=d==null?void 0:d.user)!=null&&E.id)||!w)){x(!0);try{await Ct("/partners/request",{toUid:w})}finally{x(!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(I.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center space-x-2 text-sm text-white/70",children:[m.jsx(bs,{className:"w-4 h-4"}),m.jsxs("span",{children:["+ ",(A=f.user)==null?void 0:A.display_name]})]}),m.jsxs(I.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:(O=T.cssVars)==null?void 0:O.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(I.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(uk,{className:"w-6 h-6"})})]}),e&&m.jsx(I.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 Q,ce,G,we;const Y=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",Y?"text-white":"text-white/60 hover:text-white hover:bg-white/5"),style:Y?{background:`linear-gradient(135deg, ${((Q=T.cssVars)==null?void 0:Q.primary)||"#1db954"}15 0%, ${((ce=T.cssVars)==null?void 0:ce.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:Y?(we=T.cssVars)==null?void 0:we.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(bs,{className:"w-4 h-4"}),m.jsxs("span",{children:["Connected with ",(B=f.user)==null?void 0:B.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:(K=T.cssVars)==null?void 0:K.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(I.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(I.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:F,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(bs,{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:(M=f.user)==null?void 0:M.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:(D=f.user)==null?void 0:D.id}),m.jsx("div",{className:"text-sm text-green-400 font-medium mt-2",children:"✓ Connected"})]})]}),m.jsxs("button",{onClick:_,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(Ug,{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:w,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||!w,onClick:async()=>{var E;if(!(!((E=d==null?void 0:d.user)!=null&&E.id)||!w)){x(!0);try{await Ct("/partners/request",{toUid:w}),v("")}finally{x(!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, ${((z=T.cssVars)==null?void 0:z.primary)||"#1db954"} 0%, ${((R=T.cssVars)==null?void 0:R.secondary)||"#1ed760"} 100%)`},onMouseEnter:E=>{var Y;E.currentTarget.style.transform="translateY(-1px)",E.currentTarget.style.boxShadow=`0 8px 25px ${((Y=T.cssVars)==null?void 0:Y.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 Y,Q,ce;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 ${((Y=T.cssVars)==null?void 0:Y.primary)||"#1db954"}`:"1px solid rgba(255,255,255,0.2)",background:h===E.value?`linear-gradient(135deg, ${((Q=T.cssVars)==null?void 0:Q.primary)||"#1db954"}15 0%, ${((ce=T.cssVars)==null?void 0:ce.secondary)||"#1ed760"}10 100%)`:"rgba(255,255,255,0.02)"},onMouseEnter:G=>{var we;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 ${((we=T.cssVars)==null?void 0:we.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 Zg={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(w){g.resolve(w)},function(w){g.reject(w)}),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 w in g)g.hasOwnProperty(w)&&(h[w]=g[w])}),h},l=function(u,h){var p="";for(var g in h)if(h.hasOwnProperty(g)){var w=h[g];p+=encodeURIComponent(g)+"="+encodeURIComponent(w)+"&"}return p.length>0&&(p=p.substring(0,p.length-1),u=u+"?"+p),u},c=function(u,h){var p=new XMLHttpRequest,g=function(w,v){function y(C){w&&w(C),h&&h(null,C)}function x(){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):x()}},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 w={},v=null;typeof h=="object"?(w=h,v=p):typeof h=="function"&&(v=h);var y=u.type||"GET";return y!=="GET"&&u.postData&&!g?u.postData=a(u.postData,w):u.params=a(u.params,w),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 w={url:n+"/playlists/"+u+"/tracks",type:"POST",postData:{uris:h}};return d(w,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,w){var v={url:n+"/playlists/"+u+"/tracks",type:"PUT",postData:{range_start:h,insert_before:p}};return d(v,g,w)},f.prototype.removeTracksFromPlaylist=function(u,h,p){var g=h.map(function(v){return typeof v=="string"?{uri:v}:v}),w={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:g}};return d(w,{},p)},f.prototype.removeTracksFromPlaylistWithSnapshotId=function(u,h,p,g){var w=h.map(function(y){return typeof y=="string"?{uri:y}:y}),v={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{tracks:w,snapshot_id:p}};return d(v,{},g)},f.prototype.removeTracksFromPlaylistInPositions=function(u,h,p,g){var w={url:n+"/playlists/"+u+"/tracks",type:"DELETE",postData:{positions:h,snapshot_id:p}};return d(w,{},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 w={url:n+"/artists/"+u+"/top-tracks",params:{country:h}};return d(w,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 w={url:n+"/search/",params:{q:u,type:h.join(",")}};return d(w,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 w={type:"PUT",url:n+"/me/player",postData:g};return d(w,h,p)},f.prototype.play=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,g={};["context_uri","uris","offset","position_ms"].forEach(function(y){y in u&&(g[y]=u[y])});var w={type:"PUT",url:n+"/me/player/play",params:p,postData:g},v=typeof u=="function"?u:{};return d(w,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},w={type:"POST",url:n+"/me/player/queue",params:g};return d(w,h,p)},f.prototype.pause=function(u,h){u=u||{};var p="device_id"in u?{device_id:u.device_id}:null,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 w={type:"PUT",url:n+"/me/player/seek",params:g};return d(w,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 w={type:"PUT",url:n+"/me/player/repeat",params:g};return d(w,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 w={type:"PUT",url:n+"/me/player/volume",params:g};return d(w,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 w={type:"PUT",url:n+"/me/player/shuffle",params:g};return d(w,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})(Zg);var Xk=Zg.exports;const Qk=uu(Xk),Zk="7cab80d02df44a5bb96725be60a45875",Jg="https://159.195.9.107:3443/callback.html";console.log("🔍 Debug - Current redirect URI:",Jg);console.log("🔍 Debug - Environment VITE_REDIRECT_URI:","https://159.195.9.107:3443/callback.html");const Po=new Qk,Jk=()=>{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"].join(" "),n=`https://accounts.spotify.com/authorize?${new URLSearchParams({client_id:Zk,response_type:"code",redirect_uri:Jg,scope:e,show_dialog:"true"}).toString()}`;return console.log("🔍 Debug - Generated Spotify Auth URL:",n),n},e6=async(e,t)=>{Po.setAccessToken(e),await Po.play({uris:[t]})},t6=async e=>{Po.setAccessToken(e),await Po.pause()},n6=()=>{const[e,t]=k.useState(!1),n=()=>{t(!0),window.location.href=Jk()},r=[{icon:It,title:"Last Listened",description:"Discover what your partner is listening to right now and play it instantly"},{icon:Gn,title:"Mixed Playlist",description:"AI-powered playlists that blend your musical tastes perfectly"},{icon:at,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(I.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center mb-12",children:[m.jsx(I.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(at,{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(I.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(I.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(I.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(I.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(I.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(Wg,{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(I.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(sk,{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(I.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"})})]})})},r6=()=>{var P,j,_,T,F,L,W,A,O,B,K,M,D,z,R,E,Y,Q,ce,G,we,ni,Zn,Nn,xt,ea,Dc;const{currentUser:e,partnerUser:t,theme:n}=ve(),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),[w,v]=k.useState(null);k.useEffect(()=>{let $;const fe=async()=>{var Ce,Te,tt;try{const Jn=(Ce=e==null?void 0:e.user)==null?void 0:Ce.id;if(Jn){const ta=await ye(`/users/${Jn}/recently-played`),Ur=ve.getState().currentUser;Ur&&ve.getState().setCurrentUser({...Ur,recentlyPlayed:ta})}const Rc=(tt=(Te=ve.getState().partnerUser)==null?void 0:Te.user)==null?void 0:tt.id;if(Rc){const ta=await ye(`/users/${Rc}/recently-played`),Ur=ve.getState().partnerUser;Ur&&ve.getState().setPartnerUser({...Ur,recentlyPlayed:ta})}}catch{}$=setTimeout(fe,3e4)};return fe(),()=>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 fe;if((fe=e==null?void 0:e.user)!=null&&fe.id){a(!0);try{const Ce=await ye(`/partners/requests/${e.user.id}`);i(Ce)}catch{i([])}finally{a(!1)}}})()},[(_=e==null?void 0:e.user)==null?void 0:_.id]),k.useEffect(()=>{let $;const fe=async()=>{var Te;if((Te=e==null?void 0:e.user)!=null&&Te.id)try{const tt=await ye(`/users/${e.user.id}/status`);c(tt)}catch{}},Ce=()=>{if(!(l!=null&&l.nextSyncAt)){f("");return}const Te=l.nextSyncAt-Date.now();if(Te<=0){f("now");return}const tt=Math.floor(Te/6e4),Jn=Math.floor(Te%6e4/1e3);f(`${tt}m ${Jn}s`)};return fe(),$=setInterval(()=>{Ce()},1e3),()=>clearInterval($)},[(T=e==null?void 0:e.user)==null?void 0:T.id,l==null?void 0:l.nextSyncAt]),k.useEffect(()=>{let $;const fe=async()=>{var Ce,Te;try{const tt=(Ce=e==null?void 0:e.user)==null?void 0:Ce.id;tt&&(g(await ye(`/users/${tt}/now-playing`)),(Te=t==null?void 0:t.user)!=null&&Te.id?v(await ye(`/users/${t.user.id}/now-playing`)):v(null))}catch{}$=setTimeout(fe,8e3)};return fe(),()=>clearTimeout($)},[(F=e==null?void 0:e.user)==null?void 0:F.id,(L=t==null?void 0:t.user)==null?void 0:L.id]);const y=async()=>{var $;if(($=e==null?void 0:e.user)!=null&&$.id){h(!0);try{await Ct(`/users/${e.user.id}/sync`);const fe=await ye(`/users/${e.user.id}/status`);c(fe);const[Ce,Te]=await Promise.all([ye(`/users/${e.user.id}/recently-played`),ye(`/users/${e.user.id}/top-tracks?time_range=short_term`)]),tt=ve.getState().currentUser;tt&&ve.getState().setCurrentUser({...tt,recentlyPlayed:Ce,topTracks:Te.map(Jn=>Jn.track)}),Pe.success("Synced latest data")}catch{Pe.error("Failed to sync")}finally{h(!1)}}},x=async $=>{await Ct(`/partners/requests/${$}/accept`),i(fe=>fe.filter(Ce=>Ce.id!==$))},b=async $=>{await Ct(`/partners/requests/${$}/decline`),i(fe=>fe.filter(Ce=>Ce.id!==$))},S=[{title:"Last Listened",description:"See what your partner is listening to right now",icon:It,href:"/last-listened",primaryColor:((W=r.cssVars)==null?void 0:W.primary)||"#1db954",secondaryColor:((A=r.cssVars)==null?void 0:A.secondary)||"#1ed760",accentColor:((O=r.cssVars)==null?void 0:O.accent)||"#00e676"},{title:"Mixed Playlist",description:"Create AI-powered playlists blending both your tastes",icon:Bg,href:"/mixed-playlist",primaryColor:((B=r.cssVars)==null?void 0:B.secondary)||"#1ed760",secondaryColor:((K=r.cssVars)==null?void 0:K.accent)||"#00e676",accentColor:((M=r.cssVars)==null?void 0:M.primary)||"#1db954"},{title:"Memory Lane",description:"Your shared musical journey and memories",icon:Gn,href:"/memory-lane",primaryColor:((D=r.cssVars)==null?void 0:D.accent)||"#00e676",secondaryColor:((z=r.cssVars)==null?void 0:z.primary)||"#1db954",accentColor:((R=r.cssVars)==null?void 0:R.secondary)||"#1ed760"}],C=()=>{var $;return($=e==null?void 0:e.recentlyPlayed)!=null&&$[0]?Cr(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(I.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(I.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:((ce=(Q=(Y=p.item.album)==null?void 0:Y.images)==null?void 0:Q[0])==null?void 0:ce.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"}),w!=null&&w.is_playing&&(w!=null&&w.item)?m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("img",{src:((Zn=(ni=(we=w.item.album)==null?void 0:we.images)==null?void 0:ni[0])==null?void 0:Zn.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:w.item.name}),m.jsx("div",{className:"text-white/70 text-sm truncate",children:(Nn=w.item.artists)==null?void 0:Nn.map($=>$.name).join(", ")})]})]}):m.jsx("div",{className:"text-white/50",children:"Not playing"})]})]}),m.jsxs(I.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(at,{className:"w-8 h-8 text-white"})}),m.jsxs("div",{children:[m.jsxs("h3",{className:"text-xl font-semibold text-white",children:["Connected with ",(xt=t.user)==null?void 0:xt.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:()=>x($.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(I.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(Co,{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(fk,{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:[((ea=e==null?void 0:e.topTracks)==null?void 0:ea.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(bs,{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(I.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(($,fe)=>m.jsx(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4+fe*.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(I.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(($,fe)=>{var Ce,Te;return m.jsxs(I.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.7+fe*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors",children:[m.jsx("img",{src:((Ce=$.track.album.images[0])==null?void 0:Ce.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:Cr($.played_at)})]},$.track.id)})})})]})]})};let Pi=!1;const Rh=()=>{const[e]=_x(),t=Uo(),{setCurrentUser:n,setPartnerUser:r,currentUser:s}=ve(),[i,o]=k.useState("loading"),[a,l]=k.useState("");k.useEffect(()=>{(async()=>{if(Pi){console.log("🔍 CallbackPage - Already processing globally, skipping...");return}Pi=!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 db("/auth/exchange",{code:u});l("Syncing your music data..."),await Ct(`/users/${p.uid}/sync`,void 0,p.token),l("Loading your profile...");const[g,w,v]=await Promise.all([ye(`/users/${p.uid}`),ye(`/users/${p.uid}/recently-played`),ye(`/users/${p.uid}/top-tracks?time_range=short_term`)]),y={user:g,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,recentlyPlayed:w,topTracks:v.map(x=>x.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"),Pe.success(s?"Partner connected successfully!":"Successfully connected to Spotify!",{duration:3e3}),setTimeout(()=>{t("/"),setTimeout(()=>{Pi=!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"),Pe.error("Failed to connect to Spotify. Please try again."),setTimeout(()=>{t("/"),setTimeout(()=>{Pi=!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(lk,{className:"w-12 h-12 text-spotify-green animate-spin"});case"success":return m.jsx(ak,{className:"w-12 h-12 text-green-400"});case"error":return m.jsx(mk,{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(I.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(I.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(I.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(I.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(I.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(I.div,{className:"bg-spotify-green h-2 rounded-full",initial:{width:0},animate:{width:"100%"},transition:{duration:3,ease:"easeInOut"}})}),i==="error"&&m.jsx(I.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(I.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..."})]})})},s6=()=>{var g,w,v;const{currentUser:e,partnerUser:t,currentTrack:n,isPlaying:r,setCurrentTrack:s,setIsPlaying:i,theme:o}=ve(),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}`})),x=((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,...x].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,x)=>{var b,S;if(!(e!=null&&e.accessToken)){Pe.error("Not authenticated with Spotify");return}try{c(!0),f(x),r&&d===x?(await t6(e.accessToken),i(!1),s(null),f(null)):(await e6(e.accessToken,y),i(!0),s(((S=(b=e.recentlyPlayed)==null?void 0:b.find(C=>C.track.id===x))==null?void 0:S.track)||null)),Pe.success(r&&d===x?"Paused":"Now playing")}catch(C){console.error("Playback error:",C),Pe.error("Failed to play track. Make sure Spotify is open on your device.")}finally{c(!1)}},p=({user:y,title:x,isPartner:b=!1})=>{var C,P,j,_,T;if(!((C=y==null?void 0:y.recentlyPlayed)!=null&&C.length))return m.jsxs(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[m.jsx(It,{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(I.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(bs,{className:"w-6 h-6 text-white"})}),m.jsxs("div",{children:[m.jsx("h2",{className:"text-2xl font-bold text-white",children:x}),m.jsxs("p",{className:"text-white/70",children:["Last played: ",Cr(S.played_at)]})]})]}),m.jsx(I.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(hk,{className:"w-6 h-6",style:{color:((_=a.cssVars)==null?void 0:_.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(F=>F.name).join(", ")}),m.jsxs("p",{className:"text-white/50 text-sm",children:[S.track.album.name," • ",Qg(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:F=>{l||(F.currentTarget.style.opacity="0.9")},onMouseLeave:F=>{l||(F.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(ck,{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($g,{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(Co,{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((F,L)=>{var W,A,O;return m.jsxs(I.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:L*.1},className:"flex items-center space-x-4 p-3 rounded-lg hover:bg-white/5 transition-colors group",children:[m.jsx("img",{src:((W=F.track.album.images[0])==null?void 0:W.url)||"/placeholder-album.png",alt:F.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:F.track.name}),m.jsx("p",{className:"text-white/70 text-sm",children:(A=F.track.artists[0])==null?void 0:A.name})]}),m.jsx("div",{className:"text-white/50 text-sm",children:Cr(F.played_at)}),m.jsx("button",{onClick:()=>h(F.track.external_urls.spotify,F.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:((O=a.cssVars)==null?void 0:O.primary)||"#1db954"},onMouseEnter:B=>{l||(B.currentTarget.style.opacity="0.9")},onMouseLeave:B=>{l||(B.currentTarget.style.opacity="1")},children:m.jsx(Nh,{className:"w-4 h-4 text-white ml-0.5"})})]},F.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(I.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(at,{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:`${(w=e.user)==null?void 0:w.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(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-8 text-center",children:[m.jsx(at,{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(I.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(Co,{className:"w-5 h-5"}),m.jsx("span",{children:"Shared Timeline"})]}),m.jsx("div",{className:"space-y-3",children:u.items.map(y=>{var x,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=(x=y.track.album)==null?void 0:x.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:[Cr(new Date(y.played_at).toISOString()),m.jsx("div",{className:"text-white/60",children:y.who==="you"?"You":"Partner"})]})]},y.key)})})]})]})},i6=()=>{var F,L,W,A;const{currentUser:e,partnerUser:t,mixedPlaylists:n,addMixedPlaylist:r,removeMixedPlaylist:s,theme:i}=ve(),o=Vr(i),[a,l]=k.useState(!1),[c,d]=k.useState(!1),[f,u]=k.useState(null),[h,p]=k.useState(""),[g,w]=k.useState(""),[v,y]=k.useState(!0),[x,b]=k.useState(!1),S=g.split(",").map(O=>O.trim()).filter(O=>O.length>0),C=async()=>{var O,B,K,M,D,z;if(!f||!((O=e==null?void 0:e.user)!=null&&O.id)){Pe.error("Unable to create playlist");return}if(!(e!=null&&e.jwt)){Pe.error("Please login again");return}d(!0);try{const R={partnerId:((B=t==null?void 0:t.user)==null?void 0:B.id)||e.user.id,createForBoth:!1,includeKnown:!0,name:f.name,description:f.description},E=await Ct("/playlists/mixed",R,e.jwt);r({...f,spotifyId:(M=(K=E==null?void 0:E.createdFor)==null?void 0:K.creator)==null?void 0:M.playlistId,spotifyUrl:(z=(D=E==null?void 0:E.createdFor)==null?void 0:D.creator)==null?void 0:z.url}),Pe.success("Playlist created on Spotify!"),u(null)}catch(R){console.error("Spotify playlist creation error:",R),Pe.error("Failed to create playlist on Spotify")}finally{d(!1)}},P=async()=>{var O,B,K,M;if(!((O=e==null?void 0:e.user)!=null&&O.id)||!((B=t==null?void 0:t.user)!=null&&B.id)){Pe.error("Missing users");return}if(!(e!=null&&e.jwt)){Pe.error("Please login again");return}d(!0);try{const D={partnerId:t.user.id,createForBoth:x,includeKnown:v,vibe:h||void 0,genres:S.length?S:void 0,name:(f==null?void 0:f.name)||"Our Enhanced Mix",description:(f==null?void 0:f.description)||"An AI-blended mix with fresh recommendations"},z=await Ct("/playlists/mixed",D,e.jwt);Pe.success("Enhanced playlist created!"),(M=(K=z==null?void 0:z.createdFor)==null?void 0:K.creator)!=null&&M.url&&(r({...f||{id:Date.now().toString(),name:D.name,description:D.description,tracks:[],createdAt:new Date,createdBy:"AI Magic ✨"},spotifyId:z.createdFor.creator.playlistId,spotifyUrl:z.createdFor.creator.url}),u(null))}catch(D){console.error(D),Pe.error("Failed to create enhanced playlist")}finally{d(!1)}},j=()=>{f&&(r(f),u(null),Pe.success("Playlist saved locally!"))},_=({playlist:O,isNew:B=!1})=>m.jsxs(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},whileHover:{scale:1.02},className:`glass rounded-2xl p-6 ${B?"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.jsx("div",{className:`w-16 h-16 rounded-xl flex items-center justify-center ${B?"bg-gradient-to-br from-spotify-green to-green-600":"bg-gradient-to-br from-purple-500 to-pink-500"}`,children:B?m.jsx(Gn,{className:"w-8 h-8 text-white"}):m.jsx(It,{className:"w-8 h-8 text-white"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-xl font-semibold text-white",children:O.name}),m.jsx("p",{className:"text-white/70 text-sm",children:O.description}),m.jsxs("p",{className:"text-white/50 text-xs mt-1",children:["Created ",B?"just now":new Date(O.createdAt).toLocaleDateString()," • ",O.tracks.length," tracks"]})]})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[O.spotifyUrl&&m.jsx("a",{href:O.spotifyUrl,target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:m.jsx($g,{className:"w-4 h-4 text-white"})}),!B&&m.jsx("button",{onClick:()=>s(O.id),className:"w-8 h-8 rounded-full bg-red-500/20 hover:bg-red-500/30 flex items-center justify-center transition-colors",children:m.jsx(Ug,{className:"w-4 h-4 text-red-400"})})]})]}),m.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[O.tracks.slice(0,5).map((K,M)=>{var D,z,R,E,Y,Q;return m.jsxs(I.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:M*.1},className:"flex items-center space-x-3 p-2 rounded-lg hover:bg-white/5 transition-colors",children:[m.jsx("img",{src:((R=(z=(D=K.album)==null?void 0:D.images)==null?void 0:z[0])==null?void 0:R.url)||"/placeholder-album.png",alt:((E=K.album)==null?void 0:E.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:K.name}),m.jsx("p",{className:"text-white/70 text-sm truncate",children:((Q=(Y=K.artists)==null?void 0:Y[0])==null?void 0:Q.name)||"Unknown Artist"})]}),m.jsx("div",{className:"text-white/50 text-sm",children:Qg(K.duration_ms)})]},K.id)}),O.tracks.length>5&&m.jsxs("div",{className:"text-center text-white/50 text-sm py-2",children:["+",O.tracks.length-5," more tracks"]})]}),B&&m.jsxs("div",{className:"flex items-center space-x-3 mt-6 pt-4 border-t border-white/10",children:[m.jsx("button",{onClick:C,disabled:c||x,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:c?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:x?"Disabled (using Create for both)":"Create on Spotify"})]})}),m.jsx("button",{onClick:j,className:"px-4 py-3 bg-white/10 hover:bg-white/20 text-white rounded-lg transition-colors",children:"Save Locally"})]})]}),T=(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(I.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(Gn,{className:"w-10 h-10",style:{color:((F=o.cssVars)==null?void 0:F.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"})]}),T&&m.jsx(I.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:`${((L=o.cssVars)==null?void 0:L.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, ${((W=o.cssVars)==null?void 0:W.primary)||"#1db954"} 0%, ${((A=o.cssVars)==null?void 0:A.secondary)||"#1ed760"} 100%)`},children:m.jsx(pk,{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:h,onChange:O=>p(O.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:g,onChange:O=>w(O.target.value)})]}),m.jsxs("label",{className:"flex items-center space-x-2 text-white/80",children:[m.jsx("input",{type:"checkbox",checked:v,onChange:O=>y(O.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:x,onChange:O=>b(O.target.checked)}),m.jsx("span",{children:"Create playlist on both accounts"})]})]}),m.jsx("div",{className:"flex items-center justify-center gap-3 mt-6",children:m.jsx("button",{onClick:P,disabled:c,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"})})]})}),f&&m.jsxs(I.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(_,{playlist:f,isNew:!0})]}),n.length>0&&m.jsxs(I.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(O=>m.jsx(_,{playlist:O},O.id))})]}),!T&&m.jsxs(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[m.jsx(at,{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&&T&&!f&&m.jsxs(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[m.jsx(It,{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"})]})]})},o6=()=>{const{currentUser:e,partnerUser:t,memoryLane:n,addMemoryLaneItem:r}=ve(),[s,i]=k.useState(!1),[o,a]=k.useState({title:"",description:"",type:"milestone"});k.useEffect(()=>{var u,h,p,g,w,v,y,x,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=(w=e.recentlyPlayed)==null?void 0:w[0])==null?void 0:v.track.name)||"Your favorite track"}" recently`,track:(x=(y=e.recentlyPlayed)==null?void 0:y[0])==null?void 0:x.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(_=>{r(_)})},[e,t,n.length,r]);const l=()=>{var h,p;if(!o.title.trim()||!o.description.trim()){Pe.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),Pe.success("Memory added to your journey!")},c=u=>{switch(u){case"shared_track":return m.jsx(It,{className:"w-5 h-5"});case"playlist_created":return m.jsx(Gn,{className:"w-5 h-5"});case"milestone":return m.jsx(dk,{className:"w-5 h-5"});default:return m.jsx(at,{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(I.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(I.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(ik,{className:"w-4 h-4"}),m.jsx("span",{children:Cr(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(It,{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(Wg,{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(Co,{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(at,{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(I.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(at,{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(I.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(I.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(I.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(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"glass rounded-2xl p-12 text-center",children:[m.jsx(ok,{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(I.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(at,{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(It,{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(Gn,{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 a6(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 l6=()=>{var u,h;const{currentUser:e,partnerUser:t}=ve(),[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 w,v,y,x;try{const b=(w=e==null?void 0:e.user)==null?void 0:w.id;if(b){const C=await ye(`/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 ye(`/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 ye(`/users/${S}/now-playing`);i(C);const P=(x=C==null?void 0:C.item)==null?void 0:x.id;if(P){const j=await ye(`/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(()=>a6(o,l),[o,l]),f=({data:p,who:g})=>{var v,y,x;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 w=p.item;return m.jsxs("div",{className:"glass rounded-2xl p-6 flex items-center gap-4",children:[m.jsx("img",{src:((x=(y=(v=w==null?void 0:w.album)==null?void 0:v.images)==null?void 0:y[0])==null?void 0:x.url)||"/placeholder-album.png",alt:w==null?void 0:w.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:w==null?void 0:w.name}),m.jsx("div",{className:"text-white/70 text-sm truncate",children:((w==null?void 0:w.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(I.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(I.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 u6(){var o;const{currentUser:e,partnerUser:t,isLoading:n,theme:r}=ve(),s=jn();console.log("🔍 App - Current location:",s.pathname),k.useEffect(()=>{Vr(r)},[r]),k.useEffect(()=>{const a=localStorage.getItem("spotify-user"),l=localStorage.getItem("spotify-partner");if(a)try{const c=JSON.parse(a);ve.getState().setCurrentUser(c)}catch(c){console.error("Failed to parse stored user data:",c),localStorage.removeItem("spotify-user")}if(l)try{const c=JSON.parse(l);ve.getState().setPartnerUser(c)}catch(c){console.error("Failed to parse stored partner data:",c),localStorage.removeItem("spotify-partner")}},[]),k.useEffect(()=>{(async()=>{var c,d;const l=(d=(c=ve.getState().currentUser)==null?void 0:c.user)==null?void 0:d.id;if(l&&!ve.getState().partnerUser)try{const f=await ye(`/partners/partner/${l}`);if(f.partnerId){const[u,h,p]=await Promise.all([ye(`/users/${f.partnerId}`),ye(`/users/${f.partnerId}/recently-played`),ye(`/users/${f.partnerId}/top-tracks?time_range=short_term`)]);ve.getState().setPartnerUser({user:u,accessToken:null,refreshToken:null,isAuthenticated:!0,recentlyPlayed:h,topTracks:p.map(g=>g.track),topArtists:[]})}}catch{}})()},[(o=e==null?void 0:e.user)==null?void 0:o.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(I.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(Kk,{}),m.jsxs(xx,{children:[m.jsx(Mt,{path:"/",element:i?m.jsx(r6,{}):m.jsx(n6,{})}),m.jsx(Mt,{path:"/callback",element:m.jsx(Rh,{})}),m.jsx(Mt,{path:"/callback.html",element:m.jsx(Rh,{})}),i&&m.jsxs(m.Fragment,{children:[m.jsx(Mt,{path:"/last-listened",element:m.jsx(s6,{})}),m.jsx(Mt,{path:"/mixed-playlist",element:m.jsx(i6,{})}),m.jsx(Mt,{path:"/memory-lane",element:m.jsx(o6,{})}),m.jsx(Mt,{path:"/live",element:m.jsx(l6,{})})]}),m.jsx(Mt,{path:"*",element:m.jsx(yx,{to:"/",replace:!0})})]})]})]})}Ya.createRoot(document.getElementById("root")).render(m.jsx(qs.StrictMode,{children:m.jsxs(Ex,{children:[m.jsx(u6,{}),m.jsx(x2,{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"}}})]})}));
|