var HK=Object.defineProperty;var jP=e=>{throw TypeError(e)};var FK=(e,t,n)=>t in e?HK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Mw=(e,t,n)=>FK(e,typeof t!="symbol"?t+"":t,n),Rw=(e,t,n)=>t.has(e)||jP("Cannot "+n);var G=(e,t,n)=>(Rw(e,t,"read from private field"),n?n.call(e):t.get(e)),Ee=(e,t,n)=>t.has(e)?jP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),xe=(e,t,n,r)=>(Rw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$e=(e,t,n)=>(Rw(e,t,"access private method"),n);var Sv=(e,t,n,r)=>({set _(a){xe(e,t,a,n)},get _(){return G(e,t,r)}});function qK(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();function Qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kw={exports:{}},eh={};/**
 * @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 CP;function KK(){if(CP)return eh;CP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var c in a)c!=="key"&&(i[c]=a[c])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:i}}return eh.Fragment=t,eh.jsx=n,eh.jsxs=n,eh}var OP;function VK(){return OP||(OP=1,kw.exports=KK()),kw.exports}var v=VK(),Dw={exports:{}},Fe={};/**
 * @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 AP;function YK(){if(AP)return Fe;AP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function y(B){return B===null||typeof B!="object"?null:(B=p&&B[p]||B["@@iterator"],typeof B=="function"?B:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function E(B,z,X){this.props=B,this.context=z,this.refs=S,this.updater=X||w}E.prototype.isReactComponent={},E.prototype.setState=function(B,z){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,z,"setState")},E.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function O(){}O.prototype=E.prototype;function C(B,z,X){this.props=B,this.context=z,this.refs=S,this.updater=X||w}var A=C.prototype=new O;A.constructor=C,x(A,E.prototype),A.isPureReactComponent=!0;var N=Array.isArray;function T(){}var P={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function D(B,z,X){var Z=X.ref;return{$$typeof:e,type:B,key:z,ref:Z!==void 0?Z:null,props:X}}function K(B,z){return D(B.type,z,B.props)}function L(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function I(B){var z={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(X){return z[X]})}var W=/\/+/g;function $(B,z){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):z.toString(36)}function V(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(T,T):(B.status="pending",B.then(function(z){B.status==="pending"&&(B.status="fulfilled",B.value=z)},function(z){B.status==="pending"&&(B.status="rejected",B.reason=z)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function R(B,z,X,Z,ee){var se=typeof B;(se==="undefined"||se==="boolean")&&(B=null);var ae=!1;if(B===null)ae=!0;else switch(se){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(B.$$typeof){case e:case t:ae=!0;break;case m:return ae=B._init,R(ae(B._payload),z,X,Z,ee)}}if(ae)return ee=ee(B),ae=Z===""?"."+$(B,0):Z,N(ee)?(X="",ae!=null&&(X=ae.replace(W,"$&/")+"/"),R(ee,z,X,"",function(le){return le})):ee!=null&&(L(ee)&&(ee=K(ee,X+(ee.key==null||B&&B.key===ee.key?"":(""+ee.key).replace(W,"$&/")+"/")+ae)),z.push(ee)),1;ae=0;var re=Z===""?".":Z+":";if(N(B))for(var J=0;J<B.length;J++)Z=B[J],se=re+$(Z,J),ae+=R(Z,z,X,se,ee);else if(J=y(B),typeof J=="function")for(B=J.call(B),J=0;!(Z=B.next()).done;)Z=Z.value,se=re+$(Z,J++),ae+=R(Z,z,X,se,ee);else if(se==="object"){if(typeof B.then=="function")return R(V(B),z,X,Z,ee);throw z=String(B),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return ae}function H(B,z,X){if(B==null)return B;var Z=[],ee=0;return R(B,Z,"","",function(se){return z.call(X,se,ee++)}),Z}function q(B){if(B._status===-1){var z=B._result;z=z(),z.then(function(X){(B._status===0||B._status===-1)&&(B._status=1,B._result=X)},function(X){(B._status===0||B._status===-1)&&(B._status=2,B._result=X)}),B._status===-1&&(B._status=0,B._result=z)}if(B._status===1)return B._result.default;throw B._result}var F=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},Y={map:H,forEach:function(B,z,X){H(B,function(){z.apply(this,arguments)},X)},count:function(B){var z=0;return H(B,function(){z++}),z},toArray:function(B){return H(B,function(z){return z})||[]},only:function(B){if(!L(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Fe.Activity=h,Fe.Children=Y,Fe.Component=E,Fe.Fragment=n,Fe.Profiler=a,Fe.PureComponent=C,Fe.StrictMode=r,Fe.Suspense=f,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(B){return P.H.useMemoCache(B)}},Fe.cache=function(B){return function(){return B.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(B,z,X){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var Z=x({},B.props),ee=B.key;if(z!=null)for(se in z.key!==void 0&&(ee=""+z.key),z)!k.call(z,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&z.ref===void 0||(Z[se]=z[se]);var se=arguments.length-2;if(se===1)Z.children=X;else if(1<se){for(var ae=Array(se),re=0;re<se;re++)ae[re]=arguments[re+2];Z.children=ae}return D(B.type,ee,Z)},Fe.createContext=function(B){return B={$$typeof:s,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:i,_context:B},B},Fe.createElement=function(B,z,X){var Z,ee={},se=null;if(z!=null)for(Z in z.key!==void 0&&(se=""+z.key),z)k.call(z,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=z[Z]);var ae=arguments.length-2;if(ae===1)ee.children=X;else if(1<ae){for(var re=Array(ae),J=0;J<ae;J++)re[J]=arguments[J+2];ee.children=re}if(B&&B.defaultProps)for(Z in ae=B.defaultProps,ae)ee[Z]===void 0&&(ee[Z]=ae[Z]);return D(B,se,ee)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(B){return{$$typeof:c,render:B}},Fe.isValidElement=L,Fe.lazy=function(B){return{$$typeof:m,_payload:{_status:-1,_result:B},_init:q}},Fe.memo=function(B,z){return{$$typeof:u,type:B,compare:z===void 0?null:z}},Fe.startTransition=function(B){var z=P.T,X={};P.T=X;try{var Z=B(),ee=P.S;ee!==null&&ee(X,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(T,F)}catch(se){F(se)}finally{z!==null&&X.types!==null&&(z.types=X.types),P.T=z}},Fe.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Fe.use=function(B){return P.H.use(B)},Fe.useActionState=function(B,z,X){return P.H.useActionState(B,z,X)},Fe.useCallback=function(B,z){return P.H.useCallback(B,z)},Fe.useContext=function(B){return P.H.useContext(B)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(B,z){return P.H.useDeferredValue(B,z)},Fe.useEffect=function(B,z){return P.H.useEffect(B,z)},Fe.useEffectEvent=function(B){return P.H.useEffectEvent(B)},Fe.useId=function(){return P.H.useId()},Fe.useImperativeHandle=function(B,z,X){return P.H.useImperativeHandle(B,z,X)},Fe.useInsertionEffect=function(B,z){return P.H.useInsertionEffect(B,z)},Fe.useLayoutEffect=function(B,z){return P.H.useLayoutEffect(B,z)},Fe.useMemo=function(B,z){return P.H.useMemo(B,z)},Fe.useOptimistic=function(B,z){return P.H.useOptimistic(B,z)},Fe.useReducer=function(B,z,X){return P.H.useReducer(B,z,X)},Fe.useRef=function(B){return P.H.useRef(B)},Fe.useState=function(B){return P.H.useState(B)},Fe.useSyncExternalStore=function(B,z,X){return P.H.useSyncExternalStore(B,z,X)},Fe.useTransition=function(){return P.H.useTransition()},Fe.version="19.2.4",Fe}var NP;function Uf(){return NP||(NP=1,Dw.exports=YK()),Dw.exports}var b=Uf();const be=Qa(b),tj=qK({__proto__:null,default:be},[b]);var Iw={exports:{}},th={},Lw={exports:{}},zw={};/**
 * @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 TP;function GK(){return TP||(TP=1,(function(e){function t(R,H){var q=R.length;R.push(H);e:for(;0<q;){var F=q-1>>>1,Y=R[F];if(0<a(Y,H))R[F]=H,R[q]=Y,q=F;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var H=R[0],q=R.pop();if(q!==H){R[0]=q;e:for(var F=0,Y=R.length,B=Y>>>1;F<B;){var z=2*(F+1)-1,X=R[z],Z=z+1,ee=R[Z];if(0>a(X,q))Z<Y&&0>a(ee,X)?(R[F]=ee,R[Z]=q,F=Z):(R[F]=X,R[z]=q,F=z);else if(Z<Y&&0>a(ee,q))R[F]=ee,R[Z]=q,F=Z;else break e}}return H}function a(R,H){var q=R.sortIndex-H.sortIndex;return q!==0?q:R.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var f=[],u=[],m=1,h=null,p=3,y=!1,w=!1,x=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function A(R){for(var H=n(u);H!==null;){if(H.callback===null)r(u);else if(H.startTime<=R)r(u),H.sortIndex=H.expirationTime,t(f,H);else break;H=n(u)}}function N(R){if(x=!1,A(R),!w)if(n(f)!==null)w=!0,T||(T=!0,I());else{var H=n(u);H!==null&&V(N,H.startTime-R)}}var T=!1,P=-1,k=5,D=-1;function K(){return S?!0:!(e.unstable_now()-D<k)}function L(){if(S=!1,T){var R=e.unstable_now();D=R;var H=!0;try{e:{w=!1,x&&(x=!1,O(P),P=-1),y=!0;var q=p;try{t:{for(A(R),h=n(f);h!==null&&!(h.expirationTime>R&&K());){var F=h.callback;if(typeof F=="function"){h.callback=null,p=h.priorityLevel;var Y=F(h.expirationTime<=R);if(R=e.unstable_now(),typeof Y=="function"){h.callback=Y,A(R),H=!0;break t}h===n(f)&&r(f),A(R)}else r(f);h=n(f)}if(h!==null)H=!0;else{var B=n(u);B!==null&&V(N,B.startTime-R),H=!1}}break e}finally{h=null,p=q,y=!1}H=void 0}}finally{H?I():T=!1}}}var I;if(typeof C=="function")I=function(){C(L)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,$=W.port2;W.port1.onmessage=L,I=function(){$.postMessage(null)}}else I=function(){E(L,0)};function V(R,H){P=E(function(){R(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var q=p;p=H;try{return R()}finally{p=q}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(R,H){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var q=p;p=R;try{return H()}finally{p=q}},e.unstable_scheduleCallback=function(R,H,q){var F=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?F+q:F):q=F,R){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=q+Y,R={id:m++,callback:H,priorityLevel:R,startTime:q,expirationTime:Y,sortIndex:-1},q>F?(R.sortIndex=q,t(u,R),n(f)===null&&R===n(u)&&(x?(O(P),P=-1):x=!0,V(N,q-F))):(R.sortIndex=Y,t(f,R),w||y||(w=!0,T||(T=!0,I()))),R},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(R){var H=p;return function(){var q=p;p=H;try{return R.apply(this,arguments)}finally{p=q}}}})(zw)),zw}var PP;function XK(){return PP||(PP=1,Lw.exports=GK()),Lw.exports}var $w={exports:{}},rr={};/**
 * @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 MP;function WK(){if(MP)return rr;MP=1;var e=Uf();function t(f){var u="https://react.dev/errors/"+f;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)u+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(f,u,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:h==null?null:""+h,children:f,containerInfo:u,implementation:m}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,u){if(f==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return rr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rr.createPortal=function(f,u){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return i(f,u,null,m)},rr.flushSync=function(f){var u=s.T,m=r.p;try{if(s.T=null,r.p=2,f)return f()}finally{s.T=u,r.p=m,r.d.f()}},rr.preconnect=function(f,u){typeof f=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,r.d.C(f,u))},rr.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},rr.preinit=function(f,u){if(typeof f=="string"&&u&&typeof u.as=="string"){var m=u.as,h=c(m,u.crossOrigin),p=typeof u.integrity=="string"?u.integrity:void 0,y=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;m==="style"?r.d.S(f,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:y}):m==="script"&&r.d.X(f,{crossOrigin:h,integrity:p,fetchPriority:y,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},rr.preinitModule=function(f,u){if(typeof f=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var m=c(u.as,u.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&r.d.M(f)},rr.preload=function(f,u){if(typeof f=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var m=u.as,h=c(m,u.crossOrigin);r.d.L(f,m,{crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},rr.preloadModule=function(f,u){if(typeof f=="string")if(u){var m=c(u.as,u.crossOrigin);r.d.m(f,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:m,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else r.d.m(f)},rr.requestFormReset=function(f){r.d.r(f)},rr.unstable_batchedUpdates=function(f,u){return f(u)},rr.useFormState=function(f,u,m){return s.H.useFormState(f,u,m)},rr.useFormStatus=function(){return s.H.useHostTransitionStatus()},rr.version="19.2.4",rr}var RP;function iz(){if(RP)return $w.exports;RP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),$w.exports=WK(),$w.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 kP;function QK(){if(kP)return th;kP=1;var e=XK(),t=Uf(),n=iz();function r(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function s(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function f(o){if(i(o)!==o)throw Error(r(188))}function u(o){var l=o.alternate;if(!l){if(l=i(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,g=l;;){var _=d.return;if(_===null)break;var j=_.alternate;if(j===null){if(g=_.return,g!==null){d=g;continue}break}if(_.child===j.child){for(j=_.child;j;){if(j===d)return f(_),o;if(j===g)return f(_),l;j=j.sibling}throw Error(r(188))}if(d.return!==g.return)d=_,g=j;else{for(var M=!1,U=_.child;U;){if(U===d){M=!0,d=_,g=j;break}if(U===g){M=!0,g=_,d=j;break}U=U.sibling}if(!M){for(U=j.child;U;){if(U===d){M=!0,d=j,g=_;break}if(U===g){M=!0,g=j,d=_;break}U=U.sibling}if(!M)throw Error(r(189))}}if(d.alternate!==g)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:l}function m(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=m(o),l!==null)return l;o=o.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),C=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function I(o){return o===null||typeof o!="object"?null:(o=L&&o[L]||o["@@iterator"],typeof o=="function"?o:null)}var W=Symbol.for("react.client.reference");function $(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===W?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case x:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case N:return"Suspense";case T:return"SuspenseList";case D:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case C:return o.displayName||"Context";case O:return(o._context.displayName||"Context")+".Consumer";case A:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case P:return l=o.displayName||null,l!==null?l:$(o.type)||"Memo";case k:l=o._payload,o=o._init;try{return $(o(l))}catch{}}return null}var V=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},F=[],Y=-1;function B(o){return{current:o}}function z(o){0>Y||(o.current=F[Y],F[Y]=null,Y--)}function X(o,l){Y++,F[Y]=o.current,o.current=l}var Z=B(null),ee=B(null),se=B(null),ae=B(null);function re(o,l){switch(X(se,l),X(ee,o),X(Z,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?G2(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=G2(l),o=X2(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}z(Z),X(Z,o)}function J(){z(Z),z(ee),z(se)}function le(o){o.memoizedState!==null&&X(ae,o);var l=Z.current,d=X2(l,o.type);l!==d&&(X(ee,o),X(Z,d))}function me(o){ee.current===o&&(z(Z),z(ee)),ae.current===o&&(z(ae),Wd._currentValue=q)}var ne,ge;function ye(o){if(ne===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);ne=l&&l[1]||"",ge=-1<d.stack.indexOf(`
    at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ne+o+ge}var Ie=!1;function Me(o,l){if(!o||Ie)return"";Ie=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(de){var fe=de}Reflect.construct(o,[],ve)}else{try{ve.call()}catch(de){fe=de}o.call(ve.prototype)}}else{try{throw Error()}catch(de){fe=de}(ve=o())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(de){if(de&&fe&&typeof de.stack=="string")return[de.stack,fe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=g.DetermineComponentFrameRoot(),M=j[0],U=j[1];if(M&&U){var Q=M.split(`
`),ue=U.split(`
`);for(_=g=0;g<Q.length&&!Q[g].includes("DetermineComponentFrameRoot");)g++;for(;_<ue.length&&!ue[_].includes("DetermineComponentFrameRoot");)_++;if(g===Q.length||_===ue.length)for(g=Q.length-1,_=ue.length-1;1<=g&&0<=_&&Q[g]!==ue[_];)_--;for(;1<=g&&0<=_;g--,_--)if(Q[g]!==ue[_]){if(g!==1||_!==1)do if(g--,_--,0>_||Q[g]!==ue[_]){var he=`
`+Q[g].replace(" at new "," at ");return o.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",o.displayName)),he}while(1<=g&&0<=_);break}}}finally{Ie=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?ye(d):""}function Ke(o,l){switch(o.tag){case 26:case 27:case 5:return ye(o.type);case 16:return ye("Lazy");case 13:return o.child!==l&&l!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return Me(o.type,!1);case 11:return Me(o.type.render,!1);case 1:return Me(o.type,!0);case 31:return ye("Activity");default:return""}}function Gt(o){try{var l="",d=null;do l+=Ke(o,d),d=o,o=o.return;while(o);return l}catch(g){return`
Error generating stack: `+g.message+`
`+g.stack}}var ht=Object.prototype.hasOwnProperty,Qn=e.unstable_scheduleCallback,Sr=e.unstable_cancelCallback,Lt=e.unstable_shouldYield,we=e.unstable_requestPaint,lt=e.unstable_now,xn=e.unstable_getCurrentPriorityLevel,Zn=e.unstable_ImmediatePriority,ri=e.unstable_UserBlockingPriority,ai=e.unstable_NormalPriority,gl=e.unstable_LowPriority,zr=e.unstable_IdlePriority,Qc=e.log,ii=e.unstable_setDisableYieldValue,zi=null,Hn=null;function $r(o){if(typeof Qc=="function"&&ii(o),Hn&&typeof Hn.setStrictMode=="function")try{Hn.setStrictMode(zi,o)}catch{}}var Pn=Math.clz32?Math.clz32:ia,ld=Math.log,yl=Math.LN2;function ia(o){return o>>>=0,o===0?32:31-(ld(o)/yl|0)|0}var Go=256,Xo=262144,$i=4194304;function oa(o){var l=o&42;if(l!==0)return l;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Be(o,l,d){var g=o.pendingLanes;if(g===0)return 0;var _=0,j=o.suspendedLanes,M=o.pingedLanes;o=o.warmLanes;var U=g&134217727;return U!==0?(g=U&~j,g!==0?_=oa(g):(M&=U,M!==0?_=oa(M):d||(d=U&~o,d!==0&&(_=oa(d))))):(U=g&~j,U!==0?_=oa(U):M!==0?_=oa(M):d||(d=g&~o,d!==0&&(_=oa(d)))),_===0?0:l!==0&&l!==_&&(l&j)===0&&(j=_&-_,d=l&-l,j>=d||j===32&&(d&4194048)!==0)?l:_}function Nt(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function on(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Mn(){var o=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),o}function oi(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Mt(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Jn(o,l,d,g,_,j){var M=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var U=o.entanglements,Q=o.expirationTimes,ue=o.hiddenUpdates;for(d=M&~d;0<d;){var he=31-Pn(d),ve=1<<he;U[he]=0,Q[he]=-1;var fe=ue[he];if(fe!==null)for(ue[he]=null,he=0;he<fe.length;he++){var de=fe[he];de!==null&&(de.lane&=-536870913)}d&=~ve}g!==0&&Bi(o,g,0),j!==0&&_===0&&o.tag!==0&&(o.suspendedLanes|=j&~(M&~l))}function Bi(o,l,d){o.pendingLanes|=l,o.suspendedLanes&=~l;var g=31-Pn(l);o.entangledLanes|=l,o.entanglements[g]=o.entanglements[g]|1073741824|d&261930}function er(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var g=31-Pn(d),_=1<<g;_&l|o[g]&l&&(o[g]|=l),d&=~_}}function tr(o,l){var d=l&-l;return d=(d&42)!==0?1:Wo(d),(d&(o.suspendedLanes|l))!==0?0:d}function Wo(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Br(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function cd(){var o=H.p;return o!==0?o:(o=window.event,o===void 0?32:yP(o.type))}function ap(o,l){var d=H.p;try{return H.p=o,l()}finally{H.p=d}}var si=Math.random().toString(36).slice(2),wn="__reactFiber$"+si,nr="__reactProps$"+si,Ui="__reactContainer$"+si,Zc="__reactEvents$"+si,ip="__reactListeners$"+si,Eb="__reactHandles$"+si,op="__reactResources$"+si,bl="__reactMarker$"+si;function ud(o){delete o[wn],delete o[nr],delete o[Zc],delete o[ip],delete o[Eb]}function Qo(o){var l=o[wn];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Ui]||d[wn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=nP(o);o!==null;){if(d=o[wn])return d;o=nP(o)}return l}o=d,d=o.parentNode}return null}function Zo(o){if(o=o[wn]||o[Ui]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function Jo(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function es(o){var l=o[op];return l||(l=o[op]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function sn(o){o[bl]=!0}var sp=new Set,lp={};function Hi(o,l){ts(o,l),ts(o+"Capture",l)}function ts(o,l){for(lp[o]=l,o=0;o<l.length;o++)sp.add(l[o])}var _b=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]*$"),fd={},cp={};function jb(o){return ht.call(cp,o)?!0:ht.call(fd,o)?!1:_b.test(o)?cp[o]=!0:(fd[o]=!0,!1)}function Jc(o,l,d){if(jb(l))if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+d)}}function eu(o,l,d){if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+d)}}function Pa(o,l,d,g){if(g===null)o.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(l,d,""+g)}}function Er(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function up(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Cb(o,l,d){var g=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var _=g.get,j=g.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(M){d=""+M,j.call(this,M)}}),Object.defineProperty(o,l,{enumerable:g.enumerable}),{getValue:function(){return d},setValue:function(M){d=""+M},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ns(o){if(!o._valueTracker){var l=up(o)?"checked":"value";o._valueTracker=Cb(o,l,""+o[l])}}function fp(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return o&&(g=up(o)?o.checked?"true":"false":o.value),o=g,o!==d?(l.setValue(o),!0):!1}function xl(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Ob=/[\n"\\]/g;function _r(o){return o.replace(Ob,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function wl(o,l,d,g,_,j,M,U){o.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?o.type=M:o.removeAttribute("type"),l!=null?M==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Er(l)):o.value!==""+Er(l)&&(o.value=""+Er(l)):M!=="submit"&&M!=="reset"||o.removeAttribute("value"),l!=null?dd(o,M,Er(l)):d!=null?dd(o,M,Er(d)):g!=null&&o.removeAttribute("value"),_==null&&j!=null&&(o.defaultChecked=!!j),_!=null&&(o.checked=_&&typeof _!="function"&&typeof _!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?o.name=""+Er(U):o.removeAttribute("name")}function dp(o,l,d,g,_,j,M,U){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(o.type=j),l!=null||d!=null){if(!(j!=="submit"&&j!=="reset"||l!=null)){ns(o);return}d=d!=null?""+Er(d):"",l=l!=null?""+Er(l):d,U||l===o.value||(o.value=l),o.defaultValue=l}g=g??_,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=U?o.checked:!!g,o.defaultChecked=!!g,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(o.name=M),ns(o)}function dd(o,l,d){l==="number"&&xl(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function Fi(o,l,d,g){if(o=o.options,l){l={};for(var _=0;_<d.length;_++)l["$"+d[_]]=!0;for(d=0;d<o.length;d++)_=l.hasOwnProperty("$"+o[d].value),o[d].selected!==_&&(o[d].selected=_),_&&g&&(o[d].defaultSelected=!0)}else{for(d=""+Er(d),l=null,_=0;_<o.length;_++){if(o[_].value===d){o[_].selected=!0,g&&(o[_].defaultSelected=!0);return}l!==null||o[_].disabled||(l=o[_])}l!==null&&(l.selected=!0)}}function FA(o,l,d){if(l!=null&&(l=""+Er(l),l!==o.value&&(o.value=l),d==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=d!=null?""+Er(d):""}function qA(o,l,d,g){if(l==null){if(g!=null){if(d!=null)throw Error(r(92));if(V(g)){if(1<g.length)throw Error(r(93));g=g[0]}d=g}d==null&&(d=""),l=d}d=Er(l),o.defaultValue=d,g=o.textContent,g===d&&g!==""&&g!==null&&(o.value=g),ns(o)}function tu(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var L9=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 KA(o,l,d){var g=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":g?o.setProperty(l,d):typeof d!="number"||d===0||L9.has(l)?l==="float"?o.cssFloat=d:o[l]=(""+d).trim():o[l]=d+"px"}function VA(o,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?o.setProperty(g,""):g==="float"?o.cssFloat="":o[g]="");for(var _ in l)g=l[_],l.hasOwnProperty(_)&&d[_]!==g&&KA(o,_,g)}else for(var j in l)l.hasOwnProperty(j)&&KA(o,j,l[j])}function Ab(o){if(o.indexOf("-")===-1)return!1;switch(o){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 z9=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"]]),$9=/^[\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 hp(o){return $9.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function qi(){}var Nb=null;function Tb(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var nu=null,ru=null;function YA(o){var l=Zo(o);if(l&&(o=l.stateNode)){var d=o[nr]||null;e:switch(o=l.stateNode,l.type){case"input":if(wl(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+_r(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var g=d[l];if(g!==o&&g.form===o.form){var _=g[nr]||null;if(!_)throw Error(r(90));wl(g,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(l=0;l<d.length;l++)g=d[l],g.form===o.form&&fp(g)}break e;case"textarea":FA(o,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&Fi(o,!!d.multiple,l,!1)}}}var Pb=!1;function GA(o,l,d){if(Pb)return o(l,d);Pb=!0;try{var g=o(l);return g}finally{if(Pb=!1,(nu!==null||ru!==null)&&(ev(),nu&&(l=nu,o=ru,ru=nu=null,YA(l),o)))for(l=0;l<o.length;l++)YA(o[l])}}function hd(o,l){var d=o.stateNode;if(d===null)return null;var g=d[nr]||null;if(g===null)return null;d=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mb=!1;if(Ki)try{var md={};Object.defineProperty(md,"passive",{get:function(){Mb=!0}}),window.addEventListener("test",md,md),window.removeEventListener("test",md,md)}catch{Mb=!1}var rs=null,Rb=null,mp=null;function XA(){if(mp)return mp;var o,l=Rb,d=l.length,g,_="value"in rs?rs.value:rs.textContent,j=_.length;for(o=0;o<d&&l[o]===_[o];o++);var M=d-o;for(g=1;g<=M&&l[d-g]===_[j-g];g++);return mp=_.slice(o,1<g?1-g:void 0)}function pp(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function vp(){return!0}function WA(){return!1}function jr(o){function l(d,g,_,j,M){this._reactName=d,this._targetInst=_,this.type=g,this.nativeEvent=j,this.target=M,this.currentTarget=null;for(var U in o)o.hasOwnProperty(U)&&(d=o[U],this[U]=d?d(j):j[U]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?vp:WA,this.isPropagationStopped=WA,this}return h(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=vp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=vp)},persist:function(){},isPersistent:vp}),l}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gp=jr(Sl),pd=h({},Sl,{view:0,detail:0}),B9=jr(pd),kb,Db,vd,yp=h({},pd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lb,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==vd&&(vd&&o.type==="mousemove"?(kb=o.screenX-vd.screenX,Db=o.screenY-vd.screenY):Db=kb=0,vd=o),kb)},movementY:function(o){return"movementY"in o?o.movementY:Db}}),QA=jr(yp),U9=h({},yp,{dataTransfer:0}),H9=jr(U9),F9=h({},pd,{relatedTarget:0}),Ib=jr(F9),q9=h({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),K9=jr(q9),V9=h({},Sl,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Y9=jr(V9),G9=h({},Sl,{data:0}),ZA=jr(G9),X9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W9={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"},Q9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z9(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=Q9[o])?!!l[o]:!1}function Lb(){return Z9}var J9=h({},pd,{key:function(o){if(o.key){var l=X9[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=pp(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?W9[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lb,charCode:function(o){return o.type==="keypress"?pp(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?pp(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),e7=jr(J9),t7=h({},yp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JA=jr(t7),n7=h({},pd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lb}),r7=jr(n7),a7=h({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),i7=jr(a7),o7=h({},yp,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),s7=jr(o7),l7=h({},Sl,{newState:0,oldState:0}),c7=jr(l7),u7=[9,13,27,32],zb=Ki&&"CompositionEvent"in window,gd=null;Ki&&"documentMode"in document&&(gd=document.documentMode);var f7=Ki&&"TextEvent"in window&&!gd,eN=Ki&&(!zb||gd&&8<gd&&11>=gd),tN=" ",nN=!1;function rN(o,l){switch(o){case"keyup":return u7.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aN(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var au=!1;function d7(o,l){switch(o){case"compositionend":return aN(l);case"keypress":return l.which!==32?null:(nN=!0,tN);case"textInput":return o=l.data,o===tN&&nN?null:o;default:return null}}function h7(o,l){if(au)return o==="compositionend"||!zb&&rN(o,l)?(o=XA(),mp=Rb=rs=null,au=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return eN&&l.locale!=="ko"?null:l.data;default:return null}}var m7={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 iN(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!m7[o.type]:l==="textarea"}function oN(o,l,d,g){nu?ru?ru.push(g):ru=[g]:nu=g,l=sv(l,"onChange"),0<l.length&&(d=new gp("onChange","change",null,d,g),o.push({event:d,listeners:l}))}var yd=null,bd=null;function p7(o){H2(o,0)}function bp(o){var l=Jo(o);if(fp(l))return o}function sN(o,l){if(o==="change")return l}var lN=!1;if(Ki){var $b;if(Ki){var Bb="oninput"in document;if(!Bb){var cN=document.createElement("div");cN.setAttribute("oninput","return;"),Bb=typeof cN.oninput=="function"}$b=Bb}else $b=!1;lN=$b&&(!document.documentMode||9<document.documentMode)}function uN(){yd&&(yd.detachEvent("onpropertychange",fN),bd=yd=null)}function fN(o){if(o.propertyName==="value"&&bp(bd)){var l=[];oN(l,bd,o,Tb(o)),GA(p7,l)}}function v7(o,l,d){o==="focusin"?(uN(),yd=l,bd=d,yd.attachEvent("onpropertychange",fN)):o==="focusout"&&uN()}function g7(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return bp(bd)}function y7(o,l){if(o==="click")return bp(l)}function b7(o,l){if(o==="input"||o==="change")return bp(l)}function x7(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Ur=typeof Object.is=="function"?Object.is:x7;function xd(o,l){if(Ur(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),g=Object.keys(l);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var _=d[g];if(!ht.call(l,_)||!Ur(o[_],l[_]))return!1}return!0}function dN(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function hN(o,l){var d=dN(o);o=0;for(var g;d;){if(d.nodeType===3){if(g=o+d.textContent.length,o<=l&&g>=l)return{node:d,offset:l-o};o=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=dN(d)}}function mN(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?mN(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function pN(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=xl(o.document);l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=xl(o.document)}return l}function Ub(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var w7=Ki&&"documentMode"in document&&11>=document.documentMode,iu=null,Hb=null,wd=null,Fb=!1;function vN(o,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Fb||iu==null||iu!==xl(g)||(g=iu,"selectionStart"in g&&Ub(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),wd&&xd(wd,g)||(wd=g,g=sv(Hb,"onSelect"),0<g.length&&(l=new gp("onSelect","select",null,l,d),o.push({event:l,listeners:g}),l.target=iu)))}function El(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var ou={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionrun:El("Transition","TransitionRun"),transitionstart:El("Transition","TransitionStart"),transitioncancel:El("Transition","TransitionCancel"),transitionend:El("Transition","TransitionEnd")},qb={},gN={};Ki&&(gN=document.createElement("div").style,"AnimationEvent"in window||(delete ou.animationend.animation,delete ou.animationiteration.animation,delete ou.animationstart.animation),"TransitionEvent"in window||delete ou.transitionend.transition);function _l(o){if(qb[o])return qb[o];if(!ou[o])return o;var l=ou[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in gN)return qb[o]=l[d];return o}var yN=_l("animationend"),bN=_l("animationiteration"),xN=_l("animationstart"),S7=_l("transitionrun"),E7=_l("transitionstart"),_7=_l("transitioncancel"),wN=_l("transitionend"),SN=new Map,Kb="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(" ");Kb.push("scrollEnd");function Ma(o,l){SN.set(o,l),Hi(l,[o])}var xp=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},sa=[],su=0,Vb=0;function wp(){for(var o=su,l=Vb=su=0;l<o;){var d=sa[l];sa[l++]=null;var g=sa[l];sa[l++]=null;var _=sa[l];sa[l++]=null;var j=sa[l];if(sa[l++]=null,g!==null&&_!==null){var M=g.pending;M===null?_.next=_:(_.next=M.next,M.next=_),g.pending=_}j!==0&&EN(d,_,j)}}function Sp(o,l,d,g){sa[su++]=o,sa[su++]=l,sa[su++]=d,sa[su++]=g,Vb|=g,o.lanes|=g,o=o.alternate,o!==null&&(o.lanes|=g)}function Yb(o,l,d,g){return Sp(o,l,d,g),Ep(o)}function jl(o,l){return Sp(o,null,null,l),Ep(o)}function EN(o,l,d){o.lanes|=d;var g=o.alternate;g!==null&&(g.lanes|=d);for(var _=!1,j=o.return;j!==null;)j.childLanes|=d,g=j.alternate,g!==null&&(g.childLanes|=d),j.tag===22&&(o=j.stateNode,o===null||o._visibility&1||(_=!0)),o=j,j=j.return;return o.tag===3?(j=o.stateNode,_&&l!==null&&(_=31-Pn(d),o=j.hiddenUpdates,g=o[_],g===null?o[_]=[l]:g.push(l),l.lane=d|536870912),j):null}function Ep(o){if(50<Fd)throw Fd=0,nw=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var lu={};function j7(o,l,d,g){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hr(o,l,d,g){return new j7(o,l,d,g)}function Gb(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Vi(o,l){var d=o.alternate;return d===null?(d=Hr(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function _N(o,l){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,l=d.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function _p(o,l,d,g,_,j){var M=0;if(g=o,typeof o=="function")Gb(o)&&(M=1);else if(typeof o=="string")M=TK(o,d,Z.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case D:return o=Hr(31,d,l,_),o.elementType=D,o.lanes=j,o;case x:return Cl(d.children,_,j,l);case S:M=8,_|=24;break;case E:return o=Hr(12,d,l,_|2),o.elementType=E,o.lanes=j,o;case N:return o=Hr(13,d,l,_),o.elementType=N,o.lanes=j,o;case T:return o=Hr(19,d,l,_),o.elementType=T,o.lanes=j,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case C:M=10;break e;case O:M=9;break e;case A:M=11;break e;case P:M=14;break e;case k:M=16,g=null;break e}M=29,d=Error(r(130,o===null?"null":typeof o,"")),g=null}return l=Hr(M,d,l,_),l.elementType=o,l.type=g,l.lanes=j,l}function Cl(o,l,d,g){return o=Hr(7,o,g,l),o.lanes=d,o}function Xb(o,l,d){return o=Hr(6,o,null,l),o.lanes=d,o}function jN(o){var l=Hr(18,null,null,0);return l.stateNode=o,l}function Wb(o,l,d){return l=Hr(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var CN=new WeakMap;function la(o,l){if(typeof o=="object"&&o!==null){var d=CN.get(o);return d!==void 0?d:(l={value:o,source:l,stack:Gt(l)},CN.set(o,l),l)}return{value:o,source:l,stack:Gt(l)}}var cu=[],uu=0,jp=null,Sd=0,ca=[],ua=0,as=null,li=1,ci="";function Yi(o,l){cu[uu++]=Sd,cu[uu++]=jp,jp=o,Sd=l}function ON(o,l,d){ca[ua++]=li,ca[ua++]=ci,ca[ua++]=as,as=o;var g=li;o=ci;var _=32-Pn(g)-1;g&=~(1<<_),d+=1;var j=32-Pn(l)+_;if(30<j){var M=_-_%5;j=(g&(1<<M)-1).toString(32),g>>=M,_-=M,li=1<<32-Pn(l)+_|d<<_|g,ci=j+o}else li=1<<j|d<<_|g,ci=o}function Qb(o){o.return!==null&&(Yi(o,1),ON(o,1,0))}function Zb(o){for(;o===jp;)jp=cu[--uu],cu[uu]=null,Sd=cu[--uu],cu[uu]=null;for(;o===as;)as=ca[--ua],ca[ua]=null,ci=ca[--ua],ca[ua]=null,li=ca[--ua],ca[ua]=null}function AN(o,l){ca[ua++]=li,ca[ua++]=ci,ca[ua++]=as,li=l.id,ci=l.overflow,as=o}var Fn=null,Rt=null,nt=!1,is=null,fa=!1,Jb=Error(r(519));function os(o){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ed(la(l,o)),Jb}function NN(o){var l=o.stateNode,d=o.type,g=o.memoizedProps;switch(l[wn]=o,l[nr]=g,d){case"dialog":Ze("cancel",l),Ze("close",l);break;case"iframe":case"object":case"embed":Ze("load",l);break;case"video":case"audio":for(d=0;d<Kd.length;d++)Ze(Kd[d],l);break;case"source":Ze("error",l);break;case"img":case"image":case"link":Ze("error",l),Ze("load",l);break;case"details":Ze("toggle",l);break;case"input":Ze("invalid",l),dp(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":Ze("invalid",l);break;case"textarea":Ze("invalid",l),qA(l,g.value,g.defaultValue,g.children)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||g.suppressHydrationWarning===!0||V2(l.textContent,d)?(g.popover!=null&&(Ze("beforetoggle",l),Ze("toggle",l)),g.onScroll!=null&&Ze("scroll",l),g.onScrollEnd!=null&&Ze("scrollend",l),g.onClick!=null&&(l.onclick=qi),l=!0):l=!1,l||os(o,!0)}function TN(o){for(Fn=o.return;Fn;)switch(Fn.tag){case 5:case 31:case 13:fa=!1;return;case 27:case 3:fa=!0;return;default:Fn=Fn.return}}function fu(o){if(o!==Fn)return!1;if(!nt)return TN(o),nt=!0,!1;var l=o.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||gw(o.type,o.memoizedProps)),d=!d),d&&Rt&&os(o),TN(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Rt=tP(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Rt=tP(o)}else l===27?(l=Rt,xs(o.type)?(o=Sw,Sw=null,Rt=o):Rt=l):Rt=Fn?ha(o.stateNode.nextSibling):null;return!0}function Ol(){Rt=Fn=null,nt=!1}function ex(){var o=is;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),is=null),o}function Ed(o){is===null?is=[o]:is.push(o)}var tx=B(null),Al=null,Gi=null;function ss(o,l,d){X(tx,l._currentValue),l._currentValue=d}function Xi(o){o._currentValue=tx.current,z(tx)}function nx(o,l,d){for(;o!==null;){var g=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),o===d)break;o=o.return}}function rx(o,l,d,g){var _=o.child;for(_!==null&&(_.return=o);_!==null;){var j=_.dependencies;if(j!==null){var M=_.child;j=j.firstContext;e:for(;j!==null;){var U=j;j=_;for(var Q=0;Q<l.length;Q++)if(U.context===l[Q]){j.lanes|=d,U=j.alternate,U!==null&&(U.lanes|=d),nx(j.return,d,o),g||(M=null);break e}j=U.next}}else if(_.tag===18){if(M=_.return,M===null)throw Error(r(341));M.lanes|=d,j=M.alternate,j!==null&&(j.lanes|=d),nx(M,d,o),M=null}else M=_.child;if(M!==null)M.return=_;else for(M=_;M!==null;){if(M===o){M=null;break}if(_=M.sibling,_!==null){_.return=M.return,M=_;break}M=M.return}_=M}}function du(o,l,d,g){o=null;for(var _=l,j=!1;_!==null;){if(!j){if((_.flags&524288)!==0)j=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var M=_.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var U=_.type;Ur(_.pendingProps.value,M.value)||(o!==null?o.push(U):o=[U])}}else if(_===ae.current){if(M=_.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(o!==null?o.push(Wd):o=[Wd])}_=_.return}o!==null&&rx(l,o,d,g),l.flags|=262144}function Cp(o){for(o=o.firstContext;o!==null;){if(!Ur(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Nl(o){Al=o,Gi=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function qn(o){return PN(Al,o)}function Op(o,l){return Al===null&&Nl(o),PN(o,l)}function PN(o,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Gi===null){if(o===null)throw Error(r(308));Gi=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else Gi=Gi.next=l;return d}var C7=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(d,g){o.push(g)}};this.abort=function(){l.aborted=!0,o.forEach(function(d){return d()})}},O7=e.unstable_scheduleCallback,A7=e.unstable_NormalPriority,ln={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ax(){return{controller:new C7,data:new Map,refCount:0}}function _d(o){o.refCount--,o.refCount===0&&O7(A7,function(){o.controller.abort()})}var jd=null,ix=0,hu=0,mu=null;function N7(o,l){if(jd===null){var d=jd=[];ix=0,hu=lw(),mu={status:"pending",value:void 0,then:function(g){d.push(g)}}}return ix++,l.then(MN,MN),l}function MN(){if(--ix===0&&jd!==null){mu!==null&&(mu.status="fulfilled");var o=jd;jd=null,hu=0,mu=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function T7(o,l){var d=[],g={status:"pending",value:null,reason:null,then:function(_){d.push(_)}};return o.then(function(){g.status="fulfilled",g.value=l;for(var _=0;_<d.length;_++)(0,d[_])(l)},function(_){for(g.status="rejected",g.reason=_,_=0;_<d.length;_++)(0,d[_])(void 0)}),g}var RN=R.S;R.S=function(o,l){v2=lt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&N7(o,l),RN!==null&&RN(o,l)};var Tl=B(null);function ox(){var o=Tl.current;return o!==null?o:Ot.pooledCache}function Ap(o,l){l===null?X(Tl,Tl.current):X(Tl,l.pool)}function kN(){var o=ox();return o===null?null:{parent:ln._currentValue,pool:o}}var pu=Error(r(460)),sx=Error(r(474)),Np=Error(r(542)),Tp={then:function(){}};function DN(o){return o=o.status,o==="fulfilled"||o==="rejected"}function IN(o,l,d){switch(d=o[d],d===void 0?o.push(l):d!==l&&(l.then(qi,qi),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,zN(o),o;default:if(typeof l.status=="string")l.then(qi,qi);else{if(o=Ot,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.then(function(g){if(l.status==="pending"){var _=l;_.status="fulfilled",_.value=g}},function(g){if(l.status==="pending"){var _=l;_.status="rejected",_.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,zN(o),o}throw Ml=l,pu}}function Pl(o){try{var l=o._init;return l(o._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ml=d,pu):d}}var Ml=null;function LN(){if(Ml===null)throw Error(r(459));var o=Ml;return Ml=null,o}function zN(o){if(o===pu||o===Np)throw Error(r(483))}var vu=null,Cd=0;function Pp(o){var l=Cd;return Cd+=1,vu===null&&(vu=[]),IN(vu,o,l)}function Od(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Mp(o,l){throw l.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function $N(o){function l(ie,te){if(o){var ce=ie.deletions;ce===null?(ie.deletions=[te],ie.flags|=16):ce.push(te)}}function d(ie,te){if(!o)return null;for(;te!==null;)l(ie,te),te=te.sibling;return null}function g(ie){for(var te=new Map;ie!==null;)ie.key!==null?te.set(ie.key,ie):te.set(ie.index,ie),ie=ie.sibling;return te}function _(ie,te){return ie=Vi(ie,te),ie.index=0,ie.sibling=null,ie}function j(ie,te,ce){return ie.index=ce,o?(ce=ie.alternate,ce!==null?(ce=ce.index,ce<te?(ie.flags|=67108866,te):ce):(ie.flags|=67108866,te)):(ie.flags|=1048576,te)}function M(ie){return o&&ie.alternate===null&&(ie.flags|=67108866),ie}function U(ie,te,ce,pe){return te===null||te.tag!==6?(te=Xb(ce,ie.mode,pe),te.return=ie,te):(te=_(te,ce),te.return=ie,te)}function Q(ie,te,ce,pe){var Le=ce.type;return Le===x?he(ie,te,ce.props.children,pe,ce.key):te!==null&&(te.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===k&&Pl(Le)===te.type)?(te=_(te,ce.props),Od(te,ce),te.return=ie,te):(te=_p(ce.type,ce.key,ce.props,null,ie.mode,pe),Od(te,ce),te.return=ie,te)}function ue(ie,te,ce,pe){return te===null||te.tag!==4||te.stateNode.containerInfo!==ce.containerInfo||te.stateNode.implementation!==ce.implementation?(te=Wb(ce,ie.mode,pe),te.return=ie,te):(te=_(te,ce.children||[]),te.return=ie,te)}function he(ie,te,ce,pe,Le){return te===null||te.tag!==7?(te=Cl(ce,ie.mode,pe,Le),te.return=ie,te):(te=_(te,ce),te.return=ie,te)}function ve(ie,te,ce){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Xb(""+te,ie.mode,ce),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return ce=_p(te.type,te.key,te.props,null,ie.mode,ce),Od(ce,te),ce.return=ie,ce;case w:return te=Wb(te,ie.mode,ce),te.return=ie,te;case k:return te=Pl(te),ve(ie,te,ce)}if(V(te)||I(te))return te=Cl(te,ie.mode,ce,null),te.return=ie,te;if(typeof te.then=="function")return ve(ie,Pp(te),ce);if(te.$$typeof===C)return ve(ie,Op(ie,te),ce);Mp(ie,te)}return null}function fe(ie,te,ce,pe){var Le=te!==null?te.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Le!==null?null:U(ie,te,""+ce,pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===Le?Q(ie,te,ce,pe):null;case w:return ce.key===Le?ue(ie,te,ce,pe):null;case k:return ce=Pl(ce),fe(ie,te,ce,pe)}if(V(ce)||I(ce))return Le!==null?null:he(ie,te,ce,pe,null);if(typeof ce.then=="function")return fe(ie,te,Pp(ce),pe);if(ce.$$typeof===C)return fe(ie,te,Op(ie,ce),pe);Mp(ie,ce)}return null}function de(ie,te,ce,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ie=ie.get(ce)||null,U(te,ie,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return ie=ie.get(pe.key===null?ce:pe.key)||null,Q(te,ie,pe,Le);case w:return ie=ie.get(pe.key===null?ce:pe.key)||null,ue(te,ie,pe,Le);case k:return pe=Pl(pe),de(ie,te,ce,pe,Le)}if(V(pe)||I(pe))return ie=ie.get(ce)||null,he(te,ie,pe,Le,null);if(typeof pe.then=="function")return de(ie,te,ce,Pp(pe),Le);if(pe.$$typeof===C)return de(ie,te,ce,Op(te,pe),Le);Mp(te,pe)}return null}function Ae(ie,te,ce,pe){for(var Le=null,ct=null,Re=te,Ve=te=0,et=null;Re!==null&&Ve<ce.length;Ve++){Re.index>Ve?(et=Re,Re=null):et=Re.sibling;var ut=fe(ie,Re,ce[Ve],pe);if(ut===null){Re===null&&(Re=et);break}o&&Re&&ut.alternate===null&&l(ie,Re),te=j(ut,te,Ve),ct===null?Le=ut:ct.sibling=ut,ct=ut,Re=et}if(Ve===ce.length)return d(ie,Re),nt&&Yi(ie,Ve),Le;if(Re===null){for(;Ve<ce.length;Ve++)Re=ve(ie,ce[Ve],pe),Re!==null&&(te=j(Re,te,Ve),ct===null?Le=Re:ct.sibling=Re,ct=Re);return nt&&Yi(ie,Ve),Le}for(Re=g(Re);Ve<ce.length;Ve++)et=de(Re,ie,Ve,ce[Ve],pe),et!==null&&(o&&et.alternate!==null&&Re.delete(et.key===null?Ve:et.key),te=j(et,te,Ve),ct===null?Le=et:ct.sibling=et,ct=et);return o&&Re.forEach(function(js){return l(ie,js)}),nt&&Yi(ie,Ve),Le}function ze(ie,te,ce,pe){if(ce==null)throw Error(r(151));for(var Le=null,ct=null,Re=te,Ve=te=0,et=null,ut=ce.next();Re!==null&&!ut.done;Ve++,ut=ce.next()){Re.index>Ve?(et=Re,Re=null):et=Re.sibling;var js=fe(ie,Re,ut.value,pe);if(js===null){Re===null&&(Re=et);break}o&&Re&&js.alternate===null&&l(ie,Re),te=j(js,te,Ve),ct===null?Le=js:ct.sibling=js,ct=js,Re=et}if(ut.done)return d(ie,Re),nt&&Yi(ie,Ve),Le;if(Re===null){for(;!ut.done;Ve++,ut=ce.next())ut=ve(ie,ut.value,pe),ut!==null&&(te=j(ut,te,Ve),ct===null?Le=ut:ct.sibling=ut,ct=ut);return nt&&Yi(ie,Ve),Le}for(Re=g(Re);!ut.done;Ve++,ut=ce.next())ut=de(Re,ie,Ve,ut.value,pe),ut!==null&&(o&&ut.alternate!==null&&Re.delete(ut.key===null?Ve:ut.key),te=j(ut,te,Ve),ct===null?Le=ut:ct.sibling=ut,ct=ut);return o&&Re.forEach(function(UK){return l(ie,UK)}),nt&&Yi(ie,Ve),Le}function wt(ie,te,ce,pe){if(typeof ce=="object"&&ce!==null&&ce.type===x&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var Le=ce.key;te!==null;){if(te.key===Le){if(Le=ce.type,Le===x){if(te.tag===7){d(ie,te.sibling),pe=_(te,ce.props.children),pe.return=ie,ie=pe;break e}}else if(te.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===k&&Pl(Le)===te.type){d(ie,te.sibling),pe=_(te,ce.props),Od(pe,ce),pe.return=ie,ie=pe;break e}d(ie,te);break}else l(ie,te);te=te.sibling}ce.type===x?(pe=Cl(ce.props.children,ie.mode,pe,ce.key),pe.return=ie,ie=pe):(pe=_p(ce.type,ce.key,ce.props,null,ie.mode,pe),Od(pe,ce),pe.return=ie,ie=pe)}return M(ie);case w:e:{for(Le=ce.key;te!==null;){if(te.key===Le)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){d(ie,te.sibling),pe=_(te,ce.children||[]),pe.return=ie,ie=pe;break e}else{d(ie,te);break}else l(ie,te);te=te.sibling}pe=Wb(ce,ie.mode,pe),pe.return=ie,ie=pe}return M(ie);case k:return ce=Pl(ce),wt(ie,te,ce,pe)}if(V(ce))return Ae(ie,te,ce,pe);if(I(ce)){if(Le=I(ce),typeof Le!="function")throw Error(r(150));return ce=Le.call(ce),ze(ie,te,ce,pe)}if(typeof ce.then=="function")return wt(ie,te,Pp(ce),pe);if(ce.$$typeof===C)return wt(ie,te,Op(ie,ce),pe);Mp(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(d(ie,te.sibling),pe=_(te,ce),pe.return=ie,ie=pe):(d(ie,te),pe=Xb(ce,ie.mode,pe),pe.return=ie,ie=pe),M(ie)):d(ie,te)}return function(ie,te,ce,pe){try{Cd=0;var Le=wt(ie,te,ce,pe);return vu=null,Le}catch(Re){if(Re===pu||Re===Np)throw Re;var ct=Hr(29,Re,null,ie.mode);return ct.lanes=pe,ct.return=ie,ct}finally{}}}var Rl=$N(!0),BN=$N(!1),ls=!1;function lx(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cx(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function cs(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function us(o,l,d){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(mt&2)!==0){var _=g.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),g.pending=l,l=Ep(o),EN(o,null,d),l}return Sp(o,g,l,d),Ep(o)}function Ad(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var g=l.lanes;g&=o.pendingLanes,d|=g,l.lanes=d,er(o,d)}}function ux(o,l){var d=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var _=null,j=null;if(d=d.firstBaseUpdate,d!==null){do{var M={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};j===null?_=j=M:j=j.next=M,d=d.next}while(d!==null);j===null?_=j=l:j=j.next=l}else _=j=l;d={baseState:g.baseState,firstBaseUpdate:_,lastBaseUpdate:j,shared:g.shared,callbacks:g.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}var fx=!1;function Nd(){if(fx){var o=mu;if(o!==null)throw o}}function Td(o,l,d,g){fx=!1;var _=o.updateQueue;ls=!1;var j=_.firstBaseUpdate,M=_.lastBaseUpdate,U=_.shared.pending;if(U!==null){_.shared.pending=null;var Q=U,ue=Q.next;Q.next=null,M===null?j=ue:M.next=ue,M=Q;var he=o.alternate;he!==null&&(he=he.updateQueue,U=he.lastBaseUpdate,U!==M&&(U===null?he.firstBaseUpdate=ue:U.next=ue,he.lastBaseUpdate=Q))}if(j!==null){var ve=_.baseState;M=0,he=ue=Q=null,U=j;do{var fe=U.lane&-536870913,de=fe!==U.lane;if(de?(Je&fe)===fe:(g&fe)===fe){fe!==0&&fe===hu&&(fx=!0),he!==null&&(he=he.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Ae=o,ze=U;fe=l;var wt=d;switch(ze.tag){case 1:if(Ae=ze.payload,typeof Ae=="function"){ve=Ae.call(wt,ve,fe);break e}ve=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ze.payload,fe=typeof Ae=="function"?Ae.call(wt,ve,fe):Ae,fe==null)break e;ve=h({},ve,fe);break e;case 2:ls=!0}}fe=U.callback,fe!==null&&(o.flags|=64,de&&(o.flags|=8192),de=_.callbacks,de===null?_.callbacks=[fe]:de.push(fe))}else de={lane:fe,tag:U.tag,payload:U.payload,callback:U.callback,next:null},he===null?(ue=he=de,Q=ve):he=he.next=de,M|=fe;if(U=U.next,U===null){if(U=_.shared.pending,U===null)break;de=U,U=de.next,de.next=null,_.lastBaseUpdate=de,_.shared.pending=null}}while(!0);he===null&&(Q=ve),_.baseState=Q,_.firstBaseUpdate=ue,_.lastBaseUpdate=he,j===null&&(_.shared.lanes=0),ps|=M,o.lanes=M,o.memoizedState=ve}}function UN(o,l){if(typeof o!="function")throw Error(r(191,o));o.call(l)}function HN(o,l){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)UN(d[o],l)}var gu=B(null),Rp=B(0);function FN(o,l){o=ao,X(Rp,o),X(gu,l),ao=o|l.baseLanes}function dx(){X(Rp,ao),X(gu,gu.current)}function hx(){ao=Rp.current,z(gu),z(Rp)}var Fr=B(null),da=null;function fs(o){var l=o.alternate;X(rn,rn.current&1),X(Fr,o),da===null&&(l===null||gu.current!==null||l.memoizedState!==null)&&(da=o)}function mx(o){X(rn,rn.current),X(Fr,o),da===null&&(da=o)}function qN(o){o.tag===22?(X(rn,rn.current),X(Fr,o),da===null&&(da=o)):ds()}function ds(){X(rn,rn.current),X(Fr,Fr.current)}function qr(o){z(Fr),da===o&&(da=null),z(rn)}var rn=B(0);function kp(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||xw(d)||ww(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Wi=0,qe=null,bt=null,cn=null,Dp=!1,yu=!1,kl=!1,Ip=0,Pd=0,bu=null,P7=0;function Xt(){throw Error(r(321))}function px(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!Ur(o[d],l[d]))return!1;return!0}function vx(o,l,d,g,_,j){return Wi=j,qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,R.H=o===null||o.memoizedState===null?OT:Px,kl=!1,j=d(g,_),kl=!1,yu&&(j=VN(l,d,g,_)),KN(o),j}function KN(o){R.H=kd;var l=bt!==null&&bt.next!==null;if(Wi=0,cn=bt=qe=null,Dp=!1,Pd=0,bu=null,l)throw Error(r(300));o===null||un||(o=o.dependencies,o!==null&&Cp(o)&&(un=!0))}function VN(o,l,d,g){qe=o;var _=0;do{if(yu&&(bu=null),Pd=0,yu=!1,25<=_)throw Error(r(301));if(_+=1,cn=bt=null,o.updateQueue!=null){var j=o.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}R.H=AT,j=l(d,g)}while(yu);return j}function M7(){var o=R.H,l=o.useState()[0];return l=typeof l.then=="function"?Md(l):l,o=o.useState()[0],(bt!==null?bt.memoizedState:null)!==o&&(qe.flags|=1024),l}function gx(){var o=Ip!==0;return Ip=0,o}function yx(o,l,d){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~d}function bx(o){if(Dp){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Dp=!1}Wi=0,cn=bt=qe=null,yu=!1,Pd=Ip=0,bu=null}function pr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cn===null?qe.memoizedState=cn=o:cn=cn.next=o,cn}function an(){if(bt===null){var o=qe.alternate;o=o!==null?o.memoizedState:null}else o=bt.next;var l=cn===null?qe.memoizedState:cn.next;if(l!==null)cn=l,bt=o;else{if(o===null)throw qe.alternate===null?Error(r(467)):Error(r(310));bt=o,o={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},cn===null?qe.memoizedState=cn=o:cn=cn.next=o}return cn}function Lp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Md(o){var l=Pd;return Pd+=1,bu===null&&(bu=[]),o=IN(bu,o,l),l=qe,(cn===null?l.memoizedState:cn.next)===null&&(l=l.alternate,R.H=l===null||l.memoizedState===null?OT:Px),o}function zp(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Md(o);if(o.$$typeof===C)return qn(o)}throw Error(r(438,String(o)))}function xx(o){var l=null,d=qe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var g=qe.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(_){return _.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Lp(),qe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(o),g=0;g<o;g++)d[g]=K;return l.index++,d}function Qi(o,l){return typeof l=="function"?l(o):l}function $p(o){var l=an();return wx(l,bt,o)}function wx(o,l,d){var g=o.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=d;var _=o.baseQueue,j=g.pending;if(j!==null){if(_!==null){var M=_.next;_.next=j.next,j.next=M}l.baseQueue=_=j,g.pending=null}if(j=o.baseState,_===null)o.memoizedState=j;else{l=_.next;var U=M=null,Q=null,ue=l,he=!1;do{var ve=ue.lane&-536870913;if(ve!==ue.lane?(Je&ve)===ve:(Wi&ve)===ve){var fe=ue.revertLane;if(fe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),ve===hu&&(he=!0);else if((Wi&fe)===fe){ue=ue.next,fe===hu&&(he=!0);continue}else ve={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(U=Q=ve,M=j):Q=Q.next=ve,qe.lanes|=fe,ps|=fe;ve=ue.action,kl&&d(j,ve),j=ue.hasEagerState?ue.eagerState:d(j,ve)}else fe={lane:ve,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(U=Q=fe,M=j):Q=Q.next=fe,qe.lanes|=ve,ps|=ve;ue=ue.next}while(ue!==null&&ue!==l);if(Q===null?M=j:Q.next=U,!Ur(j,o.memoizedState)&&(un=!0,he&&(d=mu,d!==null)))throw d;o.memoizedState=j,o.baseState=M,o.baseQueue=Q,g.lastRenderedState=j}return _===null&&(g.lanes=0),[o.memoizedState,g.dispatch]}function Sx(o){var l=an(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var g=d.dispatch,_=d.pending,j=l.memoizedState;if(_!==null){d.pending=null;var M=_=_.next;do j=o(j,M.action),M=M.next;while(M!==_);Ur(j,l.memoizedState)||(un=!0),l.memoizedState=j,l.baseQueue===null&&(l.baseState=j),d.lastRenderedState=j}return[j,g]}function YN(o,l,d){var g=qe,_=an(),j=nt;if(j){if(d===void 0)throw Error(r(407));d=d()}else d=l();var M=!Ur((bt||_).memoizedState,d);if(M&&(_.memoizedState=d,un=!0),_=_.queue,jx(WN.bind(null,g,_,o),[o]),_.getSnapshot!==l||M||cn!==null&&cn.memoizedState.tag&1){if(g.flags|=2048,xu(9,{destroy:void 0},XN.bind(null,g,_,d,l),null),Ot===null)throw Error(r(349));j||(Wi&127)!==0||GN(g,l,d)}return d}function GN(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=qe.updateQueue,l===null?(l=Lp(),qe.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function XN(o,l,d,g){l.value=d,l.getSnapshot=g,QN(l)&&ZN(o)}function WN(o,l,d){return d(function(){QN(l)&&ZN(o)})}function QN(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!Ur(o,d)}catch{return!0}}function ZN(o){var l=jl(o,2);l!==null&&Tr(l,o,2)}function Ex(o){var l=pr();if(typeof o=="function"){var d=o;if(o=d(),kl){$r(!0);try{d()}finally{$r(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:o},l}function JN(o,l,d,g){return o.baseState=d,wx(o,bt,typeof g=="function"?g:Qi)}function R7(o,l,d,g,_){if(Hp(o))throw Error(r(485));if(o=l.action,o!==null){var j={payload:_,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){j.listeners.push(M)}};R.T!==null?d(!0):j.isTransition=!1,g(j),d=l.pending,d===null?(j.next=l.pending=j,eT(l,j)):(j.next=d.next,l.pending=d.next=j)}}function eT(o,l){var d=l.action,g=l.payload,_=o.state;if(l.isTransition){var j=R.T,M={};R.T=M;try{var U=d(_,g),Q=R.S;Q!==null&&Q(M,U),tT(o,l,U)}catch(ue){_x(o,l,ue)}finally{j!==null&&M.types!==null&&(j.types=M.types),R.T=j}}else try{j=d(_,g),tT(o,l,j)}catch(ue){_x(o,l,ue)}}function tT(o,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){nT(o,l,g)},function(g){return _x(o,l,g)}):nT(o,l,d)}function nT(o,l,d){l.status="fulfilled",l.value=d,rT(l),o.state=d,l=o.pending,l!==null&&(d=l.next,d===l?o.pending=null:(d=d.next,l.next=d,eT(o,d)))}function _x(o,l,d){var g=o.pending;if(o.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=d,rT(l),l=l.next;while(l!==g)}o.action=null}function rT(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function aT(o,l){return l}function iT(o,l){if(nt){var d=Ot.formState;if(d!==null){e:{var g=qe;if(nt){if(Rt){t:{for(var _=Rt,j=fa;_.nodeType!==8;){if(!j){_=null;break t}if(_=ha(_.nextSibling),_===null){_=null;break t}}j=_.data,_=j==="F!"||j==="F"?_:null}if(_){Rt=ha(_.nextSibling),g=_.data==="F!";break e}}os(g)}g=!1}g&&(l=d[0])}}return d=pr(),d.memoizedState=d.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aT,lastRenderedState:l},d.queue=g,d=_T.bind(null,qe,g),g.dispatch=d,g=Ex(!1),j=Tx.bind(null,qe,!1,g.queue),g=pr(),_={state:l,dispatch:null,action:o,pending:null},g.queue=_,d=R7.bind(null,qe,_,j,d),_.dispatch=d,g.memoizedState=o,[l,d,!1]}function oT(o){var l=an();return sT(l,bt,o)}function sT(o,l,d){if(l=wx(o,l,aT)[0],o=$p(Qi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=Md(l)}catch(M){throw M===pu?Np:M}else g=l;l=an();var _=l.queue,j=_.dispatch;return d!==l.memoizedState&&(qe.flags|=2048,xu(9,{destroy:void 0},k7.bind(null,_,d),null)),[g,j,o]}function k7(o,l){o.action=l}function lT(o){var l=an(),d=bt;if(d!==null)return sT(l,d,o);an(),l=l.memoizedState,d=an();var g=d.queue.dispatch;return d.memoizedState=o,[l,g,!1]}function xu(o,l,d,g){return o={tag:o,create:d,deps:g,inst:l,next:null},l=qe.updateQueue,l===null&&(l=Lp(),qe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=o.next=o:(g=d.next,d.next=o,o.next=g,l.lastEffect=o),o}function cT(){return an().memoizedState}function Bp(o,l,d,g){var _=pr();qe.flags|=o,_.memoizedState=xu(1|l,{destroy:void 0},d,g===void 0?null:g)}function Up(o,l,d,g){var _=an();g=g===void 0?null:g;var j=_.memoizedState.inst;bt!==null&&g!==null&&px(g,bt.memoizedState.deps)?_.memoizedState=xu(l,j,d,g):(qe.flags|=o,_.memoizedState=xu(1|l,j,d,g))}function uT(o,l){Bp(8390656,8,o,l)}function jx(o,l){Up(2048,8,o,l)}function D7(o){qe.flags|=4;var l=qe.updateQueue;if(l===null)l=Lp(),qe.updateQueue=l,l.events=[o];else{var d=l.events;d===null?l.events=[o]:d.push(o)}}function fT(o){var l=an().memoizedState;return D7({ref:l,nextImpl:o}),function(){if((mt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function dT(o,l){return Up(4,2,o,l)}function hT(o,l){return Up(4,4,o,l)}function mT(o,l){if(typeof l=="function"){o=o();var d=l(o);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function pT(o,l,d){d=d!=null?d.concat([o]):null,Up(4,4,mT.bind(null,l,o),d)}function Cx(){}function vT(o,l){var d=an();l=l===void 0?null:l;var g=d.memoizedState;return l!==null&&px(l,g[1])?g[0]:(d.memoizedState=[o,l],o)}function gT(o,l){var d=an();l=l===void 0?null:l;var g=d.memoizedState;if(l!==null&&px(l,g[1]))return g[0];if(g=o(),kl){$r(!0);try{o()}finally{$r(!1)}}return d.memoizedState=[g,l],g}function Ox(o,l,d){return d===void 0||(Wi&1073741824)!==0&&(Je&261930)===0?o.memoizedState=l:(o.memoizedState=d,o=y2(),qe.lanes|=o,ps|=o,d)}function yT(o,l,d,g){return Ur(d,l)?d:gu.current!==null?(o=Ox(o,d,g),Ur(o,l)||(un=!0),o):(Wi&42)===0||(Wi&1073741824)!==0&&(Je&261930)===0?(un=!0,o.memoizedState=d):(o=y2(),qe.lanes|=o,ps|=o,l)}function bT(o,l,d,g,_){var j=H.p;H.p=j!==0&&8>j?j:8;var M=R.T,U={};R.T=U,Tx(o,!1,l,d);try{var Q=_(),ue=R.S;if(ue!==null&&ue(U,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var he=T7(Q,g);Rd(o,l,he,Yr(o))}else Rd(o,l,g,Yr(o))}catch(ve){Rd(o,l,{then:function(){},status:"rejected",reason:ve},Yr())}finally{H.p=j,M!==null&&U.types!==null&&(M.types=U.types),R.T=M}}function I7(){}function Ax(o,l,d,g){if(o.tag!==5)throw Error(r(476));var _=xT(o).queue;bT(o,_,l,q,d===null?I7:function(){return wT(o),d(g)})}function xT(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:q},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:d},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function wT(o){var l=xT(o);l.next===null&&(l=o.alternate.memoizedState),Rd(o,l.next.queue,{},Yr())}function Nx(){return qn(Wd)}function ST(){return an().memoizedState}function ET(){return an().memoizedState}function L7(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var d=Yr();o=cs(d);var g=us(l,o,d);g!==null&&(Tr(g,l,d),Ad(g,l,d)),l={cache:ax()},o.payload=l;return}l=l.return}}function z7(o,l,d){var g=Yr();d={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Hp(o)?jT(l,d):(d=Yb(o,l,d,g),d!==null&&(Tr(d,o,g),CT(d,l,g)))}function _T(o,l,d){var g=Yr();Rd(o,l,d,g)}function Rd(o,l,d,g){var _={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Hp(o))jT(l,_);else{var j=o.alternate;if(o.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var M=l.lastRenderedState,U=j(M,d);if(_.hasEagerState=!0,_.eagerState=U,Ur(U,M))return Sp(o,l,_,0),Ot===null&&wp(),!1}catch{}finally{}if(d=Yb(o,l,_,g),d!==null)return Tr(d,o,g),CT(d,l,g),!0}return!1}function Tx(o,l,d,g){if(g={lane:2,revertLane:lw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Hp(o)){if(l)throw Error(r(479))}else l=Yb(o,d,g,2),l!==null&&Tr(l,o,2)}function Hp(o){var l=o.alternate;return o===qe||l!==null&&l===qe}function jT(o,l){yu=Dp=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function CT(o,l,d){if((d&4194048)!==0){var g=l.lanes;g&=o.pendingLanes,d|=g,l.lanes=d,er(o,d)}}var kd={readContext:qn,use:zp,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};kd.useEffectEvent=Xt;var OT={readContext:qn,use:zp,useCallback:function(o,l){return pr().memoizedState=[o,l===void 0?null:l],o},useContext:qn,useEffect:uT,useImperativeHandle:function(o,l,d){d=d!=null?d.concat([o]):null,Bp(4194308,4,mT.bind(null,l,o),d)},useLayoutEffect:function(o,l){return Bp(4194308,4,o,l)},useInsertionEffect:function(o,l){Bp(4,2,o,l)},useMemo:function(o,l){var d=pr();l=l===void 0?null:l;var g=o();if(kl){$r(!0);try{o()}finally{$r(!1)}}return d.memoizedState=[g,l],g},useReducer:function(o,l,d){var g=pr();if(d!==void 0){var _=d(l);if(kl){$r(!0);try{d(l)}finally{$r(!1)}}}else _=l;return g.memoizedState=g.baseState=_,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:_},g.queue=o,o=o.dispatch=z7.bind(null,qe,o),[g.memoizedState,o]},useRef:function(o){var l=pr();return o={current:o},l.memoizedState=o},useState:function(o){o=Ex(o);var l=o.queue,d=_T.bind(null,qe,l);return l.dispatch=d,[o.memoizedState,d]},useDebugValue:Cx,useDeferredValue:function(o,l){var d=pr();return Ox(d,o,l)},useTransition:function(){var o=Ex(!1);return o=bT.bind(null,qe,o.queue,!0,!1),pr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,d){var g=qe,_=pr();if(nt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Ot===null)throw Error(r(349));(Je&127)!==0||GN(g,l,d)}_.memoizedState=d;var j={value:d,getSnapshot:l};return _.queue=j,uT(WN.bind(null,g,j,o),[o]),g.flags|=2048,xu(9,{destroy:void 0},XN.bind(null,g,j,d,l),null),d},useId:function(){var o=pr(),l=Ot.identifierPrefix;if(nt){var d=ci,g=li;d=(g&~(1<<32-Pn(g)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Ip++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=P7++,l="_"+l+"r_"+d.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:Nx,useFormState:iT,useActionState:iT,useOptimistic:function(o){var l=pr();l.memoizedState=l.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Tx.bind(null,qe,!0,d),d.dispatch=l,[o,l]},useMemoCache:xx,useCacheRefresh:function(){return pr().memoizedState=L7.bind(null,qe)},useEffectEvent:function(o){var l=pr(),d={impl:o};return l.memoizedState=d,function(){if((mt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},Px={readContext:qn,use:zp,useCallback:vT,useContext:qn,useEffect:jx,useImperativeHandle:pT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:gT,useReducer:$p,useRef:cT,useState:function(){return $p(Qi)},useDebugValue:Cx,useDeferredValue:function(o,l){var d=an();return yT(d,bt.memoizedState,o,l)},useTransition:function(){var o=$p(Qi)[0],l=an().memoizedState;return[typeof o=="boolean"?o:Md(o),l]},useSyncExternalStore:YN,useId:ST,useHostTransitionStatus:Nx,useFormState:oT,useActionState:oT,useOptimistic:function(o,l){var d=an();return JN(d,bt,o,l)},useMemoCache:xx,useCacheRefresh:ET};Px.useEffectEvent=fT;var AT={readContext:qn,use:zp,useCallback:vT,useContext:qn,useEffect:jx,useImperativeHandle:pT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:gT,useReducer:Sx,useRef:cT,useState:function(){return Sx(Qi)},useDebugValue:Cx,useDeferredValue:function(o,l){var d=an();return bt===null?Ox(d,o,l):yT(d,bt.memoizedState,o,l)},useTransition:function(){var o=Sx(Qi)[0],l=an().memoizedState;return[typeof o=="boolean"?o:Md(o),l]},useSyncExternalStore:YN,useId:ST,useHostTransitionStatus:Nx,useFormState:lT,useActionState:lT,useOptimistic:function(o,l){var d=an();return bt!==null?JN(d,bt,o,l):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:xx,useCacheRefresh:ET};AT.useEffectEvent=fT;function Mx(o,l,d,g){l=o.memoizedState,d=d(g,l),d=d==null?l:h({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Rx={enqueueSetState:function(o,l,d){o=o._reactInternals;var g=Yr(),_=cs(g);_.payload=l,d!=null&&(_.callback=d),l=us(o,_,g),l!==null&&(Tr(l,o,g),Ad(l,o,g))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var g=Yr(),_=cs(g);_.tag=1,_.payload=l,d!=null&&(_.callback=d),l=us(o,_,g),l!==null&&(Tr(l,o,g),Ad(l,o,g))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=Yr(),g=cs(d);g.tag=2,l!=null&&(g.callback=l),l=us(o,g,d),l!==null&&(Tr(l,o,d),Ad(l,o,d))}};function NT(o,l,d,g,_,j,M){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,j,M):l.prototype&&l.prototype.isPureReactComponent?!xd(d,g)||!xd(_,j):!0}function TT(o,l,d,g){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,g),l.state!==o&&Rx.enqueueReplaceState(l,l.state,null)}function Dl(o,l){var d=l;if("ref"in l){d={};for(var g in l)g!=="ref"&&(d[g]=l[g])}if(o=o.defaultProps){d===l&&(d=h({},d));for(var _ in o)d[_]===void 0&&(d[_]=o[_])}return d}function PT(o){xp(o)}function MT(o){console.error(o)}function RT(o){xp(o)}function Fp(o,l){try{var d=o.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function kT(o,l,d){try{var g=o.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function kx(o,l,d){return d=cs(d),d.tag=3,d.payload={element:null},d.callback=function(){Fp(o,l)},d}function DT(o){return o=cs(o),o.tag=3,o}function IT(o,l,d,g){var _=d.type.getDerivedStateFromError;if(typeof _=="function"){var j=g.value;o.payload=function(){return _(j)},o.callback=function(){kT(l,d,g)}}var M=d.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(o.callback=function(){kT(l,d,g),typeof _!="function"&&(vs===null?vs=new Set([this]):vs.add(this));var U=g.stack;this.componentDidCatch(g.value,{componentStack:U!==null?U:""})})}function $7(o,l,d,g,_){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=d.alternate,l!==null&&du(l,d,_,!0),d=Fr.current,d!==null){switch(d.tag){case 31:case 13:return da===null?tv():d.alternate===null&&Wt===0&&(Wt=3),d.flags&=-257,d.flags|=65536,d.lanes=_,g===Tp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([g]):l.add(g),iw(o,g,_)),!1;case 22:return d.flags|=65536,g===Tp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([g]):d.add(g)),iw(o,g,_)),!1}throw Error(r(435,d.tag))}return iw(o,g,_),tv(),!1}if(nt)return l=Fr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=_,g!==Jb&&(o=Error(r(422),{cause:g}),Ed(la(o,d)))):(g!==Jb&&(l=Error(r(423),{cause:g}),Ed(la(l,d))),o=o.current.alternate,o.flags|=65536,_&=-_,o.lanes|=_,g=la(g,d),_=kx(o.stateNode,g,_),ux(o,_),Wt!==4&&(Wt=2)),!1;var j=Error(r(520),{cause:g});if(j=la(j,d),Hd===null?Hd=[j]:Hd.push(j),Wt!==4&&(Wt=2),l===null)return!0;g=la(g,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,o=_&-_,d.lanes|=o,o=kx(d.stateNode,g,o),ux(d,o),!1;case 1:if(l=d.type,j=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(vs===null||!vs.has(j))))return d.flags|=65536,_&=-_,d.lanes|=_,_=DT(_),IT(_,o,d,g),ux(d,_),!1}d=d.return}while(d!==null);return!1}var Dx=Error(r(461)),un=!1;function Kn(o,l,d,g){l.child=o===null?BN(l,null,d,g):Rl(l,o.child,d,g)}function LT(o,l,d,g,_){d=d.render;var j=l.ref;if("ref"in g){var M={};for(var U in g)U!=="ref"&&(M[U]=g[U])}else M=g;return Nl(l),g=vx(o,l,d,M,j,_),U=gx(),o!==null&&!un?(yx(o,l,_),Zi(o,l,_)):(nt&&U&&Qb(l),l.flags|=1,Kn(o,l,g,_),l.child)}function zT(o,l,d,g,_){if(o===null){var j=d.type;return typeof j=="function"&&!Gb(j)&&j.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=j,$T(o,l,j,g,_)):(o=_p(d.type,null,g,l,l.mode,_),o.ref=l.ref,o.return=l,l.child=o)}if(j=o.child,!Fx(o,_)){var M=j.memoizedProps;if(d=d.compare,d=d!==null?d:xd,d(M,g)&&o.ref===l.ref)return Zi(o,l,_)}return l.flags|=1,o=Vi(j,g),o.ref=l.ref,o.return=l,l.child=o}function $T(o,l,d,g,_){if(o!==null){var j=o.memoizedProps;if(xd(j,g)&&o.ref===l.ref)if(un=!1,l.pendingProps=g=j,Fx(o,_))(o.flags&131072)!==0&&(un=!0);else return l.lanes=o.lanes,Zi(o,l,_)}return Ix(o,l,d,g,_)}function BT(o,l,d,g){var _=g.children,j=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(j=j!==null?j.baseLanes|d:d,o!==null){for(g=l.child=o.child,_=0;g!==null;)_=_|g.lanes|g.childLanes,g=g.sibling;g=_&~j}else g=0,l.child=null;return UT(o,l,j,d,g)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&Ap(l,j!==null?j.cachePool:null),j!==null?FN(l,j):dx(),qN(l);else return g=l.lanes=536870912,UT(o,l,j!==null?j.baseLanes|d:d,d,g)}else j!==null?(Ap(l,j.cachePool),FN(l,j),ds(),l.memoizedState=null):(o!==null&&Ap(l,null),dx(),ds());return Kn(o,l,_,d),l.child}function Dd(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function UT(o,l,d,g,_){var j=ox();return j=j===null?null:{parent:ln._currentValue,pool:j},l.memoizedState={baseLanes:d,cachePool:j},o!==null&&Ap(l,null),dx(),qN(l),o!==null&&du(o,l,g,!0),l.childLanes=_,null}function qp(o,l){return l=Vp({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function HT(o,l,d){return Rl(l,o.child,null,d),o=qp(l,l.pendingProps),o.flags|=2,qr(l),l.memoizedState=null,o}function B7(o,l,d){var g=l.pendingProps,_=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(nt){if(g.mode==="hidden")return o=qp(l,g),l.lanes=536870912,Dd(null,o);if(mx(l),(o=Rt)?(o=eP(o,fa),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:as!==null?{id:li,overflow:ci}:null,retryLane:536870912,hydrationErrors:null},d=jN(o),d.return=l,l.child=d,Fn=l,Rt=null)):o=null,o===null)throw os(l);return l.lanes=536870912,null}return qp(l,g)}var j=o.memoizedState;if(j!==null){var M=j.dehydrated;if(mx(l),_)if(l.flags&256)l.flags&=-257,l=HT(o,l,d);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(r(558));else if(un||du(o,l,d,!1),_=(d&o.childLanes)!==0,un||_){if(g=Ot,g!==null&&(M=tr(g,d),M!==0&&M!==j.retryLane))throw j.retryLane=M,jl(o,M),Tr(g,o,M),Dx;tv(),l=HT(o,l,d)}else o=j.treeContext,Rt=ha(M.nextSibling),Fn=l,nt=!0,is=null,fa=!1,o!==null&&AN(l,o),l=qp(l,g),l.flags|=4096;return l}return o=Vi(o.child,{mode:g.mode,children:g.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Kp(o,l){var d=l.ref;if(d===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(o===null||o.ref!==d)&&(l.flags|=4194816)}}function Ix(o,l,d,g,_){return Nl(l),d=vx(o,l,d,g,void 0,_),g=gx(),o!==null&&!un?(yx(o,l,_),Zi(o,l,_)):(nt&&g&&Qb(l),l.flags|=1,Kn(o,l,d,_),l.child)}function FT(o,l,d,g,_,j){return Nl(l),l.updateQueue=null,d=VN(l,g,d,_),KN(o),g=gx(),o!==null&&!un?(yx(o,l,j),Zi(o,l,j)):(nt&&g&&Qb(l),l.flags|=1,Kn(o,l,d,j),l.child)}function qT(o,l,d,g,_){if(Nl(l),l.stateNode===null){var j=lu,M=d.contextType;typeof M=="object"&&M!==null&&(j=qn(M)),j=new d(g,j),l.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=Rx,l.stateNode=j,j._reactInternals=l,j=l.stateNode,j.props=g,j.state=l.memoizedState,j.refs={},lx(l),M=d.contextType,j.context=typeof M=="object"&&M!==null?qn(M):lu,j.state=l.memoizedState,M=d.getDerivedStateFromProps,typeof M=="function"&&(Mx(l,d,M,g),j.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(M=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),M!==j.state&&Rx.enqueueReplaceState(j,j.state,null),Td(l,g,j,_),Nd(),j.state=l.memoizedState),typeof j.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(o===null){j=l.stateNode;var U=l.memoizedProps,Q=Dl(d,U);j.props=Q;var ue=j.context,he=d.contextType;M=lu,typeof he=="object"&&he!==null&&(M=qn(he));var ve=d.getDerivedStateFromProps;he=typeof ve=="function"||typeof j.getSnapshotBeforeUpdate=="function",U=l.pendingProps!==U,he||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(U||ue!==M)&&TT(l,j,g,M),ls=!1;var fe=l.memoizedState;j.state=fe,Td(l,g,j,_),Nd(),ue=l.memoizedState,U||fe!==ue||ls?(typeof ve=="function"&&(Mx(l,d,ve,g),ue=l.memoizedState),(Q=ls||NT(l,d,Q,g,fe,ue,M))?(he||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(l.flags|=4194308)):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=ue),j.props=g,j.state=ue,j.context=M,g=Q):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{j=l.stateNode,cx(o,l),M=l.memoizedProps,he=Dl(d,M),j.props=he,ve=l.pendingProps,fe=j.context,ue=d.contextType,Q=lu,typeof ue=="object"&&ue!==null&&(Q=qn(ue)),U=d.getDerivedStateFromProps,(ue=typeof U=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(M!==ve||fe!==Q)&&TT(l,j,g,Q),ls=!1,fe=l.memoizedState,j.state=fe,Td(l,g,j,_),Nd();var de=l.memoizedState;M!==ve||fe!==de||ls||o!==null&&o.dependencies!==null&&Cp(o.dependencies)?(typeof U=="function"&&(Mx(l,d,U,g),de=l.memoizedState),(he=ls||NT(l,d,he,g,fe,de,Q)||o!==null&&o.dependencies!==null&&Cp(o.dependencies))?(ue||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(g,de,Q),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(g,de,Q)),typeof j.componentDidUpdate=="function"&&(l.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof j.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=de),j.props=g,j.state=de,j.context=Q,g=he):(typeof j.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),g=!1)}return j=g,Kp(o,l),g=(l.flags&128)!==0,j||g?(j=l.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:j.render(),l.flags|=1,o!==null&&g?(l.child=Rl(l,o.child,null,_),l.child=Rl(l,null,d,_)):Kn(o,l,d,_),l.memoizedState=j.state,o=l.child):o=Zi(o,l,_),o}function KT(o,l,d,g){return Ol(),l.flags|=256,Kn(o,l,d,g),l.child}var Lx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zx(o){return{baseLanes:o,cachePool:kN()}}function $x(o,l,d){return o=o!==null?o.childLanes&~d:0,l&&(o|=Vr),o}function VT(o,l,d){var g=l.pendingProps,_=!1,j=(l.flags&128)!==0,M;if((M=j)||(M=o!==null&&o.memoizedState===null?!1:(rn.current&2)!==0),M&&(_=!0,l.flags&=-129),M=(l.flags&32)!==0,l.flags&=-33,o===null){if(nt){if(_?fs(l):ds(),(o=Rt)?(o=eP(o,fa),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:as!==null?{id:li,overflow:ci}:null,retryLane:536870912,hydrationErrors:null},d=jN(o),d.return=l,l.child=d,Fn=l,Rt=null)):o=null,o===null)throw os(l);return ww(o)?l.lanes=32:l.lanes=536870912,null}var U=g.children;return g=g.fallback,_?(ds(),_=l.mode,U=Vp({mode:"hidden",children:U},_),g=Cl(g,_,d,null),U.return=l,g.return=l,U.sibling=g,l.child=U,g=l.child,g.memoizedState=zx(d),g.childLanes=$x(o,M,d),l.memoizedState=Lx,Dd(null,g)):(fs(l),Bx(l,U))}var Q=o.memoizedState;if(Q!==null&&(U=Q.dehydrated,U!==null)){if(j)l.flags&256?(fs(l),l.flags&=-257,l=Ux(o,l,d)):l.memoizedState!==null?(ds(),l.child=o.child,l.flags|=128,l=null):(ds(),U=g.fallback,_=l.mode,g=Vp({mode:"visible",children:g.children},_),U=Cl(U,_,d,null),U.flags|=2,g.return=l,U.return=l,g.sibling=U,l.child=g,Rl(l,o.child,null,d),g=l.child,g.memoizedState=zx(d),g.childLanes=$x(o,M,d),l.memoizedState=Lx,l=Dd(null,g));else if(fs(l),ww(U)){if(M=U.nextSibling&&U.nextSibling.dataset,M)var ue=M.dgst;M=ue,g=Error(r(419)),g.stack="",g.digest=M,Ed({value:g,source:null,stack:null}),l=Ux(o,l,d)}else if(un||du(o,l,d,!1),M=(d&o.childLanes)!==0,un||M){if(M=Ot,M!==null&&(g=tr(M,d),g!==0&&g!==Q.retryLane))throw Q.retryLane=g,jl(o,g),Tr(M,o,g),Dx;xw(U)||tv(),l=Ux(o,l,d)}else xw(U)?(l.flags|=192,l.child=o.child,l=null):(o=Q.treeContext,Rt=ha(U.nextSibling),Fn=l,nt=!0,is=null,fa=!1,o!==null&&AN(l,o),l=Bx(l,g.children),l.flags|=4096);return l}return _?(ds(),U=g.fallback,_=l.mode,Q=o.child,ue=Q.sibling,g=Vi(Q,{mode:"hidden",children:g.children}),g.subtreeFlags=Q.subtreeFlags&65011712,ue!==null?U=Vi(ue,U):(U=Cl(U,_,d,null),U.flags|=2),U.return=l,g.return=l,g.sibling=U,l.child=g,Dd(null,g),g=l.child,U=o.child.memoizedState,U===null?U=zx(d):(_=U.cachePool,_!==null?(Q=ln._currentValue,_=_.parent!==Q?{parent:Q,pool:Q}:_):_=kN(),U={baseLanes:U.baseLanes|d,cachePool:_}),g.memoizedState=U,g.childLanes=$x(o,M,d),l.memoizedState=Lx,Dd(o.child,g)):(fs(l),d=o.child,o=d.sibling,d=Vi(d,{mode:"visible",children:g.children}),d.return=l,d.sibling=null,o!==null&&(M=l.deletions,M===null?(l.deletions=[o],l.flags|=16):M.push(o)),l.child=d,l.memoizedState=null,d)}function Bx(o,l){return l=Vp({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Vp(o,l){return o=Hr(22,o,null,l),o.lanes=0,o}function Ux(o,l,d){return Rl(l,o.child,null,d),o=Bx(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function YT(o,l,d){o.lanes|=l;var g=o.alternate;g!==null&&(g.lanes|=l),nx(o.return,l,d)}function Hx(o,l,d,g,_,j){var M=o.memoizedState;M===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:_,treeForkCount:j}:(M.isBackwards=l,M.rendering=null,M.renderingStartTime=0,M.last=g,M.tail=d,M.tailMode=_,M.treeForkCount=j)}function GT(o,l,d){var g=l.pendingProps,_=g.revealOrder,j=g.tail;g=g.children;var M=rn.current,U=(M&2)!==0;if(U?(M=M&1|2,l.flags|=128):M&=1,X(rn,M),Kn(o,l,g,d),g=nt?Sd:0,!U&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&YT(o,d,l);else if(o.tag===19)YT(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(_){case"forwards":for(d=l.child,_=null;d!==null;)o=d.alternate,o!==null&&kp(o)===null&&(_=d),d=d.sibling;d=_,d===null?(_=l.child,l.child=null):(_=d.sibling,d.sibling=null),Hx(l,!1,_,d,j,g);break;case"backwards":case"unstable_legacy-backwards":for(d=null,_=l.child,l.child=null;_!==null;){if(o=_.alternate,o!==null&&kp(o)===null){l.child=_;break}o=_.sibling,_.sibling=d,d=_,_=o}Hx(l,!0,d,null,j,g);break;case"together":Hx(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function Zi(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),ps|=l.lanes,(d&l.childLanes)===0)if(o!==null){if(du(o,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=Vi(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Vi(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function Fx(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&Cp(o)))}function U7(o,l,d){switch(l.tag){case 3:re(l,l.stateNode.containerInfo),ss(l,ln,o.memoizedState.cache),Ol();break;case 27:case 5:le(l);break;case 4:re(l,l.stateNode.containerInfo);break;case 10:ss(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,mx(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(fs(l),l.flags|=128,null):(d&l.child.childLanes)!==0?VT(o,l,d):(fs(l),o=Zi(o,l,d),o!==null?o.sibling:null);fs(l);break;case 19:var _=(o.flags&128)!==0;if(g=(d&l.childLanes)!==0,g||(du(o,l,d,!1),g=(d&l.childLanes)!==0),_){if(g)return GT(o,l,d);l.flags|=128}if(_=l.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),X(rn,rn.current),g)break;return null;case 22:return l.lanes=0,BT(o,l,d,l.pendingProps);case 24:ss(l,ln,o.memoizedState.cache)}return Zi(o,l,d)}function XT(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps)un=!0;else{if(!Fx(o,d)&&(l.flags&128)===0)return un=!1,U7(o,l,d);un=(o.flags&131072)!==0}else un=!1,nt&&(l.flags&1048576)!==0&&ON(l,Sd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(o=Pl(l.elementType),l.type=o,typeof o=="function")Gb(o)?(g=Dl(o,g),l.tag=1,l=qT(null,l,o,g,d)):(l.tag=0,l=Ix(null,l,o,g,d));else{if(o!=null){var _=o.$$typeof;if(_===A){l.tag=11,l=LT(null,l,o,g,d);break e}else if(_===P){l.tag=14,l=zT(null,l,o,g,d);break e}}throw l=$(o)||o,Error(r(306,l,""))}}return l;case 0:return Ix(o,l,l.type,l.pendingProps,d);case 1:return g=l.type,_=Dl(g,l.pendingProps),qT(o,l,g,_,d);case 3:e:{if(re(l,l.stateNode.containerInfo),o===null)throw Error(r(387));g=l.pendingProps;var j=l.memoizedState;_=j.element,cx(o,l),Td(l,g,null,d);var M=l.memoizedState;if(g=M.cache,ss(l,ln,g),g!==j.cache&&rx(l,[ln],d,!0),Nd(),g=M.element,j.isDehydrated)if(j={element:g,isDehydrated:!1,cache:M.cache},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){l=KT(o,l,g,d);break e}else if(g!==_){_=la(Error(r(424)),l),Ed(_),l=KT(o,l,g,d);break e}else{switch(o=l.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Rt=ha(o.firstChild),Fn=l,nt=!0,is=null,fa=!0,d=BN(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Ol(),g===_){l=Zi(o,l,d);break e}Kn(o,l,g,d)}l=l.child}return l;case 26:return Kp(o,l),o===null?(d=oP(l.type,null,l.pendingProps,null))?l.memoizedState=d:nt||(d=l.type,o=l.pendingProps,g=lv(se.current).createElement(d),g[wn]=l,g[nr]=o,Vn(g,d,o),sn(g),l.stateNode=g):l.memoizedState=oP(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return le(l),o===null&&nt&&(g=l.stateNode=rP(l.type,l.pendingProps,se.current),Fn=l,fa=!0,_=Rt,xs(l.type)?(Sw=_,Rt=ha(g.firstChild)):Rt=_),Kn(o,l,l.pendingProps.children,d),Kp(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&nt&&((_=g=Rt)&&(g=gK(g,l.type,l.pendingProps,fa),g!==null?(l.stateNode=g,Fn=l,Rt=ha(g.firstChild),fa=!1,_=!0):_=!1),_||os(l)),le(l),_=l.type,j=l.pendingProps,M=o!==null?o.memoizedProps:null,g=j.children,gw(_,j)?g=null:M!==null&&gw(_,M)&&(l.flags|=32),l.memoizedState!==null&&(_=vx(o,l,M7,null,null,d),Wd._currentValue=_),Kp(o,l),Kn(o,l,g,d),l.child;case 6:return o===null&&nt&&((o=d=Rt)&&(d=yK(d,l.pendingProps,fa),d!==null?(l.stateNode=d,Fn=l,Rt=null,o=!0):o=!1),o||os(l)),null;case 13:return VT(o,l,d);case 4:return re(l,l.stateNode.containerInfo),g=l.pendingProps,o===null?l.child=Rl(l,null,g,d):Kn(o,l,g,d),l.child;case 11:return LT(o,l,l.type,l.pendingProps,d);case 7:return Kn(o,l,l.pendingProps,d),l.child;case 8:return Kn(o,l,l.pendingProps.children,d),l.child;case 12:return Kn(o,l,l.pendingProps.children,d),l.child;case 10:return g=l.pendingProps,ss(l,l.type,g.value),Kn(o,l,g.children,d),l.child;case 9:return _=l.type._context,g=l.pendingProps.children,Nl(l),_=qn(_),g=g(_),l.flags|=1,Kn(o,l,g,d),l.child;case 14:return zT(o,l,l.type,l.pendingProps,d);case 15:return $T(o,l,l.type,l.pendingProps,d);case 19:return GT(o,l,d);case 31:return B7(o,l,d);case 22:return BT(o,l,d,l.pendingProps);case 24:return Nl(l),g=qn(ln),o===null?(_=ox(),_===null&&(_=Ot,j=ax(),_.pooledCache=j,j.refCount++,j!==null&&(_.pooledCacheLanes|=d),_=j),l.memoizedState={parent:g,cache:_},lx(l),ss(l,ln,_)):((o.lanes&d)!==0&&(cx(o,l),Td(l,null,null,d),Nd()),_=o.memoizedState,j=l.memoizedState,_.parent!==g?(_={parent:g,cache:g},l.memoizedState=_,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=_),ss(l,ln,g)):(g=j.cache,ss(l,ln,g),g!==_.cache&&rx(l,[ln],d,!0))),Kn(o,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Ji(o){o.flags|=4}function qx(o,l,d,g,_){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(_&335544128)===_)if(o.stateNode.complete)o.flags|=8192;else if(S2())o.flags|=8192;else throw Ml=Tp,sx}else o.flags&=-16777217}function WT(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!fP(l))if(S2())o.flags|=8192;else throw Ml=Tp,sx}function Yp(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?Mn():536870912,o.lanes|=l,_u|=l)}function Id(o,l){if(!nt)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function kt(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,g=0;if(l)for(var _=o.child;_!==null;)d|=_.lanes|_.childLanes,g|=_.subtreeFlags&65011712,g|=_.flags&65011712,_.return=o,_=_.sibling;else for(_=o.child;_!==null;)d|=_.lanes|_.childLanes,g|=_.subtreeFlags,g|=_.flags,_.return=o,_=_.sibling;return o.subtreeFlags|=g,o.childLanes=d,l}function H7(o,l,d){var g=l.pendingProps;switch(Zb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(l),null;case 1:return kt(l),null;case 3:return d=l.stateNode,g=null,o!==null&&(g=o.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),Xi(ln),J(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(fu(l)?Ji(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ex())),kt(l),null;case 26:var _=l.type,j=l.memoizedState;return o===null?(Ji(l),j!==null?(kt(l),WT(l,j)):(kt(l),qx(l,_,null,g,d))):j?j!==o.memoizedState?(Ji(l),kt(l),WT(l,j)):(kt(l),l.flags&=-16777217):(o=o.memoizedProps,o!==g&&Ji(l),kt(l),qx(l,_,o,g,d)),null;case 27:if(me(l),d=se.current,_=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==g&&Ji(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return kt(l),null}o=Z.current,fu(l)?NN(l):(o=rP(_,g,d),l.stateNode=o,Ji(l))}return kt(l),null;case 5:if(me(l),_=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==g&&Ji(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return kt(l),null}if(j=Z.current,fu(l))NN(l);else{var M=lv(se.current);switch(j){case 1:j=M.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:j=M.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":j=M.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":j=M.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":j=M.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof g.is=="string"?M.createElement("select",{is:g.is}):M.createElement("select"),g.multiple?j.multiple=!0:g.size&&(j.size=g.size);break;default:j=typeof g.is=="string"?M.createElement(_,{is:g.is}):M.createElement(_)}}j[wn]=l,j[nr]=g;e:for(M=l.child;M!==null;){if(M.tag===5||M.tag===6)j.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===l)break e;for(;M.sibling===null;){if(M.return===null||M.return===l)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}l.stateNode=j;e:switch(Vn(j,_,g),_){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Ji(l)}}return kt(l),qx(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,d),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==g&&Ji(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(o=se.current,fu(l)){if(o=l.stateNode,d=l.memoizedProps,g=null,_=Fn,_!==null)switch(_.tag){case 27:case 5:g=_.memoizedProps}o[wn]=l,o=!!(o.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||V2(o.nodeValue,d)),o||os(l,!0)}else o=lv(o).createTextNode(g),o[wn]=l,l.stateNode=o}return kt(l),null;case 31:if(d=l.memoizedState,o===null||o.memoizedState!==null){if(g=fu(l),d!==null){if(o===null){if(!g)throw Error(r(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[wn]=l}else Ol(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;kt(l),o=!1}else d=ex(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=d),o=!0;if(!o)return l.flags&256?(qr(l),l):(qr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return kt(l),null;case 13:if(g=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(_=fu(l),g!==null&&g.dehydrated!==null){if(o===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[wn]=l}else Ol(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;kt(l),_=!1}else _=ex(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=_),_=!0;if(!_)return l.flags&256?(qr(l),l):(qr(l),null)}return qr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=g!==null,o=o!==null&&o.memoizedState!==null,d&&(g=l.child,_=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(_=g.alternate.memoizedState.cachePool.pool),j=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(j=g.memoizedState.cachePool.pool),j!==_&&(g.flags|=2048)),d!==o&&d&&(l.child.flags|=8192),Yp(l,l.updateQueue),kt(l),null);case 4:return J(),o===null&&dw(l.stateNode.containerInfo),kt(l),null;case 10:return Xi(l.type),kt(l),null;case 19:if(z(rn),g=l.memoizedState,g===null)return kt(l),null;if(_=(l.flags&128)!==0,j=g.rendering,j===null)if(_)Id(g,!1);else{if(Wt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(j=kp(o),j!==null){for(l.flags|=128,Id(g,!1),o=j.updateQueue,l.updateQueue=o,Yp(l,o),l.subtreeFlags=0,o=d,d=l.child;d!==null;)_N(d,o),d=d.sibling;return X(rn,rn.current&1|2),nt&&Yi(l,g.treeForkCount),l.child}o=o.sibling}g.tail!==null&&lt()>Zp&&(l.flags|=128,_=!0,Id(g,!1),l.lanes=4194304)}else{if(!_)if(o=kp(j),o!==null){if(l.flags|=128,_=!0,o=o.updateQueue,l.updateQueue=o,Yp(l,o),Id(g,!0),g.tail===null&&g.tailMode==="hidden"&&!j.alternate&&!nt)return kt(l),null}else 2*lt()-g.renderingStartTime>Zp&&d!==536870912&&(l.flags|=128,_=!0,Id(g,!1),l.lanes=4194304);g.isBackwards?(j.sibling=l.child,l.child=j):(o=g.last,o!==null?o.sibling=j:l.child=j,g.last=j)}return g.tail!==null?(o=g.tail,g.rendering=o,g.tail=o.sibling,g.renderingStartTime=lt(),o.sibling=null,d=rn.current,X(rn,_?d&1|2:d&1),nt&&Yi(l,g.treeForkCount),o):(kt(l),null);case 22:case 23:return qr(l),hx(),g=l.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(d&536870912)!==0&&(l.flags&128)===0&&(kt(l),l.subtreeFlags&6&&(l.flags|=8192)):kt(l),d=l.updateQueue,d!==null&&Yp(l,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==d&&(l.flags|=2048),o!==null&&z(Tl),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Xi(ln),kt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function F7(o,l){switch(Zb(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Xi(ln),J(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return me(l),null;case 31:if(l.memoizedState!==null){if(qr(l),l.alternate===null)throw Error(r(340));Ol()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(qr(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ol()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return z(rn),null;case 4:return J(),null;case 10:return Xi(l.type),null;case 22:case 23:return qr(l),hx(),o!==null&&z(Tl),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return Xi(ln),null;case 25:return null;default:return null}}function QT(o,l){switch(Zb(l),l.tag){case 3:Xi(ln),J();break;case 26:case 27:case 5:me(l);break;case 4:J();break;case 31:l.memoizedState!==null&&qr(l);break;case 13:qr(l);break;case 19:z(rn);break;case 10:Xi(l.type);break;case 22:case 23:qr(l),hx(),o!==null&&z(Tl);break;case 24:Xi(ln)}}function Ld(o,l){try{var d=l.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var _=g.next;d=_;do{if((d.tag&o)===o){g=void 0;var j=d.create,M=d.inst;g=j(),M.destroy=g}d=d.next}while(d!==_)}}catch(U){yt(l,l.return,U)}}function hs(o,l,d){try{var g=l.updateQueue,_=g!==null?g.lastEffect:null;if(_!==null){var j=_.next;g=j;do{if((g.tag&o)===o){var M=g.inst,U=M.destroy;if(U!==void 0){M.destroy=void 0,_=l;var Q=d,ue=U;try{ue()}catch(he){yt(_,Q,he)}}}g=g.next}while(g!==j)}}catch(he){yt(l,l.return,he)}}function ZT(o){var l=o.updateQueue;if(l!==null){var d=o.stateNode;try{HN(l,d)}catch(g){yt(o,o.return,g)}}}function JT(o,l,d){d.props=Dl(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(g){yt(o,l,g)}}function zd(o,l){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof d=="function"?o.refCleanup=d(g):d.current=g}}catch(_){yt(o,l,_)}}function ui(o,l){var d=o.ref,g=o.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(_){yt(o,l,_)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(_){yt(o,l,_)}else d.current=null}function e2(o){var l=o.type,d=o.memoizedProps,g=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&g.focus();break e;case"img":d.src?g.src=d.src:d.srcSet&&(g.srcset=d.srcSet)}}catch(_){yt(o,o.return,_)}}function Kx(o,l,d){try{var g=o.stateNode;fK(g,o.type,d,l),g[nr]=l}catch(_){yt(o,o.return,_)}}function t2(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&xs(o.type)||o.tag===4}function Vx(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||t2(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&xs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Yx(o,l,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(o),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=qi));else if(g!==4&&(g===27&&xs(o.type)&&(d=o.stateNode,l=null),o=o.child,o!==null))for(Yx(o,l,d),o=o.sibling;o!==null;)Yx(o,l,d),o=o.sibling}function Gp(o,l,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(g!==4&&(g===27&&xs(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Gp(o,l,d),o=o.sibling;o!==null;)Gp(o,l,d),o=o.sibling}function n2(o){var l=o.stateNode,d=o.memoizedProps;try{for(var g=o.type,_=l.attributes;_.length;)l.removeAttributeNode(_[0]);Vn(l,g,d),l[wn]=o,l[nr]=d}catch(j){yt(o,o.return,j)}}var eo=!1,fn=!1,Gx=!1,r2=typeof WeakSet=="function"?WeakSet:Set,Rn=null;function q7(o,l){if(o=o.containerInfo,pw=pv,o=pN(o),Ub(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var _=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{d.nodeType,j.nodeType}catch{d=null;break e}var M=0,U=-1,Q=-1,ue=0,he=0,ve=o,fe=null;t:for(;;){for(var de;ve!==d||_!==0&&ve.nodeType!==3||(U=M+_),ve!==j||g!==0&&ve.nodeType!==3||(Q=M+g),ve.nodeType===3&&(M+=ve.nodeValue.length),(de=ve.firstChild)!==null;)fe=ve,ve=de;for(;;){if(ve===o)break t;if(fe===d&&++ue===_&&(U=M),fe===j&&++he===g&&(Q=M),(de=ve.nextSibling)!==null)break;ve=fe,fe=ve.parentNode}ve=de}d=U===-1||Q===-1?null:{start:U,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(vw={focusedElem:o,selectionRange:d},pv=!1,Rn=l;Rn!==null;)if(l=Rn,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Rn=o;else for(;Rn!==null;){switch(l=Rn,j=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(d=0;d<o.length;d++)_=o[d],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&j!==null){o=void 0,d=l,_=j.memoizedProps,j=j.memoizedState,g=d.stateNode;try{var Ae=Dl(d.type,_);o=g.getSnapshotBeforeUpdate(Ae,j),g.__reactInternalSnapshotBeforeUpdate=o}catch(ze){yt(d,d.return,ze)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,d=o.nodeType,d===9)bw(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":bw(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=l.sibling,o!==null){o.return=l.return,Rn=o;break}Rn=l.return}}function a2(o,l,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:no(o,d),g&4&&Ld(5,d);break;case 1:if(no(o,d),g&4)if(o=d.stateNode,l===null)try{o.componentDidMount()}catch(M){yt(d,d.return,M)}else{var _=Dl(d.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(_,l,o.__reactInternalSnapshotBeforeUpdate)}catch(M){yt(d,d.return,M)}}g&64&&ZT(d),g&512&&zd(d,d.return);break;case 3:if(no(o,d),g&64&&(o=d.updateQueue,o!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{HN(o,l)}catch(M){yt(d,d.return,M)}}break;case 27:l===null&&g&4&&n2(d);case 26:case 5:no(o,d),l===null&&g&4&&e2(d),g&512&&zd(d,d.return);break;case 12:no(o,d);break;case 31:no(o,d),g&4&&s2(o,d);break;case 13:no(o,d),g&4&&l2(o,d),g&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=J7.bind(null,d),bK(o,d))));break;case 22:if(g=d.memoizedState!==null||eo,!g){l=l!==null&&l.memoizedState!==null||fn,_=eo;var j=fn;eo=g,(fn=l)&&!j?ro(o,d,(d.subtreeFlags&8772)!==0):no(o,d),eo=_,fn=j}break;case 30:break;default:no(o,d)}}function i2(o){var l=o.alternate;l!==null&&(o.alternate=null,i2(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&ud(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var zt=null,Cr=!1;function to(o,l,d){for(d=d.child;d!==null;)o2(o,l,d),d=d.sibling}function o2(o,l,d){if(Hn&&typeof Hn.onCommitFiberUnmount=="function")try{Hn.onCommitFiberUnmount(zi,d)}catch{}switch(d.tag){case 26:fn||ui(d,l),to(o,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:fn||ui(d,l);var g=zt,_=Cr;xs(d.type)&&(zt=d.stateNode,Cr=!1),to(o,l,d),Yd(d.stateNode),zt=g,Cr=_;break;case 5:fn||ui(d,l);case 6:if(g=zt,_=Cr,zt=null,to(o,l,d),zt=g,Cr=_,zt!==null)if(Cr)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(d.stateNode)}catch(j){yt(d,l,j)}else try{zt.removeChild(d.stateNode)}catch(j){yt(d,l,j)}break;case 18:zt!==null&&(Cr?(o=zt,Z2(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),Mu(o)):Z2(zt,d.stateNode));break;case 4:g=zt,_=Cr,zt=d.stateNode.containerInfo,Cr=!0,to(o,l,d),zt=g,Cr=_;break;case 0:case 11:case 14:case 15:hs(2,d,l),fn||hs(4,d,l),to(o,l,d);break;case 1:fn||(ui(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"&&JT(d,l,g)),to(o,l,d);break;case 21:to(o,l,d);break;case 22:fn=(g=fn)||d.memoizedState!==null,to(o,l,d),fn=g;break;default:to(o,l,d)}}function s2(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Mu(o)}catch(d){yt(l,l.return,d)}}}function l2(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Mu(o)}catch(d){yt(l,l.return,d)}}function K7(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new r2),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new r2),l;default:throw Error(r(435,o.tag))}}function Xp(o,l){var d=K7(o);l.forEach(function(g){if(!d.has(g)){d.add(g);var _=eK.bind(null,o,g);g.then(_,_)}})}function Or(o,l){var d=l.deletions;if(d!==null)for(var g=0;g<d.length;g++){var _=d[g],j=o,M=l,U=M;e:for(;U!==null;){switch(U.tag){case 27:if(xs(U.type)){zt=U.stateNode,Cr=!1;break e}break;case 5:zt=U.stateNode,Cr=!1;break e;case 3:case 4:zt=U.stateNode.containerInfo,Cr=!0;break e}U=U.return}if(zt===null)throw Error(r(160));o2(j,M,_),zt=null,Cr=!1,j=_.alternate,j!==null&&(j.return=null),_.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)c2(l,o),l=l.sibling}var Ra=null;function c2(o,l){var d=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Or(l,o),Ar(o),g&4&&(hs(3,o,o.return),Ld(3,o),hs(5,o,o.return));break;case 1:Or(l,o),Ar(o),g&512&&(fn||d===null||ui(d,d.return)),g&64&&eo&&(o=o.updateQueue,o!==null&&(g=o.callbacks,g!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?g:d.concat(g))));break;case 26:var _=Ra;if(Or(l,o),Ar(o),g&512&&(fn||d===null||ui(d,d.return)),g&4){var j=d!==null?d.memoizedState:null;if(g=o.memoizedState,d===null)if(g===null)if(o.stateNode===null){e:{g=o.type,d=o.memoizedProps,_=_.ownerDocument||_;t:switch(g){case"title":j=_.getElementsByTagName("title")[0],(!j||j[bl]||j[wn]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=_.createElement(g),_.head.insertBefore(j,_.querySelector("head > title"))),Vn(j,g,d),j[wn]=o,sn(j),g=j;break e;case"link":var M=cP("link","href",_).get(g+(d.href||""));if(M){for(var U=0;U<M.length;U++)if(j=M[U],j.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&j.getAttribute("rel")===(d.rel==null?null:d.rel)&&j.getAttribute("title")===(d.title==null?null:d.title)&&j.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){M.splice(U,1);break t}}j=_.createElement(g),Vn(j,g,d),_.head.appendChild(j);break;case"meta":if(M=cP("meta","content",_).get(g+(d.content||""))){for(U=0;U<M.length;U++)if(j=M[U],j.getAttribute("content")===(d.content==null?null:""+d.content)&&j.getAttribute("name")===(d.name==null?null:d.name)&&j.getAttribute("property")===(d.property==null?null:d.property)&&j.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&j.getAttribute("charset")===(d.charSet==null?null:d.charSet)){M.splice(U,1);break t}}j=_.createElement(g),Vn(j,g,d),_.head.appendChild(j);break;default:throw Error(r(468,g))}j[wn]=o,sn(j),g=j}o.stateNode=g}else uP(_,o.type,o.stateNode);else o.stateNode=lP(_,g,o.memoizedProps);else j!==g?(j===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):j.count--,g===null?uP(_,o.type,o.stateNode):lP(_,g,o.memoizedProps)):g===null&&o.stateNode!==null&&Kx(o,o.memoizedProps,d.memoizedProps)}break;case 27:Or(l,o),Ar(o),g&512&&(fn||d===null||ui(d,d.return)),d!==null&&g&4&&Kx(o,o.memoizedProps,d.memoizedProps);break;case 5:if(Or(l,o),Ar(o),g&512&&(fn||d===null||ui(d,d.return)),o.flags&32){_=o.stateNode;try{tu(_,"")}catch(Ae){yt(o,o.return,Ae)}}g&4&&o.stateNode!=null&&(_=o.memoizedProps,Kx(o,_,d!==null?d.memoizedProps:_)),g&1024&&(Gx=!0);break;case 6:if(Or(l,o),Ar(o),g&4){if(o.stateNode===null)throw Error(r(162));g=o.memoizedProps,d=o.stateNode;try{d.nodeValue=g}catch(Ae){yt(o,o.return,Ae)}}break;case 3:if(fv=null,_=Ra,Ra=cv(l.containerInfo),Or(l,o),Ra=_,Ar(o),g&4&&d!==null&&d.memoizedState.isDehydrated)try{Mu(l.containerInfo)}catch(Ae){yt(o,o.return,Ae)}Gx&&(Gx=!1,u2(o));break;case 4:g=Ra,Ra=cv(o.stateNode.containerInfo),Or(l,o),Ar(o),Ra=g;break;case 12:Or(l,o),Ar(o);break;case 31:Or(l,o),Ar(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Xp(o,g)));break;case 13:Or(l,o),Ar(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Qp=lt()),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Xp(o,g)));break;case 22:_=o.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,ue=eo,he=fn;if(eo=ue||_,fn=he||Q,Or(l,o),fn=he,eo=ue,Ar(o),g&8192)e:for(l=o.stateNode,l._visibility=_?l._visibility&-2:l._visibility|1,_&&(d===null||Q||eo||fn||Il(o)),d=null,l=o;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(j=Q.stateNode,_)M=j.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{U=Q.stateNode;var ve=Q.memoizedProps.style,fe=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;U.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(Ae){yt(Q,Q.return,Ae)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=_?"":Q.memoizedProps}catch(Ae){yt(Q,Q.return,Ae)}}}else if(l.tag===18){if(d===null){Q=l;try{var de=Q.stateNode;_?J2(de,!0):J2(Q.stateNode,!1)}catch(Ae){yt(Q,Q.return,Ae)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=o.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Xp(o,d))));break;case 19:Or(l,o),Ar(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Xp(o,g)));break;case 30:break;case 21:break;default:Or(l,o),Ar(o)}}function Ar(o){var l=o.flags;if(l&2){try{for(var d,g=o.return;g!==null;){if(t2(g)){d=g;break}g=g.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var _=d.stateNode,j=Vx(o);Gp(o,j,_);break;case 5:var M=d.stateNode;d.flags&32&&(tu(M,""),d.flags&=-33);var U=Vx(o);Gp(o,U,M);break;case 3:case 4:var Q=d.stateNode.containerInfo,ue=Vx(o);Yx(o,ue,Q);break;default:throw Error(r(161))}}catch(he){yt(o,o.return,he)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function u2(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;u2(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function no(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)a2(o,l.alternate,l),l=l.sibling}function Il(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:hs(4,l,l.return),Il(l);break;case 1:ui(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&JT(l,l.return,d),Il(l);break;case 27:Yd(l.stateNode);case 26:case 5:ui(l,l.return),Il(l);break;case 22:l.memoizedState===null&&Il(l);break;case 30:Il(l);break;default:Il(l)}o=o.sibling}}function ro(o,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,_=o,j=l,M=j.flags;switch(j.tag){case 0:case 11:case 15:ro(_,j,d),Ld(4,j);break;case 1:if(ro(_,j,d),g=j,_=g.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(ue){yt(g,g.return,ue)}if(g=j,_=g.updateQueue,_!==null){var U=g.stateNode;try{var Q=_.shared.hiddenCallbacks;if(Q!==null)for(_.shared.hiddenCallbacks=null,_=0;_<Q.length;_++)UN(Q[_],U)}catch(ue){yt(g,g.return,ue)}}d&&M&64&&ZT(j),zd(j,j.return);break;case 27:n2(j);case 26:case 5:ro(_,j,d),d&&g===null&&M&4&&e2(j),zd(j,j.return);break;case 12:ro(_,j,d);break;case 31:ro(_,j,d),d&&M&4&&s2(_,j);break;case 13:ro(_,j,d),d&&M&4&&l2(_,j);break;case 22:j.memoizedState===null&&ro(_,j,d),zd(j,j.return);break;case 30:break;default:ro(_,j,d)}l=l.sibling}}function Xx(o,l){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&_d(d))}function Wx(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&_d(o))}function ka(o,l,d,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)f2(o,l,d,g),l=l.sibling}function f2(o,l,d,g){var _=l.flags;switch(l.tag){case 0:case 11:case 15:ka(o,l,d,g),_&2048&&Ld(9,l);break;case 1:ka(o,l,d,g);break;case 3:ka(o,l,d,g),_&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&_d(o)));break;case 12:if(_&2048){ka(o,l,d,g),o=l.stateNode;try{var j=l.memoizedProps,M=j.id,U=j.onPostCommit;typeof U=="function"&&U(M,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Q){yt(l,l.return,Q)}}else ka(o,l,d,g);break;case 31:ka(o,l,d,g);break;case 13:ka(o,l,d,g);break;case 23:break;case 22:j=l.stateNode,M=l.alternate,l.memoizedState!==null?j._visibility&2?ka(o,l,d,g):$d(o,l):j._visibility&2?ka(o,l,d,g):(j._visibility|=2,wu(o,l,d,g,(l.subtreeFlags&10256)!==0||!1)),_&2048&&Xx(M,l);break;case 24:ka(o,l,d,g),_&2048&&Wx(l.alternate,l);break;default:ka(o,l,d,g)}}function wu(o,l,d,g,_){for(_=_&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var j=o,M=l,U=d,Q=g,ue=M.flags;switch(M.tag){case 0:case 11:case 15:wu(j,M,U,Q,_),Ld(8,M);break;case 23:break;case 22:var he=M.stateNode;M.memoizedState!==null?he._visibility&2?wu(j,M,U,Q,_):$d(j,M):(he._visibility|=2,wu(j,M,U,Q,_)),_&&ue&2048&&Xx(M.alternate,M);break;case 24:wu(j,M,U,Q,_),_&&ue&2048&&Wx(M.alternate,M);break;default:wu(j,M,U,Q,_)}l=l.sibling}}function $d(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=o,g=l,_=g.flags;switch(g.tag){case 22:$d(d,g),_&2048&&Xx(g.alternate,g);break;case 24:$d(d,g),_&2048&&Wx(g.alternate,g);break;default:$d(d,g)}l=l.sibling}}var Bd=8192;function Su(o,l,d){if(o.subtreeFlags&Bd)for(o=o.child;o!==null;)d2(o,l,d),o=o.sibling}function d2(o,l,d){switch(o.tag){case 26:Su(o,l,d),o.flags&Bd&&o.memoizedState!==null&&PK(d,Ra,o.memoizedState,o.memoizedProps);break;case 5:Su(o,l,d);break;case 3:case 4:var g=Ra;Ra=cv(o.stateNode.containerInfo),Su(o,l,d),Ra=g;break;case 22:o.memoizedState===null&&(g=o.alternate,g!==null&&g.memoizedState!==null?(g=Bd,Bd=16777216,Su(o,l,d),Bd=g):Su(o,l,d));break;default:Su(o,l,d)}}function h2(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function Ud(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];Rn=g,p2(g,o)}h2(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)m2(o),o=o.sibling}function m2(o){switch(o.tag){case 0:case 11:case 15:Ud(o),o.flags&2048&&hs(9,o,o.return);break;case 3:Ud(o);break;case 12:Ud(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Wp(o)):Ud(o);break;default:Ud(o)}}function Wp(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];Rn=g,p2(g,o)}h2(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:hs(8,l,l.return),Wp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Wp(l));break;default:Wp(l)}o=o.sibling}}function p2(o,l){for(;Rn!==null;){var d=Rn;switch(d.tag){case 0:case 11:case 15:hs(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var g=d.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:_d(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,Rn=g;else e:for(d=o;Rn!==null;){g=Rn;var _=g.sibling,j=g.return;if(i2(g),g===d){Rn=null;break e}if(_!==null){_.return=j,Rn=_;break e}Rn=j}}}var V7={getCacheForType:function(o){var l=qn(ln),d=l.data.get(o);return d===void 0&&(d=o(),l.data.set(o,d)),d},cacheSignal:function(){return qn(ln).controller.signal}},Y7=typeof WeakMap=="function"?WeakMap:Map,mt=0,Ot=null,Qe=null,Je=0,gt=0,Kr=null,ms=!1,Eu=!1,Qx=!1,ao=0,Wt=0,ps=0,Ll=0,Zx=0,Vr=0,_u=0,Hd=null,Nr=null,Jx=!1,Qp=0,v2=0,Zp=1/0,Jp=null,vs=null,Sn=0,gs=null,ju=null,io=0,ew=0,tw=null,g2=null,Fd=0,nw=null;function Yr(){return(mt&2)!==0&&Je!==0?Je&-Je:R.T!==null?lw():cd()}function y2(){if(Vr===0)if((Je&536870912)===0||nt){var o=Xo;Xo<<=1,(Xo&3932160)===0&&(Xo=262144),Vr=o}else Vr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Vr}function Tr(o,l,d){(o===Ot&&(gt===2||gt===9)||o.cancelPendingCommit!==null)&&(Cu(o,0),ys(o,Je,Vr,!1)),Mt(o,d),((mt&2)===0||o!==Ot)&&(o===Ot&&((mt&2)===0&&(Ll|=d),Wt===4&&ys(o,Je,Vr,!1)),fi(o))}function b2(o,l,d){if((mt&6)!==0)throw Error(r(327));var g=!d&&(l&127)===0&&(l&o.expiredLanes)===0||Nt(o,l),_=g?W7(o,l):aw(o,l,!0),j=g;do{if(_===0){Eu&&!g&&ys(o,l,0,!1);break}else{if(d=o.current.alternate,j&&!G7(d)){_=aw(o,l,!1),j=!1;continue}if(_===2){if(j=l,o.errorRecoveryDisabledLanes&j)var M=0;else M=o.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){l=M;e:{var U=o;_=Hd;var Q=U.current.memoizedState.isDehydrated;if(Q&&(Cu(U,M).flags|=256),M=aw(U,M,!1),M!==2){if(Qx&&!Q){U.errorRecoveryDisabledLanes|=j,Ll|=j,_=4;break e}j=Nr,Nr=_,j!==null&&(Nr===null?Nr=j:Nr.push.apply(Nr,j))}_=M}if(j=!1,_!==2)continue}}if(_===1){Cu(o,0),ys(o,l,0,!0);break}e:{switch(g=o,j=_,j){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ys(g,l,Vr,!ms);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(_=Qp+300-lt(),10<_)){if(ys(g,l,Vr,!ms),Be(g,0,!0)!==0)break e;io=l,g.timeoutHandle=W2(x2.bind(null,g,d,Nr,Jp,Jx,l,Vr,Ll,_u,ms,j,"Throttled",-0,0),_);break e}x2(g,d,Nr,Jp,Jx,l,Vr,Ll,_u,ms,j,null,-0,0)}}break}while(!0);fi(o)}function x2(o,l,d,g,_,j,M,U,Q,ue,he,ve,fe,de){if(o.timeoutHandle=-1,ve=l.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qi},d2(l,j,ve);var Ae=(j&62914560)===j?Qp-lt():(j&4194048)===j?v2-lt():0;if(Ae=MK(ve,Ae),Ae!==null){io=j,o.cancelPendingCommit=Ae(A2.bind(null,o,l,j,d,g,_,M,U,Q,he,ve,null,fe,de)),ys(o,j,M,!ue);return}}A2(o,l,j,d,g,_,M,U,Q)}function G7(o){for(var l=o;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var _=d[g],j=_.getSnapshot;_=_.value;try{if(!Ur(j(),_))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ys(o,l,d,g){l&=~Zx,l&=~Ll,o.suspendedLanes|=l,o.pingedLanes&=~l,g&&(o.warmLanes|=l),g=o.expirationTimes;for(var _=l;0<_;){var j=31-Pn(_),M=1<<j;g[j]=-1,_&=~M}d!==0&&Bi(o,d,l)}function ev(){return(mt&6)===0?(qd(0),!1):!0}function rw(){if(Qe!==null){if(gt===0)var o=Qe.return;else o=Qe,Gi=Al=null,bx(o),vu=null,Cd=0,o=Qe;for(;o!==null;)QT(o.alternate,o),o=o.return;Qe=null}}function Cu(o,l){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,mK(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),io=0,rw(),Ot=o,Qe=d=Vi(o.current,null),Je=l,gt=0,Kr=null,ms=!1,Eu=Nt(o,l),Qx=!1,_u=Vr=Zx=Ll=ps=Wt=0,Nr=Hd=null,Jx=!1,(l&8)!==0&&(l|=l&32);var g=o.entangledLanes;if(g!==0)for(o=o.entanglements,g&=l;0<g;){var _=31-Pn(g),j=1<<_;l|=o[_],g&=~j}return ao=l,wp(),d}function w2(o,l){qe=null,R.H=kd,l===pu||l===Np?(l=LN(),gt=3):l===sx?(l=LN(),gt=4):gt=l===Dx?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Kr=l,Qe===null&&(Wt=1,Fp(o,la(l,o.current)))}function S2(){var o=Fr.current;return o===null?!0:(Je&4194048)===Je?da===null:(Je&62914560)===Je||(Je&536870912)!==0?o===da:!1}function E2(){var o=R.H;return R.H=kd,o===null?kd:o}function _2(){var o=R.A;return R.A=V7,o}function tv(){Wt=4,ms||(Je&4194048)!==Je&&Fr.current!==null||(Eu=!0),(ps&134217727)===0&&(Ll&134217727)===0||Ot===null||ys(Ot,Je,Vr,!1)}function aw(o,l,d){var g=mt;mt|=2;var _=E2(),j=_2();(Ot!==o||Je!==l)&&(Jp=null,Cu(o,l)),l=!1;var M=Wt;e:do try{if(gt!==0&&Qe!==null){var U=Qe,Q=Kr;switch(gt){case 8:rw(),M=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(l=!0);var ue=gt;if(gt=0,Kr=null,Ou(o,U,Q,ue),d&&Eu){M=0;break e}break;default:ue=gt,gt=0,Kr=null,Ou(o,U,Q,ue)}}X7(),M=Wt;break}catch(he){w2(o,he)}while(!0);return l&&o.shellSuspendCounter++,Gi=Al=null,mt=g,R.H=_,R.A=j,Qe===null&&(Ot=null,Je=0,wp()),M}function X7(){for(;Qe!==null;)j2(Qe)}function W7(o,l){var d=mt;mt|=2;var g=E2(),_=_2();Ot!==o||Je!==l?(Jp=null,Zp=lt()+500,Cu(o,l)):Eu=Nt(o,l);e:do try{if(gt!==0&&Qe!==null){l=Qe;var j=Kr;t:switch(gt){case 1:gt=0,Kr=null,Ou(o,l,j,1);break;case 2:case 9:if(DN(j)){gt=0,Kr=null,C2(l);break}l=function(){gt!==2&&gt!==9||Ot!==o||(gt=7),fi(o)},j.then(l,l);break e;case 3:gt=7;break e;case 4:gt=5;break e;case 7:DN(j)?(gt=0,Kr=null,C2(l)):(gt=0,Kr=null,Ou(o,l,j,7));break;case 5:var M=null;switch(Qe.tag){case 26:M=Qe.memoizedState;case 5:case 27:var U=Qe;if(M?fP(M):U.stateNode.complete){gt=0,Kr=null;var Q=U.sibling;if(Q!==null)Qe=Q;else{var ue=U.return;ue!==null?(Qe=ue,nv(ue)):Qe=null}break t}}gt=0,Kr=null,Ou(o,l,j,5);break;case 6:gt=0,Kr=null,Ou(o,l,j,6);break;case 8:rw(),Wt=6;break e;default:throw Error(r(462))}}Q7();break}catch(he){w2(o,he)}while(!0);return Gi=Al=null,R.H=g,R.A=_,mt=d,Qe!==null?0:(Ot=null,Je=0,wp(),Wt)}function Q7(){for(;Qe!==null&&!Lt();)j2(Qe)}function j2(o){var l=XT(o.alternate,o,ao);o.memoizedProps=o.pendingProps,l===null?nv(o):Qe=l}function C2(o){var l=o,d=l.alternate;switch(l.tag){case 15:case 0:l=FT(d,l,l.pendingProps,l.type,void 0,Je);break;case 11:l=FT(d,l,l.pendingProps,l.type.render,l.ref,Je);break;case 5:bx(l);default:QT(d,l),l=Qe=_N(l,ao),l=XT(d,l,ao)}o.memoizedProps=o.pendingProps,l===null?nv(o):Qe=l}function Ou(o,l,d,g){Gi=Al=null,bx(l),vu=null,Cd=0;var _=l.return;try{if($7(o,_,l,d,Je)){Wt=1,Fp(o,la(d,o.current)),Qe=null;return}}catch(j){if(_!==null)throw Qe=_,j;Wt=1,Fp(o,la(d,o.current)),Qe=null;return}l.flags&32768?(nt||g===1?o=!0:Eu||(Je&536870912)!==0?o=!1:(ms=o=!0,(g===2||g===9||g===3||g===6)&&(g=Fr.current,g!==null&&g.tag===13&&(g.flags|=16384))),O2(l,o)):nv(l)}function nv(o){var l=o;do{if((l.flags&32768)!==0){O2(l,ms);return}o=l.return;var d=H7(l.alternate,l,ao);if(d!==null){Qe=d;return}if(l=l.sibling,l!==null){Qe=l;return}Qe=l=o}while(l!==null);Wt===0&&(Wt=5)}function O2(o,l){do{var d=F7(o.alternate,o);if(d!==null){d.flags&=32767,Qe=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(o=o.sibling,o!==null)){Qe=o;return}Qe=o=d}while(o!==null);Wt=6,Qe=null}function A2(o,l,d,g,_,j,M,U,Q){o.cancelPendingCommit=null;do rv();while(Sn!==0);if((mt&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(j=l.lanes|l.childLanes,j|=Vb,Jn(o,d,j,M,U,Q),o===Ot&&(Qe=Ot=null,Je=0),ju=l,gs=o,io=d,ew=j,tw=_,g2=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,tK(ai,function(){return R2(),null})):(o.callbackNode=null,o.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=R.T,R.T=null,_=H.p,H.p=2,M=mt,mt|=4;try{q7(o,l,d)}finally{mt=M,H.p=_,R.T=g}}Sn=1,N2(),T2(),P2()}}function N2(){if(Sn===1){Sn=0;var o=gs,l=ju,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=R.T,R.T=null;var g=H.p;H.p=2;var _=mt;mt|=4;try{c2(l,o);var j=vw,M=pN(o.containerInfo),U=j.focusedElem,Q=j.selectionRange;if(M!==U&&U&&U.ownerDocument&&mN(U.ownerDocument.documentElement,U)){if(Q!==null&&Ub(U)){var ue=Q.start,he=Q.end;if(he===void 0&&(he=ue),"selectionStart"in U)U.selectionStart=ue,U.selectionEnd=Math.min(he,U.value.length);else{var ve=U.ownerDocument||document,fe=ve&&ve.defaultView||window;if(fe.getSelection){var de=fe.getSelection(),Ae=U.textContent.length,ze=Math.min(Q.start,Ae),wt=Q.end===void 0?ze:Math.min(Q.end,Ae);!de.extend&&ze>wt&&(M=wt,wt=ze,ze=M);var ie=hN(U,ze),te=hN(U,wt);if(ie&&te&&(de.rangeCount!==1||de.anchorNode!==ie.node||de.anchorOffset!==ie.offset||de.focusNode!==te.node||de.focusOffset!==te.offset)){var ce=ve.createRange();ce.setStart(ie.node,ie.offset),de.removeAllRanges(),ze>wt?(de.addRange(ce),de.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),de.addRange(ce))}}}}for(ve=[],de=U;de=de.parentNode;)de.nodeType===1&&ve.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ve.length;U++){var pe=ve[U];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}pv=!!pw,vw=pw=null}finally{mt=_,H.p=g,R.T=d}}o.current=l,Sn=2}}function T2(){if(Sn===2){Sn=0;var o=gs,l=ju,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=R.T,R.T=null;var g=H.p;H.p=2;var _=mt;mt|=4;try{a2(o,l.alternate,l)}finally{mt=_,H.p=g,R.T=d}}Sn=3}}function P2(){if(Sn===4||Sn===3){Sn=0,we();var o=gs,l=ju,d=io,g=g2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Sn=5:(Sn=0,ju=gs=null,M2(o,o.pendingLanes));var _=o.pendingLanes;if(_===0&&(vs=null),Br(d),l=l.stateNode,Hn&&typeof Hn.onCommitFiberRoot=="function")try{Hn.onCommitFiberRoot(zi,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=R.T,_=H.p,H.p=2,R.T=null;try{for(var j=o.onRecoverableError,M=0;M<g.length;M++){var U=g[M];j(U.value,{componentStack:U.stack})}}finally{R.T=l,H.p=_}}(io&3)!==0&&rv(),fi(o),_=o.pendingLanes,(d&261930)!==0&&(_&42)!==0?o===nw?Fd++:(Fd=0,nw=o):Fd=0,qd(0)}}function M2(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,_d(l)))}function rv(){return N2(),T2(),P2(),R2()}function R2(){if(Sn!==5)return!1;var o=gs,l=ew;ew=0;var d=Br(io),g=R.T,_=H.p;try{H.p=32>d?32:d,R.T=null,d=tw,tw=null;var j=gs,M=io;if(Sn=0,ju=gs=null,io=0,(mt&6)!==0)throw Error(r(331));var U=mt;if(mt|=4,m2(j.current),f2(j,j.current,M,d),mt=U,qd(0,!1),Hn&&typeof Hn.onPostCommitFiberRoot=="function")try{Hn.onPostCommitFiberRoot(zi,j)}catch{}return!0}finally{H.p=_,R.T=g,M2(o,l)}}function k2(o,l,d){l=la(d,l),l=kx(o.stateNode,l,2),o=us(o,l,2),o!==null&&(Mt(o,2),fi(o))}function yt(o,l,d){if(o.tag===3)k2(o,o,d);else for(;l!==null;){if(l.tag===3){k2(l,o,d);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(vs===null||!vs.has(g))){o=la(d,o),d=DT(2),g=us(l,d,2),g!==null&&(IT(d,g,l,o),Mt(g,2),fi(g));break}}l=l.return}}function iw(o,l,d){var g=o.pingCache;if(g===null){g=o.pingCache=new Y7;var _=new Set;g.set(l,_)}else _=g.get(l),_===void 0&&(_=new Set,g.set(l,_));_.has(d)||(Qx=!0,_.add(d),o=Z7.bind(null,o,l,d),l.then(o,o))}function Z7(o,l,d){var g=o.pingCache;g!==null&&g.delete(l),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,Ot===o&&(Je&d)===d&&(Wt===4||Wt===3&&(Je&62914560)===Je&&300>lt()-Qp?(mt&2)===0&&Cu(o,0):Zx|=d,_u===Je&&(_u=0)),fi(o)}function D2(o,l){l===0&&(l=Mn()),o=jl(o,l),o!==null&&(Mt(o,l),fi(o))}function J7(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),D2(o,d)}function eK(o,l){var d=0;switch(o.tag){case 31:case 13:var g=o.stateNode,_=o.memoizedState;_!==null&&(d=_.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),D2(o,d)}function tK(o,l){return Qn(o,l)}var av=null,Au=null,ow=!1,iv=!1,sw=!1,bs=0;function fi(o){o!==Au&&o.next===null&&(Au===null?av=Au=o:Au=Au.next=o),iv=!0,ow||(ow=!0,rK())}function qd(o,l){if(!sw&&iv){sw=!0;do for(var d=!1,g=av;g!==null;){if(o!==0){var _=g.pendingLanes;if(_===0)var j=0;else{var M=g.suspendedLanes,U=g.pingedLanes;j=(1<<31-Pn(42|o)+1)-1,j&=_&~(M&~U),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(d=!0,$2(g,j))}else j=Je,j=Be(g,g===Ot?j:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(j&3)===0||Nt(g,j)||(d=!0,$2(g,j));g=g.next}while(d);sw=!1}}function nK(){I2()}function I2(){iv=ow=!1;var o=0;bs!==0&&hK()&&(o=bs);for(var l=lt(),d=null,g=av;g!==null;){var _=g.next,j=L2(g,l);j===0?(g.next=null,d===null?av=_:d.next=_,_===null&&(Au=d)):(d=g,(o!==0||(j&3)!==0)&&(iv=!0)),g=_}Sn!==0&&Sn!==5||qd(o),bs!==0&&(bs=0)}function L2(o,l){for(var d=o.suspendedLanes,g=o.pingedLanes,_=o.expirationTimes,j=o.pendingLanes&-62914561;0<j;){var M=31-Pn(j),U=1<<M,Q=_[M];Q===-1?((U&d)===0||(U&g)!==0)&&(_[M]=on(U,l)):Q<=l&&(o.expiredLanes|=U),j&=~U}if(l=Ot,d=Je,d=Be(o,o===l?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g=o.callbackNode,d===0||o===l&&(gt===2||gt===9)||o.cancelPendingCommit!==null)return g!==null&&g!==null&&Sr(g),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||Nt(o,d)){if(l=d&-d,l===o.callbackPriority)return l;switch(g!==null&&Sr(g),Br(d)){case 2:case 8:d=ri;break;case 32:d=ai;break;case 268435456:d=zr;break;default:d=ai}return g=z2.bind(null,o),d=Qn(d,g),o.callbackPriority=l,o.callbackNode=d,l}return g!==null&&g!==null&&Sr(g),o.callbackPriority=2,o.callbackNode=null,2}function z2(o,l){if(Sn!==0&&Sn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(rv()&&o.callbackNode!==d)return null;var g=Je;return g=Be(o,o===Ot?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g===0?null:(b2(o,g,l),L2(o,lt()),o.callbackNode!=null&&o.callbackNode===d?z2.bind(null,o):null)}function $2(o,l){if(rv())return null;b2(o,l,!0)}function rK(){pK(function(){(mt&6)!==0?Qn(Zn,nK):I2()})}function lw(){if(bs===0){var o=hu;o===0&&(o=Go,Go<<=1,(Go&261888)===0&&(Go=256)),bs=o}return bs}function B2(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:hp(""+o)}function U2(o,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,o.id&&d.setAttribute("form",o.id),l.parentNode.insertBefore(d,l),o=new FormData(o),d.parentNode.removeChild(d),o}function aK(o,l,d,g,_){if(l==="submit"&&d&&d.stateNode===_){var j=B2((_[nr]||null).action),M=g.submitter;M&&(l=(l=M[nr]||null)?B2(l.formAction):M.getAttribute("formAction"),l!==null&&(j=l,M=null));var U=new gp("action","action",null,g,_);o.push({event:U,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(bs!==0){var Q=M?U2(_,M):new FormData(_);Ax(d,{pending:!0,data:Q,method:_.method,action:j},null,Q)}}else typeof j=="function"&&(U.preventDefault(),Q=M?U2(_,M):new FormData(_),Ax(d,{pending:!0,data:Q,method:_.method,action:j},j,Q))},currentTarget:_}]})}}for(var cw=0;cw<Kb.length;cw++){var uw=Kb[cw],iK=uw.toLowerCase(),oK=uw[0].toUpperCase()+uw.slice(1);Ma(iK,"on"+oK)}Ma(yN,"onAnimationEnd"),Ma(bN,"onAnimationIteration"),Ma(xN,"onAnimationStart"),Ma("dblclick","onDoubleClick"),Ma("focusin","onFocus"),Ma("focusout","onBlur"),Ma(S7,"onTransitionRun"),Ma(E7,"onTransitionStart"),Ma(_7,"onTransitionCancel"),Ma(wN,"onTransitionEnd"),ts("onMouseEnter",["mouseout","mouseover"]),ts("onMouseLeave",["mouseout","mouseover"]),ts("onPointerEnter",["pointerout","pointerover"]),ts("onPointerLeave",["pointerout","pointerover"]),Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kd="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(" "),sK=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kd));function H2(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var g=o[d],_=g.event;g=g.listeners;e:{var j=void 0;if(l)for(var M=g.length-1;0<=M;M--){var U=g[M],Q=U.instance,ue=U.currentTarget;if(U=U.listener,Q!==j&&_.isPropagationStopped())break e;j=U,_.currentTarget=ue;try{j(_)}catch(he){xp(he)}_.currentTarget=null,j=Q}else for(M=0;M<g.length;M++){if(U=g[M],Q=U.instance,ue=U.currentTarget,U=U.listener,Q!==j&&_.isPropagationStopped())break e;j=U,_.currentTarget=ue;try{j(_)}catch(he){xp(he)}_.currentTarget=null,j=Q}}}}function Ze(o,l){var d=l[Zc];d===void 0&&(d=l[Zc]=new Set);var g=o+"__bubble";d.has(g)||(F2(l,o,2,!1),d.add(g))}function fw(o,l,d){var g=0;l&&(g|=4),F2(d,o,g,l)}var ov="_reactListening"+Math.random().toString(36).slice(2);function dw(o){if(!o[ov]){o[ov]=!0,sp.forEach(function(d){d!=="selectionchange"&&(sK.has(d)||fw(d,!1,o),fw(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[ov]||(l[ov]=!0,fw("selectionchange",!1,l))}}function F2(o,l,d,g){switch(yP(l)){case 2:var _=DK;break;case 8:_=IK;break;default:_=Ow}d=_.bind(null,l,d,o),_=void 0,!Mb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(_=!0),g?_!==void 0?o.addEventListener(l,d,{capture:!0,passive:_}):o.addEventListener(l,d,!0):_!==void 0?o.addEventListener(l,d,{passive:_}):o.addEventListener(l,d,!1)}function hw(o,l,d,g,_){var j=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var M=g.tag;if(M===3||M===4){var U=g.stateNode.containerInfo;if(U===_)break;if(M===4)for(M=g.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===_)return;M=M.return}for(;U!==null;){if(M=Qo(U),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){g=j=M;continue e}U=U.parentNode}}g=g.return}GA(function(){var ue=j,he=Tb(d),ve=[];e:{var fe=SN.get(o);if(fe!==void 0){var de=gp,Ae=o;switch(o){case"keypress":if(pp(d)===0)break e;case"keydown":case"keyup":de=e7;break;case"focusin":Ae="focus",de=Ib;break;case"focusout":Ae="blur",de=Ib;break;case"beforeblur":case"afterblur":de=Ib;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=QA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=H9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=r7;break;case yN:case bN:case xN:de=K9;break;case wN:de=i7;break;case"scroll":case"scrollend":de=B9;break;case"wheel":de=s7;break;case"copy":case"cut":case"paste":de=Y9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=JA;break;case"toggle":case"beforetoggle":de=c7}var ze=(l&4)!==0,wt=!ze&&(o==="scroll"||o==="scrollend"),ie=ze?fe!==null?fe+"Capture":null:fe;ze=[];for(var te=ue,ce;te!==null;){var pe=te;if(ce=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ce===null||ie===null||(pe=hd(te,ie),pe!=null&&ze.push(Vd(te,pe,ce))),wt)break;te=te.return}0<ze.length&&(fe=new de(fe,Ae,null,d,he),ve.push({event:fe,listeners:ze}))}}if((l&7)===0){e:{if(fe=o==="mouseover"||o==="pointerover",de=o==="mouseout"||o==="pointerout",fe&&d!==Nb&&(Ae=d.relatedTarget||d.fromElement)&&(Qo(Ae)||Ae[Ui]))break e;if((de||fe)&&(fe=he.window===he?he:(fe=he.ownerDocument)?fe.defaultView||fe.parentWindow:window,de?(Ae=d.relatedTarget||d.toElement,de=ue,Ae=Ae?Qo(Ae):null,Ae!==null&&(wt=i(Ae),ze=Ae.tag,Ae!==wt||ze!==5&&ze!==27&&ze!==6)&&(Ae=null)):(de=null,Ae=ue),de!==Ae)){if(ze=QA,pe="onMouseLeave",ie="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(ze=JA,pe="onPointerLeave",ie="onPointerEnter",te="pointer"),wt=de==null?fe:Jo(de),ce=Ae==null?fe:Jo(Ae),fe=new ze(pe,te+"leave",de,d,he),fe.target=wt,fe.relatedTarget=ce,pe=null,Qo(he)===ue&&(ze=new ze(ie,te+"enter",Ae,d,he),ze.target=ce,ze.relatedTarget=wt,pe=ze),wt=pe,de&&Ae)t:{for(ze=lK,ie=de,te=Ae,ce=0,pe=ie;pe;pe=ze(pe))ce++;pe=0;for(var Le=te;Le;Le=ze(Le))pe++;for(;0<ce-pe;)ie=ze(ie),ce--;for(;0<pe-ce;)te=ze(te),pe--;for(;ce--;){if(ie===te||te!==null&&ie===te.alternate){ze=ie;break t}ie=ze(ie),te=ze(te)}ze=null}else ze=null;de!==null&&q2(ve,fe,de,ze,!1),Ae!==null&&wt!==null&&q2(ve,wt,Ae,ze,!0)}}e:{if(fe=ue?Jo(ue):window,de=fe.nodeName&&fe.nodeName.toLowerCase(),de==="select"||de==="input"&&fe.type==="file")var ct=sN;else if(iN(fe))if(lN)ct=b7;else{ct=g7;var Re=v7}else de=fe.nodeName,!de||de.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&Ab(ue.elementType)&&(ct=sN):ct=y7;if(ct&&(ct=ct(o,ue))){oN(ve,ct,d,he);break e}Re&&Re(o,fe,ue),o==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&dd(fe,"number",fe.value)}switch(Re=ue?Jo(ue):window,o){case"focusin":(iN(Re)||Re.contentEditable==="true")&&(iu=Re,Hb=ue,wd=null);break;case"focusout":wd=Hb=iu=null;break;case"mousedown":Fb=!0;break;case"contextmenu":case"mouseup":case"dragend":Fb=!1,vN(ve,d,he);break;case"selectionchange":if(w7)break;case"keydown":case"keyup":vN(ve,d,he)}var Ve;if(zb)e:{switch(o){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else au?rN(o,d)&&(et="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(et="onCompositionStart");et&&(eN&&d.locale!=="ko"&&(au||et!=="onCompositionStart"?et==="onCompositionEnd"&&au&&(Ve=XA()):(rs=he,Rb="value"in rs?rs.value:rs.textContent,au=!0)),Re=sv(ue,et),0<Re.length&&(et=new ZA(et,o,null,d,he),ve.push({event:et,listeners:Re}),Ve?et.data=Ve:(Ve=aN(d),Ve!==null&&(et.data=Ve)))),(Ve=f7?d7(o,d):h7(o,d))&&(et=sv(ue,"onBeforeInput"),0<et.length&&(Re=new ZA("onBeforeInput","beforeinput",null,d,he),ve.push({event:Re,listeners:et}),Re.data=Ve)),aK(ve,o,ue,d,he)}H2(ve,l)})}function Vd(o,l,d){return{instance:o,listener:l,currentTarget:d}}function sv(o,l){for(var d=l+"Capture",g=[];o!==null;){var _=o,j=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||j===null||(_=hd(o,d),_!=null&&g.unshift(Vd(o,_,j)),_=hd(o,l),_!=null&&g.push(Vd(o,_,j))),o.tag===3)return g;o=o.return}return[]}function lK(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function q2(o,l,d,g,_){for(var j=l._reactName,M=[];d!==null&&d!==g;){var U=d,Q=U.alternate,ue=U.stateNode;if(U=U.tag,Q!==null&&Q===g)break;U!==5&&U!==26&&U!==27||ue===null||(Q=ue,_?(ue=hd(d,j),ue!=null&&M.unshift(Vd(d,ue,Q))):_||(ue=hd(d,j),ue!=null&&M.push(Vd(d,ue,Q)))),d=d.return}M.length!==0&&o.push({event:l,listeners:M})}var cK=/\r\n?/g,uK=/\u0000|\uFFFD/g;function K2(o){return(typeof o=="string"?o:""+o).replace(cK,`
`).replace(uK,"")}function V2(o,l){return l=K2(l),K2(o)===l}function xt(o,l,d,g,_,j){switch(d){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||tu(o,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&tu(o,""+g);break;case"className":eu(o,"class",g);break;case"tabIndex":eu(o,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":eu(o,d,g);break;case"style":VA(o,g,j);break;case"data":if(l!=="object"){eu(o,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=hp(""+g),o.setAttribute(d,g);break;case"action":case"formAction":if(typeof g=="function"){o.setAttribute(d,"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 j=="function"&&(d==="formAction"?(l!=="input"&&xt(o,l,"name",_.name,_,null),xt(o,l,"formEncType",_.formEncType,_,null),xt(o,l,"formMethod",_.formMethod,_,null),xt(o,l,"formTarget",_.formTarget,_,null)):(xt(o,l,"encType",_.encType,_,null),xt(o,l,"method",_.method,_,null),xt(o,l,"target",_.target,_,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=hp(""+g),o.setAttribute(d,g);break;case"onClick":g!=null&&(o.onclick=qi);break;case"onScroll":g!=null&&Ze("scroll",o);break;case"onScrollEnd":g!=null&&Ze("scrollend",o);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(_.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"multiple":o.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":o.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){o.removeAttribute("xlink:href");break}d=hp(""+g),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""+g):o.removeAttribute(d);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":g&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":g===!0?o.setAttribute(d,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,g):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?o.setAttribute(d,g):o.removeAttribute(d);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?o.removeAttribute(d):o.setAttribute(d,g);break;case"popover":Ze("beforetoggle",o),Ze("toggle",o),Jc(o,"popover",g);break;case"xlinkActuate":Pa(o,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":Pa(o,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":Pa(o,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":Pa(o,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":Pa(o,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":Pa(o,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":Pa(o,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":Pa(o,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":Pa(o,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Jc(o,"is",g);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=z9.get(d)||d,Jc(o,d,g))}}function mw(o,l,d,g,_,j){switch(d){case"style":VA(o,g,j);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(_.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"children":typeof g=="string"?tu(o,g):(typeof g=="number"||typeof g=="bigint")&&tu(o,""+g);break;case"onScroll":g!=null&&Ze("scroll",o);break;case"onScrollEnd":g!=null&&Ze("scrollend",o);break;case"onClick":g!=null&&(o.onclick=qi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lp.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(_=d.endsWith("Capture"),l=d.slice(2,_?d.length-7:void 0),j=o[nr]||null,j=j!=null?j[d]:null,typeof j=="function"&&o.removeEventListener(l,j,_),typeof g=="function")){typeof j!="function"&&j!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,g,_);break e}d in o?o[d]=g:g===!0?o.setAttribute(d,""):Jc(o,d,g)}}}function Vn(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",o),Ze("load",o);var g=!1,_=!1,j;for(j in d)if(d.hasOwnProperty(j)){var M=d[j];if(M!=null)switch(j){case"src":g=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:xt(o,l,j,M,d,null)}}_&&xt(o,l,"srcSet",d.srcSet,d,null),g&&xt(o,l,"src",d.src,d,null);return;case"input":Ze("invalid",o);var U=j=M=_=null,Q=null,ue=null;for(g in d)if(d.hasOwnProperty(g)){var he=d[g];if(he!=null)switch(g){case"name":_=he;break;case"type":M=he;break;case"checked":Q=he;break;case"defaultChecked":ue=he;break;case"value":j=he;break;case"defaultValue":U=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,l));break;default:xt(o,l,g,he,d,null)}}dp(o,j,U,Q,ue,M,_,!1);return;case"select":Ze("invalid",o),g=M=j=null;for(_ in d)if(d.hasOwnProperty(_)&&(U=d[_],U!=null))switch(_){case"value":j=U;break;case"defaultValue":M=U;break;case"multiple":g=U;default:xt(o,l,_,U,d,null)}l=j,d=M,o.multiple=!!g,l!=null?Fi(o,!!g,l,!1):d!=null&&Fi(o,!!g,d,!0);return;case"textarea":Ze("invalid",o),j=_=g=null;for(M in d)if(d.hasOwnProperty(M)&&(U=d[M],U!=null))switch(M){case"value":g=U;break;case"defaultValue":_=U;break;case"children":j=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(91));break;default:xt(o,l,M,U,d,null)}qA(o,g,_,j);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(g=d[Q],g!=null))switch(Q){case"selected":o.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:xt(o,l,Q,g,d,null)}return;case"dialog":Ze("beforetoggle",o),Ze("toggle",o),Ze("cancel",o),Ze("close",o);break;case"iframe":case"object":Ze("load",o);break;case"video":case"audio":for(g=0;g<Kd.length;g++)Ze(Kd[g],o);break;case"image":Ze("error",o),Ze("load",o);break;case"details":Ze("toggle",o);break;case"embed":case"source":case"link":Ze("error",o),Ze("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in d)if(d.hasOwnProperty(ue)&&(g=d[ue],g!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:xt(o,l,ue,g,d,null)}return;default:if(Ab(l)){for(he in d)d.hasOwnProperty(he)&&(g=d[he],g!==void 0&&mw(o,l,he,g,d,void 0));return}}for(U in d)d.hasOwnProperty(U)&&(g=d[U],g!=null&&xt(o,l,U,g,d,null))}function fK(o,l,d,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,j=null,M=null,U=null,Q=null,ue=null,he=null;for(de in d){var ve=d[de];if(d.hasOwnProperty(de)&&ve!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":Q=ve;default:g.hasOwnProperty(de)||xt(o,l,de,null,g,ve)}}for(var fe in g){var de=g[fe];if(ve=d[fe],g.hasOwnProperty(fe)&&(de!=null||ve!=null))switch(fe){case"type":j=de;break;case"name":_=de;break;case"checked":ue=de;break;case"defaultChecked":he=de;break;case"value":M=de;break;case"defaultValue":U=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,l));break;default:de!==ve&&xt(o,l,fe,de,g,ve)}}wl(o,M,U,Q,ue,he,j,_);return;case"select":de=M=U=fe=null;for(j in d)if(Q=d[j],d.hasOwnProperty(j)&&Q!=null)switch(j){case"value":break;case"multiple":de=Q;default:g.hasOwnProperty(j)||xt(o,l,j,null,g,Q)}for(_ in g)if(j=g[_],Q=d[_],g.hasOwnProperty(_)&&(j!=null||Q!=null))switch(_){case"value":fe=j;break;case"defaultValue":U=j;break;case"multiple":M=j;default:j!==Q&&xt(o,l,_,j,g,Q)}l=U,d=M,g=de,fe!=null?Fi(o,!!d,fe,!1):!!g!=!!d&&(l!=null?Fi(o,!!d,l,!0):Fi(o,!!d,d?[]:"",!1));return;case"textarea":de=fe=null;for(U in d)if(_=d[U],d.hasOwnProperty(U)&&_!=null&&!g.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:xt(o,l,U,null,g,_)}for(M in g)if(_=g[M],j=d[M],g.hasOwnProperty(M)&&(_!=null||j!=null))switch(M){case"value":fe=_;break;case"defaultValue":de=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:_!==j&&xt(o,l,M,_,g,j)}FA(o,fe,de);return;case"option":for(var Ae in d)if(fe=d[Ae],d.hasOwnProperty(Ae)&&fe!=null&&!g.hasOwnProperty(Ae))switch(Ae){case"selected":o.selected=!1;break;default:xt(o,l,Ae,null,g,fe)}for(Q in g)if(fe=g[Q],de=d[Q],g.hasOwnProperty(Q)&&fe!==de&&(fe!=null||de!=null))switch(Q){case"selected":o.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:xt(o,l,Q,fe,g,de)}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 ze in d)fe=d[ze],d.hasOwnProperty(ze)&&fe!=null&&!g.hasOwnProperty(ze)&&xt(o,l,ze,null,g,fe);for(ue in g)if(fe=g[ue],de=d[ue],g.hasOwnProperty(ue)&&fe!==de&&(fe!=null||de!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,l));break;default:xt(o,l,ue,fe,g,de)}return;default:if(Ab(l)){for(var wt in d)fe=d[wt],d.hasOwnProperty(wt)&&fe!==void 0&&!g.hasOwnProperty(wt)&&mw(o,l,wt,void 0,g,fe);for(he in g)fe=g[he],de=d[he],!g.hasOwnProperty(he)||fe===de||fe===void 0&&de===void 0||mw(o,l,he,fe,g,de);return}}for(var ie in d)fe=d[ie],d.hasOwnProperty(ie)&&fe!=null&&!g.hasOwnProperty(ie)&&xt(o,l,ie,null,g,fe);for(ve in g)fe=g[ve],de=d[ve],!g.hasOwnProperty(ve)||fe===de||fe==null&&de==null||xt(o,l,ve,fe,g,de)}function Y2(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dK(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),g=0;g<d.length;g++){var _=d[g],j=_.transferSize,M=_.initiatorType,U=_.duration;if(j&&U&&Y2(M)){for(M=0,U=_.responseEnd,g+=1;g<d.length;g++){var Q=d[g],ue=Q.startTime;if(ue>U)break;var he=Q.transferSize,ve=Q.initiatorType;he&&Y2(ve)&&(Q=Q.responseEnd,M+=he*(Q<U?1:(U-ue)/(Q-ue)))}if(--g,l+=8*(j+M)/(_.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var pw=null,vw=null;function lv(o){return o.nodeType===9?o:o.ownerDocument}function G2(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function X2(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function gw(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var yw=null;function hK(){var o=window.event;return o&&o.type==="popstate"?o===yw?!1:(yw=o,!0):(yw=null,!1)}var W2=typeof setTimeout=="function"?setTimeout:void 0,mK=typeof clearTimeout=="function"?clearTimeout:void 0,Q2=typeof Promise=="function"?Promise:void 0,pK=typeof queueMicrotask=="function"?queueMicrotask:typeof Q2<"u"?function(o){return Q2.resolve(null).then(o).catch(vK)}:W2;function vK(o){setTimeout(function(){throw o})}function xs(o){return o==="head"}function Z2(o,l){var d=l,g=0;do{var _=d.nextSibling;if(o.removeChild(d),_&&_.nodeType===8)if(d=_.data,d==="/$"||d==="/&"){if(g===0){o.removeChild(_),Mu(l);return}g--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")g++;else if(d==="html")Yd(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,Yd(d);for(var j=d.firstChild;j;){var M=j.nextSibling,U=j.nodeName;j[bl]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&j.rel.toLowerCase()==="stylesheet"||d.removeChild(j),j=M}}else d==="body"&&Yd(o.ownerDocument.body);d=_}while(d);Mu(l)}function J2(o,l){var d=o;o=0;do{var g=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),g&&g.nodeType===8)if(d=g.data,d==="/$"){if(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=g}while(d)}function bw(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":bw(d),ud(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function gK(o,l,d,g){for(;o.nodeType===1;){var _=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(g){if(!o[bl])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(j=o.getAttribute("rel"),j==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(j!==_.rel||o.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||o.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||o.getAttribute("title")!==(_.title==null?null:_.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(j=o.getAttribute("src"),(j!==(_.src==null?null:_.src)||o.getAttribute("type")!==(_.type==null?null:_.type)||o.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&j&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var j=_.name==null?null:""+_.name;if(_.type==="hidden"&&o.getAttribute("name")===j)return o}else return o;if(o=ha(o.nextSibling),o===null)break}return null}function yK(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=ha(o.nextSibling),o===null))return null;return o}function eP(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=ha(o.nextSibling),o===null))return null;return o}function xw(o){return o.data==="$?"||o.data==="$~"}function ww(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function bK(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var g=function(){l(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),o._reactRetry=g}}function ha(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var Sw=null;function tP(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return ha(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function nP(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function rP(o,l,d){switch(l=lv(d),o){case"html":if(o=l.documentElement,!o)throw Error(r(452));return o;case"head":if(o=l.head,!o)throw Error(r(453));return o;case"body":if(o=l.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Yd(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);ud(o)}var ma=new Map,aP=new Set;function cv(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var oo=H.d;H.d={f:xK,r:wK,D:SK,C:EK,L:_K,m:jK,X:OK,S:CK,M:AK};function xK(){var o=oo.f(),l=ev();return o||l}function wK(o){var l=Zo(o);l!==null&&l.tag===5&&l.type==="form"?wT(l):oo.r(o)}var Nu=typeof document>"u"?null:document;function iP(o,l,d){var g=Nu;if(g&&typeof l=="string"&&l){var _=_r(l);_='link[rel="'+o+'"][href="'+_+'"]',typeof d=="string"&&(_+='[crossorigin="'+d+'"]'),aP.has(_)||(aP.add(_),o={rel:o,crossOrigin:d,href:l},g.querySelector(_)===null&&(l=g.createElement("link"),Vn(l,"link",o),sn(l),g.head.appendChild(l)))}}function SK(o){oo.D(o),iP("dns-prefetch",o,null)}function EK(o,l){oo.C(o,l),iP("preconnect",o,l)}function _K(o,l,d){oo.L(o,l,d);var g=Nu;if(g&&o&&l){var _='link[rel="preload"][as="'+_r(l)+'"]';l==="image"&&d&&d.imageSrcSet?(_+='[imagesrcset="'+_r(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(_+='[imagesizes="'+_r(d.imageSizes)+'"]')):_+='[href="'+_r(o)+'"]';var j=_;switch(l){case"style":j=Tu(o);break;case"script":j=Pu(o)}ma.has(j)||(o=h({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),ma.set(j,o),g.querySelector(_)!==null||l==="style"&&g.querySelector(Gd(j))||l==="script"&&g.querySelector(Xd(j))||(l=g.createElement("link"),Vn(l,"link",o),sn(l),g.head.appendChild(l)))}}function jK(o,l){oo.m(o,l);var d=Nu;if(d&&o){var g=l&&typeof l.as=="string"?l.as:"script",_='link[rel="modulepreload"][as="'+_r(g)+'"][href="'+_r(o)+'"]',j=_;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=Pu(o)}if(!ma.has(j)&&(o=h({rel:"modulepreload",href:o},l),ma.set(j,o),d.querySelector(_)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Xd(j)))return}g=d.createElement("link"),Vn(g,"link",o),sn(g),d.head.appendChild(g)}}}function CK(o,l,d){oo.S(o,l,d);var g=Nu;if(g&&o){var _=es(g).hoistableStyles,j=Tu(o);l=l||"default";var M=_.get(j);if(!M){var U={loading:0,preload:null};if(M=g.querySelector(Gd(j)))U.loading=5;else{o=h({rel:"stylesheet",href:o,"data-precedence":l},d),(d=ma.get(j))&&Ew(o,d);var Q=M=g.createElement("link");sn(Q),Vn(Q,"link",o),Q._p=new Promise(function(ue,he){Q.onload=ue,Q.onerror=he}),Q.addEventListener("load",function(){U.loading|=1}),Q.addEventListener("error",function(){U.loading|=2}),U.loading|=4,uv(M,l,g)}M={type:"stylesheet",instance:M,count:1,state:U},_.set(j,M)}}}function OK(o,l){oo.X(o,l);var d=Nu;if(d&&o){var g=es(d).hoistableScripts,_=Pu(o),j=g.get(_);j||(j=d.querySelector(Xd(_)),j||(o=h({src:o,async:!0},l),(l=ma.get(_))&&_w(o,l),j=d.createElement("script"),sn(j),Vn(j,"link",o),d.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(_,j))}}function AK(o,l){oo.M(o,l);var d=Nu;if(d&&o){var g=es(d).hoistableScripts,_=Pu(o),j=g.get(_);j||(j=d.querySelector(Xd(_)),j||(o=h({src:o,async:!0,type:"module"},l),(l=ma.get(_))&&_w(o,l),j=d.createElement("script"),sn(j),Vn(j,"link",o),d.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(_,j))}}function oP(o,l,d,g){var _=(_=se.current)?cv(_):null;if(!_)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Tu(d.href),d=es(_).hoistableStyles,g=d.get(l),g||(g={type:"style",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=Tu(d.href);var j=es(_).hoistableStyles,M=j.get(o);if(M||(_=_.ownerDocument||_,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(o,M),(j=_.querySelector(Gd(o)))&&!j._p&&(M.instance=j,M.state.loading=5),ma.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ma.set(o,d),j||NK(_,o,d,M.state))),l&&g===null)throw Error(r(528,""));return M}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Pu(d),d=es(_).hoistableScripts,g=d.get(l),g||(g={type:"script",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Tu(o){return'href="'+_r(o)+'"'}function Gd(o){return'link[rel="stylesheet"]['+o+"]"}function sP(o){return h({},o,{"data-precedence":o.precedence,precedence:null})}function NK(o,l,d,g){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=o.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),Vn(l,"link",d),sn(l),o.head.appendChild(l))}function Pu(o){return'[src="'+_r(o)+'"]'}function Xd(o){return"script[async]"+o}function lP(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var g=o.querySelector('style[data-href~="'+_r(d.href)+'"]');if(g)return l.instance=g,sn(g),g;var _=h({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),sn(g),Vn(g,"style",_),uv(g,d.precedence,o),l.instance=g;case"stylesheet":_=Tu(d.href);var j=o.querySelector(Gd(_));if(j)return l.state.loading|=4,l.instance=j,sn(j),j;g=sP(d),(_=ma.get(_))&&Ew(g,_),j=(o.ownerDocument||o).createElement("link"),sn(j);var M=j;return M._p=new Promise(function(U,Q){M.onload=U,M.onerror=Q}),Vn(j,"link",g),l.state.loading|=4,uv(j,d.precedence,o),l.instance=j;case"script":return j=Pu(d.src),(_=o.querySelector(Xd(j)))?(l.instance=_,sn(_),_):(g=d,(_=ma.get(j))&&(g=h({},d),_w(g,_)),o=o.ownerDocument||o,_=o.createElement("script"),sn(_),Vn(_,"link",g),o.head.appendChild(_),l.instance=_);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,uv(g,d.precedence,o));return l.instance}function uv(o,l,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=g.length?g[g.length-1]:null,j=_,M=0;M<g.length;M++){var U=g[M];if(U.dataset.precedence===l)j=U;else if(j!==_)break}j?j.parentNode.insertBefore(o,j.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function Ew(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function _w(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var fv=null;function cP(o,l,d){if(fv===null){var g=new Map,_=fv=new Map;_.set(d,g)}else _=fv,g=_.get(d),g||(g=new Map,_.set(d,g));if(g.has(o))return g;for(g.set(o,null),d=d.getElementsByTagName(o),_=0;_<d.length;_++){var j=d[_];if(!(j[bl]||j[wn]||o==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var M=j.getAttribute(l)||"";M=o+M;var U=g.get(M);U?U.push(j):g.set(M,[j])}}return g}function uP(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function TK(o,l,d){if(d===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function fP(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function PK(o,l,d,g){if(d.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var _=Tu(g.href),j=l.querySelector(Gd(_));if(j){l=j._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=dv.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=j,sn(j);return}j=l.ownerDocument||l,g=sP(g),(_=ma.get(_))&&Ew(g,_),j=j.createElement("link"),sn(j);var M=j;M._p=new Promise(function(U,Q){M.onload=U,M.onerror=Q}),Vn(j,"link",g),d.instance=j}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=dv.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var jw=0;function MK(o,l){return o.stylesheets&&o.count===0&&mv(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var g=setTimeout(function(){if(o.stylesheets&&mv(o,o.stylesheets),o.unsuspend){var j=o.unsuspend;o.unsuspend=null,j()}},6e4+l);0<o.imgBytes&&jw===0&&(jw=62500*dK());var _=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&mv(o,o.stylesheets),o.unsuspend)){var j=o.unsuspend;o.unsuspend=null,j()}},(o.imgBytes>jw?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(g),clearTimeout(_)}}:null}function dv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mv(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var hv=null;function mv(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,hv=new Map,l.forEach(RK,o),hv=null,dv.call(o))}function RK(o,l){if(!(l.state.loading&4)){var d=hv.get(o);if(d)var g=d.get(null);else{d=new Map,hv.set(o,d);for(var _=o.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<_.length;j++){var M=_[j];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(d.set(M.dataset.precedence,M),g=M)}g&&d.set(null,g)}_=l.instance,M=_.getAttribute("data-precedence"),j=d.get(M)||g,j===g&&d.set(null,_),d.set(M,_),this.count++,g=dv.bind(this),_.addEventListener("load",g),_.addEventListener("error",g),j?j.parentNode.insertBefore(_,j.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(_,o.firstChild)),l.state.loading|=4}}var Wd={$$typeof:C,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function kK(o,l,d,g,_,j,M,U,Q){this.tag=1,this.containerInfo=o,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=oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.hiddenUpdates=oi(null),this.identifierPrefix=g,this.onUncaughtError=_,this.onCaughtError=j,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function dP(o,l,d,g,_,j,M,U,Q,ue,he,ve){return o=new kK(o,l,d,M,Q,ue,he,ve,U),l=1,j===!0&&(l|=24),j=Hr(3,null,null,l),o.current=j,j.stateNode=o,l=ax(),l.refCount++,o.pooledCache=l,l.refCount++,j.memoizedState={element:g,isDehydrated:d,cache:l},lx(j),o}function hP(o){return o?(o=lu,o):lu}function mP(o,l,d,g,_,j){_=hP(_),g.context===null?g.context=_:g.pendingContext=_,g=cs(l),g.payload={element:d},j=j===void 0?null:j,j!==null&&(g.callback=j),d=us(o,g,l),d!==null&&(Tr(d,o,l),Ad(d,o,l))}function pP(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function Cw(o,l){pP(o,l),(o=o.alternate)&&pP(o,l)}function vP(o){if(o.tag===13||o.tag===31){var l=jl(o,67108864);l!==null&&Tr(l,o,67108864),Cw(o,67108864)}}function gP(o){if(o.tag===13||o.tag===31){var l=Yr();l=Wo(l);var d=jl(o,l);d!==null&&Tr(d,o,l),Cw(o,l)}}var pv=!0;function DK(o,l,d,g){var _=R.T;R.T=null;var j=H.p;try{H.p=2,Ow(o,l,d,g)}finally{H.p=j,R.T=_}}function IK(o,l,d,g){var _=R.T;R.T=null;var j=H.p;try{H.p=8,Ow(o,l,d,g)}finally{H.p=j,R.T=_}}function Ow(o,l,d,g){if(pv){var _=Aw(g);if(_===null)hw(o,l,g,vv,d),bP(o,g);else if(zK(_,o,l,d,g))g.stopPropagation();else if(bP(o,g),l&4&&-1<LK.indexOf(o)){for(;_!==null;){var j=Zo(_);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var M=oa(j.pendingLanes);if(M!==0){var U=j;for(U.pendingLanes|=2,U.entangledLanes|=2;M;){var Q=1<<31-Pn(M);U.entanglements[1]|=Q,M&=~Q}fi(j),(mt&6)===0&&(Zp=lt()+500,qd(0))}}break;case 31:case 13:U=jl(j,2),U!==null&&Tr(U,j,2),ev(),Cw(j,2)}if(j=Aw(g),j===null&&hw(o,l,g,vv,d),j===_)break;_=j}_!==null&&g.stopPropagation()}else hw(o,l,g,null,d)}}function Aw(o){return o=Tb(o),Nw(o)}var vv=null;function Nw(o){if(vv=null,o=Qo(o),o!==null){var l=i(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=s(l),o!==null)return o;o=null}else if(d===31){if(o=c(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return vv=o,null}function yP(o){switch(o){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(xn()){case Zn:return 2;case ri:return 8;case ai:case gl:return 32;case zr:return 268435456;default:return 32}default:return 32}}var Tw=!1,ws=null,Ss=null,Es=null,Qd=new Map,Zd=new Map,_s=[],LK="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 bP(o,l){switch(o){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":Ss=null;break;case"mouseover":case"mouseout":Es=null;break;case"pointerover":case"pointerout":Qd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zd.delete(l.pointerId)}}function Jd(o,l,d,g,_,j){return o===null||o.nativeEvent!==j?(o={blockedOn:l,domEventName:d,eventSystemFlags:g,nativeEvent:j,targetContainers:[_]},l!==null&&(l=Zo(l),l!==null&&vP(l)),o):(o.eventSystemFlags|=g,l=o.targetContainers,_!==null&&l.indexOf(_)===-1&&l.push(_),o)}function zK(o,l,d,g,_){switch(l){case"focusin":return ws=Jd(ws,o,l,d,g,_),!0;case"dragenter":return Ss=Jd(Ss,o,l,d,g,_),!0;case"mouseover":return Es=Jd(Es,o,l,d,g,_),!0;case"pointerover":var j=_.pointerId;return Qd.set(j,Jd(Qd.get(j)||null,o,l,d,g,_)),!0;case"gotpointercapture":return j=_.pointerId,Zd.set(j,Jd(Zd.get(j)||null,o,l,d,g,_)),!0}return!1}function xP(o){var l=Qo(o.target);if(l!==null){var d=i(l);if(d!==null){if(l=d.tag,l===13){if(l=s(d),l!==null){o.blockedOn=l,ap(o.priority,function(){gP(d)});return}}else if(l===31){if(l=c(d),l!==null){o.blockedOn=l,ap(o.priority,function(){gP(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function gv(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=Aw(o.nativeEvent);if(d===null){d=o.nativeEvent;var g=new d.constructor(d.type,d);Nb=g,d.target.dispatchEvent(g),Nb=null}else return l=Zo(d),l!==null&&vP(l),o.blockedOn=d,!1;l.shift()}return!0}function wP(o,l,d){gv(o)&&d.delete(l)}function $K(){Tw=!1,ws!==null&&gv(ws)&&(ws=null),Ss!==null&&gv(Ss)&&(Ss=null),Es!==null&&gv(Es)&&(Es=null),Qd.forEach(wP),Zd.forEach(wP)}function yv(o,l){o.blockedOn===l&&(o.blockedOn=null,Tw||(Tw=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$K)))}var bv=null;function SP(o){bv!==o&&(bv=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bv===o&&(bv=null);for(var l=0;l<o.length;l+=3){var d=o[l],g=o[l+1],_=o[l+2];if(typeof g!="function"){if(Nw(g||d)===null)continue;break}var j=Zo(d);j!==null&&(o.splice(l,3),l-=3,Ax(j,{pending:!0,data:_,method:d.method,action:g},g,_))}}))}function Mu(o){function l(Q){return yv(Q,o)}ws!==null&&yv(ws,o),Ss!==null&&yv(Ss,o),Es!==null&&yv(Es,o),Qd.forEach(l),Zd.forEach(l);for(var d=0;d<_s.length;d++){var g=_s[d];g.blockedOn===o&&(g.blockedOn=null)}for(;0<_s.length&&(d=_s[0],d.blockedOn===null);)xP(d),d.blockedOn===null&&_s.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var _=d[g],j=d[g+1],M=_[nr]||null;if(typeof j=="function")M||SP(d);else if(M){var U=null;if(j&&j.hasAttribute("formAction")){if(_=j,M=j[nr]||null)U=M.formAction;else if(Nw(_)!==null)continue}else U=M.action;typeof U=="function"?d[g+1]=U:(d.splice(g,3),g-=3),SP(d)}}}function EP(){function o(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(M){return _=M})},focusReset:"manual",scroll:"manual"})}function l(){_!==null&&(_(),_=null),g||setTimeout(d,20)}function d(){if(!g&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,_=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){g=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),_!==null&&(_(),_=null)}}}function Pw(o){this._internalRoot=o}xv.prototype.render=Pw.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,g=Yr();mP(d,g,o,l,null,null)},xv.prototype.unmount=Pw.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;mP(o.current,2,null,o,null,null),ev(),l[Ui]=null}};function xv(o){this._internalRoot=o}xv.prototype.unstable_scheduleHydration=function(o){if(o){var l=cd();o={blockedOn:null,target:o,priority:l};for(var d=0;d<_s.length&&l!==0&&l<_s[d].priority;d++);_s.splice(d,0,o),d===0&&xP(o)}};var _P=t.version;if(_P!=="19.2.4")throw Error(r(527,_P,"19.2.4"));H.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=u(l),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var BK={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wv.isDisabled&&wv.supportsFiber)try{zi=wv.inject(BK),Hn=wv}catch{}}return th.createRoot=function(o,l){if(!a(o))throw Error(r(299));var d=!1,g="",_=PT,j=MT,M=RT;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(j=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError)),l=dP(o,1,!1,null,null,d,g,null,_,j,M,EP),o[Ui]=l.current,dw(o),new Pw(l)},th.hydrateRoot=function(o,l,d){if(!a(o))throw Error(r(299));var g=!1,_="",j=PT,M=MT,U=RT,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(_=d.identifierPrefix),d.onUncaughtError!==void 0&&(j=d.onUncaughtError),d.onCaughtError!==void 0&&(M=d.onCaughtError),d.onRecoverableError!==void 0&&(U=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=dP(o,1,!0,l,d??null,g,_,Q,j,M,U,EP),l.context=hP(null),d=l.current,g=Yr(),g=Wo(g),_=cs(g),_.callback=null,us(d,_,g),d=g,l.current.lanes=d,Mt(l,d),fi(l),o[Ui]=l.current,dw(o),new xv(l)},th.version="19.2.4",th}var DP;function ZK(){if(DP)return Iw.exports;DP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Iw.exports=QK(),Iw.exports}var JK=ZK();/**
 * react-router v7.13.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var IP="popstate";function LP(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function eV(e={}){function t(r,a){var u;let i=(u=a.state)==null?void 0:u.masked,{pathname:s,search:c,hash:f}=i||r.location;return WS("",{pathname:s,search:c,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ph(a)}return nV(t,n,null,e)}function Vt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Va(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tV(){return Math.random().toString(36).substring(2,10)}function zP(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function WS(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hf(t):t,state:n,key:t&&t.key||r||tV(),unstable_mask:a}}function Ph({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function nV(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,c="POP",f=null,u=m();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function m(){return(s.state||{idx:null}).idx}function h(){c="POP";let S=m(),E=S==null?null:S-u;u=S,f&&f({action:c,location:x.location,delta:E})}function p(S,E){c="PUSH";let O=LP(S)?S:WS(x.location,S,E);u=m()+1;let C=zP(O,u),A=x.createHref(O.unstable_mask||O);try{s.pushState(C,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(A)}i&&f&&f({action:c,location:x.location,delta:1})}function y(S,E){c="REPLACE";let O=LP(S)?S:WS(x.location,S,E);u=m();let C=zP(O,u),A=x.createHref(O.unstable_mask||O);s.replaceState(C,"",A),i&&f&&f({action:c,location:x.location,delta:0})}function w(S){return rV(S)}let x={get action(){return c},get location(){return e(a,s)},listen(S){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(IP,h),f=S,()=>{a.removeEventListener(IP,h),f=null}},createHref(S){return t(a,S)},createURL:w,encodeLocation(S){let E=w(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:p,replace:y,go(S){return s.go(S)}};return x}function rV(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Vt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ph(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function oz(e,t,n="/"){return aV(e,t,n,!1)}function aV(e,t,n,r){let a=typeof t=="string"?Hf(t):t,i=_o(a.pathname||"/",n);if(i==null)return null;let s=sz(e);iV(s);let c=null;for(let f=0;c==null&&f<s.length;++f){let u=vV(i);c=mV(s[f],u,r)}return c}function sz(e,t=[],n=[],r="",a=!1){let i=(s,c,f=a,u)=>{let m={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:c,route:s};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;Vt(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let h=ji([r,m.relativePath]),p=n.concat(m);s.children&&s.children.length>0&&(Vt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),sz(s.children,t,p,h,f)),!(s.path==null&&!s.index)&&t.push({path:h,score:dV(h,s.index),routesMeta:p})};return e.forEach((s,c)=>{var f;if(s.path===""||!((f=s.path)!=null&&f.includes("?")))i(s,c);else for(let u of lz(s.path))i(s,c,!0,u)}),t}function lz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=lz(r.join("/")),c=[];return c.push(...s.map(f=>f===""?i:[i,f].join("/"))),a&&c.push(...s),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function iV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var oV=/^:[\w-]+$/,sV=3,lV=2,cV=1,uV=10,fV=-2,$P=e=>e==="*";function dV(e,t){let n=e.split("/"),r=n.length;return n.some($P)&&(r+=fV),t&&(r+=lV),n.filter(a=>!$P(a)).reduce((a,i)=>a+(oV.test(i)?sV:i===""?cV:uV),r)}function hV(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function mV(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let c=0;c<r.length;++c){let f=r[c],u=c===r.length-1,m=i==="/"?t:t.slice(i.length)||"/",h=Eg({path:f.relativePath,caseSensitive:f.caseSensitive,end:u},m),p=f.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=Eg({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),s.push({params:a,pathname:ji([i,h.pathname]),pathnameBase:xV(ji([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=ji([i,h.pathnameBase]))}return s}function Eg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pV(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:r.reduce((u,{paramName:m,isOptional:h},p)=>{if(m==="*"){let w=c[p]||"";s=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const y=c[p];return h&&!y?u[m]=void 0:u[m]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function pV(e,t=!1,n=!0){Va(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,f,u,m)=>{if(r.push({paramName:c,isOptional:f!=null}),f){let h=m.charAt(u+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function vV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Va(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function _o(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var gV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function yV(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Hf(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=BP(n.substring(1),"/"):i=BP(n,t)):i=t,{pathname:i,search:wV(r),hash:SV(a)}}function BP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Bw(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bV(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cz(e){let t=bV(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function nj(e,t,n,r=!1){let a;typeof e=="string"?a=Hf(e):(a={...e},Vt(!a.pathname||!a.pathname.includes("?"),Bw("?","pathname","search",a)),Vt(!a.pathname||!a.pathname.includes("#"),Bw("#","pathname","hash",a)),Vt(!a.search||!a.search.includes("#"),Bw("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,c;if(s==null)c=n;else{let h=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}c=h>=0?t[h]:"/"}let f=yV(a,c),u=s&&s!=="/"&&s.endsWith("/"),m=(i||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(u||m)&&(f.pathname+="/"),f}var ji=e=>e.join("/").replace(/\/\/+/g,"/"),xV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,EV=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function _V(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jV(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var uz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fz(e,t){let n=e;if(typeof n!="string"||!gV.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(uz)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),c=_o(s.pathname,t);s.origin===i.origin&&c!=null?n=c+s.search+s.hash:a=!0}catch{Va(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dz=["POST","PUT","PATCH","DELETE"];new Set(dz);var CV=["GET",...dz];new Set(CV);var Ff=b.createContext(null);Ff.displayName="DataRouter";var Vy=b.createContext(null);Vy.displayName="DataRouterState";var OV=b.createContext(!1),hz=b.createContext({isTransitioning:!1});hz.displayName="ViewTransition";var AV=b.createContext(new Map);AV.displayName="Fetchers";var NV=b.createContext(null);NV.displayName="Await";var Aa=b.createContext(null);Aa.displayName="Navigation";var vm=b.createContext(null);vm.displayName="Location";var Za=b.createContext({outlet:null,matches:[],isDataRoute:!1});Za.displayName="Route";var rj=b.createContext(null);rj.displayName="RouteError";var mz="REACT_ROUTER_ERROR",TV="REDIRECT",PV="ROUTE_ERROR_RESPONSE";function MV(e){if(e.startsWith(`${mz}:${TV}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function RV(e){if(e.startsWith(`${mz}:${PV}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new EV(t.status,t.statusText,t.data)}catch{}}function kV(e,{relative:t}={}){Vt(gm(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(Aa),{hash:a,pathname:i,search:s}=ym(e,{relative:t}),c=i;return n!=="/"&&(c=i==="/"?n:ji([n,i])),r.createHref({pathname:c,search:s,hash:a})}function gm(){return b.useContext(vm)!=null}function ki(){return Vt(gm(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(vm).location}var pz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vz(e){b.useContext(Aa).static||b.useLayoutEffect(e)}function qf(){let{isDataRoute:e}=b.useContext(Za);return e?XV():DV()}function DV(){Vt(gm(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Ff),{basename:t,navigator:n}=b.useContext(Aa),{matches:r}=b.useContext(Za),{pathname:a}=ki(),i=JSON.stringify(cz(r)),s=b.useRef(!1);return vz(()=>{s.current=!0}),b.useCallback((f,u={})=>{if(Va(s.current,pz),!s.current)return;if(typeof f=="number"){n.go(f);return}let m=nj(f,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:ji([t,m.pathname])),(u.replace?n.replace:n.push)(m,u.state,u)},[t,n,i,a,e])}var IV=b.createContext(null);function LV(e){let t=b.useContext(Za).outlet;return b.useMemo(()=>t&&b.createElement(IV.Provider,{value:e},t),[t,e])}function aj(){let{matches:e}=b.useContext(Za),t=e[e.length-1];return t?t.params:{}}function ym(e,{relative:t}={}){let{matches:n}=b.useContext(Za),{pathname:r}=ki(),a=JSON.stringify(cz(n));return b.useMemo(()=>nj(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function zV(e,t){return gz(e,t)}function gz(e,t,n){var S;Vt(gm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=b.useContext(Aa),{matches:a}=b.useContext(Za),i=a[a.length-1],s=i?i.params:{},c=i?i.pathname:"/",f=i?i.pathnameBase:"/",u=i&&i.route;{let E=u&&u.path||"";bz(c,!u||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=ki(),h;if(t){let E=typeof t=="string"?Hf(t):t;Vt(f==="/"||((S=E.pathname)==null?void 0:S.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${E.pathname}" was given in the \`location\` prop.`),h=E}else h=m;let p=h.pathname||"/",y=p;if(f!=="/"){let E=f.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=oz(e,{pathname:y});Va(u||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Va(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=FV(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:ji([f,r.encodeLocation?r.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:ji([f,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,n);return t&&x?b.createElement(vm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},x):x}function $V(){let e=GV(),t=_V(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:i},"ErrorBoundary")," or"," ",b.createElement("code",{style:i},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:a},n):null,s)}var BV=b.createElement($V,null),yz=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=RV(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Za.Provider,{value:this.props.routeContext},b.createElement(rj.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(UV,{error:e},t):t}};yz.contextType=OV;var Uw=new WeakMap;function UV({children:e,error:t}){let{basename:n}=b.useContext(Aa);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=MV(t.digest);if(r){let a=Uw.get(t);if(a)throw a;let i=fz(r.location,n);if(uz&&!Uw.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Uw.set(t,s),s}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function HV({routeContext:e,match:t,children:n}){let r=b.useContext(Ff);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Za.Provider,{value:e},n)}function FV(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let m=a.findIndex(h=>h.route.id&&(i==null?void 0:i[h.route.id])!==void 0);Vt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let m=0;m<a.length;m++){let h=a[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=m),h.route.id){let{loaderData:p,errors:y}=r,w=h.route.loader&&!p.hasOwnProperty(h.route.id)&&(!y||y[h.route.id]===void 0);if(h.route.lazy||w){n.isStatic&&(s=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,u=r&&f?(m,h)=>{var p,y;f(m,{location:r.location,params:((y=(p=r.matches)==null?void 0:p[0])==null?void 0:y.params)??{},unstable_pattern:jV(r.matches),errorInfo:h})}:void 0;return a.reduceRight((m,h,p)=>{let y,w=!1,x=null,S=null;r&&(y=i&&h.route.id?i[h.route.id]:void 0,x=h.route.errorElement||BV,s&&(c<0&&p===0?(bz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,S=null):c===p&&(w=!0,S=h.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,p+1)),O=()=>{let C;return y?C=x:w?C=S:h.route.Component?C=b.createElement(h.route.Component,null):h.route.element?C=h.route.element:C=m,b.createElement(HV,{match:h,routeContext:{outlet:m,matches:E,isDataRoute:r!=null},children:C})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(yz,{location:r.location,revalidation:r.revalidation,component:x,error:y,children:O(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:u}):O()},null)}function ij(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function qV(e){let t=b.useContext(Ff);return Vt(t,ij(e)),t}function KV(e){let t=b.useContext(Vy);return Vt(t,ij(e)),t}function VV(e){let t=b.useContext(Za);return Vt(t,ij(e)),t}function oj(e){let t=VV(e),n=t.matches[t.matches.length-1];return Vt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function YV(){return oj("useRouteId")}function GV(){var r;let e=b.useContext(rj),t=KV("useRouteError"),n=oj("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function XV(){let{router:e}=qV("useNavigate"),t=oj("useNavigate"),n=b.useRef(!1);return vz(()=>{n.current=!0}),b.useCallback(async(a,i={})=>{Va(n.current,pz),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var UP={};function bz(e,t,n){!t&&!UP[e]&&(UP[e]=!0,Va(!1,n))}b.memo(WV);function WV({routes:e,future:t,state:n,isStatic:r,onError:a}){return gz(e,void 0,{state:n,isStatic:r,onError:a})}function QV(e){return LV(e.context)}function vi(e){Vt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ZV({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:s}){Vt(!gm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=b.useMemo(()=>({basename:c,navigator:a,static:i,unstable_useTransitions:s,future:{}}),[c,a,i,s]);typeof n=="string"&&(n=Hf(n));let{pathname:u="/",search:m="",hash:h="",state:p=null,key:y="default",unstable_mask:w}=n,x=b.useMemo(()=>{let S=_o(u,c);return S==null?null:{location:{pathname:S,search:m,hash:h,state:p,key:y,unstable_mask:w},navigationType:r}},[c,u,m,h,p,y,r,w]);return Va(x!=null,`<Router basename="${c}"> is not able to match the URL "${u}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:b.createElement(Aa.Provider,{value:f},b.createElement(vm.Provider,{children:t,value:x}))}function JV({children:e,location:t}){return zV(QS(e),t)}function QS(e,t=[]){let n=[];return b.Children.forEach(e,(r,a)=>{if(!b.isValidElement(r))return;let i=[...t,a];if(r.type===b.Fragment){n.push.apply(n,QS(r.props.children,i));return}Vt(r.type===vi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Vt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=QS(r.props.children,i)),n.push(s)}),n}var ag="get",ig="application/x-www-form-urlencoded";function Yy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function eY(e){return Yy(e)&&e.tagName.toLowerCase()==="button"}function tY(e){return Yy(e)&&e.tagName.toLowerCase()==="form"}function nY(e){return Yy(e)&&e.tagName.toLowerCase()==="input"}function rY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aY(e,t){return e.button===0&&(!t||t==="_self")&&!rY(e)}function ZS(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function iY(e,t){let n=ZS(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var Ev=null;function oY(){if(Ev===null)try{new FormData(document.createElement("form"),0),Ev=!1}catch{Ev=!0}return Ev}var sY=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hw(e){return e!=null&&!sY.has(e)?(Va(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ig}"`),null):e}function lY(e,t){let n,r,a,i,s;if(tY(e)){let c=e.getAttribute("action");r=c?_o(c,t):null,n=e.getAttribute("method")||ag,a=Hw(e.getAttribute("enctype"))||ig,i=new FormData(e)}else if(eY(e)||nY(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(r=f?_o(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||ag,a=Hw(e.getAttribute("formenctype"))||Hw(c.getAttribute("enctype"))||ig,i=new FormData(c,e),!oY()){let{name:u,type:m,value:h}=e;if(m==="image"){let p=u?`${u}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else u&&i.append(u,h)}}else{if(Yy(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ag,r=null,a=ig,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sj(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cY(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&_o(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function uY(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fY(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function dY(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await uY(i,n);return s.links?s.links():[]}return[]}));return vY(r.flat(1).filter(fY).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function HP(e,t,n,r,a,i){let s=(f,u)=>n[u]?f.route.id!==n[u].route.id:!0,c=(f,u)=>{var m;return n[u].pathname!==f.pathname||((m=n[u].route.path)==null?void 0:m.endsWith("*"))&&n[u].params["*"]!==f.params["*"]};return i==="assets"?t.filter((f,u)=>s(f,u)||c(f,u)):i==="data"?t.filter((f,u)=>{var h;let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(s(f,u)||c(f,u))return!0;if(f.route.shouldRevalidate){let p=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function hY(e,t,{includeHydrateFallback:n}={}){return mY(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function mY(e){return[...new Set(e)]}function pY(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function vY(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(pY(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function xz(){let e=b.useContext(Ff);return sj(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function gY(){let e=b.useContext(Vy);return sj(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var lj=b.createContext(void 0);lj.displayName="FrameworkContext";function wz(){let e=b.useContext(lj);return sj(e,"You must render this element inside a <HydratedRouter> element"),e}function yY(e,t){let n=b.useContext(lj),[r,a]=b.useState(!1),[i,s]=b.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:u,onMouseLeave:m,onTouchStart:h}=t,p=b.useRef(null);b.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=E=>{E.forEach(O=>{s(O.isIntersecting)})},S=new IntersectionObserver(x,{threshold:.5});return p.current&&S.observe(p.current),()=>{S.disconnect()}}},[e]),b.useEffect(()=>{if(r){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[r]);let y=()=>{a(!0)},w=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,p,{}]:[i,p,{onFocus:nh(c,y),onBlur:nh(f,w),onMouseEnter:nh(u,y),onMouseLeave:nh(m,w),onTouchStart:nh(h,y)}]:[!1,p,{}]}function nh(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bY({page:e,...t}){let{router:n}=xz(),r=b.useMemo(()=>oz(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(wY,{page:e,matches:r,...t}):null}function xY(e){let{manifest:t,routeModules:n}=wz(),[r,a]=b.useState([]);return b.useEffect(()=>{let i=!1;return dY(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function wY({page:e,matches:t,...n}){let r=ki(),{future:a,manifest:i,routeModules:s}=wz(),{basename:c}=xz(),{loaderData:f,matches:u}=gY(),m=b.useMemo(()=>HP(e,t,u,i,r,"data"),[e,t,u,i,r]),h=b.useMemo(()=>HP(e,t,u,i,r,"assets"),[e,t,u,i,r]),p=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(O=>{var A;let C=i.routes[O.route.id];!C||!C.hasLoader||(!m.some(N=>N.route.id===O.route.id)&&O.route.id in f&&((A=s[O.route.id])!=null&&A.shouldRevalidate)||C.hasClientLoader?S=!0:x.add(O.route.id))}),x.size===0)return[];let E=cY(e,c,a.unstable_trailingSlashAwareDataRequests,"data");return S&&x.size>0&&E.searchParams.set("_routes",t.filter(O=>x.has(O.route.id)).map(O=>O.route.id).join(",")),[E.pathname+E.search]},[c,a.unstable_trailingSlashAwareDataRequests,f,r,i,m,t,e,s]),y=b.useMemo(()=>hY(h,i),[h,i]),w=xY(h);return b.createElement(b.Fragment,null,p.map(x=>b.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),y.map(x=>b.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),w.map(({key:x,link:S})=>b.createElement("link",{key:x,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function SY(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var EY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{EY&&(window.__reactRouterVersion="7.13.1")}catch{}function _Y({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=b.useRef();a.current==null&&(a.current=eV({window:r,v5Compat:!0}));let i=a.current,[s,c]=b.useState({action:i.action,location:i.location}),f=b.useCallback(u=>{n===!1?c(u):b.startTransition(()=>c(u))},[n]);return b.useLayoutEffect(()=>i.listen(f),[i,f]),b.createElement(ZV,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n})}var Sz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ya=b.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,unstable_mask:c,state:f,target:u,to:m,preventScrollReset:h,viewTransition:p,unstable_defaultShouldRevalidate:y,...w},x){let{basename:S,navigator:E,unstable_useTransitions:O}=b.useContext(Aa),C=typeof m=="string"&&Sz.test(m),A=fz(m,S);m=A.to;let N=kV(m,{relative:a}),T=ki(),P=null;if(c){let V=nj(c,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);S!=="/"&&(V.pathname=V.pathname==="/"?S:ji([S,V.pathname])),P=E.createHref(V)}let[k,D,K]=yY(r,w),L=OY(m,{replace:s,unstable_mask:c,state:f,target:u,preventScrollReset:h,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:y,unstable_useTransitions:O});function I(V){t&&t(V),V.defaultPrevented||L(V)}let W=!(A.isExternal||i),$=b.createElement("a",{...w,...K,href:(W?P:void 0)||A.absoluteURL||N,onClick:W?I:t,ref:SY(x,D),target:u,"data-discover":!C&&n==="render"?"true":void 0});return k&&!C?b.createElement(b.Fragment,null,$,b.createElement(bY,{page:N})):$});Ya.displayName="Link";var JS=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:c,children:f,...u},m){let h=ym(s,{relative:u.relative}),p=ki(),y=b.useContext(Vy),{navigator:w,basename:x}=b.useContext(Aa),S=y!=null&&RY(h)&&c===!0,E=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=p.pathname,C=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(O=O.toLowerCase(),C=C?C.toLowerCase():null,E=E.toLowerCase()),C&&x&&(C=_o(C,x)||C);const A=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let N=O===E||!a&&O.startsWith(E)&&O.charAt(A)==="/",T=C!=null&&(C===E||!a&&C.startsWith(E)&&C.charAt(E.length)==="/"),P={isActive:N,isPending:T,isTransitioning:S},k=N?t:void 0,D;typeof r=="function"?D=r(P):D=[r,N?"active":null,T?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let K=typeof i=="function"?i(P):i;return b.createElement(Ya,{...u,"aria-current":k,className:D,ref:m,style:K,to:s,viewTransition:c},typeof f=="function"?f(P):f)});JS.displayName="NavLink";var jY=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=ag,action:c,onSubmit:f,relative:u,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:p,...y},w)=>{let{unstable_useTransitions:x}=b.useContext(Aa),S=PY(),E=MY(c,{relative:u}),O=s.toLowerCase()==="get"?"get":"post",C=typeof c=="string"&&Sz.test(c),A=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let T=N.nativeEvent.submitter,P=(T==null?void 0:T.getAttribute("formmethod"))||s,k=()=>S(T||N.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:a,state:i,relative:u,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:p});x&&n!==!1?b.startTransition(()=>k()):k()};return b.createElement("form",{ref:w,method:O,action:E,onSubmit:r?f:A,...y,"data-discover":!C&&e==="render"?"true":void 0})});jY.displayName="Form";function CY(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ez(e){let t=b.useContext(Ff);return Vt(t,CY(e)),t}function OY(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:u}={}){let m=qf(),h=ki(),p=ym(e,{relative:s});return b.useCallback(y=>{if(aY(y,t)){y.preventDefault();let w=n!==void 0?n:Ph(h)===Ph(p),x=()=>m(e,{replace:w,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:f});u?b.startTransition(()=>x()):x()}},[h,m,p,n,r,a,t,e,i,s,c,f,u])}function AY(e){Va(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=b.useRef(ZS(e)),n=b.useRef(!1),r=ki(),a=b.useMemo(()=>iY(r.search,n.current?null:t.current),[r.search]),i=qf(),s=b.useCallback((c,f)=>{const u=ZS(typeof c=="function"?c(new URLSearchParams(a)):c);n.current=!0,i("?"+u,f)},[i,a]);return[a,s]}var NY=0,TY=()=>`__${String(++NY)}__`;function PY(){let{router:e}=Ez("useSubmit"),{basename:t}=b.useContext(Aa),n=YV(),r=e.fetch,a=e.navigate;return b.useCallback(async(i,s={})=>{let{action:c,method:f,encType:u,formData:m,body:h}=lY(i,t);if(s.navigate===!1){let p=s.fetcherKey||TY();await r(p,n,s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:h,formMethod:s.method||f,formEncType:s.encType||u,flushSync:s.flushSync})}else await a(s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:h,formMethod:s.method||f,formEncType:s.encType||u,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function MY(e,{relative:t}={}){let{basename:n}=b.useContext(Aa),r=b.useContext(Za);Vt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...ym(e||".",{relative:t})},s=ki();if(e==null){i.search=s.search;let c=new URLSearchParams(i.search),f=c.getAll("index");if(f.some(m=>m==="")){c.delete("index"),f.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();i.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:ji([n,i.pathname])),Ph(i)}function RY(e,{relative:t}={}){let n=b.useContext(hz);Vt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ez("useViewTransitionState"),a=ym(e,{relative:t});if(!n.isTransitioning)return!1;let i=_o(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=_o(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Eg(a.pathname,s)!=null||Eg(a.pathname,i)!=null}var cl=iz();const _z=Qa(cl);var Dc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kY={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zs,ej,Y3,DY=(Y3=class{constructor(){Ee(this,zs,kY);Ee(this,ej,!1)}setTimeoutProvider(e){xe(this,zs,e)}setTimeout(e,t){return G(this,zs).setTimeout(e,t)}clearTimeout(e){G(this,zs).clearTimeout(e)}setInterval(e,t){return G(this,zs).setInterval(e,t)}clearInterval(e){G(this,zs).clearInterval(e)}},zs=new WeakMap,ej=new WeakMap,Y3),Xl=new DY;function IY(e){setTimeout(e,0)}var mc=typeof window>"u"||"Deno"in globalThis;function lr(){}function LY(e,t){return typeof e=="function"?e(t):e}function eE(e){return typeof e=="number"&&e>=0&&e!==1/0}function jz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xs(e,t){return typeof e=="function"?e(t):e}function wa(e,t){return typeof e=="function"?e(t):e}function FP(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:c}=e;if(s){if(r){if(t.queryHash!==cj(s,t.options))return!1}else if(!Mh(t.queryKey,s))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||i&&!i(t))}function qP(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(pc(t.options.mutationKey)!==pc(i))return!1}else if(!Mh(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cj(e,t){return((t==null?void 0:t.queryKeyHashFn)||pc)(e)}function pc(e){return JSON.stringify(e,(t,n)=>tE(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Mh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Mh(e[n],t[n])):!1}var zY=Object.prototype.hasOwnProperty;function uj(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=KP(e)&&KP(t);if(!r&&!(tE(e)&&tE(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),c=s.length,f=r?new Array(c):{};let u=0;for(let m=0;m<c;m++){const h=r?m:s[m],p=e[h],y=t[h];if(p===y){f[h]=p,(r?m<i:zY.call(e,h))&&u++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){f[h]=y;continue}const w=uj(p,y,n+1);f[h]=w,w===p&&u++}return i===c&&u===i?e:f}function Rh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function KP(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tE(e){if(!VP(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!VP(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function VP(e){return Object.prototype.toString.call(e)==="[object Object]"}function $Y(e){return new Promise(t=>{Xl.setTimeout(t,e)})}function nE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uj(e,t):t}function BY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function UY(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var fj=Symbol();function Cz(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function dj(e,t){return typeof e=="function"?e(...t):!!e}function HY(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var ec,$s,sf,G3,FY=(G3=class extends Dc{constructor(){super();Ee(this,ec);Ee(this,$s);Ee(this,sf);xe(this,sf,t=>{if(!mc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){G(this,$s)||this.setEventListener(G(this,sf))}onUnsubscribe(){var t;this.hasListeners()||((t=G(this,$s))==null||t.call(this),xe(this,$s,void 0))}setEventListener(t){var n;xe(this,sf,t),(n=G(this,$s))==null||n.call(this),xe(this,$s,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){G(this,ec)!==t&&(xe(this,ec,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof G(this,ec)=="boolean"?G(this,ec):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ec=new WeakMap,$s=new WeakMap,sf=new WeakMap,G3),hj=new FY;function rE(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var qY=IY;function KY(){let e=[],t=0,n=c=>{c()},r=c=>{c()},a=qY;const i=c=>{t?e.push(c):a(()=>{n(c)})},s=()=>{const c=e;e=[],c.length&&a(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||s()}return f},batchCalls:c=>(...f)=>{i(()=>{c(...f)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{a=c}}}var en=KY(),lf,Bs,cf,X3,VY=(X3=class extends Dc{constructor(){super();Ee(this,lf,!0);Ee(this,Bs);Ee(this,cf);xe(this,cf,t=>{if(!mc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){G(this,Bs)||this.setEventListener(G(this,cf))}onUnsubscribe(){var t;this.hasListeners()||((t=G(this,Bs))==null||t.call(this),xe(this,Bs,void 0))}setEventListener(t){var n;xe(this,cf,t),(n=G(this,Bs))==null||n.call(this),xe(this,Bs,t(this.setOnline.bind(this)))}setOnline(t){G(this,lf)!==t&&(xe(this,lf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return G(this,lf)}},lf=new WeakMap,Bs=new WeakMap,cf=new WeakMap,X3),_g=new VY;function YY(e){return Math.min(1e3*2**e,3e4)}function Oz(e){return(e??"online")==="online"?_g.isOnline():!0}var aE=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Az(e){let t=!1,n=0,r;const a=rE(),i=()=>a.status!=="pending",s=x=>{var S;if(!i()){const E=new aE(x);p(E),(S=e.onCancel)==null||S.call(e,E)}},c=()=>{t=!0},f=()=>{t=!1},u=()=>hj.isFocused()&&(e.networkMode==="always"||_g.isOnline())&&e.canRun(),m=()=>Oz(e.networkMode)&&e.canRun(),h=x=>{i()||(r==null||r(),a.resolve(x))},p=x=>{i()||(r==null||r(),a.reject(x))},y=()=>new Promise(x=>{var S;r=E=>{(i()||u())&&x(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;r=void 0,i()||(x=e.onContinue)==null||x.call(e)}),w=()=>{if(i())return;let x;const S=n===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(E){x=Promise.reject(E)}Promise.resolve(x).then(h).catch(E=>{var T;if(i())return;const O=e.retry??(mc?0:3),C=e.retryDelay??YY,A=typeof C=="function"?C(n,E):C,N=O===!0||typeof O=="number"&&n<O||typeof O=="function"&&O(n,E);if(t||!N){p(E);return}n++,(T=e.onFail)==null||T.call(e,n,E),$Y(A).then(()=>u()?void 0:y()).then(()=>{t?p(E):w()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?w():y().then(w),a)}}var tc,W3,Nz=(W3=class{constructor(){Ee(this,tc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),eE(this.gcTime)&&xe(this,tc,Xl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mc?1/0:300*1e3))}clearGcTimeout(){G(this,tc)&&(Xl.clearTimeout(G(this,tc)),xe(this,tc,void 0))}},tc=new WeakMap,W3),nc,uf,ba,rc,kn,sm,ac,La,co,Q3,GY=(Q3=class extends Nz{constructor(t){super();Ee(this,La);Ee(this,nc);Ee(this,uf);Ee(this,ba);Ee(this,rc);Ee(this,kn);Ee(this,sm);Ee(this,ac);xe(this,ac,!1),xe(this,sm,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,rc,t.client),xe(this,ba,G(this,rc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,nc,GP(this.options)),this.state=t.state??G(this,nc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=G(this,kn))==null?void 0:t.promise}setOptions(t){if(this.options={...G(this,sm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=GP(this.options);n.data!==void 0&&(this.setState(YP(n.data,n.dataUpdatedAt)),xe(this,nc,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&G(this,ba).remove(this)}setData(t,n){const r=nE(this.state.data,t,this.options);return $e(this,La,co).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){$e(this,La,co).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=G(this,kn))==null?void 0:r.promise;return(a=G(this,kn))==null||a.cancel(t),n?n.then(lr).catch(lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(G(this,nc))}isActive(){return this.observers.some(t=>wa(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!jz(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=G(this,kn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=G(this,kn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),G(this,ba).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(G(this,kn)&&(G(this,ac)?G(this,kn).cancel({revert:!0}):G(this,kn).cancelRetry()),this.scheduleGc()),G(this,ba).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,La,co).call(this,{type:"invalidate"})}async fetch(t,n){var f,u,m,h,p,y,w,x,S,E,O,C;if(this.state.fetchStatus!=="idle"&&((f=G(this,kn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(G(this,kn))return G(this,kn).continueRetry(),G(this,kn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(N=>N.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(xe(this,ac,!0),r.signal)})},i=()=>{const A=Cz(this.options,n),T=(()=>{const P={client:G(this,rc),queryKey:this.queryKey,meta:this.meta};return a(P),P})();return xe(this,ac,!1),this.options.persister?this.options.persister(A,T,this):A(T)},c=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:G(this,rc),state:this.state,fetchFn:i};return a(A),A})();(u=this.options.behavior)==null||u.onFetch(c,this),xe(this,uf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&$e(this,La,co).call(this,{type:"fetch",meta:(h=c.fetchOptions)==null?void 0:h.meta}),xe(this,kn,Az({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof aE&&A.revert&&this.setState({...G(this,uf),fetchStatus:"idle"}),r.abort()},onFail:(A,N)=>{$e(this,La,co).call(this,{type:"failed",failureCount:A,error:N})},onPause:()=>{$e(this,La,co).call(this,{type:"pause"})},onContinue:()=>{$e(this,La,co).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await G(this,kn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(y=(p=G(this,ba).config).onSuccess)==null||y.call(p,A,this),(x=(w=G(this,ba).config).onSettled)==null||x.call(w,A,this.state.error,this),A}catch(A){if(A instanceof aE){if(A.silent)return G(this,kn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw $e(this,La,co).call(this,{type:"error",error:A}),(E=(S=G(this,ba).config).onError)==null||E.call(S,A,this),(C=(O=G(this,ba).config).onSettled)==null||C.call(O,this.state.data,A,this),A}finally{this.scheduleGc()}}},nc=new WeakMap,uf=new WeakMap,ba=new WeakMap,rc=new WeakMap,kn=new WeakMap,sm=new WeakMap,ac=new WeakMap,La=new WeakSet,co=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Tz(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...YP(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,uf,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),G(this,ba).notify({query:this,type:"updated",action:t})})},Q3);function Tz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oz(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function YP(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function GP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Pr,rt,lm,vr,ic,ff,fo,Us,cm,df,hf,oc,sc,Hs,mf,vt,xh,iE,oE,sE,lE,cE,uE,fE,Pz,Z3,mj=(Z3=class extends Dc{constructor(t,n){super();Ee(this,vt);Ee(this,Pr);Ee(this,rt);Ee(this,lm);Ee(this,vr);Ee(this,ic);Ee(this,ff);Ee(this,fo);Ee(this,Us);Ee(this,cm);Ee(this,df);Ee(this,hf);Ee(this,oc);Ee(this,sc);Ee(this,Hs);Ee(this,mf,new Set);this.options=n,xe(this,Pr,t),xe(this,Us,null),xe(this,fo,rE()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(G(this,rt).addObserver(this),XP(G(this,rt),this.options)?$e(this,vt,xh).call(this):this.updateResult(),$e(this,vt,lE).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dE(G(this,rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dE(G(this,rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,vt,cE).call(this),$e(this,vt,uE).call(this),G(this,rt).removeObserver(this)}setOptions(t){const n=this.options,r=G(this,rt);if(this.options=G(this,Pr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wa(this.options.enabled,G(this,rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,vt,fE).call(this),G(this,rt).setOptions(this.options),n._defaulted&&!Rh(this.options,n)&&G(this,Pr).getQueryCache().notify({type:"observerOptionsUpdated",query:G(this,rt),observer:this});const a=this.hasListeners();a&&WP(G(this,rt),r,this.options,n)&&$e(this,vt,xh).call(this),this.updateResult(),a&&(G(this,rt)!==r||wa(this.options.enabled,G(this,rt))!==wa(n.enabled,G(this,rt))||Xs(this.options.staleTime,G(this,rt))!==Xs(n.staleTime,G(this,rt)))&&$e(this,vt,iE).call(this);const i=$e(this,vt,oE).call(this);a&&(G(this,rt)!==r||wa(this.options.enabled,G(this,rt))!==wa(n.enabled,G(this,rt))||i!==G(this,Hs))&&$e(this,vt,sE).call(this,i)}getOptimisticResult(t){const n=G(this,Pr).getQueryCache().build(G(this,Pr),t),r=this.createResult(n,t);return WY(this,r)&&(xe(this,vr,r),xe(this,ff,this.options),xe(this,ic,G(this,rt).state)),r}getCurrentResult(){return G(this,vr)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&G(this,fo).status==="pending"&&G(this,fo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){G(this,mf).add(t)}getCurrentQuery(){return G(this,rt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=G(this,Pr).defaultQueryOptions(t),r=G(this,Pr).getQueryCache().build(G(this,Pr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $e(this,vt,xh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),G(this,vr)))}createResult(t,n){var D;const r=G(this,rt),a=this.options,i=G(this,vr),s=G(this,ic),c=G(this,ff),u=t!==r?t.state:G(this,lm),{state:m}=t;let h={...m},p=!1,y;if(n._optimisticResults){const K=this.hasListeners(),L=!K&&XP(t,n),I=K&&WP(t,r,n,a);(L||I)&&(h={...h,...Tz(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:w,errorUpdatedAt:x,status:S}=h;y=h.data;let E=!1;if(n.placeholderData!==void 0&&y===void 0&&S==="pending"){let K;i!=null&&i.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(K=i.data,E=!0):K=typeof n.placeholderData=="function"?n.placeholderData((D=G(this,hf))==null?void 0:D.state.data,G(this,hf)):n.placeholderData,K!==void 0&&(S="success",y=nE(i==null?void 0:i.data,K,n),p=!0)}if(n.select&&y!==void 0&&!E)if(i&&y===(s==null?void 0:s.data)&&n.select===G(this,cm))y=G(this,df);else try{xe(this,cm,n.select),y=n.select(y),y=nE(i==null?void 0:i.data,y,n),xe(this,df,y),xe(this,Us,null)}catch(K){xe(this,Us,K)}G(this,Us)&&(w=G(this,Us),y=G(this,df),x=Date.now(),S="error");const O=h.fetchStatus==="fetching",C=S==="pending",A=S==="error",N=C&&O,T=y!==void 0,k={status:S,fetchStatus:h.fetchStatus,isPending:C,isSuccess:S==="success",isError:A,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:h.dataUpdatedAt,error:w,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:O,isRefetching:O&&!C,isLoadingError:A&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:A&&T,isStale:pj(t,n),refetch:this.refetch,promise:G(this,fo),isEnabled:wa(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=k.data!==void 0,L=k.status==="error"&&!K,I=V=>{L?V.reject(k.error):K&&V.resolve(k.data)},W=()=>{const V=xe(this,fo,k.promise=rE());I(V)},$=G(this,fo);switch($.status){case"pending":t.queryHash===r.queryHash&&I($);break;case"fulfilled":(L||k.data!==$.value)&&W();break;case"rejected":(!L||k.error!==$.reason)&&W();break}}return k}updateResult(){const t=G(this,vr),n=this.createResult(G(this,rt),this.options);if(xe(this,ic,G(this,rt).state),xe(this,ff,this.options),G(this,ic).data!==void 0&&xe(this,hf,G(this,rt)),Rh(n,t))return;xe(this,vr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!G(this,mf).size)return!0;const s=new Set(i??G(this,mf));return this.options.throwOnError&&s.add("error"),Object.keys(G(this,vr)).some(c=>{const f=c;return G(this,vr)[f]!==t[f]&&s.has(f)})};$e(this,vt,Pz).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,vt,lE).call(this)}},Pr=new WeakMap,rt=new WeakMap,lm=new WeakMap,vr=new WeakMap,ic=new WeakMap,ff=new WeakMap,fo=new WeakMap,Us=new WeakMap,cm=new WeakMap,df=new WeakMap,hf=new WeakMap,oc=new WeakMap,sc=new WeakMap,Hs=new WeakMap,mf=new WeakMap,vt=new WeakSet,xh=function(t){$e(this,vt,fE).call(this);let n=G(this,rt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(lr)),n},iE=function(){$e(this,vt,cE).call(this);const t=Xs(this.options.staleTime,G(this,rt));if(mc||G(this,vr).isStale||!eE(t))return;const r=jz(G(this,vr).dataUpdatedAt,t)+1;xe(this,oc,Xl.setTimeout(()=>{G(this,vr).isStale||this.updateResult()},r))},oE=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(G(this,rt)):this.options.refetchInterval)??!1},sE=function(t){$e(this,vt,uE).call(this),xe(this,Hs,t),!(mc||wa(this.options.enabled,G(this,rt))===!1||!eE(G(this,Hs))||G(this,Hs)===0)&&xe(this,sc,Xl.setInterval(()=>{(this.options.refetchIntervalInBackground||hj.isFocused())&&$e(this,vt,xh).call(this)},G(this,Hs)))},lE=function(){$e(this,vt,iE).call(this),$e(this,vt,sE).call(this,$e(this,vt,oE).call(this))},cE=function(){G(this,oc)&&(Xl.clearTimeout(G(this,oc)),xe(this,oc,void 0))},uE=function(){G(this,sc)&&(Xl.clearInterval(G(this,sc)),xe(this,sc,void 0))},fE=function(){const t=G(this,Pr).getQueryCache().build(G(this,Pr),this.options);if(t===G(this,rt))return;const n=G(this,rt);xe(this,rt,t),xe(this,lm,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Pz=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(G(this,vr))}),G(this,Pr).getQueryCache().notify({query:G(this,rt),type:"observerResultsUpdated"})})},Z3);function XY(e,t){return wa(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function XP(e,t){return XY(e,t)||e.state.data!==void 0&&dE(e,t,t.refetchOnMount)}function dE(e,t,n){if(wa(t.enabled,e)!==!1&&Xs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pj(e,t)}return!1}function WP(e,t,n,r){return(e!==t||wa(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pj(e,n)}function pj(e,t){return wa(t.enabled,e)!==!1&&e.isStaleByTime(Xs(t.staleTime,e))}function WY(e,t){return!Rh(e.getCurrentResult(),t)}function QP(e){return{onFetch:(t,n)=>{var m,h,p,y,w;const r=t.options,a=(p=(h=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((y=t.state.data)==null?void 0:y.pages)||[],s=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const u=async()=>{let x=!1;const S=C=>{HY(C,()=>t.signal,()=>x=!0)},E=Cz(t.options,t.fetchOptions),O=async(C,A,N)=>{if(x)return Promise.reject();if(A==null&&C.pages.length)return Promise.resolve(C);const P=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:A,direction:N?"backward":"forward",meta:t.options.meta};return S(L),L})(),k=await E(P),{maxPages:D}=t.options,K=N?UY:BY;return{pages:K(C.pages,k,D),pageParams:K(C.pageParams,A,D)}};if(a&&i.length){const C=a==="backward",A=C?QY:ZP,N={pages:i,pageParams:s},T=A(r,N);c=await O(N,T,C)}else{const C=e??i.length;do{const A=f===0?s[0]??r.initialPageParam:ZP(r,c);if(f>0&&A==null)break;c=await O(c,A),f++}while(f<C)}return c};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ZP(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function QY(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var um,gi,or,lc,yi,Ps,J3,ZY=(J3=class extends Nz{constructor(t){super();Ee(this,yi);Ee(this,um);Ee(this,gi);Ee(this,or);Ee(this,lc);xe(this,um,t.client),this.mutationId=t.mutationId,xe(this,or,t.mutationCache),xe(this,gi,[]),this.state=t.state||Mz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){G(this,gi).includes(t)||(G(this,gi).push(t),this.clearGcTimeout(),G(this,or).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,gi,G(this,gi).filter(n=>n!==t)),this.scheduleGc(),G(this,or).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){G(this,gi).length||(this.state.status==="pending"?this.scheduleGc():G(this,or).remove(this))}continue(){var t;return((t=G(this,lc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,c,f,u,m,h,p,y,w,x,S,E,O,C,A,N,T,P;const n=()=>{$e(this,yi,Ps).call(this,{type:"continue"})},r={client:G(this,um),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,lc,Az({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,D)=>{$e(this,yi,Ps).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{$e(this,yi,Ps).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>G(this,or).canRun(this)}));const a=this.state.status==="pending",i=!G(this,lc).canStart();try{if(a)n();else{$e(this,yi,Ps).call(this,{type:"pending",variables:t,isPaused:i}),G(this,or).config.onMutate&&await G(this,or).config.onMutate(t,this,r);const D=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t,r));D!==this.state.context&&$e(this,yi,Ps).call(this,{type:"pending",context:D,variables:t,isPaused:i})}const k=await G(this,lc).start();return await((u=(f=G(this,or).config).onSuccess)==null?void 0:u.call(f,k,t,this.state.context,this,r)),await((h=(m=this.options).onSuccess)==null?void 0:h.call(m,k,t,this.state.context,r)),await((y=(p=G(this,or).config).onSettled)==null?void 0:y.call(p,k,null,this.state.variables,this.state.context,this,r)),await((x=(w=this.options).onSettled)==null?void 0:x.call(w,k,null,t,this.state.context,r)),$e(this,yi,Ps).call(this,{type:"success",data:k}),k}catch(k){try{await((E=(S=G(this,or).config).onError)==null?void 0:E.call(S,k,t,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(O=this.options).onError)==null?void 0:C.call(O,k,t,this.state.context,r))}catch(D){Promise.reject(D)}try{await((N=(A=G(this,or).config).onSettled)==null?void 0:N.call(A,void 0,k,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((P=(T=this.options).onSettled)==null?void 0:P.call(T,void 0,k,t,this.state.context,r))}catch(D){Promise.reject(D)}throw $e(this,yi,Ps).call(this,{type:"error",error:k}),k}finally{G(this,or).runNext(this)}}},um=new WeakMap,gi=new WeakMap,or=new WeakMap,lc=new WeakMap,yi=new WeakSet,Ps=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{G(this,gi).forEach(r=>{r.onMutationUpdate(t)}),G(this,or).notify({mutation:this,type:"updated",action:t})})},J3);function Mz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ho,za,fm,ez,JY=(ez=class extends Dc{constructor(t={}){super();Ee(this,ho);Ee(this,za);Ee(this,fm);this.config=t,xe(this,ho,new Set),xe(this,za,new Map),xe(this,fm,0)}build(t,n,r){const a=new ZY({client:t,mutationCache:this,mutationId:++Sv(this,fm)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){G(this,ho).add(t);const n=_v(t);if(typeof n=="string"){const r=G(this,za).get(n);r?r.push(t):G(this,za).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(G(this,ho).delete(t)){const n=_v(t);if(typeof n=="string"){const r=G(this,za).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&G(this,za).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_v(t);if(typeof n=="string"){const r=G(this,za).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=_v(t);if(typeof n=="string"){const a=(r=G(this,za).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{G(this,ho).forEach(t=>{this.notify({type:"removed",mutation:t})}),G(this,ho).clear(),G(this,za).clear()})}getAll(){return Array.from(G(this,ho))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>qP(n,r))}findAll(t={}){return this.getAll().filter(n=>qP(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(lr))))}},ho=new WeakMap,za=new WeakMap,fm=new WeakMap,ez);function _v(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mo,Fs,Mr,po,Eo,og,hE,tz,eG=(tz=class extends Dc{constructor(n,r){super();Ee(this,Eo);Ee(this,mo);Ee(this,Fs);Ee(this,Mr);Ee(this,po);xe(this,mo,n),this.setOptions(r),this.bindMethods(),$e(this,Eo,og).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=G(this,mo).defaultMutationOptions(n),Rh(this.options,r)||G(this,mo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:G(this,Mr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&pc(r.mutationKey)!==pc(this.options.mutationKey)?this.reset():((a=G(this,Mr))==null?void 0:a.state.status)==="pending"&&G(this,Mr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=G(this,Mr))==null||n.removeObserver(this)}onMutationUpdate(n){$e(this,Eo,og).call(this),$e(this,Eo,hE).call(this,n)}getCurrentResult(){return G(this,Fs)}reset(){var n;(n=G(this,Mr))==null||n.removeObserver(this),xe(this,Mr,void 0),$e(this,Eo,og).call(this),$e(this,Eo,hE).call(this)}mutate(n,r){var a;return xe(this,po,r),(a=G(this,Mr))==null||a.removeObserver(this),xe(this,Mr,G(this,mo).getMutationCache().build(G(this,mo),this.options)),G(this,Mr).addObserver(this),G(this,Mr).execute(n)}},mo=new WeakMap,Fs=new WeakMap,Mr=new WeakMap,po=new WeakMap,Eo=new WeakSet,og=function(){var r;const n=((r=G(this,Mr))==null?void 0:r.state)??Mz();xe(this,Fs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},hE=function(n){en.batch(()=>{var r,a,i,s,c,f,u,m;if(G(this,po)&&this.hasListeners()){const h=G(this,Fs).variables,p=G(this,Fs).context,y={client:G(this,mo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=G(this,po)).onSuccess)==null||a.call(r,n.data,h,p,y)}catch(w){Promise.reject(w)}try{(s=(i=G(this,po)).onSettled)==null||s.call(i,n.data,null,h,p,y)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(f=(c=G(this,po)).onError)==null||f.call(c,n.error,h,p,y)}catch(w){Promise.reject(w)}try{(m=(u=G(this,po)).onSettled)==null||m.call(u,void 0,n.error,h,p,y)}catch(w){Promise.reject(w)}}}this.listeners.forEach(h=>{h(G(this,Fs))})})},tz);function JP(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function tG(e,t,n){const r=e.slice(0);return r[t]=n,r}var pf,Gr,vf,gf,xa,qs,dm,hm,mm,pm,Wn,mE,pE,vE,gE,yE,nz,nG=(nz=class extends Dc{constructor(t,n,r){super();Ee(this,Wn);Ee(this,pf);Ee(this,Gr);Ee(this,vf);Ee(this,gf);Ee(this,xa);Ee(this,qs);Ee(this,dm);Ee(this,hm);Ee(this,mm);Ee(this,pm,[]);xe(this,pf,t),xe(this,gf,r),xe(this,vf,[]),xe(this,xa,[]),xe(this,Gr,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&G(this,xa).forEach(t=>{t.subscribe(n=>{$e(this,Wn,gE).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,G(this,xa).forEach(t=>{t.destroy()})}setQueries(t,n){xe(this,vf,t),xe(this,gf,n),en.batch(()=>{const r=G(this,xa),a=$e(this,Wn,vE).call(this,G(this,vf));a.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const i=a.map(h=>h.observer),s=i.map(h=>h.getCurrentResult()),c=r.length!==i.length,f=i.some((h,p)=>h!==r[p]),u=c||f,m=u?!0:s.some((h,p)=>{const y=G(this,Gr)[p];return!y||!Rh(h,y)});!u&&!m||(u&&(xe(this,pm,a),xe(this,xa,i)),xe(this,Gr,s),this.hasListeners()&&(u&&(JP(r,i).forEach(h=>{h.destroy()}),JP(i,r).forEach(h=>{h.subscribe(p=>{$e(this,Wn,gE).call(this,h,p)})})),$e(this,Wn,yE).call(this)))})}getCurrentResult(){return G(this,Gr)}getQueries(){return G(this,xa).map(t=>t.getCurrentQuery())}getObservers(){return G(this,xa)}getOptimisticResult(t,n){const r=$e(this,Wn,vE).call(this,t),a=r.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions)),i=r.map(s=>s.defaultedQueryOptions.queryHash);return[a,s=>$e(this,Wn,pE).call(this,s??a,n,i),()=>$e(this,Wn,mE).call(this,a,r)]}},pf=new WeakMap,Gr=new WeakMap,vf=new WeakMap,gf=new WeakMap,xa=new WeakMap,qs=new WeakMap,dm=new WeakMap,hm=new WeakMap,mm=new WeakMap,pm=new WeakMap,Wn=new WeakSet,mE=function(t,n){return n.map((r,a)=>{const i=t[a];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,s=>{n.forEach(c=>{c.observer.trackProp(s)})})})},pE=function(t,n,r){if(n){const a=G(this,mm),i=r!==void 0&&a!==void 0&&(a.length!==r.length||r.some((s,c)=>s!==a[c]));return(!G(this,qs)||G(this,Gr)!==G(this,hm)||i||n!==G(this,dm))&&(xe(this,dm,n),xe(this,hm,G(this,Gr)),r!==void 0&&xe(this,mm,r),xe(this,qs,uj(G(this,qs),n(t)))),G(this,qs)}return t},vE=function(t){const n=new Map;G(this,xa).forEach(a=>{const i=a.options.queryHash;if(!i)return;const s=n.get(i);s?s.push(a):n.set(i,[a])});const r=[];return t.forEach(a=>{var f;const i=G(this,pf).defaultQueryOptions(a),c=((f=n.get(i.queryHash))==null?void 0:f.shift())??new mj(G(this,pf),i);r.push({defaultedQueryOptions:i,observer:c})}),r},gE=function(t,n){const r=G(this,xa).indexOf(t);r!==-1&&(xe(this,Gr,tG(G(this,Gr),r,n)),$e(this,Wn,yE).call(this))},yE=function(){var t;if(this.hasListeners()){const n=G(this,qs),r=$e(this,Wn,mE).call(this,G(this,Gr),G(this,pm)),a=$e(this,Wn,pE).call(this,r,(t=G(this,gf))==null?void 0:t.combine);n!==a&&en.batch(()=>{this.listeners.forEach(i=>{i(G(this,Gr))})})}},nz),bi,rz,rG=(rz=class extends Dc{constructor(t={}){super();Ee(this,bi);this.config=t,xe(this,bi,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??cj(a,n);let s=this.get(i);return s||(s=new GY({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){G(this,bi).has(t.queryHash)||(G(this,bi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=G(this,bi).get(t.queryHash);n&&(t.destroy(),n===t&&G(this,bi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return G(this,bi).get(t)}getAll(){return[...G(this,bi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>FP(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>FP(t,r)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bi=new WeakMap,rz),Qt,Ks,Vs,yf,bf,Ys,xf,wf,az,aG=(az=class{constructor(e={}){Ee(this,Qt);Ee(this,Ks);Ee(this,Vs);Ee(this,yf);Ee(this,bf);Ee(this,Ys);Ee(this,xf);Ee(this,wf);xe(this,Qt,e.queryCache||new rG),xe(this,Ks,e.mutationCache||new JY),xe(this,Vs,e.defaultOptions||{}),xe(this,yf,new Map),xe(this,bf,new Map),xe(this,Ys,0)}mount(){Sv(this,Ys)._++,G(this,Ys)===1&&(xe(this,xf,hj.subscribe(async e=>{e&&(await this.resumePausedMutations(),G(this,Qt).onFocus())})),xe(this,wf,_g.subscribe(async e=>{e&&(await this.resumePausedMutations(),G(this,Qt).onOnline())})))}unmount(){var e,t;Sv(this,Ys)._--,G(this,Ys)===0&&((e=G(this,xf))==null||e.call(this),xe(this,xf,void 0),(t=G(this,wf))==null||t.call(this),xe(this,wf,void 0))}isFetching(e){return G(this,Qt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return G(this,Ks).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=G(this,Qt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=G(this,Qt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return G(this,Qt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=G(this,Qt).get(r.queryHash),i=a==null?void 0:a.state.data,s=LY(t,i);if(s!==void 0)return G(this,Qt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>G(this,Qt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=G(this,Qt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=G(this,Qt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=G(this,Qt);return en.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=en.batch(()=>G(this,Qt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(lr).catch(lr)}invalidateQueries(e,t={}){return en.batch(()=>(G(this,Qt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=en.batch(()=>G(this,Qt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(lr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(lr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=G(this,Qt).build(this,t);return n.isStaleByTime(Xs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lr).catch(lr)}fetchInfiniteQuery(e){return e.behavior=QP(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lr).catch(lr)}ensureInfiniteQueryData(e){return e.behavior=QP(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _g.isOnline()?G(this,Ks).resumePausedMutations():Promise.resolve()}getQueryCache(){return G(this,Qt)}getMutationCache(){return G(this,Ks)}getDefaultOptions(){return G(this,Vs)}setDefaultOptions(e){xe(this,Vs,e)}setQueryDefaults(e,t){G(this,yf).set(pc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...G(this,yf).values()],n={};return t.forEach(r=>{Mh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){G(this,bf).set(pc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...G(this,bf).values()],n={};return t.forEach(r=>{Mh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...G(this,Vs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===fj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...G(this,Vs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){G(this,Qt).clear(),G(this,Ks).clear()}},Qt=new WeakMap,Ks=new WeakMap,Vs=new WeakMap,yf=new WeakMap,bf=new WeakMap,Ys=new WeakMap,xf=new WeakMap,wf=new WeakMap,az),Rz=b.createContext(void 0),jt=e=>{const t=b.useContext(Rz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iG=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Rz.Provider,{value:e,children:t})),kz=b.createContext(!1),Dz=()=>b.useContext(kz);kz.Provider;function oG(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sG=b.createContext(oG()),Iz=()=>b.useContext(sG),Lz=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?dj(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},zz=e=>{b.useEffect(()=>{e.clearReset()},[e])},$z=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||dj(n,[e.error,r])),Bz=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},lG=(e,t)=>e.isLoading&&e.isFetching&&!t,bE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function cG({queries:e,...t},n){const r=jt(),a=Dz(),i=Iz(),s=b.useMemo(()=>e.map(x=>{const S=r.defaultQueryOptions(x);return S._optimisticResults=a?"isRestoring":"optimistic",S}),[e,r,a]);s.forEach(x=>{Bz(x);const S=r.getQueryCache().get(x.queryHash);Lz(x,i,S)}),zz(i);const[c]=b.useState(()=>new nG(r,s,t)),[f,u,m]=c.getOptimisticResult(s,t.combine),h=!a&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(x=>h?c.subscribe(en.batchCalls(x)):lr,[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),b.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);const y=f.some((x,S)=>bE(s[S],x))?f.flatMap((x,S)=>{const E=s[S];if(E&&bE(E,x)){const O=new mj(r,E);return xE(E,O,i)}return[]}):[];if(y.length>0)throw Promise.all(y);const w=f.find((x,S)=>{const E=s[S];return E&&$z({result:x,errorResetBoundary:i,throwOnError:E.throwOnError,query:r.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(w!=null&&w.error)throw w.error;return u(m())}function uG(e,t,n){var p,y,w,x;const r=Dz(),a=Iz(),i=jt(),s=i.defaultQueryOptions(e);(y=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||y.call(p,s);const c=i.getQueryCache().get(s.queryHash);s._optimisticResults=r?"isRestoring":"optimistic",Bz(s),Lz(s,a,c),zz(a);const f=!i.getQueryCache().get(s.queryHash),[u]=b.useState(()=>new t(i,s)),m=u.getOptimisticResult(s),h=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(S=>{const E=h?u.subscribe(en.batchCalls(S)):lr;return u.updateResult(),E},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(s)},[s,u]),bE(s,m))throw xE(s,u,a);if($z({result:m,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw m.error;if((x=(w=i.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||x.call(w,s,m),s.experimental_prefetchInRender&&!mc&&lG(m,r)){const S=f?xE(s,u,a):c==null?void 0:c.promise;S==null||S.catch(lr).finally(()=>{u.updateResult()})}return s.notifyOnChangeProps?m:u.trackResult(m)}function $n(e,t){return uG(e,mj)}function qt(e,t){const n=jt(),[r]=b.useState(()=>new eG(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const a=b.useSyncExternalStore(b.useCallback(s=>r.subscribe(en.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=b.useCallback((s,c)=>{r.mutate(s,c).catch(lr)},[r]);if(a.error&&dj(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}var fG=(e,t,n,r,a,i,s,c)=>{let f=document.documentElement,u=["light","dark"];function m(y){(Array.isArray(e)?e:[e]).forEach(w=>{let x=w==="class",S=x&&i?a.map(E=>i[E]||E):a;x?(f.classList.remove(...S),f.classList.add(i&&i[y]?i[y]:y)):f.setAttribute(w,y)}),h(y)}function h(y){c&&u.includes(y)&&(f.style.colorScheme=y)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||n,w=s&&y==="system"?p():y;m(w)}catch{}},eM=["light","dark"],Uz="(prefers-color-scheme: dark)",dG=typeof window>"u",vj=b.createContext(void 0),hG={setTheme:e=>{},themes:[]},gj=()=>{var e;return(e=b.useContext(vj))!=null?e:hG},mG=e=>b.useContext(vj)?b.createElement(b.Fragment,null,e.children):b.createElement(vG,{...e}),pG=["light","dark"],vG=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:i=pG,defaultTheme:s=n?"system":"light",attribute:c="data-theme",value:f,children:u,nonce:m,scriptProps:h})=>{let[p,y]=b.useState(()=>yG(a,s)),[w,x]=b.useState(()=>p==="system"?Fw():p),S=f?Object.values(f):i,E=b.useCallback(N=>{let T=N;if(!T)return;N==="system"&&n&&(T=Fw());let P=f?f[T]:T,k=t?bG(m):null,D=document.documentElement,K=L=>{L==="class"?(D.classList.remove(...S),P&&D.classList.add(P)):L.startsWith("data-")&&(P?D.setAttribute(L,P):D.removeAttribute(L))};if(Array.isArray(c)?c.forEach(K):K(c),r){let L=eM.includes(s)?s:null,I=eM.includes(T)?T:L;D.style.colorScheme=I}k==null||k()},[m]),O=b.useCallback(N=>{let T=typeof N=="function"?N(p):N;y(T);try{localStorage.setItem(a,T)}catch{}},[p]),C=b.useCallback(N=>{let T=Fw(N);x(T),p==="system"&&n&&!e&&E("system")},[p,e]);b.useEffect(()=>{let N=window.matchMedia(Uz);return N.addListener(C),C(N),()=>N.removeListener(C)},[C]),b.useEffect(()=>{let N=T=>{T.key===a&&(T.newValue?y(T.newValue):O(s))};return window.addEventListener("storage",N),()=>window.removeEventListener("storage",N)},[O]),b.useEffect(()=>{E(e??p)},[e,p]);let A=b.useMemo(()=>({theme:p,setTheme:O,forcedTheme:e,resolvedTheme:p==="system"?w:p,themes:n?[...i,"system"]:i,systemTheme:n?w:void 0}),[p,O,e,w,n,i]);return b.createElement(vj.Provider,{value:A},b.createElement(gG,{forcedTheme:e,storageKey:a,attribute:c,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:f,themes:i,nonce:m,scriptProps:h}),u)},gG=b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:s,themes:c,nonce:f,scriptProps:u})=>{let m=JSON.stringify([n,t,i,e,c,s,r,a]).slice(1,-1);return b.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${fG.toString()})(${m})`}})}),yG=(e,t)=>{if(dG)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},bG=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Fw=e=>(e||(e=window.matchMedia(Uz)),e.matches?"dark":"light");function tM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jo(...e){return t=>{let n=!1;const r=e.map(a=>{const i=tM(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():tM(e[a],null)}}}}function tt(...e){return b.useCallback(jo(...e),e)}function vc(e){const t=xG(e),n=b.forwardRef((r,a)=>{const{children:i,...s}=r,c=b.Children.toArray(i),f=c.find(SG);if(f){const u=f.props.children,m=c.map(h=>h===f?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:h);return v.jsx(t,{...s,ref:a,children:b.isValidElement(u)?b.cloneElement(u,void 0,m):null})}return v.jsx(t,{...s,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var yj=vc("Slot");function xG(e){const t=b.forwardRef((n,r)=>{const{children:a,...i}=n;if(b.isValidElement(a)){const s=_G(a),c=EG(i,a.props);return a.type!==b.Fragment&&(c.ref=r?jo(r,s):s),b.cloneElement(a,c)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hz=Symbol("radix.slottable");function wG(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Hz,t}function SG(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hz}function EG(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...c)=>{const f=i(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function _G(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=jG.reduce((e,t)=>{const n=vc(`Primitive.${t}`),r=b.forwardRef((a,i)=>{const{asChild:s,...c}=a,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fz(e,t){e&&cl.flushSync(()=>e.dispatchEvent(t))}var qz=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),CG="VisuallyHidden",Kz=b.forwardRef((e,t)=>v.jsx(ke.span,{...e,ref:t,style:{...qz,...e.style}}));Kz.displayName=CG;var OG=Kz;function AG(e,t){const n=b.createContext(t),r=i=>{const{children:s,...c}=i,f=b.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:f,children:s})};r.displayName=e+"Provider";function a(i){const s=b.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Ja(e,t=[]){let n=[];function r(i,s){const c=b.createContext(s),f=n.length;n=[...n,s];const u=h=>{var E;const{scope:p,children:y,...w}=h,x=((E=p==null?void 0:p[e])==null?void 0:E[f])||c,S=b.useMemo(()=>w,Object.values(w));return v.jsx(x.Provider,{value:S,children:y})};u.displayName=i+"Provider";function m(h,p){var x;const y=((x=p==null?void 0:p[e])==null?void 0:x[f])||c,w=b.useContext(y);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,m]}const a=()=>{const i=n.map(s=>b.createContext(s));return function(c){const f=(c==null?void 0:c[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return a.scopeName=e,[r,NG(a,...t)]}function NG(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const s=r.reduce((c,{useScope:f,scopeName:u})=>{const h=f(i)[`__scope${u}`];return{...c,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function bj(e){const t=e+"CollectionProvider",[n,r]=Ja(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:S,children:E}=x,O=be.useRef(null),C=be.useRef(new Map).current;return v.jsx(a,{scope:S,itemMap:C,collectionRef:O,children:E})};s.displayName=t;const c=e+"CollectionSlot",f=vc(c),u=be.forwardRef((x,S)=>{const{scope:E,children:O}=x,C=i(c,E),A=tt(S,C.collectionRef);return v.jsx(f,{ref:A,children:O})});u.displayName=c;const m=e+"CollectionItemSlot",h="data-radix-collection-item",p=vc(m),y=be.forwardRef((x,S)=>{const{scope:E,children:O,...C}=x,A=be.useRef(null),N=tt(S,A),T=i(m,E);return be.useEffect(()=>(T.itemMap.set(A,{ref:A,...C}),()=>void T.itemMap.delete(A))),v.jsx(p,{[h]:"",ref:N,children:O})});y.displayName=m;function w(x){const S=i(e+"CollectionConsumer",x);return be.useCallback(()=>{const O=S.collectionRef.current;if(!O)return[];const C=Array.from(O.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((T,P)=>C.indexOf(T.ref.current)-C.indexOf(P.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:s,Slot:u,ItemSlot:y},w,r]}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var zn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},TG=tj[" useInsertionEffect ".trim().toString()]||zn;function Js({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,s]=PG({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:a;{const m=b.useRef(e!==void 0);b.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const u=b.useCallback(m=>{var h;if(c){const p=MG(m)?m(e):m;p!==e&&((h=s.current)==null||h.call(s,p))}else i(m)},[c,e,i,s]);return[f,u]}function PG({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),a=b.useRef(n),i=b.useRef(t);return TG(()=>{i.current=t},[t]),b.useEffect(()=>{var s;a.current!==n&&((s=i.current)==null||s.call(i,n),a.current=n)},[n,a]),[n,r,i]}function MG(e){return typeof e=="function"}function RG(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var dr=e=>{const{present:t,children:n}=e,r=kG(t),a=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=tt(r.ref,DG(a));return typeof n=="function"||r.isPresent?b.cloneElement(a,{ref:i}):null};dr.displayName="Presence";function kG(e){const[t,n]=b.useState(),r=b.useRef(null),a=b.useRef(e),i=b.useRef("none"),s=e?"mounted":"unmounted",[c,f]=RG(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=jv(r.current);i.current=c==="mounted"?u:"none"},[c]),zn(()=>{const u=r.current,m=a.current;if(m!==e){const p=i.current,y=jv(u);e?f("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(m&&p!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),zn(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,h=y=>{const x=jv(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&x&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},p=y=>{y.target===t&&(i.current=jv(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function jv(e){return(e==null?void 0:e.animationName)||"none"}function DG(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var IG=tj[" useId ".trim().toString()]||(()=>{}),LG=0;function Ln(e){const[t,n]=b.useState(IG());return zn(()=>{n(r=>r??String(LG++))},[e]),e||(t?`radix-${t}`:"")}var Gy="Collapsible",[zG]=Ja(Gy),[$G,xj]=zG(Gy),Vz=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:s,...c}=e,[f,u]=Js({prop:r,defaultProp:a??!1,onChange:s,caller:Gy});return v.jsx($G,{scope:n,disabled:i,contentId:Ln(),open:f,onOpenToggle:b.useCallback(()=>u(m=>!m),[u]),children:v.jsx(ke.div,{"data-state":Sj(f),"data-disabled":i?"":void 0,...c,ref:t})})});Vz.displayName=Gy;var Yz="CollapsibleTrigger",Gz=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=xj(Yz,n);return v.jsx(ke.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Sj(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:Se(e.onClick,a.onOpenToggle)})});Gz.displayName=Yz;var wj="CollapsibleContent",Xz=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=xj(wj,e.__scopeCollapsible);return v.jsx(dr,{present:n||a.open,children:({present:i})=>v.jsx(BG,{...r,ref:t,present:i})})});Xz.displayName=wj;var BG=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=e,s=xj(wj,n),[c,f]=b.useState(r),u=b.useRef(null),m=tt(t,u),h=b.useRef(0),p=h.current,y=b.useRef(0),w=y.current,x=s.open||c,S=b.useRef(x),E=b.useRef(void 0);return b.useEffect(()=>{const O=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(O)},[]),zn(()=>{const O=u.current;if(O){E.current=E.current||{transitionDuration:O.style.transitionDuration,animationName:O.style.animationName},O.style.transitionDuration="0s",O.style.animationName="none";const C=O.getBoundingClientRect();h.current=C.height,y.current=C.width,S.current||(O.style.transitionDuration=E.current.transitionDuration,O.style.animationName=E.current.animationName),f(r)}},[s.open,r]),v.jsx(ke.div,{"data-state":Sj(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!x,...i,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:x&&a})});function Sj(e){return e?"open":"closed"}var UG=Vz,HG=b.createContext(void 0);function bm(e){const t=b.useContext(HG);return e||t||"ltr"}function Xn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function FG(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e);b.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qG="DismissableLayer",wE="dismissableLayer.update",KG="dismissableLayer.pointerDownOutside",VG="dismissableLayer.focusOutside",nM,Wz=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xm=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...f}=e,u=b.useContext(Wz),[m,h]=b.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=b.useState({}),w=tt(t,P=>h(P)),x=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=x.indexOf(S),O=m?x.indexOf(m):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,A=O>=E,N=XG(P=>{const k=P.target,D=[...u.branches].some(K=>K.contains(k));!A||D||(a==null||a(P),s==null||s(P),P.defaultPrevented||c==null||c())},p),T=WG(P=>{const k=P.target;[...u.branches].some(K=>K.contains(k))||(i==null||i(P),s==null||s(P),P.defaultPrevented||c==null||c())},p);return FG(P=>{O===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},p),b.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(nM=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),rM(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nM)}},[m,p,n,u]),b.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),rM())},[m,u]),b.useEffect(()=>{const P=()=>y({});return document.addEventListener(wE,P),()=>document.removeEventListener(wE,P)},[]),v.jsx(ke.div,{...f,ref:w,style:{pointerEvents:C?A?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,N.onPointerDownCapture)})});xm.displayName=qG;var YG="DismissableLayerBranch",GG=b.forwardRef((e,t)=>{const n=b.useContext(Wz),r=b.useRef(null),a=tt(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(ke.div,{...e,ref:a})});GG.displayName=YG;function XG(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let f=function(){Qz(KG,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function WG(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=b.useRef(!1);return b.useEffect(()=>{const a=i=>{i.target&&!r.current&&Qz(VG,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rM(){const e=new CustomEvent(wE);document.dispatchEvent(e)}function Qz(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Fz(a,i):a.dispatchEvent(i)}var qw="focusScope.autoFocusOnMount",Kw="focusScope.autoFocusOnUnmount",aM={bubbles:!1,cancelable:!0},QG="FocusScope",Xy=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[c,f]=b.useState(null),u=Xn(a),m=Xn(i),h=b.useRef(null),p=tt(t,x=>f(x)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let x=function(C){if(y.paused||!c)return;const A=C.target;c.contains(A)?h.current=A:Ms(h.current,{select:!0})},S=function(C){if(y.paused||!c)return;const A=C.relatedTarget;A!==null&&(c.contains(A)||Ms(h.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&Ms(c)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const O=new MutationObserver(E);return c&&O.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),O.disconnect()}}},[r,c,y.paused]),b.useEffect(()=>{if(c){oM.add(y);const x=document.activeElement;if(!c.contains(x)){const E=new CustomEvent(qw,aM);c.addEventListener(qw,u),c.dispatchEvent(E),E.defaultPrevented||(ZG(rX(Zz(c)),{select:!0}),document.activeElement===x&&Ms(c))}return()=>{c.removeEventListener(qw,u),setTimeout(()=>{const E=new CustomEvent(Kw,aM);c.addEventListener(Kw,m),c.dispatchEvent(E),E.defaultPrevented||Ms(x??document.body,{select:!0}),c.removeEventListener(Kw,m),oM.remove(y)},0)}}},[c,u,m,y]);const w=b.useCallback(x=>{if(!n&&!r||y.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,E=document.activeElement;if(S&&E){const O=x.currentTarget,[C,A]=JG(O);C&&A?!x.shiftKey&&E===A?(x.preventDefault(),n&&Ms(C,{select:!0})):x.shiftKey&&E===C&&(x.preventDefault(),n&&Ms(A,{select:!0})):E===O&&x.preventDefault()}},[n,r,y.paused]);return v.jsx(ke.div,{tabIndex:-1,...s,ref:p,onKeyDown:w})});Xy.displayName=QG;function ZG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ms(r,{select:t}),document.activeElement!==n)return}function JG(e){const t=Zz(e),n=iM(t,e),r=iM(t.reverse(),e);return[n,r]}function Zz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iM(e,t){for(const n of e)if(!eX(n,{upTo:t}))return n}function eX(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tX(e){return e instanceof HTMLInputElement&&"select"in e}function Ms(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tX(e)&&t&&e.select()}}var oM=nX();function nX(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])==null||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rX(e){return e.filter(t=>t.tagName!=="A")}var aX="Portal",wm=b.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,i]=b.useState(!1);zn(()=>i(!0),[]);const s=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?_z.createPortal(v.jsx(ke.div,{...r,ref:t}),s):null});wm.displayName=aX;var Vw=0;function Ej(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lM()),document.body.insertAdjacentElement("beforeend",e[1]??lM()),Vw++,()=>{Vw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vw--}},[])}function lM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var wi=function(){return wi=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wi.apply(this,arguments)};function Jz(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function iX(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var sg="right-scroll-bar-position",lg="width-before-scroll-bar",oX="with-scroll-bars-hidden",sX="--removed-body-scroll-bar-size";function Yw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lX(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var cX=typeof window<"u"?b.useLayoutEffect:b.useEffect,cM=new WeakMap;function uX(e,t){var n=lX(null,function(r){return e.forEach(function(a){return Yw(a,r)})});return cX(function(){var r=cM.get(n);if(r){var a=new Set(r),i=new Set(e),s=n.current;a.forEach(function(c){i.has(c)||Yw(c,null)}),i.forEach(function(c){a.has(c)||Yw(c,s)})}cM.set(n,e)},[e]),n}function fX(e){return e}function dX(e,t){t===void 0&&(t=fX);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(i),s=n}var f=function(){var m=s;s=[],m.forEach(i)},u=function(){return Promise.resolve().then(f)};u(),n={push:function(m){s.push(m),u()},filter:function(m){return s=s.filter(m),n}}}};return a}function hX(e){e===void 0&&(e={});var t=dX(null);return t.options=wi({async:!0,ssr:!1},e),t}var e4=function(e){var t=e.sideCar,n=Jz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,wi({},n))};e4.isSideCarExport=!0;function mX(e,t){return e.useMedium(t),e4}var t4=hX(),Gw=function(){},Wy=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Gw,onWheelCapture:Gw,onTouchMoveCapture:Gw}),a=r[0],i=r[1],s=e.forwardProps,c=e.children,f=e.className,u=e.removeScrollBar,m=e.enabled,h=e.shards,p=e.sideCar,y=e.noRelative,w=e.noIsolation,x=e.inert,S=e.allowPinchZoom,E=e.as,O=E===void 0?"div":E,C=e.gapMode,A=Jz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,T=uX([n,t]),P=wi(wi({},A),a);return b.createElement(b.Fragment,null,m&&b.createElement(N,{sideCar:t4,removeScrollBar:u,shards:h,noRelative:y,noIsolation:w,inert:x,setCallbacks:i,allowPinchZoom:!!S,lockRef:n,gapMode:C}),s?b.cloneElement(b.Children.only(c),wi(wi({},P),{ref:T})):b.createElement(O,wi({},P,{className:f,ref:T}),c))});Wy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wy.classNames={fullWidth:lg,zeroRight:sg};var pX=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vX(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pX();return t&&e.setAttribute("nonce",t),e}function gX(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yX(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bX=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vX())&&(gX(t,n),yX(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xX=function(){var e=bX();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},n4=function(){var e=xX(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},wX={left:0,top:0,right:0,gap:0},Xw=function(e){return parseInt(e||"",10)||0},SX=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Xw(n),Xw(r),Xw(a)]},EX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wX;var t=SX(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_X=n4(),ef="data-scroll-locked",jX=function(e,t,n,r){var a=e.left,i=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(oX,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(c,"px ").concat(r,`;
  }
  body[`).concat(ef,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(c,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(sg,` {
    right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(lg,` {
    margin-right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(sg," .").concat(sg,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(lg," .").concat(lg,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(ef,`] {
    `).concat(sX,": ").concat(c,`px;
  }
`)},uM=function(){var e=parseInt(document.body.getAttribute(ef)||"0",10);return isFinite(e)?e:0},CX=function(){b.useEffect(function(){return document.body.setAttribute(ef,(uM()+1).toString()),function(){var e=uM()-1;e<=0?document.body.removeAttribute(ef):document.body.setAttribute(ef,e.toString())}},[])},OX=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;CX();var i=b.useMemo(function(){return EX(a)},[a]);return b.createElement(_X,{styles:jX(i,!t,a,n?"":"!important")})},SE=!1;if(typeof window<"u")try{var Cv=Object.defineProperty({},"passive",{get:function(){return SE=!0,!0}});window.addEventListener("test",Cv,Cv),window.removeEventListener("test",Cv,Cv)}catch{SE=!1}var Ru=SE?{passive:!1}:!1,AX=function(e){return e.tagName==="TEXTAREA"},r4=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!AX(e)&&n[t]==="visible")},NX=function(e){return r4(e,"overflowY")},TX=function(e){return r4(e,"overflowX")},fM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=a4(e,r);if(a){var i=i4(e,r),s=i[1],c=i[2];if(s>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PX=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},MX=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},a4=function(e,t){return e==="v"?NX(t):TX(t)},i4=function(e,t){return e==="v"?PX(t):MX(t)},RX=function(e,t){return e==="h"&&t==="rtl"?-1:1},kX=function(e,t,n,r,a){var i=RX(e,window.getComputedStyle(t).direction),s=i*r,c=n.target,f=t.contains(c),u=!1,m=s>0,h=0,p=0;do{if(!c)break;var y=i4(e,c),w=y[0],x=y[1],S=y[2],E=x-S-i*w;(w||E)&&a4(e,c)&&(h+=E,p+=w);var O=c.parentNode;c=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(h)<1||!m&&Math.abs(p)<1)&&(u=!0),u},Ov=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dM=function(e){return[e.deltaX,e.deltaY]},hM=function(e){return e&&"current"in e?e.current:e},DX=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IX=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},LX=0,ku=[];function zX(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),a=b.useState(LX++)[0],i=b.useState(n4)[0],s=b.useRef(e);b.useEffect(function(){s.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=iX([e.lockRef.current],(e.shards||[]).map(hM),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=b.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var E=Ov(x),O=n.current,C="deltaX"in x?x.deltaX:O[0]-E[0],A="deltaY"in x?x.deltaY:O[1]-E[1],N,T=x.target,P=Math.abs(C)>Math.abs(A)?"h":"v";if("touches"in x&&P==="h"&&T.type==="range")return!1;var k=window.getSelection(),D=k&&k.anchorNode,K=D?D===T||D.contains(T):!1;if(K)return!1;var L=fM(P,T);if(!L)return!0;if(L?N=P:(N=P==="v"?"h":"v",L=fM(P,T)),!L)return!1;if(!r.current&&"changedTouches"in x&&(C||A)&&(r.current=N),!N)return!0;var I=r.current||N;return kX(I,S,x,I==="h"?C:A)},[]),f=b.useCallback(function(x){var S=x;if(!(!ku.length||ku[ku.length-1]!==i)){var E="deltaY"in S?dM(S):Ov(S),O=t.current.filter(function(N){return N.name===S.type&&(N.target===S.target||S.target===N.shadowParent)&&DX(N.delta,E)})[0];if(O&&O.should){S.cancelable&&S.preventDefault();return}if(!O){var C=(s.current.shards||[]).map(hM).filter(Boolean).filter(function(N){return N.contains(S.target)}),A=C.length>0?c(S,C[0]):!s.current.noIsolation;A&&S.cancelable&&S.preventDefault()}}},[]),u=b.useCallback(function(x,S,E,O){var C={name:x,delta:S,target:E,should:O,shadowParent:$X(E)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(A){return A!==C})},1)},[]),m=b.useCallback(function(x){n.current=Ov(x),r.current=void 0},[]),h=b.useCallback(function(x){u(x.type,dM(x),x.target,c(x,e.lockRef.current))},[]),p=b.useCallback(function(x){u(x.type,Ov(x),x.target,c(x,e.lockRef.current))},[]);b.useEffect(function(){return ku.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",f,Ru),document.addEventListener("touchmove",f,Ru),document.addEventListener("touchstart",m,Ru),function(){ku=ku.filter(function(x){return x!==i}),document.removeEventListener("wheel",f,Ru),document.removeEventListener("touchmove",f,Ru),document.removeEventListener("touchstart",m,Ru)}},[]);var y=e.removeScrollBar,w=e.inert;return b.createElement(b.Fragment,null,w?b.createElement(i,{styles:IX(a)}):null,y?b.createElement(OX,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $X(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const BX=mX(t4,zX);var Qy=b.forwardRef(function(e,t){return b.createElement(Wy,wi({},e,{ref:t,sideCar:BX}))});Qy.classNames=Wy.classNames;var UX=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Du=new WeakMap,Av=new WeakMap,Nv={},Ww=0,o4=function(e){return e&&(e.host||o4(e.parentNode))},HX=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=o4(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},FX=function(e,t,n,r){var a=HX(t,Array.isArray(e)?e:[e]);Nv[n]||(Nv[n]=new WeakMap);var i=Nv[n],s=[],c=new Set,f=new Set(a),u=function(h){!h||c.has(h)||(c.add(h),u(h.parentNode))};a.forEach(u);var m=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(p){if(c.has(p))m(p);else try{var y=p.getAttribute(r),w=y!==null&&y!=="false",x=(Du.get(p)||0)+1,S=(i.get(p)||0)+1;Du.set(p,x),i.set(p,S),s.push(p),x===1&&w&&Av.set(p,!0),S===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",p,E)}})};return m(t),c.clear(),Ww++,function(){s.forEach(function(h){var p=Du.get(h)-1,y=i.get(h)-1;Du.set(h,p),i.set(h,y),p||(Av.has(h)||h.removeAttribute(r),Av.delete(h)),y||h.removeAttribute(n)}),Ww--,Ww||(Du=new WeakMap,Du=new WeakMap,Av=new WeakMap,Nv={})}},_j=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=UX(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),FX(r,a,n,"aria-hidden")):function(){return null}},Zy="Dialog",[s4]=Ja(Zy),[qX,ei]=s4(Zy),l4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=b.useRef(null),f=b.useRef(null),[u,m]=Js({prop:r,defaultProp:a??!1,onChange:i,caller:Zy});return v.jsx(qX,{scope:t,triggerRef:c,contentRef:f,contentId:Ln(),titleId:Ln(),descriptionId:Ln(),open:u,onOpenChange:m,onOpenToggle:b.useCallback(()=>m(h=>!h),[m]),modal:s,children:n})};l4.displayName=Zy;var c4="DialogTrigger",KX=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ei(c4,n),i=tt(t,a.triggerRef);return v.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Oj(a.open),...r,ref:i,onClick:Se(e.onClick,a.onOpenToggle)})});KX.displayName=c4;var jj="DialogPortal",[VX,u4]=s4(jj,{forceMount:void 0}),f4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=ei(jj,t);return v.jsx(VX,{scope:t,forceMount:n,children:b.Children.map(r,s=>v.jsx(dr,{present:n||i.open,children:v.jsx(wm,{asChild:!0,container:a,children:s})}))})};f4.displayName=jj;var jg="DialogOverlay",d4=b.forwardRef((e,t)=>{const n=u4(jg,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=ei(jg,e.__scopeDialog);return i.modal?v.jsx(dr,{present:r||i.open,children:v.jsx(GX,{...a,ref:t})}):null});d4.displayName=jg;var YX=vc("DialogOverlay.RemoveScroll"),GX=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ei(jg,n);return v.jsx(Qy,{as:YX,allowPinchZoom:!0,shards:[a.contentRef],children:v.jsx(ke.div,{"data-state":Oj(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gc="DialogContent",h4=b.forwardRef((e,t)=>{const n=u4(gc,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=ei(gc,e.__scopeDialog);return v.jsx(dr,{present:r||i.open,children:i.modal?v.jsx(XX,{...a,ref:t}):v.jsx(WX,{...a,ref:t})})});h4.displayName=gc;var XX=b.forwardRef((e,t)=>{const n=ei(gc,e.__scopeDialog),r=b.useRef(null),a=tt(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return _j(i)},[]),v.jsx(m4,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&i.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,i=>i.preventDefault())})}),WX=b.forwardRef((e,t)=>{const n=ei(gc,e.__scopeDialog),r=b.useRef(!1),a=b.useRef(!1);return v.jsx(m4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var f,u;(f=e.onInteractOutside)==null||f.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),m4=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,c=ei(gc,n),f=b.useRef(null),u=tt(t,f);return Ej(),v.jsxs(v.Fragment,{children:[v.jsx(Xy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:v.jsx(xm,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Oj(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(QX,{titleId:c.titleId}),v.jsx(JX,{contentRef:f,descriptionId:c.descriptionId})]})]})}),Cj="DialogTitle",p4=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ei(Cj,n);return v.jsx(ke.h2,{id:a.titleId,...r,ref:t})});p4.displayName=Cj;var v4="DialogDescription",g4=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ei(v4,n);return v.jsx(ke.p,{id:a.descriptionId,...r,ref:t})});g4.displayName=v4;var y4="DialogClose",b4=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ei(y4,n);return v.jsx(ke.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});b4.displayName=y4;function Oj(e){return e?"open":"closed"}var x4="DialogTitleWarning",[ZTe,w4]=AG(x4,{contentName:gc,titleName:Cj,docsSlug:"dialog"}),QX=({titleId:e})=>{const t=w4(x4),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ZX="DialogDescriptionWarning",JX=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${w4(ZX).contentName}}.`;return b.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Aj=l4,Nj=f4,Tj=d4,Pj=h4,S4=p4,E4=g4,Mj=b4,Qw={exports:{}},Zw={};/**
 * @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 mM;function eW(){if(mM)return Zw;mM=1;var e=Uf();function t(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function c(h,p){var y=p(),w=r({inst:{value:y,getSnapshot:p}}),x=w[0].inst,S=w[1];return i(function(){x.value=y,x.getSnapshot=p,f(x)&&S({inst:x})},[h,y,p]),a(function(){return f(x)&&S({inst:x}),h(function(){f(x)&&S({inst:x})})},[h]),s(y),y}function f(h){var p=h.getSnapshot;h=h.value;try{var y=p();return!n(h,y)}catch{return!0}}function u(h,p){return p()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return Zw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Zw}var pM;function tW(){return pM||(pM=1,Qw.exports=eW()),Qw.exports}function nW(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function rW(e){const[t,n]=b.useState(void 0);return zn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let s,c;if("borderBoxSize"in i){const f=i.borderBoxSize,u=Array.isArray(f)?f[0]:f;s=u.inlineSize,c=u.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const aW=["top","right","bottom","left"],el=Math.min,Xr=Math.max,Cg=Math.round,Tv=Math.floor,Ci=e=>({x:e,y:e}),iW={left:"right",right:"left",bottom:"top",top:"bottom"};function EE(e,t,n){return Xr(e,el(t,n))}function Co(e,t){return typeof e=="function"?e(t):e}function Oo(e){return e.split("-")[0]}function Kf(e){return e.split("-")[1]}function Rj(e){return e==="x"?"y":"x"}function kj(e){return e==="y"?"height":"width"}function Si(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Dj(e){return Rj(Si(e))}function oW(e,t,n){n===void 0&&(n=!1);const r=Kf(e),a=Dj(e),i=kj(a);let s=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Og(s)),[s,Og(s)]}function sW(e){const t=Og(e);return[_E(e),t,_E(t)]}function _E(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vM=["left","right"],gM=["right","left"],lW=["top","bottom"],cW=["bottom","top"];function uW(e,t,n){switch(e){case"top":case"bottom":return n?t?gM:vM:t?vM:gM;case"left":case"right":return t?lW:cW;default:return[]}}function fW(e,t,n,r){const a=Kf(e);let i=uW(Oo(e),n==="start",r);return a&&(i=i.map(s=>s+"-"+a),t&&(i=i.concat(i.map(_E)))),i}function Og(e){const t=Oo(e);return iW[t]+e.slice(t.length)}function dW(e){return{top:0,right:0,bottom:0,left:0,...e}}function _4(e){return typeof e!="number"?dW(e):{top:e,right:e,bottom:e,left:e}}function Ag(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function yM(e,t,n){let{reference:r,floating:a}=e;const i=Si(t),s=Dj(t),c=kj(s),f=Oo(t),u=i==="y",m=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,p=r[c]/2-a[c]/2;let y;switch(f){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:h};break;case"left":y={x:r.x-a.width,y:h};break;default:y={x:r.x,y:r.y}}switch(Kf(t)){case"start":y[s]-=p*(n&&u?-1:1);break;case"end":y[s]+=p*(n&&u?-1:1);break}return y}async function hW(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:s,elements:c,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:p=!1,padding:y=0}=Co(t,e),w=_4(y),S=c[p?h==="floating"?"reference":"floating":h],E=Ag(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:m,strategy:f})),O=h==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),A=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},N=Ag(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:C,strategy:f}):O);return{top:(E.top-N.top+w.top)/A.y,bottom:(N.bottom-E.bottom+w.bottom)/A.y,left:(E.left-N.left+w.left)/A.x,right:(N.right-E.right+w.right)/A.x}}const mW=50,pW=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:hW},f=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:h}=yM(u,r,f),p=r,y=0;const w={};for(let x=0;x<i.length;x++){const S=i[x];if(!S)continue;const{name:E,fn:O}=S,{x:C,y:A,data:N,reset:T}=await O({x:m,y:h,initialPlacement:r,placement:p,strategy:a,middlewareData:w,rects:u,platform:c,elements:{reference:e,floating:t}});m=C??m,h=A??h,w[E]={...w[E],...N},T&&y<mW&&(y++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(u=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):T.rects),{x:m,y:h}=yM(u,p,f)),x=-1)}return{x:m,y:h,placement:p,strategy:a,middlewareData:w}},vW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:s,elements:c,middlewareData:f}=t,{element:u,padding:m=0}=Co(e,t)||{};if(u==null)return{};const h=_4(m),p={x:n,y:r},y=Dj(a),w=kj(y),x=await s.getDimensions(u),S=y==="y",E=S?"top":"left",O=S?"bottom":"right",C=S?"clientHeight":"clientWidth",A=i.reference[w]+i.reference[y]-p[y]-i.floating[w],N=p[y]-i.reference[y],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let P=T?T[C]:0;(!P||!await(s.isElement==null?void 0:s.isElement(T)))&&(P=c.floating[C]||i.floating[w]);const k=A/2-N/2,D=P/2-x[w]/2-1,K=el(h[E],D),L=el(h[O],D),I=K,W=P-x[w]-L,$=P/2-x[w]/2+k,V=EE(I,$,W),R=!f.arrow&&Kf(a)!=null&&$!==V&&i.reference[w]/2-($<I?K:L)-x[w]/2<0,H=R?$<I?$-I:$-W:0;return{[y]:p[y]+H,data:{[y]:V,centerOffset:$-V-H,...R&&{alignmentOffset:H}},reset:R}}}),gW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:s,initialPlacement:c,platform:f,elements:u}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...S}=Co(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Oo(a),O=Si(c),C=Oo(c)===c,A=await(f.isRTL==null?void 0:f.isRTL(u.floating)),N=p||(C||!x?[Og(c)]:sW(c)),T=w!=="none";!p&&T&&N.push(...fW(c,x,w,A));const P=[c,...N],k=await f.detectOverflow(t,S),D=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&D.push(k[E]),h){const $=oW(a,s,A);D.push(k[$[0]],k[$[1]])}if(K=[...K,{placement:a,overflows:D}],!D.every($=>$<=0)){var L,I;const $=(((L=i.flip)==null?void 0:L.index)||0)+1,V=P[$];if(V&&(!(h==="alignment"?O!==Si(V):!1)||K.every(q=>Si(q.placement)===O?q.overflows[0]>0:!0)))return{data:{index:$,overflows:K},reset:{placement:V}};let R=(I=K.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:I.placement;if(!R)switch(y){case"bestFit":{var W;const H=(W=K.filter(q=>{if(T){const F=Si(q.placement);return F===O||F==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(F=>F>0).reduce((F,Y)=>F+Y,0)]).sort((q,F)=>q[1]-F[1])[0])==null?void 0:W[0];H&&(R=H);break}case"initialPlacement":R=c;break}if(a!==R)return{reset:{placement:R}}}return{}}}};function bM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xM(e){return aW.some(t=>e[t]>=0)}const yW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Co(e,t);switch(a){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=bM(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:xM(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),c=bM(s,n.floating);return{data:{escapedOffsets:c,escaped:xM(c)}}}default:return{}}}}},j4=new Set(["left","top"]);async function bW(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=Oo(n),c=Kf(n),f=Si(n)==="y",u=j4.has(s)?-1:1,m=i&&f?-1:1,h=Co(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),f?{x:y*m,y:p*u}:{x:p*u,y:y*m}}const xW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:s,middlewareData:c}=t,f=await bW(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+f.x,y:i+f.y,data:{...f,placement:s}}}}},wW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:E=>{let{x:O,y:C}=E;return{x:O,y:C}}},...u}=Co(e,t),m={x:n,y:r},h=await i.detectOverflow(t,u),p=Si(Oo(a)),y=Rj(p);let w=m[y],x=m[p];if(s){const E=y==="y"?"top":"left",O=y==="y"?"bottom":"right",C=w+h[E],A=w-h[O];w=EE(C,w,A)}if(c){const E=p==="y"?"top":"left",O=p==="y"?"bottom":"right",C=x+h[E],A=x-h[O];x=EE(C,x,A)}const S=f.fn({...t,[y]:w,[p]:x});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:s,[p]:c}}}}}},SW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:f=!0,crossAxis:u=!0}=Co(e,t),m={x:n,y:r},h=Si(a),p=Rj(h);let y=m[p],w=m[h];const x=Co(c,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const C=p==="y"?"height":"width",A=i.reference[p]-i.floating[C]+S.mainAxis,N=i.reference[p]+i.reference[C]-S.mainAxis;y<A?y=A:y>N&&(y=N)}if(u){var E,O;const C=p==="y"?"width":"height",A=j4.has(Oo(a)),N=i.reference[h]-i.floating[C]+(A&&((E=s.offset)==null?void 0:E[h])||0)+(A?0:S.crossAxis),T=i.reference[h]+i.reference[C]+(A?0:((O=s.offset)==null?void 0:O[h])||0)-(A?S.crossAxis:0);w<N?w=N:w>T&&(w=T)}return{[p]:y,[h]:w}}}},EW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:s,elements:c}=t,{apply:f=()=>{},...u}=Co(e,t),m=await s.detectOverflow(t,u),h=Oo(a),p=Kf(a),y=Si(a)==="y",{width:w,height:x}=i.floating;let S,E;h==="top"||h==="bottom"?(S=h,E=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(E=h,S=p==="end"?"top":"bottom");const O=x-m.top-m.bottom,C=w-m.left-m.right,A=el(x-m[S],O),N=el(w-m[E],C),T=!t.middlewareData.shift;let P=A,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=O),T&&!p){const K=Xr(m.left,0),L=Xr(m.right,0),I=Xr(m.top,0),W=Xr(m.bottom,0);y?k=w-2*(K!==0||L!==0?K+L:Xr(m.left,m.right)):P=x-2*(I!==0||W!==0?I+W:Xr(m.top,m.bottom))}await f({...t,availableWidth:k,availableHeight:P});const D=await s.getDimensions(c.floating);return w!==D.width||x!==D.height?{reset:{rects:!0}}:{}}}};function Jy(){return typeof window<"u"}function Vf(e){return C4(e)?(e.nodeName||"").toLowerCase():"#document"}function Jr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Di(e){var t;return(t=(C4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function C4(e){return Jy()?e instanceof Node||e instanceof Jr(e).Node:!1}function Ga(e){return Jy()?e instanceof Element||e instanceof Jr(e).Element:!1}function zo(e){return Jy()?e instanceof HTMLElement||e instanceof Jr(e).HTMLElement:!1}function wM(e){return!Jy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jr(e).ShadowRoot}function Sm(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Xa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function _W(e){return/^(table|td|th)$/.test(Vf(e))}function e0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const jW=/transform|translate|scale|rotate|perspective|filter/,CW=/paint|layout|strict|content/,zl=e=>!!e&&e!=="none";let Jw;function Ij(e){const t=Ga(e)?Xa(e):e;return zl(t.transform)||zl(t.translate)||zl(t.scale)||zl(t.rotate)||zl(t.perspective)||!Lj()&&(zl(t.backdropFilter)||zl(t.filter))||jW.test(t.willChange||"")||CW.test(t.contain||"")}function OW(e){let t=tl(e);for(;zo(t)&&!Sf(t);){if(Ij(t))return t;if(e0(t))return null;t=tl(t)}return null}function Lj(){return Jw==null&&(Jw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jw}function Sf(e){return/^(html|body|#document)$/.test(Vf(e))}function Xa(e){return Jr(e).getComputedStyle(e)}function t0(e){return Ga(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tl(e){if(Vf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wM(e)&&e.host||Di(e);return wM(t)?t.host:t}function O4(e){const t=tl(e);return Sf(t)?e.ownerDocument?e.ownerDocument.body:e.body:zo(t)&&Sm(t)?t:O4(t)}function kh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=O4(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),s=Jr(a);if(i){const c=jE(s);return t.concat(s,s.visualViewport||[],Sm(a)?a:[],c&&n?kh(c):[])}else return t.concat(a,kh(a,[],n))}function jE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A4(e){const t=Xa(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=zo(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=Cg(n)!==i||Cg(r)!==s;return c&&(n=i,r=s),{width:n,height:r,$:c}}function zj(e){return Ga(e)?e:e.contextElement}function tf(e){const t=zj(e);if(!zo(t))return Ci(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=A4(t);let s=(i?Cg(n.width):n.width)/r,c=(i?Cg(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const AW=Ci(0);function N4(e){const t=Jr(e);return!Lj()||!t.visualViewport?AW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jr(e)?!1:t}function yc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=zj(e);let s=Ci(1);t&&(r?Ga(r)&&(s=tf(r)):s=tf(e));const c=NW(i,n,r)?N4(i):Ci(0);let f=(a.left+c.x)/s.x,u=(a.top+c.y)/s.y,m=a.width/s.x,h=a.height/s.y;if(i){const p=Jr(i),y=r&&Ga(r)?Jr(r):r;let w=p,x=jE(w);for(;x&&r&&y!==w;){const S=tf(x),E=x.getBoundingClientRect(),O=Xa(x),C=E.left+(x.clientLeft+parseFloat(O.paddingLeft))*S.x,A=E.top+(x.clientTop+parseFloat(O.paddingTop))*S.y;f*=S.x,u*=S.y,m*=S.x,h*=S.y,f+=C,u+=A,w=Jr(x),x=jE(w)}}return Ag({width:m,height:h,x:f,y:u})}function n0(e,t){const n=t0(e).scrollLeft;return t?t.left+n:yc(Di(e)).left+n}function T4(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-n0(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function TW(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",s=Di(r),c=t?e0(t.floating):!1;if(r===s||c&&i)return n;let f={scrollLeft:0,scrollTop:0},u=Ci(1);const m=Ci(0),h=zo(r);if((h||!h&&!i)&&((Vf(r)!=="body"||Sm(s))&&(f=t0(r)),h)){const y=yc(r);u=tf(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const p=s&&!h&&!i?T4(s,f):Ci(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-f.scrollTop*u.y+m.y+p.y}}function PW(e){return Array.from(e.getClientRects())}function MW(e){const t=Di(e),n=t0(e),r=e.ownerDocument.body,a=Xr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+n0(e);const c=-n.scrollTop;return Xa(r).direction==="rtl"&&(s+=Xr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:s,y:c}}const SM=25;function RW(e,t){const n=Jr(e),r=Di(e),a=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,c=0,f=0;if(a){i=a.width,s=a.height;const m=Lj();(!m||m&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}const u=n0(r);if(u<=0){const m=r.ownerDocument,h=m.body,p=getComputedStyle(h),y=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-h.clientWidth-y);w<=SM&&(i-=w)}else u<=SM&&(i+=u);return{width:i,height:s,x:c,y:f}}function kW(e,t){const n=yc(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=zo(e)?tf(e):Ci(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,f=a*i.x,u=r*i.y;return{width:s,height:c,x:f,y:u}}function EM(e,t,n){let r;if(t==="viewport")r=RW(e,n);else if(t==="document")r=MW(Di(e));else if(Ga(t))r=kW(t,n);else{const a=N4(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ag(r)}function P4(e,t){const n=tl(e);return n===t||!Ga(n)||Sf(n)?!1:Xa(n).position==="fixed"||P4(n,t)}function DW(e,t){const n=t.get(e);if(n)return n;let r=kh(e,[],!1).filter(c=>Ga(c)&&Vf(c)!=="body"),a=null;const i=Xa(e).position==="fixed";let s=i?tl(e):e;for(;Ga(s)&&!Sf(s);){const c=Xa(s),f=Ij(s);!f&&c.position==="fixed"&&(a=null),(i?!f&&!a:!f&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Sm(s)&&!f&&P4(e,s))?r=r.filter(m=>m!==s):a=c,s=tl(s)}return t.set(e,r),r}function IW(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const s=[...n==="clippingAncestors"?e0(t)?[]:DW(t,this._c):[].concat(n),r],c=EM(t,s[0],a);let f=c.top,u=c.right,m=c.bottom,h=c.left;for(let p=1;p<s.length;p++){const y=EM(t,s[p],a);f=Xr(y.top,f),u=el(y.right,u),m=el(y.bottom,m),h=Xr(y.left,h)}return{width:u-h,height:m-f,x:h,y:f}}function LW(e){const{width:t,height:n}=A4(e);return{width:t,height:n}}function zW(e,t,n){const r=zo(t),a=Di(t),i=n==="fixed",s=yc(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const f=Ci(0);function u(){f.x=n0(a)}if(r||!r&&!i)if((Vf(t)!=="body"||Sm(a))&&(c=t0(t)),r){const y=yc(t,!0,i,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}else a&&u();i&&!r&&a&&u();const m=a&&!r&&!i?T4(a,c):Ci(0),h=s.left+c.scrollLeft-f.x-m.x,p=s.top+c.scrollTop-f.y-m.y;return{x:h,y:p,width:s.width,height:s.height}}function e1(e){return Xa(e).position==="static"}function _M(e,t){if(!zo(e)||Xa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Di(e)===n&&(n=n.ownerDocument.body),n}function M4(e,t){const n=Jr(e);if(e0(e))return n;if(!zo(e)){let a=tl(e);for(;a&&!Sf(a);){if(Ga(a)&&!e1(a))return a;a=tl(a)}return n}let r=_M(e,t);for(;r&&_W(r)&&e1(r);)r=_M(r,t);return r&&Sf(r)&&e1(r)&&!Ij(r)?n:r||OW(e)||n}const $W=async function(e){const t=this.getOffsetParent||M4,n=this.getDimensions,r=await n(e.floating);return{reference:zW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function BW(e){return Xa(e).direction==="rtl"}const UW={convertOffsetParentRelativeRectToViewportRelativeRect:TW,getDocumentElement:Di,getClippingRect:IW,getOffsetParent:M4,getElementRects:$W,getClientRects:PW,getDimensions:LW,getScale:tf,isElement:Ga,isRTL:BW};function R4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HW(e,t){let n=null,r;const a=Di(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),i();const u=e.getBoundingClientRect(),{left:m,top:h,width:p,height:y}=u;if(c||t(),!p||!y)return;const w=Tv(h),x=Tv(a.clientWidth-(m+p)),S=Tv(a.clientHeight-(h+y)),E=Tv(m),C={rootMargin:-w+"px "+-x+"px "+-S+"px "+-E+"px",threshold:Xr(0,el(1,f))||1};let A=!0;function N(T){const P=T[0].intersectionRatio;if(P!==f){if(!A)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!R4(u,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(N,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,C)}n.observe(e)}return s(!0),i}function FW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,u=zj(e),m=a||i?[...u?kh(u):[],...t?kh(t):[]]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const h=u&&c?HW(u,n):null;let p=-1,y=null;s&&(y=new ResizeObserver(E=>{let[O]=E;O&&O.target===u&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),u&&!f&&y.observe(u),t&&y.observe(t));let w,x=f?yc(e):null;f&&S();function S(){const E=yc(e);x&&!R4(x,E)&&n(),x=E,w=requestAnimationFrame(S)}return n(),()=>{var E;m.forEach(O=>{a&&O.removeEventListener("scroll",n),i&&O.removeEventListener("resize",n)}),h==null||h(),(E=y)==null||E.disconnect(),y=null,f&&cancelAnimationFrame(w)}}const qW=xW,KW=wW,VW=gW,YW=EW,GW=yW,jM=vW,XW=SW,WW=(e,t,n)=>{const r=new Map,a={platform:UW,...n},i={...a.platform,_c:r};return pW(e,t,{...a,platform:i})};var QW=typeof document<"u",ZW=function(){},cg=QW?b.useLayoutEffect:ZW;function Ng(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ng(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!Ng(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function k4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function CM(e,t){const n=k4(e);return Math.round(t*n)/n}function t1(e){const t=b.useRef(e);return cg(()=>{t.current=e}),t}function JW(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:f,open:u}=e,[m,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=b.useState(r);Ng(p,r)||y(r);const[w,x]=b.useState(null),[S,E]=b.useState(null),O=b.useCallback(q=>{q!==T.current&&(T.current=q,x(q))},[]),C=b.useCallback(q=>{q!==P.current&&(P.current=q,E(q))},[]),A=i||w,N=s||S,T=b.useRef(null),P=b.useRef(null),k=b.useRef(m),D=f!=null,K=t1(f),L=t1(a),I=t1(u),W=b.useCallback(()=>{if(!T.current||!P.current)return;const q={placement:t,strategy:n,middleware:p};L.current&&(q.platform=L.current),WW(T.current,P.current,q).then(F=>{const Y={...F,isPositioned:I.current!==!1};$.current&&!Ng(k.current,Y)&&(k.current=Y,cl.flushSync(()=>{h(Y)}))})},[p,t,n,L,I]);cg(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,h(q=>({...q,isPositioned:!1})))},[u]);const $=b.useRef(!1);cg(()=>($.current=!0,()=>{$.current=!1}),[]),cg(()=>{if(A&&(T.current=A),N&&(P.current=N),A&&N){if(K.current)return K.current(A,N,W);W()}},[A,N,W,K,D]);const V=b.useMemo(()=>({reference:T,floating:P,setReference:O,setFloating:C}),[O,C]),R=b.useMemo(()=>({reference:A,floating:N}),[A,N]),H=b.useMemo(()=>{const q={position:n,left:0,top:0};if(!R.floating)return q;const F=CM(R.floating,m.x),Y=CM(R.floating,m.y);return c?{...q,transform:"translate("+F+"px, "+Y+"px)",...k4(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:Y}},[n,c,R.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:W,refs:V,elements:R,floatingStyles:H}),[m,W,V,R,H])}const eQ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jM({element:r.current,padding:a}).fn(n):{}:r?jM({element:r,padding:a}).fn(n):{}}}},tQ=(e,t)=>{const n=qW(e);return{name:n.name,fn:n.fn,options:[e,t]}},nQ=(e,t)=>{const n=KW(e);return{name:n.name,fn:n.fn,options:[e,t]}},rQ=(e,t)=>({fn:XW(e).fn,options:[e,t]}),aQ=(e,t)=>{const n=VW(e);return{name:n.name,fn:n.fn,options:[e,t]}},iQ=(e,t)=>{const n=YW(e);return{name:n.name,fn:n.fn,options:[e,t]}},oQ=(e,t)=>{const n=GW(e);return{name:n.name,fn:n.fn,options:[e,t]}},sQ=(e,t)=>{const n=eQ(e);return{name:n.name,fn:n.fn,options:[e,t]}};var lQ="Arrow",D4=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return v.jsx(ke.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});D4.displayName=lQ;var cQ=D4,$j="Popper",[I4,Yf]=Ja($j),[uQ,L4]=I4($j),z4=e=>{const{__scopePopper:t,children:n}=e,[r,a]=b.useState(null);return v.jsx(uQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};z4.displayName=$j;var $4="PopperAnchor",B4=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=L4($4,n),s=b.useRef(null),c=tt(t,s),f=b.useRef(null);return b.useEffect(()=>{const u=f.current;f.current=(r==null?void 0:r.current)||s.current,u!==f.current&&i.onAnchorChange(f.current)}),r?null:v.jsx(ke.div,{...a,ref:c})});B4.displayName=$4;var Bj="PopperContent",[fQ,dQ]=I4(Bj),U4=b.forwardRef((e,t)=>{var ae,re,J,le,me,ne;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:w,...x}=e,S=L4(Bj,n),[E,O]=b.useState(null),C=tt(t,ge=>O(ge)),[A,N]=b.useState(null),T=rW(A),P=(T==null?void 0:T.width)??0,k=(T==null?void 0:T.height)??0,D=r+(i!=="center"?"-"+i:""),K=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(u)?u:[u],I=L.length>0,W={padding:K,boundary:L.filter(mQ),altBoundary:I},{refs:$,floatingStyles:V,placement:R,isPositioned:H,middlewareData:q}=JW({strategy:"fixed",placement:D,whileElementsMounted:(...ge)=>FW(...ge,{animationFrame:y==="always"}),elements:{reference:S.anchor},middleware:[tQ({mainAxis:a+k,alignmentAxis:s}),f&&nQ({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?rQ():void 0,...W}),f&&aQ({...W}),iQ({...W,apply:({elements:ge,rects:ye,availableWidth:Ie,availableHeight:Me})=>{const{width:Ke,height:Gt}=ye.reference,ht=ge.floating.style;ht.setProperty("--radix-popper-available-width",`${Ie}px`),ht.setProperty("--radix-popper-available-height",`${Me}px`),ht.setProperty("--radix-popper-anchor-width",`${Ke}px`),ht.setProperty("--radix-popper-anchor-height",`${Gt}px`)}}),A&&sQ({element:A,padding:c}),pQ({arrowWidth:P,arrowHeight:k}),p&&oQ({strategy:"referenceHidden",...W})]}),[F,Y]=q4(R),B=Xn(w);zn(()=>{H&&(B==null||B())},[H,B]);const z=(ae=q.arrow)==null?void 0:ae.x,X=(re=q.arrow)==null?void 0:re.y,Z=((J=q.arrow)==null?void 0:J.centerOffset)!==0,[ee,se]=b.useState();return zn(()=>{E&&se(window.getComputedStyle(E).zIndex)},[E]),v.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:H?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(le=q.transformOrigin)==null?void 0:le.x,(me=q.transformOrigin)==null?void 0:me.y].join(" "),...((ne=q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(fQ,{scope:n,placedSide:F,onArrowChange:N,arrowX:z,arrowY:X,shouldHideArrow:Z,children:v.jsx(ke.div,{"data-side":F,"data-align":Y,...x,ref:C,style:{...x.style,animation:H?void 0:"none"}})})})});U4.displayName=Bj;var H4="PopperArrow",hQ={top:"bottom",right:"left",bottom:"top",left:"right"},F4=b.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=dQ(H4,r),s=hQ[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(cQ,{...a,ref:n,style:{...a.style,display:"block"}})})});F4.displayName=H4;function mQ(e){return e!==null}var pQ=e=>({name:"transformOrigin",options:e,fn(t){var S,E,O;const{placement:n,rects:r,middlewareData:a}=t,s=((S=a.arrow)==null?void 0:S.centerOffset)!==0,c=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[u,m]=q4(n),h={start:"0%",center:"50%",end:"100%"}[m],p=(((E=a.arrow)==null?void 0:E.x)??0)+c/2,y=(((O=a.arrow)==null?void 0:O.y)??0)+f/2;let w="",x="";return u==="bottom"?(w=s?h:`${p}px`,x=`${-f}px`):u==="top"?(w=s?h:`${p}px`,x=`${r.floating.height+f}px`):u==="right"?(w=`${-f}px`,x=s?h:`${y}px`):u==="left"&&(w=`${r.floating.width+f}px`,x=s?h:`${y}px`),{data:{x:w,y:x}}}});function q4(e){const[t,n="center"]=e.split("-");return[t,n]}var Uj=z4,Hj=B4,Fj=U4,qj=F4,n1="rovingFocusGroup.onEntryFocus",vQ={bubbles:!1,cancelable:!0},Em="RovingFocusGroup",[CE,K4,gQ]=bj(Em),[yQ,r0]=Ja(Em,[gQ]),[bQ,xQ]=yQ(Em),V4=b.forwardRef((e,t)=>v.jsx(CE.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(CE.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(wQ,{...e,ref:t})})}));V4.displayName=Em;var wQ=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...h}=e,p=b.useRef(null),y=tt(t,p),w=bm(i),[x,S]=Js({prop:s,defaultProp:c??null,onChange:f,caller:Em}),[E,O]=b.useState(!1),C=Xn(u),A=K4(n),N=b.useRef(!1),[T,P]=b.useState(0);return b.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(n1,C),()=>k.removeEventListener(n1,C)},[C]),v.jsx(bQ,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:x,onItemFocus:b.useCallback(k=>S(k),[S]),onItemShiftTab:b.useCallback(()=>O(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(k=>k+1),[]),onFocusableItemRemove:b.useCallback(()=>P(k=>k-1),[]),children:v.jsx(ke.div,{tabIndex:E||T===0?-1:0,"data-orientation":r,...h,ref:y,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{N.current=!0}),onFocus:Se(e.onFocus,k=>{const D=!N.current;if(k.target===k.currentTarget&&D&&!E){const K=new CustomEvent(n1,vQ);if(k.currentTarget.dispatchEvent(K),!K.defaultPrevented){const L=A().filter(R=>R.focusable),I=L.find(R=>R.active),W=L.find(R=>R.id===x),V=[I,W,...L].filter(Boolean).map(R=>R.ref.current);X4(V,m)}}N.current=!1}),onBlur:Se(e.onBlur,()=>O(!1))})})}),Y4="RovingFocusGroupItem",G4=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:s,...c}=e,f=Ln(),u=i||f,m=xQ(Y4,n),h=m.currentTabStopId===u,p=K4(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:x}=m;return b.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),v.jsx(CE.ItemSlot,{scope:n,id:u,focusable:r,active:a,children:v.jsx(ke.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:Se(e.onMouseDown,S=>{r?m.onItemFocus(u):S.preventDefault()}),onFocus:Se(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:Se(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=_Q(S,m.orientation,m.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let C=p().filter(A=>A.focusable).map(A=>A.ref.current);if(E==="last")C.reverse();else if(E==="prev"||E==="next"){E==="prev"&&C.reverse();const A=C.indexOf(S.currentTarget);C=m.loop?jQ(C,A+1):C.slice(A+1)}setTimeout(()=>X4(C))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:x!=null}):s})})});G4.displayName=Y4;var SQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EQ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _Q(e,t,n){const r=EQ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return SQ[r]}function X4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function jQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var W4=V4,Q4=G4,OE=["Enter"," "],CQ=["ArrowDown","PageUp","Home"],Z4=["ArrowUp","PageDown","End"],OQ=[...CQ,...Z4],AQ={ltr:[...OE,"ArrowRight"],rtl:[...OE,"ArrowLeft"]},NQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_m="Menu",[Dh,TQ,PQ]=bj(_m),[Ic,J4]=Ja(_m,[PQ,Yf,r0]),a0=Yf(),e5=r0(),[MQ,Lc]=Ic(_m),[RQ,jm]=Ic(_m),t5=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:s=!0}=e,c=a0(t),[f,u]=b.useState(null),m=b.useRef(!1),h=Xn(i),p=bm(a);return b.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),v.jsx(Uj,{...c,children:v.jsx(MQ,{scope:t,open:n,onOpenChange:h,content:f,onContentChange:u,children:v.jsx(RQ,{scope:t,onClose:b.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};t5.displayName=_m;var kQ="MenuAnchor",Kj=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=a0(n);return v.jsx(Hj,{...a,...r,ref:t})});Kj.displayName=kQ;var Vj="MenuPortal",[DQ,n5]=Ic(Vj,{forceMount:void 0}),r5=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Lc(Vj,t);return v.jsx(DQ,{scope:t,forceMount:n,children:v.jsx(dr,{present:n||i.open,children:v.jsx(wm,{asChild:!0,container:a,children:r})})})};r5.displayName=Vj;var Ca="MenuContent",[IQ,Yj]=Ic(Ca),a5=b.forwardRef((e,t)=>{const n=n5(Ca,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Lc(Ca,e.__scopeMenu),s=jm(Ca,e.__scopeMenu);return v.jsx(Dh.Provider,{scope:e.__scopeMenu,children:v.jsx(dr,{present:r||i.open,children:v.jsx(Dh.Slot,{scope:e.__scopeMenu,children:s.modal?v.jsx(LQ,{...a,ref:t}):v.jsx(zQ,{...a,ref:t})})})})}),LQ=b.forwardRef((e,t)=>{const n=Lc(Ca,e.__scopeMenu),r=b.useRef(null),a=tt(t,r);return b.useEffect(()=>{const i=r.current;if(i)return _j(i)},[]),v.jsx(Gj,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Se(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zQ=b.forwardRef((e,t)=>{const n=Lc(Ca,e.__scopeMenu);return v.jsx(Gj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$Q=vc("MenuContent.ScrollLock"),Gj=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:p,onDismiss:y,disableOutsideScroll:w,...x}=e,S=Lc(Ca,n),E=jm(Ca,n),O=a0(n),C=e5(n),A=TQ(n),[N,T]=b.useState(null),P=b.useRef(null),k=tt(t,P,S.onContentChange),D=b.useRef(0),K=b.useRef(""),L=b.useRef(0),I=b.useRef(null),W=b.useRef("right"),$=b.useRef(0),V=w?Qy:b.Fragment,R=w?{as:$Q,allowPinchZoom:!0}:void 0,H=F=>{var ae,re;const Y=K.current+F,B=A().filter(J=>!J.disabled),z=document.activeElement,X=(ae=B.find(J=>J.ref.current===z))==null?void 0:ae.textValue,Z=B.map(J=>J.textValue),ee=QQ(Z,Y,X),se=(re=B.find(J=>J.textValue===ee))==null?void 0:re.ref.current;(function J(le){K.current=le,window.clearTimeout(D.current),le!==""&&(D.current=window.setTimeout(()=>J(""),1e3))})(Y),se&&setTimeout(()=>se.focus())};b.useEffect(()=>()=>window.clearTimeout(D.current),[]),Ej();const q=b.useCallback(F=>{var B,z;return W.current===((B=I.current)==null?void 0:B.side)&&JQ(F,(z=I.current)==null?void 0:z.area)},[]);return v.jsx(IQ,{scope:n,searchRef:K,onItemEnter:b.useCallback(F=>{q(F)&&F.preventDefault()},[q]),onItemLeave:b.useCallback(F=>{var Y;q(F)||((Y=P.current)==null||Y.focus(),T(null))},[q]),onTriggerLeave:b.useCallback(F=>{q(F)&&F.preventDefault()},[q]),pointerGraceTimerRef:L,onPointerGraceIntentChange:b.useCallback(F=>{I.current=F},[]),children:v.jsx(V,{...R,children:v.jsx(Xy,{asChild:!0,trapped:a,onMountAutoFocus:Se(i,F=>{var Y;F.preventDefault(),(Y=P.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:v.jsx(xm,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:p,onDismiss:y,children:v.jsx(W4,{asChild:!0,...C,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:T,onEntryFocus:Se(f,F=>{E.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(Fj,{role:"menu","aria-orientation":"vertical","data-state":x5(S.open),"data-radix-menu-content":"",dir:E.dir,...O,...x,ref:k,style:{outline:"none",...x.style},onKeyDown:Se(x.onKeyDown,F=>{const B=F.target.closest("[data-radix-menu-content]")===F.currentTarget,z=F.ctrlKey||F.altKey||F.metaKey,X=F.key.length===1;B&&(F.key==="Tab"&&F.preventDefault(),!z&&X&&H(F.key));const Z=P.current;if(F.target!==Z||!OQ.includes(F.key))return;F.preventDefault();const se=A().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Z4.includes(F.key)&&se.reverse(),XQ(se)}),onBlur:Se(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(D.current),K.current="")}),onPointerMove:Se(e.onPointerMove,Ih(F=>{const Y=F.target,B=$.current!==F.clientX;if(F.currentTarget.contains(Y)&&B){const z=F.clientX>$.current?"right":"left";W.current=z,$.current=F.clientX}}))})})})})})})});a5.displayName=Ca;var BQ="MenuGroup",Xj=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(ke.div,{role:"group",...r,ref:t})});Xj.displayName=BQ;var UQ="MenuLabel",i5=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(ke.div,{...r,ref:t})});i5.displayName=UQ;var Tg="MenuItem",OM="menu.itemSelect",i0=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=b.useRef(null),s=jm(Tg,e.__scopeMenu),c=Yj(Tg,e.__scopeMenu),f=tt(t,i),u=b.useRef(!1),m=()=>{const h=i.current;if(!n&&h){const p=new CustomEvent(OM,{bubbles:!0,cancelable:!0});h.addEventListener(OM,y=>r==null?void 0:r(y),{once:!0}),Fz(h,p),p.defaultPrevented?u.current=!1:s.onClose()}};return v.jsx(o5,{...a,ref:f,disabled:n,onClick:Se(e.onClick,m),onPointerDown:h=>{var p;(p=e.onPointerDown)==null||p.call(e,h),u.current=!0},onPointerUp:Se(e.onPointerUp,h=>{var p;u.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:Se(e.onKeyDown,h=>{const p=c.searchRef.current!=="";n||p&&h.key===" "||OE.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});i0.displayName=Tg;var o5=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,s=Yj(Tg,n),c=e5(n),f=b.useRef(null),u=tt(t,f),[m,h]=b.useState(!1),[p,y]=b.useState("");return b.useEffect(()=>{const w=f.current;w&&y((w.textContent??"").trim())},[i.children]),v.jsx(Dh.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:v.jsx(Q4,{asChild:!0,...c,focusable:!r,children:v.jsx(ke.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:Se(e.onPointerMove,Ih(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Se(e.onPointerLeave,Ih(w=>s.onItemLeave(w))),onFocus:Se(e.onFocus,()=>h(!0)),onBlur:Se(e.onBlur,()=>h(!1))})})})}),HQ="MenuCheckboxItem",s5=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.jsx(d5,{scope:e.__scopeMenu,checked:n,children:v.jsx(i0,{role:"menuitemcheckbox","aria-checked":Pg(n)?"mixed":n,...a,ref:t,"data-state":Qj(n),onSelect:Se(a.onSelect,()=>r==null?void 0:r(Pg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});s5.displayName=HQ;var l5="MenuRadioGroup",[FQ,qQ]=Ic(l5,{value:void 0,onValueChange:()=>{}}),c5=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Xn(r);return v.jsx(FQ,{scope:e.__scopeMenu,value:n,onValueChange:i,children:v.jsx(Xj,{...a,ref:t})})});c5.displayName=l5;var u5="MenuRadioItem",f5=b.forwardRef((e,t)=>{const{value:n,...r}=e,a=qQ(u5,e.__scopeMenu),i=n===a.value;return v.jsx(d5,{scope:e.__scopeMenu,checked:i,children:v.jsx(i0,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Qj(i),onSelect:Se(r.onSelect,()=>{var s;return(s=a.onValueChange)==null?void 0:s.call(a,n)},{checkForDefaultPrevented:!1})})})});f5.displayName=u5;var Wj="MenuItemIndicator",[d5,KQ]=Ic(Wj,{checked:!1}),h5=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=KQ(Wj,n);return v.jsx(dr,{present:r||Pg(i.checked)||i.checked===!0,children:v.jsx(ke.span,{...a,ref:t,"data-state":Qj(i.checked)})})});h5.displayName=Wj;var VQ="MenuSeparator",m5=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});m5.displayName=VQ;var YQ="MenuArrow",p5=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=a0(n);return v.jsx(qj,{...a,...r,ref:t})});p5.displayName=YQ;var GQ="MenuSub",[JTe,v5]=Ic(GQ),wh="MenuSubTrigger",g5=b.forwardRef((e,t)=>{const n=Lc(wh,e.__scopeMenu),r=jm(wh,e.__scopeMenu),a=v5(wh,e.__scopeMenu),i=Yj(wh,e.__scopeMenu),s=b.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=i,u={__scopeMenu:e.__scopeMenu},m=b.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return b.useEffect(()=>m,[m]),b.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),f(null)}},[c,f]),v.jsx(Kj,{asChild:!0,...u,children:v.jsx(o5,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":x5(n.open),...e,ref:jo(t,a.onTriggerChange),onClick:h=>{var p;(p=e.onClick)==null||p.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Se(e.onPointerMove,Ih(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Se(e.onPointerLeave,Ih(h=>{var y,w;m();const p=(y=n.content)==null?void 0:y.getBoundingClientRect();if(p){const x=(w=n.content)==null?void 0:w.dataset.side,S=x==="right",E=S?-5:5,O=p[S?"left":"right"],C=p[S?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+E,y:h.clientY},{x:O,y:p.top},{x:C,y:p.top},{x:C,y:p.bottom},{x:O,y:p.bottom}],side:x}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Se(e.onKeyDown,h=>{var y;const p=i.searchRef.current!=="";e.disabled||p&&h.key===" "||AQ[r.dir].includes(h.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),h.preventDefault())})})})});g5.displayName=wh;var y5="MenuSubContent",b5=b.forwardRef((e,t)=>{const n=n5(Ca,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Lc(Ca,e.__scopeMenu),s=jm(Ca,e.__scopeMenu),c=v5(y5,e.__scopeMenu),f=b.useRef(null),u=tt(t,f);return v.jsx(Dh.Provider,{scope:e.__scopeMenu,children:v.jsx(dr,{present:r||i.open,children:v.jsx(Dh.Slot,{scope:e.__scopeMenu,children:v.jsx(Gj,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var h;s.isUsingKeyboardRef.current&&((h=f.current)==null||h.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Se(e.onFocusOutside,m=>{m.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Se(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:Se(e.onKeyDown,m=>{var y;const h=m.currentTarget.contains(m.target),p=NQ[s.dir].includes(m.key);h&&p&&(i.onOpenChange(!1),(y=c.trigger)==null||y.focus(),m.preventDefault())})})})})})});b5.displayName=y5;function x5(e){return e?"open":"closed"}function Pg(e){return e==="indeterminate"}function Qj(e){return Pg(e)?"indeterminate":e?"checked":"unchecked"}function XQ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function WQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function QQ(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=WQ(e,Math.max(i,0));a.length===1&&(s=s.filter(u=>u!==n));const f=s.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function ZQ(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],f=t[s],u=c.x,m=c.y,h=f.x,p=f.y;m>r!=p>r&&n<(h-u)*(r-m)/(p-m)+u&&(a=!a)}return a}function JQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ZQ(n,t)}function Ih(e){return t=>t.pointerType==="mouse"?e(t):void 0}var eZ=t5,tZ=Kj,nZ=r5,rZ=a5,aZ=Xj,iZ=i5,oZ=i0,sZ=s5,lZ=c5,cZ=f5,uZ=h5,fZ=m5,dZ=p5,hZ=g5,mZ=b5,o0="DropdownMenu",[pZ]=Ja(o0,[J4]),wr=J4(),[vZ,w5]=pZ(o0),S5=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:s,modal:c=!0}=e,f=wr(t),u=b.useRef(null),[m,h]=Js({prop:a,defaultProp:i??!1,onChange:s,caller:o0});return v.jsx(vZ,{scope:t,triggerId:Ln(),triggerRef:u,contentId:Ln(),open:m,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:c,children:v.jsx(eZ,{...f,open:m,onOpenChange:h,dir:r,modal:c,children:n})})};S5.displayName=o0;var E5="DropdownMenuTrigger",_5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=w5(E5,n),s=wr(n);return v.jsx(tZ,{asChild:!0,...s,children:v.jsx(ke.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:jo(t,i.triggerRef),onPointerDown:Se(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:Se(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});_5.displayName=E5;var gZ="DropdownMenuPortal",j5=e=>{const{__scopeDropdownMenu:t,...n}=e,r=wr(t);return v.jsx(nZ,{...r,...n})};j5.displayName=gZ;var C5="DropdownMenuContent",O5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w5(C5,n),i=wr(n),s=b.useRef(!1);return v.jsx(rZ,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:Se(e.onCloseAutoFocus,c=>{var f;s.current||(f=a.triggerRef.current)==null||f.focus(),s.current=!1,c.preventDefault()}),onInteractOutside:Se(e.onInteractOutside,c=>{const f=c.detail.originalEvent,u=f.button===0&&f.ctrlKey===!0,m=f.button===2||u;(!a.modal||m)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});O5.displayName=C5;var yZ="DropdownMenuGroup",bZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(aZ,{...a,...r,ref:t})});bZ.displayName=yZ;var xZ="DropdownMenuLabel",wZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(iZ,{...a,...r,ref:t})});wZ.displayName=xZ;var SZ="DropdownMenuItem",A5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(oZ,{...a,...r,ref:t})});A5.displayName=SZ;var EZ="DropdownMenuCheckboxItem",N5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(sZ,{...a,...r,ref:t})});N5.displayName=EZ;var _Z="DropdownMenuRadioGroup",jZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(lZ,{...a,...r,ref:t})});jZ.displayName=_Z;var CZ="DropdownMenuRadioItem",OZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(cZ,{...a,...r,ref:t})});OZ.displayName=CZ;var AZ="DropdownMenuItemIndicator",T5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(uZ,{...a,...r,ref:t})});T5.displayName=AZ;var NZ="DropdownMenuSeparator",TZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(fZ,{...a,...r,ref:t})});TZ.displayName=NZ;var PZ="DropdownMenuArrow",MZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(dZ,{...a,...r,ref:t})});MZ.displayName=PZ;var RZ="DropdownMenuSubTrigger",kZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(hZ,{...a,...r,ref:t})});kZ.displayName=RZ;var DZ="DropdownMenuSubContent",IZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(mZ,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});IZ.displayName=DZ;var LZ=S5,zZ=_5,$Z=j5,BZ=O5,UZ=A5,HZ=N5,FZ=T5,qZ="Label",P5=b.forwardRef((e,t)=>v.jsx(ke.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));P5.displayName=qZ;var KZ=P5;function AE(e,[t,n]){return Math.min(n,Math.max(t,e))}function VZ(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Zj="ScrollArea",[M5]=Ja(Zj),[YZ,Na]=M5(Zj),R5=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...s}=e,[c,f]=b.useState(null),[u,m]=b.useState(null),[h,p]=b.useState(null),[y,w]=b.useState(null),[x,S]=b.useState(null),[E,O]=b.useState(0),[C,A]=b.useState(0),[N,T]=b.useState(!1),[P,k]=b.useState(!1),D=tt(t,L=>f(L)),K=bm(a);return v.jsx(YZ,{scope:n,type:r,dir:K,scrollHideDelay:i,scrollArea:c,viewport:u,onViewportChange:m,content:h,onContentChange:p,scrollbarX:y,onScrollbarXChange:w,scrollbarXEnabled:N,onScrollbarXEnabledChange:T,scrollbarY:x,onScrollbarYChange:S,scrollbarYEnabled:P,onScrollbarYEnabledChange:k,onCornerWidthChange:O,onCornerHeightChange:A,children:v.jsx(ke.div,{dir:K,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});R5.displayName=Zj;var k5="ScrollAreaViewport",D5=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,s=Na(k5,n),c=b.useRef(null),f=tt(t,c,s.onViewportChange);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),v.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...i,ref:f,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});D5.displayName=k5;var Ii="ScrollAreaScrollbar",I5=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Na(Ii,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=a,c=e.orientation==="horizontal";return b.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),a.type==="hover"?v.jsx(GZ,{...r,ref:t,forceMount:n}):a.type==="scroll"?v.jsx(XZ,{...r,ref:t,forceMount:n}):a.type==="auto"?v.jsx(L5,{...r,ref:t,forceMount:n}):a.type==="always"?v.jsx(Jj,{...r,ref:t}):null});I5.displayName=Ii;var GZ=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Na(Ii,e.__scopeScrollArea),[i,s]=b.useState(!1);return b.useEffect(()=>{const c=a.scrollArea;let f=0;if(c){const u=()=>{window.clearTimeout(f),s(!0)},m=()=>{f=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),v.jsx(dr,{present:n||i,children:v.jsx(L5,{"data-state":i?"visible":"hidden",...r,ref:t})})}),XZ=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Na(Ii,e.__scopeScrollArea),i=e.orientation==="horizontal",s=l0(()=>f("SCROLL_END"),100),[c,f]=VZ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,a.scrollHideDelay,f]),b.useEffect(()=>{const u=a.viewport,m=i?"scrollLeft":"scrollTop";if(u){let h=u[m];const p=()=>{const y=u[m];h!==y&&(f("SCROLL"),s()),h=y};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[a.viewport,i,f,s]),v.jsx(dr,{present:n||c!=="hidden",children:v.jsx(Jj,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Se(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Se(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),L5=b.forwardRef((e,t)=>{const n=Na(Ii,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,s]=b.useState(!1),c=e.orientation==="horizontal",f=l0(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?u:m)}},10);return Ef(n.viewport,f),Ef(n.content,f),v.jsx(dr,{present:r||i,children:v.jsx(Jj,{"data-state":i?"visible":"hidden",...a,ref:t})})}),Jj=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=Na(Ii,e.__scopeScrollArea),i=b.useRef(null),s=b.useRef(0),[c,f]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=H5(c.viewport,c.content),m={...r,sizes:c,onSizesChange:f,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function h(p,y){return tJ(p,s.current,c,y)}return n==="horizontal"?v.jsx(WZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const p=a.viewport.scrollLeft,y=AM(p,c,a.dir);i.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollLeft=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollLeft=h(p,a.dir))}}):n==="vertical"?v.jsx(QZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const p=a.viewport.scrollTop,y=AM(p,c);i.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollTop=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollTop=h(p))}}):null}),WZ=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Na(Ii,e.__scopeScrollArea),[s,c]=b.useState(),f=b.useRef(null),u=tt(t,f,i.onScrollbarXChange);return b.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx($5,{"data-orientation":"horizontal",...a,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s0(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,h)=>{if(i.viewport){const p=i.viewport.scrollLeft+m.deltaX;e.onWheelScroll(p),q5(p,h)&&m.preventDefault()}},onResize:()=>{f.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Rg(s.paddingLeft),paddingEnd:Rg(s.paddingRight)}})}})}),QZ=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Na(Ii,e.__scopeScrollArea),[s,c]=b.useState(),f=b.useRef(null),u=tt(t,f,i.onScrollbarYChange);return b.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx($5,{"data-orientation":"vertical",...a,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s0(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,h)=>{if(i.viewport){const p=i.viewport.scrollTop+m.deltaY;e.onWheelScroll(p),q5(p,h)&&m.preventDefault()}},onResize:()=>{f.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Rg(s.paddingTop),paddingEnd:Rg(s.paddingBottom)}})}})}),[ZZ,z5]=M5(Ii),$5=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:u,onWheelScroll:m,onResize:h,...p}=e,y=Na(Ii,n),[w,x]=b.useState(null),S=tt(t,D=>x(D)),E=b.useRef(null),O=b.useRef(""),C=y.viewport,A=r.content-r.viewport,N=Xn(m),T=Xn(f),P=l0(h,10);function k(D){if(E.current){const K=D.clientX-E.current.left,L=D.clientY-E.current.top;u({x:K,y:L})}}return b.useEffect(()=>{const D=K=>{const L=K.target;(w==null?void 0:w.contains(L))&&N(K,A)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[C,w,A,N]),b.useEffect(T,[r,T]),Ef(w,P),Ef(y.content,P),v.jsx(ZZ,{scope:n,scrollbar:w,hasThumb:a,onThumbChange:Xn(i),onThumbPointerUp:Xn(s),onThumbPositionChange:T,onThumbPointerDown:Xn(c),children:v.jsx(ke.div,{...p,ref:S,style:{position:"absolute",...p.style},onPointerDown:Se(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),E.current=w.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),k(D))}),onPointerMove:Se(e.onPointerMove,k),onPointerUp:Se(e.onPointerUp,D=>{const K=D.target;K.hasPointerCapture(D.pointerId)&&K.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=O.current,y.viewport&&(y.viewport.style.scrollBehavior=""),E.current=null})})})}),Mg="ScrollAreaThumb",B5=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=z5(Mg,e.__scopeScrollArea);return v.jsx(dr,{present:n||a.hasThumb,children:v.jsx(JZ,{ref:t,...r})})}),JZ=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,i=Na(Mg,n),s=z5(Mg,n),{onThumbPositionChange:c}=s,f=tt(t,h=>s.onThumbChange(h)),u=b.useRef(void 0),m=l0(()=>{u.current&&(u.current(),u.current=void 0)},100);return b.useEffect(()=>{const h=i.viewport;if(h){const p=()=>{if(m(),!u.current){const y=nJ(h,c);u.current=y,c()}};return c(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,m,c]),v.jsx(ke.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Se(e.onPointerDownCapture,h=>{const y=h.target.getBoundingClientRect(),w=h.clientX-y.left,x=h.clientY-y.top;s.onThumbPointerDown({x:w,y:x})}),onPointerUp:Se(e.onPointerUp,s.onThumbPointerUp)})});B5.displayName=Mg;var eC="ScrollAreaCorner",U5=b.forwardRef((e,t)=>{const n=Na(eC,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(eJ,{...e,ref:t}):null});U5.displayName=eC;var eJ=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Na(eC,n),[i,s]=b.useState(0),[c,f]=b.useState(0),u=!!(i&&c);return Ef(a.scrollbarX,()=>{var h;const m=((h=a.scrollbarX)==null?void 0:h.offsetHeight)||0;a.onCornerHeightChange(m),f(m)}),Ef(a.scrollbarY,()=>{var h;const m=((h=a.scrollbarY)==null?void 0:h.offsetWidth)||0;a.onCornerWidthChange(m),s(m)}),u?v.jsx(ke.div,{...r,ref:t,style:{width:i,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Rg(e){return e?parseInt(e,10):0}function H5(e,t){const n=e/t;return isNaN(n)?0:n}function s0(e){const t=H5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function tJ(e,t,n,r="ltr"){const a=s0(n),i=a/2,s=t||i,c=a-s,f=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,h=r==="ltr"?[0,m]:[m*-1,0];return F5([f,u],h)(e)}function AM(e,t,n="ltr"){const r=s0(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,s=t.content-t.viewport,c=i-r,f=n==="ltr"?[0,s]:[s*-1,0],u=AE(e,f);return F5([0,s],[0,c])(u)}function F5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function q5(e,t){return e>0&&e<t}var nJ=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,c=n.top!==i.top;(s||c)&&t(),n=i,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function l0(e,t){const n=Xn(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ef(e,t){const n=Xn(t);zn(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var rJ=R5,aJ=D5,iJ=U5,oJ=[" ","Enter","ArrowUp","ArrowDown"],sJ=[" ","Enter"],bc="Select",[c0,u0,lJ]=bj(bc),[Gf]=Ja(bc,[lJ,Yf]),f0=Yf(),[cJ,ul]=Gf(bc),[uJ,fJ]=Gf(bc),K5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:s,defaultValue:c,onValueChange:f,dir:u,name:m,autoComplete:h,disabled:p,required:y,form:w}=e,x=f0(t),[S,E]=b.useState(null),[O,C]=b.useState(null),[A,N]=b.useState(!1),T=bm(u),[P,k]=Js({prop:r,defaultProp:a??!1,onChange:i,caller:bc}),[D,K]=Js({prop:s,defaultProp:c,onChange:f,caller:bc}),L=b.useRef(null),I=S?w||!!S.closest("form"):!0,[W,$]=b.useState(new Set),V=Array.from(W).map(R=>R.props.value).join(";");return v.jsx(Uj,{...x,children:v.jsxs(cJ,{required:y,scope:t,trigger:S,onTriggerChange:E,valueNode:O,onValueNodeChange:C,valueNodeHasChildren:A,onValueNodeHasChildrenChange:N,contentId:Ln(),value:D,onValueChange:K,open:P,onOpenChange:k,dir:T,triggerPointerDownPosRef:L,disabled:p,children:[v.jsx(c0.Provider,{scope:t,children:v.jsx(uJ,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(R=>{$(H=>new Set(H).add(R))},[]),onNativeOptionRemove:b.useCallback(R=>{$(H=>{const q=new Set(H);return q.delete(R),q})},[]),children:n})}),I?v.jsxs(h$,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:h,value:D,onChange:R=>K(R.target.value),disabled:p,form:w,children:[D===void 0?v.jsx("option",{value:""}):null,Array.from(W)]},V):null]})})};K5.displayName=bc;var V5="SelectTrigger",Y5=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=f0(n),s=ul(V5,n),c=s.disabled||r,f=tt(t,s.onTriggerChange),u=u0(n),m=b.useRef("touch"),[h,p,y]=p$(x=>{const S=u().filter(C=>!C.disabled),E=S.find(C=>C.value===s.value),O=v$(S,x,E);O!==void 0&&s.onValueChange(O.value)}),w=x=>{c||(s.onOpenChange(!0),y()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return v.jsx(Hj,{asChild:!0,...i,children:v.jsx(ke.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":m$(s.value)?"":void 0,...a,ref:f,onClick:Se(a.onClick,x=>{x.currentTarget.focus(),m.current!=="mouse"&&w(x)}),onPointerDown:Se(a.onPointerDown,x=>{m.current=x.pointerType;const S=x.target;S.hasPointerCapture(x.pointerId)&&S.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(w(x),x.preventDefault())}),onKeyDown:Se(a.onKeyDown,x=>{const S=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(S&&x.key===" ")&&oJ.includes(x.key)&&(w(),x.preventDefault())})})})});Y5.displayName=V5;var G5="SelectValue",X5=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:s="",...c}=e,f=ul(G5,n),{onValueNodeHasChildrenChange:u}=f,m=i!==void 0,h=tt(t,f.onValueNodeChange);return zn(()=>{u(m)},[u,m]),v.jsx(ke.span,{...c,ref:h,style:{pointerEvents:"none"},children:m$(f.value)?v.jsx(v.Fragment,{children:s}):i})});X5.displayName=G5;var dJ="SelectIcon",W5=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.jsx(ke.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});W5.displayName=dJ;var hJ="SelectPortal",Q5=e=>v.jsx(wm,{asChild:!0,...e});Q5.displayName=hJ;var xc="SelectContent",Z5=b.forwardRef((e,t)=>{const n=ul(xc,e.__scopeSelect),[r,a]=b.useState();if(zn(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?cl.createPortal(v.jsx(J5,{scope:e.__scopeSelect,children:v.jsx(c0.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),i):null}return v.jsx(e$,{...e,ref:t})});Z5.displayName=xc;var Ia=10,[J5,fl]=Gf(xc),mJ="SelectContentImpl",pJ=vc("SelectContent.RemoveScroll"),e$=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:c,sideOffset:f,align:u,alignOffset:m,arrowPadding:h,collisionBoundary:p,collisionPadding:y,sticky:w,hideWhenDetached:x,avoidCollisions:S,...E}=e,O=ul(xc,n),[C,A]=b.useState(null),[N,T]=b.useState(null),P=tt(t,ae=>A(ae)),[k,D]=b.useState(null),[K,L]=b.useState(null),I=u0(n),[W,$]=b.useState(!1),V=b.useRef(!1);b.useEffect(()=>{if(C)return _j(C)},[C]),Ej();const R=b.useCallback(ae=>{const[re,...J]=I().map(ne=>ne.ref.current),[le]=J.slice(-1),me=document.activeElement;for(const ne of ae)if(ne===me||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===re&&N&&(N.scrollTop=0),ne===le&&N&&(N.scrollTop=N.scrollHeight),ne==null||ne.focus(),document.activeElement!==me))return},[I,N]),H=b.useCallback(()=>R([k,C]),[R,k,C]);b.useEffect(()=>{W&&H()},[W,H]);const{onOpenChange:q,triggerPointerDownPosRef:F}=O;b.useEffect(()=>{if(C){let ae={x:0,y:0};const re=le=>{var me,ne;ae={x:Math.abs(Math.round(le.pageX)-(((me=F.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(le.pageY)-(((ne=F.current)==null?void 0:ne.y)??0))}},J=le=>{ae.x<=10&&ae.y<=10?le.preventDefault():C.contains(le.target)||q(!1),document.removeEventListener("pointermove",re),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,q,F]),b.useEffect(()=>{const ae=()=>q(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[q]);const[Y,B]=p$(ae=>{const re=I().filter(me=>!me.disabled),J=re.find(me=>me.ref.current===document.activeElement),le=v$(re,ae,J);le&&setTimeout(()=>le.ref.current.focus())}),z=b.useCallback((ae,re,J)=>{const le=!V.current&&!J;(O.value!==void 0&&O.value===re||le)&&(D(ae),le&&(V.current=!0))},[O.value]),X=b.useCallback(()=>C==null?void 0:C.focus(),[C]),Z=b.useCallback((ae,re,J)=>{const le=!V.current&&!J;(O.value!==void 0&&O.value===re||le)&&L(ae)},[O.value]),ee=r==="popper"?NE:t$,se=ee===NE?{side:c,sideOffset:f,align:u,alignOffset:m,arrowPadding:h,collisionBoundary:p,collisionPadding:y,sticky:w,hideWhenDetached:x,avoidCollisions:S}:{};return v.jsx(J5,{scope:n,content:C,viewport:N,onViewportChange:T,itemRefCallback:z,selectedItem:k,onItemLeave:X,itemTextRefCallback:Z,focusSelectedItem:H,selectedItemText:K,position:r,isPositioned:W,searchRef:Y,children:v.jsx(Qy,{as:pJ,allowPinchZoom:!0,children:v.jsx(Xy,{asChild:!0,trapped:O.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Se(a,ae=>{var re;(re=O.trigger)==null||re.focus({preventScroll:!0}),ae.preventDefault()}),children:v.jsx(xm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:v.jsx(ee,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ae=>ae.preventDefault(),...E,...se,onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Se(E.onKeyDown,ae=>{const re=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!re&&ae.key.length===1&&B(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let le=I().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const me=ae.target,ne=le.indexOf(me);le=le.slice(ne+1)}setTimeout(()=>R(le)),ae.preventDefault()}})})})})})})});e$.displayName=mJ;var vJ="SelectItemAlignedPosition",t$=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=ul(xc,n),s=fl(xc,n),[c,f]=b.useState(null),[u,m]=b.useState(null),h=tt(t,P=>m(P)),p=u0(n),y=b.useRef(!1),w=b.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:E,focusSelectedItem:O}=s,C=b.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&u&&x&&S&&E){const P=i.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),K=E.getBoundingClientRect();if(i.dir!=="rtl"){const me=K.left-k.left,ne=D.left-me,ge=P.left-ne,ye=P.width+ge,Ie=Math.max(ye,k.width),Me=window.innerWidth-Ia,Ke=AE(ne,[Ia,Math.max(Ia,Me-Ie)]);c.style.minWidth=ye+"px",c.style.left=Ke+"px"}else{const me=k.right-K.right,ne=window.innerWidth-D.right-me,ge=window.innerWidth-P.right-ne,ye=P.width+ge,Ie=Math.max(ye,k.width),Me=window.innerWidth-Ia,Ke=AE(ne,[Ia,Math.max(Ia,Me-Ie)]);c.style.minWidth=ye+"px",c.style.right=Ke+"px"}const L=p(),I=window.innerHeight-Ia*2,W=x.scrollHeight,$=window.getComputedStyle(u),V=parseInt($.borderTopWidth,10),R=parseInt($.paddingTop,10),H=parseInt($.borderBottomWidth,10),q=parseInt($.paddingBottom,10),F=V+R+W+q+H,Y=Math.min(S.offsetHeight*5,F),B=window.getComputedStyle(x),z=parseInt(B.paddingTop,10),X=parseInt(B.paddingBottom,10),Z=P.top+P.height/2-Ia,ee=I-Z,se=S.offsetHeight/2,ae=S.offsetTop+se,re=V+R+ae,J=F-re;if(re<=Z){const me=L.length>0&&S===L[L.length-1].ref.current;c.style.bottom="0px";const ne=u.clientHeight-x.offsetTop-x.offsetHeight,ge=Math.max(ee,se+(me?X:0)+ne+H),ye=re+ge;c.style.height=ye+"px"}else{const me=L.length>0&&S===L[0].ref.current;c.style.top="0px";const ge=Math.max(Z,V+x.offsetTop+(me?z:0)+se)+J;c.style.height=ge+"px",x.scrollTop=re-Z+x.offsetTop}c.style.margin=`${Ia}px 0`,c.style.minHeight=Y+"px",c.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[p,i.trigger,i.valueNode,c,u,x,S,E,i.dir,r]);zn(()=>C(),[C]);const[A,N]=b.useState();zn(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const T=b.useCallback(P=>{P&&w.current===!0&&(C(),O==null||O(),w.current=!1)},[C,O]);return v.jsx(yJ,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:v.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:v.jsx(ke.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});t$.displayName=vJ;var gJ="SelectPopperPosition",NE=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Ia,...i}=e,s=f0(n);return v.jsx(Fj,{...s,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});NE.displayName=gJ;var[yJ,tC]=Gf(xc,{}),TE="SelectViewport",n$=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=fl(TE,n),s=tC(TE,n),c=tt(t,i.onViewportChange),f=b.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v.jsx(c0.Slot,{scope:n,children:v.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Se(a.onScroll,u=>{const m=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&h){const y=Math.abs(f.current-m.scrollTop);if(y>0){const w=window.innerHeight-Ia*2,x=parseFloat(h.style.minHeight),S=parseFloat(h.style.height),E=Math.max(x,S);if(E<w){const O=E+y,C=Math.min(w,O),A=O-C;h.style.height=C+"px",h.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,h.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});n$.displayName=TE;var r$="SelectGroup",[bJ,xJ]=Gf(r$),wJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Ln();return v.jsx(bJ,{scope:n,id:a,children:v.jsx(ke.div,{role:"group","aria-labelledby":a,...r,ref:t})})});wJ.displayName=r$;var a$="SelectLabel",SJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=xJ(a$,n);return v.jsx(ke.div,{id:a.id,...r,ref:t})});SJ.displayName=a$;var kg="SelectItem",[EJ,i$]=Gf(kg),o$=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...s}=e,c=ul(kg,n),f=fl(kg,n),u=c.value===r,[m,h]=b.useState(i??""),[p,y]=b.useState(!1),w=tt(t,O=>{var C;return(C=f.itemRefCallback)==null?void 0:C.call(f,O,r,a)}),x=Ln(),S=b.useRef("touch"),E=()=>{a||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(EJ,{scope:n,value:r,disabled:a,textId:x,isSelected:u,onItemTextChange:b.useCallback(O=>{h(C=>C||((O==null?void 0:O.textContent)??"").trim())},[]),children:v.jsx(c0.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:v.jsx(ke.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:w,onFocus:Se(s.onFocus,()=>y(!0)),onBlur:Se(s.onBlur,()=>y(!1)),onClick:Se(s.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:Se(s.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:Se(s.onPointerDown,O=>{S.current=O.pointerType}),onPointerMove:Se(s.onPointerMove,O=>{var C;S.current=O.pointerType,a?(C=f.onItemLeave)==null||C.call(f):S.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(s.onPointerLeave,O=>{var C;O.currentTarget===document.activeElement&&((C=f.onItemLeave)==null||C.call(f))}),onKeyDown:Se(s.onKeyDown,O=>{var A;((A=f.searchRef)==null?void 0:A.current)!==""&&O.key===" "||(sJ.includes(O.key)&&E(),O.key===" "&&O.preventDefault())})})})})});o$.displayName=kg;var Sh="SelectItemText",s$=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,s=ul(Sh,n),c=fl(Sh,n),f=i$(Sh,n),u=fJ(Sh,n),[m,h]=b.useState(null),p=tt(t,E=>h(E),f.onItemTextChange,E=>{var O;return(O=c.itemTextRefCallback)==null?void 0:O.call(c,E,f.value,f.disabled)}),y=m==null?void 0:m.textContent,w=b.useMemo(()=>v.jsx("option",{value:f.value,disabled:f.disabled,children:y},f.value),[f.disabled,f.value,y]),{onNativeOptionAdd:x,onNativeOptionRemove:S}=u;return zn(()=>(x(w),()=>S(w)),[x,S,w]),v.jsxs(v.Fragment,{children:[v.jsx(ke.span,{id:f.textId,...i,ref:p}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?cl.createPortal(i.children,s.valueNode):null]})});s$.displayName=Sh;var l$="SelectItemIndicator",c$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i$(l$,n).isSelected?v.jsx(ke.span,{"aria-hidden":!0,...r,ref:t}):null});c$.displayName=l$;var PE="SelectScrollUpButton",u$=b.forwardRef((e,t)=>{const n=fl(PE,e.__scopeSelect),r=tC(PE,e.__scopeSelect),[a,i]=b.useState(!1),s=tt(t,r.onScrollButtonChange);return zn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=f.scrollTop>0;i(u)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(d$,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});u$.displayName=PE;var ME="SelectScrollDownButton",f$=b.forwardRef((e,t)=>{const n=fl(ME,e.__scopeSelect),r=tC(ME,e.__scopeSelect),[a,i]=b.useState(!1),s=tt(t,r.onScrollButtonChange);return zn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<u;i(m)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(d$,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});f$.displayName=ME;var d$=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=fl("SelectScrollButton",n),s=b.useRef(null),c=u0(n),f=b.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return b.useEffect(()=>()=>f(),[f]),zn(()=>{var m;const u=c().find(h=>h.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),v.jsx(ke.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Se(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Se(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Se(a.onPointerLeave,()=>{f()})})}),_J="SelectSeparator",jJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(ke.div,{"aria-hidden":!0,...r,ref:t})});jJ.displayName=_J;var RE="SelectArrow",CJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=f0(n),i=ul(RE,n),s=fl(RE,n);return i.open&&s.position==="popper"?v.jsx(qj,{...a,...r,ref:t}):null});CJ.displayName=RE;var OJ="SelectBubbleInput",h$=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=b.useRef(null),i=tt(r,a),s=nW(t);return b.useEffect(()=>{const c=a.current;if(!c)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==t&&m){const h=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(h)}},[s,t]),v.jsx(ke.select,{...n,style:{...qz,...n.style},ref:i,defaultValue:t})});h$.displayName=OJ;function m$(e){return e===""||e===void 0}function p$(e){const t=Xn(e),n=b.useRef(""),r=b.useRef(0),a=b.useCallback(s=>{const c=n.current+s;t(c),(function f(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),i=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function v$(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=AJ(e,Math.max(i,0));a.length===1&&(s=s.filter(u=>u!==n));const f=s.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function AJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NJ=K5,TJ=Y5,PJ=X5,MJ=W5,RJ=Q5,kJ=Z5,DJ=n$,IJ=o$,LJ=s$,zJ=c$,$J=u$,BJ=f$,UJ="Separator",NM="horizontal",HJ=["horizontal","vertical"],g$=b.forwardRef((e,t)=>{const{decorative:n,orientation:r=NM,...a}=e,i=FJ(r)?r:NM,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return v.jsx(ke.div,{"data-orientation":i,...c,...a,ref:t})});g$.displayName=UJ;function FJ(e){return HJ.includes(e)}var qJ=g$,d0="Tabs",[KJ]=Ja(d0,[r0]),y$=r0(),[VJ,nC]=KJ(d0),b$=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:c,activationMode:f="automatic",...u}=e,m=bm(c),[h,p]=Js({prop:r,onChange:a,defaultProp:i??"",caller:d0});return v.jsx(VJ,{scope:n,baseId:Ln(),value:h,onValueChange:p,orientation:s,dir:m,activationMode:f,children:v.jsx(ke.div,{dir:m,"data-orientation":s,...u,ref:t})})});b$.displayName=d0;var x$="TabsList",w$=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=nC(x$,n),s=y$(n);return v.jsx(W4,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:v.jsx(ke.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});w$.displayName=x$;var S$="TabsTrigger",E$=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,s=nC(S$,n),c=y$(n),f=C$(s.baseId,r),u=O$(s.baseId,r),m=r===s.value;return v.jsx(Q4,{asChild:!0,...c,focusable:!a,active:m,children:v.jsx(ke.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...i,ref:t,onMouseDown:Se(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?s.onValueChange(r):h.preventDefault()}),onKeyDown:Se(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(r)}),onFocus:Se(e.onFocus,()=>{const h=s.activationMode!=="manual";!m&&!a&&h&&s.onValueChange(r)})})})});E$.displayName=S$;var _$="TabsContent",j$=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...s}=e,c=nC(_$,n),f=C$(c.baseId,r),u=O$(c.baseId,r),m=r===c.value,h=b.useRef(m);return b.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),v.jsx(dr,{present:a||m,children:({present:p})=>v.jsx(ke.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!p,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:p&&i})})});j$.displayName=_$;function C$(e,t){return`${e}-trigger-${t}`}function O$(e,t){return`${e}-content-${t}`}var YJ=b$,GJ=w$,XJ=E$,WJ=j$,[h0]=Ja("Tooltip",[Yf]),m0=Yf(),A$="TooltipProvider",QJ=700,kE="tooltip.open",[ZJ,rC]=h0(A$),N$=e=>{const{__scopeTooltip:t,delayDuration:n=QJ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,s=b.useRef(!0),c=b.useRef(!1),f=b.useRef(0);return b.useEffect(()=>{const u=f.current;return()=>window.clearTimeout(u)},[]),v.jsx(ZJ,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(f.current),s.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:b.useCallback(u=>{c.current=u},[]),disableHoverableContent:a,children:i})};N$.displayName=A$;var Lh="Tooltip",[JJ,Cm]=h0(Lh),T$=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,f=rC(Lh,e.__scopeTooltip),u=m0(t),[m,h]=b.useState(null),p=Ln(),y=b.useRef(0),w=s??f.disableHoverableContent,x=c??f.delayDuration,S=b.useRef(!1),[E,O]=Js({prop:r,defaultProp:a??!1,onChange:P=>{P?(f.onOpen(),document.dispatchEvent(new CustomEvent(kE))):f.onClose(),i==null||i(P)},caller:Lh}),C=b.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),A=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,S.current=!1,O(!0)},[O]),N=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,O(!1)},[O]),T=b.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{S.current=!0,O(!0),y.current=0},x)},[x,O]);return b.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),v.jsx(Uj,{...u,children:v.jsx(JJ,{scope:t,contentId:p,open:E,stateAttribute:C,trigger:m,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{f.isOpenDelayedRef.current?T():A()},[f.isOpenDelayedRef,T,A]),onTriggerLeave:b.useCallback(()=>{w?N():(window.clearTimeout(y.current),y.current=0)},[N,w]),onOpen:A,onClose:N,disableHoverableContent:w,children:n})})};T$.displayName=Lh;var DE="TooltipTrigger",P$=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Cm(DE,n),i=rC(DE,n),s=m0(n),c=b.useRef(null),f=tt(t,c,a.onTriggerChange),u=b.useRef(!1),m=b.useRef(!1),h=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),v.jsx(Hj,{asChild:!0,...s,children:v.jsx(ke.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:f,onPointerMove:Se(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:Se(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:Se(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Se(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:Se(e.onBlur,a.onClose),onClick:Se(e.onClick,a.onClose)})})});P$.displayName=DE;var aC="TooltipPortal",[eee,tee]=h0(aC,{forceMount:void 0}),M$=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,i=Cm(aC,t);return v.jsx(eee,{scope:t,forceMount:n,children:v.jsx(dr,{present:n||i.open,children:v.jsx(wm,{asChild:!0,container:a,children:r})})})};M$.displayName=aC;var _f="TooltipContent",R$=b.forwardRef((e,t)=>{const n=tee(_f,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,s=Cm(_f,e.__scopeTooltip);return v.jsx(dr,{present:r||s.open,children:s.disableHoverableContent?v.jsx(k$,{side:a,...i,ref:t}):v.jsx(nee,{side:a,...i,ref:t})})}),nee=b.forwardRef((e,t)=>{const n=Cm(_f,e.__scopeTooltip),r=rC(_f,e.__scopeTooltip),a=b.useRef(null),i=tt(t,a),[s,c]=b.useState(null),{trigger:f,onClose:u}=n,m=a.current,{onPointerInTransitChange:h}=r,p=b.useCallback(()=>{c(null),h(!1)},[h]),y=b.useCallback((w,x)=>{const S=w.currentTarget,E={x:w.clientX,y:w.clientY},O=oee(E,S.getBoundingClientRect()),C=see(E,O),A=lee(x.getBoundingClientRect()),N=uee([...C,...A]);c(N),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(f&&m){const w=S=>y(S,m),x=S=>y(S,f);return f.addEventListener("pointerleave",w),m.addEventListener("pointerleave",x),()=>{f.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",x)}}},[f,m,y,p]),b.useEffect(()=>{if(s){const w=x=>{const S=x.target,E={x:x.clientX,y:x.clientY},O=(f==null?void 0:f.contains(S))||(m==null?void 0:m.contains(S)),C=!cee(E,s);O?p():C&&(p(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[f,m,s,u,p]),v.jsx(k$,{...e,ref:i})}),[ree,aee]=h0(Lh,{isInside:!1}),iee=wG("TooltipContent"),k$=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,f=Cm(_f,n),u=m0(n),{onClose:m}=f;return b.useEffect(()=>(document.addEventListener(kE,m),()=>document.removeEventListener(kE,m)),[m]),b.useEffect(()=>{if(f.trigger){const h=p=>{const y=p.target;y!=null&&y.contains(f.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[f.trigger,m]),v.jsx(xm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:v.jsxs(Fj,{"data-state":f.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(iee,{children:r}),v.jsx(ree,{scope:n,isInside:!0,children:v.jsx(OG,{id:f.contentId,role:"tooltip",children:a||r})})]})})});R$.displayName=_f;var D$="TooltipArrow",I$=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=m0(n);return aee(D$,n).isInside?null:v.jsx(qj,{...a,...r,ref:t})});I$.displayName=D$;function oee(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function see(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function lee(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function cee(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],f=t[s],u=c.x,m=c.y,h=f.x,p=f.y;m>r!=p>r&&n<(h-u)*(r-m)/(p-m)+u&&(a=!a)}return a}function uee(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),fee(t)}function fee(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var dee=N$,hee=T$,mee=P$,pee=M$,vee=R$,gee=I$;function L$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=L$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function st(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=L$(e))&&(r&&(r+=" "),r+=t);return r}const yee=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bee=(e,t)=>({classGroupId:e,validator:t}),z$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Dg="-",TM=[],xee="arbitrary..",wee=e=>{const t=Eee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return See(s);const c=s.split(Dg),f=c[0]===""&&c.length>1?1:0;return $$(c,f,t)},getConflictingClassGroupIds:(s,c)=>{if(c){const f=r[s],u=n[s];return f?u?yee(u,f):f:u||TM}return n[s]||TM}}},$$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const u=$$(e,t+1,i);if(u)return u}const s=n.validators;if(s===null)return;const c=t===0?e.join(Dg):e.slice(t).join(Dg),f=s.length;for(let u=0;u<f;u++){const m=s[u];if(m.validator(c))return m.classGroupId}},See=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?xee+r:void 0})(),Eee=e=>{const{theme:t,classGroups:n}=e;return _ee(n,t)},_ee=(e,t)=>{const n=z$();for(const r in e){const a=e[r];iC(a,n,r,t)}return n},iC=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const s=e[i];jee(s,t,n,r)}},jee=(e,t,n,r)=>{if(typeof e=="string"){Cee(e,t,n);return}if(typeof e=="function"){Oee(e,t,n,r);return}Aee(e,t,n,r)},Cee=(e,t,n)=>{const r=e===""?t:B$(t,e);r.classGroupId=n},Oee=(e,t,n,r)=>{if(Nee(e)){iC(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bee(n,e))},Aee=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let s=0;s<i;s++){const[c,f]=a[s];iC(f,B$(t,c),n,r)}},B$=(e,t)=>{let n=e;const r=t.split(Dg),a=r.length;for(let i=0;i<a;i++){const s=r[i];let c=n.nextPart.get(s);c||(c=z$(),n.nextPart.set(s,c)),n=c}return n},Nee=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Tee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return a(i,s),s},set(i,s){i in n?n[i]=s:a(i,s)}}},IE="!",PM=":",Pee=[],MM=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Mee=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let s=0,c=0,f=0,u;const m=a.length;for(let x=0;x<m;x++){const S=a[x];if(s===0&&c===0){if(S===PM){i.push(a.slice(f,x)),f=x+1;continue}if(S==="/"){u=x;continue}}S==="["?s++:S==="]"?s--:S==="("?c++:S===")"&&c--}const h=i.length===0?a:a.slice(f);let p=h,y=!1;h.endsWith(IE)?(p=h.slice(0,-1),y=!0):h.startsWith(IE)&&(p=h.slice(1),y=!0);const w=u&&u>f?u-f:void 0;return MM(i,y,p,w)};if(t){const a=t+PM,i=r;r=s=>s.startsWith(a)?i(s.slice(a.length)):MM(Pee,!1,s,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Ree=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const s=n[i],c=s[0]==="[",f=t.has(s);c||f?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(s)):a.push(s)}return a.length>0&&(a.sort(),r.push(...a)),r}},kee=e=>({cache:Tee(e.cacheSize),parseClassName:Mee(e),sortModifiers:Ree(e),...wee(e)}),Dee=/\s+/,Iee=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],c=e.trim().split(Dee);let f="";for(let u=c.length-1;u>=0;u-=1){const m=c[u],{isExternal:h,modifiers:p,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:x}=n(m);if(h){f=m+(f.length>0?" "+f:f);continue}let S=!!x,E=r(S?w.substring(0,x):w);if(!E){if(!S){f=m+(f.length>0?" "+f:f);continue}if(E=r(w),!E){f=m+(f.length>0?" "+f:f);continue}S=!1}const O=p.length===0?"":p.length===1?p[0]:i(p).join(":"),C=y?O+IE:O,A=C+E;if(s.indexOf(A)>-1)continue;s.push(A);const N=a(E,S);for(let T=0;T<N.length;++T){const P=N[T];s.push(C+P)}f=m+(f.length>0?" "+f:f)}return f},Lee=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=U$(n))&&(a&&(a+=" "),a+=r);return a},U$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=U$(e[r]))&&(n&&(n+=" "),n+=t);return n},zee=(e,...t)=>{let n,r,a,i;const s=f=>{const u=t.reduce((m,h)=>h(m),e());return n=kee(u),r=n.cache.get,a=n.cache.set,i=c,c(f)},c=f=>{const u=r(f);if(u)return u;const m=Iee(f,n);return a(f,m),m};return i=s,(...f)=>i(Lee(...f))},$ee=[],En=e=>{const t=n=>n[e]||$ee;return t.isThemeGetter=!0,t},H$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Uee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hee=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cs=e=>Bee.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Os=e=>!!e&&Number.isInteger(Number(e)),r1=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),so=e=>Uee.test(e),q$=()=>!0,Vee=e=>Hee.test(e)&&!Fee.test(e),oC=()=>!1,Yee=e=>qee.test(e),Gee=e=>Kee.test(e),Xee=e=>!Te(e)&&!Pe(e),Wee=e=>dl(e,Y$,oC),Te=e=>H$.test(e),$l=e=>dl(e,G$,Vee),RM=e=>dl(e,ate,Ge),Qee=e=>dl(e,W$,q$),Zee=e=>dl(e,X$,oC),kM=e=>dl(e,K$,oC),Jee=e=>dl(e,V$,Gee),Pv=e=>dl(e,Q$,Yee),Pe=e=>F$.test(e),rh=e=>zc(e,G$),ete=e=>zc(e,X$),DM=e=>zc(e,K$),tte=e=>zc(e,Y$),nte=e=>zc(e,V$),Mv=e=>zc(e,Q$,!0),rte=e=>zc(e,W$,!0),dl=(e,t,n)=>{const r=H$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zc=(e,t,n=!1)=>{const r=F$.exec(e);return r?r[1]?t(r[1]):n:!1},K$=e=>e==="position"||e==="percentage",V$=e=>e==="image"||e==="url",Y$=e=>e==="length"||e==="size"||e==="bg-size",G$=e=>e==="length",ate=e=>e==="number",X$=e=>e==="family-name",W$=e=>e==="number"||e==="weight",Q$=e=>e==="shadow",ite=()=>{const e=En("color"),t=En("font"),n=En("text"),r=En("font-weight"),a=En("tracking"),i=En("leading"),s=En("breakpoint"),c=En("container"),f=En("spacing"),u=En("radius"),m=En("shadow"),h=En("inset-shadow"),p=En("text-shadow"),y=En("drop-shadow"),w=En("blur"),x=En("perspective"),S=En("aspect"),E=En("ease"),O=En("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...A(),Pe,Te],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],k=()=>[Pe,Te,f],D=()=>[Cs,"full","auto",...k()],K=()=>[Os,"none","subgrid",Pe,Te],L=()=>["auto",{span:["full",Os,Pe,Te]},Os,Pe,Te],I=()=>[Os,"auto",Pe,Te],W=()=>["auto","min","max","fr",Pe,Te],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...k()],H=()=>[Cs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],q=()=>[Cs,"screen","full","dvw","lvw","svw","min","max","fit",...k()],F=()=>[Cs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],Y=()=>[e,Pe,Te],B=()=>[...A(),DM,kM,{position:[Pe,Te]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",tte,Wee,{size:[Pe,Te]}],Z=()=>[r1,rh,$l],ee=()=>["","none","full",u,Pe,Te],se=()=>["",Ge,rh,$l],ae=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ge,r1,DM,kM],le=()=>["","none",w,Pe,Te],me=()=>["none",Ge,Pe,Te],ne=()=>["none",Ge,Pe,Te],ge=()=>[Ge,Pe,Te],ye=()=>[Cs,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[so],breakpoint:[so],color:[q$],container:[so],"drop-shadow":[so],ease:["in","out","in-out"],font:[Xee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[so],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[so],shadow:[so],spacing:["px",Ge],text:[so],"text-shadow":[so],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Cs,Te,Pe,S]}],container:["container"],columns:[{columns:[Ge,Te,Pe,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Os,"auto",Pe,Te]}],basis:[{basis:[Cs,"full","auto",c,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,Cs,"auto","initial","none",Te]}],grow:[{grow:["",Ge,Pe,Te]}],shrink:[{shrink:["",Ge,Pe,Te]}],order:[{order:[Os,"first","last","none",Pe,Te]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,rh,$l]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,rte,Qee]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",r1,Te]}],"font-family":[{font:[ete,Zee,t]}],"font-features":[{"font-features":[Te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Pe,Te]}],"line-clamp":[{"line-clamp":[Ge,"none",Pe,RM]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Pe,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pe,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",Pe,$l]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Ge,"auto",Pe,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe,Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Pe,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Os,Pe,Te],radial:["",Pe,Te],conic:[Os,Pe,Te]},nte,Jee]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,Pe,Te]}],"outline-w":[{outline:["",Ge,rh,$l]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,Mv,Pv]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",h,Mv,Pv]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Ge,$l]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",p,Mv,Pv]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Ge,Pe,Te]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Pe,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pe,Te]}],filter:[{filter:["","none",Pe,Te]}],blur:[{blur:le()}],brightness:[{brightness:[Ge,Pe,Te]}],contrast:[{contrast:[Ge,Pe,Te]}],"drop-shadow":[{"drop-shadow":["","none",y,Mv,Pv]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Ge,Pe,Te]}],"hue-rotate":[{"hue-rotate":[Ge,Pe,Te]}],invert:[{invert:["",Ge,Pe,Te]}],saturate:[{saturate:[Ge,Pe,Te]}],sepia:[{sepia:["",Ge,Pe,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Pe,Te]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,Pe,Te]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,Pe,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,Pe,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,Pe,Te]}],"backdrop-invert":[{"backdrop-invert":["",Ge,Pe,Te]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,Pe,Te]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,Pe,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,Pe,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pe,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",Pe,Te]}],ease:[{ease:["linear","initial",E,Pe,Te]}],delay:[{delay:[Ge,Pe,Te]}],animate:[{animate:["none",O,Pe,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Pe,Te]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Pe,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pe,Te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Pe,Te]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Ge,rh,$l,RM]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ote=zee(ite);function Oe(...e){return ote(st(e))}function Z$({delayDuration:e=0,...t}){return v.jsx(dee,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ste({...e}){return v.jsx(hee,{"data-slot":"tooltip",...e})}function lte({...e}){return v.jsx(mee,{"data-slot":"tooltip-trigger",...e})}function cte({className:e,sideOffset:t=0,children:n,...r}){return v.jsx(pee,{children:v.jsxs(vee,{"data-slot":"tooltip-content",sideOffset:t,className:Oe("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[n,v.jsx(gee,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ute=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IM=e=>{const t=fte(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var dte={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.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mte=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...c},f)=>b.createElement("svg",{ref:f,...dte,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:J$("lucide",a),...!i&&!hte(c)&&{"aria-hidden":"true"},...c},[...s.map(([u,m])=>b.createElement(u,m)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const He=(e,t)=>{const n=b.forwardRef(({className:r,...a},i)=>b.createElement(mte,{ref:i,iconNode:t,className:J$(`lucide-${ute(IM(e))}`,`lucide-${e}`,r),...a}));return n.displayName=IM(e),n};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pte=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],vte=He("arrow-down",pte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gte=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],eB=He("arrow-left",gte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yte=[["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"}]],tB=He("bot",yte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bte=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],nB=He("brain",bte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sC=He("check",xte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zh=He("chevron-down",wte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ste=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ete=He("chevron-left",Ste);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _te=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],p0=He("chevron-right",_te);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jte=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Cte=He("chevron-up",jte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ote=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ate=He("chevrons-up-down",Ote);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],nl=He("circle-alert",Nte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],rB=He("circle-check",Tte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Mte=He("circle-x",Pte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],kte=He("clock",Rte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dte=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],v0=He("download",Dte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ite=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Lte=He("eye-off",Ite);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zte=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$te=He("eye",zte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bte=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],Ig=He("folder-kanban",Bte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ute=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]],Hte=He("folder-up",Ute);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fte=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],qte=He("folder",Fte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kte=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Vte=He("house",Kte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Gte=He("info",Yte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xte=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Wte=He("key-round",Xte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qte=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],aB=He("layout-dashboard",Qte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Jte=He("loader-circle",Zte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ene=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],tne=He("message-square",ene);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nne=[["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"}]],rne=He("monitor",nne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ane=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],iB=He("moon",ane);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ine=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],oB=He("octagon-x",ine);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const one=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],sne=He("paperclip",one);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lne=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],cne=He("pause",lne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const une=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],fne=He("pencil",une);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dne=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],lC=He("play",dne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hne=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],LE=He("plus",hne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mne=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],sB=He("save",mne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pne=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lB=He("search",pne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vne=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],gne=He("send",vne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yne=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bne=He("settings",yne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xne=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],cB=He("sun",xne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wne=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Sne=He("terminal",wne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ene=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Xf=He("trash-2",Ene);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _ne=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jne=He("triangle-alert",_ne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cne=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],One=He("upload",Cne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ane=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],uB=He("users",Ane);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nne=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],fB=He("wrench",Nne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tne=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cC=He("x",Tne);function Pne(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Mne=e=>{switch(e){case"success":return Dne;case"info":return Lne;case"warning":return Ine;case"error":return zne;default:return null}},Rne=Array(12).fill(0),kne=({visible:e,className:t})=>be.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},be.createElement("div",{className:"sonner-spinner"},Rne.map((n,r)=>be.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Dne=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ine=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Lne=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),zne=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$ne=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},be.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),be.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Bne=()=>{const[e,t]=be.useState(document.hidden);return be.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let zE=1;class Une{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:zE++,s=this.toasts.find(f=>f.id===i),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(f=>f.id===i?(this.publish({...f,...t,id:i,title:r}),{...f,...t,id:i,dismissible:c,title:r}):f):this.addToast({title:r,...a,dismissible:c,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,s;const c=a.then(async u=>{if(s=["resolve",u],be.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(Fne(u)&&!u.ok){i=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,w=typeof h=="object"&&!be.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...w})}else if(u instanceof Error){i=!1;const h=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,w=typeof h=="object"&&!be.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...w})}else if(n.success!==void 0){i=!1;const h=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,w=typeof h=="object"&&!be.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:p,...w})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){i=!1;const m=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,y=typeof m=="object"&&!be.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((u,m)=>c.then(()=>s[0]==="reject"?m(s[1]):u(s[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||zE++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Rr=new Une,Hne=(e,t)=>{const n=(t==null?void 0:t.id)||zE++;return Rr.addToast({title:e,...t,id:n}),n},Fne=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",qne=Hne,Kne=()=>Rr.toasts,Vne=()=>Rr.getActiveToasts(),pt=Object.assign(qne,{success:Rr.success,info:Rr.info,warning:Rr.warning,error:Rr.error,custom:Rr.custom,message:Rr.message,promise:Rr.promise,dismiss:Rr.dismiss,loading:Rr.loading},{getHistory:Kne,getToasts:Vne});Pne("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Rv(e){return e.label!==void 0}const Yne=3,Gne="24px",Xne="16px",LM=4e3,Wne=356,Qne=14,Zne=45,Jne=200;function di(...e){return e.filter(Boolean).join(" ")}function ere(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const tre=e=>{var t,n,r,a,i,s,c,f,u;const{invert:m,toast:h,unstyled:p,interacting:y,setHeights:w,visibleToasts:x,heights:S,index:E,toasts:O,expanded:C,removeToast:A,defaultRichColors:N,closeButton:T,style:P,cancelButtonStyle:k,actionButtonStyle:D,className:K="",descriptionClassName:L="",duration:I,position:W,gap:$,expandByDefault:V,classNames:R,icons:H,closeButtonAriaLabel:q="Close toast"}=e,[F,Y]=be.useState(null),[B,z]=be.useState(null),[X,Z]=be.useState(!1),[ee,se]=be.useState(!1),[ae,re]=be.useState(!1),[J,le]=be.useState(!1),[me,ne]=be.useState(!1),[ge,ye]=be.useState(0),[Ie,Me]=be.useState(0),Ke=be.useRef(h.duration||I||LM),Gt=be.useRef(null),ht=be.useRef(null),Qn=E===0,Sr=E+1<=x,Lt=h.type,we=h.dismissible!==!1,lt=h.className||"",xn=h.descriptionClassName||"",Zn=be.useMemo(()=>S.findIndex(Be=>Be.toastId===h.id)||0,[S,h.id]),ri=be.useMemo(()=>{var Be;return(Be=h.closeButton)!=null?Be:T},[h.closeButton,T]),ai=be.useMemo(()=>h.duration||I||LM,[h.duration,I]),gl=be.useRef(0),zr=be.useRef(0),Qc=be.useRef(0),ii=be.useRef(null),[zi,Hn]=W.split("-"),$r=be.useMemo(()=>S.reduce((Be,Nt,on)=>on>=Zn?Be:Be+Nt.height,0),[S,Zn]),Pn=Bne(),ld=h.invert||m,yl=Lt==="loading";zr.current=be.useMemo(()=>Zn*$+$r,[Zn,$r]),be.useEffect(()=>{Ke.current=ai},[ai]),be.useEffect(()=>{Z(!0)},[]),be.useEffect(()=>{const Be=ht.current;if(Be){const Nt=Be.getBoundingClientRect().height;return Me(Nt),w(on=>[{toastId:h.id,height:Nt,position:h.position},...on]),()=>w(on=>on.filter(Mn=>Mn.toastId!==h.id))}},[w,h.id]),be.useLayoutEffect(()=>{if(!X)return;const Be=ht.current,Nt=Be.style.height;Be.style.height="auto";const on=Be.getBoundingClientRect().height;Be.style.height=Nt,Me(on),w(Mn=>Mn.find(Mt=>Mt.toastId===h.id)?Mn.map(Mt=>Mt.toastId===h.id?{...Mt,height:on}:Mt):[{toastId:h.id,height:on,position:h.position},...Mn])},[X,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ia=be.useCallback(()=>{se(!0),ye(zr.current),w(Be=>Be.filter(Nt=>Nt.toastId!==h.id)),setTimeout(()=>{A(h)},Jne)},[h,A,w,zr]);be.useEffect(()=>{if(h.promise&&Lt==="loading"||h.duration===1/0||h.type==="loading")return;let Be;return C||y||Pn?(()=>{if(Qc.current<gl.current){const Mn=new Date().getTime()-gl.current;Ke.current=Ke.current-Mn}Qc.current=new Date().getTime()})():(()=>{Ke.current!==1/0&&(gl.current=new Date().getTime(),Be=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ia()},Ke.current))})(),()=>clearTimeout(Be)},[C,y,h,Lt,Pn,ia]),be.useEffect(()=>{h.delete&&(ia(),h.onDismiss==null||h.onDismiss.call(h,h))},[ia,h.delete]);function Go(){var Be;if(H!=null&&H.loading){var Nt;return be.createElement("div",{className:di(R==null?void 0:R.loader,h==null||(Nt=h.classNames)==null?void 0:Nt.loader,"sonner-loader"),"data-visible":Lt==="loading"},H.loading)}return be.createElement(kne,{className:di(R==null?void 0:R.loader,h==null||(Be=h.classNames)==null?void 0:Be.loader),visible:Lt==="loading"})}const Xo=h.icon||(H==null?void 0:H[Lt])||Mne(Lt);var $i,oa;return be.createElement("li",{tabIndex:0,ref:ht,className:di(K,lt,R==null?void 0:R.toast,h==null||(t=h.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[Lt],h==null||(n=h.classNames)==null?void 0:n[Lt]),"data-sonner-toast":"","data-rich-colors":($i=h.richColors)!=null?$i:N,"data-styled":!(h.jsx||h.unstyled||p),"data-mounted":X,"data-promise":!!h.promise,"data-swiped":me,"data-removed":ee,"data-visible":Sr,"data-y-position":zi,"data-x-position":Hn,"data-index":E,"data-front":Qn,"data-swiping":ae,"data-dismissible":we,"data-type":Lt,"data-invert":ld,"data-swipe-out":J,"data-swipe-direction":B,"data-expanded":!!(C||V&&X),"data-testid":h.testId,style:{"--index":E,"--toasts-before":E,"--z-index":O.length-E,"--offset":`${ee?ge:zr.current}px`,"--initial-height":V?"auto":`${Ie}px`,...P,...h.style},onDragEnd:()=>{re(!1),Y(null),ii.current=null},onPointerDown:Be=>{Be.button!==2&&(yl||!we||(Gt.current=new Date,ye(zr.current),Be.target.setPointerCapture(Be.pointerId),Be.target.tagName!=="BUTTON"&&(re(!0),ii.current={x:Be.clientX,y:Be.clientY})))},onPointerUp:()=>{var Be,Nt,on;if(J||!we)return;ii.current=null;const Mn=Number(((Be=ht.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),oi=Number(((Nt=ht.current)==null?void 0:Nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mt=new Date().getTime()-((on=Gt.current)==null?void 0:on.getTime()),Jn=F==="x"?Mn:oi,Bi=Math.abs(Jn)/Mt;if(Math.abs(Jn)>=Zne||Bi>.11){ye(zr.current),h.onDismiss==null||h.onDismiss.call(h,h),z(F==="x"?Mn>0?"right":"left":oi>0?"down":"up"),ia(),le(!0);return}else{var er,tr;(er=ht.current)==null||er.style.setProperty("--swipe-amount-x","0px"),(tr=ht.current)==null||tr.style.setProperty("--swipe-amount-y","0px")}ne(!1),re(!1),Y(null)},onPointerMove:Be=>{var Nt,on,Mn;if(!ii.current||!we||((Nt=window.getSelection())==null?void 0:Nt.toString().length)>0)return;const Mt=Be.clientY-ii.current.y,Jn=Be.clientX-ii.current.x;var Bi;const er=(Bi=e.swipeDirections)!=null?Bi:ere(W);!F&&(Math.abs(Jn)>1||Math.abs(Mt)>1)&&Y(Math.abs(Jn)>Math.abs(Mt)?"x":"y");let tr={x:0,y:0};const Wo=Br=>1/(1.5+Math.abs(Br)/20);if(F==="y"){if(er.includes("top")||er.includes("bottom"))if(er.includes("top")&&Mt<0||er.includes("bottom")&&Mt>0)tr.y=Mt;else{const Br=Mt*Wo(Mt);tr.y=Math.abs(Br)<Math.abs(Mt)?Br:Mt}}else if(F==="x"&&(er.includes("left")||er.includes("right")))if(er.includes("left")&&Jn<0||er.includes("right")&&Jn>0)tr.x=Jn;else{const Br=Jn*Wo(Jn);tr.x=Math.abs(Br)<Math.abs(Jn)?Br:Jn}(Math.abs(tr.x)>0||Math.abs(tr.y)>0)&&ne(!0),(on=ht.current)==null||on.style.setProperty("--swipe-amount-x",`${tr.x}px`),(Mn=ht.current)==null||Mn.style.setProperty("--swipe-amount-y",`${tr.y}px`)}},ri&&!h.jsx&&Lt!=="loading"?be.createElement("button",{"aria-label":q,"data-disabled":yl,"data-close-button":!0,onClick:yl||!we?()=>{}:()=>{ia(),h.onDismiss==null||h.onDismiss.call(h,h)},className:di(R==null?void 0:R.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(oa=H==null?void 0:H.close)!=null?oa:$ne):null,(Lt||h.icon||h.promise)&&h.icon!==null&&((H==null?void 0:H[Lt])!==null||h.icon)?be.createElement("div",{"data-icon":"",className:di(R==null?void 0:R.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Go():null,h.type!=="loading"?Xo:null):null,be.createElement("div",{"data-content":"",className:di(R==null?void 0:R.content,h==null||(i=h.classNames)==null?void 0:i.content)},be.createElement("div",{"data-title":"",className:di(R==null?void 0:R.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?be.createElement("div",{"data-description":"",className:di(L,xn,R==null?void 0:R.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),be.isValidElement(h.cancel)?h.cancel:h.cancel&&Rv(h.cancel)?be.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||k,onClick:Be=>{Rv(h.cancel)&&we&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Be),ia())},className:di(R==null?void 0:R.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,be.isValidElement(h.action)?h.action:h.action&&Rv(h.action)?be.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||D,onClick:Be=>{Rv(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Be),!Be.defaultPrevented&&ia())},className:di(R==null?void 0:R.actionButton,h==null||(u=h.classNames)==null?void 0:u.actionButton)},h.action.label):null)};function zM(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function nre(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,s=i?"--mobile-offset":"--offset",c=i?Xne:Gne;function f(u){["top","right","bottom","left"].forEach(m=>{n[`${s}-${m}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=c:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):f(c)}),n}const rre=be.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:c,closeButton:f,className:u,offset:m,mobileOffset:h,theme:p="light",richColors:y,duration:w,style:x,visibleToasts:S=Yne,toastOptions:E,dir:O=zM(),gap:C=Qne,icons:A,containerAriaLabel:N="Notifications"}=t,[T,P]=be.useState([]),k=be.useMemo(()=>r?T.filter(X=>X.toasterId===r):T.filter(X=>!X.toasterId),[T,r]),D=be.useMemo(()=>Array.from(new Set([i].concat(k.filter(X=>X.position).map(X=>X.position)))),[k,i]),[K,L]=be.useState([]),[I,W]=be.useState(!1),[$,V]=be.useState(!1),[R,H]=be.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=be.useRef(null),F=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Y=be.useRef(null),B=be.useRef(!1),z=be.useCallback(X=>{P(Z=>{var ee;return(ee=Z.find(se=>se.id===X.id))!=null&&ee.delete||Rr.dismiss(X.id),Z.filter(({id:se})=>se!==X.id)})},[]);return be.useEffect(()=>Rr.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{P(Z=>Z.map(ee=>ee.id===X.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{_z.flushSync(()=>{P(Z=>{const ee=Z.findIndex(se=>se.id===X.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...X},...Z.slice(ee+1)]:[X,...Z]})})})}),[T]),be.useEffect(()=>{if(p!=="system"){H(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:Z})=>{H(Z?"dark":"light")})}catch{X.addListener(({matches:ee})=>{try{H(ee?"dark":"light")}catch(se){console.error(se)}})}},[p]),be.useEffect(()=>{T.length<=1&&W(!1)},[T]),be.useEffect(()=>{const X=Z=>{var ee;if(s.every(re=>Z[re]||Z.code===re)){var ae;W(!0),(ae=q.current)==null||ae.focus()}Z.code==="Escape"&&(document.activeElement===q.current||(ee=q.current)!=null&&ee.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[s]),be.useEffect(()=>{if(q.current)return()=>{Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null,B.current=!1)}},[q.current]),be.createElement("section",{ref:n,"aria-label":`${N} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((X,Z)=>{var ee;const[se,ae]=X.split("-");return k.length?be.createElement("ol",{key:X,dir:O==="auto"?zM():O,tabIndex:-1,ref:q,className:u,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":se,"data-x-position":ae,style:{"--front-toast-height":`${((ee=K[0])==null?void 0:ee.height)||0}px`,"--width":`${Wne}px`,"--gap":`${C}px`,...x,...nre(m,h)},onBlur:re=>{B.current&&!re.currentTarget.contains(re.relatedTarget)&&(B.current=!1,Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||B.current||(B.current=!0,Y.current=re.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{$||W(!1)},onDragEnd:()=>W(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},k.filter(re=>!re.position&&Z===0||re.position===X).map((re,J)=>{var le,me;return be.createElement(tre,{key:re.id,icons:A,index:J,toast:re,defaultRichColors:y,duration:(le=E==null?void 0:E.duration)!=null?le:w,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:a,visibleToasts:S,closeButton:(me=E==null?void 0:E.closeButton)!=null?me:f,interacting:$,position:X,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:z,toasts:k.filter(ne=>ne.position==re.position),heights:K.filter(ne=>ne.position==re.position),setHeights:L,expandByDefault:c,gap:C,expanded:I,swipeDirections:t.swipeDirections})})):null}))}),are=({...e})=>{const{theme:t="system"}=gj();return v.jsx(rre,{theme:t,className:"toaster group",icons:{success:v.jsx(rB,{className:"size-4"}),info:v.jsx(Gte,{className:"size-4"}),warning:v.jsx(jne,{className:"size-4"}),error:v.jsx(oB,{className:"size-4"}),loading:v.jsx(Jte,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},ire=new aG({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,refetchOnWindowFocus:!0,retry:1}}}),dB="/api";class hB extends Error{constructor(t,n,r){super(`${t} ${n}`),this.status=t,this.statusText=n,this.body=r,this.name="ApiError"}}async function ah(e,t){const n=`${dB}${e}`,r=new AbortController,a=setTimeout(()=>r.abort(),3e4);let i;try{i=await fetch(n,{...t,signal:(t==null?void 0:t.signal)??r.signal,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}})}finally{clearTimeout(a)}if(!i.ok){const s=await i.json().catch(()=>null);throw new hB(i.status,i.statusText,s)}return i.json()}async function ore(e,t){const n=`${dB}${e}`,r=new AbortController,a=setTimeout(()=>r.abort(),6e4);let i;try{i=await fetch(n,{method:"POST",body:t,signal:r.signal})}finally{clearTimeout(a)}if(!i.ok){const s=await i.json().catch(()=>null);throw new hB(i.status,i.statusText,s)}return i.json()}const Ue={get:e=>ah(e),post:(e,t)=>ah(e,{method:"POST",body:t!=null?JSON.stringify(t):void 0}),put:(e,t)=>ah(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>ah(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>ah(e,{method:"DELETE"}),upload:(e,t)=>{const n=new FormData;return t.forEach(r=>n.append("files",r)),ore(e,n)}},Ye={projects:{all:["projects"],detail:e=>["projects",e],config:e=>["projects",e,"config"],sessions:e=>["projects",e,"sessions"],files:e=>["projects",e,"files"],stats:(e,t)=>["projects",e,"stats",t],resources:e=>["projects",e,"resources"],resourceDetail:(e,t,n)=>["projects",e,"resources",t,n],resourceConfig:(e,t,n)=>["projects",e,"resources",t,n,"config"]},sessions:{all:e=>["sessions",e],detail:(e,t)=>["sessions",e,t],running:()=>["sessions",{status:"running"}]},roles:{all:["roles"]},config:{global:["config","global"]},registry:{list:e=>["registry",e],detail:(e,t)=>["registry",e,t],config:(e,t)=>["registry",e,t,"config"],validate:e=>["registry","agents",e,"validate"]},schedules:{all:["schedules"],detail:e=>["schedules",e],history:e=>["schedules",e,"history"]}};function Wf(){return $n({queryKey:Ye.projects.all,queryFn:()=>Ue.get("/projects")})}function mB(e,t){return $n({queryKey:Ye.projects.detail(e),queryFn:()=>Ue.get(`/projects/${e}`),enabled:t==null?void 0:t.enabled})}function pB(e){return $n({queryKey:Ye.projects.files(e),queryFn:()=>Ue.get(`/projects/${e}/files`)})}function vB(e,t){return $n({queryKey:Ye.projects.config(e),queryFn:()=>Ue.get(`/projects/${e}/config`),enabled:t==null?void 0:t.enabled})}const sre=500;function lre({onCommandPalette:e,onShortcutsHelp:t}){const n=qf(),r=b.useRef(null),a=b.useRef(void 0);b.useEffect(()=>{function i(s){const c=s.target;if(!(c.tagName==="INPUT"||c.tagName==="TEXTAREA"||c.isContentEditable)){if((s.metaKey||s.ctrlKey)&&s.key==="k"){s.preventDefault(),e();return}if(!(s.metaKey||s.ctrlKey||s.altKey)){if(s.key==="?"){s.preventDefault(),t();return}if(r.current==="g"){if(r.current=null,clearTimeout(a.current),s.key==="d"){s.preventDefault(),n("/");return}if(s.key==="p"){s.preventDefault(),n("/projects");return}}if(s.key==="g"){r.current="g",a.current=setTimeout(()=>{r.current=null},sre);return}}}}return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),clearTimeout(a.current)}},[n,e,t])}function gB(e){const t=e?"?"+new URLSearchParams(e).toString():"";return $n({queryKey:Ye.sessions.all(e),queryFn:()=>Ue.get(`/sessions${t}`)})}function uC(){return gB({status:"running",per_page:"50"})}function cre(){return gB({per_page:"10"})}function ure(e,t=1,n=20){return $n({queryKey:[...Ye.projects.sessions(e),t,n],queryFn:()=>Ue.get(`/projects/${e}/sessions?page=${t}&per_page=${n}`)})}function fre(e,t,n){return $n({queryKey:Ye.sessions.detail(e,t),queryFn:()=>Ue.get(`/projects/${e}/sessions/${t}`),...n})}var $M=1,dre=.9,hre=.8,mre=.17,a1=.1,i1=.999,pre=.9999,vre=.99,gre=/[\\\/_+.#"@\[\(\{&]/,yre=/[\\\/_+.#"@\[\(\{&]/g,bre=/[\s-]/,yB=/[\s-]/g;function $E(e,t,n,r,a,i,s){if(i===t.length)return a===e.length?$M:vre;var c=`${a},${i}`;if(s[c]!==void 0)return s[c];for(var f=r.charAt(i),u=n.indexOf(f,a),m=0,h,p,y,w;u>=0;)h=$E(e,t,n,r,u+1,i+1,s),h>m&&(u===a?h*=$M:gre.test(e.charAt(u-1))?(h*=hre,y=e.slice(a,u-1).match(yre),y&&a>0&&(h*=Math.pow(i1,y.length))):bre.test(e.charAt(u-1))?(h*=dre,w=e.slice(a,u-1).match(yB),w&&a>0&&(h*=Math.pow(i1,w.length))):(h*=mre,a>0&&(h*=Math.pow(i1,u-a))),e.charAt(u)!==t.charAt(i)&&(h*=pre)),(h<a1&&n.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(u-1)!==r.charAt(i))&&(p=$E(e,t,n,r,u+1,i+2,s),p*a1>h&&(h=p*a1)),h>m&&(m=h),u=n.indexOf(f,u+1);return s[c]=m,m}function BM(e){return e.toLowerCase().replace(yB," ")}function xre(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,$E(e,t,BM(e),BM(t),0,0,{})}var ih='[cmdk-group=""]',o1='[cmdk-group-items=""]',wre='[cmdk-group-heading=""]',bB='[cmdk-item=""]',UM=`${bB}:not([aria-disabled="true"])`,BE="cmdk-item-select",Ku="data-value",Sre=(e,t,n)=>xre(e,t,n),xB=b.createContext(void 0),Om=()=>b.useContext(xB),wB=b.createContext(void 0),fC=()=>b.useContext(wB),SB=b.createContext(void 0),EB=b.forwardRef((e,t)=>{let n=Vu(()=>{var z,X;return{search:"",value:(X=(z=e.value)!=null?z:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Vu(()=>new Set),a=Vu(()=>new Map),i=Vu(()=>new Map),s=Vu(()=>new Set),c=_B(e),{label:f,children:u,value:m,onValueChange:h,filter:p,shouldFilter:y,loop:w,disablePointerSelection:x=!1,vimBindings:S=!0,...E}=e,O=Ln(),C=Ln(),A=Ln(),N=b.useRef(null),T=Rre();wc(()=>{if(m!==void 0){let z=m.trim();n.current.value=z,P.emit()}},[m]),wc(()=>{T(6,W)},[]);let P=b.useMemo(()=>({subscribe:z=>(s.current.add(z),()=>s.current.delete(z)),snapshot:()=>n.current,setState:(z,X,Z)=>{var ee,se,ae,re;if(!Object.is(n.current[z],X)){if(n.current[z]=X,z==="search")I(),K(),T(1,L);else if(z==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(A);J?J.focus():(ee=document.getElementById(O))==null||ee.focus()}if(T(7,()=>{var J;n.current.selectedItemId=(J=$())==null?void 0:J.id,P.emit()}),Z||T(5,W),((se=c.current)==null?void 0:se.value)!==void 0){let J=X??"";(re=(ae=c.current).onValueChange)==null||re.call(ae,J);return}}P.emit()}},emit:()=>{s.current.forEach(z=>z())}}),[]),k=b.useMemo(()=>({value:(z,X,Z)=>{var ee;X!==((ee=i.current.get(z))==null?void 0:ee.value)&&(i.current.set(z,{value:X,keywords:Z}),n.current.filtered.items.set(z,D(X,Z)),T(2,()=>{K(),P.emit()}))},item:(z,X)=>(r.current.add(z),X&&(a.current.has(X)?a.current.get(X).add(z):a.current.set(X,new Set([z]))),T(3,()=>{I(),K(),n.current.value||L(),P.emit()}),()=>{i.current.delete(z),r.current.delete(z),n.current.filtered.items.delete(z);let Z=$();T(4,()=>{I(),(Z==null?void 0:Z.getAttribute("id"))===z&&L(),P.emit()})}),group:z=>(a.current.has(z)||a.current.set(z,new Set),()=>{i.current.delete(z),a.current.delete(z)}),filter:()=>c.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:O,inputId:A,labelId:C,listInnerRef:N}),[]);function D(z,X){var Z,ee;let se=(ee=(Z=c.current)==null?void 0:Z.filter)!=null?ee:Sre;return z?se(z,n.current.search,X):0}function K(){if(!n.current.search||c.current.shouldFilter===!1)return;let z=n.current.filtered.items,X=[];n.current.filtered.groups.forEach(ee=>{let se=a.current.get(ee),ae=0;se.forEach(re=>{let J=z.get(re);ae=Math.max(J,ae)}),X.push([ee,ae])});let Z=N.current;V().sort((ee,se)=>{var ae,re;let J=ee.getAttribute("id"),le=se.getAttribute("id");return((ae=z.get(le))!=null?ae:0)-((re=z.get(J))!=null?re:0)}).forEach(ee=>{let se=ee.closest(o1);se?se.appendChild(ee.parentElement===se?ee:ee.closest(`${o1} > *`)):Z.appendChild(ee.parentElement===Z?ee:ee.closest(`${o1} > *`))}),X.sort((ee,se)=>se[1]-ee[1]).forEach(ee=>{var se;let ae=(se=N.current)==null?void 0:se.querySelector(`${ih}[${Ku}="${encodeURIComponent(ee[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function L(){let z=V().find(Z=>Z.getAttribute("aria-disabled")!=="true"),X=z==null?void 0:z.getAttribute(Ku);P.setState("value",X||void 0)}function I(){var z,X,Z,ee;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let se=0;for(let ae of r.current){let re=(X=(z=i.current.get(ae))==null?void 0:z.value)!=null?X:"",J=(ee=(Z=i.current.get(ae))==null?void 0:Z.keywords)!=null?ee:[],le=D(re,J);n.current.filtered.items.set(ae,le),le>0&&se++}for(let[ae,re]of a.current)for(let J of re)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=se}function W(){var z,X,Z;let ee=$();ee&&(((z=ee.parentElement)==null?void 0:z.firstChild)===ee&&((Z=(X=ee.closest(ih))==null?void 0:X.querySelector(wre))==null||Z.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function $(){var z;return(z=N.current)==null?void 0:z.querySelector(`${bB}[aria-selected="true"]`)}function V(){var z;return Array.from(((z=N.current)==null?void 0:z.querySelectorAll(UM))||[])}function R(z){let X=V()[z];X&&P.setState("value",X.getAttribute(Ku))}function H(z){var X;let Z=$(),ee=V(),se=ee.findIndex(re=>re===Z),ae=ee[se+z];(X=c.current)!=null&&X.loop&&(ae=se+z<0?ee[ee.length-1]:se+z===ee.length?ee[0]:ee[se+z]),ae&&P.setState("value",ae.getAttribute(Ku))}function q(z){let X=$(),Z=X==null?void 0:X.closest(ih),ee;for(;Z&&!ee;)Z=z>0?Pre(Z,ih):Mre(Z,ih),ee=Z==null?void 0:Z.querySelector(UM);ee?P.setState("value",ee.getAttribute(Ku)):H(z)}let F=()=>R(V().length-1),Y=z=>{z.preventDefault(),z.metaKey?F():z.altKey?q(1):H(1)},B=z=>{z.preventDefault(),z.metaKey?R(0):z.altKey?q(-1):H(-1)};return b.createElement(ke.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:z=>{var X;(X=E.onKeyDown)==null||X.call(E,z);let Z=z.nativeEvent.isComposing||z.keyCode===229;if(!(z.defaultPrevented||Z))switch(z.key){case"n":case"j":{S&&z.ctrlKey&&Y(z);break}case"ArrowDown":{Y(z);break}case"p":case"k":{S&&z.ctrlKey&&B(z);break}case"ArrowUp":{B(z);break}case"Home":{z.preventDefault(),R(0);break}case"End":{z.preventDefault(),F();break}case"Enter":{z.preventDefault();let ee=$();if(ee){let se=new Event(BE);ee.dispatchEvent(se)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Dre},f),g0(e,z=>b.createElement(wB.Provider,{value:P},b.createElement(xB.Provider,{value:k},z))))}),Ere=b.forwardRef((e,t)=>{var n,r;let a=Ln(),i=b.useRef(null),s=b.useContext(SB),c=Om(),f=_B(e),u=(r=(n=f.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;wc(()=>{if(!u)return c.item(a,s==null?void 0:s.id)},[u]);let m=jB(a,i,[e.value,e.children,i],e.keywords),h=fC(),p=rl(T=>T.value&&T.value===m.current),y=rl(T=>u||c.filter()===!1?!0:T.search?T.filtered.items.get(a)>0:!0);b.useEffect(()=>{let T=i.current;if(!(!T||e.disabled))return T.addEventListener(BE,w),()=>T.removeEventListener(BE,w)},[y,e.onSelect,e.disabled]);function w(){var T,P;x(),(P=(T=f.current).onSelect)==null||P.call(T,m.current)}function x(){h.setState("value",m.current,!0)}if(!y)return null;let{disabled:S,value:E,onSelect:O,forceMount:C,keywords:A,...N}=e;return b.createElement(ke.div,{ref:jo(i,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!p,"data-disabled":!!S,"data-selected":!!p,onPointerMove:S||c.getDisablePointerSelection()?void 0:x,onClick:S?void 0:w},e.children)}),_re=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...i}=e,s=Ln(),c=b.useRef(null),f=b.useRef(null),u=Ln(),m=Om(),h=rl(y=>a||m.filter()===!1?!0:y.search?y.filtered.groups.has(s):!0);wc(()=>m.group(s),[]),jB(s,c,[e.value,e.heading,f]);let p=b.useMemo(()=>({id:s,forceMount:a}),[a]);return b.createElement(ke.div,{ref:jo(c,t),...i,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&b.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),g0(e,y=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},b.createElement(SB.Provider,{value:p},y))))}),jre=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=b.useRef(null),i=rl(s=>!s.search);return!n&&!i?null:b.createElement(ke.div,{ref:jo(a,t),...r,"cmdk-separator":"",role:"separator"})}),Cre=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,i=fC(),s=rl(u=>u.search),c=rl(u=>u.selectedItemId),f=Om();return b.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),b.createElement(ke.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":c,id:f.inputId,type:"text",value:a?e.value:s,onChange:u=>{a||i.setState("search",u.target.value),n==null||n(u.target.value)}})}),Ore=b.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,i=b.useRef(null),s=b.useRef(null),c=rl(u=>u.selectedItemId),f=Om();return b.useEffect(()=>{if(s.current&&i.current){let u=s.current,m=i.current,h,p=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let y=u.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(h),p.unobserve(u)}}},[]),b.createElement(ke.div,{ref:jo(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:f.listId},g0(e,u=>b.createElement("div",{ref:jo(s,f.listInnerRef),"cmdk-list-sizer":""},u)))}),Are=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:i,container:s,...c}=e;return b.createElement(Aj,{open:n,onOpenChange:r},b.createElement(Nj,{container:s},b.createElement(Tj,{"cmdk-overlay":"",className:a}),b.createElement(Pj,{"aria-label":e.label,"cmdk-dialog":"",className:i},b.createElement(EB,{ref:t,...c}))))}),Nre=b.forwardRef((e,t)=>rl(n=>n.filtered.count===0)?b.createElement(ke.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Tre=b.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...i}=e;return b.createElement(ke.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},g0(e,s=>b.createElement("div",{"aria-hidden":!0},s)))}),Qf=Object.assign(EB,{List:Ore,Item:Ere,Input:Cre,Group:_re,Separator:jre,Dialog:Are,Empty:Nre,Loading:Tre});function Pre(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Mre(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function _B(e){let t=b.useRef(e);return wc(()=>{t.current=e}),t}var wc=typeof window>"u"?b.useEffect:b.useLayoutEffect;function Vu(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function rl(e){let t=fC(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function jB(e,t,n,r=[]){let a=b.useRef(),i=Om();return wc(()=>{var s;let c=(()=>{var u;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(u=m.current.textContent)==null?void 0:u.trim():a.current}})(),f=r.map(u=>u.trim());i.value(e,c,f),(s=t.current)==null||s.setAttribute(Ku,c),a.current=c}),a}var Rre=()=>{let[e,t]=b.useState(),n=Vu(()=>new Map);return wc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function kre(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function g0({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(kre(t),{ref:t.ref},n(t.props.children)):n(t)}var Dre={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const HM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,FM=st,y0=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return FM(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,s=Object.keys(a).map(u=>{const m=n==null?void 0:n[u],h=i==null?void 0:i[u];if(m===null)return null;const p=HM(m)||HM(h);return a[u][p]}),c=n&&Object.entries(n).reduce((u,m)=>{let[h,p]=m;return p===void 0||(u[h]=p),u},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,m)=>{let{class:h,className:p,...y}=m;return Object.entries(y).every(w=>{let[x,S]=w;return Array.isArray(S)?S.includes({...i,...c}[x]):{...i,...c}[x]===S})?[...u,h,p]:u},[]);return FM(e,s,f,n==null?void 0:n.class,n==null?void 0:n.className)},Ire=y0("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function je({className:e,variant:t="default",size:n="default",asChild:r=!1,...a}){const i=r?yj:"button";return v.jsx(i,{"data-slot":"button","data-variant":t,"data-size":n,className:Oe(Ire({variant:t,size:n,className:e})),...a})}function $c({...e}){return v.jsx(Aj,{"data-slot":"dialog",...e})}function Lre({...e}){return v.jsx(Nj,{"data-slot":"dialog-portal",...e})}function zre({className:e,...t}){return v.jsx(Tj,{"data-slot":"dialog-overlay",className:Oe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Bc({className:e,children:t,showCloseButton:n=!0,...r}){return v.jsxs(Lre,{"data-slot":"dialog-portal",children:[v.jsx(zre,{}),v.jsxs(Pj,{"data-slot":"dialog-content",className:Oe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...r,children:[t,n&&v.jsxs(Mj,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[v.jsx(cC,{}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Uc({className:e,...t}){return v.jsx("div",{"data-slot":"dialog-header",className:Oe("flex flex-col gap-2 text-center sm:text-left",e),...t})}function CB({className:e,showCloseButton:t=!1,children:n,...r}){return v.jsxs("div",{"data-slot":"dialog-footer",className:Oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&v.jsx(Mj,{asChild:!0,children:v.jsx(je,{variant:"outline",children:"Close"})})]})}function Hc({className:e,...t}){return v.jsx(S4,{"data-slot":"dialog-title",className:Oe("text-lg leading-none font-semibold",e),...t})}function OB({className:e,...t}){return v.jsx(E4,{"data-slot":"dialog-description",className:Oe("text-sm text-muted-foreground",e),...t})}function $re({className:e,...t}){return v.jsx(Qf,{"data-slot":"command",className:Oe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})}function Bre({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:a=!0,...i}){return v.jsxs($c,{...i,children:[v.jsxs(Uc,{className:"sr-only",children:[v.jsx(Hc,{children:e}),v.jsx(OB,{children:t})]}),v.jsx(Bc,{className:Oe("overflow-hidden p-0",r),showCloseButton:a,children:v.jsx($re,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function Ure({className:e,...t}){return v.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[v.jsx(lB,{className:"size-4 shrink-0 opacity-50"}),v.jsx(Qf.Input,{"data-slot":"command-input",className:Oe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Hre({className:e,...t}){return v.jsx(Qf.List,{"data-slot":"command-list",className:Oe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Fre({...e}){return v.jsx(Qf.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function oh({className:e,...t}){return v.jsx(Qf.Group,{"data-slot":"command-group",className:Oe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})}function Da({className:e,...t}){return v.jsx(Qf.Item,{"data-slot":"command-item",className:Oe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}function qM({className:e,...t}){return v.jsx("span",{"data-slot":"command-shortcut",className:Oe("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function qre({open:e,onOpenChange:t}){var u;const n=qf(),{setTheme:r}=gj(),a=Wf(),i=uC(),s=a.data??[],c=((u=i.data)==null?void 0:u.items)??[],f=m=>{t(!1),n(m)};return v.jsxs(Bre,{open:e,onOpenChange:t,showCloseButton:!1,children:[v.jsx(Ure,{placeholder:"Type a command or search..."}),v.jsxs(Hre,{children:[v.jsx(Fre,{children:"No results found."}),v.jsxs(oh,{heading:"Navigation",children:[v.jsxs(Da,{onSelect:()=>f("/"),children:[v.jsx(aB,{}),"Dashboard",v.jsx(qM,{children:"G D"})]}),v.jsxs(Da,{onSelect:()=>f("/projects"),children:[v.jsx(Ig,{}),"Projects",v.jsx(qM,{children:"G P"})]})]}),s.length>0&&v.jsx(oh,{heading:"Projects",children:s.map(m=>v.jsxs(Da,{onSelect:()=>f(`/projects/${m.id}`),children:[v.jsx(Ig,{}),m.display_name]},m.id))}),c.length>0&&v.jsx(oh,{heading:"Running Sessions",children:c.map(m=>v.jsxs(Da,{onSelect:()=>f(`/projects/${m.project_id}/sessions/${m.run_id}`),children:[v.jsx(lC,{}),m.role," (",m.run_id.slice(0,8),")"]},m.run_id))}),v.jsxs(oh,{heading:"Resources",children:[v.jsxs(Da,{onSelect:()=>f("/resources/roles"),children:[v.jsx(uB,{}),"Roles"]}),v.jsxs(Da,{onSelect:()=>f("/resources/skills"),children:[v.jsx(fB,{}),"Skills"]}),v.jsxs(Da,{onSelect:()=>f("/resources/agents"),children:[v.jsx(tB,{}),"Agents"]}),v.jsxs(Da,{onSelect:()=>f("/resources/memories"),children:[v.jsx(nB,{}),"Memory"]})]}),v.jsxs(oh,{heading:"Theme",children:[v.jsxs(Da,{onSelect:()=>{r("light"),t(!1)},children:[v.jsx(cB,{}),"Light"]}),v.jsxs(Da,{onSelect:()=>{r("dark"),t(!1)},children:[v.jsx(iB,{}),"Dark"]}),v.jsxs(Da,{onSelect:()=>{r("system"),t(!1)},children:[v.jsx(rne,{}),"System"]})]})]})]})}const Kre=[{keys:["⌘","K"],description:"Open command palette"},{keys:["G","D"],description:"Go to Dashboard"},{keys:["G","P"],description:"Go to Projects"},{keys:["?"],description:"Show keyboard shortcuts"}];function Vre({open:e,onOpenChange:t}){return v.jsx($c,{open:e,onOpenChange:t,children:v.jsxs(Bc,{className:"max-w-sm",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:"Keyboard Shortcuts"})}),v.jsx("div",{className:"space-y-2",children:Kre.map(n=>v.jsxs("div",{className:"flex items-center justify-between text-sm",children:[v.jsx("span",{className:"text-muted-foreground",children:n.description}),v.jsx("div",{className:"flex gap-1",children:n.keys.map(r=>v.jsx("kbd",{className:"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-xs",children:r},r))})]},n.description))})]})})}function Yre({...e}){return v.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function Gre({className:e,...t}){return v.jsx("ol",{"data-slot":"breadcrumb-list",className:Oe("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",e),...t})}function Xre({className:e,...t}){return v.jsx("li",{"data-slot":"breadcrumb-item",className:Oe("inline-flex items-center gap-1.5",e),...t})}function Wre({asChild:e,className:t,...n}){const r=e?yj:"a";return v.jsx(r,{"data-slot":"breadcrumb-link",className:Oe("transition-colors hover:text-foreground",t),...n})}function Qre({className:e,...t}){return v.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Oe("font-normal text-foreground",e),...t})}function Zre({children:e,className:t,...n}){return v.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Oe("[&>svg]:size-3.5",t),...n,children:e??v.jsx(p0,{})})}function Lg({...e}){return v.jsx(LZ,{"data-slot":"dropdown-menu",...e})}function zg({...e}){return v.jsx(zZ,{"data-slot":"dropdown-menu-trigger",...e})}function $g({className:e,sideOffset:t=4,...n}){return v.jsx($Z,{children:v.jsx(BZ,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Oe("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...n})})}function Eh({className:e,inset:t,variant:n="default",...r}){return v.jsx(UZ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Oe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function Jre({className:e,children:t,checked:n,...r}){return v.jsxs(HZ,{"data-slot":"dropdown-menu-checkbox-item",className:Oe("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[v.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:v.jsx(FZ,{children:v.jsx(sC,{className:"size-4"})})}),t]})}function Ds({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return v.jsx(qJ,{"data-slot":"separator",decorative:n,orientation:t,className:Oe("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const eae=[{to:"/",label:"Dashboard",icon:aB,end:!0},{to:"/projects",label:"Projects",icon:Ig},{to:"/schedules",label:"Schedules",icon:kte},{to:"/settings",label:"Settings",icon:bne}],tae=[{to:"/resources/roles",label:"Roles",icon:uB},{to:"/resources/skills",label:"Skills",icon:fB},{to:"/resources/agents",label:"Agents",icon:tB},{to:"/resources/memories",label:"Memory",icon:nB}];function nae(){const t=ki().pathname.split("/").filter(Boolean),n=t[0]==="projects"&&t[1]?Number(t[1]):0,{data:r}=mB(n,{enabled:n>0}),a=[{label:"Dashboard",href:"/"}];if(t[0]==="projects"&&(a.push({label:"Projects",href:"/projects"}),t[1])){const i=`/projects/${t[1]}`,s=(r==null?void 0:r.display_name)??`Project #${t[1]}`;a.push({label:s,href:i,projectSwitcher:!0}),t[2]==="sessions"&&t[3]&&a.push({label:`Session ${t[3].slice(0,8)}…`})}if(t[0]==="schedules"&&a.push({label:"Scheduled Tasks"}),t[0]==="settings"&&a.push({label:"Settings"}),t[0]==="resources"){const i={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory"};a.push({label:"Resources"}),t[1]&&(a[a.length-1].href=`/resources/${t[1]}`,a.push({label:i[t[1]]??t[1]}))}return a}function rae(){const e=nae(),t=qf(),n=Wf(),{setTheme:r}=gj(),[a,i]=b.useState(!1),[s,c]=b.useState(!1);return lre({onCommandPalette:()=>i(!0),onShortcutsHelp:()=>c(!0)}),v.jsxs("div",{className:"flex min-h-screen",children:[v.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[v.jsx("div",{className:"flex h-14 items-center border-b border-border px-4",children:v.jsx(Ya,{to:"/",className:"text-lg font-bold tracking-tight hover:text-foreground/80",children:"StrawPot"})}),v.jsxs("nav",{className:"flex flex-col gap-1 p-3",children:[eae.map(({to:f,label:u,icon:m,end:h})=>v.jsxs(JS,{to:f,end:h,className:({isActive:p})=>Oe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",p?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[v.jsx(m,{className:"h-4 w-4"}),u]},f)),v.jsx("div",{className:"mt-4 mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Resources"}),tae.map(({to:f,label:u,icon:m})=>v.jsxs(JS,{to:f,className:({isActive:h})=>Oe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",h?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[v.jsx(m,{className:"h-4 w-4"}),u]},f))]})]}),v.jsxs("div",{className:"flex flex-1 flex-col",children:[v.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border px-6",children:[v.jsx(Yre,{children:v.jsx(Gre,{children:e.map((f,u)=>{const m=u===e.length-1;return v.jsxs(Xre,{children:[u>0&&v.jsx(Zre,{}),f.projectSwitcher?v.jsxs(Lg,{children:[v.jsxs(zg,{className:"flex items-center gap-1 text-sm font-medium text-foreground hover:text-foreground/80 transition-colors",children:[f.label,v.jsx(Ate,{className:"h-3 w-3 text-muted-foreground"})]}),v.jsx($g,{align:"start",children:(n.data??[]).map(h=>v.jsxs(Eh,{onClick:()=>t(`/projects/${h.id}`),children:[f.href===`/projects/${h.id}`?v.jsx(sC,{className:"mr-2 h-3.5 w-3.5"}):v.jsx("span",{className:"mr-2 inline-block w-3.5"}),h.display_name]},h.id))})]}):m?v.jsx(Qre,{children:f.label}):v.jsx(Wre,{href:f.href,children:f.label})]},f.label)})})}),v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-md border border-border bg-muted/50 px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted",children:v.jsx("kbd",{className:"font-mono",children:"⌘K"})}),v.jsxs(Lg,{children:[v.jsx(zg,{asChild:!0,children:v.jsxs(je,{variant:"ghost",size:"icon",className:"h-8 w-8",children:[v.jsx(cB,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(iB,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),v.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),v.jsxs($g,{align:"end",children:[v.jsx(Eh,{onClick:()=>r("light"),children:"Light"}),v.jsx(Eh,{onClick:()=>r("dark"),children:"Dark"}),v.jsx(Eh,{onClick:()=>r("system"),children:"System"})]})]})]})]}),v.jsx(Ds,{}),v.jsx("main",{className:"flex-1 overflow-auto p-6",children:v.jsx(QV,{})})]}),v.jsx(qre,{open:a,onOpenChange:i}),v.jsx(Vre,{open:s,onOpenChange:c})]})}function aae(){const e=jt();return qt({mutationFn:t=>Ue.post("/sessions",t),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.projects.sessions(n.project_id)}),e.invalidateQueries({queryKey:["sessions"]})}})}function iae(){const e=jt();return qt({mutationFn:t=>Ue.post(`/sessions/${t}/stop`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function oae(){const e=jt();return qt({mutationFn:t=>Ue.delete(`/sessions/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}const sae=y0("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function vn({className:e,variant:t="default",asChild:n=!1,...r}){const a=n?yj:"span";return v.jsx(a,{"data-slot":"badge","data-variant":t,className:Oe(sae({variant:t}),e),...r})}function Fc({className:e,...t}){return v.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:v.jsx("table",{"data-slot":"table",className:Oe("w-full caption-bottom text-sm",e),...t})})}function qc({className:e,...t}){return v.jsx("thead",{"data-slot":"table-header",className:Oe("[&_tr]:border-b",e),...t})}function Kc({className:e,...t}){return v.jsx("tbody",{"data-slot":"table-body",className:Oe("[&_tr:last-child]:border-0",e),...t})}function Ir({className:e,...t}){return v.jsx("tr",{"data-slot":"table-row",className:Oe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Xe({className:e,...t}){return v.jsx("th",{"data-slot":"table-head",className:Oe("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function We({className:e,...t}){return v.jsx("td",{"data-slot":"table-cell",className:Oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function UE({sessions:e,projectNames:t}){return v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Run ID"}),t&&v.jsx(Xe,{children:"Project"}),v.jsx(Xe,{children:"Role"}),v.jsx(Xe,{children:"Status"}),v.jsx(Xe,{children:"Started"}),v.jsx(Xe,{children:"Duration"}),v.jsx(Xe,{children:"Task"}),v.jsx(Xe,{className:"w-[80px]"})]})}),v.jsx(Kc,{children:e.map(n=>v.jsxs(Ir,{children:[v.jsx(We,{children:v.jsx(Ya,{to:`/projects/${n.project_id}/sessions/${n.run_id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:n.run_id.slice(0,16)})}),t&&v.jsx(We,{children:v.jsx(Ya,{to:`/projects/${n.project_id}`,className:"text-sm text-primary underline-offset-4 hover:underline",children:t.get(n.project_id)??`#${n.project_id}`})}),v.jsx(We,{className:"text-sm",children:n.role}),v.jsx(We,{children:v.jsx(lae,{status:n.status})}),v.jsx(We,{className:"text-sm text-muted-foreground",children:Bg(n.started_at)}),v.jsx(We,{className:"text-sm text-muted-foreground",children:b0(n.duration_ms)}),v.jsx(We,{className:"max-w-[300px] truncate text-sm",children:n.task??"—"}),v.jsx(We,{children:v.jsx(cae,{runId:n.run_id,disabled:n.status==="starting"||n.status==="running"})})]},n.run_id))})]})}function lae({status:e}){const t=AB(e);return v.jsxs(vn,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="warning"&&"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:[e==="running"&&v.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}const KM=AB;function AB(e){switch(e){case"running":case"starting":return"running";case"completed":return"success";case"failed":return"error";case"stopped":return"warning";default:return"default"}}function Bg(e){try{return new Date(e).toLocaleString()}catch{return e}}function b0(e){if(e==null)return"—";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function cae({runId:e,disabled:t}){const[n,r]=b.useState(!1),a=oae(),i=async()=>{try{await a.mutateAsync(e)}catch{}};return n?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(je,{size:"sm",variant:"destructive",onClick:i,disabled:a.isPending,children:"Confirm"}),v.jsx(je,{size:"sm",variant:"outline",onClick:()=>r(!1),children:"No"})]}):v.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>r(!0),disabled:t,children:v.jsx(Xf,{className:"h-4 w-4"})})}function dn({className:e,...t}){return v.jsx("div",{"data-slot":"card",className:Oe("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Yu({className:e,...t}){return v.jsx("div",{"data-slot":"card-header",className:Oe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Gu({className:e,...t}){return v.jsx("div",{"data-slot":"card-title",className:Oe("leading-none font-semibold",e),...t})}function hn({className:e,...t}){return v.jsx("div",{"data-slot":"card-content",className:Oe("px-6",e),...t})}const s1=1e4;function NB(e,t,n){const[r,a]=b.useState([]),[i,s]=b.useState(!1),[c,f]=b.useState(!1),u=b.useRef(null),m=b.useRef(void 0),h=b.useRef(1e3),p=b.useRef("");return b.useEffect(()=>{if(!t)return;const y=`${e}:${t}`;p.current!==y&&(a([]),f(!1),p.current=y);function w(){const x=new EventSource(`/api/sessions/${e}/logs/${t}`);u.current=x,x.onopen=()=>{s(!0),h.current=1e3},x.addEventListener("snapshot",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&a(E.lines.slice(-s1))}catch{}}),x.addEventListener("append",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&E.lines.length>0&&a(O=>{const C=[...O,...E.lines];return C.length>s1?C.slice(-s1):C})}catch{}}),x.addEventListener("done",()=>{f(!0),x.close(),u.current=null}),x.onerror=()=>{x.close(),u.current=null,s(!1),m.current=setTimeout(()=>{h.current=Math.min(h.current*2,15e3),w()},h.current)}}return w(),()=>{var x;(x=u.current)==null||x.close(),u.current=null,m.current&&clearTimeout(m.current)}},[e,t,n]),{lines:r,connected:i,done:c}}const uae=5e3;function fae({runId:e,projectId:t,agentId:n,role:r,runtime:a,startedAt:i}){const{lines:s,done:c}=NB(e,n,!0),f=s.slice(-4),[u,m]=b.useState("");b.useEffect(()=>{const x=new Date(i).getTime(),S=()=>{const O=Date.now()-x,C=Math.floor(O/1e3)%60,A=Math.floor(O/6e4)%60,N=Math.floor(O/36e5);m(N>0?`${N}h ${A}m`:`${A}m ${C}s`)};S();const E=setInterval(S,1e3);return()=>clearInterval(E)},[i]);const h=b.useRef(s.length),p=b.useRef(Date.now()),[y,w]=b.useState(!1);return b.useEffect(()=>{s.length!==h.current&&(h.current=s.length,p.current=Date.now(),w(!1))},[s.length]),b.useEffect(()=>{const x=setInterval(()=>{Date.now()-p.current>uae&&w(!0)},1e3);return()=>clearInterval(x)},[]),v.jsx(dn,{className:"overflow-hidden",children:v.jsxs(hn,{className:"space-y-2 pt-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${c?"bg-muted-foreground":y?"bg-green-300":"animate-pulse bg-green-500"}`}),v.jsx("span",{className:"font-medium text-sm",children:r})]}),v.jsx(vn,{variant:"outline",className:"text-xs",children:a.replace("strawpot-","")})]}),v.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsxs("span",{children:["Session: ",e.slice(0,12)]}),v.jsx("span",{children:"·"}),v.jsx("span",{children:u})]}),v.jsx("div",{className:"rounded bg-[#1e1e1e] px-2 py-1.5 font-mono text-[11px] leading-[16px] text-[#d4d4d4]",children:f.length>0?f.map((x,S)=>v.jsxs("div",{className:"truncate",children:[v.jsx("span",{className:"text-[#666]",children:"> "}),x]},S)):v.jsx("div",{className:"text-[#555]",children:"Waiting for output..."})}),v.jsx("div",{className:"flex justify-end",children:v.jsxs(Ya,{to:`/projects/${t}/sessions/${e}?tab=logs`,className:"inline-flex items-center gap-0.5 text-xs text-primary hover:underline",children:["View Session",v.jsx(p0,{className:"h-3 w-3"})]})})]})})}const l1=8;function dae(){var s;const t=((s=uC().data)==null?void 0:s.items)??[],n=cG({queries:t.slice(0,l1).map(c=>({queryKey:Ye.sessions.detail(c.project_id,c.run_id),queryFn:()=>Ue.get(`/projects/${c.project_id}/sessions/${c.run_id}`),staleTime:1e4}))}),r=[];for(const c of n){if(!c.data)continue;const f=c.data;for(const[u,m]of Object.entries(f.agents))r.push({runId:f.run_id,projectId:f.project_id,agentId:u,role:m.role,runtime:m.runtime,startedAt:m.started_at})}if(r.length===0)return null;const a=r.slice(0,l1),i=r.length-l1;return v.jsxs("section",{className:"space-y-3",children:[v.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Active Agents (",r.length,")"]}),v.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-3",children:a.map(c=>v.jsx(fae,{runId:c.runId,projectId:c.projectId,agentId:c.agentId,role:c.role,runtime:c.runtime,startedAt:c.startedAt},`${c.runId}:${c.agentId}`))}),i>0&&v.jsxs("p",{className:"text-xs text-muted-foreground",children:["+",i," more agent",i!==1?"s":""," running"]})]})}function tn({className:e,...t}){return v.jsx("div",{"data-slot":"skeleton",className:Oe("animate-pulse rounded-md bg-accent",e),...t})}function hae(){return v.jsxs("div",{className:"space-y-8",children:[v.jsx(tn,{className:"h-8 w-40"}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(tn,{className:"h-4 w-24"}),v.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:[1,2,3].map(e=>v.jsx(tn,{className:"h-28 rounded-lg"},e))})]}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(tn,{className:"h-4 w-32"}),v.jsx(tn,{className:"h-48 rounded-lg"})]})]})}function mae(){var m,h;const e=Wf(),t=uC(),n=cre(),r=e.isLoading||t.isLoading||n.isLoading,a=e.error||t.error||n.error;if(r)return v.jsx(hae,{});if(a)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",a.message]})]});const i=e.data??[],s=((m=t.data)==null?void 0:m.items)??[],c=((h=n.data)==null?void 0:h.items)??[],f=new Map;for(const p of i)f.set(p.id,p.display_name);const u=new Map;for(const p of s)u.set(p.project_id,(u.get(p.project_id)??0)+1);return v.jsxs("div",{className:"space-y-8",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Dashboard"}),v.jsx(dae,{}),v.jsxs("section",{className:"space-y-3",children:[v.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Projects (",i.length,")"]}),i.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered."}):v.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:i.map(p=>v.jsx(Ya,{to:`/projects/${p.id}`,className:"group",children:v.jsxs(dn,{className:"transition-colors group-hover:border-foreground/20",children:[v.jsx(Yu,{className:"pb-2",children:v.jsxs(Gu,{className:"flex items-center gap-2 text-base",children:[v.jsx(Ig,{className:"h-4 w-4 text-muted-foreground"}),p.display_name]})}),v.jsxs(hn,{children:[v.jsx("p",{className:"break-all text-sm text-muted-foreground",children:p.working_dir}),v.jsxs("div",{className:"mt-2 flex gap-1.5",children:[!p.dir_exists&&v.jsx(vn,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Directory missing"}),(u.get(p.id)??0)>0&&v.jsxs(vn,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:[v.jsx("span",{className:"mr-1 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),u.get(p.id)," running"]})]})]})]})},p.id))})]}),s.length>0&&v.jsxs("section",{className:"space-y-3",children:[v.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Running Sessions (",s.length,")"]}),v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsx(UE,{sessions:s,projectNames:f})})})]}),v.jsxs("section",{className:"space-y-3",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Sessions"}),c.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsx(UE,{sessions:c,projectNames:f})})})]})]})}function TB(){return $n({queryKey:Ye.config.global,queryFn:()=>Ue.get("/config/global")})}function pae(){const e=jt();return qt({mutationFn:t=>Ue.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.projects.all})}})}function vae(){const e=jt();return qt({mutationFn:t=>Ue.delete(`/projects/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.projects.all})}})}function gae(){const e=jt();return qt({mutationFn:({projectId:t,files:n})=>Ue.upload(`/projects/${t}/files`,n),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.projects.files(n.projectId)})}})}function yae(){const e=jt();return qt({mutationFn:({projectId:t,filePath:n})=>Ue.delete(`/projects/${t}/files/${n}`),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.projects.files(n.projectId)})}})}function bae(){const e=jt();return qt({mutationFn:t=>Ue.put("/config/global",t),onSuccess:(t,n)=>{e.setQueryData(Ye.config.global,r=>({...r??{},values:n})),e.invalidateQueries({queryKey:Ye.config.global})}})}function PB(){const e=jt();return qt({mutationFn:({projectId:t,data:n})=>Ue.put(`/projects/${t}/config`,n),onSuccess:(t,n)=>{e.setQueryData(Ye.projects.config(n.projectId),r=>({...r??{},project:n.data})),e.invalidateQueries({queryKey:Ye.projects.config(n.projectId)})}})}function Et({className:e,type:t,...n}){return v.jsx("input",{type:t,"data-slot":"input",className:Oe("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function Am({className:e,children:t,...n}){return v.jsxs(rJ,{"data-slot":"scroll-area",className:Oe("relative",e),...n,children:[v.jsx(aJ,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),v.jsx(xae,{}),v.jsx(iJ,{})]})}function xae({className:e,orientation:t="vertical",...n}){return v.jsx(I5,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Oe("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:v.jsx(B5,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function wae({initialPath:e,onSelect:t,onCancel:n}){const[r,a]=b.useState(null),[i,s]=b.useState(!0),[c,f]=b.useState(null),[u,m]=b.useState(null),h=y=>{s(!0),f(null);const w=y?`?path=${encodeURIComponent(y)}`:"";Ue.get(`/fs/browse${w}`).then(a).catch(x=>f(x.message??"Failed to browse")).finally(()=>s(!1))},p=async()=>{if(!(!r||!(u!=null&&u.trim())))try{const y=await Ue.post("/fs/mkdir",{path:r.path,name:u.trim()});m(null),h(y.path)}catch(y){f(y instanceof Error?y.message:"Failed to create folder")}};return b.useEffect(()=>{h(e||void 0)},[]),v.jsx($c,{open:!0,onOpenChange:y=>!y&&n(),children:v.jsxs(Bc,{className:"sm:max-w-[480px]",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:"Select Directory"})}),r&&v.jsx("div",{className:"break-all rounded-md bg-muted px-3 py-1.5 font-mono text-xs",children:r.path}),c&&v.jsx("p",{className:"text-sm text-destructive",children:c}),i&&!r?v.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"Loading..."}):v.jsx(Am,{className:"h-[300px]",children:v.jsxs("div",{className:"space-y-0.5",children:[(r==null?void 0:r.parent)&&v.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-primary hover:bg-accent",onClick:()=>h(r.parent),children:[v.jsx(Hte,{className:"h-4 w-4"}),".."]}),r==null?void 0:r.entries.map(y=>v.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-primary hover:bg-accent",onClick:()=>h(y.path),children:[v.jsx(qte,{className:"h-4 w-4"}),y.name]},y.path)),(r==null?void 0:r.entries.length)===0&&v.jsx("p",{className:"px-3 py-4 text-sm italic text-muted-foreground",children:"No subdirectories"})]})}),v.jsx(CB,{children:u!==null?v.jsxs("div",{className:"flex w-full gap-2",children:[v.jsx(Et,{value:u,onChange:y=>m(y.target.value),onKeyDown:y=>{y.key==="Enter"&&p(),y.key==="Escape"&&m(null)},placeholder:"Folder name",autoFocus:!0,className:"flex-1"}),v.jsx(je,{size:"sm",onClick:p,children:"Create"}),v.jsx(je,{size:"sm",variant:"outline",onClick:()=>m(null),children:"Cancel"})]}):v.jsxs(v.Fragment,{children:[v.jsx(je,{variant:"outline",onClick:()=>m(""),disabled:!r,children:"New Folder"}),v.jsx("div",{className:"flex-1"}),v.jsx(je,{onClick:()=>r&&t(r.path),disabled:!r,children:"Select"}),v.jsx(je,{variant:"outline",onClick:n,children:"Cancel"})]})})]})})}function Pt({className:e,...t}){return v.jsx(KZ,{"data-slot":"label",className:Oe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Ao({...e}){return v.jsx(NJ,{"data-slot":"select",...e})}function No({...e}){return v.jsx(PJ,{"data-slot":"select-value",...e})}function To({className:e,size:t="default",children:n,...r}){return v.jsxs(TJ,{"data-slot":"select-trigger","data-size":t,className:Oe("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,v.jsx(MJ,{asChild:!0,children:v.jsx(zh,{className:"size-4 opacity-50"})})]})}function Po({className:e,children:t,position:n="item-aligned",align:r="center",...a}){return v.jsx(RJ,{children:v.jsxs(kJ,{"data-slot":"select-content",className:Oe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...a,children:[v.jsx(Sae,{}),v.jsx(DJ,{className:Oe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),v.jsx(Eae,{})]})})}function ur({className:e,children:t,...n}){return v.jsxs(IJ,{"data-slot":"select-item",className:Oe("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(zJ,{children:v.jsx(sC,{className:"size-4"})})}),v.jsx(LJ,{children:t})]})}function Sae({className:e,...t}){return v.jsx($J,{"data-slot":"select-scroll-up-button",className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(Cte,{className:"size-4"})})}function Eae({className:e,...t}){return v.jsx(BJ,{"data-slot":"select-scroll-down-button",className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(zh,{className:"size-4"})})}function _ae(){const{data:e,isLoading:t,error:n}=Wf(),[r,a]=b.useState(!1);if(t)return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-32"}),v.jsx(tn,{className:"h-64 rounded-lg"})]});if(n)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",n.message]})]});const i=e??[];return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Projects"}),v.jsxs(je,{onClick:()=>a(!0),children:[v.jsx(LE,{className:"mr-2 h-4 w-4"}),"Add Project"]})]}),r&&v.jsx(jae,{onDone:()=>a(!1),onCancel:()=>a(!1)}),i.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered yet."}):v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Name"}),v.jsx(Xe,{children:"Directory"}),v.jsx(Xe,{children:"Created"}),v.jsx(Xe,{children:"Status"}),v.jsx(Xe,{className:"w-[80px]"})]})}),v.jsx(Kc,{children:i.map(s=>v.jsxs(Ir,{children:[v.jsx(We,{children:v.jsx(Ya,{to:`/projects/${s.id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:s.display_name})}),v.jsx(We,{className:"max-w-[300px] truncate text-sm text-muted-foreground",children:s.working_dir}),v.jsx(We,{className:"text-sm text-muted-foreground",children:Oae(s.created_at)}),v.jsx(We,{children:s.dir_exists?v.jsx(vn,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:"OK"}):v.jsx(vn,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Missing"})}),v.jsx(We,{children:v.jsx(Cae,{projectId:s.id})})]},s.id))})]})})})]})}function jae({onDone:e,onCancel:t}){var k,D,K;const[n,r]=b.useState(""),[a,i]=b.useState(""),[s,c]=b.useState(""),[f,u]=b.useState(""),[m,h]=b.useState(!1),[p,y]=b.useState(!1),w=pae(),x=PB(),E=(k=TB().data)==null?void 0:k.defaults,O=(E==null?void 0:E.isolation)??"none",C=((D=E==null?void 0:E.session)==null?void 0:D.merge_strategy)??"auto",A=s||O,N=async()=>{const L=await w.mutateAsync({display_name:n.trim(),working_dir:a.trim()}),I={},W=f||C;I.isolation=A,I.session={merge_strategy:W},await x.mutateAsync({projectId:L.id,data:I}),e()},T=async L=>{L.preventDefault();try{if(A==="worktree"&&a.trim()&&!(await Ue.get(`/fs/git-check?path=${encodeURIComponent(a.trim())}`)).is_git){y(!0);return}await N()}catch{}},P=async()=>{try{await Ue.post("/fs/git-init",{path:a.trim()}),y(!1),await N()}catch{}};return v.jsx(dn,{children:v.jsx(hn,{className:"pt-6",children:v.jsxs("form",{onSubmit:T,className:"space-y-4",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"display-name",children:"Display Name"}),v.jsx(Et,{id:"display-name",value:n,onChange:L=>r(L.target.value),required:!0,autoFocus:!0})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"working-dir",children:"Working Directory"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Et,{id:"working-dir",value:a,onChange:L=>i(L.target.value),placeholder:"/path/to/project",required:!0}),v.jsx(je,{type:"button",variant:"outline",size:"sm",onClick:()=>h(!m),children:"Browse"})]})]})]}),m&&v.jsx(wae,{initialPath:a||void 0,onSelect:L=>{i(L),h(!1)},onCancel:()=>h(!1)}),v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"isolation",children:"Isolation"}),v.jsxs(Ao,{value:s||O,onValueChange:c,children:[v.jsx(To,{id:"isolation",children:v.jsx(No,{})}),v.jsxs(Po,{children:[v.jsx(ur,{value:"none",children:"none"}),v.jsx(ur,{value:"worktree",children:"worktree"})]})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"merge-strategy",children:"Merge Strategy"}),v.jsxs(Ao,{value:f||C,onValueChange:u,children:[v.jsx(To,{id:"merge-strategy",children:v.jsx(No,{})}),v.jsxs(Po,{children:[v.jsx(ur,{value:"auto",children:"auto"}),v.jsx(ur,{value:"local",children:"local"}),v.jsx(ur,{value:"pr",children:"pr"})]})]})]})]}),p&&v.jsxs("div",{className:"rounded-md border border-orange-200 bg-orange-50 p-3 dark:border-orange-800 dark:bg-orange-950",children:[v.jsxs("p",{className:"text-sm",children:["The selected directory is not a git repository. Worktree isolation requires git. Initialize a git repository with ",v.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"git init"}),"?"]}),v.jsxs("div",{className:"mt-2 flex gap-2",children:[v.jsx(je,{type:"button",size:"sm",onClick:P,children:"Yes, initialize"}),v.jsx(je,{type:"button",size:"sm",variant:"outline",onClick:()=>y(!1),children:"Cancel"})]})]}),(w.error||x.error)&&v.jsx("p",{className:"text-sm text-destructive",children:(K=w.error||x.error)==null?void 0:K.message}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(je,{type:"submit",disabled:w.isPending||x.isPending,children:w.isPending||x.isPending?"Adding...":"Add"}),v.jsx(je,{type:"button",variant:"outline",onClick:t,children:"Cancel"})]})]})})})}function Cae({projectId:e}){const[t,n]=b.useState(!1),r=vae(),a=async()=>{try{await r.mutateAsync(e)}catch{}};return t?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(je,{size:"sm",variant:"destructive",onClick:a,disabled:r.isPending,children:"Confirm"}),v.jsx(je,{size:"sm",variant:"outline",onClick:()=>n(!1),children:"No"})]}):v.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>n(!0),children:v.jsx(Xf,{className:"h-4 w-4"})})}function Oae(e){try{return new Date(e).toLocaleDateString()}catch{return e}}function MB(e){return $n({queryKey:Ye.projects.resources(e),queryFn:()=>Ue.get(`/projects/${e}/resources`)})}function Aae(e,t,n,r){return $n({queryKey:Ye.projects.resourceDetail(e,t,n),queryFn:()=>Ue.get(`/projects/${e}/resources/${t}/${n}`),enabled:(r==null?void 0:r.enabled)??!!n})}function Nae(e,t,n,r){return $n({queryKey:Ye.projects.resourceConfig(e,t,n),queryFn:()=>Ue.get(`/projects/${e}/resources/${t}/${n}/config`),enabled:(r==null?void 0:r.enabled)??!!n})}function Tae(e,t){if(t<=7)return Array.from({length:t},(i,s)=>s+1);const n=[1];e>3&&n.push("...");const r=Math.max(2,e-1),a=Math.min(t-1,e+1);for(let i=r;i<=a;i++)n.push(i);return e<t-2&&n.push("..."),n.push(t),n}function Pae({page:e,totalPages:t,onPageChange:n}){if(t<=1)return null;const r=Tae(e,t);return v.jsxs("div",{className:"flex items-center justify-center gap-1 pt-2",children:[v.jsx(je,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e<=1,onClick:()=>n(e-1),children:v.jsx(Ete,{className:"h-4 w-4"})}),r.map((a,i)=>a==="..."?v.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:"..."},`ellipsis-${i}`):v.jsx(je,{variant:a===e?"default":"outline",size:"icon",className:"h-8 w-8 text-xs",onClick:()=>n(a),children:a},a)),v.jsx(je,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e>=t,onClick:()=>n(e+1),children:v.jsx(p0,{className:"h-4 w-4"})})]})}function RB(){return $n({queryKey:Ye.roles.all,queryFn:()=>Ue.get("/roles")})}function Mae(e){return $n({queryKey:Ye.registry.validate(e??""),queryFn:()=>Ue.get(`/registry/agents/${e}/validate`),enabled:!!e})}function cc(e,t){return $n({queryKey:Ye.registry.list(e),queryFn:()=>Ue.get(`/registry/${e}`),enabled:t==null?void 0:t.enabled})}function Rae(e,t,n){return $n({queryKey:Ye.registry.detail(e,t),queryFn:()=>Ue.get(`/registry/${e}/${t}`),enabled:(n==null?void 0:n.enabled)??!!t})}function kB(e,t,n){return $n({queryKey:Ye.registry.config(e,t),queryFn:()=>Ue.get(`/registry/${e}/${t}/config`),enabled:(n==null?void 0:n.enabled)??!!t})}function Ug({className:e,...t}){return v.jsx("textarea",{"data-slot":"textarea",className:Oe("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function dC({...e}){return v.jsx(UG,{"data-slot":"collapsible",...e})}function hC({...e}){return v.jsx(Gz,{"data-slot":"collapsible-trigger",...e})}function mC({...e}){return v.jsx(Xz,{"data-slot":"collapsible-content",...e})}function kae({projectId:e,open:t,onOpenChange:n}){var Ke,Gt,ht,Qn,Sr,Lt;const r=qf(),a=vB(e),i=RB(),{data:s}=cc("agents"),{data:c}=cc("memories"),f=pB(e),u=aae(),m=(Ke=a.data)==null?void 0:Ke.merged,h="__empty__",[p,y]=b.useState(""),[w,x]=b.useState(""),[S,E]=b.useState(""),[O,C]=b.useState(""),[A,N]=b.useState(""),[T,P]=b.useState(""),[k,D]=b.useState(""),[K,L]=b.useState(""),[I,W]=b.useState(""),[$,V]=b.useState(!1),[R,H]=b.useState([]),[q,F]=b.useState(""),Y=()=>{y(""),x(""),E(""),C(""),N(""),P(""),D(""),L(""),W(""),V(!1),H([])},B=we=>{H(lt=>lt.includes(we)?lt.filter(xn=>xn!==we):[...lt,we])},z=async we=>{we.preventDefault();try{const lt={project_id:e,task:p.trim()};w.trim()&&(lt.role=w.trim());const xn={};S.trim()&&(xn.runtime=S.trim()),O.trim()&&(xn.memory=O.trim()),A&&(xn.cache_delegations=A==="true"),T.trim()&&(xn.cache_max_entries=Number(T.trim())),k.trim()&&(xn.cache_ttl_seconds=Number(k.trim())),K.trim()&&(xn.max_num_delegations=Number(K.trim())),Object.keys(xn).length>0&&(lt.overrides=xn),R.length>0&&(lt.context_files=R),I.trim()&&(lt.system_prompt=I.trim()),$&&(lt.interactive=!0);const Zn=await u.mutateAsync(lt);Y(),n(!1),r(`/projects/${e}/sessions/${Zn.run_id}`)}catch{}},X=(m==null?void 0:m.orchestrator_role)??"orchestrator",Z=(i.data??[]).filter(we=>we!==X),ee=[X,...Z],se=(s??[]).map(we=>we.name),ae=new Set((c??[]).map(we=>we.name));ae.add("none");const re=[...ae].sort(),J=w.trim()||X,le=kB("roles",J,{enabled:!!J}),me=((ht=(Gt=le.data)==null?void 0:Gt.params_values)==null?void 0:ht.default_agent)??((Lt=(Sr=(Qn=le.data)==null?void 0:Qn.params_schema)==null?void 0:Sr.default_agent)==null?void 0:Lt.default)??"",ne=me&&se.includes(me)?me:(m==null?void 0:m.runtime)??"strawpot-claude-code",ge=w.trim()&&!ee.includes(w.trim())?"Role not found in installed roles":"",ye=S.trim()&&se.length>0&&!se.includes(S.trim())?"Runtime not found in installed agents":"",Ie=O.trim()&&!re.includes(O.trim())?"Memory not found in installed providers":"",Me=!!ge||!!ye||!!Ie;return v.jsx($c,{open:t,onOpenChange:n,children:v.jsxs(Bc,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:"Launch Session"})}),v.jsxs("form",{onSubmit:z,className:"space-y-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsxs(Pt,{htmlFor:"task",children:["Task ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsx(Ug,{id:"task",value:p,onChange:we=>y(we.target.value),placeholder:"Describe what the agent should do...",required:!0,autoFocus:!0,rows:3})]}),(f.data??[]).length>0&&v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs(Lg,{children:[v.jsx(zg,{asChild:!0,children:v.jsxs(je,{type:"button",variant:"outline",size:"sm",children:[v.jsx(sne,{className:"mr-1 h-3.5 w-3.5"}),"@ Attach Files"]})}),v.jsxs($g,{align:"start",className:"w-64",onCloseAutoFocus:we=>we.preventDefault(),children:[v.jsx("div",{className:"px-2 py-1.5",children:v.jsx(Et,{placeholder:"Filter files...",value:q,onChange:we=>F(we.target.value),className:"h-7 text-xs",onKeyDown:we=>we.stopPropagation()})}),v.jsx("div",{className:"max-h-48 overflow-y-auto",children:(f.data??[]).filter(we=>we.path.toLowerCase().includes(q.toLowerCase())).map(we=>v.jsx(Jre,{checked:R.includes(we.path),onCheckedChange:()=>B(we.path),onSelect:lt=>lt.preventDefault(),children:v.jsx("span",{className:"font-mono text-xs",children:we.path})},we.path))})]})]}),R.length>0&&v.jsxs("span",{className:"text-xs text-muted-foreground",children:[R.length," file(s) attached"]})]}),R.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1",children:R.map(we=>v.jsxs(vn,{variant:"secondary",className:"gap-1 font-mono text-xs",children:["@",we,v.jsx("button",{type:"button",onClick:()=>B(we),className:"ml-0.5 rounded-sm hover:bg-muted",children:v.jsx(cC,{className:"h-3 w-3"})})]},we))})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"role",children:"Role"}),v.jsx(Et,{id:"role",list:"datalist-role",value:w,onChange:we=>x(we.target.value),placeholder:X}),v.jsxs("datalist",{id:"datalist-role",children:[v.jsx("option",{value:X}),Z.map(we=>v.jsx("option",{value:we},we))]}),ge&&v.jsx("p",{className:"text-xs text-destructive",children:ge})]}),v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[v.jsx("input",{type:"checkbox",checked:$,onChange:we=>V(we.target.checked),className:"rounded border-input"}),v.jsx("span",{className:"text-sm",children:"Interactive mode"}),v.jsx("span",{className:"text-xs text-muted-foreground",children:"Allow the agent to ask you questions via a chat panel"})]}),v.jsxs(dC,{children:[v.jsx(hC,{asChild:!0,children:v.jsxs(je,{type:"button",variant:"ghost",size:"sm",children:[v.jsx(zh,{className:"mr-1 h-4 w-4"}),"Advanced Options"]})}),v.jsxs(mC,{className:"mt-3 space-y-4",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"runtime",children:"Runtime"}),v.jsx(Et,{id:"runtime",list:"datalist-runtime",value:S,onChange:we=>E(we.target.value),placeholder:ne}),s&&v.jsx("datalist",{id:"datalist-runtime",children:s.map(we=>v.jsx("option",{value:we.name},we.name))}),ye&&v.jsx("p",{className:"text-xs text-destructive",children:ye})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"memory",children:"Memory"}),v.jsx(Et,{id:"memory",list:"datalist-memory",value:O,onChange:we=>C(we.target.value),placeholder:(m==null?void 0:m.memory)||"dial"}),v.jsx("datalist",{id:"datalist-memory",children:re.map(we=>v.jsx("option",{value:we},we))}),Ie&&v.jsx("p",{className:"text-xs text-destructive",children:Ie})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"system-prompt",children:"System Prompt"}),v.jsx(Ug,{id:"system-prompt",value:I,onChange:we=>W(we.target.value),placeholder:"Additional instructions for the agent...",rows:3})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{children:"Max Delegations"}),v.jsx(Et,{type:"number",min:"0",value:K,onChange:we=>L(we.target.value),placeholder:m!=null&&m.max_num_delegations?String(m.max_num_delegations):"0 (unlimited)",className:"h-8 text-xs"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{children:"Cache Delegations"}),v.jsxs(Ao,{value:A||h,onValueChange:we=>N(we===h?"":we),children:[v.jsx(To,{className:"h-8 text-xs",children:v.jsx(No,{placeholder:(m==null?void 0:m.cache_delegations)!==!1?"true":"false"})}),v.jsxs(Po,{children:[v.jsxs(ur,{value:h,className:"text-muted-foreground",children:["Default (",(m==null?void 0:m.cache_delegations)!==!1?"true":"false",")"]}),v.jsx(ur,{value:"true",children:"true"}),v.jsx(ur,{value:"false",children:"false"})]})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{children:"Cache Max Entries"}),v.jsx(Et,{type:"number",min:"0",value:T,onChange:we=>P(we.target.value),placeholder:m!=null&&m.cache_max_entries?String(m.cache_max_entries):"0 (unlimited)",className:"h-8 text-xs"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{children:"Cache TTL (seconds)"}),v.jsx(Et,{type:"number",min:"0",value:k,onChange:we=>D(we.target.value),placeholder:m!=null&&m.cache_ttl_seconds?String(m.cache_ttl_seconds):"0 (unlimited)",className:"h-8 text-xs"})]})]})]})]}),u.error&&v.jsx("p",{className:"text-sm text-destructive",children:u.error.message}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(je,{type:"submit",disabled:u.isPending||Me,children:u.isPending?"Launching...":"Launch"}),v.jsx(je,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"})]})]})]})})}function Dae(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Iae({projectId:e}){const t=pB(e),n=gae(),r=yae(),a=b.useRef(null),[i,s]=b.useState(!1),c=b.useCallback(x=>{const S=Array.from(x);S.length!==0&&n.mutate({projectId:e,files:S},{onSuccess:()=>pt.success(`Uploaded ${S.length} file(s)`),onError:()=>pt.error("Upload failed")})},[e,n]),f=b.useCallback(x=>{x.preventDefault(),s(!1),c(x.dataTransfer.files)},[c]),u=b.useCallback(x=>{x.preventDefault(),s(!0)},[]),m=b.useCallback(x=>{x.preventDefault(),s(!1)},[]),h=b.useCallback(()=>{var x;(x=a.current)==null||x.click()},[]),p=b.useCallback(x=>{x.target.files&&(c(x.target.files),x.target.value="")},[c]),y=b.useCallback(x=>{r.mutate({projectId:e,filePath:x},{onSuccess:()=>pt.success("File deleted"),onError:()=>pt.error("Failed to delete file")})},[e,r]),w=t.data??[];return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{onDrop:f,onDragOver:u,onDragLeave:m,className:`flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-8 transition-colors ${i?"border-primary bg-primary/5":"border-muted-foreground/25"}`,children:[v.jsx(One,{className:"h-8 w-8 text-muted-foreground"}),v.jsxs("p",{className:"text-sm text-muted-foreground",children:["Drag & drop files here, or"," ",v.jsx("button",{type:"button",onClick:h,className:"font-medium text-primary underline-offset-4 hover:underline",children:"browse"})]}),n.isPending&&v.jsx("p",{className:"text-xs text-muted-foreground",children:"Uploading..."}),v.jsx("input",{ref:a,type:"file",multiple:!0,className:"hidden",onChange:p})]}),w.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No files uploaded yet."}):v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Name"}),v.jsx(Xe,{className:"w-24",children:"Size"}),v.jsx(Xe,{className:"w-44",children:"Modified"}),v.jsx(Xe,{className:"w-12"})]})}),v.jsx(Kc,{children:w.map(x=>v.jsxs(Ir,{children:[v.jsx(We,{className:"font-mono text-xs",children:x.path}),v.jsx(We,{className:"text-xs text-muted-foreground",children:Dae(x.size)}),v.jsx(We,{className:"text-xs text-muted-foreground",children:new Date(x.modified_at).toLocaleString()}),v.jsx(We,{children:v.jsx(je,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>y(x.path),disabled:r.isPending,children:v.jsx(Xf,{className:"h-3.5 w-3.5 text-muted-foreground"})})})]},x.path))})]})})})]})}function Lae(){const e=jt();return qt({mutationFn:t=>Ue.post("/registry/install",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function DB(){const e=jt();return qt({mutationFn:({type:t,name:n})=>Ue.delete(`/registry/${t}/${n}`),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function zae(){const e=jt();return qt({mutationFn:t=>Ue.post("/registry/update",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function $ae(){const e=jt();return qt({mutationFn:t=>Ue.post("/registry/reinstall",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Bae(){const e=jt();return qt({mutationFn:({type:t,name:n,env_values:r,params_values:a})=>Ue.put(`/registry/${t}/${n}/config`,{env_values:r,params_values:a}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.registry.config(n.type,n.name)})}})}function Uae(e){const t=jt();return qt({mutationFn:n=>Ue.post(`/projects/${e}/resources/install`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function IB(e){const t=jt();return qt({mutationFn:({type:n,name:r})=>Ue.delete(`/projects/${e}/resources/${n}/${r}`),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function Hae(e){const t=jt();return qt({mutationFn:n=>Ue.post(`/projects/${e}/resources/update`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function Fae(e){const t=jt();return qt({mutationFn:n=>Ue.post(`/projects/${e}/resources/reinstall`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function qae(e){const t=jt();return qt({mutationFn:({type:n,name:r,env_values:a,params_values:i})=>Ue.put(`/projects/${e}/resources/${n}/${r}/config`,{env_values:a,params_values:i}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:Ye.projects.resourceConfig(e,r.type,r.name)})}})}function Kae({...e}){return v.jsx(Aj,{"data-slot":"sheet",...e})}function Vae({...e}){return v.jsx(Nj,{"data-slot":"sheet-portal",...e})}function Yae({className:e,...t}){return v.jsx(Tj,{"data-slot":"sheet-overlay",className:Oe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Gae({className:e,children:t,side:n="right",showCloseButton:r=!0,...a}){return v.jsxs(Vae,{children:[v.jsx(Yae,{}),v.jsxs(Pj,{"data-slot":"sheet-content",className:Oe("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",n==="right"&&"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",n==="left"&&"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",n==="top"&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",n==="bottom"&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...a,children:[t,r&&v.jsxs(Mj,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",children:[v.jsx(cC,{className:"size-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Xae({className:e,...t}){return v.jsx("div",{"data-slot":"sheet-header",className:Oe("flex flex-col gap-1.5 p-4",e),...t})}function Wae({className:e,...t}){return v.jsx(S4,{"data-slot":"sheet-title",className:Oe("font-semibold text-foreground",e),...t})}function Qae({className:e,...t}){return v.jsx(E4,{"data-slot":"sheet-description",className:Oe("text-sm text-muted-foreground",e),...t})}const Zae=y0("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function ug({className:e,variant:t,...n}){return v.jsx("div",{"data-slot":"alert",role:"alert",className:Oe(Zae({variant:t}),e),...n})}function fg({className:e,...t}){return v.jsx("div",{"data-slot":"alert-title",className:Oe("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function dg({className:e,...t}){return v.jsx("div",{"data-slot":"alert-description",className:Oe("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Jae({agentName:e}){const{data:t}=Mae(e);return!t||!(!t.tools_ok||t.setup_command||!t.env_ok)?null:v.jsxs("div",{className:"mb-4 space-y-3",children:[!t.tools_ok&&v.jsxs(ug,{variant:"destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsx(fg,{children:"Missing Prerequisites"}),v.jsx(dg,{children:t.missing_tools.map(r=>v.jsxs("div",{className:"mt-1",children:[v.jsx("strong",{children:r.name})," not found on PATH.",r.install_hint&&v.jsx("code",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-xs",children:r.install_hint})]},r.name))})]}),t.setup_command&&v.jsxs(ug,{children:[v.jsx(Sne,{className:"h-4 w-4"}),v.jsx(fg,{children:"Setup"}),v.jsxs(dg,{children:[v.jsx("p",{children:t.setup_description||"Run initial authentication in your terminal:"}),v.jsx("code",{className:"mt-1 block rounded bg-muted px-2 py-1 text-xs",children:t.setup_command}),v.jsx("p",{className:"mt-2 text-muted-foreground",children:"Or set the API key in the config below instead."})]})]}),!t.env_ok&&!t.setup_command&&t.missing_env.length>0&&v.jsxs(ug,{children:[v.jsx(Wte,{className:"h-4 w-4"}),v.jsx(fg,{children:"API Key Required"}),v.jsx(dg,{children:v.jsxs("p",{children:["Set"," ",t.missing_env.map((r,a)=>v.jsxs("span",{children:[a>0&&", ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:r})]},r))," ","in the config below to authenticate."]})})]})]})}function eie({resourceType:e,resourceName:t,enabled:n,projectId:r}){const a=kB(e,t,{enabled:n&&!r}),i=Nae(r??0,e,t,{enabled:n&&!!r}),{data:s,isLoading:c}=r?i:a,f=Bae(),u=qae(r??0),m=r?u:f,{data:h}=cc("agents",{enabled:n&&e==="roles"}),[p,y]=b.useState({}),[w,x]=b.useState({}),[S,E]=b.useState(new Set);if(b.useEffect(()=>{s&&(y({...s.env_values}),x({...s.params_values}))},[s]),c||!s)return null;const O=Object.keys(s.env_schema),C=Object.keys(s.params_schema);if(O.length===0&&C.length===0)return null;const A=D=>E(K=>{const L=new Set(K);return L.has(D)?L.delete(D):L.add(D),L}),N=(h??[]).map(D=>D.name),T=String(w.default_agent??"").trim(),P=e==="roles"&&T&&N.length>0&&!N.includes(T)?"Agent not found in installed agents":"",k=()=>{m.mutate({type:e,name:t,env_values:O.length>0?p:void 0,params_values:C.length>0?w:void 0},{onSuccess:()=>pt.success("Configuration saved"),onError:()=>pt.error("Failed to save configuration")})};return v.jsxs("div",{className:"flex flex-col gap-4",children:[O.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Ds,{}),v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx("h4",{className:"text-sm font-semibold",children:"Environment Variables"}),O.map(D=>{const K=s.env_schema[D],L=S.has(D);return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Pt,{className:"text-xs font-mono",children:D}),K.required&&v.jsx(vn,{variant:"outline",className:"h-4 px-1 text-[10px] text-red-500 border-red-200",children:"required"})]}),K.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Et,{type:L?"text":"password",value:p[D]??"",onChange:I=>y(W=>({...W,[D]:I.target.value})),placeholder:D,className:"h-8 text-xs font-mono"}),v.jsx(je,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 shrink-0 p-0",onClick:()=>A(D),children:L?v.jsx(Lte,{className:"h-3.5 w-3.5"}):v.jsx($te,{className:"h-3.5 w-3.5"})})]})]},D)})]})]}),C.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Ds,{}),v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx("h4",{className:"text-sm font-semibold",children:"Parameters"}),C.map(D=>{const K=s.params_schema[D],L=w[D],I=K.default;if(K.type==="boolean")return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(Pt,{className:"text-xs font-mono",children:D}),K.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),v.jsxs(Ao,{value:L!=null?String(L):I!=null?String(I):"",onValueChange:H=>x(q=>({...q,[D]:H==="true"})),children:[v.jsx(To,{className:"h-8 text-xs",children:v.jsx(No,{})}),v.jsxs(Po,{children:[v.jsx(ur,{value:"true",children:"true"}),v.jsx(ur,{value:"false",children:"false"})]})]})]},D);const W=K.type==="int"||K.type==="float"?"number":"text",$=K.type==="float"?"any":void 0,V=D==="default_agent"&&h?h.map(H=>H.name):void 0,R=V?`datalist-${D}`:void 0;return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(Pt,{className:"text-xs font-mono",children:D}),K.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),v.jsx(Et,{type:W,step:$,list:R,value:L!=null?String(L):"",onChange:H=>x(q=>({...q,[D]:W==="number"&&H.target.value!==""?Number(H.target.value):H.target.value})),placeholder:I!=null?String(I):void 0,className:"h-8 text-xs font-mono"}),V&&v.jsx("datalist",{id:R,children:V.map(H=>v.jsx("option",{value:H},H))}),D==="default_agent"&&P&&v.jsx("p",{className:"text-xs text-destructive",children:P})]},D)})]})]}),v.jsxs(je,{size:"sm",onClick:k,disabled:m.isPending||!!P,className:"self-start",children:[v.jsx(sB,{className:"mr-2 h-3.5 w-3.5"}),m.isPending?"Saving...":"Save Configuration"]})]})}function LB({resource:e,resourceType:t,open:n,onOpenChange:r,projectId:a}){var P,k;const i=DB(),s=zae(),c=$ae(),f=IB(a??0),u=Hae(a??0),m=Fae(a??0),h=a?f:i,p=a?u:s,y=a?m:c,[w,x]=b.useState(!1),S=p.isPending||y.isPending||h.isPending;if(!e)return null;const E=()=>{if(!w){x(!0);return}h.mutate({type:t,name:e.name},{onSuccess:D=>{D.exit_code===0?(pt.success(`Uninstalled ${e.name}`),r(!1)):pt.error(`Uninstall failed: ${D.stderr||D.stdout}`),x(!1)},onError:()=>{pt.error("Uninstall request failed"),x(!1)}})},O=()=>{p.mutate({type:t,name:e.name},{onSuccess:D=>{D.exit_code===0?pt.success(`Updated ${e.name}`):pt.error(`Update failed: ${D.stderr||D.stdout}`)},onError:()=>pt.error("Update request failed")})},C=()=>{y.mutate({type:t,name:e.name},{onSuccess:D=>{D.exit_code===0?pt.success(`Reinstalled ${e.name}`):pt.error(`Reinstall failed: ${D.stderr||D.stdout}`)},onError:()=>pt.error("Reinstall request failed")})},N=!a&&((P={skills:["denden"],roles:["ai-ceo","ai-employee"],agents:["strawpot-claude-code"],memories:["dial"]}[t])==null?void 0:P.includes(e.name)),T=(k=e.frontmatter)==null?void 0:k.metadata;return v.jsx(Kae,{open:n,onOpenChange:D=>{r(D),x(!1)},children:v.jsxs(Gae,{side:"right",className:"flex h-full flex-col sm:max-w-lg",children:[v.jsxs(Xae,{className:"shrink-0",children:[v.jsxs(Wae,{className:"flex items-center gap-2",children:[e.name,e.version&&v.jsxs(vn,{variant:"outline",className:"text-xs font-normal",children:["v",e.version]})]}),v.jsx(Qae,{children:e.description||"No description"})]}),v.jsxs("div",{className:"shrink-0 flex flex-col gap-4 px-4",children:[v.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[v.jsxs("span",{children:["Source: ",v.jsx("strong",{children:e.source})]}),v.jsxs("span",{children:["Path: ",v.jsx("code",{className:"rounded bg-muted px-1",children:e.path})]})]}),T&&Object.keys(T).length>0&&v.jsxs("details",{className:"text-sm",children:[v.jsx("summary",{className:"cursor-pointer font-medium text-muted-foreground",children:"Metadata"}),v.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:JSON.stringify(T,null,2)})]})]}),v.jsxs(Am,{className:"min-h-0 flex-1 px-4",children:[t==="agents"&&v.jsx(Jae,{agentName:e.name}),v.jsx(eie,{resourceType:t,resourceName:e.name,enabled:n,projectId:a}),v.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap mt-4",children:e.body||"No content."})]}),v.jsxs("div",{className:"shrink-0 border-t border-border p-4 flex gap-2",children:[v.jsx(je,{size:"sm",onClick:O,disabled:S,children:p.isPending?"Updating...":"Update"}),v.jsx(je,{variant:"outline",size:"sm",onClick:C,disabled:S,children:y.isPending?"Reinstalling...":"Reinstall"}),v.jsx("div",{className:"flex-1"}),!N&&v.jsxs(v.Fragment,{children:[v.jsx(je,{variant:w?"destructive":"outline",size:"sm",onClick:E,disabled:S,children:h.isPending?"Uninstalling...":w?"Confirm Uninstall":"Uninstall"}),w&&!h.isPending&&v.jsx(je,{variant:"ghost",size:"sm",onClick:()=>x(!1),children:"Cancel"})]})]})]})})}const tie=[{value:"roles",label:"Role"},{value:"skills",label:"Skill"},{value:"agents",label:"Agent"},{value:"memories",label:"Memory"}];function pC({open:e,onOpenChange:t,defaultType:n,projectId:r}){const[a,i]=b.useState(n??"roles"),[s,c]=b.useState(""),[f,u]=b.useState(null),[m,h]=b.useState(null);b.useEffect(()=>{e&&n&&i(n)},[e,n]);const p=Lae(),y=Uae(r??0),w=r?y:p,x=(f==null?void 0:f.status)==="success",S=()=>{s.trim()&&(u(null),h(null),w.mutate({type:a,name:s.trim()},{onSuccess:O=>{O.exit_code===0?(pt.success(`Installed ${s.trim()}`),u({status:"success",message:`Successfully installed ${s.trim()}`}),h(O.stdout||null)):(u({status:"error",message:"Installation failed"}),h(O.stderr||O.stdout||"Unknown error."))},onError:()=>{u({status:"error",message:"Install request failed"}),pt.error("Install request failed")}}))},E=O=>{O||(u(null),h(null),c("")),t(O)};return v.jsx($c,{open:e,onOpenChange:E,children:v.jsxs(Bc,{className:"sm:max-w-md",children:[v.jsxs(Uc,{children:[v.jsx(Hc,{children:r?"Install Resource to Project":"Install Resource"}),v.jsx(OB,{children:"Install a resource from StrawHub by name."})]}),v.jsxs("div",{className:"flex flex-col gap-4",children:[f&&v.jsxs(ug,{variant:f.status==="error"?"destructive":"default",className:f.status==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-950 dark:text-green-300":"",children:[f.status==="success"?v.jsx(rB,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):v.jsx(Mte,{className:"h-4 w-4"}),v.jsx(fg,{children:f.status==="success"?"Installed":"Error"}),v.jsx(dg,{children:f.message})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Pt,{htmlFor:"install-type",children:"Type"}),v.jsxs(Ao,{value:a,onValueChange:i,disabled:x,children:[v.jsx(To,{id:"install-type",children:v.jsx(No,{})}),v.jsx(Po,{children:tie.map(O=>v.jsx(ur,{value:O.value,children:O.label},O.value))})]})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Pt,{htmlFor:"install-name",children:"Package Name"}),v.jsx(Et,{id:"install-name",autoFocus:!0,value:s,onChange:O=>c(O.target.value),placeholder:"e.g. strawpot-claude-code",readOnly:x,onKeyDown:O=>{O.key==="Enter"&&S()}})]}),m&&v.jsxs("details",{className:"text-sm",children:[v.jsx("summary",{className:"cursor-pointer text-xs font-medium text-muted-foreground",children:"Output"}),v.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:m})]})]}),v.jsx(CB,{children:(f==null?void 0:f.status)==="success"?v.jsx(je,{onClick:()=>E(!1),children:"Done"}):v.jsx(je,{onClick:S,disabled:!s.trim()||w.isPending,children:w.isPending?"Installing...":"Install"})})]})})}const nie={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function rie({projectId:e,installOpen:t,onInstallOpenChange:n}){const{data:r,isLoading:a}=MB(e),[i,s]=b.useState(null),[c,f]=b.useState(""),[u,m]=b.useState(!1),[h,p]=b.useState(!1),y=t??h,w=n??p,{data:x}=Aae(e,c,i??"",{enabled:u&&!!i&&!!c});return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Resources installed to this project"}),v.jsxs(je,{onClick:()=>w(!0),size:"sm",children:[v.jsx(v0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),a?v.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((S,E)=>v.jsx(tn,{className:"h-12 w-full"},E))}):!r||r.length===0?v.jsx("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:"No project resources installed yet."}):v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Name"}),v.jsx(Xe,{children:"Type"}),v.jsx(Xe,{children:"Version"}),v.jsx(Xe,{children:"Description"}),v.jsx(Xe,{className:"w-24"})]})}),v.jsx(Kc,{children:r.map(S=>v.jsxs(Ir,{className:"cursor-pointer",onClick:()=>{s(S.name),f(S.type),m(!0)},children:[v.jsx(We,{className:"font-medium",children:S.name}),v.jsx(We,{children:v.jsx(vn,{variant:"outline",className:"text-xs",children:nie[S.type]??S.type})}),v.jsx(We,{className:"text-sm text-muted-foreground",children:S.version??"—"}),v.jsx(We,{className:"max-w-[300px] truncate text-sm",children:S.description||"—"}),v.jsx(We,{children:v.jsx(aie,{projectId:e,resourceType:S.type,name:S.name})})]},`${S.type}-${S.name}`))})]})})}),v.jsx(LB,{resource:x??null,resourceType:c,open:u,onOpenChange:m,projectId:e}),v.jsx(pC,{open:y,onOpenChange:w,projectId:e})]})}function aie({projectId:e,resourceType:t,name:n}){const[r,a]=b.useState(!1),i=IB(e),s=c=>{c.stopPropagation(),i.mutate({type:t,name:n},{onSuccess:f=>{f.exit_code===0?pt.success(`Uninstalled ${n}`):pt.error(`Uninstall failed: ${f.stderr||f.stdout}`),a(!1)},onError:()=>{pt.error("Uninstall request failed"),a(!1)}})};return r?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(je,{size:"sm",variant:"destructive",onClick:s,disabled:i.isPending,children:"Confirm"}),v.jsx(je,{size:"sm",variant:"outline",onClick:c=>{c.stopPropagation(),a(!1)},children:"No"})]}):v.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:c=>{c.stopPropagation(),a(!0)},children:v.jsx(Xf,{className:"h-4 w-4"})})}function iie(e,t="30d"){return $n({queryKey:Ye.projects.stats(e,t),queryFn:()=>Ue.get(`/projects/${e}/stats?period=${t}`)})}var oie=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function vC(e){if(typeof e!="string")return!1;var t=oie;return t.includes(e)}var sie=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],lie=new Set(sie);function zB(e){return typeof e!="string"?!1:lie.has(e)}function $B(e){return typeof e=="string"&&e.startsWith("data-")}function ta(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(zB(n)||$B(n))&&(t[n]=e[n]);return t}function Sc(e){if(e==null)return null;if(b.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return ta(t)}return typeof e=="object"&&!Array.isArray(e)?ta(e):null}function br(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(zB(n)||$B(n)||vC(n))&&(t[n]=e[n]);return t}function cie(e){return e==null?null:b.isValidElement(e)?br(e.props):typeof e=="object"&&!Array.isArray(e)?br(e):null}var uie=["children","width","height","viewBox","className","style","title","desc"];function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HE.apply(null,arguments)}function fie(e,t){if(e==null)return{};var n,r,a=die(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function die(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var gC=b.forwardRef((e,t)=>{var{children:n,width:r,height:a,viewBox:i,className:s,style:c,title:f,desc:u}=e,m=fie(e,uie),h=i||{width:r,height:a,x:0,y:0},p=st("recharts-surface",s);return b.createElement("svg",HE({},br(m),{className:p,width:r,height:a,style:c,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height),ref:t}),b.createElement("title",null,f),b.createElement("desc",null,u),n)}),hie=["children","className"];function FE(){return FE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FE.apply(null,arguments)}function mie(e,t){if(e==null)return{};var n,r,a=pie(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function pie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var On=b.forwardRef((e,t)=>{var{children:n,className:r}=e,a=mie(e,hie),i=st("recharts-layer",r);return b.createElement("g",FE({className:i},br(a),{ref:t}),n)}),BB=b.createContext(null),vie=()=>b.useContext(BB);function Tt(e){return function(){return e}}const UB=Math.cos,Hg=Math.sin,ti=Math.sqrt,Fg=Math.PI,x0=2*Fg,qE=Math.PI,KE=2*qE,Kl=1e-6,gie=KE-Kl;function HB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function yie(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return HB;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class bie{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?HB:yie(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,c=this._y1,f=r-t,u=a-n,m=s-t,h=c-n,p=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Kl)if(!(Math.abs(h*f-u*m)>Kl)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let y=r-s,w=a-c,x=f*f+u*u,S=y*y+w*w,E=Math.sqrt(x),O=Math.sqrt(p),C=i*Math.tan((qE-Math.acos((x+p-S)/(2*E*O)))/2),A=C/O,N=C/E;Math.abs(A-1)>Kl&&this._append`L${t+A*m},${n+A*h}`,this._append`A${i},${i},0,0,${+(h*y>m*w)},${this._x1=t+N*f},${this._y1=n+N*u}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(a),f=r*Math.sin(a),u=t+c,m=n+f,h=1^s,p=s?a-i:i-a;this._x1===null?this._append`M${u},${m}`:(Math.abs(this._x1-u)>Kl||Math.abs(this._y1-m)>Kl)&&this._append`L${u},${m}`,r&&(p<0&&(p=p%KE+KE),p>gie?this._append`A${r},${r},0,1,${h},${t-c},${n-f}A${r},${r},0,1,${h},${this._x1=u},${this._y1=m}`:p>Kl&&this._append`A${r},${r},0,${+(p>=qE)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function yC(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new bie(t)}function bC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function FB(e){this._context=e}FB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function w0(e){return new FB(e)}function qB(e){return e[0]}function KB(e){return e[1]}function VB(e,t){var n=Tt(!0),r=null,a=w0,i=null,s=yC(c);e=typeof e=="function"?e:e===void 0?qB:Tt(e),t=typeof t=="function"?t:t===void 0?KB:Tt(t);function c(f){var u,m=(f=bC(f)).length,h,p=!1,y;for(r==null&&(i=a(y=s())),u=0;u<=m;++u)!(u<m&&n(h=f[u],u,f))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(h,u,f),+t(h,u,f));if(y)return i=null,y+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Tt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Tt(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:Tt(!!f),c):n},c.curve=function(f){return arguments.length?(a=f,r!=null&&(i=a(r)),c):a},c.context=function(f){return arguments.length?(f==null?r=i=null:i=a(r=f),c):r},c}function kv(e,t,n){var r=null,a=Tt(!0),i=null,s=w0,c=null,f=yC(u);e=typeof e=="function"?e:e===void 0?qB:Tt(+e),t=typeof t=="function"?t:Tt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?KB:Tt(+n);function u(h){var p,y,w,x=(h=bC(h)).length,S,E=!1,O,C=new Array(x),A=new Array(x);for(i==null&&(c=s(O=f())),p=0;p<=x;++p){if(!(p<x&&a(S=h[p],p,h))===E)if(E=!E)y=p,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),w=p-1;w>=y;--w)c.point(C[w],A[w]);c.lineEnd(),c.areaEnd()}E&&(C[p]=+e(S,p,h),A[p]=+t(S,p,h),c.point(r?+r(S,p,h):C[p],n?+n(S,p,h):A[p]))}if(O)return c=null,O+""||null}function m(){return VB().defined(a).curve(s).context(i)}return u.x=function(h){return arguments.length?(e=typeof h=="function"?h:Tt(+h),r=null,u):e},u.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Tt(+h),u):e},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Tt(+h),u):r},u.y=function(h){return arguments.length?(t=typeof h=="function"?h:Tt(+h),n=null,u):t},u.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Tt(+h),u):t},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Tt(+h),u):n},u.lineX0=u.lineY0=function(){return m().x(e).y(t)},u.lineY1=function(){return m().x(e).y(n)},u.lineX1=function(){return m().x(r).y(t)},u.defined=function(h){return arguments.length?(a=typeof h=="function"?h:Tt(!!h),u):a},u.curve=function(h){return arguments.length?(s=h,i!=null&&(c=s(i)),u):s},u.context=function(h){return arguments.length?(h==null?i=c=null:c=s(i=h),u):i},u}class YB{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function xie(e){return new YB(e,!0)}function wie(e){return new YB(e,!1)}const xC={draw(e,t){const n=ti(t/Fg);e.moveTo(n,0),e.arc(0,0,n,0,x0)}},Sie={draw(e,t){const n=ti(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},GB=ti(1/3),Eie=GB*2,_ie={draw(e,t){const n=ti(t/Eie),r=n*GB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},jie={draw(e,t){const n=ti(t),r=-n/2;e.rect(r,r,n,n)}},Cie=.8908130915292852,XB=Hg(Fg/10)/Hg(7*Fg/10),Oie=Hg(x0/10)*XB,Aie=-UB(x0/10)*XB,Nie={draw(e,t){const n=ti(t*Cie),r=Oie*n,a=Aie*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=x0*i/5,c=UB(s),f=Hg(s);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*a,f*r+c*a)}e.closePath()}},c1=ti(3),Tie={draw(e,t){const n=-ti(t/(c1*3));e.moveTo(0,n*2),e.lineTo(-c1*n,-n),e.lineTo(c1*n,-n),e.closePath()}},pa=-.5,va=ti(3)/2,VE=1/ti(12),Pie=(VE/2+1)*3,Mie={draw(e,t){const n=ti(t/Pie),r=n/2,a=n*VE,i=r,s=n*VE+n,c=-i,f=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(c,f),e.lineTo(pa*r-va*a,va*r+pa*a),e.lineTo(pa*i-va*s,va*i+pa*s),e.lineTo(pa*c-va*f,va*c+pa*f),e.lineTo(pa*r+va*a,pa*a-va*r),e.lineTo(pa*i+va*s,pa*s-va*i),e.lineTo(pa*c+va*f,pa*f-va*c),e.closePath()}};function Rie(e,t){let n=null,r=yC(a);e=typeof e=="function"?e:Tt(e||xC),t=typeof t=="function"?t:Tt(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Tt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Tt(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function qg(){}function Kg(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function WB(e){this._context=e}WB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Kg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kie(e){return new WB(e)}function QB(e){this._context=e}QB.prototype={areaStart:qg,areaEnd:qg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Die(e){return new QB(e)}function ZB(e){this._context=e}ZB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iie(e){return new ZB(e)}function JB(e){this._context=e}JB.prototype={areaStart:qg,areaEnd:qg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Lie(e){return new JB(e)}function VM(e){return e<0?-1:1}function YM(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),c=(i*a+s*r)/(r+a);return(VM(i)+VM(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(c))||0}function GM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function u1(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,c=(i-r)/3;e._context.bezierCurveTo(r+c,a+c*t,i-c,s-c*n,i,s)}function Vg(e){this._context=e}Vg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:u1(this,this._t0,GM(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,u1(this,GM(this,n=YM(this,e,t)),n);break;default:u1(this,this._t0,n=YM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function e8(e){this._context=new t8(e)}(e8.prototype=Object.create(Vg.prototype)).point=function(e,t){Vg.prototype.point.call(this,t,e)};function t8(e){this._context=e}t8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function zie(e){return new Vg(e)}function $ie(e){return new e8(e)}function n8(e){this._context=e}n8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=XM(e),a=XM(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function XM(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Bie(e){return new n8(e)}function S0(e,t){this._context=e,this._t=t}S0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Uie(e){return new S0(e,.5)}function Hie(e){return new S0(e,0)}function Fie(e){return new S0(e,1)}function Ec(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,c=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<c;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function YE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function qie(e,t){return e[t]}function Kie(e){const t=[];return t.key=e,t}function Vie(){var e=Tt([]),t=YE,n=Ec,r=qie;function a(i){var s=Array.from(e.apply(this,arguments),Kie),c,f=s.length,u=-1,m;for(const h of i)for(c=0,++u;c<f;++c)(s[c][u]=[0,+r(h,s[c].key,u,i)]).data=h;for(c=0,m=bC(t(s));c<f;++c)s[m[c]].index=c;return n(s,m),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Tt(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Tt(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?YE:typeof i=="function"?i:Tt(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??Ec,a):n},a}function Yie(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}Ec(e,t)}}function Gie(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,c=0;s<a;++s)c+=e[s][n][1]||0;r[n][1]+=r[n][0]=-c/2}Ec(e,t)}}function Xie(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var c=0,f=0,u=0;c<s;++c){for(var m=e[t[c]],h=m[r][1]||0,p=m[r-1][1]||0,y=(h-p)/2,w=0;w<c;++w){var x=e[t[w]],S=x[r][1]||0,E=x[r-1][1]||0;y+=S-E}f+=h,u+=y*h}a[r-1][1]+=a[r-1][0]=n,f&&(n-=u/f)}a[r-1][1]+=a[r-1][0]=n,Ec(e,t)}}var f1={},d1={},WM;function Wie(){return WM||(WM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(d1)),d1}var h1={},QM;function r8(){return QM||(QM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(h1)),h1}var m1={},ZM;function wC(){return ZM||(ZM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var r;return typeof n=="string"||typeof n=="symbol"?n:Object.is((r=n==null?void 0:n.valueOf)==null?void 0:r.call(n),-0)?"-0":String(n)}e.toKey=t})(m1)),m1}var p1={},v1={},JM;function Qie(){return JM||(JM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(v1)),v1}var eR;function SC(){return eR||(eR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qie(),n=wC();function r(a){if(Array.isArray(a))return a.map(n.toKey);if(typeof a=="symbol")return[a];a=t.toString(a);const i=[],s=a.length;if(s===0)return i;let c=0,f="",u="",m=!1;for(a.charCodeAt(0)===46&&(i.push(""),c++);c<s;){const h=a[c];u?h==="\\"&&c+1<s?(c++,f+=a[c]):h===u?u="":f+=h:m?h==='"'||h==="'"?u=h:h==="]"?(m=!1,i.push(f),f=""):f+=h:h==="["?(m=!0,f&&(i.push(f),f="")):h==="."?f&&(i.push(f),f=""):f+=h,c++}return f&&i.push(f),i}e.toPath=r})(p1)),p1}var tR;function EC(){return tR||(tR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wie(),n=r8(),r=wC(),a=SC();function i(c,f,u){if(c==null)return u;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return u;const m=c[f];return m===void 0?n.isDeepKey(f)?i(c,a.toPath(f),u):u:m}case"number":case"symbol":{typeof f=="number"&&(f=r.toKey(f));const m=c[f];return m===void 0?u:m}default:{if(Array.isArray(f))return s(c,f,u);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return u;const m=c[f];return m===void 0?u:m}}}function s(c,f,u){if(f.length===0)return u;let m=c;for(let h=0;h<f.length;h++){if(m==null||t.isUnsafeProperty(f[h]))return u;m=m[f[h]]}return m===void 0?u:m}e.get=i})(f1)),f1}var g1,nR;function Zie(){return nR||(nR=1,g1=EC().get),g1}var Jie=Zie();const _c=Qa(Jie);var eoe=4;function Gs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eoe,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Jt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((a,i,s)=>{var c=n[s-1];return typeof c=="string"?a+c+i:c!==void 0?a+Gs(c)+i:a+i},"")}var In=e=>e===0?0:e>0?1:-1,Ni=e=>typeof e=="number"&&e!=+e,jc=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,_e=e=>(typeof e=="number"||e instanceof Number)&&!Ni(e),Ti=e=>_e(e)||typeof e=="string",toe=0,$h=e=>{var t=++toe;return"".concat(e||"").concat(t)},fr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!_e(t)&&typeof t!="string")return r;var i;if(jc(t)){if(n==null)return r;var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return Ni(i)&&(i=r),a&&n!=null&&i>n&&(i=n),i},a8=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function $t(e,t,n){return _e(e)&&_e(t)?Gs(e+n*(t-e)):t}function i8(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):_c(r,t))===n)}var Ht=e=>e===null||typeof e>"u",Nm=e=>Ht(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function kr(e){return e!=null}function hl(){}var noe=["type","size","sizeType"];function GE(){return GE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GE.apply(null,arguments)}function rR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(n),!0).forEach(function(r){roe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function roe(e,t,n){return(t=aoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aoe(e){var t=ioe(e,"string");return typeof t=="symbol"?t:t+""}function ioe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ooe(e,t){if(e==null)return{};var n,r,a=soe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function soe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var o8={symbolCircle:xC,symbolCross:Sie,symbolDiamond:_ie,symbolSquare:jie,symbolStar:Nie,symbolTriangle:Tie,symbolWye:Mie},loe=Math.PI/180,coe=e=>{var t="symbol".concat(Nm(e));return o8[t]||xC},uoe=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*loe;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},foe=(e,t)=>{o8["symbol".concat(Nm(e))]=t},_C=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,a=ooe(e,noe),i=aR(aR({},a),{},{type:t,size:n,sizeType:r}),s="circle";typeof t=="string"&&(s=t);var c=()=>{var p=coe(s),y=Rie().type(p).size(uoe(n,r,s)),w=y();if(w!==null)return w},{className:f,cx:u,cy:m}=i,h=br(i);return _e(u)&&_e(m)&&_e(n)?b.createElement("path",GE({},h,{className:st("recharts-symbols",f),transform:"translate(".concat(u,", ").concat(m,")"),d:c()})):null};_C.registerSymbol=foe;var s8=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,jC=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(b.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(a=>{vC(a)&&typeof n[a]=="function"&&(r[a]=(i=>n[a](n,i)))}),r},doe=(e,t,n)=>r=>(e(t,n,r),null),Tm=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(a=>{var i=e[a];vC(a)&&typeof i=="function"&&(r||(r={}),r[a]=doe(i,t,n))}),r};function iR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hoe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iR(Object(n),!0).forEach(function(r){moe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function moe(e,t,n){return(t=poe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function poe(e){var t=voe(e,"string");return typeof t=="symbol"?t:t+""}function voe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yn(e,t){var n=hoe({},e),r=t,a=Object.keys(t),i=a.reduce((s,c)=>(s[c]===void 0&&r[c]!==void 0&&(s[c]=r[c]),s),n);return i}function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yg.apply(null,arguments)}function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function l8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){goe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function goe(e,t,n){return(t=yoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yoe(e){var t=boe(e,"string");return typeof t=="symbol"?t:t+""}function boe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ya=32,xoe={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function woe(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Soe(e){var{data:t,iconType:n,inactiveColor:r}=e,a=ya/2,i=ya/6,s=ya/3,c=t.inactive?r:t.color,f=n??t.type;if(f==="none")return null;if(f==="plainline")return b.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:woe(t.payload),x1:0,y1:a,x2:ya,y2:a,className:"recharts-legend-icon"});if(f==="line")return b.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(s,`
            A`).concat(i,",").concat(i,",0,1,1,").concat(2*s,",").concat(a,`
            H`).concat(ya,"M").concat(2*s,",").concat(a,`
            A`).concat(i,",").concat(i,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(f==="rect")return b.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(ya/8,"h").concat(ya,"v").concat(ya*3/4,"h").concat(-ya,"z"),className:"recharts-legend-icon"});if(b.isValidElement(t.legendIcon)){var u=l8({},t);return delete u.legendIcon,b.cloneElement(t.legendIcon,u)}return b.createElement(_C,{fill:c,cx:a,cy:a,size:ya,sizeType:"diameter",type:f})}function Eoe(e){var{payload:t,iconSize:n,layout:r,formatter:a,inactiveColor:i,iconType:s,labelStyle:c}=e,f={x:0,y:0,width:ya,height:ya},u={display:r==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((h,p)=>{var y=h.formatter||a,w=st({"recharts-legend-item":!0,["legend-item-".concat(p)]:!0,inactive:h.inactive});if(h.type==="none")return null;var x=typeof c=="object"?l8({},c):{};x.color=h.inactive?i:x.color||h.color;var S=y?y(h.value,h,p):h.value;return b.createElement("li",Yg({className:w,style:u,key:"legend-item-".concat(p)},Tm(e,h,p)),b.createElement(gC,{width:n,height:n,viewBox:f,style:m,"aria-label":"".concat(S," legend icon")},b.createElement(Soe,{data:h,iconType:s,inactiveColor:i})),b.createElement("span",{className:"recharts-legend-item-text",style:x},S))})}var _oe=e=>{var t=yn(e,xoe),{payload:n,layout:r,align:a}=t;if(!n||!n.length)return null;var i={padding:0,margin:0,textAlign:r==="horizontal"?a:"left"};return b.createElement("ul",{className:"recharts-default-legend",style:i},b.createElement(Eoe,Yg({},t,{payload:n})))},y1={},b1={},sR;function joe(){return sR||(sR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const a=new Map;for(let i=0;i<n.length;i++){const s=n[i],c=r(s,i,n);a.has(c)||a.set(c,s)}return Array.from(a.values())}e.uniqBy=t})(b1)),b1}var x1={},lR;function Coe(){return lR||(lR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...a){return n.apply(this,a.slice(0,r))}}e.ary=t})(x1)),x1}var w1={},cR;function c8(){return cR||(cR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(w1)),w1}var S1={},E1={},_1={},uR;function Ooe(){return uR||(uR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(_1)),_1}var fR;function u8(){return fR||(fR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ooe();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(E1)),E1}var j1={},dR;function Aoe(){return dR||(dR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(j1)),j1}var hR;function Noe(){return hR||(hR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u8(),n=Aoe();function r(a){return n.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=r})(S1)),S1}var C1={},O1={},mR;function Toe(){return mR||(mR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EC();function n(r){return function(a){return t.get(a,r)}}e.property=n})(O1)),O1}var A1={},N1={},T1={},P1={},pR;function f8(){return pR||(pR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(P1)),P1}var M1={},vR;function d8(){return vR||(vR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(M1)),M1}var R1={},gR;function h8(){return gR||(gR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(R1)),R1}var yR;function Poe(){return yR||(yR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=f8(),n=d8(),r=h8();function a(m,h,p){return typeof p!="function"?a(m,h,()=>{}):i(m,h,function y(w,x,S,E,O,C){const A=p(w,x,S,E,O,C);return A!==void 0?!!A:i(w,x,y,C)},new Map)}function i(m,h,p,y){if(h===m)return!0;switch(typeof h){case"object":return s(m,h,p,y);case"function":return Object.keys(h).length>0?i(m,{...h},p,y):r.isEqualsSameValueZero(m,h);default:return t.isObject(m)?typeof h=="string"?h==="":!0:r.isEqualsSameValueZero(m,h)}}function s(m,h,p,y){if(h==null)return!0;if(Array.isArray(h))return f(m,h,p,y);if(h instanceof Map)return c(m,h,p,y);if(h instanceof Set)return u(m,h,p,y);const w=Object.keys(h);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(y!=null&&y.has(h))return y.get(h)===m;y==null||y.set(h,m);try{for(let x=0;x<w.length;x++){const S=w[x];if(!n.isPrimitive(m)&&!(S in m)||h[S]===void 0&&m[S]!==void 0||h[S]===null&&m[S]!==null||!p(m[S],h[S],S,m,h,y))return!1}return!0}finally{y==null||y.delete(h)}}function c(m,h,p,y){if(h.size===0)return!0;if(!(m instanceof Map))return!1;for(const[w,x]of h.entries()){const S=m.get(w);if(p(S,x,w,m,h,y)===!1)return!1}return!0}function f(m,h,p,y){if(h.length===0)return!0;if(!Array.isArray(m))return!1;const w=new Set;for(let x=0;x<h.length;x++){const S=h[x];let E=!1;for(let O=0;O<m.length;O++){if(w.has(O))continue;const C=m[O];let A=!1;if(p(C,S,x,m,h,y)&&(A=!0),A){w.add(O),E=!0;break}}if(!E)return!1}return!0}function u(m,h,p,y){return h.size===0?!0:m instanceof Set?f([...m],[...h],p,y):!1}e.isMatchWith=a,e.isSetMatch=u})(T1)),T1}var bR;function m8(){return bR||(bR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Poe();function n(r,a){return t.isMatchWith(r,a,()=>{})}e.isMatch=n})(N1)),N1}var k1={},D1={},I1={},xR;function Moe(){return xR||(xR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(I1)),I1}var L1={},wR;function CC(){return wR||(wR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(L1)),L1}var z1={},SR;function p8(){return SR||(SR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",a="[object Boolean]",i="[object Arguments]",s="[object Symbol]",c="[object Date]",f="[object Map]",u="[object Set]",m="[object Array]",h="[object Function]",p="[object ArrayBuffer]",y="[object Object]",w="[object Error]",x="[object DataView]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",O="[object Uint16Array]",C="[object Uint32Array]",A="[object BigUint64Array]",N="[object Int8Array]",T="[object Int16Array]",P="[object Int32Array]",k="[object BigInt64Array]",D="[object Float32Array]",K="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=p,e.arrayTag=m,e.bigInt64ArrayTag=k,e.bigUint64ArrayTag=A,e.booleanTag=a,e.dataViewTag=x,e.dateTag=c,e.errorTag=w,e.float32ArrayTag=D,e.float64ArrayTag=K,e.functionTag=h,e.int16ArrayTag=T,e.int32ArrayTag=P,e.int8ArrayTag=N,e.mapTag=f,e.numberTag=r,e.objectTag=y,e.regexpTag=t,e.setTag=u,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=O,e.uint32ArrayTag=C,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=E})(z1)),z1}var $1={},ER;function Roe(){return ER||(ER=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})($1)),$1}var _R;function v8(){return _R||(_R=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Moe(),n=CC(),r=p8(),a=d8(),i=Roe();function s(m,h){return c(m,void 0,m,new Map,h)}function c(m,h,p,y=new Map,w=void 0){const x=w==null?void 0:w(m,h,p,y);if(x!==void 0)return x;if(a.isPrimitive(m))return m;if(y.has(m))return y.get(m);if(Array.isArray(m)){const S=new Array(m.length);y.set(m,S);for(let E=0;E<m.length;E++)S[E]=c(m[E],E,p,y,w);return Object.hasOwn(m,"index")&&(S.index=m.index),Object.hasOwn(m,"input")&&(S.input=m.input),S}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const S=new RegExp(m.source,m.flags);return S.lastIndex=m.lastIndex,S}if(m instanceof Map){const S=new Map;y.set(m,S);for(const[E,O]of m)S.set(E,c(O,E,p,y,w));return S}if(m instanceof Set){const S=new Set;y.set(m,S);for(const E of m)S.add(c(E,void 0,p,y,w));return S}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(i.isTypedArray(m)){const S=new(Object.getPrototypeOf(m)).constructor(m.length);y.set(m,S);for(let E=0;E<m.length;E++)S[E]=c(m[E],E,p,y,w);return S}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const S=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return y.set(m,S),f(S,m,p,y,w),S}if(typeof File<"u"&&m instanceof File){const S=new File([m],m.name,{type:m.type});return y.set(m,S),f(S,m,p,y,w),S}if(typeof Blob<"u"&&m instanceof Blob){const S=new Blob([m],{type:m.type});return y.set(m,S),f(S,m,p,y,w),S}if(m instanceof Error){const S=structuredClone(m);return y.set(m,S),S.message=m.message,S.name=m.name,S.stack=m.stack,S.cause=m.cause,S.constructor=m.constructor,f(S,m,p,y,w),S}if(m instanceof Boolean){const S=new Boolean(m.valueOf());return y.set(m,S),f(S,m,p,y,w),S}if(m instanceof Number){const S=new Number(m.valueOf());return y.set(m,S),f(S,m,p,y,w),S}if(m instanceof String){const S=new String(m.valueOf());return y.set(m,S),f(S,m,p,y,w),S}if(typeof m=="object"&&u(m)){const S=Object.create(Object.getPrototypeOf(m));return y.set(m,S),f(S,m,p,y,w),S}return m}function f(m,h,p=m,y,w){const x=[...Object.keys(h),...t.getSymbols(h)];for(let S=0;S<x.length;S++){const E=x[S],O=Object.getOwnPropertyDescriptor(m,E);(O==null||O.writable)&&(m[E]=c(h[E],E,p,y,w))}}function u(m){switch(n.getTag(m)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=f})(D1)),D1}var jR;function koe(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v8();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(k1)),k1}var CR;function Doe(){return CR||(CR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m8(),n=koe();function r(a){return a=n.cloneDeep(a),i=>t.isMatch(i,a)}e.matches=r})(A1)),A1}var B1={},U1={},H1={},OR;function Ioe(){return OR||(OR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v8(),n=CC(),r=p8();function a(i,s){return t.cloneDeepWith(i,(c,f,u,m)=>{const h=s==null?void 0:s(c,f,u,m);if(h!==void 0)return h;if(typeof i=="object"){if(n.getTag(i)===r.objectTag&&typeof i.constructor!="function"){const p={};return m.set(i,p),t.copyProperties(p,i,u,m),p}switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const p=new i.constructor(i==null?void 0:i.valueOf());return t.copyProperties(p,i),p}case r.argumentsTag:{const p={};return t.copyProperties(p,i),p.length=i.length,p[Symbol.iterator]=i[Symbol.iterator],p}default:return}}})}e.cloneDeepWith=a})(H1)),H1}var AR;function Loe(){return AR||(AR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ioe();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(U1)),U1}var F1={},q1={},NR;function g8(){return NR||(NR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,a=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<a;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(q1)),q1}var K1={},TR;function zoe(){return TR||(TR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CC();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(K1)),K1}var PR;function $oe(){return PR||(PR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r8(),n=g8(),r=zoe(),a=SC();function i(s,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&t.isDeepKey(c)&&(s==null?void 0:s[c])==null?f=a.toPath(c):f=[c],f.length===0)return!1;let u=s;for(let m=0;m<f.length;m++){const h=f[m];if((u==null||!Object.hasOwn(u,h))&&!((Array.isArray(u)||r.isArguments(u))&&n.isIndex(h)&&h<u.length))return!1;u=u[h]}return!0}e.has=i})(F1)),F1}var MR;function Boe(){return MR||(MR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m8(),n=wC(),r=Loe(),a=EC(),i=$oe();function s(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return f=r.cloneDeep(f),function(u){const m=a.get(u,c);return m===void 0?i.has(u,c):f===void 0?m===void 0:t.isMatch(m,f)}}e.matchesProperty=s})(B1)),B1}var RR;function Uoe(){return RR||(RR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=c8(),n=Toe(),r=Doe(),a=Boe();function i(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?a.matchesProperty(s[0],s[1]):r.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=i})(C1)),C1}var kR;function Hoe(){return kR||(kR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=joe(),n=Coe(),r=c8(),a=Noe(),i=Uoe();function s(c,f=r.identity){return a.isArrayLikeObject(c)?t.uniqBy(Array.from(c),n.ary(i.iteratee(f),1)):[]}e.uniqBy=s})(y1)),y1}var V1,DR;function Foe(){return DR||(DR=1,V1=Hoe().uniqBy),V1}var qoe=Foe();const IR=Qa(qoe);function y8(e,t,n){return t===!0?IR(e,n):typeof t=="function"?IR(e,t):e}var Y1={exports:{}},G1={};/**
 * @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 LR;function Koe(){if(LR)return G1;LR=1;var e=Uf(),t=tW();function n(u,m){return u===m&&(u!==0||1/u===1/m)||u!==u&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,c=e.useMemo,f=e.useDebugValue;return G1.useSyncExternalStoreWithSelector=function(u,m,h,p,y){var w=i(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=c(function(){function E(T){if(!O){if(O=!0,C=T,T=p(T),y!==void 0&&x.hasValue){var P=x.value;if(y(P,T))return A=P}return A=T}if(P=A,r(C,T))return P;var k=p(T);return y!==void 0&&y(P,k)?(C=T,P):(C=T,A=k)}var O=!1,C,A,N=h===void 0?null:h;return[function(){return E(m())},N===null?void 0:function(){return E(N())}]},[m,h,p,y]);var S=a(u,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=S},[S]),f(S),S},G1}var zR;function Voe(){return zR||(zR=1,Y1.exports=Koe()),Y1.exports}var b8=Voe();const Yoe=Qa(b8);var OC=b.createContext(null),Goe=e=>e,Ct=()=>{var e=b.useContext(OC);return e?e.store.dispatch:Goe},hg=()=>{},Xoe=()=>hg,Woe=(e,t)=>e===t;function Ne(e){var t=b.useContext(OC),n=b.useMemo(()=>t?r=>{if(r!=null)return e(r)}:hg,[t,e]);return b8.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Xoe,t?t.store.getState:hg,t?t.store.getState:hg,n,Woe)}function Qoe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Zoe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Joe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var $R=e=>Array.isArray(e)?e:[e];function ese(e){const t=Array.isArray(e[0])?e[0]:e;return Joe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tse(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var nse=class{constructor(e){this.value=e}deref(){return this.value}},rse=typeof WeakRef<"u"?WeakRef:nse,ase=0,BR=1;function Dv(){return{s:ase,v:void 0,o:null,p:null}}function x8(e,t={}){let n=Dv();const{resultEqualityCheck:r}=t;let a,i=0;function s(){var h;let c=n;const{length:f}=arguments;for(let p=0,y=f;p<y;p++){const w=arguments[p];if(typeof w=="function"||typeof w=="object"&&w!==null){let x=c.o;x===null&&(c.o=x=new WeakMap);const S=x.get(w);S===void 0?(c=Dv(),x.set(w,c)):c=S}else{let x=c.p;x===null&&(c.p=x=new Map);const S=x.get(w);S===void 0?(c=Dv(),x.set(w,c)):c=S}}const u=c;let m;if(c.s===BR)m=c.v;else if(m=e.apply(null,arguments),i++,r){const p=((h=a==null?void 0:a.deref)==null?void 0:h.call(a))??a;p!=null&&r(p,m)&&(m=p,i!==0&&i--),a=typeof m=="object"&&m!==null||typeof m=="function"?new rse(m):m}return u.s=BR,u.v=m,m}return s.clearCache=()=>{n=Dv(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function ise(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...a)=>{let i=0,s=0,c,f={},u=a.pop();typeof u=="object"&&(f=u,u=a.pop()),Qoe(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const m={...n,...f},{memoize:h,memoizeOptions:p=[],argsMemoize:y=x8,argsMemoizeOptions:w=[]}=m,x=$R(p),S=$R(w),E=ese(a),O=h(function(){return i++,u.apply(null,arguments)},...x),C=y(function(){s++;const N=tse(E,arguments);return c=O.apply(null,N),c},...S);return Object.assign(C,{resultFunc:u,memoizedResultFunc:O,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var oe=ise(x8),ose=Object.assign((e,t=oe)=>{Zoe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>ose}),X1={},W1={},Q1={},UR;function sse(){return UR||(UR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,a,i)=>{if(r!==a){const s=t(r),c=t(a);if(s===c&&s===0){if(r<a)return i==="desc"?1:-1;if(r>a)return i==="desc"?-1:1}return i==="desc"?c-s:s-c}return 0};e.compareValues=n})(Q1)),Q1}var Z1={},J1={},HR;function w8(){return HR||(HR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(J1)),J1}var FR;function lse(){return FR||(FR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w8(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,s){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(r.test(i)||!n.test(i))||s!=null&&Object.hasOwn(s,i)}e.isKey=a})(Z1)),Z1}var qR;function cse(){return qR||(qR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sse(),n=lse(),r=SC();function a(i,s,c,f){if(i==null)return[];c=f?void 0:c,Array.isArray(i)||(i=Object.values(i)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(y=>String(y));const u=(y,w)=>{let x=y;for(let S=0;S<w.length&&x!=null;++S)x=x[w[S]];return x},m=(y,w)=>w==null||y==null?w:typeof y=="object"&&"key"in y?Object.hasOwn(w,y.key)?w[y.key]:u(w,y.path):typeof y=="function"?y(w):Array.isArray(y)?u(w,y):typeof w=="object"?w[y]:w,h=s.map(y=>(Array.isArray(y)&&y.length===1&&(y=y[0]),y==null||typeof y=="function"||Array.isArray(y)||n.isKey(y)?y:{key:y,path:r.toPath(y)}));return i.map(y=>({original:y,criteria:h.map(w=>m(w,y))})).slice().sort((y,w)=>{for(let x=0;x<h.length;x++){const S=t.compareValues(y.criteria[x],w.criteria[x],c[x]);if(S!==0)return S}return 0}).map(y=>y.original)}e.orderBy=a})(W1)),W1}var eS={},KR;function use(){return KR||(KR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const a=[],i=Math.floor(r),s=(c,f)=>{for(let u=0;u<c.length;u++){const m=c[u];Array.isArray(m)&&f<i?s(m,f+1):a.push(m)}};return s(n,0),a}e.flatten=t})(eS)),eS}var tS={},VR;function S8(){return VR||(VR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g8(),n=u8(),r=f8(),a=h8();function i(s,c,f){return r.isObject(f)&&(typeof c=="number"&&n.isArrayLike(f)&&t.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?a.isEqualsSameValueZero(f[c],s):!1}e.isIterateeCall=i})(tS)),tS}var YR;function fse(){return YR||(YR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cse(),n=use(),r=S8();function a(i,...s){const c=s.length;return c>1&&r.isIterateeCall(i,s[0],s[1])?s=[]:c>2&&r.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(i,n.flatten(s),["asc"])}e.sortBy=a})(X1)),X1}var nS,GR;function dse(){return GR||(GR=1,nS=fse().sortBy),nS}var hse=dse();const E0=Qa(hse);var E8=e=>e.legend.settings,mse=e=>e.legend.size,pse=e=>e.legend.payload,vse=oe([pse,E8],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?E0(r,n):r});function gse(){return Ne(vse)}var Iv=1;function _8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=b.useState({height:0,left:0,top:0,width:0}),r=b.useCallback(a=>{if(a!=null){var i=a.getBoundingClientRect(),s={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(s.height-t.height)>Iv||Math.abs(s.left-t.left)>Iv||Math.abs(s.top-t.top)>Iv||Math.abs(s.width-t.width)>Iv)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Yn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yse=typeof Symbol=="function"&&Symbol.observable||"@@observable",XR=yse,rS=()=>Math.random().toString(36).substring(7).split("").join("."),bse={INIT:`@@redux/INIT${rS()}`,REPLACE:`@@redux/REPLACE${rS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rS()}`},Gg=bse;function AC(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function j8(e,t,n){if(typeof e!="function")throw new Error(Yn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Yn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Yn(1));return n(j8)(e,t)}let r=e,a=t,i=new Map,s=i,c=0,f=!1;function u(){s===i&&(s=new Map,i.forEach((S,E)=>{s.set(E,S)}))}function m(){if(f)throw new Error(Yn(3));return a}function h(S){if(typeof S!="function")throw new Error(Yn(4));if(f)throw new Error(Yn(5));let E=!0;u();const O=c++;return s.set(O,S),function(){if(E){if(f)throw new Error(Yn(6));E=!1,u(),s.delete(O),i=null}}}function p(S){if(!AC(S))throw new Error(Yn(7));if(typeof S.type>"u")throw new Error(Yn(8));if(typeof S.type!="string")throw new Error(Yn(17));if(f)throw new Error(Yn(9));try{f=!0,a=r(a,S)}finally{f=!1}return(i=s).forEach(O=>{O()}),S}function y(S){if(typeof S!="function")throw new Error(Yn(10));r=S,p({type:Gg.REPLACE})}function w(){const S=h;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Yn(11));function O(){const A=E;A.next&&A.next(m())}return O(),{unsubscribe:S(O)}},[XR](){return this}}}return p({type:Gg.INIT}),{dispatch:p,subscribe:h,getState:m,replaceReducer:y,[XR]:w}}function xse(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Gg.INIT})>"u")throw new Error(Yn(12));if(typeof n(void 0,{type:Gg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Yn(13))})}function C8(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const s=t[i];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let a;try{xse(n)}catch(i){a=i}return function(s={},c){if(a)throw a;let f=!1;const u={};for(let m=0;m<r.length;m++){const h=r[m],p=n[h],y=s[h],w=p(y,c);if(typeof w>"u")throw c&&c.type,new Error(Yn(14));u[h]=w,f=f||w!==y}return f=f||r.length!==Object.keys(s).length,f?u:s}}function Xg(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function wse(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(Yn(15))};const s={getState:a.getState,dispatch:(f,...u)=>i(f,...u)},c=e.map(f=>f(s));return i=Xg(...c)(a.dispatch),{...a,dispatch:i}}}function O8(e){return AC(e)&&"type"in e&&typeof e.type=="string"}var A8=Symbol.for("immer-nothing"),WR=Symbol.for("immer-draftable"),xr=Symbol.for("immer-state");function Ua(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Zr=Object,jf=Zr.getPrototypeOf,Wg="constructor",_0="prototype",XE="configurable",Qg="enumerable",mg="writable",Bh="value",Mo=e=>!!e&&!!e[xr];function Wa(e){var t;return e?N8(e)||C0(e)||!!e[WR]||!!((t=e[Wg])!=null&&t[WR])||O0(e)||A0(e):!1}var Sse=Zr[_0][Wg].toString(),QR=new WeakMap;function N8(e){if(!e||!NC(e))return!1;const t=jf(e);if(t===null||t===Zr[_0])return!0;const n=Zr.hasOwnProperty.call(t,Wg)&&t[Wg];if(n===Object)return!0;if(!Xu(n))return!1;let r=QR.get(n);return r===void 0&&(r=Function.toString.call(n),QR.set(n,r)),r===Sse}function j0(e,t,n=!0){Pm(e)===0?(n?Reflect.ownKeys(e):Zr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Pm(e){const t=e[xr];return t?t.type_:C0(e)?1:O0(e)?2:A0(e)?3:0}var ZR=(e,t,n=Pm(e))=>n===2?e.has(t):Zr[_0].hasOwnProperty.call(e,t),WE=(e,t,n=Pm(e))=>n===2?e.get(t):e[t],Zg=(e,t,n,r=Pm(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ese(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var C0=Array.isArray,O0=e=>e instanceof Map,A0=e=>e instanceof Set,NC=e=>typeof e=="object",Xu=e=>typeof e=="function",aS=e=>typeof e=="boolean";function _se(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var uo=e=>e.copy_||e.base_,TC=e=>e.modified_?e.copy_:e.base_;function QE(e,t){if(O0(e))return new Map(e);if(A0(e))return new Set(e);if(C0(e))return Array[_0].slice.call(e);const n=N8(e);if(t===!0||t==="class_only"&&!n){const r=Zr.getOwnPropertyDescriptors(e);delete r[xr];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],c=r[s];c[mg]===!1&&(c[mg]=!0,c[XE]=!0),(c.get||c.set)&&(r[s]={[XE]:!0,[mg]:!0,[Qg]:c[Qg],[Bh]:e[s]})}return Zr.create(jf(e),r)}else{const r=jf(e);if(r!==null&&n)return{...e};const a=Zr.create(r);return Zr.assign(a,e)}}function PC(e,t=!1){return N0(e)||Mo(e)||!Wa(e)||(Pm(e)>1&&Zr.defineProperties(e,{set:Lv,add:Lv,clear:Lv,delete:Lv}),Zr.freeze(e),t&&j0(e,(n,r)=>{PC(r,!0)},!1)),e}function jse(){Ua(2)}var Lv={[Bh]:jse};function N0(e){return e===null||!NC(e)?!0:Zr.isFrozen(e)}var Jg="MapSet",ZE="Patches",JR="ArrayMethods",T8={};function Cc(e){const t=T8[e];return t||Ua(0,e),t}var ek=e=>!!T8[e],Uh,P8=()=>Uh,Cse=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ek(Jg)?Cc(Jg):void 0,arrayMethodsPlugin_:ek(JR)?Cc(JR):void 0});function tk(e,t){t&&(e.patchPlugin_=Cc(ZE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function JE(e){e_(e),e.drafts_.forEach(Ose),e.drafts_=null}function e_(e){e===Uh&&(Uh=e.parent_)}var nk=e=>Uh=Cse(Uh,e);function Ose(e){const t=e[xr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[xr].modified_&&(JE(t),Ua(4)),Wa(e)&&(e=ak(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[xr].base_,e,t)}else e=ak(t,n);return Ase(t,e,!0),JE(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==A8?e:void 0}function ak(e,t){if(N0(t))return t;const n=t[xr];if(!n)return ey(t,e.handledSet_,e);if(!T0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);k8(n,e)}return n.copy_}function Ase(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&PC(t,n)}function M8(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var T0=(e,t)=>e.scope_===t,Nse=[];function R8(e,t,n,r){const a=uo(e),i=e.type_;if(r!==void 0&&WE(a,r,i)===t){Zg(a,r,n,i);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;j0(a,(f,u)=>{if(Mo(u)){const m=c.get(u)||[];m.push(f),c.set(u,m)}})}const s=e.draftLocations_.get(t)??Nse;for(const c of s)Zg(a,c,n,i)}function Tse(e,t,n){e.callbacks_.push(function(a){var c;const i=t;if(!i||!T0(i,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(i);const s=TC(i);R8(e,i.draft_??i,s,n),k8(i,a)})}function k8(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const i=a.getPath(e);i&&a.generatePatches_(e,i,t)}M8(e)}}function Pse(e,t,n){const{scope_:r}=e;if(Mo(n)){const a=n[xr];T0(a,r)&&a.callbacks_.push(function(){pg(e);const s=TC(a);R8(e,n,s,t)})}else Wa(n)&&e.callbacks_.push(function(){const i=uo(e);e.type_===3?i.has(n)&&ey(n,r.handledSet_,r):WE(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ey(WE(e.copy_,t,e.type_),r.handledSet_,r)})}function ey(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Mo(e)||t.has(e)||!Wa(e)||N0(e)||(t.add(e),j0(e,(r,a)=>{if(Mo(a)){const i=a[xr];if(T0(i,n)){const s=TC(i);Zg(e,r,s,e.type_),M8(i)}}else Wa(a)&&ey(a,t,n)})),e}function Mse(e,t){const n=C0(e),r={type_:n?1:0,scope_:t?t.scope_:P8(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,i=ty;n&&(a=[r],i=Hh);const{revoke:s,proxy:c}=Proxy.revocable(a,i);return r.draft_=c,r.revoke_=s,[c,r]}var ty={get(e,t){if(t===xr)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=uo(e);if(!ZR(a,t,e.type_))return Rse(e,a,t);const i=a[t];if(e.finalized_||!Wa(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&_se(t))return i;if(i===iS(e.base_,t)){pg(e);const s=e.type_===1?+t:t,c=n_(e.scope_,i,e,s);return e.copy_[s]=c}return i},has(e,t){return t in uo(e)},ownKeys(e){return Reflect.ownKeys(uo(e))},set(e,t,n){const r=D8(uo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=iS(uo(e),t),i=a==null?void 0:a[xr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Ese(n,a)&&(n!==void 0||ZR(e.base_,t,e.type_)))return!0;pg(e),t_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Pse(e,t,n)),!0},deleteProperty(e,t){return pg(e),iS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),t_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=uo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mg]:!0,[XE]:e.type_!==1||t!=="length",[Qg]:r[Qg],[Bh]:n[t]}},defineProperty(){Ua(11)},getPrototypeOf(e){return jf(e.base_)},setPrototypeOf(){Ua(12)}},Hh={};for(let e in ty){let t=ty[e];Hh[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Hh.deleteProperty=function(e,t){return Hh.set.call(this,e,t,void 0)};Hh.set=function(e,t,n){return ty.set.call(this,e[0],t,n,e[0])};function iS(e,t){const n=e[xr];return(n?uo(n):e)[t]}function Rse(e,t,n){var a;const r=D8(t,n);return r?Bh in r?r[Bh]:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function D8(e,t){if(!(t in e))return;let n=jf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jf(n)}}function t_(e){e.modified_||(e.modified_=!0,e.parent_&&t_(e.parent_))}function pg(e){e.copy_||(e.assigned_=new Map,e.copy_=QE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kse=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,a)=>{if(Xu(n)&&!Xu(r)){const s=r;r=n;const c=this;return function(u=s,...m){return c.produce(u,h=>r.call(this,h,...m))}}Xu(r)||Ua(6),a!==void 0&&!Xu(a)&&Ua(7);let i;if(Wa(n)){const s=nk(this),c=n_(s,n,void 0);let f=!0;try{i=r(c),f=!1}finally{f?JE(s):e_(s)}return tk(s,a),rk(i,s)}else if(!n||!NC(n)){if(i=r(n),i===void 0&&(i=n),i===A8&&(i=void 0),this.autoFreeze_&&PC(i,!0),a){const s=[],c=[];Cc(ZE).generateReplacementPatches_(n,i,{patches_:s,inversePatches_:c}),a(s,c)}return i}else Ua(1,n)},this.produceWithPatches=(n,r)=>{if(Xu(n))return(c,...f)=>this.produceWithPatches(c,u=>n(u,...f));let a,i;return[this.produce(n,r,(c,f)=>{a=c,i=f}),a,i]},aS(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),aS(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),aS(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Wa(t)||Ua(8),Mo(t)&&(t=_a(t));const n=nk(this),r=n_(n,t,void 0);return r[xr].isManual_=!0,e_(n),r}finishDraft(t,n){const r=t&&t[xr];(!r||!r.isManual_)&&Ua(9);const{scope_:a}=r;return tk(a,n),rk(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(n=n.slice(r+1));const a=Cc(ZE).applyPatches_;return Mo(t)?a(t,n):this.produce(t,i=>a(i,n))}};function n_(e,t,n,r){const[a,i]=O0(t)?Cc(Jg).proxyMap_(t,n):A0(t)?Cc(Jg).proxySet_(t,n):Mse(t,n);return((n==null?void 0:n.scope_)??P8()).drafts_.push(a),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?Tse(n,i,r):i.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(i);const{patchPlugin_:u}=f;i.modified_&&u&&u.generatePatches_(i,[],f)}),a}function _a(e){return Mo(e)||Ua(10,e),I8(e)}function I8(e){if(!Wa(e)||N0(e))return e;const t=e[xr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=QE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=QE(e,!0);return j0(n,(a,i)=>{Zg(n,a,I8(i))},r),t&&(t.finalized_=!1),n}var Dse=new kse,L8=Dse.produce;function z8(e){return({dispatch:n,getState:r})=>a=>i=>typeof i=="function"?i(n,r,e):a(i)}var Ise=z8(),Lse=z8,zse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xg:Xg.apply(null,arguments)};function na(e,t){function n(...r){if(t){let a=t(...r);if(!a)throw new Error(ea(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>O8(r)&&r.type===e,n}var $8=class _h extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_h.prototype)}static get[Symbol.species](){return _h}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _h(...t[0].concat(this)):new _h(...t.concat(this))}};function ik(e){return Wa(e)?L8(e,()=>{}):e}function zv(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function $se(e){return typeof e=="boolean"}var Bse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new $8;return n&&($se(n)?s.push(Ise):s.push(Lse(n.extraArgument))),s},B8="RTK_autoBatch",Dt=()=>e=>({payload:e,meta:{[B8]:!0}}),ok=e=>t=>{setTimeout(t,e)},U8=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,i=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ok(10):e.type==="callback"?e.queueNotification:ok(e.timeout),u=()=>{s=!1,i&&(i=!1,c.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const h=()=>a&&m(),p=r.subscribe(h);return c.add(m),()=>{p(),c.delete(m)}},dispatch(m){var h;try{return a=!((h=m==null?void 0:m.meta)!=null&&h[B8]),i=!a,i&&(s||(s=!0,f(u))),r.dispatch(m)}finally{a=!0}}})},Use=e=>function(n){const{autoBatch:r=!0}=n??{};let a=new $8(e);return r&&a.push(U8(typeof r=="object"?r:void 0)),a};function Hse(e){const t=Bse(),{reducer:n=void 0,middleware:r,devTools:a=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(AC(n))c=C8(n);else throw new Error(ea(1));let f;typeof r=="function"?f=r(t):f=t();let u=Xg;a&&(u=zse({trace:!1,...typeof a=="object"&&a}));const m=wse(...f),h=Use(m);let p=typeof s=="function"?s(h):h();const y=u(...p);return j8(c,i,y)}function H8(e){const t={},n=[];let r;const a={addCase(i,s){const c=typeof i=="string"?i:i.type;if(!c)throw new Error(ea(28));if(c in t)throw new Error(ea(29));return t[c]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return r=i,a}};return e(a),[t,n,r]}function Fse(e){return typeof e=="function"}function qse(e,t){let[n,r,a]=H8(t),i;if(Fse(e))i=()=>ik(e());else{const c=ik(e);i=()=>c}function s(c=i(),f){let u=[n[f.type],...r.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return u.filter(m=>!!m).length===0&&(u=[a]),u.reduce((m,h)=>{if(h)if(Mo(m)){const y=h(m,f);return y===void 0?m:y}else{if(Wa(m))return L8(m,p=>h(p,f));{const p=h(m,f);if(p===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return m},c)}return s.getInitialState=i,s}var Kse="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Vse=(e=21)=>{let t="",n=e;for(;n--;)t+=Kse[Math.random()*64|0];return t},Yse=Symbol.for("rtk-slice-createasyncthunk");function Gse(e,t){return`${e}/${t}`}function Xse({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Yse];return function(a){const{name:i,reducerPath:s=i}=a;if(!i)throw new Error(ea(11));const c=(typeof a.reducers=="function"?a.reducers(Qse()):a.reducers)||{},f=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(A,N){const T=typeof A=="string"?A:A.type;if(!T)throw new Error(ea(12));if(T in u.sliceCaseReducersByType)throw new Error(ea(13));return u.sliceCaseReducersByType[T]=N,m},addMatcher(A,N){return u.sliceMatchers.push({matcher:A,reducer:N}),m},exposeAction(A,N){return u.actionCreators[A]=N,m},exposeCaseReducer(A,N){return u.sliceCaseReducersByName[A]=N,m}};f.forEach(A=>{const N=c[A],T={reducerName:A,type:Gse(i,A),createNotation:typeof a.reducers=="function"};Jse(N)?tle(T,N,m,t):Zse(T,N,m)});function h(){const[A={},N=[],T=void 0]=typeof a.extraReducers=="function"?H8(a.extraReducers):[a.extraReducers],P={...A,...u.sliceCaseReducersByType};return qse(a.initialState,k=>{for(let D in P)k.addCase(D,P[D]);for(let D of u.sliceMatchers)k.addMatcher(D.matcher,D.reducer);for(let D of N)k.addMatcher(D.matcher,D.reducer);T&&k.addDefaultCase(T)})}const p=A=>A,y=new Map,w=new WeakMap;let x;function S(A,N){return x||(x=h()),x(A,N)}function E(){return x||(x=h()),x.getInitialState()}function O(A,N=!1){function T(k){let D=k[A];return typeof D>"u"&&N&&(D=zv(w,T,E)),D}function P(k=p){const D=zv(y,N,()=>new WeakMap);return zv(D,k,()=>{const K={};for(const[L,I]of Object.entries(a.selectors??{}))K[L]=Wse(I,k,()=>zv(w,k,E),N);return K})}return{reducerPath:A,getSelectors:P,get selectors(){return P(T)},selectSlice:T}}const C={name:i,reducer:S,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:E,...O(s),injectInto(A,{reducerPath:N,...T}={}){const P=N??s;return A.inject({reducerPath:P,reducer:S},T),{...C,...O(P,!0)}}};return C}}function Wse(e,t,n,r){function a(i,...s){let c=t(i);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return a.unwrapped=e,a}var hr=Xse();function Qse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Zse({type:e,reducerName:t,createNotation:n},r,a){let i,s;if("reducer"in r){if(n&&!ele(r))throw new Error(ea(17));i=r.reducer,s=r.prepare}else i=r;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?na(e,s):na(e))}function Jse(e){return e._reducerDefinitionType==="asyncThunk"}function ele(e){return e._reducerDefinitionType==="reducerWithPrepare"}function tle({type:e,reducerName:t},n,r,a){if(!a)throw new Error(ea(18));const{payloadCreator:i,fulfilled:s,pending:c,rejected:f,settled:u,options:m}=n,h=a(e,i,m);r.exposeAction(t,h),s&&r.addCase(h.fulfilled,s),c&&r.addCase(h.pending,c),f&&r.addCase(h.rejected,f),u&&r.addMatcher(h.settled,u),r.exposeCaseReducer(t,{fulfilled:s||$v,pending:c||$v,rejected:f||$v,settled:u||$v})}function $v(){}var nle="task",F8="listener",q8="completed",MC="cancelled",rle=`task-${MC}`,ale=`task-${q8}`,r_=`${F8}-${MC}`,ile=`${F8}-${q8}`,P0=class{constructor(e){Mw(this,"name","TaskAbortError");Mw(this,"message");this.code=e,this.message=`${nle} ${MC} (reason: ${e})`}},RC=(e,t)=>{if(typeof e!="function")throw new TypeError(ea(32))},ny=()=>{},K8=(e,t=ny)=>(e.catch(t),e),V8=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),uc=e=>{if(e.aborted)throw new P0(e.reason)};function Y8(e,t){let n=ny;return new Promise((r,a)=>{const i=()=>a(new P0(e.reason));if(e.aborted){i();return}n=V8(e,i),t.finally(()=>n()).then(r,a)}).finally(()=>{n=ny})}var ole=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof P0?"cancelled":"rejected",error:n}}finally{t==null||t()}},ry=e=>t=>K8(Y8(e,t).then(n=>(uc(e),n))),G8=e=>{const t=ry(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:nf}=Object,sk={},M0="listenerMiddleware",sle=(e,t)=>{const n=r=>V8(e,()=>r.abort(e.reason));return(r,a)=>{RC(r);const i=new AbortController;n(i);const s=ole(async()=>{uc(e),uc(i.signal);const c=await r({pause:ry(i.signal),delay:G8(i.signal),signal:i.signal});return uc(i.signal),c},()=>i.abort(ale));return a!=null&&a.autoJoin&&t.push(s.catch(ny)),{result:ry(e)(s),cancel(){i.abort(rle)}}}},lle=(e,t)=>{const n=async(r,a)=>{uc(t);let i=()=>{};const c=[new Promise((f,u)=>{let m=e({predicate:r,effect:(h,p)=>{p.unsubscribe(),f([h,p.getState(),p.getOriginalState()])}});i=()=>{m(),u()}})];a!=null&&c.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await Y8(t,Promise.race(c));return uc(t),f}finally{i()}};return(r,a)=>K8(n(r,a))},X8=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:i}=e;if(t)a=na(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(ea(21));return RC(i),{predicate:a,type:t,effect:i}},W8=nf(e=>{const{type:t,predicate:n,effect:r}=X8(e);return{id:Vse(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ea(22))}}},{withTypes:()=>W8}),lk=(e,t)=>{const{type:n,effect:r,predicate:a}=X8(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===a)&&i.effect===r)},a_=e=>{e.pending.forEach(t=>{t.abort(r_)})},cle=(e,t)=>()=>{for(const n of t.keys())a_(n);e.clear()},ck=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},Q8=nf(na(`${M0}/add`),{withTypes:()=>Q8}),ule=na(`${M0}/removeAll`),Z8=nf(na(`${M0}/remove`),{withTypes:()=>Z8}),fle=(...e)=>{console.error(`${M0}/error`,...e)},Mm=(e={})=>{const t=new Map,n=new Map,r=y=>{const w=n.get(y)??0;n.set(y,w+1)},a=y=>{const w=n.get(y)??1;w===1?n.delete(y):n.set(y,w-1)},{extra:i,onError:s=fle}=e;RC(s);const c=y=>(y.unsubscribe=()=>t.delete(y.id),t.set(y.id,y),w=>{y.unsubscribe(),w!=null&&w.cancelActive&&a_(y)}),f=y=>{const w=lk(t,y)??W8(y);return c(w)};nf(f,{withTypes:()=>f});const u=y=>{const w=lk(t,y);return w&&(w.unsubscribe(),y.cancelActive&&a_(w)),!!w};nf(u,{withTypes:()=>u});const m=async(y,w,x,S)=>{const E=new AbortController,O=lle(f,E.signal),C=[];try{y.pending.add(E),r(y),await Promise.resolve(y.effect(w,nf({},x,{getOriginalState:S,condition:(A,N)=>O(A,N).then(Boolean),take:O,delay:G8(E.signal),pause:ry(E.signal),extra:i,signal:E.signal,fork:sle(E.signal,C),unsubscribe:y.unsubscribe,subscribe:()=>{t.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((A,N,T)=>{A!==E&&(A.abort(r_),T.delete(A))})},cancel:()=>{E.abort(r_),y.pending.delete(E)},throwIfCancelled:()=>{uc(E.signal)}})))}catch(A){A instanceof P0||ck(s,A,{raisedBy:"effect"})}finally{await Promise.all(C),E.abort(ile),a(y),y.pending.delete(E)}},h=cle(t,n);return{middleware:y=>w=>x=>{if(!O8(x))return w(x);if(Q8.match(x))return f(x.payload);if(ule.match(x)){h();return}if(Z8.match(x))return u(x.payload);let S=y.getState();const E=()=>{if(S===sk)throw new Error(ea(23));return S};let O;try{if(O=w(x),t.size>0){const C=y.getState(),A=Array.from(t.values());for(const N of A){let T=!1;try{T=N.predicate(x,C,S)}catch(P){T=!1,ck(s,P,{raisedBy:"predicate"})}T&&m(N,x,y,E)}}}finally{S=sk}return O},startListening:f,stopListening:u,clearListeners:h}};function ea(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var dle={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},J8=hr({name:"chartLayout",initialState:dle,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,a,i;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:hle,setLayout:mle,setChartSize:ple,setScale:vle}=J8.actions,gle=J8.reducer;function e6(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function it(e){return Number.isFinite(e)}function Pi(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uk(Object(n),!0).forEach(function(r){yle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yle(e,t,n){return(t=ble(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ble(e){var t=xle(e,"string");return typeof t=="symbol"?t:t+""}function xle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _t(e,t,n){return Ht(e)||Ht(t)?n:Ti(t)?_c(e,t,n):typeof t=="function"?t(e):n}var wle=(e,t,n)=>{if(t&&n){var{width:r,height:a}=n,{align:i,verticalAlign:s,layout:c}=t;if((c==="vertical"||c==="horizontal"&&s==="middle")&&i!=="center"&&_e(e[i]))return Wu(Wu({},e),{},{[i]:e[i]+(r||0)});if((c==="horizontal"||c==="vertical"&&i==="center")&&s!=="middle"&&_e(e[s]))return Wu(Wu({},e),{},{[s]:e[s]+(a||0)})}return e},$o=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",t6=(e,t,n,r)=>{if(r)return e.map(c=>c.coordinate);var a,i,s=e.map(c=>(c.coordinate===t&&(a=!0),c.coordinate===n&&(i=!0),c.coordinate));return a||s.push(t),i||s.push(n),s},n6=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:a,range:i,scale:s,realScaleType:c,isCategorical:f,categoricalDomain:u,tickCount:m,ticks:h,niceTicks:p,axisType:y}=e;if(!s)return null;var w=c==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,x=a==="category"&&s.bandwidth?s.bandwidth()/w:0;if(x=y==="angleAxis"&&i&&i.length>=2?In(i[0]-i[1])*2*x:x,h||p){var S=(h||p||[]).map((E,O)=>{var C=r?r.indexOf(E):E,A=s.map(C);return it(A)?{coordinate:A+x,value:E,offset:x,index:O}:null}).filter(kr);return S}return f&&u?u.map((E,O)=>{var C=s.map(E);return it(C)?{coordinate:C+x,value:E,index:O,offset:x}:null}).filter(kr):s.ticks&&m!=null?s.ticks(m).map((E,O)=>{var C=s.map(E);return it(C)?{coordinate:C+x,value:E,index:O,offset:x}:null}).filter(kr):s.domain().map((E,O)=>{var C=s.map(E);return it(C)?{coordinate:C+x,value:r?r[E]:E,index:O,offset:x}:null}).filter(kr)},Sle=(e,t)=>{if(!t||t.length!==2||!_e(t[0])||!_e(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!_e(e[0])||e[0]<n)&&(a[0]=n),(!_e(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},Ele=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0,c=0;c<n;++c){var f=e[c],u=f==null?void 0:f[a];if(u!=null){var m=u[1],h=u[0],p=Ni(m)?h:m;p>=0?(u[0]=i,i+=p,u[1]=i):(u[0]=s,s+=p,u[1]=s)}}}},_le=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0;s<n;++s){var c=e[s],f=c==null?void 0:c[a];if(f!=null){var u=Ni(f[1])?f[0]:f[1];u>=0?(f[0]=i,i+=u,f[1]=i):(f[0]=0,f[1]=0)}}}},jle={sign:Ele,expand:Yie,none:Ec,silhouette:Gie,wiggle:Xie,positive:_le},Cle=(e,t,n)=>{var r,a=(r=jle[n])!==null&&r!==void 0?r:Ec,i=Vie().keys(t).value((c,f)=>Number(_t(c,f,0))).order(YE).offset(a),s=i(e);return s.forEach((c,f)=>{c.forEach((u,m)=>{var h=_t(e[m],t[f],0);Array.isArray(h)&&h.length===2&&_e(h[0])&&_e(h[1])&&(u[0]=h[0],u[1]=h[1])})}),s};function Ole(e){return e==null?void 0:String(e)}function fk(e){var{axis:t,ticks:n,bandSize:r,entry:a,index:i,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ht(a[t.dataKey])){var c=i8(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n!=null&&n[i]?n[i].coordinate+r/2:null}var f=_t(a,Ht(s)?t.dataKey:s),u=t.scale.map(f);return _e(u)?u:null}var dk=e=>{var{axis:t,ticks:n,offset:r,bandSize:a,entry:i,index:s}=e;if(t.type==="category")return n[s]?n[s].coordinate+r:null;var c=_t(i,t.dataKey,t.scale.domain()[s]);if(Ht(c))return null;var f=t.scale.map(c);return _e(f)?f-a/2+r:null},Ale=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]},Nle=e=>{var t=e.flat(2).filter(_e);return[Math.min(...t),Math.max(...t)]},Tle=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Ple=(e,t,n)=>{if(e!=null)return Tle(Object.keys(e).reduce((r,a)=>{var i=e[a];if(!i)return r;var{stackedData:s}=i,c=s.reduce((f,u)=>{var m=e6(u,t,n),h=Nle(m);return!it(h[0])||!it(h[1])?f:[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],r[0]),Math.max(c[1],r[1])]},[1/0,-1/0]))},hk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Cf=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=E0(t,m=>m.coordinate),i=1/0,s=1,c=a.length;s<c;s++){var f=a[s],u=a[s-1];i=Math.min(((f==null?void 0:f.coordinate)||0)-((u==null?void 0:u.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function pk(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:a,name:i}=e;return Wu(Wu({},t),{},{dataKey:n,payload:r,value:a,name:i})}function Zf(e,t){if(e)return String(e);if(typeof t=="string")return t}var Mle=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Rle=(e,t)=>t==="centric"?e.angle:e.radius,Bo=e=>e.layout.width,Uo=e=>e.layout.height,kle=e=>e.layout.scale,r6=e=>e.layout.margin,R0=oe(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),k0=oe(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),a6="data-recharts-item-index",i6="data-recharts-item-id",Rm=60;function vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(n),!0).forEach(function(r){Dle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dle(e,t,n){return(t=Ile(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ile(e){var t=Lle(e,"string");return typeof t=="symbol"?t:t+""}function Lle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zle=e=>e.brush.height;function $le(e){var t=k0(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Rm;return n+a}return n},0)}function Ble(e){var t=k0(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Rm;return n+a}return n},0)}function Ule(e){var t=R0(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function Hle(e){var t=R0(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var An=oe([Bo,Uo,r6,zle,$le,Ble,Ule,Hle,E8,mse],(e,t,n,r,a,i,s,c,f,u)=>{var m={left:(n.left||0)+a,right:(n.right||0)+i},h={top:(n.top||0)+s,bottom:(n.bottom||0)+c},p=Bv(Bv({},h),m),y=p.bottom;p.bottom+=r,p=wle(p,f,u);var w=e-p.left-p.right,x=t-p.top-p.bottom;return Bv(Bv({brushBottom:y},p),{},{width:Math.max(w,0),height:Math.max(x,0)})}),Fle=oe(An,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),kC=oe(Bo,Uo,(e,t)=>({x:0,y:0,width:e,height:t})),qle=b.createContext(null),mr=()=>b.useContext(qle)!=null,D0=e=>e.brush,I0=oe([D0,An,r6],(e,t,n)=>({height:e.height,x:_e(e.x)?e.x:t.left,y:_e(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:_e(e.width)?e.width:t.width})),oS={},sS={},lS={},gk;function Kle(){return gk||(gk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:a,edges:i}={}){let s,c=null;const f=i!=null&&i.includes("leading"),u=i==null||i.includes("trailing"),m=()=>{c!==null&&(n.apply(s,c),s=void 0,c=null)},h=()=>{u&&m(),x()};let p=null;const y=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},r)},w=()=>{p!==null&&(clearTimeout(p),p=null)},x=()=>{w(),s=void 0,c=null},S=()=>{m()},E=function(...O){if(a!=null&&a.aborted)return;s=this,c=O;const C=p==null;y(),f&&C&&m()};return E.schedule=y,E.cancel=x,E.flush=S,a==null||a.addEventListener("abort",x,{once:!0}),E}e.debounce=t})(lS)),lS}var yk;function Vle(){return yk||(yk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kle();function n(r,a=0,i={}){typeof i!="object"&&(i={});const{leading:s=!1,trailing:c=!0,maxWait:f}=i,u=Array(2);s&&(u[0]="leading"),c&&(u[1]="trailing");let m,h=null;const p=t.debounce(function(...x){m=r.apply(this,x),h=null},a,{edges:u}),y=function(...x){return f!=null&&(h===null&&(h=Date.now()),Date.now()-h>=f)?(m=r.apply(this,x),h=Date.now(),p.cancel(),p.schedule(),m):(p.apply(this,x),m)},w=()=>(p.flush(),m);return y.cancel=p.cancel,y.flush=w,y}e.debounce=n})(sS)),sS}var bk;function Yle(){return bk||(bk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vle();function n(r,a=0,i={}){const{leading:s=!0,trailing:c=!0}=i;return t.debounce(r,a,{leading:s,maxWait:a,trailing:c})}e.throttle=n})(oS)),oS}var cS,xk;function Gle(){return xk||(xk=1,cS=Yle().throttle),cS}var Xle=Gle();const Wle=Qa(Xle);var ay=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,()=>a[s++]))}},Ei={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},o6=(e,t,n)=>{var{width:r=Ei.width,height:a=Ei.height,aspect:i,maxHeight:s}=n,c=jc(r)?e:Number(r),f=jc(a)?t:Number(a);return i&&i>0&&(c?f=c/i:f&&(c=f*i),s&&f!=null&&f>s&&(f=s)),{calculatedWidth:c,calculatedHeight:f}},Qle={width:0,height:0,overflow:"visible"},Zle={width:0,overflowX:"visible"},Jle={height:0,overflowY:"visible"},ece={},tce=e=>{var{width:t,height:n}=e,r=jc(t),a=jc(n);return r&&a?Qle:r?Zle:a?Jle:ece};function nce(e){var{width:t,height:n,aspect:r}=e,a=t,i=n;return a===void 0&&i===void 0?(a=Ei.width,i=Ei.height):a===void 0?a=r&&r>0?void 0:Ei.width:i===void 0&&(i=r&&r>0?void 0:Ei.height),{width:a,height:i}}function i_(){return i_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i_.apply(null,arguments)}function wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wk(Object(n),!0).forEach(function(r){rce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rce(e,t,n){return(t=ace(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ace(e){var t=ice(e,"string");return typeof t=="symbol"?t:t+""}function ice(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s6=b.createContext(Ei.initialDimension);function oce(e){return Pi(e.width)&&Pi(e.height)}function l6(e){var{children:t,width:n,height:r}=e,a=b.useMemo(()=>({width:n,height:r}),[n,r]);return oce(a)?b.createElement(s6.Provider,{value:a},t):null}var DC=()=>b.useContext(s6),sce=b.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Ei.initialDimension,width:a,height:i,minWidth:s=Ei.minWidth,minHeight:c,maxHeight:f,children:u,debounce:m=Ei.debounce,id:h,className:p,onResize:y,style:w={}}=e,x=b.useRef(null),S=b.useRef();S.current=y,b.useImperativeHandle(t,()=>x.current);var[E,O]=b.useState({containerWidth:r.width,containerHeight:r.height}),C=b.useCallback((k,D)=>{O(K=>{var L=Math.round(k),I=Math.round(D);return K.containerWidth===L&&K.containerHeight===I?K:{containerWidth:L,containerHeight:I}})},[]);b.useEffect(()=>{if(x.current==null||typeof ResizeObserver>"u")return hl;var k=I=>{var W,$=I[0];if($!=null){var{width:V,height:R}=$.contentRect;C(V,R),(W=S.current)===null||W===void 0||W.call(S,V,R)}};m>0&&(k=Wle(k,m,{trailing:!0,leading:!1}));var D=new ResizeObserver(k),{width:K,height:L}=x.current.getBoundingClientRect();return C(K,L),D.observe(x.current),()=>{D.disconnect()}},[C,m]);var{containerWidth:A,containerHeight:N}=E;ay(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:T,calculatedHeight:P}=o6(A,N,{width:a,height:i,aspect:n,maxHeight:f});return ay(T!=null&&T>0||P!=null&&P>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,T,P,a,i,s,c,n),b.createElement("div",{id:h?"".concat(h):void 0,className:st("recharts-responsive-container",p),style:Sk(Sk({},w),{},{width:a,height:i,minWidth:s,minHeight:c,maxHeight:f}),ref:x},b.createElement("div",{style:tce({width:a,height:i})},b.createElement(l6,{width:T,height:P},u)))}),IC=b.forwardRef((e,t)=>{var n=DC();if(Pi(n.width)&&Pi(n.height))return e.children;var{width:r,height:a}=nce({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:s}=o6(void 0,void 0,{width:r,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return _e(i)&&_e(s)?b.createElement(l6,{width:i,height:s},e.children):b.createElement(sce,i_({},e,{width:r,height:a,ref:t}))});function LC(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var L0=()=>{var e,t=mr(),n=Ne(Fle),r=Ne(I0),a=(e=Ne(D0))===null||e===void 0?void 0:e.padding;return!t||!r||!a?n:{width:r.width-a.left-a.right,height:r.height-a.top-a.bottom,x:a.left,y:a.top}},lce={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},c6=()=>{var e;return(e=Ne(An))!==null&&e!==void 0?e:lce},zC=()=>Ne(Bo),$C=()=>Ne(Uo),cce=()=>Ne(e=>e.layout.margin),dt=e=>e.layout.layoutType,Vc=()=>Ne(dt),u6=()=>{var e=Vc();if(e==="horizontal"||e==="vertical")return e},f6=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},uce=()=>{var e=Vc();return e!==void 0},km=e=>{var t=Ct(),n=mr(),{width:r,height:a}=e,i=DC(),s=r,c=a;return i&&(s=i.width>0?i.width:r,c=i.height>0?i.height:a),b.useEffect(()=>{!n&&Pi(s)&&Pi(c)&&t(ple({width:s,height:c}))},[t,n,s,c]),null},d6=Symbol.for("immer-nothing"),Ek=Symbol.for("immer-draftable"),ra=Symbol.for("immer-state");function Ha(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fh=Object.getPrototypeOf;function Of(e){return!!e&&!!e[ra]}function Oc(e){var t;return e?h6(e)||Array.isArray(e)||!!e[Ek]||!!((t=e.constructor)!=null&&t[Ek])||Dm(e)||$0(e):!1}var fce=Object.prototype.constructor.toString(),_k=new WeakMap;function h6(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=_k.get(n);return r===void 0&&(r=Function.toString.call(n),_k.set(n,r)),r===fce}function iy(e,t,n=!0){z0(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function z0(e){const t=e[ra];return t?t.type_:Array.isArray(e)?1:Dm(e)?2:$0(e)?3:0}function o_(e,t){return z0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function m6(e,t,n){const r=z0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function dce(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Dm(e){return e instanceof Map}function $0(e){return e instanceof Set}function Vl(e){return e.copy_||e.base_}function s_(e,t){if(Dm(e))return new Map(e);if($0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=h6(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ra];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],c=r[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(Fh(e),r)}else{const r=Fh(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function BC(e,t=!1){return B0(e)||Of(e)||!Oc(e)||(z0(e)>1&&Object.defineProperties(e,{set:Uv,add:Uv,clear:Uv,delete:Uv}),Object.freeze(e),t&&Object.values(e).forEach(n=>BC(n,!0))),e}function hce(){Ha(2)}var Uv={value:hce};function B0(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var mce={};function Ac(e){const t=mce[e];return t||Ha(0,e),t}var qh;function p6(){return qh}function pce(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jk(e,t){t&&(Ac("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function l_(e){c_(e),e.drafts_.forEach(vce),e.drafts_=null}function c_(e){e===qh&&(qh=e.parent_)}function Ck(e){return qh=pce(qh,e)}function vce(e){const t=e[ra];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ok(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ra].modified_&&(l_(t),Ha(4)),Oc(e)&&(e=oy(t,e),t.parent_||sy(t,e)),t.patches_&&Ac("Patches").generateReplacementPatches_(n[ra].base_,e,t.patches_,t.inversePatches_)):e=oy(t,n,[]),l_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==d6?e:void 0}function oy(e,t,n){if(B0(t))return t;const r=e.immer_.shouldUseStrictIteration(),a=t[ra];if(!a)return iy(t,(i,s)=>Ak(e,a,t,i,s,n),r),t;if(a.scope_!==e)return t;if(!a.modified_)return sy(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let s=i,c=!1;a.type_===3&&(s=new Set(i),i.clear(),c=!0),iy(s,(f,u)=>Ak(e,a,i,f,u,n,c),r),sy(e,i,!1),n&&e.patches_&&Ac("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function Ak(e,t,n,r,a,i,s){if(a==null||typeof a!="object"&&!s)return;const c=B0(a);if(!(c&&!s)){if(Of(a)){const f=i&&t&&t.type_!==3&&!o_(t.assigned_,r)?i.concat(r):void 0,u=oy(e,a,f);if(m6(n,r,u),Of(u))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(Oc(a)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===a&&c)return;oy(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Dm(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&sy(e,a)}}}function sy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BC(t,n)}function gce(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:p6(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=UC;n&&(a=[r],i=Kh);const{revoke:s,proxy:c}=Proxy.revocable(a,i);return r.draft_=c,r.revoke_=s,c}var UC={get(e,t){if(t===ra)return e;const n=Vl(e);if(!o_(n,t))return yce(e,n,t);const r=n[t];return e.finalized_||!Oc(r)?r:r===uS(e.base_,t)?(fS(e),e.copy_[t]=f_(r,e)):r},has(e,t){return t in Vl(e)},ownKeys(e){return Reflect.ownKeys(Vl(e))},set(e,t,n){const r=v6(Vl(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=uS(Vl(e),t),i=a==null?void 0:a[ra];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(dce(n,a)&&(n!==void 0||o_(e.base_,t)))return!0;fS(e),u_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return uS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fS(e),u_(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ha(11)},getPrototypeOf(e){return Fh(e.base_)},setPrototypeOf(){Ha(12)}},Kh={};iy(UC,(e,t)=>{Kh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Kh.deleteProperty=function(e,t){return Kh.set.call(this,e,t,void 0)};Kh.set=function(e,t,n){return UC.set.call(this,e[0],t,n,e[0])};function uS(e,t){const n=e[ra];return(n?Vl(n):e)[t]}function yce(e,t,n){var a;const r=v6(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function v6(e,t){if(!(t in e))return;let n=Fh(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Fh(n)}}function u_(e){e.modified_||(e.modified_=!0,e.parent_&&u_(e.parent_))}function fS(e){e.copy_||(e.copy_=s_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bce=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(f=i,...u){return s.produce(f,m=>n.call(this,m,...u))}}typeof n!="function"&&Ha(6),r!==void 0&&typeof r!="function"&&Ha(7);let a;if(Oc(t)){const i=Ck(this),s=f_(t,void 0);let c=!0;try{a=n(s),c=!1}finally{c?l_(i):c_(i)}return jk(i,r),Ok(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===d6&&(a=void 0),this.autoFreeze_&&BC(a,!0),r){const i=[],s=[];Ac("Patches").generateReplacementPatches_(t,a,i,s),r(i,s)}return a}else Ha(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,f=>t(f,...c));let r,a;return[this.produce(t,n,(s,c)=>{r=s,a=c}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Oc(e)||Ha(8),Of(e)&&(e=xce(e));const t=Ck(this),n=f_(e,void 0);return n[ra].isManual_=!0,c_(t),n}finishDraft(e,t){const n=e&&e[ra];(!n||!n.isManual_)&&Ha(9);const{scope_:r}=n;return jk(r,t),Ok(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=Ac("Patches").applyPatches_;return Of(e)?r(e,t):this.produce(e,a=>r(a,t))}};function f_(e,t){const n=Dm(e)?Ac("MapSet").proxyMap_(e,t):$0(e)?Ac("MapSet").proxySet_(e,t):gce(e,t);return(t?t.scope_:p6()).drafts_.push(n),n}function xce(e){return Of(e)||Ha(10,e),g6(e)}function g6(e){if(!Oc(e)||B0(e))return e;const t=e[ra];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=s_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=s_(e,!0);return iy(n,(a,i)=>{m6(n,a,g6(i))},r),t&&(t.finalized_=!1),n}var wce=new bce;wce.produce;var Sce={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},y6=hr({name:"legend",initialState:Sce,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Dt()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,a=_a(e).payload.indexOf(n);a>-1&&(e.payload[a]=r)},prepare:Dt()},removeLegendPayload:{reducer(e,t){var n=_a(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Dt()}}}),{setLegendSize:Nk,setLegendSettings:Ece,addLegendPayload:b6,replaceLegendPayload:x6,removeLegendPayload:w6}=y6.actions,_ce=y6.reducer,dS={exports:{}},hS={};/**
 * @license React
 * use-sync-external-store-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 Tk;function jce(){if(Tk)return hS;Tk=1;var e=Uf();function t(f,u){return f===u&&(f!==0||1/f===1/u)||f!==f&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,c=e.useDebugValue;return hS.useSyncExternalStoreWithSelector=function(f,u,m,h,p){var y=a(null);if(y.current===null){var w={hasValue:!1,value:null};y.current=w}else w=y.current;y=s(function(){function S(N){if(!E){if(E=!0,O=N,N=h(N),p!==void 0&&w.hasValue){var T=w.value;if(p(T,N))return C=T}return C=N}if(T=C,n(O,N))return T;var P=h(N);return p!==void 0&&p(T,P)?(O=N,T):(O=N,C=P)}var E=!1,O,C,A=m===void 0?null:m;return[function(){return S(u())},A===null?void 0:function(){return S(A())}]},[u,m,h,p]);var x=r(f,y[0],y[1]);return i(function(){w.hasValue=!0,w.value=x},[x]),c(x),x},hS}var Pk;function Cce(){return Pk||(Pk=1,dS.exports=jce()),dS.exports}Cce();function Oce(e){e()}function Ace(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Oce(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!r||e===null||(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var Mk={notify(){},get:()=>[]};function Nce(e,t){let n,r=Mk,a=0,i=!1;function s(x){m();const S=r.subscribe(x);let E=!1;return()=>{E||(E=!0,S(),h())}}function c(){r.notify()}function f(){w.onStateChange&&w.onStateChange()}function u(){return i}function m(){a++,n||(n=e.subscribe(f),r=Ace())}function h(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=Mk)}function p(){i||(i=!0,m())}function y(){i&&(i=!1,h())}const w={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:u,trySubscribe:p,tryUnsubscribe:y,getListeners:()=>r};return w}var Tce=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pce=Tce(),Mce=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Rce=Mce(),kce=()=>Pce||Rce?b.useLayoutEffect:b.useEffect,Dce=kce();function Rk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Ice(e,t){if(Rk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Rk(e[n[a]],t[n[a]]))return!1;return!0}var mS=Symbol.for("react-redux-context"),pS=typeof globalThis<"u"?globalThis:{};function Lce(){if(!b.createContext)return{};const e=pS[mS]??(pS[mS]=new Map);let t=e.get(b.createContext);return t||(t=b.createContext(null),e.set(b.createContext,t)),t}var zce=Lce();function $ce(e){const{children:t,context:n,serverState:r,store:a}=e,i=b.useMemo(()=>{const f=Nce(a);return{store:a,subscription:f,getServerState:r?()=>r:void 0}},[a,r]),s=b.useMemo(()=>a.getState(),[a]);Dce(()=>{const{subscription:f}=i;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),s!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[i,s]);const c=n||zce;return b.createElement(c.Provider,{value:i},t)}var Bce=$ce,Uce=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Hce(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Jf(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Uce.has(r)){if(e[r]==null&&t[r]==null)continue;if(!Ice(e[r],t[r]))return!1}else if(!Hce(e[r],t[r]))return!1;return!0}var Fce=["contextPayload"];function d_(){return d_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d_.apply(null,arguments)}function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Af(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(n),!0).forEach(function(r){qce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qce(e,t,n){return(t=Kce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kce(e){var t=Vce(e,"string");return typeof t=="symbol"?t:t+""}function Vce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yce(e,t){if(e==null)return{};var n,r,a=Gce(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Gce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xce(e){return e.value}function Wce(e){var{contextPayload:t}=e,n=Yce(e,Fce),r=y8(t,e.payloadUniqBy,Xce),a=Af(Af({},n),{},{payload:r});return b.isValidElement(e.content)?b.cloneElement(e.content,a):typeof e.content=="function"?b.createElement(e.content,a):b.createElement(_oe,a)}function Qce(e,t,n,r,a,i){var{layout:s,align:c,verticalAlign:f}=t,u,m;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&s==="vertical"?u={left:((r||0)-i.width)/2}:u=c==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(f==="middle"?m={top:((a||0)-i.height)/2}:m=f==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Af(Af({},u),m)}function Zce(e){var t=Ct();return b.useEffect(()=>{t(Ece(e))},[t,e]),null}function Jce(e){var t=Ct();return b.useEffect(()=>(t(Nk(e)),()=>{t(Nk({width:0,height:0}))}),[t,e]),null}function eue(e,t,n,r){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:n||r}:null}var tue={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function nue(e){var t=yn(e,tue),n=gse(),r=vie(),a=cce(),{width:i,height:s,wrapperStyle:c,portal:f}=t,[u,m]=_8([n]),h=zC(),p=$C();if(h==null||p==null)return null;var y=h-((a==null?void 0:a.left)||0)-((a==null?void 0:a.right)||0),w=eue(t.layout,s,i,y),x=f?c:Af(Af({position:"absolute",width:(w==null?void 0:w.width)||i||"auto",height:(w==null?void 0:w.height)||s||"auto"},Qce(c,t,a,h,p,u)),c),S=f??r;if(S==null||n==null)return null;var E=b.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:m},b.createElement(Zce,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&b.createElement(Jce,{width:u.width,height:u.height}),b.createElement(Wce,d_({},t,w,{margin:a,chartWidth:h,chartHeight:p,contextPayload:n})));return cl.createPortal(E,S)}var S6=b.memo(nue,Jf);S6.displayName="Legend";function h_(){return h_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h_.apply(null,arguments)}function Dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dk(Object(n),!0).forEach(function(r){rue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rue(e,t,n){return(t=aue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aue(e){var t=iue(e,"string");return typeof t=="symbol"?t:t+""}function iue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oue(e){return Array.isArray(e)&&Ti(e[0])&&Ti(e[1])?e.join(" ~ "):e}var Iu={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function sue(e,t){return t==null?e:E0(e,t)}var lue=e=>{var{separator:t=Iu.separator,contentStyle:n,itemStyle:r,labelStyle:a=Iu.labelStyle,payload:i,formatter:s,itemSorter:c,wrapperClassName:f,labelClassName:u,label:m,labelFormatter:h,accessibilityLayer:p=Iu.accessibilityLayer}=e,y=()=>{if(i&&i.length){var N={padding:0,margin:0},T=sue(i,c),P=T.map((k,D)=>{if(k.type==="none")return null;var K=k.formatter||s||oue,{value:L,name:I}=k,W=L,$=I;if(K){var V=K(L,I,k,D,i);if(Array.isArray(V))[W,$]=V;else if(V!=null)W=V;else return null}var R=sh(sh({},Iu.itemStyle),{},{color:k.color||Iu.itemStyle.color},r);return b.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:R},Ti($)?b.createElement("span",{className:"recharts-tooltip-item-name"},$):null,Ti($)?b.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,b.createElement("span",{className:"recharts-tooltip-item-value"},W),b.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return b.createElement("ul",{className:"recharts-tooltip-item-list",style:N},P)}return null},w=sh(sh({},Iu.contentStyle),n),x=sh({margin:0},a),S=!Ht(m),E=S?m:"",O=st("recharts-default-tooltip",f),C=st("recharts-tooltip-label",u);S&&h&&i!==void 0&&i!==null&&(E=h(m,i));var A=p?{role:"status","aria-live":"assertive"}:{};return b.createElement("div",h_({className:O,style:w},A),b.createElement("p",{className:C,style:x},b.isValidElement(E)?E:"".concat(E)),y())},lh="recharts-tooltip-wrapper",cue={visibility:"hidden"};function uue(e){var{coordinate:t,translateX:n,translateY:r}=e;return st(lh,{["".concat(lh,"-right")]:_e(n)&&t&&_e(t.x)&&n>=t.x,["".concat(lh,"-left")]:_e(n)&&t&&_e(t.x)&&n<t.x,["".concat(lh,"-bottom")]:_e(r)&&t&&_e(t.y)&&r>=t.y,["".concat(lh,"-top")]:_e(r)&&t&&_e(t.y)&&r<t.y})}function Ik(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:a,position:i,reverseDirection:s,tooltipDimension:c,viewBox:f,viewBoxDimension:u}=e;if(i&&_e(i[r]))return i[r];var m=n[r]-c-(a>0?a:0),h=n[r]+a;if(t[r])return s[r]?m:h;var p=f[r];if(p==null)return 0;if(s[r]){var y=m,w=p;return y<w?Math.max(h,p):Math.max(m,p)}if(u==null)return 0;var x=h+c,S=p+u;return x>S?Math.max(m,p):Math.max(h,p)}function fue(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function due(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:a,position:i,reverseDirection:s,tooltipBox:c,useTranslate3d:f,viewBox:u}=e,m,h,p;return c.height>0&&c.width>0&&n?(h=Ik({allowEscapeViewBox:t,coordinate:n,key:"x",offset:a,position:i,reverseDirection:s,tooltipDimension:c.width,viewBox:u,viewBoxDimension:u.width}),p=Ik({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:i,reverseDirection:s,tooltipDimension:c.height,viewBox:u,viewBoxDimension:u.height}),m=fue({translateX:h,translateY:p,useTranslate3d:f})):m=cue,{cssProperties:m,cssClasses:uue({translateX:h,translateY:p,coordinate:n})}}var hue=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Im={isSsr:hue()};function E6(){var[e,t]=b.useState(()=>Im.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return b.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function Lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(n),!0).forEach(function(r){mue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mue(e,t,n){return(t=pue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pue(e){var t=vue(e,"string");return typeof t=="symbol"?t:t+""}function vue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gue(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function yue(e){var t,n,r,a,i,s,c=E6(),[f,u]=b.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));b.useEffect(()=>{var w=x=>{if(x.key==="Escape"){var S,E,O,C;u({dismissed:!0,dismissedAtCoordinate:{x:(S=(E=e.coordinate)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S:0,y:(O=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&O!==void 0?O:0}})}};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),f.dismissed&&(((r=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&r!==void 0?r:0)!==f.dismissedAtCoordinate.x||((i=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)!==f.dismissedAtCoordinate.y)&&u(Lu(Lu({},f),{},{dismissed:!1}));var{cssClasses:m,cssProperties:h}=due({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),p=e.hasPortalFromProps?{}:Lu(Lu({transition:gue({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},h),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),y=Lu(Lu({},p),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return b.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:y,ref:e.innerRef},e.children)}var bue=b.memo(yue),_6=()=>{var e;return(e=Ne(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function m_(){return m_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m_.apply(null,arguments)}function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $k(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zk(Object(n),!0).forEach(function(r){xue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xue(e,t,n){return(t=wue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wue(e){var t=Sue(e,"string");return typeof t=="symbol"?t:t+""}function Sue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bk={curveBasisClosed:Die,curveBasisOpen:Iie,curveBasis:kie,curveBumpX:xie,curveBumpY:wie,curveLinearClosed:Lie,curveLinear:w0,curveMonotoneX:zie,curveMonotoneY:$ie,curveNatural:Bie,curveStep:Uie,curveStepAfter:Fie,curveStepBefore:Hie},ly=e=>it(e.x)&&it(e.y),Uk=e=>e.base!=null&&ly(e.base)&&ly(e),ch=e=>e.x,uh=e=>e.y,Eue=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Nm(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=Bk["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return Bk[n]||w0},Hk={connectNulls:!1,type:"linear"},_ue=e=>{var{type:t=Hk.type,points:n=[],baseLine:r,layout:a,connectNulls:i=Hk.connectNulls}=e,s=Eue(t,a),c=i?n.filter(ly):n;if(Array.isArray(r)){var f,u=n.map((w,x)=>$k($k({},w),{},{base:r[x]}));a==="vertical"?f=kv().y(uh).x1(ch).x0(w=>w.base.x):f=kv().x(ch).y1(uh).y0(w=>w.base.y);var m=f.defined(Uk).curve(s),h=i?u.filter(Uk):u;return m(h)}var p;a==="vertical"&&_e(r)?p=kv().y(uh).x1(ch).x0(r):_e(r)?p=kv().x(ch).y1(uh).y0(r):p=VB().x(ch).y(uh);var y=p.defined(ly).curve(s);return y(c)},HC=e=>{var{className:t,points:n,path:r,pathRef:a}=e,i=Vc();if((!n||!n.length)&&!r)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},c=n&&n.length?_ue(s):r;return b.createElement("path",m_({},ta(e),jC(e),{className:st("recharts-curve",t),d:c===null?void 0:c,ref:a}))},jue=["x","y","top","left","width","height","className"];function p_(){return p_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p_.apply(null,arguments)}function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Cue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(n),!0).forEach(function(r){Oue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oue(e,t,n){return(t=Aue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aue(e){var t=Nue(e,"string");return typeof t=="symbol"?t:t+""}function Nue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tue(e,t){if(e==null)return{};var n,r,a=Pue(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Pue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Mue=(e,t,n,r,a,i)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),Rue=e=>{var{x:t=0,y:n=0,top:r=0,left:a=0,width:i=0,height:s=0,className:c}=e,f=Tue(e,jue),u=Cue({x:t,y:n,top:r,left:a,width:i,height:s},f);return!_e(t)||!_e(n)||!_e(i)||!_e(s)||!_e(r)||!_e(a)?null:b.createElement("path",p_({},br(u),{className:st("recharts-cross",c),d:Mue(t,n,i,s,r,a)}))};function kue(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(n),!0).forEach(function(r){Due(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Due(e,t,n){return(t=Iue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iue(e){var t=Lue(e,"string");return typeof t=="symbol"?t:t+""}function Lue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zue=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),j6=(e,t,n)=>e.map(r=>"".concat(zue(r)," ").concat(t,"ms ").concat(n)).join(","),$ue=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(a=>r.includes(a))),Vh=(e,t)=>Object.keys(t).reduce((n,r)=>Kk(Kk({},n),{},{[r]:e(r,t[r])}),{});function Vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(n),!0).forEach(function(r){Bue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bue(e,t,n){return(t=Uue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uue(e){var t=Hue(e,"string");return typeof t=="symbol"?t:t+""}function Hue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cy=(e,t,n)=>e+(t-e)*n,v_=e=>{var{from:t,to:n}=e;return t!==n},C6=(e,t,n)=>{var r=Vh((a,i)=>{if(v_(i)){var[s,c]=e(i.from,i.to,i.velocity);return Cn(Cn({},i),{},{from:s,velocity:c})}return i},t);return n<1?Vh((a,i)=>v_(i)&&r[a]!=null?Cn(Cn({},i),{},{velocity:cy(i.velocity,r[a].velocity,n),from:cy(i.from,r[a].from,n)}):i,t):C6(e,r,n-1)};function Fue(e,t,n,r,a,i){var s,c=r.reduce((p,y)=>Cn(Cn({},p),{},{[y]:{from:e[y],velocity:0,to:t[y]}}),{}),f=()=>Vh((p,y)=>y.from,c),u=()=>!Object.values(c).filter(v_).length,m=null,h=p=>{s||(s=p);var y=p-s,w=y/n.dt;c=C6(n,c,w),a(Cn(Cn(Cn({},e),t),f())),s=p,u()||(m=i.setTimeout(h))};return()=>(m=i.setTimeout(h),()=>{var p;(p=m)===null||p===void 0||p()})}function que(e,t,n,r,a,i,s){var c=null,f=a.reduce((h,p)=>{var y=e[p],w=t[p];return y==null||w==null?h:Cn(Cn({},h),{},{[p]:[y,w]})},{}),u,m=h=>{u||(u=h);var p=(h-u)/r,y=Vh((x,S)=>cy(...S,n(p)),f);if(i(Cn(Cn(Cn({},e),t),y)),p<1)c=s.setTimeout(m);else{var w=Vh((x,S)=>cy(...S,n(1)),f);i(Cn(Cn(Cn({},e),t),w))}};return()=>(c=s.setTimeout(m),()=>{var h;(h=c)===null||h===void 0||h()})}const Kue=(e,t,n,r,a,i)=>{var s=$ue(e,t);return n==null?()=>(a(Cn(Cn({},e),t)),()=>{}):n.isStepper===!0?Fue(e,t,n,s,a,i):que(e,t,n,r,s,a,i)};var uy=1e-4,O6=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],A6=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Yk=(e,t)=>n=>{var r=O6(e,t);return A6(r,n)},Vue=(e,t)=>n=>{var r=O6(e,t),a=[...r.map((i,s)=>i*s).slice(1),0];return A6(a,n)},Yue=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var a=r.map(i=>parseFloat(i));return[a[0],a[1],a[2],a[3]]},Gue=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=Yue(n[0]);if(a)return a}}return n.length===4?n:[0,0,1,1]},Xue=(e,t,n,r)=>{var a=Yk(e,n),i=Yk(t,r),s=Vue(e,n),c=u=>u>1?1:u<0?0:u,f=u=>{for(var m=u>1?1:u,h=m,p=0;p<8;++p){var y=a(h)-m,w=s(h);if(Math.abs(y-m)<uy||w<uy)return i(h);h=c(h-y/w)}return i(h)};return f.isStepper=!1,f},Gk=function(){return Xue(...Gue(...arguments))},Wue=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:a=17}=t,i=(s,c,f)=>{var u=-(s-c)*n,m=f*r,h=f+(u-m)*a/1e3,p=f*a/1e3+s;return Math.abs(p-c)<uy&&Math.abs(h)<uy?[c,0]:[p,h]};return i.isStepper=!0,i.dt=a,i},Que=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Gk(e);case"spring":return Wue();default:if(e.split("(")[0]==="cubic-bezier")return Gk(e)}return typeof e=="function"?e:null};function Zue(e){var t,n=()=>null,r=!1,a=null,i=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var c=s,[f,...u]=c;if(typeof f=="number"){a=e.setTimeout(i.bind(null,u),f);return}i(f),a=e.setTimeout(i.bind(null,u));return}typeof s=="string"&&(t=s,n(t)),typeof s=="object"&&(t=s,n(t)),typeof s=="function"&&s()}};return{stop:()=>{r=!0},start:s=>{r=!1,a&&(a(),a=null),i(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class Jue{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),a=null,i=s=>{s-r>=n?t(s):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(i))};return a=requestAnimationFrame(i),()=>{a!=null&&cancelAnimationFrame(a)}}}function efe(){return Zue(new Jue)}var tfe=b.createContext(efe);function nfe(e,t){var n=b.useContext(tfe);return b.useMemo(()=>t??n(e),[e,t,n])}var rfe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Xk={t:0},vS={t:1};function Lm(e){var t=yn(e,rfe),{isActive:n,canBegin:r,duration:a,easing:i,begin:s,onAnimationEnd:c,onAnimationStart:f,children:u}=t,m=E6(),h=n==="auto"?!Im.isSsr&&!m:n,p=nfe(t.animationId,t.animationManager),[y,w]=b.useState(h?Xk:vS),x=b.useRef(null);return b.useEffect(()=>{h||w(vS)},[h]),b.useEffect(()=>{if(!h||!r)return hl;var S=Kue(Xk,vS,Que(i),a,w,p.getTimeoutController()),E=()=>{x.current=S()};return p.start([f,s,E,a,c]),()=>{p.stop(),x.current&&x.current(),c()}},[h,r,a,i,s,f,c,p]),u(y.t)}function zm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=b.useRef($h(t)),r=b.useRef(e);return r.current!==e&&(n.current=$h(t),r.current=e),n.current}var afe=["radius"],ife=["radius"],Wk,Qk,Zk,Jk,eD,tD,nD,rD,aD,iD;function oD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oD(Object(n),!0).forEach(function(r){ofe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ofe(e,t,n){return(t=sfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sfe(e){var t=lfe(e,"string");return typeof t=="symbol"?t:t+""}function lfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fy.apply(null,arguments)}function lD(e,t){if(e==null)return{};var n,r,a=cfe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function cfe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var cD=(e,t,n,r,a)=>{var i=Gs(n),s=Gs(r),c=Math.min(Math.abs(i)/2,Math.abs(s)/2),f=s>=0?1:-1,u=i>=0?1:-1,m=s>=0&&i>=0||s<0&&i<0?1:0,h;if(c>0&&Array.isArray(a)){for(var p=[0,0,0,0],y=0,w=4;y<w;y++){var x,S=(x=a[y])!==null&&x!==void 0?x:0;p[y]=S>c?c:S}h=Jt(Wk||(Wk=hi(["M",",",""])),e,t+f*p[0]),p[0]>0&&(h+=Jt(Qk||(Qk=hi(["A ",",",",0,0,",",",",",""])),p[0],p[0],m,e+u*p[0],t)),h+=Jt(Zk||(Zk=hi(["L ",",",""])),e+n-u*p[1],t),p[1]>0&&(h+=Jt(Jk||(Jk=hi(["A ",",",",0,0,",`,
        `,",",""])),p[1],p[1],m,e+n,t+f*p[1])),h+=Jt(eD||(eD=hi(["L ",",",""])),e+n,t+r-f*p[2]),p[2]>0&&(h+=Jt(tD||(tD=hi(["A ",",",",0,0,",`,
        `,",",""])),p[2],p[2],m,e+n-u*p[2],t+r)),h+=Jt(nD||(nD=hi(["L ",",",""])),e+u*p[3],t+r),p[3]>0&&(h+=Jt(rD||(rD=hi(["A ",",",",0,0,",`,
        `,",",""])),p[3],p[3],m,e,t+r-f*p[3])),h+="Z"}else if(c>0&&a===+a&&a>0){var E=Math.min(c,a);h=Jt(aD||(aD=hi(["M ",",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",","," Z"])),e,t+f*E,E,E,m,e+u*E,t,e+n-u*E,t,E,E,m,e+n,t+f*E,e+n,t+r-f*E,E,E,m,e+n-u*E,t+r,e+u*E,t+r,E,E,m,e,t+r-f*E)}else h=Jt(iD||(iD=hi(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return h},uD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},N6=e=>{var t=yn(e,uD),n=b.useRef(null),[r,a]=b.useState(-1);b.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var H=n.current.getTotalLength();H&&a(H)}catch{}},[]);var{x:i,y:s,width:c,height:f,radius:u,className:m}=t,{animationEasing:h,animationDuration:p,animationBegin:y,isAnimationActive:w,isUpdateAnimationActive:x}=t,S=b.useRef(c),E=b.useRef(f),O=b.useRef(i),C=b.useRef(s),A=b.useMemo(()=>({x:i,y:s,width:c,height:f,radius:u}),[i,s,c,f,u]),N=zm(A,"rectangle-");if(i!==+i||s!==+s||c!==+c||f!==+f||c===0||f===0)return null;var T=st("recharts-rectangle",m);if(!x){var P=br(t),{radius:k}=P,D=lD(P,afe);return b.createElement("path",fy({},D,{x:Gs(i),y:Gs(s),width:Gs(c),height:Gs(f),radius:typeof u=="number"?u:void 0,className:T,d:cD(i,s,c,f,u)}))}var K=S.current,L=E.current,I=O.current,W=C.current,$="0px ".concat(r===-1?1:r,"px"),V="".concat(r,"px ").concat(r,"px"),R=j6(["strokeDasharray"],p,typeof h=="string"?h:uD.animationEasing);return b.createElement(Lm,{animationId:N,key:N,canBegin:r>0,duration:p,easing:h,isActive:x,begin:y},H=>{var q=$t(K,c,H),F=$t(L,f,H),Y=$t(I,i,H),B=$t(W,s,H);n.current&&(S.current=q,E.current=F,O.current=Y,C.current=B);var z;w?H>0?z={transition:R,strokeDasharray:V}:z={strokeDasharray:$}:z={strokeDasharray:V};var X=br(t),{radius:Z}=X,ee=lD(X,ife);return b.createElement("path",fy({},ee,{radius:typeof u=="number"?u:void 0,className:T,d:cD(Y,B,q,F,u),ref:n,style:sD(sD({},z),t.style)}))})};function fD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function dD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fD(Object(n),!0).forEach(function(r){ufe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ufe(e,t,n){return(t=ffe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ffe(e){var t=dfe(e,"string");return typeof t=="symbol"?t:t+""}function dfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dy=Math.PI/180,hfe=e=>e*180/Math.PI,mn=(e,t,n,r)=>({x:e+Math.cos(-dy*r)*n,y:t+Math.sin(-dy*r)*n}),T6=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},mfe=(e,t)=>{var{x:n,y:r}=e,{x:a,y:i}=t;return Math.sqrt((n-a)**2+(r-i)**2)},pfe=(e,t)=>{var{x:n,y:r}=e,{cx:a,cy:i}=t,s=mfe({x:n,y:r},{x:a,y:i});if(s<=0)return{radius:s,angle:0};var c=(n-a)/s,f=Math.acos(c);return r>i&&(f=2*Math.PI-f),{radius:s,angle:hfe(f),angleInRadian:f}},vfe=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-i*360,endAngle:n-i*360}},gfe=(e,t)=>{var{startAngle:n,endAngle:r}=t,a=Math.floor(n/360),i=Math.floor(r/360),s=Math.min(a,i);return e+s*360},yfe=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:a,angle:i}=pfe({x:n,y:r},t),{innerRadius:s,outerRadius:c}=t;if(a<s||a>c||a===0)return null;var{startAngle:f,endAngle:u}=vfe(t),m=i,h;if(f<=u){for(;m>u;)m-=360;for(;m<f;)m+=360;h=m>=f&&m<=u}else{for(;m>f;)m-=360;for(;m<u;)m+=360;h=m>=u&&m<=f}return h?dD(dD({},t),{},{radius:a,angle:gfe(m,t)}):null};function P6(e){var{cx:t,cy:n,radius:r,startAngle:a,endAngle:i}=e,s=mn(t,n,r,a),c=mn(t,n,r,i);return{points:[s,c],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}var hD,mD,pD,vD,gD,yD,bD;function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g_.apply(null,arguments)}function Wl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bfe=(e,t)=>{var n=In(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Hv=e=>{var{cx:t,cy:n,radius:r,angle:a,sign:i,isExternal:s,cornerRadius:c,cornerIsExternal:f}=e,u=c*(s?1:-1)+r,m=Math.asin(c/u)/dy,h=f?a:a+i*m,p=mn(t,n,u,h),y=mn(t,n,r,h),w=f?a-i*m:a,x=mn(t,n,u*Math.cos(m*dy),w);return{center:p,circleTangency:y,lineTangency:x,theta:m}},M6=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:i,endAngle:s}=e,c=bfe(i,s),f=i+c,u=mn(t,n,a,i),m=mn(t,n,a,f),h=Jt(hD||(hD=Wl(["M ",",",`
    A `,",",`,0,
    `,",",`,
    `,",",`
  `])),u.x,u.y,a,a,+(Math.abs(c)>180),+(i>f),m.x,m.y);if(r>0){var p=mn(t,n,r,i),y=mn(t,n,r,f);h+=Jt(mD||(mD=Wl(["L ",",",`
            A `,",",`,0,
            `,",",`,
            `,","," Z"])),y.x,y.y,r,r,+(Math.abs(c)>180),+(i<=f),p.x,p.y)}else h+=Jt(pD||(pD=Wl(["L ",","," Z"])),t,n);return h},xfe=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:c,startAngle:f,endAngle:u}=e,m=In(u-f),{circleTangency:h,lineTangency:p,theta:y}=Hv({cx:t,cy:n,radius:a,angle:f,sign:m,cornerRadius:i,cornerIsExternal:c}),{circleTangency:w,lineTangency:x,theta:S}=Hv({cx:t,cy:n,radius:a,angle:u,sign:-m,cornerRadius:i,cornerIsExternal:c}),E=c?Math.abs(f-u):Math.abs(f-u)-y-S;if(E<0)return s?Jt(vD||(vD=Wl(["M ",",",`
        a`,",",",0,0,1,",`,0
        a`,",",",0,0,1,",`,0
      `])),p.x,p.y,i,i,i*2,i,i,-i*2):M6({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:f,endAngle:u});var O=Jt(gD||(gD=Wl(["M ",",",`
    A`,",",",0,0,",",",",",`
    A`,",",",0,",",",",",",",`
    A`,",",",0,0,",",",",",`
  `])),p.x,p.y,i,i,+(m<0),h.x,h.y,a,a,+(E>180),+(m<0),w.x,w.y,i,i,+(m<0),x.x,x.y);if(r>0){var{circleTangency:C,lineTangency:A,theta:N}=Hv({cx:t,cy:n,radius:r,angle:f,sign:m,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),{circleTangency:T,lineTangency:P,theta:k}=Hv({cx:t,cy:n,radius:r,angle:u,sign:-m,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),D=c?Math.abs(f-u):Math.abs(f-u)-N-k;if(D<0&&i===0)return"".concat(O,"L").concat(t,",").concat(n,"Z");O+=Jt(yD||(yD=Wl(["L",",",`
      A`,",",",0,0,",",",",",`
      A`,",",",0,",",",",",",",`
      A`,",",",0,0,",",",",","Z"])),P.x,P.y,i,i,+(m<0),T.x,T.y,r,r,+(D>180),+(m>0),C.x,C.y,i,i,+(m<0),A.x,A.y)}else O+=Jt(bD||(bD=Wl(["L",",","Z"])),t,n);return O},wfe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},R6=e=>{var t=yn(e,wfe),{cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:s,forceCornerRadius:c,cornerIsExternal:f,startAngle:u,endAngle:m,className:h}=t;if(i<a||u===m)return null;var p=st("recharts-sector",h),y=i-a,w=fr(s,y,0,!0),x;return w>0&&Math.abs(u-m)<360?x=xfe({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(w,y/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:u,endAngle:m}):x=M6({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:m}),b.createElement("path",g_({},br(t),{className:p,d:x}))};function Sfe(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(s8(t)){if(e==="centric"){var{cx:r,cy:a,innerRadius:i,outerRadius:s,angle:c}=t,f=mn(r,a,i,c),u=mn(r,a,s,c);return[{x:f.x,y:f.y},{x:u.x,y:u.y}]}return P6(t)}}var gS={},yS={},bS={},xD;function Efe(){return xD||(xD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w8();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(bS)),bS}var wD;function _fe(){return wD||(wD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Efe();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(yS)),yS}var SD;function jfe(){return SD||(SD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=S8(),n=_fe();function r(a,i,s){s&&typeof s!="number"&&t.isIterateeCall(a,i,s)&&(i=s=void 0),a=n.toFinite(a),i===void 0?(i=a,a=0):i=n.toFinite(i),s=s===void 0?a<i?1:-1:n.toFinite(s);const c=Math.max(Math.ceil((i-a)/(s||1)),0),f=new Array(c);for(let u=0;u<c;u++)f[u]=a,a+=s;return f}e.range=r})(gS)),gS}var xS,ED;function Cfe(){return ED||(ED=1,xS=jfe().range),xS}var Ofe=Cfe();const k6=Qa(Ofe);var Ho=e=>e.chartData,U0=oe([Ho],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),FC=(e,t,n,r)=>r?U0(e):Ho(e),Afe=(e,t,n)=>n?U0(e):Ho(e);function Oi(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(it(t)&&it(n))return!0}return!1}function _D(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function D6(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,a,i;if(it(n))a=n;else if(typeof n=="function")return;if(it(r))i=r;else if(typeof r=="function")return;var s=[a,i];if(Oi(s))return s}}function Nfe(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Oi(r))return _D(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[a,i]=e,s,c;if(a==="auto")t!=null&&(s=Math.min(...t));else if(_e(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t==null?void 0:t[0]))}catch{}else if(typeof a=="string"&&hk.test(a)){var f=hk.exec(a);if(f==null||f[1]==null||t==null)s=void 0;else{var u=+f[1];s=t[0]-u}}else s=t==null?void 0:t[0];if(i==="auto")t!=null&&(c=Math.max(...t));else if(_e(i))c=i;else if(typeof i=="function")try{t!=null&&(c=i(t==null?void 0:t[1]))}catch{}else if(typeof i=="string"&&mk.test(i)){var m=mk.exec(i);if(m==null||m[1]==null||t==null)c=void 0;else{var h=+m[1];c=t[1]+h}}else c=t==null?void 0:t[1];var p=[s,c];if(Oi(p))return t==null?p:_D(p,t,n)}}}var ed=1e9,Tfe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},KC,Ut=!0,Oa="[DecimalError] ",fc=Oa+"Invalid argument: ",qC=Oa+"Exponent out of range: ",td=Math.floor,Yl=Math.pow,Pfe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wr,Dn=1e7,It=7,I6=9007199254740991,hy=td(I6/It),Ce={};Ce.absoluteValue=Ce.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ce.comparedTo=Ce.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};Ce.decimalPlaces=Ce.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*It;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ce.dividedBy=Ce.div=function(e){return xo(this,new this.constructor(e))};Ce.dividedToIntegerBy=Ce.idiv=function(e){var t=this,n=t.constructor;return At(xo(t,new n(e),0,1),n.precision)};Ce.equals=Ce.eq=function(e){return!this.cmp(e)};Ce.exponent=function(){return gn(this)};Ce.greaterThan=Ce.gt=function(e){return this.cmp(e)>0};Ce.greaterThanOrEqualTo=Ce.gte=function(e){return this.cmp(e)>=0};Ce.isInteger=Ce.isint=function(){return this.e>this.d.length-2};Ce.isNegative=Ce.isneg=function(){return this.s<0};Ce.isPositive=Ce.ispos=function(){return this.s>0};Ce.isZero=function(){return this.s===0};Ce.lessThan=Ce.lt=function(e){return this.cmp(e)<0};Ce.lessThanOrEqualTo=Ce.lte=function(e){return this.cmp(e)<1};Ce.logarithm=Ce.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Wr))throw Error(Oa+"NaN");if(n.s<1)throw Error(Oa+(n.s?"NaN":"-Infinity"));return n.eq(Wr)?new r(0):(Ut=!1,t=xo(Yh(n,i),Yh(e,i),i),Ut=!0,At(t,a))};Ce.minus=Ce.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$6(t,e):L6(t,(e.s=-e.s,e))};Ce.modulo=Ce.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Oa+"NaN");return n.s?(Ut=!1,t=xo(n,e,0,1).times(e),Ut=!0,n.minus(t)):At(new r(n),a)};Ce.naturalExponential=Ce.exp=function(){return z6(this)};Ce.naturalLogarithm=Ce.ln=function(){return Yh(this)};Ce.negated=Ce.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ce.plus=Ce.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?L6(t,e):$6(t,(e.s=-e.s,e))};Ce.precision=Ce.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(fc+e);if(t=gn(a)+1,r=a.d.length-1,n=r*It+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ce.squareRoot=Ce.sqrt=function(){var e,t,n,r,a,i,s,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(Oa+"NaN")}for(e=gn(c),Ut=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=_i(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=td((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(a.toString()),n=f.precision,a=s=n+3;;)if(i=r,r=i.plus(xo(c,i,s+2)).times(.5),_i(i.d).slice(0,s)===(t=_i(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(At(i,n+1,0),i.times(i).eq(c)){r=i;break}}else if(t!="9999")break;s+=4}return Ut=!0,At(r,n)};Ce.times=Ce.mul=function(e){var t,n,r,a,i,s,c,f,u,m=this,h=m.constructor,p=m.d,y=(e=new h(e)).d;if(!m.s||!e.s)return new h(0);for(e.s*=m.s,n=m.e+e.e,f=p.length,u=y.length,f<u&&(i=p,p=y,y=i,s=f,f=u,u=s),i=[],s=f+u,r=s;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=f+r;a>r;)c=i[a]+y[r]*p[a-r-1]+t,i[a--]=c%Dn|0,t=c/Dn|0;i[a]=(i[a]+t)%Dn|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Ut?At(e,h.precision):e};Ce.toDecimalPlaces=Ce.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Mi(e,0,ed),t===void 0?t=r.rounding:Mi(t,0,8),At(n,e+gn(n)+1,t))};Ce.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Nc(r,!0):(Mi(e,0,ed),t===void 0?t=a.rounding:Mi(t,0,8),r=At(new a(r),e+1,t),n=Nc(r,!0,e+1)),n};Ce.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?Nc(a):(Mi(e,0,ed),t===void 0?t=i.rounding:Mi(t,0,8),r=At(new i(a),e+gn(a)+1,t),n=Nc(r.abs(),!1,e+gn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Ce.toInteger=Ce.toint=function(){var e=this,t=e.constructor;return At(new t(e),gn(e)+1,t.rounding)};Ce.toNumber=function(){return+this};Ce.toPower=Ce.pow=function(e){var t,n,r,a,i,s,c=this,f=c.constructor,u=12,m=+(e=new f(e));if(!e.s)return new f(Wr);if(c=new f(c),!c.s){if(e.s<1)throw Error(Oa+"Infinity");return c}if(c.eq(Wr))return c;if(r=f.precision,e.eq(Wr))return At(c,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=c.s,s){if((n=m<0?-m:m)<=I6){for(a=new f(Wr),t=Math.ceil(r/It+4),Ut=!1;n%2&&(a=a.times(c),CD(a.d,t)),n=td(n/2),n!==0;)c=c.times(c),CD(c.d,t);return Ut=!0,e.s<0?new f(Wr).div(a):At(a,r)}}else if(i<0)throw Error(Oa+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,Ut=!1,a=e.times(Yh(c,r+u)),Ut=!0,a=z6(a),a.s=i,a};Ce.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=gn(a),r=Nc(a,n<=i.toExpNeg||n>=i.toExpPos)):(Mi(e,1,ed),t===void 0?t=i.rounding:Mi(t,0,8),a=At(new i(a),e,t),n=gn(a),r=Nc(a,e<=n||n<=i.toExpNeg,e)),r};Ce.toSignificantDigits=Ce.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Mi(e,1,ed),t===void 0?t=r.rounding:Mi(t,0,8)),At(new r(n),e,t)};Ce.toString=Ce.valueOf=Ce.val=Ce.toJSON=Ce[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=gn(e),n=e.constructor;return Nc(e,t<=n.toExpNeg||t>=n.toExpPos)};function L6(e,t){var n,r,a,i,s,c,f,u,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Ut?At(t,h):t;if(f=e.d,u=t.d,s=e.e,a=t.e,f=f.slice(),i=s-a,i){for(i<0?(r=f,i=-i,c=u.length):(r=u,a=s,c=f.length),s=Math.ceil(h/It),c=s>c?s+1:c+1,i>c&&(i=c,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(c=f.length,i=u.length,c-i<0&&(i=c,r=u,u=f,f=r),n=0;i;)n=(f[--i]=f[i]+u[i]+n)/Dn|0,f[i]%=Dn;for(n&&(f.unshift(n),++a),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=a,Ut?At(t,h):t}function Mi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(fc+e)}function _i(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)r=e[t]+"",n=It-r.length,n&&(i+=Rs(n)),i+=r;s=e[t],r=s+"",n=It-r.length,n&&(i+=Rs(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var xo=(function(){function e(r,a){var i,s=0,c=r.length;for(r=r.slice();c--;)i=r[c]*a+s,r[c]=i%Dn|0,s=i/Dn|0;return s&&r.unshift(s),r}function t(r,a,i,s){var c,f;if(i!=s)f=i>s?1:-1;else for(c=f=0;c<i;c++)if(r[c]!=a[c]){f=r[c]>a[c]?1:-1;break}return f}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]<a[i]?1:0,r[i]=s*Dn+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,s){var c,f,u,m,h,p,y,w,x,S,E,O,C,A,N,T,P,k,D=r.constructor,K=r.s==a.s?1:-1,L=r.d,I=a.d;if(!r.s)return new D(r);if(!a.s)throw Error(Oa+"Division by zero");for(f=r.e-a.e,P=I.length,N=L.length,y=new D(K),w=y.d=[],u=0;I[u]==(L[u]||0);)++u;if(I[u]>(L[u]||0)&&--f,i==null?O=i=D.precision:s?O=i+(gn(r)-gn(a))+1:O=i,O<0)return new D(0);if(O=O/It+2|0,u=0,P==1)for(m=0,I=I[0],O++;(u<N||m)&&O--;u++)C=m*Dn+(L[u]||0),w[u]=C/I|0,m=C%I|0;else{for(m=Dn/(I[0]+1)|0,m>1&&(I=e(I,m),L=e(L,m),P=I.length,N=L.length),A=P,x=L.slice(0,P),S=x.length;S<P;)x[S++]=0;k=I.slice(),k.unshift(0),T=I[0],I[1]>=Dn/2&&++T;do m=0,c=t(I,x,P,S),c<0?(E=x[0],P!=S&&(E=E*Dn+(x[1]||0)),m=E/T|0,m>1?(m>=Dn&&(m=Dn-1),h=e(I,m),p=h.length,S=x.length,c=t(h,x,p,S),c==1&&(m--,n(h,P<p?k:I,p))):(m==0&&(c=m=1),h=I.slice()),p=h.length,p<S&&h.unshift(0),n(x,h,S),c==-1&&(S=x.length,c=t(I,x,P,S),c<1&&(m++,n(x,P<S?k:I,S))),S=x.length):c===0&&(m++,x=[0]),w[u++]=m,c&&x[0]?x[S++]=L[A]||0:(x=[L[A]],S=1);while((A++<N||x[0]!==void 0)&&O--)}return w[0]||w.shift(),y.e=f,At(y,s?i+gn(y)+1:i)}})();function z6(e,t){var n,r,a,i,s,c,f=0,u=0,m=e.constructor,h=m.precision;if(gn(e)>16)throw Error(qC+gn(e));if(!e.s)return new m(Wr);for(Ut=!1,c=h,s=new m(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(r=Math.log(Yl(2,u))/Math.LN10*2+5|0,c+=r,n=a=i=new m(Wr),m.precision=c;;){if(a=At(a.times(e),c),n=n.times(++f),s=i.plus(xo(a,n,c)),_i(s.d).slice(0,c)===_i(i.d).slice(0,c)){for(;u--;)i=At(i.times(i),c);return m.precision=h,t==null?(Ut=!0,At(i,h)):i}i=s}}function gn(e){for(var t=e.e*It,n=e.d[0];n>=10;n/=10)t++;return t}function wS(e,t,n){if(t>e.LN10.sd())throw Ut=!0,n&&(e.precision=n),Error(Oa+"LN10 precision limit exceeded");return At(new e(e.LN10),t)}function Rs(e){for(var t="";e--;)t+="0";return t}function Yh(e,t){var n,r,a,i,s,c,f,u,m,h=1,p=10,y=e,w=y.d,x=y.constructor,S=x.precision;if(y.s<1)throw Error(Oa+(y.s?"NaN":"-Infinity"));if(y.eq(Wr))return new x(0);if(t==null?(Ut=!1,u=S):u=t,y.eq(10))return t==null&&(Ut=!0),wS(x,u);if(u+=p,x.precision=u,n=_i(w),r=n.charAt(0),i=gn(y),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)y=y.times(e),n=_i(y.d),r=n.charAt(0),h++;i=gn(y),r>1?(y=new x("0."+n),i++):y=new x(r+"."+n.slice(1))}else return f=wS(x,u+2,S).times(i+""),y=Yh(new x(r+"."+n.slice(1)),u-p).plus(f),x.precision=S,t==null?(Ut=!0,At(y,S)):y;for(c=s=y=xo(y.minus(Wr),y.plus(Wr),u),m=At(y.times(y),u),a=3;;){if(s=At(s.times(m),u),f=c.plus(xo(s,new x(a),u)),_i(f.d).slice(0,u)===_i(c.d).slice(0,u))return c=c.times(2),i!==0&&(c=c.plus(wS(x,u+2,S).times(i+""))),c=xo(c,new x(h),u),x.precision=S,t==null?(Ut=!0,At(c,S)):c;c=f,a+=2}}function jD(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=td(n/It),e.d=[],r=(n+1)%It,n<0&&(r+=It),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=It;r<a;)e.d.push(+t.slice(r,r+=It));t=t.slice(r),r=It-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Ut&&(e.e>hy||e.e<-hy))throw Error(qC+n)}else e.s=0,e.e=0,e.d=[0];return e}function At(e,t,n){var r,a,i,s,c,f,u,m,h=e.d;for(s=1,i=h[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=It,a=t,u=h[m=0];else{if(m=Math.ceil((r+1)/It),i=h.length,m>=i)return e;for(u=i=h[m],s=1;i>=10;i/=10)s++;r%=It,a=r-It+s}if(n!==void 0&&(i=Yl(10,s-a-1),c=u/i%10|0,f=t<0||h[m+1]!==void 0||u%i,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?a>0?u/Yl(10,s-a):0:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return f?(i=gn(e),h.length=1,t=t-i-1,h[0]=Yl(10,(It-t%It)%It),e.e=td(-t/It)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,i=1,m--):(h.length=m+1,i=Yl(10,It-r),h[m]=a>0?(u/Yl(10,s-a)%Yl(10,a)|0)*i:0),f)for(;;)if(m==0){(h[0]+=i)==Dn&&(h[0]=1,++e.e);break}else{if(h[m]+=i,h[m]!=Dn)break;h[m--]=0,i=1}for(r=h.length;h[--r]===0;)h.pop();if(Ut&&(e.e>hy||e.e<-hy))throw Error(qC+gn(e));return e}function $6(e,t){var n,r,a,i,s,c,f,u,m,h,p=e.constructor,y=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Ut?At(t,y):t;if(f=e.d,h=t.d,r=t.e,u=e.e,f=f.slice(),s=u-r,s){for(m=s<0,m?(n=f,s=-s,c=h.length):(n=h,r=u,c=f.length),a=Math.max(Math.ceil(y/It),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=f.length,c=h.length,m=a<c,m&&(c=a),a=0;a<c;a++)if(f[a]!=h[a]){m=f[a]<h[a];break}s=0}for(m&&(n=f,f=h,h=n,t.s=-t.s),c=f.length,a=h.length-c;a>0;--a)f[c++]=0;for(a=h.length;a>s;){if(f[--a]<h[a]){for(i=a;i&&f[--i]===0;)f[i]=Dn-1;--f[i],f[a]+=Dn}f[a]-=h[a]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,Ut?At(t,y):t):new p(0)}function Nc(e,t,n){var r,a=gn(e),i=_i(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+Rs(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Rs(-a-1)+i,n&&(r=n-s)>0&&(i+=Rs(r))):a>=s?(i+=Rs(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+Rs(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=Rs(r))),e.s<0?"-"+i:i}function CD(e,t){if(e.length>t)return e.length=t,!0}function B6(e){var t,n,r;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(fc+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return jD(s,i.toString())}else if(typeof i!="string")throw Error(fc+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,Pfe.test(i))jD(s,i);else throw Error(fc+i)}if(a.prototype=Ce,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=B6,a.config=a.set=Mfe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function Mfe(e){if(!e||typeof e!="object")throw Error(Oa+"Object expected");var t,n,r,a=["precision",1,ed,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(td(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(fc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(fc+n+": "+r);return this}var KC=B6(Tfe);Wr=new KC(1);const at=KC;function U6(e){var t;return e===0?t=1:t=Math.floor(new at(e).abs().log(10).toNumber())+1,t}function H6(e,t,n){for(var r=new at(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var F6=e=>{var[t,n]=e,[r,a]=[t,n];return t>n&&([r,a]=[n,t]),[r,a]},VC=(e,t,n)=>{if(e.lte(0))return new at(0);var r=U6(e.toNumber()),a=new at(10).pow(r),i=e.div(a),s=r!==1?.05:.1,c=new at(Math.ceil(i.div(s).toNumber())).add(n).mul(s),f=c.mul(a);return t?new at(f.toNumber()):new at(Math.ceil(f.toNumber()))},q6=(e,t,n)=>{var r;if(e.lte(0))return new at(0);var a=[1,2,2.5,5],i=e.toNumber(),s=Math.floor(new at(i).abs().log(10).toNumber()),c=new at(10).pow(s),f=e.div(c).toNumber(),u=a.findIndex(y=>y>=f-1e-10);if(u===-1&&(c=c.mul(10),u=0),u+=n,u>=a.length){var m=Math.floor(u/a.length);u%=a.length,c=c.mul(new at(10).pow(m))}var h=(r=a[u])!==null&&r!==void 0?r:1,p=new at(h).mul(c);return t?p:new at(Math.ceil(p.toNumber()))},Rfe=(e,t,n)=>{var r=new at(1),a=new at(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new at(10).pow(U6(e)-1),a=new at(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new at(Math.floor(e)))}else e===0?a=new at(Math.floor((t-1)/2)):n||(a=new at(Math.floor(e)));for(var s=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(a.add(new at(f-s).mul(r)).toNumber());return c},K6=function(t,n,r,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:VC;if(!Number.isFinite((n-t)/(r-1)))return{step:new at(0),tickMin:new at(0),tickMax:new at(0)};var c=s(new at(n).sub(t).div(r-1),a,i),f;t<=0&&n>=0?f=new at(0):(f=new at(t).add(n).div(2),f=f.sub(new at(f).mod(c)));var u=Math.ceil(f.sub(t).div(c).toNumber()),m=Math.ceil(new at(n).sub(f).div(c).toNumber()),h=u+m+1;return h>r?K6(t,n,r,a,i+1,s):(h<r&&(m=n>0?m+(r-h):m,u=n>0?u:u+(r-h)),{step:c,tickMin:f.sub(new at(u).mul(c)),tickMax:f.add(new at(m).mul(c))})},OD=function(t){var[n,r]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(a,2),[f,u]=F6([n,r]);if(f===-1/0||u===1/0){var m=u===1/0?[f,...Array(a-1).fill(1/0)]:[...Array(a-1).fill(-1/0),u];return n>r?m.reverse():m}if(f===u)return Rfe(f,a,i);var h=s==="snap125"?q6:VC,{step:p,tickMin:y,tickMax:w}=K6(f,u,c,i,0,h),x=H6(y,w.add(new at(.1).mul(p)),p);return n>r?x.reverse():x},AD=function(t,n){var[r,a]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=F6([r,a]);if(c===-1/0||f===1/0)return[r,a];if(c===f)return[c];var u=s==="snap125"?q6:VC,m=Math.max(n,2),h=u(new at(f).sub(c).div(m-1),i,0),p=[...H6(new at(c),new at(f),h),f];return i===!1&&(p=p.map(y=>Math.round(y))),r>a?p.reverse():p},V6=e=>e.rootProps.maxBarSize,kfe=e=>e.rootProps.barGap,Y6=e=>e.rootProps.barCategoryGap,Dfe=e=>e.rootProps.barSize,$m=e=>e.rootProps.stackOffset,G6=e=>e.rootProps.reverseStackOrder,YC=e=>e.options.chartName,GC=e=>e.rootProps.syncId,X6=e=>e.rootProps.syncMethod,XC=e=>e.options.eventEmitter,pn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Bl={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},mi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},H0=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function F0(e,t,n){if(n!=="auto")return n;if(e!=null)return $o(e,t)?"category":"number"}function ND(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(r){Ife(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ife(e,t,n){return(t=Lfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lfe(e){var t=zfe(e,"string");return typeof t=="symbol"?t:t+""}function zfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TD={allowDataOverflow:Bl.allowDataOverflow,allowDecimals:Bl.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Bl.angleAxisId,includeHidden:!1,name:void 0,reversed:Bl.reversed,scale:Bl.scale,tick:Bl.tick,tickCount:void 0,ticks:void 0,type:Bl.type,unit:void 0,niceTicks:"auto"},PD={allowDataOverflow:mi.allowDataOverflow,allowDecimals:mi.allowDecimals,allowDuplicatedCategory:mi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:mi.radiusAxisId,includeHidden:mi.includeHidden,name:void 0,reversed:mi.reversed,scale:mi.scale,tick:mi.tick,tickCount:mi.tickCount,ticks:void 0,type:mi.type,unit:void 0,niceTicks:"auto"},$fe=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},WC=oe([$fe,f6],(e,t)=>{var n;if(e!=null)return e;var r=(n=F0(t,"angleAxis",TD.type))!==null&&n!==void 0?n:"category";return my(my({},TD),{},{type:r})}),Bfe=(e,t)=>e.polarAxis.radiusAxis[t],QC=oe([Bfe,f6],(e,t)=>{var n;if(e!=null)return e;var r=(n=F0(t,"radiusAxis",PD.type))!==null&&n!==void 0?n:"category";return my(my({},PD),{},{type:r})}),q0=e=>e.polarOptions,ZC=oe([Bo,Uo,An],T6),W6=oe([q0,ZC],(e,t)=>{if(e!=null)return fr(e.innerRadius,t,0)}),Q6=oe([q0,ZC],(e,t)=>{if(e!=null)return fr(e.outerRadius,t,t*.8)}),Ufe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Z6=oe([q0],Ufe);oe([WC,Z6],H0);var J6=oe([ZC,W6,Q6],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});oe([QC,J6],H0);var eU=oe([dt,q0,W6,Q6,Bo,Uo],(e,t,n,r,a,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:s,cy:c,startAngle:f,endAngle:u}=t;return{cx:fr(s,a,a/2),cy:fr(c,i,i/2),innerRadius:n,outerRadius:r,startAngle:f,endAngle:u,clockWise:!1}}}),Yt=(e,t)=>t,Bm=(e,t,n)=>n;function JC(e){return e==null?void 0:e.id}function tU(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:a,dataKey:i}=n,s=new Map;return e.forEach(c=>{var f,u=(f=c.data)!==null&&f!==void 0?f:r;if(!(u==null||u.length===0)){var m=JC(c);u.forEach((h,p)=>{var y=i==null||a?p:String(_t(h,i,null)),w=_t(h,c.dataKey,0),x;s.has(y)?x=s.get(y):x={},Object.assign(x,{[m]:w}),s.set(y,x)})}}),Array.from(s.values())}function K0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var V0=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Y0(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Hfe(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Bn=e=>{var t=dt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},nd=e=>e.tooltip.settings.axisId;function eO(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),a=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(i){function s(){return i.apply(this,arguments)}return s.toString=function(){return i.toString()},s})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(i){var s=a[0],c=a[1];return s<=c?i>=s&&i<=c:i>=c&&i<=s},bandwidth:n?()=>n.call(e):void 0,ticks:t?i=>t.call(e,i):void 0,map:(i,s)=>{var c=e(i);if(c!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var f=e.bandwidth();switch(s.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var nU=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Oi(t)){for(var n,r,a=0;a<t.length;a++){var i=t[a];it(i)&&((n===void 0||i<n)&&(n=i),(r===void 0||i>r)&&(r=i))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function Ws(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ffe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tO(e){let t,n,r;e.length!==2?(t=Ws,n=(c,f)=>Ws(e(c),f),r=(c,f)=>e(c)-f):(t=e===Ws||e===Ffe?e:qfe,n=e,r=e);function a(c,f,u=0,m=c.length){if(u<m){if(t(f,f)!==0)return m;do{const h=u+m>>>1;n(c[h],f)<0?u=h+1:m=h}while(u<m)}return u}function i(c,f,u=0,m=c.length){if(u<m){if(t(f,f)!==0)return m;do{const h=u+m>>>1;n(c[h],f)<=0?u=h+1:m=h}while(u<m)}return u}function s(c,f,u=0,m=c.length){const h=a(c,f,u,m-1);return h>u&&r(c[h-1],f)>-r(c[h],f)?h-1:h}return{left:a,center:s,right:i}}function qfe(){return 0}function rU(e){return e===null?NaN:+e}function*Kfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Vfe=tO(Ws),Um=Vfe.right;tO(rU).center;class MD extends Map{constructor(t,n=Xfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(RD(this,t))}has(t){return super.has(RD(this,t))}set(t,n){return super.set(Yfe(this,t),n)}delete(t){return super.delete(Gfe(this,t))}}function RD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Yfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Gfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Xfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Wfe(e=Ws){if(e===Ws)return aU;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function aU(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Qfe=Math.sqrt(50),Zfe=Math.sqrt(10),Jfe=Math.sqrt(2);function py(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Qfe?10:i>=Zfe?5:i>=Jfe?2:1;let c,f,u;return a<0?(u=Math.pow(10,-a)/s,c=Math.round(e*u),f=Math.round(t*u),c/u<e&&++c,f/u>t&&--f,u=-u):(u=Math.pow(10,a)*s,c=Math.round(e/u),f=Math.round(t/u),c*u<e&&++c,f*u>t&&--f),f<c&&.5<=n&&n<2?py(e,t,n*2):[c,f,u]}function y_(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,s]=r?py(t,e,n):py(e,t,n);if(!(i>=a))return[];const c=i-a+1,f=new Array(c);if(r)if(s<0)for(let u=0;u<c;++u)f[u]=(i-u)/-s;else for(let u=0;u<c;++u)f[u]=(i-u)*s;else if(s<0)for(let u=0;u<c;++u)f[u]=(a+u)/-s;else for(let u=0;u<c;++u)f[u]=(a+u)*s;return f}function b_(e,t,n){return t=+t,e=+e,n=+n,py(e,t,n)[2]}function x_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?b_(t,e,n):b_(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function kD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function DD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function iU(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?aU:Wfe(a);r>n;){if(r-n>600){const f=r-n+1,u=t-n+1,m=Math.log(f),h=.5*Math.exp(2*m/3),p=.5*Math.sqrt(m*h*(f-h)/f)*(u-f/2<0?-1:1),y=Math.max(n,Math.floor(t-u*h/f+p)),w=Math.min(r,Math.floor(t+(f-u)*h/f+p));iU(e,t,y,w,a)}const i=e[t];let s=n,c=r;for(fh(e,n,t),a(e[r],i)>0&&fh(e,n,r);s<c;){for(fh(e,s,c),++s,--c;a(e[s],i)<0;)++s;for(;a(e[c],i)>0;)--c}a(e[n],i)===0?fh(e,n,c):(++c,fh(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function fh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ede(e,t,n){if(e=Float64Array.from(Kfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return DD(e);if(t>=1)return kD(e);var r,a=(r-1)*t,i=Math.floor(a),s=kD(iU(e,i).subarray(0,i+1)),c=DD(e.subarray(i+1));return s+(c-s)*(a-i)}}function tde(e,t,n=rU){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),c=+n(e[i+1],i+1,e);return s+(c-s)*(a-i)}}function nde(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function Ta(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Fo(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const w_=Symbol("implicit");function nO(){var e=new MD,t=[],n=[],r=w_;function a(i){let s=e.get(i);if(s===void 0){if(r!==w_)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new MD;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return nO(t,n).unknown(r)},Ta.apply(a,arguments),a}function rO(){var e=nO().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,c=!1,f=0,u=0,m=.5;delete e.unknown;function h(){var p=t().length,y=a<r,w=y?a:r,x=y?r:a;i=(x-w)/Math.max(1,p-f+u*2),c&&(i=Math.floor(i)),w+=(x-w-i*(p-f))*m,s=i*(1-f),c&&(w=Math.round(w),s=Math.round(s));var S=nde(p).map(function(E){return w+i*E});return n(y?S.reverse():S)}return e.domain=function(p){return arguments.length?(t(p),h()):t()},e.range=function(p){return arguments.length?([r,a]=p,r=+r,a=+a,h()):[r,a]},e.rangeRound=function(p){return[r,a]=p,r=+r,a=+a,c=!0,h()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(p){return arguments.length?(c=!!p,h()):c},e.padding=function(p){return arguments.length?(f=Math.min(1,u=+p),h()):f},e.paddingInner=function(p){return arguments.length?(f=Math.min(1,p),h()):f},e.paddingOuter=function(p){return arguments.length?(u=+p,h()):u},e.align=function(p){return arguments.length?(m=Math.max(0,Math.min(1,p)),h()):m},e.copy=function(){return rO(t(),[r,a]).round(c).paddingInner(f).paddingOuter(u).align(m)},Ta.apply(h(),arguments)}function oU(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oU(t())},e}function rde(){return oU(rO.apply(null,arguments).paddingInner(1))}function aO(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function sU(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Hm(){}var Gh=.7,vy=1/Gh,rf="\\s*([+-]?\\d+)\\s*",Xh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ade=/^#([0-9a-f]{3,8})$/,ide=new RegExp(`^rgb\\(${rf},${rf},${rf}\\)$`),ode=new RegExp(`^rgb\\(${Ai},${Ai},${Ai}\\)$`),sde=new RegExp(`^rgba\\(${rf},${rf},${rf},${Xh}\\)$`),lde=new RegExp(`^rgba\\(${Ai},${Ai},${Ai},${Xh}\\)$`),cde=new RegExp(`^hsl\\(${Xh},${Ai},${Ai}\\)$`),ude=new RegExp(`^hsla\\(${Xh},${Ai},${Ai},${Xh}\\)$`),ID={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};aO(Hm,Tc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:LD,formatHex:LD,formatHex8:fde,formatHsl:dde,formatRgb:zD,toString:zD});function LD(){return this.rgb().formatHex()}function fde(){return this.rgb().formatHex8()}function dde(){return lU(this).formatHsl()}function zD(){return this.rgb().formatRgb()}function Tc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ade.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$D(t):n===3?new Dr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ide.exec(e))?new Dr(t[1],t[2],t[3],1):(t=ode.exec(e))?new Dr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sde.exec(e))?Fv(t[1],t[2],t[3],t[4]):(t=lde.exec(e))?Fv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cde.exec(e))?HD(t[1],t[2]/100,t[3]/100,1):(t=ude.exec(e))?HD(t[1],t[2]/100,t[3]/100,t[4]):ID.hasOwnProperty(e)?$D(ID[e]):e==="transparent"?new Dr(NaN,NaN,NaN,0):null}function $D(e){return new Dr(e>>16&255,e>>8&255,e&255,1)}function Fv(e,t,n,r){return r<=0&&(e=t=n=NaN),new Dr(e,t,n,r)}function hde(e){return e instanceof Hm||(e=Tc(e)),e?(e=e.rgb(),new Dr(e.r,e.g,e.b,e.opacity)):new Dr}function S_(e,t,n,r){return arguments.length===1?hde(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}aO(Dr,S_,sU(Hm,{brighter(e){return e=e==null?vy:Math.pow(vy,e),new Dr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gh:Math.pow(Gh,e),new Dr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dr(dc(this.r),dc(this.g),dc(this.b),gy(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:BD,formatHex:BD,formatHex8:mde,formatRgb:UD,toString:UD}));function BD(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}`}function mde(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}${Ql((isNaN(this.opacity)?1:this.opacity)*255)}`}function UD(){const e=gy(this.opacity);return`${e===1?"rgb(":"rgba("}${dc(this.r)}, ${dc(this.g)}, ${dc(this.b)}${e===1?")":`, ${e})`}`}function gy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ql(e){return e=dc(e),(e<16?"0":"")+e.toString(16)}function HD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fa(e,t,n,r)}function lU(e){if(e instanceof Fa)return new Fa(e.h,e.s,e.l,e.opacity);if(e instanceof Hm||(e=Tc(e)),!e)return new Fa;if(e instanceof Fa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,c=i-a,f=(i+a)/2;return c?(t===i?s=(n-r)/c+(n<r)*6:n===i?s=(r-t)/c+2:s=(t-n)/c+4,c/=f<.5?i+a:2-i-a,s*=60):c=f>0&&f<1?0:s,new Fa(s,c,f,e.opacity)}function pde(e,t,n,r){return arguments.length===1?lU(e):new Fa(e,t,n,r??1)}function Fa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}aO(Fa,pde,sU(Hm,{brighter(e){return e=e==null?vy:Math.pow(vy,e),new Fa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gh:Math.pow(Gh,e),new Fa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Dr(SS(e>=240?e-240:e+120,a,r),SS(e,a,r),SS(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Fa(FD(this.h),qv(this.s),qv(this.l),gy(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 e=gy(this.opacity);return`${e===1?"hsl(":"hsla("}${FD(this.h)}, ${qv(this.s)*100}%, ${qv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FD(e){return e=(e||0)%360,e<0?e+360:e}function qv(e){return Math.max(0,Math.min(1,e||0))}function SS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const iO=e=>()=>e;function vde(e,t){return function(n){return e+n*t}}function gde(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function yde(e){return(e=+e)==1?cU:function(t,n){return n-t?gde(t,n,e):iO(isNaN(t)?n:t)}}function cU(e,t){var n=t-e;return n?vde(e,n):iO(isNaN(e)?t:e)}const yy=(function e(t){var n=yde(t);function r(a,i){var s=n((a=S_(a)).r,(i=S_(i)).r),c=n(a.g,i.g),f=n(a.b,i.b),u=cU(a.opacity,i.opacity);return function(m){return a.r=s(m),a.g=c(m),a.b=f(m),a.opacity=u(m),a+""}}return r.gamma=e,r})(1);function bde(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function xde(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function wde(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=wo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(c){for(s=0;s<r;++s)i[s]=a[s](c);return i}}function Sde(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ba(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ede(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=wo(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var E_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ES=new RegExp(E_.source,"g");function _de(e){return function(){return e}}function jde(e){return function(t){return e(t)+""}}function uU(e,t){var n=E_.lastIndex=ES.lastIndex=0,r,a,i,s=-1,c=[],f=[];for(e=e+"",t=t+"";(r=E_.exec(e))&&(a=ES.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),c[s]?c[s]+=i:c[++s]=i),(r=r[0])===(a=a[0])?c[s]?c[s]+=a:c[++s]=a:(c[++s]=null,f.push({i:s,x:Ba(r,a)})),n=ES.lastIndex;return n<t.length&&(i=t.slice(n),c[s]?c[s]+=i:c[++s]=i),c.length<2?f[0]?jde(f[0].x):_de(t):(t=f.length,function(u){for(var m=0,h;m<t;++m)c[(h=f[m]).i]=h.x(u);return c.join("")})}function wo(e,t){var n=typeof t,r;return t==null||n==="boolean"?iO(t):(n==="number"?Ba:n==="string"?(r=Tc(t))?(t=r,yy):uU:t instanceof Tc?yy:t instanceof Date?Sde:xde(t)?bde:Array.isArray(t)?wde:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ede:Ba)(e,t)}function oO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var qD=180/Math.PI,__={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fU(e,t,n,r,a,i){var s,c,f;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,f/=c),e*r<t*n&&(e=-e,t=-t,f=-f,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*qD,skewX:Math.atan(f)*qD,scaleX:s,scaleY:c}}var Kv;function Cde(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?__:fU(t.a,t.b,t.c,t.d,t.e,t.f)}function Ode(e){return e==null||(Kv||(Kv=document.createElementNS("http://www.w3.org/2000/svg","g")),Kv.setAttribute("transform",e),!(e=Kv.transform.baseVal.consolidate()))?__:(e=e.matrix,fU(e.a,e.b,e.c,e.d,e.e,e.f))}function dU(e,t,n,r){function a(u){return u.length?u.pop()+" ":""}function i(u,m,h,p,y,w){if(u!==h||m!==p){var x=y.push("translate(",null,t,null,n);w.push({i:x-4,x:Ba(u,h)},{i:x-2,x:Ba(m,p)})}else(h||p)&&y.push("translate("+h+t+p+n)}function s(u,m,h,p){u!==m?(u-m>180?m+=360:m-u>180&&(u+=360),p.push({i:h.push(a(h)+"rotate(",null,r)-2,x:Ba(u,m)})):m&&h.push(a(h)+"rotate("+m+r)}function c(u,m,h,p){u!==m?p.push({i:h.push(a(h)+"skewX(",null,r)-2,x:Ba(u,m)}):m&&h.push(a(h)+"skewX("+m+r)}function f(u,m,h,p,y,w){if(u!==h||m!==p){var x=y.push(a(y)+"scale(",null,",",null,")");w.push({i:x-4,x:Ba(u,h)},{i:x-2,x:Ba(m,p)})}else(h!==1||p!==1)&&y.push(a(y)+"scale("+h+","+p+")")}return function(u,m){var h=[],p=[];return u=e(u),m=e(m),i(u.translateX,u.translateY,m.translateX,m.translateY,h,p),s(u.rotate,m.rotate,h,p),c(u.skewX,m.skewX,h,p),f(u.scaleX,u.scaleY,m.scaleX,m.scaleY,h,p),u=m=null,function(y){for(var w=-1,x=p.length,S;++w<x;)h[(S=p[w]).i]=S.x(y);return h.join("")}}}var Ade=dU(Cde,"px, ","px)","deg)"),Nde=dU(Ode,", ",")",")"),Tde=1e-12;function KD(e){return((e=Math.exp(e))+1/e)/2}function Pde(e){return((e=Math.exp(e))-1/e)/2}function Mde(e){return((e=Math.exp(2*e))-1)/(e+1)}const vg=(function e(t,n,r){function a(i,s){var c=i[0],f=i[1],u=i[2],m=s[0],h=s[1],p=s[2],y=m-c,w=h-f,x=y*y+w*w,S,E;if(x<Tde)E=Math.log(p/u)/t,S=function(P){return[c+P*y,f+P*w,u*Math.exp(t*P*E)]};else{var O=Math.sqrt(x),C=(p*p-u*u+r*x)/(2*u*n*O),A=(p*p-u*u-r*x)/(2*p*n*O),N=Math.log(Math.sqrt(C*C+1)-C),T=Math.log(Math.sqrt(A*A+1)-A);E=(T-N)/t,S=function(P){var k=P*E,D=KD(N),K=u/(n*O)*(D*Mde(t*k+N)-Pde(N));return[c+K*y,f+K*w,u*D/KD(t*k+N)]}}return S.duration=E*1e3*t/Math.SQRT2,S}return a.rho=function(i){var s=Math.max(.001,+i),c=s*s,f=c*c;return e(s,c,f)},a})(Math.SQRT2,2,4);function Rde(e,t){t===void 0&&(t=e,e=wo);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var c=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[c](s-c)}}function kde(e){return function(){return e}}function by(e){return+e}var VD=[0,1];function yr(e){return e}function j_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:kde(isNaN(t)?NaN:.5)}function Dde(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Ide(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=j_(a,r),i=n(s,i)):(r=j_(r,a),i=n(i,s)),function(c){return i(r(c))}}function Lde(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=j_(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(c){var f=Um(e,c,1,r)-1;return i[f](a[f](c))}}function Fm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function G0(){var e=VD,t=VD,n=wo,r,a,i,s=yr,c,f,u;function m(){var p=Math.min(e.length,t.length);return s!==yr&&(s=Dde(e[0],e[p-1])),c=p>2?Lde:Ide,f=u=null,h}function h(p){return p==null||isNaN(p=+p)?i:(f||(f=c(e.map(r),t,n)))(r(s(p)))}return h.invert=function(p){return s(a((u||(u=c(t,e.map(r),Ba)))(p)))},h.domain=function(p){return arguments.length?(e=Array.from(p,by),m()):e.slice()},h.range=function(p){return arguments.length?(t=Array.from(p),m()):t.slice()},h.rangeRound=function(p){return t=Array.from(p),n=oO,m()},h.clamp=function(p){return arguments.length?(s=p?!0:yr,m()):s!==yr},h.interpolate=function(p){return arguments.length?(n=p,m()):n},h.unknown=function(p){return arguments.length?(i=p,h):i},function(p,y){return r=p,a=y,m()}}function sO(){return G0()(yr,yr)}function zde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xy(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Nf(e){return e=xy(Math.abs(e)),e?e[1]:NaN}function $de(e,t){return function(n,r){for(var a=n.length,i=[],s=0,c=e[0],f=0;a>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),i.push(n.substring(a-=c,a+c)),!((f+=c+1)>r));)c=e[s=(s+1)%e.length];return i.reverse().join(t)}}function Bde(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Ude=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wh(e){if(!(t=Ude.exec(e)))throw new Error("invalid format: "+e);var t;return new lO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Wh.prototype=lO.prototype;function lO(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}lO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hde(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var wy;function Fde(e,t){var n=xy(e,t);if(!n)return wy=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(wy=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+xy(e,Math.max(0,t+i-1))[0]}function YD(e,t){var n=xy(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const GD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:zde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>YD(e*100,t),r:YD,s:Fde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function XD(e){return e}var WD=Array.prototype.map,QD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qde(e){var t=e.grouping===void 0||e.thousands===void 0?XD:$de(WD.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?XD:Bde(WD.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function u(h,p){h=Wh(h);var y=h.fill,w=h.align,x=h.sign,S=h.symbol,E=h.zero,O=h.width,C=h.comma,A=h.precision,N=h.trim,T=h.type;T==="n"?(C=!0,T="g"):GD[T]||(A===void 0&&(A=12),N=!0,T="g"),(E||y==="0"&&w==="=")&&(E=!0,y="0",w="=");var P=(p&&p.prefix!==void 0?p.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),k=(S==="$"?r:/[%p]/.test(T)?s:"")+(p&&p.suffix!==void 0?p.suffix:""),D=GD[T],K=/[defgprs%]/.test(T);A=A===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function L(I){var W=P,$=k,V,R,H;if(T==="c")$=D(I)+$,I="";else{I=+I;var q=I<0||1/I<0;if(I=isNaN(I)?f:D(Math.abs(I),A),N&&(I=Hde(I)),q&&+I==0&&x!=="+"&&(q=!1),W=(q?x==="("?x:c:x==="-"||x==="("?"":x)+W,$=(T==="s"&&!isNaN(I)&&wy!==void 0?QD[8+wy/3]:"")+$+(q&&x==="("?")":""),K){for(V=-1,R=I.length;++V<R;)if(H=I.charCodeAt(V),48>H||H>57){$=(H===46?a+I.slice(V+1):I.slice(V))+$,I=I.slice(0,V);break}}}C&&!E&&(I=t(I,1/0));var F=W.length+I.length+$.length,Y=F<O?new Array(O-F+1).join(y):"";switch(C&&E&&(I=t(Y+I,Y.length?O-$.length:1/0),Y=""),w){case"<":I=W+I+$+Y;break;case"=":I=W+Y+I+$;break;case"^":I=Y.slice(0,F=Y.length>>1)+W+I+$+Y.slice(F);break;default:I=Y+W+I+$;break}return i(I)}return L.toString=function(){return h+""},L}function m(h,p){var y=Math.max(-8,Math.min(8,Math.floor(Nf(p)/3)))*3,w=Math.pow(10,-y),x=u((h=Wh(h),h.type="f",h),{suffix:QD[8+y/3]});return function(S){return x(w*S)}}return{format:u,formatPrefix:m}}var Vv,cO,hU;Kde({thousands:",",grouping:[3],currency:["$",""]});function Kde(e){return Vv=qde(e),cO=Vv.format,hU=Vv.formatPrefix,Vv}function Vde(e){return Math.max(0,-Nf(Math.abs(e)))}function Yde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nf(t)/3)))*3-Nf(Math.abs(e)))}function Gde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Nf(t)-Nf(e))+1}function mU(e,t,n,r){var a=x_(e,t,n),i;switch(r=Wh(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Yde(a,s))&&(r.precision=i),hU(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Gde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Vde(a))&&(r.precision=i-(r.type==="%")*2);break}}return cO(r)}function ml(e){var t=e.domain;return e.ticks=function(n){var r=t();return y_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return mU(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],c=r[i],f,u,m=10;for(c<s&&(u=s,s=c,c=u,u=a,a=i,i=u);m-- >0;){if(u=b_(s,c,n),u===f)return r[a]=s,r[i]=c,t(r);if(u>0)s=Math.floor(s/u)*u,c=Math.ceil(c/u)*u;else if(u<0)s=Math.ceil(s*u)/u,c=Math.floor(c*u)/u;else break;f=u}return e},e}function pU(){var e=sO();return e.copy=function(){return Fm(e,pU())},Ta.apply(e,arguments),ml(e)}function vU(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,by),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return vU(e).unknown(t)},e=arguments.length?Array.from(e,by):[0,1],ml(n)}function gU(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function ZD(e){return Math.log(e)}function JD(e){return Math.exp(e)}function Xde(e){return-Math.log(-e)}function Wde(e){return-Math.exp(-e)}function Qde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Zde(e){return e===10?Qde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function eI(e){return(t,n)=>-e(-t,n)}function uO(e){const t=e(ZD,JD),n=t.domain;let r=10,a,i;function s(){return a=Jde(r),i=Zde(r),n()[0]<0?(a=eI(a),i=eI(i),e(Xde,Wde)):e(ZD,JD),t}return t.base=function(c){return arguments.length?(r=+c,s()):r},t.domain=function(c){return arguments.length?(n(c),s()):n()},t.ticks=c=>{const f=n();let u=f[0],m=f[f.length-1];const h=m<u;h&&([u,m]=[m,u]);let p=a(u),y=a(m),w,x;const S=c==null?10:+c;let E=[];if(!(r%1)&&y-p<S){if(p=Math.floor(p),y=Math.ceil(y),u>0){for(;p<=y;++p)for(w=1;w<r;++w)if(x=p<0?w/i(-p):w*i(p),!(x<u)){if(x>m)break;E.push(x)}}else for(;p<=y;++p)for(w=r-1;w>=1;--w)if(x=p>0?w/i(-p):w*i(p),!(x<u)){if(x>m)break;E.push(x)}E.length*2<S&&(E=y_(u,m,S))}else E=y_(p,y,Math.min(y-p,S)).map(i);return h?E.reverse():E},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Wh(f)).precision==null&&(f.trim=!0),f=cO(f)),c===1/0)return f;const u=Math.max(1,r*c/t.ticks().length);return m=>{let h=m/i(Math.round(a(m)));return h*r<r-.5&&(h*=r),h<=u?f(m):""}},t.nice=()=>n(gU(n(),{floor:c=>i(Math.floor(a(c))),ceil:c=>i(Math.ceil(a(c)))})),t}function yU(){const e=uO(G0()).domain([1,10]);return e.copy=()=>Fm(e,yU()).base(e.base()),Ta.apply(e,arguments),e}function tI(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nI(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function fO(e){var t=1,n=e(tI(t),nI(t));return n.constant=function(r){return arguments.length?e(tI(t=+r),nI(t)):t},ml(n)}function bU(){var e=fO(G0());return e.copy=function(){return Fm(e,bU()).constant(e.constant())},Ta.apply(e,arguments)}function rI(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ehe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function the(e){return e<0?-e*e:e*e}function dO(e){var t=e(yr,yr),n=1;function r(){return n===1?e(yr,yr):n===.5?e(ehe,the):e(rI(n),rI(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},ml(t)}function hO(){var e=dO(G0());return e.copy=function(){return Fm(e,hO()).exponent(e.exponent())},Ta.apply(e,arguments),e}function nhe(){return hO.apply(null,arguments).exponent(.5)}function aI(e){return Math.sign(e)*e*e}function rhe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function xU(){var e=sO(),t=[0,1],n=!1,r;function a(i){var s=rhe(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(aI(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,by)).map(aI)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return xU(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ta.apply(a,arguments),ml(a)}function wU(){var e=[],t=[],n=[],r;function a(){var s=0,c=Math.max(1,t.length);for(n=new Array(c-1);++s<c;)n[s-1]=tde(e,s/c);return i}function i(s){return s==null||isNaN(s=+s)?r:t[Um(n,s)]}return i.invertExtent=function(s){var c=t.indexOf(s);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let c of s)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Ws),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return wU().domain(e).range(t).unknown(r)},Ta.apply(i,arguments)}function SU(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(f){return f!=null&&f<=f?a[Um(r,f,0,n)]:i}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return s}return s.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},s.range=function(f){return arguments.length?(n=(a=Array.from(f)).length-1,c()):a.slice()},s.invertExtent=function(f){var u=a.indexOf(f);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(f){return arguments.length&&(i=f),s},s.thresholds=function(){return r.slice()},s.copy=function(){return SU().domain([e,t]).range(a).unknown(i)},Ta.apply(ml(s),arguments)}function EU(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Um(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return EU().domain(e).range(t).unknown(n)},Ta.apply(a,arguments)}const _S=new Date,jS=new Date;function Nn(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),c=a.ceil(i);return i-s<c-i?s:c},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,c)=>{const f=[];if(i=a.ceil(i),c=c==null?1:Math.floor(c),!(i<s)||!(c>0))return f;let u;do f.push(u=new Date(+i)),t(i,c),e(i);while(u<i&&i<s);return f},a.filter=i=>Nn(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,c)=>{if(s>=s)if(c<0)for(;++c<=0;)for(;t(s,-1),!i(s););else for(;--c>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(_S.setTime(+i),jS.setTime(+s),e(_S),e(jS),Math.floor(n(_S,jS))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Sy=Nn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Sy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Nn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Sy);Sy.range;const go=1e3,ja=go*60,yo=ja*60,Ro=yo*24,mO=Ro*7,iI=Ro*30,CS=Ro*365,Zl=Nn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*go)},(e,t)=>(t-e)/go,e=>e.getUTCSeconds());Zl.range;const pO=Nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*go)},(e,t)=>{e.setTime(+e+t*ja)},(e,t)=>(t-e)/ja,e=>e.getMinutes());pO.range;const vO=Nn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ja)},(e,t)=>(t-e)/ja,e=>e.getUTCMinutes());vO.range;const gO=Nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*go-e.getMinutes()*ja)},(e,t)=>{e.setTime(+e+t*yo)},(e,t)=>(t-e)/yo,e=>e.getHours());gO.range;const yO=Nn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yo)},(e,t)=>(t-e)/yo,e=>e.getUTCHours());yO.range;const qm=Nn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ja)/Ro,e=>e.getDate()-1);qm.range;const X0=Nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ro,e=>e.getUTCDate()-1);X0.range;const _U=Nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ro,e=>Math.floor(e/Ro));_U.range;function Yc(e){return Nn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ja)/mO)}const W0=Yc(0),Ey=Yc(1),ahe=Yc(2),ihe=Yc(3),Tf=Yc(4),ohe=Yc(5),she=Yc(6);W0.range;Ey.range;ahe.range;ihe.range;Tf.range;ohe.range;she.range;function Gc(e){return Nn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/mO)}const Q0=Gc(0),_y=Gc(1),lhe=Gc(2),che=Gc(3),Pf=Gc(4),uhe=Gc(5),fhe=Gc(6);Q0.range;_y.range;lhe.range;che.range;Pf.range;uhe.range;fhe.range;const bO=Nn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());bO.range;const xO=Nn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xO.range;const ko=Nn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ko.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Nn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ko.range;const Do=Nn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Do.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Nn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Do.range;function jU(e,t,n,r,a,i){const s=[[Zl,1,go],[Zl,5,5*go],[Zl,15,15*go],[Zl,30,30*go],[i,1,ja],[i,5,5*ja],[i,15,15*ja],[i,30,30*ja],[a,1,yo],[a,3,3*yo],[a,6,6*yo],[a,12,12*yo],[r,1,Ro],[r,2,2*Ro],[n,1,mO],[t,1,iI],[t,3,3*iI],[e,1,CS]];function c(u,m,h){const p=m<u;p&&([u,m]=[m,u]);const y=h&&typeof h.range=="function"?h:f(u,m,h),w=y?y.range(u,+m+1):[];return p?w.reverse():w}function f(u,m,h){const p=Math.abs(m-u)/h,y=tO(([,,S])=>S).right(s,p);if(y===s.length)return e.every(x_(u/CS,m/CS,h));if(y===0)return Sy.every(Math.max(x_(u,m,h),1));const[w,x]=s[p/s[y-1][2]<s[y][2]/p?y-1:y];return w.every(x)}return[c,f]}const[dhe,hhe]=jU(Do,xO,Q0,_U,yO,vO),[mhe,phe]=jU(ko,bO,W0,qm,gO,pO);function OS(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function AS(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function dh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function vhe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,c=e.months,f=e.shortMonths,u=hh(a),m=mh(a),h=hh(i),p=mh(i),y=hh(s),w=mh(s),x=hh(c),S=mh(c),E=hh(f),O=mh(f),C={a:H,A:q,b:F,B:Y,c:null,d:fI,e:fI,f:$he,g:Xhe,G:Qhe,H:Ihe,I:Lhe,j:zhe,L:CU,m:Bhe,M:Uhe,p:B,q:z,Q:mI,s:pI,S:Hhe,u:Fhe,U:qhe,V:Khe,w:Vhe,W:Yhe,x:null,X:null,y:Ghe,Y:Whe,Z:Zhe,"%":hI},A={a:X,A:Z,b:ee,B:se,c:null,d:dI,e:dI,f:nme,g:dme,G:mme,H:Jhe,I:eme,j:tme,L:AU,m:rme,M:ame,p:ae,q:re,Q:mI,s:pI,S:ime,u:ome,U:sme,V:lme,w:cme,W:ume,x:null,X:null,y:fme,Y:hme,Z:pme,"%":hI},N={a:K,A:L,b:I,B:W,c:$,d:cI,e:cI,f:Mhe,g:lI,G:sI,H:uI,I:uI,j:Ahe,L:Phe,m:Ohe,M:Nhe,p:D,q:Che,Q:khe,s:Dhe,S:The,u:whe,U:She,V:Ehe,w:xhe,W:_he,x:V,X:R,y:lI,Y:sI,Z:jhe,"%":Rhe};C.x=T(n,C),C.X=T(r,C),C.c=T(t,C),A.x=T(n,A),A.X=T(r,A),A.c=T(t,A);function T(J,le){return function(me){var ne=[],ge=-1,ye=0,Ie=J.length,Me,Ke,Gt;for(me instanceof Date||(me=new Date(+me));++ge<Ie;)J.charCodeAt(ge)===37&&(ne.push(J.slice(ye,ge)),(Ke=oI[Me=J.charAt(++ge)])!=null?Me=J.charAt(++ge):Ke=Me==="e"?" ":"0",(Gt=le[Me])&&(Me=Gt(me,Ke)),ne.push(Me),ye=ge+1);return ne.push(J.slice(ye,ge)),ne.join("")}}function P(J,le){return function(me){var ne=dh(1900,void 0,1),ge=k(ne,J,me+="",0),ye,Ie;if(ge!=me.length)return null;if("Q"in ne)return new Date(ne.Q);if("s"in ne)return new Date(ne.s*1e3+("L"in ne?ne.L:0));if(le&&!("Z"in ne)&&(ne.Z=0),"p"in ne&&(ne.H=ne.H%12+ne.p*12),ne.m===void 0&&(ne.m="q"in ne?ne.q:0),"V"in ne){if(ne.V<1||ne.V>53)return null;"w"in ne||(ne.w=1),"Z"in ne?(ye=AS(dh(ne.y,0,1)),Ie=ye.getUTCDay(),ye=Ie>4||Ie===0?_y.ceil(ye):_y(ye),ye=X0.offset(ye,(ne.V-1)*7),ne.y=ye.getUTCFullYear(),ne.m=ye.getUTCMonth(),ne.d=ye.getUTCDate()+(ne.w+6)%7):(ye=OS(dh(ne.y,0,1)),Ie=ye.getDay(),ye=Ie>4||Ie===0?Ey.ceil(ye):Ey(ye),ye=qm.offset(ye,(ne.V-1)*7),ne.y=ye.getFullYear(),ne.m=ye.getMonth(),ne.d=ye.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ie="Z"in ne?AS(dh(ne.y,0,1)).getUTCDay():OS(dh(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ie+5)%7:ne.w+ne.U*7-(Ie+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,AS(ne)):OS(ne)}}function k(J,le,me,ne){for(var ge=0,ye=le.length,Ie=me.length,Me,Ke;ge<ye;){if(ne>=Ie)return-1;if(Me=le.charCodeAt(ge++),Me===37){if(Me=le.charAt(ge++),Ke=N[Me in oI?le.charAt(ge++):Me],!Ke||(ne=Ke(J,me,ne))<0)return-1}else if(Me!=me.charCodeAt(ne++))return-1}return ne}function D(J,le,me){var ne=u.exec(le.slice(me));return ne?(J.p=m.get(ne[0].toLowerCase()),me+ne[0].length):-1}function K(J,le,me){var ne=y.exec(le.slice(me));return ne?(J.w=w.get(ne[0].toLowerCase()),me+ne[0].length):-1}function L(J,le,me){var ne=h.exec(le.slice(me));return ne?(J.w=p.get(ne[0].toLowerCase()),me+ne[0].length):-1}function I(J,le,me){var ne=E.exec(le.slice(me));return ne?(J.m=O.get(ne[0].toLowerCase()),me+ne[0].length):-1}function W(J,le,me){var ne=x.exec(le.slice(me));return ne?(J.m=S.get(ne[0].toLowerCase()),me+ne[0].length):-1}function $(J,le,me){return k(J,t,le,me)}function V(J,le,me){return k(J,n,le,me)}function R(J,le,me){return k(J,r,le,me)}function H(J){return s[J.getDay()]}function q(J){return i[J.getDay()]}function F(J){return f[J.getMonth()]}function Y(J){return c[J.getMonth()]}function B(J){return a[+(J.getHours()>=12)]}function z(J){return 1+~~(J.getMonth()/3)}function X(J){return s[J.getUTCDay()]}function Z(J){return i[J.getUTCDay()]}function ee(J){return f[J.getUTCMonth()]}function se(J){return c[J.getUTCMonth()]}function ae(J){return a[+(J.getUTCHours()>=12)]}function re(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var le=T(J+="",C);return le.toString=function(){return J},le},parse:function(J){var le=P(J+="",!1);return le.toString=function(){return J},le},utcFormat:function(J){var le=T(J+="",A);return le.toString=function(){return J},le},utcParse:function(J){var le=P(J+="",!0);return le.toString=function(){return J},le}}}var oI={"-":"",_:" ",0:"0"},Un=/^\s*\d+/,ghe=/^%/,yhe=/[\\^$*+?|[\]().{}]/g;function ft(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function bhe(e){return e.replace(yhe,"\\$&")}function hh(e){return new RegExp("^(?:"+e.map(bhe).join("|")+")","i")}function mh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function xhe(e,t,n){var r=Un.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function whe(e,t,n){var r=Un.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function She(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ehe(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function _he(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sI(e,t,n){var r=Un.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lI(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function jhe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Che(e,t,n){var r=Un.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ohe(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function cI(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ahe(e,t,n){var r=Un.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function uI(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Nhe(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function The(e,t,n){var r=Un.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Phe(e,t,n){var r=Un.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Mhe(e,t,n){var r=Un.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Rhe(e,t,n){var r=ghe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function khe(e,t,n){var r=Un.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Dhe(e,t,n){var r=Un.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fI(e,t){return ft(e.getDate(),t,2)}function Ihe(e,t){return ft(e.getHours(),t,2)}function Lhe(e,t){return ft(e.getHours()%12||12,t,2)}function zhe(e,t){return ft(1+qm.count(ko(e),e),t,3)}function CU(e,t){return ft(e.getMilliseconds(),t,3)}function $he(e,t){return CU(e,t)+"000"}function Bhe(e,t){return ft(e.getMonth()+1,t,2)}function Uhe(e,t){return ft(e.getMinutes(),t,2)}function Hhe(e,t){return ft(e.getSeconds(),t,2)}function Fhe(e){var t=e.getDay();return t===0?7:t}function qhe(e,t){return ft(W0.count(ko(e)-1,e),t,2)}function OU(e){var t=e.getDay();return t>=4||t===0?Tf(e):Tf.ceil(e)}function Khe(e,t){return e=OU(e),ft(Tf.count(ko(e),e)+(ko(e).getDay()===4),t,2)}function Vhe(e){return e.getDay()}function Yhe(e,t){return ft(Ey.count(ko(e)-1,e),t,2)}function Ghe(e,t){return ft(e.getFullYear()%100,t,2)}function Xhe(e,t){return e=OU(e),ft(e.getFullYear()%100,t,2)}function Whe(e,t){return ft(e.getFullYear()%1e4,t,4)}function Qhe(e,t){var n=e.getDay();return e=n>=4||n===0?Tf(e):Tf.ceil(e),ft(e.getFullYear()%1e4,t,4)}function Zhe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ft(t/60|0,"0",2)+ft(t%60,"0",2)}function dI(e,t){return ft(e.getUTCDate(),t,2)}function Jhe(e,t){return ft(e.getUTCHours(),t,2)}function eme(e,t){return ft(e.getUTCHours()%12||12,t,2)}function tme(e,t){return ft(1+X0.count(Do(e),e),t,3)}function AU(e,t){return ft(e.getUTCMilliseconds(),t,3)}function nme(e,t){return AU(e,t)+"000"}function rme(e,t){return ft(e.getUTCMonth()+1,t,2)}function ame(e,t){return ft(e.getUTCMinutes(),t,2)}function ime(e,t){return ft(e.getUTCSeconds(),t,2)}function ome(e){var t=e.getUTCDay();return t===0?7:t}function sme(e,t){return ft(Q0.count(Do(e)-1,e),t,2)}function NU(e){var t=e.getUTCDay();return t>=4||t===0?Pf(e):Pf.ceil(e)}function lme(e,t){return e=NU(e),ft(Pf.count(Do(e),e)+(Do(e).getUTCDay()===4),t,2)}function cme(e){return e.getUTCDay()}function ume(e,t){return ft(_y.count(Do(e)-1,e),t,2)}function fme(e,t){return ft(e.getUTCFullYear()%100,t,2)}function dme(e,t){return e=NU(e),ft(e.getUTCFullYear()%100,t,2)}function hme(e,t){return ft(e.getUTCFullYear()%1e4,t,4)}function mme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Pf(e):Pf.ceil(e),ft(e.getUTCFullYear()%1e4,t,4)}function pme(){return"+0000"}function hI(){return"%"}function mI(e){return+e}function pI(e){return Math.floor(+e/1e3)}var zu,TU,PU;vme({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vme(e){return zu=vhe(e),TU=zu.format,zu.parse,PU=zu.utcFormat,zu.utcParse,zu}function gme(e){return new Date(e)}function yme(e){return e instanceof Date?+e:+new Date(+e)}function wO(e,t,n,r,a,i,s,c,f,u){var m=sO(),h=m.invert,p=m.domain,y=u(".%L"),w=u(":%S"),x=u("%I:%M"),S=u("%I %p"),E=u("%a %d"),O=u("%b %d"),C=u("%B"),A=u("%Y");function N(T){return(f(T)<T?y:c(T)<T?w:s(T)<T?x:i(T)<T?S:r(T)<T?a(T)<T?E:O:n(T)<T?C:A)(T)}return m.invert=function(T){return new Date(h(T))},m.domain=function(T){return arguments.length?p(Array.from(T,yme)):p().map(gme)},m.ticks=function(T){var P=p();return e(P[0],P[P.length-1],T??10)},m.tickFormat=function(T,P){return P==null?N:u(P)},m.nice=function(T){var P=p();return(!T||typeof T.range!="function")&&(T=t(P[0],P[P.length-1],T??10)),T?p(gU(P,T)):m},m.copy=function(){return Fm(m,wO(e,t,n,r,a,i,s,c,f,u))},m}function bme(){return Ta.apply(wO(mhe,phe,ko,bO,W0,qm,gO,pO,Zl,TU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xme(){return Ta.apply(wO(dhe,hhe,Do,xO,Q0,X0,yO,vO,Zl,PU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Z0(){var e=0,t=1,n,r,a,i,s=yr,c=!1,f;function u(h){return h==null||isNaN(h=+h)?f:s(a===0?.5:(h=(i(h)-n)*a,c?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([e,t]=h,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(h){return arguments.length?(c=!!h,u):c},u.interpolator=function(h){return arguments.length?(s=h,u):s};function m(h){return function(p){var y,w;return arguments.length?([y,w]=p,s=h(y,w),u):[s(0),s(1)]}}return u.range=m(wo),u.rangeRound=m(oO),u.unknown=function(h){return arguments.length?(f=h,u):f},function(h){return i=h,n=h(e),r=h(t),a=n===r?0:1/(r-n),u}}function pl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function MU(){var e=ml(Z0()(yr));return e.copy=function(){return pl(e,MU())},Fo.apply(e,arguments)}function RU(){var e=uO(Z0()).domain([1,10]);return e.copy=function(){return pl(e,RU()).base(e.base())},Fo.apply(e,arguments)}function kU(){var e=fO(Z0());return e.copy=function(){return pl(e,kU()).constant(e.constant())},Fo.apply(e,arguments)}function SO(){var e=dO(Z0());return e.copy=function(){return pl(e,SO()).exponent(e.exponent())},Fo.apply(e,arguments)}function wme(){return SO.apply(null,arguments).exponent(.5)}function DU(){var e=[],t=yr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Um(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Ws),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>ede(e,i/r))},n.copy=function(){return DU(t).domain(e)},Fo.apply(n,arguments)}function J0(){var e=0,t=.5,n=1,r=1,a,i,s,c,f,u=yr,m,h=!1,p;function y(x){return isNaN(x=+x)?p:(x=.5+((x=+m(x))-i)*(r*x<r*i?c:f),u(h?Math.max(0,Math.min(1,x)):x))}y.domain=function(x){return arguments.length?([e,t,n]=x,a=m(e=+e),i=m(t=+t),s=m(n=+n),c=a===i?0:.5/(i-a),f=i===s?0:.5/(s-i),r=i<a?-1:1,y):[e,t,n]},y.clamp=function(x){return arguments.length?(h=!!x,y):h},y.interpolator=function(x){return arguments.length?(u=x,y):u};function w(x){return function(S){var E,O,C;return arguments.length?([E,O,C]=S,u=Rde(x,[E,O,C]),y):[u(0),u(.5),u(1)]}}return y.range=w(wo),y.rangeRound=w(oO),y.unknown=function(x){return arguments.length?(p=x,y):p},function(x){return m=x,a=x(e),i=x(t),s=x(n),c=a===i?0:.5/(i-a),f=i===s?0:.5/(s-i),r=i<a?-1:1,y}}function IU(){var e=ml(J0()(yr));return e.copy=function(){return pl(e,IU())},Fo.apply(e,arguments)}function LU(){var e=uO(J0()).domain([.1,1,10]);return e.copy=function(){return pl(e,LU()).base(e.base())},Fo.apply(e,arguments)}function zU(){var e=fO(J0());return e.copy=function(){return pl(e,zU()).constant(e.constant())},Fo.apply(e,arguments)}function EO(){var e=dO(J0());return e.copy=function(){return pl(e,EO()).exponent(e.exponent())},Fo.apply(e,arguments)}function Sme(){return EO.apply(null,arguments).exponent(.5)}const jh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:rO,scaleDiverging:IU,scaleDivergingLog:LU,scaleDivergingPow:EO,scaleDivergingSqrt:Sme,scaleDivergingSymlog:zU,scaleIdentity:vU,scaleImplicit:w_,scaleLinear:pU,scaleLog:yU,scaleOrdinal:nO,scalePoint:rde,scalePow:hO,scaleQuantile:wU,scaleQuantize:SU,scaleRadial:xU,scaleSequential:MU,scaleSequentialLog:RU,scaleSequentialPow:SO,scaleSequentialQuantile:DU,scaleSequentialSqrt:wme,scaleSequentialSymlog:kU,scaleSqrt:nhe,scaleSymlog:bU,scaleThreshold:EU,scaleTime:bme,scaleUtc:xme,tickFormat:mU},Symbol.toStringTag,{value:"Module"}));function Eme(e){if(e in jh)return jh[e]();var t="scale".concat(Nm(e));if(t in jh)return jh[t]()}function vI(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=Eme(e);if(r!=null)return r.domain(t).range(n),r}}function _O(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?vI(e.scale,n,r):vI(t,n,r)}function _me(e){return"scale".concat(Nm(e))}function jme(e){return _me(e)in jh}var $U=(e,t,n)=>{if(e!=null){var{scale:r,type:a}=e;if(r==="auto")return a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof r=="string")return jme(r)?r:"point"}};function Cme(e,t){for(var n=0,r=e.length,a=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(a?e[i]<t:e[i]>t)?n=i+1:r=i}return n}function BU(e,t){if(e){var n=t??e.domain(),r=n.map(i=>{var s;return(s=e(i))!==null&&s!==void 0?s:0}),a=e.range();if(!(n.length===0||a.length<2))return i=>{var s,c,f=Cme(r,i);if(f<=0)return n[0];if(f>=n.length)return n[n.length-1];var u=(s=r[f-1])!==null&&s!==void 0?s:0,m=(c=r[f])!==null&&c!==void 0?c:0;return Math.abs(i-u)<=Math.abs(i-m)?n[f-1]:n[f]}}}function Ome(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):BU(e,void 0)}function gI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gI(Object(n),!0).forEach(function(r){Ame(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ame(e,t,n){return(t=Nme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nme(e){var t=Tme(e,"string");return typeof t=="symbol"?t:t+""}function Tme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C_=[0,"auto"],_n={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},UU=(e,t)=>e.cartesianAxis.xAxis[t],qo=(e,t)=>{var n=UU(e,t);return n??_n},jn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:C_,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Rm},HU=(e,t)=>e.cartesianAxis.yAxis[t],Ko=(e,t)=>{var n=HU(e,t);return n??jn},Pme={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},jO=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Pme},nn=(e,t,n)=>{switch(t){case"xAxis":return qo(e,n);case"yAxis":return Ko(e,n);case"zAxis":return jO(e,n);case"angleAxis":return WC(e,n);case"radiusAxis":return QC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Mme=(e,t,n)=>{switch(t){case"xAxis":return qo(e,n);case"yAxis":return Ko(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},rd=(e,t,n)=>{switch(t){case"xAxis":return qo(e,n);case"yAxis":return Ko(e,n);case"angleAxis":return WC(e,n);case"radiusAxis":return QC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},FU=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function CO(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var eb=e=>e.graphicalItems.cartesianItems,Rme=oe([Yt,Bm],CO),OO=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),Km=oe([eb,nn,Rme],OO,{memoizeOptions:{resultEqualityCheck:Y0}}),qU=oe([Km],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(K0)),KU=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),kme=oe([Km],KU),AO=e=>e.map(t=>t.data).filter(Boolean).flat(1),Dme=oe([Km],AO,{memoizeOptions:{resultEqualityCheck:Y0}}),NO=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:a}=t;return e.length>0?e:n.slice(r,a+1)},TO=oe([Dme,FC],NO),PO=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:_t(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(a=>({value:_t(a,r)}))):e.map(r=>({value:r})),Vm=oe([TO,nn,Km],PO);function af(e){if(Ti(e)||e instanceof Date){var t=Number(e);if(it(t))return t}}function yI(e){if(Array.isArray(e)){var t=[af(e[0]),af(e[1])];return Oi(t)?t:void 0}var n=af(e);if(n!=null)return[n,n]}function Io(e){return e.map(af).filter(kr)}function Ime(e,t){var n=af(e),r=af(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Lme=oe([Vm],e=>e==null?void 0:e.map(t=>t.value).sort(Ime));function VU(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function zme(e,t,n){return!n||typeof t!="number"||Ni(t)?[]:n.length?Io(n.flatMap(r=>{var a=_t(e,r.dataKey),i,s;if(Array.isArray(a)?[i,s]=a:i=s=a,!(!it(i)||!it(s)))return[t-i,t+s]})):[]}var Tn=e=>{var t=Bn(e),n=nd(e);return rd(e,t,n)},Ym=oe([Tn],e=>e==null?void 0:e.dataKey),$me=oe([qU,FC,Tn],tU),YU=(e,t,n,r)=>{var a={},i=t.reduce((s,c)=>{if(c.stackId==null)return s;var f=s[c.stackId];return f==null&&(f=[]),f.push(c),s[c.stackId]=f,s},a);return Object.fromEntries(Object.entries(i).map(s=>{var[c,f]=s,u=r?[...f].reverse():f,m=u.map(JC);return[c,{stackedData:Cle(e,m,n),graphicalItems:u}]}))},O_=oe([$me,qU,$m,G6],YU),GU=(e,t,n,r)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var s=Ple(e,a,i);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},Bme=oe([nn],e=>e.allowDataOverflow),MO=e=>{var t;if(e==null||!("domain"in e))return C_;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Io(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:C_},RO=oe([nn],MO),kO=oe([RO,Bme],D6),Ume=oe([O_,Ho,Yt,kO],GU,{memoizeOptions:{resultEqualityCheck:V0}}),tb=e=>e.errorBars,Hme=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>VU(n,r)),Cy=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.filter(Boolean);if(a.length!==0){var i=a.flat(),s=Math.min(...i),c=Math.max(...i);return[s,c]}},DO=(e,t,n,r,a)=>{var i,s;if(n.length>0&&e.forEach(c=>{n.forEach(f=>{var u,m,h=(u=r[f.id])===null||u===void 0?void 0:u.filter(E=>VU(a,E)),p=_t(c,(m=t.dataKey)!==null&&m!==void 0?m:f.dataKey),y=zme(c,p,h);if(y.length>=2){var w=Math.min(...y),x=Math.max(...y);(i==null||w<i)&&(i=w),(s==null||x>s)&&(s=x)}var S=yI(p);S!=null&&(i=i==null?S[0]:Math.min(i,S[0]),s=s==null?S[1]:Math.max(s,S[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(c=>{var f=yI(_t(c,t.dataKey));f!=null&&(i=i==null?f[0]:Math.min(i,f[0]),s=s==null?f[1]:Math.max(s,f[1]))}),it(i)&&it(s))return[i,s]},Fme=oe([TO,nn,kme,tb,Yt],DO,{memoizeOptions:{resultEqualityCheck:V0}});function qme(e){var{value:t}=e;if(Ti(t)||t instanceof Date)return t}var Kme=(e,t,n)=>{var r=e.map(qme).filter(a=>a!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&a8(r))?k6(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},XU=e=>e.referenceElements.dots,ad=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Vme=oe([XU,Yt,Bm],ad),WU=e=>e.referenceElements.areas,Yme=oe([WU,Yt,Bm],ad),QU=e=>e.referenceElements.lines,Gme=oe([QU,Yt,Bm],ad),ZU=(e,t)=>{if(e!=null){var n=Io(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Xme=oe(Vme,Yt,ZU),JU=(e,t)=>{if(e!=null){var n=Io(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Wme=oe([Yme,Yt],JU);function Qme(e){var t;if(e.x!=null)return Io([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Io(n)}function Zme(e){var t;if(e.y!=null)return Io([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Io(n)}var eH=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?Qme(r):Zme(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Jme=oe([Gme,Yt],eH),epe=oe(Xme,Jme,Wme,(e,t,n)=>Cy(e,n,t)),IO=(e,t,n,r,a,i,s,c)=>{if(n!=null)return n;var f=s==="vertical"&&c==="xAxis"||s==="horizontal"&&c==="yAxis",u=f?Cy(r,i,a):Cy(i,a);return Nfe(t,u,e.allowDataOverflow)},tpe=oe([nn,RO,kO,Ume,Fme,epe,dt,Yt],IO,{memoizeOptions:{resultEqualityCheck:V0}}),npe=[0,1],LO=(e,t,n,r,a,i,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:c,type:f}=e,u=$o(t,i);if(u&&c==null){var m;return k6(0,(m=n==null?void 0:n.length)!==null&&m!==void 0?m:0)}return f==="category"?Kme(r,e,u):a==="expand"?npe:s}},zO=oe([nn,dt,TO,Vm,$m,Yt,tpe],LO),vl=oe([nn,FU,YC],$U),$O=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var a=MO(t),i=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&Oi(e)){if(i)return OD(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return AD(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(i&&Oi(e))return OD(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Oi(e))return AD(e,t.tickCount,t.allowDecimals,"adaptive")}}},BO=oe([zO,rd,vl],$O),UO=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Oi(t)&&Array.isArray(n)&&n.length>0){var a,i,s=t[0],c=(a=n[0])!==null&&a!==void 0?a:0,f=t[1],u=(i=n[n.length-1])!==null&&i!==void 0?i:0;return[Math.min(s,c),Math.max(f,u)]}return t},rpe=oe([nn,zO,BO,Yt],UO),ape=oe(Vm,nn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Io(e.map(h=>h.value))).sort((h,p)=>h-p),a=r[0],i=r[r.length-1];if(a==null||i==null)return 1/0;var s=i-a;if(s===0)return 1/0;for(var c=0;c<r.length-1;c++){var f=r[c],u=r[c+1];if(!(f==null||u==null)){var m=u-f;n=Math.min(n,m)}}return n/s}}),tH=oe(ape,dt,Y6,An,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!it(e))return 0;var i=t==="vertical"?r.height:r.width;if(a==="gap")return e*i/2;if(a==="no-gap"){var s=fr(n,e*i),c=e*i/2;return c-s-(c-s)/i*s}return 0}),ipe=(e,t,n)=>{var r=qo(e,t);return r==null||typeof r.padding!="string"?0:tH(e,"xAxis",t,n,r.padding)},ope=(e,t,n)=>{var r=Ko(e,t);return r==null||typeof r.padding!="string"?0:tH(e,"yAxis",t,n,r.padding)},spe=oe(qo,ipe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:a}=e;return typeof a=="string"?{left:t,right:t}:{left:((n=a.left)!==null&&n!==void 0?n:0)+t,right:((r=a.right)!==null&&r!==void 0?r:0)+t}}),lpe=oe(Ko,ope,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:a}=e;return typeof a=="string"?{top:t,bottom:t}:{top:((n=a.top)!==null&&n!==void 0?n:0)+t,bottom:((r=a.bottom)!==null&&r!==void 0?r:0)+t}}),cpe=oe([An,spe,I0,D0,(e,t,n)=>n],(e,t,n,r,a)=>{var{padding:i}=r;return a?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),upe=oe([An,dt,lpe,I0,D0,(e,t,n)=>n],(e,t,n,r,a,i)=>{var{padding:s}=a;return i?[r.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Gm=(e,t,n,r)=>{var a;switch(t){case"xAxis":return cpe(e,n,r);case"yAxis":return upe(e,n,r);case"zAxis":return(a=jO(e,n))===null||a===void 0?void 0:a.range;case"angleAxis":return Z6(e);case"radiusAxis":return J6(e,n);default:return}},nH=oe([nn,Gm],H0),fpe=oe([vl,rpe],nU),HO=oe([nn,vl,fpe,nH],_O),rH=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:a,scale:i}=n,s=$o(e,r);if(s&&(a==="number"||i!=="auto"))return t.map(c=>c.value)}},FO=oe([dt,Vm,rd,Yt],rH),nb=oe([HO],eO);oe([HO],Ome);oe([HO,Lme],BU);oe([Km,tb,Yt],Hme);function aH(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var rb=(e,t)=>t,ab=(e,t,n)=>n,dpe=oe(R0,rb,ab,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(aH)),hpe=oe(k0,rb,ab,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(aH)),iH=(e,t)=>({width:e.width,height:t.height}),mpe=(e,t)=>{var n=typeof t.width=="number"?t.width:Rm;return{width:n,height:e.height}},oH=oe(An,qo,iH),ppe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},vpe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},gpe=oe(Uo,An,dpe,rb,ab,(e,t,n,r,a)=>{var i={},s;return n.forEach(c=>{var f=iH(t,c);s==null&&(s=ppe(t,r,e));var u=r==="top"&&!a||r==="bottom"&&a;i[c.id]=s-Number(u)*f.height,s+=(u?-1:1)*f.height}),i}),ype=oe(Bo,An,hpe,rb,ab,(e,t,n,r,a)=>{var i={},s;return n.forEach(c=>{var f=mpe(t,c);s==null&&(s=vpe(t,r,e));var u=r==="left"&&!a||r==="right"&&a;i[c.id]=s-Number(u)*f.width,s+=(u?-1:1)*f.width}),i}),bpe=(e,t)=>{var n=qo(e,t);if(n!=null)return gpe(e,n.orientation,n.mirror)},xpe=oe([An,qo,bpe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),wpe=(e,t)=>{var n=Ko(e,t);if(n!=null)return ype(e,n.orientation,n.mirror)},Spe=oe([An,Ko,wpe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),sH=oe(An,Ko,(e,t)=>{var n=typeof t.width=="number"?t.width:Rm;return{width:n,height:e.height}}),bI=(e,t,n)=>{switch(t){case"xAxis":return oH(e,n).width;case"yAxis":return sH(e,n).height;default:return}},lH=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:a,type:i,dataKey:s}=n,c=$o(e,r),f=t.map(u=>u.value);if(s&&c&&i==="category"&&a&&a8(f))return f}},qO=oe([dt,Vm,nn,Yt],lH),xI=oe([dt,Mme,vl,nb,qO,FO,Gm,BO,Yt],(e,t,n,r,a,i,s,c,f)=>{if(t!=null){var u=$o(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:i,duplicateDomain:a,isCategorical:u,niceTicks:c,range:s,realScaleType:n,scale:r}}}),Epe=(e,t,n,r,a,i,s,c,f)=>{if(!(t==null||r==null)){var u=$o(e,f),{type:m,ticks:h,tickCount:p}=t,y=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/y:0;w=f==="angleAxis"&&i!=null&&i.length>=2?In(i[0]-i[1])*2*w:w;var x=h||a;return x?x.map((S,E)=>{var O=s?s.indexOf(S):S,C=r.map(O);return it(C)?{index:E,coordinate:C+w,value:S,offset:w}:null}).filter(kr):u&&c?c.map((S,E)=>{var O=r.map(S);return it(O)?{coordinate:O+w,value:S,index:E,offset:w}:null}).filter(kr):r.ticks?r.ticks(p).map((S,E)=>{var O=r.map(S);return it(O)?{coordinate:O+w,value:S,index:E,offset:w}:null}).filter(kr):r.domain().map((S,E)=>{var O=r.map(S);return it(O)?{coordinate:O+w,value:s?s[S]:S,index:E,offset:w}:null}).filter(kr)}},cH=oe([dt,rd,vl,nb,BO,Gm,qO,FO,Yt],Epe),_pe=(e,t,n,r,a,i,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var c=$o(e,s),{tickCount:f}=t,u=0;return u=s==="angleAxis"&&(r==null?void 0:r.length)>=2?In(r[0]-r[1])*2*u:u,c&&i?i.map((m,h)=>{var p=n.map(m);return it(p)?{coordinate:p+u,value:m,index:h,offset:u}:null}).filter(kr):n.ticks?n.ticks(f).map((m,h)=>{var p=n.map(m);return it(p)?{coordinate:p+u,value:m,index:h,offset:u}:null}).filter(kr):n.domain().map((m,h)=>{var p=n.map(m);return it(p)?{coordinate:p+u,value:a?a[m]:m,index:h,offset:u}:null}).filter(kr)}},al=oe([dt,rd,nb,Gm,qO,FO,Yt],_pe),il=oe(nn,nb,(e,t)=>{if(!(e==null||t==null))return jy(jy({},e),{},{scale:t})}),jpe=oe([nn,vl,zO,nH],_O),Cpe=oe([jpe],eO);oe((e,t,n)=>jO(e,n),Cpe,(e,t)=>{if(!(e==null||t==null))return jy(jy({},e),{},{scale:t})});var Ope=oe([dt,R0,k0],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Ape=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};oe([Ape],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,a=e[0];for(var i of e){var s=Math.abs(i.coordinate-t);s<r&&(r=s,a=i)}return(n=a)===null||n===void 0?void 0:n.value}});var uH=e=>e.options.defaultTooltipEventType,fH=e=>e.options.validateTooltipEventTypes;function dH(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function KO(e,t){var n=uH(e),r=fH(e);return dH(t,n,r)}function Npe(e){return Ne(t=>KO(t,e))}var hH=(e,t)=>{var n,r=Number(t);if(!(Ni(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},Tpe=e=>e.tooltip.settings,Is={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Ppe={itemInteraction:{click:Is,hover:Is},axisInteraction:{click:Is,hover:Is},keyboardInteraction:Is,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},mH=hr({name:"tooltip",initialState:Ppe,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Dt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,a=_a(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=r)},prepare:Dt()},removeTooltipEntrySettings:{reducer(e,t){var n=_a(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Dt()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:Mpe,replaceTooltipEntrySettings:Rpe,removeTooltipEntrySettings:kpe,setTooltipSettingsState:Dpe,setActiveMouseOverItemIndex:pH,mouseLeaveItem:Ipe,mouseLeaveChart:vH,setActiveClickItemIndex:Lpe,setMouseOverAxisIndex:gH,setMouseClickAxisIndex:zpe,setSyncInteraction:A_,setKeyboardInteraction:Oy}=mH.actions,$pe=mH.reducer;function wI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wI(Object(n),!0).forEach(function(r){Bpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bpe(e,t,n){return(t=Upe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Upe(e){var t=Hpe(e,"string");return typeof t=="symbol"?t:t+""}function Hpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fpe(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function qpe(e){return e.index!=null}var yH=(e,t,n,r)=>{if(t==null)return Is;var a=Fpe(e,t,n);if(a==null)return Is;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(qpe(a)){if(i)return Yv(Yv({},a),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Yv(Yv({},Is),{},{coordinate:a.coordinate})};function Kpe(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Vpe(e,t){var n=Kpe(e),r=t[0],a=t[1];if(n===void 0)return!1;var i=Math.min(r,a),s=Math.max(r,a);return n>=i&&n<=s}function Ype(e,t,n){if(n==null||t==null)return!0;var r=_t(e,t);return r==null||!Oi(n)?!0:Vpe(r,n)}var VO=(e,t,n,r)=>{var a=e==null?void 0:e.index;if(a==null)return null;var i=Number(a);if(!it(i))return a;var s=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(s,Math.min(i,c)),u=t[f];return u==null||Ype(u,n,r)?String(f):null},bH=(e,t,n,r,a,i,s)=>{if(i!=null){var c=s[0],f=c==null?void 0:c.getPosition(i);if(f!=null)return f;var u=a==null?void 0:a[Number(i)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},xH=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(n==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&r!=null){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(s=>{var c;return((c=s.settings)===null||c===void 0?void 0:c.graphicalItemId)===a})},wH=e=>e.options.tooltipPayloadSearcher,id=e=>e.tooltip;function SI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function EI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SI(Object(n),!0).forEach(function(r){Gpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gpe(e,t,n){return(t=Xpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xpe(e){var t=Wpe(e,"string");return typeof t=="symbol"?t:t+""}function Wpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qpe(e){if(typeof e=="string"||typeof e=="number")return e}function Zpe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Jpe(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function _I(e){if(typeof e=="string")return e}function eve(e){if(!(e==null||typeof e!="object")){var t="name"in e?Qpe(e.name):void 0,n="unit"in e?Zpe(e.unit):void 0,r="dataKey"in e?Jpe(e.dataKey):void 0,a="payload"in e?e.payload:void 0,i="color"in e?_I(e.color):void 0,s="fill"in e?_I(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:a,color:i,fill:s}}}function tve(e,t){return e??t}var SH=(e,t,n,r,a,i,s)=>{if(!(t==null||i==null)){var{chartData:c,computedData:f,dataStartIndex:u,dataEndIndex:m}=n,h=[];return e.reduce((p,y)=>{var w,{dataDefinedOnItem:x,settings:S}=y,E=tve(x,c),O=Array.isArray(E)?e6(E,u,m):E,C=(w=S==null?void 0:S.dataKey)!==null&&w!==void 0?w:r,A=S==null?void 0:S.nameKey,N;if(r&&Array.isArray(O)&&!Array.isArray(O[0])&&s==="axis"?N=i8(O,r,a):N=i(O,t,f,A),Array.isArray(N))N.forEach(P=>{var k,D,K=eve(P),L=K==null?void 0:K.name,I=K==null?void 0:K.dataKey,W=K==null?void 0:K.payload,$=EI(EI({},S),{},{name:L,unit:K==null?void 0:K.unit,color:(k=K==null?void 0:K.color)!==null&&k!==void 0?k:S==null?void 0:S.color,fill:(D=K==null?void 0:K.fill)!==null&&D!==void 0?D:S==null?void 0:S.fill});p.push(pk({tooltipEntrySettings:$,dataKey:I,payload:W,value:_t(W,I),name:L==null?void 0:String(L)}))});else{var T;p.push(pk({tooltipEntrySettings:S,dataKey:C,payload:N,value:_t(N,C),name:(T=_t(N,A))!==null&&T!==void 0?T:S==null?void 0:S.name}))}return p},h)}},YO=oe([Tn,FU,YC],$U),nve=oe([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),rve=oe([Bn,nd],CO),od=oe([nve,Tn,rve],OO,{memoizeOptions:{resultEqualityCheck:Y0}}),ave=oe([od],e=>e.filter(K0)),ive=oe([od],AO,{memoizeOptions:{resultEqualityCheck:Y0}}),sd=oe([ive,Ho],NO),ove=oe([ave,Ho,Tn],tU),GO=oe([sd,Tn,od],PO),EH=oe([Tn],MO),sve=oe([Tn],e=>e.allowDataOverflow),_H=oe([EH,sve],D6),lve=oe([od],e=>e.filter(K0)),cve=oe([ove,lve,$m,G6],YU),uve=oe([cve,Ho,Bn,_H],GU),fve=oe([od],KU),dve=oe([sd,Tn,fve,tb,Bn],DO,{memoizeOptions:{resultEqualityCheck:V0}}),hve=oe([XU,Bn,nd],ad),mve=oe([hve,Bn],ZU),pve=oe([WU,Bn,nd],ad),vve=oe([pve,Bn],JU),gve=oe([QU,Bn,nd],ad),yve=oe([gve,Bn],eH),bve=oe([mve,yve,vve],Cy),xve=oe([Tn,EH,_H,uve,dve,bve,dt,Bn],IO),Xm=oe([Tn,dt,sd,GO,$m,Bn,xve],LO),wve=oe([Xm,Tn,YO],$O),Sve=oe([Tn,Xm,wve,Bn],UO),jH=e=>{var t=Bn(e),n=nd(e),r=!1;return Gm(e,t,n,r)},CH=oe([Tn,jH],H0),Eve=oe([Tn,YO,Sve,CH],_O),OH=oe([Eve],eO),_ve=oe([dt,GO,Tn,Bn],lH),jve=oe([dt,GO,Tn,Bn],rH),Cve=(e,t,n,r,a,i,s,c)=>{if(t){var{type:f}=t,u=$o(e,c);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,h=f==="category"&&r.bandwidth?r.bandwidth()/m:0;return h=c==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?In(a[0]-a[1])*2*h:h,u&&s?s.map((p,y)=>{var w=r.map(p);return it(w)?{coordinate:w+h,value:p,index:y,offset:h}:null}).filter(kr):r.domain().map((p,y)=>{var w=r.map(p);return it(w)?{coordinate:w+h,value:i?i[p]:p,index:y,offset:h}:null}).filter(kr)}}},Vo=oe([dt,Tn,YO,OH,jH,_ve,jve,Bn],Cve),XO=oe([uH,fH,Tpe],(e,t,n)=>dH(n.shared,e,t)),AH=e=>e.tooltip.settings.trigger,WO=e=>e.tooltip.settings.defaultIndex,Wm=oe([id,XO,AH,WO],yH),ol=oe([Wm,sd,Ym,Xm],VO),NH=oe([Vo,ol],hH),QO=oe([Wm],e=>{if(e)return e.dataKey}),TH=oe([Wm],e=>{if(e)return e.graphicalItemId}),PH=oe([id,XO,AH,WO],xH),Ove=oe([Bo,Uo,dt,An,Vo,WO,PH],bH),Ave=oe([Wm,Ove],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Nve=oe([Wm],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),Tve=oe([PH,ol,Ho,Ym,NH,wH,XO],SH),Pve=oe([Tve],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function jI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function CI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jI(Object(n),!0).forEach(function(r){Mve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mve(e,t,n){return(t=Rve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rve(e){var t=kve(e,"string");return typeof t=="symbol"?t:t+""}function kve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dve=()=>Ne(Tn),Ive=()=>{var e=Dve(),t=Ne(Vo),n=Ne(OH);return Cf(!e||!n?void 0:CI(CI({},e),{},{scale:n}),t)};function OI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OI(Object(n),!0).forEach(function(r){Lve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lve(e,t,n){return(t=zve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zve(e){var t=$ve(e,"string");return typeof t=="symbol"?t:t+""}function $ve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bve=(e,t,n,r)=>{var a=t.find(i=>i&&i.index===n);if(a){if(e==="horizontal")return{x:a.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:a.coordinate}}return{x:0,y:0}},Uve=(e,t,n,r)=>{var a=t.find(u=>u&&u.index===n);if(a){if(e==="centric"){var i=a.coordinate,{radius:s}=r;return $u($u($u({},r),mn(r.cx,r.cy,s,i)),{},{angle:i,radius:s})}var c=a.coordinate,{angle:f}=r;return $u($u($u({},r),mn(r.cx,r.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Hve(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var MH=(e,t,n,r,a)=>{var i,s=(i=t==null?void 0:t.length)!==null&&i!==void 0?i:0;if(s<=1||e==null)return 0;if(r==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var c=0;c<s;c++){var f,u,m,h,p,y=c>0?(f=n[c-1])===null||f===void 0?void 0:f.coordinate:(u=n[s-1])===null||u===void 0?void 0:u.coordinate,w=(m=n[c])===null||m===void 0?void 0:m.coordinate,x=c>=s-1?(h=n[0])===null||h===void 0?void 0:h.coordinate:(p=n[c+1])===null||p===void 0?void 0:p.coordinate,S=void 0;if(!(y==null||w==null||x==null))if(In(w-y)!==In(x-w)){var E=[];if(In(x-w)===In(a[1]-a[0])){S=x;var O=w+a[1]-a[0];E[0]=Math.min(O,(O+y)/2),E[1]=Math.max(O,(O+y)/2)}else{S=y;var C=x+a[1]-a[0];E[0]=Math.min(w,(C+w)/2),E[1]=Math.max(w,(C+w)/2)}var A=[Math.min(w,(S+w)/2),Math.max(w,(S+w)/2)];if(e>A[0]&&e<=A[1]||e>=E[0]&&e<=E[1]){var N;return(N=n[c])===null||N===void 0?void 0:N.index}}else{var T=Math.min(y,x),P=Math.max(y,x);if(e>(T+w)/2&&e<=(P+w)/2){var k;return(k=n[c])===null||k===void 0?void 0:k.index}}}else if(t)for(var D=0;D<s;D++){var K=t[D];if(K!=null){var L=t[D+1],I=t[D-1];if(D===0&&L!=null&&e<=(K.coordinate+L.coordinate)/2||D===s-1&&I!=null&&e>(K.coordinate+I.coordinate)/2||D>0&&D<s-1&&I!=null&&L!=null&&e>(K.coordinate+I.coordinate)/2&&e<=(K.coordinate+L.coordinate)/2)return K.index}}return-1},Fve=()=>Ne(YC),ZO=(e,t)=>t,RH=(e,t,n)=>n,JO=(e,t,n,r)=>r,qve=oe(Vo,e=>E0(e,t=>t.coordinate)),eA=oe([id,ZO,RH,JO],yH),tA=oe([eA,sd,Ym,Xm],VO),Kve=(e,t,n)=>{if(t!=null){var r=id(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},kH=oe([id,ZO,RH,JO],xH),Ay=oe([Bo,Uo,dt,An,Vo,JO,kH],bH),Vve=oe([eA,Ay],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),DH=oe([Vo,tA],hH),Yve=oe([kH,tA,Ho,Ym,DH,wH,ZO],SH),Gve=oe([eA,tA],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Xve=(e,t,n,r,a,i,s)=>{if(!(!e||!n||!r||!a)&&Hve(e,s)){var c=Mle(e,t),f=MH(c,i,a,n,r),u=Bve(t,a,f,e);return{activeIndex:String(f),activeCoordinate:u}}},Wve=(e,t,n,r,a,i,s)=>{if(!(!e||!r||!a||!i||!n)){var c=yfe(e,n);if(c){var f=Rle(c,t),u=MH(f,s,i,r,a),m=Uve(t,i,u,c);return{activeIndex:String(u),activeCoordinate:m}}}},Qve=(e,t,n,r,a,i,s,c)=>{if(!(!e||!t||!r||!a||!i))return t==="horizontal"||t==="vertical"?Xve(e,t,r,a,i,s,c):Wve(e,t,n,r,a,i,s)},Zve=oe(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),Jve=oe(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(pn)),n=Array.from(new Set(t));return n.sort((r,a)=>r-a)},{memoizeOptions:{resultEqualityCheck:Hfe}});function AI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function NI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AI(Object(n),!0).forEach(function(r){ege(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ege(e,t,n){return(t=tge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tge(e){var t=nge(e,"string");return typeof t=="symbol"?t:t+""}function nge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rge={},age={zIndexMap:Object.values(pn).reduce((e,t)=>NI(NI({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),rge)},ige=new Set(Object.values(pn));function oge(e){return ige.has(e)}var IH=hr({name:"zIndex",initialState:age,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Dt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!oge(n)&&delete e.zIndexMap[n])},prepare:Dt()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:a}=t.payload;e.zIndexMap[n]?a?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:a?void 0:r,panoramaElement:a?r:void 0}},prepare:Dt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Dt()}}}),{registerZIndexPortal:sge,unregisterZIndexPortal:lge,registerZIndexPortalElement:cge,unregisterZIndexPortalElement:uge}=IH.actions,fge=IH.reducer;function Lr(e){var{zIndex:t,children:n}=e,r=uce(),a=r&&t!==void 0&&t!==0,i=mr(),s=Ct();b.useLayoutEffect(()=>a?(s(sge({zIndex:t})),()=>{s(lge({zIndex:t}))}):hl,[s,t,a]);var c=Ne(f=>Zve(f,t,i));return a?c?cl.createPortal(n,c):null:n}function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(null,arguments)}function TI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TI(Object(n),!0).forEach(function(r){dge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dge(e,t,n){return(t=hge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hge(e){var t=mge(e,"string");return typeof t=="symbol"?t:t+""}function mge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pge(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return b.isValidElement(t)?b.cloneElement(t,r):b.createElement(n,r)}function vge(e){var t,{coordinate:n,payload:r,index:a,offset:i,tooltipAxisBandSize:s,layout:c,cursor:f,tooltipEventType:u,chartName:m}=e,h=n,p=r,y=a;if(!f||!h||m!=="ScatterChart"&&u!=="axis")return null;var w,x,S;if(m==="ScatterChart")w=h,x=Rue,S=pn.cursorLine;else if(m==="BarChart")w=kue(c,h,i,s),x=N6,S=pn.cursorRectangle;else if(c==="radial"&&s8(h)){var{cx:E,cy:O,radius:C,startAngle:A,endAngle:N}=P6(h);w={cx:E,cy:O,startAngle:A,endAngle:N,innerRadius:C,outerRadius:C},x=R6,S=pn.cursorLine}else w={points:Sfe(c,h,i)},x=HC,S=pn.cursorLine;var T=typeof f=="object"&&"className"in f?f.className:void 0,P=Gv(Gv(Gv(Gv({stroke:"#ccc",pointerEvents:"none"},i),w),Sc(f)),{},{payload:p,payloadIndex:y,className:st("recharts-tooltip-cursor",T)});return b.createElement(Lr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},b.createElement(pge,{cursor:f,cursorComp:x,cursorProps:P}))}function gge(e){var t=Ive(),n=c6(),r=Vc(),a=Fve();return t==null||n==null||r==null||a==null?null:b.createElement(vge,N_({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:a}))}var LH=b.createContext(null),yge=()=>b.useContext(LH),NS={exports:{}},PI;function bge(){return PI||(PI=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(f,u,m){this.fn=f,this.context=u,this.once=m||!1}function i(f,u,m,h,p){if(typeof m!="function")throw new TypeError("The listener must be a function");var y=new a(m,h||f,p),w=n?n+u:u;return f._events[w]?f._events[w].fn?f._events[w]=[f._events[w],y]:f._events[w].push(y):(f._events[w]=y,f._eventsCount++),f}function s(f,u){--f._eventsCount===0?f._events=new r:delete f._events[u]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],m,h;if(this._eventsCount===0)return u;for(h in m=this._events)t.call(m,h)&&u.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(m)):u},c.prototype.listeners=function(u){var m=n?n+u:u,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,y=h.length,w=new Array(y);p<y;p++)w[p]=h[p].fn;return w},c.prototype.listenerCount=function(u){var m=n?n+u:u,h=this._events[m];return h?h.fn?1:h.length:0},c.prototype.emit=function(u,m,h,p,y,w){var x=n?n+u:u;if(!this._events[x])return!1;var S=this._events[x],E=arguments.length,O,C;if(S.fn){switch(S.once&&this.removeListener(u,S.fn,void 0,!0),E){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,m),!0;case 3:return S.fn.call(S.context,m,h),!0;case 4:return S.fn.call(S.context,m,h,p),!0;case 5:return S.fn.call(S.context,m,h,p,y),!0;case 6:return S.fn.call(S.context,m,h,p,y,w),!0}for(C=1,O=new Array(E-1);C<E;C++)O[C-1]=arguments[C];S.fn.apply(S.context,O)}else{var A=S.length,N;for(C=0;C<A;C++)switch(S[C].once&&this.removeListener(u,S[C].fn,void 0,!0),E){case 1:S[C].fn.call(S[C].context);break;case 2:S[C].fn.call(S[C].context,m);break;case 3:S[C].fn.call(S[C].context,m,h);break;case 4:S[C].fn.call(S[C].context,m,h,p);break;default:if(!O)for(N=1,O=new Array(E-1);N<E;N++)O[N-1]=arguments[N];S[C].fn.apply(S[C].context,O)}}return!0},c.prototype.on=function(u,m,h){return i(this,u,m,h,!1)},c.prototype.once=function(u,m,h){return i(this,u,m,h,!0)},c.prototype.removeListener=function(u,m,h,p){var y=n?n+u:u;if(!this._events[y])return this;if(!m)return s(this,y),this;var w=this._events[y];if(w.fn)w.fn===m&&(!p||w.once)&&(!h||w.context===h)&&s(this,y);else{for(var x=0,S=[],E=w.length;x<E;x++)(w[x].fn!==m||p&&!w[x].once||h&&w[x].context!==h)&&S.push(w[x]);S.length?this._events[y]=S.length===1?S[0]:S:s(this,y)}return this},c.prototype.removeAllListeners=function(u){var m;return u?(m=n?n+u:u,this._events[m]&&s(this,m)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(NS)),NS.exports}var xge=bge();const wge=Qa(xge);var Qh=new wge,T_="recharts.syncEvent.tooltip",MI="recharts.syncEvent.brush",nA=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Ni(n))return e[n]}},Sge={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},zH=hr({name:"options",initialState:Sge,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Ege=zH.reducer,{createEventEmitter:_ge}=zH.actions;function jge(e){return e.tooltip.syncInteraction}var Cge={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},$H=hr({name:"chartData",initialState:Cge,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:RI,setDataStartEndIndexes:Oge,setComputedData:t2e}=$H.actions,Age=$H.reducer,Nge=["x","y"];function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kI(Object(n),!0).forEach(function(r){Tge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tge(e,t,n){return(t=Pge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pge(e){var t=Mge(e,"string");return typeof t=="symbol"?t:t+""}function Mge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rge(e,t){if(e==null)return{};var n,r,a=kge(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function kge(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dge(){var e=Ne(GC),t=Ne(XC),n=Ct(),r=Ne(X6),a=Ne(Vo),i=Vc(),s=L0(),c=Ne(f=>f.rootProps.className);b.useEffect(()=>{if(e==null)return hl;var f=(u,m,h)=>{if(t!==h&&e===u){if(r==="index"){var p;if(s&&m!==null&&m!==void 0&&(p=m.payload)!==null&&p!==void 0&&p.coordinate&&m.payload.sourceViewBox){var y=m.payload.coordinate,{x:w,y:x}=y,S=Rge(y,Nge),{x:E,y:O,width:C,height:A}=m.payload.sourceViewBox,N=Bu(Bu({},S),{},{x:s.x+(C?(w-E)/C:0)*s.width,y:s.y+(A?(x-O)/A:0)*s.height});n(Bu(Bu({},m),{},{payload:Bu(Bu({},m.payload),{},{coordinate:N})}))}else n(m);return}if(a!=null){var T;if(typeof r=="function"){var P={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},k=r(a,P);T=a[k]}else r==="value"&&(T=a.find(R=>String(R.value)===m.payload.label));var{coordinate:D}=m.payload;if(T==null||m.payload.active===!1||D==null||s==null){n(A_({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:K,y:L}=D,I=Math.min(K,s.x+s.width),W=Math.min(L,s.y+s.height),$={x:i==="horizontal"?T.coordinate:I,y:i==="horizontal"?W:T.coordinate},V=A_({active:m.payload.active,coordinate:$,dataKey:m.payload.dataKey,index:String(T.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(V)}}};return Qh.on(T_,f),()=>{Qh.off(T_,f)}},[c,n,t,e,r,a,i,s])}function Ige(){var e=Ne(GC),t=Ne(XC),n=Ct();b.useEffect(()=>{if(e==null)return hl;var r=(a,i,s)=>{t!==s&&e===a&&n(Oge(i))};return Qh.on(MI,r),()=>{Qh.off(MI,r)}},[n,t,e])}function Lge(){var e=Ct();b.useEffect(()=>{e(_ge())},[e]),Dge(),Ige()}function zge(e,t,n,r,a,i){var s=Ne(w=>Kve(w,e,t)),c=Ne(TH),f=Ne(XC),u=Ne(GC),m=Ne(X6),h=Ne(jge),p=h==null?void 0:h.active,y=L0();b.useEffect(()=>{if(!p&&u!=null&&f!=null){var w=A_({active:i,coordinate:n,dataKey:s,index:a,label:typeof r=="number"?String(r):r,sourceViewBox:y,graphicalItemId:c});Qh.emit(T_,u,w,f)}},[p,n,s,c,a,r,f,u,m,i,y])}function DI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function II(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(r){$ge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ge(e,t,n){return(t=Bge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bge(e){var t=Uge(e,"string");return typeof t=="symbol"?t:t+""}function Uge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hge(e){return e.dataKey}function Fge(e,t){return b.isValidElement(e)?b.cloneElement(e,t):typeof e=="function"?b.createElement(e,t):b.createElement(lue,t)}var LI=[],qge={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function BH(e){var t,n,r=yn(e,qge),{active:a,allowEscapeViewBox:i,animationDuration:s,animationEasing:c,content:f,filterNull:u,isAnimationActive:m,offset:h,payloadUniqBy:p,position:y,reverseDirection:w,useTranslate3d:x,wrapperStyle:S,cursor:E,shared:O,trigger:C,defaultIndex:A,portal:N,axisId:T}=r,P=Ct(),k=typeof A=="number"?String(A):A;b.useEffect(()=>{P(Dpe({shared:O,trigger:C,axisId:T,active:a,defaultIndex:k}))},[P,O,C,T,a,k]);var D=L0(),K=_6(),L=Npe(O),{activeIndex:I,isActive:W}=(t=Ne(re=>Gve(re,L,C,k)))!==null&&t!==void 0?t:{},$=Ne(re=>Yve(re,L,C,k)),V=Ne(re=>DH(re,L,C,k)),R=Ne(re=>Vve(re,L,C,k)),H=$,q=yge(),F=(n=a??W)!==null&&n!==void 0?n:!1,[Y,B]=_8([H,F]),z=L==="axis"?V:void 0;zge(L,C,R,z,I,F);var X=N??q;if(X==null||D==null||L==null)return null;var Z=H??LI;F||(Z=LI),u&&Z.length&&(Z=y8(Z.filter(re=>re.value!=null&&(re.hide!==!0||r.includeHidden)),p,Hge));var ee=Z.length>0,se=II(II({},r),{},{payload:Z,label:z,active:F,activeIndex:I,coordinate:R,accessibilityLayer:K}),ae=b.createElement(bue,{allowEscapeViewBox:i,animationDuration:s,animationEasing:c,isAnimationActive:m,active:F,coordinate:R,hasPayload:ee,offset:h,position:y,reverseDirection:w,useTranslate3d:x,viewBox:D,wrapperStyle:S,lastBoundingBox:Y,innerRef:B,hasPortalFromProps:!!N},Fge(f,se));return b.createElement(b.Fragment,null,cl.createPortal(ae,X),F&&b.createElement(gge,{cursor:E,tooltipEventType:L,coordinate:R,payload:Z,index:I}))}var Qm=e=>null;Qm.displayName="Cell";function Kge(e,t,n){return(t=Vge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vge(e){var t=Yge(e,"string");return typeof t=="symbol"?t:t+""}function Yge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Gge{constructor(t){Kge(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function zI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zI(Object(n),!0).forEach(function(r){Wge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wge(e,t,n){return(t=Qge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qge(e){var t=Zge(e,"string");return typeof t=="symbol"?t:t+""}function Zge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jge={cacheSize:2e3,enableCache:!0},UH=Xge({},Jge),$I=new Gge(UH.cacheSize),eye={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},BI="recharts_measurement_span";function tye(e,t){var n=t.fontSize||"",r=t.fontFamily||"",a=t.fontWeight||"",i=t.fontStyle||"",s=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(i,"|").concat(s,"|").concat(c)}var UI=(e,t)=>{try{var n=document.getElementById(BI);n||(n=document.createElement("span"),n.setAttribute("id",BI),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,eye,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Nh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Im.isSsr)return{width:0,height:0};if(!UH.enableCache)return UI(t,n);var r=tye(t,n),a=$I.get(r);if(a)return a;var i=UI(t,n);return $I.set(r,i),i},HH;function nye(e,t,n){return(t=rye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rye(e){var t=aye(e,"string");return typeof t=="symbol"?t:t+""}function aye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,FI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iye=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,oye=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,sye={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},lye=["cm","mm","pt","pc","in","Q","px"];function cye(e){return lye.includes(e)}var Qu="NaN";function uye(e,t){return e*sye[t]}class Gn{static parse(t){var n,[,r,a]=(n=oye.exec(t))!==null&&n!==void 0?n:[];return r==null?Gn.NaN:new Gn(parseFloat(r),a??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Ni(t)&&(this.unit=""),n!==""&&!iye.test(n)&&(this.num=NaN,this.unit=""),cye(n)&&(this.num=uye(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Gn(NaN,""):new Gn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Gn(NaN,""):new Gn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Gn(NaN,""):new Gn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Gn(NaN,""):new Gn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ni(this.num)}}HH=Gn;nye(Gn,"NaN",new HH(NaN,""));function FH(e){if(e==null||e.includes(Qu))return Qu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,a,i]=(n=HI.exec(t))!==null&&n!==void 0?n:[],s=Gn.parse(r??""),c=Gn.parse(i??""),f=a==="*"?s.multiply(c):s.divide(c);if(f.isNaN())return Qu;t=t.replace(HI,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,m,h,p]=(u=FI.exec(t))!==null&&u!==void 0?u:[],y=Gn.parse(m??""),w=Gn.parse(p??""),x=h==="+"?y.add(w):y.subtract(w);if(x.isNaN())return Qu;t=t.replace(FI,x.toString())}return t}var qI=/\(([^()]*)\)/;function fye(e){for(var t=e,n;(n=qI.exec(t))!=null;){var[,r]=n;t=t.replace(qI,FH(r))}return t}function dye(e){var t=e.replace(/\s+/g,"");return t=fye(t),t=FH(t),t}function hye(e){try{return dye(e)}catch{return Qu}}function TS(e){var t=hye(e.slice(5,-1));return t===Qu?"":t}var mye=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],pye=["dx","dy","angle","className","breakAll"];function P_(){return P_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P_.apply(null,arguments)}function KI(e,t){if(e==null)return{};var n,r,a=vye(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function vye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qH=/[ \f\n\r\t\v\u2028\u2029]+/,KH=e=>{var{children:t,breakAll:n,style:r}=e;try{var a=[];Ht(t)||(n?a=t.toString().split(""):a=t.toString().split(qH));var i=a.map(c=>({word:c,width:Nh(c,r).width})),s=n?0:Nh(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}};function VH(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function gye(e){return Ht(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var YH=(e,t,n,r)=>e.reduce((a,i)=>{var{word:s,width:c}=i,f=a[a.length-1];if(f&&c!=null&&(t==null||r||f.width+c+n<Number(t)))f.words.push(s),f.width+=c+n;else{var u={words:[s],width:c};a.push(u)}return a},[]),GH=e=>e.reduce((t,n)=>t.width>n.width?t:n),yye="…",VI=(e,t,n,r,a,i,s,c)=>{var f=e.slice(0,t),u=KH({breakAll:n,style:r,children:f+yye});if(!u)return[!1,[]];var m=YH(u.wordsWithComputedWidth,i,s,c),h=m.length>a||GH(m).width>Number(i);return[h,m]},bye=(e,t,n,r,a)=>{var{maxLines:i,children:s,style:c,breakAll:f}=e,u=_e(i),m=String(s),h=YH(t,r,n,a);if(!u||a)return h;var p=h.length>i||GH(h).width>Number(r);if(!p)return h;for(var y=0,w=m.length-1,x=0,S;y<=w&&x<=m.length-1;){var E=Math.floor((y+w)/2),O=E-1,[C,A]=VI(m,O,f,c,i,r,n,a),[N]=VI(m,E,f,c,i,r,n,a);if(!C&&!N&&(y=E+1),C&&N&&(w=E-1),!C&&N){S=A;break}x++}return S||h},YI=e=>{var t=Ht(e)?[]:e.toString().split(qH);return[{words:t,width:void 0}]},xye=e=>{var{width:t,scaleToFit:n,children:r,style:a,breakAll:i,maxLines:s}=e;if((t||n)&&!Im.isSsr){var c,f,u=KH({breakAll:i,children:r,style:a});if(u){var{wordsWithComputedWidth:m,spaceWidth:h}=u;c=m,f=h}else return YI(r);return bye({breakAll:i,children:r,maxLines:s,style:a},c,f,t,!!n)}return YI(r)},XH="#808080",wye={angle:0,breakAll:!1,capHeight:"0.71em",fill:XH,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},ib=b.forwardRef((e,t)=>{var n=yn(e,wye),{x:r,y:a,lineHeight:i,capHeight:s,fill:c,scaleToFit:f,textAnchor:u,verticalAnchor:m}=n,h=KI(n,mye),p=b.useMemo(()=>xye({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:f,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,f,h.style,h.width]),{dx:y,dy:w,angle:x,className:S,breakAll:E}=h,O=KI(h,pye);if(!Ti(r)||!Ti(a)||p.length===0)return null;var C=Number(r)+(_e(y)?y:0),A=Number(a)+(_e(w)?w:0);if(!it(C)||!it(A))return null;var N;switch(m){case"start":N=TS("calc(".concat(s,")"));break;case"middle":N=TS("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(s," / 2))"));break;default:N=TS("calc(".concat(p.length-1," * -").concat(i,")"));break}var T=[],P=p[0];if(f&&P!=null){var k=P.width,{width:D}=h;T.push("scale(".concat(_e(D)&&_e(k)?D/k:1,")"))}return x&&T.push("rotate(".concat(x,", ").concat(C,", ").concat(A,")")),T.length&&(O.transform=T.join(" ")),b.createElement("text",P_({},br(O),{ref:t,x:C,y:A,className:st("recharts-text",S),textAnchor:u,fill:c.includes("url")?XH:c}),p.map((K,L)=>{var I=K.words.join(E?"":" ");return b.createElement("tspan",{x:C,dy:L===0?N:i,key:"".concat(I,"-").concat(L)},I)}))});ib.displayName="Text";function GI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GI(Object(n),!0).forEach(function(r){Sye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sye(e,t,n){return(t=Eye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eye(e){var t=_ye(e,"string");return typeof t=="symbol"?t:t+""}function _ye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jye=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:a}=e,{x:i,y:s,height:c,upperWidth:f,lowerWidth:u}=LC(t),m=i,h=i+(f-u)/2,p=(m+h)/2,y=(f+u)/2,w=m+f/2,x=c>=0?1:-1,S=x*r,E=x>0?"end":"start",O=x>0?"start":"end",C=f>=0?1:-1,A=C*r,N=C>0?"end":"start",T=C>0?"start":"end",P=a;if(n==="top"){var k={x:m+f/2,y:s-S,horizontalAnchor:"middle",verticalAnchor:E};return P&&(k.height=Math.max(s-P.y,0),k.width=f),k}if(n==="bottom"){var D={x:h+u/2,y:s+c+S,horizontalAnchor:"middle",verticalAnchor:O};return P&&(D.height=Math.max(P.y+P.height-(s+c),0),D.width=u),D}if(n==="left"){var K={x:p-A,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"};return P&&(K.width=Math.max(K.x-P.x,0),K.height=c),K}if(n==="right"){var L={x:p+y+A,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return P&&(L.width=Math.max(P.x+P.width-L.x,0),L.height=c),L}var I=P?{width:y,height:c}:{};return n==="insideLeft"?pi({x:p+A,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"},I):n==="insideRight"?pi({x:p+y-A,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"},I):n==="insideTop"?pi({x:m+f/2,y:s+S,horizontalAnchor:"middle",verticalAnchor:O},I):n==="insideBottom"?pi({x:h+u/2,y:s+c-S,horizontalAnchor:"middle",verticalAnchor:E},I):n==="insideTopLeft"?pi({x:m+A,y:s+S,horizontalAnchor:T,verticalAnchor:O},I):n==="insideTopRight"?pi({x:m+f-A,y:s+S,horizontalAnchor:N,verticalAnchor:O},I):n==="insideBottomLeft"?pi({x:h+A,y:s+c-S,horizontalAnchor:T,verticalAnchor:E},I):n==="insideBottomRight"?pi({x:h+u-A,y:s+c-S,horizontalAnchor:N,verticalAnchor:E},I):n&&typeof n=="object"&&(_e(n.x)||jc(n.x))&&(_e(n.y)||jc(n.y))?pi({x:i+fr(n.x,y),y:s+fr(n.y,c),horizontalAnchor:"end",verticalAnchor:"end"},I):pi({x:w,y:s+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},I)},Cye=["labelRef"],Oye=["content"];function XI(e,t){if(e==null)return{};var n,r,a=Aye(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Aye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function WI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ch(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WI(Object(n),!0).forEach(function(r){Nye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nye(e,t,n){return(t=Tye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tye(e){var t=Pye(e,"string");return typeof t=="symbol"?t:t+""}function Pye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vo.apply(null,arguments)}var WH=b.createContext(null),Mye=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s,children:c}=e,f=b.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s}),[t,n,r,a,i,s]);return b.createElement(WH.Provider,{value:f},c)},QH=()=>{var e=b.useContext(WH),t=L0();return e||(t?LC(t):void 0)},Rye=b.createContext(null),kye=()=>{var e=b.useContext(Rye),t=Ne(eU);return e||t},Dye=e=>{var{value:t,formatter:n}=e,r=Ht(e.children)?t:e.children;return typeof n=="function"?n(r):r},rA=e=>e!=null&&typeof e=="function",Iye=(e,t)=>{var n=In(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Lye=(e,t,n,r,a)=>{var{offset:i,className:s}=e,{cx:c,cy:f,innerRadius:u,outerRadius:m,startAngle:h,endAngle:p,clockWise:y}=a,w=(u+m)/2,x=Iye(h,p),S=x>=0?1:-1,E,O;switch(t){case"insideStart":E=h+S*i,O=y;break;case"insideEnd":E=p-S*i,O=!y;break;case"end":E=p+S*i,O=y;break;default:throw new Error("Unsupported position ".concat(t))}O=x<=0?O:!O;var C=mn(c,f,w,E),A=mn(c,f,w,E+(O?1:-1)*359),N="M".concat(C.x,",").concat(C.y,`
    A`).concat(w,",").concat(w,",0,1,").concat(O?0:1,`,
    `).concat(A.x,",").concat(A.y),T=Ht(e.id)?$h("recharts-radial-line-"):e.id;return b.createElement("text",vo({},r,{dominantBaseline:"central",className:st("recharts-radial-bar-label",s)}),b.createElement("defs",null,b.createElement("path",{id:T,d:N})),b.createElement("textPath",{xlinkHref:"#".concat(T)},n))},zye=(e,t,n)=>{var{cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:c,endAngle:f}=e,u=(c+f)/2;if(n==="outside"){var{x:m,y:h}=mn(r,a,s+t,u);return{x:m,y:h,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=(i+s)/2,{x:y,y:w}=mn(r,a,p,u);return{x:y,y:w,textAnchor:"middle",verticalAnchor:"middle"}},gg=e=>e!=null&&"cx"in e&&_e(e.cx),$ye={angle:0,offset:5,zIndex:pn.label,position:"middle",textBreakAll:!1};function Bye(e){if(!gg(e))return e;var{cx:t,cy:n,outerRadius:r}=e,a=r*2;return{x:t-r,y:n-r,width:a,upperWidth:a,lowerWidth:a,height:a}}function ks(e){var t=yn(e,$ye),{viewBox:n,parentViewBox:r,position:a,value:i,children:s,content:c,className:f="",textBreakAll:u,labelRef:m}=t,h=kye(),p=QH(),y=a==="center"?p:h??p,w,x,S;n==null?w=y:gg(n)?w=n:w=LC(n);var E=Bye(w);if(!w||Ht(i)&&Ht(s)&&!b.isValidElement(c)&&typeof c!="function")return null;var O=Ch(Ch({},t),{},{viewBox:w});if(b.isValidElement(c)){var{labelRef:C}=O,A=XI(O,Cye);return b.cloneElement(c,A)}if(typeof c=="function"){var{content:N}=O,T=XI(O,Oye);if(x=b.createElement(c,T),b.isValidElement(x))return x}else x=Dye(t);var P=br(t);if(gg(w)){if(a==="insideStart"||a==="insideEnd"||a==="end")return Lye(t,a,x,P,w);S=zye(w,t.offset,t.position)}else{if(!E)return null;var k=jye({viewBox:E,position:a,offset:t.offset,parentViewBox:gg(r)?void 0:r});S=Ch(Ch({x:k.x,y:k.y,textAnchor:k.horizontalAnchor,verticalAnchor:k.verticalAnchor},k.width!==void 0?{width:k.width}:{}),k.height!==void 0?{height:k.height}:{})}return b.createElement(Lr,{zIndex:t.zIndex},b.createElement(ib,vo({ref:m,className:st("recharts-label",f)},P,S,{textAnchor:VH(P.textAnchor)?P.textAnchor:S.textAnchor,breakAll:u}),x))}ks.displayName="Label";var Uye=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?b.createElement(ks,vo({key:"label-implicit"},r)):Ti(e)?b.createElement(ks,vo({key:"label-implicit",value:e},r)):b.isValidElement(e)?e.type===ks?b.cloneElement(e,Ch({key:"label-implicit"},r)):b.createElement(ks,vo({key:"label-implicit",content:e},r)):rA(e)?b.createElement(ks,vo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?b.createElement(ks,vo({},e,{key:"label-implicit"},r)):null};function Hye(e){var{label:t,labelRef:n}=e,r=QH();return Uye(t,r,n)||null}var Fye=["valueAccessor"],qye=["dataKey","clockWise","id","textBreakAll","zIndex"];function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ny.apply(null,arguments)}function QI(e,t){if(e==null)return{};var n,r,a=Kye(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Kye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vye=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(gye(t))return t},ZH=b.createContext(void 0),JH=ZH.Provider,eF=b.createContext(void 0),Yye=eF.Provider;function Gye(){return b.useContext(ZH)}function Xye(){return b.useContext(eF)}function yg(e){var{valueAccessor:t=Vye}=e,n=QI(e,Fye),{dataKey:r,clockWise:a,id:i,textBreakAll:s,zIndex:c}=n,f=QI(n,qye),u=Gye(),m=Xye(),h=u||m;return!h||!h.length?null:b.createElement(Lr,{zIndex:c??pn.label},b.createElement(On,{className:"recharts-label-list"},h.map((p,y)=>{var w,x=Ht(r)?t(p,y):_t(p.payload,r),S=Ht(i)?{}:{id:"".concat(i,"-").concat(y)};return b.createElement(ks,Ny({key:"label-".concat(y)},br(p),f,S,{fill:(w=n.fill)!==null&&w!==void 0?w:p.fill,parentViewBox:p.parentViewBox,value:x,textBreakAll:s,viewBox:p.viewBox,index:y,zIndex:0}))})))}yg.displayName="LabelList";function aA(e){var{label:t}=e;return t?t===!0?b.createElement(yg,{key:"labelList-implicit"}):b.isValidElement(t)||rA(t)?b.createElement(yg,{key:"labelList-implicit",content:t}):typeof t=="object"?b.createElement(yg,Ny({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(null,arguments)}var tF=e=>{var{cx:t,cy:n,r,className:a}=e,i=st("recharts-dot",a);return _e(t)&&_e(n)&&_e(r)?b.createElement("circle",M_({},ta(e),jC(e),{className:i,cx:t,cy:n,r})):null},nF=e=>e.graphicalItems.polarItems,Wye=oe([Yt,Bm],CO),ob=oe([nF,nn,Wye],OO),Qye=oe([ob],AO),sb=oe([Qye,U0],NO),Zye=oe([sb,nn,ob],PO);oe([sb,nn,ob],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(a=>{var i,s=_t(r,(i=t.dataKey)!==null&&i!==void 0?i:a.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:_t(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var ZI=()=>{},Jye=oe([sb,nn,ob,tb,Yt],DO),e0e=oe([nn,RO,kO,ZI,Jye,ZI,dt,Yt],IO),rF=oe([nn,dt,sb,Zye,$m,Yt,e0e],LO),t0e=oe([rF,rd,vl],$O),n0e=oe([nn,rF,t0e,Yt],UO);oe([vl,n0e],nU);var r0e={radiusAxis:{},angleAxis:{}},aF=hr({name:"polarAxis",initialState:r0e,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:n2e,removeRadiusAxis:r2e,addAngleAxis:a2e,removeAngleAxis:i2e}=aF.actions,a0e=aF.reducer;function iF(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(n),!0).forEach(function(r){i0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i0e(e,t,n){return(t=o0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o0e(e){var t=s0e(e,"string");return typeof t=="symbol"?t:t+""}function s0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l0e=(e,t)=>t,iA=oe([nF,l0e],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),c0e=[],oA=(e,t,n)=>(n==null?void 0:n.length)===0?c0e:n,oF=oe([U0,iA,oA],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var a;if((t==null?void 0:t.data)!=null&&t.data.length>0?a=t.data:a=r,(!a||!a.length)&&n!=null&&(a=n.map(i=>eL(eL({},t.presentationProps),i.props))),a!=null)return a}}),u0e=oe([oF,iA,oA],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,a)=>{var i,s=_t(r,t.nameKey,t.name),c;return n!=null&&(i=n[a])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?c=n[a].props.fill:typeof r=="object"&&r!=null&&"fill"in r?c=r.fill:c=t.fill,{value:Zf(s,t.dataKey),color:c,payload:r,type:t.legendType}})}),f0e=oe([oF,iA,oA,An],(e,t,n,r)=>{if(!(t==null||e==null))return pbe({offset:r,pieSettings:t,displayedData:e,cells:n})}),PS={exports:{}},St={};/**
 * @license React
 * react-is.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 tL;function d0e(){if(tL)return St;tL=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function w(x){if(typeof x=="object"&&x!==null){var S=x.$$typeof;switch(S){case e:switch(x=x.type,x){case n:case a:case r:case f:case u:case p:return x;default:switch(x=x&&x.$$typeof,x){case s:case c:case h:case m:return x;case i:return x;default:return S}}case t:return S}}}return St.ContextConsumer=i,St.ContextProvider=s,St.Element=e,St.ForwardRef=c,St.Fragment=n,St.Lazy=h,St.Memo=m,St.Portal=t,St.Profiler=a,St.StrictMode=r,St.Suspense=f,St.SuspenseList=u,St.isContextConsumer=function(x){return w(x)===i},St.isContextProvider=function(x){return w(x)===s},St.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},St.isForwardRef=function(x){return w(x)===c},St.isFragment=function(x){return w(x)===n},St.isLazy=function(x){return w(x)===h},St.isMemo=function(x){return w(x)===m},St.isPortal=function(x){return w(x)===t},St.isProfiler=function(x){return w(x)===a},St.isStrictMode=function(x){return w(x)===r},St.isSuspense=function(x){return w(x)===f},St.isSuspenseList=function(x){return w(x)===u},St.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===a||x===r||x===f||x===u||typeof x=="object"&&x!==null&&(x.$$typeof===h||x.$$typeof===m||x.$$typeof===s||x.$$typeof===i||x.$$typeof===c||x.$$typeof===y||x.getModuleId!==void 0)},St.typeOf=w,St}var nL;function h0e(){return nL||(nL=1,PS.exports=d0e()),PS.exports}var m0e=h0e(),rL=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",aL=null,MS=null,sF=e=>{if(e===aL&&Array.isArray(MS))return MS;var t=[];return b.Children.forEach(e,n=>{Ht(n)||(m0e.isFragment(n)?t=t.concat(sF(n.props.children)):t.push(n))}),MS=t,aL=e,t};function sA(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(a=>rL(a)):r=[rL(t)],sF(e).forEach(a=>{var i=_c(a,"type.displayName")||_c(a,"type.name");i&&r.indexOf(i)!==-1&&n.push(a)}),n}var lF=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,RS={},iL;function p0e(){return iL||(iL=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var a;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!((a=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&a.writable)?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(RS)),RS}var kS,oL;function v0e(){return oL||(oL=1,kS=p0e().isPlainObject),kS}var g0e=v0e();const y0e=Qa(g0e);var sL,lL,cL,uL,fL;function dL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dL(Object(n),!0).forEach(function(r){b0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b0e(e,t,n){return(t=x0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x0e(e){var t=w0e(e,"string");return typeof t=="symbol"?t:t+""}function w0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ty.apply(null,arguments)}function ph(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var mL=(e,t,n,r,a)=>{var i=n-r,s;return s=Jt(sL||(sL=ph(["M ",",",""])),e,t),s+=Jt(lL||(lL=ph(["L ",",",""])),e+n,t),s+=Jt(cL||(cL=ph(["L ",",",""])),e+n-i/2,t+a),s+=Jt(uL||(uL=ph(["L ",",",""])),e+n-i/2-r,t+a),s+=Jt(fL||(fL=ph(["L ",","," Z"])),e,t),s},S0e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},E0e=e=>{var t=yn(e,S0e),{x:n,y:r,upperWidth:a,lowerWidth:i,height:s,className:c}=t,{animationEasing:f,animationDuration:u,animationBegin:m,isUpdateAnimationActive:h}=t,p=b.useRef(null),[y,w]=b.useState(-1),x=b.useRef(a),S=b.useRef(i),E=b.useRef(s),O=b.useRef(n),C=b.useRef(r),A=zm(e,"trapezoid-");if(b.useEffect(()=>{if(p.current&&p.current.getTotalLength)try{var $=p.current.getTotalLength();$&&w($)}catch{}},[]),n!==+n||r!==+r||a!==+a||i!==+i||s!==+s||a===0&&i===0||s===0)return null;var N=st("recharts-trapezoid",c);if(!h)return b.createElement("g",null,b.createElement("path",Ty({},br(t),{className:N,d:mL(n,r,a,i,s)})));var T=x.current,P=S.current,k=E.current,D=O.current,K=C.current,L="0px ".concat(y===-1?1:y,"px"),I="".concat(y,"px ").concat(y,"px"),W=j6(["strokeDasharray"],u,f);return b.createElement(Lm,{animationId:A,key:A,canBegin:y>0,duration:u,easing:f,isActive:h,begin:m},$=>{var V=$t(T,a,$),R=$t(P,i,$),H=$t(k,s,$),q=$t(D,n,$),F=$t(K,r,$);p.current&&(x.current=V,S.current=R,E.current=H,O.current=q,C.current=F);var Y=$>0?{transition:W,strokeDasharray:I}:{strokeDasharray:L};return b.createElement("path",Ty({},br(t),{className:N,d:mL(q,F,V,R,H),ref:p,style:hL(hL({},Y),t.style)}))})},_0e=["option","shapeType","activeClassName","inActiveClassName"];function j0e(e,t){if(e==null)return{};var n,r,a=C0e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function C0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function pL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Py(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pL(Object(n),!0).forEach(function(r){O0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O0e(e,t,n){return(t=A0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A0e(e){var t=N0e(e,"string");return typeof t=="symbol"?t:t+""}function N0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T0e(e,t){return Py(Py({},t),e)}function P0e(e,t){return e==="symbols"}function vL(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return b.createElement(N6,n);case"trapezoid":return b.createElement(E0e,n);case"sector":return b.createElement(R6,n);case"symbols":if(P0e(t))return b.createElement(_C,n);break;case"curve":return b.createElement(HC,n);default:return null}}function M0e(e){return b.isValidElement(e)?e.props:e}function lA(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:a="recharts-shape"}=e,i=j0e(e,_0e),s;if(b.isValidElement(t))s=b.cloneElement(t,Py(Py({},i),M0e(t)));else if(typeof t=="function")s=t(i,i.index);else if(y0e(t)&&typeof t!="boolean"){var c=T0e(t,i);s=b.createElement(vL,{shapeType:n,elementProps:c})}else{var f=i;s=b.createElement(vL,{shapeType:n,elementProps:f})}return i.isActive?b.createElement(On,{className:r},s):b.createElement(On,{className:a},s)}var cA=(e,t,n)=>{var r=Ct();return(a,i)=>s=>{e==null||e(a,i,s),r(pH({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},uA=e=>{var t=Ct();return(n,r)=>a=>{e==null||e(n,r,a),t(Ipe())}},fA=(e,t,n)=>{var r=Ct();return(a,i)=>s=>{e==null||e(a,i,s),r(Lpe({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function dA(e){var{tooltipEntrySettings:t}=e,n=Ct(),r=mr(),a=b.useRef(null);return b.useLayoutEffect(()=>{r||(a.current===null?n(Mpe(t)):a.current!==t&&n(Rpe({prev:a.current,next:t})),a.current=t)},[t,n,r]),b.useLayoutEffect(()=>()=>{a.current&&(n(kpe(a.current)),a.current=null)},[n]),null}function cF(e){var{legendPayload:t}=e,n=Ct(),r=mr(),a=b.useRef(null);return b.useLayoutEffect(()=>{r||(a.current===null?n(b6(t)):a.current!==t&&n(x6({prev:a.current,next:t})),a.current=t)},[n,r,t]),b.useLayoutEffect(()=>()=>{a.current&&(n(w6(a.current)),a.current=null)},[n]),null}function R0e(e){var{legendPayload:t}=e,n=Ct(),r=Ne(dt),a=b.useRef(null);return b.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(a.current===null?n(b6(t)):a.current!==t&&n(x6({prev:a.current,next:t})),a.current=t)},[n,r,t]),b.useLayoutEffect(()=>()=>{a.current&&(n(w6(a.current)),a.current=null)},[n]),null}var DS,k0e=()=>{var[e]=b.useState(()=>$h("uid-"));return e},D0e=(DS=tj.useId)!==null&&DS!==void 0?DS:k0e;function I0e(e,t){var n=D0e();return t||(e?"".concat(e,"-").concat(n):n)}var L0e=b.createContext(void 0),hA=e=>{var{id:t,type:n,children:r}=e,a=I0e("recharts-".concat(n),t);return b.createElement(L0e.Provider,{value:a},r(a))},z0e={cartesianItems:[],polarItems:[]},uF=hr({name:"graphicalItems",initialState:z0e,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Dt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=_a(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=r)},prepare:Dt()},removeCartesianGraphicalItem:{reducer(e,t){var n=_a(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Dt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Dt()},removePolarGraphicalItem:{reducer(e,t){var n=_a(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Dt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=_a(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=r)},prepare:Dt()}}}),{addCartesianGraphicalItem:$0e,replaceCartesianGraphicalItem:B0e,removeCartesianGraphicalItem:U0e,addPolarGraphicalItem:H0e,removePolarGraphicalItem:F0e,replacePolarGraphicalItem:q0e}=uF.actions,K0e=uF.reducer,V0e=e=>{var t=Ct(),n=b.useRef(null);return b.useLayoutEffect(()=>{n.current===null?t($0e(e)):n.current!==e&&t(B0e({prev:n.current,next:e})),n.current=e},[t,e]),b.useLayoutEffect(()=>()=>{n.current&&(t(U0e(n.current)),n.current=null)},[t]),null},fF=b.memo(V0e),Y0e=e=>{var t=Ct(),n=b.useRef(null);return b.useLayoutEffect(()=>{n.current===null?t(H0e(e)):n.current!==e&&t(q0e({prev:n.current,next:e})),n.current=e},[t,e]),b.useLayoutEffect(()=>()=>{n.current&&(t(F0e(n.current)),n.current=null)},[t]),null},G0e=b.memo(Y0e),X0e=["key"],W0e=["onMouseEnter","onClick","onMouseLeave"],Q0e=["id"],Z0e=["id"];function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sl.apply(null,arguments)}function lb(e,t){if(e==null)return{};var n,r,a=J0e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function J0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gL(Object(n),!0).forEach(function(r){ebe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ebe(e,t,n){return(t=tbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tbe(e){var t=nbe(e,"string");return typeof t=="symbol"?t:t+""}function nbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rbe(e){var t=b.useMemo(()=>sA(e.children,Qm),[e.children]),n=Ne(r=>u0e(r,e.id,t));return n==null?null:b.createElement(R0e,{legendPayload:n})}function abe(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(b.isValidElement(e)){var t,n=(t=e.props)===null||t===void 0?void 0:t.fill;return typeof n=="string"?n:void 0}var{fill:r}=e;return typeof r=="string"?r:void 0}}var ibe=b.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:a,strokeWidth:i,fill:s,name:c,hide:f,tooltipType:u,id:m,activeShape:h}=e,p=abe(h),y=r.map(x=>{var S=x.tooltipPayload;return p==null||S==null?S:S.map(E=>Bt(Bt({},E),{},{color:p,fill:p}))}),w={dataDefinedOnItem:y,getPosition:x=>{var S;return(S=r[Number(x)])===null||S===void 0?void 0:S.tooltipPosition},settings:{stroke:a,strokeWidth:i,fill:s,dataKey:t,nameKey:n,name:Zf(c,t),hide:f,type:u,color:s,unit:"",graphicalItemId:m}};return b.createElement(dA,{tooltipEntrySettings:w})}),obe=(e,t)=>e>t?"start":e<t?"end":"middle",sbe=(e,t,n)=>fr(typeof t=="function"?t(e):t,n,n*.8),lbe=(e,t,n)=>{var{top:r,left:a,width:i,height:s}=t,c=T6(i,s),f=a+fr(e.cx,i,i/2),u=r+fr(e.cy,s,s/2),m=fr(e.innerRadius,c,0),h=sbe(n,e.outerRadius,c),p=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:f,cy:u,innerRadius:m,outerRadius:h,maxRadius:p}},cbe=(e,t)=>{var n=In(t-e),r=Math.min(Math.abs(t-e),360);return n*r},ube=(e,t)=>{if(b.isValidElement(e))return b.cloneElement(e,t);if(typeof e=="function")return e(t);var n=st("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,a=lb(t,X0e);return b.createElement(HC,sl({},a,{type:"linear",className:n}))},fbe=(e,t,n)=>{if(b.isValidElement(e))return b.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),b.isValidElement(r)))return r;var a=st("recharts-pie-label-text",iF(e));return b.createElement(ib,sl({},t,{alignmentBaseline:"middle",className:a}),r)};function dbe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a,labelLine:i,dataKey:s}=n;if(!r||!a||!t)return null;var c=ta(n),f=Sc(a),u=Sc(i),m=typeof a=="object"&&"offsetRadius"in a&&typeof a.offsetRadius=="number"&&a.offsetRadius||20,h=t.map((p,y)=>{var w=(p.startAngle+p.endAngle)/2,x=mn(p.cx,p.cy,p.outerRadius+m,w),S=Bt(Bt(Bt(Bt({},c),p),{},{stroke:"none"},f),{},{index:y,textAnchor:obe(x.x,p.cx)},x),E=Bt(Bt(Bt(Bt({},c),p),{},{fill:"none",stroke:p.fill},u),{},{index:y,points:[mn(p.cx,p.cy,p.outerRadius,w),x],key:"line"});return b.createElement(Lr,{zIndex:pn.label,key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(y)},b.createElement(On,null,i&&ube(i,E),fbe(a,S,_t(p,s))))});return b.createElement(On,{className:"recharts-pie-labels"},h)}function hbe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a}=n;return typeof a=="object"&&a!=null&&"position"in a?b.createElement(aA,{label:a}):b.createElement(dbe,{sectors:t,props:n,showLabels:r})}function mbe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:a,shape:i,id:s}=e,c=Ne(ol),f=Ne(QO),u=Ne(TH),{onMouseEnter:m,onClick:h,onMouseLeave:p}=a,y=lb(a,W0e),w=cA(m,a.dataKey,s),x=uA(p),S=fA(h,a.dataKey,s);return t==null||t.length===0?null:b.createElement(b.Fragment,null,t.map((E,O)=>{if((E==null?void 0:E.startAngle)===0&&(E==null?void 0:E.endAngle)===0&&t.length!==1)return null;var C=u==null||u===s,A=String(O)===c&&(f==null||a.dataKey===f)&&C,N=c?r:null,T=n&&A?n:N,P=Bt(Bt({},E),{},{stroke:E.stroke,tabIndex:-1,[a6]:O,[i6]:s});return b.createElement(On,sl({key:"sector-".concat(E==null?void 0:E.startAngle,"-").concat(E==null?void 0:E.endAngle,"-").concat(E.midAngle,"-").concat(O),tabIndex:-1,className:"recharts-pie-sector"},Tm(y,E,O),{onMouseEnter:w(E,O),onMouseLeave:x(E,O),onClick:S(E,O)}),b.createElement(lA,sl({option:i??T,index:O,shapeType:"sector",isActive:A},P)))}))}function pbe(e){var t,{pieSettings:n,displayedData:r,cells:a,offset:i}=e,{cornerRadius:s,startAngle:c,endAngle:f,dataKey:u,nameKey:m,tooltipType:h}=n,p=Math.abs(n.minAngle),y=cbe(c,f),w=Math.abs(y),x=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,S=r.filter(T=>_t(T,u,0)!==0).length,E=(w>=360?S:S-1)*x,O=w-S*p-E,C=r.reduce((T,P)=>{var k=_t(P,u,0);return T+(_e(k)?k:0)},0),A;if(C>0){var N;A=r.map((T,P)=>{var k=_t(T,u,0),D=_t(T,m,P),K=lbe(n,i,T),L=(_e(k)?k:0)/C,I,W=Bt(Bt({},T),a&&a[P]&&a[P].props),$=W!=null&&"fill"in W&&typeof W.fill=="string"?W.fill:n.fill;P?I=N.endAngle+In(y)*x*(k!==0?1:0):I=c;var V=I+In(y)*((k!==0?p:0)+L*O),R=(I+V)/2,H=(K.innerRadius+K.outerRadius)/2,q=[{name:D,value:k,payload:W,dataKey:u,type:h,color:$,fill:$,graphicalItemId:n.id}],F=mn(K.cx,K.cy,H,R);return N=Bt(Bt(Bt(Bt({},n.presentationProps),{},{percent:L,cornerRadius:typeof s=="string"?parseFloat(s):s,name:D,tooltipPayload:q,midAngle:R,middleRadius:H,tooltipPosition:F},W),K),{},{value:k,dataKey:u,startAngle:I,endAngle:V,payload:W,paddingAngle:In(y)*x}),N})}return A}function vbe(e){var{showLabels:t,sectors:n,children:r}=e,a=b.useMemo(()=>!t||!n?[]:n.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[n,t]);return b.createElement(Yye,{value:t?a:void 0},r)}function gbe(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:a,isAnimationActive:i,animationBegin:s,animationDuration:c,animationEasing:f,activeShape:u,inactiveShape:m,onAnimationStart:h,onAnimationEnd:p}=t,y=zm(t,"recharts-pie-"),w=n.current,[x,S]=b.useState(!1),E=b.useCallback(()=>{typeof p=="function"&&p(),S(!1)},[p]),O=b.useCallback(()=>{typeof h=="function"&&h(),S(!0)},[h]);return b.createElement(vbe,{showLabels:!x,sectors:a},b.createElement(Lm,{animationId:y,begin:s,duration:c,isActive:i,easing:f,onAnimationStart:O,onAnimationEnd:E,key:y},C=>{var A,N=[],T=a&&a[0],P=(A=T==null?void 0:T.startAngle)!==null&&A!==void 0?A:0;return a==null||a.forEach((k,D)=>{var K=w&&w[D],L=D>0?_c(k,"paddingAngle",0):0;if(K){var I=$t(K.endAngle-K.startAngle,k.endAngle-k.startAngle,C),W=Bt(Bt({},k),{},{startAngle:P+L,endAngle:P+I+L});N.push(W),P=W.endAngle}else{var{endAngle:$,startAngle:V}=k,R=$t(0,$-V,C),H=Bt(Bt({},k),{},{startAngle:P+L,endAngle:P+R+L});N.push(H),P=H.endAngle}}),n.current=N,b.createElement(On,null,b.createElement(mbe,{sectors:N,activeShape:u,inactiveShape:m,allOtherPieProps:t,shape:t.shape,id:r}))}),b.createElement(hbe,{showLabels:!x,sectors:a,props:t}),t.children)}var ybe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:pn.area};function bbe(e){var{id:t}=e,n=lb(e,Q0e),{hide:r,className:a,rootTabIndex:i}=e,s=b.useMemo(()=>sA(e.children,Qm),[e.children]),c=Ne(m=>f0e(m,t,s)),f=b.useRef(null),u=st("recharts-pie",a);return r||c==null?(f.current=null,b.createElement(On,{tabIndex:i,className:u})):b.createElement(Lr,{zIndex:e.zIndex},b.createElement(ibe,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:c,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t,activeShape:e.activeShape}),b.createElement(On,{tabIndex:i,className:u},b.createElement(gbe,{props:Bt(Bt({},n),{},{sectors:c}),previousSectorsRef:f,id:t})))}function xbe(e){var t=yn(e,ybe),{id:n}=t,r=lb(t,Z0e),a=ta(r);return b.createElement(hA,{id:n,type:"pie"},i=>b.createElement(b.Fragment,null,b.createElement(G0e,{type:"pie",id:i,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:a,maxRadius:t.maxRadius}),b.createElement(rbe,sl({},r,{id:i})),b.createElement(bbe,sl({},r,{id:i}))))}var dF=xbe;dF.displayName="Pie";var wbe=["points"];function yL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function IS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yL(Object(n),!0).forEach(function(r){Sbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sbe(e,t,n){return(t=Ebe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ebe(e){var t=_be(e,"string");return typeof t=="symbol"?t:t+""}function _be(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function My(){return My=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},My.apply(null,arguments)}function jbe(e,t){if(e==null)return{};var n,r,a=Cbe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Cbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Obe(e){var{option:t,dotProps:n,className:r}=e;if(b.isValidElement(t))return b.cloneElement(t,n);if(typeof t=="function")return t(n);var a=st(r,typeof t!="boolean"?t.className:""),i=n??{},{points:s}=i,c=jbe(i,wbe);return b.createElement(tF,My({},c,{className:a}))}function Abe(e,t){return e==null?!1:t?!0:e.length===1}function Nbe(e){var{points:t,dot:n,className:r,dotClassName:a,dataKey:i,baseProps:s,needClip:c,clipPathId:f,zIndex:u=pn.scatter}=e;if(!Abe(t,n))return null;var m=lF(n),h=cie(n),p=t.map((w,x)=>{var S,E,O=IS(IS(IS({r:3},s),h),{},{index:x,cx:(S=w.x)!==null&&S!==void 0?S:void 0,cy:(E=w.y)!==null&&E!==void 0?E:void 0,dataKey:i,value:w.value,payload:w.payload,points:t});return b.createElement(Obe,{key:"dot-".concat(x),option:n,dotProps:O,className:a})}),y={};return c&&f!=null&&(y.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(f,")")),b.createElement(Lr,{zIndex:u},b.createElement(On,My({className:r},y),p))}function bL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bL(Object(n),!0).forEach(function(r){Tbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tbe(e,t,n){return(t=Pbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pbe(e){var t=Mbe(e,"string");return typeof t=="symbol"?t:t+""}function Mbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hF=0,Rbe={xAxis:{},yAxis:{},zAxis:{}},mF=hr({name:"cartesianAxis",initialState:Rbe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Dt()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:Dt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Dt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Dt()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:Dt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Dt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Dt()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:Dt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Dt()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,a=e.yAxis[n];if(a){var i,s=a.widthHistory||[];if(s.length===3&&s[0]===s[2]&&r===s[1]&&r!==a.width&&Math.abs(r-((i=s[0])!==null&&i!==void 0?i:0))<=1)return;var c=[...s,r].slice(-3);e.yAxis[n]=xL(xL({},a),{},{width:r,widthHistory:c})}}}}),{addXAxis:kbe,replaceXAxis:Dbe,removeXAxis:Ibe,addYAxis:Lbe,replaceYAxis:zbe,removeYAxis:$be,addZAxis:o2e,replaceZAxis:s2e,removeZAxis:l2e,updateYAxisWidth:Bbe}=mF.actions,Ube=mF.reducer,Hbe=oe([An],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Fbe=oe([Hbe,Bo,Uo],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),mA=()=>Ne(Fbe),qbe=()=>Ne(Pve);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function LS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wL(Object(n),!0).forEach(function(r){Kbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kbe(e,t,n){return(t=Vbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vbe(e){var t=Ybe(e,"string");return typeof t=="symbol"?t:t+""}function Ybe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gbe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:a,dataKey:i,clipPath:s}=e;if(a===!1||t.x==null||t.y==null)return null;var c={index:n,dataKey:i,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=LS(LS(LS({},c),Sc(a)),jC(a)),u;return b.isValidElement(a)?u=b.cloneElement(a,f):typeof a=="function"?u=a(f):u=b.createElement(tF,f),b.createElement(On,{className:"recharts-active-dot",clipPath:s},u)};function Xbe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:a,clipPath:i,zIndex:s=pn.activeDot}=e,c=Ne(ol),f=qbe();if(t==null||f==null)return null;var u=t.find(m=>f.includes(m.payload));return Ht(u)?null:b.createElement(Lr,{zIndex:s},b.createElement(Gbe,{point:u,childIndex:Number(c),mainColor:n,dataKey:a,activeDot:r,clipPath:i}))}var SL=(e,t,n)=>{var r=n??e;if(!Ht(r))return fr(r,t,0)},Wbe=(e,t,n)=>{var r={},a=e.filter(K0),i=e.filter(u=>u.stackId==null),s=a.reduce((u,m)=>{var h=u[m.stackId];return h==null&&(h=[]),h.push(m),u[m.stackId]=h,u},r),c=Object.entries(s).map(u=>{var m,[h,p]=u,y=p.map(x=>x.dataKey),w=SL(t,n,(m=p[0])===null||m===void 0?void 0:m.barSize);return{stackId:h,dataKeys:y,barSize:w}}),f=i.map(u=>{var m=[u.dataKey].filter(p=>p!=null),h=SL(t,n,u.barSize);return{stackId:void 0,dataKeys:m,barSize:h}});return[...c,...f]};function EL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EL(Object(n),!0).forEach(function(r){Qbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qbe(e,t,n){return(t=Zbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zbe(e){var t=Jbe(e,"string");return typeof t=="symbol"?t:t+""}function Jbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function exe(e,t,n,r,a){var i,s=r.length;if(!(s<1)){var c=fr(e,n,0,!0),f,u=[];if(it((i=r[0])===null||i===void 0?void 0:i.barSize)){var m=!1,h=n/s,p=r.reduce((O,C)=>O+(C.barSize||0),0);p+=(s-1)*c,p>=n&&(p-=(s-1)*c,c=0),p>=n&&h>0&&(m=!0,h*=.9,p=s*h);var y=(n-p)/2>>0,w={offset:y-c,size:0};f=r.reduce((O,C)=>{var A,N={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:w.offset+w.size+c,size:m?h:(A=C.barSize)!==null&&A!==void 0?A:0}},T=[...O,N];return w=N.position,T},u)}else{var x=fr(t,n,0,!0);n-2*x-(s-1)*c<=0&&(c=0);var S=(n-2*x-(s-1)*c)/s;S>1&&(S>>=0);var E=it(a)?Math.min(S,a):S;f=r.reduce((O,C,A)=>[...O,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:x+(S+c)*A+(S-E)/2,size:E}}],u)}return f}}var txe=(e,t,n,r,a,i,s)=>{var c=Ht(s)?t:s,f=exe(n,r,a!==i?a:i,e,c);return a!==i&&f!=null&&(f=f.map(u=>Xv(Xv({},u),{},{position:Xv(Xv({},u.position),{},{offset:u.position.offset-a/2})}))),f},nxe=(e,t)=>{var n=JC(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var a=e[r];if(a){var{stackedData:i}=a;if(i)return i.find(s=>s.key===n)}}}},rxe=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function axe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&it(e.zIndex)?e.zIndex:t}var pF=e=>{var{chartData:t}=e,n=Ct(),r=mr();return b.useEffect(()=>r?()=>{}:(n(RI(t)),()=>{n(RI(void 0))}),[t,n,r]),null},_L={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},vF=hr({name:"brush",initialState:_L,reducers:{setBrushSettings(e,t){return t.payload==null?_L:t.payload}}}),{setBrushSettings:c2e}=vF.actions,ixe=vF.reducer;function oxe(e){return(e%180+180)%180}var sxe=function(t){var{width:n,height:r}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=oxe(a),s=i*Math.PI/180,c=Math.atan(r/n),f=s>c&&s<Math.PI-c?r/Math.sin(s):n/Math.cos(s);return Math.abs(f)},lxe={dots:[],areas:[],lines:[]},gF=hr({name:"referenceElements",initialState:lxe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=_a(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=_a(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=_a(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:u2e,removeDot:f2e,addArea:d2e,removeArea:h2e,addLine:m2e,removeLine:p2e}=gF.actions,cxe=gF.reducer,uxe=b.createContext(void 0),fxe=e=>{var{children:t}=e,[n]=b.useState("".concat($h("recharts"),"-clip")),r=mA();if(r==null)return null;var{x:a,y:i,width:s,height:c}=r;return b.createElement(uxe.Provider,{value:n},b.createElement("defs",null,b.createElement("clipPath",{id:n},b.createElement("rect",{x:a,y:i,height:c,width:s}))),t)};function yF(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var a=e[r];a!==void 0&&n.push(a)}return n}function dxe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return sxe(r,n)}function hxe(e,t,n){var r=n==="width",{x:a,y:i,width:s,height:c}=e;return t===1?{start:r?a:i,end:r?a+s:i+c}:{start:r?a+s:i+c,end:r?a:i}}function Zh(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function mxe(e,t){return yF(e,t+1)}function pxe(e,t,n,r,a){for(var i=(r||[]).slice(),{start:s,end:c}=t,f=0,u=1,m=s,h=function(){var w=r==null?void 0:r[f];if(w===void 0)return{v:yF(r,u)};var x=f,S,E=()=>(S===void 0&&(S=n(w,x)),S),O=w.coordinate,C=f===0||Zh(e,O,E,m,c);C||(f=0,m=s,u+=1),C&&(m=O+e*(E()/2+a),f+=u)},p;u<=i.length;)if(p=h(),p)return p.v;return[]}function vxe(e,t,n,r,a){var i=(r||[]).slice(),s=i.length;if(s===0)return[];for(var{start:c,end:f}=t,u=1;u<=s;u++){for(var m=(s-1)%u,h=c,p=!0,y=function(){var A=r[x];if(A==null)return 0;var N=x,T,P=()=>(T===void 0&&(T=n(A,N)),T),k=A.coordinate,D=x===m||Zh(e,k,P,h,f);if(!D)return p=!1,1;D&&(h=k+e*(P()/2+a))},w,x=m;x<s&&(w=y(),!(w!==0&&w===1));x+=u);if(p){for(var S=[],E=m;E<s;E+=u){var O=r[E];O!=null&&S.push(O)}return S}}return[]}function jL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jL(Object(n),!0).forEach(function(r){gxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gxe(e,t,n){return(t=yxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yxe(e){var t=bxe(e,"string");return typeof t=="symbol"?t:t+""}function bxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xxe(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,{start:c}=t,{end:f}=t,u=function(p){var y=i[p];if(y==null)return 1;var w=y,x,S=()=>(x===void 0&&(x=n(y,p)),x);if(p===s-1){var E=e*(w.coordinate+e*S()/2-f);i[p]=w=sr(sr({},w),{},{tickCoord:E>0?w.coordinate-E*e:w.coordinate})}else i[p]=w=sr(sr({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var O=Zh(e,w.tickCoord,S,c,f);O&&(f=w.tickCoord-e*(S()/2+a),i[p]=sr(sr({},w),{},{isShow:!0}))}},m=s-1;m>=0;m--)u(m);return i}function wxe(e,t,n,r,a,i){var s=(r||[]).slice(),c=s.length,{start:f,end:u}=t;if(i){var m=r[c-1];if(m!=null){var h=n(m,c-1),p=e*(m.coordinate+e*h/2-u);if(s[c-1]=m=sr(sr({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate}),m.tickCoord!=null){var y=Zh(e,m.tickCoord,()=>h,f,u);y&&(u=m.tickCoord-e*(h/2+a),s[c-1]=sr(sr({},m),{},{isShow:!0}))}}}for(var w=i?c-1:c,x=function(O){var C=s[O];if(C==null)return 1;var A=C,N,T=()=>(N===void 0&&(N=n(C,O)),N);if(O===0){var P=e*(A.coordinate-e*T()/2-f);s[O]=A=sr(sr({},A),{},{tickCoord:P<0?A.coordinate-P*e:A.coordinate})}else s[O]=A=sr(sr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var k=Zh(e,A.tickCoord,T,f,u);k&&(f=A.tickCoord+e*(T()/2+a),s[O]=sr(sr({},A),{},{isShow:!0}))}},S=0;S<w;S++)x(S);return s}function pA(e,t,n){var{tick:r,ticks:a,viewBox:i,minTickGap:s,orientation:c,interval:f,tickFormatter:u,unit:m,angle:h}=e;if(!a||!a.length||!r)return[];if(_e(f)||Im.isSsr){var p;return(p=mxe(a,_e(f)?f:0))!==null&&p!==void 0?p:[]}var y=[],w=c==="top"||c==="bottom"?"width":"height",x=m&&w==="width"?Nh(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=(N,T)=>{var P=typeof u=="function"?u(N.value,T):N.value;return w==="width"?dxe(Nh(P,{fontSize:t,letterSpacing:n}),x,h):Nh(P,{fontSize:t,letterSpacing:n})[w]},E=a[0],O=a[1],C=a.length>=2&&E!=null&&O!=null?In(O.coordinate-E.coordinate):1,A=hxe(i,C,w);return f==="equidistantPreserveStart"?pxe(C,A,S,a,s):f==="equidistantPreserveEnd"?vxe(C,A,S,a,s):(f==="preserveStart"||f==="preserveStartEnd"?y=wxe(C,A,S,a,s,f==="preserveStartEnd"):y=xxe(C,A,S,a,s),y.filter(N=>N.isShow))}var Sxe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:a=0,tickMargin:i=0}=e,s=0;if(t){Array.from(t).forEach(m=>{if(m){var h=m.getBoundingClientRect();h.width>s&&(s=h.width)}});var c=n?n.getBoundingClientRect().width:0,f=a+i,u=s+f+c+(n?r:0);return Math.round(u)}return 0},Exe={xAxis:{},yAxis:{}},bF=hr({name:"renderedTicks",initialState:Exe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:a}=t.payload;e[n][r]=a},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:_xe,removeRenderedTicks:jxe}=bF.actions,Cxe=bF.reducer,Oxe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Axe(e,t){if(e==null)return{};var n,r,a=Nxe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Nxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(null,arguments)}function CL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CL(Object(n),!0).forEach(function(r){Txe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Txe(e,t,n){return(t=Pxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pxe(e){var t=Mxe(e,"string");return typeof t=="symbol"?t:t+""}function Mxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var So={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:pn.axis};function Rxe(e){var{x:t,y:n,width:r,height:a,orientation:i,mirror:s,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var u=Zt(Zt(Zt({},f),ta(c)),{},{fill:"none"});if(i==="top"||i==="bottom"){var m=+(i==="top"&&!s||i==="bottom"&&s);u=Zt(Zt({},u),{},{x1:t,y1:n+m*a,x2:t+r,y2:n+m*a})}else{var h=+(i==="left"&&!s||i==="right"&&s);u=Zt(Zt({},u),{},{x1:t+h*r,y1:n,x2:t+h*r,y2:n+a})}return b.createElement("line",Pc({},u,{className:st("recharts-cartesian-axis-line",_c(c,"className"))}))}function kxe(e,t,n,r,a,i,s,c,f){var u,m,h,p,y,w,x=c?-1:1,S=e.tickSize||s,E=_e(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":u=m=e.coordinate,p=n+ +!c*a,h=p-x*S,w=h-x*f,y=E;break;case"left":h=p=e.coordinate,m=t+ +!c*r,u=m-x*S,y=u-x*f,w=E;break;case"right":h=p=e.coordinate,m=t+ +c*r,u=m+x*S,y=u+x*f,w=E;break;default:u=m=e.coordinate,p=n+ +c*a,h=p+x*S,w=h+x*f,y=E;break}return{line:{x1:u,y1:h,x2:m,y2:p},tick:{x:y,y:w}}}function Dxe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Ixe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Lxe(e){var{option:t,tickProps:n,value:r}=e,a,i=st(n.className,"recharts-cartesian-axis-tick-value");if(b.isValidElement(t))a=b.cloneElement(t,Zt(Zt({},n),{},{className:i}));else if(typeof t=="function")a=t(Zt(Zt({},n),{},{className:i}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=st(s,iF(t))),a=b.createElement(ib,Pc({},n,{className:s}),r)}return a}function zxe(e){var{ticks:t,axisType:n,axisId:r}=e,a=Ct();return b.useEffect(()=>{if(r==null||n==null)return hl;var i=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return a(_xe({ticks:i,axisId:r,axisType:n})),()=>{a(jxe({axisId:r,axisType:n}))}},[a,t,r,n]),null}var $xe=b.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:a,stroke:i,tickFormatter:s,unit:c,padding:f,tickTextProps:u,orientation:m,mirror:h,x:p,y,width:w,height:x,tickSize:S,tickMargin:E,fontSize:O,letterSpacing:C,getTicksConfig:A,events:N,axisType:T,axisId:P}=e,k=pA(Zt(Zt({},A),{},{ticks:n}),O,C),D=ta(A),K=Sc(r),L=VH(D.textAnchor)?D.textAnchor:Dxe(m,h),I=Ixe(m,h),W={};typeof a=="object"&&(W=a);var $=Zt(Zt({},D),{},{fill:"none"},W),V=k.map(q=>Zt({entry:q},kxe(q,p,y,w,x,m,S,h,E))),R=V.map(q=>{var{entry:F,line:Y}=q;return b.createElement(On,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(F.value,"-").concat(F.coordinate,"-").concat(F.tickCoord)},a&&b.createElement("line",Pc({},$,Y,{className:st("recharts-cartesian-axis-tick-line",_c(a,"className"))})))}),H=V.map((q,F)=>{var Y,B,{entry:z,tick:X}=q,Z=Zt(Zt(Zt(Zt({verticalAnchor:I},D),{},{textAnchor:L,stroke:"none",fill:i},X),{},{index:F,payload:z,visibleTicksCount:k.length,tickFormatter:s,padding:f},u),{},{angle:(Y=(B=u==null?void 0:u.angle)!==null&&B!==void 0?B:D.angle)!==null&&Y!==void 0?Y:0}),ee=Zt(Zt({},Z),K);return b.createElement(On,Pc({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(z.value,"-").concat(z.coordinate,"-").concat(z.tickCoord)},Tm(N,z,F)),r&&b.createElement(Lxe,{option:r,tickProps:ee,value:"".concat(typeof s=="function"?s(z.value,F):z.value).concat(c||"")}))});return b.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(T,"-ticks")},b.createElement(zxe,{ticks:k,axisId:P,axisType:T}),H.length>0&&b.createElement(Lr,{zIndex:pn.label},b.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(T,"-tick-labels"),ref:t},H)),R.length>0&&b.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(T,"-tick-lines")},R))}),Bxe=b.forwardRef((e,t)=>{var{axisLine:n,width:r,height:a,className:i,hide:s,ticks:c,axisType:f,axisId:u}=e,m=Axe(e,Oxe),[h,p]=b.useState(""),[y,w]=b.useState(""),x=b.useRef(null);b.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var E;return Sxe({ticks:x.current,label:(E=e.labelRef)===null||E===void 0?void 0:E.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=b.useCallback(E=>{if(E){var O=E.getElementsByClassName("recharts-cartesian-axis-tick-value");x.current=O;var C=O[0];if(C){var A=window.getComputedStyle(C),N=A.fontSize,T=A.letterSpacing;(N!==h||T!==y)&&(p(N),w(T))}}},[h,y]);return s||r!=null&&r<=0||a!=null&&a<=0?null:b.createElement(Lr,{zIndex:e.zIndex},b.createElement(On,{className:st("recharts-cartesian-axis",i)},b.createElement(Rxe,{x:e.x,y:e.y,width:r,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:ta(e)}),b.createElement($xe,{ref:S,axisType:f,events:m,fontSize:h,getTicksConfig:e,height:e.height,letterSpacing:y,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),b.createElement(Mye,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},b.createElement(Hye,{label:e.label,labelRef:e.labelRef}),e.children)))}),vA=b.forwardRef((e,t)=>{var n=yn(e,So);return b.createElement(Bxe,Pc({},n,{ref:t}))});vA.displayName="CartesianAxis";var Uxe=["x1","y1","x2","y2","key"],Hxe=["offset"],Fxe=["xAxisId","yAxisId"],qxe=["xAxisId","yAxisId"];function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OL(Object(n),!0).forEach(function(r){Kxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kxe(e,t,n){return(t=Vxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vxe(e){var t=Yxe(e,"string");return typeof t=="symbol"?t:t+""}function Yxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jl.apply(null,arguments)}function Ry(e,t){if(e==null)return{};var n,r,a=Gxe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Gxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Xxe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:a,width:i,height:s,ry:c}=e;return b.createElement("rect",{x:r,y:a,ry:c,width:i,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function xF(e){var{option:t,lineItemProps:n}=e,r;if(b.isValidElement(t))r=b.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var a,{x1:i,y1:s,x2:c,y2:f,key:u}=n,m=Ry(n,Uxe),h=(a=ta(m))!==null&&a!==void 0?a:{},{offset:p}=h,y=Ry(h,Hxe);r=b.createElement("line",Jl({},y,{x1:i,y1:s,x2:c,y2:f,fill:"none",key:u}))}return r}function Wxe(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,c=Ry(e,Fxe),f=a.map((u,m)=>{var h=cr(cr({},c),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(m),index:m});return b.createElement(xF,{key:"line-".concat(m),option:r,lineItemProps:h})});return b.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function Qxe(e){var{y:t,height:n,vertical:r=!0,verticalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,c=Ry(e,qxe),f=a.map((u,m)=>{var h=cr(cr({},c),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(m),index:m});return b.createElement(xF,{option:r,lineItemProps:h,key:"line-".concat(m)})});return b.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function Zxe(e){var{horizontalFill:t,fillOpacity:n,x:r,y:a,width:i,height:s,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!t||!t.length||c==null)return null;var u=c.map(h=>Math.round(h+a-a)).sort((h,p)=>h-p);a!==u[0]&&u.unshift(0);var m=u.map((h,p)=>{var y=u[p+1],w=y==null,x=w?a+s-h:y-h;if(x<=0)return null;var S=p%t.length;return b.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:x,width:i,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Jxe(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:a,y:i,width:s,height:c,verticalPoints:f}=e;if(!t||!n||!n.length)return null;var u=f.map(h=>Math.round(h+a-a)).sort((h,p)=>h-p);a!==u[0]&&u.unshift(0);var m=u.map((h,p)=>{var y=u[p+1],w=y==null,x=w?a+s-h:y-h;if(x<=0)return null;var S=p%n.length;return b.createElement("rect",{key:"react-".concat(p),x:h,y:i,width:x,height:c,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var ewe=(e,t)=>{var{xAxis:n,width:r,height:a,offset:i}=e;return t6(pA(cr(cr(cr({},So),n),{},{ticks:n6(n),viewBox:{x:0,y:0,width:r,height:a}})),i.left,i.left+i.width,t)},twe=(e,t)=>{var{yAxis:n,width:r,height:a,offset:i}=e;return t6(pA(cr(cr(cr({},So),n),{},{ticks:n6(n),viewBox:{x:0,y:0,width:r,height:a}})),i.top,i.top+i.height,t)},nwe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:pn.grid};function gA(e){var t=zC(),n=$C(),r=c6(),a=cr(cr({},yn(e,nwe)),{},{x:_e(e.x)?e.x:r.left,y:_e(e.y)?e.y:r.top,width:_e(e.width)?e.width:r.width,height:_e(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:s,x:c,y:f,width:u,height:m,syncWithTicks:h,horizontalValues:p,verticalValues:y}=a,w=mr(),x=Ne(D=>xI(D,"xAxis",i,w)),S=Ne(D=>xI(D,"yAxis",s,w));if(!Pi(u)||!Pi(m)||!_e(c)||!_e(f))return null;var E=a.verticalCoordinatesGenerator||ewe,O=a.horizontalCoordinatesGenerator||twe,{horizontalPoints:C,verticalPoints:A}=a;if((!C||!C.length)&&typeof O=="function"){var N=p&&p.length,T=O({yAxis:S?cr(cr({},S),{},{ticks:N?p:S.ticks}):void 0,width:t??u,height:n??m,offset:r},N?!0:h);ay(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof T,"]")),Array.isArray(T)&&(C=T)}if((!A||!A.length)&&typeof E=="function"){var P=y&&y.length,k=E({xAxis:x?cr(cr({},x),{},{ticks:P?y:x.ticks}):void 0,width:t??u,height:n??m,offset:r},P?!0:h);ay(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(A=k)}return b.createElement(Lr,{zIndex:a.zIndex},b.createElement("g",{className:"recharts-cartesian-grid"},b.createElement(Xxe,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),b.createElement(Zxe,Jl({},a,{horizontalPoints:C})),b.createElement(Jxe,Jl({},a,{verticalPoints:A})),b.createElement(Wxe,Jl({},a,{offset:r,horizontalPoints:C,xAxis:x,yAxis:S})),b.createElement(Qxe,Jl({},a,{offset:r,verticalPoints:A,xAxis:x,yAxis:S}))))}gA.displayName="CartesianGrid";var rwe={},wF=hr({name:"errorBars",initialState:rwe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:a}=t.payload;e[n]&&(e[n]=e[n].map(i=>i.dataKey===r.dataKey&&i.direction===r.direction?a:i))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(a=>a.dataKey!==r.dataKey||a.direction!==r.direction))}}}),{addErrorBar:v2e,replaceErrorBar:g2e,removeErrorBar:y2e}=wF.actions,awe=wF.reducer,iwe=["children"];function owe(e,t){if(e==null)return{};var n,r,a=swe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function swe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var lwe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},cwe=b.createContext(lwe);function SF(e){var{children:t}=e,n=owe(e,iwe);return b.createElement(cwe.Provider,{value:n},t)}function yA(e,t){var n,r,a=Ne(u=>qo(u,e)),i=Ne(u=>Ko(u,t)),s=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:_n.allowDataOverflow,c=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:jn.allowDataOverflow,f=s||c;return{needClip:f,needClipX:s,needClipY:c}}function EF(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,a=mA(),{needClipX:i,needClipY:s,needClip:c}=yA(t,n);if(!c||!a)return null;var{x:f,y:u,width:m,height:h}=a;return b.createElement("clipPath",{id:"clipPath-".concat(r)},b.createElement("rect",{x:i?f:f-m/2,y:s?u:u-h/2,width:i?m:m*2,height:s?h:h*2}))}var _F=(e,t,n,r)=>il(e,"xAxis",t,r),jF=(e,t,n,r)=>al(e,"xAxis",t,r),CF=(e,t,n,r)=>il(e,"yAxis",n,r),OF=(e,t,n,r)=>al(e,"yAxis",n,r),uwe=oe([dt,_F,CF,jF,OF],(e,t,n,r,a)=>$o(e,"xAxis")?Cf(t,r,!1):Cf(n,a,!1)),fwe=(e,t,n,r,a)=>a;function dwe(e){return e.type==="line"}var hwe=oe([eb,fwe],(e,t)=>e.filter(dwe).find(n=>n.id===t)),mwe=oe([dt,_F,CF,jF,OF,hwe,uwe,FC],(e,t,n,r,a,i,s,c)=>{var{chartData:f,dataStartIndex:u,dataEndIndex:m}=c;if(!(i==null||t==null||n==null||r==null||a==null||r.length===0||a.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:h,data:p}=i,y;if(p!=null&&p.length>0?y=p:y=f==null?void 0:f.slice(u,m+1),y!=null)return Dwe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:a,dataKey:h,bandSize:s,displayedData:y})}});function pwe(e){var t=Sc(e),n=3,r=2;if(t!=null){var{r:a,strokeWidth:i}=t,s=Number(a),c=Number(i);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(c)||c<0)&&(c=r),{r:s,strokeWidth:c}}return{r:n,strokeWidth:r}}var vwe=["id"],gwe=["type","layout","connectNulls","needClip","shape"],ywe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jh.apply(null,arguments)}function AL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AL(Object(n),!0).forEach(function(r){bwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bwe(e,t,n){return(t=xwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xwe(e){var t=wwe(e,"string");return typeof t=="symbol"?t:t+""}function wwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bA(e,t){if(e==null)return{};var n,r,a=Swe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Swe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ewe=e=>{var{dataKey:t,name:n,stroke:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:Zf(n,t),payload:e}]},_we=b.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:a,fill:i,name:s,hide:c,unit:f,tooltipType:u,id:m}=e,h={dataDefinedOnItem:n,getPosition:hl,settings:{stroke:r,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:Zf(s,t),hide:c,type:u,color:r,unit:f,graphicalItemId:m}};return b.createElement(dA,{tooltipEntrySettings:h})}),AF=(e,t)=>"".concat(t,"px ").concat(e,"px");function jwe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],a=0;a<t;++a)r.push(...n);return r}var Cwe=(e,t,n)=>{var r=n.reduce((p,y)=>p+y,0);if(!r)return AF(t,e);for(var a=Math.floor(e/r),i=e%r,s=[],c=0,f=0;c<n.length;f+=(u=n[c])!==null&&u!==void 0?u:0,++c){var u,m=n[c];if(m!=null&&f+m>i){s=[...n.slice(0,c),i-f];break}}var h=s.length%2===0?[0,t]:[t];return[...jwe(n,a),...s,...h].map(p=>"".concat(p,"px")).join(", ")};function Owe(e){var{clipPathId:t,points:n,props:r}=e,{dot:a,dataKey:i,needClip:s}=r,{id:c}=r,f=bA(r,vwe),u=ta(f);return b.createElement(Nbe,{points:n,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:u,needClip:s,clipPathId:t})}function Awe(e){var{showLabels:t,children:n,points:r}=e,a=b.useMemo(()=>r==null?void 0:r.map(i=>{var s,c,f={x:(s=i.x)!==null&&s!==void 0?s:0,y:(c=i.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return xi(xi({},f),{},{value:i.value,payload:i.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[r]);return b.createElement(JH,{value:t?a:void 0},n)}function NL(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:a,props:i}=e,{type:s,layout:c,connectNulls:f,needClip:u,shape:m}=i,h=bA(i,gwe),p=xi(xi({},br(h)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:r,type:s,layout:c,connectNulls:f,strokeDasharray:a??i.strokeDasharray});return b.createElement(b.Fragment,null,(r==null?void 0:r.length)>1&&b.createElement(lA,Jh({shapeType:"curve",option:m},p,{pathRef:n})),b.createElement(Owe,{points:r,clipPathId:t,props:i}))}function Nwe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Twe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:a,longestAnimatedLengthRef:i}=e,{points:s,strokeDasharray:c,isAnimationActive:f,animationBegin:u,animationDuration:m,animationEasing:h,animateNewValues:p,width:y,height:w,onAnimationEnd:x,onAnimationStart:S}=n,E=a.current,O=zm(s,"recharts-line-"),C=b.useRef(O),[A,N]=b.useState(!1),T=!A,P=b.useCallback(()=>{typeof x=="function"&&x(),N(!1)},[x]),k=b.useCallback(()=>{typeof S=="function"&&S(),N(!0)},[S]),D=Nwe(r.current),K=b.useRef(0);C.current!==O&&(K.current=i.current,C.current=O);var L=K.current;return b.createElement(Awe,{points:s,showLabels:T},n.children,b.createElement(Lm,{animationId:O,begin:u,duration:m,isActive:f,easing:h,onAnimationEnd:P,onAnimationStart:k,key:O},I=>{var W=$t(L,D+L,I),$=Math.min(W,D),V;if(f)if(c){var R="".concat(c).split(/[,\s]+/gim).map(F=>parseFloat(F));V=Cwe($,D,R)}else V=AF(D,$);else V=c==null?void 0:String(c);if(I>0&&D>0&&(a.current=s,i.current=Math.max(i.current,$)),E){var H=E.length/s.length,q=I===1?s:s.map((F,Y)=>{var B=Math.floor(Y*H);if(E[B]){var z=E[B];return xi(xi({},F),{},{x:$t(z.x,F.x,I),y:$t(z.y,F.y,I)})}return p?xi(xi({},F),{},{x:$t(y*2,F.x,I),y:$t(w/2,F.y,I)}):xi(xi({},F),{},{x:F.x,y:F.y})});return a.current=q,b.createElement(NL,{props:n,points:q,clipPathId:t,pathRef:r,strokeDasharray:V})}return b.createElement(NL,{props:n,points:s,clipPathId:t,pathRef:r,strokeDasharray:V})}),b.createElement(aA,{label:n.label}))}function Pwe(e){var{clipPathId:t,props:n}=e,r=b.useRef(null),a=b.useRef(0),i=b.useRef(null);return b.createElement(Twe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:a,pathRef:i})}var Mwe=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:_t(e.payload,t)}};class Rwe extends b.Component{render(){var{hide:t,dot:n,points:r,className:a,xAxisId:i,yAxisId:s,top:c,left:f,width:u,height:m,id:h,needClip:p,zIndex:y}=this.props;if(t)return null;var w=st("recharts-line",a),x=h,{r:S,strokeWidth:E}=pwe(n),O=lF(n),C=S*2+E,A=p?"url(#clipPath-".concat(O?"":"dots-").concat(x,")"):void 0;return b.createElement(Lr,{zIndex:y},b.createElement(On,{className:w},p&&b.createElement("defs",null,b.createElement(EF,{clipPathId:x,xAxisId:i,yAxisId:s}),!O&&b.createElement("clipPath",{id:"clipPath-dots-".concat(x)},b.createElement("rect",{x:f-C/2,y:c-C/2,width:u+C,height:m+C}))),b.createElement(SF,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:Mwe,errorBarOffset:0},b.createElement(Pwe,{props:this.props,clipPathId:x}))),b.createElement(Xbe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var NF={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:pn.line,type:"linear"};function kwe(e){var t=yn(e,NF),{activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,connectNulls:c,dot:f,hide:u,isAnimationActive:m,label:h,legendType:p,xAxisId:y,yAxisId:w,id:x}=t,S=bA(t,ywe),{needClip:E}=yA(y,w),O=mA(),C=Vc(),A=mr(),N=Ne(K=>mwe(K,y,w,A,x));if(C!=="horizontal"&&C!=="vertical"||N==null||O==null)return null;var{height:T,width:P,x:k,y:D}=O;return b.createElement(Rwe,Jh({},S,{id:x,connectNulls:c,dot:f,activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,isAnimationActive:m,hide:u,label:h,legendType:p,xAxisId:y,yAxisId:w,points:N,layout:C,height:T,width:P,left:k,top:D,needClip:E}))}function Dwe(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,dataKey:s,bandSize:c,displayedData:f}=e;return f.map((u,m)=>{var h=_t(u,s);if(t==="horizontal"){var p=fk({axis:n,ticks:a,bandSize:c,entry:u,index:m}),y=Ht(h)?null:r.scale.map(h);return{x:p,y:y??null,value:h,payload:u}}var w=Ht(h)?null:n.scale.map(h),x=fk({axis:r,ticks:i,bandSize:c,entry:u,index:m});return w==null||x==null?null:{x:w,y:x,value:h,payload:u}}).filter(Boolean)}function Iwe(e){var t=yn(e,NF),n=mr();return b.createElement(hA,{id:t.id,type:"line"},r=>b.createElement(b.Fragment,null,b.createElement(cF,{legendPayload:Ewe(t)}),b.createElement(_we,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),b.createElement(fF,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),b.createElement(kwe,Jh({},t,{id:r}))))}var TF=b.memo(Iwe,Jf);TF.displayName="Line";function Xc(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:hF}function Wc(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:hF}var Lwe="Invariant failed";function zwe(e,t){throw new Error(Lwe)}function R_(){return R_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R_.apply(null,arguments)}function xA(e){return b.createElement(lA,R_({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var $we=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,a)=>{if(_e(t))return t;var i=_e(r)||Ht(r);return i?t(r,a):(i||zwe(),n)}},Bwe=(e,t,n)=>n,Uwe=(e,t)=>t,Zm=oe([eb,Uwe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),Hwe=oe([Zm],e=>e==null?void 0:e.maxBarSize),Fwe=(e,t,n,r)=>r,qwe=oe([dt,eb,Xc,Wc,Bwe],(e,t,n,r,a)=>t.filter(i=>e==="horizontal"?i.xAxisId===n:i.yAxisId===r).filter(i=>i.isPanorama===a).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),Kwe=(e,t,n)=>{var r=dt(e),a=Xc(e,t),i=Wc(e,t);if(!(a==null||i==null))return r==="horizontal"?O_(e,"yAxis",i,n):O_(e,"xAxis",a,n)},Vwe=(e,t)=>{var n=dt(e),r=Xc(e,t),a=Wc(e,t);if(!(r==null||a==null))return n==="horizontal"?bI(e,"xAxis",r):bI(e,"yAxis",a)},Ywe=oe([qwe,Dfe,Vwe],Wbe),Gwe=(e,t,n)=>{var r,a,i=Zm(e,t);if(i==null)return 0;var s=Xc(e,t),c=Wc(e,t);if(s==null||c==null)return 0;var f=dt(e),u=V6(e),{maxBarSize:m}=i,h=Ht(m)?u:m,p,y;return f==="horizontal"?(p=il(e,"xAxis",s,n),y=al(e,"xAxis",s,n)):(p=il(e,"yAxis",c,n),y=al(e,"yAxis",c,n)),(r=(a=Cf(p,y,!0))!==null&&a!==void 0?a:h)!==null&&r!==void 0?r:0},PF=(e,t,n)=>{var r=dt(e),a=Xc(e,t),i=Wc(e,t);if(!(a==null||i==null)){var s,c;return r==="horizontal"?(s=il(e,"xAxis",a,n),c=al(e,"xAxis",a,n)):(s=il(e,"yAxis",i,n),c=al(e,"yAxis",i,n)),Cf(s,c)}},Xwe=oe([Ywe,V6,kfe,Y6,Gwe,PF,Hwe],txe),Wwe=(e,t,n)=>{var r=Xc(e,t);if(r!=null)return il(e,"xAxis",r,n)},Qwe=(e,t,n)=>{var r=Wc(e,t);if(r!=null)return il(e,"yAxis",r,n)},Zwe=(e,t,n)=>{var r=Xc(e,t);if(r!=null)return al(e,"xAxis",r,n)},Jwe=(e,t,n)=>{var r=Wc(e,t);if(r!=null)return al(e,"yAxis",r,n)},e1e=oe([Xwe,Zm],rxe),t1e=oe([Kwe,Zm],nxe),n1e=oe([An,kC,Wwe,Qwe,Zwe,Jwe,e1e,dt,Afe,PF,t1e,Zm,Fwe],(e,t,n,r,a,i,s,c,f,u,m,h,p)=>{var{chartData:y,dataStartIndex:w,dataEndIndex:x}=f;if(!(h==null||s==null||t==null||c!=="horizontal"&&c!=="vertical"||n==null||r==null||a==null||i==null||u==null)){var{data:S}=h,E;if(S!=null&&S.length>0?E=S:E=y==null?void 0:y.slice(w,x+1),E!=null)return T1e({layout:c,barSettings:h,pos:s,parentViewBox:t,bandSize:u,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,stackedData:m,displayedData:E,offset:e,cells:p,dataStartIndex:w})}}),r1e=["index"];function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(null,arguments)}function a1e(e,t){if(e==null)return{};var n,r,a=i1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function i1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var MF=b.createContext(void 0),o1e=e=>{var t=b.useContext(MF);if(t!=null)return t.stackId;if(e!=null)return Ole(e)},s1e=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),l1e=e=>{var t=b.useContext(MF);if(t!=null){var{stackId:n}=t;return"url(#".concat(s1e(n,e),")")}},RF=e=>{var{index:t}=e,n=a1e(e,r1e),r=l1e(t);return b.createElement(On,k_({className:"recharts-bar-stack-layer",clipPath:r},n))},c1e=["onMouseEnter","onMouseLeave","onClick"],u1e=["value","background","tooltipPosition"],f1e=["id"],d1e=["onMouseEnter","onClick","onMouseLeave"];function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(null,arguments)}function TL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TL(Object(n),!0).forEach(function(r){h1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h1e(e,t,n){return(t=m1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m1e(e){var t=p1e(e,"string");return typeof t=="symbol"?t:t+""}function p1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ky(e,t){if(e==null)return{};var n,r,a=v1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function v1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var g1e=e=>{var{dataKey:t,name:n,fill:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:Zf(n,t),payload:e}]},y1e=b.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:a,name:i,hide:s,unit:c,tooltipType:f,id:u}=e,m={dataDefinedOnItem:void 0,getPosition:hl,settings:{stroke:n,strokeWidth:r,fill:a,dataKey:t,nameKey:void 0,name:Zf(i,t),hide:s,type:f,color:a,unit:c,graphicalItemId:u}};return b.createElement(dA,{tooltipEntrySettings:m})});function b1e(e){var t=Ne(ol),{data:n,dataKey:r,background:a,allOtherBarProps:i}=e,{onMouseEnter:s,onMouseLeave:c,onClick:f}=i,u=ky(i,c1e),m=cA(s,r,i.id),h=uA(c),p=fA(f,r,i.id);if(!a||n==null)return null;var y=Sc(a);return b.createElement(Lr,{zIndex:axe(a,pn.barBackground)},n.map((w,x)=>{var{value:S,background:E,tooltipPosition:O}=w,C=ky(w,u1e);if(!E)return null;var A=m(w,x),N=h(w,x),T=p(w,x),P=gr(gr(gr(gr(gr({option:a,isActive:String(x)===t},C),{},{fill:"#eee"},E),y),Tm(u,w,x)),{},{onMouseEnter:A,onMouseLeave:N,onClick:T,dataKey:r,index:x,className:"recharts-bar-background-rectangle"});return b.createElement(xA,ll({key:"background-bar-".concat(x)},P))}))}function x1e(e){var{showLabels:t,children:n,rects:r}=e,a=r==null?void 0:r.map(i=>{var s={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return gr(gr({},s),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:s,fill:i.fill})});return b.createElement(JH,{value:t?a:void 0},n)}function w1e(e){var{shape:t,activeBar:n,baseProps:r,entry:a,index:i,dataKey:s}=e,c=Ne(ol),f=Ne(QO),u=n&&String(a.originalDataIndex)===c&&(f==null||s===f),[m,h]=b.useState(!1),[p,y]=b.useState(!1);b.useEffect(()=>{var C;return u?(h(!0),C=requestAnimationFrame(()=>{y(!0)})):y(!1),()=>{cancelAnimationFrame(C)}},[u]);var w=b.useCallback(()=>{u||h(!1)},[u]),x=u&&p,S=u||m,E;u?n===!0?E=t:E=n:E=t;var O=b.createElement(xA,ll({},r,{name:String(r.name)},a,{isActive:x,option:E,index:i,dataKey:s,onTransitionEnd:w}));return S?b.createElement(Lr,{zIndex:pn.activeBar},b.createElement(RF,{index:a.originalDataIndex},O)):O}function S1e(e){var{shape:t,baseProps:n,entry:r,index:a,dataKey:i}=e;return b.createElement(xA,ll({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:a,dataKey:i}))}function E1e(e){var t,{data:n,props:r}=e,a=(t=ta(r))!==null&&t!==void 0?t:{},{id:i}=a,s=ky(a,f1e),{shape:c,dataKey:f,activeBar:u}=r,{onMouseEnter:m,onClick:h,onMouseLeave:p}=r,y=ky(r,d1e),w=cA(m,f,i),x=uA(p),S=fA(h,f,i);return n?b.createElement(b.Fragment,null,n.map((E,O)=>b.createElement(RF,ll({index:E.originalDataIndex,key:"rectangle-".concat(E==null?void 0:E.x,"-").concat(E==null?void 0:E.y,"-").concat(E==null?void 0:E.value,"-").concat(O),className:"recharts-bar-rectangle"},Tm(y,E,O),{onMouseEnter:w(E,O),onMouseLeave:x(E,O),onClick:S(E,O)}),u?b.createElement(w1e,{shape:c,activeBar:u,baseProps:s,entry:E,index:O,dataKey:f}):b.createElement(S1e,{shape:c,baseProps:s,entry:E,index:O,dataKey:f})))):null}function _1e(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:a,isAnimationActive:i,animationBegin:s,animationDuration:c,animationEasing:f,onAnimationEnd:u,onAnimationStart:m}=t,h=n.current,p=zm(t,"recharts-bar-"),[y,w]=b.useState(!1),x=!y,S=b.useCallback(()=>{typeof u=="function"&&u(),w(!1)},[u]),E=b.useCallback(()=>{typeof m=="function"&&m(),w(!0)},[m]);return b.createElement(x1e,{showLabels:x,rects:r},b.createElement(Lm,{animationId:p,begin:s,duration:c,isActive:i,easing:f,onAnimationEnd:S,onAnimationStart:E,key:p},O=>{var C=O===1?r:r==null?void 0:r.map((A,N)=>{var T=h&&h[N];if(T)return gr(gr({},A),{},{x:$t(T.x,A.x,O),y:$t(T.y,A.y,O),width:$t(T.width,A.width,O),height:$t(T.height,A.height,O)});if(a==="horizontal"){var P=$t(0,A.height,O),k=$t(A.stackedBarStart,A.y,O);return gr(gr({},A),{},{y:k,height:P})}var D=$t(0,A.width,O),K=$t(A.stackedBarStart,A.x,O);return gr(gr({},A),{},{width:D,x:K})});return O>0&&(n.current=C??null),C==null?null:b.createElement(On,null,b.createElement(E1e,{props:t,data:C}))}),b.createElement(aA,{label:t.label}),t.children)}function j1e(e){var t=b.useRef(null);return b.createElement(_1e,{previousRectanglesRef:t,props:e})}var kF=0,C1e=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:_t(e,t)}};class O1e extends b.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:a,xAxisId:i,yAxisId:s,needClip:c,background:f,id:u}=this.props;if(t||n==null)return null;var m=st("recharts-bar",a),h=u;return b.createElement(On,{className:m,id:u},c&&b.createElement("defs",null,b.createElement(EF,{clipPathId:h,xAxisId:i,yAxisId:s})),b.createElement(On,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(h,")"):void 0},b.createElement(b1e,{data:n,dataKey:r,background:f,allOtherBarProps:this.props}),b.createElement(j1e,this.props)))}}var A1e={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:kF,xAxisId:0,yAxisId:0,zIndex:pn.bar};function N1e(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:c,animationDuration:f,animationEasing:u,isAnimationActive:m}=e,{needClip:h}=yA(t,n),p=Vc(),y=mr(),w=sA(e.children,Qm),x=Ne(O=>n1e(O,e.id,y,w));if(p!=="vertical"&&p!=="horizontal")return null;var S,E=x==null?void 0:x[0];return E==null||E.height==null||E.width==null?S=0:S=p==="vertical"?E.height/2:E.width/2,b.createElement(SF,{xAxisId:t,yAxisId:n,data:x,dataPointFormatter:C1e,errorBarOffset:S},b.createElement(O1e,ll({},e,{layout:p,needClip:h,data:x,xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:c,animationDuration:f,animationEasing:u,isAnimationActive:m})))}function T1e(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:a},pos:i,bandSize:s,xAxis:c,yAxis:f,xAxisTicks:u,yAxisTicks:m,stackedData:h,displayedData:p,offset:y,cells:w,parentViewBox:x,dataStartIndex:S}=e,E=t==="horizontal"?f:c,O=h?E.scale.domain():null,C=Ale({numericAxis:E}),A=E.scale.map(C);return p.map((N,T)=>{var P,k,D,K,L,I;if(h){var W=h[T+S];if(W==null)return null;P=Sle(W,O)}else P=_t(N,n),Array.isArray(P)||(P=[C,P]);var $=$we(r,kF)(P[1],T);if(t==="horizontal"){var V,R=f.scale.map(P[0]),H=f.scale.map(P[1]);if(R==null||H==null)return null;k=dk({axis:c,ticks:u,bandSize:s,offset:i.offset,entry:N,index:T}),D=(V=H??R)!==null&&V!==void 0?V:void 0,K=i.size;var q=R-H;if(L=Ni(q)?0:q,I={x:k,y:y.top,width:K,height:y.height},Math.abs($)>0&&Math.abs(L)<Math.abs($)){var F=In(L||$)*(Math.abs($)-Math.abs(L));D-=F,L+=F}}else{var Y=c.scale.map(P[0]),B=c.scale.map(P[1]);if(Y==null||B==null)return null;if(k=Y,D=dk({axis:f,ticks:m,bandSize:s,offset:i.offset,entry:N,index:T}),K=B-Y,L=i.size,I={x:y.left,y:D,width:y.width,height:L},Math.abs($)>0&&Math.abs(K)<Math.abs($)){var z=In(K||$)*(Math.abs($)-Math.abs(K));K+=z}}if(k==null||D==null||K==null||L==null||!a&&(K===0||L===0))return null;var X=gr(gr({},N),{},{stackedBarStart:A,x:k,y:D,width:K,height:L,value:h?P:P[1],payload:N,background:I,tooltipPosition:{x:k+K/2,y:D+L/2},parentViewBox:x,originalDataIndex:T},w&&w[T]&&w[T].props);return X}).filter(Boolean)}function P1e(e){var t=yn(e,A1e),n=o1e(t.stackId),r=mr();return b.createElement(hA,{id:t.id,type:"bar"},a=>b.createElement(b.Fragment,null,b.createElement(cF,{legendPayload:g1e(t)}),b.createElement(y1e,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:a}),b.createElement(fF,{type:"bar",id:a,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),b.createElement(Lr,{zIndex:t.zIndex},b.createElement(N1e,ll({},t,{id:a})))))}var D_=b.memo(P1e,Jf);D_.displayName="Bar";var M1e=["domain","range"],R1e=["domain","range"];function PL(e,t){if(e==null)return{};var n,r,a=k1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function k1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ML(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function DF(e,t){if(e===t)return!0;var{domain:n,range:r}=e,a=PL(e,M1e),{domain:i,range:s}=t,c=PL(t,R1e);return!ML(n,i)||!ML(r,s)?!1:Jf(a,c)}var D1e=["type"],I1e=["dangerouslySetInnerHTML","ticks","scale"],L1e=["id","scale"];function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I_.apply(null,arguments)}function RL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function kL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RL(Object(n),!0).forEach(function(r){z1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z1e(e,t,n){return(t=$1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $1e(e){var t=B1e(e,"string");return typeof t=="symbol"?t:t+""}function B1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L_(e,t){if(e==null)return{};var n,r,a=U1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function U1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function H1e(e){var t=Ct(),n=b.useRef(null),r=u6(),{type:a}=e,i=L_(e,D1e),s=F0(r,"xAxis",a),c=b.useMemo(()=>{if(s!=null)return kL(kL({},i),{},{type:s})},[i,s]);return b.useLayoutEffect(()=>{c!=null&&(n.current===null?t(kbe(c)):n.current!==c&&t(Dbe({prev:n.current,next:c})),n.current=c)},[c,t]),b.useLayoutEffect(()=>()=>{n.current&&(t(Ibe(n.current)),n.current=null)},[t]),null}var F1e=e=>{var{xAxisId:t,className:n}=e,r=Ne(kC),a=mr(),i="xAxis",s=Ne(E=>cH(E,i,t,a)),c=Ne(E=>oH(E,t)),f=Ne(E=>xpe(E,t)),u=Ne(E=>UU(E,t));if(c==null||f==null||u==null)return null;var{dangerouslySetInnerHTML:m,ticks:h,scale:p}=e,y=L_(e,I1e),{id:w,scale:x}=u,S=L_(u,L1e);return b.createElement(vA,I_({},y,S,{x:f.x,y:f.y,width:c.width,height:c.height,className:st("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:s,axisType:i,axisId:t}))},q1e={allowDataOverflow:_n.allowDataOverflow,allowDecimals:_n.allowDecimals,allowDuplicatedCategory:_n.allowDuplicatedCategory,angle:_n.angle,axisLine:So.axisLine,height:_n.height,hide:!1,includeHidden:_n.includeHidden,interval:_n.interval,label:!1,minTickGap:_n.minTickGap,mirror:_n.mirror,orientation:_n.orientation,padding:_n.padding,reversed:_n.reversed,scale:_n.scale,tick:_n.tick,tickCount:_n.tickCount,tickLine:So.tickLine,tickSize:So.tickSize,type:_n.type,niceTicks:_n.niceTicks,xAxisId:0},K1e=e=>{var t=yn(e,q1e);return b.createElement(b.Fragment,null,b.createElement(H1e,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),b.createElement(F1e,t))},wA=b.memo(K1e,DF);wA.displayName="XAxis";var V1e=["type"],Y1e=["dangerouslySetInnerHTML","ticks","scale"],G1e=["id","scale"];function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z_.apply(null,arguments)}function DL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function IL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DL(Object(n),!0).forEach(function(r){X1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X1e(e,t,n){return(t=W1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W1e(e){var t=Q1e(e,"string");return typeof t=="symbol"?t:t+""}function Q1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $_(e,t){if(e==null)return{};var n,r,a=Z1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Z1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function J1e(e){var t=Ct(),n=b.useRef(null),r=u6(),{type:a}=e,i=$_(e,V1e),s=F0(r,"yAxis",a),c=b.useMemo(()=>{if(s!=null)return IL(IL({},i),{},{type:s})},[s,i]);return b.useLayoutEffect(()=>{c!=null&&(n.current===null?t(Lbe(c)):n.current!==c&&t(zbe({prev:n.current,next:c})),n.current=c)},[c,t]),b.useLayoutEffect(()=>()=>{n.current&&(t($be(n.current)),n.current=null)},[t]),null}function eSe(e){var{yAxisId:t,className:n,width:r,label:a}=e,i=b.useRef(null),s=b.useRef(null),c=Ne(kC),f=mr(),u=Ct(),m="yAxis",h=Ne(T=>sH(T,t)),p=Ne(T=>Spe(T,t)),y=Ne(T=>cH(T,m,t,f)),w=Ne(T=>HU(T,t));if(b.useLayoutEffect(()=>{if(!(r!=="auto"||!h||rA(a)||b.isValidElement(a)||w==null)){var T=i.current;if(T){var P=T.getCalculatedWidth();Math.round(h.width)!==Math.round(P)&&u(Bbe({id:t,width:P}))}}},[y,h,u,a,t,r,w]),h==null||p==null||w==null)return null;var{dangerouslySetInnerHTML:x,ticks:S,scale:E}=e,O=$_(e,Y1e),{id:C,scale:A}=w,N=$_(w,G1e);return b.createElement(vA,z_({},O,N,{ref:i,labelRef:s,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:h.width,height:h.height,className:st("recharts-".concat(m," ").concat(m),n),viewBox:c,ticks:y,axisType:m,axisId:t}))}var tSe={allowDataOverflow:jn.allowDataOverflow,allowDecimals:jn.allowDecimals,allowDuplicatedCategory:jn.allowDuplicatedCategory,angle:jn.angle,axisLine:So.axisLine,hide:!1,includeHidden:jn.includeHidden,interval:jn.interval,label:!1,minTickGap:jn.minTickGap,mirror:jn.mirror,orientation:jn.orientation,padding:jn.padding,reversed:jn.reversed,scale:jn.scale,tick:jn.tick,tickCount:jn.tickCount,tickLine:So.tickLine,tickSize:So.tickSize,type:jn.type,niceTicks:jn.niceTicks,width:jn.width,yAxisId:0},nSe=e=>{var t=yn(e,tSe);return b.createElement(b.Fragment,null,b.createElement(J1e,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),b.createElement(eSe,t))},SA=b.memo(nSe,DF);SA.displayName="YAxis";var rSe=(e,t)=>t,EA=oe([rSe,dt,eU,Bn,CH,Vo,qve,An],Qve);function aSe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function _A(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(aSe(e)){var a=e.currentTarget.getBBox();n=a.width>0?t.width/a.width:1,r=a.height>0?t.height/a.height:1}else{var i=e.currentTarget;n=i.offsetWidth>0?t.width/i.offsetWidth:1,r=i.offsetHeight>0?t.height/i.offsetHeight:1}var s=(c,f)=>({relativeX:Math.round((c-t.left)/n),relativeY:Math.round((f-t.top)/r)});return"touches"in e?Array.from(e.touches).map(c=>s(c.clientX,c.clientY)):s(e.clientX,e.clientY)}var IF=na("mouseClick"),LF=Mm();LF.startListening({actionCreator:IF,effect:(e,t)=>{var n=e.payload,r=EA(t.getState(),_A(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(zpe({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var B_=na("mouseMove"),zF=Mm(),Uu=null,Ul=null,zS=null;zF.startListening({actionCreator:B_,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||(i==null?void 0:i.includes("mousemove"));Uu!==null&&(cancelAnimationFrame(Uu),Uu=null),Ul!==null&&(typeof a!="number"||!s)&&(clearTimeout(Ul),Ul=null),zS=_A(n);var c=()=>{var f=t.getState(),u=KO(f,f.tooltip.settings.shared);if(!zS){Uu=null,Ul=null;return}if(u==="axis"){var m=EA(f,zS);(m==null?void 0:m.activeIndex)!=null?t.dispatch(gH({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(vH())}Uu=null,Ul=null};if(!s){c();return}a==="raf"?Uu=requestAnimationFrame(c):typeof a=="number"&&Ul===null&&(Ul=setTimeout(c,a))}});function iSe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var LL={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},$F=hr({name:"rootProps",initialState:LL,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:LL.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),oSe=$F.reducer,{updateOptions:sSe}=$F.actions,lSe=null,cSe={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},BF=hr({name:"polarOptions",initialState:lSe,reducers:cSe}),{updatePolarOptions:uSe}=BF.actions,fSe=BF.reducer,UF=na("keyDown"),HF=na("focus"),FF=na("blur"),cb=Mm(),Hu=null,Hl=null,Wv=null;cb.startListening({actionCreator:UF,effect:(e,t)=>{Wv=e.payload,Hu!==null&&(cancelAnimationFrame(Hu),Hu=null);var n=t.getState(),{throttleDelay:r,throttledEvents:a}=n.eventSettings,i=a==="all"||a.includes("keydown");Hl!==null&&(typeof r!="number"||!i)&&(clearTimeout(Hl),Hl=null);var s=()=>{try{var c=t.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:u}=c.tooltip,m=Wv;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var h=VO(u,sd(c),Ym(c),Xm(c)),p=h==null?-1:Number(h);if(!Number.isFinite(p)||p<0)return;var y=Vo(c);if(m==="Enter"){var w=Ay(c,"axis","hover",String(u.index));t.dispatch(Oy({active:!u.active,activeIndex:u.index,activeCoordinate:w}));return}var x=Ope(c),S=x==="left-to-right"?1:-1,E=m==="ArrowRight"?1:-1,O=p+E*S;if(y==null||O>=y.length||O<0)return;var C=Ay(c,"axis","hover",String(O));t.dispatch(Oy({active:!0,activeIndex:O.toString(),activeCoordinate:C}))}finally{Hu=null,Hl=null}};if(!i){s();return}r==="raf"?Hu=requestAnimationFrame(s):typeof r=="number"&&Hl===null&&(s(),Wv=null,Hl=setTimeout(()=>{Wv?s():(Hl=null,Hu=null)},r))}});cb.startListening({actionCreator:HF,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;if(!a.active&&a.index==null){var i="0",s=Ay(n,"axis","hover",String(i));t.dispatch(Oy({active:!0,activeIndex:i,activeCoordinate:s}))}}}});cb.startListening({actionCreator:FF,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;a.active&&t.dispatch(Oy({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function qF(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var a=Reflect.get(n,r);return typeof a=="function"?a.bind(n):a}})}var ga=na("externalEvent"),KF=Mm(),Qv=new Map,vh=new Map,$S=new Map;KF.startListening({actionCreator:ga,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var a=r.type,i=qF(r);$S.set(a,{handler:n,reactEvent:i});var s=Qv.get(a);s!==void 0&&(cancelAnimationFrame(s),Qv.delete(a));var c=t.getState(),{throttleDelay:f,throttledEvents:u}=c.eventSettings,m=u,h=m==="all"||(m==null?void 0:m.includes(a)),p=vh.get(a);p!==void 0&&(typeof f!="number"||!h)&&(clearTimeout(p),vh.delete(a));var y=()=>{var S=$S.get(a);try{if(!S)return;var{handler:E,reactEvent:O}=S,C=t.getState(),A={activeCoordinate:Ave(C),activeDataKey:QO(C),activeIndex:ol(C),activeLabel:NH(C),activeTooltipIndex:ol(C),isTooltipActive:Nve(C)};E&&E(A,O)}finally{Qv.delete(a),vh.delete(a),$S.delete(a)}};if(!h){y();return}if(f==="raf"){var w=requestAnimationFrame(y);Qv.set(a,w)}else if(typeof f=="number"){if(!vh.has(a)){y();var x=setTimeout(y,f);vh.set(a,x)}}else y()}}});var dSe=oe([id],e=>e.tooltipItemPayloads),hSe=oe([dSe,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(i=>i.settings.graphicalItemId===n);if(r!=null){var{getPosition:a}=r;if(a!=null)return a(t)}}}),VF=na("touchMove"),YF=Mm(),Fl=null,As=null,zL=null,gh=null;YF.startListening({actionCreator:VF,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){gh=qF(n);var r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||i.includes("touchmove");Fl!==null&&(cancelAnimationFrame(Fl),Fl=null),As!==null&&(typeof a!="number"||!s)&&(clearTimeout(As),As=null),zL=Array.from(n.touches).map(f=>_A({clientX:f.clientX,clientY:f.clientY,currentTarget:n.currentTarget}));var c=()=>{if(gh!=null){var f=t.getState(),u=KO(f,f.tooltip.settings.shared);if(u==="axis"){var m,h=(m=zL)===null||m===void 0?void 0:m[0];if(h==null){Fl=null,As=null;return}var p=EA(f,h);(p==null?void 0:p.activeIndex)!=null&&t.dispatch(gH({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate}))}else if(u==="item"){var y,w=gh.touches[0];if(document.elementFromPoint==null||w==null)return;var x=document.elementFromPoint(w.clientX,w.clientY);if(!x||!x.getAttribute)return;var S=x.getAttribute(a6),E=(y=x.getAttribute(i6))!==null&&y!==void 0?y:void 0,O=od(f).find(N=>N.id===E);if(S==null||O==null||E==null)return;var{dataKey:C}=O,A=hSe(f,S,E);t.dispatch(pH({activeDataKey:C,activeIndex:S,activeCoordinate:A,activeGraphicalItemId:E}))}Fl=null,As=null}};if(!s){c();return}a==="raf"?Fl=requestAnimationFrame(c):typeof a=="number"&&As===null&&(c(),gh=null,As=setTimeout(()=>{gh?c():(As=null,Fl=null)},a))}}});var jA={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},GF=hr({name:"eventSettings",initialState:jA,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:mSe}=GF.actions,pSe=GF.reducer,vSe=C8({brush:ixe,cartesianAxis:Ube,chartData:Age,errorBars:awe,eventSettings:pSe,graphicalItems:K0e,layout:gle,legend:_ce,options:Ege,polarAxis:a0e,polarOptions:fSe,referenceElements:cxe,renderedTicks:Cxe,rootProps:oSe,tooltip:$pe,zIndex:fge}),gSe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Hse({reducer:vSe,preloadedState:t,middleware:r=>{var a;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([LF.middleware,zF.middleware,cb.middleware,KF.middleware,YF.middleware])},enhancers:r=>{var a=r;return typeof r=="function"&&(a=r()),a.concat(U8({type:"raf"}))},devTools:{serialize:{replacer:iSe},name:"recharts-".concat(n)}})};function XF(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,a=mr(),i=b.useRef(null);if(a)return n;i.current==null&&(i.current=gSe(t,r));var s=OC;return b.createElement(Bce,{context:s,store:i.current},n)}function ySe(e){var{layout:t,margin:n}=e,r=Ct(),a=mr();return b.useEffect(()=>{a||(r(mle(t)),r(hle(n)))},[r,a,t,n]),null}var WF=b.memo(ySe,Jf);function QF(e){var t=Ct();return b.useEffect(()=>{t(sSe(e))},[t,e]),null}var bSe=e=>{var t=Ct();return b.useEffect(()=>{t(mSe(e))},[t,e]),null},ZF=b.memo(bSe,Jf);function $L(e){var{zIndex:t,isPanorama:n}=e,r=b.useRef(null),a=Ct();return b.useLayoutEffect(()=>(r.current&&a(cge({zIndex:t,element:r.current,isPanorama:n})),()=>{a(uge({zIndex:t,isPanorama:n}))}),[a,t,n]),b.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function BL(e){var{children:t,isPanorama:n}=e,r=Ne(Jve);if(!r||r.length===0)return t;var a=r.filter(s=>s<0),i=r.filter(s=>s>0);return b.createElement(b.Fragment,null,a.map(s=>b.createElement($L,{key:s,zIndex:s,isPanorama:n})),t,i.map(s=>b.createElement($L,{key:s,zIndex:s,isPanorama:n})))}var xSe=["children"];function wSe(e,t){if(e==null)return{};var n,r,a=SSe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function SSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dy.apply(null,arguments)}var ESe={width:"100%",height:"100%",display:"block"},_Se=b.forwardRef((e,t)=>{var n=zC(),r=$C(),a=_6();if(!Pi(n)||!Pi(r))return null;var{children:i,otherAttributes:s,title:c,desc:f}=e,u,m;return s!=null&&(typeof s.tabIndex=="number"?u=s.tabIndex:u=a?0:void 0,typeof s.role=="string"?m=s.role:m=a?"application":void 0),b.createElement(gC,Dy({},s,{title:c,desc:f,role:m,tabIndex:u,width:n,height:r,style:ESe,ref:t}),i)}),jSe=e=>{var{children:t}=e,n=Ne(I0);if(!n)return null;var{width:r,height:a,y:i,x:s}=n;return b.createElement(gC,{width:r,height:a,x:s,y:i},t)},UL=b.forwardRef((e,t)=>{var{children:n}=e,r=wSe(e,xSe),a=mr();return a?b.createElement(jSe,null,b.createElement(BL,{isPanorama:!0},n)):b.createElement(_Se,Dy({ref:t},r),b.createElement(BL,{isPanorama:!1},n))});function CSe(){var e=Ct(),[t,n]=b.useState(null),r=Ne(kle);return b.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),i=a.width/t.offsetWidth;it(i)&&i!==r&&e(vle(i))}},[t,e,r]),n}function HL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function OSe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HL(Object(n),!0).forEach(function(r){ASe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ASe(e,t,n){return(t=NSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NSe(e){var t=TSe(e,"string");return typeof t=="symbol"?t:t+""}function TSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qs.apply(null,arguments)}var PSe=()=>(Lge(),null);function Iy(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var MSe=b.forwardRef((e,t)=>{var n,r,a=b.useRef(null),[i,s]=b.useState({containerWidth:Iy((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Iy((r=e.style)===null||r===void 0?void 0:r.height)}),c=b.useCallback((u,m)=>{s(h=>{var p=Math.round(u),y=Math.round(m);return h.containerWidth===p&&h.containerHeight===y?h:{containerWidth:p,containerHeight:y}})},[]),f=b.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:m,height:h}=u.getBoundingClientRect();c(m,h);var p=w=>{var x=w[0];if(x!=null){var{width:S,height:E}=x.contentRect;c(S,E)}},y=new ResizeObserver(p);y.observe(u),a.current=y}},[t,c]);return b.useEffect(()=>()=>{var u=a.current;u!=null&&u.disconnect()},[c]),b.createElement(b.Fragment,null,b.createElement(km,{width:i.containerWidth,height:i.containerHeight}),b.createElement("div",Qs({ref:f},e)))}),RSe=b.forwardRef((e,t)=>{var{width:n,height:r}=e,[a,i]=b.useState({containerWidth:Iy(n),containerHeight:Iy(r)}),s=b.useCallback((f,u)=>{i(m=>{var h=Math.round(f),p=Math.round(u);return m.containerWidth===h&&m.containerHeight===p?m:{containerWidth:h,containerHeight:p}})},[]),c=b.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:u,height:m}=f.getBoundingClientRect();s(u,m)}},[t,s]);return b.createElement(b.Fragment,null,b.createElement(km,{width:a.containerWidth,height:a.containerHeight}),b.createElement("div",Qs({ref:c},e)))}),kSe=b.forwardRef((e,t)=>{var{width:n,height:r}=e;return b.createElement(b.Fragment,null,b.createElement(km,{width:n,height:r}),b.createElement("div",Qs({ref:t},e)))}),DSe=b.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?b.createElement(RSe,Qs({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?b.createElement(kSe,Qs({},e,{width:n,height:r,ref:t})):b.createElement(b.Fragment,null,b.createElement(km,{width:n,height:r}),b.createElement("div",Qs({ref:t},e)))});function ISe(e){return e?MSe:DSe}var LSe=b.forwardRef((e,t)=>{var{children:n,className:r,height:a,onClick:i,onContextMenu:s,onDoubleClick:c,onMouseDown:f,onMouseEnter:u,onMouseLeave:m,onMouseMove:h,onMouseUp:p,onTouchEnd:y,onTouchMove:w,onTouchStart:x,style:S,width:E,responsive:O,dispatchTouchEvents:C=!0}=e,A=b.useRef(null),N=Ct(),[T,P]=b.useState(null),[k,D]=b.useState(null),K=CSe(),L=DC(),I=(L==null?void 0:L.width)>0?L.width:E,W=(L==null?void 0:L.height)>0?L.height:a,$=b.useCallback(le=>{K(le),typeof t=="function"&&t(le),P(le),D(le),le!=null&&(A.current=le)},[K,t,P,D]),V=b.useCallback(le=>{N(IF(le)),N(ga({handler:i,reactEvent:le}))},[N,i]),R=b.useCallback(le=>{N(B_(le)),N(ga({handler:u,reactEvent:le}))},[N,u]),H=b.useCallback(le=>{N(vH()),N(ga({handler:m,reactEvent:le}))},[N,m]),q=b.useCallback(le=>{N(B_(le)),N(ga({handler:h,reactEvent:le}))},[N,h]),F=b.useCallback(()=>{N(HF())},[N]),Y=b.useCallback(()=>{N(FF())},[N]),B=b.useCallback(le=>{N(UF(le.key))},[N]),z=b.useCallback(le=>{N(ga({handler:s,reactEvent:le}))},[N,s]),X=b.useCallback(le=>{N(ga({handler:c,reactEvent:le}))},[N,c]),Z=b.useCallback(le=>{N(ga({handler:f,reactEvent:le}))},[N,f]),ee=b.useCallback(le=>{N(ga({handler:p,reactEvent:le}))},[N,p]),se=b.useCallback(le=>{N(ga({handler:x,reactEvent:le}))},[N,x]),ae=b.useCallback(le=>{C&&N(VF(le)),N(ga({handler:w,reactEvent:le}))},[N,C,w]),re=b.useCallback(le=>{N(ga({handler:y,reactEvent:le}))},[N,y]),J=ISe(O);return b.createElement(LH.Provider,{value:T},b.createElement(BB.Provider,{value:k},b.createElement(J,{width:I??(S==null?void 0:S.width),height:W??(S==null?void 0:S.height),className:st("recharts-wrapper",r),style:OSe({position:"relative",cursor:"default",width:I,height:W},S),onClick:V,onContextMenu:z,onDoubleClick:X,onFocus:F,onBlur:Y,onKeyDown:B,onMouseDown:Z,onMouseEnter:R,onMouseLeave:H,onMouseMove:q,onMouseUp:ee,onTouchEnd:re,onTouchMove:ae,onTouchStart:se,ref:$},b.createElement(PSe,null),n)))}),zSe=["width","height","responsive","children","className","style","compact","title","desc"];function $Se(e,t){if(e==null)return{};var n,r,a=BSe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function BSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var JF=b.forwardRef((e,t)=>{var{width:n,height:r,responsive:a,children:i,className:s,style:c,compact:f,title:u,desc:m}=e,h=$Se(e,zSe),p=ta(h);return f?b.createElement(b.Fragment,null,b.createElement(km,{width:n,height:r}),b.createElement(UL,{otherAttributes:p,title:u,desc:m},i)):b.createElement(LSe,{className:s,style:c,width:n,height:r,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},b.createElement(UL,{otherAttributes:p,title:u,desc:m,ref:t},b.createElement(fxe,null,i)))});function U_(){return U_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U_.apply(null,arguments)}function FL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function USe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FL(Object(n),!0).forEach(function(r){HSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HSe(e,t,n){return(t=FSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FSe(e){var t=qSe(e,"string");return typeof t=="symbol"?t:t+""}function qSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KSe={top:5,right:5,bottom:5,left:5},VSe=USe({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:KSe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},jA),eq=b.forwardRef(function(t,n){var r,a=yn(t.categoricalChartProps,VSe),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:u}=t,m={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return b.createElement(XF,{preloadedState:{options:m},reduxStoreName:(r=u.id)!==null&&r!==void 0?r:i},b.createElement(pF,{chartData:u.data}),b.createElement(WF,{layout:a.layout,margin:a.margin}),b.createElement(ZF,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),b.createElement(QF,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),b.createElement(JF,U_({},a,{ref:n})))}),YSe=["axis"],GSe=b.forwardRef((e,t)=>b.createElement(eq,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:YSe,tooltipPayloadSearcher:nA,categoricalChartProps:e,ref:t})),XSe=["axis","item"],WSe=b.forwardRef((e,t)=>b.createElement(eq,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:XSe,tooltipPayloadSearcher:nA,categoricalChartProps:e,ref:t}));function QSe(e){var t=Ct();return b.useEffect(()=>{t(uSe(e))},[t,e]),null}var ZSe=["layout"];function H_(){return H_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H_.apply(null,arguments)}function JSe(e,t){if(e==null)return{};var n,r,a=eEe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function eEe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function qL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tEe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qL(Object(n),!0).forEach(function(r){nEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nEe(e,t,n){return(t=rEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rEe(e){var t=aEe(e,"string");return typeof t=="symbol"?t:t+""}function aEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iEe={top:5,right:5,bottom:5,left:5},tq=tEe({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:iEe,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},jA),oEe=b.forwardRef(function(t,n){var r,a=yn(t.categoricalChartProps,tq),{layout:i}=a,s=JSe(a,ZSe),{chartName:c,defaultTooltipEventType:f,validateTooltipEventTypes:u,tooltipPayloadSearcher:m}=t,h={chartName:c,defaultTooltipEventType:f,validateTooltipEventTypes:u,tooltipPayloadSearcher:m,eventEmitter:void 0};return b.createElement(XF,{preloadedState:{options:h},reduxStoreName:(r=a.id)!==null&&r!==void 0?r:c},b.createElement(pF,{chartData:a.data}),b.createElement(WF,{layout:i,margin:a.margin}),b.createElement(ZF,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),b.createElement(QF,{baseValue:void 0,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),b.createElement(QSe,{cx:a.cx,cy:a.cy,startAngle:a.startAngle,endAngle:a.endAngle,innerRadius:a.innerRadius,outerRadius:a.outerRadius}),b.createElement(JF,H_({},s,{ref:n})))});function KL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function VL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KL(Object(n),!0).forEach(function(r){sEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sEe(e,t,n){return(t=lEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lEe(e){var t=cEe(e,"string");return typeof t=="symbol"?t:t+""}function cEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uEe=["item"],fEe=VL(VL({},tq),{},{layout:"centric",startAngle:0,endAngle:360}),dEe=b.forwardRef((e,t)=>{var n=yn(e,fEe);return b.createElement(oEe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:uEe,tooltipPayloadSearcher:nA,categoricalChartProps:n,ref:t})});function hEe({completed:e,failed:t}){const n=e+t;if(n===0)return v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsxs("div",{className:"relative h-32 w-32",children:[v.jsx("svg",{viewBox:"0 0 100 100",className:"h-full w-full",children:v.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:"12"})}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("span",{className:"text-sm text-muted-foreground",children:"N/A"})})]})});const r=Math.round(e/n*1e3)/10,a=[{name:"Completed",value:e},{name:"Failed",value:t}],i=["#2e7d32","#c62828"];return v.jsxs("div",{className:"relative flex h-full items-center justify-center",children:[v.jsx(IC,{width:140,height:140,children:v.jsx(dEe,{children:v.jsx(dF,{data:a,cx:"50%",cy:"50%",innerRadius:40,outerRadius:56,dataKey:"value",strokeWidth:0,children:a.map((s,c)=>v.jsx(Qm,{fill:i[c]},c))})})}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsxs("span",{className:"text-lg font-semibold",children:[r,"%"]})})]})}function YL(e){return new Date(e+"T00:00:00").toLocaleDateString(void 0,{month:"short",day:"numeric"})}function mEe({data:e}){return e.some(n=>n.total>0)?v.jsx(IC,{width:"100%",height:280,children:v.jsxs(WSe,{data:e,margin:{top:8,right:8,left:-16,bottom:0},children:[v.jsx(gA,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),v.jsx(wA,{dataKey:"date",tickFormatter:YL,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),v.jsx(SA,{allowDecimals:!1,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),v.jsx(BH,{contentStyle:{backgroundColor:"hsl(var(--popover))",color:"hsl(var(--popover-foreground))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:13},labelFormatter:n=>YL(String(n))}),v.jsx(S6,{wrapperStyle:{fontSize:12,paddingTop:8}}),v.jsx(D_,{dataKey:"completed",name:"Completed",stackId:"a",fill:"#2e7d32",radius:[0,0,0,0]}),v.jsx(D_,{dataKey:"failed",name:"Failed",stackId:"a",fill:"#c62828",radius:[2,2,0,0]})]})}):v.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No data"})}function GL(e){return new Date(e+"T00:00:00").toLocaleDateString(void 0,{month:"short",day:"numeric"})}function pEe(e){return e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function vEe({data:e}){if(e.filter(r=>r.avg_duration_ms!==null).length===0)return v.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No data"});const n=e.map(r=>({...r,avg_minutes:r.avg_duration_ms!==null?r.avg_duration_ms/6e4:null}));return v.jsx(IC,{width:"100%",height:280,children:v.jsxs(GSe,{data:n,margin:{top:8,right:8,left:-16,bottom:0},children:[v.jsx(gA,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),v.jsx(wA,{dataKey:"date",tickFormatter:GL,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),v.jsx(SA,{tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,tickFormatter:r=>`${r.toFixed(0)}m`}),v.jsx(BH,{contentStyle:{backgroundColor:"hsl(var(--popover))",color:"hsl(var(--popover-foreground))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:13},labelFormatter:r=>GL(String(r)),formatter:r=>[pEe(Number(r)*6e4),"Avg Duration"]}),v.jsx(TF,{type:"monotone",dataKey:"avg_minutes",name:"Avg Duration",stroke:"#1565c0",strokeWidth:2,dot:{r:3,fill:"#1565c0"},connectNulls:!0})]})})}const gEe=["7d","30d","90d"];function yEe(e){return e===null?"—":e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function bEe({projectId:e}){const[t,n]=b.useState("30d"),{data:r,isLoading:a}=iie(e,t);return a?v.jsxs("div",{className:"space-y-4",children:[v.jsx(tn,{className:"h-8 w-48"}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(tn,{className:"h-32"}),v.jsx(tn,{className:"h-32"}),v.jsx(tn,{className:"h-32"})]}),v.jsx(tn,{className:"h-72"})]}):r?v.jsxs("div",{className:"space-y-6",children:[v.jsx("div",{className:"flex gap-1",children:gEe.map(i=>v.jsx(je,{size:"sm",variant:t===i?"default":"outline",onClick:()=>n(i),children:i},i))}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsxs(dn,{children:[v.jsx(Yu,{className:"pb-2",children:v.jsx(Gu,{className:"text-sm font-medium text-muted-foreground",children:"Total Runs"})}),v.jsxs(hn,{children:[v.jsx("div",{className:"text-3xl font-bold",children:r.total_runs}),v.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[r.completed," completed · ",r.failed," failed"]})]})]}),v.jsxs(dn,{children:[v.jsx(Yu,{className:"pb-2",children:v.jsx(Gu,{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"})}),v.jsx(hn,{className:"h-36",children:v.jsx(hEe,{completed:r.completed,failed:r.failed})})]}),v.jsxs(dn,{children:[v.jsx(Yu,{className:"pb-2",children:v.jsx(Gu,{className:"text-sm font-medium text-muted-foreground",children:"Avg Duration"})}),v.jsxs(hn,{children:[v.jsx("div",{className:"text-3xl font-bold",children:yEe(r.avg_duration_ms)}),v.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"per session"})]})]})]}),v.jsxs(dn,{children:[v.jsx(Yu,{children:v.jsx(Gu,{className:"text-base",children:"Run Frequency"})}),v.jsx(hn,{children:v.jsx(mEe,{data:r.daily})})]}),v.jsxs(dn,{children:[v.jsx(Yu,{children:v.jsx(Gu,{className:"text-base",children:"Duration Trends"})}),v.jsx(hn,{children:v.jsx(vEe,{data:r.daily})})]})]}):null}function CA({className:e,orientation:t="horizontal",...n}){return v.jsx(YJ,{"data-slot":"tabs","data-orientation":t,orientation:t,className:Oe("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const xEe=y0("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function OA({className:e,variant:t="default",...n}){return v.jsx(GJ,{"data-slot":"tabs-list","data-variant":t,className:Oe(xEe({variant:t}),e),...n})}function Sa({className:e,...t}){return v.jsx(XJ,{"data-slot":"tabs-trigger",className:Oe("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function Ea({className:e,...t}){return v.jsx(WJ,{"data-slot":"tabs-content",className:Oe("flex-1 outline-none",e),...t})}function wEe(){return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-48"}),v.jsx(tn,{className:"h-24 rounded-lg"}),v.jsx(tn,{className:"h-64 rounded-lg"})]})}const XL={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function SEe(){const{projectId:e}=aj(),t=Number(e),n=mB(t),[r,a]=b.useState(1),i=ure(t,r),s=MB(t),[c,f]=b.useState(!1),[u,m]=b.useState(!1),[h,p]=b.useState("sessions"),y=n.isLoading||i.isLoading,w=n.error||i.error;if(y)return v.jsx(wEe,{});if(w)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",w.message]})]});if(!n.data)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsx("span",{children:"Project not found"})]});const x=n.data,S=i.data,E=(S==null?void 0:S.items)??[],O=(S==null?void 0:S.total)??0,C=S?Math.ceil(S.total/S.per_page):0,A=s.data??[],N=A.reduce((T,P)=>(T[P.type]=(T[P.type]||0)+1,T),{});return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:x.display_name}),v.jsxs("div",{className:"flex gap-2",children:[v.jsxs(je,{onClick:()=>f(!0),disabled:!x.dir_exists,children:[v.jsx(lC,{className:"mr-2 h-4 w-4"}),"Launch Session"]}),v.jsxs(je,{variant:"outline",onClick:()=>{p("resources"),m(!0)},children:[v.jsx(v0,{className:"mr-2 h-4 w-4"}),"Install Resource"]}),v.jsx(je,{variant:"outline",asChild:!0,children:v.jsxs(Ya,{to:"/projects",children:[v.jsx(eB,{className:"mr-2 h-4 w-4"}),"Back"]})})]})]}),v.jsx(dn,{children:v.jsx(hn,{className:"pt-6",children:v.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Directory"}),v.jsxs("dd",{className:"flex items-center gap-2 break-all",children:[x.working_dir,x.dir_exists?v.jsx(vn,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:"OK"}):v.jsx(vn,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Missing"})]}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Created"}),v.jsx("dd",{children:new Date(x.created_at).toLocaleString()}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Resources"}),v.jsx("dd",{children:A.length===0?v.jsx("span",{className:"text-sm text-muted-foreground",children:"None installed"}):v.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(N).map(([T,P])=>v.jsxs(vn,{variant:"secondary",className:"cursor-pointer text-xs",onClick:()=>p("resources"),children:[P," ",P===1?XL[T]??T:`${XL[T]??T}s`]},T))})})]})})}),v.jsx(kae,{projectId:t,open:c,onOpenChange:f}),v.jsx(pC,{open:u,onOpenChange:m,projectId:t}),v.jsxs(CA,{value:h,onValueChange:p,children:[v.jsxs(OA,{children:[v.jsxs(Sa,{value:"sessions",children:["Sessions (",O,")"]}),v.jsx(Sa,{value:"activity",children:"Activity"}),v.jsxs(Sa,{value:"resources",children:["Resources (",A.length,")"]}),v.jsx(Sa,{value:"files",children:"Files"})]}),v.jsx(Ea,{value:"sessions",className:"mt-4 space-y-3",children:O===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):v.jsxs(v.Fragment,{children:[v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsx(UE,{sessions:E})})}),v.jsx(Pae,{page:r,totalPages:C,onPageChange:a})]})}),v.jsx(Ea,{value:"activity",className:"mt-4",children:v.jsx(bEe,{projectId:t})}),v.jsx(Ea,{value:"resources",className:"mt-4",children:v.jsx(rie,{projectId:t,installOpen:u,onInstallOpenChange:m})}),v.jsx(Ea,{value:"files",className:"mt-4",children:v.jsx(Iae,{projectId:t})})]})]})}function bn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=bn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var EEe={value:()=>{}};function ub(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new bg(n)}function bg(e){this._=e}function _Ee(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bg.prototype=ub.prototype={constructor:bg,on:function(e,t){var n=this._,r=_Ee(e+"",n),a,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((a=(e=r[i]).type)&&(a=jEe(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(a=(e=r[i]).type)n[a]=WL(n[a],e.name,t);else if(t==null)for(a in n)n[a]=WL(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new bg(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function jEe(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function WL(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=EEe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var F_="http://www.w3.org/1999/xhtml";const QL={svg:"http://www.w3.org/2000/svg",xhtml:F_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fb(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),QL.hasOwnProperty(t)?{space:QL[t],local:e}:e}function CEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===F_&&t.documentElement.namespaceURI===F_?t.createElement(e):t.createElementNS(n,e)}}function OEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nq(e){var t=fb(e);return(t.local?OEe:CEe)(t)}function AEe(){}function AA(e){return e==null?AEe:function(){return this.querySelector(e)}}function NEe(e){typeof e!="function"&&(e=AA(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,c=r[a]=new Array(s),f,u,m=0;m<s;++m)(f=i[m])&&(u=e.call(f,f.__data__,m,i))&&("__data__"in f&&(u.__data__=f.__data__),c[m]=u);return new aa(r,this._parents)}function TEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function PEe(){return[]}function rq(e){return e==null?PEe:function(){return this.querySelectorAll(e)}}function MEe(e){return function(){return TEe(e.apply(this,arguments))}}function REe(e){typeof e=="function"?e=MEe(e):e=rq(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var s=t[i],c=s.length,f,u=0;u<c;++u)(f=s[u])&&(r.push(e.call(f,f.__data__,u,s)),a.push(f));return new aa(r,a)}function aq(e){return function(){return this.matches(e)}}function iq(e){return function(t){return t.matches(e)}}var kEe=Array.prototype.find;function DEe(e){return function(){return kEe.call(this.children,e)}}function IEe(){return this.firstElementChild}function LEe(e){return this.select(e==null?IEe:DEe(typeof e=="function"?e:iq(e)))}var zEe=Array.prototype.filter;function $Ee(){return Array.from(this.children)}function BEe(e){return function(){return zEe.call(this.children,e)}}function UEe(e){return this.selectAll(e==null?$Ee:BEe(typeof e=="function"?e:iq(e)))}function HEe(e){typeof e!="function"&&(e=aq(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,c=r[a]=[],f,u=0;u<s;++u)(f=i[u])&&e.call(f,f.__data__,u,i)&&c.push(f);return new aa(r,this._parents)}function oq(e){return new Array(e.length)}function FEe(){return new aa(this._enter||this._groups.map(oq),this._parents)}function Ly(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ly.prototype={constructor:Ly,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function qEe(e){return function(){return e}}function KEe(e,t,n,r,a,i){for(var s=0,c,f=t.length,u=i.length;s<u;++s)(c=t[s])?(c.__data__=i[s],r[s]=c):n[s]=new Ly(e,i[s]);for(;s<f;++s)(c=t[s])&&(a[s]=c)}function VEe(e,t,n,r,a,i,s){var c,f,u=new Map,m=t.length,h=i.length,p=new Array(m),y;for(c=0;c<m;++c)(f=t[c])&&(p[c]=y=s.call(f,f.__data__,c,t)+"",u.has(y)?a[c]=f:u.set(y,f));for(c=0;c<h;++c)y=s.call(e,i[c],c,i)+"",(f=u.get(y))?(r[c]=f,f.__data__=i[c],u.delete(y)):n[c]=new Ly(e,i[c]);for(c=0;c<m;++c)(f=t[c])&&u.get(p[c])===f&&(a[c]=f)}function YEe(e){return e.__data__}function GEe(e,t){if(!arguments.length)return Array.from(this,YEe);var n=t?VEe:KEe,r=this._parents,a=this._groups;typeof e!="function"&&(e=qEe(e));for(var i=a.length,s=new Array(i),c=new Array(i),f=new Array(i),u=0;u<i;++u){var m=r[u],h=a[u],p=h.length,y=XEe(e.call(m,m&&m.__data__,u,r)),w=y.length,x=c[u]=new Array(w),S=s[u]=new Array(w),E=f[u]=new Array(p);n(m,h,x,S,E,y,t);for(var O=0,C=0,A,N;O<w;++O)if(A=x[O]){for(O>=C&&(C=O+1);!(N=S[C])&&++C<w;);A._next=N||null}}return s=new aa(s,r),s._enter=c,s._exit=f,s}function XEe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function WEe(){return new aa(this._exit||this._groups.map(oq),this._parents)}function QEe(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function ZEe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,s=Math.min(a,i),c=new Array(a),f=0;f<s;++f)for(var u=n[f],m=r[f],h=u.length,p=c[f]=new Array(h),y,w=0;w<h;++w)(y=u[w]||m[w])&&(p[w]=y);for(;f<a;++f)c[f]=n[f];return new aa(c,this._parents)}function JEe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],s;--a>=0;)(s=r[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function e_e(e){e||(e=t_e);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var s=n[i],c=s.length,f=a[i]=new Array(c),u,m=0;m<c;++m)(u=s[m])&&(f[m]=u);f.sort(t)}return new aa(a,this._parents).order()}function t_e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function n_e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function r_e(){return Array.from(this)}function a_e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var s=r[a];if(s)return s}return null}function i_e(){let e=0;for(const t of this)++e;return e}function o_e(){return!this.node()}function s_e(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,s=a.length,c;i<s;++i)(c=a[i])&&e.call(c,c.__data__,i,a);return this}function l_e(e){return function(){this.removeAttribute(e)}}function c_e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function u_e(e,t){return function(){this.setAttribute(e,t)}}function f_e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function d_e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function h_e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function m_e(e,t){var n=fb(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?c_e:l_e:typeof t=="function"?n.local?h_e:d_e:n.local?f_e:u_e)(n,t))}function sq(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function p_e(e){return function(){this.style.removeProperty(e)}}function v_e(e,t,n){return function(){this.style.setProperty(e,t,n)}}function g_e(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function y_e(e,t,n){return arguments.length>1?this.each((t==null?p_e:typeof t=="function"?g_e:v_e)(e,t,n??"")):Mf(this.node(),e)}function Mf(e,t){return e.style.getPropertyValue(t)||sq(e).getComputedStyle(e,null).getPropertyValue(t)}function b_e(e){return function(){delete this[e]}}function x_e(e,t){return function(){this[e]=t}}function w_e(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function S_e(e,t){return arguments.length>1?this.each((t==null?b_e:typeof t=="function"?w_e:x_e)(e,t)):this.node()[e]}function lq(e){return e.trim().split(/^|\s+/)}function NA(e){return e.classList||new cq(e)}function cq(e){this._node=e,this._names=lq(e.getAttribute("class")||"")}cq.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function uq(e,t){for(var n=NA(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function fq(e,t){for(var n=NA(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function E_e(e){return function(){uq(this,e)}}function __e(e){return function(){fq(this,e)}}function j_e(e,t){return function(){(t.apply(this,arguments)?uq:fq)(this,e)}}function C_e(e,t){var n=lq(e+"");if(arguments.length<2){for(var r=NA(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?j_e:t?E_e:__e)(n,t))}function O_e(){this.textContent=""}function A_e(e){return function(){this.textContent=e}}function N_e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function T_e(e){return arguments.length?this.each(e==null?O_e:(typeof e=="function"?N_e:A_e)(e)):this.node().textContent}function P_e(){this.innerHTML=""}function M_e(e){return function(){this.innerHTML=e}}function R_e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function k_e(e){return arguments.length?this.each(e==null?P_e:(typeof e=="function"?R_e:M_e)(e)):this.node().innerHTML}function D_e(){this.nextSibling&&this.parentNode.appendChild(this)}function I_e(){return this.each(D_e)}function L_e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function z_e(){return this.each(L_e)}function $_e(e){var t=typeof e=="function"?e:nq(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function B_e(){return null}function U_e(e,t){var n=typeof e=="function"?e:nq(e),r=t==null?B_e:typeof t=="function"?t:AA(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function H_e(){var e=this.parentNode;e&&e.removeChild(this)}function F_e(){return this.each(H_e)}function q_e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function K_e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function V_e(e){return this.select(e?K_e:q_e)}function Y_e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function G_e(e){return function(t){e.call(this,t,this.__data__)}}function X_e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function W_e(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function Q_e(e,t,n){return function(){var r=this.__on,a,i=G_e(t);if(r){for(var s=0,c=r.length;s<c;++s)if((a=r[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function Z_e(e,t,n){var r=X_e(e+""),a,i=r.length,s;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,u=c.length,m;f<u;++f)for(a=0,m=c[f];a<i;++a)if((s=r[a]).type===m.type&&s.name===m.name)return m.value}return}for(c=t?Q_e:W_e,a=0;a<i;++a)this.each(c(r[a],t,n));return this}function dq(e,t,n){var r=sq(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function J_e(e,t){return function(){return dq(this,e,t)}}function eje(e,t){return function(){return dq(this,e,t.apply(this,arguments))}}function tje(e,t){return this.each((typeof t=="function"?eje:J_e)(e,t))}function*nje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,s;a<i;++a)(s=r[a])&&(yield s)}var hq=[null];function aa(e,t){this._groups=e,this._parents=t}function Jm(){return new aa([[document.documentElement]],hq)}function rje(){return this}aa.prototype=Jm.prototype={constructor:aa,select:NEe,selectAll:REe,selectChild:LEe,selectChildren:UEe,filter:HEe,data:GEe,enter:FEe,exit:WEe,join:QEe,merge:ZEe,selection:rje,order:JEe,sort:e_e,call:n_e,nodes:r_e,node:a_e,size:i_e,empty:o_e,each:s_e,attr:m_e,style:y_e,property:S_e,classed:C_e,text:T_e,html:k_e,raise:I_e,lower:z_e,append:$_e,insert:U_e,remove:F_e,clone:V_e,datum:Y_e,on:Z_e,dispatch:tje,[Symbol.iterator]:nje};function Qr(e){return typeof e=="string"?new aa([[document.querySelector(e)]],[document.documentElement]):new aa([[e]],hq)}function aje(e){let t;for(;t=e.sourceEvent;)e=t;return e}function $a(e,t){if(e=aje(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const ije={passive:!1},em={capture:!0,passive:!1};function BS(e){e.stopImmediatePropagation()}function of(e){e.preventDefault(),e.stopImmediatePropagation()}function mq(e){var t=e.document.documentElement,n=Qr(e).on("dragstart.drag",of,em);"onselectstart"in t?n.on("selectstart.drag",of,em):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function pq(e,t){var n=e.document.documentElement,r=Qr(e).on("dragstart.drag",null);t&&(r.on("click.drag",of,em),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Zv=e=>()=>e;function q_(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:i,x:s,y:c,dx:f,dy:u,dispatch:m}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:m}})}q_.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function oje(e){return!e.ctrlKey&&!e.button}function sje(){return this.parentNode}function lje(e,t){return t??{x:e.x,y:e.y}}function cje(){return navigator.maxTouchPoints||"ontouchstart"in this}function vq(){var e=oje,t=sje,n=lje,r=cje,a={},i=ub("start","drag","end"),s=0,c,f,u,m,h=0;function p(A){A.on("mousedown.drag",y).filter(r).on("touchstart.drag",S).on("touchmove.drag",E,ije).on("touchend.drag touchcancel.drag",O).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(A,N){if(!(m||!e.call(this,A,N))){var T=C(this,t.call(this,A,N),A,N,"mouse");T&&(Qr(A.view).on("mousemove.drag",w,em).on("mouseup.drag",x,em),mq(A.view),BS(A),u=!1,c=A.clientX,f=A.clientY,T("start",A))}}function w(A){if(of(A),!u){var N=A.clientX-c,T=A.clientY-f;u=N*N+T*T>h}a.mouse("drag",A)}function x(A){Qr(A.view).on("mousemove.drag mouseup.drag",null),pq(A.view,u),of(A),a.mouse("end",A)}function S(A,N){if(e.call(this,A,N)){var T=A.changedTouches,P=t.call(this,A,N),k=T.length,D,K;for(D=0;D<k;++D)(K=C(this,P,A,N,T[D].identifier,T[D]))&&(BS(A),K("start",A,T[D]))}}function E(A){var N=A.changedTouches,T=N.length,P,k;for(P=0;P<T;++P)(k=a[N[P].identifier])&&(of(A),k("drag",A,N[P]))}function O(A){var N=A.changedTouches,T=N.length,P,k;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),P=0;P<T;++P)(k=a[N[P].identifier])&&(BS(A),k("end",A,N[P]))}function C(A,N,T,P,k,D){var K=i.copy(),L=$a(D||T,N),I,W,$;if(($=n.call(A,new q_("beforestart",{sourceEvent:T,target:p,identifier:k,active:s,x:L[0],y:L[1],dx:0,dy:0,dispatch:K}),P))!=null)return I=$.x-L[0]||0,W=$.y-L[1]||0,function V(R,H,q){var F=L,Y;switch(R){case"start":a[k]=V,Y=s++;break;case"end":delete a[k],--s;case"drag":L=$a(q||H,N),Y=s;break}K.call(R,A,new q_(R,{sourceEvent:H,subject:$,target:p,identifier:k,active:Y,x:L[0]+I,y:L[1]+W,dx:L[0]-F[0],dy:L[1]-F[1],dispatch:K}),P)}}return p.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Zv(!!A),p):e},p.container=function(A){return arguments.length?(t=typeof A=="function"?A:Zv(A),p):t},p.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Zv(A),p):n},p.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Zv(!!A),p):r},p.on=function(){var A=i.on.apply(i,arguments);return A===i?p:A},p.clickDistance=function(A){return arguments.length?(h=(A=+A)*A,p):Math.sqrt(h)},p}var Rf=0,Oh=0,yh=0,gq=1e3,zy,Ah,$y=0,Mc=0,db=0,tm=typeof performance=="object"&&performance.now?performance:Date,yq=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function TA(){return Mc||(yq(uje),Mc=tm.now()+db)}function uje(){Mc=0}function By(){this._call=this._time=this._next=null}By.prototype=bq.prototype={constructor:By,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?TA():+n)+(t==null?0:+t),!this._next&&Ah!==this&&(Ah?Ah._next=this:zy=this,Ah=this),this._call=e,this._time=n,K_()},stop:function(){this._call&&(this._call=null,this._time=1/0,K_())}};function bq(e,t,n){var r=new By;return r.restart(e,t,n),r}function fje(){TA(),++Rf;for(var e=zy,t;e;)(t=Mc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Rf}function ZL(){Mc=($y=tm.now())+db,Rf=Oh=0;try{fje()}finally{Rf=0,hje(),Mc=0}}function dje(){var e=tm.now(),t=e-$y;t>gq&&(db-=t,$y=e)}function hje(){for(var e,t=zy,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:zy=n);Ah=e,K_(r)}function K_(e){if(!Rf){Oh&&(Oh=clearTimeout(Oh));var t=e-Mc;t>24?(e<1/0&&(Oh=setTimeout(ZL,e-tm.now()-db)),yh&&(yh=clearInterval(yh))):(yh||($y=tm.now(),yh=setInterval(dje,gq)),Rf=1,yq(ZL))}}function JL(e,t,n){var r=new By;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var mje=ub("start","end","cancel","interrupt"),pje=[],xq=0,e3=1,V_=2,xg=3,t3=4,Y_=5,wg=6;function hb(e,t,n,r,a,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;vje(e,n,{name:t,index:r,group:a,on:mje,tween:pje,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:xq})}function PA(e,t){var n=ni(e,t);if(n.state>xq)throw new Error("too late; already scheduled");return n}function Li(e,t){var n=ni(e,t);if(n.state>xg)throw new Error("too late; already running");return n}function ni(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function vje(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=bq(i,0,n.time);function i(u){n.state=e3,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var m,h,p,y;if(n.state!==e3)return f();for(m in r)if(y=r[m],y.name===n.name){if(y.state===xg)return JL(s);y.state===t3?(y.state=wg,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete r[m]):+m<t&&(y.state=wg,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete r[m])}if(JL(function(){n.state===xg&&(n.state=t3,n.timer.restart(c,n.delay,n.time),c(u))}),n.state=V_,n.on.call("start",e,e.__data__,n.index,n.group),n.state===V_){for(n.state=xg,a=new Array(p=n.tween.length),m=0,h=-1;m<p;++m)(y=n.tween[m].value.call(e,e.__data__,n.index,n.group))&&(a[++h]=y);a.length=h+1}}function c(u){for(var m=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(f),n.state=Y_,1),h=-1,p=a.length;++h<p;)a[h].call(e,m);n.state===Y_&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=wg,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Sg(e,t){var n=e.__transition,r,a,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}a=r.state>V_&&r.state<Y_,r.state=wg,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function gje(e){return this.each(function(){Sg(this,e)})}function yje(e,t){var n,r;return function(){var a=Li(this,e),i=a.tween;if(i!==n){r=n=i;for(var s=0,c=r.length;s<c;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}a.tween=r}}function bje(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=Li(this,e),s=i.tween;if(s!==r){a=(r=s).slice();for(var c={name:t,value:n},f=0,u=a.length;f<u;++f)if(a[f].name===t){a[f]=c;break}f===u&&a.push(c)}i.tween=a}}function xje(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ni(this.node(),n).tween,a=0,i=r.length,s;a<i;++a)if((s=r[a]).name===e)return s.value;return null}return this.each((t==null?yje:bje)(n,e,t))}function MA(e,t,n){var r=e._id;return e.each(function(){var a=Li(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return ni(a,r).value[t]}}function wq(e,t){var n;return(typeof t=="number"?Ba:t instanceof Tc?yy:(n=Tc(t))?(t=n,yy):uU)(e,t)}function wje(e){return function(){this.removeAttribute(e)}}function Sje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Eje(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttribute(e);return s===a?null:s===r?i:i=t(r=s,n)}}function _je(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===r?i:i=t(r=s,n)}}function jje(e,t,n){var r,a,i;return function(){var s,c=n(this),f;return c==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=c+"",s===f?null:s===r&&f===a?i:(a=f,i=t(r=s,c)))}}function Cje(e,t,n){var r,a,i;return function(){var s,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=c+"",s===f?null:s===r&&f===a?i:(a=f,i=t(r=s,c)))}}function Oje(e,t){var n=fb(e),r=n==="transform"?Nde:wq;return this.attrTween(e,typeof t=="function"?(n.local?Cje:jje)(n,r,MA(this,"attr."+e,t)):t==null?(n.local?Sje:wje)(n):(n.local?_je:Eje)(n,r,t))}function Aje(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Nje(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Tje(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Nje(e,i)),n}return a._value=t,a}function Pje(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Aje(e,i)),n}return a._value=t,a}function Mje(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=fb(e);return this.tween(n,(r.local?Tje:Pje)(r,t))}function Rje(e,t){return function(){PA(this,e).delay=+t.apply(this,arguments)}}function kje(e,t){return t=+t,function(){PA(this,e).delay=t}}function Dje(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Rje:kje)(t,e)):ni(this.node(),t).delay}function Ije(e,t){return function(){Li(this,e).duration=+t.apply(this,arguments)}}function Lje(e,t){return t=+t,function(){Li(this,e).duration=t}}function zje(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ije:Lje)(t,e)):ni(this.node(),t).duration}function $je(e,t){if(typeof t!="function")throw new Error;return function(){Li(this,e).ease=t}}function Bje(e){var t=this._id;return arguments.length?this.each($je(t,e)):ni(this.node(),t).ease}function Uje(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Li(this,e).ease=n}}function Hje(e){if(typeof e!="function")throw new Error;return this.each(Uje(this._id,e))}function Fje(e){typeof e!="function"&&(e=aq(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,c=r[a]=[],f,u=0;u<s;++u)(f=i[u])&&e.call(f,f.__data__,u,i)&&c.push(f);return new Lo(r,this._parents,this._name,this._id)}function qje(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),s=new Array(r),c=0;c<i;++c)for(var f=t[c],u=n[c],m=f.length,h=s[c]=new Array(m),p,y=0;y<m;++y)(p=f[y]||u[y])&&(h[y]=p);for(;c<r;++c)s[c]=t[c];return new Lo(s,this._parents,this._name,this._id)}function Kje(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Vje(e,t,n){var r,a,i=Kje(t)?PA:Li;return function(){var s=i(this,e),c=s.on;c!==r&&(a=(r=c).copy()).on(t,n),s.on=a}}function Yje(e,t){var n=this._id;return arguments.length<2?ni(this.node(),n).on.on(e):this.each(Vje(n,e,t))}function Gje(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Xje(){return this.on("end.remove",Gje(this._id))}function Wje(e){var t=this._name,n=this._id;typeof e!="function"&&(e=AA(e));for(var r=this._groups,a=r.length,i=new Array(a),s=0;s<a;++s)for(var c=r[s],f=c.length,u=i[s]=new Array(f),m,h,p=0;p<f;++p)(m=c[p])&&(h=e.call(m,m.__data__,p,c))&&("__data__"in m&&(h.__data__=m.__data__),u[p]=h,hb(u[p],t,n,p,u,ni(m,n)));return new Lo(i,this._parents,t,n)}function Qje(e){var t=this._name,n=this._id;typeof e!="function"&&(e=rq(e));for(var r=this._groups,a=r.length,i=[],s=[],c=0;c<a;++c)for(var f=r[c],u=f.length,m,h=0;h<u;++h)if(m=f[h]){for(var p=e.call(m,m.__data__,h,f),y,w=ni(m,n),x=0,S=p.length;x<S;++x)(y=p[x])&&hb(y,t,n,x,p,w);i.push(p),s.push(m)}return new Lo(i,s,t,n)}var Zje=Jm.prototype.constructor;function Jje(){return new Zje(this._groups,this._parents)}function eCe(e,t){var n,r,a;return function(){var i=Mf(this,e),s=(this.style.removeProperty(e),Mf(this,e));return i===s?null:i===n&&s===r?a:a=t(n=i,r=s)}}function Sq(e){return function(){this.style.removeProperty(e)}}function tCe(e,t,n){var r,a=n+"",i;return function(){var s=Mf(this,e);return s===a?null:s===r?i:i=t(r=s,n)}}function nCe(e,t,n){var r,a,i;return function(){var s=Mf(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Mf(this,e))),s===f?null:s===r&&f===a?i:(a=f,i=t(r=s,c))}}function rCe(e,t){var n,r,a,i="style."+t,s="end."+i,c;return function(){var f=Li(this,e),u=f.on,m=f.value[i]==null?c||(c=Sq(t)):void 0;(u!==n||a!==m)&&(r=(n=u).copy()).on(s,a=m),f.on=r}}function aCe(e,t,n){var r=(e+="")=="transform"?Ade:wq;return t==null?this.styleTween(e,eCe(e,r)).on("end.style."+e,Sq(e)):typeof t=="function"?this.styleTween(e,nCe(e,r,MA(this,"style."+e,t))).each(rCe(this._id,e)):this.styleTween(e,tCe(e,r,t),n).on("end.style."+e,null)}function iCe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function oCe(e,t,n){var r,a;function i(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&iCe(e,s,n)),r}return i._value=t,i}function sCe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,oCe(e,t,n??""))}function lCe(e){return function(){this.textContent=e}}function cCe(e){return function(){var t=e(this);this.textContent=t??""}}function uCe(e){return this.tween("text",typeof e=="function"?cCe(MA(this,"text",e)):lCe(e==null?"":e+""))}function fCe(e){return function(t){this.textContent=e.call(this,t)}}function dCe(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&fCe(a)),t}return r._value=e,r}function hCe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,dCe(e))}function mCe(){for(var e=this._name,t=this._id,n=Eq(),r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],c=s.length,f,u=0;u<c;++u)if(f=s[u]){var m=ni(f,t);hb(f,e,n,u,s,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new Lo(r,this._parents,e,n)}function pCe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,s){var c={value:s},f={value:function(){--a===0&&i()}};n.each(function(){var u=Li(this,r),m=u.on;m!==e&&(t=(e=m).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),u.on=t}),a===0&&i()})}var vCe=0;function Lo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Eq(){return++vCe}var lo=Jm.prototype;Lo.prototype={constructor:Lo,select:Wje,selectAll:Qje,selectChild:lo.selectChild,selectChildren:lo.selectChildren,filter:Fje,merge:qje,selection:Jje,transition:mCe,call:lo.call,nodes:lo.nodes,node:lo.node,size:lo.size,empty:lo.empty,each:lo.each,on:Yje,attr:Oje,attrTween:Mje,style:aCe,styleTween:sCe,text:uCe,textTween:hCe,remove:Xje,tween:xje,delay:Dje,duration:zje,ease:Bje,easeVarying:Hje,end:pCe,[Symbol.iterator]:lo[Symbol.iterator]};function gCe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var yCe={time:null,delay:0,duration:250,ease:gCe};function bCe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function xCe(e){var t,n;e instanceof Lo?(t=e._id,e=e._name):(t=Eq(),(n=yCe).time=TA(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],c=s.length,f,u=0;u<c;++u)(f=s[u])&&hb(f,e,t,u,s,n||bCe(f,t));return new Lo(r,this._parents,e,t)}Jm.prototype.interrupt=gje;Jm.prototype.transition=xCe;const Jv=e=>()=>e;function wCe(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function bo(e,t,n){this.k=e,this.x=t,this.y=n}bo.prototype={constructor:bo,scale:function(e){return e===1?this:new bo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new bo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mb=new bo(1,0,0);_q.prototype=bo.prototype;function _q(e){for(;!e.__zoom;)if(!(e=e.parentNode))return mb;return e.__zoom}function US(e){e.stopImmediatePropagation()}function bh(e){e.preventDefault(),e.stopImmediatePropagation()}function SCe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function ECe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function n3(){return this.__zoom||mb}function _Ce(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function jCe(){return navigator.maxTouchPoints||"ontouchstart"in this}function CCe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function jq(){var e=SCe,t=ECe,n=CCe,r=_Ce,a=jCe,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,f=vg,u=ub("start","zoom","end"),m,h,p,y=500,w=150,x=0,S=10;function E($){$.property("__zoom",n3).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",K).filter(a).on("touchstart.zoom",L).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function($,V,R,H){var q=$.selection?$.selection():$;q.property("__zoom",n3),$!==q?N($,V,R,H):q.interrupt().each(function(){T(this,arguments).event(H).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},E.scaleBy=function($,V,R,H){E.scaleTo($,function(){var q=this.__zoom.k,F=typeof V=="function"?V.apply(this,arguments):V;return q*F},R,H)},E.scaleTo=function($,V,R,H){E.transform($,function(){var q=t.apply(this,arguments),F=this.__zoom,Y=R==null?A(q):typeof R=="function"?R.apply(this,arguments):R,B=F.invert(Y),z=typeof V=="function"?V.apply(this,arguments):V;return n(C(O(F,z),Y,B),q,s)},R,H)},E.translateBy=function($,V,R,H){E.transform($,function(){return n(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,H)},E.translateTo=function($,V,R,H,q){E.transform($,function(){var F=t.apply(this,arguments),Y=this.__zoom,B=H==null?A(F):typeof H=="function"?H.apply(this,arguments):H;return n(mb.translate(B[0],B[1]).scale(Y.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof R=="function"?-R.apply(this,arguments):-R),F,s)},H,q)};function O($,V){return V=Math.max(i[0],Math.min(i[1],V)),V===$.k?$:new bo(V,$.x,$.y)}function C($,V,R){var H=V[0]-R[0]*$.k,q=V[1]-R[1]*$.k;return H===$.x&&q===$.y?$:new bo($.k,H,q)}function A($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function N($,V,R,H){$.on("start.zoom",function(){T(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(H).end()}).tween("zoom",function(){var q=this,F=arguments,Y=T(q,F).event(H),B=t.apply(q,F),z=R==null?A(B):typeof R=="function"?R.apply(q,F):R,X=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),Z=q.__zoom,ee=typeof V=="function"?V.apply(q,F):V,se=f(Z.invert(z).concat(X/Z.k),ee.invert(z).concat(X/ee.k));return function(ae){if(ae===1)ae=ee;else{var re=se(ae),J=X/re[2];ae=new bo(J,z[0]-re[0]*J,z[1]-re[1]*J)}Y.zoom(null,ae)}})}function T($,V,R){return!R&&$.__zooming||new P($,V)}function P($,V){this.that=$,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply($,V),this.taps=0}P.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,V){return this.mouse&&$!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var V=Qr(this.that).datum();u.call($,this.that,new wCe($,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:u}),V)}};function k($,...V){if(!e.apply(this,arguments))return;var R=T(this,V).event($),H=this.__zoom,q=Math.max(i[0],Math.min(i[1],H.k*Math.pow(2,r.apply(this,arguments)))),F=$a($);if(R.wheel)(R.mouse[0][0]!==F[0]||R.mouse[0][1]!==F[1])&&(R.mouse[1]=H.invert(R.mouse[0]=F)),clearTimeout(R.wheel);else{if(H.k===q)return;R.mouse=[F,H.invert(F)],Sg(this),R.start()}bh($),R.wheel=setTimeout(Y,w),R.zoom("mouse",n(C(O(H,q),R.mouse[0],R.mouse[1]),R.extent,s));function Y(){R.wheel=null,R.end()}}function D($,...V){if(p||!e.apply(this,arguments))return;var R=$.currentTarget,H=T(this,V,!0).event($),q=Qr($.view).on("mousemove.zoom",z,!0).on("mouseup.zoom",X,!0),F=$a($,R),Y=$.clientX,B=$.clientY;mq($.view),US($),H.mouse=[F,this.__zoom.invert(F)],Sg(this),H.start();function z(Z){if(bh(Z),!H.moved){var ee=Z.clientX-Y,se=Z.clientY-B;H.moved=ee*ee+se*se>x}H.event(Z).zoom("mouse",n(C(H.that.__zoom,H.mouse[0]=$a(Z,R),H.mouse[1]),H.extent,s))}function X(Z){q.on("mousemove.zoom mouseup.zoom",null),pq(Z.view,H.moved),bh(Z),H.event(Z).end()}}function K($,...V){if(e.apply(this,arguments)){var R=this.__zoom,H=$a($.changedTouches?$.changedTouches[0]:$,this),q=R.invert(H),F=R.k*($.shiftKey?.5:2),Y=n(C(O(R,F),H,q),t.apply(this,V),s);bh($),c>0?Qr(this).transition().duration(c).call(N,Y,H,$):Qr(this).call(E.transform,Y,H,$)}}function L($,...V){if(e.apply(this,arguments)){var R=$.touches,H=R.length,q=T(this,V,$.changedTouches.length===H).event($),F,Y,B,z;for(US($),Y=0;Y<H;++Y)B=R[Y],z=$a(B,this),z=[z,this.__zoom.invert(z),B.identifier],q.touch0?!q.touch1&&q.touch0[2]!==z[2]&&(q.touch1=z,q.taps=0):(q.touch0=z,F=!0,q.taps=1+!!m);m&&(m=clearTimeout(m)),F&&(q.taps<2&&(h=z[0],m=setTimeout(function(){m=null},y)),Sg(this),q.start())}}function I($,...V){if(this.__zooming){var R=T(this,V).event($),H=$.changedTouches,q=H.length,F,Y,B,z;for(bh($),F=0;F<q;++F)Y=H[F],B=$a(Y,this),R.touch0&&R.touch0[2]===Y.identifier?R.touch0[0]=B:R.touch1&&R.touch1[2]===Y.identifier&&(R.touch1[0]=B);if(Y=R.that.__zoom,R.touch1){var X=R.touch0[0],Z=R.touch0[1],ee=R.touch1[0],se=R.touch1[1],ae=(ae=ee[0]-X[0])*ae+(ae=ee[1]-X[1])*ae,re=(re=se[0]-Z[0])*re+(re=se[1]-Z[1])*re;Y=O(Y,Math.sqrt(ae/re)),B=[(X[0]+ee[0])/2,(X[1]+ee[1])/2],z=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(R.touch0)B=R.touch0[0],z=R.touch0[1];else return;R.zoom("touch",n(C(Y,B,z),R.extent,s))}}function W($,...V){if(this.__zooming){var R=T(this,V).event($),H=$.changedTouches,q=H.length,F,Y;for(US($),p&&clearTimeout(p),p=setTimeout(function(){p=null},y),F=0;F<q;++F)Y=H[F],R.touch0&&R.touch0[2]===Y.identifier?delete R.touch0:R.touch1&&R.touch1[2]===Y.identifier&&delete R.touch1;if(R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0)R.touch0[1]=this.__zoom.invert(R.touch0[0]);else if(R.end(),R.taps===2&&(Y=$a(Y,this),Math.hypot(h[0]-Y[0],h[1]-Y[1])<S)){var B=Qr(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return E.wheelDelta=function($){return arguments.length?(r=typeof $=="function"?$:Jv(+$),E):r},E.filter=function($){return arguments.length?(e=typeof $=="function"?$:Jv(!!$),E):e},E.touchable=function($){return arguments.length?(a=typeof $=="function"?$:Jv(!!$),E):a},E.extent=function($){return arguments.length?(t=typeof $=="function"?$:Jv([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),E):t},E.scaleExtent=function($){return arguments.length?(i[0]=+$[0],i[1]=+$[1],E):[i[0],i[1]]},E.translateExtent=function($){return arguments.length?(s[0][0]=+$[0][0],s[1][0]=+$[1][0],s[0][1]=+$[0][1],s[1][1]=+$[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function($){return arguments.length?(n=$,E):n},E.duration=function($){return arguments.length?(c=+$,E):c},E.interpolate=function($){return arguments.length?(f=$,E):f},E.on=function(){var $=u.on.apply(u,arguments);return $===u?E:$},E.clickDistance=function($){return arguments.length?(x=($=+$)*$,E):Math.sqrt(x)},E.tapDistance=function($){return arguments.length?(S=+$,E):S},E}const Ri={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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},nm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Cq=["Enter"," ","Escape"],Oq={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"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 kf;(function(e){e.Strict="strict",e.Loose="loose"})(kf||(kf={}));var hc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(hc||(hc={}));var rm;(function(e){e.Partial="partial",e.Full="full"})(rm||(rm={}));const Aq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Ls;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ls||(Ls={}));var Df;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Df||(Df={}));var De;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(De||(De={}));const r3={[De.Left]:De.Right,[De.Right]:De.Left,[De.Top]:De.Bottom,[De.Bottom]:De.Top};function Nq(e){return e===null?null:e?"valid":"invalid"}const Tq=e=>"id"in e&&"source"in e&&"target"in e,OCe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),RA=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ep=(e,t=[0,0])=>{const{width:n,height:r}=Yo(e),a=e.origin??t,i=n*a[0],s=r*a[1];return{x:e.position.x-i,y:e.position.y-s}},ACe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const i=typeof a=="string";let s=!t.nodeLookup&&!i?a:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(a):RA(a)?a:t.nodeLookup.get(a.id));const c=s?Uy(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return pb(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return vb(n)},tp=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=pb(n,Uy(a)),r=!0)}),r?vb(n):{x:0,y:0,width:0,height:0}},kA=(e,t,[n,r,a]=[0,0,1],i=!1,s=!1)=>{const c={...rp(t,[n,r,a]),width:t.width/a,height:t.height/a},f=[];for(const u of e.values()){const{measured:m,selectable:h=!0,hidden:p=!1}=u;if(s&&!h||p)continue;const y=m.width??u.width??u.initialWidth??null,w=m.height??u.height??u.initialHeight??null,x=am(c,Lf(u)),S=(y??0)*(w??0),E=i&&x>0;(!u.internals.handleBounds||E||x>=S||u.dragging)&&f.push(u)}return f},NCe=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function TCe(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}async function PCe({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const c=TCe(e,s),f=tp(c),u=DA(f,t,n,(s==null?void 0:s.minZoom)??a,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Pq({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:i}){const s=n.get(e),c=s.parentId?n.get(s.parentId):void 0,{x:f,y:u}=c?c.internals.positionAbsolute:{x:0,y:0},m=s.origin??r;let h=s.extent||a;if(s.extent==="parent"&&!s.expandParent)if(!c)i==null||i("005",Ri.error005());else{const y=c.measured.width,w=c.measured.height;y&&w&&(h=[[f,u],[f+y,u+w]])}else c&&zf(s.extent)&&(h=[[s.extent[0][0]+f,s.extent[0][1]+u],[s.extent[1][0]+f,s.extent[1][1]+u]]);const p=zf(h)?Rc(t,h,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Ri.error015())),{position:{x:p.x-f+(s.measured.width??0)*m[0],y:p.y-u+(s.measured.height??0)*m[1]},positionAbsolute:p}}async function MCe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const i=new Set(e.map(p=>p.id)),s=[];for(const p of n){if(p.deletable===!1)continue;const y=i.has(p.id),w=!y&&p.parentId&&s.find(x=>x.id===p.parentId);(y||w)&&s.push(p)}const c=new Set(t.map(p=>p.id)),f=r.filter(p=>p.deletable!==!1),m=NCe(s,f);for(const p of f)c.has(p.id)&&!m.find(w=>w.id===p.id)&&m.push(p);if(!a)return{edges:m,nodes:s};const h=await a({nodes:s,edges:m});return typeof h=="boolean"?h?{edges:m,nodes:s}:{edges:[],nodes:[]}:h}const If=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Rc=(e={x:0,y:0},t,n)=>({x:If(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:If(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Mq(e,t,n){const{width:r,height:a}=Yo(n),{x:i,y:s}=n.internals.positionAbsolute;return Rc(e,[[i,s],[i+r,s+a]],t)}const a3=(e,t,n)=>e<t?If(Math.abs(e-t),1,t)/t:e>n?-If(Math.abs(e-n),1,t)/t:0,Rq=(e,t,n=15,r=40)=>{const a=a3(e.x,r,t.width-r)*n,i=a3(e.y,r,t.height-r)*n;return[a,i]},pb=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),G_=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),vb=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Lf=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=RA(e)?e.internals.positionAbsolute:ep(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Uy=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=RA(e)?e.internals.positionAbsolute:ep(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},kq=(e,t)=>vb(pb(G_(e),G_(t))),am=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},i3=e=>qa(e.width)&&qa(e.height)&&qa(e.x)&&qa(e.y),qa=e=>!isNaN(e)&&isFinite(e),RCe=(e,t)=>{},np=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),rp=({x:e,y:t},[n,r,a],i=!1,s=[1,1])=>{const c={x:(e-n)/a,y:(t-r)/a};return i?np(c,s):c},Hy=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function Fu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function kCe(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Fu(e,n),a=Fu(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=Fu(e.top??e.y??0,n),a=Fu(e.bottom??e.y??0,n),i=Fu(e.left??e.x??0,t),s=Fu(e.right??e.x??0,t);return{top:r,right:s,bottom:a,left:i,x:i+s,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function DCe(e,t,n,r,a,i){const{x:s,y:c}=Hy(e,[t,n,r]),{x:f,y:u}=Hy({x:e.x+e.width,y:e.y+e.height},[t,n,r]),m=a-f,h=i-u;return{left:Math.floor(s),top:Math.floor(c),right:Math.floor(m),bottom:Math.floor(h)}}const DA=(e,t,n,r,a,i)=>{const s=kCe(i,t,n),c=(t-s.x)/e.width,f=(n-s.y)/e.height,u=Math.min(c,f),m=If(u,r,a),h=e.x+e.width/2,p=e.y+e.height/2,y=t/2-h*m,w=n/2-p*m,x=DCe(e,y,w,m,t,n),S={left:Math.min(x.left-s.left,0),top:Math.min(x.top-s.top,0),right:Math.min(x.right-s.right,0),bottom:Math.min(x.bottom-s.bottom,0)};return{x:y-S.left+S.right,y:w-S.top+S.bottom,zoom:m}},im=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function zf(e){return e!=null&&e!=="parent"}function Yo(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Dq(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Iq(e,t={width:0,height:0},n,r,a){const i={...e},s=r.get(n);if(s){const c=s.origin||a;i.x+=s.internals.positionAbsolute.x-(t.width??0)*c[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*c[1]}return i}function o3(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function ICe(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function LCe(e){return{...Oq,...e||{}}}function Th(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:i,y:s}=Ka(e),c=rp({x:i-((a==null?void 0:a.left)??0),y:s-((a==null?void 0:a.top)??0)},r),{x:f,y:u}=n?np(c,t):c;return{xSnapped:f,ySnapped:u,...c}}const IA=e=>({width:e.offsetWidth,height:e.offsetHeight}),Lq=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},zCe=["INPUT","SELECT","TEXTAREA"];function zq(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:zCe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const $q=e=>"clientX"in e,Ka=(e,t)=>{var i,s;const n=$q(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,a=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},s3=(e,t,n,r,a)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const c=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:a,position:s.getAttribute("data-handlepos"),x:(c.left-n.left)/r,y:(c.top-n.top)/r,...IA(s)}})};function Bq({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:c}){const f=e*.125+a*.375+s*.375+n*.125,u=t*.125+i*.375+c*.375+r*.125,m=Math.abs(f-e),h=Math.abs(u-t);return[f,u,m,h]}function eg(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function l3({pos:e,x1:t,y1:n,x2:r,y2:a,c:i}){switch(e){case De.Left:return[t-eg(t-r,i),n];case De.Right:return[t+eg(r-t,i),n];case De.Top:return[t,n-eg(n-a,i)];case De.Bottom:return[t,n+eg(a-n,i)]}}function Uq({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:i=De.Top,curvature:s=.25}){const[c,f]=l3({pos:n,x1:e,y1:t,x2:r,y2:a,c:s}),[u,m]=l3({pos:i,x1:r,y1:a,x2:e,y2:t,c:s}),[h,p,y,w]=Bq({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:c,sourceControlY:f,targetControlX:u,targetControlY:m});return[`M${e},${t} C${c},${f} ${u},${m} ${r},${a}`,h,p,y,w]}function Hq({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,i=n<e?n+a:n-a,s=Math.abs(r-t)/2,c=r<t?r+s:r-s;return[i,c,a,s]}function $Ce({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=a&&n?r+1e3:r,c=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return s+c}function BCe({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const i=pb(Uy(e),Uy(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return am(s,vb(i))>0}const UCe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,HCe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),FCe=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||UCe;let a;return Tq(e)?a={...e}:a={...e,id:r(e)},HCe(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function Fq({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,i,s,c]=Hq({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,i,s,c]}const c3={[De.Left]:{x:-1,y:0},[De.Right]:{x:1,y:0},[De.Top]:{x:0,y:-1},[De.Bottom]:{x:0,y:1}},qCe=({source:e,sourcePosition:t=De.Bottom,target:n})=>t===De.Left||t===De.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},u3=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function KCe({source:e,sourcePosition:t=De.Bottom,target:n,targetPosition:r=De.Top,center:a,offset:i,stepPosition:s}){const c=c3[t],f=c3[r],u={x:e.x+c.x*i,y:e.y+c.y*i},m={x:n.x+f.x*i,y:n.y+f.y*i},h=qCe({source:u,sourcePosition:t,target:m}),p=h.x!==0?"x":"y",y=h[p];let w=[],x,S;const E={x:0,y:0},O={x:0,y:0},[,,C,A]=Hq({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[p]*f[p]===-1){p==="x"?(x=a.x??u.x+(m.x-u.x)*s,S=a.y??(u.y+m.y)/2):(x=a.x??(u.x+m.x)/2,S=a.y??u.y+(m.y-u.y)*s);const T=[{x,y:u.y},{x,y:m.y}],P=[{x:u.x,y:S},{x:m.x,y:S}];c[p]===y?w=p==="x"?T:P:w=p==="x"?P:T}else{const T=[{x:u.x,y:m.y}],P=[{x:m.x,y:u.y}];if(p==="x"?w=c.x===y?P:T:w=c.y===y?T:P,t===r){const I=Math.abs(e[p]-n[p]);if(I<=i){const W=Math.min(i-1,i-I);c[p]===y?E[p]=(u[p]>e[p]?-1:1)*W:O[p]=(m[p]>n[p]?-1:1)*W}}if(t!==r){const I=p==="x"?"y":"x",W=c[p]===f[I],$=u[I]>m[I],V=u[I]<m[I];(c[p]===1&&(!W&&$||W&&V)||c[p]!==1&&(!W&&V||W&&$))&&(w=p==="x"?T:P)}const k={x:u.x+E.x,y:u.y+E.y},D={x:m.x+O.x,y:m.y+O.y},K=Math.max(Math.abs(k.x-w[0].x),Math.abs(D.x-w[0].x)),L=Math.max(Math.abs(k.y-w[0].y),Math.abs(D.y-w[0].y));K>=L?(x=(k.x+D.x)/2,S=w[0].y):(x=w[0].x,S=(k.y+D.y)/2)}return[[e,{x:u.x+E.x,y:u.y+E.y},...w,{x:m.x+O.x,y:m.y+O.y},n],x,S,C,A]}function VCe(e,t,n,r){const a=Math.min(u3(e,t)/2,u3(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,m=e.y<n.y?1:-1;return`L ${i+a*u},${s}Q ${i},${s} ${i},${s+a*m}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${i},${s+a*f}Q ${i},${s} ${i+a*c},${s}`}function X_({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:i=De.Top,borderRadius:s=5,centerX:c,centerY:f,offset:u=20,stepPosition:m=.5}){const[h,p,y,w,x]=KCe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:i,center:{x:c,y:f},offset:u,stepPosition:m});return[h.reduce((E,O,C)=>{let A="";return C>0&&C<h.length-1?A=VCe(h[C-1],O,h[C+1],s):A=`${C===0?"M":"L"}${O.x} ${O.y}`,E+=A,E},""),p,y,w,x]}function f3(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function YCe(e){var h;const{sourceNode:t,targetNode:n}=e;if(!f3(t)||!f3(n))return null;const r=t.internals.handleBounds||d3(t.handles),a=n.internals.handleBounds||d3(n.handles),i=h3((r==null?void 0:r.source)??[],e.sourceHandle),s=h3(e.connectionMode===kf.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!i||!s)return(h=e.onError)==null||h.call(e,"008",Ri.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(i==null?void 0:i.position)||De.Bottom,f=(s==null?void 0:s.position)||De.Top,u=kc(t,i,c),m=kc(n,s,f);return{sourceX:u.x,sourceY:u.y,targetX:m.x,targetY:m.y,sourcePosition:c,targetPosition:f}}function d3(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function kc(e,t,n=De.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:c}=t??Yo(e);if(r)return{x:a+s/2,y:i+c/2};switch((t==null?void 0:t.position)??n){case De.Top:return{x:a+s/2,y:i};case De.Right:return{x:a+s,y:i+c/2};case De.Bottom:return{x:a+s/2,y:i+c};case De.Left:return{x:a,y:i+c/2}}}function h3(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function W_(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function GCe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const i=new Set;return e.reduce((s,c)=>([c.markerStart||r,c.markerEnd||a].forEach(f=>{if(f&&typeof f=="object"){const u=W_(f,t);i.has(u)||(s.push({id:u,color:f.color||n,...f}),i.add(u))}}),s),[]).sort((s,c)=>s.id.localeCompare(c.id))}const qq=1e3,XCe=10,LA={nodeOrigin:[0,0],nodeExtent:nm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},WCe={...LA,checkEquality:!0};function zA(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function QCe(e,t,n){const r=zA(LA,n);for(const a of e.values())if(a.parentId)BA(a,e,t,r);else{const i=ep(a,r.nodeOrigin),s=zf(a.extent)?a.extent:r.nodeExtent,c=Rc(i,s,Yo(a));a.internals.positionAbsolute=c}}function ZCe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const i={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(i):a.type==="target"&&r.push(i)}return{source:n,target:r}}function $A(e){return e==="manual"}function Q_(e,t,n,r={}){var u,m;const a=zA(WCe,r),i={i:0},s=new Map(t),c=a!=null&&a.elevateNodesOnSelect&&!$A(a.zIndexMode)?qq:0;let f=e.length>0;t.clear(),n.clear();for(const h of e){let p=s.get(h.id);if(a.checkEquality&&h===(p==null?void 0:p.internals.userNode))t.set(h.id,p);else{const y=ep(h,a.nodeOrigin),w=zf(h.extent)?h.extent:a.nodeExtent,x=Rc(y,w,Yo(h));p={...a.defaults,...h,measured:{width:(u=h.measured)==null?void 0:u.width,height:(m=h.measured)==null?void 0:m.height},internals:{positionAbsolute:x,handleBounds:ZCe(h,p),z:Kq(h,c,a.zIndexMode),userNode:h}},t.set(h.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(f=!1),h.parentId&&BA(p,t,n,r,i)}return f}function JCe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function BA(e,t,n,r,a){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:c,zIndexMode:f}=zA(LA,r),u=e.parentId,m=t.get(u);if(!m){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}JCe(e,n),a&&!m.parentId&&m.internals.rootParentIndex===void 0&&f==="auto"&&(m.internals.rootParentIndex=++a.i,m.internals.z=m.internals.z+a.i*XCe),a&&m.internals.rootParentIndex!==void 0&&(a.i=m.internals.rootParentIndex);const h=i&&!$A(f)?qq:0,{x:p,y,z:w}=eOe(e,m,s,c,h,f),{positionAbsolute:x}=e.internals,S=p!==x.x||y!==x.y;(S||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:p,y}:x,z:w}})}function Kq(e,t,n){const r=qa(e.zIndex)?e.zIndex:0;return $A(n)?r:r+(e.selected?t:0)}function eOe(e,t,n,r,a,i){const{x:s,y:c}=t.internals.positionAbsolute,f=Yo(e),u=ep(e,n),m=zf(e.extent)?Rc(u,e.extent,f):u;let h=Rc({x:s+m.x,y:c+m.y},r,f);e.extent==="parent"&&(h=Mq(h,f,t));const p=Kq(e,a,i),y=t.internals.z??0;return{x:h.x,y:h.y,z:y>=p?y+1:p}}function UA(e,t,n,r=[0,0]){var s;const a=[],i=new Map;for(const c of e){const f=t.get(c.parentId);if(!f)continue;const u=((s=i.get(c.parentId))==null?void 0:s.expandedRect)??Lf(f),m=kq(u,c.rect);i.set(c.parentId,{expandedRect:m,parent:f})}return i.size>0&&i.forEach(({expandedRect:c,parent:f},u)=>{var C;const m=f.internals.positionAbsolute,h=Yo(f),p=f.origin??r,y=c.x<m.x?Math.round(Math.abs(m.x-c.x)):0,w=c.y<m.y?Math.round(Math.abs(m.y-c.y)):0,x=Math.max(h.width,Math.round(c.width)),S=Math.max(h.height,Math.round(c.height)),E=(x-h.width)*p[0],O=(S-h.height)*p[1];(y>0||w>0||E||O)&&(a.push({id:u,type:"position",position:{x:f.position.x-y+E,y:f.position.y-w+O}}),(C=n.get(u))==null||C.forEach(A=>{e.some(N=>N.id===A.id)||a.push({id:A.id,type:"position",position:{x:A.position.x+y,y:A.position.y+w}})})),(h.width<c.width||h.height<c.height||y||w)&&a.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(y?p[0]*y-E:0),height:S+(w?p[1]*w-O:0)}})}),a}function tOe(e,t,n,r,a,i,s){const c=r==null?void 0:r.querySelector(".xyflow__viewport");let f=!1;if(!c)return{changes:[],updatedInternals:f};const u=[],m=window.getComputedStyle(c),{m22:h}=new window.DOMMatrixReadOnly(m.transform),p=[];for(const y of e.values()){const w=t.get(y.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),f=!0;continue}const x=IA(y.nodeElement),S=w.measured.width!==x.width||w.measured.height!==x.height;if(!!(x.width&&x.height&&(S||!w.internals.handleBounds||y.force))){const O=y.nodeElement.getBoundingClientRect(),C=zf(w.extent)?w.extent:i;let{positionAbsolute:A}=w.internals;w.parentId&&w.extent==="parent"?A=Mq(A,x,t.get(w.parentId)):C&&(A=Rc(A,C,x));const N={...w,measured:x,internals:{...w.internals,positionAbsolute:A,handleBounds:{source:s3("source",y.nodeElement,O,h,w.id),target:s3("target",y.nodeElement,O,h,w.id)}}};t.set(w.id,N),w.parentId&&BA(N,t,n,{nodeOrigin:a,zIndexMode:s}),f=!0,S&&(u.push({id:w.id,type:"dimensions",dimensions:x}),w.expandParent&&w.parentId&&p.push({id:w.id,parentId:w.parentId,rect:Lf(N,a)}))}}if(p.length>0){const y=UA(p,t,n,a);u.push(...y)}return{changes:u,updatedInternals:f}}async function nOe({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,i]],r),c=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(c)}function m3(e,t,n,r,a,i){let s=a;const c=r.get(s)||new Map;r.set(s,c.set(n,t)),s=`${a}-${e}`;const f=r.get(s)||new Map;if(r.set(s,f.set(n,t)),i){s=`${a}-${e}-${i}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function Vq(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:i,sourceHandle:s=null,targetHandle:c=null}=r,f={edgeId:r.id,source:a,target:i,sourceHandle:s,targetHandle:c},u=`${a}-${s}--${i}-${c}`,m=`${i}-${c}--${a}-${s}`;m3("source",f,m,e,a,s),m3("target",f,u,e,i,c),t.set(r.id,r)}}function Yq(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Yq(n,t):!1}function p3(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function rOe(e,t,n,r){const a=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Yq(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const c=e.get(i);c&&a.set(i,{id:i,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return a}function HS({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,c,f;const a=[];for(const[u,m]of t){const h=(s=n.get(u))==null?void 0:s.internals.userNode;h&&a.push({...h,position:m.position,dragging:r})}if(!e)return[a[0],a];const i=(c=n.get(e))==null?void 0:c.internals.userNode;return[i?{...i,position:((f=t.get(e))==null?void 0:f.position)||i.position,dragging:r}:a[0],a]}function aOe({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const i={x:n-a.distance.x,y:r-a.distance.y},s=np(i,t);return{x:s.x-i.x,y:s.y-i.y}}function iOe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let i={x:null,y:null},s=0,c=new Map,f=!1,u={x:0,y:0},m=null,h=!1,p=null,y=!1,w=!1,x=null;function S({noDragClassName:O,handleSelector:C,domNode:A,isSelectable:N,nodeId:T,nodeClickDistance:P=0}){p=Qr(A);function k({x:I,y:W}){const{nodeLookup:$,nodeExtent:V,snapGrid:R,snapToGrid:H,nodeOrigin:q,onNodeDrag:F,onSelectionDrag:Y,onError:B,updateNodePositions:z}=t();i={x:I,y:W};let X=!1;const Z=c.size>1,ee=Z&&V?G_(tp(c)):null,se=Z&&H?aOe({dragItems:c,snapGrid:R,x:I,y:W}):null;for(const[ae,re]of c){if(!$.has(ae))continue;let J={x:I-re.distance.x,y:W-re.distance.y};H&&(J=se?{x:Math.round(J.x+se.x),y:Math.round(J.y+se.y)}:np(J,R));let le=null;if(Z&&V&&!re.extent&&ee){const{positionAbsolute:ge}=re.internals,ye=ge.x-ee.x+V[0][0],Ie=ge.x+re.measured.width-ee.x2+V[1][0],Me=ge.y-ee.y+V[0][1],Ke=ge.y+re.measured.height-ee.y2+V[1][1];le=[[ye,Me],[Ie,Ke]]}const{position:me,positionAbsolute:ne}=Pq({nodeId:ae,nextPosition:J,nodeLookup:$,nodeExtent:le||V,nodeOrigin:q,onError:B});X=X||re.position.x!==me.x||re.position.y!==me.y,re.position=me,re.internals.positionAbsolute=ne}if(w=w||X,!!X&&(z(c,!0),x&&(r||F||!T&&Y))){const[ae,re]=HS({nodeId:T,dragItems:c,nodeLookup:$});r==null||r(x,c,ae,re),F==null||F(x,ae,re),T||Y==null||Y(x,re)}}async function D(){if(!m)return;const{transform:I,panBy:W,autoPanSpeed:$,autoPanOnNodeDrag:V}=t();if(!V){f=!1,cancelAnimationFrame(s);return}const[R,H]=Rq(u,m,$);(R!==0||H!==0)&&(i.x=(i.x??0)-R/I[2],i.y=(i.y??0)-H/I[2],await W({x:R,y:H})&&k(i)),s=requestAnimationFrame(D)}function K(I){var Z;const{nodeLookup:W,multiSelectionActive:$,nodesDraggable:V,transform:R,snapGrid:H,snapToGrid:q,selectNodesOnDrag:F,onNodeDragStart:Y,onSelectionDragStart:B,unselectNodesAndEdges:z}=t();h=!0,(!F||!N)&&!$&&T&&((Z=W.get(T))!=null&&Z.selected||z()),N&&F&&T&&(e==null||e(T));const X=Th(I.sourceEvent,{transform:R,snapGrid:H,snapToGrid:q,containerBounds:m});if(i=X,c=rOe(W,V,X,T),c.size>0&&(n||Y||!T&&B)){const[ee,se]=HS({nodeId:T,dragItems:c,nodeLookup:W});n==null||n(I.sourceEvent,c,ee,se),Y==null||Y(I.sourceEvent,ee,se),T||B==null||B(I.sourceEvent,se)}}const L=vq().clickDistance(P).on("start",I=>{const{domNode:W,nodeDragThreshold:$,transform:V,snapGrid:R,snapToGrid:H}=t();m=(W==null?void 0:W.getBoundingClientRect())||null,y=!1,w=!1,x=I.sourceEvent,$===0&&K(I),i=Th(I.sourceEvent,{transform:V,snapGrid:R,snapToGrid:H,containerBounds:m}),u=Ka(I.sourceEvent,m)}).on("drag",I=>{const{autoPanOnNodeDrag:W,transform:$,snapGrid:V,snapToGrid:R,nodeDragThreshold:H,nodeLookup:q}=t(),F=Th(I.sourceEvent,{transform:$,snapGrid:V,snapToGrid:R,containerBounds:m});if(x=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||T&&!q.has(T))&&(y=!0),!y){if(!f&&W&&h&&(f=!0,D()),!h){const Y=Ka(I.sourceEvent,m),B=Y.x-u.x,z=Y.y-u.y;Math.sqrt(B*B+z*z)>H&&K(I)}(i.x!==F.xSnapped||i.y!==F.ySnapped)&&c&&h&&(u=Ka(I.sourceEvent,m),k(F))}}).on("end",I=>{if(!(!h||y)&&(f=!1,h=!1,cancelAnimationFrame(s),c.size>0)){const{nodeLookup:W,updateNodePositions:$,onNodeDragStop:V,onSelectionDragStop:R}=t();if(w&&($(c,!1),w=!1),a||V||!T&&R){const[H,q]=HS({nodeId:T,dragItems:c,nodeLookup:W,dragging:!1});a==null||a(I.sourceEvent,c,H,q),V==null||V(I.sourceEvent,H,q),T||R==null||R(I.sourceEvent,q)}}}).filter(I=>{const W=I.target;return!I.button&&(!O||!p3(W,`.${O}`,A))&&(!C||p3(W,C,A))});p.call(L)}function E(){p==null||p.on(".drag",null)}return{update:S,destroy:E}}function oOe(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())am(a,Lf(i))>0&&r.push(i);return r}const sOe=250;function lOe(e,t,n,r){var c,f;let a=[],i=1/0;const s=oOe(e,n,t+sOe);for(const u of s){const m=[...((c=u.internals.handleBounds)==null?void 0:c.source)??[],...((f=u.internals.handleBounds)==null?void 0:f.target)??[]];for(const h of m){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:p,y}=kc(u,h,h.position,!0),w=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));w>t||(w<i?(a=[{...h,x:p,y}],i=w):w===i&&a.push({...h,x:p,y}))}}if(!a.length)return null;if(a.length>1){const u=r.type==="source"?"target":"source";return a.find(m=>m.type===u)??a[0]}return a[0]}function Gq(e,t,n,r,a,i=!1){var u,m,h;const s=r.get(e);if(!s)return null;const c=a==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((m=s.internals.handleBounds)==null?void 0:m.source)??[],...((h=s.internals.handleBounds)==null?void 0:h.target)??[]],f=(n?c==null?void 0:c.find(p=>p.id===n):c==null?void 0:c[0])??null;return f&&i?{...f,...kc(s,f,f.position,!0)}:f}function Xq(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function cOe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Wq=()=>!0;function uOe(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:i,isTarget:s,domNode:c,nodeLookup:f,lib:u,autoPanOnConnect:m,flowId:h,panBy:p,cancelConnection:y,onConnectStart:w,onConnect:x,onConnectEnd:S,isValidConnection:E=Wq,onReconnectEnd:O,updateConnection:C,getTransform:A,getFromHandle:N,autoPanSpeed:T,dragThreshold:P=1,handleDomNode:k}){const D=Lq(e.target);let K=0,L;const{x:I,y:W}=Ka(e),$=Xq(i,k),V=c==null?void 0:c.getBoundingClientRect();let R=!1;if(!V||!$)return;const H=Gq(a,$,r,f,t);if(!H)return;let q=Ka(e,V),F=!1,Y=null,B=!1,z=null;function X(){if(!m||!V)return;const[me,ne]=Rq(q,V,T);p({x:me,y:ne}),K=requestAnimationFrame(X)}const Z={...H,nodeId:a,type:$,position:H.position},ee=f.get(a);let ae={inProgress:!0,isValid:null,from:kc(ee,Z,De.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:ee,to:q,toHandle:null,toPosition:r3[Z.position],toNode:null,pointer:q};function re(){R=!0,C(ae),w==null||w(e,{nodeId:a,handleId:r,handleType:$})}P===0&&re();function J(me){if(!R){const{x:Ke,y:Gt}=Ka(me),ht=Ke-I,Qn=Gt-W;if(!(ht*ht+Qn*Qn>P*P))return;re()}if(!N()||!Z){le(me);return}const ne=A();q=Ka(me,V),L=lOe(rp(q,ne,!1,[1,1]),n,f,Z),F||(X(),F=!0);const ge=Qq(me,{handle:L,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:s?"target":"source",isValidConnection:E,doc:D,lib:u,flowId:h,nodeLookup:f});z=ge.handleDomNode,Y=ge.connection,B=cOe(!!L,ge.isValid);const ye=f.get(a),Ie=ye?kc(ye,Z,De.Left,!0):ae.from,Me={...ae,from:Ie,isValid:B,to:ge.toHandle&&B?Hy({x:ge.toHandle.x,y:ge.toHandle.y},ne):q,toHandle:ge.toHandle,toPosition:B&&ge.toHandle?ge.toHandle.position:r3[Z.position],toNode:ge.toHandle?f.get(ge.toHandle.nodeId):null,pointer:q};C(Me),ae=Me}function le(me){if(!("touches"in me&&me.touches.length>0)){if(R){(L||z)&&Y&&B&&(x==null||x(Y));const{inProgress:ne,...ge}=ae,ye={...ge,toPosition:ae.toHandle?ae.toPosition:null};S==null||S(me,ye),i&&(O==null||O(me,ye))}y(),cancelAnimationFrame(K),F=!1,B=!1,Y=null,z=null,D.removeEventListener("mousemove",J),D.removeEventListener("mouseup",le),D.removeEventListener("touchmove",J),D.removeEventListener("touchend",le)}}D.addEventListener("mousemove",J),D.addEventListener("mouseup",le),D.addEventListener("touchmove",J),D.addEventListener("touchend",le)}function Qq(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:i,doc:s,lib:c,flowId:f,isValidConnection:u=Wq,nodeLookup:m}){const h=i==="target",p=t?s.querySelector(`.${c}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:y,y:w}=Ka(e),x=s.elementFromPoint(y,w),S=x!=null&&x.classList.contains(`${c}-flow__handle`)?x:p,E={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const O=Xq(void 0,S),C=S.getAttribute("data-nodeid"),A=S.getAttribute("data-handleid"),N=S.classList.contains("connectable"),T=S.classList.contains("connectableend");if(!C||!O)return E;const P={source:h?C:r,sourceHandle:h?A:a,target:h?r:C,targetHandle:h?a:A};E.connection=P;const D=N&&T&&(n===kf.Strict?h&&O==="source"||!h&&O==="target":C!==r||A!==a);E.isValid=D&&u(P),E.toHandle=Gq(C,O,A,m,n,!0)}return E}const Z_={onPointerDown:uOe,isValid:Qq};function fOe({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Qr(e);function i({translateExtent:c,width:f,height:u,zoomStep:m=1,pannable:h=!0,zoomable:p=!0,inversePan:y=!1}){const w=C=>{if(C.sourceEvent.type!=="wheel"||!t)return;const A=n(),N=C.sourceEvent.ctrlKey&&im()?10:1,T=-C.sourceEvent.deltaY*(C.sourceEvent.deltaMode===1?.05:C.sourceEvent.deltaMode?1:.002)*m,P=A[2]*Math.pow(2,T*N);t.scaleTo(P)};let x=[0,0];const S=C=>{(C.sourceEvent.type==="mousedown"||C.sourceEvent.type==="touchstart")&&(x=[C.sourceEvent.clientX??C.sourceEvent.touches[0].clientX,C.sourceEvent.clientY??C.sourceEvent.touches[0].clientY])},E=C=>{const A=n();if(C.sourceEvent.type!=="mousemove"&&C.sourceEvent.type!=="touchmove"||!t)return;const N=[C.sourceEvent.clientX??C.sourceEvent.touches[0].clientX,C.sourceEvent.clientY??C.sourceEvent.touches[0].clientY],T=[N[0]-x[0],N[1]-x[1]];x=N;const P=r()*Math.max(A[2],Math.log(A[2]))*(y?-1:1),k={x:A[0]-T[0]*P,y:A[1]-T[1]*P},D=[[0,0],[f,u]];t.setViewportConstrained({x:k.x,y:k.y,zoom:A[2]},D,c)},O=jq().on("start",S).on("zoom",h?E:null).on("zoom.wheel",p?w:null);a.call(O,{})}function s(){a.on("zoom",null)}return{update:i,destroy:s,pointer:$a}}const gb=e=>({x:e.x,y:e.y,zoom:e.k}),FS=({x:e,y:t,zoom:n})=>mb.translate(e,t).scale(n),Zu=(e,t)=>e.target.closest(`.${t}`),Zq=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),dOe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,qS=(e,t=0,n=dOe,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},Jq=e=>{const t=e.ctrlKey&&im()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function hOe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:u}){return m=>{if(Zu(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(m.ctrlKey&&s){const S=$a(m),E=Jq(m),O=h*Math.pow(2,E);r.scaleTo(n,O,S,m);return}const p=m.deltaMode===1?20:1;let y=a===hc.Vertical?0:m.deltaX*p,w=a===hc.Horizontal?0:m.deltaY*p;!im()&&m.shiftKey&&a!==hc.Vertical&&(y=m.deltaY*p,w=0),r.translateBy(n,-(y/h)*i,-(w/h)*i,{internal:!0});const x=gb(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(m,x),e.panScrollTimeout=setTimeout(()=>{u==null||u(m,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,c==null||c(m,x))}}function mOe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,c=Zu(r,e);if(r.ctrlKey&&i&&c&&r.preventDefault(),s||c)return null;r.preventDefault(),n.call(this,r,a)}}function pOe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,c;if((i=r.sourceEvent)!=null&&i.internal)return;const a=gb(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((c=r.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function vOe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return i=>{var s,c;e.usedRightMouseButton=!!(n&&Zq(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),a&&!((c=i.sourceEvent)!=null&&c.internal)&&(a==null||a(i.sourceEvent,gb(i.transform)))}}function gOe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:i}){return s=>{var c;if(!((c=s.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,i&&Zq(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const f=gb(s.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(s.sourceEvent,f)},n?150:0)}}}function yOe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:c,noPanClassName:f,lib:u,connectionInProgress:m}){return h=>{var S;const p=e||t,y=n&&h.ctrlKey,w=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Zu(h,`${u}-flow__node`)||Zu(h,`${u}-flow__edge`)))return!0;if(!r&&!p&&!a&&!i&&!n||s||m&&!w||Zu(h,c)&&w||Zu(h,f)&&(!w||a&&w&&!e)||!n&&h.ctrlKey&&w)return!1;if(!n&&h.type==="touchstart"&&((S=h.touches)==null?void 0:S.length)>1)return h.preventDefault(),!1;if(!p&&!a&&!y&&w||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||w)&&x}}function bOe({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:a,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:c,onDraggingChange:f}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=e.getBoundingClientRect(),h=jq().scaleExtent([t,n]).translateExtent(r),p=Qr(e).call(h);O({x:a.x,y:a.y,zoom:If(a.zoom,t,n)},[[0,0],[m.width,m.height]],r);const y=p.on("wheel.zoom"),w=p.on("dblclick.zoom");h.wheelDelta(Jq);function x(L,I){return p?new Promise(W=>{h==null||h.interpolate((I==null?void 0:I.interpolate)==="linear"?wo:vg).transform(qS(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>W(!0)),L)}):Promise.resolve(!1)}function S({noWheelClassName:L,noPanClassName:I,onPaneContextMenu:W,userSelectionActive:$,panOnScroll:V,panOnDrag:R,panOnScrollMode:H,panOnScrollSpeed:q,preventScrolling:F,zoomOnPinch:Y,zoomOnScroll:B,zoomOnDoubleClick:z,zoomActivationKeyPressed:X,lib:Z,onTransformChange:ee,connectionInProgress:se,paneClickDistance:ae,selectionOnDrag:re}){$&&!u.isZoomingOrPanning&&E();const J=V&&!X&&!$;h.clickDistance(re?1/0:!qa(ae)||ae<0?0:ae);const le=J?hOe({zoomPanValues:u,noWheelClassName:L,d3Selection:p,d3Zoom:h,panOnScrollMode:H,panOnScrollSpeed:q,zoomOnPinch:Y,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:c}):mOe({noWheelClassName:L,preventScrolling:F,d3ZoomHandler:y});if(p.on("wheel.zoom",le,{passive:!1}),!$){const ne=pOe({zoomPanValues:u,onDraggingChange:f,onPanZoomStart:s});h.on("start",ne);const ge=vOe({zoomPanValues:u,panOnDrag:R,onPaneContextMenu:!!W,onPanZoom:i,onTransformChange:ee});h.on("zoom",ge);const ye=gOe({zoomPanValues:u,panOnDrag:R,panOnScroll:V,onPaneContextMenu:W,onPanZoomEnd:c,onDraggingChange:f});h.on("end",ye)}const me=yOe({zoomActivationKeyPressed:X,panOnDrag:R,zoomOnScroll:B,panOnScroll:V,zoomOnDoubleClick:z,zoomOnPinch:Y,userSelectionActive:$,noPanClassName:I,noWheelClassName:L,lib:Z,connectionInProgress:se});h.filter(me),z?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function E(){h.on("zoom",null)}async function O(L,I,W){const $=FS(L),V=h==null?void 0:h.constrain()($,I,W);return V&&await x(V),new Promise(R=>R(V))}async function C(L,I){const W=FS(L);return await x(W,I),new Promise($=>$(W))}function A(L){if(p){const I=FS(L),W=p.property("__zoom");(W.k!==L.zoom||W.x!==L.x||W.y!==L.y)&&(h==null||h.transform(p,I,null,{sync:!0}))}}function N(){const L=p?_q(p.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function T(L,I){return p?new Promise(W=>{h==null||h.interpolate((I==null?void 0:I.interpolate)==="linear"?wo:vg).scaleTo(qS(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>W(!0)),L)}):Promise.resolve(!1)}function P(L,I){return p?new Promise(W=>{h==null||h.interpolate((I==null?void 0:I.interpolate)==="linear"?wo:vg).scaleBy(qS(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>W(!0)),L)}):Promise.resolve(!1)}function k(L){h==null||h.scaleExtent(L)}function D(L){h==null||h.translateExtent(L)}function K(L){const I=!qa(L)||L<0?0:L;h==null||h.clickDistance(I)}return{update:S,destroy:E,setViewport:C,setViewportConstrained:O,getViewport:N,scaleTo:T,scaleBy:P,setScaleExtent:k,setTranslateExtent:D,syncViewport:A,setClickDistance:K}}var $f;(function(e){e.Line="line",e.Handle="handle"})($f||($f={}));function xOe({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:i}){const s=e-t,c=n-r,f=[s>0?1:s<0?-1:0,c>0?1:c<0?-1:0];return s&&a&&(f[0]=f[0]*-1),c&&i&&(f[1]=f[1]*-1),f}function v3(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function Ns(e,t){return Math.max(0,t-e)}function Ts(e,t){return Math.max(0,e-t)}function tg(e,t,n){return Math.max(0,t-e,e-n)}function g3(e,t){return e?!t:t}function wOe(e,t,n,r,a,i,s,c){let{affectsX:f,affectsY:u}=t;const{isHorizontal:m,isVertical:h}=t,p=m&&h,{xSnapped:y,ySnapped:w}=n,{minWidth:x,maxWidth:S,minHeight:E,maxHeight:O}=r,{x:C,y:A,width:N,height:T,aspectRatio:P}=e;let k=Math.floor(m?y-e.pointerX:0),D=Math.floor(h?w-e.pointerY:0);const K=N+(f?-k:k),L=T+(u?-D:D),I=-i[0]*N,W=-i[1]*T;let $=tg(K,x,S),V=tg(L,E,O);if(s){let q=0,F=0;f&&k<0?q=Ns(C+k+I,s[0][0]):!f&&k>0&&(q=Ts(C+K+I,s[1][0])),u&&D<0?F=Ns(A+D+W,s[0][1]):!u&&D>0&&(F=Ts(A+L+W,s[1][1])),$=Math.max($,q),V=Math.max(V,F)}if(c){let q=0,F=0;f&&k>0?q=Ts(C+k,c[0][0]):!f&&k<0&&(q=Ns(C+K,c[1][0])),u&&D>0?F=Ts(A+D,c[0][1]):!u&&D<0&&(F=Ns(A+L,c[1][1])),$=Math.max($,q),V=Math.max(V,F)}if(a){if(m){const q=tg(K/P,E,O)*P;if($=Math.max($,q),s){let F=0;!f&&!u||f&&!u&&p?F=Ts(A+W+K/P,s[1][1])*P:F=Ns(A+W+(f?k:-k)/P,s[0][1])*P,$=Math.max($,F)}if(c){let F=0;!f&&!u||f&&!u&&p?F=Ns(A+K/P,c[1][1])*P:F=Ts(A+(f?k:-k)/P,c[0][1])*P,$=Math.max($,F)}}if(h){const q=tg(L*P,x,S)/P;if(V=Math.max(V,q),s){let F=0;!f&&!u||u&&!f&&p?F=Ts(C+L*P+I,s[1][0])/P:F=Ns(C+(u?D:-D)*P+I,s[0][0])/P,V=Math.max(V,F)}if(c){let F=0;!f&&!u||u&&!f&&p?F=Ns(C+L*P,c[1][0])/P:F=Ts(C+(u?D:-D)*P,c[0][0])/P,V=Math.max(V,F)}}}D=D+(D<0?V:-V),k=k+(k<0?$:-$),a&&(p?K>L*P?D=(g3(f,u)?-k:k)/P:k=(g3(f,u)?-D:D)*P:m?(D=k/P,u=f):(k=D*P,f=u));const R=f?C+k:C,H=u?A+D:A;return{width:N+(f?-k:k),height:T+(u?-D:D),x:i[0]*k*(f?-1:1)+R,y:i[1]*D*(u?-1:1)+H}}const e9={width:0,height:0,x:0,y:0},SOe={...e9,pointerX:0,pointerY:0,aspectRatio:1};function EOe(e){return[[0,0],[e.measured.width,e.measured.height]]}function _Oe(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,c=n[0]*i,f=n[1]*s;return[[r-c,a-f],[r+i-c,a+s-f]]}function jOe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const i=Qr(e);let s={controlDirection:v3("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:u,boundaries:m,keepAspectRatio:h,resizeDirection:p,onResizeStart:y,onResize:w,onResizeEnd:x,shouldResize:S}){let E={...e9},O={...SOe};s={boundaries:m,resizeDirection:p,keepAspectRatio:h,controlDirection:v3(u)};let C,A=null,N=[],T,P,k,D=!1;const K=vq().on("start",L=>{const{nodeLookup:I,transform:W,snapGrid:$,snapToGrid:V,nodeOrigin:R,paneDomNode:H}=n();if(C=I.get(t),!C)return;A=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:q,ySnapped:F}=Th(L.sourceEvent,{transform:W,snapGrid:$,snapToGrid:V,containerBounds:A});E={width:C.measured.width??0,height:C.measured.height??0,x:C.position.x??0,y:C.position.y??0},O={...E,pointerX:q,pointerY:F,aspectRatio:E.width/E.height},T=void 0,C.parentId&&(C.extent==="parent"||C.expandParent)&&(T=I.get(C.parentId),P=T&&C.extent==="parent"?EOe(T):void 0),N=[],k=void 0;for(const[Y,B]of I)if(B.parentId===t&&(N.push({id:Y,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const z=_Oe(B,C,B.origin??R);k?k=[[Math.min(z[0][0],k[0][0]),Math.min(z[0][1],k[0][1])],[Math.max(z[1][0],k[1][0]),Math.max(z[1][1],k[1][1])]]:k=z}y==null||y(L,{...E})}).on("drag",L=>{const{transform:I,snapGrid:W,snapToGrid:$,nodeOrigin:V}=n(),R=Th(L.sourceEvent,{transform:I,snapGrid:W,snapToGrid:$,containerBounds:A}),H=[];if(!C)return;const{x:q,y:F,width:Y,height:B}=E,z={},X=C.origin??V,{width:Z,height:ee,x:se,y:ae}=wOe(O,s.controlDirection,R,s.boundaries,s.keepAspectRatio,X,P,k),re=Z!==Y,J=ee!==B,le=se!==q&&re,me=ae!==F&&J;if(!le&&!me&&!re&&!J)return;if((le||me||X[0]===1||X[1]===1)&&(z.x=le?se:E.x,z.y=me?ae:E.y,E.x=z.x,E.y=z.y,N.length>0)){const Ie=se-q,Me=ae-F;for(const Ke of N)Ke.position={x:Ke.position.x-Ie+X[0]*(Z-Y),y:Ke.position.y-Me+X[1]*(ee-B)},H.push(Ke)}if((re||J)&&(z.width=re&&(!s.resizeDirection||s.resizeDirection==="horizontal")?Z:E.width,z.height=J&&(!s.resizeDirection||s.resizeDirection==="vertical")?ee:E.height,E.width=z.width,E.height=z.height),T&&C.expandParent){const Ie=X[0]*(z.width??0);z.x&&z.x<Ie&&(E.x=Ie,O.x=O.x-(z.x-Ie));const Me=X[1]*(z.height??0);z.y&&z.y<Me&&(E.y=Me,O.y=O.y-(z.y-Me))}const ne=xOe({width:E.width,prevWidth:Y,height:E.height,prevHeight:B,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ge={...E,direction:ne};(S==null?void 0:S(L,ge))!==!1&&(D=!0,w==null||w(L,ge),r(z,H))}).on("end",L=>{D&&(x==null||x(L,{...E}),a==null||a({...E}),D=!1)});i.call(K)}function f(){i.on(".drag",null)}return{update:c,destroy:f}}const COe={},y3=e=>{let t;const n=new Set,r=(m,h)=>{const p=typeof m=="function"?m(t):m;if(!Object.is(p,t)){const y=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(w=>w(t,y))}},a=()=>t,f={setState:r,getState:a,getInitialState:()=>u,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(COe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,a,f);return f},OOe=e=>e?y3(e):y3,{useDebugValue:AOe}=be,{useSyncExternalStoreWithSelector:NOe}=Yoe,TOe=e=>e;function t9(e,t=TOe,n){const r=NOe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return AOe(r),r}const b3=(e,t)=>{const n=OOe(e),r=(a,i=t)=>t9(n,a,i);return Object.assign(r,n),r},POe=(e,t)=>e?b3(e,t):b3;function Ft(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const yb=b.createContext(null),MOe=yb.Provider,n9=Ri.error001();function ot(e,t){const n=b.useContext(yb);if(n===null)throw new Error(n9);return t9(n,e,t)}function Kt(){const e=b.useContext(yb);if(e===null)throw new Error(n9);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const x3={display:"none"},ROe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},r9="react-flow__node-desc",a9="react-flow__edge-desc",kOe="react-flow__aria-live",DOe=e=>e.ariaLiveMessage,IOe=e=>e.ariaLabelConfig;function LOe({rfId:e}){const t=ot(DOe);return v.jsx("div",{id:`${kOe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:ROe,children:t})}function zOe({rfId:e,disableKeyboardA11y:t}){const n=ot(IOe);return v.jsxs(v.Fragment,{children:[v.jsx("div",{id:`${r9}-${e}`,style:x3,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),v.jsx("div",{id:`${a9}-${e}`,style:x3,children:n["edge.a11yDescription.default"]}),!t&&v.jsx(LOe,{rfId:e})]})}const bb=b.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},i)=>{const s=`${e}`.split("-");return v.jsx("div",{className:bn(["react-flow__panel",n,...s]),style:r,ref:i,...a,children:t})});bb.displayName="Panel";function $Oe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:v.jsx(bb,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:v.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const BOe=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},ng=e=>e.id;function UOe(e,t){return Ft(e.selectedNodes.map(ng),t.selectedNodes.map(ng))&&Ft(e.selectedEdges.map(ng),t.selectedEdges.map(ng))}function HOe({onSelectionChange:e}){const t=Kt(),{selectedNodes:n,selectedEdges:r}=ot(BOe,UOe);return b.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,r,e]),null}const FOe=e=>!!e.onSelectionChangeHandlers;function qOe({onSelectionChange:e}){const t=ot(FOe);return e||t?v.jsx(HOe,{onSelectionChange:e}):null}const i9=[0,0],KOe={x:0,y:0,zoom:1},VOe=["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"],w3=[...VOe,"rfId"],YOe=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),S3={translateExtent:nm,nodeOrigin:i9,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function GOe(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:s,reset:c,setDefaultNodesAndEdges:f}=ot(YOe,Ft),u=Kt();b.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{m.current=S3,c()}),[]);const m=b.useRef(S3);return b.useEffect(()=>{for(const h of w3){const p=e[h],y=m.current[h];p!==y&&(typeof e[h]>"u"||(h==="nodes"?t(p):h==="edges"?n(p):h==="minZoom"?r(p):h==="maxZoom"?a(p):h==="translateExtent"?i(p):h==="nodeExtent"?s(p):h==="ariaLabelConfig"?u.setState({ariaLabelConfig:LCe(p)}):h==="fitView"?u.setState({fitViewQueued:p}):h==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[h]:p})))}m.current=e},w3.map(h=>e[h])),null}function E3(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function XOe(e){var r;const[t,n]=b.useState(e==="system"?null:e);return b.useEffect(()=>{if(e!=="system"){n(e);return}const a=E3(),i=()=>n(a!=null&&a.matches?"dark":"light");return i(),a==null||a.addEventListener("change",i),()=>{a==null||a.removeEventListener("change",i)}},[e]),t!==null?t:(r=E3())!=null&&r.matches?"dark":"light"}const _3=typeof document<"u"?document:null;function om(e=null,t={target:_3,actInsideInputWithModifier:!0}){const[n,r]=b.useState(!1),a=b.useRef(!1),i=b.useRef(new Set([])),[s,c]=b.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
`).replace(`

`,`
+`).split(`
`)),m=u.reduce((h,p)=>h.concat(...p),[]);return[u,m]}return[[],[]]},[e]);return b.useEffect(()=>{const f=(t==null?void 0:t.target)??_3,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=y=>{var S,E;if(a.current=y.ctrlKey||y.metaKey||y.shiftKey||y.altKey,(!a.current||a.current&&!u)&&zq(y))return!1;const x=C3(y.code,c);if(i.current.add(y[x]),j3(s,i.current,!1)){const O=((E=(S=y.composedPath)==null?void 0:S.call(y))==null?void 0:E[0])||y.target,C=(O==null?void 0:O.nodeName)==="BUTTON"||(O==null?void 0:O.nodeName)==="A";t.preventDefault!==!1&&(a.current||!C)&&y.preventDefault(),r(!0)}},h=y=>{const w=C3(y.code,c);j3(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(y[w]),y.key==="Meta"&&i.current.clear(),a.current=!1},p=()=>{i.current.clear(),r(!1)};return f==null||f.addEventListener("keydown",m),f==null||f.addEventListener("keyup",h),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{f==null||f.removeEventListener("keydown",m),f==null||f.removeEventListener("keyup",h),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),n}function j3(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function C3(e,t){return t.includes(e)?"code":"key"}const WOe=()=>{const e=Kt();return b.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:i,maxZoom:s,panZoom:c}=e.getState(),f=DA(t,r,a,i,s,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:c,y:f}=s.getBoundingClientRect(),u={x:t.x-c,y:t.y-f},m=n.snapGrid??a,h=n.snapToGrid??i;return rp(u,r,h,m)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:i}=r.getBoundingClientRect(),s=Hy(t,n);return{x:s.x+a,y:s.y+i}}}),[])};function o9(e,t){const n=[],r=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const c={...i};for(const f of s)QOe(f,c);n.push(c)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function QOe(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ZOe(e,t){return o9(e,t)}function JOe(e,t){return o9(e,t)}function Gl(e,t){return{id:e,type:"select",selected:t}}function Ju(e,t=new Set,n=!1){const r=[];for(const[a,i]of e){const s=t.has(a);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(Gl(i.id,s)))}return r}function O3({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const c=t.get(s.id),f=((a=c==null?void 0:c.internals)==null?void 0:a.userNode)??c;f!==void 0&&f!==s&&n.push({id:s.id,item:s,type:"replace"}),f===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function A3(e){return{id:e.id,type:"remove"}}const N3=e=>OCe(e),eAe=e=>Tq(e);function s9(e){return b.forwardRef(e)}const tAe=typeof window<"u"?b.useLayoutEffect:b.useEffect;function T3(e){const[t,n]=b.useState(BigInt(0)),[r]=b.useState(()=>nAe(()=>n(a=>a+BigInt(1))));return tAe(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function nAe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const l9=b.createContext(null);function rAe({children:e}){const t=Kt(),n=b.useCallback(c=>{const{nodes:f=[],setNodes:u,hasDefaultNodes:m,onNodesChange:h,nodeLookup:p,fitViewQueued:y,onNodesChangeMiddlewareMap:w}=t.getState();let x=f;for(const E of c)x=typeof E=="function"?E(x):E;let S=O3({items:x,lookup:p});for(const E of w.values())S=E(S);m&&u(x),S.length>0?h==null||h(S):y&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:O,setNodes:C}=t.getState();E&&C(O)})},[]),r=T3(n),a=b.useCallback(c=>{const{edges:f=[],setEdges:u,hasDefaultEdges:m,onEdgesChange:h,edgeLookup:p}=t.getState();let y=f;for(const w of c)y=typeof w=="function"?w(y):w;m?u(y):h&&h(O3({items:y,lookup:p}))},[]),i=T3(a),s=b.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return v.jsx(l9.Provider,{value:s,children:e})}function aAe(){const e=b.useContext(l9);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const iAe=e=>!!e.panZoom;function xb(){const e=WOe(),t=Kt(),n=aAe(),r=ot(iAe),a=b.useMemo(()=>{const i=h=>t.getState().nodeLookup.get(h),s=h=>{n.nodeQueue.push(h)},c=h=>{n.edgeQueue.push(h)},f=h=>{var E,O;const{nodeLookup:p,nodeOrigin:y}=t.getState(),w=N3(h)?h:p.get(h.id),x=w.parentId?Iq(w.position,w.measured,w.parentId,p,y):w.position,S={...w,position:x,width:((E=w.measured)==null?void 0:E.width)??w.width,height:((O=w.measured)==null?void 0:O.height)??w.height};return Lf(S)},u=(h,p,y={replace:!1})=>{s(w=>w.map(x=>{if(x.id===h){const S=typeof p=="function"?p(x):p;return y.replace&&N3(S)?S:{...x,...S}}return x}))},m=(h,p,y={replace:!1})=>{c(w=>w.map(x=>{if(x.id===h){const S=typeof p=="function"?p(x):p;return y.replace&&eAe(S)?S:{...x,...S}}return x}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var p;return(p=i(h))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(p=>({...p}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:s,setEdges:c,addNodes:h=>{const p=Array.isArray(h)?h:[h];n.nodeQueue.push(y=>[...y,...p])},addEdges:h=>{const p=Array.isArray(h)?h:[h];n.edgeQueue.push(y=>[...y,...p])},toObject:()=>{const{nodes:h=[],edges:p=[],transform:y}=t.getState(),[w,x,S]=y;return{nodes:h.map(E=>({...E})),edges:p.map(E=>({...E})),viewport:{x:w,y:x,zoom:S}}},deleteElements:async({nodes:h=[],edges:p=[]})=>{const{nodes:y,edges:w,onNodesDelete:x,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:O,onDelete:C,onBeforeDelete:A}=t.getState(),{nodes:N,edges:T}=await MCe({nodesToRemove:h,edgesToRemove:p,nodes:y,edges:w,onBeforeDelete:A}),P=T.length>0,k=N.length>0;if(P){const D=T.map(A3);S==null||S(T),O(D)}if(k){const D=N.map(A3);x==null||x(N),E(D)}return(k||P)&&(C==null||C({nodes:N,edges:T})),{deletedNodes:N,deletedEdges:T}},getIntersectingNodes:(h,p=!0,y)=>{const w=i3(h),x=w?h:f(h),S=y!==void 0;return x?(y||t.getState().nodes).filter(E=>{const O=t.getState().nodeLookup.get(E.id);if(O&&!w&&(E.id===h.id||!O.internals.positionAbsolute))return!1;const C=Lf(S?E:O),A=am(C,x);return p&&A>0||A>=C.width*C.height||A>=x.width*x.height}):[]},isNodeIntersecting:(h,p,y=!0)=>{const x=i3(h)?h:f(h);if(!x)return!1;const S=am(x,p);return y&&S>0||S>=p.width*p.height||S>=x.width*x.height},updateNode:u,updateNodeData:(h,p,y={replace:!1})=>{u(h,w=>{const x=typeof p=="function"?p(w):p;return y.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},y)},updateEdge:m,updateEdgeData:(h,p,y={replace:!1})=>{m(h,w=>{const x=typeof p=="function"?p(w):p;return y.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},y)},getNodesBounds:h=>{const{nodeLookup:p,nodeOrigin:y}=t.getState();return ACe(h,{nodeLookup:p,nodeOrigin:y})},getHandleConnections:({type:h,id:p,nodeId:y})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${y}-${h}${p?`-${p}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:h,handleId:p,nodeId:y})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${y}${h?p?`-${h}-${p}`:`-${h}`:""}`))==null?void 0:w.values())??[])},fitView:async h=>{const p=t.getState().fitViewResolver??ICe();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:p}),n.nodeQueue.push(y=>[...y]),p.promise}}},[]);return b.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const P3=e=>e.selected,oAe=typeof window<"u"?window:void 0;function sAe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Kt(),{deleteElements:r}=xb(),a=om(e,{actInsideInputWithModifier:!1}),i=om(t,{target:oAe});b.useEffect(()=>{if(a){const{edges:s,nodes:c}=n.getState();r({nodes:c.filter(P3),edges:s.filter(P3)}),n.setState({nodesSelectionActive:!1})}},[a]),b.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function lAe(e){const t=Kt();b.useEffect(()=>{const n=()=>{var a,i,s,c;if(!e.current||!(((i=(a=e.current).checkVisibility)==null?void 0:i.call(a))??!0))return!1;const r=IA(e.current);(r.height===0||r.width===0)&&((c=(s=t.getState()).onError)==null||c.call(s,"004",Ri.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const wb={position:"absolute",width:"100%",height:"100%",top:0,left:0},cAe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function uAe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:i=hc.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:u,minZoom:m,maxZoom:h,zoomActivationKeyCode:p,preventScrolling:y=!0,children:w,noWheelClassName:x,noPanClassName:S,onViewportChange:E,isControlledViewport:O,paneClickDistance:C,selectionOnDrag:A}){const N=Kt(),T=b.useRef(null),{userSelectionActive:P,lib:k,connectionInProgress:D}=ot(cAe,Ft),K=om(p),L=b.useRef();lAe(T);const I=b.useCallback(W=>{E==null||E({x:W[0],y:W[1],zoom:W[2]}),O||N.setState({transform:W})},[E,O]);return b.useEffect(()=>{if(T.current){L.current=bOe({domNode:T.current,minZoom:m,maxZoom:h,translateExtent:u,viewport:f,onDraggingChange:R=>N.setState(H=>H.paneDragging===R?H:{paneDragging:R}),onPanZoomStart:(R,H)=>{const{onViewportChangeStart:q,onMoveStart:F}=N.getState();F==null||F(R,H),q==null||q(H)},onPanZoom:(R,H)=>{const{onViewportChange:q,onMove:F}=N.getState();F==null||F(R,H),q==null||q(H)},onPanZoomEnd:(R,H)=>{const{onViewportChangeEnd:q,onMoveEnd:F}=N.getState();F==null||F(R,H),q==null||q(H)}});const{x:W,y:$,zoom:V}=L.current.getViewport();return N.setState({panZoom:L.current,transform:[W,$,V],domNode:T.current.closest(".react-flow")}),()=>{var R;(R=L.current)==null||R.destroy()}}},[]),b.useEffect(()=>{var W;(W=L.current)==null||W.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:K,preventScrolling:y,noPanClassName:S,userSelectionActive:P,noWheelClassName:x,lib:k,onTransformChange:I,connectionInProgress:D,selectionOnDrag:A,paneClickDistance:C})},[e,t,n,r,a,i,s,c,K,y,S,P,x,k,I,D,A,C]),v.jsx("div",{className:"react-flow__renderer",ref:T,style:wb,children:w})}const fAe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function dAe(){const{userSelectionActive:e,userSelectionRect:t}=ot(fAe,Ft);return e&&t?v.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const KS=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},hAe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function mAe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=rm.Full,panOnDrag:r,paneClickDistance:a,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:u,onPaneScroll:m,onPaneMouseEnter:h,onPaneMouseMove:p,onPaneMouseLeave:y,children:w}){const x=Kt(),{userSelectionActive:S,elementsSelectable:E,dragging:O,connectionInProgress:C}=ot(hAe,Ft),A=E&&(e||S),N=b.useRef(null),T=b.useRef(),P=b.useRef(new Set),k=b.useRef(new Set),D=b.useRef(!1),K=q=>{if(D.current||C){D.current=!1;return}f==null||f(q),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},L=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}u==null||u(q)},I=m?q=>m(q):void 0,W=q=>{D.current&&(q.stopPropagation(),D.current=!1)},$=q=>{var ee,se;const{domNode:F}=x.getState();if(T.current=F==null?void 0:F.getBoundingClientRect(),!T.current)return;const Y=q.target===N.current;if(!Y&&!!q.target.closest(".nokey")||!e||!(i&&Y||t)||q.button!==0||!q.isPrimary)return;(se=(ee=q.target)==null?void 0:ee.setPointerCapture)==null||se.call(ee,q.pointerId),D.current=!1;const{x:X,y:Z}=Ka(q.nativeEvent,T.current);x.setState({userSelectionRect:{width:0,height:0,startX:X,startY:Z,x:X,y:Z}}),Y||(q.stopPropagation(),q.preventDefault())},V=q=>{const{userSelectionRect:F,transform:Y,nodeLookup:B,edgeLookup:z,connectionLookup:X,triggerNodeChanges:Z,triggerEdgeChanges:ee,defaultEdgeOptions:se,resetSelectedElements:ae}=x.getState();if(!T.current||!F)return;const{x:re,y:J}=Ka(q.nativeEvent,T.current),{startX:le,startY:me}=F;if(!D.current){const Me=t?0:a;if(Math.hypot(re-le,J-me)<=Me)return;ae(),s==null||s(q)}D.current=!0;const ne={startX:le,startY:me,x:re<le?re:le,y:J<me?J:me,width:Math.abs(re-le),height:Math.abs(J-me)},ge=P.current,ye=k.current;P.current=new Set(kA(B,ne,Y,n===rm.Partial,!0).map(Me=>Me.id)),k.current=new Set;const Ie=(se==null?void 0:se.selectable)??!0;for(const Me of P.current){const Ke=X.get(Me);if(Ke)for(const{edgeId:Gt}of Ke.values()){const ht=z.get(Gt);ht&&(ht.selectable??Ie)&&k.current.add(Gt)}}if(!o3(ge,P.current)){const Me=Ju(B,P.current,!0);Z(Me)}if(!o3(ye,k.current)){const Me=Ju(z,k.current);ee(Me)}x.setState({userSelectionRect:ne,userSelectionActive:!0,nodesSelectionActive:!1})},R=q=>{var F,Y;q.button===0&&((Y=(F=q.target)==null?void 0:F.releasePointerCapture)==null||Y.call(F,q.pointerId),!S&&q.target===N.current&&x.getState().userSelectionRect&&(K==null||K(q)),x.setState({userSelectionActive:!1,userSelectionRect:null}),D.current&&(c==null||c(q),x.setState({nodesSelectionActive:P.current.size>0})))},H=r===!0||Array.isArray(r)&&r.includes(0);return v.jsxs("div",{className:bn(["react-flow__pane",{draggable:H,dragging:O,selection:e}]),onClick:A?void 0:KS(K,N),onContextMenu:KS(L,N),onWheel:KS(I,N),onPointerEnter:A?void 0:h,onPointerMove:A?V:p,onPointerUp:A?R:void 0,onPointerDownCapture:A?$:void 0,onClickCapture:A?W:void 0,onPointerLeave:y,ref:N,style:wb,children:[w,v.jsx(dAe,{})]})}function J_({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:c,onError:f}=t.getState(),u=c.get(e);if(!u){f==null||f("012",Ri.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var m;return(m=r==null?void 0:r.current)==null?void 0:m.blur()})):a([e])}function c9({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:i,nodeClickDistance:s}){const c=Kt(),[f,u]=b.useState(!1),m=b.useRef();return b.useEffect(()=>{m.current=iOe({getStoreItems:()=>c.getState(),onNodeMouseDown:h=>{J_({id:h,store:c,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),b.useEffect(()=>{if(!(t||!e.current||!m.current))return m.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:a,nodeClickDistance:s}),()=>{var h;(h=m.current)==null||h.destroy()}},[n,r,t,i,e,a,s]),f}const pAe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function u9(){const e=Kt();return b.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:i,nodesDraggable:s,onError:c,updateNodePositions:f,nodeLookup:u,nodeOrigin:m}=e.getState(),h=new Map,p=pAe(s),y=a?i[0]:5,w=a?i[1]:5,x=n.direction.x*y*n.factor,S=n.direction.y*w*n.factor;for(const[,E]of u){if(!p(E))continue;let O={x:E.internals.positionAbsolute.x+x,y:E.internals.positionAbsolute.y+S};a&&(O=np(O,i));const{position:C,positionAbsolute:A}=Pq({nodeId:E.id,nextPosition:O,nodeLookup:u,nodeExtent:r,nodeOrigin:m,onError:c});E.position=C,E.internals.positionAbsolute=A,h.set(E.id,E)}f(h)},[])}const HA=b.createContext(null),vAe=HA.Provider;HA.Consumer;const f9=()=>b.useContext(HA),gAe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),yAe=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:i,connection:s}=r,{fromHandle:c,toHandle:f,isValid:u}=s,m=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:m,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:i===kf.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!a,valid:m&&u}};function bAe({type:e="source",position:t=De.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:c,children:f,className:u,onMouseDown:m,onTouchStart:h,...p},y){var V,R;const w=s||null,x=e==="target",S=Kt(),E=f9(),{connectOnClick:O,noPanClassName:C,rfId:A}=ot(gAe,Ft),{connectingFrom:N,connectingTo:T,clickConnecting:P,isPossibleEndHandle:k,connectionInProcess:D,clickConnectionInProcess:K,valid:L}=ot(yAe(E,w,e),Ft);E||(R=(V=S.getState()).onError)==null||R.call(V,"010",Ri.error010());const I=H=>{const{defaultEdgeOptions:q,onConnect:F,hasDefaultEdges:Y}=S.getState(),B={...q,...H};if(Y){const{edges:z,setEdges:X}=S.getState();X(FCe(B,z))}F==null||F(B),c==null||c(B)},W=H=>{if(!E)return;const q=$q(H.nativeEvent);if(a&&(q&&H.button===0||!q)){const F=S.getState();Z_.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:F.autoPanOnConnect,connectionMode:F.connectionMode,connectionRadius:F.connectionRadius,domNode:F.domNode,nodeLookup:F.nodeLookup,lib:F.lib,isTarget:x,handleId:w,nodeId:E,flowId:F.rfId,panBy:F.panBy,cancelConnection:F.cancelConnection,onConnectStart:F.onConnectStart,onConnectEnd:(...Y)=>{var B,z;return(z=(B=S.getState()).onConnectEnd)==null?void 0:z.call(B,...Y)},updateConnection:F.updateConnection,onConnect:I,isValidConnection:n||((...Y)=>{var B,z;return((z=(B=S.getState()).isValidConnection)==null?void 0:z.call(B,...Y))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:F.autoPanSpeed,dragThreshold:F.connectionDragThreshold})}q?m==null||m(H):h==null||h(H)},$=H=>{const{onClickConnectStart:q,onClickConnectEnd:F,connectionClickStartHandle:Y,connectionMode:B,isValidConnection:z,lib:X,rfId:Z,nodeLookup:ee,connection:se}=S.getState();if(!E||!Y&&!a)return;if(!Y){q==null||q(H.nativeEvent,{nodeId:E,handleId:w,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:E,type:e,id:w}});return}const ae=Lq(H.target),re=n||z,{connection:J,isValid:le}=Z_.isValid(H.nativeEvent,{handle:{nodeId:E,id:w,type:e},connectionMode:B,fromNodeId:Y.nodeId,fromHandleId:Y.id||null,fromType:Y.type,isValidConnection:re,flowId:Z,doc:ae,lib:X,nodeLookup:ee});le&&J&&I(J);const me=structuredClone(se);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,F==null||F(H,me),S.setState({connectionClickStartHandle:null})};return v.jsx("div",{"data-handleid":w,"data-nodeid":E,"data-handlepos":t,"data-id":`${A}-${E}-${w}-${e}`,className:bn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",C,u,{source:!x,target:x,connectable:r,connectablestart:a,connectableend:i,clickconnecting:P,connectingfrom:N,connectingto:T,valid:L,connectionindicator:r&&(!D||k)&&(D||K?i:a)}]),onMouseDown:W,onTouchStart:W,onClick:O?$:void 0,ref:y,...p,children:f})}const Bf=b.memo(s9(bAe));function xAe({data:e,isConnectable:t,sourcePosition:n=De.Bottom}){return v.jsxs(v.Fragment,{children:[e==null?void 0:e.label,v.jsx(Bf,{type:"source",position:n,isConnectable:t})]})}function wAe({data:e,isConnectable:t,targetPosition:n=De.Top,sourcePosition:r=De.Bottom}){return v.jsxs(v.Fragment,{children:[v.jsx(Bf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,v.jsx(Bf,{type:"source",position:r,isConnectable:t})]})}function SAe(){return null}function EAe({data:e,isConnectable:t,targetPosition:n=De.Top}){return v.jsxs(v.Fragment,{children:[v.jsx(Bf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Fy={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},M3={input:xAe,default:wAe,output:EAe,group:SAe};function _Ae(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const jAe=e=>{const{width:t,height:n,x:r,y:a}=tp(e.nodeLookup,{filter:i=>!!i.selected});return{width:qa(t)?t:null,height:qa(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function CAe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Kt(),{width:a,height:i,transformString:s,userSelectionActive:c}=ot(jAe,Ft),f=u9(),u=b.useRef(null);b.useEffect(()=>{var y;n||(y=u.current)==null||y.focus({preventScroll:!0})},[n]);const m=!c&&a!==null&&i!==null;if(c9({nodeRef:u,disabled:!m}),!m)return null;const h=e?y=>{const w=r.getState().nodes.filter(x=>x.selected);e(y,w)}:void 0,p=y=>{Object.prototype.hasOwnProperty.call(Fy,y.key)&&(y.preventDefault(),f({direction:Fy[y.key],factor:y.shiftKey?4:1}))};return v.jsx("div",{className:bn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:v.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:a,height:i}})})}const R3=typeof window<"u"?window:void 0,OAe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function d9({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:c,deleteKeyCode:f,selectionKeyCode:u,selectionOnDrag:m,selectionMode:h,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:w,panActivationKeyCode:x,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:O,zoomOnPinch:C,panOnScroll:A,panOnScrollSpeed:N,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:k,defaultViewport:D,translateExtent:K,minZoom:L,maxZoom:I,preventScrolling:W,onSelectionContextMenu:$,noWheelClassName:V,noPanClassName:R,disableKeyboardA11y:H,onViewportChange:q,isControlledViewport:F}){const{nodesSelectionActive:Y,userSelectionActive:B}=ot(OAe,Ft),z=om(u,{target:R3}),X=om(x,{target:R3}),Z=X||k,ee=X||A,se=m&&Z!==!0,ae=z||B||se;return sAe({deleteKeyCode:f,multiSelectionKeyCode:w}),v.jsx(uAe,{onPaneContextMenu:i,elementsSelectable:E,zoomOnScroll:O,zoomOnPinch:C,panOnScroll:ee,panOnScrollSpeed:N,panOnScrollMode:T,zoomOnDoubleClick:P,panOnDrag:!z&&Z,defaultViewport:D,translateExtent:K,minZoom:L,maxZoom:I,zoomActivationKeyCode:S,preventScrolling:W,noWheelClassName:V,noPanClassName:R,onViewportChange:q,isControlledViewport:F,paneClickDistance:c,selectionOnDrag:se,children:v.jsxs(mAe,{onSelectionStart:p,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:Z,isSelecting:!!ae,selectionMode:h,selectionKeyPressed:z,paneClickDistance:c,selectionOnDrag:se,children:[e,Y&&v.jsx(CAe,{onSelectionContextMenu:$,noPanClassName:R,disableKeyboardA11y:H})]})})}d9.displayName="FlowRenderer";const AAe=b.memo(d9),NAe=e=>t=>e?kA(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function TAe(e){return ot(b.useCallback(NAe(e),[e]),Ft)}const PAe=e=>e.updateNodeInternals;function MAe(){const e=ot(PAe),[t]=b.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const i=a.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:a.target,force:!0})}),e(r)}));return b.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function RAe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=Kt(),i=b.useRef(null),s=b.useRef(null),c=b.useRef(e.sourcePosition),f=b.useRef(e.targetPosition),u=b.useRef(t),m=n&&!!e.internals.handleBounds;return b.useEffect(()=>{i.current&&!e.hidden&&(!m||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[m,e.hidden]),b.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),b.useEffect(()=>{if(i.current){const h=u.current!==t,p=c.current!==e.sourcePosition,y=f.current!==e.targetPosition;(h||p||y)&&(u.current=t,c.current=e.sourcePosition,f.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function kAe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:i,onDoubleClick:s,nodesDraggable:c,elementsSelectable:f,nodesConnectable:u,nodesFocusable:m,resizeObserver:h,noDragClassName:p,noPanClassName:y,disableKeyboardA11y:w,rfId:x,nodeTypes:S,nodeClickDistance:E,onError:O}){const{node:C,internals:A,isParent:N}=ot(re=>{const J=re.nodeLookup.get(e),le=re.parentLookup.has(e);return{node:J,internals:J.internals,isParent:le}},Ft);let T=C.type||"default",P=(S==null?void 0:S[T])||M3[T];P===void 0&&(O==null||O("003",Ri.error003(T)),T="default",P=(S==null?void 0:S.default)||M3.default);const k=!!(C.draggable||c&&typeof C.draggable>"u"),D=!!(C.selectable||f&&typeof C.selectable>"u"),K=!!(C.connectable||u&&typeof C.connectable>"u"),L=!!(C.focusable||m&&typeof C.focusable>"u"),I=Kt(),W=Dq(C),$=RAe({node:C,nodeType:T,hasDimensions:W,resizeObserver:h}),V=c9({nodeRef:$,disabled:C.hidden||!k,noDragClassName:p,handleSelector:C.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:E}),R=u9();if(C.hidden)return null;const H=Yo(C),q=_Ae(C),F=D||k||t||n||r||a,Y=n?re=>n(re,{...A.userNode}):void 0,B=r?re=>r(re,{...A.userNode}):void 0,z=a?re=>a(re,{...A.userNode}):void 0,X=i?re=>i(re,{...A.userNode}):void 0,Z=s?re=>s(re,{...A.userNode}):void 0,ee=re=>{const{selectNodesOnDrag:J,nodeDragThreshold:le}=I.getState();D&&(!J||!k||le>0)&&J_({id:e,store:I,nodeRef:$}),t&&t(re,{...A.userNode})},se=re=>{if(!(zq(re.nativeEvent)||w)){if(Cq.includes(re.key)&&D){const J=re.key==="Escape";J_({id:e,store:I,unselect:J,nodeRef:$})}else if(k&&C.selected&&Object.prototype.hasOwnProperty.call(Fy,re.key)){re.preventDefault();const{ariaLabelConfig:J}=I.getState();I.setState({ariaLiveMessage:J["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),R({direction:Fy[re.key],factor:re.shiftKey?4:1})}}},ae=()=>{var ye;if(w||!((ye=$.current)!=null&&ye.matches(":focus-visible")))return;const{transform:re,width:J,height:le,autoPanOnNodeFocus:me,setCenter:ne}=I.getState();if(!me)return;kA(new Map([[e,C]]),{x:0,y:0,width:J,height:le},re,!0).length>0||ne(C.position.x+H.width/2,C.position.y+H.height/2,{zoom:re[2]})};return v.jsx("div",{className:bn(["react-flow__node",`react-flow__node-${T}`,{[y]:k},C.className,{selected:C.selected,selectable:D,parent:N,draggable:k,dragging:V}]),ref:$,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:F?"all":"none",visibility:W?"visible":"hidden",...C.style,...q},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Y,onMouseMove:B,onMouseLeave:z,onContextMenu:X,onClick:ee,onDoubleClick:Z,onKeyDown:L?se:void 0,tabIndex:L?0:void 0,onFocus:L?ae:void 0,role:C.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${r9}-${x}`,"aria-label":C.ariaLabel,...C.domAttributes,children:v.jsx(vAe,{value:e,children:v.jsx(P,{id:e,data:C.data,type:T,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:C.selected??!1,selectable:D,draggable:k,deletable:C.deletable??!0,isConnectable:K,sourcePosition:C.sourcePosition,targetPosition:C.targetPosition,dragging:V,dragHandle:C.dragHandle,zIndex:A.z,parentId:C.parentId,...H})})})}var DAe=b.memo(kAe);const IAe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function h9(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:i}=ot(IAe,Ft),s=TAe(e.onlyRenderVisibleElements),c=MAe();return v.jsx("div",{className:"react-flow__nodes",style:wb,children:s.map(f=>v.jsx(DAe,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:i},f))})}h9.displayName="NodeRenderer";const LAe=b.memo(h9);function zAe(e){return ot(b.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const i=n.nodeLookup.get(a.source),s=n.nodeLookup.get(a.target);i&&s&&BCe({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),Ft)}const $Ae=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return v.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},BAe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return v.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},k3={[Df.Arrow]:$Ae,[Df.ArrowClosed]:BAe};function UAe(e){const t=Kt();return b.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(k3,e)?k3[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",Ri.error009(e)),null)},[e])}const HAe=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:c="auto-start-reverse"})=>{const f=UAe(t);return f?v.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:c,refX:"0",refY:"0",children:v.jsx(f,{color:n,strokeWidth:s})}):null},m9=({defaultColor:e,rfId:t})=>{const n=ot(i=>i.edges),r=ot(i=>i.defaultEdgeOptions),a=b.useMemo(()=>GCe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?v.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:v.jsx("defs",{children:a.map(i=>v.jsx(HAe,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};m9.displayName="MarkerDefinitions";var FAe=b.memo(m9);function p9({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:c=2,children:f,className:u,...m}){const[h,p]=b.useState({x:1,y:0,width:0,height:0}),y=bn(["react-flow__edge-textwrapper",u]),w=b.useRef(null);return b.useEffect(()=>{if(w.current){const x=w.current.getBBox();p({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?v.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:y,visibility:h.width?"visible":"hidden",...m,children:[a&&v.jsx("rect",{width:h.width+2*s[0],x:-s[0],y:-s[1],height:h.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),v.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:w,style:r,children:n}),f]}):null}p9.displayName="EdgeText";const qAe=b.memo(p9);function Sb({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:u=20,...m}){return v.jsxs(v.Fragment,{children:[v.jsx("path",{...m,d:e,fill:"none",className:bn(["react-flow__edge-path",m.className])}),u?v.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&qa(t)&&qa(n)?v.jsx(qAe,{x:t,y:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function D3({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===De.Left||e===De.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function v9({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:i=De.Top}){const[s,c]=D3({pos:n,x1:e,y1:t,x2:r,y2:a}),[f,u]=D3({pos:i,x1:r,y1:a,x2:e,y2:t}),[m,h,p,y]=Bq({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:s,sourceControlY:c,targetControlX:f,targetControlY:u});return[`M${e},${t} C${s},${c} ${f},${u} ${r},${a}`,m,h,p,y]}function g9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:c,label:f,labelStyle:u,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,interactionWidth:E})=>{const[O,C,A]=v9({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:c}),N=e.isInternal?void 0:t;return v.jsx(Sb,{id:N,path:O,labelX:C,labelY:A,label:f,labelStyle:u,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,interactionWidth:E})})}const KAe=g9({isInternal:!1}),y9=g9({isInternal:!0});KAe.displayName="SimpleBezierEdge";y9.displayName="SimpleBezierEdgeInternal";function b9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:c,labelShowBg:f,labelBgStyle:u,labelBgPadding:m,labelBgBorderRadius:h,style:p,sourcePosition:y=De.Bottom,targetPosition:w=De.Top,markerEnd:x,markerStart:S,pathOptions:E,interactionWidth:O})=>{const[C,A,N]=X_({sourceX:n,sourceY:r,sourcePosition:y,targetX:a,targetY:i,targetPosition:w,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),T=e.isInternal?void 0:t;return v.jsx(Sb,{id:T,path:C,labelX:A,labelY:N,label:s,labelStyle:c,labelShowBg:f,labelBgStyle:u,labelBgPadding:m,labelBgBorderRadius:h,style:p,markerEnd:x,markerStart:S,interactionWidth:O})})}const x9=b9({isInternal:!1}),w9=b9({isInternal:!0});x9.displayName="SmoothStepEdge";w9.displayName="SmoothStepEdgeInternal";function S9(e){return b.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return v.jsx(x9,{...n,id:r,pathOptions:b.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const VAe=S9({isInternal:!1}),E9=S9({isInternal:!0});VAe.displayName="StepEdge";E9.displayName="StepEdgeInternal";function _9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:c,labelShowBg:f,labelBgStyle:u,labelBgPadding:m,labelBgBorderRadius:h,style:p,markerEnd:y,markerStart:w,interactionWidth:x})=>{const[S,E,O]=Fq({sourceX:n,sourceY:r,targetX:a,targetY:i}),C=e.isInternal?void 0:t;return v.jsx(Sb,{id:C,path:S,labelX:E,labelY:O,label:s,labelStyle:c,labelShowBg:f,labelBgStyle:u,labelBgPadding:m,labelBgBorderRadius:h,style:p,markerEnd:y,markerStart:w,interactionWidth:x})})}const YAe=_9({isInternal:!1}),j9=_9({isInternal:!0});YAe.displayName="StraightEdge";j9.displayName="StraightEdgeInternal";function C9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s=De.Bottom,targetPosition:c=De.Top,label:f,labelStyle:u,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,pathOptions:E,interactionWidth:O})=>{const[C,A,N]=Uq({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:c,curvature:E==null?void 0:E.curvature}),T=e.isInternal?void 0:t;return v.jsx(Sb,{id:T,path:C,labelX:A,labelY:N,label:f,labelStyle:u,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,interactionWidth:O})})}const GAe=C9({isInternal:!1}),O9=C9({isInternal:!0});GAe.displayName="BezierEdge";O9.displayName="BezierEdgeInternal";const I3={default:O9,straight:j9,step:E9,smoothstep:w9,simplebezier:y9},L3={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},XAe=(e,t,n)=>n===De.Left?e-t:n===De.Right?e+t:e,WAe=(e,t,n)=>n===De.Top?e-t:n===De.Bottom?e+t:e,z3="react-flow__edgeupdater";function $3({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:i,onMouseOut:s,type:c}){return v.jsx("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:bn([z3,`${z3}-${c}`]),cx:XAe(t,r,e),cy:WAe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function QAe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:i,targetY:s,sourcePosition:c,targetPosition:f,onReconnect:u,onReconnectStart:m,onReconnectEnd:h,setReconnecting:p,setUpdateHover:y}){const w=Kt(),x=(A,N)=>{if(A.button!==0)return;const{autoPanOnConnect:T,domNode:P,connectionMode:k,connectionRadius:D,lib:K,onConnectStart:L,cancelConnection:I,nodeLookup:W,rfId:$,panBy:V,updateConnection:R}=w.getState(),H=N.type==="target",q=(B,z)=>{p(!1),h==null||h(B,n,N.type,z)},F=B=>u==null?void 0:u(n,B),Y=(B,z)=>{p(!0),m==null||m(A,n,N.type),L==null||L(B,z)};Z_.onPointerDown(A.nativeEvent,{autoPanOnConnect:T,connectionMode:k,connectionRadius:D,domNode:P,handleId:N.id,nodeId:N.nodeId,nodeLookup:W,isTarget:H,edgeUpdaterType:N.type,lib:K,flowId:$,cancelConnection:I,panBy:V,isValidConnection:(...B)=>{var z,X;return((X=(z=w.getState()).isValidConnection)==null?void 0:X.call(z,...B))??!0},onConnect:F,onConnectStart:Y,onConnectEnd:(...B)=>{var z,X;return(X=(z=w.getState()).onConnectEnd)==null?void 0:X.call(z,...B)},onReconnectEnd:q,updateConnection:R,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},S=A=>x(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),E=A=>x(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),O=()=>y(!0),C=()=>y(!1);return v.jsxs(v.Fragment,{children:[(e===!0||e==="source")&&v.jsx($3,{position:c,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:O,onMouseOut:C,type:"source"}),(e===!0||e==="target")&&v.jsx($3,{position:f,centerX:i,centerY:s,radius:t,onMouseDown:E,onMouseEnter:O,onMouseOut:C,type:"target"})]})}function ZAe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:i,onContextMenu:s,onMouseEnter:c,onMouseMove:f,onMouseLeave:u,reconnectRadius:m,onReconnect:h,onReconnectStart:p,onReconnectEnd:y,rfId:w,edgeTypes:x,noPanClassName:S,onError:E,disableKeyboardA11y:O}){let C=ot(ne=>ne.edgeLookup.get(e));const A=ot(ne=>ne.defaultEdgeOptions);C=A?{...A,...C}:C;let N=C.type||"default",T=(x==null?void 0:x[N])||I3[N];T===void 0&&(E==null||E("011",Ri.error011(N)),N="default",T=(x==null?void 0:x.default)||I3.default);const P=!!(C.focusable||t&&typeof C.focusable>"u"),k=typeof h<"u"&&(C.reconnectable||n&&typeof C.reconnectable>"u"),D=!!(C.selectable||r&&typeof C.selectable>"u"),K=b.useRef(null),[L,I]=b.useState(!1),[W,$]=b.useState(!1),V=Kt(),{zIndex:R,sourceX:H,sourceY:q,targetX:F,targetY:Y,sourcePosition:B,targetPosition:z}=ot(b.useCallback(ne=>{const ge=ne.nodeLookup.get(C.source),ye=ne.nodeLookup.get(C.target);if(!ge||!ye)return{zIndex:C.zIndex,...L3};const Ie=YCe({id:e,sourceNode:ge,targetNode:ye,sourceHandle:C.sourceHandle||null,targetHandle:C.targetHandle||null,connectionMode:ne.connectionMode,onError:E});return{zIndex:$Ce({selected:C.selected,zIndex:C.zIndex,sourceNode:ge,targetNode:ye,elevateOnSelect:ne.elevateEdgesOnSelect,zIndexMode:ne.zIndexMode}),...Ie||L3}},[C.source,C.target,C.sourceHandle,C.targetHandle,C.selected,C.zIndex]),Ft),X=b.useMemo(()=>C.markerStart?`url('#${W_(C.markerStart,w)}')`:void 0,[C.markerStart,w]),Z=b.useMemo(()=>C.markerEnd?`url('#${W_(C.markerEnd,w)}')`:void 0,[C.markerEnd,w]);if(C.hidden||H===null||q===null||F===null||Y===null)return null;const ee=ne=>{var Me;const{addSelectedEdges:ge,unselectNodesAndEdges:ye,multiSelectionActive:Ie}=V.getState();D&&(V.setState({nodesSelectionActive:!1}),C.selected&&Ie?(ye({nodes:[],edges:[C]}),(Me=K.current)==null||Me.blur()):ge([e])),a&&a(ne,C)},se=i?ne=>{i(ne,{...C})}:void 0,ae=s?ne=>{s(ne,{...C})}:void 0,re=c?ne=>{c(ne,{...C})}:void 0,J=f?ne=>{f(ne,{...C})}:void 0,le=u?ne=>{u(ne,{...C})}:void 0,me=ne=>{var ge;if(!O&&Cq.includes(ne.key)&&D){const{unselectNodesAndEdges:ye,addSelectedEdges:Ie}=V.getState();ne.key==="Escape"?((ge=K.current)==null||ge.blur(),ye({edges:[C]})):Ie([e])}};return v.jsx("svg",{style:{zIndex:R},children:v.jsxs("g",{className:bn(["react-flow__edge",`react-flow__edge-${N}`,C.className,S,{selected:C.selected,animated:C.animated,inactive:!D&&!a,updating:L,selectable:D}]),onClick:ee,onDoubleClick:se,onContextMenu:ae,onMouseEnter:re,onMouseMove:J,onMouseLeave:le,onKeyDown:P?me:void 0,tabIndex:P?0:void 0,role:C.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":C.ariaLabel===null?void 0:C.ariaLabel||`Edge from ${C.source} to ${C.target}`,"aria-describedby":P?`${a9}-${w}`:void 0,ref:K,...C.domAttributes,children:[!W&&v.jsx(T,{id:e,source:C.source,target:C.target,type:C.type,selected:C.selected,animated:C.animated,selectable:D,deletable:C.deletable??!0,label:C.label,labelStyle:C.labelStyle,labelShowBg:C.labelShowBg,labelBgStyle:C.labelBgStyle,labelBgPadding:C.labelBgPadding,labelBgBorderRadius:C.labelBgBorderRadius,sourceX:H,sourceY:q,targetX:F,targetY:Y,sourcePosition:B,targetPosition:z,data:C.data,style:C.style,sourceHandleId:C.sourceHandle,targetHandleId:C.targetHandle,markerStart:X,markerEnd:Z,pathOptions:"pathOptions"in C?C.pathOptions:void 0,interactionWidth:C.interactionWidth}),k&&v.jsx(QAe,{edge:C,isReconnectable:k,reconnectRadius:m,onReconnect:h,onReconnectStart:p,onReconnectEnd:y,sourceX:H,sourceY:q,targetX:F,targetY:Y,sourcePosition:B,targetPosition:z,setUpdateHover:I,setReconnecting:$})]})})}var JAe=b.memo(ZAe);const eNe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function A9({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:c,onEdgeMouseMove:f,onEdgeMouseLeave:u,onEdgeClick:m,reconnectRadius:h,onEdgeDoubleClick:p,onReconnectStart:y,onReconnectEnd:w,disableKeyboardA11y:x}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:O,onError:C}=ot(eNe,Ft),A=zAe(t);return v.jsxs("div",{className:"react-flow__edges",children:[v.jsx(FAe,{defaultColor:e,rfId:n}),A.map(N=>v.jsx(JAe,{id:N,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:O,noPanClassName:a,onReconnect:i,onContextMenu:s,onMouseEnter:c,onMouseMove:f,onMouseLeave:u,onClick:m,reconnectRadius:h,onDoubleClick:p,onReconnectStart:y,onReconnectEnd:w,rfId:n,onError:C,edgeTypes:r,disableKeyboardA11y:x},N))]})}A9.displayName="EdgeRenderer";const tNe=b.memo(A9),nNe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function rNe({children:e}){const t=ot(nNe);return v.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function aNe(e){const t=xb(),n=b.useRef(!1);b.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const iNe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function oNe(e){const t=ot(iNe),n=Kt();return b.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function sNe(e){return e.connection.inProgress?{...e.connection,to:rp(e.connection.to,e.transform)}:{...e.connection}}function lNe(e){return sNe}function cNe(e){const t=lNe();return ot(t,Ft)}const uNe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function fNe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:i,height:s,isValid:c,inProgress:f}=ot(uNe,Ft);return!(i&&a&&f)?null:v.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:v.jsx("g",{className:bn(["react-flow__connection",Nq(c)]),children:v.jsx(N9,{style:t,type:n,CustomComponent:r,isValid:c})})})}const N9=({style:e,type:t=Ls.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:i,fromNode:s,fromHandle:c,fromPosition:f,to:u,toNode:m,toHandle:h,toPosition:p,pointer:y}=cNe();if(!a)return;if(n)return v.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:c,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:f,toPosition:p,connectionStatus:Nq(r),toNode:m,toHandle:h,pointer:y});let w="";const x={sourceX:i.x,sourceY:i.y,sourcePosition:f,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case Ls.Bezier:[w]=Uq(x);break;case Ls.SimpleBezier:[w]=v9(x);break;case Ls.Step:[w]=X_({...x,borderRadius:0});break;case Ls.SmoothStep:[w]=X_(x);break;default:[w]=Fq(x)}return v.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};N9.displayName="ConnectionLine";const dNe={};function B3(e=dNe){b.useRef(e),Kt(),b.useEffect(()=>{},[e])}function hNe(){Kt(),b.useRef(!1),b.useEffect(()=>{},[])}function T9({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:u,onNodeContextMenu:m,onSelectionContextMenu:h,onSelectionStart:p,onSelectionEnd:y,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:O,selectionOnDrag:C,selectionMode:A,multiSelectionKeyCode:N,panActivationKeyCode:T,zoomActivationKeyCode:P,deleteKeyCode:k,onlyRenderVisibleElements:D,elementsSelectable:K,defaultViewport:L,translateExtent:I,minZoom:W,maxZoom:$,preventScrolling:V,defaultMarkerColor:R,zoomOnScroll:H,zoomOnPinch:q,panOnScroll:F,panOnScrollSpeed:Y,panOnScrollMode:B,zoomOnDoubleClick:z,panOnDrag:X,onPaneClick:Z,onPaneMouseEnter:ee,onPaneMouseMove:se,onPaneMouseLeave:ae,onPaneScroll:re,onPaneContextMenu:J,paneClickDistance:le,nodeClickDistance:me,onEdgeContextMenu:ne,onEdgeMouseEnter:ge,onEdgeMouseMove:ye,onEdgeMouseLeave:Ie,reconnectRadius:Me,onReconnect:Ke,onReconnectStart:Gt,onReconnectEnd:ht,noDragClassName:Qn,noWheelClassName:Sr,noPanClassName:Lt,disableKeyboardA11y:we,nodeExtent:lt,rfId:xn,viewport:Zn,onViewportChange:ri}){return B3(e),B3(t),hNe(),aNe(n),oNe(Zn),v.jsx(AAe,{onPaneClick:Z,onPaneMouseEnter:ee,onPaneMouseMove:se,onPaneMouseLeave:ae,onPaneContextMenu:J,onPaneScroll:re,paneClickDistance:le,deleteKeyCode:k,selectionKeyCode:O,selectionOnDrag:C,selectionMode:A,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:N,panActivationKeyCode:T,zoomActivationKeyCode:P,elementsSelectable:K,zoomOnScroll:H,zoomOnPinch:q,zoomOnDoubleClick:z,panOnScroll:F,panOnScrollSpeed:Y,panOnScrollMode:B,panOnDrag:X,defaultViewport:L,translateExtent:I,minZoom:W,maxZoom:$,onSelectionContextMenu:h,preventScrolling:V,noDragClassName:Qn,noWheelClassName:Sr,noPanClassName:Lt,disableKeyboardA11y:we,onViewportChange:ri,isControlledViewport:!!Zn,children:v.jsxs(rNe,{children:[v.jsx(tNe,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:s,onReconnect:Ke,onReconnectStart:Gt,onReconnectEnd:ht,onlyRenderVisibleElements:D,onEdgeContextMenu:ne,onEdgeMouseEnter:ge,onEdgeMouseMove:ye,onEdgeMouseLeave:Ie,reconnectRadius:Me,defaultMarkerColor:R,noPanClassName:Lt,disableKeyboardA11y:we,rfId:xn}),v.jsx(fNe,{style:x,type:w,component:S,containerStyle:E}),v.jsx("div",{className:"react-flow__edgelabel-renderer"}),v.jsx(LAe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:u,onNodeContextMenu:m,nodeClickDistance:me,onlyRenderVisibleElements:D,noPanClassName:Lt,noDragClassName:Qn,disableKeyboardA11y:we,nodeExtent:lt,rfId:xn}),v.jsx("div",{className:"react-flow__viewport-portal"})]})})}T9.displayName="GraphView";const mNe=b.memo(T9),U3=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:f=.5,maxZoom:u=2,nodeOrigin:m,nodeExtent:h,zIndexMode:p="basic"}={})=>{const y=new Map,w=new Map,x=new Map,S=new Map,E=r??t??[],O=n??e??[],C=m??[0,0],A=h??nm;Vq(x,S,E);const N=Q_(O,y,w,{nodeOrigin:C,nodeExtent:A,zIndexMode:p});let T=[0,0,1];if(s&&a&&i){const P=tp(y,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:k,y:D,zoom:K}=DA(P,a,i,f,u,(c==null?void 0:c.padding)??.1);T=[k,D,K]}return{rfId:"1",width:a??0,height:i??0,transform:T,nodes:O,nodesInitialized:N,nodeLookup:y,parentLookup:w,edges:E,edgeLookup:S,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:f,maxZoom:u,translateExtent:nm,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:kf.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:C,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:s??!1,fitViewOptions:c,fitViewResolver:null,connection:{...Aq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:RCe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Oq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},pNe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:f,maxZoom:u,nodeOrigin:m,nodeExtent:h,zIndexMode:p})=>POe((y,w)=>{async function x(){const{nodeLookup:S,panZoom:E,fitViewOptions:O,fitViewResolver:C,width:A,height:N,minZoom:T,maxZoom:P}=w();E&&(await PCe({nodes:S,width:A,height:N,panZoom:E,minZoom:T,maxZoom:P},O),C==null||C.resolve(!0),y({fitViewResolver:null}))}return{...U3({nodes:e,edges:t,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:f,maxZoom:u,nodeOrigin:m,nodeExtent:h,defaultNodes:n,defaultEdges:r,zIndexMode:p}),setNodes:S=>{const{nodeLookup:E,parentLookup:O,nodeOrigin:C,elevateNodesOnSelect:A,fitViewQueued:N,zIndexMode:T}=w(),P=Q_(S,E,O,{nodeOrigin:C,nodeExtent:h,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:T});N&&P?(x(),y({nodes:S,nodesInitialized:P,fitViewQueued:!1,fitViewOptions:void 0})):y({nodes:S,nodesInitialized:P})},setEdges:S=>{const{connectionLookup:E,edgeLookup:O}=w();Vq(E,O,S),y({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:O}=w();O(S),y({hasDefaultNodes:!0})}if(E){const{setEdges:O}=w();O(E),y({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:O,parentLookup:C,domNode:A,nodeOrigin:N,nodeExtent:T,debug:P,fitViewQueued:k,zIndexMode:D}=w(),{changes:K,updatedInternals:L}=tOe(S,O,C,A,N,T,D);L&&(QCe(O,C,{nodeOrigin:N,nodeExtent:T,zIndexMode:D}),k?(x(),y({fitViewQueued:!1,fitViewOptions:void 0})):y({}),(K==null?void 0:K.length)>0&&(P&&console.log("React Flow: trigger node changes",K),E==null||E(K)))},updateNodePositions:(S,E=!1)=>{const O=[];let C=[];const{nodeLookup:A,triggerNodeChanges:N,connection:T,updateConnection:P,onNodesChangeMiddlewareMap:k}=w();for(const[D,K]of S){const L=A.get(D),I=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&(K!=null&&K.position)),W={id:D,type:"position",position:I?{x:Math.max(0,K.position.x),y:Math.max(0,K.position.y)}:K.position,dragging:E};if(L&&T.inProgress&&T.fromNode.id===L.id){const $=kc(L,T.fromHandle,De.Left,!0);P({...T,from:$})}I&&L.parentId&&O.push({id:D,parentId:L.parentId,rect:{...K.internals.positionAbsolute,width:K.measured.width??0,height:K.measured.height??0}}),C.push(W)}if(O.length>0){const{parentLookup:D,nodeOrigin:K}=w(),L=UA(O,A,D,K);C.push(...L)}for(const D of k.values())C=D(C);N(C)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:O,nodes:C,hasDefaultNodes:A,debug:N}=w();if(S!=null&&S.length){if(A){const T=ZOe(S,C);O(T)}N&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:O,edges:C,hasDefaultEdges:A,debug:N}=w();if(S!=null&&S.length){if(A){const T=JOe(S,C);O(T)}N&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:O,nodeLookup:C,triggerNodeChanges:A,triggerEdgeChanges:N}=w();if(E){const T=S.map(P=>Gl(P,!0));A(T);return}A(Ju(C,new Set([...S]),!0)),N(Ju(O))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:O,nodeLookup:C,triggerNodeChanges:A,triggerEdgeChanges:N}=w();if(E){const T=S.map(P=>Gl(P,!0));N(T);return}N(Ju(O,new Set([...S]))),A(Ju(C,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:O,nodes:C,nodeLookup:A,triggerNodeChanges:N,triggerEdgeChanges:T}=w(),P=S||C,k=E||O,D=[];for(const L of P){if(!L.selected)continue;const I=A.get(L.id);I&&(I.selected=!1),D.push(Gl(L.id,!1))}const K=[];for(const L of k)L.selected&&K.push(Gl(L.id,!1));N(D),T(K)},setMinZoom:S=>{const{panZoom:E,maxZoom:O}=w();E==null||E.setScaleExtent([S,O]),y({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:O}=w();E==null||E.setScaleExtent([O,S]),y({maxZoom:S})},setTranslateExtent:S=>{var E;(E=w().panZoom)==null||E.setTranslateExtent(S),y({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:O,triggerEdgeChanges:C,elementsSelectable:A}=w();if(!A)return;const N=E.reduce((P,k)=>k.selected?[...P,Gl(k.id,!1)]:P,[]),T=S.reduce((P,k)=>k.selected?[...P,Gl(k.id,!1)]:P,[]);O(N),C(T)},setNodeExtent:S=>{const{nodes:E,nodeLookup:O,parentLookup:C,nodeOrigin:A,elevateNodesOnSelect:N,nodeExtent:T,zIndexMode:P}=w();S[0][0]===T[0][0]&&S[0][1]===T[0][1]&&S[1][0]===T[1][0]&&S[1][1]===T[1][1]||(Q_(E,O,C,{nodeOrigin:A,nodeExtent:S,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:P}),y({nodeExtent:S}))},panBy:S=>{const{transform:E,width:O,height:C,panZoom:A,translateExtent:N}=w();return nOe({delta:S,panZoom:A,transform:E,translateExtent:N,width:O,height:C})},setCenter:async(S,E,O)=>{const{width:C,height:A,maxZoom:N,panZoom:T}=w();if(!T)return Promise.resolve(!1);const P=typeof(O==null?void 0:O.zoom)<"u"?O.zoom:N;return await T.setViewport({x:C/2-S*P,y:A/2-E*P,zoom:P},{duration:O==null?void 0:O.duration,ease:O==null?void 0:O.ease,interpolate:O==null?void 0:O.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{y({connection:{...Aq}})},updateConnection:S=>{y({connection:S})},reset:()=>y({...U3()})}},Object.is);function P9({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:i,initialMinZoom:s,initialMaxZoom:c,initialFitViewOptions:f,fitView:u,nodeOrigin:m,nodeExtent:h,zIndexMode:p,children:y}){const[w]=b.useState(()=>pNe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:u,minZoom:s,maxZoom:c,fitViewOptions:f,nodeOrigin:m,nodeExtent:h,zIndexMode:p}));return v.jsx(MOe,{value:w,children:v.jsx(rAe,{children:y})})}function vNe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:i,height:s,fitView:c,fitViewOptions:f,minZoom:u,maxZoom:m,nodeOrigin:h,nodeExtent:p,zIndexMode:y}){return b.useContext(yb)?v.jsx(v.Fragment,{children:e}):v.jsx(P9,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:i,initialHeight:s,fitView:c,initialFitViewOptions:f,initialMinZoom:u,initialMaxZoom:m,nodeOrigin:h,nodeExtent:p,zIndexMode:y,children:e})}const gNe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function yNe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:i,edgeTypes:s,onNodeClick:c,onEdgeClick:f,onInit:u,onMove:m,onMoveStart:h,onMoveEnd:p,onConnect:y,onConnectStart:w,onConnectEnd:x,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:O,onNodeMouseMove:C,onNodeMouseLeave:A,onNodeContextMenu:N,onNodeDoubleClick:T,onNodeDragStart:P,onNodeDrag:k,onNodeDragStop:D,onNodesDelete:K,onEdgesDelete:L,onDelete:I,onSelectionChange:W,onSelectionDragStart:$,onSelectionDrag:V,onSelectionDragStop:R,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:F,onBeforeDelete:Y,connectionMode:B,connectionLineType:z=Ls.Bezier,connectionLineStyle:X,connectionLineComponent:Z,connectionLineContainerStyle:ee,deleteKeyCode:se="Backspace",selectionKeyCode:ae="Shift",selectionOnDrag:re=!1,selectionMode:J=rm.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:me=im()?"Meta":"Control",zoomActivationKeyCode:ne=im()?"Meta":"Control",snapToGrid:ge,snapGrid:ye,onlyRenderVisibleElements:Ie=!1,selectNodesOnDrag:Me,nodesDraggable:Ke,autoPanOnNodeFocus:Gt,nodesConnectable:ht,nodesFocusable:Qn,nodeOrigin:Sr=i9,edgesFocusable:Lt,edgesReconnectable:we,elementsSelectable:lt=!0,defaultViewport:xn=KOe,minZoom:Zn=.5,maxZoom:ri=2,translateExtent:ai=nm,preventScrolling:gl=!0,nodeExtent:zr,defaultMarkerColor:Qc="#b1b1b7",zoomOnScroll:ii=!0,zoomOnPinch:zi=!0,panOnScroll:Hn=!1,panOnScrollSpeed:$r=.5,panOnScrollMode:Pn=hc.Free,zoomOnDoubleClick:ld=!0,panOnDrag:yl=!0,onPaneClick:ia,onPaneMouseEnter:Go,onPaneMouseMove:Xo,onPaneMouseLeave:$i,onPaneScroll:oa,onPaneContextMenu:Be,paneClickDistance:Nt=1,nodeClickDistance:on=0,children:Mn,onReconnect:oi,onReconnectStart:Mt,onReconnectEnd:Jn,onEdgeContextMenu:Bi,onEdgeDoubleClick:er,onEdgeMouseEnter:tr,onEdgeMouseMove:Wo,onEdgeMouseLeave:Br,reconnectRadius:cd=10,onNodesChange:ap,onEdgesChange:si,noDragClassName:wn="nodrag",noWheelClassName:nr="nowheel",noPanClassName:Ui="nopan",fitView:Zc,fitViewOptions:ip,connectOnClick:Eb,attributionPosition:op,proOptions:bl,defaultEdgeOptions:ud,elevateNodesOnSelect:Qo=!0,elevateEdgesOnSelect:Zo=!1,disableKeyboardA11y:Jo=!1,autoPanOnConnect:es,autoPanOnNodeDrag:sn,autoPanSpeed:sp,connectionRadius:lp,isValidConnection:Hi,onError:ts,style:_b,id:fd,nodeDragThreshold:cp,connectionDragThreshold:jb,viewport:Jc,onViewportChange:eu,width:Pa,height:Er,colorMode:up="light",debug:Cb,onScroll:ns,ariaLabelConfig:fp,zIndexMode:xl="basic",...Ob},_r){const wl=fd||"1",dp=XOe(up),dd=b.useCallback(Fi=>{Fi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ns==null||ns(Fi)},[ns]);return v.jsx("div",{"data-testid":"rf__wrapper",...Ob,onScroll:dd,style:{..._b,...gNe},ref:_r,className:bn(["react-flow",a,dp]),id:fd,role:"application",children:v.jsxs(vNe,{nodes:e,edges:t,width:Pa,height:Er,fitView:Zc,fitViewOptions:ip,minZoom:Zn,maxZoom:ri,nodeOrigin:Sr,nodeExtent:zr,zIndexMode:xl,children:[v.jsx(mNe,{onInit:u,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:O,onNodeMouseMove:C,onNodeMouseLeave:A,onNodeContextMenu:N,onNodeDoubleClick:T,nodeTypes:i,edgeTypes:s,connectionLineType:z,connectionLineStyle:X,connectionLineComponent:Z,connectionLineContainerStyle:ee,selectionKeyCode:ae,selectionOnDrag:re,selectionMode:J,deleteKeyCode:se,multiSelectionKeyCode:me,panActivationKeyCode:le,zoomActivationKeyCode:ne,onlyRenderVisibleElements:Ie,defaultViewport:xn,translateExtent:ai,minZoom:Zn,maxZoom:ri,preventScrolling:gl,zoomOnScroll:ii,zoomOnPinch:zi,zoomOnDoubleClick:ld,panOnScroll:Hn,panOnScrollSpeed:$r,panOnScrollMode:Pn,panOnDrag:yl,onPaneClick:ia,onPaneMouseEnter:Go,onPaneMouseMove:Xo,onPaneMouseLeave:$i,onPaneScroll:oa,onPaneContextMenu:Be,paneClickDistance:Nt,nodeClickDistance:on,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:F,onReconnect:oi,onReconnectStart:Mt,onReconnectEnd:Jn,onEdgeContextMenu:Bi,onEdgeDoubleClick:er,onEdgeMouseEnter:tr,onEdgeMouseMove:Wo,onEdgeMouseLeave:Br,reconnectRadius:cd,defaultMarkerColor:Qc,noDragClassName:wn,noWheelClassName:nr,noPanClassName:Ui,rfId:wl,disableKeyboardA11y:Jo,nodeExtent:zr,viewport:Jc,onViewportChange:eu}),v.jsx(GOe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:y,onConnectStart:w,onConnectEnd:x,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:Ke,autoPanOnNodeFocus:Gt,nodesConnectable:ht,nodesFocusable:Qn,edgesFocusable:Lt,edgesReconnectable:we,elementsSelectable:lt,elevateNodesOnSelect:Qo,elevateEdgesOnSelect:Zo,minZoom:Zn,maxZoom:ri,nodeExtent:zr,onNodesChange:ap,onEdgesChange:si,snapToGrid:ge,snapGrid:ye,connectionMode:B,translateExtent:ai,connectOnClick:Eb,defaultEdgeOptions:ud,fitView:Zc,fitViewOptions:ip,onNodesDelete:K,onEdgesDelete:L,onDelete:I,onNodeDragStart:P,onNodeDrag:k,onNodeDragStop:D,onSelectionDrag:V,onSelectionDragStart:$,onSelectionDragStop:R,onMove:m,onMoveStart:h,onMoveEnd:p,noPanClassName:Ui,nodeOrigin:Sr,rfId:wl,autoPanOnConnect:es,autoPanOnNodeDrag:sn,autoPanSpeed:sp,onError:ts,connectionRadius:lp,isValidConnection:Hi,selectNodesOnDrag:Me,nodeDragThreshold:cp,connectionDragThreshold:jb,onBeforeDelete:Y,debug:Cb,ariaLabelConfig:fp,zIndexMode:xl}),v.jsx(qOe,{onSelectionChange:W}),Mn,v.jsx($Oe,{proOptions:bl,position:op}),v.jsx(zOe,{rfId:wl,disableKeyboardA11y:Jo})]})})}var bNe=s9(yNe);function xNe({dimensions:e,lineWidth:t,variant:n,className:r}){return v.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:bn(["react-flow__background-pattern",n,r])})}function wNe({radius:e,className:t}){return v.jsx("circle",{cx:e,cy:e,r:e,className:bn(["react-flow__background-pattern","dots",t])})}var Zs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Zs||(Zs={}));const SNe={[Zs.Dots]:1,[Zs.Lines]:1,[Zs.Cross]:6},ENe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function M9({id:e,variant:t=Zs.Dots,gap:n=20,size:r,lineWidth:a=1,offset:i=0,color:s,bgColor:c,style:f,className:u,patternClassName:m}){const h=b.useRef(null),{transform:p,patternId:y}=ot(ENe,Ft),w=r||SNe[t],x=t===Zs.Dots,S=t===Zs.Cross,E=Array.isArray(n)?n:[n,n],O=[E[0]*p[2]||1,E[1]*p[2]||1],C=w*p[2],A=Array.isArray(i)?i:[i,i],N=S?[C,C]:O,T=[A[0]*p[2]||1+N[0]/2,A[1]*p[2]||1+N[1]/2],P=`${y}${e||""}`;return v.jsxs("svg",{className:bn(["react-flow__background",u]),style:{...f,...wb,"--xy-background-color-props":c,"--xy-background-pattern-color-props":s},ref:h,"data-testid":"rf__background",children:[v.jsx("pattern",{id:P,x:p[0]%O[0],y:p[1]%O[1],width:O[0],height:O[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:x?v.jsx(wNe,{radius:C/2,className:m}):v.jsx(xNe,{dimensions:N,lineWidth:a,variant:t,className:m})}),v.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}M9.displayName="Background";b.memo(M9);function _Ne(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:v.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function jNe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:v.jsx("path",{d:"M0 0h32v4.2H0z"})})}function CNe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:v.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 ONe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 ANe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 rg({children:e,className:t,...n}){return v.jsx("button",{type:"button",className:bn(["react-flow__controls-button",t]),...n,children:e})}const NNe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function R9({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:s,onFitView:c,onInteractiveChange:f,className:u,children:m,position:h="bottom-left",orientation:p="vertical","aria-label":y}){const w=Kt(),{isInteractive:x,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:O}=ot(NNe,Ft),{zoomIn:C,zoomOut:A,fitView:N}=xb(),T=()=>{C(),i==null||i()},P=()=>{A(),s==null||s()},k=()=>{N(a),c==null||c()},D=()=>{w.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),f==null||f(!x)},K=p==="horizontal"?"horizontal":"vertical";return v.jsxs(bb,{className:bn(["react-flow__controls",K,u]),position:h,style:e,"data-testid":"rf__controls","aria-label":y??O["controls.ariaLabel"],children:[t&&v.jsxs(v.Fragment,{children:[v.jsx(rg,{onClick:T,className:"react-flow__controls-zoomin",title:O["controls.zoomIn.ariaLabel"],"aria-label":O["controls.zoomIn.ariaLabel"],disabled:E,children:v.jsx(_Ne,{})}),v.jsx(rg,{onClick:P,className:"react-flow__controls-zoomout",title:O["controls.zoomOut.ariaLabel"],"aria-label":O["controls.zoomOut.ariaLabel"],disabled:S,children:v.jsx(jNe,{})})]}),n&&v.jsx(rg,{className:"react-flow__controls-fitview",onClick:k,title:O["controls.fitView.ariaLabel"],"aria-label":O["controls.fitView.ariaLabel"],children:v.jsx(CNe,{})}),r&&v.jsx(rg,{className:"react-flow__controls-interactive",onClick:D,title:O["controls.interactive.ariaLabel"],"aria-label":O["controls.interactive.ariaLabel"],children:x?v.jsx(ANe,{}):v.jsx(ONe,{})}),m]})}R9.displayName="Controls";b.memo(R9);function TNe({id:e,x:t,y:n,width:r,height:a,style:i,color:s,strokeColor:c,strokeWidth:f,className:u,borderRadius:m,shapeRendering:h,selected:p,onClick:y}){const{background:w,backgroundColor:x}=i||{},S=s||w||x;return v.jsx("rect",{className:bn(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:m,ry:m,width:r,height:a,style:{fill:S,stroke:c,strokeWidth:f},shapeRendering:h,onClick:y?E=>y(E,e):void 0})}const PNe=b.memo(TNe),MNe=e=>e.nodes.map(t=>t.id),VS=e=>e instanceof Function?e:()=>e;function RNe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:i=PNe,onClick:s}){const c=ot(MNe,Ft),f=VS(t),u=VS(e),m=VS(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return v.jsx(v.Fragment,{children:c.map(p=>v.jsx(DNe,{id:p,nodeColorFunc:f,nodeStrokeColorFunc:u,nodeClassNameFunc:m,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:i,onClick:s,shapeRendering:h},p))})}function kNe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:c,onClick:f}){const{node:u,x:m,y:h,width:p,height:y}=ot(w=>{const x=w.nodeLookup.get(e);if(!x)return{node:void 0,x:0,y:0,width:0,height:0};const S=x.internals.userNode,{x:E,y:O}=x.internals.positionAbsolute,{width:C,height:A}=Yo(S);return{node:S,x:E,y:O,width:C,height:A}},Ft);return!u||u.hidden||!Dq(u)?null:v.jsx(c,{x:m,y:h,width:p,height:y,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:a,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:f,id:u.id})}const DNe=b.memo(kNe);var INe=b.memo(RNe);const LNe=200,zNe=150,$Ne=e=>!e.hidden,BNe=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?kq(tp(e.nodeLookup,{filter:$Ne}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},UNe="react-flow__minimap-desc";function k9({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:c,bgColor:f,maskColor:u,maskStrokeColor:m,maskStrokeWidth:h,position:p="bottom-right",onClick:y,onNodeClick:w,pannable:x=!1,zoomable:S=!1,ariaLabel:E,inversePan:O,zoomStep:C=1,offsetScale:A=5}){const N=Kt(),T=b.useRef(null),{boundingRect:P,viewBB:k,rfId:D,panZoom:K,translateExtent:L,flowWidth:I,flowHeight:W,ariaLabelConfig:$}=ot(BNe,Ft),V=(e==null?void 0:e.width)??LNe,R=(e==null?void 0:e.height)??zNe,H=P.width/V,q=P.height/R,F=Math.max(H,q),Y=F*V,B=F*R,z=A*F,X=P.x-(Y-P.width)/2-z,Z=P.y-(B-P.height)/2-z,ee=Y+z*2,se=B+z*2,ae=`${UNe}-${D}`,re=b.useRef(0),J=b.useRef();re.current=F,b.useEffect(()=>{if(T.current&&K)return J.current=fOe({domNode:T.current,panZoom:K,getTransform:()=>N.getState().transform,getViewScale:()=>re.current}),()=>{var ge;(ge=J.current)==null||ge.destroy()}},[K]),b.useEffect(()=>{var ge;(ge=J.current)==null||ge.update({translateExtent:L,width:I,height:W,inversePan:O,pannable:x,zoomStep:C,zoomable:S})},[x,S,O,C,L,I,W]);const le=y?ge=>{var Me;const[ye,Ie]=((Me=J.current)==null?void 0:Me.pointer(ge))||[0,0];y(ge,{x:ye,y:Ie})}:void 0,me=w?b.useCallback((ge,ye)=>{const Ie=N.getState().nodeLookup.get(ye).internals.userNode;w(ge,Ie)},[]):void 0,ne=E??$["minimap.ariaLabel"];return v.jsx(bb,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*F:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:bn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:v.jsxs("svg",{width:V,height:R,viewBox:`${X} ${Z} ${ee} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ae,ref:T,onClick:le,children:[ne&&v.jsx("title",{id:ae,children:ne}),v.jsx(INe,{onClick:me,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:s,nodeComponent:c}),v.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-z},${Z-z}h${ee+z*2}v${se+z*2}h${-ee-z*2}z
        M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}k9.displayName="MiniMap";b.memo(k9);const HNe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,FNe={[$f.Line]:"right",[$f.Handle]:"bottom-right"};function qNe({nodeId:e,position:t,variant:n=$f.Handle,className:r,style:a=void 0,children:i,color:s,minWidth:c=10,minHeight:f=10,maxWidth:u=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:p,autoScale:y=!0,shouldResize:w,onResizeStart:x,onResize:S,onResizeEnd:E}){const O=f9(),C=typeof e=="string"?e:O,A=Kt(),N=b.useRef(null),T=n===$f.Handle,P=ot(b.useCallback(HNe(T&&y),[T,y]),Ft),k=b.useRef(null),D=t??FNe[n];b.useEffect(()=>{if(!(!N.current||!C))return k.current||(k.current=jOe({domNode:N.current,nodeId:C,getStoreItems:()=>{const{nodeLookup:L,transform:I,snapGrid:W,snapToGrid:$,nodeOrigin:V,domNode:R}=A.getState();return{nodeLookup:L,transform:I,snapGrid:W,snapToGrid:$,nodeOrigin:V,paneDomNode:R}},onChange:(L,I)=>{const{triggerNodeChanges:W,nodeLookup:$,parentLookup:V,nodeOrigin:R}=A.getState(),H=[],q={x:L.x,y:L.y},F=$.get(C);if(F&&F.expandParent&&F.parentId){const Y=F.origin??R,B=L.width??F.measured.width??0,z=L.height??F.measured.height??0,X={id:F.id,parentId:F.parentId,rect:{width:B,height:z,...Iq({x:L.x??F.position.x,y:L.y??F.position.y},{width:B,height:z},F.parentId,$,Y)}},Z=UA([X],$,V,R);H.push(...Z),q.x=L.x?Math.max(Y[0]*B,L.x):void 0,q.y=L.y?Math.max(Y[1]*z,L.y):void 0}if(q.x!==void 0&&q.y!==void 0){const Y={id:C,type:"position",position:{...q}};H.push(Y)}if(L.width!==void 0&&L.height!==void 0){const B={id:C,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};H.push(B)}for(const Y of I){const B={...Y,type:"position"};H.push(B)}W(H)},onEnd:({width:L,height:I})=>{const W={id:C,type:"dimensions",resizing:!1,dimensions:{width:L,height:I}};A.getState().triggerNodeChanges([W])}})),k.current.update({controlPosition:D,boundaries:{minWidth:c,minHeight:f,maxWidth:u,maxHeight:m},keepAspectRatio:h,resizeDirection:p,onResizeStart:x,onResize:S,onResizeEnd:E,shouldResize:w}),()=>{var L;(L=k.current)==null||L.destroy()}},[D,c,f,u,m,h,x,S,E,w]);const K=D.split("-");return v.jsx("div",{className:bn(["react-flow__resize-control","nodrag",...K,n,r]),ref:N,style:{...a,scale:P,...s&&{[T?"backgroundColor":"borderColor"]:s}},children:i})}b.memo(qNe);function KNe(e){const[t,n]=b.useState(null),[r,a]=b.useState(!1),i=b.useRef(null);return b.useEffect(()=>{const s=new EventSource(`/api/sessions/${e}/tree`);return i.current=s,s.onopen=()=>a(!0),s.onmessage=c=>{try{const f=JSON.parse(c.data);n(f)}catch{}},s.onerror=()=>{a(!1)},()=>{s.close(),i.current=null}},[e]),{tree:t,connected:r}}const D9=180,VNe=70,qy=24,YNe=60;function GNe({data:e}){const t=e.pending?"agent-flow-node pending":`agent-flow-node ${KM(e.status)}`;return v.jsxs("div",{className:t,children:[v.jsx(Bf,{type:"target",position:De.Top}),v.jsx("div",{className:"agent-flow-role",children:e.pending?`[pending: ${e.role}]`:e.role}),!e.pending&&v.jsxs("div",{className:"agent-flow-meta",children:[v.jsx("span",{className:`status-dot ${KM(e.status)}`}),v.jsx("span",{children:e.status}),e.duration_ms!=null&&v.jsx("span",{children:b0(e.duration_ms)}),e.exit_code!=null&&v.jsxs("span",{children:["exit ",e.exit_code]})]}),v.jsx(Bf,{type:"source",position:De.Bottom})]})}const XNe={agent:GNe};function WNe(e,t){const n=new Map(e.map(c=>[c.agent_id,c])),r=new Map;for(const c of e){const f=c.parent;r.has(f)||r.set(f,[]),r.get(f).push(c.agent_id)}const a=new Map;for(const c of t){const f=c.requested_by;f&&n.has(f)&&(a.has(f)||a.set(f,[]),a.get(f).push(c))}function i(c){const f=(r.get(c)||[]).map(i),u=(a.get(c)||[]).map(m=>({id:`pending-${m.span_id}`,children:[]}));return{id:c,children:[...f,...u]}}return(r.get(null)||[]).map(i)}function Ky(e){return e.children.length===0?D9:e.children.reduce((t,n)=>t+Ky(n)+qy,-qy)}function I9(e,t,n,r){if(r.set(e.id,{x:t-D9/2,y:n}),e.children.length===0)return;const a=Ky(e);let i=t-a/2;for(const s of e.children){const c=Ky(s),f=i+c/2;I9(s,f,n+VNe+YNe,r),i+=c+qy}}function QNe({runId:e}){return v.jsx(P9,{children:v.jsx(ZNe,{runId:e})})}function ZNe({runId:e}){const{tree:t,connected:n}=KNe(e),{fitView:r}=xb(),a=b.useCallback(()=>{r({duration:300})},[r]),{flowNodes:i,flowEdges:s}=b.useMemo(()=>{if(!t)return{flowNodes:[],flowEdges:[]};const c=WNe(t.nodes,t.pending_delegations),f=new Map;let u=0;for(const w of c){const x=Ky(w),S=u+x/2;I9(w,S,0,f),u+=x+qy*2}const m=new Map(t.nodes.map(w=>[w.agent_id,w])),h=new Map(t.pending_delegations.map(w=>[`pending-${w.span_id}`,w])),p=[];for(const[w,x]of f){const S=m.get(w),E=h.get(w);S?p.push({id:w,type:"agent",position:x,data:{label:S.role,role:S.role,status:S.status,runtime:S.runtime,duration_ms:S.duration_ms,exit_code:S.exit_code}}):E&&p.push({id:w,type:"agent",position:x,data:{label:E.role,role:E.role,status:"running",runtime:"",duration_ms:null,exit_code:null,pending:!0}})}const y=[];for(const w of t.nodes)w.parent&&y.push({id:`e-${w.parent}-${w.agent_id}`,source:w.parent,target:w.agent_id,type:"smoothstep",markerEnd:{type:Df.ArrowClosed,width:16,height:16}});for(const w of t.pending_delegations)w.requested_by&&y.push({id:`e-${w.requested_by}-pending-${w.span_id}`,source:w.requested_by,target:`pending-${w.span_id}`,type:"smoothstep",markerEnd:{type:Df.ArrowClosed,width:16,height:16},style:{strokeDasharray:"5 3"}});return{flowNodes:p,flowEdges:y}},[t]);return t?v.jsxs("div",{children:[v.jsxs("div",{className:"react-flow-wrapper",children:[v.jsx(bNe,{nodes:i,edges:s,nodeTypes:XNe,fitView:!0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0}}),v.jsx("button",{className:"tree-reset-btn",onClick:a,children:"Reset View"})]}),t.denied_delegations.length>0&&v.jsxs("div",{className:"denied-list",children:[v.jsx("strong",{children:"Denied delegations:"}),t.denied_delegations.map(c=>v.jsxs("span",{className:"denied-item",children:[c.role," (",c.reason,")"]},c.span_id))]})]}):v.jsx("div",{className:"agent-tree",children:v.jsx("p",{className:"agent-meta",children:n?"Loading tree...":"Connecting..."})})}const ql=18,H3=10;function JNe({runId:e,agents:t,active:n}){var V;const r=Object.keys(t),a=r.find(R=>t[R].parent===null)??r[0]??"",[i,s]=b.useState(a),{lines:c,connected:f,done:u}=NB(e,i,!0),[m,h]=b.useState(""),p=m.toLowerCase(),y=m?c.reduce((R,H,q)=>(H.toLowerCase().includes(p)&&R.push(q),R),[]):[],w=b.useRef(null),[x,S]=b.useState(0),[E,O]=b.useState(0),[C,A]=b.useState(!0),N=b.useRef(0),T=c.length*ql,P=Math.max(0,Math.floor(x/ql)-H3),k=Math.ceil(E/ql)+H3*2,D=Math.min(c.length,P+k),K=c.slice(P,D),L=String(c.length).length,I=b.useCallback(()=>{const R=w.current;if(!R)return;S(R.scrollTop),O(R.clientHeight);const H=R.scrollTop+R.clientHeight>=R.scrollHeight-ql*2;A(H)},[]);b.useEffect(()=>{const R=w.current;R&&O(R.clientHeight)},[]),b.useEffect(()=>{if(C&&c.length>N.current){const R=w.current;R&&(R.scrollTop=R.scrollHeight)}N.current=c.length},[c.length,C]);const W=()=>{const R=w.current;R&&(R.scrollTop=R.scrollHeight,A(!0))},$=async()=>{try{const R=await fetch(`/api/sessions/${e}/logs/${i}/full`);if(!R.ok)return;const H=await R.text(),q=new Blob([H],{type:"text/plain"}),F=URL.createObjectURL(q),Y=document.createElement("a");Y.href=F,Y.download=`${i}.log`,Y.click(),URL.revokeObjectURL(F)}catch{}};return v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[r.length>1&&v.jsxs(Ao,{value:i,onValueChange:s,children:[v.jsx(To,{className:"w-[220px]",children:v.jsx(No,{})}),v.jsx(Po,{children:r.map(R=>v.jsxs(ur,{value:R,children:[t[R].role," (",R.slice(0,8),")"]},R))})]}),r.length===1&&v.jsxs("span",{className:"text-sm text-muted-foreground",children:[(V=t[i])==null?void 0:V.role," (",i.slice(0,8),")"]}),v.jsxs("div",{className:"relative ml-auto",children:[v.jsx(lB,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),v.jsx(Et,{className:"h-8 w-[200px] pl-7 text-xs",placeholder:"Search logs...",value:m,onChange:R=>h(R.target.value)})]}),m&&v.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.length," match",y.length!==1?"es":""]}),v.jsxs(je,{variant:"outline",size:"sm",onClick:$,children:[v.jsx(v0,{className:"mr-1 h-3.5 w-3.5"}),"Download"]}),v.jsx(eTe,{connected:f,done:u,active:n})]}),v.jsxs("div",{className:"relative",children:[v.jsx("div",{ref:w,className:"h-[500px] overflow-auto rounded-md bg-[#1e1e1e] font-mono text-xs text-[#d4d4d4]",onScroll:I,children:c.length===0?v.jsx("div",{className:"flex h-full items-center justify-center text-[#666]",children:n&&!u?"Waiting for log output...":"No log output."}):v.jsx("div",{style:{height:T,position:"relative"},children:v.jsx("div",{style:{position:"absolute",top:P*ql,left:0,right:0},children:K.map((R,H)=>{const q=P+H,F=m&&R.toLowerCase().includes(p);return v.jsxs("div",{className:F?"bg-yellow-900/30":void 0,style:{height:ql,lineHeight:`${ql}px`,display:"flex",whiteSpace:"pre"},children:[v.jsx("span",{className:"select-none text-right text-[#555]",style:{width:`${(L+2)*.6}em`,paddingRight:"1em",flexShrink:0},children:q+1}),v.jsx("span",{children:F?v.jsx(tTe,{line:R,search:p}):R})]},q)})})})}),!C&&c.length>0&&v.jsxs(je,{size:"sm",variant:"secondary",className:"absolute bottom-3 right-4 shadow-md",onClick:W,children:[v.jsx(vte,{className:"mr-1 h-3.5 w-3.5"}),"Jump to bottom"]})]})]})}function eTe({connected:e,done:t,active:n}){return t||!n?v.jsx("span",{className:"text-xs text-muted-foreground",children:"Session ended"}):v.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[v.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${e?"animate-pulse bg-green-500":"bg-orange-400"}`}),e?"Live":"Connecting..."]})}function tTe({line:e,search:t}){const n=[],r=e.toLowerCase();let a=0,i=r.indexOf(t,a),s=0;for(;i!==-1;)i>a&&n.push(e.slice(a,i)),n.push(v.jsx("span",{className:"bg-yellow-500/60 text-white",children:e.slice(i,i+t.length)},s++)),a=i+t.length,i=r.indexOf(t,a);return a<e.length&&n.push(e.slice(a)),v.jsx(v.Fragment,{children:n})}function nTe(e){return qt({mutationFn:t=>Ue.post(`/sessions/${e}/respond`,t)})}function rTe({runId:e,pendingAskUser:t,initialMessages:n}){const[r,a]=b.useState([]),[i,s]=b.useState(""),c=nTe(e),f=b.useRef(null),u=b.useRef(null),m=b.useRef(new Set);b.useEffect(()=>{!n||n.length===0||a(y=>{const w=new Set(y.map(E=>E.id)),x=n.filter(E=>!w.has(E.id));if(x.length===0)return y;const S=[...x,...y];S.sort((E,O)=>E.timestamp-O.timestamp);for(const E of S)m.current.add(E.id);return S})},[n]),b.useEffect(()=>{t&&u.current!==t.request_id&&(u.current=t.request_id,!m.current.has(t.request_id)&&(m.current.add(t.request_id),a(y=>[...y,{id:t.request_id,role:"agent",text:t.question,timestamp:t.timestamp}])))},[t]),b.useEffect(()=>{var y;(y=f.current)==null||y.scrollIntoView({behavior:"smooth"})},[r]);const h=async y=>{if(!y.trim()||!t)return;const w=`user-${t.request_id}`;m.current.has(w)||(m.current.add(w),a(x=>[...x,{id:w,role:"user",text:y.trim(),timestamp:Date.now()/1e3}])),s("");try{await c.mutateAsync({request_id:t.request_id,text:y.trim()})}catch{}},p=y=>{h(y)};return v.jsx(dn,{className:"flex h-[500px] flex-col",children:v.jsxs(hn,{className:"flex flex-1 flex-col gap-3 overflow-hidden p-4",children:[v.jsx(Am,{className:"flex-1",children:v.jsxs("div",{className:"space-y-3 pr-3",children:[r.length===0&&v.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-muted-foreground",children:[v.jsx(tne,{className:"h-8 w-8"}),v.jsx("p",{className:"text-sm",children:"Waiting for the agent to ask a question..."})]}),r.map(y=>v.jsx("div",{className:Oe("flex",y.role==="user"?"justify-end":"justify-start"),children:v.jsx("div",{className:Oe("max-w-[80%] rounded-lg px-3 py-2 text-sm",y.role==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:v.jsx("p",{className:"whitespace-pre-wrap",children:y.text})})},y.id)),v.jsx("div",{ref:f})]})}),t&&v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"flex items-center gap-2",children:v.jsxs(vn,{variant:"outline",className:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-400",children:[v.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-amber-500"}),"Waiting for response"]})}),t.choices&&t.choices.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.choices.map(y=>v.jsx(je,{variant:"outline",size:"sm",onClick:()=>p(y),disabled:c.isPending,children:y},y))})]}),v.jsxs("form",{className:"flex gap-2",onSubmit:y=>{y.preventDefault(),h(i)},children:[v.jsx(Et,{value:i,onChange:y=>s(y.target.value),placeholder:t?"Type your response...":"Waiting for agent question...",disabled:!t||c.isPending}),v.jsx(je,{type:"submit",size:"icon",disabled:!t||!i.trim()||c.isPending,children:v.jsx(gne,{className:"h-4 w-4"})})]})]})})}function aTe(e,t){const[n,r]=b.useState([]),[a,i]=b.useState(!1),s=b.useRef(null),c=b.useRef(""),f=b.useRef(void 0),u=b.useRef(1e3);return b.useEffect(()=>{if(!t)return;c.current!==e&&(r([]),c.current=e);function m(){const h=new EventSource(`/api/sessions/${e}/events`);s.current=h,h.onopen=()=>{i(!0),u.current=1e3},h.addEventListener("snapshot",p=>{try{const y=JSON.parse(p.data);y.events&&Array.isArray(y.events)&&r(y.events)}catch{}}),h.addEventListener("delta",p=>{try{const y=JSON.parse(p.data);y.events&&Array.isArray(y.events)&&r(w=>[...w,...y.events])}catch{}}),h.onmessage=p=>{try{const y=JSON.parse(p.data);y.events&&Array.isArray(y.events)&&r(y.events)}catch{}},h.onerror=()=>{h.close(),s.current=null,i(!1),f.current=setTimeout(()=>{u.current=Math.min(u.current*2,15e3),m()},u.current)}}return m(),()=>{var h;(h=s.current)==null||h.close(),s.current=null,f.current&&clearTimeout(f.current)}},[e,t]),{events:n,connected:a}}function iTe(e,t){const[n,r]=b.useState(null),[a,i]=b.useState([]),s=b.useRef(null),c=b.useRef(void 0),f=b.useRef(1e3);return b.useEffect(()=>{if(!t){r(null),i([]);return}function u(){const m=new EventSource(`/api/sessions/${e}/tree`);s.current=m,m.onopen=()=>{f.current=1e3},m.addEventListener("chat_history",h=>{try{const p=JSON.parse(h.data);p.messages&&i(p.messages)}catch{}}),m.addEventListener("ask_user",h=>{try{const p=JSON.parse(h.data);r(p)}catch{}}),m.addEventListener("ask_user_resolved",()=>{r(null)}),m.onerror=()=>{m.close(),s.current=null,c.current=setTimeout(()=>{f.current=Math.min(f.current*2,15e3),u()},f.current)}}return u(),()=>{var m;(m=s.current)==null||m.close(),s.current=null,c.current&&clearTimeout(c.current)}},[e,t]),{pendingAskUser:n,chatMessages:a}}function oTe(){return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-64"}),v.jsx(tn,{className:"h-32 rounded-lg"}),v.jsx(tn,{className:"h-64 rounded-lg"})]})}function sTe(){const{projectId:e,runId:t}=aj(),[n]=AY(),r=Number(e),a=C=>C==="starting"||C==="running",i=fre(r,t??"",{refetchInterval:void 0}),s=i.data,c=a(s==null?void 0:s.status);b.useEffect(()=>{if(!c)return;const C=setInterval(()=>i.refetch(),2e3);return()=>clearInterval(C)},[c,i]);const{events:f}=aTe(t??"",c),u=(s==null?void 0:s.events)??[],m=f.length>0?f:u,h=!!(s!=null&&s.interactive),{pendingAskUser:p,chatMessages:y}=iTe(t??"",c&&h),[w,x]=b.useState(void 0);if(b.useEffect(()=>{p&&x("chat")},[p]),i.isLoading)return v.jsx(oTe,{});if(i.error)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",i.error.message]})]});if(!s)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsx("span",{children:"Session not found"})]});const S=mTe(m),E=hTe(m),O=n.get("tab")??(c?"agent-tree":"overview");return v.jsxs("div",{className:"space-y-6",children:[v.jsx(lTe,{session:s,projectId:r,runId:t??"",onStopped:()=>i.refetch()}),v.jsx(fTe,{session:s}),v.jsxs(CA,{value:w??O,onValueChange:x,children:[v.jsxs(OA,{children:[v.jsx(Sa,{value:"overview",children:"Overview"}),h&&v.jsxs(Sa,{value:"chat",className:"relative",children:["Chat",p&&v.jsx("span",{className:"ml-1.5 inline-block h-2 w-2 animate-pulse rounded-full bg-amber-500"})]}),v.jsx(Sa,{value:"agent-tree",children:"Agent Tree"}),v.jsx(Sa,{value:"logs",children:"Logs"}),v.jsxs(Sa,{value:"trace",children:["Trace",m.length>0&&` (${m.length})`]}),v.jsxs(Sa,{value:"artifacts",children:["Artifacts",S.length>0&&` (${S.length})`]})]}),v.jsxs(Ea,{value:"overview",className:"space-y-4",children:[s.task&&v.jsxs("section",{className:"space-y-2",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Task"}),v.jsx(dn,{children:v.jsx(hn,{className:"pt-4",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm",children:s.task})})})]}),E&&v.jsxs("section",{className:"space-y-2",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Output"}),v.jsx(dn,{children:v.jsx(hn,{className:"pt-4",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm leading-relaxed",children:v.jsx(dTe,{runId:s.run_id,hash:E})})})})]}),!s.task&&!E&&v.jsx("p",{className:"text-sm text-muted-foreground",children:"No overview information available yet."})]}),h&&v.jsx(Ea,{value:"chat",children:v.jsx(rTe,{runId:s.run_id,pendingAskUser:p,initialMessages:y})}),v.jsx(Ea,{value:"agent-tree",children:v.jsx(QNe,{runId:s.run_id})}),v.jsx(Ea,{value:"logs",children:Object.keys(s.agents).length>0?v.jsx(JNe,{runId:s.run_id,agents:s.agents,active:c}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents registered yet."})}),v.jsx(Ea,{value:"trace",children:m.length>0?v.jsx(bTe,{events:m,runId:s.run_id}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No trace events recorded yet."})}),v.jsx(Ea,{value:"artifacts",children:S.length>0?v.jsx(pTe,{artifacts:S,runId:s.run_id}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No artifacts recorded yet."})})]})]})}function lTe({session:e,projectId:t,runId:n,onStopped:r}){const[a,i]=b.useState(!1),s=iae(),c=e.status==="starting"||e.status==="running";return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("h1",{className:"text-2xl font-bold tracking-tight",children:["Session ",e.run_id.slice(0,16)]}),v.jsxs("div",{className:"flex gap-2",children:[c&&(a?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(je,{size:"sm",variant:"destructive",onClick:async()=>{await s.mutateAsync(n),i(!1),r()},disabled:s.isPending,children:"Confirm"}),v.jsx(je,{size:"sm",variant:"outline",onClick:()=>i(!1),children:"Cancel"})]}):v.jsxs(je,{variant:"destructive",onClick:()=>i(!0),children:[v.jsx(oB,{className:"mr-2 h-4 w-4"}),"Stop Session"]})),v.jsx(je,{variant:"outline",asChild:!0,children:v.jsxs(Ya,{to:`/projects/${t}`,children:[v.jsx(eB,{className:"mr-2 h-4 w-4"}),"Back"]})})]})]})}function cTe({status:e}){const t=uTe(e);return v.jsxs(vn,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="warning"&&"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:[e==="running"&&v.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}function uTe(e){switch(e){case"running":case"starting":return"running";case"completed":return"success";case"failed":return"error";case"stopped":return"warning";default:return"default"}}function fTe({session:e}){return v.jsx(dn,{children:v.jsx(hn,{className:"pt-6",children:v.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Status"}),v.jsx("dd",{children:v.jsx(cTe,{status:e.status})}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Role"}),v.jsx("dd",{children:e.role}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Runtime"}),v.jsx("dd",{children:e.runtime}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Isolation"}),v.jsx("dd",{children:e.isolation}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Started"}),v.jsx("dd",{children:Bg(e.started_at)}),e.ended_at&&v.jsxs(v.Fragment,{children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Ended"}),v.jsx("dd",{children:Bg(e.ended_at)})]}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Duration"}),v.jsx("dd",{children:b0(e.duration_ms)}),e.exit_code!==null&&v.jsxs(v.Fragment,{children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Exit Code"}),v.jsx("dd",{children:e.exit_code})]})]})})})}function dTe({runId:e,hash:t}){const[n,r]=b.useState(null),[a,i]=b.useState(null);return b.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(s=>{if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}).then(r).catch(s=>i(s.message))},[e,t]),a?v.jsxs("span",{className:"text-destructive",children:["Error: ",a]}):n===null?v.jsx("span",{className:"text-muted-foreground",children:"Loading..."}):v.jsx(v.Fragment,{children:n})}function hTe(e){for(const t of e)if(t.event==="session_end"&&t.data.output_ref)return String(t.data.output_ref);return null}function mTe(e){const t=[];for(const n of e){const r=n.data;n.event==="agent_spawn"&&(r.context_ref&&t.push({label:`Agent Context (${r.role||"agent"})`,hash:String(r.context_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0}),r.task_ref&&t.push({label:`Agent Task (${r.role||"agent"})`,hash:String(r.task_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0})),n.event==="session_end"&&r.output_ref&&t.push({label:"Session Output",hash:String(r.output_ref),event:n.event}),n.event==="agent_end"&&r.output_ref&&t.push({label:`Agent Output (${r.agent_id||"agent"})`,hash:String(r.output_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0}),n.event==="memory_get"&&(r.cards_ref&&t.push({label:`Memory Cards (${r.provider||"memory"})`,hash:String(r.cards_ref),event:n.event}),r.behavior_ref&&t.push({label:`Memory Get Behavior (${r.role||"agent"})`,hash:String(r.behavior_ref),event:n.event}),r.task_ref&&t.push({label:`Memory Get Task (${r.role||"agent"})`,hash:String(r.task_ref),event:n.event})),n.event==="memory_dump"&&(r.output_ref&&t.push({label:`Memory Dump Output (${r.provider||"memory"})`,hash:String(r.output_ref),event:n.event}),r.behavior_ref&&t.push({label:`Memory Dump Behavior (${r.provider||"memory"})`,hash:String(r.behavior_ref),event:n.event}),r.task_ref&&t.push({label:`Memory Dump Task (${r.provider||"memory"})`,hash:String(r.task_ref),event:n.event})),n.event==="delegate_start"&&r.context_ref&&t.push({label:`Delegation Context (${r.role||"delegate"})`,hash:String(r.context_ref),event:n.event}),n.event==="delegate_end"&&r.output_ref&&t.push({label:`Delegation Output (${r.role||"delegate"})`,hash:String(r.output_ref),event:n.event})}return t}function pTe({artifacts:e,runId:t}){return v.jsx("div",{className:"space-y-1",children:e.map(n=>v.jsxs(dC,{children:[v.jsxs(hC,{className:"flex w-full items-center gap-2 rounded-md bg-muted/50 px-3 py-2 text-sm hover:bg-muted",children:[v.jsx(p0,{className:"h-3 w-3 transition-transform [[data-state=open]>&]:rotate-90"}),v.jsx("span",{className:"font-medium text-primary",children:n.label})]}),v.jsx(mC,{children:v.jsx(vTe,{runId:t,hash:n.hash})})]},`${n.event}-${n.hash}`))})}function vTe({runId:e,hash:t}){const[n,r]=b.useState(null),[a,i]=b.useState(null);return b.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(s=>{if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}).then(r).catch(s=>i(s.message))},[e,t]),a?v.jsxs("p",{className:"px-3 py-2 text-sm text-destructive",children:["Error: ",a]}):n===null?v.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Loading..."}):v.jsx(Am,{className:"max-h-[300px] overflow-hidden",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-b-md bg-muted/30 px-3 py-2 font-mono text-xs leading-relaxed",children:n})})}function gTe({event:e}){const t=yTe(e);return v.jsx(vn,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:e})}function yTe(e){return e.endsWith("_start")||e==="agent_spawn"?"running":e.endsWith("_end")?"success":e.includes("denied")||e.includes("error")?"error":"default"}function bTe({events:e,runId:t}){const[n,r]=b.useState(null);return v.jsxs(v.Fragment,{children:[v.jsx(dn,{children:v.jsx(hn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Time"}),v.jsx(Xe,{children:"Event"}),v.jsx(Xe,{children:"Span"}),v.jsx(Xe,{children:"Details"})]})}),v.jsx(Kc,{children:e.map((a,i)=>v.jsxs(Ir,{children:[v.jsx(We,{className:"text-sm text-muted-foreground",children:Bg(a.ts)}),v.jsx(We,{children:v.jsx(gTe,{event:a.event})}),v.jsx(We,{className:"font-mono text-xs text-muted-foreground",children:a.span_id.slice(0,8)}),v.jsx(We,{className:"max-w-[400px] text-sm",children:wTe(a,(s,c)=>r({hash:s,label:c}))})]},i))})]})})}),v.jsx($c,{open:!!n,onOpenChange:()=>r(null),children:v.jsxs(Bc,{className:"max-w-3xl overflow-hidden",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:n==null?void 0:n.label})}),n&&v.jsx(xTe,{runId:t,hash:n.hash})]})})]})}function xTe({runId:e,hash:t}){const[n,r]=b.useState(null),[a,i]=b.useState(null);return b.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(s=>{if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}).then(r).catch(s=>i(s.message))},[e,t]),a?v.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",a]}):n===null?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):v.jsx(Am,{className:"max-h-[60vh]",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/30 p-4 font-mono text-xs leading-relaxed",children:n})})}function wTe(e,t){const n=e.data,r=[];for(const[i,s]of Object.entries(n))if(i.endsWith("_ref")&&s){const c=i.replace(/_ref$/,"");r.push(v.jsx("button",{className:"rounded border border-primary/30 bg-primary/5 px-1.5 py-0.5 font-mono text-xs text-primary hover:bg-primary/10",onClick:()=>t(String(s),c),children:c},i))}const a=[];for(const[i,s]of Object.entries(n)){if(i.endsWith("_ref")||s==null||s==="")continue;const c=i==="duration_ms"?b0(s):Array.isArray(s)?s.join(", "):String(s);a.push(v.jsxs("span",{children:[v.jsxs("span",{className:"text-muted-foreground",children:[i,"="]}),v.jsx("span",{children:c})]},i))}return v.jsxs(v.Fragment,{children:[r.length>0&&v.jsx("div",{className:"mb-1 flex flex-wrap gap-1",children:r}),a.length>0&&v.jsx("div",{className:"flex flex-wrap gap-x-2 gap-y-0.5 text-xs text-muted-foreground",children:a})]})}const STe={skills:["denden"],roles:["ai-ceo","ai-employee"],agents:["strawpot-claude-code"],memories:["dial"]},ETe={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory Providers"};function _Te(){const{resourceType:e="roles"}=aj(),{data:t,isLoading:n}=cc(e),[r,a]=b.useState(null),[i,s]=b.useState(!1),[c,f]=b.useState(!1),{data:u}=Rae(e,r??"",{enabled:i&&!!r}),m=ETe[e]??e;return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:m}),v.jsxs("p",{className:"text-sm text-muted-foreground",children:["Installed ",m.toLowerCase()," from StrawHub"]})]}),v.jsxs(je,{onClick:()=>f(!0),size:"sm",children:[v.jsx(v0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),n?v.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((h,p)=>v.jsx(tn,{className:"h-12 w-full"},p))}):!t||t.length===0?v.jsxs("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:["No ",m.toLowerCase()," installed yet."]}):v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Name"}),v.jsx(Xe,{children:"Version"}),v.jsx(Xe,{children:"Description"}),v.jsx(Xe,{children:"Source"}),v.jsx(Xe,{className:"w-24"})]})}),v.jsx(Kc,{children:t.map(h=>{var p;return v.jsxs(Ir,{className:"cursor-pointer",onClick:()=>{a(h.name),s(!0)},children:[v.jsx(We,{className:"font-medium",children:h.name}),v.jsx(We,{className:"text-sm text-muted-foreground",children:h.version??"—"}),v.jsx(We,{className:"max-w-[300px] truncate text-sm",children:h.description||"—"}),v.jsx(We,{children:v.jsx(vn,{variant:"outline",className:"text-xs",children:h.source})}),v.jsx(We,{children:!((p=STe[e])!=null&&p.includes(h.name))&&v.jsx(jTe,{resourceType:e,name:h.name})})]},h.name)})})]}),v.jsx(LB,{resource:u??null,resourceType:e,open:i,onOpenChange:s}),v.jsx(pC,{open:c,onOpenChange:f,defaultType:e})]})}function jTe({resourceType:e,name:t}){const[n,r]=b.useState(!1),a=DB(),i=s=>{s.stopPropagation(),a.mutate({type:e,name:t},{onSuccess:c=>{c.exit_code===0?pt.success(`Uninstalled ${t}`):pt.error(`Uninstall failed: ${c.stderr||c.stdout}`),r(!1)},onError:()=>{pt.error("Uninstall request failed"),r(!1)}})};return n?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(je,{size:"sm",variant:"destructive",onClick:i,disabled:a.isPending,children:"Confirm"}),v.jsx(je,{size:"sm",variant:"outline",onClick:s=>{s.stopPropagation(),r(!1)},children:"No"})]}):v.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:s=>{s.stopPropagation(),r(!0)},children:v.jsx(Xf,{className:"h-4 w-4"})})}function CTe(){return $n({queryKey:Ye.schedules.all,queryFn:()=>Ue.get("/schedules")})}function OTe(){const e=jt();return qt({mutationFn:t=>Ue.post("/schedules",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}function ATe(){const e=jt();return qt({mutationFn:({id:t,...n})=>Ue.put(`/schedules/${t}`,n),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}function NTe(){const e=jt();return qt({mutationFn:t=>Ue.delete(`/schedules/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}function TTe(){const e=jt();return qt({mutationFn:({id:t,enable:n})=>Ue.post(`/schedules/${t}/${n?"enable":"disable"}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}var YS={exports:{}},F3;function PTe(){return F3||(F3=1,(function(e,t){(function(r,a){e.exports=a()})(globalThis,()=>(()=>{var n={949(s,c,f){Object.defineProperty(c,"__esModule",{value:!0}),c.CronParser=void 0;var u=f(515),m=(function(){function h(p,y,w){y===void 0&&(y=!0),w===void 0&&(w=!1),this.expression=p,this.dayOfWeekStartIndexZero=y,this.monthStartIndexZero=w}return h.prototype.parse=function(){var p,y,w=(p=this.expression)!==null&&p!==void 0?p:"";if(w==="@reboot")return y=["@reboot","","","","","",""],y;if(w.startsWith("@")){var x=this.parseSpecial(this.expression);y=this.extractParts(x)}else y=this.extractParts(this.expression);return this.normalize(y),this.validate(y),y},h.prototype.parseSpecial=function(p){var y={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},w=y[p];if(!w)throw new Error("Unknown special expression.");return w},h.prototype.extractParts=function(p){if(!this.expression)throw new Error("cron expression is empty");for(var y=p.trim().split(/[ ]+/),w=0;w<y.length;w++)if(y[w].includes(",")){var x=y[w].split(",").map(function(E){return E.trim()}).filter(function(E){return E!==""}).map(function(E){return isNaN(Number(E))?E:Number(E)}).filter(function(E){return E!==null&&E!==""});x.length===0&&x.push("*"),x.sort(function(E,O){return E!==null&&O!==null?E-O:0}),y[w]=x.map(function(E){return E!==null?E.toString():""}).join(",")}if(y.length<5)throw new Error("Expression has only ".concat(y.length," part").concat(y.length==1?"":"s",". At least 5 parts are required."));if(y.length==5)y.unshift(""),y.push("");else if(y.length==6){var S=/\d{4}$/.test(y[5])||y[4]=="?"||y[2]=="?";S?y.unshift(""):y.push("")}else if(y.length>7)throw new Error("Expression has ".concat(y.length," parts; too many!"));return y},h.prototype.normalize=function(p){var y=this;if(p[3]=p[3].replace("?","*"),p[5]=p[5].replace("?","*"),p[2]=p[2].replace("?","*"),p[0].indexOf("0/")==0&&(p[0]=p[0].replace("0/","*/")),p[1].indexOf("0/")==0&&(p[1]=p[1].replace("0/","*/")),p[2].indexOf("0/")==0&&(p[2]=p[2].replace("0/","*/")),p[3].indexOf("1/")==0&&(p[3]=p[3].replace("1/","*/")),p[4].indexOf("1/")==0&&(p[4]=p[4].replace("1/","*/")),p[6].indexOf("1/")==0&&(p[6]=p[6].replace("1/","*/")),p[5]=p[5].replace(/(^\d)|([^#/\s]\d)/g,function(N){var T=N.replace(/\D/,""),P=T;return y.dayOfWeekStartIndexZero?T=="7"&&(P="0"):P=(parseInt(T)-1).toString(),N.replace(T,P)}),p[5]=="L"&&(p[5]="6"),p[3]=="?"&&(p[3]="*"),p[3].indexOf("W")>-1&&(p[3].indexOf(",")>-1||p[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var w={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var x in w)p[5]=p[5].replace(new RegExp(x,"gi"),w[x].toString());p[4]=p[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(N){var T=N.replace(/\D/,""),P=T;return y.monthStartIndexZero&&(P=(parseInt(T)+1).toString()),N.replace(T,P)});var S={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var E in S)p[4]=p[4].replace(new RegExp(E,"gi"),S[E].toString());p[0]=="0"&&(p[0]=""),!/\*|\-|\,|\//.test(p[2])&&(/\*|\//.test(p[1])||/\*|\//.test(p[0]))&&(p[2]+="-".concat(p[2]));for(var O=0;O<p.length;O++)if(p[O].indexOf(",")!=-1&&(p[O]=p[O].split(",").filter(function(N){return N!==""}).join(",")||"*"),p[O]=="*/1"&&(p[O]="*"),p[O].indexOf("/")>-1&&!/^\*|\-|\,/.test(p[O])){var C=null;switch(O){case 4:C="12";break;case 5:C="6";break;case 6:C="9999";break;default:C=null;break}if(C!==null){var A=p[O].split("/");p[O]="".concat(A[0],"-").concat(C,"/").concat(A[1])}}},h.prototype.validate=function(p){var y="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(p[0],y),this.validateOnlyExpectedCharactersFound(p[1],y),this.validateOnlyExpectedCharactersFound(p[2],y),this.validateOnlyExpectedCharactersFound(p[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(p[4],y),this.validateOnlyExpectedCharactersFound(p[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(p[6],y),this.validateAnyRanges(p)},h.prototype.validateAnyRanges=function(p){u.default.secondRange(p[0]),u.default.minuteRange(p[1]),u.default.hourRange(p[2]),u.default.dayOfMonthRange(p[3]),u.default.monthRange(p[4],this.monthStartIndexZero),u.default.dayOfWeekRange(p[5],this.dayOfWeekStartIndexZero)},h.prototype.validateOnlyExpectedCharactersFound=function(p,y){var w=p.match(new RegExp("[^".concat(y,"]+"),"gi"));if(w&&w.length)throw new Error("Expression contains invalid values: '".concat(w.toString(),"'"))},h})();c.CronParser=m},333(s,c,f){Object.defineProperty(c,"__esModule",{value:!0}),c.ExpressionDescriptor=void 0;var u=f(823),m=f(949),h=(function(){function p(y,w){if(this.expression=y,this.options=w,this.expressionParts=new Array(5),!this.options.locale&&p.defaultLocale&&(this.options.locale=p.defaultLocale),!p.locales[this.options.locale]){var x=Object.keys(p.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(x,"'.")),this.options.locale=x}this.i18n=p.locales[this.options.locale],w.use24HourTimeFormat===void 0&&(w.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return p.toString=function(y,w){var x=w===void 0?{}:w,S=x.throwExceptionOnParseError,E=S===void 0?!0:S,O=x.verbose,C=O===void 0?!1:O,A=x.dayOfWeekStartIndexZero,N=A===void 0?!0:A,T=x.monthStartIndexZero,P=T===void 0?!1:T,k=x.use24HourTimeFormat,D=x.locale,K=D===void 0?null:D,L=x.logicalAndDayFields,I=L===void 0?!1:L,W={throwExceptionOnParseError:E,verbose:C,dayOfWeekStartIndexZero:N,monthStartIndexZero:P,use24HourTimeFormat:k,locale:K,logicalAndDayFields:I};W.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var $=new p(y,W);return $.getFullDescription()},p.initialize=function(y,w){w===void 0&&(w="en"),p.specialCharacters=["/","-",",","*"],p.defaultLocale=w,y.load(p.locales)},p.prototype.getFullDescription=function(){var y,w,x="";try{var S=new m.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=S.parse(),this.expressionParts[0]==="@reboot")return((w=(y=this.i18n).atReboot)===null||w===void 0?void 0:w.call(y))||"Run once, at startup";var E=this.getTimeOfDayDescription(),O=this.getDayOfMonthDescription(),C=this.getMonthDescription(),A=this.getDayOfWeekDescription(),N=this.getYearDescription();x+=E+O+A+C+N,x=this.transformVerbosity(x,!!this.options.verbose),x=x.charAt(0).toLocaleUpperCase()+x.substr(1)}catch(T){if(!this.options.throwExceptionOnParseError)x=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(T)}return x},p.prototype.getTimeOfDayDescription=function(){var y=this.expressionParts[0],w=this.expressionParts[1],x=this.expressionParts[2],S="";if(!u.StringUtilities.containsAny(w,p.specialCharacters)&&!u.StringUtilities.containsAny(x,p.specialCharacters)&&!u.StringUtilities.containsAny(y,p.specialCharacters))S+=this.i18n.atSpace()+this.formatTime(x,w,y);else if(!y&&w.indexOf("-")>-1&&!(w.indexOf(",")>-1)&&!(w.indexOf("/")>-1)&&!u.StringUtilities.containsAny(x,p.specialCharacters)){var E=w.split("-");S+=u.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(x,E[0],""),this.formatTime(x,E[1],""))}else if(!y&&x.indexOf(",")>-1&&x.indexOf("-")==-1&&x.indexOf("/")==-1&&!u.StringUtilities.containsAny(w,p.specialCharacters)){var O=x.split(",");S+=this.i18n.at();for(var C=0;C<O.length;C++)S+=" ",S+=this.formatTime(O[C],w,""),C<O.length-2&&(S+=","),C==O.length-2&&(S+=this.i18n.spaceAnd())}else{var A=this.getSecondsDescription(),N=this.getMinutesDescription(),T=this.getHoursDescription();if(S+=A,S&&N&&(S+=", "),S+=N,N===T)return S;S&&T&&(S+=", "),S+=T}return S},p.prototype.getSecondsDescription=function(){var y=this,w=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(x){return x},function(x){return u.StringUtilities.format(y.i18n.everyX0Seconds(x),x)},function(x){return y.i18n.secondsX0ThroughX1PastTheMinute()},function(x){return x=="0"?"":parseInt(x)<20?y.i18n.atX0SecondsPastTheMinute(x):y.i18n.atX0SecondsPastTheMinuteGt20()||y.i18n.atX0SecondsPastTheMinute(x)});return w},p.prototype.getMinutesDescription=function(){var y=this,w=this.expressionParts[0],x=this.expressionParts[2],S=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(E){return E},function(E){return u.StringUtilities.format(y.i18n.everyX0Minutes(E),E)},function(E){return y.i18n.minutesX0ThroughX1PastTheHour()},function(E){var O,C;try{return E=="0"&&x.indexOf("/")==-1&&w==""?y.i18n.everyHour():E=="0"?((C=(O=y.i18n).onTheHour)===null||C===void 0?void 0:C.call(O))||y.i18n.atX0MinutesPastTheHour(E):parseInt(E)<20?y.i18n.atX0MinutesPastTheHour(E):y.i18n.atX0MinutesPastTheHourGt20()||y.i18n.atX0MinutesPastTheHour(E)}catch{return y.i18n.atX0MinutesPastTheHour(E)}});return S},p.prototype.getHoursDescription=function(){var y=this,w=this.expressionParts[2],x=0,S=[];w.split("/")[0].split(",").forEach(function(C){var A=C.split("-");A.length===2&&S.push({value:A[1],index:x+1}),x+=A.length});var E=0,O=this.getSegmentDescription(w,this.i18n.everyHour(),function(C){var A=S.find(function(T){return T.value===C&&T.index===E}),N=A&&y.expressionParts[1]!=="0";return E++,N?y.formatTime(C,"59",""):y.formatTime(C,"0","")},function(C){return u.StringUtilities.format(y.i18n.everyX0Hours(C),C)},function(C){return y.i18n.betweenX0AndX1()},function(C){return y.i18n.atX0()});return O},p.prototype.getDayOfWeekDescription=function(){var y=this,w=this.i18n.daysOfTheWeek(),x=null;return this.expressionParts[5]=="*"?x="":x=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(S,E){var O=S;S.indexOf("#")>-1?O=S.substring(0,S.indexOf("#")):S.indexOf("L")>-1&&(O=O.replace("L",""));var C=parseInt(O),A=y.i18n.daysOfTheWeekInCase?y.i18n.daysOfTheWeekInCase(E)[C]:w[C];if(S.indexOf("#")>-1){var N=null,T=S.substring(S.indexOf("#")+1),P=S.substring(0,S.indexOf("#"));switch(T){case"1":N=y.i18n.first(P);break;case"2":N=y.i18n.second(P);break;case"3":N=y.i18n.third(P);break;case"4":N=y.i18n.fourth(P);break;case"5":N=y.i18n.fifth(P);break}A=N+" "+A}return A},function(S){return parseInt(S)==1?"":u.StringUtilities.format(y.i18n.commaEveryX0DaysOfTheWeek(S),S)},function(S){var E=S.substring(0,S.indexOf("-")),O=y.expressionParts[3]!="*";return O?y.i18n.commaAndX0ThroughX1(E):y.i18n.commaX0ThroughX1(E)},function(S){var E=null;if(S.indexOf("#")>-1){var O=S.substring(S.indexOf("#")+1),C=S.substring(0,S.indexOf("#"));E=y.i18n.commaOnThe(O,C).trim()+y.i18n.spaceX0OfTheMonth()}else if(S.indexOf("L")>-1)E=y.i18n.commaOnTheLastX0OfTheMonth(S.replace("L",""));else{var A=y.expressionParts[3]!="*";A?y.options.logicalAndDayFields?E=y.i18n.commaOnlyOnX0(S):E=y.i18n.commaAndOnX0():E=y.i18n.commaOnlyOnX0(S)}return E}),x},p.prototype.getMonthDescription=function(){var y=this,w=this.i18n.monthsOfTheYear(),x=this.getSegmentDescription(this.expressionParts[4],"",function(S,E){return E&&y.i18n.monthsOfTheYearInCase?y.i18n.monthsOfTheYearInCase(E)[parseInt(S)-1]:w[parseInt(S)-1]},function(S){return parseInt(S)==1?"":u.StringUtilities.format(y.i18n.commaEveryX0Months(S),S)},function(S){return y.i18n.commaMonthX0ThroughMonthX1()||y.i18n.commaX0ThroughX1()},function(S){return y.i18n.commaOnlyInMonthX0?y.i18n.commaOnlyInMonthX0():y.i18n.commaOnlyInX0()});return x},p.prototype.getDayOfMonthDescription=function(){var y=this,w=null,x=this.expressionParts[3];switch(x){case"L":w=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":w=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var S=x.match(/(\d{1,2}W)|(W\d{1,2})/);if(S){var E=parseInt(S[0].replace("W","")),O=E==1?this.i18n.firstWeekday():u.StringUtilities.format(this.i18n.weekdayNearestDayX0(),E.toString());w=u.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),O);break}else{var C=x.match(/L-(\d{1,2})/);if(C){var A=C[1];w=u.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(A),A);break}else{if(x=="*"&&this.expressionParts[5]!="*")return"";w=this.getSegmentDescription(x,this.i18n.commaEveryDay(),function(N){return N=="L"?y.i18n.lastDay():y.i18n.dayX0?u.StringUtilities.format(y.i18n.dayX0(),N):N},function(N){return N=="1"?y.i18n.commaEveryDay():y.i18n.commaEveryX0Days(N)},function(N){return y.i18n.commaBetweenDayX0AndX1OfTheMonth(N)},function(N){return y.i18n.commaOnDayX0OfTheMonth(N)})}break}}return w},p.prototype.getYearDescription=function(){var y=this,w=this.getSegmentDescription(this.expressionParts[6],"",function(x){return/^\d+$/.test(x)?new Date(parseInt(x),1).getFullYear().toString():x},function(x){return u.StringUtilities.format(y.i18n.commaEveryX0Years(x),x)},function(x){return y.i18n.commaYearX0ThroughYearX1()||y.i18n.commaX0ThroughX1()},function(x){return y.i18n.commaOnlyInYearX0?y.i18n.commaOnlyInYearX0():y.i18n.commaOnlyInX0()});return w},p.prototype.getSegmentDescription=function(y,w,x,S,E,O){var C=null,A=y.indexOf("/")>-1,N=y.indexOf("-")>-1,T=y.indexOf(",")>-1;if(!y)C="";else if(y==="*")C=w;else if(!A&&!N&&!T)C=u.StringUtilities.format(O(y),x(y));else if(T){for(var P=y.split(","),k="",D=0;D<P.length;D++)if(D>0&&P.length>2&&(k+=",",D<P.length-1&&(k+=" ")),D>0&&P.length>1&&(D==P.length-1||P.length==2)&&(k+="".concat(this.i18n.spaceAnd()," ")),P[D].indexOf("/")>-1||P[D].indexOf("-")>-1){var K=P[D].indexOf("-")>-1&&P[D].indexOf("/")==-1,L=this.getSegmentDescription(P[D],w,x,S,K?this.i18n.commaX0ThroughX1:E,O);K&&(L=L.replace(", ","")),k+=L}else if(!A)k+=x(P[D]);else{var I=this.getSegmentDescription(P[D],w,x,S,E,O);I&&I.startsWith(", ")&&(I=I.substring(2)),k+=I}A?C=k:C=u.StringUtilities.format(O(y),k)}else if(A){var P=y.split("/");if(C=u.StringUtilities.format(S(P[1]),P[1]),P[0].indexOf("-")>-1){var W=this.generateRangeSegmentDescription(P[0],E,x);W.indexOf(", ")!=0&&(C+=", "),C+=W}else if(P[0].indexOf("*")==-1){var $=u.StringUtilities.format(O(P[0]),x(P[0]));$=$.replace(", ",""),C+=u.StringUtilities.format(this.i18n.commaStartingX0(),$)}}else N&&(C=this.generateRangeSegmentDescription(y,E,x));return C},p.prototype.generateRangeSegmentDescription=function(y,w,x){var S="",E=y.split("-"),O=x(E[0],1),C=x(E[1],2),A=w(y);return S+=u.StringUtilities.format(A,O,C),S},p.prototype.formatTime=function(y,w,x){var S=0,E=0,O=parseInt(y)+S,C=parseInt(w)+E;C>=60?(C-=60,O+=1):C<0&&(C+=60,O-=1),O>=24?O=O-24:O<0&&(O=24+O);var A="",N=!1;this.options.use24HourTimeFormat||(N=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),A=N?"".concat(this.getPeriod(O)," "):" ".concat(this.getPeriod(O)),O>12&&(O-=12),O===0&&(O=12));var T="";return x&&(T=":".concat(("00"+x).substring(x.length))),"".concat(N?A:"").concat(("00"+O.toString()).substring(O.toString().length),":").concat(("00"+C.toString()).substring(C.toString().length)).concat(T).concat(N?"":A)},p.prototype.transformVerbosity=function(y,w){if(!w&&(y=y.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),y=y.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),y=y.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),y=y.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var x=0,S=Object.entries(this.i18n.conciseVerbosityReplacements());x<S.length;x++){var E=S[x],O=E[0],C=E[1];y=y.replace(new RegExp(O,"g"),C)}return y},p.prototype.getPeriod=function(y){return y>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},p.locales={},p})();c.ExpressionDescriptor=h},747(s,c,f){Object.defineProperty(c,"__esModule",{value:!0}),c.enLocaleLoader=void 0;var u=f(486),m=(function(){function h(){}return h.prototype.load=function(p){p.en=new u.en},h})();c.enLocaleLoader=m},486(s,c){Object.defineProperty(c,"__esModule",{value:!0}),c.en=void 0;var f=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!1},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},u.prototype.everyMinute=function(){return"every minute"},u.prototype.everyHour=function(){return"every hour"},u.prototype.atSpace=function(){return"At "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},u.prototype.at=function(){return"At"},u.prototype.spaceAnd=function(){return" and"},u.prototype.everySecond=function(){return"every second"},u.prototype.everyX0Seconds=function(){return"every %s seconds"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},u.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},u.prototype.everyX0Minutes=function(){return"every %s minutes"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},u.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},u.prototype.everyX0Hours=function(){return"every %s hours"},u.prototype.betweenX0AndX1=function(){return"between %s and %s"},u.prototype.atX0=function(){return"at %s"},u.prototype.commaEveryDay=function(){return", every day"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},u.prototype.commaX0ThroughX1=function(){return", %s through %s"},u.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},u.prototype.first=function(){return"first"},u.prototype.second=function(){return"second"},u.prototype.third=function(){return"third"},u.prototype.fourth=function(){return"fourth"},u.prototype.fifth=function(){return"fifth"},u.prototype.commaOnThe=function(){return", on the "},u.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},u.prototype.lastDay=function(){return"the last day"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},u.prototype.commaOnlyOnX0=function(){return", only on %s"},u.prototype.commaAndOnX0=function(){return", and on %s"},u.prototype.commaEveryX0Months=function(){return", every %s months"},u.prototype.commaOnlyInX0=function(){return", only in %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},u.prototype.firstWeekday=function(){return"first weekday"},u.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},u.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},u.prototype.commaEveryX0Days=function(){return", every %s days in a month"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},u.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},u.prototype.commaEveryHour=function(){return", every hour"},u.prototype.commaEveryX0Years=function(){return", every %s years"},u.prototype.commaStartingX0=function(){return", starting %s"},u.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},u.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},u.prototype.atReboot=function(){return"Run once, at startup"},u.prototype.onTheHour=function(){return"on the hour"},u})();c.en=f},515(s,c){Object.defineProperty(c,"__esModule",{value:!0});function f(m,h){if(!m)throw new Error(h)}var u=(function(){function m(){}return m.secondRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);f(w>=0&&w<=59,"seconds part must be >= 0 and <= 59")}},m.minuteRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);f(w>=0&&w<=59,"minutes part must be >= 0 and <= 59")}},m.hourRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);f(w>=0&&w<=23,"hours part must be >= 0 and <= 23")}},m.dayOfMonthRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);f(w>=1&&w<=31,"DOM part must be >= 1 and <= 31")}},m.monthRange=function(h,p){for(var y=h.split(","),w=0;w<y.length;w++)if(!isNaN(parseInt(y[w],10))){var x=parseInt(y[w],10);f(x>=1&&x<=12,p?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},m.dayOfWeekRange=function(h,p){for(var y=h.split(","),w=0;w<y.length;w++)if(!isNaN(parseInt(y[w],10))){var x=parseInt(y[w],10);f(x>=0&&x<=6,p?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},m})();c.default=u},823(s,c){Object.defineProperty(c,"__esModule",{value:!0}),c.StringUtilities=void 0;var f=(function(){function u(){}return u.format=function(m){for(var h=[],p=1;p<arguments.length;p++)h[p-1]=arguments[p];return m.replace(/%s/g,function(y){return h.shift()})},u.containsAny=function(m,h){return h.some(function(p){return m.indexOf(p)>-1})},u})();c.StringUtilities=f}},r={};function a(s){var c=r[s];if(c!==void 0)return c.exports;var f=r[s]={exports:{}};return n[s](f,f.exports,a),f.exports}var i={};return(()=>{var s=i;Object.defineProperty(s,"__esModule",{value:!0}),s.toString=void 0;var c=a(333),f=a(747);c.ExpressionDescriptor.initialize(new f.enLocaleLoader),s.default=c.ExpressionDescriptor;var u=c.ExpressionDescriptor.toString;s.toString=u})(),i})())})(YS)),YS.exports}var MTe=PTe();const RTe=Qa(MTe),kTe=[{label:"Every 1 minute",value:"* * * * *"},{label:"Every 5 minutes",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Weekdays at 9am",value:"0 9 * * 1-5"},{label:"Weekly Monday 9am",value:"0 9 * * 1"}];function DTe({open:e,onOpenChange:t,editing:n}){const{data:r}=Wf(),{data:a}=RB(),i=OTe(),s=ATe(),[c,f]=b.useState(""),[u,m]=b.useState(""),[h,p]=b.useState(""),[y,w]=b.useState(""),[x,S]=b.useState(""),[E,O]=b.useState(""),[C,A]=b.useState(!0),[N,T]=b.useState(!1);b.useEffect(()=>{e&&n?(f(n.name),m(String(n.project_id)),p(n.task),w(n.cron_expr),S(n.role??""),O(n.system_prompt??""),A(n.skip_if_running)):e&&!n&&P()},[e,n]);function P(){f(""),m(""),p(""),w(""),S(""),O(""),A(!0),T(!1)}async function k(I){I.preventDefault();try{const W={name:c.trim(),task:h.trim(),cron_expr:y.trim(),role:x.trim()||void 0,system_prompt:E.trim()||void 0,skip_if_running:C};n?await s.mutateAsync({id:n.id,...W}):await i.mutateAsync({...W,project_id:Number(u)}),P(),t(!1)}catch{}}const D=b.useMemo(()=>{if(!y.trim())return null;try{return RTe.toString(y.trim())}catch{return null}},[y]),K=i.isPending||s.isPending,L=i.error||s.error;return v.jsx($c,{open:e,onOpenChange:t,children:v.jsxs(Bc,{className:"max-w-lg",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:n?"Edit Schedule":"Create Schedule"})}),v.jsxs("form",{onSubmit:k,className:"space-y-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsxs(Pt,{htmlFor:"sched-name",children:["Name ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsx(Et,{id:"sched-name",value:c,onChange:I=>f(I.target.value),placeholder:"e.g. github-issue-checker",required:!0,autoFocus:!0})]}),!n&&v.jsxs("div",{className:"space-y-2",children:[v.jsxs(Pt,{htmlFor:"sched-project",children:["Project ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsxs(Ao,{value:u,onValueChange:m,required:!0,children:[v.jsx(To,{id:"sched-project",children:v.jsx(No,{placeholder:"Select a project"})}),v.jsx(Po,{children:(r??[]).map(I=>v.jsx(ur,{value:String(I.id),children:I.display_name},I.id))})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsxs(Pt,{htmlFor:"sched-task",children:["Task ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsx(Ug,{id:"sched-task",value:h,onChange:I=>p(I.target.value),placeholder:"What should the agent do each time this runs?",required:!0,rows:3})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs(Pt,{htmlFor:"sched-cron",children:["Cron Expression ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsxs(Lg,{children:[v.jsx(zg,{asChild:!0,children:v.jsxs(je,{variant:"ghost",size:"sm",className:"h-6 text-xs",children:["Presets",v.jsx(zh,{className:"ml-1 h-3 w-3"})]})}),v.jsx($g,{align:"end",children:kTe.map(I=>v.jsxs(Eh,{onClick:()=>w(I.value),children:[v.jsx("span",{className:"mr-3 font-mono text-xs text-muted-foreground",children:I.value}),I.label]},I.value))})]})]}),v.jsx(Et,{id:"sched-cron",value:y,onChange:I=>w(I.target.value),placeholder:"*/5 * * * *",required:!0,className:"font-mono"}),D&&v.jsx("p",{className:"text-xs text-muted-foreground",children:D})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"sched-role",children:"Role"}),v.jsx(Et,{id:"sched-role",value:x,onChange:I=>S(I.target.value),placeholder:(a==null?void 0:a[0])??"orchestrator",list:"sched-role-list"}),v.jsx("datalist",{id:"sched-role-list",children:(a??[]).map(I=>v.jsx("option",{value:I},I))})]}),v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[v.jsx("input",{type:"checkbox",checked:C,onChange:I=>A(I.target.checked),className:"rounded border-input"}),v.jsx("span",{className:"text-sm",children:"Skip if already running"}),v.jsx("span",{className:"text-xs text-muted-foreground",children:"— don't start a new session while a previous one is still active"})]}),v.jsxs(dC,{open:N,onOpenChange:T,children:[v.jsx(hC,{asChild:!0,children:v.jsxs(je,{type:"button",variant:"ghost",size:"sm",className:"flex items-center gap-1 px-0 text-xs text-muted-foreground",children:[v.jsx(zh,{className:`h-3 w-3 transition-transform ${N?"rotate-180":""}`}),"Advanced Options"]})}),v.jsx(mC,{className:"space-y-4 pt-2",children:v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pt,{htmlFor:"sched-prompt",children:"System Prompt"}),v.jsx(Ug,{id:"sched-prompt",value:E,onChange:I=>O(I.target.value),placeholder:"Additional instructions for the agent...",rows:3})]})})]}),L&&v.jsx("p",{className:"text-sm text-destructive",children:L.message}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(je,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),v.jsx(je,{type:"submit",disabled:K,children:K?"Saving...":n?"Update":"Create"})]})]})]})})}function q3(e){if(!e)return"—";try{const t=new Date(e),n=new Date,r=t.getTime()-n.getTime(),a=Math.abs(r);if(a<6e4)return r>0?"in < 1m":"< 1m ago";if(a<36e5){const i=Math.round(a/6e4);return r>0?`in ${i}m`:`${i}m ago`}if(a<864e5){const i=Math.round(a/36e5);return r>0?`in ${i}h`:`${i}h ago`}return t.toLocaleDateString()}catch{return"—"}}function ITe({schedule:e}){return e.enabled?e.last_error?v.jsx(Z$,{children:v.jsxs(ste,{children:[v.jsx(lte,{children:v.jsx(vn,{variant:"destructive",children:"Error"})}),v.jsx(cte,{className:"max-w-xs",children:v.jsx("p",{className:"text-xs",children:e.last_error})})]})}):v.jsx(vn,{className:"bg-emerald-600 hover:bg-emerald-600",children:"Active"}):v.jsx(vn,{variant:"secondary",children:"Disabled"})}function LTe(){const{data:e,isLoading:t,error:n}=CTe(),[r,a]=b.useState(!1),[i,s]=b.useState(null),c=NTe(),f=TTe();if(t)return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-48"}),v.jsx(tn,{className:"h-64 rounded-lg"})]});if(n)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",n.message]})]});const u=e??[];return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Scheduled Tasks"}),v.jsxs(je,{onClick:()=>{s(null),a(!0)},children:[v.jsx(LE,{className:"mr-2 h-4 w-4"}),"Create Schedule"]})]}),u.length===0?v.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed p-12 text-center",children:[v.jsx("p",{className:"text-muted-foreground",children:"No scheduled tasks yet."}),v.jsxs(je,{variant:"outline",className:"mt-4",onClick:()=>{s(null),a(!0)},children:[v.jsx(LE,{className:"mr-2 h-4 w-4"}),"Create your first schedule"]})]}):v.jsx("div",{className:"rounded-lg border",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Xe,{children:"Name"}),v.jsx(Xe,{children:"Project"}),v.jsx(Xe,{children:"Cron"}),v.jsx(Xe,{children:"Next Run"}),v.jsx(Xe,{children:"Last Run"}),v.jsx(Xe,{children:"Status"}),v.jsx(Xe,{className:"w-[120px]",children:"Actions"})]})}),v.jsx(Kc,{children:u.map(m=>v.jsxs(Ir,{children:[v.jsx(We,{className:"font-medium",children:m.name}),v.jsx(We,{className:"text-muted-foreground",children:m.project_name}),v.jsx(We,{children:v.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:m.cron_expr})}),v.jsx(We,{className:"text-sm text-muted-foreground",children:q3(m.next_run_at)}),v.jsx(We,{className:"text-sm text-muted-foreground",children:q3(m.last_run_at)}),v.jsx(We,{children:v.jsx(ITe,{schedule:m})}),v.jsx(We,{children:v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(je,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{s(m),a(!0)},children:v.jsx(fne,{className:"h-3.5 w-3.5"})}),v.jsx(je,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>f.mutate({id:m.id,enable:!m.enabled}),children:m.enabled?v.jsx(cne,{className:"h-3.5 w-3.5"}):v.jsx(lC,{className:"h-3.5 w-3.5"})}),v.jsx(je,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>{confirm(`Delete schedule "${m.name}"?`)&&c.mutate(m.id)},children:v.jsx(Xf,{className:"h-3.5 w-3.5"})})]})})]},m.id))})]})}),v.jsx(DTe,{open:r,onOpenChange:a,editing:i})]})}function GS(e){const t=e.orchestrator??{},n=e.policy??{},r=e.session??{},a=e.trace??{};return{runtime:ar(e.runtime),isolation:ar(e.isolation),memory:ar(e.memory),orchestrator_role:ar(t.role),orchestrator_permission_mode:ar(t.permission_mode),policy_max_depth:ar(n.max_depth),policy_agent_timeout:ar(n.agent_timeout),policy_max_delegate_retries:ar(n.max_delegate_retries),policy_cache_delegations:ar(n.cache_delegations),policy_cache_max_entries:ar(n.cache_max_entries),policy_cache_ttl_seconds:ar(n.cache_ttl_seconds),policy_max_num_delegations:ar(n.max_num_delegations),session_merge_strategy:ar(r.merge_strategy),session_pull_before_session:ar(r.pull_before_session),session_pr_command:ar(r.pr_command),trace_enabled:ar(a.enabled)}}function ar(e){return e==null?"":String(e)}function zTe(e){const t={};e.runtime&&(t.runtime=e.runtime),e.isolation&&(t.isolation=e.isolation),e.memory&&(t.memory=e.memory);const n={};e.orchestrator_role&&(n.role=e.orchestrator_role),e.orchestrator_permission_mode&&(n.permission_mode=e.orchestrator_permission_mode),Object.keys(n).length>0&&(t.orchestrator=n);const r={};e.policy_max_depth&&(r.max_depth=Number(e.policy_max_depth)),e.policy_agent_timeout&&(r.agent_timeout=Number(e.policy_agent_timeout)),e.policy_max_delegate_retries&&(r.max_delegate_retries=Number(e.policy_max_delegate_retries)),e.policy_cache_delegations&&(r.cache_delegations=e.policy_cache_delegations==="true"),e.policy_cache_max_entries&&(r.cache_max_entries=Number(e.policy_cache_max_entries)),e.policy_cache_ttl_seconds&&(r.cache_ttl_seconds=Number(e.policy_cache_ttl_seconds)),e.policy_max_num_delegations&&(r.max_num_delegations=Number(e.policy_max_num_delegations)),Object.keys(r).length>0&&(t.policy=r);const a={};e.session_merge_strategy&&(a.merge_strategy=e.session_merge_strategy),e.session_pull_before_session&&(a.pull_before_session=e.session_pull_before_session),e.session_pr_command&&(a.pr_command=e.session_pr_command),Object.keys(a).length>0&&(t.session=a);const i={};return e.trace_enabled&&(i.enabled=e.trace_enabled==="true"),Object.keys(i).length>0&&(t.trace=i),t}const $Te=["none","worktree"],BTe=["default","plan","bypassPermissions"],UTe=["auto","local","pr"],HTe=["prompt","always","never"],K3=["true","false"],XS="__empty__";function V3({values:e,placeholders:t,onSave:n,saving:r}){const[a,i]=b.useState(GS(e)),{data:s}=cc("agents"),{data:c}=cc("roles"),{data:f}=cc("memories"),u=t?GS(t):void 0,m=JSON.stringify(e);b.useEffect(()=>{i(GS(e))},[m]);const h=N=>T=>i(P=>({...P,[N]:T})),p=()=>{n(zTe(a))},y=(s??[]).map(N=>N.name),w=(c??[]).map(N=>N.name),x=new Set((f??[]).map(N=>N.name));x.add("none");const S=[...x].sort(),E=a.runtime&&y.length>0&&!y.includes(a.runtime)?"Runtime not found in installed agents":"",O=a.orchestrator_role&&w.length>0&&!w.includes(a.orchestrator_role)?"Role not found in installed roles":"",C=a.memory&&!S.includes(a.memory)?"Memory not found in installed providers":"",A=!!E||!!O||!!C;return v.jsxs("div",{className:"flex flex-col gap-6",children:[v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"General"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsxs(ir,{label:"Runtime",children:[v.jsx(Et,{list:"cfg-dl-runtime",value:a.runtime,onChange:N=>h("runtime")(N.target.value),placeholder:(u==null?void 0:u.runtime)||"strawpot-claude-code",className:"h-8 text-xs"}),y.length>0&&v.jsx("datalist",{id:"cfg-dl-runtime",children:y.map(N=>v.jsx("option",{value:N},N))}),E&&v.jsx("p",{className:"text-xs text-destructive",children:E})]}),v.jsx(ir,{label:"Isolation",children:v.jsx(qu,{value:a.isolation,onChange:h("isolation"),options:$Te,placeholder:(u==null?void 0:u.isolation)||"none",allowEmpty:!0})}),v.jsxs(ir,{label:"Memory",children:[v.jsx(Et,{list:"cfg-dl-memory",value:a.memory,onChange:N=>h("memory")(N.target.value),placeholder:(u==null?void 0:u.memory)||"dial",className:"h-8 text-xs"}),v.jsx("datalist",{id:"cfg-dl-memory",children:S.map(N=>v.jsx("option",{value:N},N))}),C&&v.jsx("p",{className:"text-xs text-destructive",children:C})]})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Orchestrator"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[v.jsxs(ir,{label:"Role",children:[v.jsx(Et,{list:"cfg-dl-role",value:a.orchestrator_role,onChange:N=>h("orchestrator_role")(N.target.value),placeholder:(u==null?void 0:u.orchestrator_role)||"ai-ceo",className:"h-8 text-xs"}),w.length>0&&v.jsx("datalist",{id:"cfg-dl-role",children:w.map(N=>v.jsx("option",{value:N},N))}),O&&v.jsx("p",{className:"text-xs text-destructive",children:O})]}),v.jsx(ir,{label:"Permission Mode",children:v.jsx(qu,{value:a.orchestrator_permission_mode,onChange:h("orchestrator_permission_mode"),options:BTe,placeholder:(u==null?void 0:u.orchestrator_permission_mode)||"default",allowEmpty:!0})})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Policy"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(ir,{label:"Max Depth",children:v.jsx(Et,{type:"number",value:a.policy_max_depth,onChange:N=>h("policy_max_depth")(N.target.value),placeholder:(u==null?void 0:u.policy_max_depth)||"3",className:"h-8 text-xs"})}),v.jsx(ir,{label:"Agent Timeout (seconds)",children:v.jsx(Et,{type:"number",value:a.policy_agent_timeout,onChange:N=>h("policy_agent_timeout")(N.target.value),placeholder:(u==null?void 0:u.policy_agent_timeout)||"none",className:"h-8 text-xs"})}),v.jsx(ir,{label:"Max Delegate Retries",children:v.jsx(Et,{type:"number",value:a.policy_max_delegate_retries,onChange:N=>h("policy_max_delegate_retries")(N.target.value),placeholder:(u==null?void 0:u.policy_max_delegate_retries)||"0",className:"h-8 text-xs"})}),v.jsx(ir,{label:"Cache Delegations",children:v.jsx(qu,{value:a.policy_cache_delegations,onChange:h("policy_cache_delegations"),options:K3,placeholder:(u==null?void 0:u.policy_cache_delegations)==="false"?"false":"true",allowEmpty:!0})}),v.jsx(ir,{label:"Cache Max Entries",children:v.jsx(Et,{value:a.policy_cache_max_entries,onChange:N=>h("policy_cache_max_entries")(N.target.value),placeholder:(u==null?void 0:u.policy_cache_max_entries)||"0 (unlimited)",className:"h-8 text-xs"})}),v.jsx(ir,{label:"Cache TTL (seconds)",children:v.jsx(Et,{value:a.policy_cache_ttl_seconds,onChange:N=>h("policy_cache_ttl_seconds")(N.target.value),placeholder:(u==null?void 0:u.policy_cache_ttl_seconds)||"0 (unlimited)",className:"h-8 text-xs"})}),v.jsx(ir,{label:"Max Delegations",children:v.jsx(Et,{type:"number",min:"0",value:a.policy_max_num_delegations,onChange:N=>h("policy_max_num_delegations")(N.target.value),placeholder:(u==null?void 0:u.policy_max_num_delegations)||"0 (unlimited)",className:"h-8 text-xs"})})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Session"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(ir,{label:"Merge Strategy",children:v.jsx(qu,{value:a.session_merge_strategy,onChange:h("session_merge_strategy"),options:UTe,placeholder:(u==null?void 0:u.session_merge_strategy)||"auto",allowEmpty:!0})}),v.jsx(ir,{label:"Pull Before Session",children:v.jsx(qu,{value:a.session_pull_before_session,onChange:h("session_pull_before_session"),options:HTe,placeholder:(u==null?void 0:u.session_pull_before_session)||"prompt",allowEmpty:!0})}),v.jsx(ir,{label:"PR Command",className:"sm:col-span-3",children:v.jsx(Et,{value:a.session_pr_command,onChange:N=>h("session_pr_command")(N.target.value),placeholder:(u==null?void 0:u.session_pr_command)||"gh pr create --base {base_branch} --head {session_branch}",className:"h-8 text-xs font-mono"})})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Trace"}),v.jsx(Ds,{}),v.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:v.jsx(ir,{label:"Enabled",children:v.jsx(qu,{value:a.trace_enabled,onChange:h("trace_enabled"),options:K3,placeholder:(u==null?void 0:u.trace_enabled)||"true",allowEmpty:!0})})})]}),v.jsxs(je,{size:"sm",onClick:p,disabled:r||A,className:"self-start",children:[v.jsx(sB,{className:"mr-2 h-3.5 w-3.5"}),r?"Saving...":"Save Configuration"]})]})}function ir({label:e,children:t,className:n}){return v.jsxs("div",{className:`flex flex-col gap-1 ${n??""}`,children:[v.jsx(Pt,{className:"text-xs",children:e}),t]})}function qu({value:e,onChange:t,options:n,placeholder:r,allowEmpty:a}){return v.jsxs(Ao,{value:e||(a?XS:""),onValueChange:i=>t(i===XS?"":i),children:[v.jsx(To,{className:"h-8 text-xs",children:v.jsx(No,{placeholder:r})}),v.jsxs(Po,{children:[a&&v.jsx(ur,{value:XS,className:"text-muted-foreground",children:r?`Default (${r})`:"Default"}),n.map(i=>v.jsx(ur,{value:i,children:i},i))]})]})}function FTe(){var p,y;const[e,t]=b.useState("global"),[n,r]=b.useState(null),a=jt(),i=TB(),s=Wf(),c=vB(n??0,{enabled:n!=null}),f=bae(),u=PB(),m=w=>{f.mutate(w,{onSuccess:()=>pt.success("Global configuration saved"),onError:()=>pt.error("Failed to save global configuration")})},h=w=>{n!=null&&u.mutate({projectId:n,data:w},{onSuccess:()=>pt.success("Project configuration saved"),onError:()=>pt.error("Failed to save project configuration")})};return b.useEffect(()=>{e==="project"&&n!=null&&a.invalidateQueries({queryKey:Ye.projects.config(n)})},[e,n,a]),v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Settings"}),v.jsxs(CA,{value:e,onValueChange:t,children:[v.jsxs(OA,{children:[v.jsx(Sa,{value:"global",children:"Global"}),v.jsx(Sa,{value:"project",children:"Project"})]}),v.jsx(Ea,{value:"global",className:"mt-4",children:i.isLoading?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):v.jsx(V3,{values:((p=i.data)==null?void 0:p.values)??{},placeholders:(y=i.data)==null?void 0:y.defaults,onSave:m,saving:f.isPending})}),v.jsx(Ea,{value:"project",className:"mt-4",children:v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-col gap-1 max-w-xs",children:[v.jsx(Pt,{className:"text-xs",children:"Project"}),v.jsxs(Ao,{value:n!=null?String(n):"",onValueChange:w=>r(Number(w)),children:[v.jsx(To,{className:"h-8 text-xs",children:v.jsx(No,{placeholder:"Select a project"})}),v.jsx(Po,{children:(s.data??[]).map(w=>v.jsx(ur,{value:String(w.id),children:w.display_name},w.id))})]})]}),n!=null&&c.isLoading&&v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),n!=null&&c.data&&v.jsx(V3,{values:c.data.project,placeholders:c.data.merged_nested,onSave:h,saving:u.isPending},n)]})})]})]})}function qTe(){return v.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20",children:[v.jsx("h1",{className:"text-2xl font-bold",children:"Page not found"}),v.jsx(je,{variant:"outline",asChild:!0,children:v.jsxs(Ya,{to:"/",children:[v.jsx(Vte,{className:"mr-2 h-4 w-4"}),"Back to Dashboard"]})})]})}const KTe=3,VTe=1e4,YTe=2e3;function GTe(){const e=jt(),t=b.useRef(null),n=b.useRef(void 0),r=b.useRef(1e3),a=b.useRef(0),i=b.useRef({});b.useEffect(()=>{function s(f){const u=Date.now();if(u-a.current<YTe)return!1;const m=(i.current[f]??[]).filter(h=>u-h<VTe);return m.length>=KTe?!1:(m.push(u),i.current[f]=m,!0)}function c(){const f=new EventSource("/api/events");t.current=f,f.onopen=()=>{r.current=1e3,a.current=Date.now()};const u=m=>{try{const h=JSON.parse(m.data),p=(h.run_id??"unknown").slice(0,12);s(m.type)&&(m.type==="session_started"?pt.info(`Session ${p} started`):m.type==="session_completed"?pt.success(`Session ${p} completed`):m.type==="session_failed"?pt.error(`Session ${p} failed`):m.type==="session_stopped"&&pt.warning(`Session ${p} stopped`)),e.invalidateQueries({queryKey:["sessions"]}),h.project_id&&e.invalidateQueries({queryKey:Ye.projects.sessions(h.project_id)})}catch{}};f.addEventListener("session_started",u),f.addEventListener("session_completed",u),f.addEventListener("session_failed",u),f.addEventListener("session_stopped",u),f.onerror=()=>{f.close(),t.current=null,n.current=setTimeout(()=>{r.current=Math.min(r.current*2,15e3),c()},r.current)}}return c(),()=>{var f;(f=t.current)==null||f.close(),t.current=null,n.current&&clearTimeout(n.current)}},[e])}function XTe(){return GTe(),v.jsx(JV,{children:v.jsxs(vi,{element:v.jsx(rae,{}),children:[v.jsx(vi,{index:!0,element:v.jsx(mae,{})}),v.jsx(vi,{path:"projects",element:v.jsx(_ae,{})}),v.jsx(vi,{path:"projects/:projectId",element:v.jsx(SEe,{})}),v.jsx(vi,{path:"projects/:projectId/sessions/:runId",element:v.jsx(sTe,{})}),v.jsx(vi,{path:"schedules",element:v.jsx(LTe,{})}),v.jsx(vi,{path:"resources/:resourceType",element:v.jsx(_Te,{})}),v.jsx(vi,{path:"settings",element:v.jsx(FTe,{})}),v.jsx(vi,{path:"*",element:v.jsx(qTe,{})})]})})}JK.createRoot(document.getElementById("root")).render(v.jsx(b.StrictMode,{children:v.jsx(mG,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:v.jsx(iG,{client:ire,children:v.jsxs(Z$,{children:[v.jsx(_Y,{children:v.jsx(XTe,{})}),v.jsx(are,{})]})})})}));
