fightbook 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +238 -0
- package/dist/assets/index-C-_XA-_f.js +357 -0
- package/dist/assets/index-DDAi7vIJ.css +1 -0
- package/dist/cli.js +171 -0
- package/dist/cli.js.map +7 -0
- package/dist/engine/FightEngine.js +605 -0
- package/dist/engine/FightEngine.js.map +7 -0
- package/dist/favicon.ico +0 -0
- package/dist/hero-logo.png +0 -0
- package/dist/index.html +33 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +7 -0
- package/dist/placeholder.svg +1 -0
- package/dist/robots.txt +14 -0
- package/dist/types/agent.js +425 -0
- package/dist/types/agent.js.map +7 -0
- package/dist/types/fight.js +71 -0
- package/dist/types/fight.js.map +7 -0
- package/package.json +131 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
var Uv=Object.defineProperty;var Hv=(e,t,n)=>t in e?Uv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gt=(e,t,n)=>Hv(e,typeof t!="symbol"?t+"":t,n);function Wv(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tm={exports:{}},Wo={},Nm={exports:{}},G={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ss=Symbol.for("react.element"),Kv=Symbol.for("react.portal"),Gv=Symbol.for("react.fragment"),Yv=Symbol.for("react.strict_mode"),Xv=Symbol.for("react.profiler"),Qv=Symbol.for("react.provider"),qv=Symbol.for("react.context"),Zv=Symbol.for("react.forward_ref"),Jv=Symbol.for("react.suspense"),ex=Symbol.for("react.memo"),tx=Symbol.for("react.lazy"),_d=Symbol.iterator;function nx(e){return e===null||typeof e!="object"?null:(e=_d&&e[_d]||e["@@iterator"],typeof e=="function"?e:null)}var Em={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pm=Object.assign,jm={};function Qr(e,t,n){this.props=e,this.context=t,this.refs=jm,this.updater=n||Em}Qr.prototype.isReactComponent={};Qr.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")};Qr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Am(){}Am.prototype=Qr.prototype;function Bc(e,t,n){this.props=e,this.context=t,this.refs=jm,this.updater=n||Em}var Uc=Bc.prototype=new Am;Uc.constructor=Bc;Pm(Uc,Qr.prototype);Uc.isPureReactComponent=!0;var Ld=Array.isArray,Rm=Object.prototype.hasOwnProperty,Hc={current:null},Mm={key:!0,ref:!0,__self:!0,__source:!0};function Dm(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Rm.call(t,r)&&!Mm.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:ss,type:e,key:s,ref:o,props:i,_owner:Hc.current}}function rx(e,t){return{$$typeof:ss,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ss}function ix(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zd=/\/+/g;function ba(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ix(""+e.key):t.toString(36)}function Bs(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ss:case Kv:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ba(o,0):r,Ld(i)?(n="",e!=null&&(n=e.replace(zd,"$&/")+"/"),Bs(i,t,n,"",function(c){return c})):i!=null&&(Wc(i)&&(i=rx(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(zd,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Ld(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+ba(s,a);o+=Bs(s,t,n,l,i)}else if(l=nx(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+ba(s,a++),o+=Bs(s,t,n,l,i);else if(s==="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 ys(e,t,n){if(e==null)return e;var r=[],i=0;return Bs(e,r,"","",function(s){return t.call(n,s,i++)}),r}function sx(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},Us={transition:null},ox={ReactCurrentDispatcher:Oe,ReactCurrentBatchConfig:Us,ReactCurrentOwner:Hc};function _m(){throw Error("act(...) is not supported in production builds of React.")}G.Children={map:ys,forEach:function(e,t,n){ys(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ys(e,function(){t++}),t},toArray:function(e){return ys(e,function(t){return t})||[]},only:function(e){if(!Wc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=Qr;G.Fragment=Gv;G.Profiler=Xv;G.PureComponent=Bc;G.StrictMode=Yv;G.Suspense=Jv;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ox;G.act=_m;G.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=Pm({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Hc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Rm.call(t,l)&&!Mm.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:ss,type:e.type,key:i,ref:s,props:r,_owner:o}};G.createContext=function(e){return e={$$typeof:qv,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Qv,_context:e},e.Consumer=e};G.createElement=Dm;G.createFactory=function(e){var t=Dm.bind(null,e);return t.type=e,t};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:Zv,render:e}};G.isValidElement=Wc;G.lazy=function(e){return{$$typeof:tx,_payload:{_status:-1,_result:e},_init:sx}};G.memo=function(e,t){return{$$typeof:ex,type:e,compare:t===void 0?null:t}};G.startTransition=function(e){var t=Us.transition;Us.transition={};try{e()}finally{Us.transition=t}};G.unstable_act=_m;G.useCallback=function(e,t){return Oe.current.useCallback(e,t)};G.useContext=function(e){return Oe.current.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e){return Oe.current.useDeferredValue(e)};G.useEffect=function(e,t){return Oe.current.useEffect(e,t)};G.useId=function(){return Oe.current.useId()};G.useImperativeHandle=function(e,t,n){return Oe.current.useImperativeHandle(e,t,n)};G.useInsertionEffect=function(e,t){return Oe.current.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return Oe.current.useLayoutEffect(e,t)};G.useMemo=function(e,t){return Oe.current.useMemo(e,t)};G.useReducer=function(e,t,n){return Oe.current.useReducer(e,t,n)};G.useRef=function(e){return Oe.current.useRef(e)};G.useState=function(e){return Oe.current.useState(e)};G.useSyncExternalStore=function(e,t,n){return Oe.current.useSyncExternalStore(e,t,n)};G.useTransition=function(){return Oe.current.useTransition()};G.version="18.3.1";Nm.exports=G;var x=Nm.exports;const M=Cm(x),ax=Wv({__proto__:null,default:M},[x]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var lx=x,cx=Symbol.for("react.element"),ux=Symbol.for("react.fragment"),dx=Object.prototype.hasOwnProperty,fx=lx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hx={key:!0,ref:!0,__self:!0,__source:!0};function Lm(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)dx.call(t,r)&&!hx.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:cx,type:e,key:s,ref:o,props:i,_owner:fx.current}}Wo.Fragment=ux;Wo.jsx=Lm;Wo.jsxs=Lm;Tm.exports=Wo;var u=Tm.exports,zm={exports:{}},Je={},Im={exports:{}},Vm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(j,A){var D=j.length;j.push(A);e:for(;0<D;){var W=D-1>>>1,F=j[W];if(0<i(F,A))j[W]=A,j[D]=F,D=W;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var A=j[0],D=j.pop();if(D!==A){j[0]=D;e:for(var W=0,F=j.length,V=F>>>1;W<V;){var K=2*(W+1)-1,U=j[K],X=K+1,O=j[X];if(0>i(U,D))X<F&&0>i(O,U)?(j[W]=O,j[X]=D,W=X):(j[W]=U,j[K]=D,W=K);else if(X<F&&0>i(O,D))j[W]=O,j[X]=D,W=X;else break e}}return A}function i(j,A){var D=j.sortIndex-A.sortIndex;return D!==0?D:j.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,m=3,h=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(j){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=j)r(c),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(c)}}function b(j){if(w=!1,y(j),!v)if(n(l)!==null)v=!0,ne(k);else{var A=n(c);A!==null&&$(b,A.startTime-j)}}function k(j,A){v=!1,w&&(w=!1,p(T),T=-1),h=!0;var D=m;try{for(y(A),f=n(l);f!==null&&(!(f.expirationTime>A)||j&&!z());){var W=f.callback;if(typeof W=="function"){f.callback=null,m=f.priorityLevel;var F=W(f.expirationTime<=A);A=e.unstable_now(),typeof F=="function"?f.callback=F:f===n(l)&&r(l),y(A)}else r(l);f=n(l)}if(f!==null)var V=!0;else{var K=n(c);K!==null&&$(b,K.startTime-A),V=!1}return V}finally{f=null,m=D,h=!1}}var C=!1,N=null,T=-1,E=5,P=-1;function z(){return!(e.unstable_now()-P<E)}function I(){if(N!==null){var j=e.unstable_now();P=j;var A=!0;try{A=N(!0,j)}finally{A?J():(C=!1,N=null)}}else C=!1}var J;if(typeof g=="function")J=function(){g(I)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,pe=le.port2;le.port1.onmessage=I,J=function(){pe.postMessage(null)}}else J=function(){S(I,0)};function ne(j){N=j,C||(C=!0,J())}function $(j,A){T=S(function(){j(e.unstable_now())},A)}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(j){j.callback=null},e.unstable_continueExecution=function(){v||h||(v=!0,ne(k))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(m){case 1:case 2:case 3:var A=3;break;default:A=m}var D=m;m=A;try{return j()}finally{m=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,A){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var D=m;m=j;try{return A()}finally{m=D}},e.unstable_scheduleCallback=function(j,A,D){var W=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?W+D:W):D=W,j){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=D+F,j={id:d++,callback:A,priorityLevel:j,startTime:D,expirationTime:F,sortIndex:-1},D>W?(j.sortIndex=D,t(c,j),n(l)===null&&j===n(c)&&(w?(p(T),T=-1):w=!0,$(b,D-W))):(j.sortIndex=F,t(l,j),v||h||(v=!0,ne(k))),j},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(j){var A=m;return function(){var D=m;m=A;try{return j.apply(this,arguments)}finally{m=D}}}})(Vm);Im.exports=Vm;var mx=Im.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var px=x,Ze=mx;function R(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 Om=new Set,zi={};function nr(e,t){Fr(e,t),Fr(e+"Capture",t)}function Fr(e,t){for(zi[e]=t,e=0;e<t.length;e++)Om.add(t[e])}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gl=Object.prototype.hasOwnProperty,gx=/^[: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]*$/,Id={},Vd={};function yx(e){return gl.call(Vd,e)?!0:gl.call(Id,e)?!1:gx.test(e)?Vd[e]=!0:(Id[e]=!0,!1)}function vx(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 xx(e,t,n,r){if(t===null||typeof t>"u"||vx(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 Fe(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Fe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Fe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Fe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Fe(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){Ee[e]=new Fe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Fe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Fe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Fe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Fe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Kc=/[\-:]([a-z])/g;function Gc(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(Kc,Gc);Ee[t]=new Fe(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(Kc,Gc);Ee[t]=new Fe(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(Kc,Gc);Ee[t]=new Fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Fe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Fe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Fe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yc(e,t,n,r){var i=Ee.hasOwnProperty(t)?Ee[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(xx(t,n,i,r)&&(n=null),r||i===null?yx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zt=px.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vs=Symbol.for("react.element"),ur=Symbol.for("react.portal"),dr=Symbol.for("react.fragment"),Xc=Symbol.for("react.strict_mode"),yl=Symbol.for("react.profiler"),Fm=Symbol.for("react.provider"),$m=Symbol.for("react.context"),Qc=Symbol.for("react.forward_ref"),vl=Symbol.for("react.suspense"),xl=Symbol.for("react.suspense_list"),qc=Symbol.for("react.memo"),un=Symbol.for("react.lazy"),Bm=Symbol.for("react.offscreen"),Od=Symbol.iterator;function oi(e){return e===null||typeof e!="object"?null:(e=Od&&e[Od]||e["@@iterator"],typeof e=="function"?e:null)}var he=Object.assign,ka;function yi(e){if(ka===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ka=t&&t[1]||""}return`
|
|
34
|
+
`+ka+e}var Ca=!1;function Ta(e,t){if(!e||Ca)return"";Ca=!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 i=c.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
37
|
+
`+i[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{Ca=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yi(e):""}function wx(e){switch(e.tag){case 5:return yi(e.type);case 16:return yi("Lazy");case 13:return yi("Suspense");case 19:return yi("SuspenseList");case 0:case 2:case 15:return e=Ta(e.type,!1),e;case 11:return e=Ta(e.type.render,!1),e;case 1:return e=Ta(e.type,!0),e;default:return""}}function wl(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 dr:return"Fragment";case ur:return"Portal";case yl:return"Profiler";case Xc:return"StrictMode";case vl:return"Suspense";case xl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $m:return(e.displayName||"Context")+".Consumer";case Fm:return(e._context.displayName||"Context")+".Provider";case Qc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qc:return t=e.displayName||null,t!==null?t:wl(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return wl(e(t))}catch{}}return null}function Sx(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 wl(t);case 8:return t===Xc?"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 Tn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Um(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bx(e){var t=Um(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xs(e){e._valueTracker||(e._valueTracker=bx(e))}function Hm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Um(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lo(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 Sl(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Tn(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 Wm(e,t){t=t.checked,t!=null&&Yc(e,"checked",t,!1)}function bl(e,t){Wm(e,t);var n=Tn(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")?kl(e,t.type,n):t.hasOwnProperty("defaultValue")&&kl(e,t.type,Tn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $d(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 kl(e,t,n){(t!=="number"||lo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vi=Array.isArray;function Pr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Tn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Cl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return he({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(R(92));if(vi(n)){if(1<n.length)throw Error(R(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Tn(n)}}function Km(e,t){var n=Tn(t.value),r=Tn(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 Ud(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Gm(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 Tl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Gm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ws,Ym=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ws=ws||document.createElement("div"),ws.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ws.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ii(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bi={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},kx=["Webkit","ms","Moz","O"];Object.keys(bi).forEach(function(e){kx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bi[t]=bi[e]})});function Xm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bi.hasOwnProperty(e)&&bi[e]?(""+t).trim():t+"px"}function Qm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Xm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Cx=he({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Nl(e,t){if(t){if(Cx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function El(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 Pl=null;function Zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jl=null,jr=null,Ar=null;function Hd(e){if(e=ls(e)){if(typeof jl!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Qo(t),jl(e.stateNode,e.type,t))}}function qm(e){jr?Ar?Ar.push(e):Ar=[e]:jr=e}function Zm(){if(jr){var e=jr,t=Ar;if(Ar=jr=null,Hd(e),t)for(e=0;e<t.length;e++)Hd(t[e])}}function Jm(e,t){return e(t)}function ep(){}var Na=!1;function tp(e,t,n){if(Na)return e(t,n);Na=!0;try{return Jm(e,t,n)}finally{Na=!1,(jr!==null||Ar!==null)&&(ep(),Zm())}}function Vi(e,t){var n=e.stateNode;if(n===null)return null;var r=Qo(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(R(231,t,typeof n));return n}var Al=!1;if(Kt)try{var ai={};Object.defineProperty(ai,"passive",{get:function(){Al=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{Al=!1}function Tx(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var ki=!1,co=null,uo=!1,Rl=null,Nx={onError:function(e){ki=!0,co=e}};function Ex(e,t,n,r,i,s,o,a,l){ki=!1,co=null,Tx.apply(Nx,arguments)}function Px(e,t,n,r,i,s,o,a,l){if(Ex.apply(this,arguments),ki){if(ki){var c=co;ki=!1,co=null}else throw Error(R(198));uo||(uo=!0,Rl=c)}}function rr(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 np(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 Wd(e){if(rr(e)!==e)throw Error(R(188))}function jx(e){var t=e.alternate;if(!t){if(t=rr(e),t===null)throw Error(R(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Wd(i),e;if(s===r)return Wd(i),t;s=s.sibling}throw Error(R(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,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){for(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)throw Error(R(189))}}if(n.alternate!==r)throw Error(R(190))}if(n.tag!==3)throw Error(R(188));return n.stateNode.current===n?e:t}function rp(e){return e=jx(e),e!==null?ip(e):null}function ip(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ip(e);if(t!==null)return t;e=e.sibling}return null}var sp=Ze.unstable_scheduleCallback,Kd=Ze.unstable_cancelCallback,Ax=Ze.unstable_shouldYield,Rx=Ze.unstable_requestPaint,ge=Ze.unstable_now,Mx=Ze.unstable_getCurrentPriorityLevel,Jc=Ze.unstable_ImmediatePriority,op=Ze.unstable_UserBlockingPriority,fo=Ze.unstable_NormalPriority,Dx=Ze.unstable_LowPriority,ap=Ze.unstable_IdlePriority,Ko=null,_t=null;function _x(e){if(_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ko,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:Ix,Lx=Math.log,zx=Math.LN2;function Ix(e){return e>>>=0,e===0?32:31-(Lx(e)/zx|0)|0}var Ss=64,bs=4194304;function xi(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 ho(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=xi(a):(s&=o,s!==0&&(r=xi(s)))}else o=n&~i,o!==0?r=xi(o):s!==0&&(r=xi(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ct(t),i=1<<n,r|=e[n],t&=~i;return r}function Vx(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 Ox(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Ct(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=Vx(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Ml(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function lp(){var e=Ss;return Ss<<=1,!(Ss&4194240)&&(Ss=64),e}function Ea(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function os(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=n}function Fx(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 i=31-Ct(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function eu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ct(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Q=0;function cp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var up,tu,dp,fp,hp,Dl=!1,ks=[],yn=null,vn=null,xn=null,Oi=new Map,Fi=new Map,fn=[],$x="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 Gd(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":vn=null;break;case"mouseover":case"mouseout":xn=null;break;case"pointerover":case"pointerout":Oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(t.pointerId)}}function li(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ls(t),t!==null&&tu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Bx(e,t,n,r,i){switch(t){case"focusin":return yn=li(yn,e,t,n,r,i),!0;case"dragenter":return vn=li(vn,e,t,n,r,i),!0;case"mouseover":return xn=li(xn,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Oi.set(s,li(Oi.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Fi.set(s,li(Fi.get(s)||null,e,t,n,r,i)),!0}return!1}function mp(e){var t=$n(e.target);if(t!==null){var n=rr(t);if(n!==null){if(t=n.tag,t===13){if(t=np(n),t!==null){e.blockedOn=t,hp(e.priority,function(){dp(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 Hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_l(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Pl=r,n.target.dispatchEvent(r),Pl=null}else return t=ls(n),t!==null&&tu(t),e.blockedOn=n,!1;t.shift()}return!0}function Yd(e,t,n){Hs(e)&&n.delete(t)}function Ux(){Dl=!1,yn!==null&&Hs(yn)&&(yn=null),vn!==null&&Hs(vn)&&(vn=null),xn!==null&&Hs(xn)&&(xn=null),Oi.forEach(Yd),Fi.forEach(Yd)}function ci(e,t){e.blockedOn===t&&(e.blockedOn=null,Dl||(Dl=!0,Ze.unstable_scheduleCallback(Ze.unstable_NormalPriority,Ux)))}function $i(e){function t(i){return ci(i,e)}if(0<ks.length){ci(ks[0],e);for(var n=1;n<ks.length;n++){var r=ks[n];r.blockedOn===e&&(r.blockedOn=null)}}for(yn!==null&&ci(yn,e),vn!==null&&ci(vn,e),xn!==null&&ci(xn,e),Oi.forEach(t),Fi.forEach(t),n=0;n<fn.length;n++)r=fn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<fn.length&&(n=fn[0],n.blockedOn===null);)mp(n),n.blockedOn===null&&fn.shift()}var Rr=Zt.ReactCurrentBatchConfig,mo=!0;function Hx(e,t,n,r){var i=Q,s=Rr.transition;Rr.transition=null;try{Q=1,nu(e,t,n,r)}finally{Q=i,Rr.transition=s}}function Wx(e,t,n,r){var i=Q,s=Rr.transition;Rr.transition=null;try{Q=4,nu(e,t,n,r)}finally{Q=i,Rr.transition=s}}function nu(e,t,n,r){if(mo){var i=_l(e,t,n,r);if(i===null)Ia(e,t,r,po,n),Gd(e,r);else if(Bx(i,e,t,n,r))r.stopPropagation();else if(Gd(e,r),t&4&&-1<$x.indexOf(e)){for(;i!==null;){var s=ls(i);if(s!==null&&up(s),s=_l(e,t,n,r),s===null&&Ia(e,t,r,po,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ia(e,t,r,null,n)}}var po=null;function _l(e,t,n,r){if(po=null,e=Zc(r),e=$n(e),e!==null)if(t=rr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=np(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 po=e,null}function pp(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(Mx()){case Jc:return 1;case op:return 4;case fo:case Dx:return 16;case ap:return 536870912;default:return 16}default:return 16}}var mn=null,ru=null,Ws=null;function gp(){if(Ws)return Ws;var e,t=ru,n=t.length,r,i="value"in mn?mn.value:mn.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Ws=i.slice(e,1<r?1-r:void 0)}function Ks(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 Cs(){return!0}function Xd(){return!1}function et(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Cs:Xd,this.isPropagationStopped=Xd,this}return he(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=Cs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cs)},persist:function(){},isPersistent:Cs}),t}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=et(qr),as=he({},qr,{view:0,detail:0}),Kx=et(as),Pa,ja,ui,Go=he({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,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!==ui&&(ui&&e.type==="mousemove"?(Pa=e.screenX-ui.screenX,ja=e.screenY-ui.screenY):ja=Pa=0,ui=e),Pa)},movementY:function(e){return"movementY"in e?e.movementY:ja}}),Qd=et(Go),Gx=he({},Go,{dataTransfer:0}),Yx=et(Gx),Xx=he({},as,{relatedTarget:0}),Aa=et(Xx),Qx=he({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),qx=et(Qx),Zx=he({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jx=et(Zx),e1=he({},qr,{data:0}),qd=et(e1),t1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},n1={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"},r1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=r1[e])?!!t[e]:!1}function su(){return i1}var s1=he({},as,{key:function(e){if(e.key){var t=t1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ks(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?n1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(e){return e.type==="keypress"?Ks(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ks(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),o1=et(s1),a1=he({},Go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zd=et(a1),l1=he({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),c1=et(l1),u1=he({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),d1=et(u1),f1=he({},Go,{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}),h1=et(f1),m1=[9,13,27,32],ou=Kt&&"CompositionEvent"in window,Ci=null;Kt&&"documentMode"in document&&(Ci=document.documentMode);var p1=Kt&&"TextEvent"in window&&!Ci,yp=Kt&&(!ou||Ci&&8<Ci&&11>=Ci),Jd=" ",ef=!1;function vp(e,t){switch(e){case"keyup":return m1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fr=!1;function g1(e,t){switch(e){case"compositionend":return xp(t);case"keypress":return t.which!==32?null:(ef=!0,Jd);case"textInput":return e=t.data,e===Jd&&ef?null:e;default:return null}}function y1(e,t){if(fr)return e==="compositionend"||!ou&&vp(e,t)?(e=gp(),Ws=ru=mn=null,fr=!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 yp&&t.locale!=="ko"?null:t.data;default:return null}}var v1={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 tf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v1[e.type]:t==="textarea"}function wp(e,t,n,r){qm(r),t=go(t,"onChange"),0<t.length&&(n=new iu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ti=null,Bi=null;function x1(e){Rp(e,0)}function Yo(e){var t=pr(e);if(Hm(t))return e}function w1(e,t){if(e==="change")return t}var Sp=!1;if(Kt){var Ra;if(Kt){var Ma="oninput"in document;if(!Ma){var nf=document.createElement("div");nf.setAttribute("oninput","return;"),Ma=typeof nf.oninput=="function"}Ra=Ma}else Ra=!1;Sp=Ra&&(!document.documentMode||9<document.documentMode)}function rf(){Ti&&(Ti.detachEvent("onpropertychange",bp),Bi=Ti=null)}function bp(e){if(e.propertyName==="value"&&Yo(Bi)){var t=[];wp(t,Bi,e,Zc(e)),tp(x1,t)}}function S1(e,t,n){e==="focusin"?(rf(),Ti=t,Bi=n,Ti.attachEvent("onpropertychange",bp)):e==="focusout"&&rf()}function b1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yo(Bi)}function k1(e,t){if(e==="click")return Yo(t)}function C1(e,t){if(e==="input"||e==="change")return Yo(t)}function T1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:T1;function Ui(e,t){if(Pt(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 i=n[r];if(!gl.call(t,i)||!Pt(e[i],t[i]))return!1}return!0}function sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function of(e,t){var n=sf(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=sf(n)}}function kp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cp(){for(var e=window,t=lo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lo(e.document)}return t}function au(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 N1(e){var t=Cp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&kp(n.ownerDocument.documentElement,n)){if(r!==null&&au(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=of(n,s);var o=of(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var E1=Kt&&"documentMode"in document&&11>=document.documentMode,hr=null,Ll=null,Ni=null,zl=!1;function af(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zl||hr==null||hr!==lo(r)||(r=hr,"selectionStart"in r&&au(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}),Ni&&Ui(Ni,r)||(Ni=r,r=go(Ll,"onSelect"),0<r.length&&(t=new iu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function Ts(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var mr={animationend:Ts("Animation","AnimationEnd"),animationiteration:Ts("Animation","AnimationIteration"),animationstart:Ts("Animation","AnimationStart"),transitionend:Ts("Transition","TransitionEnd")},Da={},Tp={};Kt&&(Tp=document.createElement("div").style,"AnimationEvent"in window||(delete mr.animationend.animation,delete mr.animationiteration.animation,delete mr.animationstart.animation),"TransitionEvent"in window||delete mr.transitionend.transition);function Xo(e){if(Da[e])return Da[e];if(!mr[e])return e;var t=mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Tp)return Da[e]=t[n];return e}var Np=Xo("animationend"),Ep=Xo("animationiteration"),Pp=Xo("animationstart"),jp=Xo("transitionend"),Ap=new Map,lf="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 Pn(e,t){Ap.set(e,t),nr(t,[e])}for(var _a=0;_a<lf.length;_a++){var La=lf[_a],P1=La.toLowerCase(),j1=La[0].toUpperCase()+La.slice(1);Pn(P1,"on"+j1)}Pn(Np,"onAnimationEnd");Pn(Ep,"onAnimationIteration");Pn(Pp,"onAnimationStart");Pn("dblclick","onDoubleClick");Pn("focusin","onFocus");Pn("focusout","onBlur");Pn(jp,"onTransitionEnd");Fr("onMouseEnter",["mouseout","mouseover"]);Fr("onMouseLeave",["mouseout","mouseover"]);Fr("onPointerEnter",["pointerout","pointerover"]);Fr("onPointerLeave",["pointerout","pointerover"]);nr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));nr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));nr("onBeforeInput",["compositionend","keypress","textInput","paste"]);nr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));nr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));nr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="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(" "),A1=new Set("cancel close invalid load scroll toggle".split(" ").concat(wi));function cf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Px(r,t,void 0,e),e.currentTarget=null}function Rp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=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!==s&&i.isPropagationStopped())break e;cf(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;cf(i,a,c),s=l}}}if(uo)throw e=Rl,uo=!1,Rl=null,e}function ie(e,t){var n=t[$l];n===void 0&&(n=t[$l]=new Set);var r=e+"__bubble";n.has(r)||(Mp(t,e,2,!1),n.add(r))}function za(e,t,n){var r=0;t&&(r|=4),Mp(n,e,r,t)}var Ns="_reactListening"+Math.random().toString(36).slice(2);function Hi(e){if(!e[Ns]){e[Ns]=!0,Om.forEach(function(n){n!=="selectionchange"&&(A1.has(n)||za(n,!1,e),za(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ns]||(t[Ns]=!0,za("selectionchange",!1,t))}}function Mp(e,t,n,r){switch(pp(t)){case 1:var i=Hx;break;case 4:i=Wx;break;default:i=nu}n=i.bind(null,t,n,e),i=void 0,!Al||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ia(e,t,n,r,i){var s=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===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=$n(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}tp(function(){var c=s,d=Zc(n),f=[];e:{var m=Ap.get(e);if(m!==void 0){var h=iu,v=e;switch(e){case"keypress":if(Ks(n)===0)break e;case"keydown":case"keyup":h=o1;break;case"focusin":v="focus",h=Aa;break;case"focusout":v="blur",h=Aa;break;case"beforeblur":case"afterblur":h=Aa;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=Qd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Yx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=c1;break;case Np:case Ep:case Pp:h=qx;break;case jp:h=d1;break;case"scroll":h=Kx;break;case"wheel":h=h1;break;case"copy":case"cut":case"paste":h=Jx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Zd}var w=(t&4)!==0,S=!w&&e==="scroll",p=w?m!==null?m+"Capture":null:m;w=[];for(var g=c,y;g!==null;){y=g;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,p!==null&&(b=Vi(g,p),b!=null&&w.push(Wi(g,b,y)))),S)break;g=g.return}0<w.length&&(m=new h(m,v,null,n,d),f.push({event:m,listeners:w}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",m&&n!==Pl&&(v=n.relatedTarget||n.fromElement)&&($n(v)||v[Gt]))break e;if((h||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=c,v=v?$n(v):null,v!==null&&(S=rr(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=c),h!==v)){if(w=Qd,b="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(w=Zd,b="onPointerLeave",p="onPointerEnter",g="pointer"),S=h==null?m:pr(h),y=v==null?m:pr(v),m=new w(b,g+"leave",h,n,d),m.target=S,m.relatedTarget=y,b=null,$n(d)===c&&(w=new w(p,g+"enter",v,n,d),w.target=y,w.relatedTarget=S,b=w),S=b,h&&v)t:{for(w=h,p=v,g=0,y=w;y;y=ar(y))g++;for(y=0,b=p;b;b=ar(b))y++;for(;0<g-y;)w=ar(w),g--;for(;0<y-g;)p=ar(p),y--;for(;g--;){if(w===p||p!==null&&w===p.alternate)break t;w=ar(w),p=ar(p)}w=null}else w=null;h!==null&&uf(f,m,h,w,!1),v!==null&&S!==null&&uf(f,S,v,w,!0)}}e:{if(m=c?pr(c):window,h=m.nodeName&&m.nodeName.toLowerCase(),h==="select"||h==="input"&&m.type==="file")var k=w1;else if(tf(m))if(Sp)k=C1;else{k=b1;var C=S1}else(h=m.nodeName)&&h.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(k=k1);if(k&&(k=k(e,c))){wp(f,k,n,d);break e}C&&C(e,m,c),e==="focusout"&&(C=m._wrapperState)&&C.controlled&&m.type==="number"&&kl(m,"number",m.value)}switch(C=c?pr(c):window,e){case"focusin":(tf(C)||C.contentEditable==="true")&&(hr=C,Ll=c,Ni=null);break;case"focusout":Ni=Ll=hr=null;break;case"mousedown":zl=!0;break;case"contextmenu":case"mouseup":case"dragend":zl=!1,af(f,n,d);break;case"selectionchange":if(E1)break;case"keydown":case"keyup":af(f,n,d)}var N;if(ou)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else fr?vp(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(yp&&n.locale!=="ko"&&(fr||T!=="onCompositionStart"?T==="onCompositionEnd"&&fr&&(N=gp()):(mn=d,ru="value"in mn?mn.value:mn.textContent,fr=!0)),C=go(c,T),0<C.length&&(T=new qd(T,e,null,n,d),f.push({event:T,listeners:C}),N?T.data=N:(N=xp(n),N!==null&&(T.data=N)))),(N=p1?g1(e,n):y1(e,n))&&(c=go(c,"onBeforeInput"),0<c.length&&(d=new qd("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=N))}Rp(f,t)})}function Wi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function go(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vi(e,n),s!=null&&r.unshift(Wi(e,s,i)),s=Vi(e,t),s!=null&&r.push(Wi(e,s,i))),e=e.return}return r}function ar(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uf(e,t,n,r,i){for(var s=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,i?(l=Vi(n,s),l!=null&&o.unshift(Wi(n,l,a))):i||(l=Vi(n,s),l!=null&&o.push(Wi(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var R1=/\r\n?/g,M1=/\u0000|\uFFFD/g;function df(e){return(typeof e=="string"?e:""+e).replace(R1,`
|
|
38
|
+
`).replace(M1,"")}function Es(e,t,n){if(t=df(t),df(e)!==t&&n)throw Error(R(425))}function yo(){}var Il=null,Vl=null;function Ol(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 Fl=typeof setTimeout=="function"?setTimeout:void 0,D1=typeof clearTimeout=="function"?clearTimeout:void 0,ff=typeof Promise=="function"?Promise:void 0,_1=typeof queueMicrotask=="function"?queueMicrotask:typeof ff<"u"?function(e){return ff.resolve(null).then(e).catch(L1)}:Fl;function L1(e){setTimeout(function(){throw e})}function Va(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),$i(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);$i(t)}function wn(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 hf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Zr=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Zr,Ki="__reactProps$"+Zr,Gt="__reactContainer$"+Zr,$l="__reactEvents$"+Zr,z1="__reactListeners$"+Zr,I1="__reactHandles$"+Zr;function $n(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gt]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hf(e);e!==null;){if(n=e[Mt])return n;e=hf(e)}return t}e=n,n=e.parentNode}return null}function ls(e){return e=e[Mt]||e[Gt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function pr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function Qo(e){return e[Ki]||null}var Bl=[],gr=-1;function jn(e){return{current:e}}function se(e){0>gr||(e.current=Bl[gr],Bl[gr]=null,gr--)}function ee(e,t){gr++,Bl[gr]=e.current,e.current=t}var Nn={},Me=jn(Nn),He=jn(!1),Qn=Nn;function $r(e,t){var n=e.type.contextTypes;if(!n)return Nn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function We(e){return e=e.childContextTypes,e!=null}function vo(){se(He),se(Me)}function mf(e,t,n){if(Me.current!==Nn)throw Error(R(168));ee(Me,t),ee(He,n)}function Dp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,Sx(e)||"Unknown",i));return he({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,Qn=Me.current,ee(Me,e),ee(He,He.current),!0}function pf(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Dp(e,t,Qn),r.__reactInternalMemoizedMergedChildContext=e,se(He),se(Me),ee(Me,e)):se(He),ee(He,n)}var Bt=null,qo=!1,Oa=!1;function _p(e){Bt===null?Bt=[e]:Bt.push(e)}function V1(e){qo=!0,_p(e)}function An(){if(!Oa&&Bt!==null){Oa=!0;var e=0,t=Q;try{var n=Bt;for(Q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bt=null,qo=!1}catch(i){throw Bt!==null&&(Bt=Bt.slice(e+1)),sp(Jc,An),i}finally{Q=t,Oa=!1}}return null}var yr=[],vr=0,wo=null,So=0,nt=[],rt=0,qn=null,Ut=1,Ht="";function In(e,t){yr[vr++]=So,yr[vr++]=wo,wo=e,So=t}function Lp(e,t,n){nt[rt++]=Ut,nt[rt++]=Ht,nt[rt++]=qn,qn=e;var r=Ut;e=Ht;var i=32-Ct(r)-1;r&=~(1<<i),n+=1;var s=32-Ct(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ut=1<<32-Ct(t)+i|n<<i|r,Ht=s+e}else Ut=1<<s|n<<i|r,Ht=e}function lu(e){e.return!==null&&(In(e,1),Lp(e,1,0))}function cu(e){for(;e===wo;)wo=yr[--vr],yr[vr]=null,So=yr[--vr],yr[vr]=null;for(;e===qn;)qn=nt[--rt],nt[rt]=null,Ht=nt[--rt],nt[rt]=null,Ut=nt[--rt],nt[rt]=null}var qe=null,Xe=null,ae=!1,kt=null;function zp(e,t){var n=it(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 gf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qe=e,Xe=wn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qe=e,Xe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qn!==null?{id:Ut,overflow:Ht}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=it(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qe=e,Xe=null,!0):!1;default:return!1}}function Ul(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hl(e){if(ae){var t=Xe;if(t){var n=t;if(!gf(e,t)){if(Ul(e))throw Error(R(418));t=wn(n.nextSibling);var r=qe;t&&gf(e,t)?zp(r,n):(e.flags=e.flags&-4097|2,ae=!1,qe=e)}}else{if(Ul(e))throw Error(R(418));e.flags=e.flags&-4097|2,ae=!1,qe=e}}}function yf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qe=e}function Ps(e){if(e!==qe)return!1;if(!ae)return yf(e),ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ol(e.type,e.memoizedProps)),t&&(t=Xe)){if(Ul(e))throw Ip(),Error(R(418));for(;t;)zp(e,t),t=wn(t.nextSibling)}if(yf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xe=wn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xe=null}}else Xe=qe?wn(e.stateNode.nextSibling):null;return!0}function Ip(){for(var e=Xe;e;)e=wn(e.nextSibling)}function Br(){Xe=qe=null,ae=!1}function uu(e){kt===null?kt=[e]:kt.push(e)}var O1=Zt.ReactCurrentBatchConfig;function di(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(R(309));var r=n.stateNode}if(!r)throw Error(R(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(R(284));if(!n._owner)throw Error(R(290,e))}return e}function js(e,t){throw e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vf(e){var t=e._init;return t(e._payload)}function Vp(e){function t(p,g){if(e){var y=p.deletions;y===null?(p.deletions=[g],p.flags|=16):y.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Cn(p,g),p.index=0,p.sibling=null,p}function s(p,g,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<g?(p.flags|=2,g):y):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,y,b){return g===null||g.tag!==6?(g=Ka(y,p.mode,b),g.return=p,g):(g=i(g,y),g.return=p,g)}function l(p,g,y,b){var k=y.type;return k===dr?d(p,g,y.props.children,b,y.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===un&&vf(k)===g.type)?(b=i(g,y.props),b.ref=di(p,g,y),b.return=p,b):(b=Js(y.type,y.key,y.props,null,p.mode,b),b.ref=di(p,g,y),b.return=p,b)}function c(p,g,y,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=Ga(y,p.mode,b),g.return=p,g):(g=i(g,y.children||[]),g.return=p,g)}function d(p,g,y,b,k){return g===null||g.tag!==7?(g=Yn(y,p.mode,b,k),g.return=p,g):(g=i(g,y),g.return=p,g)}function f(p,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Ka(""+g,p.mode,y),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case vs:return y=Js(g.type,g.key,g.props,null,p.mode,y),y.ref=di(p,null,g),y.return=p,y;case ur:return g=Ga(g,p.mode,y),g.return=p,g;case un:var b=g._init;return f(p,b(g._payload),y)}if(vi(g)||oi(g))return g=Yn(g,p.mode,y,null),g.return=p,g;js(p,g)}return null}function m(p,g,y,b){var k=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(p,g,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case vs:return y.key===k?l(p,g,y,b):null;case ur:return y.key===k?c(p,g,y,b):null;case un:return k=y._init,m(p,g,k(y._payload),b)}if(vi(y)||oi(y))return k!==null?null:d(p,g,y,b,null);js(p,y)}return null}function h(p,g,y,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return p=p.get(y)||null,a(g,p,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case vs:return p=p.get(b.key===null?y:b.key)||null,l(g,p,b,k);case ur:return p=p.get(b.key===null?y:b.key)||null,c(g,p,b,k);case un:var C=b._init;return h(p,g,y,C(b._payload),k)}if(vi(b)||oi(b))return p=p.get(y)||null,d(g,p,b,k,null);js(g,b)}return null}function v(p,g,y,b){for(var k=null,C=null,N=g,T=g=0,E=null;N!==null&&T<y.length;T++){N.index>T?(E=N,N=null):E=N.sibling;var P=m(p,N,y[T],b);if(P===null){N===null&&(N=E);break}e&&N&&P.alternate===null&&t(p,N),g=s(P,g,T),C===null?k=P:C.sibling=P,C=P,N=E}if(T===y.length)return n(p,N),ae&&In(p,T),k;if(N===null){for(;T<y.length;T++)N=f(p,y[T],b),N!==null&&(g=s(N,g,T),C===null?k=N:C.sibling=N,C=N);return ae&&In(p,T),k}for(N=r(p,N);T<y.length;T++)E=h(N,p,T,y[T],b),E!==null&&(e&&E.alternate!==null&&N.delete(E.key===null?T:E.key),g=s(E,g,T),C===null?k=E:C.sibling=E,C=E);return e&&N.forEach(function(z){return t(p,z)}),ae&&In(p,T),k}function w(p,g,y,b){var k=oi(y);if(typeof k!="function")throw Error(R(150));if(y=k.call(y),y==null)throw Error(R(151));for(var C=k=null,N=g,T=g=0,E=null,P=y.next();N!==null&&!P.done;T++,P=y.next()){N.index>T?(E=N,N=null):E=N.sibling;var z=m(p,N,P.value,b);if(z===null){N===null&&(N=E);break}e&&N&&z.alternate===null&&t(p,N),g=s(z,g,T),C===null?k=z:C.sibling=z,C=z,N=E}if(P.done)return n(p,N),ae&&In(p,T),k;if(N===null){for(;!P.done;T++,P=y.next())P=f(p,P.value,b),P!==null&&(g=s(P,g,T),C===null?k=P:C.sibling=P,C=P);return ae&&In(p,T),k}for(N=r(p,N);!P.done;T++,P=y.next())P=h(N,p,T,P.value,b),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?T:P.key),g=s(P,g,T),C===null?k=P:C.sibling=P,C=P);return e&&N.forEach(function(I){return t(p,I)}),ae&&In(p,T),k}function S(p,g,y,b){if(typeof y=="object"&&y!==null&&y.type===dr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case vs:e:{for(var k=y.key,C=g;C!==null;){if(C.key===k){if(k=y.type,k===dr){if(C.tag===7){n(p,C.sibling),g=i(C,y.props.children),g.return=p,p=g;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===un&&vf(k)===C.type){n(p,C.sibling),g=i(C,y.props),g.ref=di(p,C,y),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}y.type===dr?(g=Yn(y.props.children,p.mode,b,y.key),g.return=p,p=g):(b=Js(y.type,y.key,y.props,null,p.mode,b),b.ref=di(p,g,y),b.return=p,p=b)}return o(p);case ur:e:{for(C=y.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(p,g.sibling),g=i(g,y.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Ga(y,p.mode,b),g.return=p,p=g}return o(p);case un:return C=y._init,S(p,g,C(y._payload),b)}if(vi(y))return v(p,g,y,b);if(oi(y))return w(p,g,y,b);js(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,y),g.return=p,p=g):(n(p,g),g=Ka(y,p.mode,b),g.return=p,p=g),o(p)):n(p,g)}return S}var Ur=Vp(!0),Op=Vp(!1),bo=jn(null),ko=null,xr=null,du=null;function fu(){du=xr=ko=null}function hu(e){var t=bo.current;se(bo),e._currentValue=t}function Wl(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 Mr(e,t){ko=e,du=xr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(du!==e)if(e={context:e,memoizedValue:t,next:null},xr===null){if(ko===null)throw Error(R(308));xr=e,ko.dependencies={lanes:0,firstContext:e}}else xr=xr.next=e;return t}var Bn=null;function mu(e){Bn===null?Bn=[e]:Bn.push(e)}function Fp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,mu(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yt(e,r)}function Yt(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 dn=!1;function pu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $p(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 Wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Yt(e,n)}return i=r.interleaved,i===null?(t.next=t,mu(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yt(e,n)}function Gs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eu(e,n)}}function xf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Co(e,t,n,r){var i=e.updateQueue;dn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,d=c=l=null,a=s;do{var m=a.lane,h=a.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,w=a;switch(m=t,h=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(h,f,m);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,m=typeof v=="function"?v.call(h,f,m):v,m==null)break e;f=he({},f,m);break e;case 2:dn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[a]:m.push(a))}else h={eventTime:h,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=f):d=d.next=h,o|=m;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;m=a,a=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Jn|=o,e.lanes=o,e.memoizedState=f}}function wf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(R(191,i));i.call(r)}}}var cs={},Lt=jn(cs),Gi=jn(cs),Yi=jn(cs);function Un(e){if(e===cs)throw Error(R(174));return e}function gu(e,t){switch(ee(Yi,t),ee(Gi,e),ee(Lt,cs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Tl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Tl(t,e)}se(Lt),ee(Lt,t)}function Hr(){se(Lt),se(Gi),se(Yi)}function Bp(e){Un(Yi.current);var t=Un(Lt.current),n=Tl(t,e.type);t!==n&&(ee(Gi,e),ee(Lt,n))}function yu(e){Gi.current===e&&(se(Lt),se(Gi))}var ue=jn(0);function To(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 Fa=[];function vu(){for(var e=0;e<Fa.length;e++)Fa[e]._workInProgressVersionPrimary=null;Fa.length=0}var Ys=Zt.ReactCurrentDispatcher,$a=Zt.ReactCurrentBatchConfig,Zn=0,fe=null,we=null,be=null,No=!1,Ei=!1,Xi=0,F1=0;function Pe(){throw Error(R(321))}function xu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function wu(e,t,n,r,i,s){if(Zn=s,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ys.current=e===null||e.memoizedState===null?H1:W1,e=n(r,i),Ei){s=0;do{if(Ei=!1,Xi=0,25<=s)throw Error(R(301));s+=1,be=we=null,t.updateQueue=null,Ys.current=K1,e=n(r,i)}while(Ei)}if(Ys.current=Eo,t=we!==null&&we.next!==null,Zn=0,be=we=fe=null,No=!1,t)throw Error(R(300));return e}function Su(){var e=Xi!==0;return Xi=0,e}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?fe.memoizedState=be=e:be=be.next=e,be}function ut(){if(we===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=be===null?fe.memoizedState:be.next;if(t!==null)be=t,we=e;else{if(e===null)throw Error(R(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},be===null?fe.memoizedState=be=e:be=be.next=e}return be}function Qi(e,t){return typeof t=="function"?t(e):t}function Ba(e){var t=ut(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=we,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((Zn&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,fe.lanes|=d,Jn|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Pt(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,fe.lanes|=s,Jn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ua(e){var t=ut(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Pt(s,t.memoizedState)||(Ue=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Up(){}function Hp(e,t){var n=fe,r=ut(),i=t(),s=!Pt(r.memoizedState,i);if(s&&(r.memoizedState=i,Ue=!0),r=r.queue,bu(Gp.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||be!==null&&be.memoizedState.tag&1){if(n.flags|=2048,qi(9,Kp.bind(null,n,r,i,t),void 0,null),ke===null)throw Error(R(349));Zn&30||Wp(n,t,i)}return i}function Wp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Kp(e,t,n,r){t.value=n,t.getSnapshot=r,Yp(t)&&Xp(e)}function Gp(e,t,n){return n(function(){Yp(t)&&Xp(e)})}function Yp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function Xp(e){var t=Yt(e,1);t!==null&&Tt(t,e,1,-1)}function Sf(e){var t=At();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:e},t.queue=e,e=e.dispatch=U1.bind(null,fe,e),[t.memoizedState,e]}function qi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.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 Qp(){return ut().memoizedState}function Xs(e,t,n,r){var i=At();fe.flags|=e,i.memoizedState=qi(1|t,n,void 0,r===void 0?null:r)}function Zo(e,t,n,r){var i=ut();r=r===void 0?null:r;var s=void 0;if(we!==null){var o=we.memoizedState;if(s=o.destroy,r!==null&&xu(r,o.deps)){i.memoizedState=qi(t,n,s,r);return}}fe.flags|=e,i.memoizedState=qi(1|t,n,s,r)}function bf(e,t){return Xs(8390656,8,e,t)}function bu(e,t){return Zo(2048,8,e,t)}function qp(e,t){return Zo(4,2,e,t)}function Zp(e,t){return Zo(4,4,e,t)}function Jp(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 eg(e,t,n){return n=n!=null?n.concat([e]):null,Zo(4,4,Jp.bind(null,t,e),n)}function ku(){}function tg(e,t){var n=ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&xu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ng(e,t){var n=ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&xu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rg(e,t,n){return Zn&21?(Pt(n,t)||(n=lp(),fe.lanes|=n,Jn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n)}function $1(e,t){var n=Q;Q=n!==0&&4>n?n:4,e(!0);var r=$a.transition;$a.transition={};try{e(!1),t()}finally{Q=n,$a.transition=r}}function ig(){return ut().memoizedState}function B1(e,t,n){var r=kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sg(e))og(t,n);else if(n=Fp(e,t,n,r),n!==null){var i=Ie();Tt(n,e,r,i),ag(n,t,r)}}function U1(e,t,n){var r=kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sg(e))og(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Pt(a,o)){var l=t.interleaved;l===null?(i.next=i,mu(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Fp(e,t,i,r),n!==null&&(i=Ie(),Tt(n,e,r,i),ag(n,t,r))}}function sg(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function og(e,t){Ei=No=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ag(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eu(e,n)}}var Eo={readContext:ct,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},H1={readContext:ct,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:bf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xs(4194308,4,Jp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var n=At();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=At();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=B1.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:Sf,useDebugValue:ku,useDeferredValue:function(e){return At().memoizedState=e},useTransition:function(){var e=Sf(!1),t=e[0];return e=$1.bind(null,e[1]),At().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,i=At();if(ae){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),ke===null)throw Error(R(349));Zn&30||Wp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,bf(Gp.bind(null,r,s,e),[e]),r.flags|=2048,qi(9,Kp.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=At(),t=ke.identifierPrefix;if(ae){var n=Ht,r=Ut;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=F1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},W1={readContext:ct,useCallback:tg,useContext:ct,useEffect:bu,useImperativeHandle:eg,useInsertionEffect:qp,useLayoutEffect:Zp,useMemo:ng,useReducer:Ba,useRef:Qp,useState:function(){return Ba(Qi)},useDebugValue:ku,useDeferredValue:function(e){var t=ut();return rg(t,we.memoizedState,e)},useTransition:function(){var e=Ba(Qi)[0],t=ut().memoizedState;return[e,t]},useMutableSource:Up,useSyncExternalStore:Hp,useId:ig,unstable_isNewReconciler:!1},K1={readContext:ct,useCallback:tg,useContext:ct,useEffect:bu,useImperativeHandle:eg,useInsertionEffect:qp,useLayoutEffect:Zp,useMemo:ng,useReducer:Ua,useRef:Qp,useState:function(){return Ua(Qi)},useDebugValue:ku,useDeferredValue:function(e){var t=ut();return we===null?t.memoizedState=e:rg(t,we.memoizedState,e)},useTransition:function(){var e=Ua(Qi)[0],t=ut().memoizedState;return[e,t]},useMutableSource:Up,useSyncExternalStore:Hp,useId:ig,unstable_isNewReconciler:!1};function St(e,t){if(e&&e.defaultProps){t=he({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Kl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:he({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Jo={isMounted:function(e){return(e=e._reactInternals)?rr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ie(),i=kn(e),s=Wt(r,i);s.payload=t,n!=null&&(s.callback=n),t=Sn(e,s,i),t!==null&&(Tt(t,e,i,r),Gs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ie(),i=kn(e),s=Wt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Sn(e,s,i),t!==null&&(Tt(t,e,i,r),Gs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ie(),r=kn(e),i=Wt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Sn(e,i,r),t!==null&&(Tt(t,e,r,n),Gs(t,e,r))}};function kf(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ui(n,r)||!Ui(i,s):!0}function lg(e,t,n){var r=!1,i=Nn,s=t.contextType;return typeof s=="object"&&s!==null?s=ct(s):(i=We(t)?Qn:Me.current,r=t.contextTypes,s=(r=r!=null)?$r(e,i):Nn),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Jo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Cf(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&&Jo.enqueueReplaceState(t,t.state,null)}function Gl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},pu(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=ct(s):(s=We(t)?Qn:Me.current,i.context=$r(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Kl(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Jo.enqueueReplaceState(i,i.state,null),Co(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Wr(e,t){try{var n="",r=t;do n+=wx(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Ha(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var G1=typeof WeakMap=="function"?WeakMap:Map;function cg(e,t,n){n=Wt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jo||(jo=!0,ic=r),Yl(e,t)},n}function ug(e,t,n){n=Wt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Yl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Yl(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Tf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new G1;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=aw.bind(null,e,t,n),t.then(e,e))}function Nf(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 Ef(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=Wt(-1,1),t.tag=2,Sn(n,t,1))),n.lanes|=1),e)}var Y1=Zt.ReactCurrentOwner,Ue=!1;function _e(e,t,n,r){t.child=e===null?Op(t,null,n,r):Ur(t,e.child,n,r)}function Pf(e,t,n,r,i){n=n.render;var s=t.ref;return Mr(t,i),r=wu(e,t,n,r,s,i),n=Su(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xt(e,t,i)):(ae&&n&&lu(t),t.flags|=1,_e(e,t,r,i),t.child)}function jf(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Ru(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,dg(e,t,s,r,i)):(e=Js(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ui,n(o,r)&&e.ref===t.ref)return Xt(e,t,i)}return t.flags|=1,e=Cn(s,r),e.ref=t.ref,e.return=t,t.child=e}function dg(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ui(s,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,Xt(e,t,i)}return Xl(e,t,n,r,i)}function fg(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ee(Sr,Ye),Ye|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ee(Sr,Ye),Ye|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ee(Sr,Ye),Ye|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ee(Sr,Ye),Ye|=r;return _e(e,t,i,n),t.child}function hg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xl(e,t,n,r,i){var s=We(n)?Qn:Me.current;return s=$r(t,s),Mr(t,i),n=wu(e,t,n,r,s,i),r=Su(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Xt(e,t,i)):(ae&&r&&lu(t),t.flags|=1,_e(e,t,n,i),t.child)}function Af(e,t,n,r,i){if(We(n)){var s=!0;xo(t)}else s=!1;if(Mr(t,i),t.stateNode===null)Qs(e,t),lg(t,n,r),Gl(t,n,r,i),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=ct(c):(c=We(n)?Qn:Me.current,c=$r(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)&&Cf(t,o,r,c),dn=!1;var m=t.memoizedState;o.state=m,Co(t,r,o,i),l=t.memoizedState,a!==r||m!==l||He.current||dn?(typeof d=="function"&&(Kl(t,n,d,r),l=t.memoizedState),(a=dn||kf(t,n,a,r,m,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,$p(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:St(t.type,a),o.props=c,f=t.pendingProps,m=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ct(l):(l=We(n)?Qn:Me.current,l=$r(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||m!==l)&&Cf(t,o,r,l),dn=!1,m=t.memoizedState,o.state=m,Co(t,r,o,i);var v=t.memoizedState;a!==f||m!==v||He.current||dn?(typeof h=="function"&&(Kl(t,n,h,r),v=t.memoizedState),(c=dn||kf(t,n,c,r,m,v,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Ql(e,t,n,r,s,i)}function Ql(e,t,n,r,i,s){hg(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&pf(t,n,!1),Xt(e,t,s);r=t.stateNode,Y1.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ur(t,e.child,null,s),t.child=Ur(t,null,a,s)):_e(e,t,a,s),t.memoizedState=r.state,i&&pf(t,n,!0),t.child}function mg(e){var t=e.stateNode;t.pendingContext?mf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&mf(e,t.context,!1),gu(e,t.containerInfo)}function Rf(e,t,n,r,i){return Br(),uu(i),t.flags|=256,_e(e,t,n,r),t.child}var ql={dehydrated:null,treeContext:null,retryLane:0};function Zl(e){return{baseLanes:e,cachePool:null,transitions:null}}function pg(e,t,n){var r=t.pendingProps,i=ue.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ee(ue,i&1),e===null)return Hl(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,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=na(o,r,0,null),e=Yn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Zl(n),t.memoizedState=ql,e):Cu(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return X1(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Cn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Cn(a,s):(s=Yn(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Zl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=ql,r}return s=e.child,e=s.sibling,r=Cn(s,{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 Cu(e,t){return t=na({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function As(e,t,n,r){return r!==null&&uu(r),Ur(t,e.child,null,n),e=Cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function X1(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Ha(Error(R(422))),As(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=na({mode:"visible",children:r.children},i,0,null),s=Yn(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ur(t,e.child,null,o),t.child.memoizedState=Zl(o),t.memoizedState=ql,s);if(!(t.mode&1))return As(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(R(419)),r=Ha(s,r,void 0),As(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ue||a){if(r=ke,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Yt(e,i),Tt(r,e,i,-1))}return Au(),r=Ha(Error(R(421))),As(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=lw.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Xe=wn(i.nextSibling),qe=t,ae=!0,kt=null,e!==null&&(nt[rt++]=Ut,nt[rt++]=Ht,nt[rt++]=qn,Ut=e.id,Ht=e.overflow,qn=t),t=Cu(t,r.children),t.flags|=4096,t)}function Mf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wl(e.return,t,n)}function Wa(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function gg(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(_e(e,t,r.children,n),r=ue.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mf(e,n,t);else if(e.tag===19)Mf(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(ee(ue,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&To(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Wa(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&To(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Wa(t,!0,n,null,s);break;case"together":Wa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=Cn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Q1(e,t,n){switch(t.tag){case 3:mg(t),Br();break;case 5:Bp(t);break;case 1:We(t.type)&&xo(t);break;case 4:gu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ee(bo,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ee(ue,ue.current&1),t.flags|=128,null):n&t.child.childLanes?pg(e,t,n):(ee(ue,ue.current&1),e=Xt(e,t,n),e!==null?e.sibling:null);ee(ue,ue.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return gg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ee(ue,ue.current),r)break;return null;case 22:case 23:return t.lanes=0,fg(e,t,n)}return Xt(e,t,n)}var yg,Jl,vg,xg;yg=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}};Jl=function(){};vg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Un(Lt.current);var s=null;switch(n){case"input":i=Sl(e,i),r=Sl(e,r),s=[];break;case"select":i=he({},i,{value:void 0}),r=he({},r,{value:void 0}),s=[];break;case"textarea":i=Cl(e,i),r=Cl(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=yo)}Nl(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(zi.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[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||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(zi.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ie("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};xg=function(e,t,n,r){n!==r&&(t.flags|=4)};function fi(e,t){if(!ae)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 je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function q1(e,t,n){var r=t.pendingProps;switch(cu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return je(t),null;case 1:return We(t.type)&&vo(),je(t),null;case 3:return r=t.stateNode,Hr(),se(He),se(Me),vu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ps(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kt!==null&&(ac(kt),kt=null))),Jl(e,t),je(t),null;case 5:yu(t);var i=Un(Yi.current);if(n=t.type,e!==null&&t.stateNode!=null)vg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return je(t),null}if(e=Un(Lt.current),Ps(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Mt]=t,r[Ki]=s,e=(t.mode&1)!==0,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(i=0;i<wi.length;i++)ie(wi[i],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":Fd(r,s),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ie("invalid",r);break;case"textarea":Bd(r,s),ie("invalid",r)}Nl(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Es(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Es(r.textContent,a,e),i=["children",""+a]):zi.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ie("scroll",r)}switch(n){case"input":xs(r),$d(r,s,!0);break;case"textarea":xs(r),Ud(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=yo)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Gm(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[Mt]=t,e[Ki]=r,yg(e,t,!1,!1),t.stateNode=e;e:{switch(o=El(n,r),n){case"dialog":ie("cancel",e),ie("close",e),i=r;break;case"iframe":case"object":case"embed":ie("load",e),i=r;break;case"video":case"audio":for(i=0;i<wi.length;i++)ie(wi[i],e);i=r;break;case"source":ie("error",e),i=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),i=r;break;case"details":ie("toggle",e),i=r;break;case"input":Fd(e,r),i=Sl(e,r),ie("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=he({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Bd(e,r),i=Cl(e,r),ie("invalid",e);break;default:i=r}Nl(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Qm(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ym(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ii(e,l):typeof l=="number"&&Ii(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(zi.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ie("scroll",e):l!=null&&Yc(e,s,l,o))}switch(n){case"input":xs(e),$d(e,r,!1);break;case"textarea":xs(e),Ud(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Tn(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Pr(e,!!r.multiple,s,!1):r.defaultValue!=null&&Pr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=yo)}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 je(t),null;case 6:if(e&&t.stateNode!=null)xg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));if(n=Un(Yi.current),Un(Lt.current),Ps(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mt]=t,(s=r.nodeValue!==n)&&(e=qe,e!==null))switch(e.tag){case 3:Es(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Es(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mt]=t,t.stateNode=r}return je(t),null;case 13:if(se(ue),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ae&&Xe!==null&&t.mode&1&&!(t.flags&128))Ip(),Br(),t.flags|=98560,s=!1;else if(s=Ps(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(R(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(R(317));s[Mt]=t}else Br(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;je(t),s=!1}else kt!==null&&(ac(kt),kt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ue.current&1?Se===0&&(Se=3):Au())),t.updateQueue!==null&&(t.flags|=4),je(t),null);case 4:return Hr(),Jl(e,t),e===null&&Hi(t.stateNode.containerInfo),je(t),null;case 10:return hu(t.type._context),je(t),null;case 17:return We(t.type)&&vo(),je(t),null;case 19:if(se(ue),s=t.memoizedState,s===null)return je(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)fi(s,!1);else{if(Se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=To(e),o!==null){for(t.flags|=128,fi(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ee(ue,ue.current&1|2),t.child}e=e.sibling}s.tail!==null&&ge()>Kr&&(t.flags|=128,r=!0,fi(s,!1),t.lanes=4194304)}else{if(!r)if(e=To(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ae)return je(t),null}else 2*ge()-s.renderingStartTime>Kr&&n!==1073741824&&(t.flags|=128,r=!0,fi(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ge(),t.sibling=null,n=ue.current,ee(ue,r?n&1|2:n&1),t):(je(t),null);case 22:case 23:return ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(je(t),t.subtreeFlags&6&&(t.flags|=8192)):je(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function Z1(e,t){switch(cu(t),t.tag){case 1:return We(t.type)&&vo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hr(),se(He),se(Me),vu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return yu(t),null;case 13:if(se(ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));Br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(ue),null;case 4:return Hr(),null;case 10:return hu(t.type._context),null;case 22:case 23:return ju(),null;case 24:return null;default:return null}}var Rs=!1,Ae=!1,J1=typeof WeakSet=="function"?WeakSet:Set,_=null;function wr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){me(e,t,r)}else n.current=null}function ec(e,t,n){try{n()}catch(r){me(e,t,r)}}var Df=!1;function ew(e,t){if(Il=mo,e=Cp(),au(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,f=e,m=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)m=f,f=h;for(;;){if(f===e)break t;if(m===n&&++c===i&&(a=o),m===s&&++d===r&&(l=o),(h=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vl={focusedElem:e,selectionRange:n},mo=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:St(t.type,w),S);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){me(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return v=Df,Df=!1,v}function Pi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&ec(t,n,s)}i=i.next}while(i!==r)}}function ea(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 tc(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 wg(e){var t=e.alternate;t!==null&&(e.alternate=null,wg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[Ki],delete t[$l],delete t[z1],delete t[I1])),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 Sg(e){return e.tag===5||e.tag===3||e.tag===4}function _f(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sg(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 nc(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=yo));else if(r!==4&&(e=e.child,e!==null))for(nc(e,t,n),e=e.sibling;e!==null;)nc(e,t,n),e=e.sibling}function rc(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(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}var Ce=null,bt=!1;function nn(e,t,n){for(n=n.child;n!==null;)bg(e,t,n),n=n.sibling}function bg(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ko,n)}catch{}switch(n.tag){case 5:Ae||wr(n,t);case 6:var r=Ce,i=bt;Ce=null,nn(e,t,n),Ce=r,bt=i,Ce!==null&&(bt?(e=Ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(bt?(e=Ce,n=n.stateNode,e.nodeType===8?Va(e.parentNode,n):e.nodeType===1&&Va(e,n),$i(e)):Va(Ce,n.stateNode));break;case 4:r=Ce,i=bt,Ce=n.stateNode.containerInfo,bt=!0,nn(e,t,n),Ce=r,bt=i;break;case 0:case 11:case 14:case 15:if(!Ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ec(n,t,o),i=i.next}while(i!==r)}nn(e,t,n);break;case 1:if(!Ae&&(wr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){me(n,t,a)}nn(e,t,n);break;case 21:nn(e,t,n);break;case 22:n.mode&1?(Ae=(r=Ae)||n.memoizedState!==null,nn(e,t,n),Ae=r):nn(e,t,n);break;default:nn(e,t,n)}}function Lf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new J1),t.forEach(function(r){var i=cw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function yt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ce=a.stateNode,bt=!1;break e;case 3:Ce=a.stateNode.containerInfo,bt=!0;break e;case 4:Ce=a.stateNode.containerInfo,bt=!0;break e}a=a.return}if(Ce===null)throw Error(R(160));bg(s,o,i),Ce=null,bt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){me(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)kg(t,e),t=t.sibling}function kg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yt(t,e),jt(e),r&4){try{Pi(3,e,e.return),ea(3,e)}catch(w){me(e,e.return,w)}try{Pi(5,e,e.return)}catch(w){me(e,e.return,w)}}break;case 1:yt(t,e),jt(e),r&512&&n!==null&&wr(n,n.return);break;case 5:if(yt(t,e),jt(e),r&512&&n!==null&&wr(n,n.return),e.flags&32){var i=e.stateNode;try{Ii(i,"")}catch(w){me(e,e.return,w)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Wm(i,s),El(a,o);var c=El(a,s);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?Qm(i,f):d==="dangerouslySetInnerHTML"?Ym(i,f):d==="children"?Ii(i,f):Yc(i,d,f,c)}switch(a){case"input":bl(i,s);break;case"textarea":Km(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Pr(i,!!s.multiple,h,!1):m!==!!s.multiple&&(s.defaultValue!=null?Pr(i,!!s.multiple,s.defaultValue,!0):Pr(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ki]=s}catch(w){me(e,e.return,w)}}break;case 6:if(yt(t,e),jt(e),r&4){if(e.stateNode===null)throw Error(R(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(w){me(e,e.return,w)}}break;case 3:if(yt(t,e),jt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$i(t.containerInfo)}catch(w){me(e,e.return,w)}break;case 4:yt(t,e),jt(e);break;case 13:yt(t,e),jt(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Eu=ge())),r&4&&Lf(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ae=(c=Ae)||d,yt(t,e),Ae=c):yt(t,e),jt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(_=e,d=e.child;d!==null;){for(f=_=d;_!==null;){switch(m=_,h=m.child,m.tag){case 0:case 11:case 14:case 15:Pi(4,m,m.return);break;case 1:wr(m,m.return);var v=m.stateNode;if(typeof v.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){me(r,n,w)}}break;case 5:wr(m,m.return);break;case 22:if(m.memoizedState!==null){If(f);continue}}h!==null?(h.return=m,_=h):If(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Xm("display",o))}catch(w){me(e,e.return,w)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){me(e,e.return,w)}}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:yt(t,e),jt(e),r&4&&Lf(e);break;case 21:break;default:yt(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Sg(n)){var r=n;break e}n=n.return}throw Error(R(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ii(i,""),r.flags&=-33);var s=_f(e);rc(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=_f(e);nc(e,a,o);break;default:throw Error(R(161))}}catch(l){me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tw(e,t,n){_=e,Cg(e)}function Cg(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var i=_,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Rs;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Ae;a=Rs;var c=Ae;if(Rs=o,(Ae=l)&&!c)for(_=i;_!==null;)o=_,l=o.child,o.tag===22&&o.memoizedState!==null?Vf(i):l!==null?(l.return=o,_=l):Vf(i);for(;s!==null;)_=s,Cg(s),s=s.sibling;_=i,Rs=a,Ae=c}zf(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,_=s):zf(e)}}function zf(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ae||ea(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ae)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:St(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&wf(t,s,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}wf(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&&$i(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}Ae||t.flags&512&&tc(t)}catch(m){me(t,t.return,m)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function If(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function Vf(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ea(4,t)}catch(l){me(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){me(t,i,l)}}var s=t.return;try{tc(t)}catch(l){me(t,s,l)}break;case 5:var o=t.return;try{tc(t)}catch(l){me(t,o,l)}}}catch(l){me(t,t.return,l)}if(t===e){_=null;break}var a=t.sibling;if(a!==null){a.return=t.return,_=a;break}_=t.return}}var nw=Math.ceil,Po=Zt.ReactCurrentDispatcher,Tu=Zt.ReactCurrentOwner,ot=Zt.ReactCurrentBatchConfig,Y=0,ke=null,ve=null,Ne=0,Ye=0,Sr=jn(0),Se=0,Zi=null,Jn=0,ta=0,Nu=0,ji=null,Be=null,Eu=0,Kr=1/0,$t=null,jo=!1,ic=null,bn=null,Ms=!1,pn=null,Ao=0,Ai=0,sc=null,qs=-1,Zs=0;function Ie(){return Y&6?ge():qs!==-1?qs:qs=ge()}function kn(e){return e.mode&1?Y&2&&Ne!==0?Ne&-Ne:O1.transition!==null?(Zs===0&&(Zs=lp()),Zs):(e=Q,e!==0||(e=window.event,e=e===void 0?16:pp(e.type)),e):1}function Tt(e,t,n,r){if(50<Ai)throw Ai=0,sc=null,Error(R(185));os(e,n,r),(!(Y&2)||e!==ke)&&(e===ke&&(!(Y&2)&&(ta|=n),Se===4&&hn(e,Ne)),Ke(e,r),n===1&&Y===0&&!(t.mode&1)&&(Kr=ge()+500,qo&&An()))}function Ke(e,t){var n=e.callbackNode;Ox(e,t);var r=ho(e,e===ke?Ne:0);if(r===0)n!==null&&Kd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Kd(n),t===1)e.tag===0?V1(Of.bind(null,e)):_p(Of.bind(null,e)),_1(function(){!(Y&6)&&An()}),n=null;else{switch(cp(r)){case 1:n=Jc;break;case 4:n=op;break;case 16:n=fo;break;case 536870912:n=ap;break;default:n=fo}n=Mg(n,Tg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Tg(e,t){if(qs=-1,Zs=0,Y&6)throw Error(R(327));var n=e.callbackNode;if(Dr()&&e.callbackNode!==n)return null;var r=ho(e,e===ke?Ne:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ro(e,r);else{t=r;var i=Y;Y|=2;var s=Eg();(ke!==e||Ne!==t)&&($t=null,Kr=ge()+500,Gn(e,t));do try{sw();break}catch(a){Ng(e,a)}while(!0);fu(),Po.current=s,Y=i,ve!==null?t=0:(ke=null,Ne=0,t=Se)}if(t!==0){if(t===2&&(i=Ml(e),i!==0&&(r=i,t=oc(e,i))),t===1)throw n=Zi,Gn(e,0),hn(e,r),Ke(e,ge()),n;if(t===6)hn(e,r);else{if(i=e.current.alternate,!(r&30)&&!rw(i)&&(t=Ro(e,r),t===2&&(s=Ml(e),s!==0&&(r=s,t=oc(e,s))),t===1))throw n=Zi,Gn(e,0),hn(e,r),Ke(e,ge()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(R(345));case 2:Vn(e,Be,$t);break;case 3:if(hn(e,r),(r&130023424)===r&&(t=Eu+500-ge(),10<t)){if(ho(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ie(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Fl(Vn.bind(null,e,Be,$t),t);break}Vn(e,Be,$t);break;case 4:if(hn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Ct(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nw(r/1960))-r,10<r){e.timeoutHandle=Fl(Vn.bind(null,e,Be,$t),r);break}Vn(e,Be,$t);break;case 5:Vn(e,Be,$t);break;default:throw Error(R(329))}}}return Ke(e,ge()),e.callbackNode===n?Tg.bind(null,e):null}function oc(e,t){var n=ji;return e.current.memoizedState.isDehydrated&&(Gn(e,t).flags|=256),e=Ro(e,t),e!==2&&(t=Be,Be=n,t!==null&&ac(t)),e}function ac(e){Be===null?Be=e:Be.push.apply(Be,e)}function rw(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!Pt(s(),i))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 hn(e,t){for(t&=~Nu,t&=~ta,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ct(t),r=1<<n;e[n]=-1,t&=~r}}function Of(e){if(Y&6)throw Error(R(327));Dr();var t=ho(e,0);if(!(t&1))return Ke(e,ge()),null;var n=Ro(e,t);if(e.tag!==0&&n===2){var r=Ml(e);r!==0&&(t=r,n=oc(e,r))}if(n===1)throw n=Zi,Gn(e,0),hn(e,t),Ke(e,ge()),n;if(n===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vn(e,Be,$t),Ke(e,ge()),null}function Pu(e,t){var n=Y;Y|=1;try{return e(t)}finally{Y=n,Y===0&&(Kr=ge()+500,qo&&An())}}function er(e){pn!==null&&pn.tag===0&&!(Y&6)&&Dr();var t=Y;Y|=1;var n=ot.transition,r=Q;try{if(ot.transition=null,Q=1,e)return e()}finally{Q=r,ot.transition=n,Y=t,!(Y&6)&&An()}}function ju(){Ye=Sr.current,se(Sr)}function Gn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,D1(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(cu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vo();break;case 3:Hr(),se(He),se(Me),vu();break;case 5:yu(r);break;case 4:Hr();break;case 13:se(ue);break;case 19:se(ue);break;case 10:hu(r.type._context);break;case 22:case 23:ju()}n=n.return}if(ke=e,ve=e=Cn(e.current,null),Ne=Ye=t,Se=0,Zi=null,Nu=ta=Jn=0,Be=ji=null,Bn!==null){for(t=0;t<Bn.length;t++)if(n=Bn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Bn=null}return e}function Ng(e,t){do{var n=ve;try{if(fu(),Ys.current=Eo,No){for(var r=fe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}No=!1}if(Zn=0,be=we=fe=null,Ei=!1,Xi=0,Tu.current=null,n===null||n.return===null){Se=1,Zi=t,ve=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Ne,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 m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=Nf(o);if(h!==null){h.flags&=-257,Ef(h,o,a,s,t),h.mode&1&&Tf(s,c,t),t=h,l=c;var v=t.updateQueue;if(v===null){var w=new Set;w.add(l),t.updateQueue=w}else v.add(l);break e}else{if(!(t&1)){Tf(s,c,t),Au();break e}l=Error(R(426))}}else if(ae&&a.mode&1){var S=Nf(o);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ef(S,o,a,s,t),uu(Wr(l,a));break e}}s=l=Wr(l,a),Se!==4&&(Se=2),ji===null?ji=[s]:ji.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=cg(s,l,t);xf(s,p);break e;case 1:a=l;var g=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(bn===null||!bn.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=ug(s,a,t);xf(s,b);break e}}s=s.return}while(s!==null)}jg(n)}catch(k){t=k,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(!0)}function Eg(){var e=Po.current;return Po.current=Eo,e===null?Eo:e}function Au(){(Se===0||Se===3||Se===2)&&(Se=4),ke===null||!(Jn&268435455)&&!(ta&268435455)||hn(ke,Ne)}function Ro(e,t){var n=Y;Y|=2;var r=Eg();(ke!==e||Ne!==t)&&($t=null,Gn(e,t));do try{iw();break}catch(i){Ng(e,i)}while(!0);if(fu(),Y=n,Po.current=r,ve!==null)throw Error(R(261));return ke=null,Ne=0,Se}function iw(){for(;ve!==null;)Pg(ve)}function sw(){for(;ve!==null&&!Ax();)Pg(ve)}function Pg(e){var t=Rg(e.alternate,e,Ye);e.memoizedProps=e.pendingProps,t===null?jg(e):ve=t,Tu.current=null}function jg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Z1(n,t),n!==null){n.flags&=32767,ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Se=6,ve=null;return}}else if(n=q1(n,t,Ye),n!==null){ve=n;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Se===0&&(Se=5)}function Vn(e,t,n){var r=Q,i=ot.transition;try{ot.transition=null,Q=1,ow(e,t,n,r)}finally{ot.transition=i,Q=r}return null}function ow(e,t,n,r){do Dr();while(pn!==null);if(Y&6)throw Error(R(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(R(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Fx(e,s),e===ke&&(ve=ke=null,Ne=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ms||(Ms=!0,Mg(fo,function(){return Dr(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=ot.transition,ot.transition=null;var o=Q;Q=1;var a=Y;Y|=4,Tu.current=null,ew(e,n),kg(n,e),N1(Vl),mo=!!Il,Vl=Il=null,e.current=n,tw(n),Rx(),Y=a,Q=o,ot.transition=s}else e.current=n;if(Ms&&(Ms=!1,pn=e,Ao=i),s=e.pendingLanes,s===0&&(bn=null),_x(n.stateNode),Ke(e,ge()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(jo)throw jo=!1,e=ic,ic=null,e;return Ao&1&&e.tag!==0&&Dr(),s=e.pendingLanes,s&1?e===sc?Ai++:(Ai=0,sc=e):Ai=0,An(),null}function Dr(){if(pn!==null){var e=cp(Ao),t=ot.transition,n=Q;try{if(ot.transition=null,Q=16>e?16:e,pn===null)var r=!1;else{if(e=pn,pn=null,Ao=0,Y&6)throw Error(R(331));var i=Y;for(Y|=4,_=e.current;_!==null;){var s=_,o=s.child;if(_.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(_=c;_!==null;){var d=_;switch(d.tag){case 0:case 11:case 15:Pi(8,d,s)}var f=d.child;if(f!==null)f.return=d,_=f;else for(;_!==null;){d=_;var m=d.sibling,h=d.return;if(wg(d),d===c){_=null;break}if(m!==null){m.return=h,_=m;break}_=h}}}var v=s.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}_=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,_=o;else e:for(;_!==null;){if(s=_,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Pi(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,_=p;break e}_=s.return}}var g=e.current;for(_=g;_!==null;){o=_;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,_=y;else e:for(o=g;_!==null;){if(a=_,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ea(9,a)}}catch(k){me(a,a.return,k)}if(a===o){_=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,_=b;break e}_=a.return}}if(Y=i,An(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ko,e)}catch{}r=!0}return r}finally{Q=n,ot.transition=t}}return!1}function Ff(e,t,n){t=Wr(n,t),t=cg(e,t,1),e=Sn(e,t,1),t=Ie(),e!==null&&(os(e,1,t),Ke(e,t))}function me(e,t,n){if(e.tag===3)Ff(e,e,n);else for(;t!==null;){if(t.tag===3){Ff(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=Wr(n,e),e=ug(t,e,1),t=Sn(t,e,1),e=Ie(),t!==null&&(os(t,1,e),Ke(t,e));break}}t=t.return}}function aw(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&n,ke===e&&(Ne&n)===n&&(Se===4||Se===3&&(Ne&130023424)===Ne&&500>ge()-Eu?Gn(e,0):Nu|=n),Ke(e,t)}function Ag(e,t){t===0&&(e.mode&1?(t=bs,bs<<=1,!(bs&130023424)&&(bs=4194304)):t=1);var n=Ie();e=Yt(e,t),e!==null&&(os(e,t,n),Ke(e,n))}function lw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ag(e,n)}function cw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),Ag(e,n)}var Rg;Rg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,Q1(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,ae&&t.flags&1048576&&Lp(t,So,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qs(e,t),e=t.pendingProps;var i=$r(t,Me.current);Mr(t,n),i=wu(null,t,r,e,i,n);var s=Su();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)?(s=!0,xo(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pu(t),i.updater=Jo,t.stateNode=i,i._reactInternals=t,Gl(t,r,e,n),t=Ql(null,t,r,!0,s,n)):(t.tag=0,ae&&s&&lu(t),_e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=dw(r),e=St(r,e),i){case 0:t=Xl(null,t,r,e,n);break e;case 1:t=Af(null,t,r,e,n);break e;case 11:t=Pf(null,t,r,e,n);break e;case 14:t=jf(null,t,r,St(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:St(r,i),Xl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:St(r,i),Af(e,t,r,i,n);case 3:e:{if(mg(t),e===null)throw Error(R(387));r=t.pendingProps,s=t.memoizedState,i=s.element,$p(e,t),Co(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Wr(Error(R(423)),t),t=Rf(e,t,r,n,i);break e}else if(r!==i){i=Wr(Error(R(424)),t),t=Rf(e,t,r,n,i);break e}else for(Xe=wn(t.stateNode.containerInfo.firstChild),qe=t,ae=!0,kt=null,n=Op(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===i){t=Xt(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return Bp(t),e===null&&Hl(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Ol(r,i)?o=null:s!==null&&Ol(r,s)&&(t.flags|=32),hg(e,t),_e(e,t,o,n),t.child;case 6:return e===null&&Hl(t),null;case 13:return pg(e,t,n);case 4:return gu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ur(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:St(r,i),Pf(e,t,r,i,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,ee(bo,r._currentValue),r._currentValue=o,s!==null)if(Pt(s.value,o)){if(s.children===i.children&&!He.current){t=Xt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Wt(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Wl(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(R(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Wl(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}_e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mr(t,n),i=ct(i),r=r(i),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,i=St(r,t.pendingProps),i=St(r.type,i),jf(e,t,r,i,n);case 15:return dg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:St(r,i),Qs(e,t),t.tag=1,We(r)?(e=!0,xo(t)):e=!1,Mr(t,n),lg(t,r,i),Gl(t,r,i,n),Ql(null,t,r,!0,e,n);case 19:return gg(e,t,n);case 22:return fg(e,t,n)}throw Error(R(156,t.tag))};function Mg(e,t){return sp(e,t)}function uw(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 it(e,t,n,r){return new uw(e,t,n,r)}function Ru(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dw(e){if(typeof e=="function")return Ru(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qc)return 11;if(e===qc)return 14}return 2}function Cn(e,t){var n=e.alternate;return n===null?(n=it(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 Js(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Ru(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case dr:return Yn(n.children,i,s,t);case Xc:o=8,i|=8;break;case yl:return e=it(12,n,t,i|2),e.elementType=yl,e.lanes=s,e;case vl:return e=it(13,n,t,i),e.elementType=vl,e.lanes=s,e;case xl:return e=it(19,n,t,i),e.elementType=xl,e.lanes=s,e;case Bm:return na(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fm:o=10;break e;case $m:o=9;break e;case Qc:o=11;break e;case qc:o=14;break e;case un:o=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=it(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Yn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function na(e,t,n,r){return e=it(22,e,r,t),e.elementType=Bm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ka(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function Ga(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fw(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ea(0),this.expirationTimes=Ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ea(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mu(e,t,n,r,i,s,o,a,l){return e=new fw(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=it(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(s),e}function hw(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ur,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Dg(e){if(!e)return Nn;e=e._reactInternals;e:{if(rr(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var n=e.type;if(We(n))return Dp(e,n,t)}return t}function _g(e,t,n,r,i,s,o,a,l){return e=Mu(n,r,!0,e,i,s,o,a,l),e.context=Dg(null),n=e.current,r=Ie(),i=kn(n),s=Wt(r,i),s.callback=t??null,Sn(n,s,i),e.current.lanes=i,os(e,i,r),Ke(e,r),e}function ra(e,t,n,r){var i=t.current,s=Ie(),o=kn(i);return n=Dg(n),t.context===null?t.context=n:t.pendingContext=n,t=Wt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Sn(i,t,o),e!==null&&(Tt(e,i,o,s),Gs(e,i,o)),o}function Mo(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 $f(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Du(e,t){$f(e,t),(e=e.alternate)&&$f(e,t)}function mw(){return null}var Lg=typeof reportError=="function"?reportError:function(e){console.error(e)};function _u(e){this._internalRoot=e}ia.prototype.render=_u.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));ra(e,t,null,null)};ia.prototype.unmount=_u.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;er(function(){ra(null,e,null,null)}),t[Gt]=null}};function ia(e){this._internalRoot=e}ia.prototype.unstable_scheduleHydration=function(e){if(e){var t=fp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fn.length&&t!==0&&t<fn[n].priority;n++);fn.splice(n,0,e),n===0&&mp(e)}};function Lu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function sa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bf(){}function pw(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Mo(o);s.call(c)}}var o=_g(t,r,e,0,null,!1,!1,"",Bf);return e._reactRootContainer=o,e[Gt]=o.current,Hi(e.nodeType===8?e.parentNode:e),er(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Mo(l);a.call(c)}}var l=Mu(e,0,!1,null,null,!1,!1,"",Bf);return e._reactRootContainer=l,e[Gt]=l.current,Hi(e.nodeType===8?e.parentNode:e),er(function(){ra(t,l,n,r)}),l}function oa(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Mo(o);a.call(l)}}ra(t,o,e,i)}else o=pw(n,t,e,i,r);return Mo(o)}up=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xi(t.pendingLanes);n!==0&&(eu(t,n|1),Ke(t,ge()),!(Y&6)&&(Kr=ge()+500,An()))}break;case 13:er(function(){var r=Yt(e,1);if(r!==null){var i=Ie();Tt(r,e,1,i)}}),Du(e,1)}};tu=function(e){if(e.tag===13){var t=Yt(e,134217728);if(t!==null){var n=Ie();Tt(t,e,134217728,n)}Du(e,134217728)}};dp=function(e){if(e.tag===13){var t=kn(e),n=Yt(e,t);if(n!==null){var r=Ie();Tt(n,e,t,r)}Du(e,t)}};fp=function(){return Q};hp=function(e,t){var n=Q;try{return Q=e,t()}finally{Q=n}};jl=function(e,t,n){switch(t){case"input":if(bl(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 i=Qo(r);if(!i)throw Error(R(90));Hm(r),bl(r,i)}}}break;case"textarea":Km(e,n);break;case"select":t=n.value,t!=null&&Pr(e,!!n.multiple,t,!1)}};Jm=Pu;ep=er;var gw={usingClientEntryPoint:!1,Events:[ls,pr,Qo,qm,Zm,Pu]},hi={findFiberByHostInstance:$n,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},yw={bundleType:hi.bundleType,version:hi.version,rendererPackageName:hi.rendererPackageName,rendererConfig:hi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rp(e),e===null?null:e.stateNode},findFiberByHostInstance:hi.findFiberByHostInstance||mw,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 Ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ds.isDisabled&&Ds.supportsFiber)try{Ko=Ds.inject(yw),_t=Ds}catch{}}Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gw;Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lu(t))throw Error(R(200));return hw(e,t,null,n)};Je.createRoot=function(e,t){if(!Lu(e))throw Error(R(299));var n=!1,r="",i=Lg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Mu(e,1,!1,null,null,n,!1,r,i),e[Gt]=t.current,Hi(e.nodeType===8?e.parentNode:e),new _u(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(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=rp(t),e=e===null?null:e.stateNode,e};Je.flushSync=function(e){return er(e)};Je.hydrate=function(e,t,n){if(!sa(t))throw Error(R(200));return oa(null,e,t,!0,n)};Je.hydrateRoot=function(e,t,n){if(!Lu(e))throw Error(R(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Lg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=_g(t,null,e,1,n??null,i,!1,s,o),e[Gt]=t.current,Hi(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ia(t)};Je.render=function(e,t,n){if(!sa(t))throw Error(R(200));return oa(null,e,t,!1,n)};Je.unmountComponentAtNode=function(e){if(!sa(e))throw Error(R(40));return e._reactRootContainer?(er(function(){oa(null,null,e,!1,function(){e._reactRootContainer=null,e[Gt]=null})}),!0):!1};Je.unstable_batchedUpdates=Pu;Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!sa(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return oa(e,t,n,!1,r)};Je.version="18.3.1-next-f1338f8080-20240426";function zg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zg)}catch(e){console.error(e)}}zg(),zm.exports=Je;var Ig=zm.exports;const vw=Cm(Ig);var Vg,Uf=Ig;Vg=Uf.createRoot,Uf.hydrateRoot;const Qt={AGENTS:"fightbook_agents",CURRENT_AGENT:"fightbook_current_agent",FIGHT_HISTORY:"fightbook_fight_history",LEADERBOARD:"fightbook_leaderboard",ONBOARDING_COMPLETE:"fightbook_onboarding_complete"};function xw(e){const t=Rn(),n=t.findIndex(r=>r.metadata.id===e.metadata.id);n>=0?t[n]=e:t.push(e),localStorage.setItem(Qt.AGENTS,JSON.stringify(t))}function Rn(){const e=localStorage.getItem(Qt.AGENTS);return e?JSON.parse(e):[]}function ww(e){const t=Rn().filter(n=>n.metadata.id!==e);localStorage.setItem(Qt.AGENTS,JSON.stringify(t))}function Hf(e){e?localStorage.setItem(Qt.CURRENT_AGENT,JSON.stringify(e)):localStorage.removeItem(Qt.CURRENT_AGENT)}function Sw(){const e=localStorage.getItem(Qt.CURRENT_AGENT);return e?JSON.parse(e):null}function Og(e){const t=zu();t.unshift(e),t.length>100&&t.pop(),localStorage.setItem(Qt.FIGHT_HISTORY,JSON.stringify(t)),bw(e)}function zu(){const e=localStorage.getItem(Qt.FIGHT_HISTORY);return e?JSON.parse(e):[]}function bw(e){const t=Rn();let n=!1;for(const r of t){let i=!1,s=!1,o=null;if(e.agent1.id===r.metadata.id?(i=!0,s=e.winner===e.agent1.name,s&&(o=e.method)):e.agent2.id===r.metadata.id&&(i=!0,s=e.winner===e.agent2.name,s&&(o=e.method)),i){r.metadata.totalFights++,r.metadata.xp+=s?100:25,s?(r.metadata.wins++,r.metadata.currentStreak=Math.max(0,r.metadata.currentStreak)+1,r.metadata.bestStreak=Math.max(r.metadata.bestStreak,r.metadata.currentStreak),o==="KO"||o==="TKO"?r.metadata.kos++:o==="SUB"&&r.metadata.submissions++):e.winner?(r.metadata.losses++,r.metadata.currentStreak=Math.min(0,r.metadata.currentStreak)-1):r.metadata.draws++;const a=Math.floor(r.metadata.xp/500)+1;a>r.metadata.level&&(r.metadata.level=a);const l=s?15:e.winner?-10:0;r.metadata.ranking=Math.max(0,r.metadata.ranking+l),r.metadata.updatedAt=Date.now(),n=!0}}n&&localStorage.setItem(Qt.AGENTS,JSON.stringify(t))}const kw={name:"New Agent",nickname:"The Prospect",striking:50,punchSpeed:50,kickPower:50,headMovement:50,footwork:50,combinations:50,wrestling:50,takedownDefense:50,clinchControl:50,trips:50,throws:50,submissions:50,submissionDefense:50,groundAndPound:50,guardPassing:50,sweeps:50,topControl:50,bottomGame:50,cardio:50,chin:50,recovery:50,strength:50,flexibility:50,aggression:.5,fightIQ:50,heart:50,adaptability:50,ringGeneralship:50,preferredRange:"distance",finishingInstinct:50,defensiveTendency:50},Cw={archetype:"balanced",attitude:"intense",preFightQuote:"I'm here to fight. Let's go.",winQuote:"Victory belongs to the most prepared.",lossQuote:"I'll be back stronger.",fightingPhilosophy:"Adapt and overcome."},Tw={origin:"Unknown",trainingCamp:"FightBook Academy",signatureMove:"The Haymaker",rivalries:[],achievements:["Debut Fight"]},Nw={agentName:"agent007"};function lc(e){const t=Date.now();return{metadata:{id:`agent_${t}_${Math.random().toString(36).substring(7)}`,name:e,createdAt:t,updatedAt:t,version:1,totalFights:0,wins:0,losses:0,draws:0,kos:0,submissions:0,currentStreak:0,bestStreak:0,ranking:1e3,earnings:0,xp:0,level:1},skills:{...kw,name:e,nickname:"The Prospect"},personality:{...Cw},backstory:{...Tw},social:{...Nw,agentName:e.toLowerCase().replace(/\s+/g,"_")}}}function Ya(e){const{skills:t,personality:n,backstory:r}=e;return`# ${t.name} - FightBook Agent Configuration
|
|
41
|
+
# Version: ${e.metadata.version} | Level: ${e.metadata.level}
|
|
42
|
+
|
|
43
|
+
## IDENTITY
|
|
44
|
+
name: ${t.name}
|
|
45
|
+
nickname: ${t.nickname}
|
|
46
|
+
archetype: ${n.archetype}
|
|
47
|
+
attitude: ${n.attitude}
|
|
48
|
+
|
|
49
|
+
## STRIKING
|
|
50
|
+
striking: ${t.striking}
|
|
51
|
+
punch_speed: ${t.punchSpeed}
|
|
52
|
+
kick_power: ${t.kickPower}
|
|
53
|
+
head_movement: ${t.headMovement}
|
|
54
|
+
footwork: ${t.footwork}
|
|
55
|
+
combinations: ${t.combinations}
|
|
56
|
+
|
|
57
|
+
## GRAPPLING
|
|
58
|
+
wrestling: ${t.wrestling}
|
|
59
|
+
takedown_defense: ${t.takedownDefense}
|
|
60
|
+
clinch_control: ${t.clinchControl}
|
|
61
|
+
trips: ${t.trips}
|
|
62
|
+
throws: ${t.throws}
|
|
63
|
+
|
|
64
|
+
## GROUND GAME
|
|
65
|
+
submissions: ${t.submissions}
|
|
66
|
+
submission_defense: ${t.submissionDefense}
|
|
67
|
+
ground_and_pound: ${t.groundAndPound}
|
|
68
|
+
guard_passing: ${t.guardPassing}
|
|
69
|
+
sweeps: ${t.sweeps}
|
|
70
|
+
top_control: ${t.topControl}
|
|
71
|
+
bottom_game: ${t.bottomGame}
|
|
72
|
+
|
|
73
|
+
## PHYSICAL
|
|
74
|
+
cardio: ${t.cardio}
|
|
75
|
+
chin: ${t.chin}
|
|
76
|
+
recovery: ${t.recovery}
|
|
77
|
+
strength: ${t.strength}
|
|
78
|
+
flexibility: ${t.flexibility}
|
|
79
|
+
|
|
80
|
+
## MENTAL
|
|
81
|
+
aggression: ${t.aggression}
|
|
82
|
+
fight_iq: ${t.fightIQ}
|
|
83
|
+
heart: ${t.heart}
|
|
84
|
+
adaptability: ${t.adaptability}
|
|
85
|
+
ring_generalship: ${t.ringGeneralship}
|
|
86
|
+
|
|
87
|
+
## STRATEGY
|
|
88
|
+
preferred_range: ${t.preferredRange}
|
|
89
|
+
finishing_instinct: ${t.finishingInstinct}
|
|
90
|
+
defensive_tendency: ${t.defensiveTendency}
|
|
91
|
+
|
|
92
|
+
## PERSONALITY
|
|
93
|
+
pre_fight_quote: "${n.preFightQuote}"
|
|
94
|
+
win_quote: "${n.winQuote}"
|
|
95
|
+
loss_quote: "${n.lossQuote}"
|
|
96
|
+
philosophy: "${n.fightingPhilosophy}"
|
|
97
|
+
|
|
98
|
+
## BACKSTORY
|
|
99
|
+
origin: ${r.origin}
|
|
100
|
+
training_camp: ${r.trainingCamp}
|
|
101
|
+
signature_move: ${r.signatureMove}
|
|
102
|
+
`}function Fg(e){const t={},n=e.split(`
|
|
103
|
+
`);for(const r of n){const i=r.trim();if(!i||i.startsWith("#"))continue;const[s,...o]=i.split(":");if(!s)continue;const a=o.join(":").trim();if(!a)continue;const l=parseFloat(a),c=!isNaN(l);switch(s.toLowerCase()){case"name":t.name=a;break;case"nickname":t.nickname=a;break;case"striking":c&&(t.striking=l);break;case"punch_speed":c&&(t.punchSpeed=l);break;case"kick_power":c&&(t.kickPower=l);break;case"head_movement":c&&(t.headMovement=l);break;case"footwork":c&&(t.footwork=l);break;case"combinations":c&&(t.combinations=l);break;case"wrestling":c&&(t.wrestling=l);break;case"takedown_defense":c&&(t.takedownDefense=l);break;case"clinch_control":c&&(t.clinchControl=l);break;case"trips":c&&(t.trips=l);break;case"throws":c&&(t.throws=l);break;case"submissions":c&&(t.submissions=l);break;case"submission_defense":c&&(t.submissionDefense=l);break;case"ground_and_pound":c&&(t.groundAndPound=l);break;case"guard_passing":c&&(t.guardPassing=l);break;case"sweeps":c&&(t.sweeps=l);break;case"top_control":c&&(t.topControl=l);break;case"bottom_game":c&&(t.bottomGame=l);break;case"cardio":c&&(t.cardio=l);break;case"chin":c&&(t.chin=l);break;case"recovery":c&&(t.recovery=l);break;case"strength":c&&(t.strength=l);break;case"flexibility":c&&(t.flexibility=l);break;case"aggression":c&&(t.aggression=l);break;case"fight_iq":c&&(t.fightIQ=l);break;case"heart":c&&(t.heart=l);break;case"adaptability":c&&(t.adaptability=l);break;case"ring_generalship":c&&(t.ringGeneralship=l);break;case"preferred_range":["distance","clinch","ground"].includes(a)&&(t.preferredRange=a);break;case"finishing_instinct":c&&(t.finishingInstinct=l);break;case"defensive_tendency":c&&(t.defensiveTendency=l);break}}return t}function $g(e){const t={striking:1,punchSpeed:.8,kickPower:.7,headMovement:.9,footwork:.8,combinations:.7,wrestling:1,takedownDefense:.9,clinchControl:.7,trips:.5,throws:.5,submissions:.9,submissionDefense:.8,groundAndPound:.7,guardPassing:.7,sweeps:.6,topControl:.8,bottomGame:.7,cardio:1,chin:1,recovery:.8,strength:.7,flexibility:.6,fightIQ:.9,heart:.8,adaptability:.7,ringGeneralship:.8};let n=0,r=0;for(const[i,s]of Object.entries(t)){const o=e[i]||0;n+=o*s,r+=s}return n+=e.aggression*50,r+=.5,Math.round(n/r)}function Bg(e){const t=(e.striking+e.punchSpeed+e.kickPower)/3,n=(e.wrestling+e.submissions+e.topControl+e.bottomGame)/4,r=(e.headMovement+e.takedownDefense+e.submissionDefense)/3;return t>70&&n<50?"striker":n>70&&t<50?"grappler":r>65&&e.aggression<.4?"counter":e.aggression>.8?"pressure":t>65&&n>65?"balanced":"wildcard"}var Ew=e=>{switch(e){case"success":return Aw;case"info":return Mw;case"warning":return Rw;case"error":return Dw;default:return null}},Pw=Array(12).fill(0),jw=({visible:e,className:t})=>M.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},M.createElement("div",{className:"sonner-spinner"},Pw.map((n,r)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Aw=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rw=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mw=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Dw=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),_w=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Lw=()=>{let[e,t]=M.useState(document.hidden);return M.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},cc=1,zw=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:cc++,s=this.toasts.find(a=>a.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...e,id:i,title:n}),{...a,...e,id:i,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,s,o=r.then(async l=>{if(s=["resolve",l],M.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(Vw(l)&&!l.ok){i=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:d})}else if(t.success!==void 0){i=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:d})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){i=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:d})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||cc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},$e=new zw,Iw=(e,t)=>{let n=(t==null?void 0:t.id)||cc++;return $e.addToast({title:e,...t,id:n}),n},Vw=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ow=Iw,Fw=()=>$e.toasts,$w=()=>$e.getActiveToasts(),Hn=Object.assign(Ow,{success:$e.success,info:$e.info,warning:$e.warning,error:$e.error,custom:$e.custom,message:$e.message,promise:$e.promise,dismiss:$e.dismiss,loading:$e.loading},{getHistory:Fw,getToasts:$w});function Bw(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Bw(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
104
|
+
`);function _s(e){return e.label!==void 0}var Uw=3,Hw="32px",Ww="16px",Wf=4e3,Kw=356,Gw=14,Yw=20,Xw=200;function vt(...e){return e.filter(Boolean).join(" ")}function Qw(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var qw=e=>{var t,n,r,i,s,o,a,l,c,d,f;let{invert:m,toast:h,unstyled:v,interacting:w,setHeights:S,visibleToasts:p,heights:g,index:y,toasts:b,expanded:k,removeToast:C,defaultRichColors:N,closeButton:T,style:E,cancelButtonStyle:P,actionButtonStyle:z,className:I="",descriptionClassName:J="",duration:le,position:pe,gap:ne,loadingIcon:$,expandByDefault:j,classNames:A,icons:D,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:F}=e,[V,K]=M.useState(null),[U,X]=M.useState(null),[O,De]=M.useState(!1),[Ge,Ot]=M.useState(!1),[Dn,va]=M.useState(!1),[Nd,Av]=M.useState(!1),[Rv,Ed]=M.useState(!1),[Mv,xa]=M.useState(0),[Dv,Pd]=M.useState(0),si=M.useRef(h.duration||le||Wf),jd=M.useRef(null),_n=M.useRef(null),_v=y===0,Lv=y+1<=p,tt=h.type,ir=h.dismissible!==!1,zv=h.className||"",Iv=h.descriptionClassName||"",gs=M.useMemo(()=>g.findIndex(B=>B.toastId===h.id)||0,[g,h.id]),Vv=M.useMemo(()=>{var B;return(B=h.closeButton)!=null?B:T},[h.closeButton,T]),Ad=M.useMemo(()=>h.duration||le||Wf,[h.duration,le]),wa=M.useRef(0),sr=M.useRef(0),Rd=M.useRef(0),or=M.useRef(null),[Ov,Fv]=pe.split("-"),Md=M.useMemo(()=>g.reduce((B,Z,oe)=>oe>=gs?B:B+Z.height,0),[g,gs]),Dd=Lw(),$v=h.invert||m,Sa=tt==="loading";sr.current=M.useMemo(()=>gs*ne+Md,[gs,Md]),M.useEffect(()=>{si.current=Ad},[Ad]),M.useEffect(()=>{De(!0)},[]),M.useEffect(()=>{let B=_n.current;if(B){let Z=B.getBoundingClientRect().height;return Pd(Z),S(oe=>[{toastId:h.id,height:Z,position:h.position},...oe]),()=>S(oe=>oe.filter(ht=>ht.toastId!==h.id))}},[S,h.id]),M.useLayoutEffect(()=>{if(!O)return;let B=_n.current,Z=B.style.height;B.style.height="auto";let oe=B.getBoundingClientRect().height;B.style.height=Z,Pd(oe),S(ht=>ht.find(mt=>mt.toastId===h.id)?ht.map(mt=>mt.toastId===h.id?{...mt,height:oe}:mt):[{toastId:h.id,height:oe,position:h.position},...ht])},[O,h.title,h.description,S,h.id]);let Jt=M.useCallback(()=>{Ot(!0),xa(sr.current),S(B=>B.filter(Z=>Z.toastId!==h.id)),setTimeout(()=>{C(h)},Xw)},[h,C,S,sr]);M.useEffect(()=>{if(h.promise&&tt==="loading"||h.duration===1/0||h.type==="loading")return;let B;return k||w||F&&Dd?(()=>{if(Rd.current<wa.current){let Z=new Date().getTime()-wa.current;si.current=si.current-Z}Rd.current=new Date().getTime()})():si.current!==1/0&&(wa.current=new Date().getTime(),B=setTimeout(()=>{var Z;(Z=h.onAutoClose)==null||Z.call(h,h),Jt()},si.current)),()=>clearTimeout(B)},[k,w,h,tt,F,Dd,Jt]),M.useEffect(()=>{h.delete&&Jt()},[Jt,h.delete]);function Bv(){var B,Z,oe;return D!=null&&D.loading?M.createElement("div",{className:vt(A==null?void 0:A.loader,(B=h==null?void 0:h.classNames)==null?void 0:B.loader,"sonner-loader"),"data-visible":tt==="loading"},D.loading):$?M.createElement("div",{className:vt(A==null?void 0:A.loader,(Z=h==null?void 0:h.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":tt==="loading"},$):M.createElement(jw,{className:vt(A==null?void 0:A.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader),visible:tt==="loading"})}return M.createElement("li",{tabIndex:0,ref:_n,className:vt(I,zv,A==null?void 0:A.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[tt],(n=h==null?void 0:h.classNames)==null?void 0:n[tt]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:N,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":O,"data-promise":!!h.promise,"data-swiped":Rv,"data-removed":Ge,"data-visible":Lv,"data-y-position":Ov,"data-x-position":Fv,"data-index":y,"data-front":_v,"data-swiping":Dn,"data-dismissible":ir,"data-type":tt,"data-invert":$v,"data-swipe-out":Nd,"data-swipe-direction":U,"data-expanded":!!(k||j&&O),style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${Ge?Mv:sr.current}px`,"--initial-height":j?"auto":`${Dv}px`,...E,...h.style},onDragEnd:()=>{va(!1),K(null),or.current=null},onPointerDown:B=>{Sa||!ir||(jd.current=new Date,xa(sr.current),B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(va(!0),or.current={x:B.clientX,y:B.clientY}))},onPointerUp:()=>{var B,Z,oe,ht;if(Nd||!ir)return;or.current=null;let mt=Number(((B=_n.current)==null?void 0:B.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((Z=_n.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ln=new Date().getTime()-((oe=jd.current)==null?void 0:oe.getTime()),pt=V==="x"?mt:en,tn=Math.abs(pt)/Ln;if(Math.abs(pt)>=Yw||tn>.11){xa(sr.current),(ht=h.onDismiss)==null||ht.call(h,h),X(V==="x"?mt>0?"right":"left":en>0?"down":"up"),Jt(),Av(!0),Ed(!1);return}va(!1),K(null)},onPointerMove:B=>{var Z,oe,ht,mt;if(!or.current||!ir||((Z=window.getSelection())==null?void 0:Z.toString().length)>0)return;let en=B.clientY-or.current.y,Ln=B.clientX-or.current.x,pt=(oe=e.swipeDirections)!=null?oe:Qw(pe);!V&&(Math.abs(Ln)>1||Math.abs(en)>1)&&K(Math.abs(Ln)>Math.abs(en)?"x":"y");let tn={x:0,y:0};V==="y"?(pt.includes("top")||pt.includes("bottom"))&&(pt.includes("top")&&en<0||pt.includes("bottom")&&en>0)&&(tn.y=en):V==="x"&&(pt.includes("left")||pt.includes("right"))&&(pt.includes("left")&&Ln<0||pt.includes("right")&&Ln>0)&&(tn.x=Ln),(Math.abs(tn.x)>0||Math.abs(tn.y)>0)&&Ed(!0),(ht=_n.current)==null||ht.style.setProperty("--swipe-amount-x",`${tn.x}px`),(mt=_n.current)==null||mt.style.setProperty("--swipe-amount-y",`${tn.y}px`)}},Vv&&!h.jsx?M.createElement("button",{"aria-label":W,"data-disabled":Sa,"data-close-button":!0,onClick:Sa||!ir?()=>{}:()=>{var B;Jt(),(B=h.onDismiss)==null||B.call(h,h)},className:vt(A==null?void 0:A.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=D==null?void 0:D.close)!=null?s:_w):null,h.jsx||x.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:M.createElement(M.Fragment,null,tt||h.icon||h.promise?M.createElement("div",{"data-icon":"",className:vt(A==null?void 0:A.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Bv():null,h.type!=="loading"?h.icon||(D==null?void 0:D[tt])||Ew(tt):null):null,M.createElement("div",{"data-content":"",className:vt(A==null?void 0:A.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},M.createElement("div",{"data-title":"",className:vt(A==null?void 0:A.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?M.createElement("div",{"data-description":"",className:vt(J,Iv,A==null?void 0:A.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),x.isValidElement(h.cancel)?h.cancel:h.cancel&&_s(h.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:B=>{var Z,oe;_s(h.cancel)&&ir&&((oe=(Z=h.cancel).onClick)==null||oe.call(Z,B),Jt())},className:vt(A==null?void 0:A.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,x.isValidElement(h.action)?h.action:h.action&&_s(h.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:B=>{var Z,oe;_s(h.action)&&((oe=(Z=h.action).onClick)==null||oe.call(Z,B),!B.defaultPrevented&&Jt())},className:vt(A==null?void 0:A.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function Kf(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Zw(e,t){let n={};return[e,t].forEach((r,i)=>{let s=i===1,o=s?"--mobile-offset":"--offset",a=s?Ww:Hw;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:f,duration:m,style:h,visibleToasts:v=Uw,toastOptions:w,dir:S=Kf(),gap:p=Gw,loadingIcon:g,icons:y,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:k}=e,[C,N]=M.useState([]),T=M.useMemo(()=>Array.from(new Set([r].concat(C.filter(F=>F.position).map(F=>F.position)))),[C,r]),[E,P]=M.useState([]),[z,I]=M.useState(!1),[J,le]=M.useState(!1),[pe,ne]=M.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=M.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=M.useRef(null),D=M.useRef(!1),W=M.useCallback(F=>{N(V=>{var K;return(K=V.find(U=>U.id===F.id))!=null&&K.delete||$e.dismiss(F.id),V.filter(({id:U})=>U!==F.id)})},[]);return M.useEffect(()=>$e.subscribe(F=>{if(F.dismiss){N(V=>V.map(K=>K.id===F.id?{...K,delete:!0}:K));return}setTimeout(()=>{vw.flushSync(()=>{N(V=>{let K=V.findIndex(U=>U.id===F.id);return K!==-1?[...V.slice(0,K),{...V[K],...F},...V.slice(K+1)]:[F,...V]})})})}),[]),M.useEffect(()=>{if(d!=="system"){ne(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ne("dark"):ne("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:V})=>{ne(V?"dark":"light")})}catch{F.addListener(({matches:K})=>{try{ne(K?"dark":"light")}catch(U){console.error(U)}})}},[d]),M.useEffect(()=>{C.length<=1&&I(!1)},[C]),M.useEffect(()=>{let F=V=>{var K,U;i.every(X=>V[X]||V.code===X)&&(I(!0),(K=$.current)==null||K.focus()),V.code==="Escape"&&(document.activeElement===$.current||(U=$.current)!=null&&U.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[i]),M.useEffect(()=>{if($.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,D.current=!1)}},[$.current]),M.createElement("section",{ref:t,"aria-label":`${b} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((F,V)=>{var K;let[U,X]=F.split("-");return C.length?M.createElement("ol",{key:F,dir:S==="auto"?Kf():S,tabIndex:-1,ref:$,className:a,"data-sonner-toaster":!0,"data-theme":pe,"data-y-position":U,"data-lifted":z&&C.length>1&&!s,"data-x-position":X,style:{"--front-toast-height":`${((K=E[0])==null?void 0:K.height)||0}px`,"--width":`${Kw}px`,"--gap":`${p}px`,...h,...Zw(l,c)},onBlur:O=>{D.current&&!O.currentTarget.contains(O.relatedTarget)&&(D.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||D.current||(D.current=!0,A.current=O.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{J||I(!1)},onDragEnd:()=>I(!1),onPointerDown:O=>{O.target instanceof HTMLElement&&O.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},C.filter(O=>!O.position&&V===0||O.position===F).map((O,De)=>{var Ge,Ot;return M.createElement(qw,{key:O.id,icons:y,index:De,toast:O,defaultRichColors:f,duration:(Ge=w==null?void 0:w.duration)!=null?Ge:m,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Ot=w==null?void 0:w.closeButton)!=null?Ot:o,interacting:J,position:F,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,removeToast:W,toasts:C.filter(Dn=>Dn.position==O.position),heights:E.filter(Dn=>Dn.position==O.position),setHeights:P,expandByDefault:s,gap:p,loadingIcon:g,expanded:z,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});/**
|
|
105
|
+
* @license lucide-react v0.462.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Jw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ug=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
110
|
+
* @license lucide-react v0.462.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/var eS={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"};/**
|
|
115
|
+
* @license lucide-react v0.462.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const tS=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...eS,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ug("lucide",i),...a},[...o.map(([c,d])=>x.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
|
|
120
|
+
* @license lucide-react v0.462.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const q=(e,t)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(tS,{ref:s,iconNode:t,className:Ug(`lucide-${Jw(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
125
|
+
* @license lucide-react v0.462.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Hg=q("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
130
|
+
* @license lucide-react v0.462.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const nS=q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
135
|
+
* @license lucide-react v0.462.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const rS=q("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
|
|
140
|
+
* @license lucide-react v0.462.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const Wg=q("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
145
|
+
* @license lucide-react v0.462.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const Iu=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
150
|
+
* @license lucide-react v0.462.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const iS=q("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
155
|
+
* @license lucide-react v0.462.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const sS=q("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
160
|
+
* @license lucide-react v0.462.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Vu=q("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
|
165
|
+
* @license lucide-react v0.462.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const oS=q("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
|
|
170
|
+
* @license lucide-react v0.462.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Gf=q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
175
|
+
* @license lucide-react v0.462.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Ls=q("Medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]]);/**
|
|
180
|
+
* @license lucide-react v0.462.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const aS=q("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
185
|
+
* @license lucide-react v0.462.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const lS=q("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
|
190
|
+
* @license lucide-react v0.462.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const cS=q("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
195
|
+
* @license lucide-react v0.462.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const uS=q("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
200
|
+
* @license lucide-react v0.462.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const dS=q("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
205
|
+
* @license lucide-react v0.462.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const Kg=q("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
210
|
+
* @license lucide-react v0.462.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const fS=q("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
|
|
215
|
+
* @license lucide-react v0.462.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const tr=q("Swords",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]]);/**
|
|
220
|
+
* @license lucide-react v0.462.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Ou=q("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
|
225
|
+
* @license lucide-react v0.462.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const uc=q("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
230
|
+
* @license lucide-react v0.462.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const hS=q("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
235
|
+
* @license lucide-react v0.462.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const mS=q("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"}]]);/**
|
|
240
|
+
* @license lucide-react v0.462.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const us=q("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
|
|
245
|
+
* @license lucide-react v0.462.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const pS=q("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
|
|
250
|
+
* @license lucide-react v0.462.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const dc=q("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
255
|
+
* @license lucide-react v0.462.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const gS=q("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"}]]);/**
|
|
260
|
+
* @license lucide-react v0.462.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Gg=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
265
|
+
* @license lucide-react v0.462.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Fu=q("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function yS({onEnter:e}){const[t,n]=x.useState([]),r=[{text:"$ fightbook init",delay:0},{text:"initializing AI combat arena...",delay:300},{text:"loading skills.md parser...",delay:600},{text:"connecting to fight engine...",delay:900},{text:"ready.",delay:1200},{text:"",delay:1400},{text:"# Welcome to FightBook",delay:1500,color:"text-orange-500"},{text:"# Configure agents with skills.md",delay:1700},{text:"# Watch them fight in real-time",delay:1900}];return x.useEffect(()=>{r.forEach(i=>{setTimeout(()=>{n(s=>[...s,i.text])},i.delay)})},[]),u.jsxs("div",{className:"min-h-screen bg-black flex flex-col",children:[u.jsx("div",{className:"flex-1 flex items-center justify-center px-4",children:u.jsxs("div",{className:"w-full max-w-2xl",children:[u.jsxs("div",{className:"border border-zinc-800 rounded-sm overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-zinc-900 border-b border-zinc-800",children:[u.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/50"}),u.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/50"}),u.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/50"}),u.jsx("span",{className:"ml-2 text-xs text-zinc-500 font-mono",children:"fightbook — zsh"})]}),u.jsxs("div",{className:"p-6 font-mono text-sm min-h-[300px]",children:[t.map((i,s)=>{const o=r[s],a=i.startsWith("$"),l=i.startsWith("#");return u.jsxs("div",{className:`mb-1 ${a?"text-zinc-300":l?(o==null?void 0:o.color)||"text-zinc-500":"text-zinc-400"}`,children:[i,s===t.length-1&&s<r.length-1&&u.jsx("span",{className:"animate-pulse",children:"_"})]},s)}),t.length>=r.length&&u.jsx("div",{className:"mt-6 animate-fade-in",children:u.jsxs("button",{onClick:e,className:"inline-flex items-center gap-2 text-orange-500 hover:text-orange-400 transition-colors group",children:[u.jsx("span",{className:"text-zinc-500",children:"$"}),u.jsx("span",{children:"enter-arena"}),u.jsx(nS,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})})]})]}),t.length>=r.length&&u.jsxs("div",{className:"mt-8 animate-slide-up",children:[u.jsx("div",{className:"text-xs text-zinc-600 mb-3 uppercase tracking-wider",children:"Example skills.md"}),u.jsx("div",{className:"border border-zinc-800 rounded-sm p-4 font-mono text-xs text-zinc-500",children:u.jsx("pre",{children:`name: "Knockout King"
|
|
270
|
+
nickname: "The Destroyer"
|
|
271
|
+
|
|
272
|
+
striking: 85
|
|
273
|
+
wrestling: 40
|
|
274
|
+
submissions: 30
|
|
275
|
+
cardio: 70
|
|
276
|
+
chin: 75
|
|
277
|
+
aggression: 0.85`})})]})]})}),u.jsx("footer",{className:"border-t border-zinc-800 px-4 py-4",children:u.jsxs("div",{className:"max-w-2xl mx-auto flex items-center justify-between text-xs text-zinc-600",children:[u.jsx("div",{children:"fightbook v1.0"}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("a",{href:"https://x.com/fightbookxyz",target:"_blank",rel:"noopener",children:"@fightbookxyz"}),u.jsx("span",{children:"skills.md powered"})]})]})})]})}const $u=x.createContext({});function Bu(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yg=typeof window<"u",Xg=Yg?x.useLayoutEffect:x.useEffect,aa=x.createContext(null);function Uu(e,t){e.indexOf(t)===-1&&e.push(t)}function Do(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const It=(e,t,n)=>n>t?t:n<e?e:n;let la=()=>{},Gr=()=>{};const qt={},Qg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qg(e){return typeof e=="object"&&e!==null}const Zg=e=>/^0[^.\s]+$/u.test(e);function Jg(e){let t;return()=>(t===void 0&&(t=e()),t)}const at=e=>e,vS=(e,t)=>n=>t(e(n)),ds=(...e)=>e.reduce(vS),Ji=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Hu{constructor(){this.subscriptions=[]}add(t){return Uu(this.subscriptions,t),()=>Do(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const lt=e=>e*1e3,st=e=>e/1e3;function e0(e,t){return t?e*(1e3/t):0}const t0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,xS=1e-7,wS=12;function SS(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=t0(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>xS&&++a<wS);return o}function fs(e,t,n,r){if(e===t&&n===r)return at;const i=s=>SS(s,0,1,e,n);return s=>s===0||s===1?s:t0(i(s),t,r)}const n0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,r0=e=>t=>1-e(1-t),i0=fs(.33,1.53,.69,.99),Wu=r0(i0),s0=n0(Wu),o0=e=>(e*=2)<1?.5*Wu(e):.5*(2-Math.pow(2,-10*(e-1))),Ku=e=>1-Math.sin(Math.acos(e)),a0=r0(Ku),l0=n0(Ku),bS=fs(.42,0,1,1),kS=fs(0,0,.58,1),c0=fs(.42,0,.58,1),CS=e=>Array.isArray(e)&&typeof e[0]!="number",u0=e=>Array.isArray(e)&&typeof e[0]=="number",Yf={linear:at,easeIn:bS,easeInOut:c0,easeOut:kS,circIn:Ku,circInOut:l0,circOut:a0,backIn:Wu,backInOut:s0,backOut:i0,anticipate:o0},TS=e=>typeof e=="string",Xf=e=>{if(u0(e)){Gr(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return fs(t,n,r,i)}else if(TS(e))return Gr(Yf[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Yf[e];return e},zs=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Qf={value:null,addProjectionMetrics:null};function NS(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(f){o.has(f)&&(d.schedule(f),e()),l++,f(a)}const d={schedule:(f,m=!1,h=!1)=>{const w=h&&i?n:r;return m&&o.add(f),w.has(f)||w.add(f),f},cancel:f=>{r.delete(f),o.delete(f)},process:f=>{if(a=f,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&Qf.value&&Qf.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(f))}};return d}const ES=40;function d0(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=zs.reduce((y,b)=>(y[b]=NS(s,t?b:void 0),y),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:f,preRender:m,render:h,postRender:v}=o,w=()=>{const y=qt.useManualTiming?i.timestamp:performance.now();n=!1,qt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,ES),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),f.process(i),m.process(i),h.process(i),v.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(w))},S=()=>{n=!0,r=!0,i.isProcessing||e(w)};return{schedule:zs.reduce((y,b)=>{const k=o[b];return y[b]=(C,N=!1,T=!1)=>(n||S(),k.schedule(C,N,T)),y},{}),cancel:y=>{for(let b=0;b<zs.length;b++)o[zs[b]].cancel(y)},state:i,steps:o}}const{schedule:te,cancel:En,state:Te,steps:Xa}=d0(typeof requestAnimationFrame<"u"?requestAnimationFrame:at,!0);let eo;function PS(){eo=void 0}const Le={now:()=>(eo===void 0&&Le.set(Te.isProcessing||qt.useManualTiming?Te.timestamp:performance.now()),eo),set:e=>{eo=e,queueMicrotask(PS)}},f0=e=>t=>typeof t=="string"&&t.startsWith(e),h0=f0("--"),jS=f0("var(--"),Gu=e=>jS(e)?AS.test(e.split("/*")[0].trim()):!1,AS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qf(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Jr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},es={...Jr,transform:e=>It(0,1,e)},Is={...Jr,default:1},Ri=e=>Math.round(e*1e5)/1e5,Yu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function RS(e){return e==null}const MS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xu=(e,t)=>n=>!!(typeof n=="string"&&MS.test(n)&&n.startsWith(e)||t&&!RS(n)&&Object.prototype.hasOwnProperty.call(n,t)),m0=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Yu);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},DS=e=>It(0,255,e),Qa={...Jr,transform:e=>Math.round(DS(e))},Wn={test:Xu("rgb","red"),parse:m0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Qa.transform(e)+", "+Qa.transform(t)+", "+Qa.transform(n)+", "+Ri(es.transform(r))+")"};function _S(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const fc={test:Xu("#"),parse:_S,transform:Wn.transform},hs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ln=hs("deg"),zt=hs("%"),L=hs("px"),LS=hs("vh"),zS=hs("vw"),Zf={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},br={test:Xu("hsl","hue"),parse:m0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(Ri(t))+", "+zt.transform(Ri(n))+", "+Ri(es.transform(r))+")"},ye={test:e=>Wn.test(e)||fc.test(e)||br.test(e),parse:e=>Wn.test(e)?Wn.parse(e):br.test(e)?br.parse(e):fc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wn.transform(e):br.transform(e),getAnimatableNone:e=>{const t=ye.parse(e);return t.alpha=0,ye.transform(t)}},IS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function VS(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Yu))==null?void 0:t.length)||0)+(((n=e.match(IS))==null?void 0:n.length)||0)>0}const p0="number",g0="color",OS="var",FS="var(",Jf="${}",$S=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ts(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace($S,l=>(ye.test(l)?(r.color.push(s),i.push(g0),n.push(ye.parse(l))):l.startsWith(FS)?(r.var.push(s),i.push(OS),n.push(l)):(r.number.push(s),i.push(p0),n.push(parseFloat(l))),++s,Jf)).split(Jf);return{values:n,split:a,indexes:r,types:i}}function y0(e){return ts(e).values}function v0(e){const{split:t,types:n}=ts(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===p0?s+=Ri(i[o]):a===g0?s+=ye.transform(i[o]):s+=i[o]}return s}}const BS=e=>typeof e=="number"?0:ye.test(e)?ye.getAnimatableNone(e):e;function US(e){const t=y0(e);return v0(e)(t.map(BS))}const Nt={test:VS,parse:y0,createTransformer:v0,getAnimatableNone:US};function qa(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 HS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=qa(l,a,e+1/3),s=qa(l,a,e),o=qa(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function _o(e,t){return n=>n>0?t:e}const de=(e,t,n)=>e+(t-e)*n,Za=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},WS=[fc,Wn,br],KS=e=>WS.find(t=>t.test(e));function eh(e){const t=KS(e);if(la(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===br&&(n=HS(n)),n}const th=(e,t)=>{const n=eh(e),r=eh(t);if(!n||!r)return _o(e,t);const i={...n};return s=>(i.red=Za(n.red,r.red,s),i.green=Za(n.green,r.green,s),i.blue=Za(n.blue,r.blue,s),i.alpha=de(n.alpha,r.alpha,s),Wn.transform(i))},hc=new Set(["none","hidden"]);function GS(e,t){return hc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function YS(e,t){return n=>de(e,t,n)}function Qu(e){return typeof e=="number"?YS:typeof e=="string"?Gu(e)?_o:ye.test(e)?th:qS:Array.isArray(e)?x0:typeof e=="object"?ye.test(e)?th:XS:_o}function x0(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Qu(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function XS(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qu(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function QS(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const qS=(e,t)=>{const n=Nt.createTransformer(t),r=ts(e),i=ts(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?hc.has(e)&&!i.values.length||hc.has(t)&&!r.values.length?GS(e,t):ds(x0(QS(r,i),i.values),n):(la(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),_o(e,t))};function w0(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?de(e,t,n):Qu(e)(e,t)}const ZS=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>te.update(t,n),stop:()=>En(t),now:()=>Te.isProcessing?Te.timestamp:Le.now()}},S0=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Lo=2e4;function qu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Lo;)t+=n,r=e.next(t);return t>=Lo?1/0:t}function JS(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(qu(r),Lo);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:st(i)}}const eb=5;function b0(e,t,n){const r=Math.max(t-eb,0);return e0(n-e(r),t-r)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ja=.001;function tb({duration:e=ce.duration,bounce:t=ce.bounce,velocity:n=ce.velocity,mass:r=ce.mass}){let i,s;la(e<=lt(ce.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=It(ce.minDamping,ce.maxDamping,o),e=It(ce.minDuration,ce.maxDuration,st(e)),o<1?(i=c=>{const d=c*o,f=d*e,m=d-n,h=mc(c,o),v=Math.exp(-f);return Ja-m/h*v},s=c=>{const f=c*o*e,m=f*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,v=Math.exp(-f),w=mc(Math.pow(c,2),o);return(-i(c)+Ja>0?-1:1)*((m-h)*v)/w}):(i=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-Ja+d*f},s=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=rb(i,s,a);if(e=lt(e),isNaN(l))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const nb=12;function rb(e,t,n){let r=n;for(let i=1;i<nb;i++)r=r-e(r)/t(r);return r}function mc(e,t){return e*Math.sqrt(1-t*t)}const ib=["duration","bounce"],sb=["stiffness","damping","mass"];function nh(e,t){return t.some(n=>e[n]!==void 0)}function ob(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!nh(e,sb)&&nh(e,ib))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*It(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ce.mass,stiffness:i,damping:s}}else{const n=tb(e);t={...t,...n,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function zo(e=ce.visualDuration,t=ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:f,velocity:m,isResolvedFromDuration:h}=ob({...n,velocity:-st(n.velocity||0)}),v=m||0,w=c/(2*Math.sqrt(l*d)),S=o-s,p=st(Math.sqrt(l/d)),g=Math.abs(S)<5;r||(r=g?ce.restSpeed.granular:ce.restSpeed.default),i||(i=g?ce.restDelta.granular:ce.restDelta.default);let y;if(w<1){const k=mc(p,w);y=C=>{const N=Math.exp(-w*p*C);return o-N*((v+w*p*S)/k*Math.sin(k*C)+S*Math.cos(k*C))}}else if(w===1)y=k=>o-Math.exp(-p*k)*(S+(v+p*S)*k);else{const k=p*Math.sqrt(w*w-1);y=C=>{const N=Math.exp(-w*p*C),T=Math.min(k*C,300);return o-N*((v+w*p*S)*Math.sinh(T)+k*S*Math.cosh(T))/k}}const b={calculatedDuration:h&&f||null,next:k=>{const C=y(k);if(h)a.done=k>=f;else{let N=k===0?v:0;w<1&&(N=k===0?lt(v):b0(y,k,C));const T=Math.abs(N)<=r,E=Math.abs(o-C)<=i;a.done=T&&E}return a.value=a.done?o:C,a},toString:()=>{const k=Math.min(qu(b),Lo),C=S0(N=>b.next(k*N).value,k,30);return k+"ms "+C},toTransition:()=>{}};return b}zo.applyToOptions=e=>{const t=JS(e,100,zo);return e.ease=t.ease,e.duration=lt(t.duration),e.type="keyframes",e};function pc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,v=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let w=n*t;const S=f+w,p=o===void 0?S:o(S);p!==S&&(w=p-f);const g=T=>-w*Math.exp(-T/r),y=T=>p+g(T),b=T=>{const E=g(T),P=y(T);m.done=Math.abs(E)<=c,m.value=m.done?p:P};let k,C;const N=T=>{h(m.value)&&(k=T,C=zo({keyframes:[m.value,v(m.value)],velocity:b0(y,T,m.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return N(0),{calculatedDuration:null,next:T=>{let E=!1;return!C&&k===void 0&&(E=!0,b(T),N(T)),k!==void 0&&T>=k?C.next(T-k):(!E&&b(T),m)}}}function ab(e,t,n){const r=[],i=n||qt.mix||w0,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||at:t;a=ds(l,a)}r.push(a)}return r}function lb(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Gr(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=ab(t,r,i),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const m=Ji(e[f],e[f+1],d);return a[f](m)};return n?d=>c(It(e[0],e[s-1],d)):c}function cb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ji(0,t,r);e.push(de(n,1,i))}}function ub(e){const t=[0];return cb(t,e.length-1),t}function db(e,t){return e.map(n=>n*t)}function fb(e,t){return e.map(()=>t||c0).splice(0,e.length-1)}function Mi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=CS(r)?r.map(Xf):Xf(r),s={done:!1,value:t[0]},o=db(n&&n.length===t.length?n:ub(t),e),a=lb(o,t,{ease:Array.isArray(i)?i:fb(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const hb=e=>e!==null;function Zu(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(hb),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const mb={decay:pc,inertia:pc,tween:Mi,keyframes:Mi,spring:zo};function k0(e){typeof e.type=="string"&&(e.type=mb[e.type])}class Ju{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const pb=e=>e/100;class ed extends Ju{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;k0(t);const{type:n=Mi,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Mi;l!==Mi&&typeof a[0]!="number"&&(this.mixKeyframes=ds(pb,w0(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=qu(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:h,type:v,onUpdate:w,finalKeyframe:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,b=r;if(f){const T=Math.min(this.currentTime,i)/a;let E=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(m==="reverse"?(P=1-P,h&&(P-=h/a)):m==="mirror"&&(b=o)),y=It(0,1,P)*a}const k=g?{done:!1,value:d[0]}:b.next(y);s&&(k.value=s(k.value));let{done:C}=k;!g&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return N&&v!==pc&&(k.value=Zu(d,this.options,S,this.speed)),w&&w(k.value),N&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return st(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+st(t)}get time(){return st(this.currentTime)}set time(t){var n;t=lt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=st(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=ZS,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function gb(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Kn=e=>e*180/Math.PI,gc=e=>{const t=Kn(Math.atan2(e[1],e[0]));return yc(t)},yb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gc,rotateZ:gc,skewX:e=>Kn(Math.atan(e[1])),skewY:e=>Kn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},yc=e=>(e=e%360,e<0&&(e+=360),e),rh=gc,ih=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),sh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ih,scaleY:sh,scale:e=>(ih(e)+sh(e))/2,rotateX:e=>yc(Kn(Math.atan2(e[6],e[5]))),rotateY:e=>yc(Kn(Math.atan2(-e[2],e[0]))),rotateZ:rh,rotate:rh,skewX:e=>Kn(Math.atan(e[4])),skewY:e=>Kn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vc(e){return e.includes("scale")?1:0}function xc(e,t){if(!e||e==="none")return vc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=vb,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=yb,i=a}if(!i)return vc(t);const s=r[t],o=i[1].split(",").map(wb);return typeof s=="function"?s(o):o[s]}const xb=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xc(n,t)};function wb(e){return parseFloat(e.trim())}const ei=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ti=new Set(ei),oh=e=>e===Jr||e===L,Sb=new Set(["x","y","z"]),bb=ei.filter(e=>!Sb.has(e));function kb(e){const t=[];return bb.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xc(t,"x"),y:(e,{transform:t})=>xc(t,"y")};gn.translateX=gn.x;gn.translateY=gn.y;const Xn=new Set;let wc=!1,Sc=!1,bc=!1;function C0(){if(Sc){const e=Array.from(Xn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=kb(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Sc=!1,wc=!1,Xn.forEach(e=>e.complete(bc)),Xn.clear()}function T0(){Xn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sc=!0)})}function Cb(){bc=!0,T0(),C0(),bc=!1}class td{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Xn.add(this),wc||(wc=!0,te.read(T0),te.resolveKeyframes(C0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}gb(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xn.delete(this)}cancel(){this.state==="scheduled"&&(Xn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Tb=e=>e.startsWith("--");function Nb(e,t,n){Tb(t)?e.style.setProperty(t,n):e.style[t]=n}const Eb={};function N0(e,t){const n=Jg(e);return()=>Eb[t]??n()}const Pb=N0(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),E0=N0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Si=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ah={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Si([0,.65,.55,1]),circOut:Si([.55,0,1,.45]),backIn:Si([.31,.01,.66,-.59]),backOut:Si([.33,1.53,.69,.99])};function P0(e,t){if(e)return typeof e=="function"?E0()?S0(e,t):"ease-out":u0(e)?Si(e):Array.isArray(e)?e.map(n=>P0(n,t)||ah.easeOut):ah[e]}function jb(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const f=P0(a,i);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(m.pseudoElement=c),e.animate(d,m)}function j0(e){return typeof e=="function"&&"applyToOptions"in e}function Ab({type:e,...t}){return j0(e)&&E0()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class A0 extends Ju{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Gr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Ab(t);this.animation=jb(n,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=Zu(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(d):Nb(n,r,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return st(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+st(t)}get time(){return st(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=lt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Pb()?(this.animation.timeline=t,at):n(this)}}const R0={anticipate:o0,backInOut:s0,circInOut:l0};function Rb(e){return e in R0}function Mb(e){typeof e.ease=="string"&&Rb(e.ease)&&(e.ease=R0[e.ease])}const el=10;class Db extends A0{constructor(t){Mb(t),k0(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ed({...o,autoplay:!1}),l=Math.max(el,Le.now()-this.startTime),c=It(0,el,l-el);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const lh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Nt.test(e)||e==="0")&&!e.startsWith("url("));function _b(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Lb(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=lh(i,t),a=lh(s,t);return la(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:_b(e)||(n==="spring"||j0(n))&&r}function kc(e){e.duration=0,e.type="keyframes"}const zb=new Set(["opacity","clipPath","filter","transform"]),Ib=Jg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Vb(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Ib()&&n&&zb.has(n)&&(n!=="transform"||!c)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const Ob=40;class Fb extends Ju{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:d,...f}){var v;super(),this.stop=()=>{var w,S;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(S=this.keyframeResolver)==null||S.cancel()},this.createdAt=Le.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:d,...f},h=(d==null?void 0:d.KeyframeResolver)||td;this.keyframeResolver=new h(a,(w,S,p)=>this.onKeyframesResolved(w,S,m,!p),l,c,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,i){var S,p;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Le.now(),Lb(t,s,o,a)||((qt.instantAnimations||!l)&&(d==null||d(Zu(t,r,n))),t[0]=t[t.length-1],kc(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Ob?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!c&&Vb(m),v=(p=(S=m.motionValue)==null?void 0:S.owner)==null?void 0:p.current,w=h?new Db({...m,element:v}):new ed(m);w.finished.then(()=>{this.notifyFinished()}).catch(at),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Cb()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function M0(e,t,n,r=0,i=1){const s=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}const $b=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bb(e){const t=$b.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const Ub=4;function D0(e,t,n=1){Gr(n<=Ub,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=Bb(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Qg(o)?parseFloat(o):o}return Gu(i)?D0(i,t,n+1):i}const Hb={type:"spring",stiffness:500,damping:25,restSpeed:10},Wb=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kb={type:"keyframes",duration:.8},Gb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yb=(e,{keyframes:t})=>t.length>2?Kb:ti.has(e)?e.startsWith("scale")?Wb(t[1]):Hb:Gb,Xb=e=>e!==null;function Qb(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Xb),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}function _0(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function nd(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_0(n,e):n}function qb({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const rd=(e,t,n,r={},i,s)=>o=>{const a=nd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-lt(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};qb(a)||Object.assign(d,Yb(e,d)),d.duration&&(d.duration=lt(d.duration)),d.repeatDelay&&(d.repeatDelay=lt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(kc(d),d.delay===0&&(f=!0)),(qt.instantAnimations||qt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(f=!0,kc(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){const m=Qb(d.keyframes,a);if(m!==void 0){te.update(()=>{d.onUpdate(m),d.onComplete()});return}}return a.isSync?new ed(d):new Fb(d)};function ch(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function id(e,t,n,r){if(typeof t=="function"){const[i,s]=ch(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=ch(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function _r(e,t,n){const r=e.getProps();return id(r,t,n!==void 0?n:r.custom,e)}const L0=new Set(["width","height","top","left","right","bottom",...ei]),uh=30,Zb=e=>!isNaN(parseFloat(e));class Jb{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=Le.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Zb(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Hu);const r=this.events[t].add(n);return t==="change"?()=>{r(),te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>uh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,uh);return e0(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Yr(e,t){return new Jb(e,t)}const Cc=e=>Array.isArray(e);function ek(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yr(n))}function tk(e){return Cc(e)?e[e.length-1]||0:e}function nk(e,t){const n=_r(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=tk(s[o]);ek(e,o,a)}}const Re=e=>!!(e&&e.getVelocity);function rk(e){return!!(Re(e)&&e.add)}function Tc(e,t){const n=e.getValue("willChange");if(rk(n))return n.add(t);if(!n&&qt.WillChange){const r=new qt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function sd(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ik="framerAppearId",z0="data-"+sd(ik);function I0(e){return e.props[z0]}function sk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function V0(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();s=s?_0(s,l):l;const c=s==null?void 0:s.reduceMotion;r&&(s=r);const d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const m in a){const h=e.getValue(m,e.latestValues[m]??null),v=a[m];if(v===void 0||f&&sk(f,m))continue;const w={delay:n,...nd(s||{},m)},S=h.get();if(S!==void 0&&!h.isAnimating&&!Array.isArray(v)&&v===S&&!w.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const b=I0(e);if(b){const k=window.MotionHandoffAnimation(b,m,te);k!==null&&(w.startTime=k,p=!0)}}Tc(e,m);const g=c??e.shouldReduceMotion;h.start(rd(m,h,v,g&&L0.has(m)?{type:!1}:w,e,p));const y=h.animation;y&&d.push(y)}if(o){const m=()=>te.update(()=>{o&&nk(e,o)});d.length?Promise.all(d).then(m):m()}return d}function Nc(e,t,n={}){var l;const r=_r(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(V0(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:m}=i;return ok(e,t,c,d,f,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,d]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function ok(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Nc(l,t,{...o,delay:n+(typeof r=="function"?0:r)+M0(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function ak(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Nc(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Nc(e,t,n);else{const i=typeof t=="function"?_r(e,t,n.custom):t;r=Promise.all(V0(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const lk={test:e=>e==="auto",parse:e=>e},O0=e=>t=>t.test(e),F0=[Jr,L,zt,ln,zS,LS,lk],dh=e=>F0.find(O0(e));function ck(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zg(e):!0}const uk=new Set(["brightness","contrast","saturate","opacity"]);function dk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Yu)||[];if(!r)return e;const i=n.replace(r,"");let s=uk.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const fk=/\b([a-z-]*)\(.*?\)/gu,Ec={...Nt,getAnimatableNone:e=>{const t=e.match(fk);return t?t.map(dk).join(" "):e}},Pc={...Nt,getAnimatableNone:e=>{const t=Nt.parse(e);return Nt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},fh={...Jr,transform:Math.round},hk={rotate:ln,rotateX:ln,rotateY:ln,rotateZ:ln,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:ln,skewX:ln,skewY:ln,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:es,originX:Zf,originY:Zf,originZ:L},od={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,...hk,zIndex:fh,fillOpacity:es,strokeOpacity:es,numOctaves:fh},mk={...od,color:ye,backgroundColor:ye,outlineColor:ye,fill:ye,stroke:ye,borderColor:ye,borderTopColor:ye,borderRightColor:ye,borderBottomColor:ye,borderLeftColor:ye,filter:Ec,WebkitFilter:Ec,mask:Pc,WebkitMask:Pc},$0=e=>mk[e],pk=new Set([Ec,Pc]);function B0(e,t){let n=$0(e);return pk.has(n)||(n=Nt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gk=new Set(["auto","none","0"]);function yk(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!gk.has(s)&&ts(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=B0(n,i)}class vk extends td{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),Gu(f))){const m=D0(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!L0.has(r)||t.length!==2)return;const[i,s]=t,o=dh(i),a=dh(s),l=qf(i),c=qf(s);if(l!==c&&gn[r]){this.needsMeasurement=!0;return}if(o!==a)if(oh(o)&&oh(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else gn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||ck(t[i]))&&r.push(i);r.length&&yk(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=gn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const xk=new Set(["opacity","clipPath","filter","transform"]);function U0(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const H0=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jc(e){return qg(e)&&"offsetHeight"in e}const{schedule:ad,cancel:XE}=d0(queueMicrotask,!1),wt={x:!1,y:!1};function W0(){return wt.x||wt.y}function wk(e){return e==="x"||e==="y"?wt[e]?null:(wt[e]=!0,()=>{wt[e]=!1}):wt.x||wt.y?null:(wt.x=wt.y=!0,()=>{wt.x=wt.y=!1})}function K0(e,t){const n=U0(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Sk(e){return!(e.pointerType==="touch"||W0())}function bk(e,t,n={}){const[r,i,s]=K0(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const d=()=>{o.removeEventListener("pointerleave",v)},f=S=>{c&&(c(S),c=void 0),d()},m=S=>{a=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),l&&(l=!1,f(S))},h=()=>{a=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},v=S=>{if(S.pointerType!=="touch"){if(a){l=!0;return}f(S)}},w=S=>{if(!Sk(S))return;l=!1;const p=t(o,S);typeof p=="function"&&(c=p,o.addEventListener("pointerleave",v,i))};o.addEventListener("pointerenter",w,i),o.addEventListener("pointerdown",h,i)}),s}const G0=(e,t)=>t?e===t?!0:G0(e,t.parentElement):!1,ld=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,kk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ck(e){return kk.has(e.tagName)||e.isContentEditable===!0}const Tk=new Set(["INPUT","SELECT","TEXTAREA"]);function Nk(e){return Tk.has(e.tagName)||e.isContentEditable===!0}const to=new WeakSet;function hh(e){return t=>{t.key==="Enter"&&e(t)}}function tl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ek=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=hh(()=>{if(to.has(n))return;tl(n,"down");const i=hh(()=>{tl(n,"up")}),s=()=>tl(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function mh(e){return ld(e)&&!W0()}const ph=new WeakSet;function Pk(e,t,n={}){const[r,i,s]=K0(e,n),o=a=>{const l=a.currentTarget;if(!mh(a)||ph.has(a))return;to.add(l),n.stopPropagation&&ph.add(a);const c=t(l,a),d=(h,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),to.has(l)&&to.delete(l),mh(h)&&typeof c=="function"&&c(h,{success:v})},f=h=>{d(h,l===window||l===document||n.useGlobalTarget||G0(l,h.target))},m=h=>{d(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),jc(a)&&(a.addEventListener("focus",c=>Ek(c,i)),!Ck(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function cd(e){return qg(e)&&"ownerSVGElement"in e}const no=new WeakMap;let cn;const Y0=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:cd(r)&&"getBBox"in r?r.getBBox()[t]:r[n],jk=Y0("inline","width","offsetWidth"),Ak=Y0("block","height","offsetHeight");function Rk({target:e,borderBoxSize:t}){var n;(n=no.get(e))==null||n.forEach(r=>{r(e,{get width(){return jk(e,t)},get height(){return Ak(e,t)}})})}function Mk(e){e.forEach(Rk)}function Dk(){typeof ResizeObserver>"u"||(cn=new ResizeObserver(Mk))}function _k(e,t){cn||Dk();const n=U0(e);return n.forEach(r=>{let i=no.get(r);i||(i=new Set,no.set(r,i)),i.add(t),cn==null||cn.observe(r)}),()=>{n.forEach(r=>{const i=no.get(r);i==null||i.delete(t),i!=null&&i.size||cn==null||cn.unobserve(r)})}}const ro=new Set;let kr;function Lk(){kr=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ro.forEach(t=>t(e))},window.addEventListener("resize",kr)}function zk(e){return ro.add(e),kr||Lk(),()=>{ro.delete(e),!ro.size&&typeof kr=="function"&&(window.removeEventListener("resize",kr),kr=void 0)}}function gh(e,t){return typeof e=="function"?zk(e):_k(e,t)}function Ik(e){return cd(e)&&e.tagName==="svg"}const Vk=[...F0,ye,Nt],Ok=e=>Vk.find(O0(e)),yh=()=>({translate:0,scale:1,origin:0,originPoint:0}),Cr=()=>({x:yh(),y:yh()}),vh=()=>({min:0,max:0}),xe=()=>({x:vh(),y:vh()}),Fk=new WeakMap;function ca(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ns(e){return typeof e=="string"||Array.isArray(e)}const ud=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dd=["initial",...ud];function ua(e){return ca(e.animate)||dd.some(t=>ns(e[t]))}function X0(e){return!!(ua(e)||e.variants)}function $k(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Re(i))e.addValue(r,i);else if(Re(s))e.addValue(r,Yr(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Yr(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ac={current:null},Q0={current:!1},Bk=typeof window<"u";function Uk(){if(Q0.current=!0,!!Bk)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ac.current=e.matches;e.addEventListener("change",t),t()}else Ac.current=!1}const xh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Io={};function q0(e){Io=e}function Hk(){return Io}class Wk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=td,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Le.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,te.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=ua(n),this.isVariantNode=X0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in m){const v=m[h];c[h]!==void 0&&Re(v)&&v.set(c[h])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,Fk.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((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Q0.current||Uk(),this.shouldReduceMotion=Ac.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),En(this.notifyUpdate),En(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&xk.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:d}=n.accelerate,f=new A0({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:lt(d)}),m=o(f);this.valueSubscriptions.set(t,()=>{m(),f.cancel()});return}const r=ti.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Io){const n=Io[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}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<xh.length;r++){const i=xh[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=$k(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),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}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Qg(r)||Zg(r))?r=parseFloat(r):!Ok(r)&&Nt.test(n)&&(r=B0(t,n)),this.setBaseTarget(t,Re(r)?r.get():r)),Re(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=id(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Re(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Hu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ad.render(this.render)}}class Z0 extends Wk{constructor(){super(...arguments),this.KeyframeResolver=vk}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Re(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Mn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function J0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Kk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gk(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 nl(e){return e===void 0||e===1}function Rc({scale:e,scaleX:t,scaleY:n}){return!nl(e)||!nl(t)||!nl(n)}function On(e){return Rc(e)||ey(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ey(e){return wh(e.x)||wh(e.y)}function wh(e){return e&&e!=="0%"}function Vo(e,t,n){const r=e-n,i=t*r;return n+i}function Sh(e,t,n,r,i){return i!==void 0&&(e=Vo(e,i,r)),Vo(e,n,r)+t}function Mc(e,t=0,n=1,r,i){e.min=Sh(e.min,t,n,r,i),e.max=Sh(e.max,t,n,r,i)}function ty(e,{x:t,y:n}){Mc(e.x,t.translate,t.scale,t.originPoint),Mc(e.y,n.translate,n.scale,n.originPoint)}const bh=.999999999999,kh=1.0000000000001;function Yk(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Nr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ty(e,o)),r&&On(s.latestValues)&&Nr(e,s.latestValues))}t.x<kh&&t.x>bh&&(t.x=1),t.y<kh&&t.y>bh&&(t.y=1)}function Tr(e,t){e.min=e.min+t,e.max=e.max+t}function Ch(e,t,n,r,i=.5){const s=de(e.min,e.max,i);Mc(e,t,n,s,r)}function Nr(e,t){Ch(e.x,t.x,t.scaleX,t.scale,t.originX),Ch(e.y,t.y,t.scaleY,t.scale,t.originY)}function ny(e,t){return J0(Gk(e.getBoundingClientRect(),t))}function Xk(e,t,n){const r=ny(e,n),{scroll:i}=t;return i&&(Tr(r.x,i.offset.x),Tr(r.y,i.offset.y)),r}const Qk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qk=ei.length;function Zk(e,t,n){let r="",i=!0;for(let s=0;s<qk;s++){const o=ei[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=H0(a,od[o]);if(!l){i=!1;const d=Qk[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function fd(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(ti.has(l)){o=!0;continue}else if(h0(l)){i[l]=c;continue}else{const d=H0(c,od[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Zk(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}function ry(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function Th(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Th(e,t.target.x),r=Th(e,t.target.y);return`${n}% ${r}%`}},Jk={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Nt.parse(e);if(i.length>5)return r;const s=Nt.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=de(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}},Dc={borderRadius:{...mi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mi,borderTopRightRadius:mi,borderBottomLeftRadius:mi,borderBottomRightRadius:mi,boxShadow:Jk};function iy(e,{layout:t,layoutId:n}){return ti.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Dc[e]||e==="opacity")}function hd(e,t,n){var o;const r=e.style,i=t==null?void 0:t.style,s={};if(!r)return s;for(const a in r)(Re(r[a])||i&&Re(i[a])||iy(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function eC(e){return window.getComputedStyle(e)}class tC extends Z0{constructor(){super(...arguments),this.type="html",this.renderInstance=ry}readValueFromInstance(t,n){var r;if(ti.has(n))return(r=this.projection)!=null&&r.isProjecting?vc(n):xb(t,n);{const i=eC(t),s=(h0(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ny(t,n)}build(t,n,r){fd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hd(t,n,r)}}const nC={offset:"stroke-dashoffset",array:"stroke-dasharray"},rC={offset:"strokeDashoffset",array:"strokeDasharray"};function iC(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?nC:rC;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const sC=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function sy(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,d){if(fd(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const h of sC)f[h]!==void 0&&(m[h]=f[h],delete f[h]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&iC(f,i,s,o,!1)}const oy=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"]),ay=e=>typeof e=="string"&&e.toLowerCase()==="svg";function oC(e,t,n,r){ry(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(oy.has(i)?i:sd(i),t.attrs[i])}function ly(e,t,n){const r=hd(e,t,n);for(const i in e)if(Re(e[i])||Re(t[i])){const s=ei.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class aC extends Z0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ti.has(n)){const r=$0(n);return r&&r.default||0}return n=oy.has(n)?n:sd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ly(t,n,r)}build(t,n,r){sy(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){oC(t,n,r,i)}mount(t){this.isSVGTag=ay(t.tagName),super.mount(t)}}const lC=dd.length;function cy(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?cy(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<lC;n++){const r=dd[n],i=e.props[r];(ns(i)||i===!1)&&(t[r]=i)}return t}function uy(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}const cC=[...ud].reverse(),uC=ud.length;function dC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>ak(e,n,r)))}function fC(e){let t=dC(e),n=Nh(),r=!0;const i=l=>(c,d)=>{var m;const f=_r(e,d,l==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:h,transitionEnd:v,...w}=f;c={...c,...w,...v}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=cy(e.parent)||{},f=[],m=new Set;let h={},v=1/0;for(let S=0;S<uC;S++){const p=cC[S],g=n[p],y=c[p]!==void 0?c[p]:d[p],b=ns(y),k=p===l?g.isActive:null;k===!1&&(v=S);let C=y===d[p]&&y!==c[p]&&b;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&k===null||!y&&!g.prevProp||ca(y)||typeof y=="boolean")continue;if(p==="exit"&&g.isActive&&k!==!0){g.prevResolvedValues&&(h={...h,...g.prevResolvedValues});continue}const N=hC(g.prevProp,y);let T=N||p===l&&g.isActive&&!C&&b||S>v&&b,E=!1;const P=Array.isArray(y)?y:[y];let z=P.reduce(i(p),{});k===!1&&(z={});const{prevResolvedValues:I={}}=g,J={...I,...z},le=$=>{T=!0,m.has($)&&(E=!0,m.delete($)),g.needsAnimating[$]=!0;const j=e.getValue($);j&&(j.liveStyle=!1)};for(const $ in J){const j=z[$],A=I[$];if(h.hasOwnProperty($))continue;let D=!1;Cc(j)&&Cc(A)?D=!uy(j,A):D=j!==A,D?j!=null?le($):m.add($):j!==void 0&&m.has($)?le($):g.protectedKeys[$]=!0}g.prevProp=y,g.prevResolvedValues=z,g.isActive&&(h={...h,...z}),r&&e.blockInitialAnimation&&(T=!1);const pe=C&&N;T&&(!pe||E)&&f.push(...P.map($=>{const j={type:p};if(typeof $=="string"&&r&&!pe&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,D=_r(A,$);if(A.enteringChildren&&D){const{delayChildren:W}=D.transition||{};j.delay=M0(A.enteringChildren,e,W)}}return{animation:$,options:j}}))}if(m.size){const S={};if(typeof c.initial!="boolean"){const p=_r(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(S.transition=p.transition)}m.forEach(p=>{const g=e.getBaseTarget(p),y=e.getValue(p);y&&(y.liveStyle=!0),S[p]=g??null}),f.push({animation:S})}let w=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(m=>{var h;return(h=m.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const m in n)n[m].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Nh()}}}function hC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!uy(t,e):!1}function zn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nh(){return{animate:zn(!0),whileInView:zn(),whileHover:zn(),whileTap:zn(),whileDrag:zn(),whileFocus:zn(),exit:zn()}}function Eh(e,t){e.min=t.min,e.max=t.max}function xt(e,t){Eh(e.x,t.x),Eh(e.y,t.y)}function Ph(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const dy=1e-4,mC=1-dy,pC=1+dy,fy=.01,gC=0-fy,yC=0+fy;function ze(e){return e.max-e.min}function vC(e,t,n){return Math.abs(e-t)<=n}function jh(e,t,n,r=.5){e.origin=r,e.originPoint=de(t.min,t.max,e.origin),e.scale=ze(n)/ze(t),e.translate=de(n.min,n.max,e.origin)-e.originPoint,(e.scale>=mC&&e.scale<=pC||isNaN(e.scale))&&(e.scale=1),(e.translate>=gC&&e.translate<=yC||isNaN(e.translate))&&(e.translate=0)}function Di(e,t,n,r){jh(e.x,t.x,n.x,r?r.originX:void 0),jh(e.y,t.y,n.y,r?r.originY:void 0)}function Ah(e,t,n){e.min=n.min+t.min,e.max=e.min+ze(t)}function xC(e,t,n){Ah(e.x,t.x,n.x),Ah(e.y,t.y,n.y)}function Rh(e,t,n){e.min=t.min-n.min,e.max=e.min+ze(t)}function Oo(e,t,n){Rh(e.x,t.x,n.x),Rh(e.y,t.y,n.y)}function Mh(e,t,n,r,i){return e-=t,e=Vo(e,1/n,r),i!==void 0&&(e=Vo(e,1/i,r)),e}function wC(e,t=0,n=1,r=.5,i,s=e,o=e){if(zt.test(t)&&(t=parseFloat(t),t=de(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=de(s.min,s.max,r);e===s&&(a-=t),e.min=Mh(e.min,t,n,a,i),e.max=Mh(e.max,t,n,a,i)}function Dh(e,t,[n,r,i],s,o){wC(e,t[n],t[r],t[i],t.scale,s,o)}const SC=["x","scaleX","originX"],bC=["y","scaleY","originY"];function _h(e,t,n,r){Dh(e.x,t,SC,n?n.x:void 0,r?r.x:void 0),Dh(e.y,t,bC,n?n.y:void 0,r?r.y:void 0)}function Lh(e){return e.translate===0&&e.scale===1}function hy(e){return Lh(e.x)&&Lh(e.y)}function zh(e,t){return e.min===t.min&&e.max===t.max}function kC(e,t){return zh(e.x,t.x)&&zh(e.y,t.y)}function Ih(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function my(e,t){return Ih(e.x,t.x)&&Ih(e.y,t.y)}function Vh(e){return ze(e.x)/ze(e.y)}function Oh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Rt(e){return[e("x"),e("y")]}function CC(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:f,rotateY:m,skewX:h,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),h&&(r+=`skewX(${h}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const py=["TopLeft","TopRight","BottomLeft","BottomRight"],TC=py.length,Fh=e=>typeof e=="string"?parseFloat(e):e,$h=e=>typeof e=="number"||L.test(e);function NC(e,t,n,r,i,s){i?(e.opacity=de(0,n.opacity??1,EC(r)),e.opacityExit=de(t.opacity??1,0,PC(r))):s&&(e.opacity=de(t.opacity??1,n.opacity??1,r));for(let o=0;o<TC;o++){const a=`border${py[o]}Radius`;let l=Bh(t,a),c=Bh(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||$h(l)===$h(c)?(e[a]=Math.max(de(Fh(l),Fh(c),r),0),(zt.test(c)||zt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=de(t.rotate||0,n.rotate||0,r))}function Bh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EC=gy(0,.5,a0),PC=gy(.5,.95,at);function gy(e,t,n){return r=>r<e?0:r>t?1:n(Ji(e,t,r))}function jC(e,t,n){const r=Re(e)?e:Yr(e);return r.start(rd("",r,t,n)),r.animation}function rs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const AC=(e,t)=>e.depth-t.depth;class RC{constructor(){this.children=[],this.isDirty=!1}add(t){Uu(this.children,t),this.isDirty=!0}remove(t){Do(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AC),this.isDirty=!1,this.children.forEach(t)}}function MC(e,t){const n=Le.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(En(r),e(s-t))};return te.setup(r,!0),()=>En(r)}function io(e){return Re(e)?e.get():e}class DC{constructor(){this.members=[]}add(t){Uu(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;i&&i.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&Do(this.members,r)}t.scheduleRender()}remove(t){if(Do(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i],o=s.instance;if(s.isPresent!==!1&&(!o||o.isConnected!==!1)){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const i=r.options.layoutDependency,s=t.options.layoutDependency;if(!(i!==void 0&&s!==void 0&&i===s)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(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:a}=t.options;a===!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)}}const so={hasAnimatedSinceResize:!0,hasEverUpdated:!1},rl=["","X","Y","Z"],_C=1e3;let LC=0;function il(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=I0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&yy(r)}function vy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=LC++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(VC),this.nodes.forEach(BC),this.nodes.forEach(UC),this.nodes.forEach(OC)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,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 RC)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Hu),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){if(this.instance)return;this.isSVG=cd(o)&&!Ik(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;te.read(()=>{f=window.innerWidth}),e(o,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,d&&d(),d=MC(m,250),so.hasAnimatedSinceResize&&(so.hasAnimatedSinceResize=!1,this.nodes.forEach(Wh)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||YC,{onLayoutAnimationStart:w,onLayoutAnimationComplete:S}=c.getProps(),p=!this.targetLayout||!my(this.targetLayout,h),g=!f&&m;if(this.options.layoutRoot||this.resumeFrom||g||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...nd(v,"layout"),onPlay:w,onComplete:S};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(d,g)}else f||Wh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,this.eventHandlers.clear(),En(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(HC),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(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yy(this),!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(Uh);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hh);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach($C),this.nodes.forEach(zC),this.nodes.forEach(IC)):this.nodes.forEach(Hh),this.clearAllSnapshots();const a=Le.now();Te.delta=It(0,1e3/60,a-Te.timestamp),Te.timestamp=a,Te.isProcessing=!0,Xa.update.process(Te),Xa.preRender.process(Te),Xa.render.process(Te),Te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ad.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(FC),this.sharedNodes.forEach(WC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ze(this.snapshot.measuredBox.x)&&!ze(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=xe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!hy(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||On(this.latestValues)||d)&&(i(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)),XC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return xe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(QC))){const{scroll:d}=this.root;d&&(Tr(a.x,d.offset.x),Tr(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=xe();if(xt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:f,options:m}=d;d!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&xt(a,o),Tr(a.x,f.offset.x),Tr(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const l=xe();xt(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&&Nr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),On(d.latestValues)&&Nr(l,d.latestValues)}return On(this.latestValues)&&Nr(l,this.latestValues),l}removeTransform(o){const a=xe();xt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!On(c.latestValues))continue;Rc(c.latestValues)&&c.updateSnapshot();const d=xe(),f=c.measurePageBox();xt(d,f),_h(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return On(this.latestValues)&&_h(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!==Te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=Te.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=xe(),this.targetWithTransforms=xe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xt(this.target,this.layout.layoutBox),ty(this.target,this.targetDelta)):xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Rc(this.parent.latestValues)||ey(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xe(),this.relativeTargetOrigin=xe(),Oo(this.relativeTargetOrigin,a,l),xt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Te.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Yk(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=xe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ph(this.prevProjectionDelta.x,this.projectionDelta.x),Ph(this.prevProjectionDelta.y,this.projectionDelta.y)),Di(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Oh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Oh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Cr(),this.projectionDelta=Cr(),this.projectionDeltaWithTransform=Cr()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},f=Cr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=xe(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,w=h!==v,S=this.getStack(),p=!S||S.members.length<=1,g=!!(w&&!p&&this.options.crossfade===!0&&!this.path.some(GC));this.animationProgress=0;let y;this.mixTargetDelta=b=>{const k=b/1e3;Kh(f.x,o.x,k),Kh(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oo(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),KC(this.relativeTarget,this.relativeTargetOrigin,m,k),y&&kC(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=xe()),xt(y,this.relativeTarget)),w&&(this.animationValues=d,NC(d,c,this.latestValues,k,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(En(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{so.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Yr(0)),this.currentAnimation=jC(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},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(_C),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&&xy(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||xe();const f=ze(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const m=ze(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+m}xt(a,l),Nr(a,d),Di(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new DC),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 a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.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}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&il("z",o,c,this.animationValues);for(let d=0;d<rl.length;d++)il(`rotate${rl[d]}`,o,c,this.animationValues),il(`skew${rl[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=io(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=io(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!On(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=CC(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(d,f)),o.transform=f;const{x:m,y:h}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${h.origin*100}% 0`,c.animationValues?o.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in Dc){if(d[v]===void 0)continue;const{correct:w,applyTo:S,isCSSVariable:p}=Dc[v],g=f==="none"?d[v]:w(d[v],c);if(S){const y=S.length;for(let b=0;b<y;b++)o[S[b]]=g}else p?this.options.visualElement.renderState.vars[v]=g:o[v]=g}this.options.layoutId&&(o.pointerEvents=c===this?io(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Uh),this.root.sharedNodes.clear()}}}function zC(e){e.updateLayout()}function IC(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Rt(f=>{const m=o?t.measuredBox[f]:t.layoutBox[f],h=ze(m);m.min=r[f].min,m.max=m.min+h}):xy(s,t.layoutBox,r)&&Rt(f=>{const m=o?t.measuredBox[f]:t.layoutBox[f],h=ze(r[f]);m.max=m.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=Cr();Di(a,r,t.layoutBox);const l=Cr();o?Di(l,e.applyTransform(i,!0),t.measuredBox):Di(l,r,t.layoutBox);const c=!hy(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:h}=f;if(m&&h){const v=xe();Oo(v,t.layoutBox,m.layoutBox);const w=xe();Oo(w,r,h.layoutBox),my(v,w)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function VC(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function OC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function FC(e){e.clearSnapshot()}function Uh(e){e.clearMeasurements()}function Hh(e){e.isLayoutDirty=!1}function $C(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function BC(e){e.resolveTargetDelta()}function UC(e){e.calcProjection()}function HC(e){e.resetSkewAndRotation()}function WC(e){e.removeLeadSnapshot()}function Kh(e,t,n){e.translate=de(t.translate,0,n),e.scale=de(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gh(e,t,n,r){e.min=de(t.min,n.min,r),e.max=de(t.max,n.max,r)}function KC(e,t,n,r){Gh(e.x,t.x,n.x,r),Gh(e.y,t.y,n.y,r)}function GC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const YC={duration:.45,ease:[.4,0,.1,1]},Yh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xh=Yh("applewebkit/")&&!Yh("chrome/")?Math.round:at;function Qh(e){e.min=Xh(e.min),e.max=Xh(e.max)}function XC(e){Qh(e.x),Qh(e.y)}function xy(e,t,n){return e==="position"||e==="preserve-aspect"&&!vC(Vh(t),Vh(n),.2)}function QC(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const qC=vy({attachResizeListener:(e,t)=>rs(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),sl={current:void 0},wy=vy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sl.current){const e=new qC({});e.mount(window),e.setOptions({layoutScroll:!0}),sl.current=e}return sl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),md=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function qh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ZC(...e){return t=>{let n=!1;const r=e.map(i=>{const s=qh(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():qh(e[i],null)}}}}function JC(...e){return x.useCallback(ZC(...e),e)}class e2 extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=jc(r)&&r.offsetWidth||0,s=jc(r)&&r.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=s-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function t2({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){var m;const o=x.useId(),a=x.useRef(null),l=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=x.useContext(md),d=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),f=JC(a,d);return x.useInsertionEffect(()=>{const{width:h,height:v,top:w,left:S,right:p,bottom:g}=l.current;if(t||s===!1||!a.current||!h||!v)return;const y=n==="left"?`left: ${S}`:`right: ${p}`,b=r==="bottom"?`bottom: ${g}`:`top: ${w}`;a.current.dataset.motionPopId=o;const k=document.createElement("style");c&&(k.nonce=c);const C=i??document.head;return C.appendChild(k),k.sheet&&k.sheet.insertRule(`
|
|
278
|
+
[data-motion-pop-id="${o}"] {
|
|
279
|
+
position: absolute !important;
|
|
280
|
+
width: ${h}px !important;
|
|
281
|
+
height: ${v}px !important;
|
|
282
|
+
${y}px !important;
|
|
283
|
+
${b}px !important;
|
|
284
|
+
}
|
|
285
|
+
`),()=>{C.contains(k)&&C.removeChild(k)}},[t]),u.jsx(e2,{isPresent:t,childRef:a,sizeRef:l,pop:s,children:s===!1?e:x.cloneElement(e,{ref:f})})}const n2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:c})=>{const d=Bu(r2),f=x.useId();let m=!0,h=x.useMemo(()=>(m=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:v=>{d.set(v,!0);for(const w of d.values())if(!w)return;r&&r()},register:v=>(d.set(v,!1),()=>d.delete(v))}),[n,d,r]);return s&&m&&(h={...h}),x.useMemo(()=>{d.forEach((v,w)=>d.set(w,!1))},[n]),x.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=u.jsx(t2,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),u.jsx(aa.Provider,{value:h,children:e})};function r2(){return new Map}function Sy(e=!0){const t=x.useContext(aa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=x.useId();x.useEffect(()=>{if(e)return i(s)},[e]);const o=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Vs=e=>e.key||"";function Zh(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const Er=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[d,f]=Sy(o),m=x.useMemo(()=>Zh(e),[e]),h=o&&!d?[]:m.map(Vs),v=x.useRef(!0),w=x.useRef(m),S=Bu(()=>new Map),p=x.useRef(new Set),[g,y]=x.useState(m),[b,k]=x.useState(m);Xg(()=>{v.current=!1,w.current=m;for(let T=0;T<b.length;T++){const E=Vs(b[T]);h.includes(E)?(S.delete(E),p.current.delete(E)):S.get(E)!==!0&&S.set(E,!1)}},[b,h.length,h.join("-")]);const C=[];if(m!==g){let T=[...m];for(let E=0;E<b.length;E++){const P=b[E],z=Vs(P);h.includes(z)||(T.splice(E,0,P),C.push(P))}return s==="wait"&&C.length&&(T=C),k(Zh(T)),y(m),null}const{forceRender:N}=x.useContext($u);return u.jsx(u.Fragment,{children:b.map(T=>{const E=Vs(T),P=o&&!d?!1:m===b||h.includes(E),z=()=>{if(p.current.has(E))return;if(p.current.add(E),S.has(E))S.set(E,!0);else return;let I=!0;S.forEach(J=>{J||(I=!1)}),I&&(N==null||N(),k(w.current),o&&(f==null||f()),r&&r())};return u.jsx(n2,{isPresent:P,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:c,onExitComplete:P?void 0:z,anchorX:a,anchorY:l,children:T},E)})})},by=x.createContext({strict:!1}),Jh={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"]};let em=!1;function i2(){if(em)return;const e={};for(const t in Jh)e[t]={isEnabled:n=>Jh[t].some(r=>!!n[r])};q0(e),em=!0}function ky(){return i2(),Hk()}function s2(e){const t=ky();for(const n in e)t[n]={...t[n],...e[n]};q0(t)}const o2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Fo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||o2.has(e)}let Cy=e=>!Fo(e);function a2(e){typeof e=="function"&&(Cy=t=>t.startsWith("on")?!Fo(t):e(t))}try{a2(require("@emotion/is-prop-valid").default)}catch{}function l2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Cy(i)||n===!0&&Fo(i)||!t&&!Fo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const da=x.createContext({});function c2(e,t){if(ua(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ns(n)?n:void 0,animate:ns(r)?r:void 0}}return e.inherit!==!1?t:{}}function u2(e){const{initial:t,animate:n}=c2(e,x.useContext(da));return x.useMemo(()=>({initial:t,animate:n}),[tm(t),tm(n)])}function tm(e){return Array.isArray(e)?e.join(" "):e}const pd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ty(e,t,n){for(const r in t)!Re(t[r])&&!iy(r,n)&&(e[r]=t[r])}function d2({transformTemplate:e},t){return x.useMemo(()=>{const n=pd();return fd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function f2(e,t){const n=e.style||{},r={};return Ty(r,n,e),Object.assign(r,d2(e,t)),r}function h2(e,t){const n={},r=f2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ny=()=>({...pd(),attrs:{}});function m2(e,t,n,r){const i=x.useMemo(()=>{const s=Ny();return sy(s,t,ay(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Ty(s,e.style,e),i.style={...s,...i.style}}return i}const p2=["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 gd(e){return typeof e!="string"||e.includes("-")?!1:!!(p2.indexOf(e)>-1||/[A-Z]/u.test(e))}function g2(e,t,n,{latestValues:r},i,s=!1,o){const l=(o??gd(e)?m2:h2)(t,r,i,e),c=l2(t,typeof e=="string",s),d=e!==x.Fragment?{...c,...l,ref:n}:{},{children:f}=t,m=x.useMemo(()=>Re(f)?f.get():f,[f]);return x.createElement(e,{...d,children:m})}function y2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:v2(n,r,i,e),renderState:t()}}function v2(e,t,n,r){const i={},s=r(e,{});for(const m in s)i[m]=io(s[m]);let{initial:o,animate:a}=e;const l=ua(e),c=X0(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;if(f&&typeof f!="boolean"&&!ca(f)){const m=Array.isArray(f)?f:[f];for(let h=0;h<m.length;h++){const v=id(e,m[h]);if(v){const{transitionEnd:w,transition:S,...p}=v;for(const g in p){let y=p[g];if(Array.isArray(y)){const b=d?y.length-1:0;y=y[b]}y!==null&&(i[g]=y)}for(const g in w)i[g]=w[g]}}}return i}const Ey=e=>(t,n)=>{const r=x.useContext(da),i=x.useContext(aa),s=()=>y2(e,t,r,i);return n?s():Bu(s)},x2=Ey({scrapeMotionValuesFromProps:hd,createRenderState:pd}),w2=Ey({scrapeMotionValuesFromProps:ly,createRenderState:Ny}),S2=Symbol.for("motionComponentSymbol");function b2(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const i=x.useRef(null);return x.useCallback(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());const o=r.current;if(typeof o=="function")if(s){const l=o(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[t])}const Py=x.createContext({});function cr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k2(e,t,n,r,i,s){var y,b;const{visualElement:o}=x.useContext(da),a=x.useContext(by),l=x.useContext(aa),c=x.useContext(md),d=c.reducedMotion,f=c.skipAnimations,m=x.useRef(null),h=x.useRef(!1);r=r||a.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:s}),h.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const v=m.current,w=x.useContext(Py);v&&!v.projection&&i&&(v.type==="html"||v.type==="svg")&&C2(m.current,n,i,w);const S=x.useRef(!1);x.useInsertionEffect(()=>{v&&S.current&&v.update(n,l)});const p=n[z0],g=x.useRef(!!p&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Xg(()=>{h.current=!0,v&&(S.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),g.current&&v.animationState&&v.animationState.animateChanges())}),x.useEffect(()=>{v&&(!g.current&&v.animationState&&v.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,p)}),g.current=!1),v.enteringChildren=void 0)}),v}function C2(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:jy(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&cr(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function jy(e){if(e)return e.options.allowProjection!==!1?e.projection:jy(e.parent)}function ol(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&s2(r);const s=n?n==="svg":gd(e),o=s?w2:x2;function a(c,d){let f;const m={...x.useContext(md),...c,layoutId:T2(c)},{isStatic:h}=m,v=u2(c),w=o(c,h);if(!h&&Yg){N2();const S=E2(m);f=S.MeasureLayout,v.visualElement=k2(e,w,m,i,S.ProjectionNode,s)}return u.jsxs(da.Provider,{value:v,children:[f&&v.visualElement?u.jsx(f,{visualElement:v.visualElement,...m}):null,g2(e,c,b2(w,v.visualElement,d),w,h,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=x.forwardRef(a);return l[S2]=e,l}function T2({layoutId:e}){const t=x.useContext($u).id;return t&&e!==void 0?t+"-"+e:e}function N2(e,t){x.useContext(by).strict}function E2(e){const t=ky(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function P2(e,t){if(typeof Proxy>"u")return ol;const n=new Map,r=(s,o)=>ol(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,ol(o,void 0,e,t)),n.get(o))})}const j2=(e,t)=>t.isSVG??gd(e)?new aC(t):new tC(t,{allowProjection:e!==x.Fragment});class A2 extends Mn{constructor(t){super(t),t.animationState||(t.animationState=fC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ca(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let R2=0;class M2 extends Mn{constructor(){super(...arguments),this.id=R2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const D2={animation:{Feature:A2},exit:{Feature:M2}};function ms(e){return{point:{x:e.pageX,y:e.pageY}}}const _2=e=>t=>ld(t)&&e(t,ms(t));function _i(e,t,n,r){return rs(e,t,_2(n),r)}const Ay=({current:e})=>e?e.ownerDocument.defaultView:null,nm=(e,t)=>Math.abs(e-t);function L2(e,t){const n=nm(e.x,t.x),r=nm(e.y,t.y);return Math.sqrt(n**2+r**2)}const rm=new Set(["auto","scroll"]);class Ry{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ll(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,w=L2(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!w)return;const{point:S}=h,{timestamp:p}=Te;this.history.push({...S,timestamp:p});const{onStart:g,onMove:y}=this.handlers;v||(g&&g(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=al(v,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();const{onEnd:w,onSessionEnd:S,resumeAnimation:p}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=ll(h.type==="pointercancel"?this.lastMoveEventInfo:al(v,this.transformPagePoint),this.history);this.startEvent&&w&&w(h,g),S&&S(h,g)},!ld(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=ms(t),c=al(l,this.transformPagePoint),{point:d}=c,{timestamp:f}=Te;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,ll(c,this.history)),this.removeListeners=ds(_i(this.contextWindow,"pointermove",this.handlePointerMove),_i(this.contextWindow,"pointerup",this.handlePointerUp),_i(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(rm.has(r.overflowX)||rm.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),te.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),En(this.updatePoint)}}function al(e,t){return t?{point:t(e.point)}:e}function im(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ll({point:e},t){return{point:e,delta:im(e,My(t)),offset:im(e,z2(t)),velocity:I2(t,.1)}}function z2(e){return e[0]}function My(e){return e[e.length-1]}function I2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=My(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>lt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>lt(t)*2&&(r=e[1]);const s=st(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function V2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?de(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?de(n,e,r.max):Math.min(e,n)),e}function sm(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 O2(e,{top:t,left:n,bottom:r,right:i}){return{x:sm(e.x,n,i),y:sm(e.y,t,r)}}function om(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 F2(e,t){return{x:om(e.x,t.x),y:om(e.y,t.y)}}function $2(e,t){let n=.5;const r=ze(e),i=ze(t);return i>r?n=Ji(t.min,t.max-r,e.min):r>i&&(n=Ji(e.min,e.max-i,t.min)),It(0,1,n)}function B2(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 _c=.35;function U2(e=_c){return e===!1?e=0:e===!0&&(e=_c),{x:am(e,"left","right"),y:am(e,"top","bottom")}}function am(e,t,n){return{min:lm(e,t),max:lm(e,n)}}function lm(e,t){return typeof e=="number"?e:e[t]||0}const H2=new WeakMap;class W2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=f=>{n&&this.snapToCursor(ms(f).point),this.stopAnimation()},o=(f,m)=>{const{drag:h,dragPropagation:v,onDragStart:w}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wk(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rt(p=>{let g=this.getAxisMotionValue(p).get()||0;if(zt.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[p];b&&(g=ze(b)*(parseFloat(g)/100))}}this.originPoint[p]=g}),w&&te.update(()=>w(f,m),!1,!0),Tc(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:w,onDrag:S}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=m;if(v&&this.currentDirection===null){this.currentDirection=G2(p),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,p),this.updateAxis("y",m.point,p),this.visualElement.render(),S&&te.update(()=>S(f,m),!1,!0)},l=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Ry(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Ay(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&te.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Os(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=V2(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&cr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=O2(r.layoutBox,t):this.constraints=!1,this.elastic=U2(n),i!==this.constraints&&!cr(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Rt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=B2(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!cr(t))return!1;const r=t.current;Gr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Xk(r,i.root,this.visualElement.getTransformPagePoint());let o=F2(i.layout.layoutBox,s);if(n){const a=n(Kk(o));this.hasMutatedConstraints=!!a,a&&(o=J0(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Rt(d=>{if(!Os(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const m=i?200:1e6,h=i?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,v)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Tc(this.visualElement,t),r.start(rd(t,r,0,n,this.visualElement,!1))}stopAnimation(){Rt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Rt(n=>{const{drag:r}=this.getProps();if(!Os(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-de(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!cr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Rt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=$2({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Rt(o=>{if(!Os(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(de(l,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;H2.set(this.visualElement,this);const t=this.visualElement.current,n=_i(t,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps(),m=c.target,h=m!==t&&Nk(m);d&&f&&!h&&this.start(c)});let r;const i=()=>{const{dragConstraints:c}=this.getProps();cr(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=K2(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),te.read(i);const a=rs(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Rt(f=>{const m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=c[f].translate,m.set(m.get()+c[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=_c,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function cm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function K2(e,t,n){const r=gh(e,cm(n)),i=gh(t,cm(n));return()=>{r(),i()}}function Os(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function G2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Y2 extends Mn{constructor(t){super(t),this.removeGroupControls=at,this.removeListeners=at,this.controls=new W2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||at}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const cl=e=>(t,n)=>{e&&te.update(()=>e(t,n),!1,!0)};class X2 extends Mn{constructor(){super(...arguments),this.removePointerDownListener=at}onPointerDown(t){this.session=new Ry(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ay(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cl(t),onStart:cl(n),onMove:cl(r),onEnd:(s,o)=>{delete this.session,i&&te.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=_i(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ul=!1;class Q2 extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),ul&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),so.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),ul=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||te.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ad.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;ul=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Dy(e){const[t,n]=Sy(),r=x.useContext($u);return u.jsx(Q2,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Py),isPresent:t,safeToRemove:n})}const q2={pan:{Feature:X2},drag:{Feature:Y2,ProjectionNode:wy,MeasureLayout:Dy}};function um(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&te.postRender(()=>s(t,ms(t)))}class Z2 extends Mn{mount(){const{current:t}=this.node;t&&(this.unmount=bk(t,(n,r)=>(um(this.node,r,"Start"),i=>um(this.node,i,"End"))))}unmount(){}}class J2 extends Mn{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=ds(rs(this.node.current,"focus",()=>this.onFocus()),rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&te.postRender(()=>s(t,ms(t)))}class eT extends Mn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Pk(t,(i,s)=>(dm(this.node,s,"Start"),(o,{success:a})=>dm(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Lc=new WeakMap,dl=new WeakMap,tT=e=>{const t=Lc.get(e.target);t&&t(e)},nT=e=>{e.forEach(tT)};function rT({root:e,...t}){const n=e||document;dl.has(n)||dl.set(n,{});const r=dl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(nT,{root:e,...t})),r[i]}function iT(e,t,n){const r=rT(t);return Lc.set(e,n),r.observe(e),()=>{Lc.delete(e),r.unobserve(e)}}const sT={some:0,all:1};class oT extends Mn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:sT[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=c?d:f;m&&m(l)};return iT(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(aT(t,n))&&this.startObserver()}unmount(){}}function aT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const lT={inView:{Feature:oT},tap:{Feature:eT},focus:{Feature:J2},hover:{Feature:Z2}},cT={layout:{ProjectionNode:wy,MeasureLayout:Dy}},uT={...D2,...lT,...q2,...cT},Et=P2(uT,j2);function fm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _y(...e){return t=>{let n=!1;const r=e.map(i=>{const s=fm(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():fm(e[i],null)}}}}function Ve(...e){return x.useCallback(_y(...e),e)}function $o(e){const t=fT(e),n=x.forwardRef((r,i)=>{const{children:s,...o}=r,a=x.Children.toArray(s),l=a.find(mT);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...o,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var dT=$o("Slot");function fT(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const o=gT(i),a=pT(s,i.props);return i.type!==x.Fragment&&(a.ref=r?_y(r,o):o),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hT=Symbol("radix.slottable");function mT(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hT}function pT(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function gT(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ly(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ly(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zy(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ly(e))&&(r&&(r+=" "),r+=t);return r}const hm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mm=zy,Iy=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return mm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],f=s==null?void 0:s[c];if(d===null)return null;const m=hm(d)||hm(f);return i[c][m]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,m]=d;return m===void 0||(c[f]=m),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:m,...h}=d;return Object.entries(h).every(v=>{let[w,S]=v;return Array.isArray(S)?S.includes({...s,...a}[w]):{...s,...a}[w]===S})?[...c,f,m]:c},[]);return mm(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},yd="-",yT=e=>{const t=xT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(yd);return a[0]===""&&a.length!==1&&a.shift(),Vy(a,t)||vT(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Vy=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Vy(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(yd);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},pm=/^\[(.+)\]$/,vT=e=>{if(pm.test(e)){const t=pm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ST(Object.entries(e.classGroups),n).forEach(([s,o])=>{zc(o,r,s,t)}),r},zc=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:gm(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(wT(i)){zc(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{zc(o,gm(t,s),n,r)})})},gm=(e,t)=>{let n=e;return t.split(yd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},wT=e=>e.isThemeGetter,ST=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,bT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},Oy="!",kT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,d=0,f;for(let S=0;S<a.length;S++){let p=a[S];if(c===0){if(p===i&&(r||a.slice(S,S+s)===t)){l.push(a.slice(d,S)),d=S+s;continue}if(p==="/"){f=S;continue}}p==="["?c++:p==="]"&&c--}const m=l.length===0?a:a.substring(d),h=m.startsWith(Oy),v=h?m.substring(1):m,w=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:w}};return n?a=>n({className:a,parseClassName:o}):o},CT=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},TT=e=>({cache:bT(e.cacheSize),parseClassName:kT(e),...yT(e)}),NT=/\s+/,ET=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(NT);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:h}=n(c);let v=!!h,w=r(v?m.substring(0,h):m);if(!w){if(!v){a=c+(a.length>0?" "+a:a);continue}if(w=r(m),!w){a=c+(a.length>0?" "+a:a);continue}v=!1}const S=CT(d).join(":"),p=f?S+Oy:S,g=p+w;if(s.includes(g))continue;s.push(g);const y=i(w,v);for(let b=0;b<y.length;++b){const k=y[b];s.push(p+k)}a=c+(a.length>0?" "+a:a)}return a};function PT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Fy(t))&&(r&&(r+=" "),r+=n);return r}const Fy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Fy(e[r]))&&(n&&(n+=" "),n+=t);return n};function jT(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((d,f)=>f(d),e());return n=TT(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=ET(l,n);return i(l,d),d}return function(){return s(PT.apply(null,arguments))}}const re=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$y=/^\[(?:([a-z-]+):)?(.+)\]$/i,AT=/^\d+\/\d+$/,RT=new Set(["px","full","screen"]),MT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DT=/\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$/,_T=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,LT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ft=e=>Lr(e)||RT.has(e)||AT.test(e),rn=e=>ni(e,"length",HT),Lr=e=>!!e&&!Number.isNaN(Number(e)),fl=e=>ni(e,"number",Lr),pi=e=>!!e&&Number.isInteger(Number(e)),IT=e=>e.endsWith("%")&&Lr(e.slice(0,-1)),H=e=>$y.test(e),sn=e=>MT.test(e),VT=new Set(["length","size","percentage"]),OT=e=>ni(e,VT,By),FT=e=>ni(e,"position",By),$T=new Set(["image","url"]),BT=e=>ni(e,$T,KT),UT=e=>ni(e,"",WT),gi=()=>!0,ni=(e,t,n)=>{const r=$y.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},HT=e=>DT.test(e)&&!_T.test(e),By=()=>!1,WT=e=>LT.test(e),KT=e=>zT.test(e),GT=()=>{const e=re("colors"),t=re("spacing"),n=re("blur"),r=re("brightness"),i=re("borderColor"),s=re("borderRadius"),o=re("borderSpacing"),a=re("borderWidth"),l=re("contrast"),c=re("grayscale"),d=re("hueRotate"),f=re("invert"),m=re("gap"),h=re("gradientColorStops"),v=re("gradientColorStopPositions"),w=re("inset"),S=re("margin"),p=re("opacity"),g=re("padding"),y=re("saturate"),b=re("scale"),k=re("sepia"),C=re("skew"),N=re("space"),T=re("translate"),E=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",H,t],I=()=>[H,t],J=()=>["",Ft,rn],le=()=>["auto",Lr,H],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",H],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Lr,H];return{cacheSize:500,separator:":",theme:{colors:[gi],spacing:[Ft,rn],blur:["none","",sn,H],brightness:W(),borderColor:[e],borderRadius:["none","","full",sn,H],borderSpacing:I(),borderWidth:J(),contrast:W(),grayscale:A(),hueRotate:W(),invert:A(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[IT,rn],inset:z(),margin:z(),opacity:W(),padding:I(),saturate:W(),scale:W(),sepia:A(),skew:W(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[sn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...pe(),H]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pi,H]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",pi,H]}],"grid-cols":[{"grid-cols":[gi]}],"col-start-end":[{col:["auto",{span:["full",pi,H]},H]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[gi]}],"row-start-end":[{row:["auto",{span:[pi,H]},H]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"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:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"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:[sn]},sn]}],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",sn,rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fl]}],"font-family":[{font:[gi]}],"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",Lr,fl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ft,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":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ft,rn]}],"underline-offset":[{"underline-offset":["auto",Ft,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:I()}],"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":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),FT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},BT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:ne()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[Ft,H]}],"outline-w":[{outline:[Ft,rn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Ft,rn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",sn,UT]}],"shadow-color":[{shadow:[gi]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",sn,H]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",H]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:W()}],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:[pi,H]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ft,rn,fl]}],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"]}}},YT=jT(GT);function ri(...e){return YT(zy(e))}const XT=Iy("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Dt=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?dT:"button";return u.jsx(o,{className:ri(XT({variant:t,size:n,className:e})),ref:s,...i})});Dt.displayName="Button";function QT({onComplete:e}){const[t,n]=x.useState(0),[r,i]=x.useState(""),[s,o]=x.useState(!1),[a,l]=x.useState(!1),c=x.useRef(null),d=[{text:"Initializing FightBook kernel...",color:"text-zinc-500"},{text:"Loading AI combat modules...",color:"text-zinc-500"},{text:"Mounting skills.md parser...",color:"text-zinc-500"},{text:"Connecting to fight arena...",color:"text-zinc-500"},{text:"",color:""},{text:"╔══════════════════════════════════════════════════════════════╗",color:"text-orange-500"},{text:"║ WELCOME TO FIGHTBOOK ║",color:"text-orange-500"},{text:"║ ║",color:"text-orange-500"},{text:"║ AI Combat Arena • skills.md Powered ║",color:"text-orange-500"},{text:"║ ║",color:"text-orange-500"},{text:"╚══════════════════════════════════════════════════════════════╝",color:"text-orange-500"},{text:"",color:""},{text:"WHAT IS FIGHTBOOK?",color:"text-purple-400",icon:tr},{text:"FightBook is an AI combat simulation platform where you create",color:"text-zinc-300"},{text:"fighters using skills.md configuration files and watch them",color:"text-zinc-300"},{text:"battle in real-time with authentic MMA techniques.",color:"text-zinc-300"},{text:"",color:""},{text:"HOW IT WORKS:",color:"text-cyan-400",icon:Fu},{text:"1. Create an agent with 25+ configurable attributes",color:"text-zinc-300"},{text:" (striking, grappling, cardio, fight IQ, aggression...)",color:"text-zinc-500"},{text:"",color:""},{text:"2. Pit your agent against others in 3-minute rounds",color:"text-zinc-300"},{text:" Watch the action unfold move-by-move in real-time",color:"text-zinc-500"},{text:"",color:""},{text:"3. Build your legacy through wins, KOs, and submissions",color:"text-zinc-300"},{text:" Rank up. Earn XP. Become champion.",color:"text-zinc-500"},{text:"",color:""},{text:"THE TECH:",color:"text-green-400",icon:uc},{text:"• skills.md format (compatible with AI agent meta)",color:"text-zinc-300"},{text:"• Real-time simulation engine with 40+ MMA techniques",color:"text-zinc-300"},{text:"• Position-based combat (standing → clinch → ground)",color:"text-zinc-300"},{text:"• Point budget system — every choice matters",color:"text-zinc-300"},{text:"",color:""},{text:"READY TO FIGHT?",color:"text-orange-400",icon:us}];x.useEffect(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight)},[t,r]),x.useEffect(()=>{if(!a)if(t<d.length){const v=d[t];let w=0;const S=setInterval(()=>{w<v.text.length?(i(v.text.slice(0,w+1)),w++,c.current&&w%5===0&&(c.current.scrollTop=c.current.scrollHeight)):(clearInterval(S),setTimeout(()=>{n(p=>p+1),i("")},v.delay||(v.text===""?100:40)))},15);return()=>clearInterval(S)}else o(!0)},[t,a]);const f=()=>{l(!0),n(d.length),o(!0)},m=d.slice(0,t),h=d[t];return u.jsx(Et.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-black flex items-center justify-center p-4",onClick:f,children:u.jsxs("div",{className:"w-full max-w-3xl bg-zinc-950 border border-zinc-800 rounded-lg overflow-hidden shadow-2xl",onClick:v=>v.stopPropagation(),children:[u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-zinc-900 border-b border-zinc-800",children:[u.jsx(uc,{className:"w-5 h-5 text-orange-500"}),u.jsx("span",{className:"font-mono text-sm text-zinc-400",children:"fightbook_boot.sh"}),u.jsx("div",{className:"flex-1"}),u.jsx("button",{onClick:f,className:"text-xs text-zinc-600 hover:text-zinc-400 transition-colors",children:"[skip]"})]}),u.jsxs("div",{ref:c,className:"p-6 font-mono text-sm h-[500px] overflow-y-auto bg-black scroll-smooth",children:[m.map((v,w)=>u.jsxs("div",{className:`${v.color} mb-1 flex items-center gap-2`,children:[v.icon&&u.jsx(v.icon,{className:"w-4 h-4"}),u.jsx("span",{children:v.text})]},w)),!a&&h&&t<d.length&&u.jsxs("div",{className:`${h.color} flex items-center gap-2`,children:[h.icon&&u.jsx(h.icon,{className:"w-4 h-4"}),u.jsx("span",{children:r}),u.jsx("span",{className:"animate-pulse text-orange-500",children:"_"})]}),u.jsx(Er,{children:s&&u.jsxs(Et.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-6",children:[u.jsx("div",{className:"text-zinc-500 mb-2",children:"Press ENTER to enter the arena..."}),u.jsxs(Dt,{onClick:e,className:"bg-orange-500 hover:bg-orange-400 text-black font-bold px-8",children:[u.jsx(tr,{className:"w-4 h-4 mr-2"}),"ENTER ARENA",u.jsx(Iu,{className:"w-4 h-4 ml-2"})]})]})})]}),u.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-zinc-900 border-t border-zinc-800 text-xs text-zinc-600",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("span",{children:"v1.0.0"}),u.jsx("span",{className:"text-zinc-700",children:"|"}),u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Online"]})]}),u.jsxs("div",{children:[Math.round(t/d.length*100),"% loaded"]})]})]})})}function qT({agents:e,currentAgent:t,onCreate:n,onEdit:r,onDelete:i,onSelect:s,onFight:o,onImport:a}){const[l,c]=x.useState(null),[d,f]=x.useState(!1),[m,h]=x.useState(""),v=p=>{(l==null?void 0:l.metadata.id)===p.metadata.id?c(null):l?(o(l,p),c(null)):c(p)},w=()=>{m.trim()&&(a(m),h(""),f(!1))},S=p=>{var y;const g=(y=p.target.files)==null?void 0:y[0];if(g){const b=new FileReader;b.onload=k=>{var N;const C=(N=k.target)==null?void 0:N.result;a(C)},b.readAsText(g)}};return e.length===0?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"text-center py-20 border border-zinc-800 rounded-sm",children:[u.jsx("div",{className:"text-zinc-600 mb-4",children:"No agents found"}),u.jsx("div",{className:"text-sm text-zinc-500 mb-6",children:"Create your first AI fighter or import from skills.md"}),u.jsxs("div",{className:"flex items-center justify-center gap-3",children:[u.jsx("button",{onClick:n,className:"btn-minimal text-orange-500 border-orange-500/50",children:"create agent"}),u.jsxs("label",{className:"btn-minimal cursor-pointer",children:[u.jsx(dc,{className:"w-4 h-4 inline mr-2"}),"import skills.md",u.jsx("input",{type:"file",accept:".md,.txt",className:"hidden",onChange:S})]})]})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm",children:[u.jsx("div",{className:"terminal-header",children:u.jsx("span",{className:"text-xs text-zinc-500",children:"quick_start_template.md"})}),u.jsx("div",{className:"terminal-body text-xs",children:u.jsx("pre",{className:"text-zinc-400",children:`# Copy this, save as skills.md, and import
|
|
286
|
+
|
|
287
|
+
name: "My Fighter"
|
|
288
|
+
nickname: "The Destroyer"
|
|
289
|
+
|
|
290
|
+
# Striking
|
|
291
|
+
striking: 75
|
|
292
|
+
punch_speed: 80
|
|
293
|
+
kick_power: 70
|
|
294
|
+
head_movement: 65
|
|
295
|
+
|
|
296
|
+
# Grappling
|
|
297
|
+
wrestling: 60
|
|
298
|
+
takedown_defense: 70
|
|
299
|
+
submissions: 45
|
|
300
|
+
|
|
301
|
+
# Physical
|
|
302
|
+
cardio: 80
|
|
303
|
+
chin: 75
|
|
304
|
+
|
|
305
|
+
# Mental
|
|
306
|
+
aggression: 0.7
|
|
307
|
+
fight_iq: 70`})})]})]}):u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"text-zinc-500 text-sm",children:[e.length," fighter",e.length!==1?"s":""," in roster"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[l&&u.jsxs("span",{className:"text-sm text-orange-500",children:["Select opponent for ",u.jsx("strong",{children:l.skills.name})]}),u.jsxs("button",{onClick:()=>f(!d),className:"btn-minimal text-zinc-400",children:[u.jsx(dc,{className:"w-4 h-4 inline mr-2"}),"import"]}),u.jsx("button",{onClick:n,className:"btn-minimal text-orange-500",children:"+ new agent"})]})]}),d&&u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-4 animate-fade-in",children:[u.jsx("div",{className:"text-sm text-zinc-500 mb-3",children:"Paste skills.md content or upload file"}),u.jsx("textarea",{value:m,onChange:p=>h(p.target.value),placeholder:"# Paste your skills.md here...",className:"w-full h-32 bg-black border border-zinc-800 rounded-sm p-3 text-sm font-mono resize-none mb-3"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:w,disabled:!m.trim(),className:"btn-minimal text-orange-500 disabled:opacity-50",children:"import"}),u.jsxs("label",{className:"btn-minimal cursor-pointer",children:["upload file",u.jsx("input",{type:"file",accept:".md,.txt",className:"hidden",onChange:S})]}),u.jsx("button",{onClick:()=>f(!1),className:"btn-minimal text-zinc-500",children:"cancel"})]})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm overflow-hidden",children:[u.jsxs("div",{className:"grid grid-cols-12 gap-4 px-4 py-2 bg-zinc-900 text-xs text-zinc-500 uppercase tracking-wider",children:[u.jsx("div",{className:"col-span-4",children:"Agent"}),u.jsx("div",{className:"col-span-2",children:"Record"}),u.jsx("div",{className:"col-span-2",children:"Rating"}),u.jsx("div",{className:"col-span-2",children:"Archetype"}),u.jsx("div",{className:"col-span-2 text-right",children:"Actions"})]}),e.map(p=>{const g=(t==null?void 0:t.metadata.id)===p.metadata.id,y=(l==null?void 0:l.metadata.id)===p.metadata.id;`${p.metadata.wins}${p.metadata.losses}${p.metadata.draws}`;const b=$g(p.skills),k=Bg(p.skills);return u.jsxs("div",{className:`grid grid-cols-12 gap-4 px-4 py-3 border-t border-zinc-800 items-center hover:bg-zinc-900/30 transition-colors ${y?"bg-orange-500/10 border-orange-500/30":""}`,children:[u.jsx("div",{className:"col-span-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[g&&u.jsx("span",{className:"text-orange-500",title:"Active",children:"●"}),u.jsxs("div",{children:[u.jsx("div",{className:"font-medium",children:p.skills.name}),u.jsxs("div",{className:"text-xs text-zinc-500",children:['"',p.skills.nickname,'"']})]})]})}),u.jsxs("div",{className:"col-span-2 font-mono text-sm",children:[u.jsx("span",{className:"text-green-500",children:p.metadata.wins}),u.jsx("span",{className:"text-zinc-600",children:"-"}),u.jsx("span",{className:"text-red-500",children:p.metadata.losses}),u.jsx("span",{className:"text-zinc-600",children:"-"}),u.jsx("span",{className:"text-zinc-500",children:p.metadata.draws})]}),u.jsx("div",{className:"col-span-2 font-mono text-sm",children:b}),u.jsx("div",{className:"col-span-2",children:u.jsx("span",{className:"text-xs text-zinc-400 capitalize",children:k})}),u.jsxs("div",{className:"col-span-2 flex items-center justify-end gap-1",children:[u.jsx("button",{onClick:()=>s(p),className:"p-1.5 text-zinc-500 hover:text-white transition-colors",title:"Set Active",children:u.jsx(gS,{className:"w-4 h-4"})}),u.jsx("button",{onClick:()=>v(p),className:`p-1.5 transition-colors ${y?"text-orange-500":"text-zinc-500 hover:text-white"}`,title:y?"Cancel":"Select for Fight",children:u.jsx(tr,{className:"w-4 h-4"})}),u.jsx("button",{onClick:()=>r(p),className:"p-1.5 text-zinc-500 hover:text-white transition-colors",title:"Edit",children:u.jsx(lS,{className:"w-4 h-4"})}),u.jsx("button",{onClick:()=>i(p.metadata.id),className:"p-1.5 text-zinc-500 hover:text-red-500 transition-colors",title:"Delete",children:u.jsx(mS,{className:"w-4 h-4"})})]})]},p.metadata.id)})]}),u.jsxs("div",{className:"text-xs text-zinc-600 pt-4 border-t border-zinc-800",children:[u.jsx("span",{className:"text-zinc-500",children:"Commands:"})," ","Click ",u.jsx(tr,{className:"w-3 h-3 inline"})," on two agents to start a fight"," ","|"," ",u.jsx("span",{className:"text-orange-500",children:"●"})," marks your active agent"]})]})}console.warn("⚠️ Supabase not configured. Set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY in .env.local");async function ZT(e=100){return JT(e)}function JT(e){return Rn().map(n=>({id:n.metadata.id,name:n.skills.name||"Unnamed",nickname:n.skills.nickname||"The Fighter",winCount:n.metadata.wins||0,lossCount:n.metadata.losses||0,totalFights:n.metadata.totalFights||0,ranking:n.metadata.ranking||1e3,level:n.metadata.level||1})).sort((n,r)=>r.winCount-n.winCount).slice(0,e)}async function eN(e){return nN(e)}async function tN(e){return rN(e)}function nN(e){try{const t=Rn(),n=t.findIndex(r=>r.metadata.id===e);return n>=0?(t[n].metadata.wins=(t[n].metadata.wins||0)+1,t[n].metadata.totalFights=(t[n].metadata.totalFights||0)+1,localStorage.setItem("fightbook_agents",JSON.stringify(t)),!0):!1}catch(t){return console.error("Failed to increment local win count:",t),!1}}function rN(e){try{const t=Rn(),n=t.findIndex(r=>r.metadata.id===e);return n>=0?(t[n].metadata.losses=(t[n].metadata.losses||0)+1,t[n].metadata.totalFights=(t[n].metadata.totalFights||0)+1,localStorage.setItem("fightbook_agents",JSON.stringify(t)),!0):!1}catch(t){return console.error("Failed to increment local loss count:",t),!1}}function iN(){const[e,t]=x.useState([]),[n,r]=x.useState(!0);x.useEffect(()=>{i()},[]);const i=async()=>{r(!0);try{const s=await ZT(100);t(s)}catch(s){console.error("Failed to load leaderboard:",s)}finally{r(!1)}};return n?u.jsx("div",{className:"border border-zinc-800 rounded-sm p-8 text-center",children:u.jsx("div",{className:"text-zinc-500 animate-pulse",children:"loading leaderboard..."})}):e.length===0?u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-8 text-center",children:[u.jsx("div",{className:"text-zinc-600 mb-2",children:"No fighters on the leaderboard yet"}),u.jsx("div",{className:"text-sm text-zinc-500",children:"Create an agent and win some fights to get ranked"})]}):u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"flex items-center justify-between",children:u.jsxs("div",{children:[u.jsxs("h2",{className:"text-lg font-bold flex items-center gap-2",children:[u.jsx(us,{className:"w-5 h-5 text-yellow-500"}),"Leaderboard"]}),u.jsxs("p",{className:"text-sm text-zinc-500",children:["Top ",e.length," fighters ranked by wins"]})]})}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm overflow-hidden",children:[u.jsxs("div",{className:"grid grid-cols-12 gap-4 px-4 py-2 bg-zinc-900 text-xs text-zinc-500 uppercase tracking-wider",children:[u.jsx("div",{className:"col-span-1",children:"#"}),u.jsx("div",{className:"col-span-5",children:"Fighter"}),u.jsx("div",{className:"col-span-2",children:"Record"}),u.jsx("div",{className:"col-span-2",children:"Win Rate"}),u.jsx("div",{className:"col-span-2 text-right",children:"Wins"})]}),e.map((s,o)=>{const a=o+1,l=s.totalFights>0?Math.round(s.winCount/s.totalFights*100):0;return u.jsxs("div",{className:`grid grid-cols-12 gap-4 px-4 py-3 border-t border-zinc-800 items-center ${a<=3?"bg-zinc-900/20":"hover:bg-zinc-900/10"}`,children:[u.jsx("div",{className:"col-span-1",children:a===1?u.jsx(Ls,{className:"w-5 h-5 text-yellow-500"}):a===2?u.jsx(Ls,{className:"w-5 h-5 text-zinc-400"}):a===3?u.jsx(Ls,{className:"w-5 h-5 text-orange-600"}):u.jsx("span",{className:"text-zinc-600 font-mono",children:a})}),u.jsxs("div",{className:"col-span-5",children:[u.jsx("div",{className:"font-medium",children:s.name}),u.jsxs("div",{className:"text-xs text-zinc-500",children:['"',s.nickname,'" • Level ',s.level]})]}),u.jsxs("div",{className:"col-span-2 font-mono text-sm",children:[u.jsx("span",{className:"text-green-500",children:s.winCount}),u.jsx("span",{className:"text-zinc-600",children:"-"}),u.jsx("span",{className:"text-red-500",children:s.lossCount})]}),u.jsx("div",{className:"col-span-2",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"flex-1 bg-zinc-800 h-1.5 rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-green-500",style:{width:`${l}%`}})}),u.jsxs("span",{className:"text-xs text-zinc-400 w-8",children:[l,"%"]})]})}),u.jsx("div",{className:"col-span-2 text-right",children:u.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${a<=3?"bg-orange-500/20 text-orange-400":"bg-zinc-800 text-zinc-400"}`,children:[a<=3&&u.jsx(Vu,{className:"w-3 h-3"}),s.winCount," ",s.winCount===1?"win":"wins"]})})]},s.id)})]}),u.jsxs("div",{className:"flex items-center gap-6 text-xs text-zinc-600",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ls,{className:"w-4 h-4 text-yellow-500"}),u.jsx("span",{children:"Top 3"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-8 bg-zinc-800 h-1.5 rounded-full overflow-hidden",children:u.jsx("div",{className:"w-2/3 h-full bg-green-500"})}),u.jsx("span",{children:"Win rate"})]})]})]})}function vd(e,[t,n]){return Math.min(n,Math.max(t,e))}function Qe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function fa(e,t=[]){let n=[];function r(s,o){const a=x.createContext(o),l=n.length;n=[...n,o];const c=f=>{var p;const{scope:m,children:h,...v}=f,w=((p=m==null?void 0:m[e])==null?void 0:p[l])||a,S=x.useMemo(()=>v,Object.values(v));return u.jsx(w.Provider,{value:S,children:h})};c.displayName=s+"Provider";function d(f,m){var w;const h=((w=m==null?void 0:m[e])==null?void 0:w[l])||a,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const i=()=>{const s=n.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,sN(i,...t)]}function sN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var is=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},oN=ax[" useInsertionEffect ".trim().toString()]||is;function aN({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,o]=lN({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=x.useCallback(d=>{var f;if(a){const m=cN(d)?d(e):d;m!==e&&((f=o.current)==null||f.call(o,m))}else s(d)},[a,e,s,o]);return[l,c]}function lN({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),s=x.useRef(t);return oN(()=>{s.current=t},[t]),x.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function cN(e){return typeof e=="function"}var uN=x.createContext(void 0);function Uy(e){const t=x.useContext(uN);return e||t||"ltr"}function dN(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function fN(e){const[t,n]=x.useState(void 0);return is(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var hN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=hN.reduce((e,t)=>{const n=$o(`Primitive.${t}`),r=x.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mN(e){const t=e+"CollectionProvider",[n,r]=fa(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:S,children:p}=w,g=M.useRef(null),y=M.useRef(new Map).current;return u.jsx(i,{scope:S,itemMap:y,collectionRef:g,children:p})};o.displayName=t;const a=e+"CollectionSlot",l=$o(a),c=M.forwardRef((w,S)=>{const{scope:p,children:g}=w,y=s(a,p),b=Ve(S,y.collectionRef);return u.jsx(l,{ref:b,children:g})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=$o(d),h=M.forwardRef((w,S)=>{const{scope:p,children:g,...y}=w,b=M.useRef(null),k=Ve(S,b),C=s(d,p);return M.useEffect(()=>(C.itemMap.set(b,{ref:b,...y}),()=>void C.itemMap.delete(b))),u.jsx(m,{[f]:"",ref:k,children:g})});h.displayName=d;function v(w){const S=s(e+"CollectionConsumer",w);return M.useCallback(()=>{const g=S.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(S.itemMap.values()).sort((C,N)=>y.indexOf(C.ref.current)-y.indexOf(N.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},v,r]}var Hy=["PageUp","PageDown"],Wy=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ky={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ii="Slider",[Ic,pN,gN]=mN(ii),[Gy,qE]=fa(ii,[gN]),[yN,ha]=Gy(ii),Yy=x.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:s=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:d,onValueChange:f=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:v,...w}=e,S=x.useRef(new Set),p=x.useRef(0),y=o==="horizontal"?vN:xN,[b=[],k]=aN({prop:d,defaultProp:c,onChange:z=>{var J;(J=[...S.current][p.current])==null||J.focus(),f(z)}}),C=x.useRef(b);function N(z){const I=CN(b,z);P(z,I)}function T(z){P(z,p.current)}function E(){const z=C.current[p.current];b[p.current]!==z&&m(b)}function P(z,I,{commit:J}={commit:!1}){const le=PN(s),pe=jN(Math.round((z-r)/s)*s+r,le),ne=vd(pe,[r,i]);k(($=[])=>{const j=bN($,ne,I);if(EN(j,l*s)){p.current=j.indexOf(ne);const A=String(j)!==String($);return A&&J&&m(j),A?j:$}else return $})}return u.jsx(yN,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:p,thumbs:S.current,values:b,orientation:o,form:v,children:u.jsx(Ic.Provider,{scope:e.__scopeSlider,children:u.jsx(Ic.Slot,{scope:e.__scopeSlider,children:u.jsx(y,{"aria-disabled":a,"data-disabled":a?"":void 0,...w,ref:t,onPointerDown:Qe(w.onPointerDown,()=>{a||(C.current=b)}),min:r,max:i,inverted:h,onSlideStart:a?void 0:N,onSlideMove:a?void 0:T,onSlideEnd:a?void 0:E,onHomeKeyDown:()=>!a&&P(r,0,{commit:!0}),onEndKeyDown:()=>!a&&P(i,b.length-1,{commit:!0}),onStepKeyDown:({event:z,direction:I})=>{if(!a){const pe=Hy.includes(z.key)||z.shiftKey&&Wy.includes(z.key)?10:1,ne=p.current,$=b[ne],j=s*pe*I;P($+j,ne,{commit:!0})}}})})})})});Yy.displayName=ii;var[Xy,Qy]=Gy(ii,{startEdge:"left",endEdge:"right",size:"width",direction:1}),vN=x.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:s,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...d}=e,[f,m]=x.useState(null),h=Ve(t,y=>m(y)),v=x.useRef(void 0),w=Uy(i),S=w==="ltr",p=S&&!s||!S&&s;function g(y){const b=v.current||f.getBoundingClientRect(),k=[0,b.width],N=xd(k,p?[n,r]:[r,n]);return v.current=b,N(y-b.left)}return u.jsx(Xy,{scope:e.__scopeSlider,startEdge:p?"left":"right",endEdge:p?"right":"left",direction:p?1:-1,size:"width",children:u.jsx(qy,{dir:w,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const b=g(y.clientX);o==null||o(b)},onSlideMove:y=>{const b=g(y.clientX);a==null||a(b)},onSlideEnd:()=>{v.current=void 0,l==null||l()},onStepKeyDown:y=>{const k=Ky[p?"from-left":"from-right"].includes(y.key);c==null||c({event:y,direction:k?-1:1})}})})}),xN=x.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:s,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...c}=e,d=x.useRef(null),f=Ve(t,d),m=x.useRef(void 0),h=!i;function v(w){const S=m.current||d.current.getBoundingClientRect(),p=[0,S.height],y=xd(p,h?[r,n]:[n,r]);return m.current=S,y(w-S.top)}return u.jsx(Xy,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:u.jsx(qy,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const S=v(w.clientY);s==null||s(S)},onSlideMove:w=>{const S=v(w.clientY);o==null||o(S)},onSlideEnd:()=>{m.current=void 0,a==null||a()},onStepKeyDown:w=>{const p=Ky[h?"from-bottom":"from-top"].includes(w.key);l==null||l({event:w,direction:p?-1:1})}})})}),qy=x.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...c}=e,d=ha(ii,n);return u.jsx(dt.span,{...c,ref:t,onKeyDown:Qe(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):Hy.concat(Wy).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:Qe(e.onPointerDown,f=>{const m=f.target;m.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(m)?m.focus():r(f)}),onPointerMove:Qe(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:Qe(e.onPointerUp,f=>{const m=f.target;m.hasPointerCapture(f.pointerId)&&(m.releasePointerCapture(f.pointerId),s(f))})})}),Zy="SliderTrack",Jy=x.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=ha(Zy,n);return u.jsx(dt.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});Jy.displayName=Zy;var Vc="SliderRange",ev=x.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=ha(Vc,n),s=Qy(Vc,n),o=x.useRef(null),a=Ve(t,o),l=i.values.length,c=i.values.map(m=>rv(m,i.min,i.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(dt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:f+"%"}})});ev.displayName=Vc;var Oc="SliderThumb",tv=x.forwardRef((e,t)=>{const n=pN(e.__scopeSlider),[r,i]=x.useState(null),s=Ve(t,a=>i(a)),o=x.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return u.jsx(wN,{...e,ref:s,index:o})}),wN=x.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...s}=e,o=ha(Oc,n),a=Qy(Oc,n),[l,c]=x.useState(null),d=Ve(t,g=>c(g)),f=l?o.form||!!l.closest("form"):!0,m=fN(l),h=o.values[r],v=h===void 0?0:rv(h,o.min,o.max),w=kN(r,o.values.length),S=m==null?void 0:m[a.size],p=S?TN(S,v,a.direction):0;return x.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${v}% + ${p}px)`},children:[u.jsx(Ic.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(dt.span,{role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...s,ref:d,style:h===void 0?{display:"none"}:e.style,onFocus:Qe(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&u.jsx(nv,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},r)]})});tv.displayName=Oc;var SN="RadioBubbleInput",nv=x.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=x.useRef(null),s=Ve(i,r),o=dN(t);return x.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const f=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[o,t]),u.jsx(dt.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});nv.displayName=SN;function bN(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,s)=>i-s)}function rv(e,t,n){const s=100/(n-t)*(e-t);return vd(s,[0,100])}function kN(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function CN(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function TN(e,t,n){const r=e/2,s=xd([0,50],[0,r]);return(r-s(t)*n)*n}function NN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function EN(e,t){if(t>0){const n=NN(e);return Math.min(...n)>=t}return!0}function xd(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function PN(e){return(String(e).split(".")[1]||"").length}function jN(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var iv=Yy,AN=Jy,RN=ev,MN=tv;const Fc=x.forwardRef(({className:e,...t},n)=>u.jsxs(iv,{ref:n,className:ri("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(AN,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(RN,{className:"absolute h-full bg-primary"})}),u.jsx(MN,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Fc.displayName=iv.displayName;function DN({agent:e,onSave:t,onCancel:n}){x.useState(!e);const[r,i]=x.useState(""),[s,o]=x.useState(null),[a,l]=x.useState("edit");x.useEffect(()=>{if(e){const S=Ya(e);i(S),o(e)}else{const S=lc("");i(Ya(S)),o(S)}},[e]);const c=S=>{i(S);try{const p=Fg(S),g=e||lc(p.name||"Unnamed");o({...g,skills:{...g.skills,...p}})}catch{}},d=()=>{s&&t(s)},f=()=>{var b;const S=new Blob([r],{type:"text/plain"}),p=URL.createObjectURL(S),g=document.createElement("a");g.href=p;const y=((b=s==null?void 0:s.skills.name)==null?void 0:b.replace(/\s+/g,"_"))||"fighter";g.download=`${y}_skills.md`,g.click()},m=S=>{var g;const p=(g=S.target.files)==null?void 0:g[0];if(p){const y=new FileReader;y.onload=b=>{var C;const k=(C=b.target)==null?void 0:C.result;c(k)},y.readAsText(p)}};if(!s)return null;const h=$g(s.skills),v=Bg(s.skills),w=!e;return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-lg font-bold",children:w?"Create New Agent":`Edit ${e==null?void 0:e.skills.name}`}),u.jsx("p",{className:"text-sm text-zinc-500",children:"Configure via skills.md or visual editor"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("button",{onClick:n,className:"btn-minimal text-zinc-400",children:[u.jsx(Gg,{className:"w-4 h-4 inline mr-2"}),"cancel"]}),u.jsxs("button",{onClick:d,className:"btn-minimal text-orange-500 border-orange-500/50",children:[u.jsx(dS,{className:"w-4 h-4 inline mr-2"}),"save"]})]})]}),u.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[u.jsxs("div",{className:"px-3 py-1.5 bg-zinc-900 rounded-sm",children:[u.jsx("span",{className:"text-zinc-500",children:"Rating:"}),u.jsx("span",{className:"ml-2 font-mono text-orange-500",children:h})]}),u.jsxs("div",{className:"px-3 py-1.5 bg-zinc-900 rounded-sm",children:[u.jsx("span",{className:"text-zinc-500",children:"Archetype:"}),u.jsx("span",{className:"ml-2 capitalize",children:v})]})]}),u.jsxs("div",{className:"flex items-center gap-4 border-b border-zinc-800",children:[u.jsx("button",{onClick:()=>l("edit"),className:`pb-2 text-sm ${a==="edit"?"text-orange-500 border-b-2 border-orange-500":"text-zinc-500 hover:text-white"}`,children:"skills.md"}),u.jsx("button",{onClick:()=>l("visual"),className:`pb-2 text-sm ${a==="visual"?"text-orange-500 border-b-2 border-orange-500":"text-zinc-500 hover:text-white"}`,children:"visual editor"})]}),a==="edit"?u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("label",{className:"btn-minimal cursor-pointer text-xs",children:[u.jsx(dc,{className:"w-3 h-3 inline mr-1"}),"import",u.jsx("input",{type:"file",accept:".md,.txt",className:"hidden",onChange:m})]}),u.jsxs("button",{onClick:f,className:"btn-minimal text-xs",children:[u.jsx(iS,{className:"w-3 h-3 inline mr-1"}),"download"]})]}),u.jsx("textarea",{value:r,onChange:S=>c(S.target.value),className:"w-full h-[500px] bg-black border border-zinc-800 rounded-sm p-4 font-mono text-sm resize-none focus:border-orange-500/50 focus:ring-1 focus:ring-orange-500/50",spellCheck:!1})]}):u.jsx(_N,{agent:s,onChange:S=>{o(S),i(Ya(S))}})]})}function _N({agent:e,onChange:t}){const n=(s,o)=>{t({...e,skills:{...e.skills,[s]:o}})},r=(s,o)=>{t({...e,skills:{...e.skills,[s]:o}})},i=({label:s,value:o,onChange:a,max:l=100})=>u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex justify-between text-sm",children:[u.jsx("span",{className:"text-zinc-400",children:s}),u.jsx("span",{className:"font-mono",children:o})]}),u.jsx(Fc,{value:[o],onValueChange:([c])=>a(c),min:0,max:l,step:1,className:"w-full"})]});return u.jsxs("div",{className:"space-y-6 max-h-[500px] overflow-y-auto pr-2",children:[u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-4 space-y-4",children:[u.jsx("h3",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Identity"}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-zinc-400 block mb-2",children:"Name"}),u.jsx("input",{type:"text",value:e.skills.name,onChange:s=>r("name",s.target.value),className:"w-full bg-black border border-zinc-800 rounded-sm px-3 py-2 text-sm"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-zinc-400 block mb-2",children:"Nickname"}),u.jsx("input",{type:"text",value:e.skills.nickname,onChange:s=>r("nickname",s.target.value),className:"w-full bg-black border border-zinc-800 rounded-sm px-3 py-2 text-sm"})]})]})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-4 space-y-4",children:[u.jsx("h3",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Striking"}),u.jsx(i,{label:"Striking",value:e.skills.striking,onChange:s=>n("striking",s)}),u.jsx(i,{label:"Punch Speed",value:e.skills.punchSpeed,onChange:s=>n("punchSpeed",s)}),u.jsx(i,{label:"Kick Power",value:e.skills.kickPower,onChange:s=>n("kickPower",s)}),u.jsx(i,{label:"Head Movement",value:e.skills.headMovement,onChange:s=>n("headMovement",s)})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-4 space-y-4",children:[u.jsx("h3",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Grappling"}),u.jsx(i,{label:"Wrestling",value:e.skills.wrestling,onChange:s=>n("wrestling",s)}),u.jsx(i,{label:"Takedown Defense",value:e.skills.takedownDefense,onChange:s=>n("takedownDefense",s)}),u.jsx(i,{label:"Submissions",value:e.skills.submissions,onChange:s=>n("submissions",s)}),u.jsx(i,{label:"Submission Defense",value:e.skills.submissionDefense,onChange:s=>n("submissionDefense",s)})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-4 space-y-4",children:[u.jsx("h3",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Physical"}),u.jsx(i,{label:"Cardio",value:e.skills.cardio,onChange:s=>n("cardio",s)}),u.jsx(i,{label:"Chin",value:e.skills.chin,onChange:s=>n("chin",s)}),u.jsx(i,{label:"Recovery",value:e.skills.recovery,onChange:s=>n("recovery",s)})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-4 space-y-4",children:[u.jsx("h3",{className:"text-xs uppercase tracking-wider text-zinc-500",children:"Mental"}),u.jsx(i,{label:"Fight IQ",value:e.skills.fightIQ,onChange:s=>n("fightIQ",s)}),u.jsx(i,{label:"Heart",value:e.skills.heart,onChange:s=>n("heart",s)}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex justify-between text-sm",children:[u.jsx("span",{className:"text-zinc-400",children:"Aggression"}),u.jsxs("span",{className:"font-mono",children:[Math.round(e.skills.aggression*100),"%"]})]}),u.jsx(Fc,{value:[e.skills.aggression*100],onValueChange:([s])=>n("aggression",s/100),min:0,max:100})]})]})]})}const LN=Iy("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ma({className:e,variant:t,...n}){return u.jsx("div",{className:ri(LN({variant:t}),e),...n})}var wd="Progress",Sd=100,[zN,ZE]=fa(wd),[IN,VN]=zN(wd),sv=x.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=ON,...o}=e;(i||i===0)&&!ym(i)&&console.error(FN(`${i}`,"Progress"));const a=ym(i)?i:Sd;r!==null&&!vm(r,a)&&console.error($N(`${r}`,"Progress"));const l=vm(r,a)?r:null,c=Bo(l)?s(l,a):void 0;return u.jsx(IN,{scope:n,value:l,max:a,children:u.jsx(dt.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Bo(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":lv(l,a),"data-value":l??void 0,"data-max":a,...o,ref:t})})});sv.displayName=wd;var ov="ProgressIndicator",av=x.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=VN(ov,n);return u.jsx(dt.div,{"data-state":lv(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});av.displayName=ov;function ON(e,t){return`${Math.round(e/t*100)}%`}function lv(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Bo(e){return typeof e=="number"}function ym(e){return Bo(e)&&!isNaN(e)&&e>0}function vm(e,t){return Bo(e)&&!isNaN(e)&&e<=t&&e>=0}function FN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Sd}\`.`}function $N(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
308
|
+
- a positive number
|
|
309
|
+
- less than the value passed to \`max\` (or ${Sd} if no \`max\` prop is set)
|
|
310
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
311
|
+
|
|
312
|
+
Defaulting to \`null\`.`}var cv=sv,BN=av;const $c=x.forwardRef(({className:e,value:t,...n},r)=>u.jsx(cv,{ref:r,className:ri("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:u.jsx(BN,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));$c.displayName=cv.displayName;function UN(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var ps=e=>{const{present:t,children:n}=e,r=HN(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Ve(r.ref,WN(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};ps.displayName="Presence";function HN(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),o=e?"mounted":"unmounted",[a,l]=UN(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Fs(r.current);s.current=a==="mounted"?c:"none"},[a]),is(()=>{const c=r.current,d=i.current;if(d!==e){const m=s.current,h=Fs(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),is(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=h=>{const w=Fs(r.current).includes(h.animationName);if(h.target===t&&w&&(l("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},m=h=>{h.target===t&&(s.current=Fs(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Fs(e){return(e==null?void 0:e.animationName)||"none"}function WN(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Fn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function KN(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var bd="ScrollArea",[uv,JE]=fa(bd),[GN,ft]=uv(bd),dv=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:s=600,...o}=e,[a,l]=x.useState(null),[c,d]=x.useState(null),[f,m]=x.useState(null),[h,v]=x.useState(null),[w,S]=x.useState(null),[p,g]=x.useState(0),[y,b]=x.useState(0),[k,C]=x.useState(!1),[N,T]=x.useState(!1),E=Ve(t,z=>l(z)),P=Uy(i);return u.jsx(GN,{scope:n,type:r,dir:P,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:m,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:k,onScrollbarXEnabledChange:C,scrollbarY:w,onScrollbarYChange:S,scrollbarYEnabled:N,onScrollbarYEnabledChange:T,onCornerWidthChange:g,onCornerHeightChange:b,children:u.jsx(dt.div,{dir:P,...o,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});dv.displayName=bd;var fv="ScrollAreaViewport",hv=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...s}=e,o=ft(fv,n),a=x.useRef(null),l=Ve(t,a,o.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),u.jsx(dt.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});hv.displayName=fv;var Vt="ScrollAreaScrollbar",kd=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ft(Vt,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,a=e.orientation==="horizontal";return x.useEffect(()=>(a?s(!0):o(!0),()=>{a?s(!1):o(!1)}),[a,s,o]),i.type==="hover"?u.jsx(YN,{...r,ref:t,forceMount:n}):i.type==="scroll"?u.jsx(XN,{...r,ref:t,forceMount:n}):i.type==="auto"?u.jsx(mv,{...r,ref:t,forceMount:n}):i.type==="always"?u.jsx(Cd,{...r,ref:t}):null});kd.displayName=Vt;var YN=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ft(Vt,e.__scopeScrollArea),[s,o]=x.useState(!1);return x.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),u.jsx(ps,{present:n||s,children:u.jsx(mv,{"data-state":s?"visible":"hidden",...r,ref:t})})}),XN=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ft(Vt,e.__scopeScrollArea),s=e.orientation==="horizontal",o=ga(()=>l("SCROLL_END"),100),[a,l]=KN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,l]),x.useEffect(()=>{const c=i.viewport,d=s?"scrollLeft":"scrollTop";if(c){let f=c[d];const m=()=>{const h=c[d];f!==h&&(l("SCROLL"),o()),f=h};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,s,l,o]),u.jsx(ps,{present:n||a!=="hidden",children:u.jsx(Cd,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Qe(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Qe(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),mv=x.forwardRef((e,t)=>{const n=ft(Vt,e.__scopeScrollArea),{forceMount:r,...i}=e,[s,o]=x.useState(!1),a=e.orientation==="horizontal",l=ga(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?c:d)}},10);return Xr(n.viewport,l),Xr(n.content,l),u.jsx(ps,{present:r||s,children:u.jsx(Cd,{"data-state":s?"visible":"hidden",...i,ref:t})})}),Cd=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ft(Vt,e.__scopeScrollArea),s=x.useRef(null),o=x.useRef(0),[a,l]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=xv(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function f(m,h){return tE(m,o.current,a,h)}return n==="horizontal"?u.jsx(QN,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollLeft,h=xm(m,a,i.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,i.dir))}}):n==="vertical"?u.jsx(qN,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollTop,h=xm(m,a);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null}),QN=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=ft(Vt,e.__scopeScrollArea),[o,a]=x.useState(),l=x.useRef(null),c=Ve(t,l,s.onScrollbarXChange);return x.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(gv,{"data-orientation":"horizontal",...i,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":pa(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const m=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Sv(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ho(o.paddingLeft),paddingEnd:Ho(o.paddingRight)}})}})}),qN=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=ft(Vt,e.__scopeScrollArea),[o,a]=x.useState(),l=x.useRef(null),c=Ve(t,l,s.onScrollbarYChange);return x.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(gv,{"data-orientation":"vertical",...i,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":pa(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const m=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Sv(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ho(o.paddingTop),paddingEnd:Ho(o.paddingBottom)}})}})}),[ZN,pv]=uv(Vt),gv=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...m}=e,h=ft(Vt,n),[v,w]=x.useState(null),S=Ve(t,E=>w(E)),p=x.useRef(null),g=x.useRef(""),y=h.viewport,b=r.content-r.viewport,k=Fn(d),C=Fn(l),N=ga(f,10);function T(E){if(p.current){const P=E.clientX-p.current.left,z=E.clientY-p.current.top;c({x:P,y:z})}}return x.useEffect(()=>{const E=P=>{const z=P.target;(v==null?void 0:v.contains(z))&&k(P,b)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[y,v,b,k]),x.useEffect(C,[r,C]),Xr(v,N),Xr(h.content,N),u.jsx(ZN,{scope:n,scrollbar:v,hasThumb:i,onThumbChange:Fn(s),onThumbPointerUp:Fn(o),onThumbPositionChange:C,onThumbPointerDown:Fn(a),children:u.jsx(dt.div,{...m,ref:S,style:{position:"absolute",...m.style},onPointerDown:Qe(e.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),p.current=v.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(E))}),onPointerMove:Qe(e.onPointerMove,T),onPointerUp:Qe(e.onPointerUp,E=>{const P=E.target;P.hasPointerCapture(E.pointerId)&&P.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=g.current,h.viewport&&(h.viewport.style.scrollBehavior=""),p.current=null})})})}),Uo="ScrollAreaThumb",yv=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pv(Uo,e.__scopeScrollArea);return u.jsx(ps,{present:n||i.hasThumb,children:u.jsx(JN,{ref:t,...r})})}),JN=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,s=ft(Uo,n),o=pv(Uo,n),{onThumbPositionChange:a}=o,l=Ve(t,f=>o.onThumbChange(f)),c=x.useRef(void 0),d=ga(()=>{c.current&&(c.current(),c.current=void 0)},100);return x.useEffect(()=>{const f=s.viewport;if(f){const m=()=>{if(d(),!c.current){const h=nE(f,a);c.current=h,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[s.viewport,d,a]),u.jsx(dt.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Qe(e.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),v=f.clientX-h.left,w=f.clientY-h.top;o.onThumbPointerDown({x:v,y:w})}),onPointerUp:Qe(e.onPointerUp,o.onThumbPointerUp)})});yv.displayName=Uo;var Td="ScrollAreaCorner",vv=x.forwardRef((e,t)=>{const n=ft(Td,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?u.jsx(eE,{...e,ref:t}):null});vv.displayName=Td;var eE=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ft(Td,n),[s,o]=x.useState(0),[a,l]=x.useState(0),c=!!(s&&a);return Xr(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),Xr(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),o(d)}),c?u.jsx(dt.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ho(e){return e?parseInt(e,10):0}function xv(e,t){const n=e/t;return isNaN(n)?0:n}function pa(e){const t=xv(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function tE(e,t,n,r="ltr"){const i=pa(n),s=i/2,o=t||s,a=i-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return wv([l,c],f)(e)}function xm(e,t,n="ltr"){const r=pa(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,o=t.content-t.viewport,a=s-r,l=n==="ltr"?[0,o]:[o*-1,0],c=vd(e,l);return wv([0,o],[0,a])(c)}function wv(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Sv(e,t){return e>0&&e<t}var nE=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const s={left:e.scrollLeft,top:e.scrollTop},o=n.left!==s.left,a=n.top!==s.top;(o||a)&&t(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function ga(e,t){const n=Fn(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Xr(e,t){const n=Fn(t);is(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var bv=dv,rE=hv,iE=vv;const kv=x.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(bv,{ref:r,className:ri("relative overflow-hidden",e),...n,children:[u.jsx(rE,{className:"h-full w-full rounded-[inherit]",children:t}),u.jsx(Cv,{}),u.jsx(iE,{})]}));kv.displayName=bv.displayName;const Cv=x.forwardRef(({className:e,orientation:t="vertical",...n},r)=>u.jsx(kd,{ref:r,orientation:t,className:ri("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:u.jsx(yv,{className:"relative flex-1 rounded-full bg-border"})}));Cv.displayName=kd.displayName;const sE=1,oE=1e6;let hl=0;function aE(){return hl=(hl+1)%Number.MAX_SAFE_INTEGER,hl.toString()}const ml=new Map,wm=e=>{if(ml.has(e))return;const t=setTimeout(()=>{ml.delete(e),Li({type:"REMOVE_TOAST",toastId:e})},oE);ml.set(e,t)},lE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,sE)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?wm(n):e.toasts.forEach(r=>{wm(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},oo=[];let ao={toasts:[]};function Li(e){ao=lE(ao,e),oo.forEach(t=>{t(ao)})}function cE({...e}){const t=aE(),n=i=>Li({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Li({type:"DISMISS_TOAST",toastId:t});return Li({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function uE(){const[e,t]=x.useState(ao);return x.useEffect(()=>(oo.push(t),()=>{const n=oo.indexOf(t);n>-1&&oo.splice(n,1)}),[e]),{...e,toast:cE,dismiss:n=>Li({type:"DISMISS_TOAST",toastId:n})}}const zr=[{name:"Jab",type:"strike",baseDamage:3,staminaCost:2,accuracy:.85,position:["standing","clinch"]},{name:"Cross",type:"strike",baseDamage:6,staminaCost:3,accuracy:.75,position:["standing","clinch"]},{name:"Hook",type:"strike",baseDamage:7,staminaCost:4,accuracy:.7,position:["standing","clinch"]},{name:"Uppercut",type:"strike",baseDamage:8,staminaCost:4,accuracy:.65,position:["standing","clinch"]},{name:"Overhand",type:"strike",baseDamage:10,staminaCost:5,accuracy:.6,position:["standing"]},{name:"Leg Kick",type:"strike",baseDamage:6,staminaCost:4,accuracy:.8,position:["standing"]},{name:"Body Kick",type:"strike",baseDamage:7,staminaCost:4,accuracy:.75,position:["standing"]},{name:"Head Kick",type:"strike",baseDamage:12,staminaCost:6,accuracy:.5,position:["standing"]},{name:"Superman Punch",type:"strike",baseDamage:9,staminaCost:5,accuracy:.55,position:["standing"]},{name:"Spinning Backfist",type:"strike",baseDamage:11,staminaCost:6,accuracy:.45,position:["standing"]},{name:"Flying Knee",type:"strike",baseDamage:13,staminaCost:7,accuracy:.4,position:["standing"]},{name:"Elbow",type:"elbow",baseDamage:8,staminaCost:3,accuracy:.7,position:["clinch","ground_top"]},{name:"Knee",type:"knee",baseDamage:9,staminaCost:4,accuracy:.65,position:["clinch"]}],Ir=[{name:"Single Leg",type:"takedown",baseDamage:0,staminaCost:8,accuracy:.7,position:["standing"]},{name:"Double Leg",type:"takedown",baseDamage:0,staminaCost:10,accuracy:.75,position:["standing"]},{name:"Body Lock",type:"takedown",baseDamage:0,staminaCost:9,accuracy:.65,position:["standing","clinch"]},{name:"Suplex",type:"takedown",baseDamage:5,staminaCost:12,accuracy:.5,position:["clinch"]},{name:"Trip",type:"takedown",baseDamage:0,staminaCost:6,accuracy:.6,position:["clinch"]},{name:"Ankle Pick",type:"takedown",baseDamage:0,staminaCost:7,accuracy:.55,position:["standing"]}],Vr=[{name:"Rear Naked Choke",type:"submission_attempt",baseDamage:0,staminaCost:15,accuracy:.35,position:["ground_top"]},{name:"Guillotine",type:"submission_attempt",baseDamage:0,staminaCost:12,accuracy:.4,position:["clinch","ground_top"]},{name:"Armbar",type:"submission_attempt",baseDamage:0,staminaCost:14,accuracy:.3,position:["ground_top"]},{name:"Triangle",type:"submission_attempt",baseDamage:0,staminaCost:13,accuracy:.35,position:["ground_bottom"]},{name:"Kimura",type:"submission_attempt",baseDamage:0,staminaCost:12,accuracy:.35,position:["ground_top","ground_bottom"]},{name:"Heel Hook",type:"submission_attempt",baseDamage:0,staminaCost:14,accuracy:.25,position:["ground_top"]},{name:"Americana",type:"submission_attempt",baseDamage:0,staminaCost:11,accuracy:.4,position:["ground_top"]}],Or=[{name:"Ground & Pound",type:"ground_pound",baseDamage:5,staminaCost:4,accuracy:.8,position:["ground_top"]},{name:"Elbow on Ground",type:"elbow",baseDamage:7,staminaCost:3,accuracy:.75,position:["ground_top"]},{name:"Hammer Fist",type:"ground_pound",baseDamage:4,staminaCost:2,accuracy:.85,position:["ground_top"]},{name:"Pass Guard",type:"position_advance",baseDamage:0,staminaCost:6,accuracy:.6,position:["ground_top"]},{name:"Get Up",type:"position_escape",baseDamage:0,staminaCost:8,accuracy:.5,position:["ground_bottom"]},{name:"Sweep",type:"position_escape",baseDamage:0,staminaCost:10,accuracy:.45,position:["ground_bottom"]},{name:"Posture Up",type:"position_escape",baseDamage:0,staminaCost:5,accuracy:.7,position:["ground_bottom"]}],dE=180,fE=3,hE={name:"Unknown Fighter",striking:50,punchSpeed:50,kickPower:50,headMovement:50,wrestling:50,takedownDefense:50,submissions:50,submissionDefense:50,groundGame:50,cardio:50,chin:50,recovery:50,aggression:.5,fightIQ:50,heart:50};class mE{constructor(t,n,r){gt(this,"fight");gt(this,"intervalId",null);gt(this,"onAction",null);gt(this,"onRoundEnd",null);gt(this,"onFightEnd",null);gt(this,"tickRate",1e3);gt(this,"llmCallback");gt(this,"cpuCallback");gt(this,"mixedMode",!1);gt(this,"llmFighterId","fighter1");this.fight=this.initializeFight(t,n),this.onAction=(r==null?void 0:r.onAction)||null,this.onRoundEnd=(r==null?void 0:r.onRoundEnd)||null,this.onFightEnd=(r==null?void 0:r.onFightEnd)||null,this.llmCallback=r==null?void 0:r.llmCallback,this.cpuCallback=r==null?void 0:r.cpuCallback,this.mixedMode=(r==null?void 0:r.mixedMode)||!1,this.llmFighterId=(r==null?void 0:r.llmFighterId)||"fighter1"}initializeFight(t,n){const r={...t,id:"fighter1",currentHealth:100,currentStamina:100,position:"standing",hasMount:!1,hasBack:!1,isGrounded:!1,cuts:0,knockdowns:0,takedownsLanded:0,takedownsAttempted:0,significantStrikes:0,totalStrikes:0},i={...n,id:"fighter2",currentHealth:100,currentStamina:100,position:"standing",hasMount:!1,hasBack:!1,isGrounded:!1,cuts:0,knockdowns:0,takedownsLanded:0,takedownsAttempted:0,significantStrikes:0,totalStrikes:0};return{id:Math.random().toString(36).substring(7),fighter1:r,fighter2:i,currentRound:1,rounds:[this.createRound(1)],isComplete:!1}}createRound(t){return{round:t,timeRemaining:dE,isActive:!1,actions:[]}}start(){this.intervalId||(this.fight.rounds[this.fight.currentRound-1].isActive=!0,this.intervalId=setInterval(()=>this.tick(),this.tickRate))}pause(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}resume(){!this.intervalId&&!this.fight.isComplete&&(this.intervalId=setInterval(()=>this.tick(),this.tickRate))}stop(){this.pause(),this.fight.isComplete=!0}getState(){return{...this.fight}}getGameState(t){const n=t==="fighter1"?this.fight.fighter1:this.fight.fighter2,r=t==="fighter1"?this.fight.fighter2:this.fight.fighter1,i=this.fight.rounds[this.fight.currentRound-1],s=(i==null?void 0:i.actions.slice(-3).map(o=>o.description))||[];return{round:this.fight.currentRound,timeRemaining:(i==null?void 0:i.timeRemaining)||0,myHealth:n.currentHealth,myStamina:n.currentStamina,myPosition:n.position,oppHealth:r.currentHealth,oppStamina:r.currentStamina,oppPosition:r.position,recentActions:s}}tick(){var r;const t=this.fight.rounds[this.fight.currentRound-1];if(t.timeRemaining<=0){this.endRound();return}t.timeRemaining--,this.recoverStamina();const n=.7+(this.fight.fighter1.aggression+this.fight.fighter2.aggression)/2;if(Math.random()<n){const i=this.fight.fighter1.aggression,s=this.fight.fighter2.aggression,o=i+s||1,a=Math.random()<i/o?"fighter1":"fighter2",l=this.generateAction(a);l&&(t.actions.push(l),this.applyAction(l),(r=this.onAction)==null||r.call(this,l),this.checkFightEnd()&&this.endFight())}this.checkExhaustion()&&this.endFight()}recoverStamina(){const t=this.fight.fighter1.recovery/100*.3,n=this.fight.fighter2.recovery/100*.3;this.fight.fighter1.currentStamina=Math.min(100,this.fight.fighter1.currentStamina+t),this.fight.fighter2.currentStamina=Math.min(100,this.fight.fighter2.currentStamina+n)}generateAction(t){const n=t==="fighter1"?this.fight.fighter1:this.fight.fighter2,r=t==="fighter1"?this.fight.fighter2:this.fight.fighter1;let i=null;if(this.mixedMode){const d=this.getGameState(t);if(t===this.llmFighterId&&this.llmCallback)return null;if(t!==this.llmFighterId&&this.cpuCallback){const f=this.cpuCallback(n.name,r.name,d);i=this.getTechniqueByName(f)}}if(i||(i=this.selectTechnique(n,r)),!i)return null;const s=this.calculateSuccess(n,r,i),{damage:o,staminaCost:a,description:l,impact:c}=this.calculateOutcome(n,r,i,s);return{timestamp:Date.now(),round:this.fight.currentRound,timeRemaining:this.fight.rounds[this.fight.currentRound-1].timeRemaining,actor:n.name,target:r.name,type:i.type,technique:i,success:s,damage:o,staminaCost:a,description:l,impact:c}}getTechniqueByName(t){const n=[...zr,...Ir,...Vr,...Or];let r=n.find(i=>i.name.toLowerCase()===t.toLowerCase());return r||(r=n.find(i=>i.name.toLowerCase().includes(t.toLowerCase())),r||null)}async generateLlmAction(t){if(!this.llmCallback)return null;const n=t==="fighter1"?this.fight.fighter1:this.fight.fighter2,r=t==="fighter1"?this.fight.fighter2:this.fight.fighter1,i=this.getGameState(t);try{const s=await this.llmCallback(n.name,r.name,i),o=this.getTechniqueByName(s);if(!o)return console.warn("Invalid technique from LLM:",s),null;const a=this.calculateSuccess(n,r,o),{damage:l,staminaCost:c,description:d,impact:f}=this.calculateOutcome(n,r,o,a);return{timestamp:Date.now(),round:this.fight.currentRound,timeRemaining:this.fight.rounds[this.fight.currentRound-1].timeRemaining,actor:n.name,target:r.name,type:o.type,technique:o,success:a,damage:l,staminaCost:c,description:d,impact:f}}catch(s){console.error("LLM callback error:",s);const o=this.selectTechnique(n,r);if(!o)return null;const a=this.calculateSuccess(n,r,o),{damage:l,staminaCost:c,description:d,impact:f}=this.calculateOutcome(n,r,o,a);return{timestamp:Date.now(),round:this.fight.currentRound,timeRemaining:this.fight.rounds[this.fight.currentRound-1].timeRemaining,actor:n.name,target:r.name,type:o.type,technique:o,success:a,damage:l,staminaCost:c,description:d,impact:f}}}selectTechnique(t,n){var a;let r=[];switch(t.position){case"standing":r=[...zr.filter(l=>l.position.includes("standing")),...Ir.filter(l=>l.position.includes("standing"))];break;case"clinch":r=[...zr.filter(l=>l.position.includes("clinch")),...Ir.filter(l=>l.position.includes("clinch")),{name:"Break Clinch",type:"break_clinch",baseDamage:0,staminaCost:5,accuracy:.8,position:["clinch"]}];break;case"ground_top":r=[...Or.filter(l=>l.position.includes("ground_top")),...Vr.filter(l=>l.position.includes("ground_top"))];break;case"ground_bottom":r=[...Or.filter(l=>l.position.includes("ground_bottom")),...Vr.filter(l=>l.position.includes("ground_bottom"))];break}if(r.length===0)return null;const i=r.map(l=>{let c=1;return l.type==="strike"&&(c*=t.striking/50),l.type==="takedown"&&(c*=t.wrestling/50),l.type==="submission_attempt"&&(c*=t.submissions/50),l.type==="ground_pound"&&(c*=t.groundGame/50),t.fightIQ>70&&(c*=l.accuracy*2),n.currentHealth<30&&l.type==="strike"&&(c*=1.5),t.currentStamina<30&&l.staminaCost>8&&(c*=.3),n.position==="ground_bottom"&&l.type==="ground_pound"&&(c*=1.3),{tech:l,weight:c}}),s=i.reduce((l,c)=>l+c.weight,0);let o=Math.random()*s;for(const l of i)if(o-=l.weight,o<=0)return l.tech;return((a=i[0])==null?void 0:a.tech)||null}calculateSuccess(t,n,r){let i=r.accuracy;return r.type==="strike"&&(i*=t.striking/50,i*=1-n.headMovement/200),r.type==="takedown"&&(i*=t.wrestling/50,i*=1-n.takedownDefense/150),r.type==="submission_attempt"&&(i*=t.submissions/50,i*=1-n.submissionDefense/150),i*=.5+t.currentStamina/200,r.type==="strike"&&(i*=1+(100-n.currentHealth)/300),Math.random()<Math.min(.95,i)}calculateOutcome(t,n,r,i){if(!i){const l=[`${t.name} throws a ${r.name} but misses!`,`${t.name} attempts a ${r.name} but ${n.name} defends well!`,`${t.name} goes for a ${r.name} - no connection!`,`${n.name} slips the ${r.name} from ${t.name}!`];return{damage:0,staminaCost:r.staminaCost*.5,description:l[Math.floor(Math.random()*l.length)]}}let s=r.baseDamage,o="light";if(r.type==="strike"&&(s*=t.striking/50,s*=.8+t.punchSpeed/250,Math.random()<.1&&(s*=1.5,o="devastating")),r.type==="ground_pound"&&(s*=t.groundGame/50,s*=.9+t.striking/500),r.type==="strike"||r.type==="ground_pound"){const l=n.chin/100;s*=1.1-l,s>15?o="devastating":s>10?o="heavy":s>5&&(o="moderate")}s*=.85+Math.random()*.3;const a=this.generateDescription(t,n,r,s,o);return{damage:Math.round(s),staminaCost:r.staminaCost,description:a,impact:o}}generateDescription(t,n,r,i,s){const o=s==="devastating"?["CRUSHING","BRUTAL","DEVASTATING","MASSIVE"]:s==="heavy"?["SOLID","HARD","CLEAN","STIFF"]:s==="moderate"?["nice","clean","good","sharp"]:["light","partial","glancing"],a=o[Math.floor(Math.random()*o.length)];return r.type==="submission_attempt"?`${t.name} locks in a ${r.name}! ${n.name} is in trouble!`:r.type==="takedown"?`${t.name} scores with a ${r.name}! Fight goes to the ground!`:i>12?`${a} ${r.name} by ${t.name}! ${n.name} is hurt!`:i>6?`${t.name} lands a ${a} ${r.name}!`:`${t.name} connects with a ${r.name}.`}applyAction(t){const n=t.actor===this.fight.fighter1.name?this.fight.fighter1:this.fight.fighter2,r=t.target===this.fight.fighter1.name?this.fight.fighter1:this.fight.fighter2;n.currentStamina=Math.max(0,n.currentStamina-t.staminaCost),t.damage>0&&(r.currentHealth=Math.max(0,r.currentHealth-t.damage),t.damage>=5&&(n===this.fight.fighter1?this.fight.fighter1.significantStrikes++:this.fight.fighter2.significantStrikes++),n===this.fight.fighter1?this.fight.fighter1.totalStrikes++:this.fight.fighter2.totalStrikes++),t.type==="takedown"&&t.success&&(n.position="ground_top",r.position="ground_bottom",n.takedownsLanded++,n.isGrounded=!0,r.isGrounded=!0),t.type==="break_clinch"&&t.success&&(n.position="standing",r.position="standing"),(t.type==="strike"||t.type==="ground_pound")&&t.impact==="devastating"&&t.damage>10&&Math.random()<.3&&(r.knockdowns++,r.position==="standing"&&(r.position="ground_bottom",n.position="ground_top"))}checkFightEnd(){const t=this.fight.fighter1,n=this.fight.fighter2;return t.currentHealth<=0?(this.fight.winner=n.name,this.fight.method=n.position==="ground_top"||n.position==="ground_bottom"?"TKO":"KO",!0):n.currentHealth<=0?(this.fight.winner=t.name,this.fight.method=t.position==="ground_top"||t.position==="ground_bottom"?"TKO":"KO",!0):t.cuts>=3?(this.fight.winner=n.name,this.fight.method="TKO",!0):n.cuts>=3?(this.fight.winner=t.name,this.fight.method="TKO",!0):!1}checkExhaustion(){if(this.fight.fighter1.currentStamina<5&&this.fight.fighter2.currentStamina<5){const t=100-this.fight.fighter2.currentHealth,n=100-this.fight.fighter1.currentHealth;if(t>n)this.fight.winner=this.fight.fighter1.name;else if(n>t)this.fight.winner=this.fight.fighter2.name;else return this.fight.winner=void 0,this.fight.method="DRAW",!0;return this.fight.method="TKO",!0}return!1}endRound(){var n;const t=this.fight.rounds[this.fight.currentRound-1];t.isActive=!1,this.fight.fighter1.currentHealth=Math.min(100,this.fight.fighter1.currentHealth+this.fight.fighter1.recovery*.5),this.fight.fighter2.currentHealth=Math.min(100,this.fight.fighter2.currentHealth+this.fight.fighter2.recovery*.5),this.fight.fighter1.currentStamina=100,this.fight.fighter2.currentStamina=100,this.fight.fighter1.position="standing",this.fight.fighter2.position="standing",(n=this.onRoundEnd)==null||n.call(this,t),this.fight.currentRound>=fE?this.endFightByDecision():(this.fight.currentRound++,this.fight.rounds.push(this.createRound(this.fight.currentRound)),this.fight.rounds[this.fight.currentRound-1].isActive=!0)}endFightByDecision(){const t=100-this.fight.fighter2.currentHealth+this.fight.fighter1.takedownsLanded*10+this.fight.fighter1.significantStrikes*2,n=100-this.fight.fighter1.currentHealth+this.fight.fighter2.takedownsLanded*10+this.fight.fighter2.significantStrikes*2;t>n?this.fight.winner=this.fight.fighter1.name:n>t?this.fight.winner=this.fight.fighter2.name:this.fight.winner=void 0,this.fight.method=this.fight.winner?"DEC":"DRAW",this.endFight()}endFight(){var t,n;this.pause(),this.fight.isComplete=!0,this.fight.endRound=this.fight.currentRound,this.fight.endTime=(t=this.fight.rounds[this.fight.currentRound-1])==null?void 0:t.timeRemaining,(n=this.onFightEnd)==null||n.call(this,this.fight)}static parseSkillsMd(t){const n={...hE},r=t.split(`
|
|
313
|
+
`);for(const i of r){const[s,o]=i.split(":").map(l=>l.trim());if(!s||!o)continue;const a=parseFloat(o);if(isNaN(a)){s==="name"&&(n.name=o),s==="nickname"&&(n.nickname=o);continue}switch(s.toLowerCase()){case"striking":case"boxing":n.striking=a;break;case"punch_speed":case"handspeed":n.punchSpeed=a;break;case"kicks":case"kick_power":n.kickPower=a;break;case"head_movement":case"defense":n.headMovement=a;break;case"wrestling":case"takedowns":n.wrestling=a;break;case"takedown_defense":case"tdd":n.takedownDefense=a;break;case"bjj":case"submissions":n.submissions=a;break;case"submission_defense":n.submissionDefense=a;break;case"ground_game":case"grappling":n.groundGame=a;break;case"cardio":case"stamina":n.cardio=a;break;case"chin":case"durability":n.chin=a;break;case"recovery":n.recovery=a;break;case"iq":case"fight_iq":n.fightIQ=a;break;case"heart":n.heart=a;break;case"aggression":n.aggression=a;break}}return n}}async function pE(e,t,n,r,i=!1){const s={id:n.id,userId:r,agent1Id:e.metadata.id,agent2Id:t.metadata.id,winnerId:n.winner?n.winner===e.skills.name?e.metadata.id:t.metadata.id:null,method:n.method||"DEC",round:n.endRound||3,endTime:n.endTime||0,fightData:n,prizeAwarded:!1,prizeAmount:0,isPractice:i,createdAt:Date.now()};return gE(s),s}function gE(e){const t=zu();t.unshift({id:e.id,timestamp:e.createdAt,agent1:{id:e.agent1Id,name:""},agent2:{id:e.agent2Id,name:""},winner:e.winnerId,method:e.method,round:e.round,time:`${Math.floor(e.endTime/60)}:${(e.endTime%60).toString().padStart(2,"0")}`,fightData:e.fightData}),Og(t[0])}async function yE(e){return zu().map((n,r)=>({id:n.id||`local_${r}`,agent1Id:n.agent1.id,agent2Id:n.agent2.id,winnerId:n.winner||null,method:n.method,round:n.round,endTime:0,fightData:n.fightData,prizeAwarded:!1,prizeAmount:0,createdAt:n.timestamp}))}const vE={easy:{statMultiplier:.7,aggressionMod:-.2,fightIqMod:-20,randomness:.4},medium:{statMultiplier:.9,aggressionMod:0,fightIqMod:0,randomness:.2},hard:{statMultiplier:1.1,aggressionMod:.15,fightIqMod:15,randomness:.1}};function xE(e,t,n){const r=vE[e.difficulty];if(Math.random()<r.randomness)return pl(e.position);if(n.targetIsHurt&&n.targetHealth<25){if(n.actorPosition==="standing"){const s=["Head Kick","Superman Punch","Flying Knee","Overhand"];return s[Math.floor(Math.random()*s.length)]}if(n.actorPosition==="ground_top")return"Ground & Pound"}if(n.isTired||n.actorStamina<30){if(n.actorPosition==="clinch")return Math.random()>.5?"Break Clinch":"Knee";if(n.actorPosition==="ground_bottom")return"Get Up";const s=["Jab","Leg Kick"];return s[Math.floor(Math.random()*s.length)]}if(!n.isWinning&&n.targetHealth>n.actorHealth+20&&n.actorPosition==="standing"&&Math.random()>.4){const s=["Double Leg","Single Leg","Body Lock"];return s[Math.floor(Math.random()*s.length)]}switch(e.position){case"standing":if(e.wrestling>e.striking+15&&Math.random()>.3){const a=["Double Leg","Single Leg","Body Lock","Ankle Pick"];return a[Math.floor(Math.random()*a.length)]}else if(e.striking>e.wrestling){const a=["Jab","Cross","Hook","Leg Kick","Body Kick","Uppercut"];return a[Math.floor(Math.random()*a.length)]}return pl("standing");case"clinch":if(e.submissions>60&&Math.random()>.5)return"Guillotine";const s=["Knee","Elbow","Trip","Break Clinch"];return s[Math.floor(Math.random()*s.length)];case"ground_top":if(e.submissions>60&&Math.random()>.4){const a=["Rear Naked Choke","Armbar","Kimura","Americana"];return a[Math.floor(Math.random()*a.length)]}const o=["Ground & Pound","Elbow on Ground","Pass Guard"];return o[Math.floor(Math.random()*o.length)];case"ground_bottom":if(e.groundGame>60&&Math.random()>.4){const a=["Sweep","Posture Up"];return a[Math.floor(Math.random()*a.length)]}return"Get Up"}return pl(e.position)}function pl(e){const t={standing:["Jab","Cross","Hook","Leg Kick","Double Leg"],clinch:["Knee","Elbow","Break Clinch","Trip"],ground_top:["Ground & Pound","Elbow on Ground","Pass Guard","Rear Naked Choke"],ground_bottom:["Get Up","Sweep","Posture Up","Triangle"]},n=t[e]||t.standing;return n[Math.floor(Math.random()*n.length)]}function Tv(e){const t=[...zr,...Ir,...Vr,...Or];return[...new Set(t.filter(n=>n.position.includes(e)).map(n=>n.name))]}function Sm(){const e=[...zr,...Ir,...Vr,...Or];return[...new Set(e.map(t=>t.name))]}function wE(e,t,n){const r=Tv(n.myPosition),i=n.recentActions.length>0?n.recentActions.slice(-3).map(s=>`- ${s}`).join(`
|
|
314
|
+
`):"No recent actions";return`You are ${e.name}, an MMA fighter in a live fight.
|
|
315
|
+
|
|
316
|
+
## FIGHT SITUATION
|
|
317
|
+
- Round: ${n.round}/3
|
|
318
|
+
- Time Remaining: ${Math.floor(n.timeRemaining/60)}:${(n.timeRemaining%60).toString().padStart(2,"0")}
|
|
319
|
+
- Your Health: ${n.myHealth.toFixed(0)}%
|
|
320
|
+
- Your Stamina: ${n.myStamina.toFixed(0)}%
|
|
321
|
+
- Your Position: ${n.myPosition}
|
|
322
|
+
|
|
323
|
+
## OPPONENT STATUS
|
|
324
|
+
- Opponent: ${t.name}
|
|
325
|
+
- Opponent Health: ${n.oppHealth.toFixed(0)}%
|
|
326
|
+
- Opponent Stamina: ${n.oppStamina.toFixed(0)}%
|
|
327
|
+
- Opponent Position: ${n.oppPosition}
|
|
328
|
+
|
|
329
|
+
## YOUR STATS
|
|
330
|
+
- Striking: ${e.striking}
|
|
331
|
+
- Wrestling: ${e.wrestling}
|
|
332
|
+
- Submissions: ${e.submissions}
|
|
333
|
+
- Ground Game: ${e.groundGame}
|
|
334
|
+
- Cardio: ${e.cardio}
|
|
335
|
+
- Fight IQ: ${e.fightIQ}
|
|
336
|
+
- Aggression: ${(e.aggression*100).toFixed(0)}%
|
|
337
|
+
|
|
338
|
+
## RECENT ACTIONS
|
|
339
|
+
${i}
|
|
340
|
+
|
|
341
|
+
## AVAILABLE TECHNIQUES (from your current position)
|
|
342
|
+
${r.map(s=>`- ${s}`).join(`
|
|
343
|
+
`)}
|
|
344
|
+
|
|
345
|
+
## YOUR TASK
|
|
346
|
+
Choose ONE technique from the available techniques list above. Consider:
|
|
347
|
+
1. Your position advantage
|
|
348
|
+
2. Your opponent's health and stamina
|
|
349
|
+
3. Your own stamina level
|
|
350
|
+
4. Whether you're winning or losing the fight
|
|
351
|
+
5. Whether to go for a finish or conserve energy
|
|
352
|
+
|
|
353
|
+
Respond in JSON format:
|
|
354
|
+
{"technique": "Technique Name", "reasoning": "Brief reason for your choice"}`}async function SE(e,t,n,r){const i=wE(e,t,n);try{return r.provider==="openai"?await bE(i,r):await kE(i,r)}catch(s){return console.error("LLM API error:",s),CE(n.myPosition)}}async function bE(e,t){var o,a;const n=t.model||"gpt-4o-mini",r=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.apiKey}`},signal:AbortSignal.timeout(5e3),body:JSON.stringify({model:n,messages:[{role:"system",content:"You are an MMA fighter making tactical decisions in a fight. Respond with JSON only."},{role:"user",content:e}],temperature:.7,max_tokens:200})});if(!r.ok)throw new Error(`OpenAI API error: ${r.status}`);const s=((a=(o=(await r.json()).choices[0])==null?void 0:o.message)==null?void 0:a.content)||"";return Nv(s)}async function kE(e,t){var o;const n=t.model||"claude-3-haiku-20240307",r=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t.apiKey,"anthropic-version":"2023-06-01"},signal:AbortSignal.timeout(5e3),body:JSON.stringify({model:n,max_tokens:200,system:"You are an MMA fighter making tactical decisions in a fight. Respond with JSON only.",messages:[{role:"user",content:e}],temperature:.7})});if(!r.ok)throw new Error(`Anthropic API error: ${r.status}`);const s=((o=(await r.json()).content[0])==null?void 0:o.text)||"";return Nv(s)}function Nv(e){try{const t=e.match(/\{[\s\S]*\}/);if(!t)throw new Error("No JSON found in response");const n=JSON.parse(t[0]);if(n.technique)return n.technique;throw new Error("No technique in response")}catch{console.error("Failed to parse LLM response:",e);const n=e.match(/"technique"\s*:\s*"([^"]+)"/i);if(n)return n[1];throw new Error("Could not parse technique from LLM response")}}function CE(e){const t=Tv(e);return t.length===0?Sm()[Math.floor(Math.random()*Sm().length)]:t[Math.floor(Math.random()*t.length)]}async function TE(e){return null}function NE({onDismiss:e,agent1Name:t,agent2Name:n}){const[r,i]=x.useState(0),[s,o]=x.useState(""),a=[{title:"Welcome to the Arena",content:"Two AI agents. One cage. No mercy.",detail:`${t} vs ${n} — a 3-round battle for supremacy.`},{title:"How It Works",content:"Real-time MMA combat simulation.",detail:"Every punch, takedown, and submission attempt is calculated based on your agent's skills.md configuration."},{title:"The Action Feed",content:"Watch the fight unfold move-by-move.",detail:"Light hits in cyan. Heavy damage in orange. Critical strikes in red. Position changes in real-time."},{title:"Victory Conditions",content:"KO • TKO • Submission • Decision",detail:"Win by knockout, ref stoppage, tapout, or judges' scorecards. Your agent's legacy is permanent."}],l=a[r];x.useEffect(()=>{o("");let d=0;const f=l.content,m=setInterval(()=>{d<f.length?(o(f.slice(0,d+1)),d++):clearInterval(m)},30);return()=>clearInterval(m)},[r]);const c=()=>{r<a.length-1?i(r+1):e()};return u.jsx(Et.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/95 backdrop-blur-sm flex items-center justify-center p-6",children:u.jsxs(Et.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},className:"w-full max-w-2xl bg-zinc-950 border border-zinc-800 rounded-xl overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 bg-zinc-900/50 border-b border-zinc-800",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(uc,{className:"w-5 h-5 text-orange-500"}),u.jsx("span",{className:"font-mono text-sm text-zinc-400",children:"fightbook_init.sh"})]}),u.jsx("button",{onClick:e,className:"text-zinc-500 hover:text-white transition-colors",children:u.jsx(Gg,{className:"w-5 h-5"})})]}),u.jsx("div",{className:"flex items-center gap-1 px-6 py-3 bg-zinc-900/30",children:a.map((d,f)=>u.jsx("div",{className:`h-1 flex-1 rounded-full transition-colors ${f<=r?"bg-orange-500":"bg-zinc-800"}`},f))}),u.jsx("div",{className:"p-8",children:u.jsx(Er,{mode:"wait",children:u.jsxs(Et.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-zinc-500",children:[u.jsxs("span",{className:"text-orange-500",children:["0",r+1]}),u.jsx("span",{children:"/"}),u.jsxs("span",{children:["0",a.length]})]}),u.jsx("h2",{className:"text-3xl font-display text-white",children:l.title}),u.jsxs("div",{className:"font-mono text-xl text-orange-400",children:[u.jsx("span",{className:"text-zinc-600",children:"$"})," ",s,u.jsx("span",{className:"animate-pulse",children:"_"})]}),u.jsx("p",{className:"text-zinc-400 leading-relaxed",children:l.detail}),u.jsxs("div",{className:"py-4",children:[r===0&&u.jsx(EE,{agent1:t,agent2:n}),r===1&&u.jsx(PE,{}),r===2&&u.jsx(jE,{}),r===3&&u.jsx(AE,{})]})]},r)})}),u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 bg-zinc-900/30 border-t border-zinc-800",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500",children:[u.jsx(oS,{className:"w-4 h-4"}),u.jsx("span",{children:"Press SPACE to skip"})]}),u.jsx(Dt,{onClick:c,className:"bg-orange-500 hover:bg-orange-400 text-black font-bold",children:r===a.length-1?u.jsxs(u.Fragment,{children:[u.jsx(tr,{className:"w-4 h-4 mr-2"}),"Enter Arena"]}):u.jsxs(u.Fragment,{children:["Next",u.jsx(Iu,{className:"w-4 h-4 ml-2"})]})})]})]})})}function EE({agent1:e,agent2:t}){return u.jsxs("div",{className:"flex items-center justify-center gap-6 py-4",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"w-16 h-16 rounded-full bg-gradient-to-br from-orange-500/20 to-orange-600/20 border border-orange-500/30 flex items-center justify-center text-2xl font-display text-orange-400",children:e.charAt(0)}),u.jsx("p",{className:"text-xs text-zinc-500 mt-2 font-mono",children:e})]}),u.jsx("div",{className:"text-3xl font-display text-zinc-600",children:"VS"}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"w-16 h-16 rounded-full bg-gradient-to-br from-purple-500/20 to-purple-600/20 border border-purple-500/30 flex items-center justify-center text-2xl font-display text-purple-400",children:t.charAt(0)}),u.jsx("p",{className:"text-xs text-zinc-500 mt-2 font-mono",children:t})]})]})}function PE(){const e=[{icon:Ou,label:"Striking",color:"text-orange-500"},{icon:Kg,label:"Grappling",color:"text-blue-500"},{icon:Wg,label:"Fight IQ",color:"text-purple-500"},{icon:Hg,label:"Cardio",color:"text-green-500"}];return u.jsx("div",{className:"grid grid-cols-4 gap-3",children:e.map(t=>u.jsxs("div",{className:"bg-zinc-900/50 border border-zinc-800 rounded-lg p-4 text-center",children:[u.jsx(t.icon,{className:`w-6 h-6 ${t.color} mx-auto mb-2`}),u.jsx("p",{className:"text-xs text-zinc-500",children:t.label})]},t.label))})}function jE(){const e=[{text:"2:47 Clean jab lands",color:"text-cyan-400"},{text:"2:31 Takedown attempt...",color:"text-zinc-400"},{text:"2:28 BLOCKED",color:"text-yellow-400"},{text:"2:15 CRUSHING hook!",color:"text-red-400"}];return u.jsxs("div",{className:"bg-zinc-950 border border-zinc-800 rounded-lg p-4 font-mono text-sm",children:[e.map((t,n)=>u.jsx("div",{className:`${t.color} mb-1`,children:t.text},n)),u.jsx("div",{className:"text-zinc-600 mt-2",children:"_"})]})}function AE(){const e=[{icon:Fu,label:"KO",desc:"Knockout"},{icon:sS,label:"TKO",desc:"Ref Stop"},{icon:Ou,label:"SUB",desc:"Submission"},{icon:us,label:"DEC",desc:"Decision"}];return u.jsx("div",{className:"flex items-center justify-center gap-3",children:e.map(t=>u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"w-12 h-12 rounded-lg bg-zinc-900 border border-zinc-800 flex items-center justify-center mb-2",children:u.jsx(t.icon,{className:"w-5 h-5 text-orange-500"})}),u.jsx("p",{className:"text-xs font-bold text-white",children:t.label}),u.jsx("p",{className:"text-[10px] text-zinc-600",children:t.desc})]},t.label))})}function RE({agent1:e,agent2:t,onFightComplete:n,onBack:r,isCpuOpponent:i=!1,cpuDifficulty:s="medium"}){const{toast:o}=uE(),[a,l]=x.useState(null),[c,d]=x.useState(!1),[f,m]=x.useState(1),[h,v]=x.useState([]),[w,S]=x.useState(!0),[p,g]=x.useState(!1),[y,b]=x.useState(null),[k,C]=x.useState(()=>!sessionStorage.getItem("fightbook_seen_intro")),N=x.useRef(null),T=x.useRef(null),E=x.useRef(null),P=e.metadata.id.startsWith("cpu_"),z=t.metadata.id.startsWith("cpu_"),I=!P&&!z,J=x.useCallback((V,K,U)=>{const X=P?e:t,O={...lr(X),id:X.metadata.id,isCpu:!0,difficulty:s,position:U.myPosition},De=lr(P?t:e);return xE(O,De,{round:U.round,timeRemaining:U.timeRemaining,actorHealth:U.myHealth,actorStamina:U.myStamina,actorPosition:U.myPosition,targetHealth:U.oppHealth,targetStamina:U.oppStamina,targetPosition:U.oppPosition,recentActions:U.recentActions,isWinning:U.myHealth>U.oppHealth,isTired:U.myStamina<30,targetIsHurt:U.oppHealth<40})},[e,t,P,z,s]),le=x.useCallback(async(V,K,U)=>{g(!0),b(V);try{const X=await TE(e.metadata.id);if(!X)return o({title:"No API Key",description:"Fighter doesn't have an API key configured. Using random moves.",variant:"destructive"}),km(U.myPosition);const O={provider:"openai",apiKey:X},De=lr(e),Ge=lr(t),Ot=await SE(De,Ge,U,O);return o({title:"LLM Decision",description:`Selected: ${Ot}`,duration:2e3}),Ot}catch(X){return console.error("LLM error:",X),o({title:"LLM Error",description:"Using fallback random technique",variant:"destructive"}),km(U.myPosition)}finally{g(!1),b(null)}},[e,t,o]),pe=x.useCallback(()=>{const V=lr(e),K=lr(t),U=i||P||z,X={onAction:O=>{var De;v(Ge=>[...Ge,O]),l(((De=N.current)==null?void 0:De.getState())||null)},onRoundEnd:()=>{var O;l(((O=N.current)==null?void 0:O.getState())||null)},onFightEnd:O=>{d(!1),l(O),Og({id:O.id,timestamp:Date.now(),agent1:{id:e.metadata.id,name:e.skills.name},agent2:{id:t.metadata.id,name:t.skills.name},winner:O.winner||null,method:O.method||"DEC",round:O.endRound||3,time:A(O.endTime||0),fightData:O});const De=P||z;if(pE(e,t,O,void 0,De).then(()=>{o({title:"Fight Saved!",description:De?"Practice fight saved (won't affect leaderboard).":"Fight saved to database."})}).catch(Ge=>{console.error("Failed to save to database:",Ge),o({title:"Fight Saved (Local)",description:"Saved to browser storage only."})}),O.winner&&!De){const Ge=O.winner===e.skills.name?e.metadata.id:t.metadata.id,Ot=O.winner===e.skills.name?t.metadata.id:e.metadata.id;Promise.all([eN(Ge),tN(Ot)]).then(()=>{console.log("Win/loss counts updated")}).catch(Dn=>{console.error("Failed to update win/loss counts:",Dn)})}else De&&console.log("Practice fight - leaderboard stats not updated");o({title:O.winner?`${O.winner} Wins!`:"Draw!",description:`by ${O.method}`}),n==null||n(O)}};U&&(X.cpuCallback=J,X.mixedMode=!0,X.llmFighterId="fighter1"),I&&(X.llmCallback=le,X.mixedMode=!0),N.current=new mE(V,K,X),l(N.current.getState()),v([])},[e,t,i,P,z,I,J,le,n,o]);x.useEffect(()=>(pe(),()=>{var V;(V=N.current)==null||V.stop()}),[pe]),x.useEffect(()=>{E.current&&(E.current.scrollTop=E.current.scrollHeight)},[h]);const ne=()=>{N.current&&(c?N.current.pause():(a!=null&&a.isComplete&&pe(),N.current.resume()),d(!c))},$=()=>{var V;(V=N.current)==null||V.stop(),d(!1),pe()},j=()=>{N.current&&(N.current.pause(),$())},A=V=>{const K=Math.floor(V/60),U=V%60;return`${K}:${U.toString().padStart(2,"0")}`};if(!a)return null;const D=a.rounds[a.currentRound-1],W=D?A(D.timeRemaining):"0:00",F=()=>{C(!1),sessionStorage.setItem("fightbook_seen_intro","true")};return u.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[u.jsx(Er,{children:k&&u.jsx(NE,{onDismiss:F,agent1Name:e.skills.name,agent2Name:t.skills.name})}),u.jsx("header",{className:"border-b border-border/50 bg-background/95 backdrop-blur-sm sticky top-0 z-50",children:u.jsx("div",{className:"px-6 py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[r&&u.jsx(Dt,{variant:"ghost",onClick:r,children:"← Back"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-primary to-secondary flex items-center justify-center",children:u.jsx(tr,{className:"w-5 h-5 text-white"})}),u.jsxs("div",{children:[u.jsx("h1",{className:"font-display text-lg",children:"FightBook Arena"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Live Text Combat"})]})]})]}),u.jsxs("div",{className:"flex items-center gap-4",children:[p&&u.jsxs("div",{className:"flex items-center gap-2 text-primary animate-pulse",children:[u.jsx(Wg,{className:"w-4 h-4"}),u.jsxs("span",{className:"text-sm font-medium",children:[y," is thinking..."]})]}),u.jsx("div",{className:"flex items-center gap-1 bg-muted rounded-lg p-1",children:[1,2,4].map(V=>u.jsxs("button",{onClick:()=>m(V),className:`px-3 py-1 rounded text-sm font-medium transition-colors ${f===V?"bg-background shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[V,"x"]},V))}),u.jsx(Dt,{variant:"outline",size:"sm",onClick:()=>S(!w),children:w?"Hide Stats":"Show Stats"})]})]})})}),u.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[u.jsx(Er,{children:w&&u.jsx(Et.div,{initial:{width:0,opacity:0},animate:{width:320,opacity:1},exit:{width:0,opacity:0},className:"border-r border-border/50 overflow-y-auto",children:u.jsx(bm,{agent:e,state:a.fighter1,isWinner:a.winner===a.fighter1.name,isLeft:!0})})}),u.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[u.jsx("div",{className:"border-b border-border/50 px-6 py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs(ma,{variant:"outline",className:"text-lg px-4 py-1",children:["ROUND ",a.currentRound," / 3"]}),u.jsxs("div",{className:"flex items-center gap-2 text-2xl font-display",children:[u.jsx(hS,{className:"w-5 h-5 text-primary"}),u.jsx(Er,{mode:"wait",children:u.jsx(Et.span,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:D!=null&&D.timeRemaining&&D.timeRemaining<=10?"text-red-500":"",children:W},W)})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Dt,{variant:"outline",size:"icon",onClick:$,children:u.jsx(uS,{className:"w-4 h-4"})}),u.jsx(Dt,{variant:c?"outline":"default",size:"icon",onClick:ne,className:"h-12 w-12",children:c?u.jsx(aS,{className:"w-5 h-5"}):u.jsx(cS,{className:"w-5 h-5 ml-0.5"})}),u.jsx(Dt,{variant:"outline",size:"icon",onClick:j,children:u.jsx(fS,{className:"w-4 h-4"})})]})]})}),u.jsx(kv,{className:"flex-1 p-6",ref:E,children:u.jsxs("div",{className:"max-w-3xl mx-auto space-y-2",children:[h.length===0&&u.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[u.jsx(tr,{className:"w-12 h-12 mx-auto mb-4 opacity-30"}),u.jsx("p",{className:"text-lg",children:"Fight ready to begin..."}),u.jsx("p",{className:"text-sm",children:"Press play to start"})]}),h.map((V,K)=>u.jsx(ME,{action:V,isNew:K===h.length-1,agent1Name:e.skills.name,agent2Name:t.skills.name},`${V.timestamp}-${K}`)),D&&!D.isActive&&a.currentRound<3&&u.jsx(DE,{round:a.currentRound,fighter1:a.fighter1,fighter2:a.fighter2}),a.isComplete&&u.jsx(_E,{fight:a}),u.jsx("div",{ref:T})]})})]}),u.jsx(Er,{children:w&&u.jsx(Et.div,{initial:{width:0,opacity:0},animate:{width:320,opacity:1},exit:{width:0,opacity:0},className:"border-l border-border/50 overflow-y-auto",children:u.jsx(bm,{agent:t,state:a.fighter2,isWinner:a.winner===a.fighter2.name})})})]})]})}function ME({action:e,isNew:t,agent1Name:n,agent2Name:r}){const i=e.actor===n,s=()=>{switch(e.impact){case"devastating":return"text-red-500 border-red-500/30 bg-red-500/5";case"heavy":return"text-orange-500 border-orange-500/30 bg-orange-500/5";case"moderate":return"text-yellow-500 border-yellow-500/30 bg-yellow-500/5";default:return"text-muted-foreground border-border/30 bg-muted/20"}};return u.jsxs(Et.div,{initial:t?{opacity:0,x:i?-20:20}:!1,animate:{opacity:1,x:0},className:`flex gap-4 p-3 rounded-lg border ${s()} ${i?"flex-row":"flex-row-reverse"}`,children:[u.jsxs("div",{className:"text-xs font-mono text-muted-foreground pt-1",children:["R",e.round," ",LE(e.timeRemaining)]}),u.jsxs("div",{className:`flex-1 ${i?"text-left":"text-right"}`,children:[u.jsx("p",{className:`text-sm ${e.impact==="devastating"?"font-bold":""}`,children:e.description}),e.damage>0&&u.jsxs("span",{className:"text-xs text-red-400",children:["-",e.damage," HP"]})]}),e.impact&&e.impact!=="light"&&u.jsx(ma,{variant:"outline",className:"text-xs capitalize",children:e.impact})]})}function DE({round:e,fighter1:t,fighter2:n}){return u.jsxs("div",{className:"my-6 p-6 bg-muted/30 rounded-xl border border-border/50 text-center",children:[u.jsxs("h3",{className:"text-2xl font-display mb-4",children:["End of Round ",e]}),u.jsxs("div",{className:"grid grid-cols-2 gap-8 max-w-md mx-auto",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:t.name}),u.jsx("div",{className:"text-2xl font-display",children:t.significantStrikes}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Significant Strikes"})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:n.name}),u.jsx("div",{className:"text-2xl font-display",children:n.significantStrikes}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Significant Strikes"})]})]})]})}function _E({fight:e}){return u.jsxs(Et.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"my-8 p-8 bg-gradient-to-br from-primary/20 to-secondary/20 rounded-2xl border border-primary/30 text-center",children:[u.jsx(us,{className:"w-16 h-16 mx-auto mb-4 text-yellow-500"}),u.jsx("h2",{className:"text-4xl font-display mb-2",children:e.winner?`${e.winner} Wins!`:"Draw!"}),u.jsxs("p",{className:"text-xl text-muted-foreground mb-6",children:["by ",e.method," ",e.endRound!==3&&`- Round ${e.endRound}`]}),u.jsxs("div",{className:"grid grid-cols-2 gap-6 max-w-lg mx-auto",children:[u.jsxs("div",{className:"bg-background/50 rounded-lg p-4",children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:e.fighter1.name}),u.jsxs("div",{className:"text-3xl font-display",children:[Math.round(e.fighter1.currentHealth),"%"]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Health Remaining"})]}),u.jsxs("div",{className:"bg-background/50 rounded-lg p-4",children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:e.fighter2.name}),u.jsxs("div",{className:"text-3xl font-display",children:[Math.round(e.fighter2.currentHealth),"%"]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Health Remaining"})]})]})]})}function bm({agent:e,state:t,isWinner:n,isLeft:r=!1}){const i=t.currentHealth,s=t.currentStamina;return u.jsxs("div",{className:"p-6 space-y-6",children:[u.jsxs("div",{className:`flex items-center gap-4 ${r?"":"flex-row-reverse text-right"}`,children:[u.jsx("div",{className:"w-16 h-16 rounded-full bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center text-2xl font-display",children:e.skills.name.charAt(0)}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-display text-xl",children:e.skills.name}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:['"',e.skills.nickname,'"']}),n&&u.jsx(ma,{className:"mt-1 bg-yellow-500 text-black",children:"WINNER"})]})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[u.jsx("span",{className:"text-red-400",children:"Health"}),u.jsxs("span",{className:"font-mono",children:[Math.round(i),"%"]})]}),u.jsx($c,{value:i,className:"h-3 bg-red-950"})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[u.jsx("span",{className:"text-yellow-400",children:"Stamina"}),u.jsxs("span",{className:"font-mono",children:[Math.round(s),"%"]})]}),u.jsx($c,{value:s,className:"h-2 bg-yellow-950"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Fight Stats"}),u.jsx(on,{label:"Significant Strikes",value:t.significantStrikes}),u.jsx(on,{label:"Total Strikes",value:t.totalStrikes}),u.jsx(on,{label:"Takedowns",value:t.takedownsLanded}),u.jsx(on,{label:"Knockdowns",value:t.knockdowns})]}),u.jsxs("div",{className:"pt-4 border-t border-border/50 space-y-3",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Agent Stats"}),u.jsx(on,{label:"Striking",value:e.skills.striking,icon:Ou}),u.jsx(on,{label:"Wrestling",value:e.skills.wrestling,icon:Kg}),u.jsx(on,{label:"Submissions",value:e.skills.submissions,icon:Fu}),u.jsx(on,{label:"Cardio",value:e.skills.cardio,icon:Hg})]}),u.jsxs("div",{className:"pt-4 border-t border-border/50",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Career"}),u.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[u.jsxs("div",{className:"bg-muted/30 rounded-lg p-2",children:[u.jsx("div",{className:"text-lg font-display text-green-500",children:e.metadata.wins}),u.jsx("div",{className:"text-xs text-muted-foreground",children:"Wins"})]}),u.jsxs("div",{className:"bg-muted/30 rounded-lg p-2",children:[u.jsx("div",{className:"text-lg font-display text-red-500",children:e.metadata.losses}),u.jsx("div",{className:"text-xs text-muted-foreground",children:"Losses"})]}),u.jsxs("div",{className:"bg-muted/30 rounded-lg p-2",children:[u.jsx("div",{className:"text-lg font-display",children:e.metadata.ranking}),u.jsx("div",{className:"text-xs text-muted-foreground",children:"Rating"})]})]})]})]})}function on({label:e,value:t,icon:n}){return u.jsxs("div",{className:"flex items-center justify-between text-sm",children:[u.jsxs("span",{className:"text-muted-foreground flex items-center gap-2",children:[n&&u.jsx(n,{className:"w-3 h-3"}),e]}),u.jsx("span",{className:"font-mono font-medium",children:t})]})}function lr(e){const t=e.skills;return{name:t.name,nickname:t.nickname,striking:t.striking,punchSpeed:t.punchSpeed,kickPower:t.kickPower,headMovement:t.headMovement,wrestling:t.wrestling,takedownDefense:t.takedownDefense,submissions:t.submissions,submissionDefense:t.submissionDefense,groundGame:(t.groundAndPound+t.topControl+t.bottomGame)/3,cardio:t.cardio,chin:t.chin,recovery:t.recovery,aggression:t.aggression,fightIQ:t.fightIQ,heart:t.heart}}function LE(e){const t=Math.floor(e/60),n=e%60;return`${t}:${n.toString().padStart(2,"0")}`}function km(e){const t=[...zr,...Ir,...Vr,...Or],n=t.filter(r=>r.position.includes(e));return n.length===0?t[Math.floor(Math.random()*t.length)].name:n[Math.floor(Math.random()*n.length)].name}const Ev="fightbook_votes";async function zE(e,t){return FE(e,t||"anonymous")}async function IE(e,t){return $E(e,t||"anonymous")}async function VE(e,t){return await Pv(e,t)?(await IE(e,t),{voted:!1}):(await zE(e,t),{voted:!0})}async function OE(e){return BE(e)}async function Pv(e,t){return t?UE(e,t):!1}function ya(){try{const e=localStorage.getItem(Ev);return e?JSON.parse(e):{}}catch{return{}}}function jv(e){localStorage.setItem(Ev,JSON.stringify(e))}function FE(e,t){const n=ya();return n[e]||(n[e]=[]),n[e].includes(t)||(n[e].push(t),jv(n)),!0}function $E(e,t){const n=ya();return n[e]&&(n[e]=n[e].filter(r=>r!==t),jv(n)),!0}function BE(e){var n;return((n=ya()[e])==null?void 0:n.length)||0}function UE(e,t){var r;return((r=ya()[e])==null?void 0:r.includes(t))||!1}function HE({fightId:e,userId:t,initialVoteCount:n=0,showCount:r=!0,size:i="default",variant:s="outline"}){const[o,a]=x.useState(n),[l,c]=x.useState(!1),[d,f]=x.useState(!1),[m,h]=x.useState(!1);x.useEffect(()=>{v()},[e,t]);const v=async()=>{try{const[p,g]=await Promise.all([OE(e),Pv(e,t)]);a(p),c(g)}catch(p){console.error("Failed to load vote status:",p)}finally{h(!0)}},w=async()=>{if(!d){f(!0);try{(await VE(e,t)).voted?(a(g=>g+1),c(!0),Hn.success("You voted this fight as entertaining!",{description:"Thanks for your vote."})):(a(g=>Math.max(0,g-1)),c(!1),Hn.info("Vote removed"))}catch{Hn.error("Failed to vote",{description:"Please try again."})}finally{f(!1)}}},S={sm:"h-7 text-xs px-2",default:"h-9 px-3",lg:"h-11 px-4"};return m?u.jsx(Et.div,{whileTap:{scale:.95},children:u.jsxs(Dt,{variant:s,size:"sm",onClick:w,disabled:d,className:`
|
|
355
|
+
${S[i]} gap-1.5 transition-all
|
|
356
|
+
${l?"bg-orange-500/20 text-orange-500 border-orange-500/50 hover:bg-orange-500/30":"hover:bg-orange-500/10 hover:text-orange-500 hover:border-orange-500/30"}
|
|
357
|
+
`,children:[d?u.jsx(Gf,{className:"w-4 h-4 animate-spin"}):u.jsx(Vu,{className:`w-4 h-4 ${l?"fill-current":""}`}),u.jsx("span",{children:"Entertaining"}),r&&u.jsx(ma,{variant:"secondary",className:`ml-1 text-xs ${l?"bg-orange-500/30 text-orange-200":""}`,children:o})]})}):u.jsxs(Dt,{variant:s,size:"sm",disabled:!0,className:`${S[i]} opacity-50`,children:[u.jsx(Gf,{className:"w-4 h-4 animate-spin mr-1"}),r&&u.jsx("span",{className:"ml-1",children:"..."})]})}function WE({onBack:e}){const[t,n]=x.useState([]),[r,i]=x.useState({}),[s,o]=x.useState(!0),[a,l]=x.useState("all"),[c,d]=x.useState(null);x.useEffect(()=>{f()},[]);const f=async()=>{o(!0);try{const[h,v]=await Promise.all([yE(),Promise.resolve(Rn())]);n(h);const w={};v.forEach(S=>{w[S.metadata.id]=S}),i(w)}catch(h){console.error("Failed to load fights:",h)}finally{o(!1)}},m=t.filter(h=>{if(a==="all")return!0;const v=h.winnerId===h.agent1Id;return a==="wins"?v:a==="losses"?!v&&h.winnerId!==null:!0});return s?u.jsx("div",{className:"border border-zinc-800 rounded-sm p-8 text-center",children:u.jsx("div",{className:"text-zinc-500 animate-pulse",children:"loading fight history..."})}):t.length===0?u.jsxs("div",{className:"border border-zinc-800 rounded-sm p-8 text-center",children:[u.jsx("div",{className:"text-zinc-600 mb-2",children:"No fights recorded"}),u.jsx("div",{className:"text-sm text-zinc-500",children:"Complete a fight to see it here"})]}):u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("h2",{className:"text-lg font-bold flex items-center gap-2",children:[u.jsx(us,{className:"w-5 h-5 text-yellow-500"}),"Fight History"]}),u.jsxs("p",{className:"text-sm text-zinc-500",children:[t.length," fight",t.length!==1?"s":""," recorded"]})]}),u.jsx("div",{className:"flex items-center gap-2",children:["all","wins","losses"].map(h=>u.jsx("button",{onClick:()=>l(h),className:`px-3 py-1 text-xs uppercase tracking-wider transition-colors ${a===h?"text-orange-500 border-b border-orange-500":"text-zinc-500 hover:text-white"}`,children:h},h))})]}),u.jsxs("div",{className:"border border-zinc-800 rounded-sm overflow-hidden",children:[u.jsxs("div",{className:"grid grid-cols-12 gap-4 px-4 py-2 bg-zinc-900 text-xs text-zinc-500 uppercase tracking-wider",children:[u.jsx("div",{className:"col-span-4",children:"Matchup"}),u.jsx("div",{className:"col-span-2",children:"Result"}),u.jsx("div",{className:"col-span-2",children:"Method"}),u.jsx("div",{className:"col-span-2",children:"Round"}),u.jsx("div",{className:"col-span-2 text-right",children:"Actions"})]}),m.map(h=>{const v=r[h.agent1Id],w=r[h.agent2Id],S=h.winnerId===h.agent1Id,p=h.winnerId&&h.winnerId!==h.agent1Id;h.winnerId;const g=c===h.id;return u.jsxs("div",{children:[u.jsxs("div",{className:"grid grid-cols-12 gap-4 px-4 py-3 border-t border-zinc-800 items-center hover:bg-zinc-900/30 transition-colors cursor-pointer",onClick:()=>d(g?null:h.id),children:[u.jsxs("div",{className:"col-span-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[u.jsx("span",{className:"font-medium",children:(v==null?void 0:v.skills.name)||"Unknown"}),u.jsx("span",{className:"text-zinc-600",children:"vs"}),u.jsx("span",{className:"font-medium",children:(w==null?void 0:w.skills.name)||"Unknown"})]}),u.jsx("div",{className:"text-xs text-zinc-500 mt-0.5",children:new Date(h.createdAt).toLocaleDateString()})]}),u.jsx("div",{className:"col-span-2",children:u.jsx("span",{className:`text-xs uppercase font-medium ${S?"text-green-500":p?"text-red-500":"text-zinc-500"}`,children:S?"Win":p?"Loss":"Draw"})}),u.jsx("div",{className:"col-span-2 text-sm text-zinc-400",children:h.method}),u.jsxs("div",{className:"col-span-2 text-sm font-mono text-zinc-400",children:["R",h.round]}),u.jsxs("div",{className:"col-span-2 flex items-center justify-end gap-1",children:[u.jsx(HE,{fightId:h.id,size:"sm",showCount:!0}),u.jsx("button",{onClick:y=>{y.stopPropagation(),KE(h,v,w)},className:"p-1.5 text-zinc-500 hover:text-blue-400 transition-colors",title:"Share to X",children:u.jsx(pS,{className:"w-4 h-4"})}),u.jsx(Iu,{className:`w-4 h-4 text-zinc-600 transition-transform ${g?"rotate-90":""}`})]})]}),g&&u.jsxs("div",{className:"border-t border-zinc-800 bg-zinc-900/20 px-4 py-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-6 text-sm",children:[u.jsxs("div",{children:[u.jsxs("h4",{className:"text-zinc-500 mb-2",children:[(v==null?void 0:v.skills.name)||"Fighter 1"," Stats"]}),u.jsxs("div",{className:"space-y-1 font-mono text-xs",children:[u.jsx(an,{label:"Health",value:`${Math.round(h.fightData.fighter1.currentHealth)}%`}),u.jsx(an,{label:"Strikes",value:h.fightData.fighter1.significantStrikes}),u.jsx(an,{label:"Takedowns",value:h.fightData.fighter1.takedownsLanded}),u.jsx(an,{label:"Knockdowns",value:h.fightData.fighter1.knockdowns})]})]}),u.jsxs("div",{children:[u.jsxs("h4",{className:"text-zinc-500 mb-2",children:[(w==null?void 0:w.skills.name)||"Fighter 2"," Stats"]}),u.jsxs("div",{className:"space-y-1 font-mono text-xs",children:[u.jsx(an,{label:"Health",value:`${Math.round(h.fightData.fighter2.currentHealth)}%`}),u.jsx(an,{label:"Strikes",value:h.fightData.fighter2.significantStrikes}),u.jsx(an,{label:"Takedowns",value:h.fightData.fighter2.takedownsLanded}),u.jsx(an,{label:"Knockdowns",value:h.fightData.fighter2.knockdowns})]})]})]}),h.prizeAwarded&&u.jsx("div",{className:"mt-4 pt-4 border-t border-zinc-800",children:u.jsxs("div",{className:"flex items-center gap-2 text-green-500 text-sm",children:[u.jsx(rS,{className:"w-4 h-4"}),u.jsxs("span",{children:["Prize awarded: $",h.prizeAmount]}),h.fightData.isEntertaining&&u.jsxs("span",{className:"flex items-center gap-1 text-orange-500",children:[u.jsx(Vu,{className:"w-3 h-3"}),"(entertaining)"]})]})})]})]},h.id)})]})]})}function an({label:e,value:t}){return u.jsxs("div",{className:"flex justify-between py-1 border-b border-zinc-800/50 last:border-0",children:[u.jsx("span",{className:"text-zinc-500",children:e}),u.jsx("span",{children:t})]})}function KE(e,t,n){const r=(t==null?void 0:t.skills.name)||"Fighter 1",i=(n==null?void 0:n.skills.name)||"Fighter 2",s=e.winnerId===e.agent1Id?r:i,o=`Just watched ${r} vs ${i}! ${s} wins by ${e.method} in Round ${e.round}! 🥊 #AIFights #FightBook`,a=`https://twitter.com/intent/tweet?text=${encodeURIComponent(o)}`;window.open(a,"_blank","width=600,height=400")}function GE(){const[e,t]=x.useState("landing"),[n,r]=x.useState([]),[i,s]=x.useState(null),[o,a]=x.useState(null),[l,c]=x.useState(null),[d,f]=x.useState(!0),[m,h]=x.useState(()=>!localStorage.getItem("fightbook_boot_complete"));x.useEffect(()=>{v()},[]);const v=()=>{const E=Rn(),P=Sw();r(E),s(P),f(!1)},w=()=>{t(n.length>0?"roster":"create")},S=()=>{a(null),t("create")},p=E=>{a(E),t("edit")},g=E=>{xw(E),(!i||E.metadata.id===i.metadata.id)&&Hf(E),v(),t("roster"),Hn.success(`${E.skills.name} saved`)},y=E=>{ww(E),v(),Hn.success("Agent deleted")},b=E=>{Hf(E),s(E)},k=(E,P)=>{c([E,P]),t("fight")},C=()=>{v()},N=E=>{try{const P=Fg(E),z=lc(P.name||"Unnamed");z.skills={...z.skills,...P},g(z),Hn.success("Agent imported from skills.md")}catch{Hn.error("Failed to parse skills.md")}},T=()=>{h(!1),localStorage.setItem("fightbook_boot_complete","true")};return d?u.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:u.jsx("div",{className:"text-zinc-500 animate-pulse",children:"loading..."})}):m?u.jsx(QT,{onComplete:T}):e==="landing"?u.jsx(yS,{onEnter:w}):u.jsxs("div",{className:"min-h-screen bg-black text-white",children:[u.jsx("header",{className:"border-b border-zinc-800 bg-zinc-950/50",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-3",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3 cursor-pointer",onClick:()=>t("roster"),children:[u.jsx("span",{className:"text-orange-500 font-bold text-lg",children:"⌘"}),u.jsx("span",{className:"font-bold",children:"fightbook"}),u.jsx("span",{className:"text-zinc-600 text-sm",children:"v1.0"})]}),u.jsxs("nav",{className:"flex items-center gap-1",children:[u.jsx($s,{active:e==="roster",onClick:()=>t("roster"),children:"roster"}),u.jsx($s,{active:e==="history",onClick:()=>t("history"),children:"history"}),u.jsx($s,{active:e==="leaderboard",onClick:()=>t("leaderboard"),children:"leaderboard"}),u.jsx($s,{active:e==="create",onClick:S,children:"+new"})]})]})})}),u.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-6",children:[e==="roster"&&u.jsx(qT,{agents:n,currentAgent:i,onCreate:S,onEdit:p,onDelete:y,onSelect:b,onFight:k,onImport:N}),(e==="create"||e==="edit")&&u.jsx(DN,{agent:o,onSave:g,onCancel:()=>t("roster")}),e==="fight"&&l&&u.jsx(RE,{agent1:l[0],agent2:l[1],onFightComplete:C,onBack:()=>t("roster")}),e==="history"&&u.jsx(WE,{onBack:()=>t("roster")}),e==="leaderboard"&&u.jsx(iN,{})]}),u.jsx("footer",{className:"border-t border-zinc-800 mt-auto",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-3",children:u.jsxs("div",{className:"flex items-center justify-between text-xs text-zinc-600",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs("span",{children:[n.length," agents"]}),u.jsxs("span",{children:[(i==null?void 0:i.metadata.totalFights)||0," fights"]})]}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("a",{href:"https://x.com/fightbookxyz",target:"_blank",rel:"noopener",children:"@fightbookxyz"}),u.jsx("span",{className:"text-zinc-700",children:"|"}),u.jsx("span",{children:"skills.md powered"})]})]})})})]})}function $s({children:e,active:t,onClick:n}){return u.jsx("button",{onClick:n,className:`px-3 py-1.5 text-sm transition-all ${t?"text-orange-500 border-b-2 border-orange-500":"text-zinc-400 hover:text-white"}`,children:e})}Vg(document.getElementById("root")).render(u.jsx(GE,{}));
|