(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function a(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=a(l);fetch(l.href,c)}})();function o1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ad={exports:{}},kr={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ey;function P2(){if(Ey)return kr;Ey=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(r,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var f in l)f!=="key"&&(c[f]=l[f])}else c=l;return l=c.ref,{$$typeof:t,type:r,key:u,ref:l!==void 0?l:null,props:c}}return kr.Fragment=n,kr.jsx=a,kr.jsxs=a,kr}var Ty;function $2(){return Ty||(Ty=1,Ad.exports=P2()),Ad.exports}var H=$2(),Cd={exports:{}},Tt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _y;function K2(){if(_y)return Tt;_y=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),v=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,M={};function _(N,G,et){this.props=N,this.context=G,this.refs=M,this.updater=et||b}_.prototype.isReactComponent={},_.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=_.prototype;function S(N,G,et){this.props=N,this.context=G,this.refs=M,this.updater=et||b}var T=S.prototype=new C;T.constructor=S,E(T,_.prototype),T.isPureReactComponent=!0;var R=Array.isArray;function L(){}var U={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function F(N,G,et){var B=et.ref;return{$$typeof:t,type:N,key:G,ref:B!==void 0?B:null,props:et}}function X(N,G){return F(N.type,G,N.props)}function k(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Y(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(et){return G[et]})}var $=/\/+/g;function D(N,G){return typeof N=="object"&&N!==null&&N.key!=null?Y(""+N.key):G.toString(36)}function K(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(L,L):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function A(N,G,et,B,O){var Z=typeof N;(Z==="undefined"||Z==="boolean")&&(N=null);var J=!1;if(N===null)J=!0;else switch(Z){case"bigint":case"string":case"number":J=!0;break;case"object":switch(N.$$typeof){case t:case n:J=!0;break;case g:return J=N._init,A(J(N._payload),G,et,B,O)}}if(J)return O=O(N),J=B===""?"."+D(N,0):B,R(O)?(et="",J!=null&&(et=J.replace($,"$&/")+"/"),A(O,G,et,"",function(dt){return dt})):O!=null&&(k(O)&&(O=X(O,et+(O.key==null||N&&N.key===O.key?"":(""+O.key).replace($,"$&/")+"/")+J)),G.push(O)),1;J=0;var tt=B===""?".":B+":";if(R(N))for(var at=0;at<N.length;at++)B=N[at],Z=tt+D(B,at),J+=A(B,G,et,Z,O);else if(at=x(N),typeof at=="function")for(N=at.call(N),at=0;!(B=N.next()).done;)B=B.value,Z=tt+D(B,at++),J+=A(B,G,et,Z,O);else if(Z==="object"){if(typeof N.then=="function")return A(K(N),G,et,B,O);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return J}function j(N,G,et){if(N==null)return N;var B=[],O=0;return A(N,B,"","",function(Z){return G.call(et,Z,O++)}),B}function V(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(et){(N._status===0||N._status===-1)&&(N._status=1,N._result=et)},function(et){(N._status===0||N._status===-1)&&(N._status=2,N._result=et)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var q=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},I={map:j,forEach:function(N,G,et){j(N,function(){G.apply(this,arguments)},et)},count:function(N){var G=0;return j(N,function(){G++}),G},toArray:function(N){return j(N,function(G){return G})||[]},only:function(N){if(!k(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Tt.Activity=p,Tt.Children=I,Tt.Component=_,Tt.Fragment=a,Tt.Profiler=l,Tt.PureComponent=S,Tt.StrictMode=r,Tt.Suspense=h,Tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Tt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return U.H.useMemoCache(N)}},Tt.cache=function(N){return function(){return N.apply(null,arguments)}},Tt.cacheSignal=function(){return null},Tt.cloneElement=function(N,G,et){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var B=E({},N.props),O=N.key;if(G!=null)for(Z in G.key!==void 0&&(O=""+G.key),G)!P.call(G,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&G.ref===void 0||(B[Z]=G[Z]);var Z=arguments.length-2;if(Z===1)B.children=et;else if(1<Z){for(var J=Array(Z),tt=0;tt<Z;tt++)J[tt]=arguments[tt+2];B.children=J}return F(N.type,O,B)},Tt.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:c,_context:N},N},Tt.createElement=function(N,G,et){var B,O={},Z=null;if(G!=null)for(B in G.key!==void 0&&(Z=""+G.key),G)P.call(G,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(O[B]=G[B]);var J=arguments.length-2;if(J===1)O.children=et;else if(1<J){for(var tt=Array(J),at=0;at<J;at++)tt[at]=arguments[at+2];O.children=tt}if(N&&N.defaultProps)for(B in J=N.defaultProps,J)O[B]===void 0&&(O[B]=J[B]);return F(N,Z,O)},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function(N){return{$$typeof:f,render:N}},Tt.isValidElement=k,Tt.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:V}},Tt.memo=function(N,G){return{$$typeof:m,type:N,compare:G===void 0?null:G}},Tt.startTransition=function(N){var G=U.T,et={};U.T=et;try{var B=N(),O=U.S;O!==null&&O(et,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(L,q)}catch(Z){q(Z)}finally{G!==null&&et.types!==null&&(G.types=et.types),U.T=G}},Tt.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Tt.use=function(N){return U.H.use(N)},Tt.useActionState=function(N,G,et){return U.H.useActionState(N,G,et)},Tt.useCallback=function(N,G){return U.H.useCallback(N,G)},Tt.useContext=function(N){return U.H.useContext(N)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function(N,G){return U.H.useDeferredValue(N,G)},Tt.useEffect=function(N,G){return U.H.useEffect(N,G)},Tt.useEffectEvent=function(N){return U.H.useEffectEvent(N)},Tt.useId=function(){return U.H.useId()},Tt.useImperativeHandle=function(N,G,et){return U.H.useImperativeHandle(N,G,et)},Tt.useInsertionEffect=function(N,G){return U.H.useInsertionEffect(N,G)},Tt.useLayoutEffect=function(N,G){return U.H.useLayoutEffect(N,G)},Tt.useMemo=function(N,G){return U.H.useMemo(N,G)},Tt.useOptimistic=function(N,G){return U.H.useOptimistic(N,G)},Tt.useReducer=function(N,G,et){return U.H.useReducer(N,G,et)},Tt.useRef=function(N){return U.H.useRef(N)},Tt.useState=function(N){return U.H.useState(N)},Tt.useSyncExternalStore=function(N,G,et){return U.H.useSyncExternalStore(N,G,et)},Tt.useTransition=function(){return U.H.useTransition()},Tt.version="19.2.4",Tt}var My;function ho(){return My||(My=1,Cd.exports=K2()),Cd.exports}var Q=ho();const Z2=o1(Q);var Nd={exports:{}},Br={},Dd={exports:{}},zd={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ay;function I2(){return Ay||(Ay=1,(function(t){function n(A,j){var V=A.length;A.push(j);t:for(;0<V;){var q=V-1>>>1,I=A[q];if(0<l(I,j))A[q]=j,A[V]=I,V=q;else break t}}function a(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var j=A[0],V=A.pop();if(V!==j){A[0]=V;t:for(var q=0,I=A.length,N=I>>>1;q<N;){var G=2*(q+1)-1,et=A[G],B=G+1,O=A[B];if(0>l(et,V))B<I&&0>l(O,et)?(A[q]=O,A[B]=V,q=B):(A[q]=et,A[G]=V,q=G);else if(B<I&&0>l(O,V))A[q]=O,A[B]=V,q=B;else break t}}return j}function l(A,j){var V=A.sortIndex-j.sortIndex;return V!==0?V:A.id-j.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var h=[],m=[],g=1,p=null,v=3,x=!1,b=!1,E=!1,M=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function T(A){for(var j=a(m);j!==null;){if(j.callback===null)r(m);else if(j.startTime<=A)r(m),j.sortIndex=j.expirationTime,n(h,j);else break;j=a(m)}}function R(A){if(E=!1,T(A),!b)if(a(h)!==null)b=!0,L||(L=!0,Y());else{var j=a(m);j!==null&&K(R,j.startTime-A)}}var L=!1,U=-1,P=5,F=-1;function X(){return M?!0:!(t.unstable_now()-F<P)}function k(){if(M=!1,L){var A=t.unstable_now();F=A;var j=!0;try{t:{b=!1,E&&(E=!1,C(U),U=-1),x=!0;var V=v;try{e:{for(T(A),p=a(h);p!==null&&!(p.expirationTime>A&&X());){var q=p.callback;if(typeof q=="function"){p.callback=null,v=p.priorityLevel;var I=q(p.expirationTime<=A);if(A=t.unstable_now(),typeof I=="function"){p.callback=I,T(A),j=!0;break e}p===a(h)&&r(h),T(A)}else r(h);p=a(h)}if(p!==null)j=!0;else{var N=a(m);N!==null&&K(R,N.startTime-A),j=!1}}break t}finally{p=null,v=V,x=!1}j=void 0}}finally{j?Y():L=!1}}}var Y;if(typeof S=="function")Y=function(){S(k)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,D=$.port2;$.port1.onmessage=k,Y=function(){D.postMessage(null)}}else Y=function(){_(k,0)};function K(A,j){U=_(function(){A(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(A){switch(v){case 1:case 2:case 3:var j=3;break;default:j=v}var V=v;v=j;try{return A()}finally{v=V}},t.unstable_requestPaint=function(){M=!0},t.unstable_runWithPriority=function(A,j){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var V=v;v=A;try{return j()}finally{v=V}},t.unstable_scheduleCallback=function(A,j,V){var q=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?q+V:q):V=q,A){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=V+I,A={id:g++,callback:j,priorityLevel:A,startTime:V,expirationTime:I,sortIndex:-1},V>q?(A.sortIndex=V,n(m,A),a(h)===null&&A===a(m)&&(E?(C(U),U=-1):E=!0,K(R,V-q))):(A.sortIndex=I,n(h,A),b||x||(b=!0,L||(L=!0,Y()))),A},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(A){var j=v;return function(){var V=v;v=j;try{return A.apply(this,arguments)}finally{v=V}}}})(zd)),zd}var Cy;function Q2(){return Cy||(Cy=1,Dd.exports=I2()),Dd.exports}var Od={exports:{}},Te={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ny;function F2(){if(Ny)return Te;Ny=1;var t=ho();function n(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(h,m,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:p==null?null:""+p,children:h,containerInfo:m,implementation:g}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Te.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Te.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return c(h,m,null,g)},Te.flushSync=function(h){var m=u.T,g=r.p;try{if(u.T=null,r.p=2,h)return h()}finally{u.T=m,r.p=g,r.d.f()}},Te.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(h,m))},Te.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},Te.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?r.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:v,fetchPriority:x}):g==="script"&&r.d.X(h,{crossOrigin:p,integrity:v,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Te.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);r.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(h)},Te.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin);r.d.L(h,g,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Te.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);r.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(h)},Te.requestFormReset=function(h){r.d.r(h)},Te.unstable_batchedUpdates=function(h,m){return h(m)},Te.useFormState=function(h,m,g){return u.H.useFormState(h,m,g)},Te.useFormStatus=function(){return u.H.useHostTransitionStatus()},Te.version="19.2.4",Te}var Dy;function l1(){if(Dy)return Od.exports;Dy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Od.exports=F2(),Od.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zy;function J2(){if(zy)return Br;zy=1;var t=Q2(),n=ho(),a=l1();function r(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var i=e,s=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(s=i.return),e=i.return;while(e)}return i.tag===3?s:null}function u(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function f(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function h(e){if(c(e)!==e)throw Error(r(188))}function m(e){var i=e.alternate;if(!i){if(i=c(e),i===null)throw Error(r(188));return i!==e?null:e}for(var s=e,o=i;;){var d=s.return;if(d===null)break;var y=d.alternate;if(y===null){if(o=d.return,o!==null){s=o;continue}break}if(d.child===y.child){for(y=d.child;y;){if(y===s)return h(d),e;if(y===o)return h(d),i;y=y.sibling}throw Error(r(188))}if(s.return!==o.return)s=d,o=y;else{for(var w=!1,z=d.child;z;){if(z===s){w=!0,s=d,o=y;break}if(z===o){w=!0,o=d,s=y;break}z=z.sibling}if(!w){for(z=y.child;z;){if(z===s){w=!0,s=y,o=d;break}if(z===o){w=!0,o=y,s=d;break}z=z.sibling}if(!w)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?e:i}function g(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=g(e),i!==null)return i;e=e.sibling}return null}var p=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),S=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=k&&e[k]||e["@@iterator"],typeof e=="function"?e:null)}var $=Symbol.for("react.client.reference");function D(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case _:return"Profiler";case M:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case S:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case T:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return i=e.displayName||null,i!==null?i:D(e.type)||"Memo";case P:i=e._payload,e=e._init;try{return D(e(i))}catch{}}return null}var K=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},q=[],I=-1;function N(e){return{current:e}}function G(e){0>I||(e.current=q[I],q[I]=null,I--)}function et(e,i){I++,q[I]=e.current,e.current=i}var B=N(null),O=N(null),Z=N(null),J=N(null);function tt(e,i){switch(et(Z,i),et(O,e),et(B,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?$0(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=$0(i),e=K0(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(B),et(B,e)}function at(){G(B),G(O),G(Z)}function dt(e){e.memoizedState!==null&&et(J,e);var i=B.current,s=K0(i,e.type);i!==s&&(et(O,e),et(B,s))}function ht(e){O.current===e&&(G(B),G(O)),J.current===e&&(G(J),Rr._currentValue=V)}var mt,vt;function wt(e){if(mt===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);mt=i&&i[1]||"",vt=-1<s.stack.indexOf(`
    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+mt+e+vt}var Et=!1;function _t(e,i){if(!e||Et)return"";Et=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(i){var ft=function(){throw Error()};if(Object.defineProperty(ft.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ft,[])}catch(lt){var ot=lt}Reflect.construct(e,[],ft)}else{try{ft.call()}catch(lt){ot=lt}e.call(ft.prototype)}}else{try{throw Error()}catch(lt){ot=lt}(ft=e())&&typeof ft.catch=="function"&&ft.catch(function(){})}}catch(lt){if(lt&&ot&&typeof lt.stack=="string")return[lt.stack,ot.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=o.DetermineComponentFrameRoot(),w=y[0],z=y[1];if(w&&z){var W=w.split(`
`),rt=z.split(`
`);for(d=o=0;o<W.length&&!W[o].includes("DetermineComponentFrameRoot");)o++;for(;d<rt.length&&!rt[d].includes("DetermineComponentFrameRoot");)d++;if(o===W.length||d===rt.length)for(o=W.length-1,d=rt.length-1;1<=o&&0<=d&&W[o]!==rt[d];)d--;for(;1<=o&&0<=d;o--,d--)if(W[o]!==rt[d]){if(o!==1||d!==1)do if(o--,d--,0>d||W[o]!==rt[d]){var ut=`
`+W[o].replace(" at new "," at ");return e.displayName&&ut.includes("<anonymous>")&&(ut=ut.replace("<anonymous>",e.displayName)),ut}while(1<=o&&0<=d);break}}}finally{Et=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?wt(s):""}function te(e,i){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==i&&i!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return _t(e.type,!1);case 11:return _t(e.type.render,!1);case 1:return _t(e.type,!0);case 31:return wt("Activity");default:return""}}function De(e){try{var i="",s=null;do i+=te(e,s),s=e,e=e.return;while(e);return i}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}var Ue=Object.prototype.hasOwnProperty,un=t.unstable_scheduleCallback,kn=t.unstable_cancelCallback,Fi=t.unstable_shouldYield,Ji=t.unstable_requestPaint,ge=t.unstable_now,ka=t.unstable_getCurrentPriorityLevel,Bn=t.unstable_ImmediatePriority,fi=t.unstable_UserBlockingPriority,Wi=t.unstable_NormalPriority,uc=t.unstable_LowPriority,Ba=t.unstable_IdlePriority,cc=t.log,fc=t.unstable_setDisableYieldValue,ta=null,_e=null;function En(e){if(typeof cc=="function"&&fc(e),_e&&typeof _e.setStrictMode=="function")try{_e.setStrictMode(ta,e)}catch{}}var Me=Math.clz32?Math.clz32:mc,dc=Math.log,hc=Math.LN2;function mc(e){return e>>>=0,e===0?32:31-(dc(e)/hc|0)|0}var Ha=256,Ua=262144,Ya=4194304;function Hn(e){var i=e&42;if(i!==0)return i;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ga(e,i,s){var o=e.pendingLanes;if(o===0)return 0;var d=0,y=e.suspendedLanes,w=e.pingedLanes;e=e.warmLanes;var z=o&134217727;return z!==0?(o=z&~y,o!==0?d=Hn(o):(w&=z,w!==0?d=Hn(w):s||(s=z&~e,s!==0&&(d=Hn(s))))):(z=o&~y,z!==0?d=Hn(z):w!==0?d=Hn(w):s||(s=o&~e,s!==0&&(d=Hn(s)))),d===0?0:i!==0&&i!==d&&(i&y)===0&&(y=d&-d,s=i&-i,y>=s||y===32&&(s&4194048)!==0)?i:d}function ea(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function pc(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32: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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ao(){var e=Ya;return Ya<<=1,(Ya&62914560)===0&&(Ya=4194304),e}function Xs(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function na(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gc(e,i,s,o,d,y){var w=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var z=e.entanglements,W=e.expirationTimes,rt=e.hiddenUpdates;for(s=w&~s;0<s;){var ut=31-Me(s),ft=1<<ut;z[ut]=0,W[ut]=-1;var ot=rt[ut];if(ot!==null)for(rt[ut]=null,ut=0;ut<ot.length;ut++){var lt=ot[ut];lt!==null&&(lt.lane&=-536870913)}s&=~ft}o!==0&&Co(e,o,0),y!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=y&~(w&~i))}function Co(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var o=31-Me(i);e.entangledLanes|=i,e.entanglements[o]=e.entanglements[o]|1073741824|s&261930}function No(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var o=31-Me(s),d=1<<o;d&i|e[o]&i&&(e[o]|=i),s&=~d}}function Do(e,i){var s=i&-i;return s=(s&42)!==0?1:Ps(s),(s&(e.suspendedLanes|i))!==0?0:s}function Ps(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $s(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zo(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:gy(e.type))}function Oo(e,i){var s=j.p;try{return j.p=e,i()}finally{j.p=s}}var Tn=Math.random().toString(36).slice(2),fe="__reactFiber$"+Tn,Ee="__reactProps$"+Tn,Un="__reactContainer$"+Tn,qa="__reactEvents$"+Tn,Ro="__reactListeners$"+Tn,yc="__reactHandles$"+Tn,jo="__reactResources$"+Tn,ia="__reactMarker$"+Tn;function Ks(e){delete e[fe],delete e[Ee],delete e[qa],delete e[Ro],delete e[yc]}function di(e){var i=e[fe];if(i)return i;for(var s=e.parentNode;s;){if(i=s[Un]||s[fe]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=ty(e);e!==null;){if(s=e[fe])return s;e=ty(e)}return i}e=s,s=e.parentNode}return null}function hi(e){if(e=e[fe]||e[Un]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function mi(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(r(33))}function pi(e){var i=e[jo];return i||(i=e[jo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function ie(e){e[ia]=!0}var Vo=new Set,Lo={};function Yn(e,i){gi(e,i),gi(e+"Capture",i)}function gi(e,i){for(Lo[e]=i,e=0;e<i.length;e++)Vo.add(i[e])}var vc=RegExp("^[: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]*$"),Zs={},ko={};function xc(e){return Ue.call(ko,e)?!0:Ue.call(Zs,e)?!1:vc.test(e)?ko[e]=!0:(Zs[e]=!0,!1)}function Xa(e,i,s){if(xc(i))if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var o=i.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+s)}}function Pa(e,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+s)}}function cn(e,i,s,o){if(o===null)e.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(i,s,""+o)}}function ze(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bo(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function bc(e,i,s){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,y=o.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return d.call(this)},set:function(w){s=""+w,y.call(this,w)}}),Object.defineProperty(e,i,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function yi(e){if(!e._valueTracker){var i=Bo(e)?"checked":"value";e._valueTracker=bc(e,i,""+e[i])}}function Ho(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),o="";return e&&(o=Bo(e)?e.checked?"true":"false":e.value),e=o,e!==s?(i.setValue(e),!0):!1}function aa(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}}var wc=/[\n"\\]/g;function Oe(e){return e.replace(wc,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function sa(e,i,s,o,d,y,w,z){e.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.type=w:e.removeAttribute("type"),i!=null?w==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+ze(i)):e.value!==""+ze(i)&&(e.value=""+ze(i)):w!=="submit"&&w!=="reset"||e.removeAttribute("value"),i!=null?Is(e,w,ze(i)):s!=null?Is(e,w,ze(s)):o!=null&&e.removeAttribute("value"),d==null&&y!=null&&(e.defaultChecked=!!y),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+ze(z):e.removeAttribute("name")}function Uo(e,i,s,o,d,y,w,z){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),i!=null||s!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){yi(e);return}s=s!=null?""+ze(s):"",i=i!=null?""+ze(i):s,z||i===e.value||(e.value=i),e.defaultValue=i}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=z?e.checked:!!o,e.defaultChecked=!!o,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.name=w),yi(e)}function Is(e,i,s){i==="number"&&aa(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Gn(e,i,s,o){if(e=e.options,i){i={};for(var d=0;d<s.length;d++)i["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=i.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&o&&(e[s].defaultSelected=!0)}else{for(s=""+ze(s),i=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}i!==null||e[d].disabled||(i=e[d])}i!==null&&(i.selected=!0)}}function Ym(e,i,s){if(i!=null&&(i=""+ze(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+ze(s):""}function Gm(e,i,s,o){if(i==null){if(o!=null){if(s!=null)throw Error(r(92));if(K(o)){if(1<o.length)throw Error(r(93));o=o[0]}s=o}s==null&&(s=""),i=s}s=ze(i),e.defaultValue=s,o=e.textContent,o===s&&o!==""&&o!==null&&(e.value=o),yi(e)}function $a(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var US=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function qm(e,i,s){var o=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":o?e.setProperty(i,s):typeof s!="number"||s===0||US.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function Xm(e,i,s){if(i!=null&&typeof i!="object")throw Error(r(62));if(e=e.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||i!=null&&i.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var d in i)o=i[d],i.hasOwnProperty(d)&&s[d]!==o&&qm(e,d,o)}else for(var y in i)i.hasOwnProperty(y)&&qm(e,y,i[y])}function Sc(e){if(e.indexOf("-")===-1)return!1;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 YS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),GS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yo(e){return GS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qn(){}var Ec=null;function Tc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ka=null,Za=null;function Pm(e){var i=hi(e);if(i&&(e=i.stateNode)){var s=e[Ee]||null;t:switch(e=i.stateNode,i.type){case"input":if(sa(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Oe(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var o=s[i];if(o!==e&&o.form===e.form){var d=o[Ee]||null;if(!d)throw Error(r(90));sa(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<s.length;i++)o=s[i],o.form===e.form&&Ho(o)}break t;case"textarea":Ym(e,s.value,s.defaultValue);break t;case"select":i=s.value,i!=null&&Gn(e,!!s.multiple,i,!1)}}}var _c=!1;function $m(e,i,s){if(_c)return e(i,s);_c=!0;try{var o=e(i);return o}finally{if(_c=!1,(Ka!==null||Za!==null)&&(Cl(),Ka&&(i=Ka,e=Za,Za=Ka=null,Pm(i),e)))for(i=0;i<e.length;i++)Pm(e[i])}}function Qs(e,i){var s=e.stateNode;if(s===null)return null;var o=s[Ee]||null;if(o===null)return null;s=o[i];t:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break t;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(r(231,i,typeof s));return s}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mc=!1;if(Xn)try{var Fs={};Object.defineProperty(Fs,"passive",{get:function(){Mc=!0}}),window.addEventListener("test",Fs,Fs),window.removeEventListener("test",Fs,Fs)}catch{Mc=!1}var vi=null,Ac=null,Go=null;function Km(){if(Go)return Go;var e,i=Ac,s=i.length,o,d="value"in vi?vi.value:vi.textContent,y=d.length;for(e=0;e<s&&i[e]===d[e];e++);var w=s-e;for(o=1;o<=w&&i[s-o]===d[y-o];o++);return Go=d.slice(e,1<o?1-o:void 0)}function qo(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function Xo(){return!0}function Zm(){return!1}function Re(e){function i(s,o,d,y,w){this._reactName=s,this._targetInst=d,this.type=o,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(s=e[z],this[z]=s?s(y):y[z]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Xo:Zm,this.isPropagationStopped=Zm,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Xo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Xo)},persist:function(){},isPersistent:Xo}),i}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=Re(ra),Js=p({},ra,{view:0,detail:0}),qS=Re(Js),Cc,Nc,Ws,$o=p({},Js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zc,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!==Ws&&(Ws&&e.type==="mousemove"?(Cc=e.screenX-Ws.screenX,Nc=e.screenY-Ws.screenY):Nc=Cc=0,Ws=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Nc}}),Im=Re($o),XS=p({},$o,{dataTransfer:0}),PS=Re(XS),$S=p({},Js,{relatedTarget:0}),Dc=Re($S),KS=p({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),ZS=Re(KS),IS=p({},ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QS=Re(IS),FS=p({},ra,{data:0}),Qm=Re(FS),JS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WS={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"},tE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eE(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=tE[e])?!!i[e]:!1}function zc(){return eE}var nE=p({},Js,{key:function(e){if(e.key){var i=JS[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=qo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?WS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zc,charCode:function(e){return e.type==="keypress"?qo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iE=Re(nE),aE=p({},$o,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fm=Re(aE),sE=p({},Js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zc}),rE=Re(sE),oE=p({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),lE=Re(oE),uE=p({},$o,{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}),cE=Re(uE),fE=p({},ra,{newState:0,oldState:0}),dE=Re(fE),hE=[9,13,27,32],Oc=Xn&&"CompositionEvent"in window,tr=null;Xn&&"documentMode"in document&&(tr=document.documentMode);var mE=Xn&&"TextEvent"in window&&!tr,Jm=Xn&&(!Oc||tr&&8<tr&&11>=tr),Wm=" ",tp=!1;function ep(e,i){switch(e){case"keyup":return hE.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function np(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ia=!1;function pE(e,i){switch(e){case"compositionend":return np(i);case"keypress":return i.which!==32?null:(tp=!0,Wm);case"textInput":return e=i.data,e===Wm&&tp?null:e;default:return null}}function gE(e,i){if(Ia)return e==="compositionend"||!Oc&&ep(e,i)?(e=Km(),Go=Ac=vi=null,Ia=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Jm&&i.locale!=="ko"?null:i.data;default:return null}}var yE={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 ip(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!yE[e.type]:i==="textarea"}function ap(e,i,s,o){Ka?Za?Za.push(o):Za=[o]:Ka=o,i=Vl(i,"onChange"),0<i.length&&(s=new Po("onChange","change",null,s,o),e.push({event:s,listeners:i}))}var er=null,nr=null;function vE(e){U0(e,0)}function Ko(e){var i=mi(e);if(Ho(i))return e}function sp(e,i){if(e==="change")return i}var rp=!1;if(Xn){var Rc;if(Xn){var jc="oninput"in document;if(!jc){var op=document.createElement("div");op.setAttribute("oninput","return;"),jc=typeof op.oninput=="function"}Rc=jc}else Rc=!1;rp=Rc&&(!document.documentMode||9<document.documentMode)}function lp(){er&&(er.detachEvent("onpropertychange",up),nr=er=null)}function up(e){if(e.propertyName==="value"&&Ko(nr)){var i=[];ap(i,nr,e,Tc(e)),$m(vE,i)}}function xE(e,i,s){e==="focusin"?(lp(),er=i,nr=s,er.attachEvent("onpropertychange",up)):e==="focusout"&&lp()}function bE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ko(nr)}function wE(e,i){if(e==="click")return Ko(i)}function SE(e,i){if(e==="input"||e==="change")return Ko(i)}function EE(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Ye=typeof Object.is=="function"?Object.is:EE;function ir(e,i){if(Ye(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var s=Object.keys(e),o=Object.keys(i);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var d=s[o];if(!Ue.call(i,d)||!Ye(e[d],i[d]))return!1}return!0}function cp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fp(e,i){var s=cp(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=i&&o>=i)return{node:s,offset:i-e};e=o}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=cp(s)}}function dp(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?dp(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function hp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=aa(e.document);i instanceof e.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)e=i.contentWindow;else break;i=aa(e.document)}return i}function Vc(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var TE=Xn&&"documentMode"in document&&11>=document.documentMode,Qa=null,Lc=null,ar=null,kc=!1;function mp(e,i,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;kc||Qa==null||Qa!==aa(o)||(o=Qa,"selectionStart"in o&&Vc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ar&&ir(ar,o)||(ar=o,o=Vl(Lc,"onSelect"),0<o.length&&(i=new Po("onSelect","select",null,i,s),e.push({event:i,listeners:o}),i.target=Qa)))}function oa(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var Fa={animationend:oa("Animation","AnimationEnd"),animationiteration:oa("Animation","AnimationIteration"),animationstart:oa("Animation","AnimationStart"),transitionrun:oa("Transition","TransitionRun"),transitionstart:oa("Transition","TransitionStart"),transitioncancel:oa("Transition","TransitionCancel"),transitionend:oa("Transition","TransitionEnd")},Bc={},pp={};Xn&&(pp=document.createElement("div").style,"AnimationEvent"in window||(delete Fa.animationend.animation,delete Fa.animationiteration.animation,delete Fa.animationstart.animation),"TransitionEvent"in window||delete Fa.transitionend.transition);function la(e){if(Bc[e])return Bc[e];if(!Fa[e])return e;var i=Fa[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in pp)return Bc[e]=i[s];return e}var gp=la("animationend"),yp=la("animationiteration"),vp=la("animationstart"),_E=la("transitionrun"),ME=la("transitionstart"),AE=la("transitioncancel"),xp=la("transitionend"),bp=new Map,Hc="abort auxClick beforeToggle 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(" ");Hc.push("scrollEnd");function fn(e,i){bp.set(e,i),Yn(i,[e])}var Zo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Je=[],Ja=0,Uc=0;function Io(){for(var e=Ja,i=Uc=Ja=0;i<e;){var s=Je[i];Je[i++]=null;var o=Je[i];Je[i++]=null;var d=Je[i];Je[i++]=null;var y=Je[i];if(Je[i++]=null,o!==null&&d!==null){var w=o.pending;w===null?d.next=d:(d.next=w.next,w.next=d),o.pending=d}y!==0&&wp(s,d,y)}}function Qo(e,i,s,o){Je[Ja++]=e,Je[Ja++]=i,Je[Ja++]=s,Je[Ja++]=o,Uc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Yc(e,i,s,o){return Qo(e,i,s,o),Fo(e)}function ua(e,i){return Qo(e,null,null,i),Fo(e)}function wp(e,i,s){e.lanes|=s;var o=e.alternate;o!==null&&(o.lanes|=s);for(var d=!1,y=e.return;y!==null;)y.childLanes|=s,o=y.alternate,o!==null&&(o.childLanes|=s),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(d=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,d&&i!==null&&(d=31-Me(s),e=y.hiddenUpdates,o=e[d],o===null?e[d]=[i]:o.push(i),i.lane=s|536870912),y):null}function Fo(e){if(50<Mr)throw Mr=0,Ff=null,Error(r(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Wa={};function CE(e,i,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(e,i,s,o){return new CE(e,i,s,o)}function Gc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,i){var s=e.alternate;return s===null?(s=Ge(e.tag,i,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=i,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,i=e.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Sp(e,i){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,i=s.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Jo(e,i,s,o,d,y){var w=0;if(o=e,typeof e=="function")Gc(e)&&(w=1);else if(typeof e=="string")w=R2(e,s,B.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case F:return e=Ge(31,s,i,d),e.elementType=F,e.lanes=y,e;case E:return ca(s.children,d,y,i);case M:w=8,d|=24;break;case _:return e=Ge(12,s,i,d|2),e.elementType=_,e.lanes=y,e;case R:return e=Ge(13,s,i,d),e.elementType=R,e.lanes=y,e;case L:return e=Ge(19,s,i,d),e.elementType=L,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:w=10;break t;case C:w=9;break t;case T:w=11;break t;case U:w=14;break t;case P:w=16,o=null;break t}w=29,s=Error(r(130,e===null?"null":typeof e,"")),o=null}return i=Ge(w,s,i,d),i.elementType=e,i.type=o,i.lanes=y,i}function ca(e,i,s,o){return e=Ge(7,e,o,i),e.lanes=s,e}function qc(e,i,s){return e=Ge(6,e,null,i),e.lanes=s,e}function Ep(e){var i=Ge(18,null,null,0);return i.stateNode=e,i}function Xc(e,i,s){return i=Ge(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Tp=new WeakMap;function We(e,i){if(typeof e=="object"&&e!==null){var s=Tp.get(e);return s!==void 0?s:(i={value:e,source:i,stack:De(i)},Tp.set(e,i),i)}return{value:e,source:i,stack:De(i)}}var ts=[],es=0,Wo=null,sr=0,tn=[],en=0,xi=null,_n=1,Mn="";function $n(e,i){ts[es++]=sr,ts[es++]=Wo,Wo=e,sr=i}function _p(e,i,s){tn[en++]=_n,tn[en++]=Mn,tn[en++]=xi,xi=e;var o=_n;e=Mn;var d=32-Me(o)-1;o&=~(1<<d),s+=1;var y=32-Me(i)+d;if(30<y){var w=d-d%5;y=(o&(1<<w)-1).toString(32),o>>=w,d-=w,_n=1<<32-Me(i)+d|s<<d|o,Mn=y+e}else _n=1<<y|s<<d|o,Mn=e}function Pc(e){e.return!==null&&($n(e,1),_p(e,1,0))}function $c(e){for(;e===Wo;)Wo=ts[--es],ts[es]=null,sr=ts[--es],ts[es]=null;for(;e===xi;)xi=tn[--en],tn[en]=null,Mn=tn[--en],tn[en]=null,_n=tn[--en],tn[en]=null}function Mp(e,i){tn[en++]=_n,tn[en++]=Mn,tn[en++]=xi,_n=i.id,Mn=i.overflow,xi=e}var ye=null,Pt=null,Ot=!1,bi=null,nn=!1,Kc=Error(r(519));function wi(e){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rr(We(i,e)),Kc}function Ap(e){var i=e.stateNode,s=e.type,o=e.memoizedProps;switch(i[fe]=e,i[Ee]=o,s){case"dialog":Nt("cancel",i),Nt("close",i);break;case"iframe":case"object":case"embed":Nt("load",i);break;case"video":case"audio":for(s=0;s<Cr.length;s++)Nt(Cr[s],i);break;case"source":Nt("error",i);break;case"img":case"image":case"link":Nt("error",i),Nt("load",i);break;case"details":Nt("toggle",i);break;case"input":Nt("invalid",i),Uo(i,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Nt("invalid",i);break;case"textarea":Nt("invalid",i),Gm(i,o.value,o.defaultValue,o.children)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||o.suppressHydrationWarning===!0||X0(i.textContent,s)?(o.popover!=null&&(Nt("beforetoggle",i),Nt("toggle",i)),o.onScroll!=null&&Nt("scroll",i),o.onScrollEnd!=null&&Nt("scrollend",i),o.onClick!=null&&(i.onclick=qn),i=!0):i=!1,i||wi(e,!0)}function Cp(e){for(ye=e.return;ye;)switch(ye.tag){case 5:case 31:case 13:nn=!1;return;case 27:case 3:nn=!0;return;default:ye=ye.return}}function ns(e){if(e!==ye)return!1;if(!Ot)return Cp(e),Ot=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||dd(e.type,e.memoizedProps)),s=!s),s&&Pt&&wi(e),Cp(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Pt=W0(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Pt=W0(e)}else i===27?(i=Pt,Vi(e.type)?(e=yd,yd=null,Pt=e):Pt=i):Pt=ye?sn(e.stateNode.nextSibling):null;return!0}function fa(){Pt=ye=null,Ot=!1}function Zc(){var e=bi;return e!==null&&(ke===null?ke=e:ke.push.apply(ke,e),bi=null),e}function rr(e){bi===null?bi=[e]:bi.push(e)}var Ic=N(null),da=null,Kn=null;function Si(e,i,s){et(Ic,i._currentValue),i._currentValue=s}function Zn(e){e._currentValue=Ic.current,G(Ic)}function Qc(e,i,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,o!==null&&(o.childLanes|=i)):o!==null&&(o.childLanes&i)!==i&&(o.childLanes|=i),e===s)break;e=e.return}}function Fc(e,i,s,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var y=d.dependencies;if(y!==null){var w=d.child;y=y.firstContext;t:for(;y!==null;){var z=y;y=d;for(var W=0;W<i.length;W++)if(z.context===i[W]){y.lanes|=s,z=y.alternate,z!==null&&(z.lanes|=s),Qc(y.return,s,e),o||(w=null);break t}y=z.next}}else if(d.tag===18){if(w=d.return,w===null)throw Error(r(341));w.lanes|=s,y=w.alternate,y!==null&&(y.lanes|=s),Qc(w,s,e),w=null}else w=d.child;if(w!==null)w.return=d;else for(w=d;w!==null;){if(w===e){w=null;break}if(d=w.sibling,d!==null){d.return=w.return,w=d;break}w=w.return}d=w}}function is(e,i,s,o){e=null;for(var d=i,y=!1;d!==null;){if(!y){if((d.flags&524288)!==0)y=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var w=d.alternate;if(w===null)throw Error(r(387));if(w=w.memoizedProps,w!==null){var z=d.type;Ye(d.pendingProps.value,w.value)||(e!==null?e.push(z):e=[z])}}else if(d===J.current){if(w=d.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Rr):e=[Rr])}d=d.return}e!==null&&Fc(i,e,s,o),i.flags|=262144}function tl(e){for(e=e.firstContext;e!==null;){if(!Ye(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ha(e){da=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ve(e){return Np(da,e)}function el(e,i){return da===null&&ha(e),Np(e,i)}function Np(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Kn===null){if(e===null)throw Error(r(308));Kn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Kn=Kn.next=i;return s}var NE=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(s,o){e.push(o)}};this.abort=function(){i.aborted=!0,e.forEach(function(s){return s()})}},DE=t.unstable_scheduleCallback,zE=t.unstable_NormalPriority,ae={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jc(){return{controller:new NE,data:new Map,refCount:0}}function or(e){e.refCount--,e.refCount===0&&DE(zE,function(){e.controller.abort()})}var lr=null,Wc=0,as=0,ss=null;function OE(e,i){if(lr===null){var s=lr=[];Wc=0,as=id(),ss={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Wc++,i.then(Dp,Dp),i}function Dp(){if(--Wc===0&&lr!==null){ss!==null&&(ss.status="fulfilled");var e=lr;lr=null,as=0,ss=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function RE(e,i){var s=[],o={status:"pending",value:null,reason:null,then:function(d){s.push(d)}};return e.then(function(){o.status="fulfilled",o.value=i;for(var d=0;d<s.length;d++)(0,s[d])(i)},function(d){for(o.status="rejected",o.reason=d,d=0;d<s.length;d++)(0,s[d])(void 0)}),o}var zp=A.S;A.S=function(e,i){m0=ge(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&OE(e,i),zp!==null&&zp(e,i)};var ma=N(null);function tf(){var e=ma.current;return e!==null?e:Xt.pooledCache}function nl(e,i){i===null?et(ma,ma.current):et(ma,i.pool)}function Op(){var e=tf();return e===null?null:{parent:ae._currentValue,pool:e}}var rs=Error(r(460)),ef=Error(r(474)),il=Error(r(542)),al={then:function(){}};function Rp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jp(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then(qn,qn),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Lp(e),e;default:if(typeof i.status=="string")i.then(qn,qn);else{if(e=Xt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=i,e.status="pending",e.then(function(o){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=o}},function(o){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=o}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Lp(e),e}throw ga=i,rs}}function pa(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ga=s,rs):s}}var ga=null;function Vp(){if(ga===null)throw Error(r(459));var e=ga;return ga=null,e}function Lp(e){if(e===rs||e===il)throw Error(r(483))}var os=null,ur=0;function sl(e){var i=ur;return ur+=1,os===null&&(os=[]),jp(os,e,i)}function cr(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function rl(e,i){throw i.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(i),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function kp(e){function i(it,nt){if(e){var st=it.deletions;st===null?(it.deletions=[nt],it.flags|=16):st.push(nt)}}function s(it,nt){if(!e)return null;for(;nt!==null;)i(it,nt),nt=nt.sibling;return null}function o(it){for(var nt=new Map;it!==null;)it.key!==null?nt.set(it.key,it):nt.set(it.index,it),it=it.sibling;return nt}function d(it,nt){return it=Pn(it,nt),it.index=0,it.sibling=null,it}function y(it,nt,st){return it.index=st,e?(st=it.alternate,st!==null?(st=st.index,st<nt?(it.flags|=67108866,nt):st):(it.flags|=67108866,nt)):(it.flags|=1048576,nt)}function w(it){return e&&it.alternate===null&&(it.flags|=67108866),it}function z(it,nt,st,ct){return nt===null||nt.tag!==6?(nt=qc(st,it.mode,ct),nt.return=it,nt):(nt=d(nt,st),nt.return=it,nt)}function W(it,nt,st,ct){var bt=st.type;return bt===E?ut(it,nt,st.props.children,ct,st.key):nt!==null&&(nt.elementType===bt||typeof bt=="object"&&bt!==null&&bt.$$typeof===P&&pa(bt)===nt.type)?(nt=d(nt,st.props),cr(nt,st),nt.return=it,nt):(nt=Jo(st.type,st.key,st.props,null,it.mode,ct),cr(nt,st),nt.return=it,nt)}function rt(it,nt,st,ct){return nt===null||nt.tag!==4||nt.stateNode.containerInfo!==st.containerInfo||nt.stateNode.implementation!==st.implementation?(nt=Xc(st,it.mode,ct),nt.return=it,nt):(nt=d(nt,st.children||[]),nt.return=it,nt)}function ut(it,nt,st,ct,bt){return nt===null||nt.tag!==7?(nt=ca(st,it.mode,ct,bt),nt.return=it,nt):(nt=d(nt,st),nt.return=it,nt)}function ft(it,nt,st){if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return nt=qc(""+nt,it.mode,st),nt.return=it,nt;if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case x:return st=Jo(nt.type,nt.key,nt.props,null,it.mode,st),cr(st,nt),st.return=it,st;case b:return nt=Xc(nt,it.mode,st),nt.return=it,nt;case P:return nt=pa(nt),ft(it,nt,st)}if(K(nt)||Y(nt))return nt=ca(nt,it.mode,st,null),nt.return=it,nt;if(typeof nt.then=="function")return ft(it,sl(nt),st);if(nt.$$typeof===S)return ft(it,el(it,nt),st);rl(it,nt)}return null}function ot(it,nt,st,ct){var bt=nt!==null?nt.key:null;if(typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint")return bt!==null?null:z(it,nt,""+st,ct);if(typeof st=="object"&&st!==null){switch(st.$$typeof){case x:return st.key===bt?W(it,nt,st,ct):null;case b:return st.key===bt?rt(it,nt,st,ct):null;case P:return st=pa(st),ot(it,nt,st,ct)}if(K(st)||Y(st))return bt!==null?null:ut(it,nt,st,ct,null);if(typeof st.then=="function")return ot(it,nt,sl(st),ct);if(st.$$typeof===S)return ot(it,nt,el(it,st),ct);rl(it,st)}return null}function lt(it,nt,st,ct,bt){if(typeof ct=="string"&&ct!==""||typeof ct=="number"||typeof ct=="bigint")return it=it.get(st)||null,z(nt,it,""+ct,bt);if(typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case x:return it=it.get(ct.key===null?st:ct.key)||null,W(nt,it,ct,bt);case b:return it=it.get(ct.key===null?st:ct.key)||null,rt(nt,it,ct,bt);case P:return ct=pa(ct),lt(it,nt,st,ct,bt)}if(K(ct)||Y(ct))return it=it.get(st)||null,ut(nt,it,ct,bt,null);if(typeof ct.then=="function")return lt(it,nt,st,sl(ct),bt);if(ct.$$typeof===S)return lt(it,nt,st,el(nt,ct),bt);rl(nt,ct)}return null}function pt(it,nt,st,ct){for(var bt=null,jt=null,yt=nt,At=nt=0,zt=null;yt!==null&&At<st.length;At++){yt.index>At?(zt=yt,yt=null):zt=yt.sibling;var Vt=ot(it,yt,st[At],ct);if(Vt===null){yt===null&&(yt=zt);break}e&&yt&&Vt.alternate===null&&i(it,yt),nt=y(Vt,nt,At),jt===null?bt=Vt:jt.sibling=Vt,jt=Vt,yt=zt}if(At===st.length)return s(it,yt),Ot&&$n(it,At),bt;if(yt===null){for(;At<st.length;At++)yt=ft(it,st[At],ct),yt!==null&&(nt=y(yt,nt,At),jt===null?bt=yt:jt.sibling=yt,jt=yt);return Ot&&$n(it,At),bt}for(yt=o(yt);At<st.length;At++)zt=lt(yt,it,At,st[At],ct),zt!==null&&(e&&zt.alternate!==null&&yt.delete(zt.key===null?At:zt.key),nt=y(zt,nt,At),jt===null?bt=zt:jt.sibling=zt,jt=zt);return e&&yt.forEach(function(Ui){return i(it,Ui)}),Ot&&$n(it,At),bt}function St(it,nt,st,ct){if(st==null)throw Error(r(151));for(var bt=null,jt=null,yt=nt,At=nt=0,zt=null,Vt=st.next();yt!==null&&!Vt.done;At++,Vt=st.next()){yt.index>At?(zt=yt,yt=null):zt=yt.sibling;var Ui=ot(it,yt,Vt.value,ct);if(Ui===null){yt===null&&(yt=zt);break}e&&yt&&Ui.alternate===null&&i(it,yt),nt=y(Ui,nt,At),jt===null?bt=Ui:jt.sibling=Ui,jt=Ui,yt=zt}if(Vt.done)return s(it,yt),Ot&&$n(it,At),bt;if(yt===null){for(;!Vt.done;At++,Vt=st.next())Vt=ft(it,Vt.value,ct),Vt!==null&&(nt=y(Vt,nt,At),jt===null?bt=Vt:jt.sibling=Vt,jt=Vt);return Ot&&$n(it,At),bt}for(yt=o(yt);!Vt.done;At++,Vt=st.next())Vt=lt(yt,it,At,Vt.value,ct),Vt!==null&&(e&&Vt.alternate!==null&&yt.delete(Vt.key===null?At:Vt.key),nt=y(Vt,nt,At),jt===null?bt=Vt:jt.sibling=Vt,jt=Vt);return e&&yt.forEach(function(X2){return i(it,X2)}),Ot&&$n(it,At),bt}function qt(it,nt,st,ct){if(typeof st=="object"&&st!==null&&st.type===E&&st.key===null&&(st=st.props.children),typeof st=="object"&&st!==null){switch(st.$$typeof){case x:t:{for(var bt=st.key;nt!==null;){if(nt.key===bt){if(bt=st.type,bt===E){if(nt.tag===7){s(it,nt.sibling),ct=d(nt,st.props.children),ct.return=it,it=ct;break t}}else if(nt.elementType===bt||typeof bt=="object"&&bt!==null&&bt.$$typeof===P&&pa(bt)===nt.type){s(it,nt.sibling),ct=d(nt,st.props),cr(ct,st),ct.return=it,it=ct;break t}s(it,nt);break}else i(it,nt);nt=nt.sibling}st.type===E?(ct=ca(st.props.children,it.mode,ct,st.key),ct.return=it,it=ct):(ct=Jo(st.type,st.key,st.props,null,it.mode,ct),cr(ct,st),ct.return=it,it=ct)}return w(it);case b:t:{for(bt=st.key;nt!==null;){if(nt.key===bt)if(nt.tag===4&&nt.stateNode.containerInfo===st.containerInfo&&nt.stateNode.implementation===st.implementation){s(it,nt.sibling),ct=d(nt,st.children||[]),ct.return=it,it=ct;break t}else{s(it,nt);break}else i(it,nt);nt=nt.sibling}ct=Xc(st,it.mode,ct),ct.return=it,it=ct}return w(it);case P:return st=pa(st),qt(it,nt,st,ct)}if(K(st))return pt(it,nt,st,ct);if(Y(st)){if(bt=Y(st),typeof bt!="function")throw Error(r(150));return st=bt.call(st),St(it,nt,st,ct)}if(typeof st.then=="function")return qt(it,nt,sl(st),ct);if(st.$$typeof===S)return qt(it,nt,el(it,st),ct);rl(it,st)}return typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint"?(st=""+st,nt!==null&&nt.tag===6?(s(it,nt.sibling),ct=d(nt,st),ct.return=it,it=ct):(s(it,nt),ct=qc(st,it.mode,ct),ct.return=it,it=ct),w(it)):s(it,nt)}return function(it,nt,st,ct){try{ur=0;var bt=qt(it,nt,st,ct);return os=null,bt}catch(yt){if(yt===rs||yt===il)throw yt;var jt=Ge(29,yt,null,it.mode);return jt.lanes=ct,jt.return=it,jt}finally{}}}var ya=kp(!0),Bp=kp(!1),Ei=!1;function nf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function af(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _i(e,i,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Lt&2)!==0){var d=o.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),o.pending=i,i=Fo(e),wp(e,null,s),i}return Qo(e,o,i,s),Fo(e)}function fr(e,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var o=i.lanes;o&=e.pendingLanes,s|=o,i.lanes=s,No(e,s)}}function sf(e,i){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var d=null,y=null;if(s=s.firstBaseUpdate,s!==null){do{var w={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};y===null?d=y=w:y=y.next=w,s=s.next}while(s!==null);y===null?d=y=i:y=y.next=i}else d=y=i;s={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:y,shared:o.shared,callbacks:o.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=i:e.next=i,s.lastBaseUpdate=i}var rf=!1;function dr(){if(rf){var e=ss;if(e!==null)throw e}}function hr(e,i,s,o){rf=!1;var d=e.updateQueue;Ei=!1;var y=d.firstBaseUpdate,w=d.lastBaseUpdate,z=d.shared.pending;if(z!==null){d.shared.pending=null;var W=z,rt=W.next;W.next=null,w===null?y=rt:w.next=rt,w=W;var ut=e.alternate;ut!==null&&(ut=ut.updateQueue,z=ut.lastBaseUpdate,z!==w&&(z===null?ut.firstBaseUpdate=rt:z.next=rt,ut.lastBaseUpdate=W))}if(y!==null){var ft=d.baseState;w=0,ut=rt=W=null,z=y;do{var ot=z.lane&-536870913,lt=ot!==z.lane;if(lt?(Dt&ot)===ot:(o&ot)===ot){ot!==0&&ot===as&&(rf=!0),ut!==null&&(ut=ut.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});t:{var pt=e,St=z;ot=i;var qt=s;switch(St.tag){case 1:if(pt=St.payload,typeof pt=="function"){ft=pt.call(qt,ft,ot);break t}ft=pt;break t;case 3:pt.flags=pt.flags&-65537|128;case 0:if(pt=St.payload,ot=typeof pt=="function"?pt.call(qt,ft,ot):pt,ot==null)break t;ft=p({},ft,ot);break t;case 2:Ei=!0}}ot=z.callback,ot!==null&&(e.flags|=64,lt&&(e.flags|=8192),lt=d.callbacks,lt===null?d.callbacks=[ot]:lt.push(ot))}else lt={lane:ot,tag:z.tag,payload:z.payload,callback:z.callback,next:null},ut===null?(rt=ut=lt,W=ft):ut=ut.next=lt,w|=ot;if(z=z.next,z===null){if(z=d.shared.pending,z===null)break;lt=z,z=lt.next,lt.next=null,d.lastBaseUpdate=lt,d.shared.pending=null}}while(!0);ut===null&&(W=ft),d.baseState=W,d.firstBaseUpdate=rt,d.lastBaseUpdate=ut,y===null&&(d.shared.lanes=0),Di|=w,e.lanes=w,e.memoizedState=ft}}function Hp(e,i){if(typeof e!="function")throw Error(r(191,e));e.call(i)}function Up(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Hp(s[e],i)}var ls=N(null),ol=N(0);function Yp(e,i){e=ii,et(ol,e),et(ls,i),ii=e|i.baseLanes}function of(){et(ol,ii),et(ls,ls.current)}function lf(){ii=ol.current,G(ls),G(ol)}var qe=N(null),an=null;function Mi(e){var i=e.alternate;et(ee,ee.current&1),et(qe,e),an===null&&(i===null||ls.current!==null||i.memoizedState!==null)&&(an=e)}function uf(e){et(ee,ee.current),et(qe,e),an===null&&(an=e)}function Gp(e){e.tag===22?(et(ee,ee.current),et(qe,e),an===null&&(an=e)):Ai()}function Ai(){et(ee,ee.current),et(qe,qe.current)}function Xe(e){G(qe),an===e&&(an=null),G(ee)}var ee=N(0);function ll(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||pd(s)||gd(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var In=0,Mt=null,Yt=null,se=null,ul=!1,us=!1,va=!1,cl=0,mr=0,cs=null,jE=0;function Ft(){throw Error(r(321))}function cf(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!Ye(e[s],i[s]))return!1;return!0}function ff(e,i,s,o,d,y){return In=y,Mt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,A.H=e===null||e.memoizedState===null?_g:Mf,va=!1,y=s(o,d),va=!1,us&&(y=Xp(i,s,o,d)),qp(e),y}function qp(e){A.H=yr;var i=Yt!==null&&Yt.next!==null;if(In=0,se=Yt=Mt=null,ul=!1,mr=0,cs=null,i)throw Error(r(300));e===null||re||(e=e.dependencies,e!==null&&tl(e)&&(re=!0))}function Xp(e,i,s,o){Mt=e;var d=0;do{if(us&&(cs=null),mr=0,us=!1,25<=d)throw Error(r(301));if(d+=1,se=Yt=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}A.H=Mg,y=i(s,o)}while(us);return y}function VE(){var e=A.H,i=e.useState()[0];return i=typeof i.then=="function"?pr(i):i,e=e.useState()[0],(Yt!==null?Yt.memoizedState:null)!==e&&(Mt.flags|=1024),i}function df(){var e=cl!==0;return cl=0,e}function hf(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function mf(e){if(ul){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}ul=!1}In=0,se=Yt=Mt=null,us=!1,mr=cl=0,cs=null}function Ae(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return se===null?Mt.memoizedState=se=e:se=se.next=e,se}function ne(){if(Yt===null){var e=Mt.alternate;e=e!==null?e.memoizedState:null}else e=Yt.next;var i=se===null?Mt.memoizedState:se.next;if(i!==null)se=i,Yt=e;else{if(e===null)throw Mt.alternate===null?Error(r(467)):Error(r(310));Yt=e,e={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},se===null?Mt.memoizedState=se=e:se=se.next=e}return se}function fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pr(e){var i=mr;return mr+=1,cs===null&&(cs=[]),e=jp(cs,e,i),i=Mt,(se===null?i.memoizedState:se.next)===null&&(i=i.alternate,A.H=i===null||i.memoizedState===null?_g:Mf),e}function dl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pr(e);if(e.$$typeof===S)return ve(e)}throw Error(r(438,String(e)))}function pf(e){var i=null,s=Mt.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var o=Mt.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(i={data:o.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=fl(),Mt.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(e),o=0;o<e;o++)s[o]=X;return i.index++,s}function Qn(e,i){return typeof i=="function"?i(e):i}function hl(e){var i=ne();return gf(i,Yt,e)}function gf(e,i,s){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=s;var d=e.baseQueue,y=o.pending;if(y!==null){if(d!==null){var w=d.next;d.next=y.next,y.next=w}i.baseQueue=d=y,o.pending=null}if(y=e.baseState,d===null)e.memoizedState=y;else{i=d.next;var z=w=null,W=null,rt=i,ut=!1;do{var ft=rt.lane&-536870913;if(ft!==rt.lane?(Dt&ft)===ft:(In&ft)===ft){var ot=rt.revertLane;if(ot===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:rt.action,hasEagerState:rt.hasEagerState,eagerState:rt.eagerState,next:null}),ft===as&&(ut=!0);else if((In&ot)===ot){rt=rt.next,ot===as&&(ut=!0);continue}else ft={lane:0,revertLane:rt.revertLane,gesture:null,action:rt.action,hasEagerState:rt.hasEagerState,eagerState:rt.eagerState,next:null},W===null?(z=W=ft,w=y):W=W.next=ft,Mt.lanes|=ot,Di|=ot;ft=rt.action,va&&s(y,ft),y=rt.hasEagerState?rt.eagerState:s(y,ft)}else ot={lane:ft,revertLane:rt.revertLane,gesture:rt.gesture,action:rt.action,hasEagerState:rt.hasEagerState,eagerState:rt.eagerState,next:null},W===null?(z=W=ot,w=y):W=W.next=ot,Mt.lanes|=ft,Di|=ft;rt=rt.next}while(rt!==null&&rt!==i);if(W===null?w=y:W.next=z,!Ye(y,e.memoizedState)&&(re=!0,ut&&(s=ss,s!==null)))throw s;e.memoizedState=y,e.baseState=w,e.baseQueue=W,o.lastRenderedState=y}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function yf(e){var i=ne(),s=i.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=s.dispatch,d=s.pending,y=i.memoizedState;if(d!==null){s.pending=null;var w=d=d.next;do y=e(y,w.action),w=w.next;while(w!==d);Ye(y,i.memoizedState)||(re=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),s.lastRenderedState=y}return[y,o]}function Pp(e,i,s){var o=Mt,d=ne(),y=Ot;if(y){if(s===void 0)throw Error(r(407));s=s()}else s=i();var w=!Ye((Yt||d).memoizedState,s);if(w&&(d.memoizedState=s,re=!0),d=d.queue,bf(Zp.bind(null,o,d,e),[e]),d.getSnapshot!==i||w||se!==null&&se.memoizedState.tag&1){if(o.flags|=2048,fs(9,{destroy:void 0},Kp.bind(null,o,d,s,i),null),Xt===null)throw Error(r(349));y||(In&127)!==0||$p(o,i,s)}return s}function $p(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=Mt.updateQueue,i===null?(i=fl(),Mt.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function Kp(e,i,s,o){i.value=s,i.getSnapshot=o,Ip(i)&&Qp(e)}function Zp(e,i,s){return s(function(){Ip(i)&&Qp(e)})}function Ip(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!Ye(e,s)}catch{return!0}}function Qp(e){var i=ua(e,2);i!==null&&Be(i,e,2)}function vf(e){var i=Ae();if(typeof e=="function"){var s=e;if(e=s(),va){En(!0);try{s()}finally{En(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:e},i}function Fp(e,i,s,o){return e.baseState=s,gf(e,Yt,typeof o=="function"?o:Qn)}function LE(e,i,s,o,d){if(gl(e))throw Error(r(485));if(e=i.action,e!==null){var y={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){y.listeners.push(w)}};A.T!==null?s(!0):y.isTransition=!1,o(y),s=i.pending,s===null?(y.next=i.pending=y,Jp(i,y)):(y.next=s.next,i.pending=s.next=y)}}function Jp(e,i){var s=i.action,o=i.payload,d=e.state;if(i.isTransition){var y=A.T,w={};A.T=w;try{var z=s(d,o),W=A.S;W!==null&&W(w,z),Wp(e,i,z)}catch(rt){xf(e,i,rt)}finally{y!==null&&w.types!==null&&(y.types=w.types),A.T=y}}else try{y=s(d,o),Wp(e,i,y)}catch(rt){xf(e,i,rt)}}function Wp(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){tg(e,i,o)},function(o){return xf(e,i,o)}):tg(e,i,s)}function tg(e,i,s){i.status="fulfilled",i.value=s,eg(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,Jp(e,s)))}function xf(e,i,s){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do i.status="rejected",i.reason=s,eg(i),i=i.next;while(i!==o)}e.action=null}function eg(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function ng(e,i){return i}function ig(e,i){if(Ot){var s=Xt.formState;if(s!==null){t:{var o=Mt;if(Ot){if(Pt){e:{for(var d=Pt,y=nn;d.nodeType!==8;){if(!y){d=null;break e}if(d=sn(d.nextSibling),d===null){d=null;break e}}y=d.data,d=y==="F!"||y==="F"?d:null}if(d){Pt=sn(d.nextSibling),o=d.data==="F!";break t}}wi(o)}o=!1}o&&(i=s[0])}}return s=Ae(),s.memoizedState=s.baseState=i,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ng,lastRenderedState:i},s.queue=o,s=Sg.bind(null,Mt,o),o.dispatch=s,o=vf(!1),y=_f.bind(null,Mt,!1,o.queue),o=Ae(),d={state:i,dispatch:null,action:e,pending:null},o.queue=d,s=LE.bind(null,Mt,d,y,s),d.dispatch=s,o.memoizedState=e,[i,s,!1]}function ag(e){var i=ne();return sg(i,Yt,e)}function sg(e,i,s){if(i=gf(e,i,ng)[0],e=hl(Qn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var o=pr(i)}catch(w){throw w===rs?il:w}else o=i;i=ne();var d=i.queue,y=d.dispatch;return s!==i.memoizedState&&(Mt.flags|=2048,fs(9,{destroy:void 0},kE.bind(null,d,s),null)),[o,y,e]}function kE(e,i){e.action=i}function rg(e){var i=ne(),s=Yt;if(s!==null)return sg(i,s,e);ne(),i=i.memoizedState,s=ne();var o=s.queue.dispatch;return s.memoizedState=e,[i,o,!1]}function fs(e,i,s,o){return e={tag:e,create:s,deps:o,inst:i,next:null},i=Mt.updateQueue,i===null&&(i=fl(),Mt.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,i.lastEffect=e),e}function og(){return ne().memoizedState}function ml(e,i,s,o){var d=Ae();Mt.flags|=e,d.memoizedState=fs(1|i,{destroy:void 0},s,o===void 0?null:o)}function pl(e,i,s,o){var d=ne();o=o===void 0?null:o;var y=d.memoizedState.inst;Yt!==null&&o!==null&&cf(o,Yt.memoizedState.deps)?d.memoizedState=fs(i,y,s,o):(Mt.flags|=e,d.memoizedState=fs(1|i,y,s,o))}function lg(e,i){ml(8390656,8,e,i)}function bf(e,i){pl(2048,8,e,i)}function BE(e){Mt.flags|=4;var i=Mt.updateQueue;if(i===null)i=fl(),Mt.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function ug(e){var i=ne().memoizedState;return BE({ref:i,nextImpl:e}),function(){if((Lt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function cg(e,i){return pl(4,2,e,i)}function fg(e,i){return pl(4,4,e,i)}function dg(e,i){if(typeof i=="function"){e=e();var s=i(e);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function hg(e,i,s){s=s!=null?s.concat([e]):null,pl(4,4,dg.bind(null,i,e),s)}function wf(){}function mg(e,i){var s=ne();i=i===void 0?null:i;var o=s.memoizedState;return i!==null&&cf(i,o[1])?o[0]:(s.memoizedState=[e,i],e)}function pg(e,i){var s=ne();i=i===void 0?null:i;var o=s.memoizedState;if(i!==null&&cf(i,o[1]))return o[0];if(o=e(),va){En(!0);try{e()}finally{En(!1)}}return s.memoizedState=[o,i],o}function Sf(e,i,s){return s===void 0||(In&1073741824)!==0&&(Dt&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=g0(),Mt.lanes|=e,Di|=e,s)}function gg(e,i,s,o){return Ye(s,i)?s:ls.current!==null?(e=Sf(e,s,o),Ye(e,i)||(re=!0),e):(In&42)===0||(In&1073741824)!==0&&(Dt&261930)===0?(re=!0,e.memoizedState=s):(e=g0(),Mt.lanes|=e,Di|=e,i)}function yg(e,i,s,o,d){var y=j.p;j.p=y!==0&&8>y?y:8;var w=A.T,z={};A.T=z,_f(e,!1,i,s);try{var W=d(),rt=A.S;if(rt!==null&&rt(z,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var ut=RE(W,o);gr(e,i,ut,Ke(e))}else gr(e,i,o,Ke(e))}catch(ft){gr(e,i,{then:function(){},status:"rejected",reason:ft},Ke())}finally{j.p=y,w!==null&&z.types!==null&&(w.types=z.types),A.T=w}}function HE(){}function Ef(e,i,s,o){if(e.tag!==5)throw Error(r(476));var d=vg(e).queue;yg(e,d,i,V,s===null?HE:function(){return xg(e),s(o)})}function vg(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:V},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function xg(e){var i=vg(e);i.next===null&&(i=e.alternate.memoizedState),gr(e,i.next.queue,{},Ke())}function Tf(){return ve(Rr)}function bg(){return ne().memoizedState}function wg(){return ne().memoizedState}function UE(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=Ke();e=Ti(s);var o=_i(i,e,s);o!==null&&(Be(o,i,s),fr(o,i,s)),i={cache:Jc()},e.payload=i;return}i=i.return}}function YE(e,i,s){var o=Ke();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},gl(e)?Eg(i,s):(s=Yc(e,i,s,o),s!==null&&(Be(s,e,o),Tg(s,i,o)))}function Sg(e,i,s){var o=Ke();gr(e,i,s,o)}function gr(e,i,s,o){var d={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(gl(e))Eg(i,d);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var w=i.lastRenderedState,z=y(w,s);if(d.hasEagerState=!0,d.eagerState=z,Ye(z,w))return Qo(e,i,d,0),Xt===null&&Io(),!1}catch{}finally{}if(s=Yc(e,i,d,o),s!==null)return Be(s,e,o),Tg(s,i,o),!0}return!1}function _f(e,i,s,o){if(o={lane:2,revertLane:id(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},gl(e)){if(i)throw Error(r(479))}else i=Yc(e,s,o,2),i!==null&&Be(i,e,2)}function gl(e){var i=e.alternate;return e===Mt||i!==null&&i===Mt}function Eg(e,i){us=ul=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Tg(e,i,s){if((s&4194048)!==0){var o=i.lanes;o&=e.pendingLanes,s|=o,i.lanes=s,No(e,s)}}var yr={readContext:ve,use:dl,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft,useHostTransitionStatus:Ft,useFormState:Ft,useActionState:Ft,useOptimistic:Ft,useMemoCache:Ft,useCacheRefresh:Ft};yr.useEffectEvent=Ft;var _g={readContext:ve,use:dl,useCallback:function(e,i){return Ae().memoizedState=[e,i===void 0?null:i],e},useContext:ve,useEffect:lg,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,ml(4194308,4,dg.bind(null,i,e),s)},useLayoutEffect:function(e,i){return ml(4194308,4,e,i)},useInsertionEffect:function(e,i){ml(4,2,e,i)},useMemo:function(e,i){var s=Ae();i=i===void 0?null:i;var o=e();if(va){En(!0);try{e()}finally{En(!1)}}return s.memoizedState=[o,i],o},useReducer:function(e,i,s){var o=Ae();if(s!==void 0){var d=s(i);if(va){En(!0);try{s(i)}finally{En(!1)}}}else d=i;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=YE.bind(null,Mt,e),[o.memoizedState,e]},useRef:function(e){var i=Ae();return e={current:e},i.memoizedState=e},useState:function(e){e=vf(e);var i=e.queue,s=Sg.bind(null,Mt,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:wf,useDeferredValue:function(e,i){var s=Ae();return Sf(s,e,i)},useTransition:function(){var e=vf(!1);return e=yg.bind(null,Mt,e.queue,!0,!1),Ae().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var o=Mt,d=Ae();if(Ot){if(s===void 0)throw Error(r(407));s=s()}else{if(s=i(),Xt===null)throw Error(r(349));(Dt&127)!==0||$p(o,i,s)}d.memoizedState=s;var y={value:s,getSnapshot:i};return d.queue=y,lg(Zp.bind(null,o,y,e),[e]),o.flags|=2048,fs(9,{destroy:void 0},Kp.bind(null,o,y,s,i),null),s},useId:function(){var e=Ae(),i=Xt.identifierPrefix;if(Ot){var s=Mn,o=_n;s=(o&~(1<<32-Me(o)-1)).toString(32)+s,i="_"+i+"R_"+s,s=cl++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=jE++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:Tf,useFormState:ig,useActionState:ig,useOptimistic:function(e){var i=Ae();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=_f.bind(null,Mt,!0,s),s.dispatch=i,[e,i]},useMemoCache:pf,useCacheRefresh:function(){return Ae().memoizedState=UE.bind(null,Mt)},useEffectEvent:function(e){var i=Ae(),s={impl:e};return i.memoizedState=s,function(){if((Lt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},Mf={readContext:ve,use:dl,useCallback:mg,useContext:ve,useEffect:bf,useImperativeHandle:hg,useInsertionEffect:cg,useLayoutEffect:fg,useMemo:pg,useReducer:hl,useRef:og,useState:function(){return hl(Qn)},useDebugValue:wf,useDeferredValue:function(e,i){var s=ne();return gg(s,Yt.memoizedState,e,i)},useTransition:function(){var e=hl(Qn)[0],i=ne().memoizedState;return[typeof e=="boolean"?e:pr(e),i]},useSyncExternalStore:Pp,useId:bg,useHostTransitionStatus:Tf,useFormState:ag,useActionState:ag,useOptimistic:function(e,i){var s=ne();return Fp(s,Yt,e,i)},useMemoCache:pf,useCacheRefresh:wg};Mf.useEffectEvent=ug;var Mg={readContext:ve,use:dl,useCallback:mg,useContext:ve,useEffect:bf,useImperativeHandle:hg,useInsertionEffect:cg,useLayoutEffect:fg,useMemo:pg,useReducer:yf,useRef:og,useState:function(){return yf(Qn)},useDebugValue:wf,useDeferredValue:function(e,i){var s=ne();return Yt===null?Sf(s,e,i):gg(s,Yt.memoizedState,e,i)},useTransition:function(){var e=yf(Qn)[0],i=ne().memoizedState;return[typeof e=="boolean"?e:pr(e),i]},useSyncExternalStore:Pp,useId:bg,useHostTransitionStatus:Tf,useFormState:rg,useActionState:rg,useOptimistic:function(e,i){var s=ne();return Yt!==null?Fp(s,Yt,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:pf,useCacheRefresh:wg};Mg.useEffectEvent=ug;function Af(e,i,s,o){i=e.memoizedState,s=s(o,i),s=s==null?i:p({},i,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Cf={enqueueSetState:function(e,i,s){e=e._reactInternals;var o=Ke(),d=Ti(o);d.payload=i,s!=null&&(d.callback=s),i=_i(e,d,o),i!==null&&(Be(i,e,o),fr(i,e,o))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var o=Ke(),d=Ti(o);d.tag=1,d.payload=i,s!=null&&(d.callback=s),i=_i(e,d,o),i!==null&&(Be(i,e,o),fr(i,e,o))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=Ke(),o=Ti(s);o.tag=2,i!=null&&(o.callback=i),i=_i(e,o,s),i!==null&&(Be(i,e,s),fr(i,e,s))}};function Ag(e,i,s,o,d,y,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,y,w):i.prototype&&i.prototype.isPureReactComponent?!ir(s,o)||!ir(d,y):!0}function Cg(e,i,s,o){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,o),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,o),i.state!==e&&Cf.enqueueReplaceState(i,i.state,null)}function xa(e,i){var s=i;if("ref"in i){s={};for(var o in i)o!=="ref"&&(s[o]=i[o])}if(e=e.defaultProps){s===i&&(s=p({},s));for(var d in e)s[d]===void 0&&(s[d]=e[d])}return s}function Ng(e){Zo(e)}function Dg(e){console.error(e)}function zg(e){Zo(e)}function yl(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(o){setTimeout(function(){throw o})}}function Og(e,i,s){try{var o=e.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Nf(e,i,s){return s=Ti(s),s.tag=3,s.payload={element:null},s.callback=function(){yl(e,i)},s}function Rg(e){return e=Ti(e),e.tag=3,e}function jg(e,i,s,o){var d=s.type.getDerivedStateFromError;if(typeof d=="function"){var y=o.value;e.payload=function(){return d(y)},e.callback=function(){Og(i,s,o)}}var w=s.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(e.callback=function(){Og(i,s,o),typeof d!="function"&&(zi===null?zi=new Set([this]):zi.add(this));var z=o.stack;this.componentDidCatch(o.value,{componentStack:z!==null?z:""})})}function GE(e,i,s,o,d){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(i=s.alternate,i!==null&&is(i,s,d,!0),s=qe.current,s!==null){switch(s.tag){case 31:case 13:return an===null?Nl():s.alternate===null&&Jt===0&&(Jt=3),s.flags&=-257,s.flags|=65536,s.lanes=d,o===al?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([o]):i.add(o),td(e,o,d)),!1;case 22:return s.flags|=65536,o===al?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([o]):s.add(o)),td(e,o,d)),!1}throw Error(r(435,s.tag))}return td(e,o,d),Nl(),!1}if(Ot)return i=qe.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,o!==Kc&&(e=Error(r(422),{cause:o}),rr(We(e,s)))):(o!==Kc&&(i=Error(r(423),{cause:o}),rr(We(i,s))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=We(o,s),d=Nf(e.stateNode,o,d),sf(e,d),Jt!==4&&(Jt=2)),!1;var y=Error(r(520),{cause:o});if(y=We(y,s),_r===null?_r=[y]:_r.push(y),Jt!==4&&(Jt=2),i===null)return!0;o=We(o,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=d&-d,s.lanes|=e,e=Nf(s.stateNode,o,e),sf(s,e),!1;case 1:if(i=s.type,y=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(zi===null||!zi.has(y))))return s.flags|=65536,d&=-d,s.lanes|=d,d=Rg(d),jg(d,e,s,o),sf(s,d),!1}s=s.return}while(s!==null);return!1}var Df=Error(r(461)),re=!1;function xe(e,i,s,o){i.child=e===null?Bp(i,null,s,o):ya(i,e.child,s,o)}function Vg(e,i,s,o,d){s=s.render;var y=i.ref;if("ref"in o){var w={};for(var z in o)z!=="ref"&&(w[z]=o[z])}else w=o;return ha(i),o=ff(e,i,s,w,y,d),z=df(),e!==null&&!re?(hf(e,i,d),Fn(e,i,d)):(Ot&&z&&Pc(i),i.flags|=1,xe(e,i,o,d),i.child)}function Lg(e,i,s,o,d){if(e===null){var y=s.type;return typeof y=="function"&&!Gc(y)&&y.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=y,kg(e,i,y,o,d)):(e=Jo(s.type,null,o,i,i.mode,d),e.ref=i.ref,e.return=i,i.child=e)}if(y=e.child,!Bf(e,d)){var w=y.memoizedProps;if(s=s.compare,s=s!==null?s:ir,s(w,o)&&e.ref===i.ref)return Fn(e,i,d)}return i.flags|=1,e=Pn(y,o),e.ref=i.ref,e.return=i,i.child=e}function kg(e,i,s,o,d){if(e!==null){var y=e.memoizedProps;if(ir(y,o)&&e.ref===i.ref)if(re=!1,i.pendingProps=o=y,Bf(e,d))(e.flags&131072)!==0&&(re=!0);else return i.lanes=e.lanes,Fn(e,i,d)}return zf(e,i,s,o,d)}function Bg(e,i,s,o){var d=o.children,y=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|s:s,e!==null){for(o=i.child=e.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~y}else o=0,i.child=null;return Hg(e,i,y,s,o)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&nl(i,y!==null?y.cachePool:null),y!==null?Yp(i,y):of(),Gp(i);else return o=i.lanes=536870912,Hg(e,i,y!==null?y.baseLanes|s:s,s,o)}else y!==null?(nl(i,y.cachePool),Yp(i,y),Ai(),i.memoizedState=null):(e!==null&&nl(i,null),of(),Ai());return xe(e,i,d,s),i.child}function vr(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Hg(e,i,s,o,d){var y=tf();return y=y===null?null:{parent:ae._currentValue,pool:y},i.memoizedState={baseLanes:s,cachePool:y},e!==null&&nl(i,null),of(),Gp(i),e!==null&&is(e,i,o,!0),i.childLanes=d,null}function vl(e,i){return i=bl({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function Ug(e,i,s){return ya(i,e.child,null,s),e=vl(i,i.pendingProps),e.flags|=2,Xe(i),i.memoizedState=null,e}function qE(e,i,s){var o=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(Ot){if(o.mode==="hidden")return e=vl(i,o),i.lanes=536870912,vr(null,e);if(uf(i),(e=Pt)?(e=J0(e,nn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:xi!==null?{id:_n,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},s=Ep(e),s.return=i,i.child=s,ye=i,Pt=null)):e=null,e===null)throw wi(i);return i.lanes=536870912,null}return vl(i,o)}var y=e.memoizedState;if(y!==null){var w=y.dehydrated;if(uf(i),d)if(i.flags&256)i.flags&=-257,i=Ug(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(r(558));else if(re||is(e,i,s,!1),d=(s&e.childLanes)!==0,re||d){if(o=Xt,o!==null&&(w=Do(o,s),w!==0&&w!==y.retryLane))throw y.retryLane=w,ua(e,w),Be(o,e,w),Df;Nl(),i=Ug(e,i,s)}else e=y.treeContext,Pt=sn(w.nextSibling),ye=i,Ot=!0,bi=null,nn=!1,e!==null&&Mp(i,e),i=vl(i,o),i.flags|=4096;return i}return e=Pn(e.child,{mode:o.mode,children:o.children}),e.ref=i.ref,i.child=e,e.return=i,e}function xl(e,i){var s=i.ref;if(s===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(e===null||e.ref!==s)&&(i.flags|=4194816)}}function zf(e,i,s,o,d){return ha(i),s=ff(e,i,s,o,void 0,d),o=df(),e!==null&&!re?(hf(e,i,d),Fn(e,i,d)):(Ot&&o&&Pc(i),i.flags|=1,xe(e,i,s,d),i.child)}function Yg(e,i,s,o,d,y){return ha(i),i.updateQueue=null,s=Xp(i,o,s,d),qp(e),o=df(),e!==null&&!re?(hf(e,i,y),Fn(e,i,y)):(Ot&&o&&Pc(i),i.flags|=1,xe(e,i,s,y),i.child)}function Gg(e,i,s,o,d){if(ha(i),i.stateNode===null){var y=Wa,w=s.contextType;typeof w=="object"&&w!==null&&(y=ve(w)),y=new s(o,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Cf,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=o,y.state=i.memoizedState,y.refs={},nf(i),w=s.contextType,y.context=typeof w=="object"&&w!==null?ve(w):Wa,y.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Af(i,s,w,o),y.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(w=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),w!==y.state&&Cf.enqueueReplaceState(y,y.state,null),hr(i,o,y,d),dr(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),o=!0}else if(e===null){y=i.stateNode;var z=i.memoizedProps,W=xa(s,z);y.props=W;var rt=y.context,ut=s.contextType;w=Wa,typeof ut=="object"&&ut!==null&&(w=ve(ut));var ft=s.getDerivedStateFromProps;ut=typeof ft=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=i.pendingProps!==z,ut||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||rt!==w)&&Cg(i,y,o,w),Ei=!1;var ot=i.memoizedState;y.state=ot,hr(i,o,y,d),dr(),rt=i.memoizedState,z||ot!==rt||Ei?(typeof ft=="function"&&(Af(i,s,ft,o),rt=i.memoizedState),(W=Ei||Ag(i,s,W,o,ot,rt,w))?(ut||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=o,i.memoizedState=rt),y.props=o,y.state=rt,y.context=w,o=W):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),o=!1)}else{y=i.stateNode,af(e,i),w=i.memoizedProps,ut=xa(s,w),y.props=ut,ft=i.pendingProps,ot=y.context,rt=s.contextType,W=Wa,typeof rt=="object"&&rt!==null&&(W=ve(rt)),z=s.getDerivedStateFromProps,(rt=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(w!==ft||ot!==W)&&Cg(i,y,o,W),Ei=!1,ot=i.memoizedState,y.state=ot,hr(i,o,y,d),dr();var lt=i.memoizedState;w!==ft||ot!==lt||Ei||e!==null&&e.dependencies!==null&&tl(e.dependencies)?(typeof z=="function"&&(Af(i,s,z,o),lt=i.memoizedState),(ut=Ei||Ag(i,s,ut,o,ot,lt,W)||e!==null&&e.dependencies!==null&&tl(e.dependencies))?(rt||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(o,lt,W),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(o,lt,W)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||w===e.memoizedProps&&ot===e.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&ot===e.memoizedState||(i.flags|=1024),i.memoizedProps=o,i.memoizedState=lt),y.props=o,y.state=lt,y.context=W,o=ut):(typeof y.componentDidUpdate!="function"||w===e.memoizedProps&&ot===e.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&ot===e.memoizedState||(i.flags|=1024),o=!1)}return y=o,xl(e,i),o=(i.flags&128)!==0,y||o?(y=i.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,e!==null&&o?(i.child=ya(i,e.child,null,d),i.child=ya(i,null,s,d)):xe(e,i,s,d),i.memoizedState=y.state,e=i.child):e=Fn(e,i,d),e}function qg(e,i,s,o){return fa(),i.flags|=256,xe(e,i,s,o),i.child}var Of={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rf(e){return{baseLanes:e,cachePool:Op()}}function jf(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=$e),e}function Xg(e,i,s){var o=i.pendingProps,d=!1,y=(i.flags&128)!==0,w;if((w=y)||(w=e!==null&&e.memoizedState===null?!1:(ee.current&2)!==0),w&&(d=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,e===null){if(Ot){if(d?Mi(i):Ai(),(e=Pt)?(e=J0(e,nn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:xi!==null?{id:_n,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},s=Ep(e),s.return=i,i.child=s,ye=i,Pt=null)):e=null,e===null)throw wi(i);return gd(e)?i.lanes=32:i.lanes=536870912,null}var z=o.children;return o=o.fallback,d?(Ai(),d=i.mode,z=bl({mode:"hidden",children:z},d),o=ca(o,d,s,null),z.return=i,o.return=i,z.sibling=o,i.child=z,o=i.child,o.memoizedState=Rf(s),o.childLanes=jf(e,w,s),i.memoizedState=Of,vr(null,o)):(Mi(i),Vf(i,z))}var W=e.memoizedState;if(W!==null&&(z=W.dehydrated,z!==null)){if(y)i.flags&256?(Mi(i),i.flags&=-257,i=Lf(e,i,s)):i.memoizedState!==null?(Ai(),i.child=e.child,i.flags|=128,i=null):(Ai(),z=o.fallback,d=i.mode,o=bl({mode:"visible",children:o.children},d),z=ca(z,d,s,null),z.flags|=2,o.return=i,z.return=i,o.sibling=z,i.child=o,ya(i,e.child,null,s),o=i.child,o.memoizedState=Rf(s),o.childLanes=jf(e,w,s),i.memoizedState=Of,i=vr(null,o));else if(Mi(i),gd(z)){if(w=z.nextSibling&&z.nextSibling.dataset,w)var rt=w.dgst;w=rt,o=Error(r(419)),o.stack="",o.digest=w,rr({value:o,source:null,stack:null}),i=Lf(e,i,s)}else if(re||is(e,i,s,!1),w=(s&e.childLanes)!==0,re||w){if(w=Xt,w!==null&&(o=Do(w,s),o!==0&&o!==W.retryLane))throw W.retryLane=o,ua(e,o),Be(w,e,o),Df;pd(z)||Nl(),i=Lf(e,i,s)}else pd(z)?(i.flags|=192,i.child=e.child,i=null):(e=W.treeContext,Pt=sn(z.nextSibling),ye=i,Ot=!0,bi=null,nn=!1,e!==null&&Mp(i,e),i=Vf(i,o.children),i.flags|=4096);return i}return d?(Ai(),z=o.fallback,d=i.mode,W=e.child,rt=W.sibling,o=Pn(W,{mode:"hidden",children:o.children}),o.subtreeFlags=W.subtreeFlags&65011712,rt!==null?z=Pn(rt,z):(z=ca(z,d,s,null),z.flags|=2),z.return=i,o.return=i,o.sibling=z,i.child=o,vr(null,o),o=i.child,z=e.child.memoizedState,z===null?z=Rf(s):(d=z.cachePool,d!==null?(W=ae._currentValue,d=d.parent!==W?{parent:W,pool:W}:d):d=Op(),z={baseLanes:z.baseLanes|s,cachePool:d}),o.memoizedState=z,o.childLanes=jf(e,w,s),i.memoizedState=Of,vr(e.child,o)):(Mi(i),s=e.child,e=s.sibling,s=Pn(s,{mode:"visible",children:o.children}),s.return=i,s.sibling=null,e!==null&&(w=i.deletions,w===null?(i.deletions=[e],i.flags|=16):w.push(e)),i.child=s,i.memoizedState=null,s)}function Vf(e,i){return i=bl({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function bl(e,i){return e=Ge(22,e,null,i),e.lanes=0,e}function Lf(e,i,s){return ya(i,e.child,null,s),e=Vf(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function Pg(e,i,s){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i),Qc(e.return,i,s)}function kf(e,i,s,o,d,y){var w=e.memoizedState;w===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:d,treeForkCount:y}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=o,w.tail=s,w.tailMode=d,w.treeForkCount=y)}function $g(e,i,s){var o=i.pendingProps,d=o.revealOrder,y=o.tail;o=o.children;var w=ee.current,z=(w&2)!==0;if(z?(w=w&1|2,i.flags|=128):w&=1,et(ee,w),xe(e,i,o,s),o=Ot?sr:0,!z&&e!==null&&(e.flags&128)!==0)t:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pg(e,s,i);else if(e.tag===19)Pg(e,s,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break t;for(;e.sibling===null;){if(e.return===null||e.return===i)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(s=i.child,d=null;s!==null;)e=s.alternate,e!==null&&ll(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=i.child,i.child=null):(d=s.sibling,s.sibling=null),kf(i,!1,d,s,y,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,d=i.child,i.child=null;d!==null;){if(e=d.alternate,e!==null&&ll(e)===null){i.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}kf(i,!0,s,null,y,o);break;case"together":kf(i,!1,null,null,void 0,o);break;default:i.memoizedState=null}return i.child}function Fn(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),Di|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(is(e,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(r(153));if(i.child!==null){for(e=i.child,s=Pn(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=Pn(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function Bf(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&tl(e)))}function XE(e,i,s){switch(i.tag){case 3:tt(i,i.stateNode.containerInfo),Si(i,ae,e.memoizedState.cache),fa();break;case 27:case 5:dt(i);break;case 4:tt(i,i.stateNode.containerInfo);break;case 10:Si(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,uf(i),null;break;case 13:var o=i.memoizedState;if(o!==null)return o.dehydrated!==null?(Mi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?Xg(e,i,s):(Mi(i),e=Fn(e,i,s),e!==null?e.sibling:null);Mi(i);break;case 19:var d=(e.flags&128)!==0;if(o=(s&i.childLanes)!==0,o||(is(e,i,s,!1),o=(s&i.childLanes)!==0),d){if(o)return $g(e,i,s);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),et(ee,ee.current),o)break;return null;case 22:return i.lanes=0,Bg(e,i,s,i.pendingProps);case 24:Si(i,ae,e.memoizedState.cache)}return Fn(e,i,s)}function Kg(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)re=!0;else{if(!Bf(e,s)&&(i.flags&128)===0)return re=!1,XE(e,i,s);re=(e.flags&131072)!==0}else re=!1,Ot&&(i.flags&1048576)!==0&&_p(i,sr,i.index);switch(i.lanes=0,i.tag){case 16:t:{var o=i.pendingProps;if(e=pa(i.elementType),i.type=e,typeof e=="function")Gc(e)?(o=xa(e,o),i.tag=1,i=Gg(null,i,e,o,s)):(i.tag=0,i=zf(null,i,e,o,s));else{if(e!=null){var d=e.$$typeof;if(d===T){i.tag=11,i=Vg(null,i,e,o,s);break t}else if(d===U){i.tag=14,i=Lg(null,i,e,o,s);break t}}throw i=D(e)||e,Error(r(306,i,""))}}return i;case 0:return zf(e,i,i.type,i.pendingProps,s);case 1:return o=i.type,d=xa(o,i.pendingProps),Gg(e,i,o,d,s);case 3:t:{if(tt(i,i.stateNode.containerInfo),e===null)throw Error(r(387));o=i.pendingProps;var y=i.memoizedState;d=y.element,af(e,i),hr(i,o,null,s);var w=i.memoizedState;if(o=w.cache,Si(i,ae,o),o!==y.cache&&Fc(i,[ae],s,!0),dr(),o=w.element,y.isDehydrated)if(y={element:o,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=qg(e,i,o,s);break t}else if(o!==d){d=We(Error(r(424)),i),rr(d),i=qg(e,i,o,s);break t}else{switch(e=i.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Pt=sn(e.firstChild),ye=i,Ot=!0,bi=null,nn=!0,s=Bp(i,null,o,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(fa(),o===d){i=Fn(e,i,s);break t}xe(e,i,o,s)}i=i.child}return i;case 26:return xl(e,i),e===null?(s=ay(i.type,null,i.pendingProps,null))?i.memoizedState=s:Ot||(s=i.type,e=i.pendingProps,o=Ll(Z.current).createElement(s),o[fe]=i,o[Ee]=e,be(o,s,e),ie(o),i.stateNode=o):i.memoizedState=ay(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return dt(i),e===null&&Ot&&(o=i.stateNode=ey(i.type,i.pendingProps,Z.current),ye=i,nn=!0,d=Pt,Vi(i.type)?(yd=d,Pt=sn(o.firstChild)):Pt=d),xe(e,i,i.pendingProps.children,s),xl(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&Ot&&((d=o=Pt)&&(o=b2(o,i.type,i.pendingProps,nn),o!==null?(i.stateNode=o,ye=i,Pt=sn(o.firstChild),nn=!1,d=!0):d=!1),d||wi(i)),dt(i),d=i.type,y=i.pendingProps,w=e!==null?e.memoizedProps:null,o=y.children,dd(d,y)?o=null:w!==null&&dd(d,w)&&(i.flags|=32),i.memoizedState!==null&&(d=ff(e,i,VE,null,null,s),Rr._currentValue=d),xl(e,i),xe(e,i,o,s),i.child;case 6:return e===null&&Ot&&((e=s=Pt)&&(s=w2(s,i.pendingProps,nn),s!==null?(i.stateNode=s,ye=i,Pt=null,e=!0):e=!1),e||wi(i)),null;case 13:return Xg(e,i,s);case 4:return tt(i,i.stateNode.containerInfo),o=i.pendingProps,e===null?i.child=ya(i,null,o,s):xe(e,i,o,s),i.child;case 11:return Vg(e,i,i.type,i.pendingProps,s);case 7:return xe(e,i,i.pendingProps,s),i.child;case 8:return xe(e,i,i.pendingProps.children,s),i.child;case 12:return xe(e,i,i.pendingProps.children,s),i.child;case 10:return o=i.pendingProps,Si(i,i.type,o.value),xe(e,i,o.children,s),i.child;case 9:return d=i.type._context,o=i.pendingProps.children,ha(i),d=ve(d),o=o(d),i.flags|=1,xe(e,i,o,s),i.child;case 14:return Lg(e,i,i.type,i.pendingProps,s);case 15:return kg(e,i,i.type,i.pendingProps,s);case 19:return $g(e,i,s);case 31:return qE(e,i,s);case 22:return Bg(e,i,s,i.pendingProps);case 24:return ha(i),o=ve(ae),e===null?(d=tf(),d===null&&(d=Xt,y=Jc(),d.pooledCache=y,y.refCount++,y!==null&&(d.pooledCacheLanes|=s),d=y),i.memoizedState={parent:o,cache:d},nf(i),Si(i,ae,d)):((e.lanes&s)!==0&&(af(e,i),hr(i,null,null,s),dr()),d=e.memoizedState,y=i.memoizedState,d.parent!==o?(d={parent:o,cache:o},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),Si(i,ae,o)):(o=y.cache,Si(i,ae,o),o!==d.cache&&Fc(i,[ae],s,!0))),xe(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Jn(e){e.flags|=4}function Hf(e,i,s,o,d){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(b0())e.flags|=8192;else throw ga=al,ef}else e.flags&=-16777217}function Zg(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!uy(i))if(b0())e.flags|=8192;else throw ga=al,ef}function wl(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Ao():536870912,e.lanes|=i,ps|=i)}function xr(e,i){if(!Ot)switch(e.tailMode){case"hidden":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function $t(e){var i=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(i)for(var d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=s,i}function PE(e,i,s){var o=i.pendingProps;switch($c(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(i),null;case 1:return $t(i),null;case 3:return s=i.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Zn(ae),at(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ns(i)?Jn(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Zc())),$t(i),null;case 26:var d=i.type,y=i.memoizedState;return e===null?(Jn(i),y!==null?($t(i),Zg(i,y)):($t(i),Hf(i,d,null,o,s))):y?y!==e.memoizedState?(Jn(i),$t(i),Zg(i,y)):($t(i),i.flags&=-16777217):(e=e.memoizedProps,e!==o&&Jn(i),$t(i),Hf(i,d,e,o,s)),null;case 27:if(ht(i),s=Z.current,d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&Jn(i);else{if(!o){if(i.stateNode===null)throw Error(r(166));return $t(i),null}e=B.current,ns(i)?Ap(i):(e=ey(d,o,s),i.stateNode=e,Jn(i))}return $t(i),null;case 5:if(ht(i),d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&Jn(i);else{if(!o){if(i.stateNode===null)throw Error(r(166));return $t(i),null}if(y=B.current,ns(i))Ap(i);else{var w=Ll(Z.current);switch(y){case 1:y=w.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:y=w.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":y=w.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":y=w.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":y=w.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof o.is=="string"?w.createElement("select",{is:o.is}):w.createElement("select"),o.multiple?y.multiple=!0:o.size&&(y.size=o.size);break;default:y=typeof o.is=="string"?w.createElement(d,{is:o.is}):w.createElement(d)}}y[fe]=i,y[Ee]=o;t:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)y.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break t;for(;w.sibling===null;){if(w.return===null||w.return===i)break t;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=y;t:switch(be(y,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break t;case"img":o=!0;break t;default:o=!1}o&&Jn(i)}}return $t(i),Hf(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==o&&Jn(i);else{if(typeof o!="string"&&i.stateNode===null)throw Error(r(166));if(e=Z.current,ns(i)){if(e=i.stateNode,s=i.memoizedProps,o=null,d=ye,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}e[fe]=i,e=!!(e.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||X0(e.nodeValue,s)),e||wi(i,!0)}else e=Ll(e).createTextNode(o),e[fe]=i,i.stateNode=e}return $t(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(o=ns(i),s!==null){if(e===null){if(!o)throw Error(r(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[fe]=i}else fa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;$t(i),e=!1}else s=Zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(Xe(i),i):(Xe(i),null);if((i.flags&128)!==0)throw Error(r(558))}return $t(i),null;case 13:if(o=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=ns(i),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(r(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(r(317));d[fe]=i}else fa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;$t(i),d=!1}else d=Zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(Xe(i),i):(Xe(i),null)}return Xe(i),(i.flags&128)!==0?(i.lanes=s,i):(s=o!==null,e=e!==null&&e.memoizedState!==null,s&&(o=i.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),y=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(y=o.memoizedState.cachePool.pool),y!==d&&(o.flags|=2048)),s!==e&&s&&(i.child.flags|=8192),wl(i,i.updateQueue),$t(i),null);case 4:return at(),e===null&&od(i.stateNode.containerInfo),$t(i),null;case 10:return Zn(i.type),$t(i),null;case 19:if(G(ee),o=i.memoizedState,o===null)return $t(i),null;if(d=(i.flags&128)!==0,y=o.rendering,y===null)if(d)xr(o,!1);else{if(Jt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(y=ll(e),y!==null){for(i.flags|=128,xr(o,!1),e=y.updateQueue,i.updateQueue=e,wl(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)Sp(s,e),s=s.sibling;return et(ee,ee.current&1|2),Ot&&$n(i,o.treeForkCount),i.child}e=e.sibling}o.tail!==null&&ge()>Ml&&(i.flags|=128,d=!0,xr(o,!1),i.lanes=4194304)}else{if(!d)if(e=ll(y),e!==null){if(i.flags|=128,d=!0,e=e.updateQueue,i.updateQueue=e,wl(i,e),xr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!y.alternate&&!Ot)return $t(i),null}else 2*ge()-o.renderingStartTime>Ml&&s!==536870912&&(i.flags|=128,d=!0,xr(o,!1),i.lanes=4194304);o.isBackwards?(y.sibling=i.child,i.child=y):(e=o.last,e!==null?e.sibling=y:i.child=y,o.last=y)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ge(),e.sibling=null,s=ee.current,et(ee,d?s&1|2:s&1),Ot&&$n(i,o.treeForkCount),e):($t(i),null);case 22:case 23:return Xe(i),lf(),o=i.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(i.flags|=8192):o&&(i.flags|=8192),o?(s&536870912)!==0&&(i.flags&128)===0&&($t(i),i.subtreeFlags&6&&(i.flags|=8192)):$t(i),s=i.updateQueue,s!==null&&wl(i,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==s&&(i.flags|=2048),e!==null&&G(ma),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Zn(ae),$t(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function $E(e,i){switch($c(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Zn(ae),at(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return ht(i),null;case 31:if(i.memoizedState!==null){if(Xe(i),i.alternate===null)throw Error(r(340));fa()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(Xe(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(r(340));fa()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return G(ee),null;case 4:return at(),null;case 10:return Zn(i.type),null;case 22:case 23:return Xe(i),lf(),e!==null&&G(ma),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Zn(ae),null;case 25:return null;default:return null}}function Ig(e,i){switch($c(i),i.tag){case 3:Zn(ae),at();break;case 26:case 27:case 5:ht(i);break;case 4:at();break;case 31:i.memoizedState!==null&&Xe(i);break;case 13:Xe(i);break;case 19:G(ee);break;case 10:Zn(i.type);break;case 22:case 23:Xe(i),lf(),e!==null&&G(ma);break;case 24:Zn(ae)}}function br(e,i){try{var s=i.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var d=o.next;s=d;do{if((s.tag&e)===e){o=void 0;var y=s.create,w=s.inst;o=y(),w.destroy=o}s=s.next}while(s!==d)}}catch(z){Bt(i,i.return,z)}}function Ci(e,i,s){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&e)===e){var w=o.inst,z=w.destroy;if(z!==void 0){w.destroy=void 0,d=i;var W=s,rt=z;try{rt()}catch(ut){Bt(d,W,ut)}}}o=o.next}while(o!==y)}}catch(ut){Bt(i,i.return,ut)}}function Qg(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{Up(i,s)}catch(o){Bt(e,e.return,o)}}}function Fg(e,i,s){s.props=xa(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(o){Bt(e,i,o)}}function wr(e,i){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof s=="function"?e.refCleanup=s(o):s.current=o}}catch(d){Bt(e,i,d)}}function An(e,i){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(d){Bt(e,i,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(d){Bt(e,i,d)}else s.current=null}function Jg(e){var i=e.type,s=e.memoizedProps,o=e.stateNode;try{t:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break t;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(d){Bt(e,e.return,d)}}function Uf(e,i,s){try{var o=e.stateNode;m2(o,e.type,s,i),o[Ee]=i}catch(d){Bt(e,e.return,d)}}function Wg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vi(e.type)||e.tag===4}function Yf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Wg(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.tag===27&&Vi(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gf(e,i,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(e),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=qn));else if(o!==4&&(o===27&&Vi(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for(Gf(e,i,s),e=e.sibling;e!==null;)Gf(e,i,s),e=e.sibling}function Sl(e,i,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?s.insertBefore(e,i):s.appendChild(e);else if(o!==4&&(o===27&&Vi(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Sl(e,i,s),e=e.sibling;e!==null;)Sl(e,i,s),e=e.sibling}function t0(e){var i=e.stateNode,s=e.memoizedProps;try{for(var o=e.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);be(i,o,s),i[fe]=e,i[Ee]=s}catch(y){Bt(e,e.return,y)}}var Wn=!1,oe=!1,qf=!1,e0=typeof WeakSet=="function"?WeakSet:Set,pe=null;function KE(e,i){if(e=e.containerInfo,cd=ql,e=hp(e),Vc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else t:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var d=o.anchorOffset,y=o.focusNode;o=o.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break t}var w=0,z=-1,W=-1,rt=0,ut=0,ft=e,ot=null;e:for(;;){for(var lt;ft!==s||d!==0&&ft.nodeType!==3||(z=w+d),ft!==y||o!==0&&ft.nodeType!==3||(W=w+o),ft.nodeType===3&&(w+=ft.nodeValue.length),(lt=ft.firstChild)!==null;)ot=ft,ft=lt;for(;;){if(ft===e)break e;if(ot===s&&++rt===d&&(z=w),ot===y&&++ut===o&&(W=w),(lt=ft.nextSibling)!==null)break;ft=ot,ot=ft.parentNode}ft=lt}s=z===-1||W===-1?null:{start:z,end:W}}else s=null}s=s||{start:0,end:0}}else s=null;for(fd={focusedElem:e,selectionRange:s},ql=!1,pe=i;pe!==null;)if(i=pe,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,pe=e;else for(;pe!==null;){switch(i=pe,y=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)d=e[s],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,s=i,d=y.memoizedProps,y=y.memoizedState,o=s.stateNode;try{var pt=xa(s.type,d);e=o.getSnapshotBeforeUpdate(pt,y),o.__reactInternalSnapshotBeforeUpdate=e}catch(St){Bt(s,s.return,St)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)md(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":md(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=i.sibling,e!==null){e.return=i.return,pe=e;break}pe=i.return}}function n0(e,i,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:ei(e,s),o&4&&br(5,s);break;case 1:if(ei(e,s),o&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(w){Bt(s,s.return,w)}else{var d=xa(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(d,i,e.__reactInternalSnapshotBeforeUpdate)}catch(w){Bt(s,s.return,w)}}o&64&&Qg(s),o&512&&wr(s,s.return);break;case 3:if(ei(e,s),o&64&&(e=s.updateQueue,e!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Up(e,i)}catch(w){Bt(s,s.return,w)}}break;case 27:i===null&&o&4&&t0(s);case 26:case 5:ei(e,s),i===null&&o&4&&Jg(s),o&512&&wr(s,s.return);break;case 12:ei(e,s);break;case 31:ei(e,s),o&4&&s0(e,s);break;case 13:ei(e,s),o&4&&r0(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=n2.bind(null,s),S2(e,s))));break;case 22:if(o=s.memoizedState!==null||Wn,!o){i=i!==null&&i.memoizedState!==null||oe,d=Wn;var y=oe;Wn=o,(oe=i)&&!y?ni(e,s,(s.subtreeFlags&8772)!==0):ei(e,s),Wn=d,oe=y}break;case 30:break;default:ei(e,s)}}function i0(e){var i=e.alternate;i!==null&&(e.alternate=null,i0(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&Ks(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Zt=null,je=!1;function ti(e,i,s){for(s=s.child;s!==null;)a0(e,i,s),s=s.sibling}function a0(e,i,s){if(_e&&typeof _e.onCommitFiberUnmount=="function")try{_e.onCommitFiberUnmount(ta,s)}catch{}switch(s.tag){case 26:oe||An(s,i),ti(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:oe||An(s,i);var o=Zt,d=je;Vi(s.type)&&(Zt=s.stateNode,je=!1),ti(e,i,s),Dr(s.stateNode),Zt=o,je=d;break;case 5:oe||An(s,i);case 6:if(o=Zt,d=je,Zt=null,ti(e,i,s),Zt=o,je=d,Zt!==null)if(je)try{(Zt.nodeType===9?Zt.body:Zt.nodeName==="HTML"?Zt.ownerDocument.body:Zt).removeChild(s.stateNode)}catch(y){Bt(s,i,y)}else try{Zt.removeChild(s.stateNode)}catch(y){Bt(s,i,y)}break;case 18:Zt!==null&&(je?(e=Zt,Q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Es(e)):Q0(Zt,s.stateNode));break;case 4:o=Zt,d=je,Zt=s.stateNode.containerInfo,je=!0,ti(e,i,s),Zt=o,je=d;break;case 0:case 11:case 14:case 15:Ci(2,s,i),oe||Ci(4,s,i),ti(e,i,s);break;case 1:oe||(An(s,i),o=s.stateNode,typeof o.componentWillUnmount=="function"&&Fg(s,i,o)),ti(e,i,s);break;case 21:ti(e,i,s);break;case 22:oe=(o=oe)||s.memoizedState!==null,ti(e,i,s),oe=o;break;default:ti(e,i,s)}}function s0(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Es(e)}catch(s){Bt(i,i.return,s)}}}function r0(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Es(e)}catch(s){Bt(i,i.return,s)}}function ZE(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new e0),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new e0),i;default:throw Error(r(435,e.tag))}}function El(e,i){var s=ZE(e);i.forEach(function(o){if(!s.has(o)){s.add(o);var d=i2.bind(null,e,o);o.then(d,d)}})}function Ve(e,i){var s=i.deletions;if(s!==null)for(var o=0;o<s.length;o++){var d=s[o],y=e,w=i,z=w;t:for(;z!==null;){switch(z.tag){case 27:if(Vi(z.type)){Zt=z.stateNode,je=!1;break t}break;case 5:Zt=z.stateNode,je=!1;break t;case 3:case 4:Zt=z.stateNode.containerInfo,je=!0;break t}z=z.return}if(Zt===null)throw Error(r(160));a0(y,w,d),Zt=null,je=!1,y=d.alternate,y!==null&&(y.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)o0(i,e),i=i.sibling}var dn=null;function o0(e,i){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ve(i,e),Le(e),o&4&&(Ci(3,e,e.return),br(3,e),Ci(5,e,e.return));break;case 1:Ve(i,e),Le(e),o&512&&(oe||s===null||An(s,s.return)),o&64&&Wn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var d=dn;if(Ve(i,e),Le(e),o&512&&(oe||s===null||An(s,s.return)),o&4){var y=s!==null?s.memoizedState:null;if(o=e.memoizedState,s===null)if(o===null)if(e.stateNode===null){t:{o=e.type,s=e.memoizedProps,d=d.ownerDocument||d;e:switch(o){case"title":y=d.getElementsByTagName("title")[0],(!y||y[ia]||y[fe]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=d.createElement(o),d.head.insertBefore(y,d.querySelector("head > title"))),be(y,o,s),y[fe]=e,ie(y),o=y;break t;case"link":var w=oy("link","href",d).get(o+(s.href||""));if(w){for(var z=0;z<w.length;z++)if(y=w[z],y.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&y.getAttribute("rel")===(s.rel==null?null:s.rel)&&y.getAttribute("title")===(s.title==null?null:s.title)&&y.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){w.splice(z,1);break e}}y=d.createElement(o),be(y,o,s),d.head.appendChild(y);break;case"meta":if(w=oy("meta","content",d).get(o+(s.content||""))){for(z=0;z<w.length;z++)if(y=w[z],y.getAttribute("content")===(s.content==null?null:""+s.content)&&y.getAttribute("name")===(s.name==null?null:s.name)&&y.getAttribute("property")===(s.property==null?null:s.property)&&y.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&y.getAttribute("charset")===(s.charSet==null?null:s.charSet)){w.splice(z,1);break e}}y=d.createElement(o),be(y,o,s),d.head.appendChild(y);break;default:throw Error(r(468,o))}y[fe]=e,ie(y),o=y}e.stateNode=o}else ly(d,e.type,e.stateNode);else e.stateNode=ry(d,o,e.memoizedProps);else y!==o?(y===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):y.count--,o===null?ly(d,e.type,e.stateNode):ry(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Uf(e,e.memoizedProps,s.memoizedProps)}break;case 27:Ve(i,e),Le(e),o&512&&(oe||s===null||An(s,s.return)),s!==null&&o&4&&Uf(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Ve(i,e),Le(e),o&512&&(oe||s===null||An(s,s.return)),e.flags&32){d=e.stateNode;try{$a(d,"")}catch(pt){Bt(e,e.return,pt)}}o&4&&e.stateNode!=null&&(d=e.memoizedProps,Uf(e,d,s!==null?s.memoizedProps:d)),o&1024&&(qf=!0);break;case 6:if(Ve(i,e),Le(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,s=e.stateNode;try{s.nodeValue=o}catch(pt){Bt(e,e.return,pt)}}break;case 3:if(Hl=null,d=dn,dn=kl(i.containerInfo),Ve(i,e),dn=d,Le(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Es(i.containerInfo)}catch(pt){Bt(e,e.return,pt)}qf&&(qf=!1,l0(e));break;case 4:o=dn,dn=kl(e.stateNode.containerInfo),Ve(i,e),Le(e),dn=o;break;case 12:Ve(i,e),Le(e);break;case 31:Ve(i,e),Le(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,El(e,o)));break;case 13:Ve(i,e),Le(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(_l=ge()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,El(e,o)));break;case 22:d=e.memoizedState!==null;var W=s!==null&&s.memoizedState!==null,rt=Wn,ut=oe;if(Wn=rt||d,oe=ut||W,Ve(i,e),oe=ut,Wn=rt,Le(e),o&8192)t:for(i=e.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(s===null||W||Wn||oe||ba(e)),s=null,i=e;;){if(i.tag===5||i.tag===26){if(s===null){W=s=i;try{if(y=W.stateNode,d)w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{z=W.stateNode;var ft=W.memoizedProps.style,ot=ft!=null&&ft.hasOwnProperty("display")?ft.display:null;z.style.display=ot==null||typeof ot=="boolean"?"":(""+ot).trim()}}catch(pt){Bt(W,W.return,pt)}}}else if(i.tag===6){if(s===null){W=i;try{W.stateNode.nodeValue=d?"":W.memoizedProps}catch(pt){Bt(W,W.return,pt)}}}else if(i.tag===18){if(s===null){W=i;try{var lt=W.stateNode;d?F0(lt,!0):F0(W.stateNode,!1)}catch(pt){Bt(W,W.return,pt)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}o&4&&(o=e.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,El(e,s))));break;case 19:Ve(i,e),Le(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,El(e,o)));break;case 30:break;case 21:break;default:Ve(i,e),Le(e)}}function Le(e){var i=e.flags;if(i&2){try{for(var s,o=e.return;o!==null;){if(Wg(o)){s=o;break}o=o.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var d=s.stateNode,y=Yf(e);Sl(e,y,d);break;case 5:var w=s.stateNode;s.flags&32&&($a(w,""),s.flags&=-33);var z=Yf(e);Sl(e,z,w);break;case 3:case 4:var W=s.stateNode.containerInfo,rt=Yf(e);Gf(e,rt,W);break;default:throw Error(r(161))}}catch(ut){Bt(e,e.return,ut)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function l0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;l0(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function ei(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)n0(e,i.alternate,i),i=i.sibling}function ba(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:Ci(4,i,i.return),ba(i);break;case 1:An(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&Fg(i,i.return,s),ba(i);break;case 27:Dr(i.stateNode);case 26:case 5:An(i,i.return),ba(i);break;case 22:i.memoizedState===null&&ba(i);break;case 30:ba(i);break;default:ba(i)}e=e.sibling}}function ni(e,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var o=i.alternate,d=e,y=i,w=y.flags;switch(y.tag){case 0:case 11:case 15:ni(d,y,s),br(4,y);break;case 1:if(ni(d,y,s),o=y,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(rt){Bt(o,o.return,rt)}if(o=y,d=o.updateQueue,d!==null){var z=o.stateNode;try{var W=d.shared.hiddenCallbacks;if(W!==null)for(d.shared.hiddenCallbacks=null,d=0;d<W.length;d++)Hp(W[d],z)}catch(rt){Bt(o,o.return,rt)}}s&&w&64&&Qg(y),wr(y,y.return);break;case 27:t0(y);case 26:case 5:ni(d,y,s),s&&o===null&&w&4&&Jg(y),wr(y,y.return);break;case 12:ni(d,y,s);break;case 31:ni(d,y,s),s&&w&4&&s0(d,y);break;case 13:ni(d,y,s),s&&w&4&&r0(d,y);break;case 22:y.memoizedState===null&&ni(d,y,s),wr(y,y.return);break;case 30:break;default:ni(d,y,s)}i=i.sibling}}function Xf(e,i){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&or(s))}function Pf(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&or(e))}function hn(e,i,s,o){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)u0(e,i,s,o),i=i.sibling}function u0(e,i,s,o){var d=i.flags;switch(i.tag){case 0:case 11:case 15:hn(e,i,s,o),d&2048&&br(9,i);break;case 1:hn(e,i,s,o);break;case 3:hn(e,i,s,o),d&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&or(e)));break;case 12:if(d&2048){hn(e,i,s,o),e=i.stateNode;try{var y=i.memoizedProps,w=y.id,z=y.onPostCommit;typeof z=="function"&&z(w,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Bt(i,i.return,W)}}else hn(e,i,s,o);break;case 31:hn(e,i,s,o);break;case 13:hn(e,i,s,o);break;case 23:break;case 22:y=i.stateNode,w=i.alternate,i.memoizedState!==null?y._visibility&2?hn(e,i,s,o):Sr(e,i):y._visibility&2?hn(e,i,s,o):(y._visibility|=2,ds(e,i,s,o,(i.subtreeFlags&10256)!==0||!1)),d&2048&&Xf(w,i);break;case 24:hn(e,i,s,o),d&2048&&Pf(i.alternate,i);break;default:hn(e,i,s,o)}}function ds(e,i,s,o,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=e,w=i,z=s,W=o,rt=w.flags;switch(w.tag){case 0:case 11:case 15:ds(y,w,z,W,d),br(8,w);break;case 23:break;case 22:var ut=w.stateNode;w.memoizedState!==null?ut._visibility&2?ds(y,w,z,W,d):Sr(y,w):(ut._visibility|=2,ds(y,w,z,W,d)),d&&rt&2048&&Xf(w.alternate,w);break;case 24:ds(y,w,z,W,d),d&&rt&2048&&Pf(w.alternate,w);break;default:ds(y,w,z,W,d)}i=i.sibling}}function Sr(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=e,o=i,d=o.flags;switch(o.tag){case 22:Sr(s,o),d&2048&&Xf(o.alternate,o);break;case 24:Sr(s,o),d&2048&&Pf(o.alternate,o);break;default:Sr(s,o)}i=i.sibling}}var Er=8192;function hs(e,i,s){if(e.subtreeFlags&Er)for(e=e.child;e!==null;)c0(e,i,s),e=e.sibling}function c0(e,i,s){switch(e.tag){case 26:hs(e,i,s),e.flags&Er&&e.memoizedState!==null&&j2(s,dn,e.memoizedState,e.memoizedProps);break;case 5:hs(e,i,s);break;case 3:case 4:var o=dn;dn=kl(e.stateNode.containerInfo),hs(e,i,s),dn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Er,Er=16777216,hs(e,i,s),Er=o):hs(e,i,s));break;default:hs(e,i,s)}}function f0(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Tr(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var o=i[s];pe=o,h0(o,e)}f0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)d0(e),e=e.sibling}function d0(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&Ci(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Tl(e)):Tr(e);break;default:Tr(e)}}function Tl(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var o=i[s];pe=o,h0(o,e)}f0(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:Ci(8,i,i.return),Tl(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Tl(i));break;default:Tl(i)}e=e.sibling}}function h0(e,i){for(;pe!==null;){var s=pe;switch(s.tag){case 0:case 11:case 15:Ci(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:or(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,pe=o;else t:for(s=e;pe!==null;){o=pe;var d=o.sibling,y=o.return;if(i0(o),o===s){pe=null;break t}if(d!==null){d.return=y,pe=d;break t}pe=y}}}var IE={getCacheForType:function(e){var i=ve(ae),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return ve(ae).controller.signal}},QE=typeof WeakMap=="function"?WeakMap:Map,Lt=0,Xt=null,Ct=null,Dt=0,kt=0,Pe=null,Ni=!1,ms=!1,$f=!1,ii=0,Jt=0,Di=0,wa=0,Kf=0,$e=0,ps=0,_r=null,ke=null,Zf=!1,_l=0,m0=0,Ml=1/0,Al=null,zi=null,de=0,Oi=null,gs=null,ai=0,If=0,Qf=null,p0=null,Mr=0,Ff=null;function Ke(){return(Lt&2)!==0&&Dt!==0?Dt&-Dt:A.T!==null?id():zo()}function g0(){if($e===0)if((Dt&536870912)===0||Ot){var e=Ua;Ua<<=1,(Ua&3932160)===0&&(Ua=262144),$e=e}else $e=536870912;return e=qe.current,e!==null&&(e.flags|=32),$e}function Be(e,i,s){(e===Xt&&(kt===2||kt===9)||e.cancelPendingCommit!==null)&&(ys(e,0),Ri(e,Dt,$e,!1)),na(e,s),((Lt&2)===0||e!==Xt)&&(e===Xt&&((Lt&2)===0&&(wa|=s),Jt===4&&Ri(e,Dt,$e,!1)),Cn(e))}function y0(e,i,s){if((Lt&6)!==0)throw Error(r(327));var o=!s&&(i&127)===0&&(i&e.expiredLanes)===0||ea(e,i),d=o?WE(e,i):Wf(e,i,!0),y=o;do{if(d===0){ms&&!o&&Ri(e,i,0,!1);break}else{if(s=e.current.alternate,y&&!FE(s)){d=Wf(e,i,!1),y=!1;continue}if(d===2){if(y=i,e.errorRecoveryDisabledLanes&y)var w=0;else w=e.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;t:{var z=e;d=_r;var W=z.current.memoizedState.isDehydrated;if(W&&(ys(z,w).flags|=256),w=Wf(z,w,!1),w!==2){if($f&&!W){z.errorRecoveryDisabledLanes|=y,wa|=y,d=4;break t}y=ke,ke=d,y!==null&&(ke===null?ke=y:ke.push.apply(ke,y))}d=w}if(y=!1,d!==2)continue}}if(d===1){ys(e,0),Ri(e,i,0,!0);break}t:{switch(o=e,y=d,y){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:Ri(o,i,$e,!Ni);break t;case 2:ke=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(d=_l+300-ge(),10<d)){if(Ri(o,i,$e,!Ni),Ga(o,0,!0)!==0)break t;ai=i,o.timeoutHandle=Z0(v0.bind(null,o,s,ke,Al,Zf,i,$e,wa,ps,Ni,y,"Throttled",-0,0),d);break t}v0(o,s,ke,Al,Zf,i,$e,wa,ps,Ni,y,null,-0,0)}}break}while(!0);Cn(e)}function v0(e,i,s,o,d,y,w,z,W,rt,ut,ft,ot,lt){if(e.timeoutHandle=-1,ft=i.subtreeFlags,ft&8192||(ft&16785408)===16785408){ft={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qn},c0(i,y,ft);var pt=(y&62914560)===y?_l-ge():(y&4194048)===y?m0-ge():0;if(pt=V2(ft,pt),pt!==null){ai=y,e.cancelPendingCommit=pt(M0.bind(null,e,i,y,s,o,d,w,z,W,ut,ft,null,ot,lt)),Ri(e,y,w,!rt);return}}M0(e,i,y,s,o,d,w,z,W)}function FE(e){for(var i=e;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var d=s[o],y=d.getSnapshot;d=d.value;try{if(!Ye(y(),d))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ri(e,i,s,o){i&=~Kf,i&=~wa,e.suspendedLanes|=i,e.pingedLanes&=~i,o&&(e.warmLanes|=i),o=e.expirationTimes;for(var d=i;0<d;){var y=31-Me(d),w=1<<y;o[y]=-1,d&=~w}s!==0&&Co(e,s,i)}function Cl(){return(Lt&6)===0?(Ar(0),!1):!0}function Jf(){if(Ct!==null){if(kt===0)var e=Ct.return;else e=Ct,Kn=da=null,mf(e),os=null,ur=0,e=Ct;for(;e!==null;)Ig(e.alternate,e),e=e.return;Ct=null}}function ys(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,y2(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ai=0,Jf(),Xt=e,Ct=s=Pn(e.current,null),Dt=i,kt=0,Pe=null,Ni=!1,ms=ea(e,i),$f=!1,ps=$e=Kf=wa=Di=Jt=0,ke=_r=null,Zf=!1,(i&8)!==0&&(i|=i&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=i;0<o;){var d=31-Me(o),y=1<<d;i|=e[d],o&=~y}return ii=i,Io(),s}function x0(e,i){Mt=null,A.H=yr,i===rs||i===il?(i=Vp(),kt=3):i===ef?(i=Vp(),kt=4):kt=i===Df?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Pe=i,Ct===null&&(Jt=1,yl(e,We(i,e.current)))}function b0(){var e=qe.current;return e===null?!0:(Dt&4194048)===Dt?an===null:(Dt&62914560)===Dt||(Dt&536870912)!==0?e===an:!1}function w0(){var e=A.H;return A.H=yr,e===null?yr:e}function S0(){var e=A.A;return A.A=IE,e}function Nl(){Jt=4,Ni||(Dt&4194048)!==Dt&&qe.current!==null||(ms=!0),(Di&134217727)===0&&(wa&134217727)===0||Xt===null||Ri(Xt,Dt,$e,!1)}function Wf(e,i,s){var o=Lt;Lt|=2;var d=w0(),y=S0();(Xt!==e||Dt!==i)&&(Al=null,ys(e,i)),i=!1;var w=Jt;t:do try{if(kt!==0&&Ct!==null){var z=Ct,W=Pe;switch(kt){case 8:Jf(),w=6;break t;case 3:case 2:case 9:case 6:qe.current===null&&(i=!0);var rt=kt;if(kt=0,Pe=null,vs(e,z,W,rt),s&&ms){w=0;break t}break;default:rt=kt,kt=0,Pe=null,vs(e,z,W,rt)}}JE(),w=Jt;break}catch(ut){x0(e,ut)}while(!0);return i&&e.shellSuspendCounter++,Kn=da=null,Lt=o,A.H=d,A.A=y,Ct===null&&(Xt=null,Dt=0,Io()),w}function JE(){for(;Ct!==null;)E0(Ct)}function WE(e,i){var s=Lt;Lt|=2;var o=w0(),d=S0();Xt!==e||Dt!==i?(Al=null,Ml=ge()+500,ys(e,i)):ms=ea(e,i);t:do try{if(kt!==0&&Ct!==null){i=Ct;var y=Pe;e:switch(kt){case 1:kt=0,Pe=null,vs(e,i,y,1);break;case 2:case 9:if(Rp(y)){kt=0,Pe=null,T0(i);break}i=function(){kt!==2&&kt!==9||Xt!==e||(kt=7),Cn(e)},y.then(i,i);break t;case 3:kt=7;break t;case 4:kt=5;break t;case 7:Rp(y)?(kt=0,Pe=null,T0(i)):(kt=0,Pe=null,vs(e,i,y,7));break;case 5:var w=null;switch(Ct.tag){case 26:w=Ct.memoizedState;case 5:case 27:var z=Ct;if(w?uy(w):z.stateNode.complete){kt=0,Pe=null;var W=z.sibling;if(W!==null)Ct=W;else{var rt=z.return;rt!==null?(Ct=rt,Dl(rt)):Ct=null}break e}}kt=0,Pe=null,vs(e,i,y,5);break;case 6:kt=0,Pe=null,vs(e,i,y,6);break;case 8:Jf(),Jt=6;break t;default:throw Error(r(462))}}t2();break}catch(ut){x0(e,ut)}while(!0);return Kn=da=null,A.H=o,A.A=d,Lt=s,Ct!==null?0:(Xt=null,Dt=0,Io(),Jt)}function t2(){for(;Ct!==null&&!Fi();)E0(Ct)}function E0(e){var i=Kg(e.alternate,e,ii);e.memoizedProps=e.pendingProps,i===null?Dl(e):Ct=i}function T0(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=Yg(s,i,i.pendingProps,i.type,void 0,Dt);break;case 11:i=Yg(s,i,i.pendingProps,i.type.render,i.ref,Dt);break;case 5:mf(i);default:Ig(s,i),i=Ct=Sp(i,ii),i=Kg(s,i,ii)}e.memoizedProps=e.pendingProps,i===null?Dl(e):Ct=i}function vs(e,i,s,o){Kn=da=null,mf(i),os=null,ur=0;var d=i.return;try{if(GE(e,d,i,s,Dt)){Jt=1,yl(e,We(s,e.current)),Ct=null;return}}catch(y){if(d!==null)throw Ct=d,y;Jt=1,yl(e,We(s,e.current)),Ct=null;return}i.flags&32768?(Ot||o===1?e=!0:ms||(Dt&536870912)!==0?e=!1:(Ni=e=!0,(o===2||o===9||o===3||o===6)&&(o=qe.current,o!==null&&o.tag===13&&(o.flags|=16384))),_0(i,e)):Dl(i)}function Dl(e){var i=e;do{if((i.flags&32768)!==0){_0(i,Ni);return}e=i.return;var s=PE(i.alternate,i,ii);if(s!==null){Ct=s;return}if(i=i.sibling,i!==null){Ct=i;return}Ct=i=e}while(i!==null);Jt===0&&(Jt=5)}function _0(e,i){do{var s=$E(e.alternate,e);if(s!==null){s.flags&=32767,Ct=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){Ct=e;return}Ct=e=s}while(e!==null);Jt=6,Ct=null}function M0(e,i,s,o,d,y,w,z,W){e.cancelPendingCommit=null;do zl();while(de!==0);if((Lt&6)!==0)throw Error(r(327));if(i!==null){if(i===e.current)throw Error(r(177));if(y=i.lanes|i.childLanes,y|=Uc,gc(e,s,y,w,z,W),e===Xt&&(Ct=Xt=null,Dt=0),gs=i,Oi=e,ai=s,If=y,Qf=d,p0=o,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,a2(Wi,function(){return z0(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||o){o=A.T,A.T=null,d=j.p,j.p=2,w=Lt,Lt|=4;try{KE(e,i,s)}finally{Lt=w,j.p=d,A.T=o}}de=1,A0(),C0(),N0()}}function A0(){if(de===1){de=0;var e=Oi,i=gs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=A.T,A.T=null;var o=j.p;j.p=2;var d=Lt;Lt|=4;try{o0(i,e);var y=fd,w=hp(e.containerInfo),z=y.focusedElem,W=y.selectionRange;if(w!==z&&z&&z.ownerDocument&&dp(z.ownerDocument.documentElement,z)){if(W!==null&&Vc(z)){var rt=W.start,ut=W.end;if(ut===void 0&&(ut=rt),"selectionStart"in z)z.selectionStart=rt,z.selectionEnd=Math.min(ut,z.value.length);else{var ft=z.ownerDocument||document,ot=ft&&ft.defaultView||window;if(ot.getSelection){var lt=ot.getSelection(),pt=z.textContent.length,St=Math.min(W.start,pt),qt=W.end===void 0?St:Math.min(W.end,pt);!lt.extend&&St>qt&&(w=qt,qt=St,St=w);var it=fp(z,St),nt=fp(z,qt);if(it&&nt&&(lt.rangeCount!==1||lt.anchorNode!==it.node||lt.anchorOffset!==it.offset||lt.focusNode!==nt.node||lt.focusOffset!==nt.offset)){var st=ft.createRange();st.setStart(it.node,it.offset),lt.removeAllRanges(),St>qt?(lt.addRange(st),lt.extend(nt.node,nt.offset)):(st.setEnd(nt.node,nt.offset),lt.addRange(st))}}}}for(ft=[],lt=z;lt=lt.parentNode;)lt.nodeType===1&&ft.push({element:lt,left:lt.scrollLeft,top:lt.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ft.length;z++){var ct=ft[z];ct.element.scrollLeft=ct.left,ct.element.scrollTop=ct.top}}ql=!!cd,fd=cd=null}finally{Lt=d,j.p=o,A.T=s}}e.current=i,de=2}}function C0(){if(de===2){de=0;var e=Oi,i=gs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=A.T,A.T=null;var o=j.p;j.p=2;var d=Lt;Lt|=4;try{n0(e,i.alternate,i)}finally{Lt=d,j.p=o,A.T=s}}de=3}}function N0(){if(de===4||de===3){de=0,Ji();var e=Oi,i=gs,s=ai,o=p0;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?de=5:(de=0,gs=Oi=null,D0(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(zi=null),$s(s),i=i.stateNode,_e&&typeof _e.onCommitFiberRoot=="function")try{_e.onCommitFiberRoot(ta,i,void 0,(i.current.flags&128)===128)}catch{}if(o!==null){i=A.T,d=j.p,j.p=2,A.T=null;try{for(var y=e.onRecoverableError,w=0;w<o.length;w++){var z=o[w];y(z.value,{componentStack:z.stack})}}finally{A.T=i,j.p=d}}(ai&3)!==0&&zl(),Cn(e),d=e.pendingLanes,(s&261930)!==0&&(d&42)!==0?e===Ff?Mr++:(Mr=0,Ff=e):Mr=0,Ar(0)}}function D0(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,or(i)))}function zl(){return A0(),C0(),N0(),z0()}function z0(){if(de!==5)return!1;var e=Oi,i=If;If=0;var s=$s(ai),o=A.T,d=j.p;try{j.p=32>s?32:s,A.T=null,s=Qf,Qf=null;var y=Oi,w=ai;if(de=0,gs=Oi=null,ai=0,(Lt&6)!==0)throw Error(r(331));var z=Lt;if(Lt|=4,d0(y.current),u0(y,y.current,w,s),Lt=z,Ar(0,!1),_e&&typeof _e.onPostCommitFiberRoot=="function")try{_e.onPostCommitFiberRoot(ta,y)}catch{}return!0}finally{j.p=d,A.T=o,D0(e,i)}}function O0(e,i,s){i=We(s,i),i=Nf(e.stateNode,i,2),e=_i(e,i,2),e!==null&&(na(e,2),Cn(e))}function Bt(e,i,s){if(e.tag===3)O0(e,e,s);else for(;i!==null;){if(i.tag===3){O0(i,e,s);break}else if(i.tag===1){var o=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(zi===null||!zi.has(o))){e=We(s,e),s=Rg(2),o=_i(i,s,2),o!==null&&(jg(s,o,i,e),na(o,2),Cn(o));break}}i=i.return}}function td(e,i,s){var o=e.pingCache;if(o===null){o=e.pingCache=new QE;var d=new Set;o.set(i,d)}else d=o.get(i),d===void 0&&(d=new Set,o.set(i,d));d.has(s)||($f=!0,d.add(s),e=e2.bind(null,e,i,s),i.then(e,e))}function e2(e,i,s){var o=e.pingCache;o!==null&&o.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Xt===e&&(Dt&s)===s&&(Jt===4||Jt===3&&(Dt&62914560)===Dt&&300>ge()-_l?(Lt&2)===0&&ys(e,0):Kf|=s,ps===Dt&&(ps=0)),Cn(e)}function R0(e,i){i===0&&(i=Ao()),e=ua(e,i),e!==null&&(na(e,i),Cn(e))}function n2(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),R0(e,s)}function i2(e,i){var s=0;switch(e.tag){case 31:case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(i),R0(e,s)}function a2(e,i){return un(e,i)}var Ol=null,xs=null,ed=!1,Rl=!1,nd=!1,ji=0;function Cn(e){e!==xs&&e.next===null&&(xs===null?Ol=xs=e:xs=xs.next=e),Rl=!0,ed||(ed=!0,r2())}function Ar(e,i){if(!nd&&Rl){nd=!0;do for(var s=!1,o=Ol;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var y=0;else{var w=o.suspendedLanes,z=o.pingedLanes;y=(1<<31-Me(42|e)+1)-1,y&=d&~(w&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(s=!0,k0(o,y))}else y=Dt,y=Ga(o,o===Xt?y:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(y&3)===0||ea(o,y)||(s=!0,k0(o,y));o=o.next}while(s);nd=!1}}function s2(){j0()}function j0(){Rl=ed=!1;var e=0;ji!==0&&g2()&&(e=ji);for(var i=ge(),s=null,o=Ol;o!==null;){var d=o.next,y=V0(o,i);y===0?(o.next=null,s===null?Ol=d:s.next=d,d===null&&(xs=s)):(s=o,(e!==0||(y&3)!==0)&&(Rl=!0)),o=d}de!==0&&de!==5||Ar(e),ji!==0&&(ji=0)}function V0(e,i){for(var s=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var w=31-Me(y),z=1<<w,W=d[w];W===-1?((z&s)===0||(z&o)!==0)&&(d[w]=pc(z,i)):W<=i&&(e.expiredLanes|=z),y&=~z}if(i=Xt,s=Dt,s=Ga(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,s===0||e===i&&(kt===2||kt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&kn(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||ea(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(o!==null&&kn(o),$s(s)){case 2:case 8:s=fi;break;case 32:s=Wi;break;case 268435456:s=Ba;break;default:s=Wi}return o=L0.bind(null,e),s=un(s,o),e.callbackPriority=i,e.callbackNode=s,i}return o!==null&&o!==null&&kn(o),e.callbackPriority=2,e.callbackNode=null,2}function L0(e,i){if(de!==0&&de!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(zl()&&e.callbackNode!==s)return null;var o=Dt;return o=Ga(e,e===Xt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(y0(e,o,i),V0(e,ge()),e.callbackNode!=null&&e.callbackNode===s?L0.bind(null,e):null)}function k0(e,i){if(zl())return null;y0(e,i,!0)}function r2(){v2(function(){(Lt&6)!==0?un(Bn,s2):j0()})}function id(){if(ji===0){var e=as;e===0&&(e=Ha,Ha<<=1,(Ha&261888)===0&&(Ha=256)),ji=e}return ji}function B0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Yo(""+e)}function H0(e,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,e.id&&s.setAttribute("form",e.id),i.parentNode.insertBefore(s,i),e=new FormData(e),s.parentNode.removeChild(s),e}function o2(e,i,s,o,d){if(i==="submit"&&s&&s.stateNode===d){var y=B0((d[Ee]||null).action),w=o.submitter;w&&(i=(i=w[Ee]||null)?B0(i.formAction):w.getAttribute("formAction"),i!==null&&(y=i,w=null));var z=new Po("action","action",null,o,d);e.push({event:z,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ji!==0){var W=w?H0(d,w):new FormData(d);Ef(s,{pending:!0,data:W,method:d.method,action:y},null,W)}}else typeof y=="function"&&(z.preventDefault(),W=w?H0(d,w):new FormData(d),Ef(s,{pending:!0,data:W,method:d.method,action:y},y,W))},currentTarget:d}]})}}for(var ad=0;ad<Hc.length;ad++){var sd=Hc[ad],l2=sd.toLowerCase(),u2=sd[0].toUpperCase()+sd.slice(1);fn(l2,"on"+u2)}fn(gp,"onAnimationEnd"),fn(yp,"onAnimationIteration"),fn(vp,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(_E,"onTransitionRun"),fn(ME,"onTransitionStart"),fn(AE,"onTransitionCancel"),fn(xp,"onTransitionEnd"),gi("onMouseEnter",["mouseout","mouseover"]),gi("onMouseLeave",["mouseout","mouseover"]),gi("onPointerEnter",["pointerout","pointerover"]),gi("onPointerLeave",["pointerout","pointerover"]),Yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="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(" "),c2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cr));function U0(e,i){i=(i&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],d=o.event;o=o.listeners;t:{var y=void 0;if(i)for(var w=o.length-1;0<=w;w--){var z=o[w],W=z.instance,rt=z.currentTarget;if(z=z.listener,W!==y&&d.isPropagationStopped())break t;y=z,d.currentTarget=rt;try{y(d)}catch(ut){Zo(ut)}d.currentTarget=null,y=W}else for(w=0;w<o.length;w++){if(z=o[w],W=z.instance,rt=z.currentTarget,z=z.listener,W!==y&&d.isPropagationStopped())break t;y=z,d.currentTarget=rt;try{y(d)}catch(ut){Zo(ut)}d.currentTarget=null,y=W}}}}function Nt(e,i){var s=i[qa];s===void 0&&(s=i[qa]=new Set);var o=e+"__bubble";s.has(o)||(Y0(i,e,2,!1),s.add(o))}function rd(e,i,s){var o=0;i&&(o|=4),Y0(s,e,o,i)}var jl="_reactListening"+Math.random().toString(36).slice(2);function od(e){if(!e[jl]){e[jl]=!0,Vo.forEach(function(s){s!=="selectionchange"&&(c2.has(s)||rd(s,!1,e),rd(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[jl]||(i[jl]=!0,rd("selectionchange",!1,i))}}function Y0(e,i,s,o){switch(gy(i)){case 2:var d=B2;break;case 8:d=H2;break;default:d=Sd}s=d.bind(null,i,s,e),d=void 0,!Mc||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(i,s,{capture:!0,passive:d}):e.addEventListener(i,s,!0):d!==void 0?e.addEventListener(i,s,{passive:d}):e.addEventListener(i,s,!1)}function ld(e,i,s,o,d){var y=o;if((i&1)===0&&(i&2)===0&&o!==null)t:for(;;){if(o===null)return;var w=o.tag;if(w===3||w===4){var z=o.stateNode.containerInfo;if(z===d)break;if(w===4)for(w=o.return;w!==null;){var W=w.tag;if((W===3||W===4)&&w.stateNode.containerInfo===d)return;w=w.return}for(;z!==null;){if(w=di(z),w===null)return;if(W=w.tag,W===5||W===6||W===26||W===27){o=y=w;continue t}z=z.parentNode}}o=o.return}$m(function(){var rt=y,ut=Tc(s),ft=[];t:{var ot=bp.get(e);if(ot!==void 0){var lt=Po,pt=e;switch(e){case"keypress":if(qo(s)===0)break t;case"keydown":case"keyup":lt=iE;break;case"focusin":pt="focus",lt=Dc;break;case"focusout":pt="blur",lt=Dc;break;case"beforeblur":case"afterblur":lt=Dc;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":lt=Im;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":lt=PS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":lt=rE;break;case gp:case yp:case vp:lt=ZS;break;case xp:lt=lE;break;case"scroll":case"scrollend":lt=qS;break;case"wheel":lt=cE;break;case"copy":case"cut":case"paste":lt=QS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":lt=Fm;break;case"toggle":case"beforetoggle":lt=dE}var St=(i&4)!==0,qt=!St&&(e==="scroll"||e==="scrollend"),it=St?ot!==null?ot+"Capture":null:ot;St=[];for(var nt=rt,st;nt!==null;){var ct=nt;if(st=ct.stateNode,ct=ct.tag,ct!==5&&ct!==26&&ct!==27||st===null||it===null||(ct=Qs(nt,it),ct!=null&&St.push(Nr(nt,ct,st))),qt)break;nt=nt.return}0<St.length&&(ot=new lt(ot,pt,null,s,ut),ft.push({event:ot,listeners:St}))}}if((i&7)===0){t:{if(ot=e==="mouseover"||e==="pointerover",lt=e==="mouseout"||e==="pointerout",ot&&s!==Ec&&(pt=s.relatedTarget||s.fromElement)&&(di(pt)||pt[Un]))break t;if((lt||ot)&&(ot=ut.window===ut?ut:(ot=ut.ownerDocument)?ot.defaultView||ot.parentWindow:window,lt?(pt=s.relatedTarget||s.toElement,lt=rt,pt=pt?di(pt):null,pt!==null&&(qt=c(pt),St=pt.tag,pt!==qt||St!==5&&St!==27&&St!==6)&&(pt=null)):(lt=null,pt=rt),lt!==pt)){if(St=Im,ct="onMouseLeave",it="onMouseEnter",nt="mouse",(e==="pointerout"||e==="pointerover")&&(St=Fm,ct="onPointerLeave",it="onPointerEnter",nt="pointer"),qt=lt==null?ot:mi(lt),st=pt==null?ot:mi(pt),ot=new St(ct,nt+"leave",lt,s,ut),ot.target=qt,ot.relatedTarget=st,ct=null,di(ut)===rt&&(St=new St(it,nt+"enter",pt,s,ut),St.target=st,St.relatedTarget=qt,ct=St),qt=ct,lt&&pt)e:{for(St=f2,it=lt,nt=pt,st=0,ct=it;ct;ct=St(ct))st++;ct=0;for(var bt=nt;bt;bt=St(bt))ct++;for(;0<st-ct;)it=St(it),st--;for(;0<ct-st;)nt=St(nt),ct--;for(;st--;){if(it===nt||nt!==null&&it===nt.alternate){St=it;break e}it=St(it),nt=St(nt)}St=null}else St=null;lt!==null&&G0(ft,ot,lt,St,!1),pt!==null&&qt!==null&&G0(ft,qt,pt,St,!0)}}t:{if(ot=rt?mi(rt):window,lt=ot.nodeName&&ot.nodeName.toLowerCase(),lt==="select"||lt==="input"&&ot.type==="file")var jt=sp;else if(ip(ot))if(rp)jt=SE;else{jt=bE;var yt=xE}else lt=ot.nodeName,!lt||lt.toLowerCase()!=="input"||ot.type!=="checkbox"&&ot.type!=="radio"?rt&&Sc(rt.elementType)&&(jt=sp):jt=wE;if(jt&&(jt=jt(e,rt))){ap(ft,jt,s,ut);break t}yt&&yt(e,ot,rt),e==="focusout"&&rt&&ot.type==="number"&&rt.memoizedProps.value!=null&&Is(ot,"number",ot.value)}switch(yt=rt?mi(rt):window,e){case"focusin":(ip(yt)||yt.contentEditable==="true")&&(Qa=yt,Lc=rt,ar=null);break;case"focusout":ar=Lc=Qa=null;break;case"mousedown":kc=!0;break;case"contextmenu":case"mouseup":case"dragend":kc=!1,mp(ft,s,ut);break;case"selectionchange":if(TE)break;case"keydown":case"keyup":mp(ft,s,ut)}var At;if(Oc)t:{switch(e){case"compositionstart":var zt="onCompositionStart";break t;case"compositionend":zt="onCompositionEnd";break t;case"compositionupdate":zt="onCompositionUpdate";break t}zt=void 0}else Ia?ep(e,s)&&(zt="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(zt="onCompositionStart");zt&&(Jm&&s.locale!=="ko"&&(Ia||zt!=="onCompositionStart"?zt==="onCompositionEnd"&&Ia&&(At=Km()):(vi=ut,Ac="value"in vi?vi.value:vi.textContent,Ia=!0)),yt=Vl(rt,zt),0<yt.length&&(zt=new Qm(zt,e,null,s,ut),ft.push({event:zt,listeners:yt}),At?zt.data=At:(At=np(s),At!==null&&(zt.data=At)))),(At=mE?pE(e,s):gE(e,s))&&(zt=Vl(rt,"onBeforeInput"),0<zt.length&&(yt=new Qm("onBeforeInput","beforeinput",null,s,ut),ft.push({event:yt,listeners:zt}),yt.data=At)),o2(ft,e,rt,s,ut)}U0(ft,i)})}function Nr(e,i,s){return{instance:e,listener:i,currentTarget:s}}function Vl(e,i){for(var s=i+"Capture",o=[];e!==null;){var d=e,y=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||y===null||(d=Qs(e,s),d!=null&&o.unshift(Nr(e,d,y)),d=Qs(e,i),d!=null&&o.push(Nr(e,d,y))),e.tag===3)return o;e=e.return}return[]}function f2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function G0(e,i,s,o,d){for(var y=i._reactName,w=[];s!==null&&s!==o;){var z=s,W=z.alternate,rt=z.stateNode;if(z=z.tag,W!==null&&W===o)break;z!==5&&z!==26&&z!==27||rt===null||(W=rt,d?(rt=Qs(s,y),rt!=null&&w.unshift(Nr(s,rt,W))):d||(rt=Qs(s,y),rt!=null&&w.push(Nr(s,rt,W)))),s=s.return}w.length!==0&&e.push({event:i,listeners:w})}var d2=/\r\n?/g,h2=/\u0000|\uFFFD/g;function q0(e){return(typeof e=="string"?e:""+e).replace(d2,`
`).replace(h2,"")}function X0(e,i){return i=q0(i),q0(e)===i}function Gt(e,i,s,o,d,y){switch(s){case"children":typeof o=="string"?i==="body"||i==="textarea"&&o===""||$a(e,o):(typeof o=="number"||typeof o=="bigint")&&i!=="body"&&$a(e,""+o);break;case"className":Pa(e,"class",o);break;case"tabIndex":Pa(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Pa(e,s,o);break;case"style":Xm(e,o,y);break;case"data":if(i!=="object"){Pa(e,"data",o);break}case"src":case"href":if(o===""&&(i!=="a"||s!=="href")){e.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Yo(""+o),e.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(s==="formAction"?(i!=="input"&&Gt(e,i,"name",d.name,d,null),Gt(e,i,"formEncType",d.formEncType,d,null),Gt(e,i,"formMethod",d.formMethod,d,null),Gt(e,i,"formTarget",d.formTarget,d,null)):(Gt(e,i,"encType",d.encType,d,null),Gt(e,i,"method",d.method,d,null),Gt(e,i,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Yo(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(e.onclick=qn);break;case"onScroll":o!=null&&Nt("scroll",e);break;case"onScrollEnd":o!=null&&Nt("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(d.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}s=Yo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""+o):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":o===!0?e.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,o):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(s,o):e.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(s):e.setAttribute(s,o);break;case"popover":Nt("beforetoggle",e),Nt("toggle",e),Xa(e,"popover",o);break;case"xlinkActuate":cn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":cn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":cn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":cn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":cn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":cn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":cn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":cn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":cn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Xa(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=YS.get(s)||s,Xa(e,s,o))}}function ud(e,i,s,o,d,y){switch(s){case"style":Xm(e,o,y);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(d.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"children":typeof o=="string"?$a(e,o):(typeof o=="number"||typeof o=="bigint")&&$a(e,""+o);break;case"onScroll":o!=null&&Nt("scroll",e);break;case"onScrollEnd":o!=null&&Nt("scrollend",e);break;case"onClick":o!=null&&(e.onclick=qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lo.hasOwnProperty(s))t:{if(s[0]==="o"&&s[1]==="n"&&(d=s.endsWith("Capture"),i=s.slice(2,d?s.length-7:void 0),y=e[Ee]||null,y=y!=null?y[s]:null,typeof y=="function"&&e.removeEventListener(i,y,d),typeof o=="function")){typeof y!="function"&&y!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(i,o,d);break t}s in e?e[s]=o:o===!0?e.setAttribute(s,""):Xa(e,s,o)}}}function be(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Nt("error",e),Nt("load",e);var o=!1,d=!1,y;for(y in s)if(s.hasOwnProperty(y)){var w=s[y];if(w!=null)switch(y){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Gt(e,i,y,w,s,null)}}d&&Gt(e,i,"srcSet",s.srcSet,s,null),o&&Gt(e,i,"src",s.src,s,null);return;case"input":Nt("invalid",e);var z=y=w=d=null,W=null,rt=null;for(o in s)if(s.hasOwnProperty(o)){var ut=s[o];if(ut!=null)switch(o){case"name":d=ut;break;case"type":w=ut;break;case"checked":W=ut;break;case"defaultChecked":rt=ut;break;case"value":y=ut;break;case"defaultValue":z=ut;break;case"children":case"dangerouslySetInnerHTML":if(ut!=null)throw Error(r(137,i));break;default:Gt(e,i,o,ut,s,null)}}Uo(e,y,z,W,rt,w,d,!1);return;case"select":Nt("invalid",e),o=w=y=null;for(d in s)if(s.hasOwnProperty(d)&&(z=s[d],z!=null))switch(d){case"value":y=z;break;case"defaultValue":w=z;break;case"multiple":o=z;default:Gt(e,i,d,z,s,null)}i=y,s=w,e.multiple=!!o,i!=null?Gn(e,!!o,i,!1):s!=null&&Gn(e,!!o,s,!0);return;case"textarea":Nt("invalid",e),y=d=o=null;for(w in s)if(s.hasOwnProperty(w)&&(z=s[w],z!=null))switch(w){case"value":o=z;break;case"defaultValue":d=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(91));break;default:Gt(e,i,w,z,s,null)}Gm(e,o,d,y);return;case"option":for(W in s)if(s.hasOwnProperty(W)&&(o=s[W],o!=null))switch(W){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Gt(e,i,W,o,s,null)}return;case"dialog":Nt("beforetoggle",e),Nt("toggle",e),Nt("cancel",e),Nt("close",e);break;case"iframe":case"object":Nt("load",e);break;case"video":case"audio":for(o=0;o<Cr.length;o++)Nt(Cr[o],e);break;case"image":Nt("error",e),Nt("load",e);break;case"details":Nt("toggle",e);break;case"embed":case"source":case"link":Nt("error",e),Nt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(rt in s)if(s.hasOwnProperty(rt)&&(o=s[rt],o!=null))switch(rt){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Gt(e,i,rt,o,s,null)}return;default:if(Sc(i)){for(ut in s)s.hasOwnProperty(ut)&&(o=s[ut],o!==void 0&&ud(e,i,ut,o,s,void 0));return}}for(z in s)s.hasOwnProperty(z)&&(o=s[z],o!=null&&Gt(e,i,z,o,s,null))}function m2(e,i,s,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,y=null,w=null,z=null,W=null,rt=null,ut=null;for(lt in s){var ft=s[lt];if(s.hasOwnProperty(lt)&&ft!=null)switch(lt){case"checked":break;case"value":break;case"defaultValue":W=ft;default:o.hasOwnProperty(lt)||Gt(e,i,lt,null,o,ft)}}for(var ot in o){var lt=o[ot];if(ft=s[ot],o.hasOwnProperty(ot)&&(lt!=null||ft!=null))switch(ot){case"type":y=lt;break;case"name":d=lt;break;case"checked":rt=lt;break;case"defaultChecked":ut=lt;break;case"value":w=lt;break;case"defaultValue":z=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(r(137,i));break;default:lt!==ft&&Gt(e,i,ot,lt,o,ft)}}sa(e,w,z,W,rt,ut,y,d);return;case"select":lt=w=z=ot=null;for(y in s)if(W=s[y],s.hasOwnProperty(y)&&W!=null)switch(y){case"value":break;case"multiple":lt=W;default:o.hasOwnProperty(y)||Gt(e,i,y,null,o,W)}for(d in o)if(y=o[d],W=s[d],o.hasOwnProperty(d)&&(y!=null||W!=null))switch(d){case"value":ot=y;break;case"defaultValue":z=y;break;case"multiple":w=y;default:y!==W&&Gt(e,i,d,y,o,W)}i=z,s=w,o=lt,ot!=null?Gn(e,!!s,ot,!1):!!o!=!!s&&(i!=null?Gn(e,!!s,i,!0):Gn(e,!!s,s?[]:"",!1));return;case"textarea":lt=ot=null;for(z in s)if(d=s[z],s.hasOwnProperty(z)&&d!=null&&!o.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Gt(e,i,z,null,o,d)}for(w in o)if(d=o[w],y=s[w],o.hasOwnProperty(w)&&(d!=null||y!=null))switch(w){case"value":ot=d;break;case"defaultValue":lt=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:d!==y&&Gt(e,i,w,d,o,y)}Ym(e,ot,lt);return;case"option":for(var pt in s)if(ot=s[pt],s.hasOwnProperty(pt)&&ot!=null&&!o.hasOwnProperty(pt))switch(pt){case"selected":e.selected=!1;break;default:Gt(e,i,pt,null,o,ot)}for(W in o)if(ot=o[W],lt=s[W],o.hasOwnProperty(W)&&ot!==lt&&(ot!=null||lt!=null))switch(W){case"selected":e.selected=ot&&typeof ot!="function"&&typeof ot!="symbol";break;default:Gt(e,i,W,ot,o,lt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var St in s)ot=s[St],s.hasOwnProperty(St)&&ot!=null&&!o.hasOwnProperty(St)&&Gt(e,i,St,null,o,ot);for(rt in o)if(ot=o[rt],lt=s[rt],o.hasOwnProperty(rt)&&ot!==lt&&(ot!=null||lt!=null))switch(rt){case"children":case"dangerouslySetInnerHTML":if(ot!=null)throw Error(r(137,i));break;default:Gt(e,i,rt,ot,o,lt)}return;default:if(Sc(i)){for(var qt in s)ot=s[qt],s.hasOwnProperty(qt)&&ot!==void 0&&!o.hasOwnProperty(qt)&&ud(e,i,qt,void 0,o,ot);for(ut in o)ot=o[ut],lt=s[ut],!o.hasOwnProperty(ut)||ot===lt||ot===void 0&&lt===void 0||ud(e,i,ut,ot,o,lt);return}}for(var it in s)ot=s[it],s.hasOwnProperty(it)&&ot!=null&&!o.hasOwnProperty(it)&&Gt(e,i,it,null,o,ot);for(ft in o)ot=o[ft],lt=s[ft],!o.hasOwnProperty(ft)||ot===lt||ot==null&&lt==null||Gt(e,i,ft,ot,o,lt)}function P0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function p2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var d=s[o],y=d.transferSize,w=d.initiatorType,z=d.duration;if(y&&z&&P0(w)){for(w=0,z=d.responseEnd,o+=1;o<s.length;o++){var W=s[o],rt=W.startTime;if(rt>z)break;var ut=W.transferSize,ft=W.initiatorType;ut&&P0(ft)&&(W=W.responseEnd,w+=ut*(W<z?1:(z-rt)/(W-rt)))}if(--o,i+=8*(y+w)/(d.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var cd=null,fd=null;function Ll(e){return e.nodeType===9?e:e.ownerDocument}function $0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function K0(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function dd(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var hd=null;function g2(){var e=window.event;return e&&e.type==="popstate"?e===hd?!1:(hd=e,!0):(hd=null,!1)}var Z0=typeof setTimeout=="function"?setTimeout:void 0,y2=typeof clearTimeout=="function"?clearTimeout:void 0,I0=typeof Promise=="function"?Promise:void 0,v2=typeof queueMicrotask=="function"?queueMicrotask:typeof I0<"u"?function(e){return I0.resolve(null).then(e).catch(x2)}:Z0;function x2(e){setTimeout(function(){throw e})}function Vi(e){return e==="head"}function Q0(e,i){var s=i,o=0;do{var d=s.nextSibling;if(e.removeChild(s),d&&d.nodeType===8)if(s=d.data,s==="/$"||s==="/&"){if(o===0){e.removeChild(d),Es(i);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")Dr(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Dr(s);for(var y=s.firstChild;y;){var w=y.nextSibling,z=y.nodeName;y[ia]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=w}}else s==="body"&&Dr(e.ownerDocument.body);s=d}while(s);Es(i)}function F0(e,i){var s=e;e=0;do{var o=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=o}while(s)}function md(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":md(s),Ks(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function b2(e,i,s,o){for(;e.nodeType===1;){var d=s;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ia])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(y=e.getAttribute("rel"),y==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(y!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(y=e.getAttribute("src"),(y!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&y&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var y=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===y)return e}else return e;if(e=sn(e.nextSibling),e===null)break}return null}function w2(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=sn(e.nextSibling),e===null))return null;return e}function J0(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=sn(e.nextSibling),e===null))return null;return e}function pd(e){return e.data==="$?"||e.data==="$~"}function gd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function S2(e,i){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||s.readyState!=="loading")i();else{var o=function(){i(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function sn(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var yd=null;function W0(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return sn(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function ty(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return e;i--}else s!=="/$"&&s!=="/&"||i++}e=e.previousSibling}return null}function ey(e,i,s){switch(i=Ll(s),e){case"html":if(e=i.documentElement,!e)throw Error(r(452));return e;case"head":if(e=i.head,!e)throw Error(r(453));return e;case"body":if(e=i.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Dr(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Ks(e)}var rn=new Map,ny=new Set;function kl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var si=j.d;j.d={f:E2,r:T2,D:_2,C:M2,L:A2,m:C2,X:D2,S:N2,M:z2};function E2(){var e=si.f(),i=Cl();return e||i}function T2(e){var i=hi(e);i!==null&&i.tag===5&&i.type==="form"?xg(i):si.r(e)}var bs=typeof document>"u"?null:document;function iy(e,i,s){var o=bs;if(o&&typeof i=="string"&&i){var d=Oe(i);d='link[rel="'+e+'"][href="'+d+'"]',typeof s=="string"&&(d+='[crossorigin="'+s+'"]'),ny.has(d)||(ny.add(d),e={rel:e,crossOrigin:s,href:i},o.querySelector(d)===null&&(i=o.createElement("link"),be(i,"link",e),ie(i),o.head.appendChild(i)))}}function _2(e){si.D(e),iy("dns-prefetch",e,null)}function M2(e,i){si.C(e,i),iy("preconnect",e,i)}function A2(e,i,s){si.L(e,i,s);var o=bs;if(o&&e&&i){var d='link[rel="preload"][as="'+Oe(i)+'"]';i==="image"&&s&&s.imageSrcSet?(d+='[imagesrcset="'+Oe(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(d+='[imagesizes="'+Oe(s.imageSizes)+'"]')):d+='[href="'+Oe(e)+'"]';var y=d;switch(i){case"style":y=ws(e);break;case"script":y=Ss(e)}rn.has(y)||(e=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),rn.set(y,e),o.querySelector(d)!==null||i==="style"&&o.querySelector(zr(y))||i==="script"&&o.querySelector(Or(y))||(i=o.createElement("link"),be(i,"link",e),ie(i),o.head.appendChild(i)))}}function C2(e,i){si.m(e,i);var s=bs;if(s&&e){var o=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+Oe(o)+'"][href="'+Oe(e)+'"]',y=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ss(e)}if(!rn.has(y)&&(e=p({rel:"modulepreload",href:e},i),rn.set(y,e),s.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Or(y)))return}o=s.createElement("link"),be(o,"link",e),ie(o),s.head.appendChild(o)}}}function N2(e,i,s){si.S(e,i,s);var o=bs;if(o&&e){var d=pi(o).hoistableStyles,y=ws(e);i=i||"default";var w=d.get(y);if(!w){var z={loading:0,preload:null};if(w=o.querySelector(zr(y)))z.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":i},s),(s=rn.get(y))&&vd(e,s);var W=w=o.createElement("link");ie(W),be(W,"link",e),W._p=new Promise(function(rt,ut){W.onload=rt,W.onerror=ut}),W.addEventListener("load",function(){z.loading|=1}),W.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Bl(w,i,o)}w={type:"stylesheet",instance:w,count:1,state:z},d.set(y,w)}}}function D2(e,i){si.X(e,i);var s=bs;if(s&&e){var o=pi(s).hoistableScripts,d=Ss(e),y=o.get(d);y||(y=s.querySelector(Or(d)),y||(e=p({src:e,async:!0},i),(i=rn.get(d))&&xd(e,i),y=s.createElement("script"),ie(y),be(y,"link",e),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},o.set(d,y))}}function z2(e,i){si.M(e,i);var s=bs;if(s&&e){var o=pi(s).hoistableScripts,d=Ss(e),y=o.get(d);y||(y=s.querySelector(Or(d)),y||(e=p({src:e,async:!0,type:"module"},i),(i=rn.get(d))&&xd(e,i),y=s.createElement("script"),ie(y),be(y,"link",e),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},o.set(d,y))}}function ay(e,i,s,o){var d=(d=Z.current)?kl(d):null;if(!d)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ws(s.href),s=pi(d).hoistableStyles,o=s.get(i),o||(o={type:"style",instance:null,count:0,state:null},s.set(i,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=ws(s.href);var y=pi(d).hoistableStyles,w=y.get(e);if(w||(d=d.ownerDocument||d,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(e,w),(y=d.querySelector(zr(e)))&&!y._p&&(w.instance=y,w.state.loading=5),rn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},rn.set(e,s),y||O2(d,e,s,w.state))),i&&o===null)throw Error(r(528,""));return w}if(i&&o!==null)throw Error(r(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ss(s),s=pi(d).hoistableScripts,o=s.get(i),o||(o={type:"script",instance:null,count:0,state:null},s.set(i,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ws(e){return'href="'+Oe(e)+'"'}function zr(e){return'link[rel="stylesheet"]['+e+"]"}function sy(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function O2(e,i,s,o){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?o.loading=1:(i=e.createElement("link"),o.preload=i,i.addEventListener("load",function(){return o.loading|=1}),i.addEventListener("error",function(){return o.loading|=2}),be(i,"link",s),ie(i),e.head.appendChild(i))}function Ss(e){return'[src="'+Oe(e)+'"]'}function Or(e){return"script[async]"+e}function ry(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var o=e.querySelector('style[data-href~="'+Oe(s.href)+'"]');if(o)return i.instance=o,ie(o),o;var d=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),ie(o),be(o,"style",d),Bl(o,s.precedence,e),i.instance=o;case"stylesheet":d=ws(s.href);var y=e.querySelector(zr(d));if(y)return i.state.loading|=4,i.instance=y,ie(y),y;o=sy(s),(d=rn.get(d))&&vd(o,d),y=(e.ownerDocument||e).createElement("link"),ie(y);var w=y;return w._p=new Promise(function(z,W){w.onload=z,w.onerror=W}),be(y,"link",o),i.state.loading|=4,Bl(y,s.precedence,e),i.instance=y;case"script":return y=Ss(s.src),(d=e.querySelector(Or(y)))?(i.instance=d,ie(d),d):(o=s,(d=rn.get(y))&&(o=p({},s),xd(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),ie(d),be(d,"link",o),e.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(o=i.instance,i.state.loading|=4,Bl(o,s.precedence,e));return i.instance}function Bl(e,i,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,y=d,w=0;w<o.length;w++){var z=o[w];if(z.dataset.precedence===i)y=z;else if(y!==d)break}y?y.parentNode.insertBefore(e,y.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(e,i.firstChild))}function vd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function xd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Hl=null;function oy(e,i,s){if(Hl===null){var o=new Map,d=Hl=new Map;d.set(s,o)}else d=Hl,o=d.get(s),o||(o=new Map,d.set(s,o));if(o.has(e))return o;for(o.set(e,null),s=s.getElementsByTagName(e),d=0;d<s.length;d++){var y=s[d];if(!(y[ia]||y[fe]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var w=y.getAttribute(i)||"";w=e+w;var z=o.get(w);z?z.push(y):o.set(w,[y])}}return o}function ly(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function R2(e,i,s){if(s===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return e=i.disabled,typeof i.precedence=="string"&&e==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function uy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function j2(e,i,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var d=ws(o.href),y=i.querySelector(zr(d));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Ul.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=y,ie(y);return}y=i.ownerDocument||i,o=sy(o),(d=rn.get(d))&&vd(o,d),y=y.createElement("link"),ie(y);var w=y;w._p=new Promise(function(z,W){w.onload=z,w.onerror=W}),be(y,"link",o),s.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Ul.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var bd=0;function V2(e,i){return e.stylesheets&&e.count===0&&Gl(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var o=setTimeout(function(){if(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+i);0<e.imgBytes&&bd===0&&(bd=62500*p2());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>bd?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function Ul(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yl=null;function Gl(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yl=new Map,i.forEach(L2,e),Yl=null,Ul.call(e))}function L2(e,i){if(!(i.state.loading&4)){var s=Yl.get(e);if(s)var o=s.get(null);else{s=new Map,Yl.set(e,s);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<d.length;y++){var w=d[y];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(s.set(w.dataset.precedence,w),o=w)}o&&s.set(null,o)}d=i.instance,w=d.getAttribute("data-precedence"),y=s.get(w)||o,y===o&&s.set(null,d),s.set(w,d),this.count++,o=Ul.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),y?y.parentNode.insertBefore(d,y.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),i.state.loading|=4}}var Rr={$$typeof:S,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function k2(e,i,s,o,d,y,w,z,W){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xs(0),this.hiddenUpdates=Xs(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=y,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function cy(e,i,s,o,d,y,w,z,W,rt,ut,ft){return e=new k2(e,i,s,w,W,rt,ut,ft,z),i=1,y===!0&&(i|=24),y=Ge(3,null,null,i),e.current=y,y.stateNode=e,i=Jc(),i.refCount++,e.pooledCache=i,i.refCount++,y.memoizedState={element:o,isDehydrated:s,cache:i},nf(y),e}function fy(e){return e?(e=Wa,e):Wa}function dy(e,i,s,o,d,y){d=fy(d),o.context===null?o.context=d:o.pendingContext=d,o=Ti(i),o.payload={element:s},y=y===void 0?null:y,y!==null&&(o.callback=y),s=_i(e,o,i),s!==null&&(Be(s,e,i),fr(s,e,i))}function hy(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function wd(e,i){hy(e,i),(e=e.alternate)&&hy(e,i)}function my(e){if(e.tag===13||e.tag===31){var i=ua(e,67108864);i!==null&&Be(i,e,67108864),wd(e,67108864)}}function py(e){if(e.tag===13||e.tag===31){var i=Ke();i=Ps(i);var s=ua(e,i);s!==null&&Be(s,e,i),wd(e,i)}}var ql=!0;function B2(e,i,s,o){var d=A.T;A.T=null;var y=j.p;try{j.p=2,Sd(e,i,s,o)}finally{j.p=y,A.T=d}}function H2(e,i,s,o){var d=A.T;A.T=null;var y=j.p;try{j.p=8,Sd(e,i,s,o)}finally{j.p=y,A.T=d}}function Sd(e,i,s,o){if(ql){var d=Ed(o);if(d===null)ld(e,i,o,Xl,s),yy(e,o);else if(Y2(d,e,i,s,o))o.stopPropagation();else if(yy(e,o),i&4&&-1<U2.indexOf(e)){for(;d!==null;){var y=hi(d);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var w=Hn(y.pendingLanes);if(w!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;w;){var W=1<<31-Me(w);z.entanglements[1]|=W,w&=~W}Cn(y),(Lt&6)===0&&(Ml=ge()+500,Ar(0))}}break;case 31:case 13:z=ua(y,2),z!==null&&Be(z,y,2),Cl(),wd(y,2)}if(y=Ed(o),y===null&&ld(e,i,o,Xl,s),y===d)break;d=y}d!==null&&o.stopPropagation()}else ld(e,i,o,null,s)}}function Ed(e){return e=Tc(e),Td(e)}var Xl=null;function Td(e){if(Xl=null,e=di(e),e!==null){var i=c(e);if(i===null)e=null;else{var s=i.tag;if(s===13){if(e=u(i),e!==null)return e;e=null}else if(s===31){if(e=f(i),e!==null)return e;e=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Xl=e,null}function gy(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ka()){case Bn:return 2;case fi:return 8;case Wi:case uc:return 32;case Ba:return 268435456;default:return 32}default:return 32}}var _d=!1,Li=null,ki=null,Bi=null,jr=new Map,Vr=new Map,Hi=[],U2="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".split(" ");function yy(e,i){switch(e){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Bi=null;break;case"pointerover":case"pointerout":jr.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vr.delete(i.pointerId)}}function Lr(e,i,s,o,d,y){return e===null||e.nativeEvent!==y?(e={blockedOn:i,domEventName:s,eventSystemFlags:o,nativeEvent:y,targetContainers:[d]},i!==null&&(i=hi(i),i!==null&&my(i)),e):(e.eventSystemFlags|=o,i=e.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),e)}function Y2(e,i,s,o,d){switch(i){case"focusin":return Li=Lr(Li,e,i,s,o,d),!0;case"dragenter":return ki=Lr(ki,e,i,s,o,d),!0;case"mouseover":return Bi=Lr(Bi,e,i,s,o,d),!0;case"pointerover":var y=d.pointerId;return jr.set(y,Lr(jr.get(y)||null,e,i,s,o,d)),!0;case"gotpointercapture":return y=d.pointerId,Vr.set(y,Lr(Vr.get(y)||null,e,i,s,o,d)),!0}return!1}function vy(e){var i=di(e.target);if(i!==null){var s=c(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){e.blockedOn=i,Oo(e.priority,function(){py(s)});return}}else if(i===31){if(i=f(s),i!==null){e.blockedOn=i,Oo(e.priority,function(){py(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pl(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=Ed(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Ec=o,s.target.dispatchEvent(o),Ec=null}else return i=hi(s),i!==null&&my(i),e.blockedOn=s,!1;i.shift()}return!0}function xy(e,i,s){Pl(e)&&s.delete(i)}function G2(){_d=!1,Li!==null&&Pl(Li)&&(Li=null),ki!==null&&Pl(ki)&&(ki=null),Bi!==null&&Pl(Bi)&&(Bi=null),jr.forEach(xy),Vr.forEach(xy)}function $l(e,i){e.blockedOn===i&&(e.blockedOn=null,_d||(_d=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,G2)))}var Kl=null;function by(e){Kl!==e&&(Kl=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Kl===e&&(Kl=null);for(var i=0;i<e.length;i+=3){var s=e[i],o=e[i+1],d=e[i+2];if(typeof o!="function"){if(Td(o||s)===null)continue;break}var y=hi(s);y!==null&&(e.splice(i,3),i-=3,Ef(y,{pending:!0,data:d,method:s.method,action:o},o,d))}}))}function Es(e){function i(W){return $l(W,e)}Li!==null&&$l(Li,e),ki!==null&&$l(ki,e),Bi!==null&&$l(Bi,e),jr.forEach(i),Vr.forEach(i);for(var s=0;s<Hi.length;s++){var o=Hi[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Hi.length&&(s=Hi[0],s.blockedOn===null);)vy(s),s.blockedOn===null&&Hi.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var d=s[o],y=s[o+1],w=d[Ee]||null;if(typeof y=="function")w||by(s);else if(w){var z=null;if(y&&y.hasAttribute("formAction")){if(d=y,w=y[Ee]||null)z=w.formAction;else if(Td(d)!==null)continue}else z=w.action;typeof z=="function"?s[o+1]=z:(s.splice(o,3),o-=3),by(s)}}}function wy(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(w){return d=w})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function Md(e){this._internalRoot=e}Zl.prototype.render=Md.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(r(409));var s=i.current,o=Ke();dy(s,o,e,i,null,null)},Zl.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;dy(e.current,2,null,e,null,null),Cl(),i[Un]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var i=zo();e={blockedOn:null,target:e,priority:i};for(var s=0;s<Hi.length&&i!==0&&i<Hi[s].priority;s++);Hi.splice(s,0,e),s===0&&vy(e)}};var Sy=n.version;if(Sy!=="19.2.4")throw Error(r(527,Sy,"19.2.4"));j.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(i),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var q2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Il.isDisabled&&Il.supportsFiber)try{ta=Il.inject(q2),_e=Il}catch{}}return Br.createRoot=function(e,i){if(!l(e))throw Error(r(299));var s=!1,o="",d=Ng,y=Dg,w=zg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=cy(e,1,!1,null,null,s,o,null,d,y,w,wy),e[Un]=i.current,od(e),new Md(i)},Br.hydrateRoot=function(e,i,s){if(!l(e))throw Error(r(299));var o=!1,d="",y=Ng,w=Dg,z=zg,W=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(z=s.onRecoverableError),s.formState!==void 0&&(W=s.formState)),i=cy(e,1,!0,i,s??null,o,d,W,y,w,z,wy),i.context=fy(null),s=i.current,o=Ke(),o=Ps(o),d=Ti(o),d.callback=null,_i(s,d,o),s=o,i.current.lanes=s,na(i,s),Cn(i),e[Un]=i.current,od(e),new Zl(i)},Br.version="19.2.4",Br}var Oy;function W2(){if(Oy)return Nd.exports;Oy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Nd.exports=J2(),Nd.exports}var tT=W2();const Ih=Q.createContext({});function mo(t){const n=Q.useRef(null);return n.current===null&&(n.current=t()),n.current}const eT=typeof window<"u",Qh=eT?Q.useLayoutEffect:Q.useEffect,Ku=Q.createContext(null);function Fh(t,n){t.indexOf(n)===-1&&t.push(n)}function _u(t,n){const a=t.indexOf(n);a>-1&&t.splice(a,1)}const jn=(t,n,a)=>a>n?n:a<t?t:a;let Jh=()=>{};const Zi={},u1=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function c1(t){return typeof t=="object"&&t!==null}const f1=t=>/^0[^.\s]+$/u.test(t);function d1(t){let n;return()=>(n===void 0&&(n=t()),n)}const ln=t=>t,nT=(t,n)=>a=>n(t(a)),po=(...t)=>t.reduce(nT),Jr=(t,n,a)=>{const r=n-t;return r===0?1:(a-t)/r};class Wh{constructor(){this.subscriptions=[]}add(n){return Fh(this.subscriptions,n),()=>_u(this.subscriptions,n)}notify(n,a,r){const l=this.subscriptions.length;if(l)if(l===1)this.subscriptions[0](n,a,r);else for(let c=0;c<l;c++){const u=this.subscriptions[c];u&&u(n,a,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ie=t=>t*1e3,on=t=>t/1e3;function h1(t,n){return n?t*(1e3/n):0}const m1=(t,n,a)=>(((1-3*a+3*n)*t+(3*a-6*n))*t+3*n)*t,iT=1e-7,aT=12;function sT(t,n,a,r,l){let c,u,f=0;do u=n+(a-n)/2,c=m1(u,r,l)-t,c>0?a=u:n=u;while(Math.abs(c)>iT&&++f<aT);return u}function go(t,n,a,r){if(t===n&&a===r)return ln;const l=c=>sT(c,0,1,t,a);return c=>c===0||c===1?c:m1(l(c),n,r)}const p1=t=>n=>n<=.5?t(2*n)/2:(2-t(2*(1-n)))/2,g1=t=>n=>1-t(1-n),y1=go(.33,1.53,.69,.99),tm=g1(y1),v1=p1(tm),x1=t=>t>=1?1:(t*=2)<1?.5*tm(t):.5*(2-Math.pow(2,-10*(t-1))),em=t=>1-Math.sin(Math.acos(t)),b1=g1(em),w1=p1(em),rT=go(.42,0,1,1),oT=go(0,0,.58,1),S1=go(.42,0,.58,1),lT=t=>Array.isArray(t)&&typeof t[0]!="number",E1=t=>Array.isArray(t)&&typeof t[0]=="number",uT={linear:ln,easeIn:rT,easeInOut:S1,easeOut:oT,circIn:em,circInOut:w1,circOut:b1,backIn:tm,backInOut:v1,backOut:y1,anticipate:x1},cT=t=>typeof t=="string",Ry=t=>{if(E1(t)){Jh(t.length===4);const[n,a,r,l]=t;return go(n,a,r,l)}else if(cT(t))return uT[t];return t},Ql=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fT(t,n){let a=new Set,r=new Set,l=!1,c=!1;const u=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function h(g){u.has(g)&&(m.schedule(g),t()),g(f)}const m={schedule:(g,p=!1,v=!1)=>{const b=v&&l?a:r;return p&&u.add(g),b.add(g),g},cancel:g=>{r.delete(g),u.delete(g)},process:g=>{if(f=g,l){c=!0;return}l=!0;const p=a;a=r,r=p,a.forEach(h),a.clear(),l=!1,c&&(c=!1,m.process(g))}};return m}const dT=40;function T1(t,n){let a=!1,r=!0;const l={delta:0,timestamp:0,isProcessing:!1},c=()=>a=!0,u=Ql.reduce((S,T)=>(S[T]=fT(c),S),{}),{setup:f,read:h,resolveKeyframes:m,preUpdate:g,update:p,preRender:v,render:x,postRender:b}=u,E=()=>{const S=Zi.useManualTiming,T=S?l.timestamp:performance.now();a=!1,S||(l.delta=r?1e3/60:Math.max(Math.min(T-l.timestamp,dT),1)),l.timestamp=T,l.isProcessing=!0,f.process(l),h.process(l),m.process(l),g.process(l),p.process(l),v.process(l),x.process(l),b.process(l),l.isProcessing=!1,a&&n&&(r=!1,t(E))},M=()=>{a=!0,r=!0,l.isProcessing||t(E)};return{schedule:Ql.reduce((S,T)=>{const R=u[T];return S[T]=(L,U=!1,P=!1)=>(a||M(),R.schedule(L,U,P)),S},{}),cancel:S=>{for(let T=0;T<Ql.length;T++)u[Ql[T]].cancel(S)},state:l,steps:u}}const{schedule:Ht,cancel:li,state:we,steps:Rd}=T1(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0);let du;function hT(){du=void 0}const Ce={now:()=>(du===void 0&&Ce.set(we.isProcessing||Zi.useManualTiming?we.timestamp:performance.now()),du),set:t=>{du=t,queueMicrotask(hT)}},_1=t=>n=>typeof n=="string"&&n.startsWith(t),M1=_1("--"),mT=_1("var(--"),nm=t=>mT(t)?pT.test(t.split("/*")[0].trim()):!1,pT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function jy(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ys={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Wr={...Ys,transform:t=>jn(0,1,t)},Fl={...Ys,default:1},Pr=t=>Math.round(t*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gT(t){return t==null}const yT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,am=(t,n)=>a=>!!(typeof a=="string"&&yT.test(a)&&a.startsWith(t)||n&&!gT(a)&&Object.prototype.hasOwnProperty.call(a,n)),A1=(t,n,a)=>r=>{if(typeof r!="string")return r;const[l,c,u,f]=r.match(im);return{[t]:parseFloat(l),[n]:parseFloat(c),[a]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},vT=t=>jn(0,255,t),jd={...Ys,transform:t=>Math.round(vT(t))},_a={test:am("rgb","red"),parse:A1("red","green","blue"),transform:({red:t,green:n,blue:a,alpha:r=1})=>"rgba("+jd.transform(t)+", "+jd.transform(n)+", "+jd.transform(a)+", "+Pr(Wr.transform(r))+")"};function xT(t){let n="",a="",r="",l="";return t.length>5?(n=t.substring(1,3),a=t.substring(3,5),r=t.substring(5,7),l=t.substring(7,9)):(n=t.substring(1,2),a=t.substring(2,3),r=t.substring(3,4),l=t.substring(4,5),n+=n,a+=a,r+=r,l+=l),{red:parseInt(n,16),green:parseInt(a,16),blue:parseInt(r,16),alpha:l?parseInt(l,16)/255:1}}const dh={test:am("#"),parse:xT,transform:_a.transform},yo=t=>({test:n=>typeof n=="string"&&n.endsWith(t)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${t}`}),qi=yo("deg"),On=yo("%"),gt=yo("px"),bT=yo("vh"),wT=yo("vw"),Vy={...On,parse:t=>On.parse(t)/100,transform:t=>On.transform(t*100)},Ms={test:am("hsl","hue"),parse:A1("hue","saturation","lightness"),transform:({hue:t,saturation:n,lightness:a,alpha:r=1})=>"hsla("+Math.round(t)+", "+On.transform(Pr(n))+", "+On.transform(Pr(a))+", "+Pr(Wr.transform(r))+")"},le={test:t=>_a.test(t)||dh.test(t)||Ms.test(t),parse:t=>_a.test(t)?_a.parse(t):Ms.test(t)?Ms.parse(t):dh.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?_a.transform(t):Ms.transform(t),getAnimatableNone:t=>{const n=le.parse(t);return n.alpha=0,le.transform(n)}},ST=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ET(t){var n,a;return isNaN(t)&&typeof t=="string"&&(((n=t.match(im))==null?void 0:n.length)||0)+(((a=t.match(ST))==null?void 0:a.length)||0)>0}const C1="number",N1="color",TT="var",_T="var(",Ly="${}",MT=/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 Rs(t){const n=t.toString(),a=[],r={color:[],number:[],var:[]},l=[];let c=0;const f=n.replace(MT,h=>(le.test(h)?(r.color.push(c),l.push(N1),a.push(le.parse(h))):h.startsWith(_T)?(r.var.push(c),l.push(TT),a.push(h)):(r.number.push(c),l.push(C1),a.push(parseFloat(h))),++c,Ly)).split(Ly);return{values:a,split:f,indexes:r,types:l}}function AT(t){return Rs(t).values}function D1({split:t,types:n}){const a=t.length;return r=>{let l="";for(let c=0;c<a;c++)if(l+=t[c],r[c]!==void 0){const u=n[c];u===C1?l+=Pr(r[c]):u===N1?l+=le.transform(r[c]):l+=r[c]}return l}}function CT(t){return D1(Rs(t))}const NT=t=>typeof t=="number"?0:le.test(t)?le.getAnimatableNone(t):t,DT=(t,n)=>typeof t=="number"?n!=null&&n.trim().endsWith("/")?t:0:NT(t);function zT(t){const n=Rs(t);return D1(n)(n.values.map((r,l)=>DT(r,n.split[l])))}const bn={test:ET,parse:AT,createTransformer:CT,getAnimatableNone:zT};function Vd(t,n,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?t+(n-t)*6*a:a<1/2?n:a<2/3?t+(n-t)*(2/3-a)*6:t}function OT({hue:t,saturation:n,lightness:a,alpha:r}){t/=360,n/=100,a/=100;let l=0,c=0,u=0;if(!n)l=c=u=a;else{const f=a<.5?a*(1+n):a+n-a*n,h=2*a-f;l=Vd(h,f,t+1/3),c=Vd(h,f,t),u=Vd(h,f,t-1/3)}return{red:Math.round(l*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:r}}function Mu(t,n){return a=>a>0?n:t}const Kt=(t,n,a)=>t+(n-t)*a,Ld=(t,n,a)=>{const r=t*t,l=a*(n*n-r)+r;return l<0?0:Math.sqrt(l)},RT=[dh,_a,Ms],jT=t=>RT.find(n=>n.test(t));function ky(t){const n=jT(t);if(!n)return!1;let a=n.parse(t);return n===Ms&&(a=OT(a)),a}const By=(t,n)=>{const a=ky(t),r=ky(n);if(!a||!r)return Mu(t,n);const l={...a};return c=>(l.red=Ld(a.red,r.red,c),l.green=Ld(a.green,r.green,c),l.blue=Ld(a.blue,r.blue,c),l.alpha=Kt(a.alpha,r.alpha,c),_a.transform(l))},hh=new Set(["none","hidden"]);function VT(t,n){return hh.has(t)?a=>a<=0?t:n:a=>a>=1?n:t}function LT(t,n){return a=>Kt(t,n,a)}function sm(t){return typeof t=="number"?LT:typeof t=="string"?nm(t)?Mu:le.test(t)?By:HT:Array.isArray(t)?z1:typeof t=="object"?le.test(t)?By:kT:Mu}function z1(t,n){const a=[...t],r=a.length,l=t.map((c,u)=>sm(c)(c,n[u]));return c=>{for(let u=0;u<r;u++)a[u]=l[u](c);return a}}function kT(t,n){const a={...t,...n},r={};for(const l in a)t[l]!==void 0&&n[l]!==void 0&&(r[l]=sm(t[l])(t[l],n[l]));return l=>{for(const c in r)a[c]=r[c](l);return a}}function BT(t,n){const a=[],r={color:0,var:0,number:0};for(let l=0;l<n.values.length;l++){const c=n.types[l],u=t.indexes[c][r[c]],f=t.values[u]??0;a[l]=f,r[c]++}return a}const HT=(t,n)=>{const a=bn.createTransformer(n),r=Rs(t),l=Rs(n);return r.indexes.var.length===l.indexes.var.length&&r.indexes.color.length===l.indexes.color.length&&r.indexes.number.length>=l.indexes.number.length?hh.has(t)&&!l.values.length||hh.has(n)&&!r.values.length?VT(t,n):po(z1(BT(r,l),l.values),a):Mu(t,n)};function O1(t,n,a){return typeof t=="number"&&typeof n=="number"&&typeof a=="number"?Kt(t,n,a):sm(t)(t,n)}const UT=t=>{const n=({timestamp:a})=>t(a);return{start:(a=!0)=>Ht.update(n,a),stop:()=>li(n),now:()=>we.isProcessing?we.timestamp:Ce.now()}},R1=(t,n,a=10)=>{let r="";const l=Math.max(Math.round(n/a),2);for(let c=0;c<l;c++)r+=Math.round(t(c/(l-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Au=2e4;function rm(t){let n=0;const a=50;let r=t.next(n);for(;!r.done&&n<Au;)n+=a,r=t.next(n);return n>=Au?1/0:n}function YT(t,n=100,a){const r=a({...t,keyframes:[0,n]}),l=Math.min(rm(r),Au);return{type:"keyframes",ease:c=>r.next(l*c).value/n,duration:on(l)}}const Wt={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};function mh(t,n){return t*Math.sqrt(1-n*n)}const GT=12;function qT(t,n,a){let r=a;for(let l=1;l<GT;l++)r=r-t(r)/n(r);return r}const kd=.001;function XT({duration:t=Wt.duration,bounce:n=Wt.bounce,velocity:a=Wt.velocity,mass:r=Wt.mass}){let l,c,u=1-n;u=jn(Wt.minDamping,Wt.maxDamping,u),t=jn(Wt.minDuration,Wt.maxDuration,on(t)),u<1?(l=m=>{const g=m*u,p=g*t,v=g-a,x=mh(m,u),b=Math.exp(-p);return kd-v/x*b},c=m=>{const p=m*u*t,v=p*a+a,x=Math.pow(u,2)*Math.pow(m,2)*t,b=Math.exp(-p),E=mh(Math.pow(m,2),u);return(-l(m)+kd>0?-1:1)*((v-x)*b)/E}):(l=m=>{const g=Math.exp(-m*t),p=(m-a)*t+1;return-kd+g*p},c=m=>{const g=Math.exp(-m*t),p=(a-m)*(t*t);return g*p});const f=5/t,h=qT(l,c,f);if(t=Ie(t),isNaN(h))return{stiffness:Wt.stiffness,damping:Wt.damping,duration:t};{const m=Math.pow(h,2)*r;return{stiffness:m,damping:u*2*Math.sqrt(r*m),duration:t}}}const PT=["duration","bounce"],$T=["stiffness","damping","mass"];function Hy(t,n){return n.some(a=>t[a]!==void 0)}function KT(t){let n={velocity:Wt.velocity,stiffness:Wt.stiffness,damping:Wt.damping,mass:Wt.mass,isResolvedFromDuration:!1,...t};if(!Hy(t,$T)&&Hy(t,PT))if(n.velocity=0,t.visualDuration){const a=t.visualDuration,r=2*Math.PI/(a*1.2),l=r*r,c=2*jn(.05,1,1-(t.bounce||0))*Math.sqrt(l);n={...n,mass:Wt.mass,stiffness:l,damping:c}}else{const a=XT({...t,velocity:0});n={...n,...a,mass:Wt.mass},n.isResolvedFromDuration=!0}return n}function Cu(t=Wt.visualDuration,n=Wt.bounce){const a=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:r,restDelta:l}=a;const c=a.keyframes[0],u=a.keyframes[a.keyframes.length-1],f={done:!1,value:c},{stiffness:h,damping:m,mass:g,duration:p,velocity:v,isResolvedFromDuration:x}=KT({...a,velocity:-on(a.velocity||0)}),b=v||0,E=m/(2*Math.sqrt(h*g)),M=u-c,_=on(Math.sqrt(h/g)),C=Math.abs(M)<5;r||(r=C?Wt.restSpeed.granular:Wt.restSpeed.default),l||(l=C?Wt.restDelta.granular:Wt.restDelta.default);let S,T,R,L,U,P;if(E<1)R=mh(_,E),L=(b+E*_*M)/R,S=X=>{const k=Math.exp(-E*_*X);return u-k*(L*Math.sin(R*X)+M*Math.cos(R*X))},U=E*_*L+M*R,P=E*_*M-L*R,T=X=>Math.exp(-E*_*X)*(U*Math.sin(R*X)+P*Math.cos(R*X));else if(E===1){S=k=>u-Math.exp(-_*k)*(M+(b+_*M)*k);const X=b+_*M;T=k=>Math.exp(-_*k)*(_*X*k-b)}else{const X=_*Math.sqrt(E*E-1);S=D=>{const K=Math.exp(-E*_*D),A=Math.min(X*D,300);return u-K*((b+E*_*M)*Math.sinh(A)+X*M*Math.cosh(A))/X};const k=(b+E*_*M)/X,Y=E*_*k-M*X,$=E*_*M-k*X;T=D=>{const K=Math.exp(-E*_*D),A=Math.min(X*D,300);return K*(Y*Math.sinh(A)+$*Math.cosh(A))}}const F={calculatedDuration:x&&p||null,velocity:X=>Ie(T(X)),next:X=>{if(!x&&E<1){const Y=Math.exp(-E*_*X),$=Math.sin(R*X),D=Math.cos(R*X),K=u-Y*(L*$+M*D),A=Ie(Y*(U*$+P*D));return f.done=Math.abs(A)<=r&&Math.abs(u-K)<=l,f.value=f.done?u:K,f}const k=S(X);if(x)f.done=X>=p;else{const Y=Ie(T(X));f.done=Math.abs(Y)<=r&&Math.abs(u-k)<=l}return f.value=f.done?u:k,f},toString:()=>{const X=Math.min(rm(F),Au),k=R1(Y=>F.next(X*Y).value,X,30);return X+"ms "+k},toTransition:()=>{}};return F}Cu.applyToOptions=t=>{const n=YT(t,100,Cu);return t.ease=n.ease,t.duration=Ie(n.duration),t.type="keyframes",t};const ZT=5;function j1(t,n,a){const r=Math.max(n-ZT,0);return h1(a-t(r),n-r)}function ph({keyframes:t,velocity:n=0,power:a=.8,timeConstant:r=325,bounceDamping:l=10,bounceStiffness:c=500,modifyTarget:u,min:f,max:h,restDelta:m=.5,restSpeed:g}){const p=t[0],v={done:!1,value:p},x=P=>f!==void 0&&P<f||h!==void 0&&P>h,b=P=>f===void 0?h:h===void 0||Math.abs(f-P)<Math.abs(h-P)?f:h;let E=a*n;const M=p+E,_=u===void 0?M:u(M);_!==M&&(E=_-p);const C=P=>-E*Math.exp(-P/r),S=P=>_+C(P),T=P=>{const F=C(P),X=S(P);v.done=Math.abs(F)<=m,v.value=v.done?_:X};let R,L;const U=P=>{x(v.value)&&(R=P,L=Cu({keyframes:[v.value,b(v.value)],velocity:j1(S,P,v.value),damping:l,stiffness:c,restDelta:m,restSpeed:g}))};return U(0),{calculatedDuration:null,next:P=>{let F=!1;return!L&&R===void 0&&(F=!0,T(P),U(P)),R!==void 0&&P>=R?L.next(P-R):(!F&&T(P),v)}}}function IT(t,n,a){const r=[],l=a||Zi.mix||O1,c=t.length-1;for(let u=0;u<c;u++){let f=l(t[u],t[u+1]);if(n){const h=Array.isArray(n)?n[u]||ln:n;f=po(h,f)}r.push(f)}return r}function V1(t,n,{clamp:a=!0,ease:r,mixer:l}={}){const c=t.length;if(Jh(c===n.length),c===1)return()=>n[0];if(c===2&&n[0]===n[1])return()=>n[1];const u=t[0]===t[1];t[0]>t[c-1]&&(t=[...t].reverse(),n=[...n].reverse());const f=IT(n,r,l),h=f.length,m=g=>{if(u&&g<t[0])return n[0];let p=0;if(h>1)for(;p<t.length-2&&!(g<t[p+1]);p++);const v=Jr(t[p],t[p+1],g);return f[p](v)};return a?g=>m(jn(t[0],t[c-1],g)):m}function QT(t,n){const a=t[t.length-1];for(let r=1;r<=n;r++){const l=Jr(0,n,r);t.push(Kt(a,1,l))}}function FT(t){const n=[0];return QT(n,t.length-1),n}function JT(t,n){return t.map(a=>a*n)}function WT(t,n){return t.map(()=>n||S1).splice(0,t.length-1)}function $r({duration:t=300,keyframes:n,times:a,ease:r="easeInOut"}){const l=lT(r)?r.map(Ry):Ry(r),c={done:!1,value:n[0]},u=JT(a&&a.length===n.length?a:FT(n),t),f=V1(u,n,{ease:Array.isArray(l)?l:WT(n,l)});return{calculatedDuration:t,next:h=>(c.value=f(h),c.done=h>=t,c)}}const t_=t=>t!==null;function Zu(t,{repeat:n,repeatType:a="loop"},r,l=1){const c=t.filter(t_),f=l<0||n&&a!=="loop"&&n%2===1?0:c.length-1;return!f||r===void 0?c[f]:r}const e_={decay:ph,inertia:ph,tween:$r,keyframes:$r,spring:Cu};function L1(t){typeof t.type=="string"&&(t.type=e_[t.type])}class om{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(n=>{this.resolve=n})}notifyFinished(){this.resolve()}then(n,a){return this.finished.then(n,a)}}const n_=t=>t/100;class to extends om{constructor(n){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,l;const{motionValue:a}=this.options;a&&a.updatedAt!==Ce.now()&&this.tick(Ce.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(l=(r=this.options).onStop)==null||l.call(r))},this.options=n,this.initAnimation(),this.play(),n.autoplay===!1&&this.pause()}initAnimation(){const{options:n}=this;L1(n);const{type:a=$r,repeat:r=0,repeatDelay:l=0,repeatType:c,velocity:u=0}=n;let{keyframes:f}=n;const h=a||$r;h!==$r&&typeof f[0]!="number"&&(this.mixKeyframes=po(n_,O1(f[0],f[1])),f=[0,100]);const m=h({...n,keyframes:f});c==="mirror"&&(this.mirroredGenerator=h({...n,keyframes:[...f].reverse(),velocity:-u})),m.calculatedDuration===null&&(m.calculatedDuration=rm(m));const{calculatedDuration:g}=m;this.calculatedDuration=g,this.resolvedDuration=g+l,this.totalDuration=this.resolvedDuration*(r+1)-l,this.generator=m}updateTime(n){const a=Math.round(n-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=a}tick(n,a=!1){const{generator:r,totalDuration:l,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:f,calculatedDuration:h}=this;if(this.startTime===null)return r.next(0);const{delay:m=0,keyframes:g,repeat:p,repeatType:v,repeatDelay:x,type:b,onUpdate:E,finalKeyframe:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,n):this.speed<0&&(this.startTime=Math.min(n-l/this.speed,this.startTime)),a?this.currentTime=n:this.updateTime(n);const _=this.currentTime-m*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?_<0:_>l;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let S=this.currentTime,T=r;if(p){const P=Math.min(this.currentTime,l)/f;let F=Math.floor(P),X=P%1;!X&&P>=1&&(X=1),X===1&&F--,F=Math.min(F,p+1),!!(F%2)&&(v==="reverse"?(X=1-X,x&&(X-=x/f)):v==="mirror"&&(T=u)),S=jn(0,1,X)*f}let R;C?(this.delayState.value=g[0],R=this.delayState):R=T.next(S),c&&!C&&(R.value=c(R.value));let{done:L}=R;!C&&h!==null&&(L=this.playbackSpeed>=0?this.currentTime>=l:this.currentTime<=0);const U=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return U&&b!==ph&&(R.value=Zu(g,this.options,M,this.speed)),E&&E(R.value),U&&this.finish(),R}then(n,a){return this.finished.then(n,a)}get duration(){return on(this.calculatedDuration)}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+on(n)}get time(){return on(this.currentTime)}set time(n){n=Ie(n),this.currentTime=n,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=n:this.driver&&(this.startTime=this.driver.now()-n/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=n,this.tick(n))}getGeneratorVelocity(){const n=this.currentTime;if(n<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(n);const a=this.generator.next(n).value;return j1(r=>this.generator.next(r).value,n,a)}get speed(){return this.playbackSpeed}set speed(n){const a=this.playbackSpeed!==n;a&&this.driver&&this.updateTime(Ce.now()),this.playbackSpeed=n,a&&this.driver&&(this.time=on(this.currentTime))}play(){var l,c;if(this.isStopped)return;const{driver:n=UT,startTime:a}=this.options;this.driver||(this.driver=n(u=>this.tick(u))),(c=(l=this.options).onPlay)==null||c.call(l);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=a??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(Ce.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var n,a;this.notifyFinished(),this.teardown(),this.state="finished",(a=(n=this.options).onComplete)==null||a.call(n)}cancel(){var n,a;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(a=(n=this.options).onCancel)==null||a.call(n)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(n){return this.startTime=0,this.tick(n,!0)}attachTimeline(n){var a;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(a=this.driver)==null||a.stop(),n.observe(this)}}function i_(t){for(let n=1;n<t.length;n++)t[n]??(t[n]=t[n-1])}const Ma=t=>t*180/Math.PI,gh=t=>{const n=Ma(Math.atan2(t[1],t[0]));return yh(n)},a_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:gh,rotateZ:gh,skewX:t=>Ma(Math.atan(t[1])),skewY:t=>Ma(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},yh=t=>(t=t%360,t<0&&(t+=360),t),Uy=gh,Yy=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Gy=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),s_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yy,scaleY:Gy,scale:t=>(Yy(t)+Gy(t))/2,rotateX:t=>yh(Ma(Math.atan2(t[6],t[5]))),rotateY:t=>yh(Ma(Math.atan2(-t[2],t[0]))),rotateZ:Uy,rotate:Uy,skewX:t=>Ma(Math.atan(t[4])),skewY:t=>Ma(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function vh(t){return t.includes("scale")?1:0}function xh(t,n){if(!t||t==="none")return vh(n);const a=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,l;if(a)r=s_,l=a;else{const f=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=a_,l=f}if(!l)return vh(n);const c=r[n],u=l[1].split(",").map(o_);return typeof c=="function"?c(u):u[c]}const r_=(t,n)=>{const{transform:a="none"}=getComputedStyle(t);return xh(a,n)};function o_(t){return parseFloat(t.trim())}const Gs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qs=new Set(Gs),qy=t=>t===Ys||t===gt,l_=new Set(["x","y","z"]),u_=Gs.filter(t=>!l_.has(t));function c_(t){const n=[];return u_.forEach(a=>{const r=t.getValue(a);r!==void 0&&(n.push([a,r.get()]),r.set(a.startsWith("scale")?1:0))}),n}const $i={width:({x:t},{paddingLeft:n="0",paddingRight:a="0",boxSizing:r})=>{const l=t.max-t.min;return r==="border-box"?l:l-parseFloat(n)-parseFloat(a)},height:({y:t},{paddingTop:n="0",paddingBottom:a="0",boxSizing:r})=>{const l=t.max-t.min;return r==="border-box"?l:l-parseFloat(n)-parseFloat(a)},top:(t,{top:n})=>parseFloat(n),left:(t,{left:n})=>parseFloat(n),bottom:({y:t},{top:n})=>parseFloat(n)+(t.max-t.min),right:({x:t},{left:n})=>parseFloat(n)+(t.max-t.min),x:(t,{transform:n})=>xh(n,"x"),y:(t,{transform:n})=>xh(n,"y")};$i.translateX=$i.x;$i.translateY=$i.y;const Ca=new Set;let bh=!1,wh=!1,Sh=!1;function k1(){if(wh){const t=Array.from(Ca).filter(r=>r.needsMeasurement),n=new Set(t.map(r=>r.element)),a=new Map;n.forEach(r=>{const l=c_(r);l.length&&(a.set(r,l),r.render())}),t.forEach(r=>r.measureInitialState()),n.forEach(r=>{r.render();const l=a.get(r);l&&l.forEach(([c,u])=>{var f;(f=r.getValue(c))==null||f.set(u)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wh=!1,bh=!1,Ca.forEach(t=>t.complete(Sh)),Ca.clear()}function B1(){Ca.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(wh=!0)})}function f_(){Sh=!0,B1(),k1(),Sh=!1}class lm{constructor(n,a,r,l,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...n],this.onComplete=a,this.name=r,this.motionValue=l,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Ca.add(this),bh||(bh=!0,Ht.read(B1),Ht.resolveKeyframes(k1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:n,name:a,element:r,motionValue:l}=this;if(n[0]===null){const c=l==null?void 0:l.get(),u=n[n.length-1];if(c!==void 0)n[0]=c;else if(r&&a){const f=r.readValue(a,u);f!=null&&(n[0]=f)}n[0]===void 0&&(n[0]=u),l&&c===void 0&&l.set(n[0])}i_(n)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(n=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,n),Ca.delete(this)}cancel(){this.state==="scheduled"&&(Ca.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const d_=t=>t.startsWith("--");function H1(t,n,a){d_(n)?t.style.setProperty(n,a):t.style[n]=a}const h_={};function U1(t,n){const a=d1(t);return()=>h_[n]??a()}const m_=U1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Y1=U1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Gr=([t,n,a,r])=>`cubic-bezier(${t}, ${n}, ${a}, ${r})`,Xy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gr([0,.65,.55,1]),circOut:Gr([.55,0,1,.45]),backIn:Gr([.31,.01,.66,-.59]),backOut:Gr([.33,1.53,.69,.99])};function G1(t,n){if(t)return typeof t=="function"?Y1()?R1(t,n):"ease-out":E1(t)?Gr(t):Array.isArray(t)?t.map(a=>G1(a,n)||Xy.easeOut):Xy[t]}function p_(t,n,a,{delay:r=0,duration:l=300,repeat:c=0,repeatType:u="loop",ease:f="easeOut",times:h}={},m=void 0){const g={[n]:a};h&&(g.offset=h);const p=G1(f,l);Array.isArray(p)&&(g.easing=p);const v={delay:r,duration:l,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return m&&(v.pseudoElement=m),t.animate(g,v)}function q1(t){return typeof t=="function"&&"applyToOptions"in t}function g_({type:t,...n}){return q1(t)&&Y1()?t.applyToOptions(n):(n.duration??(n.duration=300),n.ease??(n.ease="easeOut"),n)}class X1 extends om{constructor(n){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!n)return;const{element:a,name:r,keyframes:l,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:f,onComplete:h}=n;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=n,Jh(typeof n.type!="string");const m=g_(n);this.animation=p_(a,r,l,m,c),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const g=Zu(l,this.options,f,this.speed);this.updateMotionValue&&this.updateMotionValue(g),H1(a,r,g),this.animation.cancel()}h==null||h(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var n,a;(a=(n=this.animation).finish)==null||a.call(n)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:n}=this;n==="idle"||n==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var a,r,l;const n=(a=this.options)==null?void 0:a.element;!this.isPseudoElement&&(n!=null&&n.isConnected)&&((l=(r=this.animation).commitStyles)==null||l.call(r))}get duration(){var a,r;const n=((r=(a=this.animation.effect)==null?void 0:a.getComputedTiming)==null?void 0:r.call(a).duration)||0;return on(Number(n))}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+on(n)}get time(){return on(Number(this.animation.currentTime)||0)}set time(n){const a=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ie(n),a&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(n){n<0&&(this.finishedTime=null),this.animation.playbackRate=n}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(n){this.manualStartTime=this.animation.startTime=n}attachTimeline({timeline:n,rangeStart:a,rangeEnd:r,observe:l}){var c;return this.allowFlatten&&((c=this.animation.effect)==null||c.updateTiming({easing:"linear"})),this.animation.onfinish=null,n&&m_()?(this.animation.timeline=n,a&&(this.animation.rangeStart=a),r&&(this.animation.rangeEnd=r),ln):l(this)}}const P1={anticipate:x1,backInOut:v1,circInOut:w1};function y_(t){return t in P1}function v_(t){typeof t.ease=="string"&&y_(t.ease)&&(t.ease=P1[t.ease])}const Bd=10;class x_ extends X1{constructor(n){v_(n),L1(n),super(n),n.startTime!==void 0&&n.autoplay!==!1&&(this.startTime=n.startTime),this.options=n}updateMotionValue(n){const{motionValue:a,onUpdate:r,onComplete:l,element:c,...u}=this.options;if(!a)return;if(n!==void 0){a.set(n);return}const f=new to({...u,autoplay:!1}),h=Math.max(Bd,Ce.now()-this.startTime),m=jn(0,Bd,h-Bd),g=f.sample(h).value,{name:p}=this.options;c&&p&&H1(c,p,g),a.setWithVelocity(f.sample(Math.max(0,h-m)).value,g,m),f.stop()}}const Py=(t,n)=>n==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(bn.test(t)||t==="0")&&!t.startsWith("url("));function b_(t){const n=t[0];if(t.length===1)return!0;for(let a=0;a<t.length;a++)if(t[a]!==n)return!0}function w_(t,n,a,r){const l=t[0];if(l===null)return!1;if(n==="display"||n==="visibility")return!0;const c=t[t.length-1],u=Py(l,n),f=Py(c,n);return!u||!f?!1:b_(t)||(a==="spring"||q1(a))&&r}function Eh(t){t.duration=0,t.type="keyframes"}const $1=new Set(["opacity","clipPath","filter","transform"]),S_=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function E_(t){for(let n=0;n<t.length;n++)if(typeof t[n]=="string"&&S_.test(t[n]))return!0;return!1}const T_=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),__=d1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function M_(t){var p;const{motionValue:n,name:a,repeatDelay:r,repeatType:l,damping:c,type:u,keyframes:f}=t;if(!(((p=n==null?void 0:n.owner)==null?void 0:p.current)instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=n.owner.getProps();return __()&&a&&($1.has(a)||T_.has(a)&&E_(f))&&(a!=="transform"||!g)&&!m&&!r&&l!=="mirror"&&c!==0&&u!=="inertia"}const A_=40;class C_ extends om{constructor({autoplay:n=!0,delay:a=0,type:r="keyframes",repeat:l=0,repeatDelay:c=0,repeatType:u="loop",keyframes:f,name:h,motionValue:m,element:g,...p}){var b;super(),this.stop=()=>{var E,M;this._animation&&(this._animation.stop(),(E=this.stopTimeline)==null||E.call(this)),(M=this.keyframeResolver)==null||M.cancel()},this.createdAt=Ce.now();const v={autoplay:n,delay:a,type:r,repeat:l,repeatDelay:c,repeatType:u,name:h,motionValue:m,element:g,...p},x=(g==null?void 0:g.KeyframeResolver)||lm;this.keyframeResolver=new x(f,(E,M,_)=>this.onKeyframesResolved(E,M,v,!_),h,m,g),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(n,a,r,l){var _,C;this.keyframeResolver=void 0;const{name:c,type:u,velocity:f,delay:h,isHandoff:m,onUpdate:g}=r;this.resolvedAt=Ce.now();let p=!0;w_(n,c,u,f)||(p=!1,(Zi.instantAnimations||!h)&&(g==null||g(Zu(n,r,a))),n[0]=n[n.length-1],Eh(r),r.repeat=0);const x={startTime:l?this.resolvedAt?this.resolvedAt-this.createdAt>A_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:a,...r,keyframes:n},b=p&&!m&&M_(x),E=(C=(_=x.motionValue)==null?void 0:_.owner)==null?void 0:C.current;let M;if(b)try{M=new x_({...x,element:E})}catch{M=new to(x)}else M=new to(x);M.finished.then(()=>{this.notifyFinished()}).catch(ln),this.pendingTimeline&&(this.stopTimeline=M.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=M}get finished(){return this._animation?this.animation.finished:this._finished}then(n,a){return this.finished.finally(n).then(()=>{})}get animation(){var n;return this._animation||((n=this.keyframeResolver)==null||n.resume(),f_()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(n){this.animation.time=n}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(n){this.animation.speed=n}get startTime(){return this.animation.startTime}attachTimeline(n){return this._animation?this.stopTimeline=this.animation.attachTimeline(n):this.pendingTimeline=n,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var n;this._animation&&this.animation.cancel(),(n=this.keyframeResolver)==null||n.cancel()}}function K1(t,n,a,r=0,l=1){const c=Array.from(t).sort((m,g)=>m.sortNodePosition(g)).indexOf(n),u=t.size,f=(u-1)*r;return typeof a=="function"?a(c,u):l===1?c*r:f-c*r}const N_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function D_(t){const n=N_.exec(t);if(!n)return[,];const[,a,r,l]=n;return[`--${a??r}`,l]}function Z1(t,n,a=1){const[r,l]=D_(t);if(!r)return;const c=window.getComputedStyle(n).getPropertyValue(r);if(c){const u=c.trim();return u1(u)?parseFloat(u):u}return nm(l)?Z1(l,n,a+1):l}const z_={type:"spring",stiffness:500,damping:25,restSpeed:10},O_=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),R_={type:"keyframes",duration:.8},j_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},V_=(t,{keyframes:n})=>n.length>2?R_:qs.has(t)?t.startsWith("scale")?O_(n[1]):z_:j_;function I1(t,n){if(t!=null&&t.inherit&&n){const{inherit:a,...r}=t;return{...n,...r}}return t}function um(t,n){const a=(t==null?void 0:t[n])??(t==null?void 0:t.default)??t;return a!==t?I1(a,t):a}const L_=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function k_(t){for(const n in t)if(!L_.has(n))return!0;return!1}const cm=(t,n,a,r={},l,c)=>u=>{const f=um(r,t)||{},h=f.delay||r.delay||0;let{elapsed:m=0}=r;m=m-Ie(h);const g={keyframes:Array.isArray(a)?a:[null,a],ease:"easeOut",velocity:n.getVelocity(),...f,delay:-m,onUpdate:v=>{n.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:t,motionValue:n,element:c?void 0:l};k_(f)||Object.assign(g,V_(t,g)),g.duration&&(g.duration=Ie(g.duration)),g.repeatDelay&&(g.repeatDelay=Ie(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let p=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(Eh(g),g.delay===0&&(p=!0)),(Zi.instantAnimations||Zi.skipAnimations||l!=null&&l.shouldSkipAnimations)&&(p=!0,Eh(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,p&&!c&&n.get()!==void 0){const v=Zu(g.keyframes,f);if(v!==void 0){Ht.update(()=>{g.onUpdate(v),g.onComplete()});return}}return f.isSync?new to(g):new C_(g)};function $y(t){const n=[{},{}];return t==null||t.values.forEach((a,r)=>{n[0][r]=a.get(),n[1][r]=a.getVelocity()}),n}function fm(t,n,a,r){if(typeof n=="function"){const[l,c]=$y(r);n=n(a!==void 0?a:t.custom,l,c)}if(typeof n=="string"&&(n=t.variants&&t.variants[n]),typeof n=="function"){const[l,c]=$y(r);n=n(a!==void 0?a:t.custom,l,c)}return n}function Na(t,n,a){const r=t.getProps();return fm(r,n,a!==void 0?a:r.custom,t)}const Q1=new Set(["width","height","top","left","right","bottom",...Gs]),Ky=30,B_=t=>!isNaN(parseFloat(t)),Kr={current:void 0};class H_{constructor(n,a={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var c;const l=Ce.now();if(this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((c=this.events.change)==null||c.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(n),this.owner=a.owner}setCurrent(n){this.current=n,this.updatedAt=Ce.now(),this.canTrackVelocity===null&&n!==void 0&&(this.canTrackVelocity=B_(this.current))}setPrevFrameValue(n=this.current){this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt}onChange(n){return this.on("change",n)}on(n,a){this.events[n]||(this.events[n]=new Wh);const r=this.events[n].add(a);return n==="change"?()=>{r(),Ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const n in this.events)this.events[n].clear()}attach(n,a){this.passiveEffect=n,this.stopPassiveEffect=a}set(n){this.passiveEffect?this.passiveEffect(n,this.updateAndNotify):this.updateAndNotify(n)}setWithVelocity(n,a,r){this.set(a),this.prev=void 0,this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt-r}jump(n,a=!0){this.updateAndNotify(n),this.prev=n,this.prevUpdatedAt=this.prevFrameValue=void 0,a&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var n;(n=this.events.change)==null||n.notify(this.current)}addDependent(n){this.dependents||(this.dependents=new Set),this.dependents.add(n)}removeDependent(n){this.dependents&&this.dependents.delete(n)}get(){return Kr.current&&Kr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const n=Ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||n-this.updatedAt>Ky)return 0;const a=Math.min(this.updatedAt-this.prevUpdatedAt,Ky);return h1(parseFloat(this.current)-parseFloat(this.prevFrameValue),a)}start(n){return this.stop(),new Promise(a=>{this.hasAnimated=!0,this.animation=n(a),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 n,a;(n=this.dependents)==null||n.clear(),(a=this.events.destroy)==null||a.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Oa(t,n){return new H_(t,n)}const Th=t=>Array.isArray(t);function U_(t,n,a){t.hasValue(n)?t.getValue(n).set(a):t.addValue(n,Oa(a))}function Y_(t){return Th(t)?t[t.length-1]||0:t}function G_(t,n){const a=Na(t,n);let{transitionEnd:r={},transition:l={},...c}=a||{};c={...c,...r};for(const u in c){const f=Y_(c[u]);U_(t,u,f)}}const me=t=>!!(t&&t.getVelocity);function q_(t){return!!(me(t)&&t.add)}function _h(t,n){const a=t.getValue("willChange");if(q_(a))return a.add(n);if(!a&&Zi.WillChange){const r=new Zi.WillChange("auto");t.addValue("willChange",r),r.add(n)}}function dm(t){return t.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}const X_="framerAppearId",F1="data-"+dm(X_);function J1(t){return t.props[F1]}function P_({protectedKeys:t,needsAnimating:n},a){const r=t.hasOwnProperty(a)&&n[a]!==!0;return n[a]=!1,r}function W1(t,n,{delay:a=0,transitionOverride:r,type:l}={}){let{transition:c,transitionEnd:u,...f}=n;const h=t.getDefaultTransition();c=c?I1(c,h):h;const m=c==null?void 0:c.reduceMotion;r&&(c=r);const g=[],p=l&&t.animationState&&t.animationState.getState()[l];for(const v in f){const x=t.getValue(v,t.latestValues[v]??null),b=f[v];if(b===void 0||p&&P_(p,v))continue;const E={delay:a,...um(c||{},v)},M=x.get();if(M!==void 0&&!x.isAnimating()&&!Array.isArray(b)&&b===M&&!E.velocity){Ht.update(()=>x.set(b));continue}let _=!1;if(window.MotionHandoffAnimation){const T=J1(t);if(T){const R=window.MotionHandoffAnimation(T,v,Ht);R!==null&&(E.startTime=R,_=!0)}}_h(t,v);const C=m??t.shouldReduceMotion;x.start(cm(v,x,b,C&&Q1.has(v)?{type:!1}:E,t,_));const S=x.animation;S&&g.push(S)}if(u){const v=()=>Ht.update(()=>{u&&G_(t,u)});g.length?Promise.all(g).then(v):v()}return g}function Mh(t,n,a={}){var h;const r=Na(t,n,a.type==="exit"?(h=t.presenceContext)==null?void 0:h.custom:void 0);let{transition:l=t.getDefaultTransition()||{}}=r||{};a.transitionOverride&&(l=a.transitionOverride);const c=r?()=>Promise.all(W1(t,r,a)):()=>Promise.resolve(),u=t.variantChildren&&t.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:p,staggerDirection:v}=l;return $_(t,n,m,g,p,v,a)}:()=>Promise.resolve(),{when:f}=l;if(f){const[m,g]=f==="beforeChildren"?[c,u]:[u,c];return m().then(()=>g())}else return Promise.all([c(),u(a.delay)])}function $_(t,n,a=0,r=0,l=0,c=1,u){const f=[];for(const h of t.variantChildren)h.notify("AnimationStart",n),f.push(Mh(h,n,{...u,delay:a+(typeof r=="function"?0:r)+K1(t.variantChildren,h,r,l,c)}).then(()=>h.notify("AnimationComplete",n)));return Promise.all(f)}function K_(t,n,a={}){t.notify("AnimationStart",n);let r;if(Array.isArray(n)){const l=n.map(c=>Mh(t,c,a));r=Promise.all(l)}else if(typeof n=="string")r=Mh(t,n,a);else{const l=typeof n=="function"?Na(t,n,a.custom):n;r=Promise.all(W1(t,l,a))}return r.then(()=>{t.notify("AnimationComplete",n)})}const Z_={test:t=>t==="auto",parse:t=>t},tb=t=>n=>n.test(t),eb=[Ys,gt,On,qi,wT,bT,Z_],Zy=t=>eb.find(tb(t));function I_(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||f1(t):!0}const Q_=new Set(["brightness","contrast","saturate","opacity"]);function F_(t){const[n,a]=t.slice(0,-1).split("(");if(n==="drop-shadow")return t;const[r]=a.match(im)||[];if(!r)return t;const l=a.replace(r,"");let c=Q_.has(n)?1:0;return r!==a&&(c*=100),n+"("+c+l+")"}const J_=/\b([a-z-]*)\(.*?\)/gu,Ah={...bn,getAnimatableNone:t=>{const n=t.match(J_);return n?n.map(F_).join(" "):t}},Ch={...bn,getAnimatableNone:t=>{const n=bn.parse(t);return bn.createTransformer(t)(n.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Iy={...Ys,transform:Math.round},W_={rotate:qi,rotateX:qi,rotateY:qi,rotateZ:qi,scale:Fl,scaleX:Fl,scaleY:Fl,scaleZ:Fl,skew:qi,skewX:qi,skewY:qi,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:Wr,originX:Vy,originY:Vy,originZ:gt},hm={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,top:gt,right:gt,bottom:gt,left:gt,inset:gt,insetBlock:gt,insetBlockStart:gt,insetBlockEnd:gt,insetInline:gt,insetInlineStart:gt,insetInlineEnd:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,paddingBlock:gt,paddingBlockStart:gt,paddingBlockEnd:gt,paddingInline:gt,paddingInlineStart:gt,paddingInlineEnd:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,marginBlock:gt,marginBlockStart:gt,marginBlockEnd:gt,marginInline:gt,marginInlineStart:gt,marginInlineEnd:gt,fontSize:gt,backgroundPositionX:gt,backgroundPositionY:gt,...W_,zIndex:Iy,fillOpacity:Wr,strokeOpacity:Wr,numOctaves:Iy},tM={...hm,color:le,backgroundColor:le,outlineColor:le,fill:le,stroke:le,borderColor:le,borderTopColor:le,borderRightColor:le,borderBottomColor:le,borderLeftColor:le,filter:Ah,WebkitFilter:Ah,mask:Ch,WebkitMask:Ch},nb=t=>tM[t],eM=new Set([Ah,Ch]);function ib(t,n){let a=nb(t);return eM.has(a)||(a=bn),a.getAnimatableNone?a.getAnimatableNone(n):void 0}const nM=new Set(["auto","none","0"]);function iM(t,n,a){let r=0,l;for(;r<t.length&&!l;){const c=t[r];typeof c=="string"&&!nM.has(c)&&Rs(c).values.length&&(l=t[r]),r++}if(l&&a)for(const c of n)t[c]=ib(a,l)}class aM extends lm{constructor(n,a,r,l,c){super(n,a,r,l,c,!0)}readKeyframes(){const{unresolvedKeyframes:n,element:a,name:r}=this;if(!a||!a.current)return;super.readKeyframes();for(let g=0;g<n.length;g++){let p=n[g];if(typeof p=="string"&&(p=p.trim(),nm(p))){const v=Z1(p,a.current);v!==void 0&&(n[g]=v),g===n.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!Q1.has(r)||n.length!==2)return;const[l,c]=n,u=Zy(l),f=Zy(c),h=jy(l),m=jy(c);if(h!==m&&$i[r]){this.needsMeasurement=!0;return}if(u!==f)if(qy(u)&&qy(f))for(let g=0;g<n.length;g++){const p=n[g];typeof p=="string"&&(n[g]=parseFloat(p))}else $i[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:n,name:a}=this,r=[];for(let l=0;l<n.length;l++)(n[l]===null||I_(n[l]))&&r.push(l);r.length&&iM(n,r,a)}measureInitialState(){const{element:n,unresolvedKeyframes:a,name:r}=this;if(!n||!n.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$i[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a[0]=this.measuredOrigin;const l=a[a.length-1];l!==void 0&&n.getValue(r,l).jump(l,!1)}measureEndState(){var f;const{element:n,name:a,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const l=n.getValue(a);l&&l.jump(this.measuredOrigin,!1);const c=r.length-1,u=r[c];r[c]=$i[a](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),(f=this.removedTransforms)!=null&&f.length&&this.removedTransforms.forEach(([h,m])=>{n.getValue(h).set(m)}),this.resolveNoneKeyframes()}}function ab(t,n,a){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const l=(a==null?void 0:a[t])??r.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t).filter(r=>r!=null)}const sb=(t,n)=>n&&typeof t=="number"?n.transform(t):t;function hu(t){return c1(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:mm}=T1(queueMicrotask,!1),pn={x:!1,y:!1};function rb(){return pn.x||pn.y}function sM(t){return t==="x"||t==="y"?pn[t]?null:(pn[t]=!0,()=>{pn[t]=!1}):pn.x||pn.y?null:(pn.x=pn.y=!0,()=>{pn.x=pn.y=!1})}function ob(t,n){const a=ab(t),r=new AbortController,l={passive:!0,...n,signal:r.signal};return[a,l,()=>r.abort()]}function rM(t){return!(t.pointerType==="touch"||rb())}function oM(t,n,a={}){const[r,l,c]=ob(t,a);return r.forEach(u=>{let f=!1,h=!1,m;const g=()=>{u.removeEventListener("pointerleave",b)},p=M=>{m&&(m(M),m=void 0),g()},v=M=>{f=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),h&&(h=!1,p(M))},x=()=>{f=!0,window.addEventListener("pointerup",v,l),window.addEventListener("pointercancel",v,l)},b=M=>{if(M.pointerType!=="touch"){if(f){h=!0;return}p(M)}},E=M=>{if(!rM(M))return;h=!1;const _=n(u,M);typeof _=="function"&&(m=_,u.addEventListener("pointerleave",b,l))};u.addEventListener("pointerenter",E,l),u.addEventListener("pointerdown",x,l)}),c}const lb=(t,n)=>n?t===n?!0:lb(t,n.parentElement):!1,pm=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,lM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function uM(t){return lM.has(t.tagName)||t.isContentEditable===!0}const cM=new Set(["INPUT","SELECT","TEXTAREA"]);function fM(t){return cM.has(t.tagName)||t.isContentEditable===!0}const mu=new WeakSet;function Qy(t){return n=>{n.key==="Enter"&&t(n)}}function Hd(t,n){t.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:!0,bubbles:!0}))}const dM=(t,n)=>{const a=t.currentTarget;if(!a)return;const r=Qy(()=>{if(mu.has(a))return;Hd(a,"down");const l=Qy(()=>{Hd(a,"up")}),c=()=>Hd(a,"cancel");a.addEventListener("keyup",l,n),a.addEventListener("blur",c,n)});a.addEventListener("keydown",r,n),a.addEventListener("blur",()=>a.removeEventListener("keydown",r),n)};function Fy(t){return pm(t)&&!rb()}const Jy=new WeakSet;function hM(t,n,a={}){const[r,l,c]=ob(t,a),u=f=>{const h=f.currentTarget;if(!Fy(f)||Jy.has(f))return;mu.add(h),a.stopPropagation&&Jy.add(f);const m=n(h,f),g=(x,b)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",v),mu.has(h)&&mu.delete(h),Fy(x)&&typeof m=="function"&&m(x,{success:b})},p=x=>{g(x,h===window||h===document||a.useGlobalTarget||lb(h,x.target))},v=x=>{g(x,!1)};window.addEventListener("pointerup",p,l),window.addEventListener("pointercancel",v,l)};return r.forEach(f=>{(a.useGlobalTarget?window:f).addEventListener("pointerdown",u,l),hu(f)&&(f.addEventListener("focus",m=>dM(m,l)),!uM(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),c}function gm(t){return c1(t)&&"ownerSVGElement"in t}const pu=new WeakMap;let Xi;const ub=(t,n,a)=>(r,l)=>l&&l[0]?l[0][t+"Size"]:gm(r)&&"getBBox"in r?r.getBBox()[n]:r[a],mM=ub("inline","width","offsetWidth"),pM=ub("block","height","offsetHeight");function gM({target:t,borderBoxSize:n}){var a;(a=pu.get(t))==null||a.forEach(r=>{r(t,{get width(){return mM(t,n)},get height(){return pM(t,n)}})})}function yM(t){t.forEach(gM)}function vM(){typeof ResizeObserver>"u"||(Xi=new ResizeObserver(yM))}function xM(t,n){Xi||vM();const a=ab(t);return a.forEach(r=>{let l=pu.get(r);l||(l=new Set,pu.set(r,l)),l.add(n),Xi==null||Xi.observe(r)}),()=>{a.forEach(r=>{const l=pu.get(r);l==null||l.delete(n),l!=null&&l.size||Xi==null||Xi.unobserve(r)})}}const gu=new Set;let As;function bM(){As=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};gu.forEach(n=>n(t))},window.addEventListener("resize",As)}function wM(t){return gu.add(t),As||bM(),()=>{gu.delete(t),!gu.size&&typeof As=="function"&&(window.removeEventListener("resize",As),As=void 0)}}function Wy(t,n){return typeof t=="function"?wM(t):xM(t,n)}function SM(t){return gm(t)&&t.tagName==="svg"}function EM(...t){const n=!Array.isArray(t[0]),a=n?0:-1,r=t[0+a],l=t[1+a],c=t[2+a],u=t[3+a],f=V1(l,c,u);return n?f(r):f}function TM(t,n,a={}){const r=t.get();let l=null,c=r,u;const f=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,h=()=>{l&&(l.stop(),l=null),t.animation=void 0},m=()=>{const p=tv(t.get()),v=tv(c);if(p===v){h();return}const x=l?l.getGeneratorVelocity():t.getVelocity();h(),l=new to({keyframes:[p,v],velocity:x,type:"spring",restDelta:.001,restSpeed:.01,...a,onUpdate:u})},g=()=>{var p;m(),t.animation=l??void 0,(p=t.events.animationStart)==null||p.notify(),l==null||l.then(()=>{var v;t.animation=void 0,(v=t.events.animationComplete)==null||v.notify()})};if(t.attach((p,v)=>{c=p,u=x=>v(Ud(x,f)),Ht.postRender(g)},h),me(n)){let p=a.skipInitialAnimation===!0;const v=n.on("change",b=>{p?(p=!1,t.jump(Ud(b,f),!1)):t.set(Ud(b,f))}),x=t.on("destroy",v);return()=>{v(),x()}}return h}function Ud(t,n){return n?t+n:t}function tv(t){return typeof t=="number"?t:parseFloat(t)}const _M=[...eb,le,bn],MM=t=>_M.find(tb(t)),ev=()=>({translate:0,scale:1,origin:0,originPoint:0}),Cs=()=>({x:ev(),y:ev()}),nv=()=>({min:0,max:0}),he=()=>({x:nv(),y:nv()}),AM=new WeakMap;function Iu(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function eo(t){return typeof t=="string"||Array.isArray(t)}const ym=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vm=["initial",...ym];function Qu(t){return Iu(t.animate)||vm.some(n=>eo(t[n]))}function cb(t){return!!(Qu(t)||t.variants)}function CM(t,n,a){for(const r in n){const l=n[r],c=a[r];if(me(l))t.addValue(r,l);else if(me(c))t.addValue(r,Oa(l,{owner:t}));else if(c!==l)if(t.hasValue(r)){const u=t.getValue(r);u.liveStyle===!0?u.jump(l):u.hasAnimated||u.set(l)}else{const u=t.getStaticValue(r);t.addValue(r,Oa(u!==void 0?u:l,{owner:t}))}}for(const r in a)n[r]===void 0&&t.removeValue(r);return n}const Nh={current:null},fb={current:!1},NM=typeof window<"u";function DM(){if(fb.current=!0,!!NM)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),n=()=>Nh.current=t.matches;t.addEventListener("change",n),n()}else Nh.current=!1}const iv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Nu={};function db(t){Nu=t}function zM(){return Nu}class OM{scrapeMotionValuesFromProps(n,a,r){return{}}constructor({parent:n,props:a,presenceContext:r,reducedMotionConfig:l,skipAnimations:c,blockInitialAnimation:u,visualState:f},h={}){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=lm,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 x=Ce.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Ht.render(this.render,!1,!0))};const{latestValues:m,renderState:g}=f;this.latestValues=m,this.baseTarget={...m},this.initialValues=a.initial?{...m}:{},this.renderState=g,this.parent=n,this.props=a,this.presenceContext=r,this.depth=n?n.depth+1:0,this.reducedMotionConfig=l,this.skipAnimationsConfig=c,this.options=h,this.blockInitialAnimation=!!u,this.isControllingVariants=Qu(a),this.isVariantNode=cb(a),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(n&&n.current);const{willChange:p,...v}=this.scrapeMotionValuesFromProps(a,{},this);for(const x in v){const b=v[x];m[x]!==void 0&&me(b)&&b.set(m[x])}}mount(n){var a,r;if(this.hasBeenMounted)for(const l in this.initialValues)(a=this.values.get(l))==null||a.jump(this.initialValues[l]),this.latestValues[l]=this.initialValues[l];this.current=n,AM.set(n,this),this.projection&&!this.projection.instance&&this.projection.mount(n),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,c)=>this.bindToMotionValue(c,l)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(fb.current||DM(),this.shouldReduceMotion=Nh.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var n;this.projection&&this.projection.unmount(),li(this.notifyUpdate),li(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(n=this.parent)==null||n.removeChild(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const r=this.features[a];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(n){this.children.add(n),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(n)}removeChild(n){this.children.delete(n),this.enteringChildren&&this.enteringChildren.delete(n)}bindToMotionValue(n,a){if(this.valueSubscriptions.has(n)&&this.valueSubscriptions.get(n)(),a.accelerate&&$1.has(n)&&this.current instanceof HTMLElement){const{factory:u,keyframes:f,times:h,ease:m,duration:g}=a.accelerate,p=new X1({element:this.current,name:n,keyframes:f,times:h,ease:m,duration:Ie(g)}),v=u(p);this.valueSubscriptions.set(n,()=>{v(),p.cancel()});return}const r=qs.has(n);r&&this.onBindTransform&&this.onBindTransform();const l=a.on("change",u=>{this.latestValues[n]=u,this.props.onUpdate&&Ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,n,a)),this.valueSubscriptions.set(n,()=>{l(),c&&c(),a.owner&&a.stop()})}sortNodePosition(n){return!this.current||!this.sortInstanceNodePosition||this.type!==n.type?0:this.sortInstanceNodePosition(this.current,n.current)}updateFeatures(){let n="animation";for(n in Nu){const a=Nu[n];if(!a)continue;const{isEnabled:r,Feature:l}=a;if(!this.features[n]&&l&&r(this.props)&&(this.features[n]=new l(this)),this.features[n]){const c=this.features[n];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):he()}getStaticValue(n){return this.latestValues[n]}setStaticValue(n,a){this.latestValues[n]=a}update(n,a){(n.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=n,this.prevPresenceContext=this.presenceContext,this.presenceContext=a;for(let r=0;r<iv.length;r++){const l=iv[r];this.propEventSubscriptions[l]&&(this.propEventSubscriptions[l](),delete this.propEventSubscriptions[l]);const c="on"+l,u=n[c];u&&(this.propEventSubscriptions[l]=this.on(l,u))}this.prevMotionValues=CM(this,this.scrapeMotionValuesFromProps(n,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(n){return this.props.variants?this.props.variants[n]: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(n){const a=this.getClosestVariantNode();if(a)return a.variantChildren&&a.variantChildren.add(n),()=>a.variantChildren.delete(n)}addValue(n,a){const r=this.values.get(n);a!==r&&(r&&this.removeValue(n),this.bindToMotionValue(n,a),this.values.set(n,a),this.latestValues[n]=a.get())}removeValue(n){this.values.delete(n);const a=this.valueSubscriptions.get(n);a&&(a(),this.valueSubscriptions.delete(n)),delete this.latestValues[n],this.removeValueFromRenderState(n,this.renderState)}hasValue(n){return this.values.has(n)}getValue(n,a){if(this.props.values&&this.props.values[n])return this.props.values[n];let r=this.values.get(n);return r===void 0&&a!==void 0&&(r=Oa(a===null?void 0:a,{owner:this}),this.addValue(n,r)),r}readValue(n,a){let r=this.latestValues[n]!==void 0||!this.current?this.latestValues[n]:this.getBaseTargetFromProps(this.props,n)??this.readValueFromInstance(this.current,n,this.options);return r!=null&&(typeof r=="string"&&(u1(r)||f1(r))?r=parseFloat(r):!MM(r)&&bn.test(a)&&(r=ib(n,a)),this.setBaseTarget(n,me(r)?r.get():r)),me(r)?r.get():r}setBaseTarget(n,a){this.baseTarget[n]=a}getBaseTarget(n){var c;const{initial:a}=this.props;let r;if(typeof a=="string"||typeof a=="object"){const u=fm(this.props,a,(c=this.presenceContext)==null?void 0:c.custom);u&&(r=u[n])}if(a&&r!==void 0)return r;const l=this.getBaseTargetFromProps(this.props,n);return l!==void 0&&!me(l)?l:this.initialValues[n]!==void 0&&r===void 0?void 0:this.baseTarget[n]}on(n,a){return this.events[n]||(this.events[n]=new Wh),this.events[n].add(a)}notify(n,...a){this.events[n]&&this.events[n].notify(...a)}scheduleRenderMicrotask(){mm.render(this.render)}}class hb extends OM{constructor(){super(...arguments),this.KeyframeResolver=aM}sortInstanceNodePosition(n,a){return n.compareDocumentPosition(a)&2?1:-1}getBaseTargetFromProps(n,a){const r=n.style;return r?r[a]:void 0}removeValueFromRenderState(n,{vars:a,style:r}){delete a[n],delete r[n]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:n}=this.props;me(n)&&(this.childSubscription=n.on("change",a=>{this.current&&(this.current.textContent=`${a}`)}))}}class Qi{constructor(n){this.isMounted=!1,this.node=n}update(){}}function mb({top:t,left:n,right:a,bottom:r}){return{x:{min:n,max:a},y:{min:t,max:r}}}function RM({x:t,y:n}){return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function jM(t,n){if(!n)return t;const a=n({x:t.left,y:t.top}),r=n({x:t.right,y:t.bottom});return{top:a.y,left:a.x,bottom:r.y,right:r.x}}function Yd(t){return t===void 0||t===1}function Dh({scale:t,scaleX:n,scaleY:a}){return!Yd(t)||!Yd(n)||!Yd(a)}function Ea(t){return Dh(t)||pb(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function pb(t){return av(t.x)||av(t.y)}function av(t){return t&&t!=="0%"}function Du(t,n,a){const r=t-a,l=n*r;return a+l}function sv(t,n,a,r,l){return l!==void 0&&(t=Du(t,l,r)),Du(t,a,r)+n}function zh(t,n=0,a=1,r,l){t.min=sv(t.min,n,a,r,l),t.max=sv(t.max,n,a,r,l)}function gb(t,{x:n,y:a}){zh(t.x,n.translate,n.scale,n.originPoint),zh(t.y,a.translate,a.scale,a.originPoint)}const rv=.999999999999,ov=1.0000000000001;function VM(t,n,a,r=!1){var f;const l=a.length;if(!l)return;n.x=n.y=1;let c,u;for(let h=0;h<l;h++){c=a[h],u=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(r&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(Dn(t.x,-c.scroll.offset.x),Dn(t.y,-c.scroll.offset.y)),u&&(n.x*=u.x.scale,n.y*=u.y.scale,gb(t,u)),r&&Ea(c.latestValues)&&yu(t,c.latestValues,(f=c.layout)==null?void 0:f.layoutBox))}n.x<ov&&n.x>rv&&(n.x=1),n.y<ov&&n.y>rv&&(n.y=1)}function Dn(t,n){t.min+=n,t.max+=n}function lv(t,n,a,r,l=.5){const c=Kt(t.min,t.max,l);zh(t,n,a,c,r)}function uv(t,n){return typeof t=="string"?parseFloat(t)/100*(n.max-n.min):t}function yu(t,n,a){const r=a??t;lv(t.x,uv(n.x,r.x),n.scaleX,n.scale,n.originX),lv(t.y,uv(n.y,r.y),n.scaleY,n.scale,n.originY)}function yb(t,n){return mb(jM(t.getBoundingClientRect(),n))}function LM(t,n,a){const r=yb(t,a),{scroll:l}=n;return l&&(Dn(r.x,l.offset.x),Dn(r.y,l.offset.y)),r}const kM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BM=Gs.length;function HM(t,n,a){let r="",l=!0;for(let c=0;c<BM;c++){const u=Gs[c],f=t[u];if(f===void 0)continue;let h=!0;if(typeof f=="number")h=f===(u.startsWith("scale")?1:0);else{const m=parseFloat(f);h=u.startsWith("scale")?m===1:m===0}if(!h||a){const m=sb(f,hm[u]);if(!h){l=!1;const g=kM[u]||u;r+=`${g}(${m}) `}a&&(n[u]=m)}}return r=r.trim(),a?r=a(n,l?"":r):l&&(r="none"),r}function xm(t,n,a){const{style:r,vars:l,transformOrigin:c}=t;let u=!1,f=!1;for(const h in n){const m=n[h];if(qs.has(h)){u=!0;continue}else if(M1(h)){l[h]=m;continue}else{const g=sb(m,hm[h]);h.startsWith("origin")?(f=!0,c[h]=g):r[h]=g}}if(n.transform||(u||a?r.transform=HM(n,t.transform,a):r.transform&&(r.transform="none")),f){const{originX:h="50%",originY:m="50%",originZ:g=0}=c;r.transformOrigin=`${h} ${m} ${g}`}}function vb(t,{style:n,vars:a},r,l){const c=t.style;let u;for(u in n)c[u]=n[u];l==null||l.applyProjectionStyles(c,r);for(u in a)c.setProperty(u,a[u])}function cv(t,n){return n.max===n.min?0:t/(n.max-n.min)*100}const Hr={correct:(t,n)=>{if(!n.target)return t;if(typeof t=="string")if(gt.test(t))t=parseFloat(t);else return t;const a=cv(t,n.target.x),r=cv(t,n.target.y);return`${a}% ${r}%`}},UM={correct:(t,{treeScale:n,projectionDelta:a})=>{const r=t,l=bn.parse(t);if(l.length>5)return r;const c=bn.createTransformer(t),u=typeof l[0]!="number"?1:0,f=a.x.scale*n.x,h=a.y.scale*n.y;l[0+u]/=f,l[1+u]/=h;const m=Kt(f,h,.5);return typeof l[2+u]=="number"&&(l[2+u]/=m),typeof l[3+u]=="number"&&(l[3+u]/=m),c(l)}},Oh={borderRadius:{...Hr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hr,borderTopRightRadius:Hr,borderBottomLeftRadius:Hr,borderBottomRightRadius:Hr,boxShadow:UM};function xb(t,{layout:n,layoutId:a}){return qs.has(t)||t.startsWith("origin")||(n||a!==void 0)&&(!!Oh[t]||t==="opacity")}function bm(t,n,a){var u;const r=t.style,l=n==null?void 0:n.style,c={};if(!r)return c;for(const f in r)(me(r[f])||l&&me(l[f])||xb(f,t)||((u=a==null?void 0:a.getValue(f))==null?void 0:u.liveStyle)!==void 0)&&(c[f]=r[f]);return c}function YM(t){return window.getComputedStyle(t)}class GM extends hb{constructor(){super(...arguments),this.type="html",this.renderInstance=vb}readValueFromInstance(n,a){var r;if(qs.has(a))return(r=this.projection)!=null&&r.isProjecting?vh(a):r_(n,a);{const l=YM(n),c=(M1(a)?l.getPropertyValue(a):l[a])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(n,{transformPagePoint:a}){return yb(n,a)}build(n,a,r){xm(n,a,r.transformTemplate)}scrapeMotionValuesFromProps(n,a,r){return bm(n,a,r)}}const qM={offset:"stroke-dashoffset",array:"stroke-dasharray"},XM={offset:"strokeDashoffset",array:"strokeDasharray"};function PM(t,n,a=1,r=0,l=!0){t.pathLength=1;const c=l?qM:XM;t[c.offset]=`${-r}`,t[c.array]=`${n} ${a}`}const $M=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function bb(t,{attrX:n,attrY:a,attrScale:r,pathLength:l,pathSpacing:c=1,pathOffset:u=0,...f},h,m,g){if(xm(t,f,m),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:v}=t;p.transform&&(v.transform=p.transform,delete p.transform),(v.transform||p.transformOrigin)&&(v.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),v.transform&&(v.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete p.transformBox);for(const x of $M)p[x]!==void 0&&(v[x]=p[x],delete p[x]);n!==void 0&&(p.x=n),a!==void 0&&(p.y=a),r!==void 0&&(p.scale=r),l!==void 0&&PM(p,l,c,u,!1)}const wb=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"]),Sb=t=>typeof t=="string"&&t.toLowerCase()==="svg";function KM(t,n,a,r){vb(t,n,void 0,r);for(const l in n.attrs)t.setAttribute(wb.has(l)?l:dm(l),n.attrs[l])}function Eb(t,n,a){const r=bm(t,n,a);for(const l in t)if(me(t[l])||me(n[l])){const c=Gs.indexOf(l)!==-1?"attr"+l.charAt(0).toUpperCase()+l.substring(1):l;r[c]=t[l]}return r}class ZM extends hb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=he}getBaseTargetFromProps(n,a){return n[a]}readValueFromInstance(n,a){if(qs.has(a)){const r=nb(a);return r&&r.default||0}return a=wb.has(a)?a:dm(a),n.getAttribute(a)}scrapeMotionValuesFromProps(n,a,r){return Eb(n,a,r)}build(n,a,r){bb(n,a,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(n,a,r,l){KM(n,a,r,l)}mount(n){this.isSVGTag=Sb(n.tagName),super.mount(n)}}const IM=vm.length;function Tb(t){if(!t)return;if(!t.isControllingVariants){const a=t.parent?Tb(t.parent)||{}:{};return t.props.initial!==void 0&&(a.initial=t.props.initial),a}const n={};for(let a=0;a<IM;a++){const r=vm[a],l=t.props[r];(eo(l)||l===!1)&&(n[r]=l)}return n}function _b(t,n){if(!Array.isArray(n))return!1;const a=n.length;if(a!==t.length)return!1;for(let r=0;r<a;r++)if(n[r]!==t[r])return!1;return!0}const QM=[...ym].reverse(),FM=ym.length;function JM(t){return n=>Promise.all(n.map(({animation:a,options:r})=>K_(t,a,r)))}function WM(t){let n=JM(t),a=fv(),r=!0,l=!1;const c=m=>(g,p)=>{var x;const v=Na(t,p,m==="exit"?(x=t.presenceContext)==null?void 0:x.custom:void 0);if(v){const{transition:b,transitionEnd:E,...M}=v;g={...g,...M,...E}}return g};function u(m){n=m(t)}function f(m){const{props:g}=t,p=Tb(t.parent)||{},v=[],x=new Set;let b={},E=1/0;for(let _=0;_<FM;_++){const C=QM[_],S=a[C],T=g[C]!==void 0?g[C]:p[C],R=eo(T),L=C===m?S.isActive:null;L===!1&&(E=_);let U=T===p[C]&&T!==g[C]&&R;if(U&&(r||l)&&t.manuallyAnimateOnMount&&(U=!1),S.protectedKeys={...b},!S.isActive&&L===null||!T&&!S.prevProp||Iu(T)||typeof T=="boolean")continue;if(C==="exit"&&S.isActive&&L!==!0){S.prevResolvedValues&&(b={...b,...S.prevResolvedValues});continue}const P=tA(S.prevProp,T);let F=P||C===m&&S.isActive&&!U&&R||_>E&&R,X=!1;const k=Array.isArray(T)?T:[T];let Y=k.reduce(c(C),{});L===!1&&(Y={});const{prevResolvedValues:$={}}=S,D={...$,...Y},K=V=>{F=!0,x.has(V)&&(X=!0,x.delete(V)),S.needsAnimating[V]=!0;const q=t.getValue(V);q&&(q.liveStyle=!1)};for(const V in D){const q=Y[V],I=$[V];if(b.hasOwnProperty(V))continue;let N=!1;Th(q)&&Th(I)?N=!_b(q,I):N=q!==I,N?q!=null?K(V):x.add(V):q!==void 0&&x.has(V)?K(V):S.protectedKeys[V]=!0}S.prevProp=T,S.prevResolvedValues=Y,S.isActive&&(b={...b,...Y}),(r||l)&&t.blockInitialAnimation&&(F=!1);const A=U&&P;F&&(!A||X)&&v.push(...k.map(V=>{const q={type:C};if(typeof V=="string"&&(r||l)&&!A&&t.manuallyAnimateOnMount&&t.parent){const{parent:I}=t,N=Na(I,V);if(I.enteringChildren&&N){const{delayChildren:G}=N.transition||{};q.delay=K1(I.enteringChildren,t,G)}}return{animation:V,options:q}}))}if(x.size){const _={};if(typeof g.initial!="boolean"){const C=Na(t,Array.isArray(g.initial)?g.initial[0]:g.initial);C&&C.transition&&(_.transition=C.transition)}x.forEach(C=>{const S=t.getBaseTarget(C),T=t.getValue(C);T&&(T.liveStyle=!0),_[C]=S??null}),v.push({animation:_})}let M=!!v.length;return r&&(g.initial===!1||g.initial===g.animate)&&!t.manuallyAnimateOnMount&&(M=!1),r=!1,l=!1,M?n(v):Promise.resolve()}function h(m,g){var v;if(a[m].isActive===g)return Promise.resolve();(v=t.variantChildren)==null||v.forEach(x=>{var b;return(b=x.animationState)==null?void 0:b.setActive(m,g)}),a[m].isActive=g;const p=f(m);for(const x in a)a[x].protectedKeys={};return p}return{animateChanges:f,setActive:h,setAnimateFunction:u,getState:()=>a,reset:()=>{a=fv(),l=!0}}}function tA(t,n){return typeof n=="string"?n!==t:Array.isArray(n)?!_b(n,t):!1}function Sa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fv(){return{animate:Sa(!0),whileInView:Sa(),whileHover:Sa(),whileTap:Sa(),whileDrag:Sa(),whileFocus:Sa(),exit:Sa()}}function Rh(t,n){t.min=n.min,t.max=n.max}function mn(t,n){Rh(t.x,n.x),Rh(t.y,n.y)}function dv(t,n){t.translate=n.translate,t.scale=n.scale,t.originPoint=n.originPoint,t.origin=n.origin}const Mb=1e-4,eA=1-Mb,nA=1+Mb,Ab=.01,iA=0-Ab,aA=0+Ab;function Ne(t){return t.max-t.min}function sA(t,n,a){return Math.abs(t-n)<=a}function hv(t,n,a,r=.5){t.origin=r,t.originPoint=Kt(n.min,n.max,t.origin),t.scale=Ne(a)/Ne(n),t.translate=Kt(a.min,a.max,t.origin)-t.originPoint,(t.scale>=eA&&t.scale<=nA||isNaN(t.scale))&&(t.scale=1),(t.translate>=iA&&t.translate<=aA||isNaN(t.translate))&&(t.translate=0)}function Zr(t,n,a,r){hv(t.x,n.x,a.x,r?r.originX:void 0),hv(t.y,n.y,a.y,r?r.originY:void 0)}function mv(t,n,a,r=0){const l=r?Kt(a.min,a.max,r):a.min;t.min=l+n.min,t.max=t.min+Ne(n)}function rA(t,n,a,r){mv(t.x,n.x,a.x,r==null?void 0:r.x),mv(t.y,n.y,a.y,r==null?void 0:r.y)}function pv(t,n,a,r=0){const l=r?Kt(a.min,a.max,r):a.min;t.min=n.min-l,t.max=t.min+Ne(n)}function zu(t,n,a,r){pv(t.x,n.x,a.x,r==null?void 0:r.x),pv(t.y,n.y,a.y,r==null?void 0:r.y)}function gv(t,n,a,r,l){return t-=n,t=Du(t,1/a,r),l!==void 0&&(t=Du(t,1/l,r)),t}function oA(t,n=0,a=1,r=.5,l,c=t,u=t){if(On.test(n)&&(n=parseFloat(n),n=Kt(u.min,u.max,n/100)-u.min),typeof n!="number")return;let f=Kt(c.min,c.max,r);t===c&&(f-=n),t.min=gv(t.min,n,a,f,l),t.max=gv(t.max,n,a,f,l)}function yv(t,n,[a,r,l],c,u){oA(t,n[a],n[r],n[l],n.scale,c,u)}const lA=["x","scaleX","originX"],uA=["y","scaleY","originY"];function vv(t,n,a,r){yv(t.x,n,lA,a?a.x:void 0,r?r.x:void 0),yv(t.y,n,uA,a?a.y:void 0,r?r.y:void 0)}function xv(t){return t.translate===0&&t.scale===1}function Cb(t){return xv(t.x)&&xv(t.y)}function bv(t,n){return t.min===n.min&&t.max===n.max}function cA(t,n){return bv(t.x,n.x)&&bv(t.y,n.y)}function wv(t,n){return Math.round(t.min)===Math.round(n.min)&&Math.round(t.max)===Math.round(n.max)}function Nb(t,n){return wv(t.x,n.x)&&wv(t.y,n.y)}function Sv(t){return Ne(t.x)/Ne(t.y)}function Ev(t,n){return t.translate===n.translate&&t.scale===n.scale&&t.originPoint===n.originPoint}function Nn(t){return[t("x"),t("y")]}function fA(t,n,a){let r="";const l=t.x.translate/n.x,c=t.y.translate/n.y,u=(a==null?void 0:a.z)||0;if((l||c||u)&&(r=`translate3d(${l}px, ${c}px, ${u}px) `),(n.x!==1||n.y!==1)&&(r+=`scale(${1/n.x}, ${1/n.y}) `),a){const{transformPerspective:m,rotate:g,rotateX:p,rotateY:v,skewX:x,skewY:b}=a;m&&(r=`perspective(${m}px) ${r}`),g&&(r+=`rotate(${g}deg) `),p&&(r+=`rotateX(${p}deg) `),v&&(r+=`rotateY(${v}deg) `),x&&(r+=`skewX(${x}deg) `),b&&(r+=`skewY(${b}deg) `)}const f=t.x.scale*n.x,h=t.y.scale*n.y;return(f!==1||h!==1)&&(r+=`scale(${f}, ${h})`),r||"none"}const Db=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],dA=Db.length,Tv=t=>typeof t=="string"?parseFloat(t):t,_v=t=>typeof t=="number"||gt.test(t);function hA(t,n,a,r,l,c){l?(t.opacity=Kt(0,a.opacity??1,mA(r)),t.opacityExit=Kt(n.opacity??1,0,pA(r))):c&&(t.opacity=Kt(n.opacity??1,a.opacity??1,r));for(let u=0;u<dA;u++){const f=Db[u];let h=Mv(n,f),m=Mv(a,f);if(h===void 0&&m===void 0)continue;h||(h=0),m||(m=0),h===0||m===0||_v(h)===_v(m)?(t[f]=Math.max(Kt(Tv(h),Tv(m),r),0),(On.test(m)||On.test(h))&&(t[f]+="%")):t[f]=m}(n.rotate||a.rotate)&&(t.rotate=Kt(n.rotate||0,a.rotate||0,r))}function Mv(t,n){return t[n]!==void 0?t[n]:t.borderRadius}const mA=zb(0,.5,b1),pA=zb(.5,.95,ln);function zb(t,n,a){return r=>r<t?0:r>n?1:a(Jr(t,n,r))}function gA(t,n,a){const r=me(t)?t:Oa(t);return r.start(cm("",r,n,a)),r.animation}function no(t,n,a,r={passive:!0}){return t.addEventListener(n,a,r),()=>t.removeEventListener(n,a)}const yA=(t,n)=>t.depth-n.depth;class vA{constructor(){this.children=[],this.isDirty=!1}add(n){Fh(this.children,n),this.isDirty=!0}remove(n){_u(this.children,n),this.isDirty=!0}forEach(n){this.isDirty&&this.children.sort(yA),this.isDirty=!1,this.children.forEach(n)}}function xA(t,n){const a=Ce.now(),r=({timestamp:l})=>{const c=l-a;c>=n&&(li(r),t(c-n))};return Ht.setup(r,!0),()=>li(r)}function vu(t){return me(t)?t.get():t}class bA{constructor(){this.members=[]}add(n){Fh(this.members,n);for(let a=this.members.length-1;a>=0;a--){const r=this.members[a];if(r===n||r===this.lead||r===this.prevLead)continue;const l=r.instance;(!l||l.isConnected===!1)&&!r.snapshot&&(_u(this.members,r),r.unmount())}n.scheduleRender()}remove(n){if(_u(this.members,n),n===this.prevLead&&(this.prevLead=void 0),n===this.lead){const a=this.members[this.members.length-1];a&&this.promote(a)}}relegate(n){var a;for(let r=this.members.indexOf(n)-1;r>=0;r--){const l=this.members[r];if(l.isPresent!==!1&&((a=l.instance)==null?void 0:a.isConnected)!==!1)return this.promote(l),!0}return!1}promote(n,a){var l;const r=this.lead;if(n!==r&&(this.prevLead=r,this.lead=n,n.show(),r)){r.updateSnapshot(),n.scheduleRender();const{layoutDependency:c}=r.options,{layoutDependency:u}=n.options;(c===void 0||c!==u)&&(n.resumeFrom=r,a&&(r.preserveOpacity=!0),r.snapshot&&(n.snapshot=r.snapshot,n.snapshot.latestValues=r.animationValues||r.latestValues),(l=n.root)!=null&&l.isUpdating&&(n.isLayoutDirty=!0)),n.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(n=>{var a,r,l,c,u;(r=(a=n.options).onExitComplete)==null||r.call(a),(u=(l=n.resumingFrom)==null?void 0:(c=l.options).onExitComplete)==null||u.call(c)})}scheduleRender(){this.members.forEach(n=>n.instance&&n.scheduleRender(!1))}removeLeadSnapshot(){var n;(n=this.lead)!=null&&n.snapshot&&(this.lead.snapshot=void 0)}}const xu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gd=["","X","Y","Z"],wA=1e3;let SA=0;function qd(t,n,a,r){const{latestValues:l}=n;l[t]&&(a[t]=l[t],n.setStaticValue(t,0),r&&(r[t]=0))}function Ob(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:n}=t.options;if(!n)return;const a=J1(n);if(window.MotionHasOptimisedAnimation(a,"transform")){const{layout:l,layoutId:c}=t.options;window.MotionCancelOptimisedAnimation(a,"transform",Ht,!(l||c))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Ob(r)}function Rb({attachResizeListener:t,defaultParent:n,measureScroll:a,checkIsScrollRoot:r,resetTransform:l}){return class{constructor(u={},f=n==null?void 0:n()){this.id=SA++,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(_A),this.nodes.forEach(zA),this.nodes.forEach(OA),this.nodes.forEach(MA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new vA)}addEventListener(u,f){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Wh),this.eventHandlers.get(u).add(f)}notifyListeners(u,...f){const h=this.eventHandlers.get(u);h&&h.notify(...f)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=gm(u)&&!SM(u),this.instance=u;const{layoutId:f,layout:h,visualElement:m}=this.options;if(m&&!m.current&&m.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||f)&&(this.isLayoutDirty=!0),t){let g,p=0;const v=()=>this.root.updateBlockedByResize=!1;Ht.read(()=>{p=window.innerWidth}),t(u,()=>{const x=window.innerWidth;x!==p&&(p=x,this.root.updateBlockedByResize=!0,g&&g(),g=xA(v,250),xu.hasAnimatedSinceResize&&(xu.hasAnimatedSinceResize=!1,this.nodes.forEach(Nv)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&m&&(f||h)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:p,hasRelativeLayoutChanged:v,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||m.getDefaultTransition()||kA,{onLayoutAnimationStart:E,onLayoutAnimationComplete:M}=m.getProps(),_=!this.targetLayout||!Nb(this.targetLayout,x),C=!p&&v;if(this.options.layoutRoot||this.resumeFrom||C||p&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...um(b,"layout"),onPlay:E,onComplete:M};(m.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(g,C)}else p||Nv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),li(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(RA),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ob(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const p=this.path[g];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:f,layout:h}=this.options;if(f===void 0&&!h)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(CA),this.nodes.forEach(Av);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Cv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(NA),this.nodes.forEach(DA),this.nodes.forEach(EA),this.nodes.forEach(TA)):this.nodes.forEach(Cv),this.clearAllSnapshots();const f=Ce.now();we.delta=jn(0,1e3/60,f-we.timestamp),we.timestamp=f,we.isProcessing=!0,Rd.update.process(we),Rd.preRender.process(we),Rd.render.process(we),we.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AA),this.sharedNodes.forEach(jA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ne(this.snapshot.measuredBox.x)&&!Ne(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 h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=he()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(f=!1),f&&this.instance){const h=r(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:a(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!l)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!Cb(this.projectionDelta),h=this.getTransformTemplate(),m=h?h(this.latestValues,""):void 0,g=m!==this.prevTransformTemplateValue;u&&this.instance&&(f||Ea(this.latestValues)||g)&&(l(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const f=this.measurePageBox();let h=this.removeElementScroll(f);return u&&(h=this.removeTransform(h)),BA(h),{animationId:this.root.animationId,measuredBox:f,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:u}=this.options;if(!u)return he();const f=u.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(HA))){const{scroll:g}=this.root;g&&(Dn(f.x,g.offset.x),Dn(f.y,g.offset.y))}return f}removeElementScroll(u){var h;const f=he();if(mn(f,u),(h=this.scroll)!=null&&h.wasRoot)return f;for(let m=0;m<this.path.length;m++){const g=this.path[m],{scroll:p,options:v}=g;g!==this.root&&p&&v.layoutScroll&&(p.wasRoot&&mn(f,u),Dn(f.x,p.offset.x),Dn(f.y,p.offset.y))}return f}applyTransform(u,f=!1,h){var g,p;const m=h||he();mn(m,u);for(let v=0;v<this.path.length;v++){const x=this.path[v];!f&&x.options.layoutScroll&&x.scroll&&x!==x.root&&(Dn(m.x,-x.scroll.offset.x),Dn(m.y,-x.scroll.offset.y)),Ea(x.latestValues)&&yu(m,x.latestValues,(g=x.layout)==null?void 0:g.layoutBox)}return Ea(this.latestValues)&&yu(m,this.latestValues,(p=this.layout)==null?void 0:p.layoutBox),m}removeTransform(u){var h;const f=he();mn(f,u);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!Ea(g.latestValues))continue;let p;g.instance&&(Dh(g.latestValues)&&g.updateSnapshot(),p=he(),mn(p,g.measurePageBox())),vv(f,g.latestValues,(h=g.snapshot)==null?void 0:h.layoutBox,p)}return Ea(this.latestValues)&&vv(f,this.latestValues),f}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==we.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var x;const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==f;if(!(u||h&&this.isSharedProjectionDirty||this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:p}=this.options;if(!this.layout||!(g||p))return;this.resolvedRelativeTargetAt=we.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=he(),this.targetWithTransforms=he()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rA(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):mn(this.target,this.layout.layoutBox),gb(this.target,this.targetDelta)):mn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Dh(this.parent.latestValues)||pb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,f,h){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),zu(this.relativeTargetOrigin,f,h,this.options.layoutAnchor||void 0),mn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var b;const u=this.getLead(),f=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(h=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===we.timestamp&&(h=!1),h)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;mn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,v=this.treeScale.y;VM(this.layoutCorrected,this.treeScale,this.path,f),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=he());const{target:x}=u;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(dv(this.prevProjectionDelta.x,this.projectionDelta.x),dv(this.prevProjectionDelta.y,this.projectionDelta.y)),Zr(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==v||!Ev(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ev(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var f;if((f=this.options.visualElement)==null||f.scheduleRender(),u){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Cs(),this.projectionDelta=Cs(),this.projectionDeltaWithTransform=Cs()}setAnimationOrigin(u,f=!1){const h=this.snapshot,m=h?h.latestValues:{},g={...this.latestValues},p=Cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=he(),x=h?h.source:void 0,b=this.layout?this.layout.source:void 0,E=x!==b,M=this.getStack(),_=!M||M.members.length<=1,C=!!(E&&!_&&this.options.crossfade===!0&&!this.path.some(LA));this.animationProgress=0;let S;this.mixTargetDelta=T=>{const R=T/1e3;Dv(p.x,u.x,R),Dv(p.y,u.y,R),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zu(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),VA(this.relativeTarget,this.relativeTargetOrigin,v,R),S&&cA(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=he()),mn(S,this.relativeTarget)),E&&(this.animationValues=g,hA(g,m,this.latestValues,R,C,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var f,h,m;this.notifyListeners("animationStart"),(f=this.currentAnimation)==null||f.stop(),(m=(h=this.resumingFrom)==null?void 0:h.currentAnimation)==null||m.stop(),this.pendingAnimation&&(li(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ht.update(()=>{xu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Oa(0)),this.motionValue.jump(0,!1),this.currentAnimation=gA(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),u.onUpdate&&u.onUpdate(g)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:h,layout:m,latestValues:g}=u;if(!(!f||!h||!m)){if(this!==u&&this.layout&&m&&jb(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||he();const p=Ne(this.layout.layoutBox.x);h.x.min=u.target.x.min,h.x.max=h.x.min+p;const v=Ne(this.layout.layoutBox.y);h.y.min=u.target.y.min,h.y.max=h.y.min+v}mn(f,h),yu(f,g),Zr(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new bA),this.sharedNodes.get(u).add(f);const m=f.options.initialPromotionConfig;f.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var f;const{layoutId:u}=this.options;return u?((f=this.getStack())==null?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:u}=this.options;return u?(f=this.getStack())==null?void 0:f.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(f=!0),!f)return;const m={};h.z&&qd("z",u,m,this.animationValues);for(let g=0;g<Gd.length;g++)qd(`rotate${Gd[g]}`,u,m,this.animationValues),qd(`skew${Gd[g]}`,u,m,this.animationValues);u.render();for(const g in m)u.setStaticValue(g,m[g]),this.animationValues&&(this.animationValues[g]=m[g]);u.scheduleRender()}applyProjectionStyles(u,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=vu(f==null?void 0:f.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=vu(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!Ea(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const g=m.animationValues||m.latestValues;this.applyTransformsToTarget();let p=fA(this.projectionDeltaWithTransform,this.treeScale,g);h&&(p=h(g,p)),u.transform=p;const{x:v,y:x}=this.projectionDelta;u.transformOrigin=`${v.origin*100}% ${x.origin*100}% 0`,m.animationValues?u.opacity=m===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:u.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const b in Oh){if(g[b]===void 0)continue;const{correct:E,applyTo:M,isCSSVariable:_}=Oh[b],C=p==="none"?g[b]:E(g[b],m);if(M){const S=M.length;for(let T=0;T<S;T++)u[M[T]]=C}else _?this.options.visualElement.renderState.vars[b]=C:u[b]=C}this.options.layoutId&&(u.pointerEvents=m===this?vu(f==null?void 0:f.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var f;return(f=u.currentAnimation)==null?void 0:f.stop()}),this.root.nodes.forEach(Av),this.root.sharedNodes.clear()}}}function EA(t){t.updateLayout()}function TA(t){var a;const n=((a=t.resumeFrom)==null?void 0:a.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:l}=t.layout,{animationType:c}=t.options,u=n.source!==t.layout.source;if(c==="size")Nn(p=>{const v=u?n.measuredBox[p]:n.layoutBox[p],x=Ne(v);v.min=r[p].min,v.max=v.min+x});else if(c==="x"||c==="y"){const p=c==="x"?"y":"x";Rh(u?n.measuredBox[p]:n.layoutBox[p],r[p])}else jb(c,n.layoutBox,r)&&Nn(p=>{const v=u?n.measuredBox[p]:n.layoutBox[p],x=Ne(r[p]);v.max=v.min+x,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[p].max=t.relativeTarget[p].min+x)});const f=Cs();Zr(f,r,n.layoutBox);const h=Cs();u?Zr(h,t.applyTransform(l,!0),n.measuredBox):Zr(h,r,n.layoutBox);const m=!Cb(f);let g=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:v,layout:x}=p;if(v&&x){const b=t.options.layoutAnchor||void 0,E=he();zu(E,n.layoutBox,v.layoutBox,b);const M=he();zu(M,r,x.layoutBox,b),Nb(E,M)||(g=!0),p.options.layoutRoot&&(t.relativeTarget=M,t.relativeTargetOrigin=E,t.relativeParent=p)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:h,layoutDelta:f,hasLayoutChanged:m,hasRelativeLayoutChanged:g})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function _A(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function MA(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function AA(t){t.clearSnapshot()}function Av(t){t.clearMeasurements()}function CA(t){t.isLayoutDirty=!0,t.updateLayout()}function Cv(t){t.isLayoutDirty=!1}function NA(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function DA(t){const{visualElement:n}=t.options;n&&n.getProps().onBeforeLayoutMeasure&&n.notify("BeforeLayoutMeasure"),t.resetTransform()}function Nv(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function zA(t){t.resolveTargetDelta()}function OA(t){t.calcProjection()}function RA(t){t.resetSkewAndRotation()}function jA(t){t.removeLeadSnapshot()}function Dv(t,n,a){t.translate=Kt(n.translate,0,a),t.scale=Kt(n.scale,1,a),t.origin=n.origin,t.originPoint=n.originPoint}function zv(t,n,a,r){t.min=Kt(n.min,a.min,r),t.max=Kt(n.max,a.max,r)}function VA(t,n,a,r){zv(t.x,n.x,a.x,r),zv(t.y,n.y,a.y,r)}function LA(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const kA={duration:.45,ease:[.4,0,.1,1]},Ov=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Rv=Ov("applewebkit/")&&!Ov("chrome/")?Math.round:ln;function jv(t){t.min=Rv(t.min),t.max=Rv(t.max)}function BA(t){jv(t.x),jv(t.y)}function jb(t,n,a){return t==="position"||t==="preserve-aspect"&&!sA(Sv(n),Sv(a),.2)}function HA(t){var n;return t!==t.root&&((n=t.scroll)==null?void 0:n.wasRoot)}const UA=Rb({attachResizeListener:(t,n)=>no(t,"resize",n),measureScroll:()=>{var t,n;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((n=document.body)==null?void 0:n.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Xd={current:void 0},Vb=Rb({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xd.current){const t=new UA({});t.mount(window),t.setOptions({layoutScroll:!0}),Xd.current=t}return Xd.current},resetTransform:(t,n)=>{t.style.transform=n!==void 0?n:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),vo=Q.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Vv(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function YA(...t){return n=>{let a=!1;const r=t.map(l=>{const c=Vv(l,n);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let l=0;l<r.length;l++){const c=r[l];typeof c=="function"?c():Vv(t[l],null)}}}}function GA(...t){return Q.useCallback(YA(...t),t)}class qA extends Q.Component{getSnapshotBeforeUpdate(n){const a=this.props.childRef.current;if(hu(a)&&n.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=a.offsetParent,l=hu(r)&&r.offsetWidth||0,c=hu(r)&&r.offsetHeight||0,u=getComputedStyle(a),f=this.props.sizeRef.current;f.height=parseFloat(u.height),f.width=parseFloat(u.width),f.top=a.offsetTop,f.left=a.offsetLeft,f.right=l-f.width-f.left,f.bottom=c-f.height-f.top}return null}componentDidUpdate(){}render(){return this.props.children}}function XA({children:t,isPresent:n,anchorX:a,anchorY:r,root:l,pop:c}){var v;const u=Q.useId(),f=Q.useRef(null),h=Q.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=Q.useContext(vo),g=((v=t.props)==null?void 0:v.ref)??(t==null?void 0:t.ref),p=GA(f,g);return Q.useInsertionEffect(()=>{const{width:x,height:b,top:E,left:M,right:_,bottom:C}=h.current;if(n||c===!1||!f.current||!x||!b)return;const S=a==="left"?`left: ${M}`:`right: ${_}`,T=r==="bottom"?`bottom: ${C}`:`top: ${E}`;f.current.dataset.motionPopId=u;const R=document.createElement("style");m&&(R.nonce=m);const L=l??document.head;return L.appendChild(R),R.sheet&&R.sheet.insertRule(`
          [data-motion-pop-id="${u}"] {
            position: absolute !important;
            width: ${x}px !important;
            height: ${b}px !important;
            ${S}px !important;
            ${T}px !important;
          }
        `),()=>{var U;(U=f.current)==null||U.removeAttribute("data-motion-pop-id"),L.contains(R)&&L.removeChild(R)}},[n]),H.jsx(qA,{isPresent:n,childRef:f,sizeRef:h,pop:c,children:c===!1?t:Q.cloneElement(t,{ref:p})})}const PA=({children:t,initial:n,isPresent:a,onExitComplete:r,custom:l,presenceAffectsLayout:c,mode:u,anchorX:f,anchorY:h,root:m})=>{const g=mo($A),p=Q.useId();let v=!0,x=Q.useMemo(()=>(v=!1,{id:p,initial:n,isPresent:a,custom:l,onExitComplete:b=>{g.set(b,!0);for(const E of g.values())if(!E)return;r&&r()},register:b=>(g.set(b,!1),()=>g.delete(b))}),[a,g,r]);return c&&v&&(x={...x}),Q.useMemo(()=>{g.forEach((b,E)=>g.set(E,!1))},[a]),Q.useEffect(()=>{!a&&!g.size&&r&&r()},[a]),t=H.jsx(XA,{pop:u==="popLayout",isPresent:a,anchorX:f,anchorY:h,root:m,children:t}),H.jsx(Ku.Provider,{value:x,children:t})};function $A(){return new Map}function Lb(t=!0){const n=Q.useContext(Ku);if(n===null)return[!0,null];const{isPresent:a,onExitComplete:r,register:l}=n,c=Q.useId();Q.useEffect(()=>{if(t)return l(c)},[t]);const u=Q.useCallback(()=>t&&r&&r(c),[c,r,t]);return!a&&r?[!1,u]:[!0]}const Jl=t=>t.key||"";function Lv(t){const n=[];return Q.Children.forEach(t,a=>{Q.isValidElement(a)&&n.push(a)}),n}const Ou=({children:t,custom:n,initial:a=!0,onExitComplete:r,presenceAffectsLayout:l=!0,mode:c="sync",propagate:u=!1,anchorX:f="left",anchorY:h="top",root:m})=>{const[g,p]=Lb(u),v=Q.useMemo(()=>Lv(t),[t]),x=u&&!g?[]:v.map(Jl),b=Q.useRef(!0),E=Q.useRef(v),M=mo(()=>new Map),_=Q.useRef(new Set),[C,S]=Q.useState(v),[T,R]=Q.useState(v);Qh(()=>{b.current=!1,E.current=v;for(let P=0;P<T.length;P++){const F=Jl(T[P]);x.includes(F)?(M.delete(F),_.current.delete(F)):M.get(F)!==!0&&M.set(F,!1)}},[T,x.length,x.join("-")]);const L=[];if(v!==C){let P=[...v];for(let F=0;F<T.length;F++){const X=T[F],k=Jl(X);x.includes(k)||(P.splice(F,0,X),L.push(X))}return c==="wait"&&L.length&&(P=L),R(Lv(P)),S(v),null}const{forceRender:U}=Q.useContext(Ih);return H.jsx(H.Fragment,{children:T.map(P=>{const F=Jl(P),X=u&&!g?!1:v===T||x.includes(F),k=()=>{if(_.current.has(F))return;if(M.has(F))_.current.add(F),M.set(F,!0);else return;let Y=!0;M.forEach($=>{$||(Y=!1)}),Y&&(U==null||U(),R(E.current),u&&(p==null||p()),r&&r())};return H.jsx(PA,{isPresent:X,initial:!b.current||a?void 0:!1,custom:n,presenceAffectsLayout:l,mode:c,root:m,onExitComplete:X?void 0:k,anchorX:f,anchorY:h,children:P},F)})})},kb=Q.createContext({strict:!1}),kv={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 Bv=!1;function KA(){if(Bv)return;const t={};for(const n in kv)t[n]={isEnabled:a=>kv[n].some(r=>!!a[r])};db(t),Bv=!0}function Bb(){return KA(),zM()}function ZA(t){const n=Bb();for(const a in t)n[a]={...n[a],...t[a]};db(n)}const IA=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 Ru(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||IA.has(t)}let Hb=t=>!Ru(t);function QA(t){typeof t=="function"&&(Hb=n=>n.startsWith("on")?!Ru(n):t(n))}try{QA(require("@emotion/is-prop-valid").default)}catch{}function FA(t,n,a){const r={};for(const l in t)l==="values"&&typeof t.values=="object"||me(t[l])||(Hb(l)||a===!0&&Ru(l)||!n&&!Ru(l)||t.draggable&&l.startsWith("onDrag"))&&(r[l]=t[l]);return r}const Fu=Q.createContext({});function JA(t,n){if(Qu(t)){const{initial:a,animate:r}=t;return{initial:a===!1||eo(a)?a:void 0,animate:eo(r)?r:void 0}}return t.inherit!==!1?n:{}}function WA(t){const{initial:n,animate:a}=JA(t,Q.useContext(Fu));return Q.useMemo(()=>({initial:n,animate:a}),[Hv(n),Hv(a)])}function Hv(t){return Array.isArray(t)?t.join(" "):t}const wm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ub(t,n,a){for(const r in n)!me(n[r])&&!xb(r,a)&&(t[r]=n[r])}function tC({transformTemplate:t},n){return Q.useMemo(()=>{const a=wm();return xm(a,n,t),Object.assign({},a.vars,a.style)},[n])}function eC(t,n){const a=t.style||{},r={};return Ub(r,a,t),Object.assign(r,tC(t,n)),r}function nC(t,n){const a={},r=eC(t,n);return t.drag&&t.dragListener!==!1&&(a.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(a.tabIndex=0),a.style=r,a}const Yb=()=>({...wm(),attrs:{}});function iC(t,n,a,r){const l=Q.useMemo(()=>{const c=Yb();return bb(c,n,Sb(r),t.transformTemplate,t.style),{...c.attrs,style:{...c.style}}},[n]);if(t.style){const c={};Ub(c,t.style,t),l.style={...c,...l.style}}return l}const aC=["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 Sm(t){return typeof t!="string"||t.includes("-")?!1:!!(aC.indexOf(t)>-1||/[A-Z]/u.test(t))}function sC(t,n,a,{latestValues:r},l,c=!1,u){const h=(u??Sm(t)?iC:nC)(n,r,l,t),m=FA(n,typeof t=="string",c),g=t!==Q.Fragment?{...m,...h,ref:a}:{},{children:p}=n,v=Q.useMemo(()=>me(p)?p.get():p,[p]);return Q.createElement(t,{...g,children:v})}function rC({scrapeMotionValuesFromProps:t,createRenderState:n},a,r,l){return{latestValues:oC(a,r,l,t),renderState:n()}}function oC(t,n,a,r){const l={},c=r(t,{});for(const v in c)l[v]=vu(c[v]);let{initial:u,animate:f}=t;const h=Qu(t),m=cb(t);n&&m&&!h&&t.inherit!==!1&&(u===void 0&&(u=n.initial),f===void 0&&(f=n.animate));let g=a?a.initial===!1:!1;g=g||u===!1;const p=g?f:u;if(p&&typeof p!="boolean"&&!Iu(p)){const v=Array.isArray(p)?p:[p];for(let x=0;x<v.length;x++){const b=fm(t,v[x]);if(b){const{transitionEnd:E,transition:M,..._}=b;for(const C in _){let S=_[C];if(Array.isArray(S)){const T=g?S.length-1:0;S=S[T]}S!==null&&(l[C]=S)}for(const C in E)l[C]=E[C]}}}return l}const Gb=t=>(n,a)=>{const r=Q.useContext(Fu),l=Q.useContext(Ku),c=()=>rC(t,n,r,l);return a?c():mo(c)},lC=Gb({scrapeMotionValuesFromProps:bm,createRenderState:wm}),uC=Gb({scrapeMotionValuesFromProps:Eb,createRenderState:Yb}),cC=Symbol.for("motionComponentSymbol");function fC(t,n,a){const r=Q.useRef(a);Q.useInsertionEffect(()=>{r.current=a});const l=Q.useRef(null);return Q.useCallback(c=>{var f;c&&((f=t.onMount)==null||f.call(t,c));const u=r.current;if(typeof u=="function")if(c){const h=u(c);typeof h=="function"&&(l.current=h)}else l.current?(l.current(),l.current=null):u(c);else u&&(u.current=c);n&&(c?n.mount(c):n.unmount())},[n])}const qb=Q.createContext({});function _s(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function dC(t,n,a,r,l,c){var S,T;const{visualElement:u}=Q.useContext(Fu),f=Q.useContext(kb),h=Q.useContext(Ku),m=Q.useContext(vo),g=m.reducedMotion,p=m.skipAnimations,v=Q.useRef(null),x=Q.useRef(!1);r=r||f.renderer,!v.current&&r&&(v.current=r(t,{visualState:n,parent:u,props:a,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:g,skipAnimations:p,isSVG:c}),x.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,E=Q.useContext(qb);b&&!b.projection&&l&&(b.type==="html"||b.type==="svg")&&hC(v.current,a,l,E);const M=Q.useRef(!1);Q.useInsertionEffect(()=>{b&&M.current&&b.update(a,h)});const _=a[F1],C=Q.useRef(!!_&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,_))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,_)));return Qh(()=>{x.current=!0,b&&(M.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),C.current&&b.animationState&&b.animationState.animateChanges())}),Q.useEffect(()=>{b&&(!C.current&&b.animationState&&b.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var R;(R=window.MotionHandoffMarkAsComplete)==null||R.call(window,_)}),C.current=!1),b.enteringChildren=void 0)}),b}function hC(t,n,a,r){const{layoutId:l,layout:c,drag:u,dragConstraints:f,layoutScroll:h,layoutRoot:m,layoutAnchor:g,layoutCrossfade:p}=n;t.projection=new a(t.latestValues,n["data-framer-portal-id"]?void 0:Xb(t.parent)),t.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||f&&_s(f),visualElement:t,animationType:typeof c=="string"?c:"both",initialPromotionConfig:r,crossfade:p,layoutScroll:h,layoutRoot:m,layoutAnchor:g})}function Xb(t){if(t)return t.options.allowProjection!==!1?t.projection:Xb(t.parent)}function Pd(t,{forwardMotionProps:n=!1,type:a}={},r,l){r&&ZA(r);const c=a?a==="svg":Sm(t),u=c?uC:lC;function f(m,g){let p;const v={...Q.useContext(vo),...m,layoutId:mC(m)},{isStatic:x}=v,b=WA(m),E=u(m,x);if(!x&&typeof window<"u"){pC();const M=gC(v);p=M.MeasureLayout,b.visualElement=dC(t,E,v,l,M.ProjectionNode,c)}return H.jsxs(Fu.Provider,{value:b,children:[p&&b.visualElement?H.jsx(p,{visualElement:b.visualElement,...v}):null,sC(t,m,fC(E,b.visualElement,g),E,x,n,c)]})}f.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const h=Q.forwardRef(f);return h[cC]=t,h}function mC({layoutId:t}){const n=Q.useContext(Ih).id;return n&&t!==void 0?n+"-"+t:t}function pC(t,n){Q.useContext(kb).strict}function gC(t){const n=Bb(),{drag:a,layout:r}=n;if(!a&&!r)return{};const l={...a,...r};return{MeasureLayout:a!=null&&a.isEnabled(t)||r!=null&&r.isEnabled(t)?l.MeasureLayout:void 0,ProjectionNode:l.ProjectionNode}}function yC(t,n){if(typeof Proxy>"u")return Pd;const a=new Map,r=(c,u)=>Pd(c,u,t,n),l=(c,u)=>r(c,u);return new Proxy(l,{get:(c,u)=>u==="create"?r:(a.has(u)||a.set(u,Pd(u,void 0,t,n)),a.get(u))})}const vC=(t,n)=>n.isSVG??Sm(t)?new ZM(n):new GM(n,{allowProjection:t!==Q.Fragment});class xC extends Qi{constructor(n){super(n),n.animationState||(n.animationState=WM(n))}updateAnimationControlsSubscription(){const{animate:n}=this.node.getProps();Iu(n)&&(this.unmountControls=n.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:n}=this.node.getProps(),{animate:a}=this.node.prevProps||{};n!==a&&this.updateAnimationControlsSubscription()}unmount(){var n;this.node.animationState.reset(),(n=this.unmountControls)==null||n.call(this)}}let bC=0;class wC extends Qi{constructor(){super(...arguments),this.id=bC++,this.isExitComplete=!1}update(){var c;if(!this.node.presenceContext)return;const{isPresent:n,onExitComplete:a}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||n===r)return;if(n&&r===!1){if(this.isExitComplete){const{initial:u,custom:f}=this.node.getProps();if(typeof u=="string"){const h=Na(this.node,u,f);if(h){const{transition:m,transitionEnd:g,...p}=h;for(const v in p)(c=this.node.getValue(v))==null||c.jump(p[v])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const l=this.node.animationState.setActive("exit",!n);a&&!n&&l.then(()=>{this.isExitComplete=!0,a(this.id)})}mount(){const{register:n,onExitComplete:a}=this.node.presenceContext||{};a&&a(this.id),n&&(this.unmount=n(this.id))}unmount(){}}const SC={animation:{Feature:xC},exit:{Feature:wC}};function xo(t){return{point:{x:t.pageX,y:t.pageY}}}const EC=t=>n=>pm(n)&&t(n,xo(n));function Ir(t,n,a,r){return no(t,n,EC(a),r)}const Pb=({current:t})=>t?t.ownerDocument.defaultView:null,Uv=(t,n)=>Math.abs(t-n);function TC(t,n){const a=Uv(t.x,n.x),r=Uv(t.y,n.y);return Math.sqrt(a**2+r**2)}const Yv=new Set(["auto","scroll"]);class $b{constructor(n,a,{transformPagePoint:r,contextWindow:l=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Wl(this.lastRawMoveEventInfo,this.transformPagePoint));const x=$d(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,E=TC(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!E)return;const{point:M}=x,{timestamp:_}=we;this.history.push({...M,timestamp:_});const{onStart:C,onMove:S}=this.handlers;b||(C&&C(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,x)},this.handlePointerMove=(x,b)=>{this.lastMoveEvent=x,this.lastRawMoveEventInfo=b,this.lastMoveEventInfo=Wl(b,this.transformPagePoint),Ht.update(this.updatePoint,!0)},this.handlePointerUp=(x,b)=>{this.end();const{onEnd:E,onSessionEnd:M,resumeAnimation:_}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=$d(x.type==="pointercancel"?this.lastMoveEventInfo:Wl(b,this.transformPagePoint),this.history);this.startEvent&&E&&E(x,C),M&&M(x,C)},!pm(n))return;this.dragSnapToOrigin=c,this.handlers=a,this.transformPagePoint=r,this.distanceThreshold=u,this.contextWindow=l||window;const h=xo(n),m=Wl(h,this.transformPagePoint),{point:g}=m,{timestamp:p}=we;this.history=[{...g,timestamp:p}];const{onSessionStart:v}=a;v&&v(n,$d(m,this.history)),this.removeListeners=po(Ir(this.contextWindow,"pointermove",this.handlePointerMove),Ir(this.contextWindow,"pointerup",this.handlePointerUp),Ir(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(n){let a=n.parentElement;for(;a;){const r=getComputedStyle(a);(Yv.has(r.overflowX)||Yv.has(r.overflowY))&&this.scrollPositions.set(a,{x:a.scrollLeft,y:a.scrollTop}),a=a.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(n){const a=this.scrollPositions.get(n);if(!a)return;const r=n===window,l=r?{x:window.scrollX,y:window.scrollY}:{x:n.scrollLeft,y:n.scrollTop},c={x:l.x-a.x,y:l.y-a.y};c.x===0&&c.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(n,l),Ht.update(this.updatePoint,!0))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),li(this.updatePoint)}}function Wl(t,n){return n?{point:n(t.point)}:t}function Gv(t,n){return{x:t.x-n.x,y:t.y-n.y}}function $d({point:t},n){return{point:t,delta:Gv(t,Kb(n)),offset:Gv(t,_C(n)),velocity:MC(n,.1)}}function _C(t){return t[0]}function Kb(t){return t[t.length-1]}function MC(t,n){if(t.length<2)return{x:0,y:0};let a=t.length-1,r=null;const l=Kb(t);for(;a>=0&&(r=t[a],!(l.timestamp-r.timestamp>Ie(n)));)a--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&l.timestamp-r.timestamp>Ie(n)*2&&(r=t[1]);const c=on(l.timestamp-r.timestamp);if(c===0)return{x:0,y:0};const u={x:(l.x-r.x)/c,y:(l.y-r.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function AC(t,{min:n,max:a},r){return n!==void 0&&t<n?t=r?Kt(n,t,r.min):Math.max(t,n):a!==void 0&&t>a&&(t=r?Kt(a,t,r.max):Math.min(t,a)),t}function qv(t,n,a){return{min:n!==void 0?t.min+n:void 0,max:a!==void 0?t.max+a-(t.max-t.min):void 0}}function CC(t,{top:n,left:a,bottom:r,right:l}){return{x:qv(t.x,a,l),y:qv(t.y,n,r)}}function Xv(t,n){let a=n.min-t.min,r=n.max-t.max;return n.max-n.min<t.max-t.min&&([a,r]=[r,a]),{min:a,max:r}}function NC(t,n){return{x:Xv(t.x,n.x),y:Xv(t.y,n.y)}}function DC(t,n){let a=.5;const r=Ne(t),l=Ne(n);return l>r?a=Jr(n.min,n.max-r,t.min):r>l&&(a=Jr(t.min,t.max-l,n.min)),jn(0,1,a)}function zC(t,n){const a={};return n.min!==void 0&&(a.min=n.min-t.min),n.max!==void 0&&(a.max=n.max-t.min),a}const jh=.35;function OC(t=jh){return t===!1?t=0:t===!0&&(t=jh),{x:Pv(t,"left","right"),y:Pv(t,"top","bottom")}}function Pv(t,n,a){return{min:$v(t,n),max:$v(t,a)}}function $v(t,n){return typeof t=="number"?t:t[n]||0}const RC=new WeakMap;class jC{constructor(n){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=he(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=n}start(n,{snapToCursor:a=!1,distanceThreshold:r}={}){const{presenceContext:l}=this.visualElement;if(l&&l.isPresent===!1)return;const c=p=>{a&&this.snapToCursor(xo(p).point),this.stopAnimation()},u=(p,v)=>{const{drag:x,dragPropagation:b,onDragStart:E}=this.getProps();if(x&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sM(x),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nn(_=>{let C=this.getAxisMotionValue(_).get()||0;if(On.test(C)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[_];T&&(C=Ne(T)*(parseFloat(C)/100))}}this.originPoint[_]=C}),E&&Ht.update(()=>E(p,v),!1,!0),_h(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},f=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:b,onDirectionLock:E,onDrag:M}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:_}=v;if(b&&this.currentDirection===null){this.currentDirection=LC(_),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",v.point,_),this.updateAxis("y",v.point,_),this.visualElement.render(),M&&Ht.update(()=>M(p,v),!1,!0)},h=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v,this.stop(p,v),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:g}=this.getProps();this.panSession=new $b(n,{onSessionStart:c,onStart:u,onMove:f,onSessionEnd:h,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:r,contextWindow:Pb(this.visualElement),element:this.visualElement.current})}stop(n,a){const r=n||this.latestPointerEvent,l=a||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!l||!r)return;const{velocity:u}=l;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&Ht.postRender(()=>f(r,l))}cancel(){this.isDragging=!1;const{projection:n,animationState:a}=this.visualElement;n&&(n.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),a&&a.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(n,a,r){const{drag:l}=this.getProps();if(!r||!tu(n,l,this.currentDirection))return;const c=this.getAxisMotionValue(n);let u=this.originPoint[n]+r[n];this.constraints&&this.constraints[n]&&(u=AC(u,this.constraints[n],this.elastic[n])),c.set(u)}resolveConstraints(){var c;const{dragConstraints:n,dragElastic:a}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(c=this.visualElement.projection)==null?void 0:c.layout,l=this.constraints;n&&_s(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=CC(r.layoutBox,n):this.constraints=!1,this.elastic=OC(a),l!==this.constraints&&!_s(n)&&r&&this.constraints&&!this.hasMutatedConstraints&&Nn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=zC(r.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:n,onMeasureDragConstraints:a}=this.getProps();if(!n||!_s(n))return!1;const r=n.current,{projection:l}=this.visualElement;if(!l||!l.layout)return!1;const c=LM(r,l.root,this.visualElement.getTransformPagePoint());let u=NC(l.layout.layoutBox,c);if(a){const f=a(RM(u));this.hasMutatedConstraints=!!f,f&&(u=mb(f))}return u}startAnimation(n){const{drag:a,dragMomentum:r,dragElastic:l,dragTransition:c,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),h=this.constraints||{},m=Nn(g=>{if(!tu(g,a,this.currentDirection))return;let p=h&&h[g]||{};(u===!0||u===g)&&(p={min:0,max:0});const v=l?200:1e6,x=l?40:1e7,b={type:"inertia",velocity:r?n[g]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...c,...p};return this.startAxisValueAnimation(g,b)});return Promise.all(m).then(f)}startAxisValueAnimation(n,a){const r=this.getAxisMotionValue(n);return _h(this.visualElement,n),r.start(cm(n,r,0,a,this.visualElement,!1))}stopAnimation(){Nn(n=>this.getAxisMotionValue(n).stop())}getAxisMotionValue(n){const a=`_drag${n.toUpperCase()}`,r=this.visualElement.getProps(),l=r[a];return l||this.visualElement.getValue(n,(r.initial?r.initial[n]:void 0)||0)}snapToCursor(n){Nn(a=>{const{drag:r}=this.getProps();if(!tu(a,r,this.currentDirection))return;const{projection:l}=this.visualElement,c=this.getAxisMotionValue(a);if(l&&l.layout){const{min:u,max:f}=l.layout.layoutBox[a],h=c.get()||0;c.set(n[a]-Kt(u,f,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:n,dragConstraints:a}=this.getProps(),{projection:r}=this.visualElement;if(!_s(a)||!r||!this.constraints)return;this.stopAnimation();const l={x:0,y:0};Nn(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const h=f.get();l[u]=DC({min:h,max:h},this.constraints[u])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Nn(u=>{if(!tu(u,n,null))return;const f=this.getAxisMotionValue(u),{min:h,max:m}=this.constraints[u];f.set(Kt(h,m,l[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;RC.set(this.visualElement,this);const n=this.visualElement.current,a=Ir(n,"pointerdown",m=>{const{drag:g,dragListener:p=!0}=this.getProps(),v=m.target,x=v!==n&&fM(v);g&&p&&!x&&this.start(m)});let r;const l=()=>{const{dragConstraints:m}=this.getProps();_s(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),r||(r=VC(n,m.current,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,u=c.addEventListener("measure",l);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Ht.read(l);const f=no(window,"resize",()=>this.scalePositionWithinConstraints()),h=c.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Nn(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=m[p].translate,v.set(v.get()+m[p].translate))}),this.visualElement.render())}));return()=>{f(),a(),u(),h&&h(),r&&r()}}getProps(){const n=this.visualElement.getProps(),{drag:a=!1,dragDirectionLock:r=!1,dragPropagation:l=!1,dragConstraints:c=!1,dragElastic:u=jh,dragMomentum:f=!0}=n;return{...n,drag:a,dragDirectionLock:r,dragPropagation:l,dragConstraints:c,dragElastic:u,dragMomentum:f}}}function Kv(t){let n=!0;return()=>{if(n){n=!1;return}t()}}function VC(t,n,a){const r=Wy(t,Kv(a)),l=Wy(n,Kv(a));return()=>{r(),l()}}function tu(t,n,a){return(n===!0||n===t)&&(a===null||a===t)}function LC(t,n=10){let a=null;return Math.abs(t.y)>n?a="y":Math.abs(t.x)>n&&(a="x"),a}class kC extends Qi{constructor(n){super(n),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new jC(n)}mount(){const{dragControls:n}=this.node.getProps();n&&(this.removeGroupControls=n.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}update(){const{dragControls:n}=this.node.getProps(),{dragControls:a}=this.node.prevProps||{};n!==a&&(this.removeGroupControls(),n&&(this.removeGroupControls=n.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Kd=t=>(n,a)=>{t&&Ht.update(()=>t(n,a),!1,!0)};class BC extends Qi{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(n){this.session=new $b(n,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pb(this.node)})}createPanHandlers(){const{onPanSessionStart:n,onPanStart:a,onPan:r,onPanEnd:l}=this.node.getProps();return{onSessionStart:Kd(n),onStart:Kd(a),onMove:Kd(r),onEnd:(c,u)=>{delete this.session,l&&Ht.postRender(()=>l(c,u))}}}mount(){this.removePointerDownListener=Ir(this.node.current,"pointerdown",n=>this.onPointerDown(n))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Zd=!1;class HC extends Q.Component{componentDidMount(){const{visualElement:n,layoutGroup:a,switchLayoutGroup:r,layoutId:l}=this.props,{projection:c}=n;c&&(a.group&&a.group.add(c),r&&r.register&&l&&r.register(c),Zd&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),xu.hasEverUpdated=!0}getSnapshotBeforeUpdate(n){const{layoutDependency:a,visualElement:r,drag:l,isPresent:c}=this.props,{projection:u}=r;return u&&(u.isPresent=c,n.layoutDependency!==a&&u.setOptions({...u.options,layoutDependency:a}),Zd=!0,l||n.layoutDependency!==a||a===void 0||n.isPresent!==c?u.willUpdate():this.safeToRemove(),n.isPresent!==c&&(c?u.promote():u.relegate()||Ht.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:n,layoutAnchor:a}=this.props,{projection:r}=n;r&&(r.options.layoutAnchor=a,r.root.didUpdate(),mm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:n,layoutGroup:a,switchLayoutGroup:r}=this.props,{projection:l}=n;Zd=!0,l&&(l.scheduleCheckAfterUnmount(),a&&a.group&&a.group.remove(l),r&&r.deregister&&r.deregister(l))}safeToRemove(){const{safeToRemove:n}=this.props;n&&n()}render(){return null}}function Zb(t){const[n,a]=Lb(),r=Q.useContext(Ih);return H.jsx(HC,{...t,layoutGroup:r,switchLayoutGroup:Q.useContext(qb),isPresent:n,safeToRemove:a})}const UC={pan:{Feature:BC},drag:{Feature:kC,ProjectionNode:Vb,MeasureLayout:Zb}};function Zv(t,n,a){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",a==="Start");const l="onHover"+a,c=r[l];c&&Ht.postRender(()=>c(n,xo(n)))}class YC extends Qi{mount(){const{current:n}=this.node;n&&(this.unmount=oM(n,(a,r)=>(Zv(this.node,r,"Start"),l=>Zv(this.node,l,"End"))))}unmount(){}}class GC extends Qi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let n=!1;try{n=this.node.current.matches(":focus-visible")}catch{n=!0}!n||!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=po(no(this.node.current,"focus",()=>this.onFocus()),no(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Iv(t,n,a){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",a==="Start");const l="onTap"+(a==="End"?"":a),c=r[l];c&&Ht.postRender(()=>c(n,xo(n)))}class qC extends Qi{mount(){const{current:n}=this.node;if(!n)return;const{globalTapTarget:a,propagate:r}=this.node.props;this.unmount=hM(n,(l,c)=>(Iv(this.node,c,"Start"),(u,{success:f})=>Iv(this.node,u,f?"End":"Cancel")),{useGlobalTarget:a,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Vh=new WeakMap,Id=new WeakMap,XC=t=>{const n=Vh.get(t.target);n&&n(t)},PC=t=>{t.forEach(XC)};function $C({root:t,...n}){const a=t||document;Id.has(a)||Id.set(a,{});const r=Id.get(a),l=JSON.stringify(n);return r[l]||(r[l]=new IntersectionObserver(PC,{root:t,...n})),r[l]}function KC(t,n,a){const r=$C(n);return Vh.set(t,a),r.observe(t),()=>{Vh.delete(t),r.unobserve(t)}}const ZC={some:0,all:1};class IC extends Qi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var h;(h=this.stopObserver)==null||h.call(this);const{viewport:n={}}=this.node.getProps(),{root:a,margin:r,amount:l="some",once:c}=n,u={root:a?a.current:void 0,rootMargin:r,threshold:typeof l=="number"?l:ZC[l]},f=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,c&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:p,onViewportLeave:v}=this.node.getProps(),x=g?p:v;x&&x(m)};this.stopObserver=KC(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:n,prevProps:a}=this.node;["amount","margin","root"].some(QC(n,a))&&this.startObserver()}unmount(){var n;(n=this.stopObserver)==null||n.call(this),this.hasEnteredView=!1,this.isInView=!1}}function QC({viewport:t={}},{viewport:n={}}={}){return a=>t[a]!==n[a]}const FC={inView:{Feature:IC},tap:{Feature:qC},focus:{Feature:GC},hover:{Feature:YC}},JC={layout:{ProjectionNode:Vb,MeasureLayout:Zb}},WC={...SC,...FC,...UC,...JC},Se=yC(WC,vC);function tN(t,n,a){Q.useInsertionEffect(()=>t.on(n,a),[t,n,a])}function Ib(t){const n=mo(()=>Oa(t)),{isStatic:a}=Q.useContext(vo);if(a){const[,r]=Q.useState(t);Q.useEffect(()=>n.on("change",r),[])}return n}function Qb(t,n){const a=Ib(n()),r=()=>a.set(n());return r(),Qh(()=>{const l=()=>Ht.preRender(r,!1,!0),c=t.map(u=>u.on("change",l));return()=>{c.forEach(u=>u()),li(r)}}),a}function eN(t){Kr.current=[],t();const n=Qb(Kr.current,t);return Kr.current=void 0,n}function nN(t,n,a,r){if(typeof t=="function")return eN(t);const c=EM(n,a,r),u=Array.isArray(t)?Qv(t,c):Qv([t],([h])=>c(h)),f=Array.isArray(t)?void 0:t.accelerate;return f&&!f.isTransformed&&typeof n!="function"&&Array.isArray(a)&&(r==null?void 0:r.clamp)!==!1&&(u.accelerate={...f,times:n,keyframes:a,isTransformed:!0}),u}function Qv(t,n){const a=mo(()=>[]);return Qb(t,()=>{a.length=0;const r=t.length;for(let l=0;l<r;l++)a[l]=t[l].get();return n(a)})}function iN(t,n={}){const{isStatic:a}=Q.useContext(vo),r=()=>me(t)?t.get():t;if(a)return nN(r);const l=Ib(r());return Q.useInsertionEffect(()=>TM(l,t,n),[l,JSON.stringify(n)]),l}function aN(t,n={}){return iN(t,{type:"spring",...n})}/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fb=(...t)=>t.filter((n,a,r)=>!!n&&r.indexOf(n)===a).join(" ");/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var rN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oN=Q.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:l="",children:c,iconNode:u,...f},h)=>Q.createElement("svg",{ref:h,...rN,width:n,height:n,stroke:t,strokeWidth:r?Number(a)*24/Number(n):a,className:Fb("lucide",l),...f},[...u.map(([m,g])=>Q.createElement(m,g)),...Array.isArray(c)?c:[c]]));/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fe=(t,n)=>{const a=Q.forwardRef(({className:r,...l},c)=>Q.createElement(oN,{ref:c,iconNode:n,className:Fb(`lucide-${sN(t)}`,r),...l}));return a.displayName=`${t}`,a};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lN=Fe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uN=Fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cN=Fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fN=Fe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dN=Fe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hN=Fe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jb=Fe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mN=Fe("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pN=Fe("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wb=Fe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tw=Fe("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"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gN=Fe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yN=Fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Fv(t){if(!t||typeof t!="object")return!1;const n=t;return typeof n.id=="string"&&typeof n.timestamp=="string"&&typeof n.protocol=="string"&&typeof n.server=="string"}function vN(t,n){const{onGuardianUpdate:a,onConfigReload:r}=n??{},[l,c]=Q.useState([]),[u,f]=Q.useState(!1),h=Q.useRef(null),m=Q.useRef(1e3),g=Q.useCallback(()=>{try{const v=new WebSocket(t);h.current=v,v.onopen=()=>{f(!0),m.current=1e3,(async()=>{try{const x=await fetch(`${window.location.origin}/api/events?limit=500`);if(!x.ok)return;const b=await x.json();if(!Array.isArray(b))return;const E=b.filter(Fv);c(M=>{const _=new Map;for(const C of E)_.set(C.id,C);for(const C of M)_.set(C.id,C);return Array.from(_.values()).sort((C,S)=>new Date(S.timestamp).getTime()-new Date(C.timestamp).getTime())})}catch{}})()},v.onmessage=x=>{try{const b=JSON.parse(x.data);if(b&&typeof b=="object"&&"type"in b){const E=b;if(E.type==="guardian_update"){const M=E.mode==="block"?"block":"monitor";a==null||a(M);return}if(E.type==="config_reload"){r==null||r(E.config);return}}Fv(b)&&c(E=>[b,...E.filter(_=>_.id!==b.id)].slice(0,1e3))}catch{}},v.onclose=()=>{f(!1);const x=m.current;m.current=Math.min(x*2,3e4),setTimeout(g,x)},v.onerror=()=>v.close()}catch{}},[t,a,r]);Q.useEffect(()=>(g(),()=>{var v;return(v=h.current)==null?void 0:v.close()}),[g]);const p=Q.useCallback((v,x)=>{var b;((b=h.current)==null?void 0:b.readyState)===WebSocket.OPEN&&h.current.send(JSON.stringify({command:v,...x}))},[]);return{events:l,connected:u,sendCommand:p}}function xN({value:t}){const n=aN(t,{stiffness:120,damping:22,mass:.4}),[a,r]=Q.useState(t);return Q.useEffect(()=>{n.set(t)},[t,n]),tN(n,"change",l=>{r(Math.round(l))}),H.jsx("span",{className:"tabular-nums",children:a})}function bN({connected:t,serverCount:n,eventCount:a,threatCount:r,guardianMode:l,onToggleGuardian:c}){const u=l==="block";return H.jsxs(Se.header,{className:"glass-strong flex shrink-0 items-center gap-6 border-b border-white/[0.08] px-5 py-3.5",initial:{opacity:0,y:-12},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:260,damping:28},children:[H.jsxs("div",{className:"flex items-center gap-3",children:[H.jsx(Se.div,{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-violet-600/40 to-fuchsia-600/25 ring-1 ring-white/15",whileHover:{scale:1.05},transition:{type:"spring",stiffness:400,damping:20},children:H.jsx(tw,{className:"h-5 w-5 text-violet-100",strokeWidth:1.75})}),H.jsxs("div",{children:[H.jsx("h1",{className:"bg-gradient-to-r from-zinc-100 to-zinc-400 bg-clip-text text-lg font-bold tracking-tight text-transparent",children:"Crossfire"}),H.jsx("p",{className:"text-[10px] font-medium uppercase tracking-[0.2em] text-zinc-500",children:"MCP security"})]})]}),H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsxs("span",{className:"relative flex h-2.5 w-2.5",children:[t?H.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400/60 opacity-60"}):null,H.jsx("span",{className:`relative inline-flex h-2.5 w-2.5 rounded-full ring-2 ring-zinc-950 ${t?"bg-emerald-400":"bg-red-500"}`})]}),H.jsx("span",{className:"text-xs font-medium text-zinc-400",children:t?"Live":"Offline"})]}),H.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:gap-3",children:[H.jsx(Qd,{label:"Servers",value:n,accent:"from-sky-500/20 to-sky-500/5"}),H.jsx(Qd,{label:"Events",value:a,accent:"from-violet-500/20 to-violet-500/5"}),H.jsx(Qd,{label:"Threats",value:r,accent:r>0?"from-red-500/30 to-red-600/10 ring-red-500/25":"from-emerald-500/15 to-emerald-600/5",emphasize:r>0})]}),H.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[H.jsx("span",{className:"hidden text-xs text-zinc-500 sm:inline",children:"Guardian"}),H.jsxs("button",{type:"button",onClick:c,className:`group relative h-9 overflow-hidden rounded-full px-1 transition-shadow focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-500/60 ${u?"shadow-[0_0_24px_-4px_rgba(239,68,68,0.5)]":"shadow-[0_0_20px_-4px_rgba(56,189,248,0.35)]"}`,"aria-pressed":u,"aria-label":u?"Switch to monitor mode":"Switch to block mode",children:[H.jsx(Se.div,{className:`absolute inset-0 rounded-full ${u?"bg-gradient-to-r from-red-600/90 to-rose-700/90":"bg-gradient-to-r from-sky-600/90 to-indigo-600/90"}`,layout:!0,transition:{type:"spring",stiffness:400,damping:32}}),H.jsxs("span",{className:"relative z-10 flex h-full items-center gap-2 px-4",children:[H.jsx(Se.span,{className:"text-[10px] font-bold uppercase tracking-wider text-white drop-shadow-sm",initial:{opacity:0,y:4},animate:{opacity:1,y:0},children:u?"Block":"Monitor"},l),H.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full bg-white/95 text-[10px] font-bold shadow ${u?"text-red-600":"text-sky-600"}`,children:u?"■":"◉"})]})]})]})]})}function Qd({label:t,value:n,accent:a,emphasize:r}){return H.jsxs("div",{className:`rounded-xl bg-gradient-to-br px-3 py-2 ring-1 ring-white/10 ${a} ${r?"ring-red-500/30":""}`,children:[H.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-zinc-500",children:t}),H.jsx("div",{className:`font-mono-ui text-lg font-bold leading-none tabular-nums ${r?"text-red-300":"text-zinc-100"}`,children:H.jsx(xN,{value:n})})]})}const Jv={critical:"border-l-red-500 shadow-[inset_4px_0_0_0_rgba(239,68,68,0.85)]",high:"border-l-amber-500 shadow-[inset_4px_0_0_0_rgba(245,158,11,0.85)]",medium:"border-l-yellow-400 shadow-[inset_4px_0_0_0_rgba(250,204,21,0.75)]",low:"border-l-sky-500 shadow-[inset_4px_0_0_0_rgba(56,189,248,0.75)]",clean:"border-l-zinc-600"},wN={ide:"bg-sky-500/15 text-sky-300 ring-sky-500/25",sdk:"bg-violet-500/15 text-violet-300 ring-violet-500/25","http-proxy":"bg-amber-500/15 text-amber-300 ring-amber-500/25",scan:"bg-cyan-500/15 text-cyan-300 ring-cyan-500/25"},SN={ide:"IDE",sdk:"SDK","http-proxy":"HTTP",scan:"SCAN"};function EN({events:t,onSelectEvent:n,selectedId:a,sourceFilter:r,serverFilter:l,onSourceFilter:c,onServerFilter:u,onClearFilters:f,onCollapsePanel:h,scrollContainerRef:m}){const[g,p]=Q.useState(!0),v=Q.useMemo(()=>{let b=t;return r&&(b=b.filter(E=>(E.source??"ide")===r)),l&&(b=b.filter(E=>E.server===l)),b},[t,r,l]);Q.useEffect(()=>{const b=m==null?void 0:m.current;if(!b)return;const E=()=>{p(b.scrollTop<12)};return b.addEventListener("scroll",E,{passive:!0}),()=>b.removeEventListener("scroll",E)},[m]),Q.useEffect(()=>{g&&(m!=null&&m.current)&&(m.current.scrollTop=0)},[v,g,m]);const x=!!(r||l);return H.jsxs("div",{className:"flex shrink-0 flex-col",children:[H.jsxs("div",{className:"glass sticky top-0 z-10 border-b border-white/[0.06] px-3 py-2.5 backdrop-blur-md",children:[H.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[H.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-zinc-500",children:"Traffic log"}),H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsxs("span",{className:"font-mono-ui text-[10px] tabular-nums text-zinc-500",children:[v.length,x?` / ${t.length}`:""," events"]}),h?H.jsx("button",{type:"button",onClick:h,className:"nodrag nopan rounded-lg border border-white/10 bg-white/5 p-1 text-zinc-400 transition hover:bg-white/10 hover:text-zinc-100",title:"Hide panel","aria-label":"Collapse traffic log panel",children:H.jsx(cN,{className:"h-3.5 w-3.5"})}):null]})]}),l?H.jsxs("div",{className:"mb-2 flex items-center gap-1.5 rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-2 py-1.5 text-[10px] text-emerald-200",children:[H.jsx(Wb,{className:"h-3 w-3 shrink-0 text-emerald-400","aria-hidden":!0}),H.jsx("span",{className:"font-medium text-emerald-100/90",children:"MCP server"}),H.jsx("span",{className:"min-w-0 flex-1 truncate font-mono-ui text-emerald-50",title:l,children:l})]}):null,H.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[H.jsx(fN,{className:"h-3 w-3 shrink-0 text-zinc-600","aria-hidden":!0}),H.jsxs("select",{className:"nodrag nopan max-w-[140px] cursor-pointer rounded-lg border border-white/10 bg-zinc-900/80 px-2 py-1 text-[10px] text-zinc-300 outline-none focus:ring-1 focus:ring-violet-500/50",value:r??"",onChange:b=>c==null?void 0:c(b.target.value||null),"aria-label":"Filter by source",children:[H.jsx("option",{value:"",children:"All sources"}),H.jsx("option",{value:"ide",children:"IDE"}),H.jsx("option",{value:"sdk",children:"SDK"}),H.jsx("option",{value:"http-proxy",children:"HTTP"}),H.jsx("option",{value:"scan",children:"Scan"})]}),H.jsx("input",{className:"nodrag nopan min-w-0 flex-1 rounded-lg border border-white/10 bg-zinc-900/80 px-2 py-1 font-mono-ui text-[10px] text-zinc-300 outline-none placeholder:text-zinc-600 focus:ring-1 focus:ring-violet-500/50",placeholder:"Server name…",value:l??"",onChange:b=>u==null?void 0:u(b.target.value||null),"aria-label":"Filter by server"}),x?H.jsxs("button",{type:"button",onClick:()=>f==null?void 0:f(),className:"nodrag nopan flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-zinc-400 transition hover:bg-white/10 hover:text-zinc-200",children:[H.jsx(yN,{className:"h-3 w-3"}),"Clear"]}):null]})]}),H.jsxs("div",{className:"space-y-1.5 p-2 pb-4",children:[H.jsx(Ou,{initial:!1,mode:"sync",children:v.map(b=>H.jsx(Se.div,{layout:!0,role:"button",tabIndex:0,initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,height:0,marginBottom:0},transition:{type:"spring",stiffness:440,damping:34},onClick:()=>n(b),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),n(b))},className:`group cursor-pointer rounded-xl border border-white/[0.06] bg-gradient-to-br from-white/[0.05] to-transparent pl-1 transition hover:border-white/15 hover:shadow-lg hover:shadow-black/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-violet-500/60 ${Jv[b.severity]??Jv.clean} ${a===b.id?"ring-1 ring-violet-400/50 ring-offset-2 ring-offset-zinc-950":""}`,children:H.jsxs("div",{className:"rounded-r-xl px-2.5 py-2",children:[H.jsxs("div",{className:"flex items-center justify-between gap-2",children:[H.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[H.jsx("span",{className:"shrink-0 font-mono-ui text-[10px] text-zinc-500",children:new Date(b.timestamp).toLocaleTimeString()}),H.jsx("span",{className:`shrink-0 rounded-md px-1.5 py-0.5 font-mono-ui text-[9px] font-semibold uppercase ring-1 ${b.protocol==="mcp"?"bg-violet-500/15 text-violet-300 ring-violet-500/25":"bg-cyan-500/15 text-cyan-300 ring-cyan-500/25"}`,children:b.protocol}),b.source?H.jsx("span",{className:`shrink-0 rounded-md px-1.5 py-0.5 font-mono-ui text-[9px] font-semibold uppercase ring-1 ${wN[b.source]??"bg-zinc-500/15 text-zinc-400 ring-zinc-500/20"}`,children:SN[b.source]??b.source}):null,b.blocked?H.jsx("span",{className:"shrink-0 rounded-md bg-red-500/20 px-1.5 py-0.5 font-mono-ui text-[9px] font-bold uppercase text-red-300 ring-1 ring-red-500/30",children:"Blocked"}):null,H.jsx("span",{className:"truncate text-xs font-medium text-zinc-200",children:b.method||"(response)"})]}),H.jsx("span",{className:"shrink-0 font-mono-ui text-[10px] text-zinc-500",children:b.server})]}),b.threats.length>0?H.jsx("p",{className:"mt-1 line-clamp-2 font-mono-ui text-[10px] leading-snug text-red-300/80",children:b.threats[0].detail}):null]})},b.id))}),v.length===0?H.jsx("div",{className:"py-12 text-center text-xs text-zinc-500",children:t.length===0?"Waiting for MCP traffic…":"No events match filters."}):null]})]})}const TN={ide:"IDE",sdk:"SDK","http-proxy":"HTTP",scan:"SCAN"};function _N({event:t}){const[n,a]=Q.useState(0);return H.jsx(Se.div,{className:"glass-strong shrink-0 border-t border-red-500/25",initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{type:"spring",stiffness:360,damping:32},children:H.jsxs("div",{className:"p-3",children:[H.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[H.jsx("h3",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-red-400",children:"Threat detail"}),t.source?H.jsxs("span",{className:"rounded-full bg-white/5 px-2 py-0.5 font-mono-ui text-[9px] text-zinc-400 ring-1 ring-white/10",children:["via ",TN[t.source]??t.source]}):null]}),H.jsx("div",{className:"space-y-2",children:t.threats.map((r,l)=>{const c=!!r.gemini_analysis,u=n===l;return H.jsxs(Se.div,{layout:!0,className:"rounded-xl border border-red-500/20 bg-gradient-to-br from-red-950/40 to-zinc-950/60 p-2.5",children:[H.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[H.jsx("span",{className:"rounded-md bg-red-500/20 px-1.5 py-0.5 font-mono-ui text-[9px] font-bold text-red-300",children:r.pattern}),H.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-wide text-zinc-500",children:r.severity})]}),H.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-zinc-200",children:r.detail}),c?H.jsxs("div",{className:"mt-2",children:[H.jsxs("button",{type:"button",onClick:()=>a(u?null:l),"aria-expanded":u,"aria-controls":`gemini-detail-${l}`,className:"flex w-full items-center justify-between gap-2 rounded-lg border border-violet-500/20 bg-violet-500/10 px-2 py-1.5 text-left text-[10px] font-semibold text-violet-200 transition hover:bg-violet-500/15",children:[H.jsxs("span",{className:"flex items-center gap-1.5",children:[H.jsx(gN,{className:"h-3 w-3 shrink-0"}),"Gemini analysis",r.gemini_analysis?H.jsxs("span",{className:"font-mono-ui text-zinc-400",children:["(",Math.round((r.gemini_analysis.confidence??0)*100),"%)"]}):null]}),H.jsx(uN,{className:`h-3.5 w-3.5 shrink-0 transition ${u?"rotate-180":""}`})]}),H.jsx(Ou,{children:u&&r.gemini_analysis?H.jsx(Se.div,{id:`gemini-detail-${l}`,initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:H.jsx("p",{className:"mt-2 rounded-lg border border-white/5 bg-black/30 p-2 text-[10px] leading-relaxed text-zinc-400",children:r.gemini_analysis.explanation})}):null})]}):null]},l)})})]})})}function ce(t){if(typeof t=="string"||typeof t=="number")return""+t;let n="";if(Array.isArray(t))for(let a=0,r;a<t.length;a++)(r=ce(t[a]))!==""&&(n+=(n&&" ")+r);else for(let a in t)t[a]&&(n+=(n&&" ")+a);return n}var MN={value:()=>{}};function Ju(){for(var t=0,n=arguments.length,a={},r;t<n;++t){if(!(r=arguments[t]+"")||r in a||/[\s.]/.test(r))throw new Error("illegal type: "+r);a[r]=[]}return new bu(a)}function bu(t){this._=t}function AN(t,n){return t.trim().split(/^|\s+/).map(function(a){var r="",l=a.indexOf(".");if(l>=0&&(r=a.slice(l+1),a=a.slice(0,l)),a&&!n.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:r}})}bu.prototype=Ju.prototype={constructor:bu,on:function(t,n){var a=this._,r=AN(t+"",a),l,c=-1,u=r.length;if(arguments.length<2){for(;++c<u;)if((l=(t=r[c]).type)&&(l=CN(a[l],t.name)))return l;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++c<u;)if(l=(t=r[c]).type)a[l]=Wv(a[l],t.name,n);else if(n==null)for(l in a)a[l]=Wv(a[l],t.name,null);return this},copy:function(){var t={},n=this._;for(var a in n)t[a]=n[a].slice();return new bu(t)},call:function(t,n){if((l=arguments.length-2)>0)for(var a=new Array(l),r=0,l,c;r<l;++r)a[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],r=0,l=c.length;r<l;++r)c[r].value.apply(n,a)},apply:function(t,n,a){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],l=0,c=r.length;l<c;++l)r[l].value.apply(n,a)}};function CN(t,n){for(var a=0,r=t.length,l;a<r;++a)if((l=t[a]).name===n)return l.value}function Wv(t,n,a){for(var r=0,l=t.length;r<l;++r)if(t[r].name===n){t[r]=MN,t=t.slice(0,r).concat(t.slice(r+1));break}return a!=null&&t.push({name:n,value:a}),t}var Lh="http://www.w3.org/1999/xhtml";const tx={svg:"http://www.w3.org/2000/svg",xhtml:Lh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wu(t){var n=t+="",a=n.indexOf(":");return a>=0&&(n=t.slice(0,a))!=="xmlns"&&(t=t.slice(a+1)),tx.hasOwnProperty(n)?{space:tx[n],local:t}:t}function NN(t){return function(){var n=this.ownerDocument,a=this.namespaceURI;return a===Lh&&n.documentElement.namespaceURI===Lh?n.createElement(t):n.createElementNS(a,t)}}function DN(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ew(t){var n=Wu(t);return(n.local?DN:NN)(n)}function zN(){}function Em(t){return t==null?zN:function(){return this.querySelector(t)}}function ON(t){typeof t!="function"&&(t=Em(t));for(var n=this._groups,a=n.length,r=new Array(a),l=0;l<a;++l)for(var c=n[l],u=c.length,f=r[l]=new Array(u),h,m,g=0;g<u;++g)(h=c[g])&&(m=t.call(h,h.__data__,g,c))&&("__data__"in h&&(m.__data__=h.__data__),f[g]=m);return new Qe(r,this._parents)}function RN(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function jN(){return[]}function nw(t){return t==null?jN:function(){return this.querySelectorAll(t)}}function VN(t){return function(){return RN(t.apply(this,arguments))}}function LN(t){typeof t=="function"?t=VN(t):t=nw(t);for(var n=this._groups,a=n.length,r=[],l=[],c=0;c<a;++c)for(var u=n[c],f=u.length,h,m=0;m<f;++m)(h=u[m])&&(r.push(t.call(h,h.__data__,m,u)),l.push(h));return new Qe(r,l)}function iw(t){return function(){return this.matches(t)}}function aw(t){return function(n){return n.matches(t)}}var kN=Array.prototype.find;function BN(t){return function(){return kN.call(this.children,t)}}function HN(){return this.firstElementChild}function UN(t){return this.select(t==null?HN:BN(typeof t=="function"?t:aw(t)))}var YN=Array.prototype.filter;function GN(){return Array.from(this.children)}function qN(t){return function(){return YN.call(this.children,t)}}function XN(t){return this.selectAll(t==null?GN:qN(typeof t=="function"?t:aw(t)))}function PN(t){typeof t!="function"&&(t=iw(t));for(var n=this._groups,a=n.length,r=new Array(a),l=0;l<a;++l)for(var c=n[l],u=c.length,f=r[l]=[],h,m=0;m<u;++m)(h=c[m])&&t.call(h,h.__data__,m,c)&&f.push(h);return new Qe(r,this._parents)}function sw(t){return new Array(t.length)}function $N(){return new Qe(this._enter||this._groups.map(sw),this._parents)}function ju(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}ju.prototype={constructor:ju,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function KN(t){return function(){return t}}function ZN(t,n,a,r,l,c){for(var u=0,f,h=n.length,m=c.length;u<m;++u)(f=n[u])?(f.__data__=c[u],r[u]=f):a[u]=new ju(t,c[u]);for(;u<h;++u)(f=n[u])&&(l[u]=f)}function IN(t,n,a,r,l,c,u){var f,h,m=new Map,g=n.length,p=c.length,v=new Array(g),x;for(f=0;f<g;++f)(h=n[f])&&(v[f]=x=u.call(h,h.__data__,f,n)+"",m.has(x)?l[f]=h:m.set(x,h));for(f=0;f<p;++f)x=u.call(t,c[f],f,c)+"",(h=m.get(x))?(r[f]=h,h.__data__=c[f],m.delete(x)):a[f]=new ju(t,c[f]);for(f=0;f<g;++f)(h=n[f])&&m.get(v[f])===h&&(l[f]=h)}function QN(t){return t.__data__}function FN(t,n){if(!arguments.length)return Array.from(this,QN);var a=n?IN:ZN,r=this._parents,l=this._groups;typeof t!="function"&&(t=KN(t));for(var c=l.length,u=new Array(c),f=new Array(c),h=new Array(c),m=0;m<c;++m){var g=r[m],p=l[m],v=p.length,x=JN(t.call(g,g&&g.__data__,m,r)),b=x.length,E=f[m]=new Array(b),M=u[m]=new Array(b),_=h[m]=new Array(v);a(g,p,E,M,_,x,n);for(var C=0,S=0,T,R;C<b;++C)if(T=E[C]){for(C>=S&&(S=C+1);!(R=M[S])&&++S<b;);T._next=R||null}}return u=new Qe(u,r),u._enter=f,u._exit=h,u}function JN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function WN(){return new Qe(this._exit||this._groups.map(sw),this._parents)}function t5(t,n,a){var r=this.enter(),l=this,c=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(l=n(l),l&&(l=l.selection())),a==null?c.remove():a(c),r&&l?r.merge(l).order():l}function e5(t){for(var n=t.selection?t.selection():t,a=this._groups,r=n._groups,l=a.length,c=r.length,u=Math.min(l,c),f=new Array(l),h=0;h<u;++h)for(var m=a[h],g=r[h],p=m.length,v=f[h]=new Array(p),x,b=0;b<p;++b)(x=m[b]||g[b])&&(v[b]=x);for(;h<l;++h)f[h]=a[h];return new Qe(f,this._parents)}function n5(){for(var t=this._groups,n=-1,a=t.length;++n<a;)for(var r=t[n],l=r.length-1,c=r[l],u;--l>=0;)(u=r[l])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function i5(t){t||(t=a5);function n(p,v){return p&&v?t(p.__data__,v.__data__):!p-!v}for(var a=this._groups,r=a.length,l=new Array(r),c=0;c<r;++c){for(var u=a[c],f=u.length,h=l[c]=new Array(f),m,g=0;g<f;++g)(m=u[g])&&(h[g]=m);h.sort(n)}return new Qe(l,this._parents).order()}function a5(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function s5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function r5(){return Array.from(this)}function o5(){for(var t=this._groups,n=0,a=t.length;n<a;++n)for(var r=t[n],l=0,c=r.length;l<c;++l){var u=r[l];if(u)return u}return null}function l5(){let t=0;for(const n of this)++t;return t}function u5(){return!this.node()}function c5(t){for(var n=this._groups,a=0,r=n.length;a<r;++a)for(var l=n[a],c=0,u=l.length,f;c<u;++c)(f=l[c])&&t.call(f,f.__data__,c,l);return this}function f5(t){return function(){this.removeAttribute(t)}}function d5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function h5(t,n){return function(){this.setAttribute(t,n)}}function m5(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function p5(t,n){return function(){var a=n.apply(this,arguments);a==null?this.removeAttribute(t):this.setAttribute(t,a)}}function g5(t,n){return function(){var a=n.apply(this,arguments);a==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,a)}}function y5(t,n){var a=Wu(t);if(arguments.length<2){var r=this.node();return a.local?r.getAttributeNS(a.space,a.local):r.getAttribute(a)}return this.each((n==null?a.local?d5:f5:typeof n=="function"?a.local?g5:p5:a.local?m5:h5)(a,n))}function rw(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function v5(t){return function(){this.style.removeProperty(t)}}function x5(t,n,a){return function(){this.style.setProperty(t,n,a)}}function b5(t,n,a){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,a)}}function w5(t,n,a){return arguments.length>1?this.each((n==null?v5:typeof n=="function"?b5:x5)(t,n,a??"")):js(this.node(),t)}function js(t,n){return t.style.getPropertyValue(n)||rw(t).getComputedStyle(t,null).getPropertyValue(n)}function S5(t){return function(){delete this[t]}}function E5(t,n){return function(){this[t]=n}}function T5(t,n){return function(){var a=n.apply(this,arguments);a==null?delete this[t]:this[t]=a}}function _5(t,n){return arguments.length>1?this.each((n==null?S5:typeof n=="function"?T5:E5)(t,n)):this.node()[t]}function ow(t){return t.trim().split(/^|\s+/)}function Tm(t){return t.classList||new lw(t)}function lw(t){this._node=t,this._names=ow(t.getAttribute("class")||"")}lw.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function uw(t,n){for(var a=Tm(t),r=-1,l=n.length;++r<l;)a.add(n[r])}function cw(t,n){for(var a=Tm(t),r=-1,l=n.length;++r<l;)a.remove(n[r])}function M5(t){return function(){uw(this,t)}}function A5(t){return function(){cw(this,t)}}function C5(t,n){return function(){(n.apply(this,arguments)?uw:cw)(this,t)}}function N5(t,n){var a=ow(t+"");if(arguments.length<2){for(var r=Tm(this.node()),l=-1,c=a.length;++l<c;)if(!r.contains(a[l]))return!1;return!0}return this.each((typeof n=="function"?C5:n?M5:A5)(a,n))}function D5(){this.textContent=""}function z5(t){return function(){this.textContent=t}}function O5(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function R5(t){return arguments.length?this.each(t==null?D5:(typeof t=="function"?O5:z5)(t)):this.node().textContent}function j5(){this.innerHTML=""}function V5(t){return function(){this.innerHTML=t}}function L5(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function k5(t){return arguments.length?this.each(t==null?j5:(typeof t=="function"?L5:V5)(t)):this.node().innerHTML}function B5(){this.nextSibling&&this.parentNode.appendChild(this)}function H5(){return this.each(B5)}function U5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y5(){return this.each(U5)}function G5(t){var n=typeof t=="function"?t:ew(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function q5(){return null}function X5(t,n){var a=typeof t=="function"?t:ew(t),r=n==null?q5:typeof n=="function"?n:Em(n);return this.select(function(){return this.insertBefore(a.apply(this,arguments),r.apply(this,arguments)||null)})}function P5(){var t=this.parentNode;t&&t.removeChild(this)}function $5(){return this.each(P5)}function K5(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Z5(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function I5(t){return this.select(t?Z5:K5)}function Q5(t){return arguments.length?this.property("__data__",t):this.node().__data__}function F5(t){return function(n){t.call(this,n,this.__data__)}}function J5(t){return t.trim().split(/^|\s+/).map(function(n){var a="",r=n.indexOf(".");return r>=0&&(a=n.slice(r+1),n=n.slice(0,r)),{type:n,name:a}})}function W5(t){return function(){var n=this.__on;if(n){for(var a=0,r=-1,l=n.length,c;a<l;++a)c=n[a],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):n[++r]=c;++r?n.length=r:delete this.__on}}}function t3(t,n,a){return function(){var r=this.__on,l,c=F5(n);if(r){for(var u=0,f=r.length;u<f;++u)if((l=r[u]).type===t.type&&l.name===t.name){this.removeEventListener(l.type,l.listener,l.options),this.addEventListener(l.type,l.listener=c,l.options=a),l.value=n;return}}this.addEventListener(t.type,c,a),l={type:t.type,name:t.name,value:n,listener:c,options:a},r?r.push(l):this.__on=[l]}}function e3(t,n,a){var r=J5(t+""),l,c=r.length,u;if(arguments.length<2){var f=this.node().__on;if(f){for(var h=0,m=f.length,g;h<m;++h)for(l=0,g=f[h];l<c;++l)if((u=r[l]).type===g.type&&u.name===g.name)return g.value}return}for(f=n?t3:W5,l=0;l<c;++l)this.each(f(r[l],n,a));return this}function fw(t,n,a){var r=rw(t),l=r.CustomEvent;typeof l=="function"?l=new l(n,a):(l=r.document.createEvent("Event"),a?(l.initEvent(n,a.bubbles,a.cancelable),l.detail=a.detail):l.initEvent(n,!1,!1)),t.dispatchEvent(l)}function n3(t,n){return function(){return fw(this,t,n)}}function i3(t,n){return function(){return fw(this,t,n.apply(this,arguments))}}function a3(t,n){return this.each((typeof n=="function"?i3:n3)(t,n))}function*s3(){for(var t=this._groups,n=0,a=t.length;n<a;++n)for(var r=t[n],l=0,c=r.length,u;l<c;++l)(u=r[l])&&(yield u)}var dw=[null];function Qe(t,n){this._groups=t,this._parents=n}function bo(){return new Qe([[document.documentElement]],dw)}function r3(){return this}Qe.prototype=bo.prototype={constructor:Qe,select:ON,selectAll:LN,selectChild:UN,selectChildren:XN,filter:PN,data:FN,enter:$N,exit:WN,join:t5,merge:e5,selection:r3,order:n5,sort:i5,call:s5,nodes:r5,node:o5,size:l5,empty:u5,each:c5,attr:y5,style:w5,property:_5,classed:N5,text:R5,html:k5,raise:H5,lower:Y5,append:G5,insert:X5,remove:$5,clone:I5,datum:Q5,on:e3,dispatch:a3,[Symbol.iterator]:s3};function Ze(t){return typeof t=="string"?new Qe([[document.querySelector(t)]],[document.documentElement]):new Qe([[t]],dw)}function o3(t){let n;for(;n=t.sourceEvent;)t=n;return t}function gn(t,n){if(t=o3(t),n===void 0&&(n=t.currentTarget),n){var a=n.ownerSVGElement||n;if(a.createSVGPoint){var r=a.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}if(n.getBoundingClientRect){var l=n.getBoundingClientRect();return[t.clientX-l.left-n.clientLeft,t.clientY-l.top-n.clientTop]}}return[t.pageX,t.pageY]}const l3={passive:!1},io={capture:!0,passive:!1};function Fd(t){t.stopImmediatePropagation()}function zs(t){t.preventDefault(),t.stopImmediatePropagation()}function hw(t){var n=t.document.documentElement,a=Ze(t).on("dragstart.drag",zs,io);"onselectstart"in n?a.on("selectstart.drag",zs,io):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function mw(t,n){var a=t.document.documentElement,r=Ze(t).on("dragstart.drag",null);n&&(r.on("click.drag",zs,io),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in a?r.on("selectstart.drag",null):(a.style.MozUserSelect=a.__noselect,delete a.__noselect)}const eu=t=>()=>t;function kh(t,{sourceEvent:n,subject:a,target:r,identifier:l,active:c,x:u,y:f,dx:h,dy:m,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:a,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:l,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:g}})}kh.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function u3(t){return!t.ctrlKey&&!t.button}function c3(){return this.parentNode}function f3(t,n){return n??{x:t.x,y:t.y}}function d3(){return navigator.maxTouchPoints||"ontouchstart"in this}function pw(){var t=u3,n=c3,a=f3,r=d3,l={},c=Ju("start","drag","end"),u=0,f,h,m,g,p=0;function v(T){T.on("mousedown.drag",x).filter(r).on("touchstart.drag",M).on("touchmove.drag",_,l3).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(T,R){if(!(g||!t.call(this,T,R))){var L=S(this,n.call(this,T,R),T,R,"mouse");L&&(Ze(T.view).on("mousemove.drag",b,io).on("mouseup.drag",E,io),hw(T.view),Fd(T),m=!1,f=T.clientX,h=T.clientY,L("start",T))}}function b(T){if(zs(T),!m){var R=T.clientX-f,L=T.clientY-h;m=R*R+L*L>p}l.mouse("drag",T)}function E(T){Ze(T.view).on("mousemove.drag mouseup.drag",null),mw(T.view,m),zs(T),l.mouse("end",T)}function M(T,R){if(t.call(this,T,R)){var L=T.changedTouches,U=n.call(this,T,R),P=L.length,F,X;for(F=0;F<P;++F)(X=S(this,U,T,R,L[F].identifier,L[F]))&&(Fd(T),X("start",T,L[F]))}}function _(T){var R=T.changedTouches,L=R.length,U,P;for(U=0;U<L;++U)(P=l[R[U].identifier])&&(zs(T),P("drag",T,R[U]))}function C(T){var R=T.changedTouches,L=R.length,U,P;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),U=0;U<L;++U)(P=l[R[U].identifier])&&(Fd(T),P("end",T,R[U]))}function S(T,R,L,U,P,F){var X=c.copy(),k=gn(F||L,R),Y,$,D;if((D=a.call(T,new kh("beforestart",{sourceEvent:L,target:v,identifier:P,active:u,x:k[0],y:k[1],dx:0,dy:0,dispatch:X}),U))!=null)return Y=D.x-k[0]||0,$=D.y-k[1]||0,function K(A,j,V){var q=k,I;switch(A){case"start":l[P]=K,I=u++;break;case"end":delete l[P],--u;case"drag":k=gn(V||j,R),I=u;break}X.call(A,T,new kh(A,{sourceEvent:j,subject:D,target:v,identifier:P,active:I,x:k[0]+Y,y:k[1]+$,dx:k[0]-q[0],dy:k[1]-q[1],dispatch:X}),U)}}return v.filter=function(T){return arguments.length?(t=typeof T=="function"?T:eu(!!T),v):t},v.container=function(T){return arguments.length?(n=typeof T=="function"?T:eu(T),v):n},v.subject=function(T){return arguments.length?(a=typeof T=="function"?T:eu(T),v):a},v.touchable=function(T){return arguments.length?(r=typeof T=="function"?T:eu(!!T),v):r},v.on=function(){var T=c.on.apply(c,arguments);return T===c?v:T},v.clickDistance=function(T){return arguments.length?(p=(T=+T)*T,v):Math.sqrt(p)},v}function _m(t,n,a){t.prototype=n.prototype=a,a.constructor=t}function gw(t,n){var a=Object.create(t.prototype);for(var r in n)a[r]=n[r];return a}function wo(){}var ao=.7,Vu=1/ao,Os="\\s*([+-]?\\d+)\\s*",so="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h3=/^#([0-9a-f]{3,8})$/,m3=new RegExp(`^rgb\\(${Os},${Os},${Os}\\)$`),p3=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),g3=new RegExp(`^rgba\\(${Os},${Os},${Os},${so}\\)$`),y3=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${so}\\)$`),v3=new RegExp(`^hsl\\(${so},${Rn},${Rn}\\)$`),x3=new RegExp(`^hsla\\(${so},${Rn},${Rn},${so}\\)$`),ex={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_m(wo,Ra,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:nx,formatHex:nx,formatHex8:b3,formatHsl:w3,formatRgb:ix,toString:ix});function nx(){return this.rgb().formatHex()}function b3(){return this.rgb().formatHex8()}function w3(){return yw(this).formatHsl()}function ix(){return this.rgb().formatRgb()}function Ra(t){var n,a;return t=(t+"").trim().toLowerCase(),(n=h3.exec(t))?(a=n[1].length,n=parseInt(n[1],16),a===6?ax(n):a===3?new He(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):a===8?nu(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):a===4?nu(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=m3.exec(t))?new He(n[1],n[2],n[3],1):(n=p3.exec(t))?new He(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=g3.exec(t))?nu(n[1],n[2],n[3],n[4]):(n=y3.exec(t))?nu(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=v3.exec(t))?ox(n[1],n[2]/100,n[3]/100,1):(n=x3.exec(t))?ox(n[1],n[2]/100,n[3]/100,n[4]):ex.hasOwnProperty(t)?ax(ex[t]):t==="transparent"?new He(NaN,NaN,NaN,0):null}function ax(t){return new He(t>>16&255,t>>8&255,t&255,1)}function nu(t,n,a,r){return r<=0&&(t=n=a=NaN),new He(t,n,a,r)}function S3(t){return t instanceof wo||(t=Ra(t)),t?(t=t.rgb(),new He(t.r,t.g,t.b,t.opacity)):new He}function Bh(t,n,a,r){return arguments.length===1?S3(t):new He(t,n,a,r??1)}function He(t,n,a,r){this.r=+t,this.g=+n,this.b=+a,this.opacity=+r}_m(He,Bh,gw(wo,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ao:Math.pow(ao,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new He(Da(this.r),Da(this.g),Da(this.b),Lu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sx,formatHex:sx,formatHex8:E3,formatRgb:rx,toString:rx}));function sx(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function E3(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function rx(){const t=Lu(this.opacity);return`${t===1?"rgb(":"rgba("}${Da(this.r)}, ${Da(this.g)}, ${Da(this.b)}${t===1?")":`, ${t})`}`}function Lu(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Da(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Aa(t){return t=Da(t),(t<16?"0":"")+t.toString(16)}function ox(t,n,a,r){return r<=0?t=n=a=NaN:a<=0||a>=1?t=n=NaN:n<=0&&(t=NaN),new yn(t,n,a,r)}function yw(t){if(t instanceof yn)return new yn(t.h,t.s,t.l,t.opacity);if(t instanceof wo||(t=Ra(t)),!t)return new yn;if(t instanceof yn)return t;t=t.rgb();var n=t.r/255,a=t.g/255,r=t.b/255,l=Math.min(n,a,r),c=Math.max(n,a,r),u=NaN,f=c-l,h=(c+l)/2;return f?(n===c?u=(a-r)/f+(a<r)*6:a===c?u=(r-n)/f+2:u=(n-a)/f+4,f/=h<.5?c+l:2-c-l,u*=60):f=h>0&&h<1?0:u,new yn(u,f,h,t.opacity)}function T3(t,n,a,r){return arguments.length===1?yw(t):new yn(t,n,a,r??1)}function yn(t,n,a,r){this.h=+t,this.s=+n,this.l=+a,this.opacity=+r}_m(yn,T3,gw(wo,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new yn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ao:Math.pow(ao,t),new yn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,a=this.l,r=a+(a<.5?a:1-a)*n,l=2*a-r;return new He(Jd(t>=240?t-240:t+120,l,r),Jd(t,l,r),Jd(t<120?t+240:t-120,l,r),this.opacity)},clamp(){return new yn(lx(this.h),iu(this.s),iu(this.l),Lu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Lu(this.opacity);return`${t===1?"hsl(":"hsla("}${lx(this.h)}, ${iu(this.s)*100}%, ${iu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function lx(t){return t=(t||0)%360,t<0?t+360:t}function iu(t){return Math.max(0,Math.min(1,t||0))}function Jd(t,n,a){return(t<60?n+(a-n)*t/60:t<180?a:t<240?n+(a-n)*(240-t)/60:n)*255}const Mm=t=>()=>t;function _3(t,n){return function(a){return t+a*n}}function M3(t,n,a){return t=Math.pow(t,a),n=Math.pow(n,a)-t,a=1/a,function(r){return Math.pow(t+r*n,a)}}function A3(t){return(t=+t)==1?vw:function(n,a){return a-n?M3(n,a,t):Mm(isNaN(n)?a:n)}}function vw(t,n){var a=n-t;return a?_3(t,a):Mm(isNaN(t)?n:t)}const ku=(function t(n){var a=A3(n);function r(l,c){var u=a((l=Bh(l)).r,(c=Bh(c)).r),f=a(l.g,c.g),h=a(l.b,c.b),m=vw(l.opacity,c.opacity);return function(g){return l.r=u(g),l.g=f(g),l.b=h(g),l.opacity=m(g),l+""}}return r.gamma=t,r})(1);function C3(t,n){n||(n=[]);var a=t?Math.min(n.length,t.length):0,r=n.slice(),l;return function(c){for(l=0;l<a;++l)r[l]=t[l]*(1-c)+n[l]*c;return r}}function N3(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function D3(t,n){var a=n?n.length:0,r=t?Math.min(a,t.length):0,l=new Array(r),c=new Array(a),u;for(u=0;u<r;++u)l[u]=Qr(t[u],n[u]);for(;u<a;++u)c[u]=n[u];return function(f){for(u=0;u<r;++u)c[u]=l[u](f);return c}}function z3(t,n){var a=new Date;return t=+t,n=+n,function(r){return a.setTime(t*(1-r)+n*r),a}}function zn(t,n){return t=+t,n=+n,function(a){return t*(1-a)+n*a}}function O3(t,n){var a={},r={},l;(t===null||typeof t!="object")&&(t={}),(n===null||typeof n!="object")&&(n={});for(l in n)l in t?a[l]=Qr(t[l],n[l]):r[l]=n[l];return function(c){for(l in a)r[l]=a[l](c);return r}}var Hh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wd=new RegExp(Hh.source,"g");function R3(t){return function(){return t}}function j3(t){return function(n){return t(n)+""}}function xw(t,n){var a=Hh.lastIndex=Wd.lastIndex=0,r,l,c,u=-1,f=[],h=[];for(t=t+"",n=n+"";(r=Hh.exec(t))&&(l=Wd.exec(n));)(c=l.index)>a&&(c=n.slice(a,c),f[u]?f[u]+=c:f[++u]=c),(r=r[0])===(l=l[0])?f[u]?f[u]+=l:f[++u]=l:(f[++u]=null,h.push({i:u,x:zn(r,l)})),a=Wd.lastIndex;return a<n.length&&(c=n.slice(a),f[u]?f[u]+=c:f[++u]=c),f.length<2?h[0]?j3(h[0].x):R3(n):(n=h.length,function(m){for(var g=0,p;g<n;++g)f[(p=h[g]).i]=p.x(m);return f.join("")})}function Qr(t,n){var a=typeof n,r;return n==null||a==="boolean"?Mm(n):(a==="number"?zn:a==="string"?(r=Ra(n))?(n=r,ku):xw:n instanceof Ra?ku:n instanceof Date?z3:N3(n)?C3:Array.isArray(n)?D3:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?O3:zn)(t,n)}var ux=180/Math.PI,Uh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bw(t,n,a,r,l,c){var u,f,h;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(h=t*a+n*r)&&(a-=t*h,r-=n*h),(f=Math.sqrt(a*a+r*r))&&(a/=f,r/=f,h/=f),t*r<n*a&&(t=-t,n=-n,h=-h,u=-u),{translateX:l,translateY:c,rotate:Math.atan2(n,t)*ux,skewX:Math.atan(h)*ux,scaleX:u,scaleY:f}}var au;function V3(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?Uh:bw(n.a,n.b,n.c,n.d,n.e,n.f)}function L3(t){return t==null||(au||(au=document.createElementNS("http://www.w3.org/2000/svg","g")),au.setAttribute("transform",t),!(t=au.transform.baseVal.consolidate()))?Uh:(t=t.matrix,bw(t.a,t.b,t.c,t.d,t.e,t.f))}function ww(t,n,a,r){function l(m){return m.length?m.pop()+" ":""}function c(m,g,p,v,x,b){if(m!==p||g!==v){var E=x.push("translate(",null,n,null,a);b.push({i:E-4,x:zn(m,p)},{i:E-2,x:zn(g,v)})}else(p||v)&&x.push("translate("+p+n+v+a)}function u(m,g,p,v){m!==g?(m-g>180?g+=360:g-m>180&&(m+=360),v.push({i:p.push(l(p)+"rotate(",null,r)-2,x:zn(m,g)})):g&&p.push(l(p)+"rotate("+g+r)}function f(m,g,p,v){m!==g?v.push({i:p.push(l(p)+"skewX(",null,r)-2,x:zn(m,g)}):g&&p.push(l(p)+"skewX("+g+r)}function h(m,g,p,v,x,b){if(m!==p||g!==v){var E=x.push(l(x)+"scale(",null,",",null,")");b.push({i:E-4,x:zn(m,p)},{i:E-2,x:zn(g,v)})}else(p!==1||v!==1)&&x.push(l(x)+"scale("+p+","+v+")")}return function(m,g){var p=[],v=[];return m=t(m),g=t(g),c(m.translateX,m.translateY,g.translateX,g.translateY,p,v),u(m.rotate,g.rotate,p,v),f(m.skewX,g.skewX,p,v),h(m.scaleX,m.scaleY,g.scaleX,g.scaleY,p,v),m=g=null,function(x){for(var b=-1,E=v.length,M;++b<E;)p[(M=v[b]).i]=M.x(x);return p.join("")}}}var k3=ww(V3,"px, ","px)","deg)"),B3=ww(L3,", ",")",")"),H3=1e-12;function cx(t){return((t=Math.exp(t))+1/t)/2}function U3(t){return((t=Math.exp(t))-1/t)/2}function Y3(t){return((t=Math.exp(2*t))-1)/(t+1)}const wu=(function t(n,a,r){function l(c,u){var f=c[0],h=c[1],m=c[2],g=u[0],p=u[1],v=u[2],x=g-f,b=p-h,E=x*x+b*b,M,_;if(E<H3)_=Math.log(v/m)/n,M=function(U){return[f+U*x,h+U*b,m*Math.exp(n*U*_)]};else{var C=Math.sqrt(E),S=(v*v-m*m+r*E)/(2*m*a*C),T=(v*v-m*m-r*E)/(2*v*a*C),R=Math.log(Math.sqrt(S*S+1)-S),L=Math.log(Math.sqrt(T*T+1)-T);_=(L-R)/n,M=function(U){var P=U*_,F=cx(R),X=m/(a*C)*(F*Y3(n*P+R)-U3(R));return[f+X*x,h+X*b,m*F/cx(n*P+R)]}}return M.duration=_*1e3*n/Math.SQRT2,M}return l.rho=function(c){var u=Math.max(.001,+c),f=u*u,h=f*f;return t(u,f,h)},l})(Math.SQRT2,2,4);var Vs=0,qr=0,Ur=0,Sw=1e3,Bu,Xr,Hu=0,ja=0,tc=0,ro=typeof performance=="object"&&performance.now?performance:Date,Ew=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Am(){return ja||(Ew(G3),ja=ro.now()+tc)}function G3(){ja=0}function Uu(){this._call=this._time=this._next=null}Uu.prototype=Tw.prototype={constructor:Uu,restart:function(t,n,a){if(typeof t!="function")throw new TypeError("callback is not a function");a=(a==null?Am():+a)+(n==null?0:+n),!this._next&&Xr!==this&&(Xr?Xr._next=this:Bu=this,Xr=this),this._call=t,this._time=a,Yh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Yh())}};function Tw(t,n,a){var r=new Uu;return r.restart(t,n,a),r}function q3(){Am(),++Vs;for(var t=Bu,n;t;)(n=ja-t._time)>=0&&t._call.call(void 0,n),t=t._next;--Vs}function fx(){ja=(Hu=ro.now())+tc,Vs=qr=0;try{q3()}finally{Vs=0,P3(),ja=0}}function X3(){var t=ro.now(),n=t-Hu;n>Sw&&(tc-=n,Hu=t)}function P3(){for(var t,n=Bu,a,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(a=n._next,n._next=null,n=t?t._next=a:Bu=a);Xr=t,Yh(r)}function Yh(t){if(!Vs){qr&&(qr=clearTimeout(qr));var n=t-ja;n>24?(t<1/0&&(qr=setTimeout(fx,t-ro.now()-tc)),Ur&&(Ur=clearInterval(Ur))):(Ur||(Hu=ro.now(),Ur=setInterval(X3,Sw)),Vs=1,Ew(fx))}}function dx(t,n,a){var r=new Uu;return n=n==null?0:+n,r.restart(l=>{r.stop(),t(l+n)},n,a),r}var $3=Ju("start","end","cancel","interrupt"),K3=[],_w=0,hx=1,Gh=2,Su=3,mx=4,qh=5,Eu=6;function ec(t,n,a,r,l,c){var u=t.__transition;if(!u)t.__transition={};else if(a in u)return;Z3(t,a,{name:n,index:r,group:l,on:$3,tween:K3,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:_w})}function Cm(t,n){var a=Sn(t,n);if(a.state>_w)throw new Error("too late; already scheduled");return a}function Ln(t,n){var a=Sn(t,n);if(a.state>Su)throw new Error("too late; already running");return a}function Sn(t,n){var a=t.__transition;if(!a||!(a=a[n]))throw new Error("transition not found");return a}function Z3(t,n,a){var r=t.__transition,l;r[n]=a,a.timer=Tw(c,0,a.time);function c(m){a.state=hx,a.timer.restart(u,a.delay,a.time),a.delay<=m&&u(m-a.delay)}function u(m){var g,p,v,x;if(a.state!==hx)return h();for(g in r)if(x=r[g],x.name===a.name){if(x.state===Su)return dx(u);x.state===mx?(x.state=Eu,x.timer.stop(),x.on.call("interrupt",t,t.__data__,x.index,x.group),delete r[g]):+g<n&&(x.state=Eu,x.timer.stop(),x.on.call("cancel",t,t.__data__,x.index,x.group),delete r[g])}if(dx(function(){a.state===Su&&(a.state=mx,a.timer.restart(f,a.delay,a.time),f(m))}),a.state=Gh,a.on.call("start",t,t.__data__,a.index,a.group),a.state===Gh){for(a.state=Su,l=new Array(v=a.tween.length),g=0,p=-1;g<v;++g)(x=a.tween[g].value.call(t,t.__data__,a.index,a.group))&&(l[++p]=x);l.length=p+1}}function f(m){for(var g=m<a.duration?a.ease.call(null,m/a.duration):(a.timer.restart(h),a.state=qh,1),p=-1,v=l.length;++p<v;)l[p].call(t,g);a.state===qh&&(a.on.call("end",t,t.__data__,a.index,a.group),h())}function h(){a.state=Eu,a.timer.stop(),delete r[n];for(var m in r)return;delete t.__transition}}function Tu(t,n){var a=t.__transition,r,l,c=!0,u;if(a){n=n==null?null:n+"";for(u in a){if((r=a[u]).name!==n){c=!1;continue}l=r.state>Gh&&r.state<qh,r.state=Eu,r.timer.stop(),r.on.call(l?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[u]}c&&delete t.__transition}}function I3(t){return this.each(function(){Tu(this,t)})}function Q3(t,n){var a,r;return function(){var l=Ln(this,t),c=l.tween;if(c!==a){r=a=c;for(var u=0,f=r.length;u<f;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}l.tween=r}}function F3(t,n,a){var r,l;if(typeof a!="function")throw new Error;return function(){var c=Ln(this,t),u=c.tween;if(u!==r){l=(r=u).slice();for(var f={name:n,value:a},h=0,m=l.length;h<m;++h)if(l[h].name===n){l[h]=f;break}h===m&&l.push(f)}c.tween=l}}function J3(t,n){var a=this._id;if(t+="",arguments.length<2){for(var r=Sn(this.node(),a).tween,l=0,c=r.length,u;l<c;++l)if((u=r[l]).name===t)return u.value;return null}return this.each((n==null?Q3:F3)(a,t,n))}function Nm(t,n,a){var r=t._id;return t.each(function(){var l=Ln(this,r);(l.value||(l.value={}))[n]=a.apply(this,arguments)}),function(l){return Sn(l,r).value[n]}}function Mw(t,n){var a;return(typeof n=="number"?zn:n instanceof Ra?ku:(a=Ra(n))?(n=a,ku):xw)(t,n)}function W3(t){return function(){this.removeAttribute(t)}}function tD(t){return function(){this.removeAttributeNS(t.space,t.local)}}function eD(t,n,a){var r,l=a+"",c;return function(){var u=this.getAttribute(t);return u===l?null:u===r?c:c=n(r=u,a)}}function nD(t,n,a){var r,l=a+"",c;return function(){var u=this.getAttributeNS(t.space,t.local);return u===l?null:u===r?c:c=n(r=u,a)}}function iD(t,n,a){var r,l,c;return function(){var u,f=a(this),h;return f==null?void this.removeAttribute(t):(u=this.getAttribute(t),h=f+"",u===h?null:u===r&&h===l?c:(l=h,c=n(r=u,f)))}}function aD(t,n,a){var r,l,c;return function(){var u,f=a(this),h;return f==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),h=f+"",u===h?null:u===r&&h===l?c:(l=h,c=n(r=u,f)))}}function sD(t,n){var a=Wu(t),r=a==="transform"?B3:Mw;return this.attrTween(t,typeof n=="function"?(a.local?aD:iD)(a,r,Nm(this,"attr."+t,n)):n==null?(a.local?tD:W3)(a):(a.local?nD:eD)(a,r,n))}function rD(t,n){return function(a){this.setAttribute(t,n.call(this,a))}}function oD(t,n){return function(a){this.setAttributeNS(t.space,t.local,n.call(this,a))}}function lD(t,n){var a,r;function l(){var c=n.apply(this,arguments);return c!==r&&(a=(r=c)&&oD(t,c)),a}return l._value=n,l}function uD(t,n){var a,r;function l(){var c=n.apply(this,arguments);return c!==r&&(a=(r=c)&&rD(t,c)),a}return l._value=n,l}function cD(t,n){var a="attr."+t;if(arguments.length<2)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;var r=Wu(t);return this.tween(a,(r.local?lD:uD)(r,n))}function fD(t,n){return function(){Cm(this,t).delay=+n.apply(this,arguments)}}function dD(t,n){return n=+n,function(){Cm(this,t).delay=n}}function hD(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?fD:dD)(n,t)):Sn(this.node(),n).delay}function mD(t,n){return function(){Ln(this,t).duration=+n.apply(this,arguments)}}function pD(t,n){return n=+n,function(){Ln(this,t).duration=n}}function gD(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?mD:pD)(n,t)):Sn(this.node(),n).duration}function yD(t,n){if(typeof n!="function")throw new Error;return function(){Ln(this,t).ease=n}}function vD(t){var n=this._id;return arguments.length?this.each(yD(n,t)):Sn(this.node(),n).ease}function xD(t,n){return function(){var a=n.apply(this,arguments);if(typeof a!="function")throw new Error;Ln(this,t).ease=a}}function bD(t){if(typeof t!="function")throw new Error;return this.each(xD(this._id,t))}function wD(t){typeof t!="function"&&(t=iw(t));for(var n=this._groups,a=n.length,r=new Array(a),l=0;l<a;++l)for(var c=n[l],u=c.length,f=r[l]=[],h,m=0;m<u;++m)(h=c[m])&&t.call(h,h.__data__,m,c)&&f.push(h);return new ui(r,this._parents,this._name,this._id)}function SD(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,a=t._groups,r=n.length,l=a.length,c=Math.min(r,l),u=new Array(r),f=0;f<c;++f)for(var h=n[f],m=a[f],g=h.length,p=u[f]=new Array(g),v,x=0;x<g;++x)(v=h[x]||m[x])&&(p[x]=v);for(;f<r;++f)u[f]=n[f];return new ui(u,this._parents,this._name,this._id)}function ED(t){return(t+"").trim().split(/^|\s+/).every(function(n){var a=n.indexOf(".");return a>=0&&(n=n.slice(0,a)),!n||n==="start"})}function TD(t,n,a){var r,l,c=ED(n)?Cm:Ln;return function(){var u=c(this,t),f=u.on;f!==r&&(l=(r=f).copy()).on(n,a),u.on=l}}function _D(t,n){var a=this._id;return arguments.length<2?Sn(this.node(),a).on.on(t):this.each(TD(a,t,n))}function MD(t){return function(){var n=this.parentNode;for(var a in this.__transition)if(+a!==t)return;n&&n.removeChild(this)}}function AD(){return this.on("end.remove",MD(this._id))}function CD(t){var n=this._name,a=this._id;typeof t!="function"&&(t=Em(t));for(var r=this._groups,l=r.length,c=new Array(l),u=0;u<l;++u)for(var f=r[u],h=f.length,m=c[u]=new Array(h),g,p,v=0;v<h;++v)(g=f[v])&&(p=t.call(g,g.__data__,v,f))&&("__data__"in g&&(p.__data__=g.__data__),m[v]=p,ec(m[v],n,a,v,m,Sn(g,a)));return new ui(c,this._parents,n,a)}function ND(t){var n=this._name,a=this._id;typeof t!="function"&&(t=nw(t));for(var r=this._groups,l=r.length,c=[],u=[],f=0;f<l;++f)for(var h=r[f],m=h.length,g,p=0;p<m;++p)if(g=h[p]){for(var v=t.call(g,g.__data__,p,h),x,b=Sn(g,a),E=0,M=v.length;E<M;++E)(x=v[E])&&ec(x,n,a,E,v,b);c.push(v),u.push(g)}return new ui(c,u,n,a)}var DD=bo.prototype.constructor;function zD(){return new DD(this._groups,this._parents)}function OD(t,n){var a,r,l;return function(){var c=js(this,t),u=(this.style.removeProperty(t),js(this,t));return c===u?null:c===a&&u===r?l:l=n(a=c,r=u)}}function Aw(t){return function(){this.style.removeProperty(t)}}function RD(t,n,a){var r,l=a+"",c;return function(){var u=js(this,t);return u===l?null:u===r?c:c=n(r=u,a)}}function jD(t,n,a){var r,l,c;return function(){var u=js(this,t),f=a(this),h=f+"";return f==null&&(h=f=(this.style.removeProperty(t),js(this,t))),u===h?null:u===r&&h===l?c:(l=h,c=n(r=u,f))}}function VD(t,n){var a,r,l,c="style."+n,u="end."+c,f;return function(){var h=Ln(this,t),m=h.on,g=h.value[c]==null?f||(f=Aw(n)):void 0;(m!==a||l!==g)&&(r=(a=m).copy()).on(u,l=g),h.on=r}}function LD(t,n,a){var r=(t+="")=="transform"?k3:Mw;return n==null?this.styleTween(t,OD(t,r)).on("end.style."+t,Aw(t)):typeof n=="function"?this.styleTween(t,jD(t,r,Nm(this,"style."+t,n))).each(VD(this._id,t)):this.styleTween(t,RD(t,r,n),a).on("end.style."+t,null)}function kD(t,n,a){return function(r){this.style.setProperty(t,n.call(this,r),a)}}function BD(t,n,a){var r,l;function c(){var u=n.apply(this,arguments);return u!==l&&(r=(l=u)&&kD(t,u,a)),r}return c._value=n,c}function HD(t,n,a){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;return this.tween(r,BD(t,n,a??""))}function UD(t){return function(){this.textContent=t}}function YD(t){return function(){var n=t(this);this.textContent=n??""}}function GD(t){return this.tween("text",typeof t=="function"?YD(Nm(this,"text",t)):UD(t==null?"":t+""))}function qD(t){return function(n){this.textContent=t.call(this,n)}}function XD(t){var n,a;function r(){var l=t.apply(this,arguments);return l!==a&&(n=(a=l)&&qD(l)),n}return r._value=t,r}function PD(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,XD(t))}function $D(){for(var t=this._name,n=this._id,a=Cw(),r=this._groups,l=r.length,c=0;c<l;++c)for(var u=r[c],f=u.length,h,m=0;m<f;++m)if(h=u[m]){var g=Sn(h,n);ec(h,t,a,m,u,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new ui(r,this._parents,t,a)}function KD(){var t,n,a=this,r=a._id,l=a.size();return new Promise(function(c,u){var f={value:u},h={value:function(){--l===0&&c()}};a.each(function(){var m=Ln(this,r),g=m.on;g!==t&&(n=(t=g).copy(),n._.cancel.push(f),n._.interrupt.push(f),n._.end.push(h)),m.on=n}),l===0&&c()})}var ZD=0;function ui(t,n,a,r){this._groups=t,this._parents=n,this._name=a,this._id=r}function Cw(){return++ZD}var ri=bo.prototype;ui.prototype={constructor:ui,select:CD,selectAll:ND,selectChild:ri.selectChild,selectChildren:ri.selectChildren,filter:wD,merge:SD,selection:zD,transition:$D,call:ri.call,nodes:ri.nodes,node:ri.node,size:ri.size,empty:ri.empty,each:ri.each,on:_D,attr:sD,attrTween:cD,style:LD,styleTween:HD,text:GD,textTween:PD,remove:AD,tween:J3,delay:hD,duration:gD,ease:vD,easeVarying:bD,end:KD,[Symbol.iterator]:ri[Symbol.iterator]};function ID(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var QD={time:null,delay:0,duration:250,ease:ID};function FD(t,n){for(var a;!(a=t.__transition)||!(a=a[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return a}function JD(t){var n,a;t instanceof ui?(n=t._id,t=t._name):(n=Cw(),(a=QD).time=Am(),t=t==null?null:t+"");for(var r=this._groups,l=r.length,c=0;c<l;++c)for(var u=r[c],f=u.length,h,m=0;m<f;++m)(h=u[m])&&ec(h,t,n,m,u,a||FD(h,n));return new ui(r,this._parents,t,n)}bo.prototype.interrupt=I3;bo.prototype.transition=JD;const su=t=>()=>t;function WD(t,{sourceEvent:n,target:a,transform:r,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:l}})}function oi(t,n,a){this.k=t,this.x=n,this.y=a}oi.prototype={constructor:oi,scale:function(t){return t===1?this:new oi(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new oi(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nc=new oi(1,0,0);Nw.prototype=oi.prototype;function Nw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nc;return t.__zoom}function th(t){t.stopImmediatePropagation()}function Yr(t){t.preventDefault(),t.stopImmediatePropagation()}function tz(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function ez(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function px(){return this.__zoom||nc}function nz(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function iz(){return navigator.maxTouchPoints||"ontouchstart"in this}function az(t,n,a){var r=t.invertX(n[0][0])-a[0][0],l=t.invertX(n[1][0])-a[1][0],c=t.invertY(n[0][1])-a[0][1],u=t.invertY(n[1][1])-a[1][1];return t.translate(l>r?(r+l)/2:Math.min(0,r)||Math.max(0,l),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function Dw(){var t=tz,n=ez,a=az,r=nz,l=iz,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],f=250,h=wu,m=Ju("start","zoom","end"),g,p,v,x=500,b=150,E=0,M=10;function _(D){D.property("__zoom",px).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",X).filter(l).on("touchstart.zoom",k).on("touchmove.zoom",Y).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,K,A,j){var V=D.selection?D.selection():D;V.property("__zoom",px),D!==V?R(D,K,A,j):V.interrupt().each(function(){L(this,arguments).event(j).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},_.scaleBy=function(D,K,A,j){_.scaleTo(D,function(){var V=this.__zoom.k,q=typeof K=="function"?K.apply(this,arguments):K;return V*q},A,j)},_.scaleTo=function(D,K,A,j){_.transform(D,function(){var V=n.apply(this,arguments),q=this.__zoom,I=A==null?T(V):typeof A=="function"?A.apply(this,arguments):A,N=q.invert(I),G=typeof K=="function"?K.apply(this,arguments):K;return a(S(C(q,G),I,N),V,u)},A,j)},_.translateBy=function(D,K,A,j){_.transform(D,function(){return a(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof A=="function"?A.apply(this,arguments):A),n.apply(this,arguments),u)},null,j)},_.translateTo=function(D,K,A,j,V){_.transform(D,function(){var q=n.apply(this,arguments),I=this.__zoom,N=j==null?T(q):typeof j=="function"?j.apply(this,arguments):j;return a(nc.translate(N[0],N[1]).scale(I.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof A=="function"?-A.apply(this,arguments):-A),q,u)},j,V)};function C(D,K){return K=Math.max(c[0],Math.min(c[1],K)),K===D.k?D:new oi(K,D.x,D.y)}function S(D,K,A){var j=K[0]-A[0]*D.k,V=K[1]-A[1]*D.k;return j===D.x&&V===D.y?D:new oi(D.k,j,V)}function T(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function R(D,K,A,j){D.on("start.zoom",function(){L(this,arguments).event(j).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(j).end()}).tween("zoom",function(){var V=this,q=arguments,I=L(V,q).event(j),N=n.apply(V,q),G=A==null?T(N):typeof A=="function"?A.apply(V,q):A,et=Math.max(N[1][0]-N[0][0],N[1][1]-N[0][1]),B=V.__zoom,O=typeof K=="function"?K.apply(V,q):K,Z=h(B.invert(G).concat(et/B.k),O.invert(G).concat(et/O.k));return function(J){if(J===1)J=O;else{var tt=Z(J),at=et/tt[2];J=new oi(at,G[0]-tt[0]*at,G[1]-tt[1]*at)}I.zoom(null,J)}})}function L(D,K,A){return!A&&D.__zooming||new U(D,K)}function U(D,K){this.that=D,this.args=K,this.active=0,this.sourceEvent=null,this.extent=n.apply(D,K),this.taps=0}U.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,K){return this.mouse&&D!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var K=Ze(this.that).datum();m.call(D,this.that,new WD(D,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:m}),K)}};function P(D,...K){if(!t.apply(this,arguments))return;var A=L(this,K).event(D),j=this.__zoom,V=Math.max(c[0],Math.min(c[1],j.k*Math.pow(2,r.apply(this,arguments)))),q=gn(D);if(A.wheel)(A.mouse[0][0]!==q[0]||A.mouse[0][1]!==q[1])&&(A.mouse[1]=j.invert(A.mouse[0]=q)),clearTimeout(A.wheel);else{if(j.k===V)return;A.mouse=[q,j.invert(q)],Tu(this),A.start()}Yr(D),A.wheel=setTimeout(I,b),A.zoom("mouse",a(S(C(j,V),A.mouse[0],A.mouse[1]),A.extent,u));function I(){A.wheel=null,A.end()}}function F(D,...K){if(v||!t.apply(this,arguments))return;var A=D.currentTarget,j=L(this,K,!0).event(D),V=Ze(D.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",et,!0),q=gn(D,A),I=D.clientX,N=D.clientY;hw(D.view),th(D),j.mouse=[q,this.__zoom.invert(q)],Tu(this),j.start();function G(B){if(Yr(B),!j.moved){var O=B.clientX-I,Z=B.clientY-N;j.moved=O*O+Z*Z>E}j.event(B).zoom("mouse",a(S(j.that.__zoom,j.mouse[0]=gn(B,A),j.mouse[1]),j.extent,u))}function et(B){V.on("mousemove.zoom mouseup.zoom",null),mw(B.view,j.moved),Yr(B),j.event(B).end()}}function X(D,...K){if(t.apply(this,arguments)){var A=this.__zoom,j=gn(D.changedTouches?D.changedTouches[0]:D,this),V=A.invert(j),q=A.k*(D.shiftKey?.5:2),I=a(S(C(A,q),j,V),n.apply(this,K),u);Yr(D),f>0?Ze(this).transition().duration(f).call(R,I,j,D):Ze(this).call(_.transform,I,j,D)}}function k(D,...K){if(t.apply(this,arguments)){var A=D.touches,j=A.length,V=L(this,K,D.changedTouches.length===j).event(D),q,I,N,G;for(th(D),I=0;I<j;++I)N=A[I],G=gn(N,this),G=[G,this.__zoom.invert(G),N.identifier],V.touch0?!V.touch1&&V.touch0[2]!==G[2]&&(V.touch1=G,V.taps=0):(V.touch0=G,q=!0,V.taps=1+!!g);g&&(g=clearTimeout(g)),q&&(V.taps<2&&(p=G[0],g=setTimeout(function(){g=null},x)),Tu(this),V.start())}}function Y(D,...K){if(this.__zooming){var A=L(this,K).event(D),j=D.changedTouches,V=j.length,q,I,N,G;for(Yr(D),q=0;q<V;++q)I=j[q],N=gn(I,this),A.touch0&&A.touch0[2]===I.identifier?A.touch0[0]=N:A.touch1&&A.touch1[2]===I.identifier&&(A.touch1[0]=N);if(I=A.that.__zoom,A.touch1){var et=A.touch0[0],B=A.touch0[1],O=A.touch1[0],Z=A.touch1[1],J=(J=O[0]-et[0])*J+(J=O[1]-et[1])*J,tt=(tt=Z[0]-B[0])*tt+(tt=Z[1]-B[1])*tt;I=C(I,Math.sqrt(J/tt)),N=[(et[0]+O[0])/2,(et[1]+O[1])/2],G=[(B[0]+Z[0])/2,(B[1]+Z[1])/2]}else if(A.touch0)N=A.touch0[0],G=A.touch0[1];else return;A.zoom("touch",a(S(I,N,G),A.extent,u))}}function $(D,...K){if(this.__zooming){var A=L(this,K).event(D),j=D.changedTouches,V=j.length,q,I;for(th(D),v&&clearTimeout(v),v=setTimeout(function(){v=null},x),q=0;q<V;++q)I=j[q],A.touch0&&A.touch0[2]===I.identifier?delete A.touch0:A.touch1&&A.touch1[2]===I.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(I=gn(I,this),Math.hypot(p[0]-I[0],p[1]-I[1])<M)){var N=Ze(this).on("dblclick.zoom");N&&N.apply(this,arguments)}}}return _.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:su(+D),_):r},_.filter=function(D){return arguments.length?(t=typeof D=="function"?D:su(!!D),_):t},_.touchable=function(D){return arguments.length?(l=typeof D=="function"?D:su(!!D),_):l},_.extent=function(D){return arguments.length?(n=typeof D=="function"?D:su([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),_):n},_.scaleExtent=function(D){return arguments.length?(c[0]=+D[0],c[1]=+D[1],_):[c[0],c[1]]},_.translateExtent=function(D){return arguments.length?(u[0][0]=+D[0][0],u[1][0]=+D[1][0],u[0][1]=+D[0][1],u[1][1]=+D[1][1],_):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},_.constrain=function(D){return arguments.length?(a=D,_):a},_.duration=function(D){return arguments.length?(f=+D,_):f},_.interpolate=function(D){return arguments.length?(h=D,_):h},_.on=function(){var D=m.on.apply(m,arguments);return D===m?_:D},_.clickDistance=function(D){return arguments.length?(E=(D=+D)*D,_):Math.sqrt(E)},_.tapDistance=function(D){return arguments.length?(M=+D,_):M},_}const Vn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:n,sourceHandle:a,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${t==="source"?a:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},oo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],zw=["Enter"," ","Escape"],Ow={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:n,y:a})=>`Moved selected node ${t}. New position, x: ${n}, y: ${a}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ls;(function(t){t.Strict="strict",t.Loose="loose"})(Ls||(Ls={}));var za;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(za||(za={}));var lo;(function(t){t.Partial="partial",t.Full="full"})(lo||(lo={}));const Rw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Pi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Pi||(Pi={}));var Yu;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Yu||(Yu={}));var xt;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(xt||(xt={}));const gx={[xt.Left]:xt.Right,[xt.Right]:xt.Left,[xt.Top]:xt.Bottom,[xt.Bottom]:xt.Top};function jw(t){return t===null?null:t?"valid":"invalid"}const Vw=t=>"id"in t&&"source"in t&&"target"in t,sz=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Dm=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),So=(t,n=[0,0])=>{const{width:a,height:r}=ci(t),l=t.origin??n,c=a*l[0],u=r*l[1];return{x:t.position.x-c,y:t.position.y-u}},rz=(t,n={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const a=t.reduce((r,l)=>{const c=typeof l=="string";let u=!n.nodeLookup&&!c?l:void 0;n.nodeLookup&&(u=c?n.nodeLookup.get(l):Dm(l)?l:n.nodeLookup.get(l.id));const f=u?Gu(u,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return ic(r,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ac(a)},Eo=(t,n={})=>{let a={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(l=>{(n.filter===void 0||n.filter(l))&&(a=ic(a,Gu(l)),r=!0)}),r?ac(a):{x:0,y:0,width:0,height:0}},zm=(t,n,[a,r,l]=[0,0,1],c=!1,u=!1)=>{const f={..._o(n,[a,r,l]),width:n.width/l,height:n.height/l},h=[];for(const m of t.values()){const{measured:g,selectable:p=!0,hidden:v=!1}=m;if(u&&!p||v)continue;const x=g.width??m.width??m.initialWidth??null,b=g.height??m.height??m.initialHeight??null,E=uo(f,Bs(m)),M=(x??0)*(b??0),_=c&&E>0;(!m.internals.handleBounds||_||E>=M||m.dragging)&&h.push(m)}return h},oz=(t,n)=>{const a=new Set;return t.forEach(r=>{a.add(r.id)}),n.filter(r=>a.has(r.source)||a.has(r.target))};function lz(t,n){const a=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(l=>l.id)):null;return t.forEach(l=>{l.measured.width&&l.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!l.hidden)&&(!r||r.has(l.id))&&a.set(l.id,l)}),a}async function uz({nodes:t,width:n,height:a,panZoom:r,minZoom:l,maxZoom:c},u){if(t.size===0)return Promise.resolve(!0);const f=lz(t,u),h=Eo(f),m=Om(h,n,a,(u==null?void 0:u.minZoom)??l,(u==null?void 0:u.maxZoom)??c,(u==null?void 0:u.padding)??.1);return await r.setViewport(m,{duration:u==null?void 0:u.duration,ease:u==null?void 0:u.ease,interpolate:u==null?void 0:u.interpolate}),Promise.resolve(!0)}function Lw({nodeId:t,nextPosition:n,nodeLookup:a,nodeOrigin:r=[0,0],nodeExtent:l,onError:c}){const u=a.get(t),f=u.parentId?a.get(u.parentId):void 0,{x:h,y:m}=f?f.internals.positionAbsolute:{x:0,y:0},g=u.origin??r;let p=u.extent||l;if(u.extent==="parent"&&!u.expandParent)if(!f)c==null||c("005",Vn.error005());else{const x=f.measured.width,b=f.measured.height;x&&b&&(p=[[h,m],[h+x,m+b]])}else f&&Hs(u.extent)&&(p=[[u.extent[0][0]+h,u.extent[0][1]+m],[u.extent[1][0]+h,u.extent[1][1]+m]]);const v=Hs(p)?Va(n,p,u.measured):n;return(u.measured.width===void 0||u.measured.height===void 0)&&(c==null||c("015",Vn.error015())),{position:{x:v.x-h+(u.measured.width??0)*g[0],y:v.y-m+(u.measured.height??0)*g[1]},positionAbsolute:v}}async function cz({nodesToRemove:t=[],edgesToRemove:n=[],nodes:a,edges:r,onBeforeDelete:l}){const c=new Set(t.map(v=>v.id)),u=[];for(const v of a){if(v.deletable===!1)continue;const x=c.has(v.id),b=!x&&v.parentId&&u.find(E=>E.id===v.parentId);(x||b)&&u.push(v)}const f=new Set(n.map(v=>v.id)),h=r.filter(v=>v.deletable!==!1),g=oz(u,h);for(const v of h)f.has(v.id)&&!g.find(b=>b.id===v.id)&&g.push(v);if(!l)return{edges:g,nodes:u};const p=await l({nodes:u,edges:g});return typeof p=="boolean"?p?{edges:g,nodes:u}:{edges:[],nodes:[]}:p}const ks=(t,n=0,a=1)=>Math.min(Math.max(t,n),a),Va=(t={x:0,y:0},n,a)=>({x:ks(t.x,n[0][0],n[1][0]-((a==null?void 0:a.width)??0)),y:ks(t.y,n[0][1],n[1][1]-((a==null?void 0:a.height)??0))});function kw(t,n,a){const{width:r,height:l}=ci(a),{x:c,y:u}=a.internals.positionAbsolute;return Va(t,[[c,u],[c+r,u+l]],n)}const yx=(t,n,a)=>t<n?ks(Math.abs(t-n),1,n)/n:t>a?-ks(Math.abs(t-a),1,n)/n:0,Bw=(t,n,a=15,r=40)=>{const l=yx(t.x,r,n.width-r)*a,c=yx(t.y,r,n.height-r)*a;return[l,c]},ic=(t,n)=>({x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),x2:Math.max(t.x2,n.x2),y2:Math.max(t.y2,n.y2)}),Xh=({x:t,y:n,width:a,height:r})=>({x:t,y:n,x2:t+a,y2:n+r}),ac=({x:t,y:n,x2:a,y2:r})=>({x:t,y:n,width:a-t,height:r-n}),Bs=(t,n=[0,0])=>{var l,c;const{x:a,y:r}=Dm(t)?t.internals.positionAbsolute:So(t,n);return{x:a,y:r,width:((l=t.measured)==null?void 0:l.width)??t.width??t.initialWidth??0,height:((c=t.measured)==null?void 0:c.height)??t.height??t.initialHeight??0}},Gu=(t,n=[0,0])=>{var l,c;const{x:a,y:r}=Dm(t)?t.internals.positionAbsolute:So(t,n);return{x:a,y:r,x2:a+(((l=t.measured)==null?void 0:l.width)??t.width??t.initialWidth??0),y2:r+(((c=t.measured)==null?void 0:c.height)??t.height??t.initialHeight??0)}},Hw=(t,n)=>ac(ic(Xh(t),Xh(n))),uo=(t,n)=>{const a=Math.max(0,Math.min(t.x+t.width,n.x+n.width)-Math.max(t.x,n.x)),r=Math.max(0,Math.min(t.y+t.height,n.y+n.height)-Math.max(t.y,n.y));return Math.ceil(a*r)},vx=t=>vn(t.width)&&vn(t.height)&&vn(t.x)&&vn(t.y),vn=t=>!isNaN(t)&&isFinite(t),fz=(t,n)=>{},To=(t,n=[1,1])=>({x:n[0]*Math.round(t.x/n[0]),y:n[1]*Math.round(t.y/n[1])}),_o=({x:t,y:n},[a,r,l],c=!1,u=[1,1])=>{const f={x:(t-a)/l,y:(n-r)/l};return c?To(f,u):f},qu=({x:t,y:n},[a,r,l])=>({x:t*l+a,y:n*l+r});function Ts(t,n){if(typeof t=="number")return Math.floor((n-n/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const a=parseFloat(t);if(!Number.isNaN(a))return Math.floor(a)}if(typeof t=="string"&&t.endsWith("%")){const a=parseFloat(t);if(!Number.isNaN(a))return Math.floor(n*a*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function dz(t,n,a){if(typeof t=="string"||typeof t=="number"){const r=Ts(t,a),l=Ts(t,n);return{top:r,right:l,bottom:r,left:l,x:l*2,y:r*2}}if(typeof t=="object"){const r=Ts(t.top??t.y??0,a),l=Ts(t.bottom??t.y??0,a),c=Ts(t.left??t.x??0,n),u=Ts(t.right??t.x??0,n);return{top:r,right:u,bottom:l,left:c,x:c+u,y:r+l}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function hz(t,n,a,r,l,c){const{x:u,y:f}=qu(t,[n,a,r]),{x:h,y:m}=qu({x:t.x+t.width,y:t.y+t.height},[n,a,r]),g=l-h,p=c-m;return{left:Math.floor(u),top:Math.floor(f),right:Math.floor(g),bottom:Math.floor(p)}}const Om=(t,n,a,r,l,c)=>{const u=dz(c,n,a),f=(n-u.x)/t.width,h=(a-u.y)/t.height,m=Math.min(f,h),g=ks(m,r,l),p=t.x+t.width/2,v=t.y+t.height/2,x=n/2-p*g,b=a/2-v*g,E=hz(t,x,b,g,n,a),M={left:Math.min(E.left-u.left,0),top:Math.min(E.top-u.top,0),right:Math.min(E.right-u.right,0),bottom:Math.min(E.bottom-u.bottom,0)};return{x:x-M.left+M.right,y:b-M.top+M.bottom,zoom:g}},co=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Hs(t){return t!=null&&t!=="parent"}function ci(t){var n,a;return{width:((n=t.measured)==null?void 0:n.width)??t.width??t.initialWidth??0,height:((a=t.measured)==null?void 0:a.height)??t.height??t.initialHeight??0}}function Uw(t){var n,a;return(((n=t.measured)==null?void 0:n.width)??t.width??t.initialWidth)!==void 0&&(((a=t.measured)==null?void 0:a.height)??t.height??t.initialHeight)!==void 0}function Yw(t,n={width:0,height:0},a,r,l){const c={...t},u=r.get(a);if(u){const f=u.origin||l;c.x+=u.internals.positionAbsolute.x-(n.width??0)*f[0],c.y+=u.internals.positionAbsolute.y-(n.height??0)*f[1]}return c}function xx(t,n){if(t.size!==n.size)return!1;for(const a of t)if(!n.has(a))return!1;return!0}function mz(){let t,n;return{promise:new Promise((r,l)=>{t=r,n=l}),resolve:t,reject:n}}function pz(t){return{...Ow,...t||{}}}function Fr(t,{snapGrid:n=[0,0],snapToGrid:a=!1,transform:r,containerBounds:l}){const{x:c,y:u}=xn(t),f=_o({x:c-((l==null?void 0:l.left)??0),y:u-((l==null?void 0:l.top)??0)},r),{x:h,y:m}=a?To(f,n):f;return{xSnapped:h,ySnapped:m,...f}}const Rm=t=>({width:t.offsetWidth,height:t.offsetHeight}),Gw=t=>{var n;return((n=t==null?void 0:t.getRootNode)==null?void 0:n.call(t))||(window==null?void 0:window.document)},gz=["INPUT","SELECT","TEXTAREA"];function qw(t){var r,l;const n=((l=(r=t.composedPath)==null?void 0:r.call(t))==null?void 0:l[0])||t.target;return(n==null?void 0:n.nodeType)!==1?!1:gz.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const Xw=t=>"clientX"in t,xn=(t,n)=>{var c,u;const a=Xw(t),r=a?t.clientX:(c=t.touches)==null?void 0:c[0].clientX,l=a?t.clientY:(u=t.touches)==null?void 0:u[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:l-((n==null?void 0:n.top)??0)}},bx=(t,n,a,r,l)=>{const c=n.querySelectorAll(`.${t}`);return!c||!c.length?null:Array.from(c).map(u=>{const f=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:t,nodeId:l,position:u.getAttribute("data-handlepos"),x:(f.left-a.left)/r,y:(f.top-a.top)/r,...Rm(u)}})};function Pw({sourceX:t,sourceY:n,targetX:a,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:f}){const h=t*.125+l*.375+u*.375+a*.125,m=n*.125+c*.375+f*.375+r*.125,g=Math.abs(h-t),p=Math.abs(m-n);return[h,m,g,p]}function ru(t,n){return t>=0?.5*t:n*25*Math.sqrt(-t)}function wx({pos:t,x1:n,y1:a,x2:r,y2:l,c}){switch(t){case xt.Left:return[n-ru(n-r,c),a];case xt.Right:return[n+ru(r-n,c),a];case xt.Top:return[n,a-ru(a-l,c)];case xt.Bottom:return[n,a+ru(l-a,c)]}}function $w({sourceX:t,sourceY:n,sourcePosition:a=xt.Bottom,targetX:r,targetY:l,targetPosition:c=xt.Top,curvature:u=.25}){const[f,h]=wx({pos:a,x1:t,y1:n,x2:r,y2:l,c:u}),[m,g]=wx({pos:c,x1:r,y1:l,x2:t,y2:n,c:u}),[p,v,x,b]=Pw({sourceX:t,sourceY:n,targetX:r,targetY:l,sourceControlX:f,sourceControlY:h,targetControlX:m,targetControlY:g});return[`M${t},${n} C${f},${h} ${m},${g} ${r},${l}`,p,v,x,b]}function Kw({sourceX:t,sourceY:n,targetX:a,targetY:r}){const l=Math.abs(a-t)/2,c=a<t?a+l:a-l,u=Math.abs(r-n)/2,f=r<n?r+u:r-u;return[c,f,l,u]}function yz({sourceNode:t,targetNode:n,selected:a=!1,zIndex:r=0,elevateOnSelect:l=!1,zIndexMode:c="basic"}){if(c==="manual")return r;const u=l&&a?r+1e3:r,f=Math.max(t.parentId||l&&t.selected?t.internals.z:0,n.parentId||l&&n.selected?n.internals.z:0);return u+f}function vz({sourceNode:t,targetNode:n,width:a,height:r,transform:l}){const c=ic(Gu(t),Gu(n));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-l[0]/l[2],y:-l[1]/l[2],width:a/l[2],height:r/l[2]};return uo(u,ac(c))>0}const xz=({source:t,sourceHandle:n,target:a,targetHandle:r})=>`xy-edge__${t}${n||""}-${a}${r||""}`,bz=(t,n)=>n.some(a=>a.source===t.source&&a.target===t.target&&(a.sourceHandle===t.sourceHandle||!a.sourceHandle&&!t.sourceHandle)&&(a.targetHandle===t.targetHandle||!a.targetHandle&&!t.targetHandle)),wz=(t,n,a={})=>{if(!t.source||!t.target)return n;const r=a.getEdgeId||xz;let l;return Vw(t)?l={...t}:l={...t,id:r(t)},bz(l,n)?n:(l.sourceHandle===null&&delete l.sourceHandle,l.targetHandle===null&&delete l.targetHandle,n.concat(l))};function Zw({sourceX:t,sourceY:n,targetX:a,targetY:r}){const[l,c,u,f]=Kw({sourceX:t,sourceY:n,targetX:a,targetY:r});return[`M ${t},${n}L ${a},${r}`,l,c,u,f]}const Sx={[xt.Left]:{x:-1,y:0},[xt.Right]:{x:1,y:0},[xt.Top]:{x:0,y:-1},[xt.Bottom]:{x:0,y:1}},Sz=({source:t,sourcePosition:n=xt.Bottom,target:a})=>n===xt.Left||n===xt.Right?t.x<a.x?{x:1,y:0}:{x:-1,y:0}:t.y<a.y?{x:0,y:1}:{x:0,y:-1},Ex=(t,n)=>Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2));function Ez({source:t,sourcePosition:n=xt.Bottom,target:a,targetPosition:r=xt.Top,center:l,offset:c,stepPosition:u}){const f=Sx[n],h=Sx[r],m={x:t.x+f.x*c,y:t.y+f.y*c},g={x:a.x+h.x*c,y:a.y+h.y*c},p=Sz({source:m,sourcePosition:n,target:g}),v=p.x!==0?"x":"y",x=p[v];let b=[],E,M;const _={x:0,y:0},C={x:0,y:0},[,,S,T]=Kw({sourceX:t.x,sourceY:t.y,targetX:a.x,targetY:a.y});if(f[v]*h[v]===-1){v==="x"?(E=l.x??m.x+(g.x-m.x)*u,M=l.y??(m.y+g.y)/2):(E=l.x??(m.x+g.x)/2,M=l.y??m.y+(g.y-m.y)*u);const L=[{x:E,y:m.y},{x:E,y:g.y}],U=[{x:m.x,y:M},{x:g.x,y:M}];f[v]===x?b=v==="x"?L:U:b=v==="x"?U:L}else{const L=[{x:m.x,y:g.y}],U=[{x:g.x,y:m.y}];if(v==="x"?b=f.x===x?U:L:b=f.y===x?L:U,n===r){const Y=Math.abs(t[v]-a[v]);if(Y<=c){const $=Math.min(c-1,c-Y);f[v]===x?_[v]=(m[v]>t[v]?-1:1)*$:C[v]=(g[v]>a[v]?-1:1)*$}}if(n!==r){const Y=v==="x"?"y":"x",$=f[v]===h[Y],D=m[Y]>g[Y],K=m[Y]<g[Y];(f[v]===1&&(!$&&D||$&&K)||f[v]!==1&&(!$&&K||$&&D))&&(b=v==="x"?L:U)}const P={x:m.x+_.x,y:m.y+_.y},F={x:g.x+C.x,y:g.y+C.y},X=Math.max(Math.abs(P.x-b[0].x),Math.abs(F.x-b[0].x)),k=Math.max(Math.abs(P.y-b[0].y),Math.abs(F.y-b[0].y));X>=k?(E=(P.x+F.x)/2,M=b[0].y):(E=b[0].x,M=(P.y+F.y)/2)}return[[t,{x:m.x+_.x,y:m.y+_.y},...b,{x:g.x+C.x,y:g.y+C.y},a],E,M,S,T]}function Tz(t,n,a,r){const l=Math.min(Ex(t,n)/2,Ex(n,a)/2,r),{x:c,y:u}=n;if(t.x===c&&c===a.x||t.y===u&&u===a.y)return`L${c} ${u}`;if(t.y===u){const m=t.x<a.x?-1:1,g=t.y<a.y?1:-1;return`L ${c+l*m},${u}Q ${c},${u} ${c},${u+l*g}`}const f=t.x<a.x?1:-1,h=t.y<a.y?-1:1;return`L ${c},${u+l*h}Q ${c},${u} ${c+l*f},${u}`}function Xu({sourceX:t,sourceY:n,sourcePosition:a=xt.Bottom,targetX:r,targetY:l,targetPosition:c=xt.Top,borderRadius:u=5,centerX:f,centerY:h,offset:m=20,stepPosition:g=.5}){const[p,v,x,b,E]=Ez({source:{x:t,y:n},sourcePosition:a,target:{x:r,y:l},targetPosition:c,center:{x:f,y:h},offset:m,stepPosition:g});return[p.reduce((_,C,S)=>{let T="";return S>0&&S<p.length-1?T=Tz(p[S-1],C,p[S+1],u):T=`${S===0?"M":"L"}${C.x} ${C.y}`,_+=T,_},""),v,x,b,E]}function Tx(t){var n;return t&&!!(t.internals.handleBounds||(n=t.handles)!=null&&n.length)&&!!(t.measured.width||t.width||t.initialWidth)}function _z(t){var p;const{sourceNode:n,targetNode:a}=t;if(!Tx(n)||!Tx(a))return null;const r=n.internals.handleBounds||_x(n.handles),l=a.internals.handleBounds||_x(a.handles),c=Mx((r==null?void 0:r.source)??[],t.sourceHandle),u=Mx(t.connectionMode===Ls.Strict?(l==null?void 0:l.target)??[]:((l==null?void 0:l.target)??[]).concat((l==null?void 0:l.source)??[]),t.targetHandle);if(!c||!u)return(p=t.onError)==null||p.call(t,"008",Vn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const f=(c==null?void 0:c.position)||xt.Bottom,h=(u==null?void 0:u.position)||xt.Top,m=La(n,c,f),g=La(a,u,h);return{sourceX:m.x,sourceY:m.y,targetX:g.x,targetY:g.y,sourcePosition:f,targetPosition:h}}function _x(t){if(!t)return null;const n=[],a=[];for(const r of t)r.width=r.width??1,r.height=r.height??1,r.type==="source"?n.push(r):r.type==="target"&&a.push(r);return{source:n,target:a}}function La(t,n,a=xt.Left,r=!1){const l=((n==null?void 0:n.x)??0)+t.internals.positionAbsolute.x,c=((n==null?void 0:n.y)??0)+t.internals.positionAbsolute.y,{width:u,height:f}=n??ci(t);if(r)return{x:l+u/2,y:c+f/2};switch((n==null?void 0:n.position)??a){case xt.Top:return{x:l+u/2,y:c};case xt.Right:return{x:l+u,y:c+f/2};case xt.Bottom:return{x:l+u/2,y:c+f};case xt.Left:return{x:l,y:c+f/2}}}function Mx(t,n){return t&&(n?t.find(a=>a.id===n):t[0])||null}function Ph(t,n){return t?typeof t=="string"?t:`${n?`${n}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`:""}function Mz(t,{id:n,defaultColor:a,defaultMarkerStart:r,defaultMarkerEnd:l}){const c=new Set;return t.reduce((u,f)=>([f.markerStart||r,f.markerEnd||l].forEach(h=>{if(h&&typeof h=="object"){const m=Ph(h,n);c.has(m)||(u.push({id:m,color:h.color||a,...h}),c.add(m))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))}const Iw=1e3,Az=10,jm={nodeOrigin:[0,0],nodeExtent:oo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Cz={...jm,checkEquality:!0};function Vm(t,n){const a={...t};for(const r in n)n[r]!==void 0&&(a[r]=n[r]);return a}function Nz(t,n,a){const r=Vm(jm,a);for(const l of t.values())if(l.parentId)km(l,t,n,r);else{const c=So(l,r.nodeOrigin),u=Hs(l.extent)?l.extent:r.nodeExtent,f=Va(c,u,ci(l));l.internals.positionAbsolute=f}}function Dz(t,n){if(!t.handles)return t.measured?n==null?void 0:n.internals.handleBounds:void 0;const a=[],r=[];for(const l of t.handles){const c={id:l.id,width:l.width??1,height:l.height??1,nodeId:t.id,x:l.x,y:l.y,position:l.position,type:l.type};l.type==="source"?a.push(c):l.type==="target"&&r.push(c)}return{source:a,target:r}}function Lm(t){return t==="manual"}function $h(t,n,a,r={}){var m,g;const l=Vm(Cz,r),c={i:0},u=new Map(n),f=l!=null&&l.elevateNodesOnSelect&&!Lm(l.zIndexMode)?Iw:0;let h=t.length>0;n.clear(),a.clear();for(const p of t){let v=u.get(p.id);if(l.checkEquality&&p===(v==null?void 0:v.internals.userNode))n.set(p.id,v);else{const x=So(p,l.nodeOrigin),b=Hs(p.extent)?p.extent:l.nodeExtent,E=Va(x,b,ci(p));v={...l.defaults,...p,measured:{width:(m=p.measured)==null?void 0:m.width,height:(g=p.measured)==null?void 0:g.height},internals:{positionAbsolute:E,handleBounds:Dz(p,v),z:Qw(p,f,l.zIndexMode),userNode:p}},n.set(p.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(h=!1),p.parentId&&km(v,n,a,r,c)}return h}function zz(t,n){if(!t.parentId)return;const a=n.get(t.parentId);a?a.set(t.id,t):n.set(t.parentId,new Map([[t.id,t]]))}function km(t,n,a,r,l){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:f,zIndexMode:h}=Vm(jm,r),m=t.parentId,g=n.get(m);if(!g){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}zz(t,a),l&&!g.parentId&&g.internals.rootParentIndex===void 0&&h==="auto"&&(g.internals.rootParentIndex=++l.i,g.internals.z=g.internals.z+l.i*Az),l&&g.internals.rootParentIndex!==void 0&&(l.i=g.internals.rootParentIndex);const p=c&&!Lm(h)?Iw:0,{x:v,y:x,z:b}=Oz(t,g,u,f,p,h),{positionAbsolute:E}=t.internals,M=v!==E.x||x!==E.y;(M||b!==t.internals.z)&&n.set(t.id,{...t,internals:{...t.internals,positionAbsolute:M?{x:v,y:x}:E,z:b}})}function Qw(t,n,a){const r=vn(t.zIndex)?t.zIndex:0;return Lm(a)?r:r+(t.selected?n:0)}function Oz(t,n,a,r,l,c){const{x:u,y:f}=n.internals.positionAbsolute,h=ci(t),m=So(t,a),g=Hs(t.extent)?Va(m,t.extent,h):m;let p=Va({x:u+g.x,y:f+g.y},r,h);t.extent==="parent"&&(p=kw(p,h,n));const v=Qw(t,l,c),x=n.internals.z??0;return{x:p.x,y:p.y,z:x>=v?x+1:v}}function Bm(t,n,a,r=[0,0]){var u;const l=[],c=new Map;for(const f of t){const h=n.get(f.parentId);if(!h)continue;const m=((u=c.get(f.parentId))==null?void 0:u.expandedRect)??Bs(h),g=Hw(m,f.rect);c.set(f.parentId,{expandedRect:g,parent:h})}return c.size>0&&c.forEach(({expandedRect:f,parent:h},m)=>{var S;const g=h.internals.positionAbsolute,p=ci(h),v=h.origin??r,x=f.x<g.x?Math.round(Math.abs(g.x-f.x)):0,b=f.y<g.y?Math.round(Math.abs(g.y-f.y)):0,E=Math.max(p.width,Math.round(f.width)),M=Math.max(p.height,Math.round(f.height)),_=(E-p.width)*v[0],C=(M-p.height)*v[1];(x>0||b>0||_||C)&&(l.push({id:m,type:"position",position:{x:h.position.x-x+_,y:h.position.y-b+C}}),(S=a.get(m))==null||S.forEach(T=>{t.some(R=>R.id===T.id)||l.push({id:T.id,type:"position",position:{x:T.position.x+x,y:T.position.y+b}})})),(p.width<f.width||p.height<f.height||x||b)&&l.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:E+(x?v[0]*x-_:0),height:M+(b?v[1]*b-C:0)}})}),l}function Rz(t,n,a,r,l,c,u){const f=r==null?void 0:r.querySelector(".xyflow__viewport");let h=!1;if(!f)return{changes:[],updatedInternals:h};const m=[],g=window.getComputedStyle(f),{m22:p}=new window.DOMMatrixReadOnly(g.transform),v=[];for(const x of t.values()){const b=n.get(x.id);if(!b)continue;if(b.hidden){n.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),h=!0;continue}const E=Rm(x.nodeElement),M=b.measured.width!==E.width||b.measured.height!==E.height;if(!!(E.width&&E.height&&(M||!b.internals.handleBounds||x.force))){const C=x.nodeElement.getBoundingClientRect(),S=Hs(b.extent)?b.extent:c;let{positionAbsolute:T}=b.internals;b.parentId&&b.extent==="parent"?T=kw(T,E,n.get(b.parentId)):S&&(T=Va(T,S,E));const R={...b,measured:E,internals:{...b.internals,positionAbsolute:T,handleBounds:{source:bx("source",x.nodeElement,C,p,b.id),target:bx("target",x.nodeElement,C,p,b.id)}}};n.set(b.id,R),b.parentId&&km(R,n,a,{nodeOrigin:l,zIndexMode:u}),h=!0,M&&(m.push({id:b.id,type:"dimensions",dimensions:E}),b.expandParent&&b.parentId&&v.push({id:b.id,parentId:b.parentId,rect:Bs(R,l)}))}}if(v.length>0){const x=Bm(v,n,a,l);m.push(...x)}return{changes:m,updatedInternals:h}}async function jz({delta:t,panZoom:n,transform:a,translateExtent:r,width:l,height:c}){if(!n||!t.x&&!t.y)return Promise.resolve(!1);const u=await n.setViewportConstrained({x:a[0]+t.x,y:a[1]+t.y,zoom:a[2]},[[0,0],[l,c]],r),f=!!u&&(u.x!==a[0]||u.y!==a[1]||u.k!==a[2]);return Promise.resolve(f)}function Ax(t,n,a,r,l,c){let u=l;const f=r.get(u)||new Map;r.set(u,f.set(a,n)),u=`${l}-${t}`;const h=r.get(u)||new Map;if(r.set(u,h.set(a,n)),c){u=`${l}-${t}-${c}`;const m=r.get(u)||new Map;r.set(u,m.set(a,n))}}function Fw(t,n,a){t.clear(),n.clear();for(const r of a){const{source:l,target:c,sourceHandle:u=null,targetHandle:f=null}=r,h={edgeId:r.id,source:l,target:c,sourceHandle:u,targetHandle:f},m=`${l}-${u}--${c}-${f}`,g=`${c}-${f}--${l}-${u}`;Ax("source",h,g,t,l,u),Ax("target",h,m,t,c,f),n.set(r.id,r)}}function Jw(t,n){if(!t.parentId)return!1;const a=n.get(t.parentId);return a?a.selected?!0:Jw(a,n):!1}function Cx(t,n,a){var l;let r=t;do{if((l=r==null?void 0:r.matches)!=null&&l.call(r,n))return!0;if(r===a)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function Vz(t,n,a,r){const l=new Map;for(const[c,u]of t)if((u.selected||u.id===r)&&(!u.parentId||!Jw(u,t))&&(u.draggable||n&&typeof u.draggable>"u")){const f=t.get(c);f&&l.set(c,{id:c,position:f.position||{x:0,y:0},distance:{x:a.x-f.internals.positionAbsolute.x,y:a.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return l}function eh({nodeId:t,dragItems:n,nodeLookup:a,dragging:r=!0}){var u,f,h;const l=[];for(const[m,g]of n){const p=(u=a.get(m))==null?void 0:u.internals.userNode;p&&l.push({...p,position:g.position,dragging:r})}if(!t)return[l[0],l];const c=(f=a.get(t))==null?void 0:f.internals.userNode;return[c?{...c,position:((h=n.get(t))==null?void 0:h.position)||c.position,dragging:r}:l[0],l]}function Lz({dragItems:t,snapGrid:n,x:a,y:r}){const l=t.values().next().value;if(!l)return null;const c={x:a-l.distance.x,y:r-l.distance.y},u=To(c,n);return{x:u.x-c.x,y:u.y-c.y}}function kz({onNodeMouseDown:t,getStoreItems:n,onDragStart:a,onDrag:r,onDragStop:l}){let c={x:null,y:null},u=0,f=new Map,h=!1,m={x:0,y:0},g=null,p=!1,v=null,x=!1,b=!1,E=null;function M({noDragClassName:C,handleSelector:S,domNode:T,isSelectable:R,nodeId:L,nodeClickDistance:U=0}){v=Ze(T);function P({x:Y,y:$}){const{nodeLookup:D,nodeExtent:K,snapGrid:A,snapToGrid:j,nodeOrigin:V,onNodeDrag:q,onSelectionDrag:I,onError:N,updateNodePositions:G}=n();c={x:Y,y:$};let et=!1;const B=f.size>1,O=B&&K?Xh(Eo(f)):null,Z=B&&j?Lz({dragItems:f,snapGrid:A,x:Y,y:$}):null;for(const[J,tt]of f){if(!D.has(J))continue;let at={x:Y-tt.distance.x,y:$-tt.distance.y};j&&(at=Z?{x:Math.round(at.x+Z.x),y:Math.round(at.y+Z.y)}:To(at,A));let dt=null;if(B&&K&&!tt.extent&&O){const{positionAbsolute:vt}=tt.internals,wt=vt.x-O.x+K[0][0],Et=vt.x+tt.measured.width-O.x2+K[1][0],_t=vt.y-O.y+K[0][1],te=vt.y+tt.measured.height-O.y2+K[1][1];dt=[[wt,_t],[Et,te]]}const{position:ht,positionAbsolute:mt}=Lw({nodeId:J,nextPosition:at,nodeLookup:D,nodeExtent:dt||K,nodeOrigin:V,onError:N});et=et||tt.position.x!==ht.x||tt.position.y!==ht.y,tt.position=ht,tt.internals.positionAbsolute=mt}if(b=b||et,!!et&&(G(f,!0),E&&(r||q||!L&&I))){const[J,tt]=eh({nodeId:L,dragItems:f,nodeLookup:D});r==null||r(E,f,J,tt),q==null||q(E,J,tt),L||I==null||I(E,tt)}}async function F(){if(!g)return;const{transform:Y,panBy:$,autoPanSpeed:D,autoPanOnNodeDrag:K}=n();if(!K){h=!1,cancelAnimationFrame(u);return}const[A,j]=Bw(m,g,D);(A!==0||j!==0)&&(c.x=(c.x??0)-A/Y[2],c.y=(c.y??0)-j/Y[2],await $({x:A,y:j})&&P(c)),u=requestAnimationFrame(F)}function X(Y){var B;const{nodeLookup:$,multiSelectionActive:D,nodesDraggable:K,transform:A,snapGrid:j,snapToGrid:V,selectNodesOnDrag:q,onNodeDragStart:I,onSelectionDragStart:N,unselectNodesAndEdges:G}=n();p=!0,(!q||!R)&&!D&&L&&((B=$.get(L))!=null&&B.selected||G()),R&&q&&L&&(t==null||t(L));const et=Fr(Y.sourceEvent,{transform:A,snapGrid:j,snapToGrid:V,containerBounds:g});if(c=et,f=Vz($,K,et,L),f.size>0&&(a||I||!L&&N)){const[O,Z]=eh({nodeId:L,dragItems:f,nodeLookup:$});a==null||a(Y.sourceEvent,f,O,Z),I==null||I(Y.sourceEvent,O,Z),L||N==null||N(Y.sourceEvent,Z)}}const k=pw().clickDistance(U).on("start",Y=>{const{domNode:$,nodeDragThreshold:D,transform:K,snapGrid:A,snapToGrid:j}=n();g=($==null?void 0:$.getBoundingClientRect())||null,x=!1,b=!1,E=Y.sourceEvent,D===0&&X(Y),c=Fr(Y.sourceEvent,{transform:K,snapGrid:A,snapToGrid:j,containerBounds:g}),m=xn(Y.sourceEvent,g)}).on("drag",Y=>{const{autoPanOnNodeDrag:$,transform:D,snapGrid:K,snapToGrid:A,nodeDragThreshold:j,nodeLookup:V}=n(),q=Fr(Y.sourceEvent,{transform:D,snapGrid:K,snapToGrid:A,containerBounds:g});if(E=Y.sourceEvent,(Y.sourceEvent.type==="touchmove"&&Y.sourceEvent.touches.length>1||L&&!V.has(L))&&(x=!0),!x){if(!h&&$&&p&&(h=!0,F()),!p){const I=xn(Y.sourceEvent,g),N=I.x-m.x,G=I.y-m.y;Math.sqrt(N*N+G*G)>j&&X(Y)}(c.x!==q.xSnapped||c.y!==q.ySnapped)&&f&&p&&(m=xn(Y.sourceEvent,g),P(q))}}).on("end",Y=>{if(!(!p||x)&&(h=!1,p=!1,cancelAnimationFrame(u),f.size>0)){const{nodeLookup:$,updateNodePositions:D,onNodeDragStop:K,onSelectionDragStop:A}=n();if(b&&(D(f,!1),b=!1),l||K||!L&&A){const[j,V]=eh({nodeId:L,dragItems:f,nodeLookup:$,dragging:!1});l==null||l(Y.sourceEvent,f,j,V),K==null||K(Y.sourceEvent,j,V),L||A==null||A(Y.sourceEvent,V)}}}).filter(Y=>{const $=Y.target;return!Y.button&&(!C||!Cx($,`.${C}`,T))&&(!S||Cx($,S,T))});v.call(k)}function _(){v==null||v.on(".drag",null)}return{update:M,destroy:_}}function Bz(t,n,a){const r=[],l={x:t.x-a,y:t.y-a,width:a*2,height:a*2};for(const c of n.values())uo(l,Bs(c))>0&&r.push(c);return r}const Hz=250;function Uz(t,n,a,r){var f,h;let l=[],c=1/0;const u=Bz(t,a,n+Hz);for(const m of u){const g=[...((f=m.internals.handleBounds)==null?void 0:f.source)??[],...((h=m.internals.handleBounds)==null?void 0:h.target)??[]];for(const p of g){if(r.nodeId===p.nodeId&&r.type===p.type&&r.id===p.id)continue;const{x:v,y:x}=La(m,p,p.position,!0),b=Math.sqrt(Math.pow(v-t.x,2)+Math.pow(x-t.y,2));b>n||(b<c?(l=[{...p,x:v,y:x}],c=b):b===c&&l.push({...p,x:v,y:x}))}}if(!l.length)return null;if(l.length>1){const m=r.type==="source"?"target":"source";return l.find(g=>g.type===m)??l[0]}return l[0]}function Ww(t,n,a,r,l,c=!1){var m,g,p;const u=r.get(t);if(!u)return null;const f=l==="strict"?(m=u.internals.handleBounds)==null?void 0:m[n]:[...((g=u.internals.handleBounds)==null?void 0:g.source)??[],...((p=u.internals.handleBounds)==null?void 0:p.target)??[]],h=(a?f==null?void 0:f.find(v=>v.id===a):f==null?void 0:f[0])??null;return h&&c?{...h,...La(u,h,h.position,!0)}:h}function tS(t,n){return t||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function Yz(t,n){let a=null;return n?a=!0:t&&!n&&(a=!1),a}const eS=()=>!0;function Gz(t,{connectionMode:n,connectionRadius:a,handleId:r,nodeId:l,edgeUpdaterType:c,isTarget:u,domNode:f,nodeLookup:h,lib:m,autoPanOnConnect:g,flowId:p,panBy:v,cancelConnection:x,onConnectStart:b,onConnect:E,onConnectEnd:M,isValidConnection:_=eS,onReconnectEnd:C,updateConnection:S,getTransform:T,getFromHandle:R,autoPanSpeed:L,dragThreshold:U=1,handleDomNode:P}){const F=Gw(t.target);let X=0,k;const{x:Y,y:$}=xn(t),D=tS(c,P),K=f==null?void 0:f.getBoundingClientRect();let A=!1;if(!K||!D)return;const j=Ww(l,D,r,h,n);if(!j)return;let V=xn(t,K),q=!1,I=null,N=!1,G=null;function et(){if(!g||!K)return;const[ht,mt]=Bw(V,K,L);v({x:ht,y:mt}),X=requestAnimationFrame(et)}const B={...j,nodeId:l,type:D,position:j.position},O=h.get(l);let J={inProgress:!0,isValid:null,from:La(O,B,xt.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:O,to:V,toHandle:null,toPosition:gx[B.position],toNode:null,pointer:V};function tt(){A=!0,S(J),b==null||b(t,{nodeId:l,handleId:r,handleType:D})}U===0&&tt();function at(ht){if(!A){const{x:te,y:De}=xn(ht),Ue=te-Y,un=De-$;if(!(Ue*Ue+un*un>U*U))return;tt()}if(!R()||!B){dt(ht);return}const mt=T();V=xn(ht,K),k=Uz(_o(V,mt,!1,[1,1]),a,h,B),q||(et(),q=!0);const vt=nS(ht,{handle:k,connectionMode:n,fromNodeId:l,fromHandleId:r,fromType:u?"target":"source",isValidConnection:_,doc:F,lib:m,flowId:p,nodeLookup:h});G=vt.handleDomNode,I=vt.connection,N=Yz(!!k,vt.isValid);const wt=h.get(l),Et=wt?La(wt,B,xt.Left,!0):J.from,_t={...J,from:Et,isValid:N,to:vt.toHandle&&N?qu({x:vt.toHandle.x,y:vt.toHandle.y},mt):V,toHandle:vt.toHandle,toPosition:N&&vt.toHandle?vt.toHandle.position:gx[B.position],toNode:vt.toHandle?h.get(vt.toHandle.nodeId):null,pointer:V};S(_t),J=_t}function dt(ht){if(!("touches"in ht&&ht.touches.length>0)){if(A){(k||G)&&I&&N&&(E==null||E(I));const{inProgress:mt,...vt}=J,wt={...vt,toPosition:J.toHandle?J.toPosition:null};M==null||M(ht,wt),c&&(C==null||C(ht,wt))}x(),cancelAnimationFrame(X),q=!1,N=!1,I=null,G=null,F.removeEventListener("mousemove",at),F.removeEventListener("mouseup",dt),F.removeEventListener("touchmove",at),F.removeEventListener("touchend",dt)}}F.addEventListener("mousemove",at),F.addEventListener("mouseup",dt),F.addEventListener("touchmove",at),F.addEventListener("touchend",dt)}function nS(t,{handle:n,connectionMode:a,fromNodeId:r,fromHandleId:l,fromType:c,doc:u,lib:f,flowId:h,isValidConnection:m=eS,nodeLookup:g}){const p=c==="target",v=n?u.querySelector(`.${f}-flow__handle[data-id="${h}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x,y:b}=xn(t),E=u.elementFromPoint(x,b),M=E!=null&&E.classList.contains(`${f}-flow__handle`)?E:v,_={handleDomNode:M,isValid:!1,connection:null,toHandle:null};if(M){const C=tS(void 0,M),S=M.getAttribute("data-nodeid"),T=M.getAttribute("data-handleid"),R=M.classList.contains("connectable"),L=M.classList.contains("connectableend");if(!S||!C)return _;const U={source:p?S:r,sourceHandle:p?T:l,target:p?r:S,targetHandle:p?l:T};_.connection=U;const F=R&&L&&(a===Ls.Strict?p&&C==="source"||!p&&C==="target":S!==r||T!==l);_.isValid=F&&m(U),_.toHandle=Ww(S,C,T,g,a,!0)}return _}const Kh={onPointerDown:Gz,isValid:nS};function qz({domNode:t,panZoom:n,getTransform:a,getViewScale:r}){const l=Ze(t);function c({translateExtent:f,width:h,height:m,zoomStep:g=1,pannable:p=!0,zoomable:v=!0,inversePan:x=!1}){const b=S=>{if(S.sourceEvent.type!=="wheel"||!n)return;const T=a(),R=S.sourceEvent.ctrlKey&&co()?10:1,L=-S.sourceEvent.deltaY*(S.sourceEvent.deltaMode===1?.05:S.sourceEvent.deltaMode?1:.002)*g,U=T[2]*Math.pow(2,L*R);n.scaleTo(U)};let E=[0,0];const M=S=>{(S.sourceEvent.type==="mousedown"||S.sourceEvent.type==="touchstart")&&(E=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY])},_=S=>{const T=a();if(S.sourceEvent.type!=="mousemove"&&S.sourceEvent.type!=="touchmove"||!n)return;const R=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY],L=[R[0]-E[0],R[1]-E[1]];E=R;const U=r()*Math.max(T[2],Math.log(T[2]))*(x?-1:1),P={x:T[0]-L[0]*U,y:T[1]-L[1]*U},F=[[0,0],[h,m]];n.setViewportConstrained({x:P.x,y:P.y,zoom:T[2]},F,f)},C=Dw().on("start",M).on("zoom",p?_:null).on("zoom.wheel",v?b:null);l.call(C,{})}function u(){l.on("zoom",null)}return{update:c,destroy:u,pointer:gn}}const sc=t=>({x:t.x,y:t.y,zoom:t.k}),nh=({x:t,y:n,zoom:a})=>nc.translate(t,n).scale(a),Ns=(t,n)=>t.target.closest(`.${n}`),iS=(t,n)=>n===2&&Array.isArray(t)&&t.includes(2),Xz=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,ih=(t,n=0,a=Xz,r=()=>{})=>{const l=typeof n=="number"&&n>0;return l||r(),l?t.transition().duration(n).ease(a).on("end",r):t},aS=t=>{const n=t.ctrlKey&&co()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*n};function Pz({zoomPanValues:t,noWheelClassName:n,d3Selection:a,d3Zoom:r,panOnScrollMode:l,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:f,onPanZoom:h,onPanZoomEnd:m}){return g=>{if(Ns(g,n))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();const p=a.property("__zoom").k||1;if(g.ctrlKey&&u){const M=gn(g),_=aS(g),C=p*Math.pow(2,_);r.scaleTo(a,C,M,g);return}const v=g.deltaMode===1?20:1;let x=l===za.Vertical?0:g.deltaX*v,b=l===za.Horizontal?0:g.deltaY*v;!co()&&g.shiftKey&&l!==za.Vertical&&(x=g.deltaY*v,b=0),r.translateBy(a,-(x/p)*c,-(b/p)*c,{internal:!0});const E=sc(a.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(h==null||h(g,E),t.panScrollTimeout=setTimeout(()=>{m==null||m(g,E),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,f==null||f(g,E))}}function $z({noWheelClassName:t,preventScrolling:n,d3ZoomHandler:a}){return function(r,l){const c=r.type==="wheel",u=!n&&c&&!r.ctrlKey,f=Ns(r,t);if(r.ctrlKey&&c&&f&&r.preventDefault(),u||f)return null;r.preventDefault(),a.call(this,r,l)}}function Kz({zoomPanValues:t,onDraggingChange:n,onPanZoomStart:a}){return r=>{var c,u,f;if((c=r.sourceEvent)!=null&&c.internal)return;const l=sc(r.transform);t.mouseButton=((u=r.sourceEvent)==null?void 0:u.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=l,((f=r.sourceEvent)==null?void 0:f.type)==="mousedown"&&n(!0),a&&(a==null||a(r.sourceEvent,l))}}function Zz({zoomPanValues:t,panOnDrag:n,onPaneContextMenu:a,onTransformChange:r,onPanZoom:l}){return c=>{var u,f;t.usedRightMouseButton=!!(a&&iS(n,t.mouseButton??0)),(u=c.sourceEvent)!=null&&u.sync||r([c.transform.x,c.transform.y,c.transform.k]),l&&!((f=c.sourceEvent)!=null&&f.internal)&&(l==null||l(c.sourceEvent,sc(c.transform)))}}function Iz({zoomPanValues:t,panOnDrag:n,panOnScroll:a,onDraggingChange:r,onPanZoomEnd:l,onPaneContextMenu:c}){return u=>{var f;if(!((f=u.sourceEvent)!=null&&f.internal)&&(t.isZoomingOrPanning=!1,c&&iS(n,t.mouseButton??0)&&!t.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),t.usedRightMouseButton=!1,r(!1),l)){const h=sc(u.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{l==null||l(u.sourceEvent,h)},a?150:0)}}}function Qz({zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:a,panOnDrag:r,panOnScroll:l,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:f,noPanClassName:h,lib:m,connectionInProgress:g}){return p=>{var M;const v=t||n,x=a&&p.ctrlKey,b=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Ns(p,`${m}-flow__node`)||Ns(p,`${m}-flow__edge`)))return!0;if(!r&&!v&&!l&&!c&&!a||u||g&&!b||Ns(p,f)&&b||Ns(p,h)&&(!b||l&&b&&!t)||!a&&p.ctrlKey&&b)return!1;if(!a&&p.type==="touchstart"&&((M=p.touches)==null?void 0:M.length)>1)return p.preventDefault(),!1;if(!v&&!l&&!x&&b||!r&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(r)&&!r.includes(p.button)&&p.type==="mousedown")return!1;const E=Array.isArray(r)&&r.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||b)&&E}}function Fz({domNode:t,minZoom:n,maxZoom:a,translateExtent:r,viewport:l,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:f,onDraggingChange:h}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=t.getBoundingClientRect(),p=Dw().scaleExtent([n,a]).translateExtent(r),v=Ze(t).call(p);C({x:l.x,y:l.y,zoom:ks(l.zoom,n,a)},[[0,0],[g.width,g.height]],r);const x=v.on("wheel.zoom"),b=v.on("dblclick.zoom");p.wheelDelta(aS);function E(k,Y){return v?new Promise($=>{p==null||p.interpolate((Y==null?void 0:Y.interpolate)==="linear"?Qr:wu).transform(ih(v,Y==null?void 0:Y.duration,Y==null?void 0:Y.ease,()=>$(!0)),k)}):Promise.resolve(!1)}function M({noWheelClassName:k,noPanClassName:Y,onPaneContextMenu:$,userSelectionActive:D,panOnScroll:K,panOnDrag:A,panOnScrollMode:j,panOnScrollSpeed:V,preventScrolling:q,zoomOnPinch:I,zoomOnScroll:N,zoomOnDoubleClick:G,zoomActivationKeyPressed:et,lib:B,onTransformChange:O,connectionInProgress:Z,paneClickDistance:J,selectionOnDrag:tt}){D&&!m.isZoomingOrPanning&&_();const at=K&&!et&&!D;p.clickDistance(tt?1/0:!vn(J)||J<0?0:J);const dt=at?Pz({zoomPanValues:m,noWheelClassName:k,d3Selection:v,d3Zoom:p,panOnScrollMode:j,panOnScrollSpeed:V,zoomOnPinch:I,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:f}):$z({noWheelClassName:k,preventScrolling:q,d3ZoomHandler:x});if(v.on("wheel.zoom",dt,{passive:!1}),!D){const mt=Kz({zoomPanValues:m,onDraggingChange:h,onPanZoomStart:u});p.on("start",mt);const vt=Zz({zoomPanValues:m,panOnDrag:A,onPaneContextMenu:!!$,onPanZoom:c,onTransformChange:O});p.on("zoom",vt);const wt=Iz({zoomPanValues:m,panOnDrag:A,panOnScroll:K,onPaneContextMenu:$,onPanZoomEnd:f,onDraggingChange:h});p.on("end",wt)}const ht=Qz({zoomActivationKeyPressed:et,panOnDrag:A,zoomOnScroll:N,panOnScroll:K,zoomOnDoubleClick:G,zoomOnPinch:I,userSelectionActive:D,noPanClassName:Y,noWheelClassName:k,lib:B,connectionInProgress:Z});p.filter(ht),G?v.on("dblclick.zoom",b):v.on("dblclick.zoom",null)}function _(){p.on("zoom",null)}async function C(k,Y,$){const D=nh(k),K=p==null?void 0:p.constrain()(D,Y,$);return K&&await E(K),new Promise(A=>A(K))}async function S(k,Y){const $=nh(k);return await E($,Y),new Promise(D=>D($))}function T(k){if(v){const Y=nh(k),$=v.property("__zoom");($.k!==k.zoom||$.x!==k.x||$.y!==k.y)&&(p==null||p.transform(v,Y,null,{sync:!0}))}}function R(){const k=v?Nw(v.node()):{x:0,y:0,k:1};return{x:k.x,y:k.y,zoom:k.k}}function L(k,Y){return v?new Promise($=>{p==null||p.interpolate((Y==null?void 0:Y.interpolate)==="linear"?Qr:wu).scaleTo(ih(v,Y==null?void 0:Y.duration,Y==null?void 0:Y.ease,()=>$(!0)),k)}):Promise.resolve(!1)}function U(k,Y){return v?new Promise($=>{p==null||p.interpolate((Y==null?void 0:Y.interpolate)==="linear"?Qr:wu).scaleBy(ih(v,Y==null?void 0:Y.duration,Y==null?void 0:Y.ease,()=>$(!0)),k)}):Promise.resolve(!1)}function P(k){p==null||p.scaleExtent(k)}function F(k){p==null||p.translateExtent(k)}function X(k){const Y=!vn(k)||k<0?0:k;p==null||p.clickDistance(Y)}return{update:M,destroy:_,setViewport:S,setViewportConstrained:C,getViewport:R,scaleTo:L,scaleBy:U,setScaleExtent:P,setTranslateExtent:F,syncViewport:T,setClickDistance:X}}var Us;(function(t){t.Line="line",t.Handle="handle"})(Us||(Us={}));function Jz({width:t,prevWidth:n,height:a,prevHeight:r,affectsX:l,affectsY:c}){const u=t-n,f=a-r,h=[u>0?1:u<0?-1:0,f>0?1:f<0?-1:0];return u&&l&&(h[0]=h[0]*-1),f&&c&&(h[1]=h[1]*-1),h}function Nx(t){const n=t.includes("right")||t.includes("left"),a=t.includes("bottom")||t.includes("top"),r=t.includes("left"),l=t.includes("top");return{isHorizontal:n,isVertical:a,affectsX:r,affectsY:l}}function Yi(t,n){return Math.max(0,n-t)}function Gi(t,n){return Math.max(0,t-n)}function ou(t,n,a){return Math.max(0,n-t,t-a)}function Dx(t,n){return t?!n:n}function Wz(t,n,a,r,l,c,u,f){let{affectsX:h,affectsY:m}=n;const{isHorizontal:g,isVertical:p}=n,v=g&&p,{xSnapped:x,ySnapped:b}=a,{minWidth:E,maxWidth:M,minHeight:_,maxHeight:C}=r,{x:S,y:T,width:R,height:L,aspectRatio:U}=t;let P=Math.floor(g?x-t.pointerX:0),F=Math.floor(p?b-t.pointerY:0);const X=R+(h?-P:P),k=L+(m?-F:F),Y=-c[0]*R,$=-c[1]*L;let D=ou(X,E,M),K=ou(k,_,C);if(u){let V=0,q=0;h&&P<0?V=Yi(S+P+Y,u[0][0]):!h&&P>0&&(V=Gi(S+X+Y,u[1][0])),m&&F<0?q=Yi(T+F+$,u[0][1]):!m&&F>0&&(q=Gi(T+k+$,u[1][1])),D=Math.max(D,V),K=Math.max(K,q)}if(f){let V=0,q=0;h&&P>0?V=Gi(S+P,f[0][0]):!h&&P<0&&(V=Yi(S+X,f[1][0])),m&&F>0?q=Gi(T+F,f[0][1]):!m&&F<0&&(q=Yi(T+k,f[1][1])),D=Math.max(D,V),K=Math.max(K,q)}if(l){if(g){const V=ou(X/U,_,C)*U;if(D=Math.max(D,V),u){let q=0;!h&&!m||h&&!m&&v?q=Gi(T+$+X/U,u[1][1])*U:q=Yi(T+$+(h?P:-P)/U,u[0][1])*U,D=Math.max(D,q)}if(f){let q=0;!h&&!m||h&&!m&&v?q=Yi(T+X/U,f[1][1])*U:q=Gi(T+(h?P:-P)/U,f[0][1])*U,D=Math.max(D,q)}}if(p){const V=ou(k*U,E,M)/U;if(K=Math.max(K,V),u){let q=0;!h&&!m||m&&!h&&v?q=Gi(S+k*U+Y,u[1][0])/U:q=Yi(S+(m?F:-F)*U+Y,u[0][0])/U,K=Math.max(K,q)}if(f){let q=0;!h&&!m||m&&!h&&v?q=Yi(S+k*U,f[1][0])/U:q=Gi(S+(m?F:-F)*U,f[0][0])/U,K=Math.max(K,q)}}}F=F+(F<0?K:-K),P=P+(P<0?D:-D),l&&(v?X>k*U?F=(Dx(h,m)?-P:P)/U:P=(Dx(h,m)?-F:F)*U:g?(F=P/U,m=h):(P=F*U,h=m));const A=h?S+P:S,j=m?T+F:T;return{width:R+(h?-P:P),height:L+(m?-F:F),x:c[0]*P*(h?-1:1)+A,y:c[1]*F*(m?-1:1)+j}}const sS={width:0,height:0,x:0,y:0},t4={...sS,pointerX:0,pointerY:0,aspectRatio:1};function e4(t){return[[0,0],[t.measured.width,t.measured.height]]}function n4(t,n,a){const r=n.position.x+t.position.x,l=n.position.y+t.position.y,c=t.measured.width??0,u=t.measured.height??0,f=a[0]*c,h=a[1]*u;return[[r-f,l-h],[r+c-f,l+u-h]]}function i4({domNode:t,nodeId:n,getStoreItems:a,onChange:r,onEnd:l}){const c=Ze(t);let u={controlDirection:Nx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:m,boundaries:g,keepAspectRatio:p,resizeDirection:v,onResizeStart:x,onResize:b,onResizeEnd:E,shouldResize:M}){let _={...sS},C={...t4};u={boundaries:g,resizeDirection:v,keepAspectRatio:p,controlDirection:Nx(m)};let S,T=null,R=[],L,U,P,F=!1;const X=pw().on("start",k=>{const{nodeLookup:Y,transform:$,snapGrid:D,snapToGrid:K,nodeOrigin:A,paneDomNode:j}=a();if(S=Y.get(n),!S)return;T=(j==null?void 0:j.getBoundingClientRect())??null;const{xSnapped:V,ySnapped:q}=Fr(k.sourceEvent,{transform:$,snapGrid:D,snapToGrid:K,containerBounds:T});_={width:S.measured.width??0,height:S.measured.height??0,x:S.position.x??0,y:S.position.y??0},C={..._,pointerX:V,pointerY:q,aspectRatio:_.width/_.height},L=void 0,S.parentId&&(S.extent==="parent"||S.expandParent)&&(L=Y.get(S.parentId),U=L&&S.extent==="parent"?e4(L):void 0),R=[],P=void 0;for(const[I,N]of Y)if(N.parentId===n&&(R.push({id:I,position:{...N.position},extent:N.extent}),N.extent==="parent"||N.expandParent)){const G=n4(N,S,N.origin??A);P?P=[[Math.min(G[0][0],P[0][0]),Math.min(G[0][1],P[0][1])],[Math.max(G[1][0],P[1][0]),Math.max(G[1][1],P[1][1])]]:P=G}x==null||x(k,{..._})}).on("drag",k=>{const{transform:Y,snapGrid:$,snapToGrid:D,nodeOrigin:K}=a(),A=Fr(k.sourceEvent,{transform:Y,snapGrid:$,snapToGrid:D,containerBounds:T}),j=[];if(!S)return;const{x:V,y:q,width:I,height:N}=_,G={},et=S.origin??K,{width:B,height:O,x:Z,y:J}=Wz(C,u.controlDirection,A,u.boundaries,u.keepAspectRatio,et,U,P),tt=B!==I,at=O!==N,dt=Z!==V&&tt,ht=J!==q&&at;if(!dt&&!ht&&!tt&&!at)return;if((dt||ht||et[0]===1||et[1]===1)&&(G.x=dt?Z:_.x,G.y=ht?J:_.y,_.x=G.x,_.y=G.y,R.length>0)){const Et=Z-V,_t=J-q;for(const te of R)te.position={x:te.position.x-Et+et[0]*(B-I),y:te.position.y-_t+et[1]*(O-N)},j.push(te)}if((tt||at)&&(G.width=tt&&(!u.resizeDirection||u.resizeDirection==="horizontal")?B:_.width,G.height=at&&(!u.resizeDirection||u.resizeDirection==="vertical")?O:_.height,_.width=G.width,_.height=G.height),L&&S.expandParent){const Et=et[0]*(G.width??0);G.x&&G.x<Et&&(_.x=Et,C.x=C.x-(G.x-Et));const _t=et[1]*(G.height??0);G.y&&G.y<_t&&(_.y=_t,C.y=C.y-(G.y-_t))}const mt=Jz({width:_.width,prevWidth:I,height:_.height,prevHeight:N,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),vt={..._,direction:mt};(M==null?void 0:M(k,vt))!==!1&&(F=!0,b==null||b(k,vt),r(G,j))}).on("end",k=>{F&&(E==null||E(k,{..._}),l==null||l({..._}),F=!1)});c.call(X)}function h(){c.on(".drag",null)}return{update:f,destroy:h}}var ah={exports:{}},sh={},rh={exports:{}},oh={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zx;function a4(){if(zx)return oh;zx=1;var t=ho();function n(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var a=typeof Object.is=="function"?Object.is:n,r=t.useState,l=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function f(p,v){var x=v(),b=r({inst:{value:x,getSnapshot:v}}),E=b[0].inst,M=b[1];return c(function(){E.value=x,E.getSnapshot=v,h(E)&&M({inst:E})},[p,x,v]),l(function(){return h(E)&&M({inst:E}),p(function(){h(E)&&M({inst:E})})},[p]),u(x),x}function h(p){var v=p.getSnapshot;p=p.value;try{var x=v();return!a(p,x)}catch{return!0}}function m(p,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return oh.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,oh}var Ox;function s4(){return Ox||(Ox=1,rh.exports=a4()),rh.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Rx;function r4(){if(Rx)return sh;Rx=1;var t=ho(),n=s4();function a(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var r=typeof Object.is=="function"?Object.is:a,l=n.useSyncExternalStore,c=t.useRef,u=t.useEffect,f=t.useMemo,h=t.useDebugValue;return sh.useSyncExternalStoreWithSelector=function(m,g,p,v,x){var b=c(null);if(b.current===null){var E={hasValue:!1,value:null};b.current=E}else E=b.current;b=f(function(){function _(L){if(!C){if(C=!0,S=L,L=v(L),x!==void 0&&E.hasValue){var U=E.value;if(x(U,L))return T=U}return T=L}if(U=T,r(S,L))return U;var P=v(L);return x!==void 0&&x(U,P)?(S=L,U):(S=L,T=P)}var C=!1,S,T,R=p===void 0?null:p;return[function(){return _(g())},R===null?void 0:function(){return _(R())}]},[g,p,v,x]);var M=l(m,b[0],b[1]);return u(function(){E.hasValue=!0,E.value=M},[M]),h(M),M},sh}var jx;function o4(){return jx||(jx=1,ah.exports=r4()),ah.exports}var l4=o4();const u4=o1(l4),c4={},Vx=t=>{let n;const a=new Set,r=(g,p)=>{const v=typeof g=="function"?g(n):g;if(!Object.is(v,n)){const x=n;n=p??(typeof v!="object"||v===null)?v:Object.assign({},n,v),a.forEach(b=>b(n,x))}},l=()=>n,h={setState:r,getState:l,getInitialState:()=>m,subscribe:g=>(a.add(g),()=>a.delete(g)),destroy:()=>{(c4?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),a.clear()}},m=n=t(r,l,h);return h},f4=t=>t?Vx(t):Vx,{useDebugValue:d4}=Z2,{useSyncExternalStoreWithSelector:h4}=u4,m4=t=>t;function rS(t,n=m4,a){const r=h4(t.subscribe,t.getState,t.getServerState||t.getInitialState,n,a);return d4(r),r}const Lx=(t,n)=>{const a=f4(t),r=(l,c=n)=>rS(a,l,c);return Object.assign(r,a),r},p4=(t,n)=>t?Lx(t,n):Lx;function It(t,n){if(Object.is(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(const[r,l]of t)if(!Object.is(l,n.get(r)))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(const r of t)if(!n.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(n).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(t[r],n[r]))return!1;return!0}l1();const rc=Q.createContext(null),g4=rc.Provider,oS=Vn.error001();function Rt(t,n){const a=Q.useContext(rc);if(a===null)throw new Error(oS);return rS(a,t,n)}function Qt(){const t=Q.useContext(rc);if(t===null)throw new Error(oS);return Q.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const kx={display:"none"},y4={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},lS="react-flow__node-desc",uS="react-flow__edge-desc",v4="react-flow__aria-live",x4=t=>t.ariaLiveMessage,b4=t=>t.ariaLabelConfig;function w4({rfId:t}){const n=Rt(x4);return H.jsx("div",{id:`${v4}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:y4,children:n})}function S4({rfId:t,disableKeyboardA11y:n}){const a=Rt(b4);return H.jsxs(H.Fragment,{children:[H.jsx("div",{id:`${lS}-${t}`,style:kx,children:n?a["node.a11yDescription.default"]:a["node.a11yDescription.keyboardDisabled"]}),H.jsx("div",{id:`${uS}-${t}`,style:kx,children:a["edge.a11yDescription.default"]}),!n&&H.jsx(w4,{rfId:t})]})}const oc=Q.forwardRef(({position:t="top-left",children:n,className:a,style:r,...l},c)=>{const u=`${t}`.split("-");return H.jsx("div",{className:ce(["react-flow__panel",a,...u]),style:r,ref:c,...l,children:n})});oc.displayName="Panel";function E4({proOptions:t,position:n="bottom-right"}){return t!=null&&t.hideAttribution?null:H.jsx(oc,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:H.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const T4=t=>{const n=[],a=[];for(const[,r]of t.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of t.edgeLookup)r.selected&&a.push(r);return{selectedNodes:n,selectedEdges:a}},lu=t=>t.id;function _4(t,n){return It(t.selectedNodes.map(lu),n.selectedNodes.map(lu))&&It(t.selectedEdges.map(lu),n.selectedEdges.map(lu))}function M4({onSelectionChange:t}){const n=Qt(),{selectedNodes:a,selectedEdges:r}=Rt(T4,_4);return Q.useEffect(()=>{const l={nodes:a,edges:r};t==null||t(l),n.getState().onSelectionChangeHandlers.forEach(c=>c(l))},[a,r,t]),null}const A4=t=>!!t.onSelectionChangeHandlers;function C4({onSelectionChange:t}){const n=Rt(A4);return t||n?H.jsx(M4,{onSelectionChange:t}):null}const cS=[0,0],N4={x:0,y:0,zoom:1},D4=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Bx=[...D4,"rfId"],z4=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),Hx={translateExtent:oo,nodeOrigin:cS,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function O4(t){const{setNodes:n,setEdges:a,setMinZoom:r,setMaxZoom:l,setTranslateExtent:c,setNodeExtent:u,reset:f,setDefaultNodesAndEdges:h}=Rt(z4,It),m=Qt();Q.useEffect(()=>(h(t.defaultNodes,t.defaultEdges),()=>{g.current=Hx,f()}),[]);const g=Q.useRef(Hx);return Q.useEffect(()=>{for(const p of Bx){const v=t[p],x=g.current[p];v!==x&&(typeof t[p]>"u"||(p==="nodes"?n(v):p==="edges"?a(v):p==="minZoom"?r(v):p==="maxZoom"?l(v):p==="translateExtent"?c(v):p==="nodeExtent"?u(v):p==="ariaLabelConfig"?m.setState({ariaLabelConfig:pz(v)}):p==="fitView"?m.setState({fitViewQueued:v}):p==="fitViewOptions"?m.setState({fitViewOptions:v}):m.setState({[p]:v})))}g.current=t},Bx.map(p=>t[p])),null}function Ux(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function R4(t){var r;const[n,a]=Q.useState(t==="system"?null:t);return Q.useEffect(()=>{if(t!=="system"){a(t);return}const l=Ux(),c=()=>a(l!=null&&l.matches?"dark":"light");return c(),l==null||l.addEventListener("change",c),()=>{l==null||l.removeEventListener("change",c)}},[t]),n!==null?n:(r=Ux())!=null&&r.matches?"dark":"light"}const Yx=typeof document<"u"?document:null;function fo(t=null,n={target:Yx,actInsideInputWithModifier:!0}){const[a,r]=Q.useState(!1),l=Q.useRef(!1),c=Q.useRef(new Set([])),[u,f]=Q.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
`).replace(`

`,`
+`).split(`
`)),g=m.reduce((p,v)=>p.concat(...v),[]);return[m,g]}return[[],[]]},[t]);return Q.useEffect(()=>{const h=(n==null?void 0:n.target)??Yx,m=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(t!==null){const g=x=>{var M,_;if(l.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!l.current||l.current&&!m)&&qw(x))return!1;const E=qx(x.code,f);if(c.current.add(x[E]),Gx(u,c.current,!1)){const C=((_=(M=x.composedPath)==null?void 0:M.call(x))==null?void 0:_[0])||x.target,S=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";n.preventDefault!==!1&&(l.current||!S)&&x.preventDefault(),r(!0)}},p=x=>{const b=qx(x.code,f);Gx(u,c.current,!0)?(r(!1),c.current.clear()):c.current.delete(x[b]),x.key==="Meta"&&c.current.clear(),l.current=!1},v=()=>{c.current.clear(),r(!1)};return h==null||h.addEventListener("keydown",g),h==null||h.addEventListener("keyup",p),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{h==null||h.removeEventListener("keydown",g),h==null||h.removeEventListener("keyup",p),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,r]),a}function Gx(t,n,a){return t.filter(r=>a||r.length===n.size).some(r=>r.every(l=>n.has(l)))}function qx(t,n){return n.includes(t)?"code":"key"}const j4=()=>{const t=Qt();return Q.useMemo(()=>({zoomIn:n=>{const{panZoom:a}=t.getState();return a?a.scaleBy(1.2,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},zoomOut:n=>{const{panZoom:a}=t.getState();return a?a.scaleBy(1/1.2,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},zoomTo:(n,a)=>{const{panZoom:r}=t.getState();return r?r.scaleTo(n,{duration:a==null?void 0:a.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(n,a)=>{const{transform:[r,l,c],panZoom:u}=t.getState();return u?(await u.setViewport({x:n.x??r,y:n.y??l,zoom:n.zoom??c},a),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[n,a,r]=t.getState().transform;return{x:n,y:a,zoom:r}},setCenter:async(n,a,r)=>t.getState().setCenter(n,a,r),fitBounds:async(n,a)=>{const{width:r,height:l,minZoom:c,maxZoom:u,panZoom:f}=t.getState(),h=Om(n,r,l,c,u,(a==null?void 0:a.padding)??.1);return f?(await f.setViewport(h,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(n,a={})=>{const{transform:r,snapGrid:l,snapToGrid:c,domNode:u}=t.getState();if(!u)return n;const{x:f,y:h}=u.getBoundingClientRect(),m={x:n.x-f,y:n.y-h},g=a.snapGrid??l,p=a.snapToGrid??c;return _o(m,r,p,g)},flowToScreenPosition:n=>{const{transform:a,domNode:r}=t.getState();if(!r)return n;const{x:l,y:c}=r.getBoundingClientRect(),u=qu(n,a);return{x:u.x+l,y:u.y+c}}}),[])};function fS(t,n){const a=[],r=new Map,l=[];for(const c of t)if(c.type==="add"){l.push(c);continue}else if(c.type==="remove"||c.type==="replace")r.set(c.id,[c]);else{const u=r.get(c.id);u?u.push(c):r.set(c.id,[c])}for(const c of n){const u=r.get(c.id);if(!u){a.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){a.push({...u[0].item});continue}const f={...c};for(const h of u)V4(h,f);a.push(f)}return l.length&&l.forEach(c=>{c.index!==void 0?a.splice(c.index,0,{...c.item}):a.push({...c.item})}),a}function V4(t,n){switch(t.type){case"select":{n.selected=t.selected;break}case"position":{typeof t.position<"u"&&(n.position=t.position),typeof t.dragging<"u"&&(n.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(n.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(n.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(n.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(n.resizing=t.resizing);break}}}function L4(t,n){return fS(t,n)}function k4(t,n){return fS(t,n)}function Ta(t,n){return{id:t,type:"select",selected:n}}function Ds(t,n=new Set,a=!1){const r=[];for(const[l,c]of t){const u=n.has(l);!(c.selected===void 0&&!u)&&c.selected!==u&&(a&&(c.selected=u),r.push(Ta(c.id,u)))}return r}function Xx({items:t=[],lookup:n}){var l;const a=[],r=new Map(t.map(c=>[c.id,c]));for(const[c,u]of t.entries()){const f=n.get(u.id),h=((l=f==null?void 0:f.internals)==null?void 0:l.userNode)??f;h!==void 0&&h!==u&&a.push({id:u.id,item:u,type:"replace"}),h===void 0&&a.push({item:u,type:"add",index:c})}for(const[c]of n)r.get(c)===void 0&&a.push({id:c,type:"remove"});return a}function Px(t){return{id:t.id,type:"remove"}}const $x=t=>sz(t),B4=t=>Vw(t);function dS(t){return Q.forwardRef(t)}const H4=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function Kx(t){const[n,a]=Q.useState(BigInt(0)),[r]=Q.useState(()=>U4(()=>a(l=>l+BigInt(1))));return H4(()=>{const l=r.get();l.length&&(t(l),r.reset())},[n]),r}function U4(t){let n=[];return{get:()=>n,reset:()=>{n=[]},push:a=>{n.push(a),t()}}}const hS=Q.createContext(null);function Y4({children:t}){const n=Qt(),a=Q.useCallback(f=>{const{nodes:h=[],setNodes:m,hasDefaultNodes:g,onNodesChange:p,nodeLookup:v,fitViewQueued:x,onNodesChangeMiddlewareMap:b}=n.getState();let E=h;for(const _ of f)E=typeof _=="function"?_(E):_;let M=Xx({items:E,lookup:v});for(const _ of b.values())M=_(M);g&&m(E),M.length>0?p==null||p(M):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:C,setNodes:S}=n.getState();_&&S(C)})},[]),r=Kx(a),l=Q.useCallback(f=>{const{edges:h=[],setEdges:m,hasDefaultEdges:g,onEdgesChange:p,edgeLookup:v}=n.getState();let x=h;for(const b of f)x=typeof b=="function"?b(x):b;g?m(x):p&&p(Xx({items:x,lookup:v}))},[]),c=Kx(l),u=Q.useMemo(()=>({nodeQueue:r,edgeQueue:c}),[]);return H.jsx(hS.Provider,{value:u,children:t})}function G4(){const t=Q.useContext(hS);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const q4=t=>!!t.panZoom;function Hm(){const t=j4(),n=Qt(),a=G4(),r=Rt(q4),l=Q.useMemo(()=>{const c=p=>n.getState().nodeLookup.get(p),u=p=>{a.nodeQueue.push(p)},f=p=>{a.edgeQueue.push(p)},h=p=>{var _,C;const{nodeLookup:v,nodeOrigin:x}=n.getState(),b=$x(p)?p:v.get(p.id),E=b.parentId?Yw(b.position,b.measured,b.parentId,v,x):b.position,M={...b,position:E,width:((_=b.measured)==null?void 0:_.width)??b.width,height:((C=b.measured)==null?void 0:C.height)??b.height};return Bs(M)},m=(p,v,x={replace:!1})=>{u(b=>b.map(E=>{if(E.id===p){const M=typeof v=="function"?v(E):v;return x.replace&&$x(M)?M:{...E,...M}}return E}))},g=(p,v,x={replace:!1})=>{f(b=>b.map(E=>{if(E.id===p){const M=typeof v=="function"?v(E):v;return x.replace&&B4(M)?M:{...E,...M}}return E}))};return{getNodes:()=>n.getState().nodes.map(p=>({...p})),getNode:p=>{var v;return(v=c(p))==null?void 0:v.internals.userNode},getInternalNode:c,getEdges:()=>{const{edges:p=[]}=n.getState();return p.map(v=>({...v}))},getEdge:p=>n.getState().edgeLookup.get(p),setNodes:u,setEdges:f,addNodes:p=>{const v=Array.isArray(p)?p:[p];a.nodeQueue.push(x=>[...x,...v])},addEdges:p=>{const v=Array.isArray(p)?p:[p];a.edgeQueue.push(x=>[...x,...v])},toObject:()=>{const{nodes:p=[],edges:v=[],transform:x}=n.getState(),[b,E,M]=x;return{nodes:p.map(_=>({..._})),edges:v.map(_=>({..._})),viewport:{x:b,y:E,zoom:M}}},deleteElements:async({nodes:p=[],edges:v=[]})=>{const{nodes:x,edges:b,onNodesDelete:E,onEdgesDelete:M,triggerNodeChanges:_,triggerEdgeChanges:C,onDelete:S,onBeforeDelete:T}=n.getState(),{nodes:R,edges:L}=await cz({nodesToRemove:p,edgesToRemove:v,nodes:x,edges:b,onBeforeDelete:T}),U=L.length>0,P=R.length>0;if(U){const F=L.map(Px);M==null||M(L),C(F)}if(P){const F=R.map(Px);E==null||E(R),_(F)}return(P||U)&&(S==null||S({nodes:R,edges:L})),{deletedNodes:R,deletedEdges:L}},getIntersectingNodes:(p,v=!0,x)=>{const b=vx(p),E=b?p:h(p),M=x!==void 0;return E?(x||n.getState().nodes).filter(_=>{const C=n.getState().nodeLookup.get(_.id);if(C&&!b&&(_.id===p.id||!C.internals.positionAbsolute))return!1;const S=Bs(M?_:C),T=uo(S,E);return v&&T>0||T>=S.width*S.height||T>=E.width*E.height}):[]},isNodeIntersecting:(p,v,x=!0)=>{const E=vx(p)?p:h(p);if(!E)return!1;const M=uo(E,v);return x&&M>0||M>=v.width*v.height||M>=E.width*E.height},updateNode:m,updateNodeData:(p,v,x={replace:!1})=>{m(p,b=>{const E=typeof v=="function"?v(b):v;return x.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},x)},updateEdge:g,updateEdgeData:(p,v,x={replace:!1})=>{g(p,b=>{const E=typeof v=="function"?v(b):v;return x.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},x)},getNodesBounds:p=>{const{nodeLookup:v,nodeOrigin:x}=n.getState();return rz(p,{nodeLookup:v,nodeOrigin:x})},getHandleConnections:({type:p,id:v,nodeId:x})=>{var b;return Array.from(((b=n.getState().connectionLookup.get(`${x}-${p}${v?`-${v}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:p,handleId:v,nodeId:x})=>{var b;return Array.from(((b=n.getState().connectionLookup.get(`${x}${p?v?`-${p}-${v}`:`-${p}`:""}`))==null?void 0:b.values())??[])},fitView:async p=>{const v=n.getState().fitViewResolver??mz();return n.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:v}),a.nodeQueue.push(x=>[...x]),v.promise}}},[]);return Q.useMemo(()=>({...l,...t,viewportInitialized:r}),[r])}const Zx=t=>t.selected,X4=typeof window<"u"?window:void 0;function P4({deleteKeyCode:t,multiSelectionKeyCode:n}){const a=Qt(),{deleteElements:r}=Hm(),l=fo(t,{actInsideInputWithModifier:!1}),c=fo(n,{target:X4});Q.useEffect(()=>{if(l){const{edges:u,nodes:f}=a.getState();r({nodes:f.filter(Zx),edges:u.filter(Zx)}),a.setState({nodesSelectionActive:!1})}},[l]),Q.useEffect(()=>{a.setState({multiSelectionActive:c})},[c])}function $4(t){const n=Qt();Q.useEffect(()=>{const a=()=>{var l,c,u,f;if(!t.current||!(((c=(l=t.current).checkVisibility)==null?void 0:c.call(l))??!0))return!1;const r=Rm(t.current);(r.height===0||r.width===0)&&((f=(u=n.getState()).onError)==null||f.call(u,"004",Vn.error004())),n.setState({width:r.width||500,height:r.height||500})};if(t.current){a(),window.addEventListener("resize",a);const r=new ResizeObserver(()=>a());return r.observe(t.current),()=>{window.removeEventListener("resize",a),r&&t.current&&r.unobserve(t.current)}}},[])}const lc={position:"absolute",width:"100%",height:"100%",top:0,left:0},K4=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function Z4({onPaneContextMenu:t,zoomOnScroll:n=!0,zoomOnPinch:a=!0,panOnScroll:r=!1,panOnScrollSpeed:l=.5,panOnScrollMode:c=za.Free,zoomOnDoubleClick:u=!0,panOnDrag:f=!0,defaultViewport:h,translateExtent:m,minZoom:g,maxZoom:p,zoomActivationKeyCode:v,preventScrolling:x=!0,children:b,noWheelClassName:E,noPanClassName:M,onViewportChange:_,isControlledViewport:C,paneClickDistance:S,selectionOnDrag:T}){const R=Qt(),L=Q.useRef(null),{userSelectionActive:U,lib:P,connectionInProgress:F}=Rt(K4,It),X=fo(v),k=Q.useRef();$4(L);const Y=Q.useCallback($=>{_==null||_({x:$[0],y:$[1],zoom:$[2]}),C||R.setState({transform:$})},[_,C]);return Q.useEffect(()=>{if(L.current){k.current=Fz({domNode:L.current,minZoom:g,maxZoom:p,translateExtent:m,viewport:h,onDraggingChange:A=>R.setState(j=>j.paneDragging===A?j:{paneDragging:A}),onPanZoomStart:(A,j)=>{const{onViewportChangeStart:V,onMoveStart:q}=R.getState();q==null||q(A,j),V==null||V(j)},onPanZoom:(A,j)=>{const{onViewportChange:V,onMove:q}=R.getState();q==null||q(A,j),V==null||V(j)},onPanZoomEnd:(A,j)=>{const{onViewportChangeEnd:V,onMoveEnd:q}=R.getState();q==null||q(A,j),V==null||V(j)}});const{x:$,y:D,zoom:K}=k.current.getViewport();return R.setState({panZoom:k.current,transform:[$,D,K],domNode:L.current.closest(".react-flow")}),()=>{var A;(A=k.current)==null||A.destroy()}}},[]),Q.useEffect(()=>{var $;($=k.current)==null||$.update({onPaneContextMenu:t,zoomOnScroll:n,zoomOnPinch:a,panOnScroll:r,panOnScrollSpeed:l,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:f,zoomActivationKeyPressed:X,preventScrolling:x,noPanClassName:M,userSelectionActive:U,noWheelClassName:E,lib:P,onTransformChange:Y,connectionInProgress:F,selectionOnDrag:T,paneClickDistance:S})},[t,n,a,r,l,c,u,f,X,x,M,U,E,P,Y,F,T,S]),H.jsx("div",{className:"react-flow__renderer",ref:L,style:lc,children:b})}const I4=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function Q4(){const{userSelectionActive:t,userSelectionRect:n}=Rt(I4,It);return t&&n?H.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const lh=(t,n)=>a=>{a.target===n.current&&(t==null||t(a))},F4=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function J4({isSelecting:t,selectionKeyPressed:n,selectionMode:a=lo.Full,panOnDrag:r,paneClickDistance:l,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:f,onPaneClick:h,onPaneContextMenu:m,onPaneScroll:g,onPaneMouseEnter:p,onPaneMouseMove:v,onPaneMouseLeave:x,children:b}){const E=Qt(),{userSelectionActive:M,elementsSelectable:_,dragging:C,connectionInProgress:S}=Rt(F4,It),T=_&&(t||M),R=Q.useRef(null),L=Q.useRef(),U=Q.useRef(new Set),P=Q.useRef(new Set),F=Q.useRef(!1),X=V=>{if(F.current||S){F.current=!1;return}h==null||h(V),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},k=V=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){V.preventDefault();return}m==null||m(V)},Y=g?V=>g(V):void 0,$=V=>{F.current&&(V.stopPropagation(),F.current=!1)},D=V=>{var O,Z;const{domNode:q}=E.getState();if(L.current=q==null?void 0:q.getBoundingClientRect(),!L.current)return;const I=V.target===R.current;if(!I&&!!V.target.closest(".nokey")||!t||!(c&&I||n)||V.button!==0||!V.isPrimary)return;(Z=(O=V.target)==null?void 0:O.setPointerCapture)==null||Z.call(O,V.pointerId),F.current=!1;const{x:et,y:B}=xn(V.nativeEvent,L.current);E.setState({userSelectionRect:{width:0,height:0,startX:et,startY:B,x:et,y:B}}),I||(V.stopPropagation(),V.preventDefault())},K=V=>{const{userSelectionRect:q,transform:I,nodeLookup:N,edgeLookup:G,connectionLookup:et,triggerNodeChanges:B,triggerEdgeChanges:O,defaultEdgeOptions:Z,resetSelectedElements:J}=E.getState();if(!L.current||!q)return;const{x:tt,y:at}=xn(V.nativeEvent,L.current),{startX:dt,startY:ht}=q;if(!F.current){const _t=n?0:l;if(Math.hypot(tt-dt,at-ht)<=_t)return;J(),u==null||u(V)}F.current=!0;const mt={startX:dt,startY:ht,x:tt<dt?tt:dt,y:at<ht?at:ht,width:Math.abs(tt-dt),height:Math.abs(at-ht)},vt=U.current,wt=P.current;U.current=new Set(zm(N,mt,I,a===lo.Partial,!0).map(_t=>_t.id)),P.current=new Set;const Et=(Z==null?void 0:Z.selectable)??!0;for(const _t of U.current){const te=et.get(_t);if(te)for(const{edgeId:De}of te.values()){const Ue=G.get(De);Ue&&(Ue.selectable??Et)&&P.current.add(De)}}if(!xx(vt,U.current)){const _t=Ds(N,U.current,!0);B(_t)}if(!xx(wt,P.current)){const _t=Ds(G,P.current);O(_t)}E.setState({userSelectionRect:mt,userSelectionActive:!0,nodesSelectionActive:!1})},A=V=>{var q,I;V.button===0&&((I=(q=V.target)==null?void 0:q.releasePointerCapture)==null||I.call(q,V.pointerId),!M&&V.target===R.current&&E.getState().userSelectionRect&&(X==null||X(V)),E.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(f==null||f(V),E.setState({nodesSelectionActive:U.current.size>0})))},j=r===!0||Array.isArray(r)&&r.includes(0);return H.jsxs("div",{className:ce(["react-flow__pane",{draggable:j,dragging:C,selection:t}]),onClick:T?void 0:lh(X,R),onContextMenu:lh(k,R),onWheel:lh(Y,R),onPointerEnter:T?void 0:p,onPointerMove:T?K:v,onPointerUp:T?A:void 0,onPointerDownCapture:T?D:void 0,onClickCapture:T?$:void 0,onPointerLeave:x,ref:R,style:lc,children:[b,H.jsx(Q4,{})]})}function Zh({id:t,store:n,unselect:a=!1,nodeRef:r}){const{addSelectedNodes:l,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:f,onError:h}=n.getState(),m=f.get(t);if(!m){h==null||h("012",Vn.error012(t));return}n.setState({nodesSelectionActive:!1}),m.selected?(a||m.selected&&u)&&(c({nodes:[m],edges:[]}),requestAnimationFrame(()=>{var g;return(g=r==null?void 0:r.current)==null?void 0:g.blur()})):l([t])}function mS({nodeRef:t,disabled:n=!1,noDragClassName:a,handleSelector:r,nodeId:l,isSelectable:c,nodeClickDistance:u}){const f=Qt(),[h,m]=Q.useState(!1),g=Q.useRef();return Q.useEffect(()=>{g.current=kz({getStoreItems:()=>f.getState(),onNodeMouseDown:p=>{Zh({id:p,store:f,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),Q.useEffect(()=>{if(!(n||!t.current||!g.current))return g.current.update({noDragClassName:a,handleSelector:r,domNode:t.current,isSelectable:c,nodeId:l,nodeClickDistance:u}),()=>{var p;(p=g.current)==null||p.destroy()}},[a,r,n,c,t,l,u]),h}const W4=t=>n=>n.selected&&(n.draggable||t&&typeof n.draggable>"u");function pS(){const t=Qt();return Q.useCallback(a=>{const{nodeExtent:r,snapToGrid:l,snapGrid:c,nodesDraggable:u,onError:f,updateNodePositions:h,nodeLookup:m,nodeOrigin:g}=t.getState(),p=new Map,v=W4(u),x=l?c[0]:5,b=l?c[1]:5,E=a.direction.x*x*a.factor,M=a.direction.y*b*a.factor;for(const[,_]of m){if(!v(_))continue;let C={x:_.internals.positionAbsolute.x+E,y:_.internals.positionAbsolute.y+M};l&&(C=To(C,c));const{position:S,positionAbsolute:T}=Lw({nodeId:_.id,nextPosition:C,nodeLookup:m,nodeExtent:r,nodeOrigin:g,onError:f});_.position=S,_.internals.positionAbsolute=T,p.set(_.id,_)}h(p)},[])}const Um=Q.createContext(null),tO=Um.Provider;Um.Consumer;const gS=()=>Q.useContext(Um),eO=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),nO=(t,n,a)=>r=>{const{connectionClickStartHandle:l,connectionMode:c,connection:u}=r,{fromHandle:f,toHandle:h,isValid:m}=u,g=(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===n&&(h==null?void 0:h.type)===a;return{connectingFrom:(f==null?void 0:f.nodeId)===t&&(f==null?void 0:f.id)===n&&(f==null?void 0:f.type)===a,connectingTo:g,clickConnecting:(l==null?void 0:l.nodeId)===t&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===a,isPossibleEndHandle:c===Ls.Strict?(f==null?void 0:f.type)!==a:t!==(f==null?void 0:f.nodeId)||n!==(f==null?void 0:f.id),connectionInProcess:!!f,clickConnectionInProcess:!!l,valid:g&&m}};function iO({type:t="source",position:n=xt.Top,isValidConnection:a,isConnectable:r=!0,isConnectableStart:l=!0,isConnectableEnd:c=!0,id:u,onConnect:f,children:h,className:m,onMouseDown:g,onTouchStart:p,...v},x){var K,A;const b=u||null,E=t==="target",M=Qt(),_=gS(),{connectOnClick:C,noPanClassName:S,rfId:T}=Rt(eO,It),{connectingFrom:R,connectingTo:L,clickConnecting:U,isPossibleEndHandle:P,connectionInProcess:F,clickConnectionInProcess:X,valid:k}=Rt(nO(_,b,t),It);_||(A=(K=M.getState()).onError)==null||A.call(K,"010",Vn.error010());const Y=j=>{const{defaultEdgeOptions:V,onConnect:q,hasDefaultEdges:I}=M.getState(),N={...V,...j};if(I){const{edges:G,setEdges:et}=M.getState();et(wz(N,G))}q==null||q(N),f==null||f(N)},$=j=>{if(!_)return;const V=Xw(j.nativeEvent);if(l&&(V&&j.button===0||!V)){const q=M.getState();Kh.onPointerDown(j.nativeEvent,{handleDomNode:j.currentTarget,autoPanOnConnect:q.autoPanOnConnect,connectionMode:q.connectionMode,connectionRadius:q.connectionRadius,domNode:q.domNode,nodeLookup:q.nodeLookup,lib:q.lib,isTarget:E,handleId:b,nodeId:_,flowId:q.rfId,panBy:q.panBy,cancelConnection:q.cancelConnection,onConnectStart:q.onConnectStart,onConnectEnd:(...I)=>{var N,G;return(G=(N=M.getState()).onConnectEnd)==null?void 0:G.call(N,...I)},updateConnection:q.updateConnection,onConnect:Y,isValidConnection:a||((...I)=>{var N,G;return((G=(N=M.getState()).isValidConnection)==null?void 0:G.call(N,...I))??!0}),getTransform:()=>M.getState().transform,getFromHandle:()=>M.getState().connection.fromHandle,autoPanSpeed:q.autoPanSpeed,dragThreshold:q.connectionDragThreshold})}V?g==null||g(j):p==null||p(j)},D=j=>{const{onClickConnectStart:V,onClickConnectEnd:q,connectionClickStartHandle:I,connectionMode:N,isValidConnection:G,lib:et,rfId:B,nodeLookup:O,connection:Z}=M.getState();if(!_||!I&&!l)return;if(!I){V==null||V(j.nativeEvent,{nodeId:_,handleId:b,handleType:t}),M.setState({connectionClickStartHandle:{nodeId:_,type:t,id:b}});return}const J=Gw(j.target),tt=a||G,{connection:at,isValid:dt}=Kh.isValid(j.nativeEvent,{handle:{nodeId:_,id:b,type:t},connectionMode:N,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:tt,flowId:B,doc:J,lib:et,nodeLookup:O});dt&&at&&Y(at);const ht=structuredClone(Z);delete ht.inProgress,ht.toPosition=ht.toHandle?ht.toHandle.position:null,q==null||q(j,ht),M.setState({connectionClickStartHandle:null})};return H.jsx("div",{"data-handleid":b,"data-nodeid":_,"data-handlepos":n,"data-id":`${T}-${_}-${b}-${t}`,className:ce(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",S,m,{source:!E,target:E,connectable:r,connectablestart:l,connectableend:c,clickconnecting:U,connectingfrom:R,connectingto:L,valid:k,connectionindicator:r&&(!F||P)&&(F||X?c:l)}]),onMouseDown:$,onTouchStart:$,onClick:C?D:void 0,ref:x,...v,children:h})}const Ii=Q.memo(dS(iO));function aO({data:t,isConnectable:n,sourcePosition:a=xt.Bottom}){return H.jsxs(H.Fragment,{children:[t==null?void 0:t.label,H.jsx(Ii,{type:"source",position:a,isConnectable:n})]})}function sO({data:t,isConnectable:n,targetPosition:a=xt.Top,sourcePosition:r=xt.Bottom}){return H.jsxs(H.Fragment,{children:[H.jsx(Ii,{type:"target",position:a,isConnectable:n}),t==null?void 0:t.label,H.jsx(Ii,{type:"source",position:r,isConnectable:n})]})}function rO(){return null}function oO({data:t,isConnectable:n,targetPosition:a=xt.Top}){return H.jsxs(H.Fragment,{children:[H.jsx(Ii,{type:"target",position:a,isConnectable:n}),t==null?void 0:t.label]})}const Pu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Ix={input:aO,default:sO,output:oO,group:rO};function lO(t){var n,a,r,l;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((n=t.style)==null?void 0:n.width),height:t.height??t.initialHeight??((a=t.style)==null?void 0:a.height)}:{width:t.width??((r=t.style)==null?void 0:r.width),height:t.height??((l=t.style)==null?void 0:l.height)}}const uO=t=>{const{width:n,height:a,x:r,y:l}=Eo(t.nodeLookup,{filter:c=>!!c.selected});return{width:vn(n)?n:null,height:vn(a)?a:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${r}px,${l}px)`}};function cO({onSelectionContextMenu:t,noPanClassName:n,disableKeyboardA11y:a}){const r=Qt(),{width:l,height:c,transformString:u,userSelectionActive:f}=Rt(uO,It),h=pS(),m=Q.useRef(null);Q.useEffect(()=>{var x;a||(x=m.current)==null||x.focus({preventScroll:!0})},[a]);const g=!f&&l!==null&&c!==null;if(mS({nodeRef:m,disabled:!g}),!g)return null;const p=t?x=>{const b=r.getState().nodes.filter(E=>E.selected);t(x,b)}:void 0,v=x=>{Object.prototype.hasOwnProperty.call(Pu,x.key)&&(x.preventDefault(),h({direction:Pu[x.key],factor:x.shiftKey?4:1}))};return H.jsx("div",{className:ce(["react-flow__nodesselection","react-flow__container",n]),style:{transform:u},children:H.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:a?void 0:-1,onKeyDown:a?void 0:v,style:{width:l,height:c}})})}const Qx=typeof window<"u"?window:void 0,fO=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function yS({children:t,onPaneClick:n,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:l,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:f,deleteKeyCode:h,selectionKeyCode:m,selectionOnDrag:g,selectionMode:p,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:b,panActivationKeyCode:E,zoomActivationKeyCode:M,elementsSelectable:_,zoomOnScroll:C,zoomOnPinch:S,panOnScroll:T,panOnScrollSpeed:R,panOnScrollMode:L,zoomOnDoubleClick:U,panOnDrag:P,defaultViewport:F,translateExtent:X,minZoom:k,maxZoom:Y,preventScrolling:$,onSelectionContextMenu:D,noWheelClassName:K,noPanClassName:A,disableKeyboardA11y:j,onViewportChange:V,isControlledViewport:q}){const{nodesSelectionActive:I,userSelectionActive:N}=Rt(fO,It),G=fo(m,{target:Qx}),et=fo(E,{target:Qx}),B=et||P,O=et||T,Z=g&&B!==!0,J=G||N||Z;return P4({deleteKeyCode:h,multiSelectionKeyCode:b}),H.jsx(Z4,{onPaneContextMenu:c,elementsSelectable:_,zoomOnScroll:C,zoomOnPinch:S,panOnScroll:O,panOnScrollSpeed:R,panOnScrollMode:L,zoomOnDoubleClick:U,panOnDrag:!G&&B,defaultViewport:F,translateExtent:X,minZoom:k,maxZoom:Y,zoomActivationKeyCode:M,preventScrolling:$,noWheelClassName:K,noPanClassName:A,onViewportChange:V,isControlledViewport:q,paneClickDistance:f,selectionOnDrag:Z,children:H.jsxs(J4,{onSelectionStart:v,onSelectionEnd:x,onPaneClick:n,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:l,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:B,isSelecting:!!J,selectionMode:p,selectionKeyPressed:G,paneClickDistance:f,selectionOnDrag:Z,children:[t,I&&H.jsx(cO,{onSelectionContextMenu:D,noPanClassName:A,disableKeyboardA11y:j})]})})}yS.displayName="FlowRenderer";const dO=Q.memo(yS),hO=t=>n=>t?zm(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(a=>a.id):Array.from(n.nodeLookup.keys());function mO(t){return Rt(Q.useCallback(hO(t),[t]),It)}const pO=t=>t.updateNodeInternals;function gO(){const t=Rt(pO),[n]=Q.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(a=>{const r=new Map;a.forEach(l=>{const c=l.target.getAttribute("data-id");r.set(c,{id:c,nodeElement:l.target,force:!0})}),t(r)}));return Q.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function yO({node:t,nodeType:n,hasDimensions:a,resizeObserver:r}){const l=Qt(),c=Q.useRef(null),u=Q.useRef(null),f=Q.useRef(t.sourcePosition),h=Q.useRef(t.targetPosition),m=Q.useRef(n),g=a&&!!t.internals.handleBounds;return Q.useEffect(()=>{c.current&&!t.hidden&&(!g||u.current!==c.current)&&(u.current&&(r==null||r.unobserve(u.current)),r==null||r.observe(c.current),u.current=c.current)},[g,t.hidden]),Q.useEffect(()=>()=>{u.current&&(r==null||r.unobserve(u.current),u.current=null)},[]),Q.useEffect(()=>{if(c.current){const p=m.current!==n,v=f.current!==t.sourcePosition,x=h.current!==t.targetPosition;(p||v||x)&&(m.current=n,f.current=t.sourcePosition,h.current=t.targetPosition,l.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:c.current,force:!0}]])))}},[t.id,n,t.sourcePosition,t.targetPosition]),c}function vO({id:t,onClick:n,onMouseEnter:a,onMouseMove:r,onMouseLeave:l,onContextMenu:c,onDoubleClick:u,nodesDraggable:f,elementsSelectable:h,nodesConnectable:m,nodesFocusable:g,resizeObserver:p,noDragClassName:v,noPanClassName:x,disableKeyboardA11y:b,rfId:E,nodeTypes:M,nodeClickDistance:_,onError:C}){const{node:S,internals:T,isParent:R}=Rt(tt=>{const at=tt.nodeLookup.get(t),dt=tt.parentLookup.has(t);return{node:at,internals:at.internals,isParent:dt}},It);let L=S.type||"default",U=(M==null?void 0:M[L])||Ix[L];U===void 0&&(C==null||C("003",Vn.error003(L)),L="default",U=(M==null?void 0:M.default)||Ix.default);const P=!!(S.draggable||f&&typeof S.draggable>"u"),F=!!(S.selectable||h&&typeof S.selectable>"u"),X=!!(S.connectable||m&&typeof S.connectable>"u"),k=!!(S.focusable||g&&typeof S.focusable>"u"),Y=Qt(),$=Uw(S),D=yO({node:S,nodeType:L,hasDimensions:$,resizeObserver:p}),K=mS({nodeRef:D,disabled:S.hidden||!P,noDragClassName:v,handleSelector:S.dragHandle,nodeId:t,isSelectable:F,nodeClickDistance:_}),A=pS();if(S.hidden)return null;const j=ci(S),V=lO(S),q=F||P||n||a||r||l,I=a?tt=>a(tt,{...T.userNode}):void 0,N=r?tt=>r(tt,{...T.userNode}):void 0,G=l?tt=>l(tt,{...T.userNode}):void 0,et=c?tt=>c(tt,{...T.userNode}):void 0,B=u?tt=>u(tt,{...T.userNode}):void 0,O=tt=>{const{selectNodesOnDrag:at,nodeDragThreshold:dt}=Y.getState();F&&(!at||!P||dt>0)&&Zh({id:t,store:Y,nodeRef:D}),n&&n(tt,{...T.userNode})},Z=tt=>{if(!(qw(tt.nativeEvent)||b)){if(zw.includes(tt.key)&&F){const at=tt.key==="Escape";Zh({id:t,store:Y,unselect:at,nodeRef:D})}else if(P&&S.selected&&Object.prototype.hasOwnProperty.call(Pu,tt.key)){tt.preventDefault();const{ariaLabelConfig:at}=Y.getState();Y.setState({ariaLiveMessage:at["node.a11yDescription.ariaLiveMessage"]({direction:tt.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),A({direction:Pu[tt.key],factor:tt.shiftKey?4:1})}}},J=()=>{var wt;if(b||!((wt=D.current)!=null&&wt.matches(":focus-visible")))return;const{transform:tt,width:at,height:dt,autoPanOnNodeFocus:ht,setCenter:mt}=Y.getState();if(!ht)return;zm(new Map([[t,S]]),{x:0,y:0,width:at,height:dt},tt,!0).length>0||mt(S.position.x+j.width/2,S.position.y+j.height/2,{zoom:tt[2]})};return H.jsx("div",{className:ce(["react-flow__node",`react-flow__node-${L}`,{[x]:P},S.className,{selected:S.selected,selectable:F,parent:R,draggable:P,dragging:K}]),ref:D,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:q?"all":"none",visibility:$?"visible":"hidden",...S.style,...V},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:I,onMouseMove:N,onMouseLeave:G,onContextMenu:et,onClick:O,onDoubleClick:B,onKeyDown:k?Z:void 0,tabIndex:k?0:void 0,onFocus:k?J:void 0,role:S.ariaRole??(k?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${lS}-${E}`,"aria-label":S.ariaLabel,...S.domAttributes,children:H.jsx(tO,{value:t,children:H.jsx(U,{id:t,data:S.data,type:L,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:S.selected??!1,selectable:F,draggable:P,deletable:S.deletable??!0,isConnectable:X,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:K,dragHandle:S.dragHandle,zIndex:T.z,parentId:S.parentId,...j})})})}var xO=Q.memo(vO);const bO=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function vS(t){const{nodesDraggable:n,nodesConnectable:a,nodesFocusable:r,elementsSelectable:l,onError:c}=Rt(bO,It),u=mO(t.onlyRenderVisibleElements),f=gO();return H.jsx("div",{className:"react-flow__nodes",style:lc,children:u.map(h=>H.jsx(xO,{id:h,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:f,nodesDraggable:n,nodesConnectable:a,nodesFocusable:r,elementsSelectable:l,nodeClickDistance:t.nodeClickDistance,onError:c},h))})}vS.displayName="NodeRenderer";const wO=Q.memo(vS);function SO(t){return Rt(Q.useCallback(a=>{if(!t)return a.edges.map(l=>l.id);const r=[];if(a.width&&a.height)for(const l of a.edges){const c=a.nodeLookup.get(l.source),u=a.nodeLookup.get(l.target);c&&u&&vz({sourceNode:c,targetNode:u,width:a.width,height:a.height,transform:a.transform})&&r.push(l.id)}return r},[t]),It)}const EO=({color:t="none",strokeWidth:n=1})=>{const a={strokeWidth:n,...t&&{stroke:t}};return H.jsx("polyline",{className:"arrow",style:a,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},TO=({color:t="none",strokeWidth:n=1})=>{const a={strokeWidth:n,...t&&{stroke:t,fill:t}};return H.jsx("polyline",{className:"arrowclosed",style:a,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Fx={[Yu.Arrow]:EO,[Yu.ArrowClosed]:TO};function _O(t){const n=Qt();return Q.useMemo(()=>{var l,c;return Object.prototype.hasOwnProperty.call(Fx,t)?Fx[t]:((c=(l=n.getState()).onError)==null||c.call(l,"009",Vn.error009(t)),null)},[t])}const MO=({id:t,type:n,color:a,width:r=12.5,height:l=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:f="auto-start-reverse"})=>{const h=_O(n);return h?H.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${l}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:f,refX:"0",refY:"0",children:H.jsx(h,{color:a,strokeWidth:u})}):null},xS=({defaultColor:t,rfId:n})=>{const a=Rt(c=>c.edges),r=Rt(c=>c.defaultEdgeOptions),l=Q.useMemo(()=>Mz(a,{id:n,defaultColor:t,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[a,r,n,t]);return l.length?H.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:H.jsx("defs",{children:l.map(c=>H.jsx(MO,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};xS.displayName="MarkerDefinitions";var AO=Q.memo(xS);function bS({x:t,y:n,label:a,labelStyle:r,labelShowBg:l=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:f=2,children:h,className:m,...g}){const[p,v]=Q.useState({x:1,y:0,width:0,height:0}),x=ce(["react-flow__edge-textwrapper",m]),b=Q.useRef(null);return Q.useEffect(()=>{if(b.current){const E=b.current.getBBox();v({x:E.x,y:E.y,width:E.width,height:E.height})}},[a]),a?H.jsxs("g",{transform:`translate(${t-p.width/2} ${n-p.height/2})`,className:x,visibility:p.width?"visible":"hidden",...g,children:[l&&H.jsx("rect",{width:p.width+2*u[0],x:-u[0],y:-u[1],height:p.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:f,ry:f}),H.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:b,style:r,children:a}),h]}):null}bS.displayName="EdgeText";const CO=Q.memo(bS);function Mo({path:t,labelX:n,labelY:a,label:r,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:m=20,...g}){return H.jsxs(H.Fragment,{children:[H.jsx("path",{...g,d:t,fill:"none",className:ce(["react-flow__edge-path",g.className])}),m?H.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,r&&vn(n)&&vn(a)?H.jsx(CO,{x:n,y:a,label:r,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function Jx({pos:t,x1:n,y1:a,x2:r,y2:l}){return t===xt.Left||t===xt.Right?[.5*(n+r),a]:[n,.5*(a+l)]}function wS({sourceX:t,sourceY:n,sourcePosition:a=xt.Bottom,targetX:r,targetY:l,targetPosition:c=xt.Top}){const[u,f]=Jx({pos:a,x1:t,y1:n,x2:r,y2:l}),[h,m]=Jx({pos:c,x1:r,y1:l,x2:t,y2:n}),[g,p,v,x]=Pw({sourceX:t,sourceY:n,targetX:r,targetY:l,sourceControlX:u,sourceControlY:f,targetControlX:h,targetControlY:m});return[`M${t},${n} C${u},${f} ${h},${m} ${r},${l}`,g,p,v,x]}function SS(t){return Q.memo(({id:n,sourceX:a,sourceY:r,targetX:l,targetY:c,sourcePosition:u,targetPosition:f,label:h,labelStyle:m,labelShowBg:g,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:E,markerStart:M,interactionWidth:_})=>{const[C,S,T]=wS({sourceX:a,sourceY:r,sourcePosition:u,targetX:l,targetY:c,targetPosition:f}),R=t.isInternal?void 0:n;return H.jsx(Mo,{id:R,path:C,labelX:S,labelY:T,label:h,labelStyle:m,labelShowBg:g,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:E,markerStart:M,interactionWidth:_})})}const NO=SS({isInternal:!1}),ES=SS({isInternal:!0});NO.displayName="SimpleBezierEdge";ES.displayName="SimpleBezierEdgeInternal";function TS(t){return Q.memo(({id:n,sourceX:a,sourceY:r,targetX:l,targetY:c,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:p,style:v,sourcePosition:x=xt.Bottom,targetPosition:b=xt.Top,markerEnd:E,markerStart:M,pathOptions:_,interactionWidth:C})=>{const[S,T,R]=Xu({sourceX:a,sourceY:r,sourcePosition:x,targetX:l,targetY:c,targetPosition:b,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset,stepPosition:_==null?void 0:_.stepPosition}),L=t.isInternal?void 0:n;return H.jsx(Mo,{id:L,path:S,labelX:T,labelY:R,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:p,style:v,markerEnd:E,markerStart:M,interactionWidth:C})})}const _S=TS({isInternal:!1}),MS=TS({isInternal:!0});_S.displayName="SmoothStepEdge";MS.displayName="SmoothStepEdgeInternal";function AS(t){return Q.memo(({id:n,...a})=>{var l;const r=t.isInternal?void 0:n;return H.jsx(_S,{...a,id:r,pathOptions:Q.useMemo(()=>{var c;return{borderRadius:0,offset:(c=a.pathOptions)==null?void 0:c.offset}},[(l=a.pathOptions)==null?void 0:l.offset])})})}const DO=AS({isInternal:!1}),CS=AS({isInternal:!0});DO.displayName="StepEdge";CS.displayName="StepEdgeInternal";function NS(t){return Q.memo(({id:n,sourceX:a,sourceY:r,targetX:l,targetY:c,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:p,style:v,markerEnd:x,markerStart:b,interactionWidth:E})=>{const[M,_,C]=Zw({sourceX:a,sourceY:r,targetX:l,targetY:c}),S=t.isInternal?void 0:n;return H.jsx(Mo,{id:S,path:M,labelX:_,labelY:C,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:p,style:v,markerEnd:x,markerStart:b,interactionWidth:E})})}const zO=NS({isInternal:!1}),DS=NS({isInternal:!0});zO.displayName="StraightEdge";DS.displayName="StraightEdgeInternal";function zS(t){return Q.memo(({id:n,sourceX:a,sourceY:r,targetX:l,targetY:c,sourcePosition:u=xt.Bottom,targetPosition:f=xt.Top,label:h,labelStyle:m,labelShowBg:g,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:E,markerStart:M,pathOptions:_,interactionWidth:C})=>{const[S,T,R]=$w({sourceX:a,sourceY:r,sourcePosition:u,targetX:l,targetY:c,targetPosition:f,curvature:_==null?void 0:_.curvature}),L=t.isInternal?void 0:n;return H.jsx(Mo,{id:L,path:S,labelX:T,labelY:R,label:h,labelStyle:m,labelShowBg:g,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:b,markerEnd:E,markerStart:M,interactionWidth:C})})}const OO=zS({isInternal:!1}),OS=zS({isInternal:!0});OO.displayName="BezierEdge";OS.displayName="BezierEdgeInternal";const Wx={default:OS,straight:DS,step:CS,smoothstep:MS,simplebezier:ES},t1={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},RO=(t,n,a)=>a===xt.Left?t-n:a===xt.Right?t+n:t,jO=(t,n,a)=>a===xt.Top?t-n:a===xt.Bottom?t+n:t,e1="react-flow__edgeupdater";function n1({position:t,centerX:n,centerY:a,radius:r=10,onMouseDown:l,onMouseEnter:c,onMouseOut:u,type:f}){return H.jsx("circle",{onMouseDown:l,onMouseEnter:c,onMouseOut:u,className:ce([e1,`${e1}-${f}`]),cx:RO(n,r,t),cy:jO(a,r,t),r,stroke:"transparent",fill:"transparent"})}function VO({isReconnectable:t,reconnectRadius:n,edge:a,sourceX:r,sourceY:l,targetX:c,targetY:u,sourcePosition:f,targetPosition:h,onReconnect:m,onReconnectStart:g,onReconnectEnd:p,setReconnecting:v,setUpdateHover:x}){const b=Qt(),E=(T,R)=>{if(T.button!==0)return;const{autoPanOnConnect:L,domNode:U,connectionMode:P,connectionRadius:F,lib:X,onConnectStart:k,cancelConnection:Y,nodeLookup:$,rfId:D,panBy:K,updateConnection:A}=b.getState(),j=R.type==="target",V=(N,G)=>{v(!1),p==null||p(N,a,R.type,G)},q=N=>m==null?void 0:m(a,N),I=(N,G)=>{v(!0),g==null||g(T,a,R.type),k==null||k(N,G)};Kh.onPointerDown(T.nativeEvent,{autoPanOnConnect:L,connectionMode:P,connectionRadius:F,domNode:U,handleId:R.id,nodeId:R.nodeId,nodeLookup:$,isTarget:j,edgeUpdaterType:R.type,lib:X,flowId:D,cancelConnection:Y,panBy:K,isValidConnection:(...N)=>{var G,et;return((et=(G=b.getState()).isValidConnection)==null?void 0:et.call(G,...N))??!0},onConnect:q,onConnectStart:I,onConnectEnd:(...N)=>{var G,et;return(et=(G=b.getState()).onConnectEnd)==null?void 0:et.call(G,...N)},onReconnectEnd:V,updateConnection:A,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:T.currentTarget})},M=T=>E(T,{nodeId:a.target,id:a.targetHandle??null,type:"target"}),_=T=>E(T,{nodeId:a.source,id:a.sourceHandle??null,type:"source"}),C=()=>x(!0),S=()=>x(!1);return H.jsxs(H.Fragment,{children:[(t===!0||t==="source")&&H.jsx(n1,{position:f,centerX:r,centerY:l,radius:n,onMouseDown:M,onMouseEnter:C,onMouseOut:S,type:"source"}),(t===!0||t==="target")&&H.jsx(n1,{position:h,centerX:c,centerY:u,radius:n,onMouseDown:_,onMouseEnter:C,onMouseOut:S,type:"target"})]})}function LO({id:t,edgesFocusable:n,edgesReconnectable:a,elementsSelectable:r,onClick:l,onDoubleClick:c,onContextMenu:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,reconnectRadius:g,onReconnect:p,onReconnectStart:v,onReconnectEnd:x,rfId:b,edgeTypes:E,noPanClassName:M,onError:_,disableKeyboardA11y:C}){let S=Rt(mt=>mt.edgeLookup.get(t));const T=Rt(mt=>mt.defaultEdgeOptions);S=T?{...T,...S}:S;let R=S.type||"default",L=(E==null?void 0:E[R])||Wx[R];L===void 0&&(_==null||_("011",Vn.error011(R)),R="default",L=(E==null?void 0:E.default)||Wx.default);const U=!!(S.focusable||n&&typeof S.focusable>"u"),P=typeof p<"u"&&(S.reconnectable||a&&typeof S.reconnectable>"u"),F=!!(S.selectable||r&&typeof S.selectable>"u"),X=Q.useRef(null),[k,Y]=Q.useState(!1),[$,D]=Q.useState(!1),K=Qt(),{zIndex:A,sourceX:j,sourceY:V,targetX:q,targetY:I,sourcePosition:N,targetPosition:G}=Rt(Q.useCallback(mt=>{const vt=mt.nodeLookup.get(S.source),wt=mt.nodeLookup.get(S.target);if(!vt||!wt)return{zIndex:S.zIndex,...t1};const Et=_z({id:t,sourceNode:vt,targetNode:wt,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:mt.connectionMode,onError:_});return{zIndex:yz({selected:S.selected,zIndex:S.zIndex,sourceNode:vt,targetNode:wt,elevateOnSelect:mt.elevateEdgesOnSelect,zIndexMode:mt.zIndexMode}),...Et||t1}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex]),It),et=Q.useMemo(()=>S.markerStart?`url('#${Ph(S.markerStart,b)}')`:void 0,[S.markerStart,b]),B=Q.useMemo(()=>S.markerEnd?`url('#${Ph(S.markerEnd,b)}')`:void 0,[S.markerEnd,b]);if(S.hidden||j===null||V===null||q===null||I===null)return null;const O=mt=>{var _t;const{addSelectedEdges:vt,unselectNodesAndEdges:wt,multiSelectionActive:Et}=K.getState();F&&(K.setState({nodesSelectionActive:!1}),S.selected&&Et?(wt({nodes:[],edges:[S]}),(_t=X.current)==null||_t.blur()):vt([t])),l&&l(mt,S)},Z=c?mt=>{c(mt,{...S})}:void 0,J=u?mt=>{u(mt,{...S})}:void 0,tt=f?mt=>{f(mt,{...S})}:void 0,at=h?mt=>{h(mt,{...S})}:void 0,dt=m?mt=>{m(mt,{...S})}:void 0,ht=mt=>{var vt;if(!C&&zw.includes(mt.key)&&F){const{unselectNodesAndEdges:wt,addSelectedEdges:Et}=K.getState();mt.key==="Escape"?((vt=X.current)==null||vt.blur(),wt({edges:[S]})):Et([t])}};return H.jsx("svg",{style:{zIndex:A},children:H.jsxs("g",{className:ce(["react-flow__edge",`react-flow__edge-${R}`,S.className,M,{selected:S.selected,animated:S.animated,inactive:!F&&!l,updating:k,selectable:F}]),onClick:O,onDoubleClick:Z,onContextMenu:J,onMouseEnter:tt,onMouseMove:at,onMouseLeave:dt,onKeyDown:U?ht:void 0,tabIndex:U?0:void 0,role:S.ariaRole??(U?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":U?`${uS}-${b}`:void 0,ref:X,...S.domAttributes,children:[!$&&H.jsx(L,{id:t,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:F,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:j,sourceY:V,targetX:q,targetY:I,sourcePosition:N,targetPosition:G,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:et,markerEnd:B,pathOptions:"pathOptions"in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),P&&H.jsx(VO,{edge:S,isReconnectable:P,reconnectRadius:g,onReconnect:p,onReconnectStart:v,onReconnectEnd:x,sourceX:j,sourceY:V,targetX:q,targetY:I,sourcePosition:N,targetPosition:G,setUpdateHover:Y,setReconnecting:D})]})})}var kO=Q.memo(LO);const BO=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function RS({defaultMarkerColor:t,onlyRenderVisibleElements:n,rfId:a,edgeTypes:r,noPanClassName:l,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:m,onEdgeClick:g,reconnectRadius:p,onEdgeDoubleClick:v,onReconnectStart:x,onReconnectEnd:b,disableKeyboardA11y:E}){const{edgesFocusable:M,edgesReconnectable:_,elementsSelectable:C,onError:S}=Rt(BO,It),T=SO(n);return H.jsxs("div",{className:"react-flow__edges",children:[H.jsx(AO,{defaultColor:t,rfId:a}),T.map(R=>H.jsx(kO,{id:R,edgesFocusable:M,edgesReconnectable:_,elementsSelectable:C,noPanClassName:l,onReconnect:c,onContextMenu:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,onClick:g,reconnectRadius:p,onDoubleClick:v,onReconnectStart:x,onReconnectEnd:b,rfId:a,onError:S,edgeTypes:r,disableKeyboardA11y:E},R))]})}RS.displayName="EdgeRenderer";const HO=Q.memo(RS),UO=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function YO({children:t}){const n=Rt(UO);return H.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:t})}function GO(t){const n=Hm(),a=Q.useRef(!1);Q.useEffect(()=>{!a.current&&n.viewportInitialized&&t&&(setTimeout(()=>t(n),1),a.current=!0)},[t,n.viewportInitialized])}const qO=t=>{var n;return(n=t.panZoom)==null?void 0:n.syncViewport};function XO(t){const n=Rt(qO),a=Qt();return Q.useEffect(()=>{t&&(n==null||n(t),a.setState({transform:[t.x,t.y,t.zoom]}))},[t,n]),null}function PO(t){return t.connection.inProgress?{...t.connection,to:_o(t.connection.to,t.transform)}:{...t.connection}}function $O(t){return PO}function KO(t){const n=$O();return Rt(n,It)}const ZO=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function IO({containerStyle:t,style:n,type:a,component:r}){const{nodesConnectable:l,width:c,height:u,isValid:f,inProgress:h}=Rt(ZO,It);return!(c&&l&&h)?null:H.jsx("svg",{style:t,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:H.jsx("g",{className:ce(["react-flow__connection",jw(f)]),children:H.jsx(jS,{style:n,type:a,CustomComponent:r,isValid:f})})})}const jS=({style:t,type:n=Pi.Bezier,CustomComponent:a,isValid:r})=>{const{inProgress:l,from:c,fromNode:u,fromHandle:f,fromPosition:h,to:m,toNode:g,toHandle:p,toPosition:v,pointer:x}=KO();if(!l)return;if(a)return H.jsx(a,{connectionLineType:n,connectionLineStyle:t,fromNode:u,fromHandle:f,fromX:c.x,fromY:c.y,toX:m.x,toY:m.y,fromPosition:h,toPosition:v,connectionStatus:jw(r),toNode:g,toHandle:p,pointer:x});let b="";const E={sourceX:c.x,sourceY:c.y,sourcePosition:h,targetX:m.x,targetY:m.y,targetPosition:v};switch(n){case Pi.Bezier:[b]=$w(E);break;case Pi.SimpleBezier:[b]=wS(E);break;case Pi.Step:[b]=Xu({...E,borderRadius:0});break;case Pi.SmoothStep:[b]=Xu(E);break;default:[b]=Zw(E)}return H.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:t})};jS.displayName="ConnectionLine";const QO={};function i1(t=QO){Q.useRef(t),Qt(),Q.useEffect(()=>{},[t])}function FO(){Qt(),Q.useRef(!1),Q.useEffect(()=>{},[])}function VS({nodeTypes:t,edgeTypes:n,onInit:a,onNodeClick:r,onEdgeClick:l,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,onSelectionContextMenu:p,onSelectionStart:v,onSelectionEnd:x,connectionLineType:b,connectionLineStyle:E,connectionLineComponent:M,connectionLineContainerStyle:_,selectionKeyCode:C,selectionOnDrag:S,selectionMode:T,multiSelectionKeyCode:R,panActivationKeyCode:L,zoomActivationKeyCode:U,deleteKeyCode:P,onlyRenderVisibleElements:F,elementsSelectable:X,defaultViewport:k,translateExtent:Y,minZoom:$,maxZoom:D,preventScrolling:K,defaultMarkerColor:A,zoomOnScroll:j,zoomOnPinch:V,panOnScroll:q,panOnScrollSpeed:I,panOnScrollMode:N,zoomOnDoubleClick:G,panOnDrag:et,onPaneClick:B,onPaneMouseEnter:O,onPaneMouseMove:Z,onPaneMouseLeave:J,onPaneScroll:tt,onPaneContextMenu:at,paneClickDistance:dt,nodeClickDistance:ht,onEdgeContextMenu:mt,onEdgeMouseEnter:vt,onEdgeMouseMove:wt,onEdgeMouseLeave:Et,reconnectRadius:_t,onReconnect:te,onReconnectStart:De,onReconnectEnd:Ue,noDragClassName:un,noWheelClassName:kn,noPanClassName:Fi,disableKeyboardA11y:Ji,nodeExtent:ge,rfId:ka,viewport:Bn,onViewportChange:fi}){return i1(t),i1(n),FO(),GO(a),XO(Bn),H.jsx(dO,{onPaneClick:B,onPaneMouseEnter:O,onPaneMouseMove:Z,onPaneMouseLeave:J,onPaneContextMenu:at,onPaneScroll:tt,paneClickDistance:dt,deleteKeyCode:P,selectionKeyCode:C,selectionOnDrag:S,selectionMode:T,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:R,panActivationKeyCode:L,zoomActivationKeyCode:U,elementsSelectable:X,zoomOnScroll:j,zoomOnPinch:V,zoomOnDoubleClick:G,panOnScroll:q,panOnScrollSpeed:I,panOnScrollMode:N,panOnDrag:et,defaultViewport:k,translateExtent:Y,minZoom:$,maxZoom:D,onSelectionContextMenu:p,preventScrolling:K,noDragClassName:un,noWheelClassName:kn,noPanClassName:Fi,disableKeyboardA11y:Ji,onViewportChange:fi,isControlledViewport:!!Bn,children:H.jsxs(YO,{children:[H.jsx(HO,{edgeTypes:n,onEdgeClick:l,onEdgeDoubleClick:u,onReconnect:te,onReconnectStart:De,onReconnectEnd:Ue,onlyRenderVisibleElements:F,onEdgeContextMenu:mt,onEdgeMouseEnter:vt,onEdgeMouseMove:wt,onEdgeMouseLeave:Et,reconnectRadius:_t,defaultMarkerColor:A,noPanClassName:Fi,disableKeyboardA11y:Ji,rfId:ka}),H.jsx(IO,{style:E,type:b,component:M,containerStyle:_}),H.jsx("div",{className:"react-flow__edgelabel-renderer"}),H.jsx(wO,{nodeTypes:t,onNodeClick:r,onNodeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,nodeClickDistance:ht,onlyRenderVisibleElements:F,noPanClassName:Fi,noDragClassName:un,disableKeyboardA11y:Ji,nodeExtent:ge,rfId:ka}),H.jsx("div",{className:"react-flow__viewport-portal"})]})})}VS.displayName="GraphView";const JO=Q.memo(VS),a1=({nodes:t,edges:n,defaultNodes:a,defaultEdges:r,width:l,height:c,fitView:u,fitViewOptions:f,minZoom:h=.5,maxZoom:m=2,nodeOrigin:g,nodeExtent:p,zIndexMode:v="basic"}={})=>{const x=new Map,b=new Map,E=new Map,M=new Map,_=r??n??[],C=a??t??[],S=g??[0,0],T=p??oo;Fw(E,M,_);const R=$h(C,x,b,{nodeOrigin:S,nodeExtent:T,zIndexMode:v});let L=[0,0,1];if(u&&l&&c){const U=Eo(x,{filter:k=>!!((k.width||k.initialWidth)&&(k.height||k.initialHeight))}),{x:P,y:F,zoom:X}=Om(U,l,c,h,m,(f==null?void 0:f.padding)??.1);L=[P,F,X]}return{rfId:"1",width:l??0,height:c??0,transform:L,nodes:C,nodesInitialized:R,nodeLookup:x,parentLookup:b,edges:_,edgeLookup:M,connectionLookup:E,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:a!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:h,maxZoom:m,translateExtent:oo,nodeExtent:T,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ls.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:S,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:f,fitViewResolver:null,connection:{...Rw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fz,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Ow,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},WO=({nodes:t,edges:n,defaultNodes:a,defaultEdges:r,width:l,height:c,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:g,nodeExtent:p,zIndexMode:v})=>p4((x,b)=>{async function E(){const{nodeLookup:M,panZoom:_,fitViewOptions:C,fitViewResolver:S,width:T,height:R,minZoom:L,maxZoom:U}=b();_&&(await uz({nodes:M,width:T,height:R,panZoom:_,minZoom:L,maxZoom:U},C),S==null||S.resolve(!0),x({fitViewResolver:null}))}return{...a1({nodes:t,edges:n,width:l,height:c,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:g,nodeExtent:p,defaultNodes:a,defaultEdges:r,zIndexMode:v}),setNodes:M=>{const{nodeLookup:_,parentLookup:C,nodeOrigin:S,elevateNodesOnSelect:T,fitViewQueued:R,zIndexMode:L}=b(),U=$h(M,_,C,{nodeOrigin:S,nodeExtent:p,elevateNodesOnSelect:T,checkEquality:!0,zIndexMode:L});R&&U?(E(),x({nodes:M,nodesInitialized:U,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:M,nodesInitialized:U})},setEdges:M=>{const{connectionLookup:_,edgeLookup:C}=b();Fw(_,C,M),x({edges:M})},setDefaultNodesAndEdges:(M,_)=>{if(M){const{setNodes:C}=b();C(M),x({hasDefaultNodes:!0})}if(_){const{setEdges:C}=b();C(_),x({hasDefaultEdges:!0})}},updateNodeInternals:M=>{const{triggerNodeChanges:_,nodeLookup:C,parentLookup:S,domNode:T,nodeOrigin:R,nodeExtent:L,debug:U,fitViewQueued:P,zIndexMode:F}=b(),{changes:X,updatedInternals:k}=Rz(M,C,S,T,R,L,F);k&&(Nz(C,S,{nodeOrigin:R,nodeExtent:L,zIndexMode:F}),P?(E(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(X==null?void 0:X.length)>0&&(U&&console.log("React Flow: trigger node changes",X),_==null||_(X)))},updateNodePositions:(M,_=!1)=>{const C=[];let S=[];const{nodeLookup:T,triggerNodeChanges:R,connection:L,updateConnection:U,onNodesChangeMiddlewareMap:P}=b();for(const[F,X]of M){const k=T.get(F),Y=!!(k!=null&&k.expandParent&&(k!=null&&k.parentId)&&(X!=null&&X.position)),$={id:F,type:"position",position:Y?{x:Math.max(0,X.position.x),y:Math.max(0,X.position.y)}:X.position,dragging:_};if(k&&L.inProgress&&L.fromNode.id===k.id){const D=La(k,L.fromHandle,xt.Left,!0);U({...L,from:D})}Y&&k.parentId&&C.push({id:F,parentId:k.parentId,rect:{...X.internals.positionAbsolute,width:X.measured.width??0,height:X.measured.height??0}}),S.push($)}if(C.length>0){const{parentLookup:F,nodeOrigin:X}=b(),k=Bm(C,T,F,X);S.push(...k)}for(const F of P.values())S=F(S);R(S)},triggerNodeChanges:M=>{const{onNodesChange:_,setNodes:C,nodes:S,hasDefaultNodes:T,debug:R}=b();if(M!=null&&M.length){if(T){const L=L4(M,S);C(L)}R&&console.log("React Flow: trigger node changes",M),_==null||_(M)}},triggerEdgeChanges:M=>{const{onEdgesChange:_,setEdges:C,edges:S,hasDefaultEdges:T,debug:R}=b();if(M!=null&&M.length){if(T){const L=k4(M,S);C(L)}R&&console.log("React Flow: trigger edge changes",M),_==null||_(M)}},addSelectedNodes:M=>{const{multiSelectionActive:_,edgeLookup:C,nodeLookup:S,triggerNodeChanges:T,triggerEdgeChanges:R}=b();if(_){const L=M.map(U=>Ta(U,!0));T(L);return}T(Ds(S,new Set([...M]),!0)),R(Ds(C))},addSelectedEdges:M=>{const{multiSelectionActive:_,edgeLookup:C,nodeLookup:S,triggerNodeChanges:T,triggerEdgeChanges:R}=b();if(_){const L=M.map(U=>Ta(U,!0));R(L);return}R(Ds(C,new Set([...M]))),T(Ds(S,new Set,!0))},unselectNodesAndEdges:({nodes:M,edges:_}={})=>{const{edges:C,nodes:S,nodeLookup:T,triggerNodeChanges:R,triggerEdgeChanges:L}=b(),U=M||S,P=_||C,F=[];for(const k of U){if(!k.selected)continue;const Y=T.get(k.id);Y&&(Y.selected=!1),F.push(Ta(k.id,!1))}const X=[];for(const k of P)k.selected&&X.push(Ta(k.id,!1));R(F),L(X)},setMinZoom:M=>{const{panZoom:_,maxZoom:C}=b();_==null||_.setScaleExtent([M,C]),x({minZoom:M})},setMaxZoom:M=>{const{panZoom:_,minZoom:C}=b();_==null||_.setScaleExtent([C,M]),x({maxZoom:M})},setTranslateExtent:M=>{var _;(_=b().panZoom)==null||_.setTranslateExtent(M),x({translateExtent:M})},resetSelectedElements:()=>{const{edges:M,nodes:_,triggerNodeChanges:C,triggerEdgeChanges:S,elementsSelectable:T}=b();if(!T)return;const R=_.reduce((U,P)=>P.selected?[...U,Ta(P.id,!1)]:U,[]),L=M.reduce((U,P)=>P.selected?[...U,Ta(P.id,!1)]:U,[]);C(R),S(L)},setNodeExtent:M=>{const{nodes:_,nodeLookup:C,parentLookup:S,nodeOrigin:T,elevateNodesOnSelect:R,nodeExtent:L,zIndexMode:U}=b();M[0][0]===L[0][0]&&M[0][1]===L[0][1]&&M[1][0]===L[1][0]&&M[1][1]===L[1][1]||($h(_,C,S,{nodeOrigin:T,nodeExtent:M,elevateNodesOnSelect:R,checkEquality:!1,zIndexMode:U}),x({nodeExtent:M}))},panBy:M=>{const{transform:_,width:C,height:S,panZoom:T,translateExtent:R}=b();return jz({delta:M,panZoom:T,transform:_,translateExtent:R,width:C,height:S})},setCenter:async(M,_,C)=>{const{width:S,height:T,maxZoom:R,panZoom:L}=b();if(!L)return Promise.resolve(!1);const U=typeof(C==null?void 0:C.zoom)<"u"?C.zoom:R;return await L.setViewport({x:S/2-M*U,y:T/2-_*U,zoom:U},{duration:C==null?void 0:C.duration,ease:C==null?void 0:C.ease,interpolate:C==null?void 0:C.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...Rw}})},updateConnection:M=>{x({connection:M})},reset:()=>x({...a1()})}},Object.is);function tR({initialNodes:t,initialEdges:n,defaultNodes:a,defaultEdges:r,initialWidth:l,initialHeight:c,initialMinZoom:u,initialMaxZoom:f,initialFitViewOptions:h,fitView:m,nodeOrigin:g,nodeExtent:p,zIndexMode:v,children:x}){const[b]=Q.useState(()=>WO({nodes:t,edges:n,defaultNodes:a,defaultEdges:r,width:l,height:c,fitView:m,minZoom:u,maxZoom:f,fitViewOptions:h,nodeOrigin:g,nodeExtent:p,zIndexMode:v}));return H.jsx(g4,{value:b,children:H.jsx(Y4,{children:x})})}function eR({children:t,nodes:n,edges:a,defaultNodes:r,defaultEdges:l,width:c,height:u,fitView:f,fitViewOptions:h,minZoom:m,maxZoom:g,nodeOrigin:p,nodeExtent:v,zIndexMode:x}){return Q.useContext(rc)?H.jsx(H.Fragment,{children:t}):H.jsx(tR,{initialNodes:n,initialEdges:a,defaultNodes:r,defaultEdges:l,initialWidth:c,initialHeight:u,fitView:f,initialFitViewOptions:h,initialMinZoom:m,initialMaxZoom:g,nodeOrigin:p,nodeExtent:v,zIndexMode:x,children:t})}const nR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function iR({nodes:t,edges:n,defaultNodes:a,defaultEdges:r,className:l,nodeTypes:c,edgeTypes:u,onNodeClick:f,onEdgeClick:h,onInit:m,onMove:g,onMoveStart:p,onMoveEnd:v,onConnect:x,onConnectStart:b,onConnectEnd:E,onClickConnectStart:M,onClickConnectEnd:_,onNodeMouseEnter:C,onNodeMouseMove:S,onNodeMouseLeave:T,onNodeContextMenu:R,onNodeDoubleClick:L,onNodeDragStart:U,onNodeDrag:P,onNodeDragStop:F,onNodesDelete:X,onEdgesDelete:k,onDelete:Y,onSelectionChange:$,onSelectionDragStart:D,onSelectionDrag:K,onSelectionDragStop:A,onSelectionContextMenu:j,onSelectionStart:V,onSelectionEnd:q,onBeforeDelete:I,connectionMode:N,connectionLineType:G=Pi.Bezier,connectionLineStyle:et,connectionLineComponent:B,connectionLineContainerStyle:O,deleteKeyCode:Z="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:tt=!1,selectionMode:at=lo.Full,panActivationKeyCode:dt="Space",multiSelectionKeyCode:ht=co()?"Meta":"Control",zoomActivationKeyCode:mt=co()?"Meta":"Control",snapToGrid:vt,snapGrid:wt,onlyRenderVisibleElements:Et=!1,selectNodesOnDrag:_t,nodesDraggable:te,autoPanOnNodeFocus:De,nodesConnectable:Ue,nodesFocusable:un,nodeOrigin:kn=cS,edgesFocusable:Fi,edgesReconnectable:Ji,elementsSelectable:ge=!0,defaultViewport:ka=N4,minZoom:Bn=.5,maxZoom:fi=2,translateExtent:Wi=oo,preventScrolling:uc=!0,nodeExtent:Ba,defaultMarkerColor:cc="#b1b1b7",zoomOnScroll:fc=!0,zoomOnPinch:ta=!0,panOnScroll:_e=!1,panOnScrollSpeed:En=.5,panOnScrollMode:Me=za.Free,zoomOnDoubleClick:dc=!0,panOnDrag:hc=!0,onPaneClick:mc,onPaneMouseEnter:Ha,onPaneMouseMove:Ua,onPaneMouseLeave:Ya,onPaneScroll:Hn,onPaneContextMenu:Ga,paneClickDistance:ea=1,nodeClickDistance:pc=0,children:Ao,onReconnect:Xs,onReconnectStart:na,onReconnectEnd:gc,onEdgeContextMenu:Co,onEdgeDoubleClick:No,onEdgeMouseEnter:Do,onEdgeMouseMove:Ps,onEdgeMouseLeave:$s,reconnectRadius:zo=10,onNodesChange:Oo,onEdgesChange:Tn,noDragClassName:fe="nodrag",noWheelClassName:Ee="nowheel",noPanClassName:Un="nopan",fitView:qa,fitViewOptions:Ro,connectOnClick:yc,attributionPosition:jo,proOptions:ia,defaultEdgeOptions:Ks,elevateNodesOnSelect:di=!0,elevateEdgesOnSelect:hi=!1,disableKeyboardA11y:mi=!1,autoPanOnConnect:pi,autoPanOnNodeDrag:ie,autoPanSpeed:Vo,connectionRadius:Lo,isValidConnection:Yn,onError:gi,style:vc,id:Zs,nodeDragThreshold:ko,connectionDragThreshold:xc,viewport:Xa,onViewportChange:Pa,width:cn,height:ze,colorMode:Bo="light",debug:bc,onScroll:yi,ariaLabelConfig:Ho,zIndexMode:aa="basic",...wc},Oe){const sa=Zs||"1",Uo=R4(Bo),Is=Q.useCallback(Gn=>{Gn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yi==null||yi(Gn)},[yi]);return H.jsx("div",{"data-testid":"rf__wrapper",...wc,onScroll:Is,style:{...vc,...nR},ref:Oe,className:ce(["react-flow",l,Uo]),id:Zs,role:"application",children:H.jsxs(eR,{nodes:t,edges:n,width:cn,height:ze,fitView:qa,fitViewOptions:Ro,minZoom:Bn,maxZoom:fi,nodeOrigin:kn,nodeExtent:Ba,zIndexMode:aa,children:[H.jsx(JO,{onInit:m,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:C,onNodeMouseMove:S,onNodeMouseLeave:T,onNodeContextMenu:R,onNodeDoubleClick:L,nodeTypes:c,edgeTypes:u,connectionLineType:G,connectionLineStyle:et,connectionLineComponent:B,connectionLineContainerStyle:O,selectionKeyCode:J,selectionOnDrag:tt,selectionMode:at,deleteKeyCode:Z,multiSelectionKeyCode:ht,panActivationKeyCode:dt,zoomActivationKeyCode:mt,onlyRenderVisibleElements:Et,defaultViewport:ka,translateExtent:Wi,minZoom:Bn,maxZoom:fi,preventScrolling:uc,zoomOnScroll:fc,zoomOnPinch:ta,zoomOnDoubleClick:dc,panOnScroll:_e,panOnScrollSpeed:En,panOnScrollMode:Me,panOnDrag:hc,onPaneClick:mc,onPaneMouseEnter:Ha,onPaneMouseMove:Ua,onPaneMouseLeave:Ya,onPaneScroll:Hn,onPaneContextMenu:Ga,paneClickDistance:ea,nodeClickDistance:pc,onSelectionContextMenu:j,onSelectionStart:V,onSelectionEnd:q,onReconnect:Xs,onReconnectStart:na,onReconnectEnd:gc,onEdgeContextMenu:Co,onEdgeDoubleClick:No,onEdgeMouseEnter:Do,onEdgeMouseMove:Ps,onEdgeMouseLeave:$s,reconnectRadius:zo,defaultMarkerColor:cc,noDragClassName:fe,noWheelClassName:Ee,noPanClassName:Un,rfId:sa,disableKeyboardA11y:mi,nodeExtent:Ba,viewport:Xa,onViewportChange:Pa}),H.jsx(O4,{nodes:t,edges:n,defaultNodes:a,defaultEdges:r,onConnect:x,onConnectStart:b,onConnectEnd:E,onClickConnectStart:M,onClickConnectEnd:_,nodesDraggable:te,autoPanOnNodeFocus:De,nodesConnectable:Ue,nodesFocusable:un,edgesFocusable:Fi,edgesReconnectable:Ji,elementsSelectable:ge,elevateNodesOnSelect:di,elevateEdgesOnSelect:hi,minZoom:Bn,maxZoom:fi,nodeExtent:Ba,onNodesChange:Oo,onEdgesChange:Tn,snapToGrid:vt,snapGrid:wt,connectionMode:N,translateExtent:Wi,connectOnClick:yc,defaultEdgeOptions:Ks,fitView:qa,fitViewOptions:Ro,onNodesDelete:X,onEdgesDelete:k,onDelete:Y,onNodeDragStart:U,onNodeDrag:P,onNodeDragStop:F,onSelectionDrag:K,onSelectionDragStart:D,onSelectionDragStop:A,onMove:g,onMoveStart:p,onMoveEnd:v,noPanClassName:Un,nodeOrigin:kn,rfId:sa,autoPanOnConnect:pi,autoPanOnNodeDrag:ie,autoPanSpeed:Vo,onError:gi,connectionRadius:Lo,isValidConnection:Yn,selectNodesOnDrag:_t,nodeDragThreshold:ko,connectionDragThreshold:xc,onBeforeDelete:I,debug:bc,ariaLabelConfig:Ho,zIndexMode:aa}),H.jsx(C4,{onSelectionChange:$}),Ao,H.jsx(E4,{proOptions:ia,position:jo}),H.jsx(S4,{rfId:sa,disableKeyboardA11y:mi})]})})}var aR=dS(iR);function sR({dimensions:t,lineWidth:n,variant:a,className:r}){return H.jsx("path",{strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:ce(["react-flow__background-pattern",a,r])})}function rR({radius:t,className:n}){return H.jsx("circle",{cx:t,cy:t,r:t,className:ce(["react-flow__background-pattern","dots",n])})}var Ki;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Ki||(Ki={}));const oR={[Ki.Dots]:1,[Ki.Lines]:1,[Ki.Cross]:6},lR=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function LS({id:t,variant:n=Ki.Dots,gap:a=20,size:r,lineWidth:l=1,offset:c=0,color:u,bgColor:f,style:h,className:m,patternClassName:g}){const p=Q.useRef(null),{transform:v,patternId:x}=Rt(lR,It),b=r||oR[n],E=n===Ki.Dots,M=n===Ki.Cross,_=Array.isArray(a)?a:[a,a],C=[_[0]*v[2]||1,_[1]*v[2]||1],S=b*v[2],T=Array.isArray(c)?c:[c,c],R=M?[S,S]:C,L=[T[0]*v[2]||1+R[0]/2,T[1]*v[2]||1+R[1]/2],U=`${x}${t||""}`;return H.jsxs("svg",{className:ce(["react-flow__background",m]),style:{...h,...lc,"--xy-background-color-props":f,"--xy-background-pattern-color-props":u},ref:p,"data-testid":"rf__background",children:[H.jsx("pattern",{id:U,x:v[0]%C[0],y:v[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${L[0]},-${L[1]})`,children:E?H.jsx(rR,{radius:S/2,className:g}):H.jsx(sR,{dimensions:R,lineWidth:l,variant:n,className:g})}),H.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${U})`})]})}LS.displayName="Background";const uR=Q.memo(LS);function cR(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:H.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function fR(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:H.jsx("path",{d:"M0 0h32v4.2H0z"})})}function dR(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:H.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function hR(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:H.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function mR(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:H.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function uu({children:t,className:n,...a}){return H.jsx("button",{type:"button",className:ce(["react-flow__controls-button",n]),...a,children:t})}const pR=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function kS({style:t,showZoom:n=!0,showFitView:a=!0,showInteractive:r=!0,fitViewOptions:l,onZoomIn:c,onZoomOut:u,onFitView:f,onInteractiveChange:h,className:m,children:g,position:p="bottom-left",orientation:v="vertical","aria-label":x}){const b=Qt(),{isInteractive:E,minZoomReached:M,maxZoomReached:_,ariaLabelConfig:C}=Rt(pR,It),{zoomIn:S,zoomOut:T,fitView:R}=Hm(),L=()=>{S(),c==null||c()},U=()=>{T(),u==null||u()},P=()=>{R(l),f==null||f()},F=()=>{b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),h==null||h(!E)},X=v==="horizontal"?"horizontal":"vertical";return H.jsxs(oc,{className:ce(["react-flow__controls",X,m]),position:p,style:t,"data-testid":"rf__controls","aria-label":x??C["controls.ariaLabel"],children:[n&&H.jsxs(H.Fragment,{children:[H.jsx(uu,{onClick:L,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:_,children:H.jsx(cR,{})}),H.jsx(uu,{onClick:U,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:M,children:H.jsx(fR,{})})]}),a&&H.jsx(uu,{className:"react-flow__controls-fitview",onClick:P,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:H.jsx(dR,{})}),r&&H.jsx(uu,{className:"react-flow__controls-interactive",onClick:F,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:E?H.jsx(mR,{}):H.jsx(hR,{})}),g]})}kS.displayName="Controls";const gR=Q.memo(kS);function yR({id:t,x:n,y:a,width:r,height:l,style:c,color:u,strokeColor:f,strokeWidth:h,className:m,borderRadius:g,shapeRendering:p,selected:v,onClick:x}){const{background:b,backgroundColor:E}=c||{},M=u||b||E;return H.jsx("rect",{className:ce(["react-flow__minimap-node",{selected:v},m]),x:n,y:a,rx:g,ry:g,width:r,height:l,style:{fill:M,stroke:f,strokeWidth:h},shapeRendering:p,onClick:x?_=>x(_,t):void 0})}const vR=Q.memo(yR),xR=t=>t.nodes.map(n=>n.id),uh=t=>t instanceof Function?t:()=>t;function bR({nodeStrokeColor:t,nodeColor:n,nodeClassName:a="",nodeBorderRadius:r=5,nodeStrokeWidth:l,nodeComponent:c=vR,onClick:u}){const f=Rt(xR,It),h=uh(n),m=uh(t),g=uh(a),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return H.jsx(H.Fragment,{children:f.map(v=>H.jsx(SR,{id:v,nodeColorFunc:h,nodeStrokeColorFunc:m,nodeClassNameFunc:g,nodeBorderRadius:r,nodeStrokeWidth:l,NodeComponent:c,onClick:u,shapeRendering:p},v))})}function wR({id:t,nodeColorFunc:n,nodeStrokeColorFunc:a,nodeClassNameFunc:r,nodeBorderRadius:l,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:f,onClick:h}){const{node:m,x:g,y:p,width:v,height:x}=Rt(b=>{const E=b.nodeLookup.get(t);if(!E)return{node:void 0,x:0,y:0,width:0,height:0};const M=E.internals.userNode,{x:_,y:C}=E.internals.positionAbsolute,{width:S,height:T}=ci(M);return{node:M,x:_,y:C,width:S,height:T}},It);return!m||m.hidden||!Uw(m)?null:H.jsx(f,{x:g,y:p,width:v,height:x,style:m.style,selected:!!m.selected,className:r(m),color:n(m),borderRadius:l,strokeColor:a(m),strokeWidth:c,shapeRendering:u,onClick:h,id:m.id})}const SR=Q.memo(wR);var ER=Q.memo(bR);const TR=200,_R=150,MR=t=>!t.hidden,AR=t=>{const n={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:n,boundingRect:t.nodeLookup.size>0?Hw(Eo(t.nodeLookup,{filter:MR}),n):n,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},CR="react-flow__minimap-desc";function BS({style:t,className:n,nodeStrokeColor:a,nodeColor:r,nodeClassName:l="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:f,bgColor:h,maskColor:m,maskStrokeColor:g,maskStrokeWidth:p,position:v="bottom-right",onClick:x,onNodeClick:b,pannable:E=!1,zoomable:M=!1,ariaLabel:_,inversePan:C,zoomStep:S=1,offsetScale:T=5}){const R=Qt(),L=Q.useRef(null),{boundingRect:U,viewBB:P,rfId:F,panZoom:X,translateExtent:k,flowWidth:Y,flowHeight:$,ariaLabelConfig:D}=Rt(AR,It),K=(t==null?void 0:t.width)??TR,A=(t==null?void 0:t.height)??_R,j=U.width/K,V=U.height/A,q=Math.max(j,V),I=q*K,N=q*A,G=T*q,et=U.x-(I-U.width)/2-G,B=U.y-(N-U.height)/2-G,O=I+G*2,Z=N+G*2,J=`${CR}-${F}`,tt=Q.useRef(0),at=Q.useRef();tt.current=q,Q.useEffect(()=>{if(L.current&&X)return at.current=qz({domNode:L.current,panZoom:X,getTransform:()=>R.getState().transform,getViewScale:()=>tt.current}),()=>{var vt;(vt=at.current)==null||vt.destroy()}},[X]),Q.useEffect(()=>{var vt;(vt=at.current)==null||vt.update({translateExtent:k,width:Y,height:$,inversePan:C,pannable:E,zoomStep:S,zoomable:M})},[E,M,C,S,k,Y,$]);const dt=x?vt=>{var _t;const[wt,Et]=((_t=at.current)==null?void 0:_t.pointer(vt))||[0,0];x(vt,{x:wt,y:Et})}:void 0,ht=b?Q.useCallback((vt,wt)=>{const Et=R.getState().nodeLookup.get(wt).internals.userNode;b(vt,Et)},[]):void 0,mt=_??D["minimap.ariaLabel"];return H.jsx(oc,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*q:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:ce(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:H.jsxs("svg",{width:K,height:A,viewBox:`${et} ${B} ${O} ${Z}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:L,onClick:dt,children:[mt&&H.jsx("title",{id:J,children:mt}),H.jsx(ER,{onClick:ht,nodeColor:r,nodeStrokeColor:a,nodeBorderRadius:c,nodeClassName:l,nodeStrokeWidth:u,nodeComponent:f}),H.jsx("path",{className:"react-flow__minimap-mask",d:`M${et-G},${B-G}h${O+G*2}v${Z+G*2}h${-O-G*2}z
        M${P.x},${P.y}h${P.width}v${P.height}h${-P.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}BS.displayName="MiniMap";Q.memo(BS);const NR=t=>n=>t?`${Math.max(1/n.transform[2],1)}`:void 0,DR={[Us.Line]:"right",[Us.Handle]:"bottom-right"};function zR({nodeId:t,position:n,variant:a=Us.Handle,className:r,style:l=void 0,children:c,color:u,minWidth:f=10,minHeight:h=10,maxWidth:m=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:v,autoScale:x=!0,shouldResize:b,onResizeStart:E,onResize:M,onResizeEnd:_}){const C=gS(),S=typeof t=="string"?t:C,T=Qt(),R=Q.useRef(null),L=a===Us.Handle,U=Rt(Q.useCallback(NR(L&&x),[L,x]),It),P=Q.useRef(null),F=n??DR[a];Q.useEffect(()=>{if(!(!R.current||!S))return P.current||(P.current=i4({domNode:R.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:k,transform:Y,snapGrid:$,snapToGrid:D,nodeOrigin:K,domNode:A}=T.getState();return{nodeLookup:k,transform:Y,snapGrid:$,snapToGrid:D,nodeOrigin:K,paneDomNode:A}},onChange:(k,Y)=>{const{triggerNodeChanges:$,nodeLookup:D,parentLookup:K,nodeOrigin:A}=T.getState(),j=[],V={x:k.x,y:k.y},q=D.get(S);if(q&&q.expandParent&&q.parentId){const I=q.origin??A,N=k.width??q.measured.width??0,G=k.height??q.measured.height??0,et={id:q.id,parentId:q.parentId,rect:{width:N,height:G,...Yw({x:k.x??q.position.x,y:k.y??q.position.y},{width:N,height:G},q.parentId,D,I)}},B=Bm([et],D,K,A);j.push(...B),V.x=k.x?Math.max(I[0]*N,k.x):void 0,V.y=k.y?Math.max(I[1]*G,k.y):void 0}if(V.x!==void 0&&V.y!==void 0){const I={id:S,type:"position",position:{...V}};j.push(I)}if(k.width!==void 0&&k.height!==void 0){const N={id:S,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:k.width,height:k.height}};j.push(N)}for(const I of Y){const N={...I,type:"position"};j.push(N)}$(j)},onEnd:({width:k,height:Y})=>{const $={id:S,type:"dimensions",resizing:!1,dimensions:{width:k,height:Y}};T.getState().triggerNodeChanges([$])}})),P.current.update({controlPosition:F,boundaries:{minWidth:f,minHeight:h,maxWidth:m,maxHeight:g},keepAspectRatio:p,resizeDirection:v,onResizeStart:E,onResize:M,onResizeEnd:_,shouldResize:b}),()=>{var k;(k=P.current)==null||k.destroy()}},[F,f,h,m,g,p,E,M,_,b]);const X=F.split("-");return H.jsx("div",{className:ce(["react-flow__resize-control","nodrag",...X,a,r]),ref:R,style:{...l,scale:U,...u&&{[L?"backgroundColor":"borderColor"]:u}},children:c})}Q.memo(zR);var Ut=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),wn=Ut((t,n)=>{var a=Object.defineProperty,r=($,D,K)=>D in $?a($,D,{enumerable:!0,configurable:!0,writable:!0,value:K}):$[D]=K,l=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports),c=($,D,K)=>r($,typeof D!="symbol"?D+"":D,K),u=l(($,D)=>{var K="\0",A="\0",j="",V=class{constructor(B){c(this,"_isDirected",!0),c(this,"_isMultigraph",!1),c(this,"_isCompound",!1),c(this,"_label"),c(this,"_defaultNodeLabelFn",()=>{}),c(this,"_defaultEdgeLabelFn",()=>{}),c(this,"_nodes",{}),c(this,"_in",{}),c(this,"_preds",{}),c(this,"_out",{}),c(this,"_sucs",{}),c(this,"_edgeObjs",{}),c(this,"_edgeLabels",{}),c(this,"_nodeCount",0),c(this,"_edgeCount",0),c(this,"_parent"),c(this,"_children"),B&&(this._isDirected=Object.hasOwn(B,"directed")?B.directed:!0,this._isMultigraph=Object.hasOwn(B,"multigraph")?B.multigraph:!1,this._isCompound=Object.hasOwn(B,"compound")?B.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[A]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(B){return this._label=B,this}graph(){return this._label}setDefaultNodeLabel(B){return this._defaultNodeLabelFn=B,typeof B!="function"&&(this._defaultNodeLabelFn=()=>B),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var B=this;return this.nodes().filter(O=>Object.keys(B._in[O]).length===0)}sinks(){var B=this;return this.nodes().filter(O=>Object.keys(B._out[O]).length===0)}setNodes(B,O){var Z=arguments,J=this;return B.forEach(function(tt){Z.length>1?J.setNode(tt,O):J.setNode(tt)}),this}setNode(B,O){return Object.hasOwn(this._nodes,B)?(arguments.length>1&&(this._nodes[B]=O),this):(this._nodes[B]=arguments.length>1?O:this._defaultNodeLabelFn(B),this._isCompound&&(this._parent[B]=A,this._children[B]={},this._children[A][B]=!0),this._in[B]={},this._preds[B]={},this._out[B]={},this._sucs[B]={},++this._nodeCount,this)}node(B){return this._nodes[B]}hasNode(B){return Object.hasOwn(this._nodes,B)}removeNode(B){var O=this;if(Object.hasOwn(this._nodes,B)){var Z=J=>O.removeEdge(O._edgeObjs[J]);delete this._nodes[B],this._isCompound&&(this._removeFromParentsChildList(B),delete this._parent[B],this.children(B).forEach(function(J){O.setParent(J)}),delete this._children[B]),Object.keys(this._in[B]).forEach(Z),delete this._in[B],delete this._preds[B],Object.keys(this._out[B]).forEach(Z),delete this._out[B],delete this._sucs[B],--this._nodeCount}return this}setParent(B,O){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(O===void 0)O=A;else{O+="";for(var Z=O;Z!==void 0;Z=this.parent(Z))if(Z===B)throw new Error("Setting "+O+" as parent of "+B+" would create a cycle");this.setNode(O)}return this.setNode(B),this._removeFromParentsChildList(B),this._parent[B]=O,this._children[O][B]=!0,this}_removeFromParentsChildList(B){delete this._children[this._parent[B]][B]}parent(B){if(this._isCompound){var O=this._parent[B];if(O!==A)return O}}children(B=A){if(this._isCompound){var O=this._children[B];if(O)return Object.keys(O)}else{if(B===A)return this.nodes();if(this.hasNode(B))return[]}}predecessors(B){var O=this._preds[B];if(O)return Object.keys(O)}successors(B){var O=this._sucs[B];if(O)return Object.keys(O)}neighbors(B){var O=this.predecessors(B);if(O){let J=new Set(O);for(var Z of this.successors(B))J.add(Z);return Array.from(J.values())}}isLeaf(B){var O;return this.isDirected()?O=this.successors(B):O=this.neighbors(B),O.length===0}filterNodes(B){var O=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});O.setGraph(this.graph());var Z=this;Object.entries(this._nodes).forEach(function([at,dt]){B(at)&&O.setNode(at,dt)}),Object.values(this._edgeObjs).forEach(function(at){O.hasNode(at.v)&&O.hasNode(at.w)&&O.setEdge(at,Z.edge(at))});var J={};function tt(at){var dt=Z.parent(at);return dt===void 0||O.hasNode(dt)?(J[at]=dt,dt):dt in J?J[dt]:tt(dt)}return this._isCompound&&O.nodes().forEach(at=>O.setParent(at,tt(at))),O}setDefaultEdgeLabel(B){return this._defaultEdgeLabelFn=B,typeof B!="function"&&(this._defaultEdgeLabelFn=()=>B),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(B,O){var Z=this,J=arguments;return B.reduce(function(tt,at){return J.length>1?Z.setEdge(tt,at,O):Z.setEdge(tt,at),at}),this}setEdge(){var B,O,Z,J,tt=!1,at=arguments[0];typeof at=="object"&&at!==null&&"v"in at?(B=at.v,O=at.w,Z=at.name,arguments.length===2&&(J=arguments[1],tt=!0)):(B=at,O=arguments[1],Z=arguments[3],arguments.length>2&&(J=arguments[2],tt=!0)),B=""+B,O=""+O,Z!==void 0&&(Z=""+Z);var dt=N(this._isDirected,B,O,Z);if(Object.hasOwn(this._edgeLabels,dt))return tt&&(this._edgeLabels[dt]=J),this;if(Z!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(B),this.setNode(O),this._edgeLabels[dt]=tt?J:this._defaultEdgeLabelFn(B,O,Z);var ht=G(this._isDirected,B,O,Z);return B=ht.v,O=ht.w,Object.freeze(ht),this._edgeObjs[dt]=ht,q(this._preds[O],B),q(this._sucs[B],O),this._in[O][dt]=ht,this._out[B][dt]=ht,this._edgeCount++,this}edge(B,O,Z){var J=arguments.length===1?et(this._isDirected,arguments[0]):N(this._isDirected,B,O,Z);return this._edgeLabels[J]}edgeAsObj(){let B=this.edge(...arguments);return typeof B!="object"?{label:B}:B}hasEdge(B,O,Z){var J=arguments.length===1?et(this._isDirected,arguments[0]):N(this._isDirected,B,O,Z);return Object.hasOwn(this._edgeLabels,J)}removeEdge(B,O,Z){var J=arguments.length===1?et(this._isDirected,arguments[0]):N(this._isDirected,B,O,Z),tt=this._edgeObjs[J];return tt&&(B=tt.v,O=tt.w,delete this._edgeLabels[J],delete this._edgeObjs[J],I(this._preds[O],B),I(this._sucs[B],O),delete this._in[O][J],delete this._out[B][J],this._edgeCount--),this}inEdges(B,O){return this.isDirected()?this.filterEdges(this._in[B],B,O):this.nodeEdges(B,O)}outEdges(B,O){return this.isDirected()?this.filterEdges(this._out[B],B,O):this.nodeEdges(B,O)}nodeEdges(B,O){if(B in this._nodes)return this.filterEdges({...this._in[B],...this._out[B]},B,O)}filterEdges(B,O,Z){if(B){var J=Object.values(B);return Z?J.filter(function(tt){return tt.v===O&&tt.w===Z||tt.v===Z&&tt.w===O}):J}}};function q(B,O){B[O]?B[O]++:B[O]=1}function I(B,O){--B[O]||delete B[O]}function N(B,O,Z,J){var tt=""+O,at=""+Z;if(!B&&tt>at){var dt=tt;tt=at,at=dt}return tt+j+at+j+(J===void 0?K:J)}function G(B,O,Z,J){var tt=""+O,at=""+Z;if(!B&&tt>at){var dt=tt;tt=at,at=dt}var ht={v:tt,w:at};return J&&(ht.name=J),ht}function et(B,O){return N(B,O.v,O.w,O.name)}D.exports=V}),f=l(($,D)=>{D.exports="3.0.2"}),h=l(($,D)=>{D.exports={Graph:u(),version:f()}}),m=l(($,D)=>{var K=u();D.exports={write:A,read:q};function A(I){var N={options:{directed:I.isDirected(),multigraph:I.isMultigraph(),compound:I.isCompound()},nodes:j(I),edges:V(I)};return I.graph()!==void 0&&(N.value=structuredClone(I.graph())),N}function j(I){return I.nodes().map(function(N){var G=I.node(N),et=I.parent(N),B={v:N};return G!==void 0&&(B.value=G),et!==void 0&&(B.parent=et),B})}function V(I){return I.edges().map(function(N){var G=I.edge(N),et={v:N.v,w:N.w};return N.name!==void 0&&(et.name=N.name),G!==void 0&&(et.value=G),et})}function q(I){var N=new K(I.options).setGraph(I.value);return I.nodes.forEach(function(G){N.setNode(G.v,G.value),G.parent&&N.setParent(G.v,G.parent)}),I.edges.forEach(function(G){N.setEdge({v:G.v,w:G.w,name:G.name},G.value)}),N}}),g=l(($,D)=>{D.exports=A;var K=()=>1;function A(V,q,I,N){return j(V,String(q),I||K,N||function(G){return V.outEdges(G)})}function j(V,q,I,N){var G={},et=!0,B=0,O=V.nodes(),Z=function(dt){var ht=I(dt);G[dt.v].distance+ht<G[dt.w].distance&&(G[dt.w]={distance:G[dt.v].distance+ht,predecessor:dt.v},et=!0)},J=function(){O.forEach(function(dt){N(dt).forEach(function(ht){var mt=ht.v===dt?ht.v:ht.w,vt=mt===ht.v?ht.w:ht.v;Z({v:mt,w:vt})})})};O.forEach(function(dt){var ht=dt===q?0:Number.POSITIVE_INFINITY;G[dt]={distance:ht}});for(var tt=O.length,at=1;at<tt&&(et=!1,B++,J(),!!et);at++);if(B===tt-1&&(et=!1,J(),et))throw new Error("The graph contains a negative weight cycle");return G}}),p=l(($,D)=>{D.exports=K;function K(A){var j={},V=[],q;function I(N){Object.hasOwn(j,N)||(j[N]=!0,q.push(N),A.successors(N).forEach(I),A.predecessors(N).forEach(I))}return A.nodes().forEach(function(N){q=[],I(N),q.length&&V.push(q)}),V}}),v=l(($,D)=>{var K=class{constructor(){c(this,"_arr",[]),c(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(A){return A.key})}has(A){return Object.hasOwn(this._keyIndices,A)}priority(A){var j=this._keyIndices[A];if(j!==void 0)return this._arr[j].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(A,j){var V=this._keyIndices;if(A=String(A),!Object.hasOwn(V,A)){var q=this._arr,I=q.length;return V[A]=I,q.push({key:A,priority:j}),this._decrease(I),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var A=this._arr.pop();return delete this._keyIndices[A.key],this._heapify(0),A.key}decrease(A,j){var V=this._keyIndices[A];if(j>this._arr[V].priority)throw new Error("New priority is greater than current priority. Key: "+A+" Old: "+this._arr[V].priority+" New: "+j);this._arr[V].priority=j,this._decrease(V)}_heapify(A){var j=this._arr,V=2*A,q=V+1,I=A;V<j.length&&(I=j[V].priority<j[I].priority?V:I,q<j.length&&(I=j[q].priority<j[I].priority?q:I),I!==A&&(this._swap(A,I),this._heapify(I)))}_decrease(A){for(var j=this._arr,V=j[A].priority,q;A!==0&&(q=A>>1,!(j[q].priority<V));)this._swap(A,q),A=q}_swap(A,j){var V=this._arr,q=this._keyIndices,I=V[A],N=V[j];V[A]=N,V[j]=I,q[N.key]=A,q[I.key]=j}};D.exports=K}),x=l(($,D)=>{var K=v();D.exports=j;var A=()=>1;function j(q,I,N,G){var et=function(B){return q.outEdges(B)};return V(q,String(I),N||A,G||et)}function V(q,I,N,G){var et={},B=new K,O,Z,J=function(tt){var at=tt.v!==O?tt.v:tt.w,dt=et[at],ht=N(tt),mt=Z.distance+ht;if(ht<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+tt+" Weight: "+ht);mt<dt.distance&&(dt.distance=mt,dt.predecessor=O,B.decrease(at,mt))};for(q.nodes().forEach(function(tt){var at=tt===I?0:Number.POSITIVE_INFINITY;et[tt]={distance:at},B.add(tt,at)});B.size()>0&&(O=B.removeMin(),Z=et[O],Z.distance!==Number.POSITIVE_INFINITY);)G(O).forEach(J);return et}}),b=l(($,D)=>{var K=x();D.exports=A;function A(j,V,q){return j.nodes().reduce(function(I,N){return I[N]=K(j,N,V,q),I},{})}}),E=l(($,D)=>{D.exports=K;function K(j,V,q){if(j[V].predecessor!==void 0)throw new Error("Invalid source vertex");if(j[q].predecessor===void 0&&q!==V)throw new Error("Invalid destination vertex");return{weight:j[q].distance,path:A(j,V,q)}}function A(j,V,q){for(var I=[],N=q;N!==V;)I.push(N),N=j[N].predecessor;return I.push(V),I.reverse()}}),M=l(($,D)=>{D.exports=K;function K(A){var j=0,V=[],q={},I=[];function N(G){var et=q[G]={onStack:!0,lowlink:j,index:j++};if(V.push(G),A.successors(G).forEach(function(Z){Object.hasOwn(q,Z)?q[Z].onStack&&(et.lowlink=Math.min(et.lowlink,q[Z].index)):(N(Z),et.lowlink=Math.min(et.lowlink,q[Z].lowlink))}),et.lowlink===et.index){var B=[],O;do O=V.pop(),q[O].onStack=!1,B.push(O);while(G!==O);I.push(B)}}return A.nodes().forEach(function(G){Object.hasOwn(q,G)||N(G)}),I}}),_=l(($,D)=>{var K=M();D.exports=A;function A(j){return K(j).filter(function(V){return V.length>1||V.length===1&&j.hasEdge(V[0],V[0])})}}),C=l(($,D)=>{D.exports=A;var K=()=>1;function A(V,q,I){return j(V,q||K,I||function(N){return V.outEdges(N)})}function j(V,q,I){var N={},G=V.nodes();return G.forEach(function(et){N[et]={},N[et][et]={distance:0},G.forEach(function(B){et!==B&&(N[et][B]={distance:Number.POSITIVE_INFINITY})}),I(et).forEach(function(B){var O=B.v===et?B.w:B.v,Z=q(B);N[et][O]={distance:Z,predecessor:et}})}),G.forEach(function(et){var B=N[et];G.forEach(function(O){var Z=N[O];G.forEach(function(J){var tt=Z[et],at=B[J],dt=Z[J],ht=tt.distance+at.distance;ht<dt.distance&&(dt.distance=ht,dt.predecessor=at.predecessor)})})}),N}}),S=l(($,D)=>{function K(j){var V={},q={},I=[];function N(G){if(Object.hasOwn(q,G))throw new A;Object.hasOwn(V,G)||(q[G]=!0,V[G]=!0,j.predecessors(G).forEach(N),delete q[G],I.push(G))}if(j.sinks().forEach(N),Object.keys(V).length!==j.nodeCount())throw new A;return I}var A=class extends Error{constructor(){super(...arguments)}};D.exports=K,K.CycleException=A}),T=l(($,D)=>{var K=S();D.exports=A;function A(j){try{K(j)}catch(V){if(V instanceof K.CycleException)return!1;throw V}return!0}}),R=l(($,D)=>{D.exports=K;function K(j,V,q,I,N){Array.isArray(V)||(V=[V]);var G=(j.isDirected()?j.successors:j.neighbors).bind(j),et={};return V.forEach(function(B){if(!j.hasNode(B))throw new Error("Graph does not have node: "+B);N=A(j,B,q==="post",et,G,I,N)}),N}function A(j,V,q,I,N,G,et){return Object.hasOwn(I,V)||(I[V]=!0,q||(et=G(et,V)),N(V).forEach(function(B){et=A(j,B,q,I,N,G,et)}),q&&(et=G(et,V))),et}}),L=l(($,D)=>{var K=R();D.exports=A;function A(j,V,q){return K(j,V,q,function(I,N){return I.push(N),I},[])}}),U=l(($,D)=>{var K=L();D.exports=A;function A(j,V){return K(j,V,"post")}}),P=l(($,D)=>{var K=L();D.exports=A;function A(j,V){return K(j,V,"pre")}}),F=l(($,D)=>{var K=u(),A=v();D.exports=j;function j(V,q){var I=new K,N={},G=new A,et;function B(Z){var J=Z.v===et?Z.w:Z.v,tt=G.priority(J);if(tt!==void 0){var at=q(Z);at<tt&&(N[J]=et,G.decrease(J,at))}}if(V.nodeCount()===0)return I;V.nodes().forEach(function(Z){G.add(Z,Number.POSITIVE_INFINITY),I.setNode(Z)}),G.decrease(V.nodes()[0],0);for(var O=!1;G.size()>0;){if(et=G.removeMin(),Object.hasOwn(N,et))I.setEdge(et,N[et]);else{if(O)throw new Error("Input graph is not connected: "+V);O=!0}V.nodeEdges(et).forEach(B)}return I}}),X=l(($,D)=>{var K=x(),A=g();D.exports=j;function j(q,I,N,G){return V(q,I,N,G||function(et){return q.outEdges(et)})}function V(q,I,N,G){if(N===void 0)return K(q,I,N,G);for(var et=!1,B=q.nodes(),O=0;O<B.length;O++){for(var Z=G(B[O]),J=0;J<Z.length;J++){var tt=Z[J],at=tt.v===B[O]?tt.v:tt.w,dt=at===tt.v?tt.w:tt.v;N({v:at,w:dt})<0&&(et=!0)}if(et)return A(q,I,N,G)}return K(q,I,N,G)}}),k=l(($,D)=>{D.exports={bellmanFord:g(),components:p(),dijkstra:x(),dijkstraAll:b(),extractPath:E(),findCycles:_(),floydWarshall:C(),isAcyclic:T(),postorder:U(),preorder:P(),prim:F(),shortestPaths:X(),reduce:R(),tarjan:M(),topsort:S()}}),Y=h();n.exports={Graph:Y.Graph,json:m(),alg:k(),version:Y.version}}),OR=Ut((t,n)=>{var a=class{constructor(){let c={};c._next=c._prev=c,this._sentinel=c}dequeue(){let c=this._sentinel,u=c._prev;if(u!==c)return r(u),u}enqueue(c){let u=this._sentinel;c._prev&&c._next&&r(c),c._next=u._next,u._next._prev=c,u._next=c,c._prev=u}toString(){let c=[],u=this._sentinel,f=u._prev;for(;f!==u;)c.push(JSON.stringify(f,l)),f=f._prev;return"["+c.join(", ")+"]"}};function r(c){c._prev._next=c._next,c._next._prev=c._prev,delete c._next,delete c._prev}function l(c,u){if(c!=="_next"&&c!=="_prev")return u}n.exports=a}),RR=Ut((t,n)=>{var a=wn().Graph,r=OR();n.exports=c;var l=()=>1;function c(p,v){if(p.nodeCount()<=1)return[];let x=h(p,v||l);return u(x.graph,x.buckets,x.zeroIdx).flatMap(b=>p.outEdges(b.v,b.w))}function u(p,v,x){let b=[],E=v[v.length-1],M=v[0],_;for(;p.nodeCount();){for(;_=M.dequeue();)f(p,v,x,_);for(;_=E.dequeue();)f(p,v,x,_);if(p.nodeCount()){for(let C=v.length-2;C>0;--C)if(_=v[C].dequeue(),_){b=b.concat(f(p,v,x,_,!0));break}}}return b}function f(p,v,x,b,E){let M=E?[]:void 0;return p.inEdges(b.v).forEach(_=>{let C=p.edge(_),S=p.node(_.v);E&&M.push({v:_.v,w:_.w}),S.out-=C,m(v,x,S)}),p.outEdges(b.v).forEach(_=>{let C=p.edge(_),S=_.w,T=p.node(S);T.in-=C,m(v,x,T)}),p.removeNode(b.v),M}function h(p,v){let x=new a,b=0,E=0;p.nodes().forEach(C=>{x.setNode(C,{v:C,in:0,out:0})}),p.edges().forEach(C=>{let S=x.edge(C.v,C.w)||0,T=v(C),R=S+T;x.setEdge(C.v,C.w,R),E=Math.max(E,x.node(C.v).out+=T),b=Math.max(b,x.node(C.w).in+=T)});let M=g(E+b+3).map(()=>new r),_=b+1;return x.nodes().forEach(C=>{m(M,_,x.node(C))}),{graph:x,buckets:M,zeroIdx:_}}function m(p,v,x){x.out?x.in?p[x.out-x.in+v].enqueue(x):p[p.length-1].enqueue(x):p[0].enqueue(x)}function g(p){let v=[];for(let x=0;x<p;x++)v.push(x);return v}}),ue=Ut((t,n)=>{var a=wn().Graph;n.exports={addBorderNode:v,addDummyNode:r,applyWithChunking:E,asNonCompoundGraph:c,buildLayerMatrix:m,intersectRect:h,mapValues:P,maxRank:M,normalizeRanks:g,notime:S,partition:_,pick:U,predecessorWeights:f,range:L,removeEmptyRanks:p,simplify:l,successorWeights:u,time:C,uniqueId:R,zipObject:F};function r(X,k,Y,$){for(var D=$;X.hasNode(D);)D=R($);return Y.dummy=k,X.setNode(D,Y),D}function l(X){let k=new a().setGraph(X.graph());return X.nodes().forEach(Y=>k.setNode(Y,X.node(Y))),X.edges().forEach(Y=>{let $=k.edge(Y.v,Y.w)||{weight:0,minlen:1},D=X.edge(Y);k.setEdge(Y.v,Y.w,{weight:$.weight+D.weight,minlen:Math.max($.minlen,D.minlen)})}),k}function c(X){let k=new a({multigraph:X.isMultigraph()}).setGraph(X.graph());return X.nodes().forEach(Y=>{X.children(Y).length||k.setNode(Y,X.node(Y))}),X.edges().forEach(Y=>{k.setEdge(Y,X.edge(Y))}),k}function u(X){let k=X.nodes().map(Y=>{let $={};return X.outEdges(Y).forEach(D=>{$[D.w]=($[D.w]||0)+X.edge(D).weight}),$});return F(X.nodes(),k)}function f(X){let k=X.nodes().map(Y=>{let $={};return X.inEdges(Y).forEach(D=>{$[D.v]=($[D.v]||0)+X.edge(D).weight}),$});return F(X.nodes(),k)}function h(X,k){let Y=X.x,$=X.y,D=k.x-Y,K=k.y-$,A=X.width/2,j=X.height/2;if(!D&&!K)throw new Error("Not possible to find intersection inside of the rectangle");let V,q;return Math.abs(K)*A>Math.abs(D)*j?(K<0&&(j=-j),V=j*D/K,q=j):(D<0&&(A=-A),V=A,q=A*K/D),{x:Y+V,y:$+q}}function m(X){let k=L(M(X)+1).map(()=>[]);return X.nodes().forEach(Y=>{let $=X.node(Y),D=$.rank;D!==void 0&&(k[D][$.order]=Y)}),k}function g(X){let k=X.nodes().map($=>{let D=X.node($).rank;return D===void 0?Number.MAX_VALUE:D}),Y=E(Math.min,k);X.nodes().forEach($=>{let D=X.node($);Object.hasOwn(D,"rank")&&(D.rank-=Y)})}function p(X){let k=X.nodes().map(A=>X.node(A).rank).filter(A=>A!==void 0),Y=E(Math.min,k),$=[];X.nodes().forEach(A=>{let j=X.node(A).rank-Y;$[j]||($[j]=[]),$[j].push(A)});let D=0,K=X.graph().nodeRankFactor;Array.from($).forEach((A,j)=>{A===void 0&&j%K!==0?--D:A!==void 0&&D&&A.forEach(V=>X.node(V).rank+=D)})}function v(X,k,Y,$){let D={width:0,height:0};return arguments.length>=4&&(D.rank=Y,D.order=$),r(X,"border",D,k)}function x(X,k=b){let Y=[];for(let $=0;$<X.length;$+=k){let D=X.slice($,$+k);Y.push(D)}return Y}var b=65535;function E(X,k){if(k.length>b){let Y=x(k);return X.apply(null,Y.map($=>X.apply(null,$)))}else return X.apply(null,k)}function M(X){let k=X.nodes().map(Y=>{let $=X.node(Y).rank;return $===void 0?Number.MIN_VALUE:$});return E(Math.max,k)}function _(X,k){let Y={lhs:[],rhs:[]};return X.forEach($=>{k($)?Y.lhs.push($):Y.rhs.push($)}),Y}function C(X,k){let Y=Date.now();try{return k()}finally{console.log(X+" time: "+(Date.now()-Y)+"ms")}}function S(X,k){return k()}var T=0;function R(X){var k=++T;return X+(""+k)}function L(X,k,Y=1){k==null&&(k=X,X=0);let $=K=>K<k;Y<0&&($=K=>k<K);let D=[];for(let K=X;$(K);K+=Y)D.push(K);return D}function U(X,k){let Y={};for(let $ of k)X[$]!==void 0&&(Y[$]=X[$]);return Y}function P(X,k){let Y=k;return typeof k=="string"&&(Y=$=>$[k]),Object.entries(X).reduce(($,[D,K])=>($[D]=Y(K,D),$),{})}function F(X,k){return X.reduce((Y,$,D)=>(Y[$]=k[D],Y),{})}}),jR=Ut((t,n)=>{var a=RR(),r=ue().uniqueId;n.exports={run:l,undo:u};function l(f){(f.graph().acyclicer==="greedy"?a(f,h(f)):c(f)).forEach(m=>{let g=f.edge(m);f.removeEdge(m),g.forwardName=m.name,g.reversed=!0,f.setEdge(m.w,m.v,g,r("rev"))});function h(m){return g=>m.edge(g).weight}}function c(f){let h=[],m={},g={};function p(v){Object.hasOwn(g,v)||(g[v]=!0,m[v]=!0,f.outEdges(v).forEach(x=>{Object.hasOwn(m,x.w)?h.push(x):p(x.w)}),delete m[v])}return f.nodes().forEach(p),h}function u(f){f.edges().forEach(h=>{let m=f.edge(h);if(m.reversed){f.removeEdge(h);let g=m.forwardName;delete m.reversed,delete m.forwardName,f.setEdge(h.w,h.v,m,g)}})}}),VR=Ut((t,n)=>{var a=ue();n.exports={run:r,undo:c};function r(u){u.graph().dummyChains=[],u.edges().forEach(f=>l(u,f))}function l(u,f){let h=f.v,m=u.node(h).rank,g=f.w,p=u.node(g).rank,v=f.name,x=u.edge(f),b=x.labelRank;if(p===m+1)return;u.removeEdge(f);let E,M,_;for(_=0,++m;m<p;++_,++m)x.points=[],M={width:0,height:0,edgeLabel:x,edgeObj:f,rank:m},E=a.addDummyNode(u,"edge",M,"_d"),m===b&&(M.width=x.width,M.height=x.height,M.dummy="edge-label",M.labelpos=x.labelpos),u.setEdge(h,E,{weight:x.weight},v),_===0&&u.graph().dummyChains.push(E),h=E;u.setEdge(h,g,{weight:x.weight},v)}function c(u){u.graph().dummyChains.forEach(f=>{let h=u.node(f),m=h.edgeLabel,g;for(u.setEdge(h.edgeObj,m);h.dummy;)g=u.successors(f)[0],u.removeNode(f),m.points.push({x:h.x,y:h.y}),h.dummy==="edge-label"&&(m.x=h.x,m.y=h.y,m.width=h.width,m.height=h.height),f=g,h=u.node(f)})}}),$u=Ut((t,n)=>{var{applyWithChunking:a}=ue();n.exports={longestPath:r,slack:l};function r(c){var u={};function f(h){var m=c.node(h);if(Object.hasOwn(u,h))return m.rank;u[h]=!0;let g=c.outEdges(h).map(v=>v==null?Number.POSITIVE_INFINITY:f(v.w)-c.edge(v).minlen);var p=a(Math.min,g);return p===Number.POSITIVE_INFINITY&&(p=0),m.rank=p}c.sources().forEach(f)}function l(c,u){return c.node(u.w).rank-c.node(u.v).rank-c.edge(u).minlen}}),HS=Ut((t,n)=>{var a=wn().Graph,r=$u().slack;n.exports=l;function l(h){var m=new a({directed:!1}),g=h.nodes()[0],p=h.nodeCount();m.setNode(g,{});for(var v,x;c(m,h)<p;)v=u(m,h),x=m.hasNode(v.v)?r(h,v):-r(h,v),f(m,h,x);return m}function c(h,m){function g(p){m.nodeEdges(p).forEach(v=>{var x=v.v,b=p===x?v.w:x;!h.hasNode(b)&&!r(m,v)&&(h.setNode(b,{}),h.setEdge(p,b,{}),g(b))})}return h.nodes().forEach(g),h.nodeCount()}function u(h,m){return m.edges().reduce((g,p)=>{let v=Number.POSITIVE_INFINITY;return h.hasNode(p.v)!==h.hasNode(p.w)&&(v=r(m,p)),v<g[0]?[v,p]:g},[Number.POSITIVE_INFINITY,null])[1]}function f(h,m,g){h.nodes().forEach(p=>m.node(p).rank+=g)}}),LR=Ut((t,n)=>{var a=HS(),r=$u().slack,l=$u().longestPath,c=wn().alg.preorder,u=wn().alg.postorder,f=ue().simplify;n.exports=h,h.initLowLimValues=v,h.initCutValues=m,h.calcCutValue=p,h.leaveEdge=b,h.enterEdge=E,h.exchangeEdges=M;function h(T){T=f(T),l(T);var R=a(T);v(R),m(R,T);for(var L,U;L=b(R);)U=E(R,T,L),M(R,T,L,U)}function m(T,R){var L=u(T,T.nodes());L=L.slice(0,L.length-1),L.forEach(U=>g(T,R,U))}function g(T,R,L){var U=T.node(L),P=U.parent;T.edge(L,P).cutvalue=p(T,R,L)}function p(T,R,L){var U=T.node(L),P=U.parent,F=!0,X=R.edge(L,P),k=0;return X||(F=!1,X=R.edge(P,L)),k=X.weight,R.nodeEdges(L).forEach(Y=>{var $=Y.v===L,D=$?Y.w:Y.v;if(D!==P){var K=$===F,A=R.edge(Y).weight;if(k+=K?A:-A,C(T,L,D)){var j=T.edge(L,D).cutvalue;k+=K?-j:j}}}),k}function v(T,R){arguments.length<2&&(R=T.nodes()[0]),x(T,{},1,R)}function x(T,R,L,U,P){var F=L,X=T.node(U);return R[U]=!0,T.neighbors(U).forEach(k=>{Object.hasOwn(R,k)||(L=x(T,R,L,k,U))}),X.low=F,X.lim=L++,P?X.parent=P:delete X.parent,L}function b(T){return T.edges().find(R=>T.edge(R).cutvalue<0)}function E(T,R,L){var U=L.v,P=L.w;R.hasEdge(U,P)||(U=L.w,P=L.v);var F=T.node(U),X=T.node(P),k=F,Y=!1;F.lim>X.lim&&(k=X,Y=!0);var $=R.edges().filter(D=>Y===S(T,T.node(D.v),k)&&Y!==S(T,T.node(D.w),k));return $.reduce((D,K)=>r(R,K)<r(R,D)?K:D)}function M(T,R,L,U){var P=L.v,F=L.w;T.removeEdge(P,F),T.setEdge(U.v,U.w,{}),v(T),m(T,R),_(T,R)}function _(T,R){var L=T.nodes().find(P=>!R.node(P).parent),U=c(T,L);U=U.slice(1),U.forEach(P=>{var F=T.node(P).parent,X=R.edge(P,F),k=!1;X||(X=R.edge(F,P),k=!0),R.node(P).rank=R.node(F).rank+(k?X.minlen:-X.minlen)})}function C(T,R,L){return T.hasEdge(R,L)}function S(T,R,L){return L.low<=R.lim&&R.lim<=L.lim}}),kR=Ut((t,n)=>{var a=$u(),r=a.longestPath,l=HS(),c=LR();n.exports=u;function u(g){var p=g.graph().ranker;if(p instanceof Function)return p(g);switch(g.graph().ranker){case"network-simplex":m(g);break;case"tight-tree":h(g);break;case"longest-path":f(g);break;case"none":break;default:m(g)}}var f=r;function h(g){r(g),l(g)}function m(g){c(g)}}),BR=Ut((t,n)=>{n.exports=a;function a(c){let u=l(c);c.graph().dummyChains.forEach(f=>{let h=c.node(f),m=h.edgeObj,g=r(c,u,m.v,m.w),p=g.path,v=g.lca,x=0,b=p[x],E=!0;for(;f!==m.w;){if(h=c.node(f),E){for(;(b=p[x])!==v&&c.node(b).maxRank<h.rank;)x++;b===v&&(E=!1)}if(!E){for(;x<p.length-1&&c.node(b=p[x+1]).minRank<=h.rank;)x++;b=p[x]}c.setParent(f,b),f=c.successors(f)[0]}})}function r(c,u,f,h){let m=[],g=[],p=Math.min(u[f].low,u[h].low),v=Math.max(u[f].lim,u[h].lim),x,b;x=f;do x=c.parent(x),m.push(x);while(x&&(u[x].low>p||v>u[x].lim));for(b=x,x=h;(x=c.parent(x))!==b;)g.push(x);return{path:m.concat(g.reverse()),lca:b}}function l(c){let u={},f=0;function h(m){let g=f;c.children(m).forEach(h),u[m]={low:g,lim:f++}}return c.children().forEach(h),u}}),HR=Ut((t,n)=>{var a=ue();n.exports={run:r,cleanup:f};function r(h){let m=a.addDummyNode(h,"root",{},"_root"),g=c(h),p=Object.values(g),v=a.applyWithChunking(Math.max,p)-1,x=2*v+1;h.graph().nestingRoot=m,h.edges().forEach(E=>h.edge(E).minlen*=x);let b=u(h)+1;h.children().forEach(E=>l(h,m,x,b,v,g,E)),h.graph().nodeRankFactor=x}function l(h,m,g,p,v,x,b){let E=h.children(b);if(!E.length){b!==m&&h.setEdge(m,b,{weight:0,minlen:g});return}let M=a.addBorderNode(h,"_bt"),_=a.addBorderNode(h,"_bb"),C=h.node(b);h.setParent(M,b),C.borderTop=M,h.setParent(_,b),C.borderBottom=_,E.forEach(S=>{l(h,m,g,p,v,x,S);let T=h.node(S),R=T.borderTop?T.borderTop:S,L=T.borderBottom?T.borderBottom:S,U=T.borderTop?p:2*p,P=R!==L?1:v-x[b]+1;h.setEdge(M,R,{weight:U,minlen:P,nestingEdge:!0}),h.setEdge(L,_,{weight:U,minlen:P,nestingEdge:!0})}),h.parent(b)||h.setEdge(m,M,{weight:0,minlen:v+x[b]})}function c(h){var m={};function g(p,v){var x=h.children(p);x&&x.length&&x.forEach(b=>g(b,v+1)),m[p]=v}return h.children().forEach(p=>g(p,1)),m}function u(h){return h.edges().reduce((m,g)=>m+h.edge(g).weight,0)}function f(h){var m=h.graph();h.removeNode(m.nestingRoot),delete m.nestingRoot,h.edges().forEach(g=>{var p=h.edge(g);p.nestingEdge&&h.removeEdge(g)})}}),UR=Ut((t,n)=>{var a=ue();n.exports=r;function r(c){function u(f){let h=c.children(f),m=c.node(f);if(h.length&&h.forEach(u),Object.hasOwn(m,"minRank")){m.borderLeft=[],m.borderRight=[];for(let g=m.minRank,p=m.maxRank+1;g<p;++g)l(c,"borderLeft","_bl",f,m,g),l(c,"borderRight","_br",f,m,g)}}c.children().forEach(u)}function l(c,u,f,h,m,g){let p={width:0,height:0,rank:g,borderType:u},v=m[u][g-1],x=a.addDummyNode(c,"border",p,f);m[u][g]=x,c.setParent(x,h),v&&c.setEdge(v,x,{weight:1})}}),YR=Ut((t,n)=>{n.exports={adjust:a,undo:r};function a(g){let p=g.graph().rankdir.toLowerCase();(p==="lr"||p==="rl")&&l(g)}function r(g){let p=g.graph().rankdir.toLowerCase();(p==="bt"||p==="rl")&&u(g),(p==="lr"||p==="rl")&&(h(g),l(g))}function l(g){g.nodes().forEach(p=>c(g.node(p))),g.edges().forEach(p=>c(g.edge(p)))}function c(g){let p=g.width;g.width=g.height,g.height=p}function u(g){g.nodes().forEach(p=>f(g.node(p))),g.edges().forEach(p=>{let v=g.edge(p);v.points.forEach(f),Object.hasOwn(v,"y")&&f(v)})}function f(g){g.y=-g.y}function h(g){g.nodes().forEach(p=>m(g.node(p))),g.edges().forEach(p=>{let v=g.edge(p);v.points.forEach(m),Object.hasOwn(v,"x")&&m(v)})}function m(g){let p=g.x;g.x=g.y,g.y=p}}),GR=Ut((t,n)=>{var a=ue();n.exports=r;function r(l){let c={},u=l.nodes().filter(p=>!l.children(p).length),f=u.map(p=>l.node(p).rank),h=a.applyWithChunking(Math.max,f),m=a.range(h+1).map(()=>[]);function g(p){if(c[p])return;c[p]=!0;let v=l.node(p);m[v.rank].push(p),l.successors(p).forEach(g)}return u.sort((p,v)=>l.node(p).rank-l.node(v).rank).forEach(g),m}}),qR=Ut((t,n)=>{var a=ue().zipObject;n.exports=r;function r(c,u){let f=0;for(let h=1;h<u.length;++h)f+=l(c,u[h-1],u[h]);return f}function l(c,u,f){let h=a(f,f.map((b,E)=>E)),m=u.flatMap(b=>c.outEdges(b).map(E=>({pos:h[E.w],weight:c.edge(E).weight})).sort((E,M)=>E.pos-M.pos)),g=1;for(;g<f.length;)g<<=1;let p=2*g-1;g-=1;let v=new Array(p).fill(0),x=0;return m.forEach(b=>{let E=b.pos+g;v[E]+=b.weight;let M=0;for(;E>0;)E%2&&(M+=v[E+1]),E=E-1>>1,v[E]+=b.weight;x+=b.weight*M}),x}}),XR=Ut((t,n)=>{n.exports=a;function a(r,l=[]){return l.map(c=>{let u=r.inEdges(c);if(u.length){let f=u.reduce((h,m)=>{let g=r.edge(m),p=r.node(m.v);return{sum:h.sum+g.weight*p.order,weight:h.weight+g.weight}},{sum:0,weight:0});return{v:c,barycenter:f.sum/f.weight,weight:f.weight}}else return{v:c}})}}),PR=Ut((t,n)=>{var a=ue();n.exports=r;function r(u,f){let h={};u.forEach((g,p)=>{let v=h[g.v]={indegree:0,in:[],out:[],vs:[g.v],i:p};g.barycenter!==void 0&&(v.barycenter=g.barycenter,v.weight=g.weight)}),f.edges().forEach(g=>{let p=h[g.v],v=h[g.w];p!==void 0&&v!==void 0&&(v.indegree++,p.out.push(h[g.w]))});let m=Object.values(h).filter(g=>!g.indegree);return l(m)}function l(u){let f=[];function h(g){return p=>{p.merged||(p.barycenter===void 0||g.barycenter===void 0||p.barycenter>=g.barycenter)&&c(g,p)}}function m(g){return p=>{p.in.push(g),--p.indegree===0&&u.push(p)}}for(;u.length;){let g=u.pop();f.push(g),g.in.reverse().forEach(h(g)),g.out.forEach(m(g))}return f.filter(g=>!g.merged).map(g=>a.pick(g,["vs","i","barycenter","weight"]))}function c(u,f){let h=0,m=0;u.weight&&(h+=u.barycenter*u.weight,m+=u.weight),f.weight&&(h+=f.barycenter*f.weight,m+=f.weight),u.vs=f.vs.concat(u.vs),u.barycenter=h/m,u.weight=m,u.i=Math.min(f.i,u.i),f.merged=!0}}),$R=Ut((t,n)=>{var a=ue();n.exports=r;function r(u,f){let h=a.partition(u,M=>Object.hasOwn(M,"barycenter")),m=h.lhs,g=h.rhs.sort((M,_)=>_.i-M.i),p=[],v=0,x=0,b=0;m.sort(c(!!f)),b=l(p,g,b),m.forEach(M=>{b+=M.vs.length,p.push(M.vs),v+=M.barycenter*M.weight,x+=M.weight,b=l(p,g,b)});let E={vs:p.flat(!0)};return x&&(E.barycenter=v/x,E.weight=x),E}function l(u,f,h){let m;for(;f.length&&(m=f[f.length-1]).i<=h;)f.pop(),u.push(m.vs),h++;return h}function c(u){return(f,h)=>f.barycenter<h.barycenter?-1:f.barycenter>h.barycenter?1:u?h.i-f.i:f.i-h.i}}),KR=Ut((t,n)=>{var a=XR(),r=PR(),l=$R();n.exports=c;function c(h,m,g,p){let v=h.children(m),x=h.node(m),b=x?x.borderLeft:void 0,E=x?x.borderRight:void 0,M={};b&&(v=v.filter(T=>T!==b&&T!==E));let _=a(h,v);_.forEach(T=>{if(h.children(T.v).length){let R=c(h,T.v,g,p);M[T.v]=R,Object.hasOwn(R,"barycenter")&&f(T,R)}});let C=r(_,g);u(C,M);let S=l(C,p);if(b&&(S.vs=[b,S.vs,E].flat(!0),h.predecessors(b).length)){let T=h.node(h.predecessors(b)[0]),R=h.node(h.predecessors(E)[0]);Object.hasOwn(S,"barycenter")||(S.barycenter=0,S.weight=0),S.barycenter=(S.barycenter*S.weight+T.order+R.order)/(S.weight+2),S.weight+=2}return S}function u(h,m){h.forEach(g=>{g.vs=g.vs.flatMap(p=>m[p]?m[p].vs:p)})}function f(h,m){h.barycenter!==void 0?(h.barycenter=(h.barycenter*h.weight+m.barycenter*m.weight)/(h.weight+m.weight),h.weight+=m.weight):(h.barycenter=m.barycenter,h.weight=m.weight)}}),ZR=Ut((t,n)=>{var a=wn().Graph,r=ue();n.exports=l;function l(u,f,h,m){m||(m=u.nodes());let g=c(u),p=new a({compound:!0}).setGraph({root:g}).setDefaultNodeLabel(v=>u.node(v));return m.forEach(v=>{let x=u.node(v),b=u.parent(v);(x.rank===f||x.minRank<=f&&f<=x.maxRank)&&(p.setNode(v),p.setParent(v,b||g),u[h](v).forEach(E=>{let M=E.v===v?E.w:E.v,_=p.edge(M,v),C=_!==void 0?_.weight:0;p.setEdge(M,v,{weight:u.edge(E).weight+C})}),Object.hasOwn(x,"minRank")&&p.setNode(v,{borderLeft:x.borderLeft[f],borderRight:x.borderRight[f]}))}),p}function c(u){for(var f;u.hasNode(f=r.uniqueId("_root")););return f}}),IR=Ut((t,n)=>{n.exports=a;function a(r,l,c){let u={},f;c.forEach(h=>{let m=r.parent(h),g,p;for(;m;){if(g=r.parent(m),g?(p=u[g],u[g]=m):(p=f,f=m),p&&p!==m){l.setEdge(p,m);return}m=g}})}}),QR=Ut((t,n)=>{var a=GR(),r=qR(),l=KR(),c=ZR(),u=IR(),f=wn().Graph,h=ue();n.exports=m;function m(x,b={}){if(typeof b.customOrder=="function"){b.customOrder(x,m);return}let E=h.maxRank(x),M=g(x,h.range(1,E+1),"inEdges"),_=g(x,h.range(E-1,-1,-1),"outEdges"),C=a(x);if(v(x,C),b.disableOptimalOrderHeuristic)return;let S=Number.POSITIVE_INFINITY,T,R=b.constraints||[];for(let L=0,U=0;U<4;++L,++U){p(L%2?M:_,L%4>=2,R),C=h.buildLayerMatrix(x);let P=r(x,C);P<S?(U=0,T=Object.assign({},C),S=P):P===S&&(T=structuredClone(C))}v(x,T)}function g(x,b,E){let M=new Map,_=(C,S)=>{M.has(C)||M.set(C,[]),M.get(C).push(S)};for(let C of x.nodes()){let S=x.node(C);if(typeof S.rank=="number"&&_(S.rank,C),typeof S.minRank=="number"&&typeof S.maxRank=="number")for(let T=S.minRank;T<=S.maxRank;T++)T!==S.rank&&_(T,C)}return b.map(function(C){return c(x,C,E,M.get(C)||[])})}function p(x,b,E){let M=new f;x.forEach(function(_){E.forEach(T=>M.setEdge(T.left,T.right));let C=_.graph().root,S=l(_,C,M,b);S.vs.forEach((T,R)=>_.node(T).order=R),u(_,M,S.vs)})}function v(x,b){Object.values(b).forEach(E=>E.forEach((M,_)=>x.node(M).order=_))}}),FR=Ut((t,n)=>{var a=wn().Graph,r=ue();n.exports={positionX:E,findType1Conflicts:l,findType2Conflicts:c,addConflict:f,hasConflict:h,verticalAlignment:m,horizontalCompaction:g,alignCoordinates:x,findSmallestWidthAlignment:v,balance:b};function l(C,S){let T={};function R(L,U){let P=0,F=0,X=L.length,k=U[U.length-1];return U.forEach((Y,$)=>{let D=u(C,Y),K=D?C.node(D).order:X;(D||Y===k)&&(U.slice(F,$+1).forEach(A=>{C.predecessors(A).forEach(j=>{let V=C.node(j),q=V.order;(q<P||K<q)&&!(V.dummy&&C.node(A).dummy)&&f(T,j,A)})}),F=$+1,P=K)}),U}return S.length&&S.reduce(R),T}function c(C,S){let T={};function R(U,P,F,X,k){let Y;r.range(P,F).forEach($=>{Y=U[$],C.node(Y).dummy&&C.predecessors(Y).forEach(D=>{let K=C.node(D);K.dummy&&(K.order<X||K.order>k)&&f(T,D,Y)})})}function L(U,P){let F=-1,X,k=0;return P.forEach((Y,$)=>{if(C.node(Y).dummy==="border"){let D=C.predecessors(Y);D.length&&(X=C.node(D[0]).order,R(P,k,$,F,X),k=$,F=X)}R(P,k,P.length,X,U.length)}),P}return S.length&&S.reduce(L),T}function u(C,S){if(C.node(S).dummy)return C.predecessors(S).find(T=>C.node(T).dummy)}function f(C,S,T){if(S>T){let L=S;S=T,T=L}let R=C[S];R||(C[S]=R={}),R[T]=!0}function h(C,S,T){if(S>T){let R=S;S=T,T=R}return!!C[S]&&Object.hasOwn(C[S],T)}function m(C,S,T,R){let L={},U={},P={};return S.forEach(F=>{F.forEach((X,k)=>{L[X]=X,U[X]=X,P[X]=k})}),S.forEach(F=>{let X=-1;F.forEach(k=>{let Y=R(k);if(Y.length){Y=Y.sort((D,K)=>P[D]-P[K]);let $=(Y.length-1)/2;for(let D=Math.floor($),K=Math.ceil($);D<=K;++D){let A=Y[D];U[k]===k&&X<P[A]&&!h(T,k,A)&&(U[A]=k,U[k]=L[k]=L[A],X=P[A])}}})}),{root:L,align:U}}function g(C,S,T,R,L){let U={},P=p(C,S,T,L),F=L?"borderLeft":"borderRight";function X($,D){let K=P.nodes().slice(),A={},j=K.pop();for(;j;){if(A[j])$(j);else{A[j]=!0,K.push(j);for(let V of D(j))K.push(V)}j=K.pop()}}function k($){U[$]=P.inEdges($).reduce((D,K)=>Math.max(D,U[K.v]+P.edge(K)),0)}function Y($){let D=P.outEdges($).reduce((A,j)=>Math.min(A,U[j.w]-P.edge(j)),Number.POSITIVE_INFINITY),K=C.node($);D!==Number.POSITIVE_INFINITY&&K.borderType!==F&&(U[$]=Math.max(U[$],D))}return X(k,P.predecessors.bind(P)),X(Y,P.successors.bind(P)),Object.keys(R).forEach($=>U[$]=U[T[$]]),U}function p(C,S,T,R){let L=new a,U=C.graph(),P=M(U.nodesep,U.edgesep,R);return S.forEach(F=>{let X;F.forEach(k=>{let Y=T[k];if(L.setNode(Y),X){var $=T[X],D=L.edge($,Y);L.setEdge($,Y,Math.max(P(C,k,X),D||0))}X=k})}),L}function v(C,S){return Object.values(S).reduce((T,R)=>{let L=Number.NEGATIVE_INFINITY,U=Number.POSITIVE_INFINITY;Object.entries(R).forEach(([F,X])=>{let k=_(C,F)/2;L=Math.max(X+k,L),U=Math.min(X-k,U)});let P=L-U;return P<T[0]&&(T=[P,R]),T},[Number.POSITIVE_INFINITY,null])[1]}function x(C,S){let T=Object.values(S),R=r.applyWithChunking(Math.min,T),L=r.applyWithChunking(Math.max,T);["u","d"].forEach(U=>{["l","r"].forEach(P=>{let F=U+P,X=C[F];if(X===S)return;let k=Object.values(X),Y=R-r.applyWithChunking(Math.min,k);P!=="l"&&(Y=L-r.applyWithChunking(Math.max,k)),Y&&(C[F]=r.mapValues(X,$=>$+Y))})})}function b(C,S){return r.mapValues(C.ul,(T,R)=>{if(S)return C[S.toLowerCase()][R];{let L=Object.values(C).map(U=>U[R]).sort((U,P)=>U-P);return(L[1]+L[2])/2}})}function E(C){let S=r.buildLayerMatrix(C),T=Object.assign(l(C,S),c(C,S)),R={},L;["u","d"].forEach(P=>{L=P==="u"?S:Object.values(S).reverse(),["l","r"].forEach(F=>{F==="r"&&(L=L.map($=>Object.values($).reverse()));let X=(P==="u"?C.predecessors:C.successors).bind(C),k=m(C,L,T,X),Y=g(C,L,k.root,k.align,F==="r");F==="r"&&(Y=r.mapValues(Y,$=>-$)),R[P+F]=Y})});let U=v(C,R);return x(R,U),b(R,C.graph().align)}function M(C,S,T){return(R,L,U)=>{let P=R.node(L),F=R.node(U),X=0,k;if(X+=P.width/2,Object.hasOwn(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":k=-P.width/2;break;case"r":k=P.width/2;break}if(k&&(X+=T?k:-k),k=0,X+=(P.dummy?S:C)/2,X+=(F.dummy?S:C)/2,X+=F.width/2,Object.hasOwn(F,"labelpos"))switch(F.labelpos.toLowerCase()){case"l":k=F.width/2;break;case"r":k=-F.width/2;break}return k&&(X+=T?k:-k),k=0,X}}function _(C,S){return C.node(S).width}}),JR=Ut((t,n)=>{var a=ue(),r=FR().positionX;n.exports=l;function l(u){u=a.asNonCompoundGraph(u),c(u),Object.entries(r(u)).forEach(([f,h])=>u.node(f).x=h)}function c(u){let f=a.buildLayerMatrix(u),h=u.graph().ranksep,m=u.graph().rankalign,g=0;f.forEach(p=>{let v=p.reduce((x,b)=>{let E=u.node(b).height;return x>E?x:E},0);p.forEach(x=>{let b=u.node(x);m==="top"?b.y=g+b.height/2:m==="bottom"?b.y=g+v-b.height/2:b.y=g+v/2}),g+=v+h})}}),WR=Ut((t,n)=>{var a=jR(),r=VR(),l=kR(),c=ue().normalizeRanks,u=BR(),f=ue().removeEmptyRanks,h=HR(),m=UR(),g=YR(),p=QR(),v=JR(),x=ue(),b=wn().Graph;n.exports=E;function E(O,Z={}){let J=Z.debugTiming?x.time:x.notime;return J("layout",()=>{let tt=J("  buildLayoutGraph",()=>X(O));return J("  runLayout",()=>M(tt,J,Z)),J("  updateInputGraph",()=>_(O,tt)),tt})}function M(O,Z,J){Z("    makeSpaceForEdgeLabels",()=>k(O)),Z("    removeSelfEdges",()=>I(O)),Z("    acyclic",()=>a.run(O)),Z("    nestingGraph.run",()=>h.run(O)),Z("    rank",()=>l(x.asNonCompoundGraph(O))),Z("    injectEdgeLabelProxies",()=>Y(O)),Z("    removeEmptyRanks",()=>f(O)),Z("    nestingGraph.cleanup",()=>h.cleanup(O)),Z("    normalizeRanks",()=>c(O)),Z("    assignRankMinMax",()=>$(O)),Z("    removeEdgeLabelProxies",()=>D(O)),Z("    normalize.run",()=>r.run(O)),Z("    parentDummyChains",()=>u(O)),Z("    addBorderSegments",()=>m(O)),Z("    order",()=>p(O,J)),Z("    insertSelfEdges",()=>N(O)),Z("    adjustCoordinateSystem",()=>g.adjust(O)),Z("    position",()=>v(O)),Z("    positionSelfEdges",()=>G(O)),Z("    removeBorderNodes",()=>q(O)),Z("    normalize.undo",()=>r.undo(O)),Z("    fixupEdgeLabelCoords",()=>j(O)),Z("    undoCoordinateSystem",()=>g.undo(O)),Z("    translateGraph",()=>K(O)),Z("    assignNodeIntersects",()=>A(O)),Z("    reversePoints",()=>V(O)),Z("    acyclic.undo",()=>a.undo(O))}function _(O,Z){O.nodes().forEach(J=>{let tt=O.node(J),at=Z.node(J);tt&&(tt.x=at.x,tt.y=at.y,tt.order=at.order,tt.rank=at.rank,Z.children(J).length&&(tt.width=at.width,tt.height=at.height))}),O.edges().forEach(J=>{let tt=O.edge(J),at=Z.edge(J);tt.points=at.points,Object.hasOwn(at,"x")&&(tt.x=at.x,tt.y=at.y)}),O.graph().width=Z.graph().width,O.graph().height=Z.graph().height}var C=["nodesep","edgesep","ranksep","marginx","marginy"],S={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},T=["acyclicer","ranker","rankdir","align","rankalign"],R=["width","height","rank"],L={width:0,height:0},U=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},F=["labelpos"];function X(O){let Z=new b({multigraph:!0,compound:!0}),J=B(O.graph());return Z.setGraph(Object.assign({},S,et(J,C),x.pick(J,T))),O.nodes().forEach(tt=>{let at=B(O.node(tt)),dt=et(at,R);Object.keys(L).forEach(ht=>{dt[ht]===void 0&&(dt[ht]=L[ht])}),Z.setNode(tt,dt),Z.setParent(tt,O.parent(tt))}),O.edges().forEach(tt=>{let at=B(O.edge(tt));Z.setEdge(tt,Object.assign({},P,et(at,U),x.pick(at,F)))}),Z}function k(O){let Z=O.graph();Z.ranksep/=2,O.edges().forEach(J=>{let tt=O.edge(J);tt.minlen*=2,tt.labelpos.toLowerCase()!=="c"&&(Z.rankdir==="TB"||Z.rankdir==="BT"?tt.width+=tt.labeloffset:tt.height+=tt.labeloffset)})}function Y(O){O.edges().forEach(Z=>{let J=O.edge(Z);if(J.width&&J.height){let tt=O.node(Z.v),at={rank:(O.node(Z.w).rank-tt.rank)/2+tt.rank,e:Z};x.addDummyNode(O,"edge-proxy",at,"_ep")}})}function $(O){let Z=0;O.nodes().forEach(J=>{let tt=O.node(J);tt.borderTop&&(tt.minRank=O.node(tt.borderTop).rank,tt.maxRank=O.node(tt.borderBottom).rank,Z=Math.max(Z,tt.maxRank))}),O.graph().maxRank=Z}function D(O){O.nodes().forEach(Z=>{let J=O.node(Z);J.dummy==="edge-proxy"&&(O.edge(J.e).labelRank=J.rank,O.removeNode(Z))})}function K(O){let Z=Number.POSITIVE_INFINITY,J=0,tt=Number.POSITIVE_INFINITY,at=0,dt=O.graph(),ht=dt.marginx||0,mt=dt.marginy||0;function vt(wt){let Et=wt.x,_t=wt.y,te=wt.width,De=wt.height;Z=Math.min(Z,Et-te/2),J=Math.max(J,Et+te/2),tt=Math.min(tt,_t-De/2),at=Math.max(at,_t+De/2)}O.nodes().forEach(wt=>vt(O.node(wt))),O.edges().forEach(wt=>{let Et=O.edge(wt);Object.hasOwn(Et,"x")&&vt(Et)}),Z-=ht,tt-=mt,O.nodes().forEach(wt=>{let Et=O.node(wt);Et.x-=Z,Et.y-=tt}),O.edges().forEach(wt=>{let Et=O.edge(wt);Et.points.forEach(_t=>{_t.x-=Z,_t.y-=tt}),Object.hasOwn(Et,"x")&&(Et.x-=Z),Object.hasOwn(Et,"y")&&(Et.y-=tt)}),dt.width=J-Z+ht,dt.height=at-tt+mt}function A(O){O.edges().forEach(Z=>{let J=O.edge(Z),tt=O.node(Z.v),at=O.node(Z.w),dt,ht;J.points?(dt=J.points[0],ht=J.points[J.points.length-1]):(J.points=[],dt=at,ht=tt),J.points.unshift(x.intersectRect(tt,dt)),J.points.push(x.intersectRect(at,ht))})}function j(O){O.edges().forEach(Z=>{let J=O.edge(Z);if(Object.hasOwn(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function V(O){O.edges().forEach(Z=>{let J=O.edge(Z);J.reversed&&J.points.reverse()})}function q(O){O.nodes().forEach(Z=>{if(O.children(Z).length){let J=O.node(Z),tt=O.node(J.borderTop),at=O.node(J.borderBottom),dt=O.node(J.borderLeft[J.borderLeft.length-1]),ht=O.node(J.borderRight[J.borderRight.length-1]);J.width=Math.abs(ht.x-dt.x),J.height=Math.abs(at.y-tt.y),J.x=dt.x+J.width/2,J.y=tt.y+J.height/2}}),O.nodes().forEach(Z=>{O.node(Z).dummy==="border"&&O.removeNode(Z)})}function I(O){O.edges().forEach(Z=>{if(Z.v===Z.w){var J=O.node(Z.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:Z,label:O.edge(Z)}),O.removeEdge(Z)}})}function N(O){var Z=x.buildLayerMatrix(O);Z.forEach(J=>{var tt=0;J.forEach((at,dt)=>{var ht=O.node(at);ht.order=dt+tt,(ht.selfEdges||[]).forEach(mt=>{x.addDummyNode(O,"selfedge",{width:mt.label.width,height:mt.label.height,rank:ht.rank,order:dt+ ++tt,e:mt.e,label:mt.label},"_se")}),delete ht.selfEdges})})}function G(O){O.nodes().forEach(Z=>{var J=O.node(Z);if(J.dummy==="selfedge"){var tt=O.node(J.e.v),at=tt.x+tt.width/2,dt=tt.y,ht=J.x-at,mt=tt.height/2;O.setEdge(J.e,J.label),O.removeNode(Z),J.label.points=[{x:at+2*ht/3,y:dt-mt},{x:at+5*ht/6,y:dt-mt},{x:at+ht,y:dt},{x:at+5*ht/6,y:dt+mt},{x:at+2*ht/3,y:dt+mt}],J.label.x=J.x,J.label.y=J.y}})}function et(O,Z){return x.mapValues(x.pick(O,Z),Number)}function B(O){var Z={};return O&&Object.entries(O).forEach(([J,tt])=>{typeof J=="string"&&(J=J.toLowerCase()),Z[J]=tt}),Z}}),t6=Ut((t,n)=>{var a=ue(),r=wn().Graph;n.exports={debugOrdering:l};function l(c){let u=a.buildLayerMatrix(c),f=new r({compound:!0,multigraph:!0}).setGraph({});return c.nodes().forEach(h=>{f.setNode(h,{label:h}),f.setParent(h,"layer"+c.node(h).rank)}),c.edges().forEach(h=>f.setEdge(h.v,h.w,{},h.name)),u.forEach((h,m)=>{let g="layer"+m;f.setNode(g,{rank:"same"}),h.reduce((p,v)=>(f.setEdge(p,v,{style:"invis"}),v))}),f}}),e6=Ut((t,n)=>{n.exports="2.0.4"}),n6=Ut((t,n)=>{n.exports={graphlib:wn(),layout:WR(),debug:t6(),util:{time:ue().time,notime:ue().notime},version:e6()}});const s1=n6();/*! For license information please see dagre.esm.js.LEGAL.txt */const i6={ide:Jb,sdk:lN,"http-proxy":dN,scan:pN};function a6({data:t,selected:n}){const[a,r]=Q.useState(!1),l=i6[t.sourceKey]??Jb;return H.jsxs(Se.div,{className:"relative cursor-pointer rounded-xl px-3 py-2.5 min-w-[196px] max-w-[220px]",style:{borderLeftWidth:3,borderLeftColor:t.accent},initial:!1,animate:{scale:n?1.03:a?1.02:1,boxShadow:a||n?`0 0 0 1px ${t.accent}44, 0 12px 40px -8px rgba(0,0,0,0.55), 0 0 28px -4px ${t.accent}55`:"0 8px 32px -8px rgba(0,0,0,0.45)"},transition:{type:"spring",stiffness:400,damping:28},onPointerEnter:()=>r(!0),onPointerLeave:()=>r(!1),children:[H.jsx("div",{className:"glass rounded-xl overflow-hidden",children:H.jsxs("div",{className:"flex items-start gap-2.5",children:[H.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",style:{background:`linear-gradient(135deg, ${t.accent}33, ${t.accent}12)`,color:t.accent},children:H.jsx(l,{className:"h-4 w-4",strokeWidth:2})}),H.jsxs("div",{className:"min-w-0 flex-1",children:[H.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-zinc-300 truncate",children:t.label}),H.jsxs("div",{className:"mt-0.5 flex items-baseline gap-2",children:[H.jsx("span",{className:"font-mono-ui text-lg font-bold tabular-nums text-zinc-100",children:t.eventCount}),H.jsx("span",{className:"text-[10px] text-zinc-500",children:"events"})]}),a&&(t.lastMethod||t.lastTime)?H.jsxs(Se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-1.5 border-t border-white/10 pt-1.5 text-[10px] text-zinc-400",children:[t.lastMethod?H.jsx("div",{className:"font-mono-ui truncate text-cyan-200/90",children:t.lastMethod}):null,t.lastTime?H.jsx("div",{className:"text-zinc-500",children:t.lastTime}):null]}):null]})]})}),H.jsx(Ii,{type:"source",position:xt.Right,className:"!h-2.5 !w-2.5 !border-2 !border-zinc-700 !bg-zinc-900",style:{boxShadow:`0 0 8px ${t.accent}`}})]})}const s6=Q.memo(a6);function r6({data:t,selected:n}){const[a,r]=Q.useState(!1),l=t.guardianMode==="block";return H.jsxs(Se.div,{className:"relative cursor-pointer rounded-2xl px-1 py-1 min-w-[220px] max-w-[260px]",initial:!1,animate:{scale:n?1.04:a?1.02:1},transition:{type:"spring",stiffness:380,damping:26},onPointerEnter:()=>r(!0),onPointerLeave:()=>r(!1),children:[H.jsx("div",{className:`glass-border-animated rounded-2xl ${t.hasThreats?"glow-pulse":""}`,style:t.hasThreats?{borderRadius:"1rem"}:void 0,children:H.jsx("div",{className:"relative z-10 m-[1px] rounded-[15px] bg-zinc-950/80 px-3 py-3 backdrop-blur-xl",children:H.jsxs("div",{className:"flex items-center gap-3",children:[H.jsx(Se.div,{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl",animate:{boxShadow:t.hasThreats?["0 0 12px rgba(239,68,68,0.35)","0 0 28px rgba(239,68,68,0.6)","0 0 12px rgba(239,68,68,0.35)"]:"0 0 20px rgba(34,197,94,0.35)"},transition:{duration:t.hasThreats?2:.4,repeat:t.hasThreats?1/0:0},style:{background:t.hasThreats?"linear-gradient(145deg, rgba(239,68,68,0.35), rgba(239,68,68,0.1))":"linear-gradient(145deg, rgba(34,197,94,0.35), rgba(34,197,94,0.1))"},children:H.jsx(tw,{className:`h-6 w-6 ${t.hasThreats?"text-red-300":"text-emerald-300"}`,strokeWidth:1.75})}),H.jsxs("div",{className:"min-w-0 flex-1",children:[H.jsx("div",{className:"font-mono-ui text-[11px] font-bold uppercase tracking-[0.2em] text-violet-200/90",children:"Crossfire"}),H.jsx("div",{className:"mt-0.5 text-xs font-medium text-zinc-400",children:"Security proxy"}),H.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[10px]",children:[H.jsxs("span",{className:"rounded-full bg-white/5 px-2 py-0.5 font-mono-ui text-zinc-300",children:[t.totalEvents," evt"]}),H.jsxs("span",{className:`rounded-full px-2 py-0.5 font-mono-ui ${t.totalThreats>0?"bg-red-500/20 text-red-300":"bg-white/5 text-zinc-500"}`,children:[t.totalThreats," thr"]}),H.jsx("span",{className:`rounded-full px-2 py-0.5 font-semibold uppercase ${l?"bg-red-500/25 text-red-200":"bg-sky-500/20 text-sky-200"}`,children:l?"Block":"Monitor"})]}),a?H.jsx(Se.p,{initial:{opacity:0},animate:{opacity:1},className:"mt-2 text-[10px] leading-snug text-zinc-500",children:"Click to clear traffic filters"}):null]})]})})}),H.jsx(Ii,{type:"target",position:xt.Left,className:"!h-2.5 !w-2.5 !border-2 !border-violet-500/50 !bg-zinc-950",style:{boxShadow:"0 0 10px rgba(139,92,246,0.5)"}}),H.jsx(Ii,{type:"source",position:xt.Right,className:"!h-2.5 !w-2.5 !border-2 !border-emerald-500/50 !bg-zinc-950",style:{boxShadow:"0 0 10px rgba(34,197,94,0.45)"}})]})}const o6=Q.memo(r6);function l6({data:t,selected:n}){const[a,r]=Q.useState(!1),l=t.toolNames.slice(0,4),c=t.toolNames.length>l.length?`+${t.toolNames.length-l.length}`:"";return H.jsxs(Se.div,{className:"relative cursor-pointer rounded-xl px-3 py-2.5 min-w-[200px] max-w-[240px]",initial:!1,animate:{scale:n?1.03:a?1.02:1,boxShadow:t.threatCount>0?a||n?"0 0 0 1px rgba(239,68,68,0.35), 0 14px 40px -10px rgba(239,68,68,0.25)":"0 8px 28px -8px rgba(239,68,68,0.15)":a||n?"0 0 0 1px rgba(34,197,94,0.25), 0 14px 40px -10px rgba(0,0,0,0.5)":"0 8px 32px -8px rgba(0,0,0,0.45)"},transition:{type:"spring",stiffness:400,damping:28},onPointerEnter:()=>r(!0),onPointerLeave:()=>r(!1),children:[H.jsx("div",{className:"glass rounded-xl",children:H.jsxs("div",{className:"flex items-start gap-2.5",children:[H.jsxs("div",{className:"relative flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-white/[0.06] text-zinc-300",children:[H.jsx(Wb,{className:"h-4 w-4",strokeWidth:2}),H.jsx("span",{className:`absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full ring-2 ring-zinc-950 ${t.threatCount>0?"bg-red-500":t.healthy?"bg-emerald-400":"bg-amber-400"}`,title:t.threatCount>0?"Threats detected":"Clean"})]}),H.jsxs("div",{className:"min-w-0 flex-1",children:[H.jsx("div",{className:"truncate font-mono-ui text-[12px] font-semibold text-zinc-100",title:t.serverName,children:t.serverName}),H.jsxs("div",{className:"mt-0.5 flex items-center gap-2 text-[10px] text-zinc-500",children:[H.jsxs("span",{children:[t.toolCount," tools"]}),t.threatCount>0?H.jsxs("span",{className:"font-semibold text-red-400",children:[t.threatCount," threats"]}):H.jsx("span",{className:"text-emerald-500/80",children:"clean"})]}),a&&l.length>0?H.jsxs(Se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 flex flex-wrap gap-1 border-t border-white/10 pt-2",children:[l.map(u=>H.jsx("span",{className:"max-w-[88px] truncate rounded-md bg-white/5 px-1.5 py-0.5 font-mono-ui text-[9px] text-zinc-400",title:u,children:u},u)),c?H.jsx("span",{className:"rounded-md bg-white/5 px-1.5 py-0.5 text-[9px] text-zinc-500",children:c}):null]}):null]})]})}),H.jsx(Ii,{type:"target",position:xt.Left,className:"!h-2.5 !w-2.5 !border-2 !border-zinc-600 !bg-zinc-950"})]})}const u6=Q.memo(l6);function c6({id:t,sourceX:n,sourceY:a,targetX:r,targetY:l,sourcePosition:c,targetPosition:u,style:f,markerEnd:h,data:m}){const[g]=Xu({sourceX:n,sourceY:a,sourcePosition:c,targetX:r,targetY:l,targetPosition:u}),p=m??{},v=p.strokeStart??"#6366f1",x=p.strokeEnd??"#22c55e",b=!!p.threat,E=`grad-${String(t).replace(/[^a-zA-Z0-9]/g,"")}`;return H.jsxs(H.Fragment,{children:[H.jsx("defs",{children:H.jsxs("linearGradient",{id:E,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[H.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:b?1:.85}),H.jsx("stop",{offset:"100%",stopColor:b?"#ef4444":x,stopOpacity:1})]})}),H.jsx(Mo,{id:t,path:g,markerEnd:h,className:p.animated?"edge-animated":void 0,style:{...f,stroke:`url(#${E})`,strokeWidth:b?2.75:1.75,strokeLinecap:"round",filter:b?"drop-shadow(0 0 5px rgba(239,68,68,0.65))":void 0}})]})}const f6=Q.memo(c6),d6={source:s6,proxy:o6,server:u6},h6={gradient:f6},m6={ide:"IDE (Cursor/Claude)",sdk:"ADK / SDK Agent","http-proxy":"HTTP Client",scan:"Scanner"},p6={ide:"#3b82f6",sdk:"#a855f7","http-proxy":"#f59e0b",scan:"#06b6d4"},g6=220,y6=76,v6=268,x6=132,b6=228,w6=96;function r1(t){return t.type==="proxy"?{w:v6,h:x6}:t.type==="server"?{w:b6,h:w6}:{w:g6,h:y6}}function S6(t,n){const a=new s1.graphlib.Graph;a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"LR",nodesep:48,ranksep:180});for(const r of t){const{w:l,h:c}=r1(r);a.setNode(r.id,{width:l,height:c})}for(const r of n)a.setEdge(r.source,r.target);return s1.layout(a),t.map(r=>{const l=a.node(r.id),{w:c,h:u}=r1(r);return{...r,position:{x:l.x-c/2,y:l.y-u/2}}})}function E6(t,n){for(const a of t)if((a.source??"ide")===n)return a}function T6(t,n){const a=new Set;for(const r of t)if(!(r.server!==n||!r.tools_discovered))for(const l of r.tools_discovered)a.add(l);return[...a].slice(0,12)}function _6({events:t,guardianMode:n,onGraphFilter:a}){const r=Q.useMemo(()=>{const f=new Map,h=new Set,m=new Map;let g=0;for(const x of t){const b=f.get(x.server)||{threats:0,protocol:x.protocol,tools:0};x.threats.length>0&&(b.threats+=x.threats.length),x.tools_discovered&&(b.tools=x.tools_discovered.length),f.set(x.server,b);const E=x.source??"ide";h.add(E),m.set(E,(m.get(E)??0)+1),g+=x.threats.length}const p=[...f.keys()].sort().join(","),v=[...h].sort().join(",");return{servers:f,sources:h,sourceCounts:m,totalThreats:g,serverKeys:p,sourceKeys:v}},[t]),{nodes:l,edges:c}=Q.useMemo(()=>{const{servers:f,sources:h,sourceCounts:m,totalThreats:g}=r,p=g>0,v=[],x=[],b=h.size>0?[...h]:["ide"];for(const E of b){const M=`source-${E}`,_=E6(t,E),C=p6[E]??"#3b82f6",S={label:m6[E]??E,sourceKey:E,accent:C,eventCount:m.get(E)??0,lastMethod:(_==null?void 0:_.method)||void 0,lastTime:_?new Date(_.timestamp).toLocaleTimeString():void 0};v.push({id:M,type:"source",position:{x:0,y:0},data:S}),x.push({id:`${M}-proxy`,source:M,target:"proxy",type:"gradient",data:{strokeStart:C,strokeEnd:"#6366f1",animated:(m.get(E)??0)>0,threat:t.some(T=>(T.source??"ide")===E&&T.threats.length>0)}})}return v.push({id:"proxy",type:"proxy",position:{x:0,y:0},data:{totalEvents:t.length,totalThreats:g,guardianMode:n,hasThreats:p}}),f.forEach((E,M)=>{const _=`server-${M}`,C=T6(t,M),S={serverName:M,toolCount:E.tools||C.length,threatCount:E.threats,toolNames:C,healthy:E.threats===0};v.push({id:_,type:"server",position:{x:0,y:0},data:S}),x.push({id:`proxy-${_}`,source:"proxy",target:_,type:"gradient",data:{strokeStart:"#6366f1",strokeEnd:E.threats>0?"#ef4444":"#22c55e",animated:!0,threat:E.threats>0}})}),{nodes:S6(v,x),edges:x}},[t,n,r]),u=Q.useCallback((f,h)=>{if(a){if(h.type==="source"&&h.id.startsWith("source-")){const m=h.id.slice(7);a({kind:"source",source:m});return}if(h.type==="server"&&h.id.startsWith("server-")){const m=h.id.slice(7);a({kind:"server",server:m});return}h.type==="proxy"&&a({kind:"clear"})}},[a]);return H.jsx("div",{className:"h-full min-h-0 [&_.react-flow]:h-full [&_.react-flow]:min-h-0",children:H.jsxs(aR,{nodes:l,edges:c,nodeTypes:d6,edgeTypes:h6,fitView:!0,fitViewOptions:{padding:.2,maxZoom:1.2},minZoom:.25,maxZoom:1.75,proOptions:{hideAttribution:!0},onNodeClick:u,defaultEdgeOptions:{type:"gradient"},className:"bg-transparent",nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,zoomOnScroll:!0,zoomOnPinch:!0,panOnDrag:!0,children:[H.jsx(uR,{color:"#1a1a24",gap:22,size:1.2,className:"opacity-40"}),H.jsx(gR,{position:"bottom-left",showInteractive:!1})]})})}const ch=280,cu=640,fu=400,M6=200,fh="crossfire-log-width";function A6(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function C6(){const[t,n]=Q.useState("monitor"),[a,r]=Q.useState(null),[l,c]=Q.useState(null),[u,f]=Q.useState(!0),[h,m]=Q.useState(fu),[g,p]=Q.useState(!1),v=Q.useRef(fu);v.current=h;const x=Q.useRef(!1),b=Q.useRef(null),E=Q.useCallback(Y=>{n(Y)},[]),M=Q.useMemo(()=>A6(),[]),{events:_,connected:C,sendCommand:S}=vN(M,{onGuardianUpdate:E}),[T,R]=Q.useState(null);Q.useEffect(()=>{try{const Y=localStorage.getItem(fh);if(Y){const $=parseInt(Y,10);Number.isNaN($)||m(Math.min(cu,Math.max(ch,$)))}}catch{}},[]),Q.useEffect(()=>{const Y=D=>{if(!x.current)return;const K=window.innerWidth-D.clientX,A=Math.min(cu,Math.max(120,K));v.current=A,m(A)},$=()=>{if(!x.current)return;x.current=!1,p(!1),document.body.style.cursor="",document.body.style.userSelect="";const D=v.current;if(D<M6){f(!1);try{const A=localStorage.getItem(fh);if(A){const j=parseInt(A,10);if(!Number.isNaN(j)){const V=Math.min(cu,Math.max(ch,j));v.current=V,m(V);return}}}catch{}v.current=fu,m(fu);return}const K=Math.min(cu,Math.max(ch,D));v.current=K,m(K);try{localStorage.setItem(fh,String(K))}catch{}};return window.addEventListener("mousemove",Y),window.addEventListener("mouseup",$),()=>{window.removeEventListener("mousemove",Y),window.removeEventListener("mouseup",$)}},[]);const L=Q.useCallback(Y=>{Y.preventDefault(),x.current=!0,p(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);Q.useEffect(()=>{if(!C)return;const Y=window.location.origin;fetch(`${Y}/api/guardian`).then($=>$.json()).then($=>{($.mode==="block"||$.mode==="monitor")&&n($.mode)}).catch($=>{console.warn("[crossfire] Guardian API unreachable:",$)})},[C]);const U=Q.useCallback(()=>{n(Y=>{const $=Y==="monitor"?"block":"monitor";return S("set_guardian",{mode:$}),$})},[S]),P=_.filter(Y=>Y.severity!=="clean").length,F=[...new Set(_.map(Y=>Y.server))],X=Q.useCallback(()=>{r(null),c(null)},[]),k=Q.useCallback(Y=>{if(Y.kind==="clear"){X();return}if(f(!0),R(null),Y.kind==="source"){r(Y.source),c(null);return}Y.kind==="server"&&(c(Y.server),r(null))},[X]);return H.jsxs("div",{className:"mesh-bg flex h-dvh min-h-0 flex-col overflow-hidden text-text-primary",children:[H.jsx(bN,{connected:C,serverCount:F.length,eventCount:_.length,threatCount:P,guardianMode:t,onToggleGuardian:U}),H.jsxs("div",{className:"relative flex min-h-0 flex-1 overflow-hidden",children:[H.jsxs("div",{className:"relative min-h-0 min-w-0 flex-1",children:[H.jsx(_6,{events:_,guardianMode:t,onGraphFilter:k}),H.jsx(Ou,{children:u?null:H.jsxs(Se.button,{type:"button",initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:24},transition:{type:"spring",stiffness:420,damping:34},className:"absolute right-3 top-1/2 z-20 flex -translate-y-1/2 flex-col items-center gap-1.5 rounded-l-xl border border-white/10 border-r-0 bg-zinc-900/95 px-2.5 py-4 text-zinc-200 shadow-2xl backdrop-blur-md",onClick:()=>f(!0),"aria-label":"Open traffic log",children:[H.jsx(mN,{className:"h-4 w-4 shrink-0 text-violet-300",strokeWidth:2}),H.jsx("span",{className:"select-none text-[9px] font-bold uppercase tracking-[0.2em] text-zinc-500 [writing-mode:vertical-rl]",children:"Logs"}),_.length>0?H.jsx("span",{className:"rounded-full bg-violet-500/25 px-1.5 py-0.5 font-mono-ui text-[10px] text-violet-200",children:_.length}):null]},"log-expand")})]}),H.jsx(Se.aside,{initial:!1,animate:{width:u?h:0,opacity:u?1:0},transition:g?{width:{duration:0},opacity:{duration:.15}}:{width:{type:"spring",stiffness:420,damping:38,mass:.85},opacity:{duration:.2}},className:"relative flex min-h-0 shrink-0 flex-col overflow-hidden border-l border-white/[0.08] bg-zinc-950/55 backdrop-blur-md",style:{pointerEvents:u?"auto":"none"},"aria-hidden":!u,children:u?H.jsxs(H.Fragment,{children:[H.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize or drag left to collapse traffic log",title:"Drag to resize — drag narrow to hide",className:"absolute left-0 top-0 z-30 flex w-4 -translate-x-1/2 cursor-col-resize items-center justify-center rounded hover:bg-violet-500/15 active:bg-violet-500/25",onMouseDown:L,children:H.jsx(hN,{className:"pointer-events-none h-5 w-5 text-zinc-500","aria-hidden":!0})}),H.jsxs("div",{ref:b,className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain pl-1 [scrollbar-gutter:stable]",children:[H.jsx(EN,{events:_,onSelectEvent:R,selectedId:T==null?void 0:T.id,sourceFilter:a,serverFilter:l,onSourceFilter:r,onServerFilter:c,onClearFilters:X,onCollapsePanel:()=>f(!1),scrollContainerRef:b}),H.jsx(Ou,{mode:"wait",children:T&&T.threats.length>0?H.jsx(_N,{event:T},T.id):null})]})]}):null})]})]})}tT.createRoot(document.getElementById("root")).render(H.jsx(Q.StrictMode,{children:H.jsx(C6,{})}));
