@tapflowio/relay 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,499 +0,0 @@
1
- function WH(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 o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{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 o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Ih=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xb={exports:{}},Eu={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var oC;function YH(){if(oC)return Eu;oC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Eu.Fragment=t,Eu.jsx=n,Eu.jsxs=n,Eu}var sC;function ZH(){return sC||(sC=1,xb.exports=YH()),xb.exports}var v=ZH(),wb={exports:{}},Qe={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var lC;function KH(){if(lC)return Qe;lC=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"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function O(I,Y,Q){this.props=I,this.context=Y,this.refs=w,this.updater=Q||A}O.prototype.isReactComponent={},O.prototype.setState=function(I,Y){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,Y,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function E(){}E.prototype=O.prototype;function T(I,Y,Q){this.props=I,this.context=Y,this.refs=w,this.updater=Q||A}var C=T.prototype=new E;C.constructor=T,S(C,O.prototype),C.isPureReactComponent=!0;var j=Array.isArray;function R(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z(I,Y,Q){var ce=Q.ref;return{$$typeof:e,type:I,key:Y,ref:ce!==void 0?ce:null,props:Q}}function V(I,Y){return z(I.type,Y,I.props)}function U(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function P(I){var Y={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(Q){return Y[Q]})}var B=/\/+/g;function q(I,Y){return typeof I=="object"&&I!==null&&I.key!=null?P(""+I.key):Y.toString(36)}function G(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(R,R):(I.status="pending",I.then(function(Y){I.status==="pending"&&(I.status="fulfilled",I.value=Y)},function(Y){I.status==="pending"&&(I.status="rejected",I.reason=Y)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function $(I,Y,Q,ce,ve){var fe=typeof I;(fe==="undefined"||fe==="boolean")&&(I=null);var ue=!1;if(I===null)ue=!0;else switch(fe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(I.$$typeof){case e:case t:ue=!0;break;case m:return ue=I._init,$(ue(I._payload),Y,Q,ce,ve)}}if(ue)return ve=ve(I),ue=ce===""?"."+q(I,0):ce,j(ve)?(Q="",ue!=null&&(Q=ue.replace(B,"$&/")+"/"),$(ve,Y,Q,"",function(_e){return _e})):ve!=null&&(U(ve)&&(ve=V(ve,Q+(ve.key==null||I&&I.key===ve.key?"":(""+ve.key).replace(B,"$&/")+"/")+ue)),Y.push(ve)),1;ue=0;var xe=ce===""?".":ce+":";if(j(I))for(var se=0;se<I.length;se++)ce=I[se],fe=xe+q(ce,se),ue+=$(ce,Y,Q,fe,ve);else if(se=x(I),typeof se=="function")for(I=se.call(I),se=0;!(ce=I.next()).done;)ce=ce.value,fe=xe+q(ce,se++),ue+=$(ce,Y,Q,fe,ve);else if(fe==="object"){if(typeof I.then=="function")return $(G(I),Y,Q,ce,ve);throw Y=String(I),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ue}function F(I,Y,Q){if(I==null)return I;var ce=[],ve=0;return $(I,ce,"","",function(fe){return Y.call(Q,fe,ve++)}),ce}function Z(I){if(I._status===-1){var Y=I._result;Y=Y(),Y.then(function(Q){(I._status===0||I._status===-1)&&(I._status=1,I._result=Q)},function(Q){(I._status===0||I._status===-1)&&(I._status=2,I._result=Q)}),I._status===-1&&(I._status=0,I._result=Y)}if(I._status===1)return I._result.default;throw I._result}var X=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},oe={map:F,forEach:function(I,Y,Q){F(I,function(){Y.apply(this,arguments)},Q)},count:function(I){var Y=0;return F(I,function(){Y++}),Y},toArray:function(I){return F(I,function(Y){return Y})||[]},only:function(I){if(!U(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Qe.Activity=h,Qe.Children=oe,Qe.Component=O,Qe.Fragment=n,Qe.Profiler=a,Qe.PureComponent=T,Qe.StrictMode=r,Qe.Suspense=f,Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Qe.__COMPILER_RUNTIME={__proto__:null,c:function(I){return N.H.useMemoCache(I)}},Qe.cache=function(I){return function(){return I.apply(null,arguments)}},Qe.cacheSignal=function(){return null},Qe.cloneElement=function(I,Y,Q){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var ce=S({},I.props),ve=I.key;if(Y!=null)for(fe in Y.key!==void 0&&(ve=""+Y.key),Y)!D.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(ce[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)ce.children=Q;else if(1<fe){for(var ue=Array(fe),xe=0;xe<fe;xe++)ue[xe]=arguments[xe+2];ce.children=ue}return z(I.type,ve,ce)},Qe.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},Qe.createElement=function(I,Y,Q){var ce,ve={},fe=null;if(Y!=null)for(ce in Y.key!==void 0&&(fe=""+Y.key),Y)D.call(Y,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(ve[ce]=Y[ce]);var ue=arguments.length-2;if(ue===1)ve.children=Q;else if(1<ue){for(var xe=Array(ue),se=0;se<ue;se++)xe[se]=arguments[se+2];ve.children=xe}if(I&&I.defaultProps)for(ce in ue=I.defaultProps,ue)ve[ce]===void 0&&(ve[ce]=ue[ce]);return z(I,fe,ve)},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(I){return{$$typeof:c,render:I}},Qe.isValidElement=U,Qe.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:Z}},Qe.memo=function(I,Y){return{$$typeof:d,type:I,compare:Y===void 0?null:Y}},Qe.startTransition=function(I){var Y=N.T,Q={};N.T=Q;try{var ce=I(),ve=N.S;ve!==null&&ve(Q,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(R,X)}catch(fe){X(fe)}finally{Y!==null&&Q.types!==null&&(Y.types=Q.types),N.T=Y}},Qe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Qe.use=function(I){return N.H.use(I)},Qe.useActionState=function(I,Y,Q){return N.H.useActionState(I,Y,Q)},Qe.useCallback=function(I,Y){return N.H.useCallback(I,Y)},Qe.useContext=function(I){return N.H.useContext(I)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(I,Y){return N.H.useDeferredValue(I,Y)},Qe.useEffect=function(I,Y){return N.H.useEffect(I,Y)},Qe.useEffectEvent=function(I){return N.H.useEffectEvent(I)},Qe.useId=function(){return N.H.useId()},Qe.useImperativeHandle=function(I,Y,Q){return N.H.useImperativeHandle(I,Y,Q)},Qe.useInsertionEffect=function(I,Y){return N.H.useInsertionEffect(I,Y)},Qe.useLayoutEffect=function(I,Y){return N.H.useLayoutEffect(I,Y)},Qe.useMemo=function(I,Y){return N.H.useMemo(I,Y)},Qe.useOptimistic=function(I,Y){return N.H.useOptimistic(I,Y)},Qe.useReducer=function(I,Y,Q){return N.H.useReducer(I,Y,Q)},Qe.useRef=function(I){return N.H.useRef(I)},Qe.useState=function(I){return N.H.useState(I)},Qe.useSyncExternalStore=function(I,Y,Q){return N.H.useSyncExternalStore(I,Y,Q)},Qe.useTransition=function(){return N.H.useTransition()},Qe.version="19.2.6",Qe}var cC;function q_(){return cC||(cC=1,wb.exports=KH()),wb.exports}var y=q_();const L=Ut(y),H_=WH({__proto__:null,default:L},[y]);var Sb={exports:{}},Tu={},_b={exports:{}},Ab={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var uC;function XH(){return uC||(uC=1,(function(e){function t($,F){var Z=$.length;$.push(F);e:for(;0<Z;){var X=Z-1>>>1,oe=$[X];if(0<a(oe,F))$[X]=F,$[Z]=oe,Z=X;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var F=$[0],Z=$.pop();if(Z!==F){$[0]=Z;e:for(var X=0,oe=$.length,I=oe>>>1;X<I;){var Y=2*(X+1)-1,Q=$[Y],ce=Y+1,ve=$[ce];if(0>a(Q,Z))ce<oe&&0>a(ve,Q)?($[X]=ve,$[ce]=Z,X=ce):($[X]=Q,$[Y]=Z,X=Y);else if(ce<oe&&0>a(ve,Z))$[X]=ve,$[ce]=Z,X=ce;else break e}}return F}function a($,F){var Z=$.sortIndex-F.sortIndex;return Z!==0?Z:$.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],m=1,h=null,g=3,x=!1,A=!1,S=!1,w=!1,O=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C($){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=$)r(d),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(d)}}function j($){if(S=!1,C($),!A)if(n(f)!==null)A=!0,R||(R=!0,P());else{var F=n(d);F!==null&&G(j,F.startTime-$)}}var R=!1,N=-1,D=5,z=-1;function V(){return w?!0:!(e.unstable_now()-z<D)}function U(){if(w=!1,R){var $=e.unstable_now();z=$;var F=!0;try{e:{A=!1,S&&(S=!1,E(N),N=-1),x=!0;var Z=g;try{t:{for(C($),h=n(f);h!==null&&!(h.expirationTime>$&&V());){var X=h.callback;if(typeof X=="function"){h.callback=null,g=h.priorityLevel;var oe=X(h.expirationTime<=$);if($=e.unstable_now(),typeof oe=="function"){h.callback=oe,C($),F=!0;break t}h===n(f)&&r(f),C($)}else r(f);h=n(f)}if(h!==null)F=!0;else{var I=n(d);I!==null&&G(j,I.startTime-$),F=!1}}break e}finally{h=null,g=Z,x=!1}F=void 0}}finally{F?P():R=!1}}}var P;if(typeof T=="function")P=function(){T(U)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,q=B.port2;B.port1.onmessage=U,P=function(){q.postMessage(null)}}else P=function(){O(U,0)};function G($,F){N=O(function(){$(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function($){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var Z=g;g=F;try{return $()}finally{g=Z}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function($,F){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var Z=g;g=$;try{return F()}finally{g=Z}},e.unstable_scheduleCallback=function($,F,Z){var X=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?X+Z:X):Z=X,$){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=Z+oe,$={id:m++,callback:F,priorityLevel:$,startTime:Z,expirationTime:oe,sortIndex:-1},Z>X?($.sortIndex=Z,t(d,$),n(f)===null&&$===n(d)&&(S?(E(N),N=-1):S=!0,G(j,Z-X))):($.sortIndex=oe,t(f,$),A||x||(A=!0,R||(R=!0,P()))),$},e.unstable_shouldYield=V,e.unstable_wrapCallback=function($){var F=g;return function(){var Z=g;g=F;try{return $.apply(this,arguments)}finally{g=Z}}}})(Ab)),Ab}var fC;function QH(){return fC||(fC=1,_b.exports=XH()),_b.exports}var Ob={exports:{}},Yn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var dC;function JH(){if(dC)return Yn;dC=1;var e=q_();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" 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 o(f,d,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:h==null?null:""+h,children:f,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Yn.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(f,d,null,m)},Yn.flushSync=function(f){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=m,r.d.f()}},Yn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},Yn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Yn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,h=c(m,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:x}):m==="script"&&r.d.X(f,{crossOrigin:h,integrity:g,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Yn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},Yn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=c(m,d.crossOrigin);r.d.L(f,m,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Yn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},Yn.requestFormReset=function(f){r.d.r(f)},Yn.unstable_batchedUpdates=function(f,d){return f(d)},Yn.useFormState=function(f,d,m){return l.H.useFormState(f,d,m)},Yn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Yn.version="19.2.6",Yn}var hC;function Cz(){if(hC)return Ob.exports;hC=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(),Ob.exports=JH(),Ob.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var pC;function e9(){if(pC)return Tu;pC=1;var e=QH(),t=q_(),n=Cz();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function c(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function f(i){if(o(i)!==i)throw Error(r(188))}function d(i){var s=i.alternate;if(!s){if(s=o(i),s===null)throw Error(r(188));return s!==i?null:i}for(var u=i,p=s;;){var b=u.return;if(b===null)break;var _=b.alternate;if(_===null){if(p=b.return,p!==null){u=p;continue}break}if(b.child===_.child){for(_=b.child;_;){if(_===u)return f(b),i;if(_===p)return f(b),s;_=_.sibling}throw Error(r(188))}if(u.return!==p.return)u=b,p=_;else{for(var M=!1,k=b.child;k;){if(k===u){M=!0,u=b,p=_;break}if(k===p){M=!0,p=b,u=_;break}k=k.sibling}if(!M){for(k=_.child;k;){if(k===u){M=!0,u=_,p=b;break}if(k===p){M=!0,p=_,u=b;break}k=k.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:s}function m(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=m(i),s!==null)return s;i=i.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function P(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var B=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===B?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case O:return"Profiler";case w:return"StrictMode";case j:return"Suspense";case R:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case A:return"Portal";case T:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case C:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case N:return s=i.displayName||null,s!==null?s:q(i.type)||"Memo";case D:s=i._payload,i=i._init;try{return q(i(s))}catch{}}return null}var G=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},X=[],oe=-1;function I(i){return{current:i}}function Y(i){0>oe||(i.current=X[oe],X[oe]=null,oe--)}function Q(i,s){oe++,X[oe]=i.current,i.current=s}var ce=I(null),ve=I(null),fe=I(null),ue=I(null);function xe(i,s){switch(Q(fe,s),Q(ve,i),Q(ce,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?C2(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=C2(s),i=R2(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Y(ce),Q(ce,i)}function se(){Y(ce),Y(ve),Y(fe)}function _e(i){i.memoizedState!==null&&Q(ue,i);var s=ce.current,u=R2(s,i.type);s!==u&&(Q(ve,i),Q(ce,u))}function Se(i){ve.current===i&&(Y(ce),Y(ve)),ue.current===i&&(Y(ue),Su._currentValue=Z)}var ne,Ue;function $e(i){if(ne===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",Ue=-1<u.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ne+i+Ue}var rt=!1;function et(i,s){if(!i||rt)return"";rt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(de){var le=de}Reflect.construct(i,[],ye)}else{try{ye.call()}catch(de){le=de}i.call(ye.prototype)}}else{try{throw Error()}catch(de){le=de}(ye=i())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(de){if(de&&le&&typeof de.stack=="string")return[de.stack,le.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=p.DetermineComponentFrameRoot(),M=_[0],k=_[1];if(M&&k){var W=M.split(`
44
- `),ae=k.split(`
45
- `);for(b=p=0;p<W.length&&!W[p].includes("DetermineComponentFrameRoot");)p++;for(;b<ae.length&&!ae[b].includes("DetermineComponentFrameRoot");)b++;if(p===W.length||b===ae.length)for(p=W.length-1,b=ae.length-1;1<=p&&0<=b&&W[p]!==ae[b];)b--;for(;1<=p&&0<=b;p--,b--)if(W[p]!==ae[b]){if(p!==1||b!==1)do if(p--,b--,0>b||W[p]!==ae[b]){var pe=`
46
- `+W[p].replace(" at new "," at ");return i.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",i.displayName)),pe}while(1<=p&&0<=b);break}}}finally{rt=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?$e(u):""}function tt(i,s){switch(i.tag){case 26:case 27:case 5:return $e(i.type);case 16:return $e("Lazy");case 13:return i.child!==s&&s!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return et(i.type,!1);case 11:return et(i.type.render,!1);case 1:return et(i.type,!0);case 31:return $e("Activity");default:return""}}function qt(i){try{var s="",u=null;do s+=tt(i,u),u=i,i=i.return;while(i);return s}catch(p){return`
47
- Error generating stack: `+p.message+`
48
- `+p.stack}}var ct=Object.prototype.hasOwnProperty,pn=e.unstable_scheduleCallback,an=e.unstable_cancelCallback,St=e.unstable_shouldYield,An=e.unstable_requestPaint,H=e.unstable_now,ee=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,je=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Me=e.unstable_IdlePriority,Fe=e.log,Ve=e.unstable_setDisableYieldValue,Et=null,bt=null;function xt(i){if(typeof Fe=="function"&&Ve(i),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Et,i)}catch{}}var Ae=Math.clz32?Math.clz32:Ye,Ze=Math.log,Re=Math.LN2;function Ye(i){return i>>>=0,i===0?32:31-(Ze(i)/Re|0)|0}var jt=256,ie=262144,Ee=4194304;function he(i){var s=i&42;if(s!==0)return s;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Oe(i,s,u){var p=i.pendingLanes;if(p===0)return 0;var b=0,_=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var k=p&134217727;return k!==0?(p=k&~_,p!==0?b=he(p):(M&=k,M!==0?b=he(M):u||(u=k&~i,u!==0&&(b=he(u))))):(k=p&~_,k!==0?b=he(k):M!==0?b=he(M):u||(u=p&~i,u!==0&&(b=he(u)))),b===0?0:s!==0&&s!==b&&(s&_)===0&&(_=b&-b,u=s&-s,_>=u||_===32&&(u&4194048)!==0)?s:b}function Pe(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function De(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 He(){var i=Ee;return Ee<<=1,(Ee&62914560)===0&&(Ee=4194304),i}function wt(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function st(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function On(i,s,u,p,b,_){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var k=i.entanglements,W=i.expirationTimes,ae=i.hiddenUpdates;for(u=M&~u;0<u;){var pe=31-Ae(u),ye=1<<pe;k[pe]=0,W[pe]=-1;var le=ae[pe];if(le!==null)for(ae[pe]=null,pe=0;pe<le.length;pe++){var de=le[pe];de!==null&&(de.lane&=-536870913)}u&=~ye}p!==0&&Ca(i,p,0),_!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=_&~(M&~s))}function Ca(i,s,u){i.pendingLanes|=s,i.suspendedLanes&=~s;var p=31-Ae(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function Gn(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var p=31-Ae(u),b=1<<p;b&s|i[p]&s&&(i[p]|=s),u&=~b}}function Wn(i,s){var u=s&-s;return u=(u&42)!==0?1:ti(u),(u&(i.suspendedLanes|s))!==0?0:u}function ti(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function gr(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ug(){var i=F.p;return i!==0?i:(i=window.event,i===void 0?32:J2(i.type))}function mE(i,s){var u=F.p;try{return F.p=i,s()}finally{F.p=u}}var Ui=Math.random().toString(36).slice(2),kn="__reactFiber$"+Ui,sr="__reactProps$"+Ui,Is="__reactContainer$"+Ui,fg="__reactEvents$"+Ui,$U="__reactListeners$"+Ui,zU="__reactHandles$"+Ui,vE="__reactResources$"+Ui,zc="__reactMarker$"+Ui;function dg(i){delete i[kn],delete i[sr],delete i[fg],delete i[$U],delete i[zU]}function Bs(i){var s=i[kn];if(s)return s;for(var u=i.parentNode;u;){if(s=u[Is]||u[kn]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=z2(i);i!==null;){if(u=i[kn])return u;i=z2(i)}return s}i=u,u=i.parentNode}return null}function Us(i){if(i=i[kn]||i[Is]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Lc(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function qs(i){var s=i[vE];return s||(s=i[vE]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Nn(i){i[zc]=!0}var gE=new Set,yE={};function Bo(i,s){Hs(i,s),Hs(i+"Capture",s)}function Hs(i,s){for(yE[i]=s,i=0;i<s.length;i++)gE.add(s[i])}var LU=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]*$"),bE={},xE={};function IU(i){return ct.call(xE,i)?!0:ct.call(bE,i)?!1:LU.test(i)?xE[i]=!0:(bE[i]=!0,!1)}function Td(i,s,u){if(IU(s))if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function jd(i,s,u){if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+u)}}function ni(i,s,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+p)}}function $r(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function wE(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function BU(i,s,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var b=p.get,_=p.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,_.call(this,M)}}),Object.defineProperty(i,s,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function hg(i){if(!i._valueTracker){var s=wE(i)?"checked":"value";i._valueTracker=BU(i,s,""+i[s])}}function SE(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),p="";return i&&(p=wE(i)?i.checked?"true":"false":i.value),i=p,i!==u?(s.setValue(i),!0):!1}function Cd(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var UU=/[\n"\\]/g;function zr(i){return i.replace(UU,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function pg(i,s,u,p,b,_,M,k){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),s!=null?M==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+$r(s)):i.value!==""+$r(s)&&(i.value=""+$r(s)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),s!=null?mg(i,M,$r(s)):u!=null?mg(i,M,$r(u)):p!=null&&i.removeAttribute("value"),b==null&&_!=null&&(i.defaultChecked=!!_),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+$r(k):i.removeAttribute("name")}function _E(i,s,u,p,b,_,M,k){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),s!=null||u!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){hg(i);return}u=u!=null?""+$r(u):"",s=s!=null?""+$r(s):u,k||s===i.value||(i.value=s),i.defaultValue=s}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=k?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),hg(i)}function mg(i,s,u){s==="number"&&Cd(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Fs(i,s,u,p){if(i=i.options,s){s={};for(var b=0;b<u.length;b++)s["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=s.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&p&&(i[u].defaultSelected=!0)}else{for(u=""+$r(u),s=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,p&&(i[b].defaultSelected=!0);return}s!==null||i[b].disabled||(s=i[b])}s!==null&&(s.selected=!0)}}function AE(i,s,u){if(s!=null&&(s=""+$r(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+$r(u):""}function OE(i,s,u,p){if(s==null){if(p!=null){if(u!=null)throw Error(r(92));if(G(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),s=u}u=$r(s),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),hg(i)}function Vs(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var qU=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 EE(i,s,u){var p=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,u):typeof u!="number"||u===0||qU.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function TE(i,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var b in s)p=s[b],s.hasOwnProperty(b)&&u[b]!==p&&EE(i,b,p)}else for(var _ in s)s.hasOwnProperty(_)&&EE(i,_,s[_])}function vg(i){if(i.indexOf("-")===-1)return!1;switch(i){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 HU=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"]]),FU=/^[\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 Rd(i){return FU.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function ri(){}var gg=null;function yg(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Gs=null,Ws=null;function jE(i){var s=Us(i);if(s&&(i=s.stateNode)){var u=i[sr]||null;e:switch(i=s.stateNode,s.type){case"input":if(pg(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+zr(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var p=u[s];if(p!==i&&p.form===i.form){var b=p[sr]||null;if(!b)throw Error(r(90));pg(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)p=u[s],p.form===i.form&&SE(p)}break e;case"textarea":AE(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Fs(i,!!u.multiple,s,!1)}}}var bg=!1;function CE(i,s,u){if(bg)return i(s,u);bg=!0;try{var p=i(s);return p}finally{if(bg=!1,(Gs!==null||Ws!==null)&&(gh(),Gs&&(s=Gs,i=Ws,Ws=Gs=null,jE(s),i)))for(s=0;s<i.length;s++)jE(i[s])}}function Ic(i,s){var u=i.stateNode;if(u===null)return null;var p=u[sr]||null;if(p===null)return null;u=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xg=!1;if(ai)try{var Bc={};Object.defineProperty(Bc,"passive",{get:function(){xg=!0}}),window.addEventListener("test",Bc,Bc),window.removeEventListener("test",Bc,Bc)}catch{xg=!1}var qi=null,wg=null,Nd=null;function RE(){if(Nd)return Nd;var i,s=wg,u=s.length,p,b="value"in qi?qi.value:qi.textContent,_=b.length;for(i=0;i<u&&s[i]===b[i];i++);var M=u-i;for(p=1;p<=M&&s[u-p]===b[_-p];p++);return Nd=b.slice(i,1<p?1-p:void 0)}function Md(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Pd(){return!0}function NE(){return!1}function lr(i){function s(u,p,b,_,M){this._reactName=u,this._targetInst=b,this.type=p,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(u=i[k],this[k]=u?u(_):_[k]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Pd:NE,this.isPropagationStopped=NE,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Pd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Pd)},persist:function(){},isPersistent:Pd}),s}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dd=lr(Uo),Uc=h({},Uo,{view:0,detail:0}),VU=lr(Uc),Sg,_g,qc,kd=h({},Uc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Og,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==qc&&(qc&&i.type==="mousemove"?(Sg=i.screenX-qc.screenX,_g=i.screenY-qc.screenY):_g=Sg=0,qc=i),Sg)},movementY:function(i){return"movementY"in i?i.movementY:_g}}),ME=lr(kd),GU=h({},kd,{dataTransfer:0}),WU=lr(GU),YU=h({},Uc,{relatedTarget:0}),Ag=lr(YU),ZU=h({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),KU=lr(ZU),XU=h({},Uo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),QU=lr(XU),JU=h({},Uo,{data:0}),PE=lr(JU),eq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tq={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"},nq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rq(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=nq[i])?!!s[i]:!1}function Og(){return rq}var aq=h({},Uc,{key:function(i){if(i.key){var s=eq[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Md(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?tq[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Og,charCode:function(i){return i.type==="keypress"?Md(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Md(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),iq=lr(aq),oq=h({},kd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DE=lr(oq),sq=h({},Uc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Og}),lq=lr(sq),cq=h({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),uq=lr(cq),fq=h({},kd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),dq=lr(fq),hq=h({},Uo,{newState:0,oldState:0}),pq=lr(hq),mq=[9,13,27,32],Eg=ai&&"CompositionEvent"in window,Hc=null;ai&&"documentMode"in document&&(Hc=document.documentMode);var vq=ai&&"TextEvent"in window&&!Hc,kE=ai&&(!Eg||Hc&&8<Hc&&11>=Hc),$E=" ",zE=!1;function LE(i,s){switch(i){case"keyup":return mq.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IE(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ys=!1;function gq(i,s){switch(i){case"compositionend":return IE(s);case"keypress":return s.which!==32?null:(zE=!0,$E);case"textInput":return i=s.data,i===$E&&zE?null:i;default:return null}}function yq(i,s){if(Ys)return i==="compositionend"||!Eg&&LE(i,s)?(i=RE(),Nd=wg=qi=null,Ys=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return kE&&s.locale!=="ko"?null:s.data;default:return null}}var bq={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 BE(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!bq[i.type]:s==="textarea"}function UE(i,s,u,p){Gs?Ws?Ws.push(p):Ws=[p]:Gs=p,s=Ah(s,"onChange"),0<s.length&&(u=new Dd("onChange","change",null,u,p),i.push({event:u,listeners:s}))}var Fc=null,Vc=null;function xq(i){_2(i,0)}function $d(i){var s=Lc(i);if(SE(s))return i}function qE(i,s){if(i==="change")return s}var HE=!1;if(ai){var Tg;if(ai){var jg="oninput"in document;if(!jg){var FE=document.createElement("div");FE.setAttribute("oninput","return;"),jg=typeof FE.oninput=="function"}Tg=jg}else Tg=!1;HE=Tg&&(!document.documentMode||9<document.documentMode)}function VE(){Fc&&(Fc.detachEvent("onpropertychange",GE),Vc=Fc=null)}function GE(i){if(i.propertyName==="value"&&$d(Vc)){var s=[];UE(s,Vc,i,yg(i)),CE(xq,s)}}function wq(i,s,u){i==="focusin"?(VE(),Fc=s,Vc=u,Fc.attachEvent("onpropertychange",GE)):i==="focusout"&&VE()}function Sq(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $d(Vc)}function _q(i,s){if(i==="click")return $d(s)}function Aq(i,s){if(i==="input"||i==="change")return $d(s)}function Oq(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var yr=typeof Object.is=="function"?Object.is:Oq;function Gc(i,s){if(yr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),p=Object.keys(s);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var b=u[p];if(!ct.call(s,b)||!yr(i[b],s[b]))return!1}return!0}function WE(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function YE(i,s){var u=WE(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=s&&p>=s)return{node:u,offset:s-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=WE(u)}}function ZE(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?ZE(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function KE(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Cd(i.document);s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=Cd(i.document)}return s}function Cg(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var Eq=ai&&"documentMode"in document&&11>=document.documentMode,Zs=null,Rg=null,Wc=null,Ng=!1;function XE(i,s,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ng||Zs==null||Zs!==Cd(p)||(p=Zs,"selectionStart"in p&&Cg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Wc&&Gc(Wc,p)||(Wc=p,p=Ah(Rg,"onSelect"),0<p.length&&(s=new Dd("onSelect","select",null,s,u),i.push({event:s,listeners:p}),s.target=Zs)))}function qo(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var Ks={animationend:qo("Animation","AnimationEnd"),animationiteration:qo("Animation","AnimationIteration"),animationstart:qo("Animation","AnimationStart"),transitionrun:qo("Transition","TransitionRun"),transitionstart:qo("Transition","TransitionStart"),transitioncancel:qo("Transition","TransitionCancel"),transitionend:qo("Transition","TransitionEnd")},Mg={},QE={};ai&&(QE=document.createElement("div").style,"AnimationEvent"in window||(delete Ks.animationend.animation,delete Ks.animationiteration.animation,delete Ks.animationstart.animation),"TransitionEvent"in window||delete Ks.transitionend.transition);function Ho(i){if(Mg[i])return Mg[i];if(!Ks[i])return i;var s=Ks[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in QE)return Mg[i]=s[u];return i}var JE=Ho("animationend"),eT=Ho("animationiteration"),tT=Ho("animationstart"),Tq=Ho("transitionrun"),jq=Ho("transitionstart"),Cq=Ho("transitioncancel"),nT=Ho("transitionend"),rT=new Map,Pg="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(" ");Pg.push("scrollEnd");function ca(i,s){rT.set(i,s),Bo(s,[i])}var zd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Lr=[],Xs=0,Dg=0;function Ld(){for(var i=Xs,s=Dg=Xs=0;s<i;){var u=Lr[s];Lr[s++]=null;var p=Lr[s];Lr[s++]=null;var b=Lr[s];Lr[s++]=null;var _=Lr[s];if(Lr[s++]=null,p!==null&&b!==null){var M=p.pending;M===null?b.next=b:(b.next=M.next,M.next=b),p.pending=b}_!==0&&aT(u,b,_)}}function Id(i,s,u,p){Lr[Xs++]=i,Lr[Xs++]=s,Lr[Xs++]=u,Lr[Xs++]=p,Dg|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function kg(i,s,u,p){return Id(i,s,u,p),Bd(i)}function Fo(i,s){return Id(i,null,null,s),Bd(i)}function aT(i,s,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var b=!1,_=i.return;_!==null;)_.childLanes|=u,p=_.alternate,p!==null&&(p.childLanes|=u),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(b=!0)),i=_,_=_.return;return i.tag===3?(_=i.stateNode,b&&s!==null&&(b=31-Ae(u),i=_.hiddenUpdates,p=i[b],p===null?i[b]=[s]:p.push(s),s.lane=u|536870912),_):null}function Bd(i){if(50<mu)throw mu=0,Fy=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Qs={};function Rq(i,s,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function br(i,s,u,p){return new Rq(i,s,u,p)}function $g(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ii(i,s){var u=i.alternate;return u===null?(u=br(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function iT(i,s){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,s=u.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function Ud(i,s,u,p,b,_){var M=0;if(p=i,typeof i=="function")$g(i)&&(M=1);else if(typeof i=="string")M=kH(i,u,ce.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=br(31,u,s,b),i.elementType=z,i.lanes=_,i;case S:return Vo(u.children,b,_,s);case w:M=8,b|=24;break;case O:return i=br(12,u,s,b|2),i.elementType=O,i.lanes=_,i;case j:return i=br(13,u,s,b),i.elementType=j,i.lanes=_,i;case R:return i=br(19,u,s,b),i.elementType=R,i.lanes=_,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:M=10;break e;case E:M=9;break e;case C:M=11;break e;case N:M=14;break e;case D:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return s=br(M,u,s,b),s.elementType=i,s.type=p,s.lanes=_,s}function Vo(i,s,u,p){return i=br(7,i,p,s),i.lanes=u,i}function zg(i,s,u){return i=br(6,i,null,s),i.lanes=u,i}function oT(i){var s=br(18,null,null,0);return s.stateNode=i,s}function Lg(i,s,u){return s=br(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var sT=new WeakMap;function Ir(i,s){if(typeof i=="object"&&i!==null){var u=sT.get(i);return u!==void 0?u:(s={value:i,source:s,stack:qt(s)},sT.set(i,s),s)}return{value:i,source:s,stack:qt(s)}}var Js=[],el=0,qd=null,Yc=0,Br=[],Ur=0,Hi=null,Ra=1,Na="";function oi(i,s){Js[el++]=Yc,Js[el++]=qd,qd=i,Yc=s}function lT(i,s,u){Br[Ur++]=Ra,Br[Ur++]=Na,Br[Ur++]=Hi,Hi=i;var p=Ra;i=Na;var b=32-Ae(p)-1;p&=~(1<<b),u+=1;var _=32-Ae(s)+b;if(30<_){var M=b-b%5;_=(p&(1<<M)-1).toString(32),p>>=M,b-=M,Ra=1<<32-Ae(s)+b|u<<b|p,Na=_+i}else Ra=1<<_|u<<b|p,Na=i}function Ig(i){i.return!==null&&(oi(i,1),lT(i,1,0))}function Bg(i){for(;i===qd;)qd=Js[--el],Js[el]=null,Yc=Js[--el],Js[el]=null;for(;i===Hi;)Hi=Br[--Ur],Br[Ur]=null,Na=Br[--Ur],Br[Ur]=null,Ra=Br[--Ur],Br[Ur]=null}function cT(i,s){Br[Ur++]=Ra,Br[Ur++]=Na,Br[Ur++]=Hi,Ra=s.id,Na=s.overflow,Hi=i}var $n=null,Wt=null,gt=!1,Fi=null,qr=!1,Ug=Error(r(519));function Vi(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zc(Ir(s,i)),Ug}function uT(i){var s=i.stateNode,u=i.type,p=i.memoizedProps;switch(s[kn]=i,s[sr]=p,u){case"dialog":dt("cancel",s),dt("close",s);break;case"iframe":case"object":case"embed":dt("load",s);break;case"video":case"audio":for(u=0;u<gu.length;u++)dt(gu[u],s);break;case"source":dt("error",s);break;case"img":case"image":case"link":dt("error",s),dt("load",s);break;case"details":dt("toggle",s);break;case"input":dt("invalid",s),_E(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":dt("invalid",s);break;case"textarea":dt("invalid",s),OE(s,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||p.suppressHydrationWarning===!0||T2(s.textContent,u)?(p.popover!=null&&(dt("beforetoggle",s),dt("toggle",s)),p.onScroll!=null&&dt("scroll",s),p.onScrollEnd!=null&&dt("scrollend",s),p.onClick!=null&&(s.onclick=ri),s=!0):s=!1,s||Vi(i,!0)}function fT(i){for($n=i.return;$n;)switch($n.tag){case 5:case 31:case 13:qr=!1;return;case 27:case 3:qr=!0;return;default:$n=$n.return}}function tl(i){if(i!==$n)return!1;if(!gt)return fT(i),gt=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||ib(i.type,i.memoizedProps)),u=!u),u&&Wt&&Vi(i),fT(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Wt=$2(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Wt=$2(i)}else s===27?(s=Wt,io(i.type)?(i=ub,ub=null,Wt=i):Wt=s):Wt=$n?Fr(i.stateNode.nextSibling):null;return!0}function Go(){Wt=$n=null,gt=!1}function qg(){var i=Fi;return i!==null&&(dr===null?dr=i:dr.push.apply(dr,i),Fi=null),i}function Zc(i){Fi===null?Fi=[i]:Fi.push(i)}var Hg=I(null),Wo=null,si=null;function Gi(i,s,u){Q(Hg,s._currentValue),s._currentValue=u}function li(i){i._currentValue=Hg.current,Y(Hg)}function Fg(i,s,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===u)break;i=i.return}}function Vg(i,s,u,p){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var _=b.dependencies;if(_!==null){var M=b.child;_=_.firstContext;e:for(;_!==null;){var k=_;_=b;for(var W=0;W<s.length;W++)if(k.context===s[W]){_.lanes|=u,k=_.alternate,k!==null&&(k.lanes|=u),Fg(_.return,u,i),p||(M=null);break e}_=k.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=u,_=M.alternate,_!==null&&(_.lanes|=u),Fg(M,u,i),M=null}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===i){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}}function nl(i,s,u,p){i=null;for(var b=s,_=!1;b!==null;){if(!_){if((b.flags&524288)!==0)_=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var M=b.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var k=b.type;yr(b.pendingProps.value,M.value)||(i!==null?i.push(k):i=[k])}}else if(b===ue.current){if(M=b.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(Su):i=[Su])}b=b.return}i!==null&&Vg(s,i,u,p),s.flags|=262144}function Hd(i){for(i=i.firstContext;i!==null;){if(!yr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Yo(i){Wo=i,si=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function zn(i){return dT(Wo,i)}function Fd(i,s){return Wo===null&&Yo(i),dT(i,s)}function dT(i,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},si===null){if(i===null)throw Error(r(308));si=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else si=si.next=s;return u}var Nq=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},Mq=e.unstable_scheduleCallback,Pq=e.unstable_NormalPriority,mn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gg(){return{controller:new Nq,data:new Map,refCount:0}}function Kc(i){i.refCount--,i.refCount===0&&Mq(Pq,function(){i.controller.abort()})}var Xc=null,Wg=0,rl=0,al=null;function Dq(i,s){if(Xc===null){var u=Xc=[];Wg=0,rl=Ky(),al={status:"pending",value:void 0,then:function(p){u.push(p)}}}return Wg++,s.then(hT,hT),s}function hT(){if(--Wg===0&&Xc!==null){al!==null&&(al.status="fulfilled");var i=Xc;Xc=null,rl=0,al=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function kq(i,s){var u=[],p={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(p.status="rejected",p.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),p}var pT=$.S;$.S=function(i,s){Xj=H(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Dq(i,s),pT!==null&&pT(i,s)};var Zo=I(null);function Yg(){var i=Zo.current;return i!==null?i:Ht.pooledCache}function Vd(i,s){s===null?Q(Zo,Zo.current):Q(Zo,s.pool)}function mT(){var i=Yg();return i===null?null:{parent:mn._currentValue,pool:i}}var il=Error(r(460)),Zg=Error(r(474)),Gd=Error(r(542)),Wd={then:function(){}};function vT(i){return i=i.status,i==="fulfilled"||i==="rejected"}function gT(i,s,u){switch(u=i[u],u===void 0?i.push(s):u!==s&&(s.then(ri,ri),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,bT(i),i;default:if(typeof s.status=="string")s.then(ri,ri);else{if(i=Ht,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=p}},function(p){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,bT(i),i}throw Xo=s,il}}function Ko(i){try{var s=i._init;return s(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Xo=u,il):u}}var Xo=null;function yT(){if(Xo===null)throw Error(r(459));var i=Xo;return Xo=null,i}function bT(i){if(i===il||i===Gd)throw Error(r(483))}var ol=null,Qc=0;function Yd(i){var s=Qc;return Qc+=1,ol===null&&(ol=[]),gT(ol,i,s)}function Jc(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function Zd(i,s){throw s.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function xT(i){function s(J,K){if(i){var re=J.deletions;re===null?(J.deletions=[K],J.flags|=16):re.push(K)}}function u(J,K){if(!i)return null;for(;K!==null;)s(J,K),K=K.sibling;return null}function p(J){for(var K=new Map;J!==null;)J.key!==null?K.set(J.key,J):K.set(J.index,J),J=J.sibling;return K}function b(J,K){return J=ii(J,K),J.index=0,J.sibling=null,J}function _(J,K,re){return J.index=re,i?(re=J.alternate,re!==null?(re=re.index,re<K?(J.flags|=67108866,K):re):(J.flags|=67108866,K)):(J.flags|=1048576,K)}function M(J){return i&&J.alternate===null&&(J.flags|=67108866),J}function k(J,K,re,ge){return K===null||K.tag!==6?(K=zg(re,J.mode,ge),K.return=J,K):(K=b(K,re),K.return=J,K)}function W(J,K,re,ge){var qe=re.type;return qe===S?pe(J,K,re.props.children,ge,re.key):K!==null&&(K.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===D&&Ko(qe)===K.type)?(K=b(K,re.props),Jc(K,re),K.return=J,K):(K=Ud(re.type,re.key,re.props,null,J.mode,ge),Jc(K,re),K.return=J,K)}function ae(J,K,re,ge){return K===null||K.tag!==4||K.stateNode.containerInfo!==re.containerInfo||K.stateNode.implementation!==re.implementation?(K=Lg(re,J.mode,ge),K.return=J,K):(K=b(K,re.children||[]),K.return=J,K)}function pe(J,K,re,ge,qe){return K===null||K.tag!==7?(K=Vo(re,J.mode,ge,qe),K.return=J,K):(K=b(K,re),K.return=J,K)}function ye(J,K,re){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=zg(""+K,J.mode,re),K.return=J,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case x:return re=Ud(K.type,K.key,K.props,null,J.mode,re),Jc(re,K),re.return=J,re;case A:return K=Lg(K,J.mode,re),K.return=J,K;case D:return K=Ko(K),ye(J,K,re)}if(G(K)||P(K))return K=Vo(K,J.mode,re,null),K.return=J,K;if(typeof K.then=="function")return ye(J,Yd(K),re);if(K.$$typeof===T)return ye(J,Fd(J,K),re);Zd(J,K)}return null}function le(J,K,re,ge){var qe=K!==null?K.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return qe!==null?null:k(J,K,""+re,ge);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case x:return re.key===qe?W(J,K,re,ge):null;case A:return re.key===qe?ae(J,K,re,ge):null;case D:return re=Ko(re),le(J,K,re,ge)}if(G(re)||P(re))return qe!==null?null:pe(J,K,re,ge,null);if(typeof re.then=="function")return le(J,K,Yd(re),ge);if(re.$$typeof===T)return le(J,K,Fd(J,re),ge);Zd(J,re)}return null}function de(J,K,re,ge,qe){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return J=J.get(re)||null,k(K,J,""+ge,qe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case x:return J=J.get(ge.key===null?re:ge.key)||null,W(K,J,ge,qe);case A:return J=J.get(ge.key===null?re:ge.key)||null,ae(K,J,ge,qe);case D:return ge=Ko(ge),de(J,K,re,ge,qe)}if(G(ge)||P(ge))return J=J.get(re)||null,pe(K,J,ge,qe,null);if(typeof ge.then=="function")return de(J,K,re,Yd(ge),qe);if(ge.$$typeof===T)return de(J,K,re,Fd(K,ge),qe);Zd(K,ge)}return null}function Ie(J,K,re,ge){for(var qe=null,_t=null,Be=K,at=K=0,mt=null;Be!==null&&at<re.length;at++){Be.index>at?(mt=Be,Be=null):mt=Be.sibling;var At=le(J,Be,re[at],ge);if(At===null){Be===null&&(Be=mt);break}i&&Be&&At.alternate===null&&s(J,Be),K=_(At,K,at),_t===null?qe=At:_t.sibling=At,_t=At,Be=mt}if(at===re.length)return u(J,Be),gt&&oi(J,at),qe;if(Be===null){for(;at<re.length;at++)Be=ye(J,re[at],ge),Be!==null&&(K=_(Be,K,at),_t===null?qe=Be:_t.sibling=Be,_t=Be);return gt&&oi(J,at),qe}for(Be=p(Be);at<re.length;at++)mt=de(Be,J,at,re[at],ge),mt!==null&&(i&&mt.alternate!==null&&Be.delete(mt.key===null?at:mt.key),K=_(mt,K,at),_t===null?qe=mt:_t.sibling=mt,_t=mt);return i&&Be.forEach(function(uo){return s(J,uo)}),gt&&oi(J,at),qe}function Ge(J,K,re,ge){if(re==null)throw Error(r(151));for(var qe=null,_t=null,Be=K,at=K=0,mt=null,At=re.next();Be!==null&&!At.done;at++,At=re.next()){Be.index>at?(mt=Be,Be=null):mt=Be.sibling;var uo=le(J,Be,At.value,ge);if(uo===null){Be===null&&(Be=mt);break}i&&Be&&uo.alternate===null&&s(J,Be),K=_(uo,K,at),_t===null?qe=uo:_t.sibling=uo,_t=uo,Be=mt}if(At.done)return u(J,Be),gt&&oi(J,at),qe;if(Be===null){for(;!At.done;at++,At=re.next())At=ye(J,At.value,ge),At!==null&&(K=_(At,K,at),_t===null?qe=At:_t.sibling=At,_t=At);return gt&&oi(J,at),qe}for(Be=p(Be);!At.done;at++,At=re.next())At=de(Be,J,at,At.value,ge),At!==null&&(i&&At.alternate!==null&&Be.delete(At.key===null?at:At.key),K=_(At,K,at),_t===null?qe=At:_t.sibling=At,_t=At);return i&&Be.forEach(function(GH){return s(J,GH)}),gt&&oi(J,at),qe}function Lt(J,K,re,ge){if(typeof re=="object"&&re!==null&&re.type===S&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case x:e:{for(var qe=re.key;K!==null;){if(K.key===qe){if(qe=re.type,qe===S){if(K.tag===7){u(J,K.sibling),ge=b(K,re.props.children),ge.return=J,J=ge;break e}}else if(K.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===D&&Ko(qe)===K.type){u(J,K.sibling),ge=b(K,re.props),Jc(ge,re),ge.return=J,J=ge;break e}u(J,K);break}else s(J,K);K=K.sibling}re.type===S?(ge=Vo(re.props.children,J.mode,ge,re.key),ge.return=J,J=ge):(ge=Ud(re.type,re.key,re.props,null,J.mode,ge),Jc(ge,re),ge.return=J,J=ge)}return M(J);case A:e:{for(qe=re.key;K!==null;){if(K.key===qe)if(K.tag===4&&K.stateNode.containerInfo===re.containerInfo&&K.stateNode.implementation===re.implementation){u(J,K.sibling),ge=b(K,re.children||[]),ge.return=J,J=ge;break e}else{u(J,K);break}else s(J,K);K=K.sibling}ge=Lg(re,J.mode,ge),ge.return=J,J=ge}return M(J);case D:return re=Ko(re),Lt(J,K,re,ge)}if(G(re))return Ie(J,K,re,ge);if(P(re)){if(qe=P(re),typeof qe!="function")throw Error(r(150));return re=qe.call(re),Ge(J,K,re,ge)}if(typeof re.then=="function")return Lt(J,K,Yd(re),ge);if(re.$$typeof===T)return Lt(J,K,Fd(J,re),ge);Zd(J,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,K!==null&&K.tag===6?(u(J,K.sibling),ge=b(K,re),ge.return=J,J=ge):(u(J,K),ge=zg(re,J.mode,ge),ge.return=J,J=ge),M(J)):u(J,K)}return function(J,K,re,ge){try{Qc=0;var qe=Lt(J,K,re,ge);return ol=null,qe}catch(Be){if(Be===il||Be===Gd)throw Be;var _t=br(29,Be,null,J.mode);return _t.lanes=ge,_t.return=J,_t}finally{}}}var Qo=xT(!0),wT=xT(!1),Wi=!1;function Kg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xg(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Yi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Zi(i,s,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(Tt&2)!==0){var b=p.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),p.pending=s,s=Bd(i),aT(i,null,u),s}return Id(i,p,s,u),Bd(i)}function eu(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,Gn(i,u)}}function Qg(i,s){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var b=null,_=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};_===null?b=_=M:_=_.next=M,u=u.next}while(u!==null);_===null?b=_=s:_=_.next=s}else b=_=s;u={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:_,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var Jg=!1;function tu(){if(Jg){var i=al;if(i!==null)throw i}}function nu(i,s,u,p){Jg=!1;var b=i.updateQueue;Wi=!1;var _=b.firstBaseUpdate,M=b.lastBaseUpdate,k=b.shared.pending;if(k!==null){b.shared.pending=null;var W=k,ae=W.next;W.next=null,M===null?_=ae:M.next=ae,M=W;var pe=i.alternate;pe!==null&&(pe=pe.updateQueue,k=pe.lastBaseUpdate,k!==M&&(k===null?pe.firstBaseUpdate=ae:k.next=ae,pe.lastBaseUpdate=W))}if(_!==null){var ye=b.baseState;M=0,pe=ae=W=null,k=_;do{var le=k.lane&-536870913,de=le!==k.lane;if(de?(pt&le)===le:(p&le)===le){le!==0&&le===rl&&(Jg=!0),pe!==null&&(pe=pe.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ie=i,Ge=k;le=s;var Lt=u;switch(Ge.tag){case 1:if(Ie=Ge.payload,typeof Ie=="function"){ye=Ie.call(Lt,ye,le);break e}ye=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Ge.payload,le=typeof Ie=="function"?Ie.call(Lt,ye,le):Ie,le==null)break e;ye=h({},ye,le);break e;case 2:Wi=!0}}le=k.callback,le!==null&&(i.flags|=64,de&&(i.flags|=8192),de=b.callbacks,de===null?b.callbacks=[le]:de.push(le))}else de={lane:le,tag:k.tag,payload:k.payload,callback:k.callback,next:null},pe===null?(ae=pe=de,W=ye):pe=pe.next=de,M|=le;if(k=k.next,k===null){if(k=b.shared.pending,k===null)break;de=k,k=de.next,de.next=null,b.lastBaseUpdate=de,b.shared.pending=null}}while(!0);pe===null&&(W=ye),b.baseState=W,b.firstBaseUpdate=ae,b.lastBaseUpdate=pe,_===null&&(b.shared.lanes=0),eo|=M,i.lanes=M,i.memoizedState=ye}}function ST(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function _T(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)ST(u[i],s)}var sl=I(null),Kd=I(0);function AT(i,s){i=gi,Q(Kd,i),Q(sl,s),gi=i|s.baseLanes}function ey(){Q(Kd,gi),Q(sl,sl.current)}function ty(){gi=Kd.current,Y(sl),Y(Kd)}var xr=I(null),Hr=null;function Ki(i){var s=i.alternate;Q(un,un.current&1),Q(xr,i),Hr===null&&(s===null||sl.current!==null||s.memoizedState!==null)&&(Hr=i)}function ny(i){Q(un,un.current),Q(xr,i),Hr===null&&(Hr=i)}function OT(i){i.tag===22?(Q(un,un.current),Q(xr,i),Hr===null&&(Hr=i)):Xi()}function Xi(){Q(un,un.current),Q(xr,xr.current)}function wr(i){Y(xr),Hr===i&&(Hr=null),Y(un)}var un=I(0);function Xd(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||lb(u)||cb(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ci=0,nt=null,$t=null,vn=null,Qd=!1,ll=!1,Jo=!1,Jd=0,ru=0,cl=null,$q=0;function on(){throw Error(r(321))}function ry(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!yr(i[u],s[u]))return!1;return!0}function ay(i,s,u,p,b,_){return ci=_,nt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=i===null||i.memoizedState===null?lj:by,Jo=!1,_=u(p,b),Jo=!1,ll&&(_=TT(s,u,p,b)),ET(i),_}function ET(i){$.H=ou;var s=$t!==null&&$t.next!==null;if(ci=0,vn=$t=nt=null,Qd=!1,ru=0,cl=null,s)throw Error(r(300));i===null||gn||(i=i.dependencies,i!==null&&Hd(i)&&(gn=!0))}function TT(i,s,u,p){nt=i;var b=0;do{if(ll&&(cl=null),ru=0,ll=!1,25<=b)throw Error(r(301));if(b+=1,vn=$t=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}$.H=cj,_=s(u,p)}while(ll);return _}function zq(){var i=$.H,s=i.useState()[0];return s=typeof s.then=="function"?au(s):s,i=i.useState()[0],($t!==null?$t.memoizedState:null)!==i&&(nt.flags|=1024),s}function iy(){var i=Jd!==0;return Jd=0,i}function oy(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function sy(i){if(Qd){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Qd=!1}ci=0,vn=$t=nt=null,ll=!1,ru=Jd=0,cl=null}function tr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vn===null?nt.memoizedState=vn=i:vn=vn.next=i,vn}function fn(){if($t===null){var i=nt.alternate;i=i!==null?i.memoizedState:null}else i=$t.next;var s=vn===null?nt.memoizedState:vn.next;if(s!==null)vn=s,$t=i;else{if(i===null)throw nt.alternate===null?Error(r(467)):Error(r(310));$t=i,i={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},vn===null?nt.memoizedState=vn=i:vn=vn.next=i}return vn}function eh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function au(i){var s=ru;return ru+=1,cl===null&&(cl=[]),i=gT(cl,i,s),s=nt,(vn===null?s.memoizedState:vn.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?lj:by),i}function th(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return au(i);if(i.$$typeof===T)return zn(i)}throw Error(r(438,String(i)))}function ly(i){var s=null,u=nt.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var p=nt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=eh(),nt.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),p=0;p<i;p++)u[p]=V;return s.index++,u}function ui(i,s){return typeof s=="function"?s(i):s}function nh(i){var s=fn();return cy(s,$t,i)}function cy(i,s,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var b=i.baseQueue,_=p.pending;if(_!==null){if(b!==null){var M=b.next;b.next=_.next,_.next=M}s.baseQueue=b=_,p.pending=null}if(_=i.baseState,b===null)i.memoizedState=_;else{s=b.next;var k=M=null,W=null,ae=s,pe=!1;do{var ye=ae.lane&-536870913;if(ye!==ae.lane?(pt&ye)===ye:(ci&ye)===ye){var le=ae.revertLane;if(le===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ye===rl&&(pe=!0);else if((ci&le)===le){ae=ae.next,le===rl&&(pe=!0);continue}else ye={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},W===null?(k=W=ye,M=_):W=W.next=ye,nt.lanes|=le,eo|=le;ye=ae.action,Jo&&u(_,ye),_=ae.hasEagerState?ae.eagerState:u(_,ye)}else le={lane:ye,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},W===null?(k=W=le,M=_):W=W.next=le,nt.lanes|=ye,eo|=ye;ae=ae.next}while(ae!==null&&ae!==s);if(W===null?M=_:W.next=k,!yr(_,i.memoizedState)&&(gn=!0,pe&&(u=al,u!==null)))throw u;i.memoizedState=_,i.baseState=M,i.baseQueue=W,p.lastRenderedState=_}return b===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function uy(i){var s=fn(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,b=u.pending,_=s.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do _=i(_,M.action),M=M.next;while(M!==b);yr(_,s.memoizedState)||(gn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),u.lastRenderedState=_}return[_,p]}function jT(i,s,u){var p=nt,b=fn(),_=gt;if(_){if(u===void 0)throw Error(r(407));u=u()}else u=s();var M=!yr(($t||b).memoizedState,u);if(M&&(b.memoizedState=u,gn=!0),b=b.queue,hy(NT.bind(null,p,b,i),[i]),b.getSnapshot!==s||M||vn!==null&&vn.memoizedState.tag&1){if(p.flags|=2048,ul(9,{destroy:void 0},RT.bind(null,p,b,u,s),null),Ht===null)throw Error(r(349));_||(ci&127)!==0||CT(p,s,u)}return u}function CT(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=nt.updateQueue,s===null?(s=eh(),nt.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function RT(i,s,u,p){s.value=u,s.getSnapshot=p,MT(s)&&PT(i)}function NT(i,s,u){return u(function(){MT(s)&&PT(i)})}function MT(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!yr(i,u)}catch{return!0}}function PT(i){var s=Fo(i,2);s!==null&&hr(s,i,2)}function fy(i){var s=tr();if(typeof i=="function"){var u=i;if(i=u(),Jo){xt(!0);try{u()}finally{xt(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:i},s}function DT(i,s,u,p){return i.baseState=u,cy(i,$t,typeof p=="function"?p:ui)}function Lq(i,s,u,p,b){if(ih(i))throw Error(r(485));if(i=s.action,i!==null){var _={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};$.T!==null?u(!0):_.isTransition=!1,p(_),u=s.pending,u===null?(_.next=s.pending=_,kT(s,_)):(_.next=u.next,s.pending=u.next=_)}}function kT(i,s){var u=s.action,p=s.payload,b=i.state;if(s.isTransition){var _=$.T,M={};$.T=M;try{var k=u(b,p),W=$.S;W!==null&&W(M,k),$T(i,s,k)}catch(ae){dy(i,s,ae)}finally{_!==null&&M.types!==null&&(_.types=M.types),$.T=_}}else try{_=u(b,p),$T(i,s,_)}catch(ae){dy(i,s,ae)}}function $T(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){zT(i,s,p)},function(p){return dy(i,s,p)}):zT(i,s,u)}function zT(i,s,u){s.status="fulfilled",s.value=u,LT(s),i.state=u,s=i.pending,s!==null&&(u=s.next,u===s?i.pending=null:(u=u.next,s.next=u,kT(i,u)))}function dy(i,s,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=u,LT(s),s=s.next;while(s!==p)}i.action=null}function LT(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function IT(i,s){return s}function BT(i,s){if(gt){var u=Ht.formState;if(u!==null){e:{var p=nt;if(gt){if(Wt){t:{for(var b=Wt,_=qr;b.nodeType!==8;){if(!_){b=null;break t}if(b=Fr(b.nextSibling),b===null){b=null;break t}}_=b.data,b=_==="F!"||_==="F"?b:null}if(b){Wt=Fr(b.nextSibling),p=b.data==="F!";break e}}Vi(p)}p=!1}p&&(s=u[0])}}return u=tr(),u.memoizedState=u.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:IT,lastRenderedState:s},u.queue=p,u=ij.bind(null,nt,p),p.dispatch=u,p=fy(!1),_=yy.bind(null,nt,!1,p.queue),p=tr(),b={state:s,dispatch:null,action:i,pending:null},p.queue=b,u=Lq.bind(null,nt,b,_,u),b.dispatch=u,p.memoizedState=i,[s,u,!1]}function UT(i){var s=fn();return qT(s,$t,i)}function qT(i,s,u){if(s=cy(i,s,IT)[0],i=nh(ui)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=au(s)}catch(M){throw M===il?Gd:M}else p=s;s=fn();var b=s.queue,_=b.dispatch;return u!==s.memoizedState&&(nt.flags|=2048,ul(9,{destroy:void 0},Iq.bind(null,b,u),null)),[p,_,i]}function Iq(i,s){i.action=s}function HT(i){var s=fn(),u=$t;if(u!==null)return qT(s,u,i);fn(),s=s.memoizedState,u=fn();var p=u.queue.dispatch;return u.memoizedState=i,[s,p,!1]}function ul(i,s,u,p){return i={tag:i,create:u,deps:p,inst:s,next:null},s=nt.updateQueue,s===null&&(s=eh(),nt.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,s.lastEffect=i),i}function FT(){return fn().memoizedState}function rh(i,s,u,p){var b=tr();nt.flags|=i,b.memoizedState=ul(1|s,{destroy:void 0},u,p===void 0?null:p)}function ah(i,s,u,p){var b=fn();p=p===void 0?null:p;var _=b.memoizedState.inst;$t!==null&&p!==null&&ry(p,$t.memoizedState.deps)?b.memoizedState=ul(s,_,u,p):(nt.flags|=i,b.memoizedState=ul(1|s,_,u,p))}function VT(i,s){rh(8390656,8,i,s)}function hy(i,s){ah(2048,8,i,s)}function Bq(i){nt.flags|=4;var s=nt.updateQueue;if(s===null)s=eh(),nt.updateQueue=s,s.events=[i];else{var u=s.events;u===null?s.events=[i]:u.push(i)}}function GT(i){var s=fn().memoizedState;return Bq({ref:s,nextImpl:i}),function(){if((Tt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function WT(i,s){return ah(4,2,i,s)}function YT(i,s){return ah(4,4,i,s)}function ZT(i,s){if(typeof s=="function"){i=i();var u=s(i);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function KT(i,s,u){u=u!=null?u.concat([i]):null,ah(4,4,ZT.bind(null,s,i),u)}function py(){}function XT(i,s){var u=fn();s=s===void 0?null:s;var p=u.memoizedState;return s!==null&&ry(s,p[1])?p[0]:(u.memoizedState=[i,s],i)}function QT(i,s){var u=fn();s=s===void 0?null:s;var p=u.memoizedState;if(s!==null&&ry(s,p[1]))return p[0];if(p=i(),Jo){xt(!0);try{i()}finally{xt(!1)}}return u.memoizedState=[p,s],p}function my(i,s,u){return u===void 0||(ci&1073741824)!==0&&(pt&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=Jj(),nt.lanes|=i,eo|=i,u)}function JT(i,s,u,p){return yr(u,s)?u:sl.current!==null?(i=my(i,u,p),yr(i,s)||(gn=!0),i):(ci&42)===0||(ci&1073741824)!==0&&(pt&261930)===0?(gn=!0,i.memoizedState=u):(i=Jj(),nt.lanes|=i,eo|=i,s)}function ej(i,s,u,p,b){var _=F.p;F.p=_!==0&&8>_?_:8;var M=$.T,k={};$.T=k,yy(i,!1,s,u);try{var W=b(),ae=$.S;if(ae!==null&&ae(k,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var pe=kq(W,p);iu(i,s,pe,Ar(i))}else iu(i,s,p,Ar(i))}catch(ye){iu(i,s,{then:function(){},status:"rejected",reason:ye},Ar())}finally{F.p=_,M!==null&&k.types!==null&&(M.types=k.types),$.T=M}}function Uq(){}function vy(i,s,u,p){if(i.tag!==5)throw Error(r(476));var b=tj(i).queue;ej(i,b,s,Z,u===null?Uq:function(){return nj(i),u(p)})}function tj(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:Z},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:u},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function nj(i){var s=tj(i);s.next===null&&(s=i.alternate.memoizedState),iu(i,s.next.queue,{},Ar())}function gy(){return zn(Su)}function rj(){return fn().memoizedState}function aj(){return fn().memoizedState}function qq(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=Ar();i=Yi(u);var p=Zi(s,i,u);p!==null&&(hr(p,s,u),eu(p,s,u)),s={cache:Gg()},i.payload=s;return}s=s.return}}function Hq(i,s,u){var p=Ar();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ih(i)?oj(s,u):(u=kg(i,s,u,p),u!==null&&(hr(u,i,p),sj(u,s,p)))}function ij(i,s,u){var p=Ar();iu(i,s,u,p)}function iu(i,s,u,p){var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ih(i))oj(s,b);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var M=s.lastRenderedState,k=_(M,u);if(b.hasEagerState=!0,b.eagerState=k,yr(k,M))return Id(i,s,b,0),Ht===null&&Ld(),!1}catch{}finally{}if(u=kg(i,s,b,p),u!==null)return hr(u,i,p),sj(u,s,p),!0}return!1}function yy(i,s,u,p){if(p={lane:2,revertLane:Ky(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},ih(i)){if(s)throw Error(r(479))}else s=kg(i,u,p,2),s!==null&&hr(s,i,2)}function ih(i){var s=i.alternate;return i===nt||s!==null&&s===nt}function oj(i,s){ll=Qd=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function sj(i,s,u){if((u&4194048)!==0){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,Gn(i,u)}}var ou={readContext:zn,use:th,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useLayoutEffect:on,useInsertionEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useSyncExternalStore:on,useId:on,useHostTransitionStatus:on,useFormState:on,useActionState:on,useOptimistic:on,useMemoCache:on,useCacheRefresh:on};ou.useEffectEvent=on;var lj={readContext:zn,use:th,useCallback:function(i,s){return tr().memoizedState=[i,s===void 0?null:s],i},useContext:zn,useEffect:VT,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,rh(4194308,4,ZT.bind(null,s,i),u)},useLayoutEffect:function(i,s){return rh(4194308,4,i,s)},useInsertionEffect:function(i,s){rh(4,2,i,s)},useMemo:function(i,s){var u=tr();s=s===void 0?null:s;var p=i();if(Jo){xt(!0);try{i()}finally{xt(!1)}}return u.memoizedState=[p,s],p},useReducer:function(i,s,u){var p=tr();if(u!==void 0){var b=u(s);if(Jo){xt(!0);try{u(s)}finally{xt(!1)}}}else b=s;return p.memoizedState=p.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},p.queue=i,i=i.dispatch=Hq.bind(null,nt,i),[p.memoizedState,i]},useRef:function(i){var s=tr();return i={current:i},s.memoizedState=i},useState:function(i){i=fy(i);var s=i.queue,u=ij.bind(null,nt,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:py,useDeferredValue:function(i,s){var u=tr();return my(u,i,s)},useTransition:function(){var i=fy(!1);return i=ej.bind(null,nt,i.queue,!0,!1),tr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var p=nt,b=tr();if(gt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),Ht===null)throw Error(r(349));(pt&127)!==0||CT(p,s,u)}b.memoizedState=u;var _={value:u,getSnapshot:s};return b.queue=_,VT(NT.bind(null,p,_,i),[i]),p.flags|=2048,ul(9,{destroy:void 0},RT.bind(null,p,_,u,s),null),u},useId:function(){var i=tr(),s=Ht.identifierPrefix;if(gt){var u=Na,p=Ra;u=(p&~(1<<32-Ae(p)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Jd++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=$q++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:gy,useFormState:BT,useActionState:BT,useOptimistic:function(i){var s=tr();s.memoizedState=s.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=yy.bind(null,nt,!0,u),u.dispatch=s,[i,s]},useMemoCache:ly,useCacheRefresh:function(){return tr().memoizedState=qq.bind(null,nt)},useEffectEvent:function(i){var s=tr(),u={impl:i};return s.memoizedState=u,function(){if((Tt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},by={readContext:zn,use:th,useCallback:XT,useContext:zn,useEffect:hy,useImperativeHandle:KT,useInsertionEffect:WT,useLayoutEffect:YT,useMemo:QT,useReducer:nh,useRef:FT,useState:function(){return nh(ui)},useDebugValue:py,useDeferredValue:function(i,s){var u=fn();return JT(u,$t.memoizedState,i,s)},useTransition:function(){var i=nh(ui)[0],s=fn().memoizedState;return[typeof i=="boolean"?i:au(i),s]},useSyncExternalStore:jT,useId:rj,useHostTransitionStatus:gy,useFormState:UT,useActionState:UT,useOptimistic:function(i,s){var u=fn();return DT(u,$t,i,s)},useMemoCache:ly,useCacheRefresh:aj};by.useEffectEvent=GT;var cj={readContext:zn,use:th,useCallback:XT,useContext:zn,useEffect:hy,useImperativeHandle:KT,useInsertionEffect:WT,useLayoutEffect:YT,useMemo:QT,useReducer:uy,useRef:FT,useState:function(){return uy(ui)},useDebugValue:py,useDeferredValue:function(i,s){var u=fn();return $t===null?my(u,i,s):JT(u,$t.memoizedState,i,s)},useTransition:function(){var i=uy(ui)[0],s=fn().memoizedState;return[typeof i=="boolean"?i:au(i),s]},useSyncExternalStore:jT,useId:rj,useHostTransitionStatus:gy,useFormState:HT,useActionState:HT,useOptimistic:function(i,s){var u=fn();return $t!==null?DT(u,$t,i,s):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:ly,useCacheRefresh:aj};cj.useEffectEvent=GT;function xy(i,s,u,p){s=i.memoizedState,u=u(p,s),u=u==null?s:h({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var wy={enqueueSetState:function(i,s,u){i=i._reactInternals;var p=Ar(),b=Yi(p);b.payload=s,u!=null&&(b.callback=u),s=Zi(i,b,p),s!==null&&(hr(s,i,p),eu(s,i,p))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var p=Ar(),b=Yi(p);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=Zi(i,b,p),s!==null&&(hr(s,i,p),eu(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=Ar(),p=Yi(u);p.tag=2,s!=null&&(p.callback=s),s=Zi(i,p,u),s!==null&&(hr(s,i,u),eu(s,i,u))}};function uj(i,s,u,p,b,_,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,_,M):s.prototype&&s.prototype.isPureReactComponent?!Gc(u,p)||!Gc(b,_):!0}function fj(i,s,u,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,p),s.state!==i&&wy.enqueueReplaceState(s,s.state,null)}function es(i,s){var u=s;if("ref"in s){u={};for(var p in s)p!=="ref"&&(u[p]=s[p])}if(i=i.defaultProps){u===s&&(u=h({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function dj(i){zd(i)}function hj(i){console.error(i)}function pj(i){zd(i)}function oh(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function mj(i,s,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Sy(i,s,u){return u=Yi(u),u.tag=3,u.payload={element:null},u.callback=function(){oh(i,s)},u}function vj(i){return i=Yi(i),i.tag=3,i}function gj(i,s,u,p){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var _=p.value;i.payload=function(){return b(_)},i.callback=function(){mj(s,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){mj(s,u,p),typeof b!="function"&&(to===null?to=new Set([this]):to.add(this));var k=p.stack;this.componentDidCatch(p.value,{componentStack:k!==null?k:""})})}function Fq(i,s,u,p,b){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=u.alternate,s!==null&&nl(s,u,b,!0),u=xr.current,u!==null){switch(u.tag){case 31:case 13:return Hr===null?yh():u.alternate===null&&sn===0&&(sn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,p===Wd?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([p]):s.add(p),Wy(i,p,b)),!1;case 22:return u.flags|=65536,p===Wd?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([p]):u.add(p)),Wy(i,p,b)),!1}throw Error(r(435,u.tag))}return Wy(i,p,b),yh(),!1}if(gt)return s=xr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,p!==Ug&&(i=Error(r(422),{cause:p}),Zc(Ir(i,u)))):(p!==Ug&&(s=Error(r(423),{cause:p}),Zc(Ir(s,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,p=Ir(p,u),b=Sy(i.stateNode,p,b),Qg(i,b),sn!==4&&(sn=2)),!1;var _=Error(r(520),{cause:p});if(_=Ir(_,u),pu===null?pu=[_]:pu.push(_),sn!==4&&(sn=2),s===null)return!0;p=Ir(p,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=Sy(u.stateNode,p,i),Qg(u,i),!1;case 1:if(s=u.type,_=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(to===null||!to.has(_))))return u.flags|=65536,b&=-b,u.lanes|=b,b=vj(b),gj(b,i,u,p),Qg(u,b),!1}u=u.return}while(u!==null);return!1}var _y=Error(r(461)),gn=!1;function Ln(i,s,u,p){s.child=i===null?wT(s,null,u,p):Qo(s,i.child,u,p)}function yj(i,s,u,p,b){u=u.render;var _=s.ref;if("ref"in p){var M={};for(var k in p)k!=="ref"&&(M[k]=p[k])}else M=p;return Yo(s),p=ay(i,s,u,M,_,b),k=iy(),i!==null&&!gn?(oy(i,s,b),fi(i,s,b)):(gt&&k&&Ig(s),s.flags|=1,Ln(i,s,p,b),s.child)}function bj(i,s,u,p,b){if(i===null){var _=u.type;return typeof _=="function"&&!$g(_)&&_.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=_,xj(i,s,_,p,b)):(i=Ud(u.type,null,p,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,!Ny(i,b)){var M=_.memoizedProps;if(u=u.compare,u=u!==null?u:Gc,u(M,p)&&i.ref===s.ref)return fi(i,s,b)}return s.flags|=1,i=ii(_,p),i.ref=s.ref,i.return=s,s.child=i}function xj(i,s,u,p,b){if(i!==null){var _=i.memoizedProps;if(Gc(_,p)&&i.ref===s.ref)if(gn=!1,s.pendingProps=p=_,Ny(i,b))(i.flags&131072)!==0&&(gn=!0);else return s.lanes=i.lanes,fi(i,s,b)}return Ay(i,s,u,p,b)}function wj(i,s,u,p){var b=p.children,_=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|u:u,i!==null){for(p=s.child=i.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~_}else p=0,s.child=null;return Sj(i,s,_,u,p)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Vd(s,_!==null?_.cachePool:null),_!==null?AT(s,_):ey(),OT(s);else return p=s.lanes=536870912,Sj(i,s,_!==null?_.baseLanes|u:u,u,p)}else _!==null?(Vd(s,_.cachePool),AT(s,_),Xi(),s.memoizedState=null):(i!==null&&Vd(s,null),ey(),Xi());return Ln(i,s,b,u),s.child}function su(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Sj(i,s,u,p,b){var _=Yg();return _=_===null?null:{parent:mn._currentValue,pool:_},s.memoizedState={baseLanes:u,cachePool:_},i!==null&&Vd(s,null),ey(),OT(s),i!==null&&nl(i,s,p,!0),s.childLanes=b,null}function sh(i,s){return s=ch({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function _j(i,s,u){return Qo(s,i.child,null,u),i=sh(s,s.pendingProps),i.flags|=2,wr(s),s.memoizedState=null,i}function Vq(i,s,u){var p=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(gt){if(p.mode==="hidden")return i=sh(s,p),s.lanes=536870912,su(null,i);if(ny(s),(i=Wt)?(i=k2(i,qr),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:Ra,overflow:Na}:null,retryLane:536870912,hydrationErrors:null},u=oT(i),u.return=s,s.child=u,$n=s,Wt=null)):i=null,i===null)throw Vi(s);return s.lanes=536870912,null}return sh(s,p)}var _=i.memoizedState;if(_!==null){var M=_.dehydrated;if(ny(s),b)if(s.flags&256)s.flags&=-257,s=_j(i,s,u);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(gn||nl(i,s,u,!1),b=(u&i.childLanes)!==0,gn||b){if(p=Ht,p!==null&&(M=Wn(p,u),M!==0&&M!==_.retryLane))throw _.retryLane=M,Fo(i,M),hr(p,i,M),_y;yh(),s=_j(i,s,u)}else i=_.treeContext,Wt=Fr(M.nextSibling),$n=s,gt=!0,Fi=null,qr=!1,i!==null&&cT(s,i),s=sh(s,p),s.flags|=4096;return s}return i=ii(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function lh(i,s){var u=s.ref;if(u===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(s.flags|=4194816)}}function Ay(i,s,u,p,b){return Yo(s),u=ay(i,s,u,p,void 0,b),p=iy(),i!==null&&!gn?(oy(i,s,b),fi(i,s,b)):(gt&&p&&Ig(s),s.flags|=1,Ln(i,s,u,b),s.child)}function Aj(i,s,u,p,b,_){return Yo(s),s.updateQueue=null,u=TT(s,p,u,b),ET(i),p=iy(),i!==null&&!gn?(oy(i,s,_),fi(i,s,_)):(gt&&p&&Ig(s),s.flags|=1,Ln(i,s,u,_),s.child)}function Oj(i,s,u,p,b){if(Yo(s),s.stateNode===null){var _=Qs,M=u.contextType;typeof M=="object"&&M!==null&&(_=zn(M)),_=new u(p,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=wy,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=p,_.state=s.memoizedState,_.refs={},Kg(s),M=u.contextType,_.context=typeof M=="object"&&M!==null?zn(M):Qs,_.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(xy(s,u,M,p),_.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&wy.enqueueReplaceState(_,_.state,null),nu(s,p,_,b),tu(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){_=s.stateNode;var k=s.memoizedProps,W=es(u,k);_.props=W;var ae=_.context,pe=u.contextType;M=Qs,typeof pe=="object"&&pe!==null&&(M=zn(pe));var ye=u.getDerivedStateFromProps;pe=typeof ye=="function"||typeof _.getSnapshotBeforeUpdate=="function",k=s.pendingProps!==k,pe||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k||ae!==M)&&fj(s,_,p,M),Wi=!1;var le=s.memoizedState;_.state=le,nu(s,p,_,b),tu(),ae=s.memoizedState,k||le!==ae||Wi?(typeof ye=="function"&&(xy(s,u,ye,p),ae=s.memoizedState),(W=Wi||uj(s,u,W,p,le,ae,M))?(pe||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=ae),_.props=p,_.state=ae,_.context=M,p=W):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{_=s.stateNode,Xg(i,s),M=s.memoizedProps,pe=es(u,M),_.props=pe,ye=s.pendingProps,le=_.context,ae=u.contextType,W=Qs,typeof ae=="object"&&ae!==null&&(W=zn(ae)),k=u.getDerivedStateFromProps,(ae=typeof k=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==ye||le!==W)&&fj(s,_,p,W),Wi=!1,le=s.memoizedState,_.state=le,nu(s,p,_,b),tu();var de=s.memoizedState;M!==ye||le!==de||Wi||i!==null&&i.dependencies!==null&&Hd(i.dependencies)?(typeof k=="function"&&(xy(s,u,k,p),de=s.memoizedState),(pe=Wi||uj(s,u,pe,p,le,de,W)||i!==null&&i.dependencies!==null&&Hd(i.dependencies))?(ae||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(p,de,W),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(p,de,W)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=de),_.props=p,_.state=de,_.context=W,p=pe):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),p=!1)}return _=p,lh(i,s),p=(s.flags&128)!==0,_||p?(_=s.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,i!==null&&p?(s.child=Qo(s,i.child,null,b),s.child=Qo(s,null,u,b)):Ln(i,s,u,b),s.memoizedState=_.state,i=s.child):i=fi(i,s,b),i}function Ej(i,s,u,p){return Go(),s.flags|=256,Ln(i,s,u,p),s.child}var Oy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ey(i){return{baseLanes:i,cachePool:mT()}}function Ty(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=_r),i}function Tj(i,s,u){var p=s.pendingProps,b=!1,_=(s.flags&128)!==0,M;if((M=_)||(M=i!==null&&i.memoizedState===null?!1:(un.current&2)!==0),M&&(b=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,i===null){if(gt){if(b?Ki(s):Xi(),(i=Wt)?(i=k2(i,qr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:Ra,overflow:Na}:null,retryLane:536870912,hydrationErrors:null},u=oT(i),u.return=s,s.child=u,$n=s,Wt=null)):i=null,i===null)throw Vi(s);return cb(i)?s.lanes=32:s.lanes=536870912,null}var k=p.children;return p=p.fallback,b?(Xi(),b=s.mode,k=ch({mode:"hidden",children:k},b),p=Vo(p,b,u,null),k.return=s,p.return=s,k.sibling=p,s.child=k,p=s.child,p.memoizedState=Ey(u),p.childLanes=Ty(i,M,u),s.memoizedState=Oy,su(null,p)):(Ki(s),jy(s,k))}var W=i.memoizedState;if(W!==null&&(k=W.dehydrated,k!==null)){if(_)s.flags&256?(Ki(s),s.flags&=-257,s=Cy(i,s,u)):s.memoizedState!==null?(Xi(),s.child=i.child,s.flags|=128,s=null):(Xi(),k=p.fallback,b=s.mode,p=ch({mode:"visible",children:p.children},b),k=Vo(k,b,u,null),k.flags|=2,p.return=s,k.return=s,p.sibling=k,s.child=p,Qo(s,i.child,null,u),p=s.child,p.memoizedState=Ey(u),p.childLanes=Ty(i,M,u),s.memoizedState=Oy,s=su(null,p));else if(Ki(s),cb(k)){if(M=k.nextSibling&&k.nextSibling.dataset,M)var ae=M.dgst;M=ae,p=Error(r(419)),p.stack="",p.digest=M,Zc({value:p,source:null,stack:null}),s=Cy(i,s,u)}else if(gn||nl(i,s,u,!1),M=(u&i.childLanes)!==0,gn||M){if(M=Ht,M!==null&&(p=Wn(M,u),p!==0&&p!==W.retryLane))throw W.retryLane=p,Fo(i,p),hr(M,i,p),_y;lb(k)||yh(),s=Cy(i,s,u)}else lb(k)?(s.flags|=192,s.child=i.child,s=null):(i=W.treeContext,Wt=Fr(k.nextSibling),$n=s,gt=!0,Fi=null,qr=!1,i!==null&&cT(s,i),s=jy(s,p.children),s.flags|=4096);return s}return b?(Xi(),k=p.fallback,b=s.mode,W=i.child,ae=W.sibling,p=ii(W,{mode:"hidden",children:p.children}),p.subtreeFlags=W.subtreeFlags&65011712,ae!==null?k=ii(ae,k):(k=Vo(k,b,u,null),k.flags|=2),k.return=s,p.return=s,p.sibling=k,s.child=p,su(null,p),p=s.child,k=i.child.memoizedState,k===null?k=Ey(u):(b=k.cachePool,b!==null?(W=mn._currentValue,b=b.parent!==W?{parent:W,pool:W}:b):b=mT(),k={baseLanes:k.baseLanes|u,cachePool:b}),p.memoizedState=k,p.childLanes=Ty(i,M,u),s.memoizedState=Oy,su(i.child,p)):(Ki(s),u=i.child,i=u.sibling,u=ii(u,{mode:"visible",children:p.children}),u.return=s,u.sibling=null,i!==null&&(M=s.deletions,M===null?(s.deletions=[i],s.flags|=16):M.push(i)),s.child=u,s.memoizedState=null,u)}function jy(i,s){return s=ch({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function ch(i,s){return i=br(22,i,null,s),i.lanes=0,i}function Cy(i,s,u){return Qo(s,i.child,null,u),i=jy(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function jj(i,s,u){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Fg(i.return,s,u)}function Ry(i,s,u,p,b,_){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:b,treeForkCount:_}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=b,M.treeForkCount=_)}function Cj(i,s,u){var p=s.pendingProps,b=p.revealOrder,_=p.tail;p=p.children;var M=un.current,k=(M&2)!==0;if(k?(M=M&1|2,s.flags|=128):M&=1,Q(un,M),Ln(i,s,p,u),p=gt?Yc:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&jj(i,u,s);else if(i.tag===19)jj(i,u,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(u=s.child,b=null;u!==null;)i=u.alternate,i!==null&&Xd(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),Ry(s,!1,b,u,_,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&Xd(i)===null){s.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}Ry(s,!0,u,null,_,p);break;case"together":Ry(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function fi(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),eo|=s.lanes,(u&s.childLanes)===0)if(i!==null){if(nl(i,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,u=ii(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=ii(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function Ny(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Hd(i)))}function Gq(i,s,u){switch(s.tag){case 3:xe(s,s.stateNode.containerInfo),Gi(s,mn,i.memoizedState.cache),Go();break;case 27:case 5:_e(s);break;case 4:xe(s,s.stateNode.containerInfo);break;case 10:Gi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,ny(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Ki(s),s.flags|=128,null):(u&s.child.childLanes)!==0?Tj(i,s,u):(Ki(s),i=fi(i,s,u),i!==null?i.sibling:null);Ki(s);break;case 19:var b=(i.flags&128)!==0;if(p=(u&s.childLanes)!==0,p||(nl(i,s,u,!1),p=(u&s.childLanes)!==0),b){if(p)return Cj(i,s,u);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),Q(un,un.current),p)break;return null;case 22:return s.lanes=0,wj(i,s,u,s.pendingProps);case 24:Gi(s,mn,i.memoizedState.cache)}return fi(i,s,u)}function Rj(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)gn=!0;else{if(!Ny(i,u)&&(s.flags&128)===0)return gn=!1,Gq(i,s,u);gn=(i.flags&131072)!==0}else gn=!1,gt&&(s.flags&1048576)!==0&&lT(s,Yc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=Ko(s.elementType),s.type=i,typeof i=="function")$g(i)?(p=es(i,p),s.tag=1,s=Oj(null,s,i,p,u)):(s.tag=0,s=Ay(null,s,i,p,u));else{if(i!=null){var b=i.$$typeof;if(b===C){s.tag=11,s=yj(null,s,i,p,u);break e}else if(b===N){s.tag=14,s=bj(null,s,i,p,u);break e}}throw s=q(i)||i,Error(r(306,s,""))}}return s;case 0:return Ay(i,s,s.type,s.pendingProps,u);case 1:return p=s.type,b=es(p,s.pendingProps),Oj(i,s,p,b,u);case 3:e:{if(xe(s,s.stateNode.containerInfo),i===null)throw Error(r(387));p=s.pendingProps;var _=s.memoizedState;b=_.element,Xg(i,s),nu(s,p,null,u);var M=s.memoizedState;if(p=M.cache,Gi(s,mn,p),p!==_.cache&&Vg(s,[mn],u,!0),tu(),p=M.element,_.isDehydrated)if(_={element:p,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=Ej(i,s,p,u);break e}else if(p!==b){b=Ir(Error(r(424)),s),Zc(b),s=Ej(i,s,p,u);break e}else{switch(i=s.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Wt=Fr(i.firstChild),$n=s,gt=!0,Fi=null,qr=!0,u=wT(s,null,p,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Go(),p===b){s=fi(i,s,u);break e}Ln(i,s,p,u)}s=s.child}return s;case 26:return lh(i,s),i===null?(u=U2(s.type,null,s.pendingProps,null))?s.memoizedState=u:gt||(u=s.type,i=s.pendingProps,p=Oh(fe.current).createElement(u),p[kn]=s,p[sr]=i,In(p,u,i),Nn(p),s.stateNode=p):s.memoizedState=U2(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return _e(s),i===null&&gt&&(p=s.stateNode=L2(s.type,s.pendingProps,fe.current),$n=s,qr=!0,b=Wt,io(s.type)?(ub=b,Wt=Fr(p.firstChild)):Wt=b),Ln(i,s,s.pendingProps.children,u),lh(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&gt&&((b=p=Wt)&&(p=SH(p,s.type,s.pendingProps,qr),p!==null?(s.stateNode=p,$n=s,Wt=Fr(p.firstChild),qr=!1,b=!0):b=!1),b||Vi(s)),_e(s),b=s.type,_=s.pendingProps,M=i!==null?i.memoizedProps:null,p=_.children,ib(b,_)?p=null:M!==null&&ib(b,M)&&(s.flags|=32),s.memoizedState!==null&&(b=ay(i,s,zq,null,null,u),Su._currentValue=b),lh(i,s),Ln(i,s,p,u),s.child;case 6:return i===null&&gt&&((i=u=Wt)&&(u=_H(u,s.pendingProps,qr),u!==null?(s.stateNode=u,$n=s,Wt=null,i=!0):i=!1),i||Vi(s)),null;case 13:return Tj(i,s,u);case 4:return xe(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=Qo(s,null,p,u):Ln(i,s,p,u),s.child;case 11:return yj(i,s,s.type,s.pendingProps,u);case 7:return Ln(i,s,s.pendingProps,u),s.child;case 8:return Ln(i,s,s.pendingProps.children,u),s.child;case 12:return Ln(i,s,s.pendingProps.children,u),s.child;case 10:return p=s.pendingProps,Gi(s,s.type,p.value),Ln(i,s,p.children,u),s.child;case 9:return b=s.type._context,p=s.pendingProps.children,Yo(s),b=zn(b),p=p(b),s.flags|=1,Ln(i,s,p,u),s.child;case 14:return bj(i,s,s.type,s.pendingProps,u);case 15:return xj(i,s,s.type,s.pendingProps,u);case 19:return Cj(i,s,u);case 31:return Vq(i,s,u);case 22:return wj(i,s,u,s.pendingProps);case 24:return Yo(s),p=zn(mn),i===null?(b=Yg(),b===null&&(b=Ht,_=Gg(),b.pooledCache=_,_.refCount++,_!==null&&(b.pooledCacheLanes|=u),b=_),s.memoizedState={parent:p,cache:b},Kg(s),Gi(s,mn,b)):((i.lanes&u)!==0&&(Xg(i,s),nu(s,null,null,u),tu()),b=i.memoizedState,_=s.memoizedState,b.parent!==p?(b={parent:p,cache:p},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),Gi(s,mn,p)):(p=_.cache,Gi(s,mn,p),p!==b.cache&&Vg(s,[mn],u,!0))),Ln(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function di(i){i.flags|=4}function My(i,s,u,p,b){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(r2())i.flags|=8192;else throw Xo=Wd,Zg}else i.flags&=-16777217}function Nj(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!G2(s))if(r2())i.flags|=8192;else throw Xo=Wd,Zg}function uh(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?He():536870912,i.lanes|=s,pl|=s)}function lu(i,s){if(!gt)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Yt(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(s)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=p,i.childLanes=u,s}function Wq(i,s,u){var p=s.pendingProps;switch(Bg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(s),null;case 1:return Yt(s),null;case 3:return u=s.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),li(mn),se(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(tl(s)?di(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,qg())),Yt(s),null;case 26:var b=s.type,_=s.memoizedState;return i===null?(di(s),_!==null?(Yt(s),Nj(s,_)):(Yt(s),My(s,b,null,p,u))):_?_!==i.memoizedState?(di(s),Yt(s),Nj(s,_)):(Yt(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&di(s),Yt(s),My(s,b,i,p,u)),null;case 27:if(Se(s),u=fe.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&di(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Yt(s),null}i=ce.current,tl(s)?uT(s):(i=L2(b,p,u),s.stateNode=i,di(s))}return Yt(s),null;case 5:if(Se(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&di(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Yt(s),null}if(_=ce.current,tl(s))uT(s);else{var M=Oh(fe.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?_.multiple=!0:p.size&&(_.size=p.size);break;default:_=typeof p.is=="string"?M.createElement(b,{is:p.is}):M.createElement(b)}}_[kn]=s,_[sr]=p;e:for(M=s.child;M!==null;){if(M.tag===5||M.tag===6)_.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===s)break e;for(;M.sibling===null;){if(M.return===null||M.return===s)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}s.stateNode=_;e:switch(In(_,b,p),b){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&di(s)}}return Yt(s),My(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&di(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(i=fe.current,tl(s)){if(i=s.stateNode,u=s.memoizedProps,p=null,b=$n,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}i[kn]=s,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||T2(i.nodeValue,u)),i||Vi(s,!0)}else i=Oh(i).createTextNode(p),i[kn]=s,s.stateNode=i}return Yt(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(p=tl(s),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[kn]=s}else Go(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),i=!1}else u=qg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return s.flags&256?(wr(s),s):(wr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Yt(s),null;case 13:if(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=tl(s),p!==null&&p.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[kn]=s}else Go(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Yt(s),b=!1}else b=qg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(wr(s),s):(wr(s),null)}return wr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=s.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),_=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(_=p.memoizedState.cachePool.pool),_!==b&&(p.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),uh(s,s.updateQueue),Yt(s),null);case 4:return se(),i===null&&eb(s.stateNode.containerInfo),Yt(s),null;case 10:return li(s.type),Yt(s),null;case 19:if(Y(un),p=s.memoizedState,p===null)return Yt(s),null;if(b=(s.flags&128)!==0,_=p.rendering,_===null)if(b)lu(p,!1);else{if(sn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=Xd(i),_!==null){for(s.flags|=128,lu(p,!1),i=_.updateQueue,s.updateQueue=i,uh(s,i),s.subtreeFlags=0,i=u,u=s.child;u!==null;)iT(u,i),u=u.sibling;return Q(un,un.current&1|2),gt&&oi(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&H()>mh&&(s.flags|=128,b=!0,lu(p,!1),s.lanes=4194304)}else{if(!b)if(i=Xd(_),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,uh(s,i),lu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!_.alternate&&!gt)return Yt(s),null}else 2*H()-p.renderingStartTime>mh&&u!==536870912&&(s.flags|=128,b=!0,lu(p,!1),s.lanes=4194304);p.isBackwards?(_.sibling=s.child,s.child=_):(i=p.last,i!==null?i.sibling=_:s.child=_,p.last=_)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=H(),i.sibling=null,u=un.current,Q(un,b?u&1|2:u&1),gt&&oi(s,p.treeForkCount),i):(Yt(s),null);case 22:case 23:return wr(s),ty(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(u&536870912)!==0&&(s.flags&128)===0&&(Yt(s),s.subtreeFlags&6&&(s.flags|=8192)):Yt(s),u=s.updateQueue,u!==null&&uh(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==u&&(s.flags|=2048),i!==null&&Y(Zo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),li(mn),Yt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function Yq(i,s){switch(Bg(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return li(mn),se(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Se(s),null;case 31:if(s.memoizedState!==null){if(wr(s),s.alternate===null)throw Error(r(340));Go()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(wr(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Go()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Y(un),null;case 4:return se(),null;case 10:return li(s.type),null;case 22:case 23:return wr(s),ty(),i!==null&&Y(Zo),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return li(mn),null;case 25:return null;default:return null}}function Mj(i,s){switch(Bg(s),s.tag){case 3:li(mn),se();break;case 26:case 27:case 5:Se(s);break;case 4:se();break;case 31:s.memoizedState!==null&&wr(s);break;case 13:wr(s);break;case 19:Y(un);break;case 10:li(s.type);break;case 22:case 23:wr(s),ty(),i!==null&&Y(Zo);break;case 24:li(mn)}}function cu(i,s){try{var u=s.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){p=void 0;var _=u.create,M=u.inst;p=_(),M.destroy=p}u=u.next}while(u!==b)}}catch(k){Mt(s,s.return,k)}}function Qi(i,s,u){try{var p=s.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var _=b.next;p=_;do{if((p.tag&i)===i){var M=p.inst,k=M.destroy;if(k!==void 0){M.destroy=void 0,b=s;var W=u,ae=k;try{ae()}catch(pe){Mt(b,W,pe)}}}p=p.next}while(p!==_)}}catch(pe){Mt(s,s.return,pe)}}function Pj(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{_T(s,u)}catch(p){Mt(i,i.return,p)}}}function Dj(i,s,u){u.props=es(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){Mt(i,s,p)}}function uu(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(b){Mt(i,s,b)}}function Ma(i,s){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(b){Mt(i,s,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){Mt(i,s,b)}else u.current=null}function kj(i){var s=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(b){Mt(i,i.return,b)}}function Py(i,s,u){try{var p=i.stateNode;vH(p,i.type,u,s),p[sr]=s}catch(b){Mt(i,i.return,b)}}function $j(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&io(i.type)||i.tag===4}function Dy(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||$j(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&io(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ky(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(i),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ri));else if(p!==4&&(p===27&&io(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(ky(i,s,u),i=i.sibling;i!==null;)ky(i,s,u),i=i.sibling}function fh(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(p!==4&&(p===27&&io(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(fh(i,s,u),i=i.sibling;i!==null;)fh(i,s,u),i=i.sibling}function zj(i){var s=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);In(s,p,u),s[kn]=i,s[sr]=u}catch(_){Mt(i,i.return,_)}}var hi=!1,yn=!1,$y=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,Mn=null;function Zq(i,s){if(i=i.containerInfo,rb=Mh,i=KE(i),Cg(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var b=p.anchorOffset,_=p.focusNode;p=p.focusOffset;try{u.nodeType,_.nodeType}catch{u=null;break e}var M=0,k=-1,W=-1,ae=0,pe=0,ye=i,le=null;t:for(;;){for(var de;ye!==u||b!==0&&ye.nodeType!==3||(k=M+b),ye!==_||p!==0&&ye.nodeType!==3||(W=M+p),ye.nodeType===3&&(M+=ye.nodeValue.length),(de=ye.firstChild)!==null;)le=ye,ye=de;for(;;){if(ye===i)break t;if(le===u&&++ae===b&&(k=M),le===_&&++pe===p&&(W=M),(de=ye.nextSibling)!==null)break;ye=le,le=ye.parentNode}ye=de}u=k===-1||W===-1?null:{start:k,end:W}}else u=null}u=u||{start:0,end:0}}else u=null;for(ab={focusedElem:i,selectionRange:u},Mh=!1,Mn=s;Mn!==null;)if(s=Mn,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Mn=i;else for(;Mn!==null;){switch(s=Mn,_=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,u=s,b=_.memoizedProps,_=_.memoizedState,p=u.stateNode;try{var Ie=es(u.type,b);i=p.getSnapshotBeforeUpdate(Ie,_),p.__reactInternalSnapshotBeforeUpdate=i}catch(Ge){Mt(u,u.return,Ge)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,u=i.nodeType,u===9)sb(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":sb(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Mn=i;break}Mn=s.return}}function Ij(i,s,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:mi(i,u),p&4&&cu(5,u);break;case 1:if(mi(i,u),p&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(M){Mt(u,u.return,M)}else{var b=es(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(M){Mt(u,u.return,M)}}p&64&&Pj(u),p&512&&uu(u,u.return);break;case 3:if(mi(i,u),p&64&&(i=u.updateQueue,i!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{_T(i,s)}catch(M){Mt(u,u.return,M)}}break;case 27:s===null&&p&4&&zj(u);case 26:case 5:mi(i,u),s===null&&p&4&&kj(u),p&512&&uu(u,u.return);break;case 12:mi(i,u);break;case 31:mi(i,u),p&4&&qj(i,u);break;case 13:mi(i,u),p&4&&Hj(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=aH.bind(null,u),AH(i,u))));break;case 22:if(p=u.memoizedState!==null||hi,!p){s=s!==null&&s.memoizedState!==null||yn,b=hi;var _=yn;hi=p,(yn=s)&&!_?vi(i,u,(u.subtreeFlags&8772)!==0):mi(i,u),hi=b,yn=_}break;case 30:break;default:mi(i,u)}}function Bj(i){var s=i.alternate;s!==null&&(i.alternate=null,Bj(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&dg(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Qt=null,cr=!1;function pi(i,s,u){for(u=u.child;u!==null;)Uj(i,s,u),u=u.sibling}function Uj(i,s,u){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Et,u)}catch{}switch(u.tag){case 26:yn||Ma(u,s),pi(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:yn||Ma(u,s);var p=Qt,b=cr;io(u.type)&&(Qt=u.stateNode,cr=!1),pi(i,s,u),bu(u.stateNode),Qt=p,cr=b;break;case 5:yn||Ma(u,s);case 6:if(p=Qt,b=cr,Qt=null,pi(i,s,u),Qt=p,cr=b,Qt!==null)if(cr)try{(Qt.nodeType===9?Qt.body:Qt.nodeName==="HTML"?Qt.ownerDocument.body:Qt).removeChild(u.stateNode)}catch(_){Mt(u,s,_)}else try{Qt.removeChild(u.stateNode)}catch(_){Mt(u,s,_)}break;case 18:Qt!==null&&(cr?(i=Qt,P2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Sl(i)):P2(Qt,u.stateNode));break;case 4:p=Qt,b=cr,Qt=u.stateNode.containerInfo,cr=!0,pi(i,s,u),Qt=p,cr=b;break;case 0:case 11:case 14:case 15:Qi(2,u,s),yn||Qi(4,u,s),pi(i,s,u);break;case 1:yn||(Ma(u,s),p=u.stateNode,typeof p.componentWillUnmount=="function"&&Dj(u,s,p)),pi(i,s,u);break;case 21:pi(i,s,u);break;case 22:yn=(p=yn)||u.memoizedState!==null,pi(i,s,u),yn=p;break;default:pi(i,s,u)}}function qj(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Sl(i)}catch(u){Mt(s,s.return,u)}}}function Hj(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Sl(i)}catch(u){Mt(s,s.return,u)}}function Kq(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new Lj),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new Lj),s;default:throw Error(r(435,i.tag))}}function dh(i,s){var u=Kq(i);s.forEach(function(p){if(!u.has(p)){u.add(p);var b=iH.bind(null,i,p);p.then(b,b)}})}function ur(i,s){var u=s.deletions;if(u!==null)for(var p=0;p<u.length;p++){var b=u[p],_=i,M=s,k=M;e:for(;k!==null;){switch(k.tag){case 27:if(io(k.type)){Qt=k.stateNode,cr=!1;break e}break;case 5:Qt=k.stateNode,cr=!1;break e;case 3:case 4:Qt=k.stateNode.containerInfo,cr=!0;break e}k=k.return}if(Qt===null)throw Error(r(160));Uj(_,M,b),Qt=null,cr=!1,_=b.alternate,_!==null&&(_.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Fj(s,i),s=s.sibling}var ua=null;function Fj(i,s){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ur(s,i),fr(i),p&4&&(Qi(3,i,i.return),cu(3,i),Qi(5,i,i.return));break;case 1:ur(s,i),fr(i),p&512&&(yn||u===null||Ma(u,u.return)),p&64&&hi&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var b=ua;if(ur(s,i),fr(i),p&512&&(yn||u===null||Ma(u,u.return)),p&4){var _=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":_=b.getElementsByTagName("title")[0],(!_||_[zc]||_[kn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=b.createElement(p),b.head.insertBefore(_,b.querySelector("head > title"))),In(_,p,u),_[kn]=i,Nn(_),p=_;break e;case"link":var M=F2("link","href",b).get(p+(u.href||""));if(M){for(var k=0;k<M.length;k++)if(_=M[k],_.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&_.getAttribute("rel")===(u.rel==null?null:u.rel)&&_.getAttribute("title")===(u.title==null?null:u.title)&&_.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(k,1);break t}}_=b.createElement(p),In(_,p,u),b.head.appendChild(_);break;case"meta":if(M=F2("meta","content",b).get(p+(u.content||""))){for(k=0;k<M.length;k++)if(_=M[k],_.getAttribute("content")===(u.content==null?null:""+u.content)&&_.getAttribute("name")===(u.name==null?null:u.name)&&_.getAttribute("property")===(u.property==null?null:u.property)&&_.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&_.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(k,1);break t}}_=b.createElement(p),In(_,p,u),b.head.appendChild(_);break;default:throw Error(r(468,p))}_[kn]=i,Nn(_),p=_}i.stateNode=p}else V2(b,i.type,i.stateNode);else i.stateNode=H2(b,p,i.memoizedProps);else _!==p?(_===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):_.count--,p===null?V2(b,i.type,i.stateNode):H2(b,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Py(i,i.memoizedProps,u.memoizedProps)}break;case 27:ur(s,i),fr(i),p&512&&(yn||u===null||Ma(u,u.return)),u!==null&&p&4&&Py(i,i.memoizedProps,u.memoizedProps);break;case 5:if(ur(s,i),fr(i),p&512&&(yn||u===null||Ma(u,u.return)),i.flags&32){b=i.stateNode;try{Vs(b,"")}catch(Ie){Mt(i,i.return,Ie)}}p&4&&i.stateNode!=null&&(b=i.memoizedProps,Py(i,b,u!==null?u.memoizedProps:b)),p&1024&&($y=!0);break;case 6:if(ur(s,i),fr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Ie){Mt(i,i.return,Ie)}}break;case 3:if(jh=null,b=ua,ua=Eh(s.containerInfo),ur(s,i),ua=b,fr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Sl(s.containerInfo)}catch(Ie){Mt(i,i.return,Ie)}$y&&($y=!1,Vj(i));break;case 4:p=ua,ua=Eh(i.stateNode.containerInfo),ur(s,i),fr(i),ua=p;break;case 12:ur(s,i),fr(i);break;case 31:ur(s,i),fr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dh(i,p)));break;case 13:ur(s,i),fr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(ph=H()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dh(i,p)));break;case 22:b=i.memoizedState!==null;var W=u!==null&&u.memoizedState!==null,ae=hi,pe=yn;if(hi=ae||b,yn=pe||W,ur(s,i),yn=pe,hi=ae,fr(i),p&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||W||hi||yn||ts(i)),u=null,s=i;;){if(s.tag===5||s.tag===26){if(u===null){W=u=s;try{if(_=W.stateNode,b)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{k=W.stateNode;var ye=W.memoizedProps.style,le=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;k.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Ie){Mt(W,W.return,Ie)}}}else if(s.tag===6){if(u===null){W=s;try{W.stateNode.nodeValue=b?"":W.memoizedProps}catch(Ie){Mt(W,W.return,Ie)}}}else if(s.tag===18){if(u===null){W=s;try{var de=W.stateNode;b?D2(de,!0):D2(W.stateNode,!1)}catch(Ie){Mt(W,W.return,Ie)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,dh(i,u))));break;case 19:ur(s,i),fr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dh(i,p)));break;case 30:break;case 21:break;default:ur(s,i),fr(i)}}function fr(i){var s=i.flags;if(s&2){try{for(var u,p=i.return;p!==null;){if($j(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,_=Dy(i);fh(i,_,b);break;case 5:var M=u.stateNode;u.flags&32&&(Vs(M,""),u.flags&=-33);var k=Dy(i);fh(i,k,M);break;case 3:case 4:var W=u.stateNode.containerInfo,ae=Dy(i);ky(i,ae,W);break;default:throw Error(r(161))}}catch(pe){Mt(i,i.return,pe)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Vj(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;Vj(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function mi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Ij(i,s.alternate,s),s=s.sibling}function ts(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Qi(4,s,s.return),ts(s);break;case 1:Ma(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&Dj(s,s.return,u),ts(s);break;case 27:bu(s.stateNode);case 26:case 5:Ma(s,s.return),ts(s);break;case 22:s.memoizedState===null&&ts(s);break;case 30:ts(s);break;default:ts(s)}i=i.sibling}}function vi(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,b=i,_=s,M=_.flags;switch(_.tag){case 0:case 11:case 15:vi(b,_,u),cu(4,_);break;case 1:if(vi(b,_,u),p=_,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(ae){Mt(p,p.return,ae)}if(p=_,b=p.updateQueue,b!==null){var k=p.stateNode;try{var W=b.shared.hiddenCallbacks;if(W!==null)for(b.shared.hiddenCallbacks=null,b=0;b<W.length;b++)ST(W[b],k)}catch(ae){Mt(p,p.return,ae)}}u&&M&64&&Pj(_),uu(_,_.return);break;case 27:zj(_);case 26:case 5:vi(b,_,u),u&&p===null&&M&4&&kj(_),uu(_,_.return);break;case 12:vi(b,_,u);break;case 31:vi(b,_,u),u&&M&4&&qj(b,_);break;case 13:vi(b,_,u),u&&M&4&&Hj(b,_);break;case 22:_.memoizedState===null&&vi(b,_,u),uu(_,_.return);break;case 30:break;default:vi(b,_,u)}s=s.sibling}}function zy(i,s){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Kc(u))}function Ly(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Kc(i))}function fa(i,s,u,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Gj(i,s,u,p),s=s.sibling}function Gj(i,s,u,p){var b=s.flags;switch(s.tag){case 0:case 11:case 15:fa(i,s,u,p),b&2048&&cu(9,s);break;case 1:fa(i,s,u,p);break;case 3:fa(i,s,u,p),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Kc(i)));break;case 12:if(b&2048){fa(i,s,u,p),i=s.stateNode;try{var _=s.memoizedProps,M=_.id,k=_.onPostCommit;typeof k=="function"&&k(M,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(W){Mt(s,s.return,W)}}else fa(i,s,u,p);break;case 31:fa(i,s,u,p);break;case 13:fa(i,s,u,p);break;case 23:break;case 22:_=s.stateNode,M=s.alternate,s.memoizedState!==null?_._visibility&2?fa(i,s,u,p):fu(i,s):_._visibility&2?fa(i,s,u,p):(_._visibility|=2,fl(i,s,u,p,(s.subtreeFlags&10256)!==0||!1)),b&2048&&zy(M,s);break;case 24:fa(i,s,u,p),b&2048&&Ly(s.alternate,s);break;default:fa(i,s,u,p)}}function fl(i,s,u,p,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=i,M=s,k=u,W=p,ae=M.flags;switch(M.tag){case 0:case 11:case 15:fl(_,M,k,W,b),cu(8,M);break;case 23:break;case 22:var pe=M.stateNode;M.memoizedState!==null?pe._visibility&2?fl(_,M,k,W,b):fu(_,M):(pe._visibility|=2,fl(_,M,k,W,b)),b&&ae&2048&&zy(M.alternate,M);break;case 24:fl(_,M,k,W,b),b&&ae&2048&&Ly(M.alternate,M);break;default:fl(_,M,k,W,b)}s=s.sibling}}function fu(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,p=s,b=p.flags;switch(p.tag){case 22:fu(u,p),b&2048&&zy(p.alternate,p);break;case 24:fu(u,p),b&2048&&Ly(p.alternate,p);break;default:fu(u,p)}s=s.sibling}}var du=8192;function dl(i,s,u){if(i.subtreeFlags&du)for(i=i.child;i!==null;)Wj(i,s,u),i=i.sibling}function Wj(i,s,u){switch(i.tag){case 26:dl(i,s,u),i.flags&du&&i.memoizedState!==null&&$H(u,ua,i.memoizedState,i.memoizedProps);break;case 5:dl(i,s,u);break;case 3:case 4:var p=ua;ua=Eh(i.stateNode.containerInfo),dl(i,s,u),ua=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=du,du=16777216,dl(i,s,u),du=p):dl(i,s,u));break;default:dl(i,s,u)}}function Yj(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function hu(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];Mn=p,Kj(p,i)}Yj(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Zj(i),i=i.sibling}function Zj(i){switch(i.tag){case 0:case 11:case 15:hu(i),i.flags&2048&&Qi(9,i,i.return);break;case 3:hu(i);break;case 12:hu(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,hh(i)):hu(i);break;default:hu(i)}}function hh(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];Mn=p,Kj(p,i)}Yj(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Qi(8,s,s.return),hh(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,hh(s));break;default:hh(s)}i=i.sibling}}function Kj(i,s){for(;Mn!==null;){var u=Mn;switch(u.tag){case 0:case 11:case 15:Qi(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Kc(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Mn=p;else e:for(u=i;Mn!==null;){p=Mn;var b=p.sibling,_=p.return;if(Bj(p),p===u){Mn=null;break e}if(b!==null){b.return=_,Mn=b;break e}Mn=_}}}var Xq={getCacheForType:function(i){var s=zn(mn),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return zn(mn).controller.signal}},Qq=typeof WeakMap=="function"?WeakMap:Map,Tt=0,Ht=null,ft=null,pt=0,Nt=0,Sr=null,Ji=!1,hl=!1,Iy=!1,gi=0,sn=0,eo=0,ns=0,By=0,_r=0,pl=0,pu=null,dr=null,Uy=!1,ph=0,Xj=0,mh=1/0,vh=null,to=null,En=0,no=null,ml=null,yi=0,qy=0,Hy=null,Qj=null,mu=0,Fy=null;function Ar(){return(Tt&2)!==0&&pt!==0?pt&-pt:$.T!==null?Ky():ug()}function Jj(){if(_r===0)if((pt&536870912)===0||gt){var i=ie;ie<<=1,(ie&3932160)===0&&(ie=262144),_r=i}else _r=536870912;return i=xr.current,i!==null&&(i.flags|=32),_r}function hr(i,s,u){(i===Ht&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)&&(vl(i,0),ro(i,pt,_r,!1)),st(i,u),((Tt&2)===0||i!==Ht)&&(i===Ht&&((Tt&2)===0&&(ns|=u),sn===4&&ro(i,pt,_r,!1)),Pa(i))}function e2(i,s,u){if((Tt&6)!==0)throw Error(r(327));var p=!u&&(s&127)===0&&(s&i.expiredLanes)===0||Pe(i,s),b=p?tH(i,s):Gy(i,s,!0),_=p;do{if(b===0){hl&&!p&&ro(i,s,0,!1);break}else{if(u=i.current.alternate,_&&!Jq(u)){b=Gy(i,s,!1),_=!1;continue}if(b===2){if(_=s,i.errorRecoveryDisabledLanes&_)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){s=M;e:{var k=i;b=pu;var W=k.current.memoizedState.isDehydrated;if(W&&(vl(k,M).flags|=256),M=Gy(k,M,!1),M!==2){if(Iy&&!W){k.errorRecoveryDisabledLanes|=_,ns|=_,b=4;break e}_=dr,dr=b,_!==null&&(dr===null?dr=_:dr.push.apply(dr,_))}b=M}if(_=!1,b!==2)continue}}if(b===1){vl(i,0),ro(i,s,0,!0);break}e:{switch(p=i,_=b,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:ro(p,s,_r,!Ji);break e;case 2:dr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(b=ph+300-H(),10<b)){if(ro(p,s,_r,!Ji),Oe(p,0,!0)!==0)break e;yi=s,p.timeoutHandle=N2(t2.bind(null,p,u,dr,vh,Uy,s,_r,ns,pl,Ji,_,"Throttled",-0,0),b);break e}t2(p,u,dr,vh,Uy,s,_r,ns,pl,Ji,_,null,-0,0)}}break}while(!0);Pa(i)}function t2(i,s,u,p,b,_,M,k,W,ae,pe,ye,le,de){if(i.timeoutHandle=-1,ye=s.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ri},Wj(s,_,ye);var Ie=(_&62914560)===_?ph-H():(_&4194048)===_?Xj-H():0;if(Ie=zH(ye,Ie),Ie!==null){yi=_,i.cancelPendingCommit=Ie(c2.bind(null,i,s,_,u,p,b,M,k,W,pe,ye,null,le,de)),ro(i,_,M,!ae);return}}c2(i,s,_,u,p,b,M,k,W)}function Jq(i){for(var s=i;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var b=u[p],_=b.getSnapshot;b=b.value;try{if(!yr(_(),b))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ro(i,s,u,p){s&=~By,s&=~ns,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var b=s;0<b;){var _=31-Ae(b),M=1<<_;p[_]=-1,b&=~M}u!==0&&Ca(i,u,s)}function gh(){return(Tt&6)===0?(vu(0),!1):!0}function Vy(){if(ft!==null){if(Nt===0)var i=ft.return;else i=ft,si=Wo=null,sy(i),ol=null,Qc=0,i=ft;for(;i!==null;)Mj(i.alternate,i),i=i.return;ft=null}}function vl(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,bH(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),yi=0,Vy(),Ht=i,ft=u=ii(i.current,null),pt=s,Nt=0,Sr=null,Ji=!1,hl=Pe(i,s),Iy=!1,pl=_r=By=ns=eo=sn=0,dr=pu=null,Uy=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var b=31-Ae(p),_=1<<b;s|=i[b],p&=~_}return gi=s,Ld(),u}function n2(i,s){nt=null,$.H=ou,s===il||s===Gd?(s=yT(),Nt=3):s===Zg?(s=yT(),Nt=4):Nt=s===_y?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Sr=s,ft===null&&(sn=1,oh(i,Ir(s,i.current)))}function r2(){var i=xr.current;return i===null?!0:(pt&4194048)===pt?Hr===null:(pt&62914560)===pt||(pt&536870912)!==0?i===Hr:!1}function a2(){var i=$.H;return $.H=ou,i===null?ou:i}function i2(){var i=$.A;return $.A=Xq,i}function yh(){sn=4,Ji||(pt&4194048)!==pt&&xr.current!==null||(hl=!0),(eo&134217727)===0&&(ns&134217727)===0||Ht===null||ro(Ht,pt,_r,!1)}function Gy(i,s,u){var p=Tt;Tt|=2;var b=a2(),_=i2();(Ht!==i||pt!==s)&&(vh=null,vl(i,s)),s=!1;var M=sn;e:do try{if(Nt!==0&&ft!==null){var k=ft,W=Sr;switch(Nt){case 8:Vy(),M=6;break e;case 3:case 2:case 9:case 6:xr.current===null&&(s=!0);var ae=Nt;if(Nt=0,Sr=null,gl(i,k,W,ae),u&&hl){M=0;break e}break;default:ae=Nt,Nt=0,Sr=null,gl(i,k,W,ae)}}eH(),M=sn;break}catch(pe){n2(i,pe)}while(!0);return s&&i.shellSuspendCounter++,si=Wo=null,Tt=p,$.H=b,$.A=_,ft===null&&(Ht=null,pt=0,Ld()),M}function eH(){for(;ft!==null;)o2(ft)}function tH(i,s){var u=Tt;Tt|=2;var p=a2(),b=i2();Ht!==i||pt!==s?(vh=null,mh=H()+500,vl(i,s)):hl=Pe(i,s);e:do try{if(Nt!==0&&ft!==null){s=ft;var _=Sr;t:switch(Nt){case 1:Nt=0,Sr=null,gl(i,s,_,1);break;case 2:case 9:if(vT(_)){Nt=0,Sr=null,s2(s);break}s=function(){Nt!==2&&Nt!==9||Ht!==i||(Nt=7),Pa(i)},_.then(s,s);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:vT(_)?(Nt=0,Sr=null,s2(s)):(Nt=0,Sr=null,gl(i,s,_,7));break;case 5:var M=null;switch(ft.tag){case 26:M=ft.memoizedState;case 5:case 27:var k=ft;if(M?G2(M):k.stateNode.complete){Nt=0,Sr=null;var W=k.sibling;if(W!==null)ft=W;else{var ae=k.return;ae!==null?(ft=ae,bh(ae)):ft=null}break t}}Nt=0,Sr=null,gl(i,s,_,5);break;case 6:Nt=0,Sr=null,gl(i,s,_,6);break;case 8:Vy(),sn=6;break e;default:throw Error(r(462))}}nH();break}catch(pe){n2(i,pe)}while(!0);return si=Wo=null,$.H=p,$.A=b,Tt=u,ft!==null?0:(Ht=null,pt=0,Ld(),sn)}function nH(){for(;ft!==null&&!St();)o2(ft)}function o2(i){var s=Rj(i.alternate,i,gi);i.memoizedProps=i.pendingProps,s===null?bh(i):ft=s}function s2(i){var s=i,u=s.alternate;switch(s.tag){case 15:case 0:s=Aj(u,s,s.pendingProps,s.type,void 0,pt);break;case 11:s=Aj(u,s,s.pendingProps,s.type.render,s.ref,pt);break;case 5:sy(s);default:Mj(u,s),s=ft=iT(s,gi),s=Rj(u,s,gi)}i.memoizedProps=i.pendingProps,s===null?bh(i):ft=s}function gl(i,s,u,p){si=Wo=null,sy(s),ol=null,Qc=0;var b=s.return;try{if(Fq(i,b,s,u,pt)){sn=1,oh(i,Ir(u,i.current)),ft=null;return}}catch(_){if(b!==null)throw ft=b,_;sn=1,oh(i,Ir(u,i.current)),ft=null;return}s.flags&32768?(gt||p===1?i=!0:hl||(pt&536870912)!==0?i=!1:(Ji=i=!0,(p===2||p===9||p===3||p===6)&&(p=xr.current,p!==null&&p.tag===13&&(p.flags|=16384))),l2(s,i)):bh(s)}function bh(i){var s=i;do{if((s.flags&32768)!==0){l2(s,Ji);return}i=s.return;var u=Wq(s.alternate,s,gi);if(u!==null){ft=u;return}if(s=s.sibling,s!==null){ft=s;return}ft=s=i}while(s!==null);sn===0&&(sn=5)}function l2(i,s){do{var u=Yq(i.alternate,i);if(u!==null){u.flags&=32767,ft=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){ft=i;return}ft=i=u}while(i!==null);sn=6,ft=null}function c2(i,s,u,p,b,_,M,k,W){i.cancelPendingCommit=null;do xh();while(En!==0);if((Tt&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Dg,On(i,u,_,M,k,W),i===Ht&&(ft=Ht=null,pt=0),ml=s,no=i,yi=u,qy=_,Hy=b,Qj=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,oH(je,function(){return p2(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=$.T,$.T=null,b=F.p,F.p=2,M=Tt,Tt|=4;try{Zq(i,s,u)}finally{Tt=M,F.p=b,$.T=p}}En=1,u2(),f2(),d2()}}function u2(){if(En===1){En=0;var i=no,s=ml,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=$.T,$.T=null;var p=F.p;F.p=2;var b=Tt;Tt|=4;try{Fj(s,i);var _=ab,M=KE(i.containerInfo),k=_.focusedElem,W=_.selectionRange;if(M!==k&&k&&k.ownerDocument&&ZE(k.ownerDocument.documentElement,k)){if(W!==null&&Cg(k)){var ae=W.start,pe=W.end;if(pe===void 0&&(pe=ae),"selectionStart"in k)k.selectionStart=ae,k.selectionEnd=Math.min(pe,k.value.length);else{var ye=k.ownerDocument||document,le=ye&&ye.defaultView||window;if(le.getSelection){var de=le.getSelection(),Ie=k.textContent.length,Ge=Math.min(W.start,Ie),Lt=W.end===void 0?Ge:Math.min(W.end,Ie);!de.extend&&Ge>Lt&&(M=Lt,Lt=Ge,Ge=M);var J=YE(k,Ge),K=YE(k,Lt);if(J&&K&&(de.rangeCount!==1||de.anchorNode!==J.node||de.anchorOffset!==J.offset||de.focusNode!==K.node||de.focusOffset!==K.offset)){var re=ye.createRange();re.setStart(J.node,J.offset),de.removeAllRanges(),Ge>Lt?(de.addRange(re),de.extend(K.node,K.offset)):(re.setEnd(K.node,K.offset),de.addRange(re))}}}}for(ye=[],de=k;de=de.parentNode;)de.nodeType===1&&ye.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ye.length;k++){var ge=ye[k];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Mh=!!rb,ab=rb=null}finally{Tt=b,F.p=p,$.T=u}}i.current=s,En=2}}function f2(){if(En===2){En=0;var i=no,s=ml,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=$.T,$.T=null;var p=F.p;F.p=2;var b=Tt;Tt|=4;try{Ij(i,s.alternate,s)}finally{Tt=b,F.p=p,$.T=u}}En=3}}function d2(){if(En===4||En===3){En=0,An();var i=no,s=ml,u=yi,p=Qj;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?En=5:(En=0,ml=no=null,h2(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(to=null),gr(u),s=s.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Et,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=$.T,b=F.p,F.p=2,$.T=null;try{for(var _=i.onRecoverableError,M=0;M<p.length;M++){var k=p[M];_(k.value,{componentStack:k.stack})}}finally{$.T=s,F.p=b}}(yi&3)!==0&&xh(),Pa(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===Fy?mu++:(mu=0,Fy=i):mu=0,vu(0)}}function h2(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,Kc(s)))}function xh(){return u2(),f2(),d2(),p2()}function p2(){if(En!==5)return!1;var i=no,s=qy;qy=0;var u=gr(yi),p=$.T,b=F.p;try{F.p=32>u?32:u,$.T=null,u=Hy,Hy=null;var _=no,M=yi;if(En=0,ml=no=null,yi=0,(Tt&6)!==0)throw Error(r(331));var k=Tt;if(Tt|=4,Zj(_.current),Gj(_,_.current,M,u),Tt=k,vu(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Et,_)}catch{}return!0}finally{F.p=b,$.T=p,h2(i,s)}}function m2(i,s,u){s=Ir(u,s),s=Sy(i.stateNode,s,2),i=Zi(i,s,2),i!==null&&(st(i,2),Pa(i))}function Mt(i,s,u){if(i.tag===3)m2(i,i,u);else for(;s!==null;){if(s.tag===3){m2(s,i,u);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(to===null||!to.has(p))){i=Ir(u,i),u=vj(2),p=Zi(s,u,2),p!==null&&(gj(u,p,s,i),st(p,2),Pa(p));break}}s=s.return}}function Wy(i,s,u){var p=i.pingCache;if(p===null){p=i.pingCache=new Qq;var b=new Set;p.set(s,b)}else b=p.get(s),b===void 0&&(b=new Set,p.set(s,b));b.has(u)||(Iy=!0,b.add(u),i=rH.bind(null,i,s,u),s.then(i,i))}function rH(i,s,u){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Ht===i&&(pt&u)===u&&(sn===4||sn===3&&(pt&62914560)===pt&&300>H()-ph?(Tt&2)===0&&vl(i,0):By|=u,pl===pt&&(pl=0)),Pa(i)}function v2(i,s){s===0&&(s=He()),i=Fo(i,s),i!==null&&(st(i,s),Pa(i))}function aH(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),v2(i,u)}function iH(i,s){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),v2(i,u)}function oH(i,s){return pn(i,s)}var wh=null,yl=null,Yy=!1,Sh=!1,Zy=!1,ao=0;function Pa(i){i!==yl&&i.next===null&&(yl===null?wh=yl=i:yl=yl.next=i),Sh=!0,Yy||(Yy=!0,lH())}function vu(i,s){if(!Zy&&Sh){Zy=!0;do for(var u=!1,p=wh;p!==null;){if(i!==0){var b=p.pendingLanes;if(b===0)var _=0;else{var M=p.suspendedLanes,k=p.pingedLanes;_=(1<<31-Ae(42|i)+1)-1,_&=b&~(M&~k),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(u=!0,x2(p,_))}else _=pt,_=Oe(p,p===Ht?_:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(_&3)===0||Pe(p,_)||(u=!0,x2(p,_));p=p.next}while(u);Zy=!1}}function sH(){g2()}function g2(){Sh=Yy=!1;var i=0;ao!==0&&yH()&&(i=ao);for(var s=H(),u=null,p=wh;p!==null;){var b=p.next,_=y2(p,s);_===0?(p.next=null,u===null?wh=b:u.next=b,b===null&&(yl=u)):(u=p,(i!==0||(_&3)!==0)&&(Sh=!0)),p=b}En!==0&&En!==5||vu(i),ao!==0&&(ao=0)}function y2(i,s){for(var u=i.suspendedLanes,p=i.pingedLanes,b=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var M=31-Ae(_),k=1<<M,W=b[M];W===-1?((k&u)===0||(k&p)!==0)&&(b[M]=De(k,s)):W<=s&&(i.expiredLanes|=k),_&=~k}if(s=Ht,u=pt,u=Oe(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===s&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&an(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Pe(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(p!==null&&an(p),gr(u)){case 2:case 8:u=Ce;break;case 32:u=je;break;case 268435456:u=Me;break;default:u=je}return p=b2.bind(null,i),u=pn(u,p),i.callbackPriority=s,i.callbackNode=u,s}return p!==null&&p!==null&&an(p),i.callbackPriority=2,i.callbackNode=null,2}function b2(i,s){if(En!==0&&En!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(xh()&&i.callbackNode!==u)return null;var p=pt;return p=Oe(i,i===Ht?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(e2(i,p,s),y2(i,H()),i.callbackNode!=null&&i.callbackNode===u?b2.bind(null,i):null)}function x2(i,s){if(xh())return null;e2(i,s,!0)}function lH(){xH(function(){(Tt&6)!==0?pn(te,sH):g2()})}function Ky(){if(ao===0){var i=rl;i===0&&(i=jt,jt<<=1,(jt&261888)===0&&(jt=256)),ao=i}return ao}function w2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Rd(""+i)}function S2(i,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,i.id&&u.setAttribute("form",i.id),s.parentNode.insertBefore(u,s),i=new FormData(i),u.parentNode.removeChild(u),i}function cH(i,s,u,p,b){if(s==="submit"&&u&&u.stateNode===b){var _=w2((b[sr]||null).action),M=p.submitter;M&&(s=(s=M[sr]||null)?w2(s.formAction):M.getAttribute("formAction"),s!==null&&(_=s,M=null));var k=new Dd("action","action",null,p,b);i.push({event:k,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ao!==0){var W=M?S2(b,M):new FormData(b);vy(u,{pending:!0,data:W,method:b.method,action:_},null,W)}}else typeof _=="function"&&(k.preventDefault(),W=M?S2(b,M):new FormData(b),vy(u,{pending:!0,data:W,method:b.method,action:_},_,W))},currentTarget:b}]})}}for(var Xy=0;Xy<Pg.length;Xy++){var Qy=Pg[Xy],uH=Qy.toLowerCase(),fH=Qy[0].toUpperCase()+Qy.slice(1);ca(uH,"on"+fH)}ca(JE,"onAnimationEnd"),ca(eT,"onAnimationIteration"),ca(tT,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(Tq,"onTransitionRun"),ca(jq,"onTransitionStart"),ca(Cq,"onTransitionCancel"),ca(nT,"onTransitionEnd"),Hs("onMouseEnter",["mouseout","mouseover"]),Hs("onMouseLeave",["mouseout","mouseover"]),Hs("onPointerEnter",["pointerout","pointerover"]),Hs("onPointerLeave",["pointerout","pointerover"]),Bo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gu="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(" "),dH=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gu));function _2(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],b=p.event;p=p.listeners;e:{var _=void 0;if(s)for(var M=p.length-1;0<=M;M--){var k=p[M],W=k.instance,ae=k.currentTarget;if(k=k.listener,W!==_&&b.isPropagationStopped())break e;_=k,b.currentTarget=ae;try{_(b)}catch(pe){zd(pe)}b.currentTarget=null,_=W}else for(M=0;M<p.length;M++){if(k=p[M],W=k.instance,ae=k.currentTarget,k=k.listener,W!==_&&b.isPropagationStopped())break e;_=k,b.currentTarget=ae;try{_(b)}catch(pe){zd(pe)}b.currentTarget=null,_=W}}}}function dt(i,s){var u=s[fg];u===void 0&&(u=s[fg]=new Set);var p=i+"__bubble";u.has(p)||(A2(s,i,2,!1),u.add(p))}function Jy(i,s,u){var p=0;s&&(p|=4),A2(u,i,p,s)}var _h="_reactListening"+Math.random().toString(36).slice(2);function eb(i){if(!i[_h]){i[_h]=!0,gE.forEach(function(u){u!=="selectionchange"&&(dH.has(u)||Jy(u,!1,i),Jy(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[_h]||(s[_h]=!0,Jy("selectionchange",!1,s))}}function A2(i,s,u,p){switch(J2(s)){case 2:var b=BH;break;case 8:b=UH;break;default:b=mb}u=b.bind(null,s,u,i),b=void 0,!xg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),p?b!==void 0?i.addEventListener(s,u,{capture:!0,passive:b}):i.addEventListener(s,u,!0):b!==void 0?i.addEventListener(s,u,{passive:b}):i.addEventListener(s,u,!1)}function tb(i,s,u,p,b){var _=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var k=p.stateNode.containerInfo;if(k===b)break;if(M===4)for(M=p.return;M!==null;){var W=M.tag;if((W===3||W===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;k!==null;){if(M=Bs(k),M===null)return;if(W=M.tag,W===5||W===6||W===26||W===27){p=_=M;continue e}k=k.parentNode}}p=p.return}CE(function(){var ae=_,pe=yg(u),ye=[];e:{var le=rT.get(i);if(le!==void 0){var de=Dd,Ie=i;switch(i){case"keypress":if(Md(u)===0)break e;case"keydown":case"keyup":de=iq;break;case"focusin":Ie="focus",de=Ag;break;case"focusout":Ie="blur",de=Ag;break;case"beforeblur":case"afterblur":de=Ag;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=ME;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=WU;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=lq;break;case JE:case eT:case tT:de=KU;break;case nT:de=uq;break;case"scroll":case"scrollend":de=VU;break;case"wheel":de=dq;break;case"copy":case"cut":case"paste":de=QU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=DE;break;case"toggle":case"beforetoggle":de=pq}var Ge=(s&4)!==0,Lt=!Ge&&(i==="scroll"||i==="scrollend"),J=Ge?le!==null?le+"Capture":null:le;Ge=[];for(var K=ae,re;K!==null;){var ge=K;if(re=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||re===null||J===null||(ge=Ic(K,J),ge!=null&&Ge.push(yu(K,ge,re))),Lt)break;K=K.return}0<Ge.length&&(le=new de(le,Ie,null,u,pe),ye.push({event:le,listeners:Ge}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",de=i==="mouseout"||i==="pointerout",le&&u!==gg&&(Ie=u.relatedTarget||u.fromElement)&&(Bs(Ie)||Ie[Is]))break e;if((de||le)&&(le=pe.window===pe?pe:(le=pe.ownerDocument)?le.defaultView||le.parentWindow:window,de?(Ie=u.relatedTarget||u.toElement,de=ae,Ie=Ie?Bs(Ie):null,Ie!==null&&(Lt=o(Ie),Ge=Ie.tag,Ie!==Lt||Ge!==5&&Ge!==27&&Ge!==6)&&(Ie=null)):(de=null,Ie=ae),de!==Ie)){if(Ge=ME,ge="onMouseLeave",J="onMouseEnter",K="mouse",(i==="pointerout"||i==="pointerover")&&(Ge=DE,ge="onPointerLeave",J="onPointerEnter",K="pointer"),Lt=de==null?le:Lc(de),re=Ie==null?le:Lc(Ie),le=new Ge(ge,K+"leave",de,u,pe),le.target=Lt,le.relatedTarget=re,ge=null,Bs(pe)===ae&&(Ge=new Ge(J,K+"enter",Ie,u,pe),Ge.target=re,Ge.relatedTarget=Lt,ge=Ge),Lt=ge,de&&Ie)t:{for(Ge=hH,J=de,K=Ie,re=0,ge=J;ge;ge=Ge(ge))re++;ge=0;for(var qe=K;qe;qe=Ge(qe))ge++;for(;0<re-ge;)J=Ge(J),re--;for(;0<ge-re;)K=Ge(K),ge--;for(;re--;){if(J===K||K!==null&&J===K.alternate){Ge=J;break t}J=Ge(J),K=Ge(K)}Ge=null}else Ge=null;de!==null&&O2(ye,le,de,Ge,!1),Ie!==null&&Lt!==null&&O2(ye,Lt,Ie,Ge,!0)}}e:{if(le=ae?Lc(ae):window,de=le.nodeName&&le.nodeName.toLowerCase(),de==="select"||de==="input"&&le.type==="file")var _t=qE;else if(BE(le))if(HE)_t=Aq;else{_t=Sq;var Be=wq}else de=le.nodeName,!de||de.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ae&&vg(ae.elementType)&&(_t=qE):_t=_q;if(_t&&(_t=_t(i,ae))){UE(ye,_t,u,pe);break e}Be&&Be(i,le,ae),i==="focusout"&&ae&&le.type==="number"&&ae.memoizedProps.value!=null&&mg(le,"number",le.value)}switch(Be=ae?Lc(ae):window,i){case"focusin":(BE(Be)||Be.contentEditable==="true")&&(Zs=Be,Rg=ae,Wc=null);break;case"focusout":Wc=Rg=Zs=null;break;case"mousedown":Ng=!0;break;case"contextmenu":case"mouseup":case"dragend":Ng=!1,XE(ye,u,pe);break;case"selectionchange":if(Eq)break;case"keydown":case"keyup":XE(ye,u,pe)}var at;if(Eg)e:{switch(i){case"compositionstart":var mt="onCompositionStart";break e;case"compositionend":mt="onCompositionEnd";break e;case"compositionupdate":mt="onCompositionUpdate";break e}mt=void 0}else Ys?LE(i,u)&&(mt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(mt="onCompositionStart");mt&&(kE&&u.locale!=="ko"&&(Ys||mt!=="onCompositionStart"?mt==="onCompositionEnd"&&Ys&&(at=RE()):(qi=pe,wg="value"in qi?qi.value:qi.textContent,Ys=!0)),Be=Ah(ae,mt),0<Be.length&&(mt=new PE(mt,i,null,u,pe),ye.push({event:mt,listeners:Be}),at?mt.data=at:(at=IE(u),at!==null&&(mt.data=at)))),(at=vq?gq(i,u):yq(i,u))&&(mt=Ah(ae,"onBeforeInput"),0<mt.length&&(Be=new PE("onBeforeInput","beforeinput",null,u,pe),ye.push({event:Be,listeners:mt}),Be.data=at)),cH(ye,i,ae,u,pe)}_2(ye,s)})}function yu(i,s,u){return{instance:i,listener:s,currentTarget:u}}function Ah(i,s){for(var u=s+"Capture",p=[];i!==null;){var b=i,_=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||_===null||(b=Ic(i,u),b!=null&&p.unshift(yu(i,b,_)),b=Ic(i,s),b!=null&&p.push(yu(i,b,_))),i.tag===3)return p;i=i.return}return[]}function hH(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function O2(i,s,u,p,b){for(var _=s._reactName,M=[];u!==null&&u!==p;){var k=u,W=k.alternate,ae=k.stateNode;if(k=k.tag,W!==null&&W===p)break;k!==5&&k!==26&&k!==27||ae===null||(W=ae,b?(ae=Ic(u,_),ae!=null&&M.unshift(yu(u,ae,W))):b||(ae=Ic(u,_),ae!=null&&M.push(yu(u,ae,W)))),u=u.return}M.length!==0&&i.push({event:s,listeners:M})}var pH=/\r\n?/g,mH=/\u0000|\uFFFD/g;function E2(i){return(typeof i=="string"?i:""+i).replace(pH,`
49
- `).replace(mH,"")}function T2(i,s){return s=E2(s),E2(i)===s}function zt(i,s,u,p,b,_){switch(u){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Vs(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Vs(i,""+p);break;case"className":jd(i,"class",p);break;case"tabIndex":jd(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":jd(i,u,p);break;case"style":TE(i,p,_);break;case"data":if(s!=="object"){jd(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Rd(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"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 _=="function"&&(u==="formAction"?(s!=="input"&&zt(i,s,"name",b.name,b,null),zt(i,s,"formEncType",b.formEncType,b,null),zt(i,s,"formMethod",b.formMethod,b,null),zt(i,s,"formTarget",b.formTarget,b,null)):(zt(i,s,"encType",b.encType,b,null),zt(i,s,"method",b.method,b,null),zt(i,s,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Rd(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=ri);break;case"onScroll":p!=null&&dt("scroll",i);break;case"onScrollEnd":p!=null&&dt("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=Rd(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):i.removeAttribute(u);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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":dt("beforetoggle",i),dt("toggle",i),Td(i,"popover",p);break;case"xlinkActuate":ni(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":ni(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":ni(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":ni(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":ni(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":ni(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":ni(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":ni(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":ni(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Td(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=HU.get(u)||u,Td(i,u,p))}}function nb(i,s,u,p,b,_){switch(u){case"style":TE(i,p,_);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?Vs(i,p):(typeof p=="number"||typeof p=="bigint")&&Vs(i,""+p);break;case"onScroll":p!=null&&dt("scroll",i);break;case"onScrollEnd":p!=null&&dt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=ri);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),s=u.slice(2,b?u.length-7:void 0),_=i[sr]||null,_=_!=null?_[u]:null,typeof _=="function"&&i.removeEventListener(s,_,b),typeof p=="function")){typeof _!="function"&&_!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,p,b);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):Td(i,u,p)}}}function In(i,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dt("error",i),dt("load",i);var p=!1,b=!1,_;for(_ in u)if(u.hasOwnProperty(_)){var M=u[_];if(M!=null)switch(_){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:zt(i,s,_,M,u,null)}}b&&zt(i,s,"srcSet",u.srcSet,u,null),p&&zt(i,s,"src",u.src,u,null);return;case"input":dt("invalid",i);var k=_=M=b=null,W=null,ae=null;for(p in u)if(u.hasOwnProperty(p)){var pe=u[p];if(pe!=null)switch(p){case"name":b=pe;break;case"type":M=pe;break;case"checked":W=pe;break;case"defaultChecked":ae=pe;break;case"value":_=pe;break;case"defaultValue":k=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,s));break;default:zt(i,s,p,pe,u,null)}}_E(i,_,k,W,ae,M,b,!1);return;case"select":dt("invalid",i),p=M=_=null;for(b in u)if(u.hasOwnProperty(b)&&(k=u[b],k!=null))switch(b){case"value":_=k;break;case"defaultValue":M=k;break;case"multiple":p=k;default:zt(i,s,b,k,u,null)}s=_,u=M,i.multiple=!!p,s!=null?Fs(i,!!p,s,!1):u!=null&&Fs(i,!!p,u,!0);return;case"textarea":dt("invalid",i),_=b=p=null;for(M in u)if(u.hasOwnProperty(M)&&(k=u[M],k!=null))switch(M){case"value":p=k;break;case"defaultValue":b=k;break;case"children":_=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:zt(i,s,M,k,u,null)}OE(i,p,b,_);return;case"option":for(W in u)if(u.hasOwnProperty(W)&&(p=u[W],p!=null))switch(W){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:zt(i,s,W,p,u,null)}return;case"dialog":dt("beforetoggle",i),dt("toggle",i),dt("cancel",i),dt("close",i);break;case"iframe":case"object":dt("load",i);break;case"video":case"audio":for(p=0;p<gu.length;p++)dt(gu[p],i);break;case"image":dt("error",i),dt("load",i);break;case"details":dt("toggle",i);break;case"embed":case"source":case"link":dt("error",i),dt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in u)if(u.hasOwnProperty(ae)&&(p=u[ae],p!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:zt(i,s,ae,p,u,null)}return;default:if(vg(s)){for(pe in u)u.hasOwnProperty(pe)&&(p=u[pe],p!==void 0&&nb(i,s,pe,p,u,void 0));return}}for(k in u)u.hasOwnProperty(k)&&(p=u[k],p!=null&&zt(i,s,k,p,u,null))}function vH(i,s,u,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,_=null,M=null,k=null,W=null,ae=null,pe=null;for(de in u){var ye=u[de];if(u.hasOwnProperty(de)&&ye!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":W=ye;default:p.hasOwnProperty(de)||zt(i,s,de,null,p,ye)}}for(var le in p){var de=p[le];if(ye=u[le],p.hasOwnProperty(le)&&(de!=null||ye!=null))switch(le){case"type":_=de;break;case"name":b=de;break;case"checked":ae=de;break;case"defaultChecked":pe=de;break;case"value":M=de;break;case"defaultValue":k=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,s));break;default:de!==ye&&zt(i,s,le,de,p,ye)}}pg(i,M,k,W,ae,pe,_,b);return;case"select":de=M=k=le=null;for(_ in u)if(W=u[_],u.hasOwnProperty(_)&&W!=null)switch(_){case"value":break;case"multiple":de=W;default:p.hasOwnProperty(_)||zt(i,s,_,null,p,W)}for(b in p)if(_=p[b],W=u[b],p.hasOwnProperty(b)&&(_!=null||W!=null))switch(b){case"value":le=_;break;case"defaultValue":k=_;break;case"multiple":M=_;default:_!==W&&zt(i,s,b,_,p,W)}s=k,u=M,p=de,le!=null?Fs(i,!!u,le,!1):!!p!=!!u&&(s!=null?Fs(i,!!u,s,!0):Fs(i,!!u,u?[]:"",!1));return;case"textarea":de=le=null;for(k in u)if(b=u[k],u.hasOwnProperty(k)&&b!=null&&!p.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:zt(i,s,k,null,p,b)}for(M in p)if(b=p[M],_=u[M],p.hasOwnProperty(M)&&(b!=null||_!=null))switch(M){case"value":le=b;break;case"defaultValue":de=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==_&&zt(i,s,M,b,p,_)}AE(i,le,de);return;case"option":for(var Ie in u)if(le=u[Ie],u.hasOwnProperty(Ie)&&le!=null&&!p.hasOwnProperty(Ie))switch(Ie){case"selected":i.selected=!1;break;default:zt(i,s,Ie,null,p,le)}for(W in p)if(le=p[W],de=u[W],p.hasOwnProperty(W)&&le!==de&&(le!=null||de!=null))switch(W){case"selected":i.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:zt(i,s,W,le,p,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 Ge in u)le=u[Ge],u.hasOwnProperty(Ge)&&le!=null&&!p.hasOwnProperty(Ge)&&zt(i,s,Ge,null,p,le);for(ae in p)if(le=p[ae],de=u[ae],p.hasOwnProperty(ae)&&le!==de&&(le!=null||de!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,s));break;default:zt(i,s,ae,le,p,de)}return;default:if(vg(s)){for(var Lt in u)le=u[Lt],u.hasOwnProperty(Lt)&&le!==void 0&&!p.hasOwnProperty(Lt)&&nb(i,s,Lt,void 0,p,le);for(pe in p)le=p[pe],de=u[pe],!p.hasOwnProperty(pe)||le===de||le===void 0&&de===void 0||nb(i,s,pe,le,p,de);return}}for(var J in u)le=u[J],u.hasOwnProperty(J)&&le!=null&&!p.hasOwnProperty(J)&&zt(i,s,J,null,p,le);for(ye in p)le=p[ye],de=u[ye],!p.hasOwnProperty(ye)||le===de||le==null&&de==null||zt(i,s,ye,le,p,de)}function j2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gH(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var b=u[p],_=b.transferSize,M=b.initiatorType,k=b.duration;if(_&&k&&j2(M)){for(M=0,k=b.responseEnd,p+=1;p<u.length;p++){var W=u[p],ae=W.startTime;if(ae>k)break;var pe=W.transferSize,ye=W.initiatorType;pe&&j2(ye)&&(W=W.responseEnd,M+=pe*(W<k?1:(k-ae)/(W-ae)))}if(--p,s+=8*(_+M)/(b.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var rb=null,ab=null;function Oh(i){return i.nodeType===9?i:i.ownerDocument}function C2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R2(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function ib(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ob=null;function yH(){var i=window.event;return i&&i.type==="popstate"?i===ob?!1:(ob=i,!0):(ob=null,!1)}var N2=typeof setTimeout=="function"?setTimeout:void 0,bH=typeof clearTimeout=="function"?clearTimeout:void 0,M2=typeof Promise=="function"?Promise:void 0,xH=typeof queueMicrotask=="function"?queueMicrotask:typeof M2<"u"?function(i){return M2.resolve(null).then(i).catch(wH)}:N2;function wH(i){setTimeout(function(){throw i})}function io(i){return i==="head"}function P2(i,s){var u=s,p=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(b),Sl(s);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")bu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,bu(u);for(var _=u.firstChild;_;){var M=_.nextSibling,k=_.nodeName;_[zc]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&_.rel.toLowerCase()==="stylesheet"||u.removeChild(_),_=M}}else u==="body"&&bu(i.ownerDocument.body);u=b}while(u);Sl(s)}function D2(i,s){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function sb(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":sb(u),dg(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function SH(i,s,u,p){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[zc])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(_=i.getAttribute("rel"),_==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(_!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(_=i.getAttribute("src"),(_!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&_&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var _=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===_)return i}else return i;if(i=Fr(i.nextSibling),i===null)break}return null}function _H(i,s,u){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Fr(i.nextSibling),i===null))return null;return i}function k2(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Fr(i.nextSibling),i===null))return null;return i}function lb(i){return i.data==="$?"||i.data==="$~"}function cb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function AH(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var p=function(){s(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Fr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var ub=null;function $2(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(s===0)return Fr(i.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}i=i.nextSibling}return null}function z2(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return i;s--}else u!=="/$"&&u!=="/&"||s++}i=i.previousSibling}return null}function L2(i,s,u){switch(s=Oh(u),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function bu(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);dg(i)}var Vr=new Map,I2=new Set;function Eh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var bi=F.d;F.d={f:OH,r:EH,D:TH,C:jH,L:CH,m:RH,X:MH,S:NH,M:PH};function OH(){var i=bi.f(),s=gh();return i||s}function EH(i){var s=Us(i);s!==null&&s.tag===5&&s.type==="form"?nj(s):bi.r(i)}var bl=typeof document>"u"?null:document;function B2(i,s,u){var p=bl;if(p&&typeof s=="string"&&s){var b=zr(s);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),I2.has(b)||(I2.add(b),i={rel:i,crossOrigin:u,href:s},p.querySelector(b)===null&&(s=p.createElement("link"),In(s,"link",i),Nn(s),p.head.appendChild(s)))}}function TH(i){bi.D(i),B2("dns-prefetch",i,null)}function jH(i,s){bi.C(i,s),B2("preconnect",i,s)}function CH(i,s,u){bi.L(i,s,u);var p=bl;if(p&&i&&s){var b='link[rel="preload"][as="'+zr(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+zr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+zr(u.imageSizes)+'"]')):b+='[href="'+zr(i)+'"]';var _=b;switch(s){case"style":_=xl(i);break;case"script":_=wl(i)}Vr.has(_)||(i=h({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),Vr.set(_,i),p.querySelector(b)!==null||s==="style"&&p.querySelector(xu(_))||s==="script"&&p.querySelector(wu(_))||(s=p.createElement("link"),In(s,"link",i),Nn(s),p.head.appendChild(s)))}}function RH(i,s){bi.m(i,s);var u=bl;if(u&&i){var p=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+zr(p)+'"][href="'+zr(i)+'"]',_=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=wl(i)}if(!Vr.has(_)&&(i=h({rel:"modulepreload",href:i},s),Vr.set(_,i),u.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(wu(_)))return}p=u.createElement("link"),In(p,"link",i),Nn(p),u.head.appendChild(p)}}}function NH(i,s,u){bi.S(i,s,u);var p=bl;if(p&&i){var b=qs(p).hoistableStyles,_=xl(i);s=s||"default";var M=b.get(_);if(!M){var k={loading:0,preload:null};if(M=p.querySelector(xu(_)))k.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":s},u),(u=Vr.get(_))&&fb(i,u);var W=M=p.createElement("link");Nn(W),In(W,"link",i),W._p=new Promise(function(ae,pe){W.onload=ae,W.onerror=pe}),W.addEventListener("load",function(){k.loading|=1}),W.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Th(M,s,p)}M={type:"stylesheet",instance:M,count:1,state:k},b.set(_,M)}}}function MH(i,s){bi.X(i,s);var u=bl;if(u&&i){var p=qs(u).hoistableScripts,b=wl(i),_=p.get(b);_||(_=u.querySelector(wu(b)),_||(i=h({src:i,async:!0},s),(s=Vr.get(b))&&db(i,s),_=u.createElement("script"),Nn(_),In(_,"link",i),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},p.set(b,_))}}function PH(i,s){bi.M(i,s);var u=bl;if(u&&i){var p=qs(u).hoistableScripts,b=wl(i),_=p.get(b);_||(_=u.querySelector(wu(b)),_||(i=h({src:i,async:!0,type:"module"},s),(s=Vr.get(b))&&db(i,s),_=u.createElement("script"),Nn(_),In(_,"link",i),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},p.set(b,_))}}function U2(i,s,u,p){var b=(b=fe.current)?Eh(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=xl(u.href),u=qs(b).hoistableStyles,p=u.get(s),p||(p={type:"style",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=xl(u.href);var _=qs(b).hoistableStyles,M=_.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(i,M),(_=b.querySelector(xu(i)))&&!_._p&&(M.instance=_,M.state.loading=5),Vr.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Vr.set(i,u),_||DH(b,i,u,M.state))),s&&p===null)throw Error(r(528,""));return M}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=wl(u),u=qs(b).hoistableScripts,p=u.get(s),p||(p={type:"script",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function xl(i){return'href="'+zr(i)+'"'}function xu(i){return'link[rel="stylesheet"]['+i+"]"}function q2(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function DH(i,s,u,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),In(s,"link",u),Nn(s),i.head.appendChild(s))}function wl(i){return'[src="'+zr(i)+'"]'}function wu(i){return"script[async]"+i}function H2(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+zr(u.href)+'"]');if(p)return s.instance=p,Nn(p),p;var b=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),Nn(p),In(p,"style",b),Th(p,u.precedence,i),s.instance=p;case"stylesheet":b=xl(u.href);var _=i.querySelector(xu(b));if(_)return s.state.loading|=4,s.instance=_,Nn(_),_;p=q2(u),(b=Vr.get(b))&&fb(p,b),_=(i.ownerDocument||i).createElement("link"),Nn(_);var M=_;return M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),In(_,"link",p),s.state.loading|=4,Th(_,u.precedence,i),s.instance=_;case"script":return _=wl(u.src),(b=i.querySelector(wu(_)))?(s.instance=b,Nn(b),b):(p=u,(b=Vr.get(_))&&(p=h({},u),db(p,b)),i=i.ownerDocument||i,b=i.createElement("script"),Nn(b),In(b,"link",p),i.head.appendChild(b),s.instance=b);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,Th(p,u.precedence,i));return s.instance}function Th(i,s,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,_=b,M=0;M<p.length;M++){var k=p[M];if(k.dataset.precedence===s)_=k;else if(_!==b)break}_?_.parentNode.insertBefore(i,_.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(i,s.firstChild))}function fb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function db(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var jh=null;function F2(i,s,u){if(jh===null){var p=new Map,b=jh=new Map;b.set(u,p)}else b=jh,p=b.get(u),p||(p=new Map,b.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var _=u[b];if(!(_[zc]||_[kn]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(s)||"";M=i+M;var k=p.get(M);k?k.push(_):p.set(M,[_])}}return p}function V2(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function kH(i,s,u){if(u===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function G2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function $H(i,s,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=xl(p.href),_=s.querySelector(xu(b));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Ch.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=_,Nn(_);return}_=s.ownerDocument||s,p=q2(p),(b=Vr.get(b))&&fb(p,b),_=_.createElement("link"),Nn(_);var M=_;M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),In(_,"link",p),u.instance=_}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Ch.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var hb=0;function zH(i,s){return i.stylesheets&&i.count===0&&Nh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&Nh(i,i.stylesheets),i.unsuspend){var _=i.unsuspend;i.unsuspend=null,_()}},6e4+s);0<i.imgBytes&&hb===0&&(hb=62500*gH());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Nh(i,i.stylesheets),i.unsuspend)){var _=i.unsuspend;i.unsuspend=null,_()}},(i.imgBytes>hb?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(b)}}:null}function Ch(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Rh=null;function Nh(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Rh=new Map,s.forEach(LH,i),Rh=null,Ch.call(i))}function LH(i,s){if(!(s.state.loading&4)){var u=Rh.get(i);if(u)var p=u.get(null);else{u=new Map,Rh.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<b.length;_++){var M=b[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),p=M)}p&&u.set(null,p)}b=s.instance,M=b.getAttribute("data-precedence"),_=u.get(M)||p,_===p&&u.set(null,b),u.set(M,b),this.count++,p=Ch.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),_?_.parentNode.insertBefore(b,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var Su={$$typeof:T,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function IH(i,s,u,p,b,_,M,k,W){this.tag=1,this.containerInfo=i,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=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function W2(i,s,u,p,b,_,M,k,W,ae,pe,ye){return i=new IH(i,s,u,M,W,ae,pe,ye,k),s=1,_===!0&&(s|=24),_=br(3,null,null,s),i.current=_,_.stateNode=i,s=Gg(),s.refCount++,i.pooledCache=s,s.refCount++,_.memoizedState={element:p,isDehydrated:u,cache:s},Kg(_),i}function Y2(i){return i?(i=Qs,i):Qs}function Z2(i,s,u,p,b,_){b=Y2(b),p.context===null?p.context=b:p.pendingContext=b,p=Yi(s),p.payload={element:u},_=_===void 0?null:_,_!==null&&(p.callback=_),u=Zi(i,p,s),u!==null&&(hr(u,i,s),eu(u,i,s))}function K2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function pb(i,s){K2(i,s),(i=i.alternate)&&K2(i,s)}function X2(i){if(i.tag===13||i.tag===31){var s=Fo(i,67108864);s!==null&&hr(s,i,67108864),pb(i,67108864)}}function Q2(i){if(i.tag===13||i.tag===31){var s=Ar();s=ti(s);var u=Fo(i,s);u!==null&&hr(u,i,s),pb(i,s)}}var Mh=!0;function BH(i,s,u,p){var b=$.T;$.T=null;var _=F.p;try{F.p=2,mb(i,s,u,p)}finally{F.p=_,$.T=b}}function UH(i,s,u,p){var b=$.T;$.T=null;var _=F.p;try{F.p=8,mb(i,s,u,p)}finally{F.p=_,$.T=b}}function mb(i,s,u,p){if(Mh){var b=vb(p);if(b===null)tb(i,s,p,Ph,u),eC(i,p);else if(HH(b,i,s,u,p))p.stopPropagation();else if(eC(i,p),s&4&&-1<qH.indexOf(i)){for(;b!==null;){var _=Us(b);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=he(_.pendingLanes);if(M!==0){var k=_;for(k.pendingLanes|=2,k.entangledLanes|=2;M;){var W=1<<31-Ae(M);k.entanglements[1]|=W,M&=~W}Pa(_),(Tt&6)===0&&(mh=H()+500,vu(0))}}break;case 31:case 13:k=Fo(_,2),k!==null&&hr(k,_,2),gh(),pb(_,2)}if(_=vb(p),_===null&&tb(i,s,p,Ph,u),_===b)break;b=_}b!==null&&p.stopPropagation()}else tb(i,s,p,null,u)}}function vb(i){return i=yg(i),gb(i)}var Ph=null;function gb(i){if(Ph=null,i=Bs(i),i!==null){var s=o(i);if(s===null)i=null;else{var u=s.tag;if(u===13){if(i=l(s),i!==null)return i;i=null}else if(u===31){if(i=c(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Ph=i,null}function J2(i){switch(i){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(ee()){case te:return 2;case Ce:return 8;case je:case Te:return 32;case Me:return 268435456;default:return 32}default:return 32}}var yb=!1,oo=null,so=null,lo=null,_u=new Map,Au=new Map,co=[],qH="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 eC(i,s){switch(i){case"focusin":case"focusout":oo=null;break;case"dragenter":case"dragleave":so=null;break;case"mouseover":case"mouseout":lo=null;break;case"pointerover":case"pointerout":_u.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Au.delete(s.pointerId)}}function Ou(i,s,u,p,b,_){return i===null||i.nativeEvent!==_?(i={blockedOn:s,domEventName:u,eventSystemFlags:p,nativeEvent:_,targetContainers:[b]},s!==null&&(s=Us(s),s!==null&&X2(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function HH(i,s,u,p,b){switch(s){case"focusin":return oo=Ou(oo,i,s,u,p,b),!0;case"dragenter":return so=Ou(so,i,s,u,p,b),!0;case"mouseover":return lo=Ou(lo,i,s,u,p,b),!0;case"pointerover":var _=b.pointerId;return _u.set(_,Ou(_u.get(_)||null,i,s,u,p,b)),!0;case"gotpointercapture":return _=b.pointerId,Au.set(_,Ou(Au.get(_)||null,i,s,u,p,b)),!0}return!1}function tC(i){var s=Bs(i.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){i.blockedOn=s,mE(i.priority,function(){Q2(u)});return}}else if(s===31){if(s=c(u),s!==null){i.blockedOn=s,mE(i.priority,function(){Q2(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Dh(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=vb(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);gg=p,u.target.dispatchEvent(p),gg=null}else return s=Us(u),s!==null&&X2(s),i.blockedOn=u,!1;s.shift()}return!0}function nC(i,s,u){Dh(i)&&u.delete(s)}function FH(){yb=!1,oo!==null&&Dh(oo)&&(oo=null),so!==null&&Dh(so)&&(so=null),lo!==null&&Dh(lo)&&(lo=null),_u.forEach(nC),Au.forEach(nC)}function kh(i,s){i.blockedOn===s&&(i.blockedOn=null,yb||(yb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,FH)))}var $h=null;function rC(i){$h!==i&&($h=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$h===i&&($h=null);for(var s=0;s<i.length;s+=3){var u=i[s],p=i[s+1],b=i[s+2];if(typeof p!="function"){if(gb(p||u)===null)continue;break}var _=Us(u);_!==null&&(i.splice(s,3),s-=3,vy(_,{pending:!0,data:b,method:u.method,action:p},p,b))}}))}function Sl(i){function s(W){return kh(W,i)}oo!==null&&kh(oo,i),so!==null&&kh(so,i),lo!==null&&kh(lo,i),_u.forEach(s),Au.forEach(s);for(var u=0;u<co.length;u++){var p=co[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<co.length&&(u=co[0],u.blockedOn===null);)tC(u),u.blockedOn===null&&co.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var b=u[p],_=u[p+1],M=b[sr]||null;if(typeof _=="function")M||rC(u);else if(M){var k=null;if(_&&_.hasAttribute("formAction")){if(b=_,M=_[sr]||null)k=M.formAction;else if(gb(b)!==null)continue}else k=M.action;typeof k=="function"?u[p+1]=k:(u.splice(p,3),p-=3),rC(u)}}}function aC(){function i(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return b=M})},focusReset:"manual",scroll:"manual"})}function s(){b!==null&&(b(),b=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function bb(i){this._internalRoot=i}zh.prototype.render=bb.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,p=Ar();Z2(u,p,i,s,null,null)},zh.prototype.unmount=bb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Z2(i.current,2,null,i,null,null),gh(),s[Is]=null}};function zh(i){this._internalRoot=i}zh.prototype.unstable_scheduleHydration=function(i){if(i){var s=ug();i={blockedOn:null,target:i,priority:s};for(var u=0;u<co.length&&s!==0&&s<co[u].priority;u++);co.splice(u,0,i),u===0&&tC(i)}};var iC=t.version;if(iC!=="19.2.6")throw Error(r(527,iC,"19.2.6"));F.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(s),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var VH={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lh.isDisabled&&Lh.supportsFiber)try{Et=Lh.inject(VH),bt=Lh}catch{}}return Tu.createRoot=function(i,s){if(!a(i))throw Error(r(299));var u=!1,p="",b=dj,_=hj,M=pj;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=W2(i,1,!1,null,null,u,p,null,b,_,M,aC),i[Is]=s.current,eb(i),new bb(s)},Tu.hydrateRoot=function(i,s,u){if(!a(i))throw Error(r(299));var p=!1,b="",_=dj,M=hj,k=pj,W=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(_=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(k=u.onRecoverableError),u.formState!==void 0&&(W=u.formState)),s=W2(i,1,!0,s,u??null,p,b,W,_,M,k,aC),s.context=Y2(null),u=s.current,p=Ar(),p=ti(p),b=Yi(p),b.callback=null,Zi(u,b,p),u=p,s.current.lanes=u,st(s,u),Pa(s),i[Is]=s.current,eb(i),new zh(s)},Tu.version="19.2.6",Tu}var mC;function t9(){if(mC)return Sb.exports;mC=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(),Sb.exports=e9(),Sb.exports}var n9=t9(),r9=(e,t,n,r,a,o,l,c)=>{let f=document.documentElement,d=["light","dark"];function m(x){(Array.isArray(e)?e:[e]).forEach(A=>{let S=A==="class",w=S&&o?a.map(O=>o[O]||O):a;S?(f.classList.remove(...w),f.classList.add(o&&o[x]?o[x]:x)):f.setAttribute(A,x)}),h(x)}function h(x){c&&d.includes(x)&&(f.style.colorScheme=x)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let x=localStorage.getItem(t)||n,A=l&&x==="system"?g():x;m(A)}catch{}},vC=["light","dark"],Rz="(prefers-color-scheme: dark)",a9=typeof window>"u",F_=y.createContext(void 0),i9={setTheme:e=>{},themes:[]},Gf=()=>{var e;return(e=y.useContext(F_))!=null?e:i9},o9=e=>y.useContext(F_)?y.createElement(y.Fragment,null,e.children):y.createElement(l9,{...e}),s9=["light","dark"],l9=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:o=s9,defaultTheme:l=n?"system":"light",attribute:c="data-theme",value:f,children:d,nonce:m,scriptProps:h})=>{let[g,x]=y.useState(()=>u9(a,l)),[A,S]=y.useState(()=>g==="system"?Eb():g),w=f?Object.values(f):o,O=y.useCallback(j=>{let R=j;if(!R)return;j==="system"&&n&&(R=Eb());let N=f?f[R]:R,D=t?f9(m):null,z=document.documentElement,V=U=>{U==="class"?(z.classList.remove(...w),N&&z.classList.add(N)):U.startsWith("data-")&&(N?z.setAttribute(U,N):z.removeAttribute(U))};if(Array.isArray(c)?c.forEach(V):V(c),r){let U=vC.includes(l)?l:null,P=vC.includes(R)?R:U;z.style.colorScheme=P}D==null||D()},[m]),E=y.useCallback(j=>{let R=typeof j=="function"?j(g):j;x(R);try{localStorage.setItem(a,R)}catch{}},[g]),T=y.useCallback(j=>{let R=Eb(j);S(R),g==="system"&&n&&!e&&O("system")},[g,e]);y.useEffect(()=>{let j=window.matchMedia(Rz);return j.addListener(T),T(j),()=>j.removeListener(T)},[T]),y.useEffect(()=>{let j=R=>{R.key===a&&(R.newValue?x(R.newValue):E(l))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[E]),y.useEffect(()=>{O(e??g)},[e,g]);let C=y.useMemo(()=>({theme:g,setTheme:E,forcedTheme:e,resolvedTheme:g==="system"?A:g,themes:n?[...o,"system"]:o,systemTheme:n?A:void 0}),[g,E,e,A,n,o]);return y.createElement(F_.Provider,{value:C},y.createElement(c9,{forcedTheme:e,storageKey:a,attribute:c,enableSystem:n,enableColorScheme:r,defaultTheme:l,value:f,themes:o,nonce:m,scriptProps:h}),d)},c9=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:l,themes:c,nonce:f,scriptProps:d})=>{let m=JSON.stringify([n,t,o,e,c,l,r,a]).slice(1,-1);return y.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${r9.toString()})(${m})`}})}),u9=(e,t)=>{if(a9)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},f9=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)}},Eb=e=>(e||(e=window.matchMedia(Rz)),e.matches?"dark":"light");/**
50
- * react-router v7.15.1
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var gC="popstate";function yC(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function d9(e={}){function t(r,a){var d;let o=(d=a.state)==null?void 0:d.masked,{pathname:l,search:c,hash:f}=o||r.location;return V1("",{pathname:l,search:c,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:nf(a)}return p9(t,n,null,e)}function en(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ra(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function h9(){return Math.random().toString(36).substring(2,10)}function bC(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function V1(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?yc(t):t,state:n,key:t&&t.key||r||h9(),mask:a}}function nf({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 yc(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 p9(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,c="POP",f=null,d=m();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function m(){return(l.state||{idx:null}).idx}function h(){c="POP";let w=m(),O=w==null?null:w-d;d=w,f&&f({action:c,location:S.location,delta:O})}function g(w,O){c="PUSH";let E=yC(w)?w:V1(S.location,w,O);d=m()+1;let T=bC(E,d),C=S.createHref(E.mask||E);try{l.pushState(T,"",C)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;a.location.assign(C)}o&&f&&f({action:c,location:S.location,delta:1})}function x(w,O){c="REPLACE";let E=yC(w)?w:V1(S.location,w,O);d=m();let T=bC(E,d),C=S.createHref(E.mask||E);l.replaceState(T,"",C),o&&f&&f({action:c,location:S.location,delta:0})}function A(w){return m9(w)}let S={get action(){return c},get location(){return e(a,l)},listen(w){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(gC,h),f=w,()=>{a.removeEventListener(gC,h),f=null}},createHref(w){return t(a,w)},createURL:A,encodeLocation(w){let O=A(w);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:g,replace:x,go(w){return l.go(w)}};return S}function m9(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),en(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:nf(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Nz(e,t,n="/"){return v9(e,t,n,!1)}function v9(e,t,n,r,a){let o=typeof t=="string"?yc(t):t,l=ji(o.pathname||"/",n);if(l==null)return null;let c=g9(e),f=null,d=C9(l);for(let m=0;f==null&&m<c.length;++m)f=T9(c[m],d,r);return f}function g9(e){let t=Mz(e);return y9(t),t}function Mz(e,t=[],n=[],r="",a=!1){let o=(l,c,f=a,d)=>{let m={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;en(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=xa([r,m.relativePath]),g=n.concat(m);l.children&&l.children.length>0&&(en(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Mz(l.children,t,g,h,f)),!(l.path==null&&!l.index)&&t.push({path:h,score:O9(h,l.index),routesMeta:g})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,c);else for(let d of Pz(l.path))o(l,c,!0,d)}),t}function Pz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=Pz(r.join("/")),c=[];return c.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function y9(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E9(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var b9=/^:[\w-]+$/,x9=3,w9=2,S9=1,_9=10,A9=-2,xC=e=>e==="*";function O9(e,t){let n=e.split("/"),r=n.length;return n.some(xC)&&(r+=A9),t&&(r+=w9),n.filter(a=>!xC(a)).reduce((a,o)=>a+(b9.test(o)?x9:o===""?S9:_9),r)}function E9(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 T9(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let c=0;c<r.length;++c){let f=r[c],d=c===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",h=Ap({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},m),g=f.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=Ap({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:xa([o,h.pathname]),pathnameBase:P9(xa([o,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(o=xa([o,h.pathnameBase]))}return l}function Ap(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=j9(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:r.reduce((d,{paramName:m,isOptional:h},g)=>{if(m==="*"){let A=c[g]||"";l=o.slice(0,o.length-A.length).replace(/(.)\/+$/,"$1")}const x=c[g];return h&&!x?d[m]=void 0:d[m]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function j9(e,t=!1,n=!0){ra(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,(l,c,f,d,m)=>{if(r.push({paramName:c,isOptional:f!=null}),f){let h=m.charAt(d+l.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 C9(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ra(!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 ji(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 R9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function N9(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?yc(e):e,o;return n?(n=Dz(n),n.startsWith("/")?o=wC(n.substring(1),"/"):o=wC(n,t)):o=t,{pathname:o,search:D9(r),hash:k9(a)}}function wC(e,t){let n=Op(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Tb(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 M9(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function V_(e){let t=M9(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Vm(e,t,n,r=!1){let a;typeof e=="string"?a=yc(e):(a={...e},en(!a.pathname||!a.pathname.includes("?"),Tb("?","pathname","search",a)),en(!a.pathname||!a.pathname.includes("#"),Tb("#","pathname","hash",a)),en(!a.search||!a.search.includes("#"),Tb("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,c;if(l==null)c=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),h-=1;a.pathname=g.join("/")}c=h>=0?t[h]:"/"}let f=N9(a,c),d=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||m)&&(f.pathname+="/"),f}var Dz=e=>e.replace(/\/\/+/g,"/"),xa=e=>Dz(e.join("/")),Op=e=>e.replace(/\/+$/,""),P9=e=>Op(e).replace(/^\/*/,"/"),D9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,k9=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,$9=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 z9(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function L9(e){let t=e.map(n=>n.route.path).filter(Boolean);return xa(t)||"/"}var kz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $z(e,t){let n=e;if(typeof n!="string"||!R9.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(kz)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=ji(l.pathname,t);l.origin===o.origin&&c!=null?n=c+l.search+l.hash:a=!0}catch{ra(!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 zz=["POST","PUT","PATCH","DELETE"];new Set(zz);var I9=["GET",...zz];new Set(I9);var bc=y.createContext(null);bc.displayName="DataRouter";var Gm=y.createContext(null);Gm.displayName="DataRouterState";var Lz=y.createContext(!1);function B9(){return y.useContext(Lz)}var Iz=y.createContext({isTransitioning:!1});Iz.displayName="ViewTransition";var U9=y.createContext(new Map);U9.displayName="Fetchers";var q9=y.createContext(null);q9.displayName="Await";var Dr=y.createContext(null);Dr.displayName="Navigation";var Wf=y.createContext(null);Wf.displayName="Location";var Ea=y.createContext({outlet:null,matches:[],isDataRoute:!1});Ea.displayName="Route";var G_=y.createContext(null);G_.displayName="RouteError";var Bz="REACT_ROUTER_ERROR",H9="REDIRECT",F9="ROUTE_ERROR_RESPONSE";function V9(e){if(e.startsWith(`${Bz}:${H9}:{`))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 G9(e){if(e.startsWith(`${Bz}:${F9}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new $9(t.status,t.statusText,t.data)}catch{}}function W9(e,{relative:t}={}){en(xc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Dr),{hash:a,pathname:o,search:l}=Yf(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:xa([n,o])),r.createHref({pathname:c,search:l,hash:a})}function xc(){return y.useContext(Wf)!=null}function kr(){return en(xc(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Wf).location}var Uz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qz(e){y.useContext(Dr).static||y.useLayoutEffect(e)}function Ka(){let{isDataRoute:e}=y.useContext(Ea);return e?l7():Y9()}function Y9(){en(xc(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(bc),{basename:t,navigator:n}=y.useContext(Dr),{matches:r}=y.useContext(Ea),{pathname:a}=kr(),o=JSON.stringify(V_(r)),l=y.useRef(!1);return qz(()=>{l.current=!0}),y.useCallback((f,d={})=>{if(ra(l.current,Uz),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=Vm(f,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:xa([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,o,a,e])}var Z9=y.createContext(null);function K9(e){let t=y.useContext(Ea).outlet;return y.useMemo(()=>t&&y.createElement(Z9.Provider,{value:e},t),[t,e])}function Yf(e,{relative:t}={}){let{matches:n}=y.useContext(Ea),{pathname:r}=kr(),a=JSON.stringify(V_(n));return y.useMemo(()=>Vm(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function X9(e,t){return Hz(e,t)}function Hz(e,t,n){var w;en(xc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Dr),{matches:a}=y.useContext(Ea),o=a[a.length-1],l=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let O=d&&d.path||"";Vz(c,!d||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${O}">) 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.
59
-
60
- Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let m=kr(),h;if(t){let O=typeof t=="string"?yc(t):t;en(f==="/"||((w=O.pathname)==null?void 0:w.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 "${O.pathname}" was given in the \`location\` prop.`),h=O}else h=m;let g=h.pathname||"/",x=g;if(f!=="/"){let O=f.replace(/^\//,"").split("/");x="/"+g.replace(/^\//,"").split("/").slice(O.length).join("/")}let A=n&&n.state.matches.length?n.state.matches.map(O=>Object.assign(O,{route:n.manifest[O.route.id]||O.route})):Nz(e,{pathname:x});ra(d||A!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),ra(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.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 S=n7(A&&A.map(O=>Object.assign({},O,{params:Object.assign({},l,O.params),pathname:xa([f,r.encodeLocation?r.encodeLocation(O.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?f:xa([f,r.encodeLocation?r.encodeLocation(O.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),a,n);return t&&S?y.createElement(Wf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},S):S}function Q9(){let e=s7(),t=z9(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},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:o},"ErrorBoundary")," or"," ",y.createElement("code",{style:o},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:a},n):null,l)}var J9=y.createElement(Q9,null),Fz=class extends y.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=G9(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(Ea.Provider,{value:this.props.routeContext},y.createElement(G_.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(e7,{error:e},t):t}};Fz.contextType=Lz;var jb=new WeakMap;function e7({children:e,error:t}){let{basename:n}=y.useContext(Dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=V9(t.digest);if(r){let a=jb.get(t);if(a)throw a;let o=$z(r.location,n);if(kz&&!jb.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw jb.set(t,l),l}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function t7({routeContext:e,match:t,children:n}){let r=y.useContext(bc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(Ea.Provider,{value:e},n)}function n7(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,o=r==null?void 0:r.errors;if(o!=null){let m=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);en(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let l=!1,c=-1;if(n&&r){l=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:g,errors:x}=r,A=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||A){n.isStatic&&(l=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,d=r&&f?(m,h)=>{var g,x;f(m,{location:r.location,params:((x=(g=r.matches)==null?void 0:g[0])==null?void 0:x.params)??{},pattern:L9(r.matches),errorInfo:h})}:void 0;return a.reduceRight((m,h,g)=>{let x,A=!1,S=null,w=null;r&&(x=o&&h.route.id?o[h.route.id]:void 0,S=h.route.errorElement||J9,l&&(c<0&&g===0?(Vz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,w=null):c===g&&(A=!0,w=h.route.hydrateFallbackElement||null)));let O=t.concat(a.slice(0,g+1)),E=()=>{let T;return x?T=S:A?T=w:h.route.Component?T=y.createElement(h.route.Component,null):h.route.element?T=h.route.element:T=m,y.createElement(t7,{match:h,routeContext:{outlet:m,matches:O,isDataRoute:r!=null},children:T})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?y.createElement(Fz,{location:r.location,revalidation:r.revalidation,component:S,error:x,children:E(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:d}):E()},null)}function W_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function r7(e){let t=y.useContext(bc);return en(t,W_(e)),t}function a7(e){let t=y.useContext(Gm);return en(t,W_(e)),t}function i7(e){let t=y.useContext(Ea);return en(t,W_(e)),t}function Y_(e){let t=i7(e),n=t.matches[t.matches.length-1];return en(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function o7(){return Y_("useRouteId")}function s7(){var r;let e=y.useContext(G_),t=a7("useRouteError"),n=Y_("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function l7(){let{router:e}=r7("useNavigate"),t=Y_("useNavigate"),n=y.useRef(!1);return qz(()=>{n.current=!0}),y.useCallback(async(a,o={})=>{ra(n.current,Uz),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var SC={};function Vz(e,t,n){!t&&!SC[e]&&(SC[e]=!0,ra(!1,n))}y.memo(c7);function c7({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:o}){return Hz(e,void 0,{manifest:t,state:r,isStatic:a,onError:o})}function G1({to:e,replace:t,state:n,relative:r}){en(xc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=y.useContext(Dr);ra(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=y.useContext(Ea),{pathname:l}=kr(),c=Ka(),f=Vm(e,V_(o),l,r==="path"),d=JSON.stringify(f);return y.useEffect(()=>{c(JSON.parse(d),{replace:t,state:n,relative:r})},[c,d,r,t,n]),null}function u7(e){return K9(e.context)}function Or(e){en(!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 f7({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1,useTransitions:l}){en(!xc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=y.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:l,future:{}}),[c,a,o,l]);typeof n=="string"&&(n=yc(n));let{pathname:d="/",search:m="",hash:h="",state:g=null,key:x="default",mask:A}=n,S=y.useMemo(()=>{let w=ji(d,c);return w==null?null:{location:{pathname:w,search:m,hash:h,state:g,key:x,mask:A},navigationType:r}},[c,d,m,h,g,x,r,A]);return ra(S!=null,`<Router basename="${c}"> is not able to match the URL "${d}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Dr.Provider,{value:f},y.createElement(Wf.Provider,{children:t,value:S}))}function d7({children:e,location:t}){return X9(W1(e),t)}function W1(e,t=[]){let n=[];return y.Children.forEach(e,(r,a)=>{if(!y.isValidElement(r))return;let o=[...t,a];if(r.type===y.Fragment){n.push.apply(n,W1(r.props.children,o));return}en(r.type===Or,`[${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>`),en(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.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&&(l.children=W1(r.props.children,o)),n.push(l)}),n}var fp="get",dp="application/x-www-form-urlencoded";function Wm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function h7(e){return Wm(e)&&e.tagName.toLowerCase()==="button"}function p7(e){return Wm(e)&&e.tagName.toLowerCase()==="form"}function m7(e){return Wm(e)&&e.tagName.toLowerCase()==="input"}function v7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function g7(e,t){return e.button===0&&(!t||t==="_self")&&!v7(e)}function Y1(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 y7(e,t){let n=Y1(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(o=>{n.append(a,o)})}),n}var Bh=null;function b7(){if(Bh===null)try{new FormData(document.createElement("form"),0),Bh=!1}catch{Bh=!0}return Bh}var x7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Cb(e){return e!=null&&!x7.has(e)?(ra(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dp}"`),null):e}function w7(e,t){let n,r,a,o,l;if(p7(e)){let c=e.getAttribute("action");r=c?ji(c,t):null,n=e.getAttribute("method")||fp,a=Cb(e.getAttribute("enctype"))||dp,o=new FormData(e)}else if(h7(e)||m7(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?ji(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||fp,a=Cb(e.getAttribute("formenctype"))||Cb(c.getAttribute("enctype"))||dp,o=new FormData(c,e),!b7()){let{name:d,type:m,value:h}=e;if(m==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,h)}}else{if(Wm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=fp,r=null,a=dp,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Z_(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Gz(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&&ji(a.pathname,t)==="/"?a.pathname=`${Op(t)}/_root.${r}`:a.pathname=`${Op(a.pathname)}.${r}`,a}async function S7(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 _7(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 A7(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await S7(o,n);return l.links?l.links():[]}return[]}));return j7(r.flat(1).filter(_7).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function _C(e,t,n,r,a,o){let l=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>{var m;return n[d].pathname!==f.pathname||((m=n[d].route.path)==null?void 0:m.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,d)=>l(f,d)||c(f,d)):o==="data"?t.filter((f,d)=>{var h;let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let g=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 g=="boolean")return g}return!0}):[]}function O7(e,t,{includeHydrateFallback:n}={}){return E7(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function E7(e){return[...new Set(e)]}function T7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function j7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(T7(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function K_(){let e=y.useContext(bc);return Z_(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function C7(){let e=y.useContext(Gm);return Z_(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var X_=y.createContext(void 0);X_.displayName="FrameworkContext";function Q_(){let e=y.useContext(X_);return Z_(e,"You must render this element inside a <HydratedRouter> element"),e}function R7(e,t){let n=y.useContext(X_),[r,a]=y.useState(!1),[o,l]=y.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:m,onTouchStart:h}=t,g=y.useRef(null);y.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=O=>{O.forEach(E=>{l(E.isIntersecting)})},w=new IntersectionObserver(S,{threshold:.5});return g.current&&w.observe(g.current),()=>{w.disconnect()}}},[e]),y.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let x=()=>{a(!0)},A=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:ju(c,x),onBlur:ju(f,A),onMouseEnter:ju(d,x),onMouseLeave:ju(m,A),onTouchStart:ju(h,x)}]:[!1,g,{}]}function ju(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function N7({page:e,...t}){let n=B9(),{router:r}=K_(),a=y.useMemo(()=>Nz(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?y.createElement(P7,{page:e,matches:a,...t}):y.createElement(D7,{page:e,matches:a,...t}):null}function M7(e){let{manifest:t,routeModules:n}=Q_(),[r,a]=y.useState([]);return y.useEffect(()=>{let o=!1;return A7(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function P7({page:e,matches:t,...n}){let r=kr(),{future:a}=Q_(),{basename:o}=K_(),l=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let c=Gz(e,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,d=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:d.push(m.route.id);return f&&d.length>0&&c.searchParams.set("_routes",d.join(",")),[c.pathname+c.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,r,t]);return y.createElement(y.Fragment,null,l.map(c=>y.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...n})))}function D7({page:e,matches:t,...n}){let r=kr(),{future:a,manifest:o,routeModules:l}=Q_(),{basename:c}=K_(),{loaderData:f,matches:d}=C7(),m=y.useMemo(()=>_C(e,t,d,o,r,"data"),[e,t,d,o,r]),h=y.useMemo(()=>_C(e,t,d,o,r,"assets"),[e,t,d,o,r]),g=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,w=!1;if(t.forEach(E=>{var C;let T=o.routes[E.route.id];!T||!T.hasLoader||(!m.some(j=>j.route.id===E.route.id)&&E.route.id in f&&((C=l[E.route.id])!=null&&C.shouldRevalidate)||T.hasClientLoader?w=!0:S.add(E.route.id))}),S.size===0)return[];let O=Gz(e,c,a.unstable_trailingSlashAwareDataRequests,"data");return w&&S.size>0&&O.searchParams.set("_routes",t.filter(E=>S.has(E.route.id)).map(E=>E.route.id).join(",")),[O.pathname+O.search]},[c,a.unstable_trailingSlashAwareDataRequests,f,r,o,m,t,e,l]),x=y.useMemo(()=>O7(h,o),[h,o]),A=M7(h);return y.createElement(y.Fragment,null,g.map(S=>y.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),x.map(S=>y.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),A.map(({key:S,link:w})=>y.createElement("link",{key:S,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function k7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var $7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$7&&(window.__reactRouterVersion="7.15.1")}catch{}function z7({basename:e,children:t,useTransitions:n,window:r}){let a=y.useRef();a.current==null&&(a.current=d9({window:r,v5Compat:!0}));let o=a.current,[l,c]=y.useState({action:o.action,location:o.location}),f=y.useCallback(d=>{n===!1?c(d):y.startTransition(()=>c(d))},[n]);return y.useLayoutEffect(()=>o.listen(f),[o,f]),y.createElement(f7,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var Wz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rl=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,mask:c,state:f,target:d,to:m,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:x,...A},S){let{basename:w,navigator:O,useTransitions:E}=y.useContext(Dr),T=typeof m=="string"&&Wz.test(m),C=$z(m,w);m=C.to;let j=W9(m,{relative:a}),R=kr(),N=null;if(c){let G=Vm(c,[],R.mask?R.mask.pathname:"/",!0);w!=="/"&&(G.pathname=G.pathname==="/"?w:xa([w,G.pathname])),N=O.createHref(G)}let[D,z,V]=R7(r,A),U=U7(m,{replace:l,mask:c,state:f,target:d,preventScrollReset:h,relative:a,viewTransition:g,defaultShouldRevalidate:x,useTransitions:E});function P(G){t&&t(G),G.defaultPrevented||U(G)}let B=!(C.isExternal||o),q=y.createElement("a",{...A,...V,href:(B?N:void 0)||C.absoluteURL||j,onClick:B?P:t,ref:k7(S,z),target:d,"data-discover":!T&&n==="render"?"true":void 0});return D&&!T?y.createElement(y.Fragment,null,q,y.createElement(N7,{page:j})):q});Rl.displayName="Link";var L7=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:c,children:f,...d},m){let h=Yf(l,{relative:d.relative}),g=kr(),x=y.useContext(Gm),{navigator:A,basename:S}=y.useContext(Dr),w=x!=null&&G7(h)&&c===!0,O=A.encodeLocation?A.encodeLocation(h).pathname:h.pathname,E=g.pathname,T=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(E=E.toLowerCase(),T=T?T.toLowerCase():null,O=O.toLowerCase()),T&&S&&(T=ji(T,S)||T);const C=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let j=E===O||!a&&E.startsWith(O)&&E.charAt(C)==="/",R=T!=null&&(T===O||!a&&T.startsWith(O)&&T.charAt(O.length)==="/"),N={isActive:j,isPending:R,isTransitioning:w},D=j?t:void 0,z;typeof r=="function"?z=r(N):z=[r,j?"active":null,R?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(N):o;return y.createElement(Rl,{...d,"aria-current":D,className:z,ref:m,style:V,to:l,viewTransition:c},typeof f=="function"?f(N):f)});L7.displayName="NavLink";var I7=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=fp,action:c,onSubmit:f,relative:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:g,...x},A)=>{let{useTransitions:S}=y.useContext(Dr),w=F7(),O=V7(c,{relative:d}),E=l.toLowerCase()==="get"?"get":"post",T=typeof c=="string"&&Wz.test(c),C=j=>{if(f&&f(j),j.defaultPrevented)return;j.preventDefault();let R=j.nativeEvent.submitter,N=(R==null?void 0:R.getAttribute("formmethod"))||l,D=()=>w(R||j.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:g});S&&n!==!1?y.startTransition(()=>D()):D()};return y.createElement("form",{ref:A,method:E,action:O,onSubmit:r?f:C,...x,"data-discover":!T&&e==="render"?"true":void 0})});I7.displayName="Form";function B7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yz(e){let t=y.useContext(bc);return en(t,B7(e)),t}function U7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:c,defaultShouldRevalidate:f,useTransitions:d}={}){let m=Ka(),h=kr(),g=Yf(e,{relative:l});return y.useCallback(x=>{if(g7(x,t)){x.preventDefault();let A=n!==void 0?n:nf(h)===nf(g),S=()=>m(e,{replace:A,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:c,defaultShouldRevalidate:f});d?y.startTransition(()=>S()):S()}},[h,m,g,n,r,a,t,e,o,l,c,f,d])}function Ym(e){ra(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=y.useRef(Y1(e)),n=y.useRef(!1),r=kr(),a=y.useMemo(()=>y7(r.search,n.current?null:t.current),[r.search]),o=Ka(),l=y.useCallback((c,f)=>{const d=Y1(typeof c=="function"?c(new URLSearchParams(a)):c);n.current=!0,o("?"+d,f)},[o,a]);return[a,l]}var q7=0,H7=()=>`__${String(++q7)}__`;function F7(){let{router:e}=Yz("useSubmit"),{basename:t}=y.useContext(Dr),n=o7(),r=e.fetch,a=e.navigate;return y.useCallback(async(o,l={})=>{let{action:c,method:f,encType:d,formData:m,body:h}=w7(o,t);if(l.navigate===!1){let g=l.fetcherKey||H7();await r(g,n,l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await a(l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||f,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function V7(e,{relative:t}={}){let{basename:n}=y.useContext(Dr),r=y.useContext(Ea);en(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...Yf(e||".",{relative:t})},l=kr();if(e==null){o.search=l.search;let c=new URLSearchParams(o.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();o.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:xa([n,o.pathname])),nf(o)}function G7(e,{relative:t}={}){let n=y.useContext(Iz);en(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Yz("useViewTransitionState"),a=Yf(e,{relative:t});if(!n.isTransitioning)return!1;let o=ji(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=ji(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ap(a.pathname,l)!=null||Ap(a.pathname,o)!=null}var Zf=Cz();const Zz=Ut(Zf);function W7(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 Y7=e=>{switch(e){case"success":return X7;case"info":return J7;case"warning":return Q7;case"error":return eF;default:return null}},Z7=Array(12).fill(0),K7=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},Z7.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),X7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),Q7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),J7=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),eF=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),tF=L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nF=()=>{const[e,t]=L.useState(document.hidden);return L.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Z1=1;class rF{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,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Z1++,l=this.toasts.find(f=>f.id===o),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(f=>f.id===o?(this.publish({...f,...t,id:o,title:r}),{...f,...t,id:o,dismissible:c,title:r}):f):this.addToast({title:r,...a,dismissible:c,id:o}),o},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 o=r!==void 0,l;const c=a.then(async d=>{if(l=["resolve",d],L.isValidElement(d))o=!1,this.create({id:r,type:"default",message:d});else if(iF(d)&&!d.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,...A})}else if(d instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(d):n.error,g=typeof n.description=="function"?await n.description(d):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,...A})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(d):n.success,g=typeof n.description=="function"?await n.description(d):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:g,...A})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,x=typeof m=="object"&&!L.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...x})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((d,m)=>c.then(()=>l[0]==="reject"?m(l[1]):d(l[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)||Z1++;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 pr=new rF,aF=(e,t)=>{const n=(t==null?void 0:t.id)||Z1++;return pr.addToast({title:e,...t,id:n}),n},iF=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",oF=aF,sF=()=>pr.toasts,lF=()=>pr.getActiveToasts(),Dt=Object.assign(oF,{success:pr.success,info:pr.info,warning:pr.warning,error:pr.error,custom:pr.custom,message:pr.message,promise:pr.promise,dismiss:pr.dismiss,loading:pr.loading},{getHistory:sF,getToasts:lF});W7("[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 Uh(e){return e.label!==void 0}const cF=3,uF="24px",fF="16px",AC=4e3,dF=356,hF=14,pF=45,mF=200;function Da(...e){return e.filter(Boolean).join(" ")}function vF(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const gF=e=>{var t,n,r,a,o,l,c,f,d;const{invert:m,toast:h,unstyled:g,interacting:x,setHeights:A,visibleToasts:S,heights:w,index:O,toasts:E,expanded:T,removeToast:C,defaultRichColors:j,closeButton:R,style:N,cancelButtonStyle:D,actionButtonStyle:z,className:V="",descriptionClassName:U="",duration:P,position:B,gap:q,expandByDefault:G,classNames:$,icons:F,closeButtonAriaLabel:Z="Close toast"}=e,[X,oe]=L.useState(null),[I,Y]=L.useState(null),[Q,ce]=L.useState(!1),[ve,fe]=L.useState(!1),[ue,xe]=L.useState(!1),[se,_e]=L.useState(!1),[Se,ne]=L.useState(!1),[Ue,$e]=L.useState(0),[rt,et]=L.useState(0),tt=L.useRef(h.duration||P||AC),qt=L.useRef(null),ct=L.useRef(null),pn=O===0,an=O+1<=S,St=h.type,An=h.dismissible!==!1,H=h.className||"",ee=h.descriptionClassName||"",te=L.useMemo(()=>w.findIndex(Oe=>Oe.toastId===h.id)||0,[w,h.id]),Ce=L.useMemo(()=>{var Oe;return(Oe=h.closeButton)!=null?Oe:R},[h.closeButton,R]),je=L.useMemo(()=>h.duration||P||AC,[h.duration,P]),Te=L.useRef(0),Me=L.useRef(0),Fe=L.useRef(0),Ve=L.useRef(null),[Et,bt]=B.split("-"),xt=L.useMemo(()=>w.reduce((Oe,Pe,De)=>De>=te?Oe:Oe+Pe.height,0),[w,te]),Ae=nF(),Ze=h.invert||m,Re=St==="loading";Me.current=L.useMemo(()=>te*q+xt,[te,xt]),L.useEffect(()=>{tt.current=je},[je]),L.useEffect(()=>{ce(!0)},[]),L.useEffect(()=>{const Oe=ct.current;if(Oe){const Pe=Oe.getBoundingClientRect().height;return et(Pe),A(De=>[{toastId:h.id,height:Pe,position:h.position},...De]),()=>A(De=>De.filter(He=>He.toastId!==h.id))}},[A,h.id]),L.useLayoutEffect(()=>{if(!Q)return;const Oe=ct.current,Pe=Oe.style.height;Oe.style.height="auto";const De=Oe.getBoundingClientRect().height;Oe.style.height=Pe,et(De),A(He=>He.find(st=>st.toastId===h.id)?He.map(st=>st.toastId===h.id?{...st,height:De}:st):[{toastId:h.id,height:De,position:h.position},...He])},[Q,h.title,h.description,A,h.id,h.jsx,h.action,h.cancel]);const Ye=L.useCallback(()=>{fe(!0),$e(Me.current),A(Oe=>Oe.filter(Pe=>Pe.toastId!==h.id)),setTimeout(()=>{C(h)},mF)},[h,C,A,Me]);L.useEffect(()=>{if(h.promise&&St==="loading"||h.duration===1/0||h.type==="loading")return;let Oe;return T||x||Ae?(()=>{if(Fe.current<Te.current){const He=new Date().getTime()-Te.current;tt.current=tt.current-He}Fe.current=new Date().getTime()})():(()=>{tt.current!==1/0&&(Te.current=new Date().getTime(),Oe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Ye()},tt.current))})(),()=>clearTimeout(Oe)},[T,x,h,St,Ae,Ye]),L.useEffect(()=>{h.delete&&(Ye(),h.onDismiss==null||h.onDismiss.call(h,h))},[Ye,h.delete]);function jt(){var Oe;if(F!=null&&F.loading){var Pe;return L.createElement("div",{className:Da($==null?void 0:$.loader,h==null||(Pe=h.classNames)==null?void 0:Pe.loader,"sonner-loader"),"data-visible":St==="loading"},F.loading)}return L.createElement(K7,{className:Da($==null?void 0:$.loader,h==null||(Oe=h.classNames)==null?void 0:Oe.loader),visible:St==="loading"})}const ie=h.icon||(F==null?void 0:F[St])||Y7(St);var Ee,he;return L.createElement("li",{tabIndex:0,ref:ct,className:Da(V,H,$==null?void 0:$.toast,h==null||(t=h.classNames)==null?void 0:t.toast,$==null?void 0:$.default,$==null?void 0:$[St],h==null||(n=h.classNames)==null?void 0:n[St]),"data-sonner-toast":"","data-rich-colors":(Ee=h.richColors)!=null?Ee:j,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":Q,"data-promise":!!h.promise,"data-swiped":Se,"data-removed":ve,"data-visible":an,"data-y-position":Et,"data-x-position":bt,"data-index":O,"data-front":pn,"data-swiping":ue,"data-dismissible":An,"data-type":St,"data-invert":Ze,"data-swipe-out":se,"data-swipe-direction":I,"data-expanded":!!(T||G&&Q),"data-testid":h.testId,style:{"--index":O,"--toasts-before":O,"--z-index":E.length-O,"--offset":`${ve?Ue:Me.current}px`,"--initial-height":G?"auto":`${rt}px`,...N,...h.style},onDragEnd:()=>{xe(!1),oe(null),Ve.current=null},onPointerDown:Oe=>{Oe.button!==2&&(Re||!An||(qt.current=new Date,$e(Me.current),Oe.target.setPointerCapture(Oe.pointerId),Oe.target.tagName!=="BUTTON"&&(xe(!0),Ve.current={x:Oe.clientX,y:Oe.clientY})))},onPointerUp:()=>{var Oe,Pe,De;if(se||!An)return;Ve.current=null;const He=Number(((Oe=ct.current)==null?void 0:Oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wt=Number(((Pe=ct.current)==null?void 0:Pe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),st=new Date().getTime()-((De=qt.current)==null?void 0:De.getTime()),On=X==="x"?He:wt,Ca=Math.abs(On)/st;if(Math.abs(On)>=pF||Ca>.11){$e(Me.current),h.onDismiss==null||h.onDismiss.call(h,h),Y(X==="x"?He>0?"right":"left":wt>0?"down":"up"),Ye(),_e(!0);return}else{var Gn,Wn;(Gn=ct.current)==null||Gn.style.setProperty("--swipe-amount-x","0px"),(Wn=ct.current)==null||Wn.style.setProperty("--swipe-amount-y","0px")}ne(!1),xe(!1),oe(null)},onPointerMove:Oe=>{var Pe,De,He;if(!Ve.current||!An||((Pe=window.getSelection())==null?void 0:Pe.toString().length)>0)return;const st=Oe.clientY-Ve.current.y,On=Oe.clientX-Ve.current.x;var Ca;const Gn=(Ca=e.swipeDirections)!=null?Ca:vF(B);!X&&(Math.abs(On)>1||Math.abs(st)>1)&&oe(Math.abs(On)>Math.abs(st)?"x":"y");let Wn={x:0,y:0};const ti=gr=>1/(1.5+Math.abs(gr)/20);if(X==="y"){if(Gn.includes("top")||Gn.includes("bottom"))if(Gn.includes("top")&&st<0||Gn.includes("bottom")&&st>0)Wn.y=st;else{const gr=st*ti(st);Wn.y=Math.abs(gr)<Math.abs(st)?gr:st}}else if(X==="x"&&(Gn.includes("left")||Gn.includes("right")))if(Gn.includes("left")&&On<0||Gn.includes("right")&&On>0)Wn.x=On;else{const gr=On*ti(On);Wn.x=Math.abs(gr)<Math.abs(On)?gr:On}(Math.abs(Wn.x)>0||Math.abs(Wn.y)>0)&&ne(!0),(De=ct.current)==null||De.style.setProperty("--swipe-amount-x",`${Wn.x}px`),(He=ct.current)==null||He.style.setProperty("--swipe-amount-y",`${Wn.y}px`)}},Ce&&!h.jsx&&St!=="loading"?L.createElement("button",{"aria-label":Z,"data-disabled":Re,"data-close-button":!0,onClick:Re||!An?()=>{}:()=>{Ye(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Da($==null?void 0:$.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(he=F==null?void 0:F.close)!=null?he:tF):null,(St||h.icon||h.promise)&&h.icon!==null&&((F==null?void 0:F[St])!==null||h.icon)?L.createElement("div",{"data-icon":"",className:Da($==null?void 0:$.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||jt():null,h.type!=="loading"?ie:null):null,L.createElement("div",{"data-content":"",className:Da($==null?void 0:$.content,h==null||(o=h.classNames)==null?void 0:o.content)},L.createElement("div",{"data-title":"",className:Da($==null?void 0:$.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?L.createElement("div",{"data-description":"",className:Da(U,ee,$==null?void 0:$.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),L.isValidElement(h.cancel)?h.cancel:h.cancel&&Uh(h.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:Oe=>{Uh(h.cancel)&&An&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Oe),Ye())},className:Da($==null?void 0:$.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,L.isValidElement(h.action)?h.action:h.action&&Uh(h.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:Oe=>{Uh(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Oe),!Oe.defaultPrevented&&Ye())},className:Da($==null?void 0:$.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function OC(){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 yF(e,t){const n={};return[e,t].forEach((r,a)=>{const o=a===1,l=o?"--mobile-offset":"--offset",c=o?fF:uF;function f(d){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=c:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):f(c)}),n}const bF=L.forwardRef(function(t,n){const{id:r,invert:a,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:f,className:d,offset:m,mobileOffset:h,theme:g="light",richColors:x,duration:A,style:S,visibleToasts:w=cF,toastOptions:O,dir:E=OC(),gap:T=hF,icons:C,containerAriaLabel:j="Notifications"}=t,[R,N]=L.useState([]),D=L.useMemo(()=>r?R.filter(Q=>Q.toasterId===r):R.filter(Q=>!Q.toasterId),[R,r]),z=L.useMemo(()=>Array.from(new Set([o].concat(D.filter(Q=>Q.position).map(Q=>Q.position)))),[D,o]),[V,U]=L.useState([]),[P,B]=L.useState(!1),[q,G]=L.useState(!1),[$,F]=L.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=L.useRef(null),X=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),oe=L.useRef(null),I=L.useRef(!1),Y=L.useCallback(Q=>{N(ce=>{var ve;return(ve=ce.find(fe=>fe.id===Q.id))!=null&&ve.delete||pr.dismiss(Q.id),ce.filter(({id:fe})=>fe!==Q.id)})},[]);return L.useEffect(()=>pr.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{N(ce=>ce.map(ve=>ve.id===Q.id?{...ve,delete:!0}:ve))});return}setTimeout(()=>{Zz.flushSync(()=>{N(ce=>{const ve=ce.findIndex(fe=>fe.id===Q.id);return ve!==-1?[...ce.slice(0,ve),{...ce[ve],...Q},...ce.slice(ve+1)]:[Q,...ce]})})})}),[R]),L.useEffect(()=>{if(g!=="system"){F(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:ce})=>{F(ce?"dark":"light")})}catch{Q.addListener(({matches:ve})=>{try{F(ve?"dark":"light")}catch(fe){console.error(fe)}})}},[g]),L.useEffect(()=>{R.length<=1&&B(!1)},[R]),L.useEffect(()=>{const Q=ce=>{var ve;if(l.every(xe=>ce[xe]||ce.code===xe)){var ue;B(!0),(ue=Z.current)==null||ue.focus()}ce.code==="Escape"&&(document.activeElement===Z.current||(ve=Z.current)!=null&&ve.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[l]),L.useEffect(()=>{if(Z.current)return()=>{oe.current&&(oe.current.focus({preventScroll:!0}),oe.current=null,I.current=!1)}},[Z.current]),L.createElement("section",{ref:n,"aria-label":`${j} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((Q,ce)=>{var ve;const[fe,ue]=Q.split("-");return D.length?L.createElement("ol",{key:Q,dir:E==="auto"?OC():E,tabIndex:-1,ref:Z,className:d,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":fe,"data-x-position":ue,style:{"--front-toast-height":`${((ve=V[0])==null?void 0:ve.height)||0}px`,"--width":`${dF}px`,"--gap":`${T}px`,...S,...yF(m,h)},onBlur:xe=>{I.current&&!xe.currentTarget.contains(xe.relatedTarget)&&(I.current=!1,oe.current&&(oe.current.focus({preventScroll:!0}),oe.current=null))},onFocus:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||I.current||(I.current=!0,oe.current=xe.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{q||B(!1)},onDragEnd:()=>B(!1),onPointerDown:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},D.filter(xe=>!xe.position&&ce===0||xe.position===Q).map((xe,se)=>{var _e,Se;return L.createElement(gF,{key:xe.id,icons:C,index:se,toast:xe,defaultRichColors:x,duration:(_e=O==null?void 0:O.duration)!=null?_e:A,className:O==null?void 0:O.className,descriptionClassName:O==null?void 0:O.descriptionClassName,invert:a,visibleToasts:w,closeButton:(Se=O==null?void 0:O.closeButton)!=null?Se:f,interacting:q,position:Q,style:O==null?void 0:O.style,unstyled:O==null?void 0:O.unstyled,classNames:O==null?void 0:O.classNames,cancelButtonStyle:O==null?void 0:O.cancelButtonStyle,actionButtonStyle:O==null?void 0:O.actionButtonStyle,closeButtonAriaLabel:O==null?void 0:O.closeButtonAriaLabel,removeToast:Y,toasts:D.filter(ne=>ne.position==xe.position),heights:V.filter(ne=>ne.position==xe.position),setHeights:U,expandByDefault:c,gap:T,expanded:P,swipeDirections:t.swipeDirections})})):null}))});function EC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kf(...e){return t=>{let n=!1;const r=e.map(a=>{const o=EC(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():EC(e[a],null)}}}}function lt(...e){return y.useCallback(Kf(...e),e)}var xF=Symbol.for("react.lazy"),Ep=H_[" use ".trim().toString()];function wF(e){return typeof e=="object"&&e!==null&&"then"in e}function Kz(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===xF&&"_payload"in e&&wF(e._payload)}function Xz(e){const t=SF(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;Kz(o)&&typeof Ep=="function"&&(o=Ep(o._payload));const c=y.Children.toArray(o),f=c.find(AF);if(f){const d=f.props.children,m=c.map(h=>h===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:h);return v.jsx(t,{...l,ref:a,children:y.isValidElement(d)?y.cloneElement(d,void 0,m):null})}return v.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Ns=Xz("Slot");function SF(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(Kz(a)&&typeof Ep=="function"&&(a=Ep(a._payload)),y.isValidElement(a)){const l=EF(a),c=OF(o,a.props);return a.type!==y.Fragment&&(c.ref=r?Kf(r,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _F=Symbol("radix.slottable");function AF(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_F}function OF(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function EF(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)}function Qz(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=Qz(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Qz(e))&&(r&&(r+=" "),r+=t);return r}const TC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jC=yt,wc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(d=>{const m=n==null?void 0:n[d],h=o==null?void 0:o[d];if(m===null)return null;const g=TC(m)||TC(h);return a[d][g]}),c=n&&Object.entries(n).reduce((d,m)=>{let[h,g]=m;return g===void 0||(d[h]=g),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:h,className:g,...x}=m;return Object.entries(x).every(A=>{let[S,w]=A;return Array.isArray(w)?w.includes({...o,...c}[S]):{...o,...c}[S]===w})?[...d,h,g]:d},[]);return jC(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)};/**
61
- * @license lucide-react v0.468.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const TF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jz=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
66
- * @license lucide-react v0.468.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */var jF={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"};/**
71
- * @license lucide-react v0.468.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const CF=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...c},f)=>y.createElement("svg",{ref:f,...jF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jz("lucide",a),...c},[...l.map(([d,m])=>y.createElement(d,m)),...Array.isArray(o)?o:[o]]));/**
76
- * @license lucide-react v0.468.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Je=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(CF,{ref:o,iconNode:t,className:Jz(`lucide-${TF(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
81
- * @license lucide-react v0.468.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const RF=Je("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
86
- * @license lucide-react v0.468.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const NF=Je("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
91
- * @license lucide-react v0.468.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const MF=Je("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
96
- * @license lucide-react v0.468.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const PF=Je("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
101
- * @license lucide-react v0.468.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const e5=Je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
106
- * @license lucide-react v0.468.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const J_=Je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
111
- * @license lucide-react v0.468.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const eA=Je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
116
- * @license lucide-react v0.468.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const DF=Je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
121
- * @license lucide-react v0.468.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const kF=Je("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
126
- * @license lucide-react v0.468.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const $F=Je("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
131
- * @license lucide-react v0.468.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const zF=Je("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
136
- * @license lucide-react v0.468.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const t5=Je("House",[["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-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
141
- * @license lucide-react v0.468.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const LF=Je("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
146
- * @license lucide-react v0.468.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const IF=Je("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
151
- * @license lucide-react v0.468.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const BF=Je("KeyRound",[["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"}]]);/**
156
- * @license lucide-react v0.468.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const UF=Je("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
161
- * @license lucide-react v0.468.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const qF=Je("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
166
- * @license lucide-react v0.468.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const n5=Je("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
171
- * @license lucide-react v0.468.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const HF=Je("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
176
- * @license lucide-react v0.468.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const Tp=Je("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
181
- * @license lucide-react v0.468.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const FF=Je("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
186
- * @license lucide-react v0.468.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const VF=Je("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
191
- * @license lucide-react v0.468.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const r5=Je("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
196
- * @license lucide-react v0.468.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const GF=Je("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
201
- * @license lucide-react v0.468.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const WF=Je("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
206
- * @license lucide-react v0.468.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const YF=Je("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
211
- * @license lucide-react v0.468.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const K1=Je("Pencil",[["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"}]]);/**
216
- * @license lucide-react v0.468.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const tA=Je("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
221
- * @license lucide-react v0.468.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const a5=Je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
226
- * @license lucide-react v0.468.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const ZF=Je("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
231
- * @license lucide-react v0.468.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const KF=Je("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
236
- * @license lucide-react v0.468.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const XF=Je("ScanLine",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]);/**
241
- * @license lucide-react v0.468.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const QF=Je("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
246
- * @license lucide-react v0.468.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const i5=Je("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
251
- * @license lucide-react v0.468.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const JF=Je("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
256
- * @license lucide-react v0.468.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const eV=Je("Sun",[["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"}]]);/**
261
- * @license lucide-react v0.468.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const tV=Je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
266
- * @license lucide-react v0.468.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const nV=Je("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
271
- * @license lucide-react v0.468.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const rV=Je("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
276
- * @license lucide-react v0.468.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const aV=Je("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
281
- * @license lucide-react v0.468.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const iV=Je("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
286
- * @license lucide-react v0.468.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const oV=Je("Volume1",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}]]);/**
291
- * @license lucide-react v0.468.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const sV=Je("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
296
- * @license lucide-react v0.468.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const o5=Je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Rb=768;function lV(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Rb-1}px)`),r=()=>{t(window.innerWidth<Rb)};return n.addEventListener("change",r),t(window.innerWidth<Rb),()=>n.removeEventListener("change",r)},[]),!!e}const nA="-",cV=e=>{const t=fV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(nA);return c[0]===""&&c.length!==1&&c.shift(),s5(c,t)||uV(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},s5=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?s5(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(nA);return(l=t.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},CC=/^\[(.+)\]$/,uV=e=>{if(CC.test(e)){const t=CC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},fV=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return hV(Object.entries(e.classGroups),n).forEach(([o,l])=>{X1(l,r,o,t)}),r},X1=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:RC(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(dV(a)){X1(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{X1(l,RC(t,o),n,r)})})},RC=(e,t)=>{let n=e;return t.split(nA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dV=e=>e.isThemeGetter,hV=(e,t)=>t?e.map(([n,r])=>{const a=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,c])=>[t+l,c])):o);return[n,a]}):e,pV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},l5="!",mV=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,l=c=>{const f=[];let d=0,m=0,h;for(let w=0;w<c.length;w++){let O=c[w];if(d===0){if(O===a&&(r||c.slice(w,w+o)===t)){f.push(c.slice(m,w)),m=w+o;continue}if(O==="/"){h=w;continue}}O==="["?d++:O==="]"&&d--}const g=f.length===0?c:c.substring(m),x=g.startsWith(l5),A=x?g.substring(1):g,S=h&&h>m?h-m:void 0;return{modifiers:f,hasImportantModifier:x,baseClassName:A,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},vV=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},gV=e=>({cache:pV(e.cacheSize),parseClassName:mV(e),...cV(e)}),yV=/\s+/,bV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],l=e.trim().split(yV);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:m,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:x}=n(d);let A=!!x,S=r(A?g.substring(0,x):g);if(!S){if(!A){c=d+(c.length>0?" "+c:c);continue}if(S=r(g),!S){c=d+(c.length>0?" "+c:c);continue}A=!1}const w=vV(m).join(":"),O=h?w+l5:w,E=O+S;if(o.includes(E))continue;o.push(E);const T=a(S,A);for(let C=0;C<T.length;++C){const j=T[C];o.push(O+j)}c=d+(c.length>0?" "+c:c)}return c};function xV(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=c5(t))&&(r&&(r+=" "),r+=n);return r}const c5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=c5(e[r]))&&(n&&(n+=" "),n+=t);return n};function wV(e,...t){let n,r,a,o=l;function l(f){const d=t.reduce((m,h)=>h(m),e());return n=gV(d),r=n.cache.get,a=n.cache.set,o=c,c(f)}function c(f){const d=r(f);if(d)return d;const m=bV(f,n);return a(f,m),m}return function(){return o(xV.apply(null,arguments))}}const Zt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},u5=/^\[(?:([a-z-]+):)?(.+)\]$/i,SV=/^\d+\/\d+$/,_V=new Set(["px","full","screen"]),AV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OV=/\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$/,EV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xi=e=>kl(e)||_V.has(e)||SV.test(e),fo=e=>Sc(e,"length",$V),kl=e=>!!e&&!Number.isNaN(Number(e)),Nb=e=>Sc(e,"number",kl),Cu=e=>!!e&&Number.isInteger(Number(e)),CV=e=>e.endsWith("%")&&kl(e.slice(0,-1)),it=e=>u5.test(e),ho=e=>AV.test(e),RV=new Set(["length","size","percentage"]),NV=e=>Sc(e,RV,f5),MV=e=>Sc(e,"position",f5),PV=new Set(["image","url"]),DV=e=>Sc(e,PV,LV),kV=e=>Sc(e,"",zV),Ru=()=>!0,Sc=(e,t,n)=>{const r=u5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},$V=e=>OV.test(e)&&!EV.test(e),f5=()=>!1,zV=e=>TV.test(e),LV=e=>jV.test(e),IV=()=>{const e=Zt("colors"),t=Zt("spacing"),n=Zt("blur"),r=Zt("brightness"),a=Zt("borderColor"),o=Zt("borderRadius"),l=Zt("borderSpacing"),c=Zt("borderWidth"),f=Zt("contrast"),d=Zt("grayscale"),m=Zt("hueRotate"),h=Zt("invert"),g=Zt("gap"),x=Zt("gradientColorStops"),A=Zt("gradientColorStopPositions"),S=Zt("inset"),w=Zt("margin"),O=Zt("opacity"),E=Zt("padding"),T=Zt("saturate"),C=Zt("scale"),j=Zt("sepia"),R=Zt("skew"),N=Zt("space"),D=Zt("translate"),z=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",it,t],P=()=>[it,t],B=()=>["",xi,fo],q=()=>["auto",kl,it],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",it],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[kl,it];return{cacheSize:500,separator:":",theme:{colors:[Ru],spacing:[xi,fo],blur:["none","",ho,it],brightness:I(),borderColor:[e],borderRadius:["none","","full",ho,it],borderSpacing:P(),borderWidth:B(),contrast:I(),grayscale:X(),hueRotate:I(),invert:X(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[CV,fo],inset:U(),margin:U(),opacity:I(),padding:P(),saturate:I(),scale:I(),sepia:X(),skew:I(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",it]}],container:["container"],columns:[{columns:[ho]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),it]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cu,it]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",it]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",Cu,it]}],"grid-cols":[{"grid-cols":[Ru]}],"col-start-end":[{col:["auto",{span:["full",Cu,it]},it]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[Ru]}],"row-start-end":[{row:["auto",{span:[Cu,it]},it]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",it]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",it]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",it,t]}],"min-w":[{"min-w":[it,t,"min","max","fit"]}],"max-w":[{"max-w":[it,t,"none","full","min","max","fit","prose",{screen:[ho]},ho]}],h:[{h:[it,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[it,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[it,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[it,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ho,fo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Nb]}],"font-family":[{font:[Ru]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",it]}],"line-clamp":[{"line-clamp":["none",kl,Nb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xi,it]}],"list-image":[{"list-image":["none",it]}],"list-style-type":[{list:["none","disc","decimal",it]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xi,fo]}],"underline-offset":[{"underline-offset":["auto",xi,it]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",it]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",it]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),MV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},DV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:$()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[xi,it]}],"outline-w":[{outline:[xi,fo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[xi,fo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ho,kV]}],"shadow-color":[{shadow:[Ru]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",ho,it]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[h]}],saturate:[{saturate:[T]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",it]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",it]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",it]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Cu,it]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",it]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",it]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",it]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xi,fo,Nb]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},BV=wV(IV);function be(...e){return BV(yt(e))}const Zm=wc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",pill:"h-12 px-6 rounded-pill",nav:"h-7 px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),ut=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const l=r?Ns:"button";return v.jsx(l,{className:be(Zm({variant:t,size:n,className:e})),ref:o,...a})});ut.displayName="Button";const hn=y.forwardRef(({className:e,type:t,...n},r)=>v.jsx("input",{type:t,className:be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));hn.displayName="Input";var UV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],d5=UV.reduce((e,t)=>{const n=Xz(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...c}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),qV="Separator",NC="horizontal",HV=["horizontal","vertical"],h5=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=NC,...a}=e,o=FV(r)?r:NC,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return v.jsx(d5.div,{"data-orientation":o,...c,...a,ref:t})});h5.displayName=qV;function FV(e){return HV.includes(e)}var p5=h5;const Ya=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>v.jsx(p5,{ref:a,decorative:n,orientation:t,className:be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ya.displayName=p5.displayName;function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function VV(e,t){const n=y.createContext(t),r=o=>{const{children:l,...c}=o,f=y.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function a(o){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function ia(e,t=[]){let n=[];function r(o,l){const c=y.createContext(l),f=n.length;n=[...n,l];const d=h=>{var O;const{scope:g,children:x,...A}=h,S=((O=g==null?void 0:g[e])==null?void 0:O[f])||c,w=y.useMemo(()=>A,Object.values(A));return v.jsx(S.Provider,{value:w,children:x})};d.displayName=o+"Provider";function m(h,g){var S;const x=((S=g==null?void 0:g[e])==null?void 0:S[f])||c,A=y.useContext(x);if(A)return A;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,m]}const a=()=>{const o=n.map(l=>y.createContext(l));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return a.scopeName=e,[r,GV(a,...t)]}function GV(...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(o){const l=r.reduce((c,{useScope:f,scopeName:d})=>{const h=f(o)[`__scope${d}`];return{...c,...h}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Fn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},WV=H_[" useId ".trim().toString()]||(()=>{}),YV=0;function wa(e){const[t,n]=y.useState(WV());return Fn(()=>{n(r=>r??String(YV++))},[e]),e||(t?`radix-${t}`:"")}var ZV=H_[" useInsertionEffect ".trim().toString()]||Fn;function Oo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=KV({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:a;{const m=y.useRef(e!==void 0);y.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 d=y.useCallback(m=>{var h;if(c){const g=XV(m)?m(e):m;g!==e&&((h=l.current)==null||h.call(l,g))}else o(m)},[c,e,o,l]);return[f,d]}function KV({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return ZV(()=>{o.current=t},[t]),y.useEffect(()=>{var l;a.current!==n&&((l=o.current)==null||l.call(o,n),a.current=n)},[n,a]),[n,r,o]}function XV(e){return typeof e=="function"}function Vl(e){const t=QV(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,c=y.Children.toArray(o),f=c.find(JV);if(f){const d=f.props.children,m=c.map(h=>h===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:h);return v.jsx(t,{...l,ref:a,children:y.isValidElement(d)?y.cloneElement(d,void 0,m):null})}return v.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function QV(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=tG(a),c=eG(o,a.props);return a.type!==y.Fragment&&(c.ref=r?Kf(r,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var m5=Symbol("radix.slottable");function v5(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=m5,t}function JV(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===m5}function eG(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function tG(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 nG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xe=nG.reduce((e,t)=>{const n=Vl(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...c}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function g5(e,t){e&&Zf.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rG(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);y.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 aG="DismissableLayer",Q1="dismissableLayer.update",iG="dismissableLayer.pointerDownOutside",oG="dismissableLayer.focusOutside",MC,y5=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xf=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=e,d=y.useContext(y5),[m,h]=y.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=y.useState({}),A=lt(t,N=>h(N)),S=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),O=S.indexOf(w),E=m?S.indexOf(m):-1,T=d.layersWithOutsidePointerEventsDisabled.size>0,C=E>=O,j=cG(N=>{const D=N.target,z=[...d.branches].some(V=>V.contains(D));!C||z||(a==null||a(N),l==null||l(N),N.defaultPrevented||c==null||c())},g),R=uG(N=>{const D=N.target;[...d.branches].some(V=>V.contains(D))||(o==null||o(N),l==null||l(N),N.defaultPrevented||c==null||c())},g);return rG(N=>{E===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},g),y.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(MC=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),PC(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=MC)}},[m,g,n,d]),y.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),PC())},[m,d]),y.useEffect(()=>{const N=()=>x({});return document.addEventListener(Q1,N),()=>document.removeEventListener(Q1,N)},[]),v.jsx(Xe.div,{...f,ref:A,style:{pointerEvents:T?C?"auto":"none":void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,R.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,j.onPointerDownCapture)})});Xf.displayName=aG;var sG="DismissableLayerBranch",lG=y.forwardRef((e,t)=>{const n=y.useContext(y5),r=y.useRef(null),a=lt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),v.jsx(Xe.div,{...e,ref:a})});lG.displayName=sG;function cG(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let f=function(){b5(iG,n,d,{discrete:!0})};const d={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},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uG(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&b5(oG,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function PC(){const e=new CustomEvent(Q1);document.dispatchEvent(e)}function b5(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?g5(a,o):a.dispatchEvent(o)}var Mb="focusScope.autoFocusOnMount",Pb="focusScope.autoFocusOnUnmount",DC={bubbles:!1,cancelable:!0},fG="FocusScope",Km=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[c,f]=y.useState(null),d=Un(a),m=Un(o),h=y.useRef(null),g=lt(t,S=>f(S)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let S=function(T){if(x.paused||!c)return;const C=T.target;c.contains(C)?h.current=C:po(h.current,{select:!0})},w=function(T){if(x.paused||!c)return;const C=T.relatedTarget;C!==null&&(c.contains(C)||po(h.current,{select:!0}))},O=function(T){if(document.activeElement===document.body)for(const j of T)j.removedNodes.length>0&&po(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const E=new MutationObserver(O);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),E.disconnect()}}},[r,c,x.paused]),y.useEffect(()=>{if(c){$C.add(x);const S=document.activeElement;if(!c.contains(S)){const O=new CustomEvent(Mb,DC);c.addEventListener(Mb,d),c.dispatchEvent(O),O.defaultPrevented||(dG(gG(x5(c)),{select:!0}),document.activeElement===S&&po(c))}return()=>{c.removeEventListener(Mb,d),setTimeout(()=>{const O=new CustomEvent(Pb,DC);c.addEventListener(Pb,m),c.dispatchEvent(O),O.defaultPrevented||po(S??document.body,{select:!0}),c.removeEventListener(Pb,m),$C.remove(x)},0)}}},[c,d,m,x]);const A=y.useCallback(S=>{if(!n&&!r||x.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,O=document.activeElement;if(w&&O){const E=S.currentTarget,[T,C]=hG(E);T&&C?!S.shiftKey&&O===C?(S.preventDefault(),n&&po(T,{select:!0})):S.shiftKey&&O===T&&(S.preventDefault(),n&&po(C,{select:!0})):O===E&&S.preventDefault()}},[n,r,x.paused]);return v.jsx(Xe.div,{tabIndex:-1,...l,ref:g,onKeyDown:A})});Km.displayName=fG;function dG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(po(r,{select:t}),document.activeElement!==n)return}function hG(e){const t=x5(e),n=kC(t,e),r=kC(t.reverse(),e);return[n,r]}function x5(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 kC(e,t){for(const n of e)if(!pG(n,{upTo:t}))return n}function pG(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 mG(e){return e instanceof HTMLInputElement&&"select"in e}function po(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mG(e)&&t&&e.select()}}var $C=vG();function vG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=zC(e,t),e.unshift(t)},remove(t){var n;e=zC(e,t),(n=e[0])==null||n.resume()}}}function zC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gG(e){return e.filter(t=>t.tagName!=="A")}var yG="Portal",Qf=y.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,o]=y.useState(!1);Fn(()=>o(!0),[]);const l=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?Zz.createPortal(v.jsx(Xe.div,{...r,ref:t}),l):null});Qf.displayName=yG;function bG(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var ir=e=>{const{present:t,children:n}=e,r=xG(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=lt(r.ref,wG(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:o}):null};ir.displayName="Presence";function xG(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),l=e?"mounted":"unmounted",[c,f]=bG(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const d=qh(r.current);o.current=c==="mounted"?d:"none"},[c]),Fn(()=>{const d=r.current,m=a.current;if(m!==e){const g=o.current,x=qh(d);e?f("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&g!==x?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Fn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,h=x=>{const S=qh(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(f("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=x=>{x.target===t&&(o.current=qh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function qh(e){return(e==null?void 0:e.animationName)||"none"}function wG(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 Db=0;function rA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??LC()),document.body.insertAdjacentElement("beforeend",e[1]??LC()),Db++,()=>{Db===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Db--}},[])}function LC(){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 La=function(){return La=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},La.apply(this,arguments)};function w5(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 SG(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var hp="right-scroll-bar-position",pp="width-before-scroll-bar",_G="with-scroll-bars-hidden",AG="--removed-body-scroll-bar-size";function kb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function OG(e,t){var n=y.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 EG=typeof window<"u"?y.useLayoutEffect:y.useEffect,IC=new WeakMap;function TG(e,t){var n=OG(null,function(r){return e.forEach(function(a){return kb(a,r)})});return EG(function(){var r=IC.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(c){o.has(c)||kb(c,null)}),o.forEach(function(c){a.has(c)||kb(c,l)})}IC.set(n,e)},[e]),n}function jG(e){return e}function CG(e,t){t===void 0&&(t=jG);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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var f=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return a}function RG(e){e===void 0&&(e={});var t=CG(null);return t.options=La({async:!0,ssr:!1},e),t}var S5=function(e){var t=e.sideCar,n=w5(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 y.createElement(r,La({},n))};S5.isSideCarExport=!0;function NG(e,t){return e.useMedium(t),S5}var _5=RG(),$b=function(){},Xm=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:$b,onWheelCapture:$b,onTouchMoveCapture:$b}),a=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,h=e.shards,g=e.sideCar,x=e.noRelative,A=e.noIsolation,S=e.inert,w=e.allowPinchZoom,O=e.as,E=O===void 0?"div":O,T=e.gapMode,C=w5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=g,R=TG([n,t]),N=La(La({},C),a);return y.createElement(y.Fragment,null,m&&y.createElement(j,{sideCar:_5,removeScrollBar:d,shards:h,noRelative:x,noIsolation:A,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:T}),l?y.cloneElement(y.Children.only(c),La(La({},N),{ref:R})):y.createElement(E,La({},N,{className:f,ref:R}),c))});Xm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xm.classNames={fullWidth:pp,zeroRight:hp};var MG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function PG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=MG();return t&&e.setAttribute("nonce",t),e}function DG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $G=function(){var e=0,t=null;return{add:function(n){e==0&&(t=PG())&&(DG(t,n),kG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zG=function(){var e=$G();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},A5=function(){var e=zG(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},LG={left:0,top:0,right:0,gap:0},zb=function(e){return parseInt(e||"",10)||0},IG=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[zb(n),zb(r),zb(a)]},BG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return LG;var t=IG(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])}},UG=A5(),$l="data-scroll-locked",qG=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
301
- .`.concat(_G,` {
302
- overflow: hidden `).concat(r,`;
303
- padding-right: `).concat(c,"px ").concat(r,`;
304
- }
305
- body[`).concat($l,`] {
306
- overflow: hidden `).concat(r,`;
307
- overscroll-behavior: contain;
308
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
309
- padding-left: `.concat(a,`px;
310
- padding-top: `).concat(o,`px;
311
- padding-right: `).concat(l,`px;
312
- margin-left:0;
313
- margin-top:0;
314
- margin-right: `).concat(c,"px ").concat(r,`;
315
- `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
316
- }
317
-
318
- .`).concat(hp,` {
319
- right: `).concat(c,"px ").concat(r,`;
320
- }
321
-
322
- .`).concat(pp,` {
323
- margin-right: `).concat(c,"px ").concat(r,`;
324
- }
325
-
326
- .`).concat(hp," .").concat(hp,` {
327
- right: 0 `).concat(r,`;
328
- }
329
-
330
- .`).concat(pp," .").concat(pp,` {
331
- margin-right: 0 `).concat(r,`;
332
- }
333
-
334
- body[`).concat($l,`] {
335
- `).concat(AG,": ").concat(c,`px;
336
- }
337
- `)},BC=function(){var e=parseInt(document.body.getAttribute($l)||"0",10);return isFinite(e)?e:0},HG=function(){y.useEffect(function(){return document.body.setAttribute($l,(BC()+1).toString()),function(){var e=BC()-1;e<=0?document.body.removeAttribute($l):document.body.setAttribute($l,e.toString())}},[])},FG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;HG();var o=y.useMemo(function(){return BG(a)},[a]);return y.createElement(UG,{styles:qG(o,!t,a,n?"":"!important")})},J1=!1;if(typeof window<"u")try{var Hh=Object.defineProperty({},"passive",{get:function(){return J1=!0,!0}});window.addEventListener("test",Hh,Hh),window.removeEventListener("test",Hh,Hh)}catch{J1=!1}var _l=J1?{passive:!1}:!1,VG=function(e){return e.tagName==="TEXTAREA"},O5=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!VG(e)&&n[t]==="visible")},GG=function(e){return O5(e,"overflowY")},WG=function(e){return O5(e,"overflowX")},UC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=E5(e,r);if(a){var o=T5(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},YG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ZG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},E5=function(e,t){return e==="v"?GG(t):WG(t)},T5=function(e,t){return e==="v"?YG(t):ZG(t)},KG=function(e,t){return e==="h"&&t==="rtl"?-1:1},XG=function(e,t,n,r,a){var o=KG(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),d=!1,m=l>0,h=0,g=0;do{if(!c)break;var x=T5(e,c),A=x[0],S=x[1],w=x[2],O=S-w-o*A;(A||O)&&E5(e,c)&&(h+=O,g+=A);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(h)<1||!m&&Math.abs(g)<1)&&(d=!0),d},Fh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qC=function(e){return[e.deltaX,e.deltaY]},HC=function(e){return e&&"current"in e?e.current:e},QG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JG=function(e){return`
338
- .block-interactivity-`.concat(e,` {pointer-events: none;}
339
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
340
- `)},eW=0,Al=[];function tW(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(eW++)[0],o=y.useState(A5)[0],l=y.useRef(e);y.useEffect(function(){l.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=SG([e.lockRef.current],(e.shards||[]).map(HC),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var O=Fh(S),E=n.current,T="deltaX"in S?S.deltaX:E[0]-O[0],C="deltaY"in S?S.deltaY:E[1]-O[1],j,R=S.target,N=Math.abs(T)>Math.abs(C)?"h":"v";if("touches"in S&&N==="h"&&R.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,V=z?z===R||z.contains(R):!1;if(V)return!1;var U=UC(N,R);if(!U)return!0;if(U?j=N:(j=N==="v"?"h":"v",U=UC(N,R)),!U)return!1;if(!r.current&&"changedTouches"in S&&(T||C)&&(r.current=j),!j)return!0;var P=r.current||j;return XG(P,w,S,P==="h"?T:C)},[]),f=y.useCallback(function(S){var w=S;if(!(!Al.length||Al[Al.length-1]!==o)){var O="deltaY"in w?qC(w):Fh(w),E=t.current.filter(function(j){return j.name===w.type&&(j.target===w.target||w.target===j.shadowParent)&&QG(j.delta,O)})[0];if(E&&E.should){w.cancelable&&w.preventDefault();return}if(!E){var T=(l.current.shards||[]).map(HC).filter(Boolean).filter(function(j){return j.contains(w.target)}),C=T.length>0?c(w,T[0]):!l.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),d=y.useCallback(function(S,w,O,E){var T={name:S,delta:w,target:O,should:E,shadowParent:nW(O)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(C){return C!==T})},1)},[]),m=y.useCallback(function(S){n.current=Fh(S),r.current=void 0},[]),h=y.useCallback(function(S){d(S.type,qC(S),S.target,c(S,e.lockRef.current))},[]),g=y.useCallback(function(S){d(S.type,Fh(S),S.target,c(S,e.lockRef.current))},[]);y.useEffect(function(){return Al.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",f,_l),document.addEventListener("touchmove",f,_l),document.addEventListener("touchstart",m,_l),function(){Al=Al.filter(function(S){return S!==o}),document.removeEventListener("wheel",f,_l),document.removeEventListener("touchmove",f,_l),document.removeEventListener("touchstart",m,_l)}},[]);var x=e.removeScrollBar,A=e.inert;return y.createElement(y.Fragment,null,A?y.createElement(o,{styles:JG(a)}):null,x?y.createElement(FG,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nW(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rW=NG(_5,tW);var Qm=y.forwardRef(function(e,t){return y.createElement(Xm,La({},e,{ref:t,sideCar:rW}))});Qm.classNames=Xm.classNames;var aW=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ol=new WeakMap,Vh=new WeakMap,Gh={},Lb=0,j5=function(e){return e&&(e.host||j5(e.parentNode))},iW=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=j5(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})},oW=function(e,t,n,r){var a=iW(t,Array.isArray(e)?e:[e]);Gh[n]||(Gh[n]=new WeakMap);var o=Gh[n],l=[],c=new Set,f=new Set(a),d=function(h){!h||c.has(h)||(c.add(h),d(h.parentNode))};a.forEach(d);var m=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(g){if(c.has(g))m(g);else try{var x=g.getAttribute(r),A=x!==null&&x!=="false",S=(Ol.get(g)||0)+1,w=(o.get(g)||0)+1;Ol.set(g,S),o.set(g,w),l.push(g),S===1&&A&&Vh.set(g,!0),w===1&&g.setAttribute(n,"true"),A||g.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",g,O)}})};return m(t),c.clear(),Lb++,function(){l.forEach(function(h){var g=Ol.get(h)-1,x=o.get(h)-1;Ol.set(h,g),o.set(h,x),g||(Vh.has(h)||h.removeAttribute(r),Vh.delete(h)),x||h.removeAttribute(n)}),Lb--,Lb||(Ol=new WeakMap,Ol=new WeakMap,Vh=new WeakMap,Gh={})}},aA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=aW(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),oW(r,a,n,"aria-hidden")):function(){return null}},Jm="Dialog",[C5,R5]=ia(Jm),[sW,Ta]=C5(Jm),N5=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=y.useRef(null),f=y.useRef(null),[d,m]=Oo({prop:r,defaultProp:a??!1,onChange:o,caller:Jm});return v.jsx(sW,{scope:t,triggerRef:c,contentRef:f,contentId:wa(),titleId:wa(),descriptionId:wa(),open:d,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(h=>!h),[m]),modal:l,children:n})};N5.displayName=Jm;var M5="DialogTrigger",P5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ta(M5,n),o=lt(t,a.triggerRef);return v.jsx(Xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":sA(a.open),...r,ref:o,onClick:ze(e.onClick,a.onOpenToggle)})});P5.displayName=M5;var iA="DialogPortal",[lW,D5]=C5(iA,{forceMount:void 0}),k5=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Ta(iA,t);return v.jsx(lW,{scope:t,forceMount:n,children:y.Children.map(r,l=>v.jsx(ir,{present:n||o.open,children:v.jsx(Qf,{asChild:!0,container:a,children:l})}))})};k5.displayName=iA;var jp="DialogOverlay",$5=y.forwardRef((e,t)=>{const n=D5(jp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ta(jp,e.__scopeDialog);return o.modal?v.jsx(ir,{present:r||o.open,children:v.jsx(uW,{...a,ref:t})}):null});$5.displayName=jp;var cW=Vl("DialogOverlay.RemoveScroll"),uW=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ta(jp,n);return v.jsx(Qm,{as:cW,allowPinchZoom:!0,shards:[a.contentRef],children:v.jsx(Xe.div,{"data-state":sA(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gs="DialogContent",z5=y.forwardRef((e,t)=>{const n=D5(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ta(gs,e.__scopeDialog);return v.jsx(ir,{present:r||o.open,children:o.modal?v.jsx(fW,{...a,ref:t}):v.jsx(dW,{...a,ref:t})})});z5.displayName=gs;var fW=y.forwardRef((e,t)=>{const n=Ta(gs,e.__scopeDialog),r=y.useRef(null),a=lt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return aA(o)},[]),v.jsx(L5,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ze(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ze(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:ze(e.onFocusOutside,o=>o.preventDefault())})}),dW=y.forwardRef((e,t)=>{const n=Ta(gs,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return v.jsx(L5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),L5=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,c=Ta(gs,n),f=y.useRef(null),d=lt(t,f);return rA(),v.jsxs(v.Fragment,{children:[v.jsx(Km,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:v.jsx(Xf,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":sA(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(pW,{titleId:c.titleId}),v.jsx(vW,{contentRef:f,descriptionId:c.descriptionId})]})]})}),oA="DialogTitle",I5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ta(oA,n);return v.jsx(Xe.h2,{id:a.titleId,...r,ref:t})});I5.displayName=oA;var B5="DialogDescription",U5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ta(B5,n);return v.jsx(Xe.p,{id:a.descriptionId,...r,ref:t})});U5.displayName=B5;var q5="DialogClose",H5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ta(q5,n);return v.jsx(Xe.button,{type:"button",...r,ref:t,onClick:ze(e.onClick,()=>a.onOpenChange(!1))})});H5.displayName=q5;function sA(e){return e?"open":"closed"}var F5="DialogTitleWarning",[hW,V5]=VV(F5,{contentName:gs,titleName:oA,docsSlug:"dialog"}),pW=({titleId:e})=>{const t=V5(F5),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
341
-
342
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
343
-
344
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mW="DialogDescriptionWarning",vW=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V5(mW).contentName}}.`;return y.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},lA=N5,G5=P5,cA=k5,Jf=$5,ed=z5,td=I5,nd=U5,ev=H5;const gW=lA,yW=cA,W5=y.forwardRef(({className:e,...t},n)=>v.jsx(Jf,{className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));W5.displayName=Jf.displayName;const bW=wc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",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",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"}},defaultVariants:{side:"right"}}),Y5=y.forwardRef(({side:e="right",className:t,children:n,...r},a)=>v.jsxs(yW,{children:[v.jsx(W5,{}),v.jsxs(ed,{ref:a,className:be(bW({side:e}),t),...r,children:[n,v.jsxs(ev,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[v.jsx(o5,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Y5.displayName=ed.displayName;const Z5=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});Z5.displayName="SheetHeader";const K5=y.forwardRef(({className:e,...t},n)=>v.jsx(td,{ref:n,className:be("text-lg font-semibold text-foreground",e),...t}));K5.displayName=td.displayName;const X5=y.forwardRef(({className:e,...t},n)=>v.jsx(nd,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));X5.displayName=nd.displayName;function FC({className:e,...t}){return v.jsx("div",{className:be("animate-pulse rounded-md bg-muted",e),...t})}const xW=["top","right","bottom","left"],Eo=Math.min,Rr=Math.max,Cp=Math.round,Wh=Math.floor,Ha=e=>({x:e,y:e}),wW={left:"right",right:"left",bottom:"top",top:"bottom"};function eS(e,t,n){return Rr(e,Eo(t,n))}function Ci(e,t){return typeof e=="function"?e(t):e}function Ri(e){return e.split("-")[0]}function _c(e){return e.split("-")[1]}function uA(e){return e==="x"?"y":"x"}function fA(e){return e==="y"?"height":"width"}function Ia(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dA(e){return uA(Ia(e))}function SW(e,t,n){n===void 0&&(n=!1);const r=_c(e),a=dA(e),o=fA(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Rp(l)),[l,Rp(l)]}function _W(e){const t=Rp(e);return[tS(e),t,tS(t)]}function tS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const VC=["left","right"],GC=["right","left"],AW=["top","bottom"],OW=["bottom","top"];function EW(e,t,n){switch(e){case"top":case"bottom":return n?t?GC:VC:t?VC:GC;case"left":case"right":return t?AW:OW;default:return[]}}function TW(e,t,n,r){const a=_c(e);let o=EW(Ri(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(tS)))),o}function Rp(e){const t=Ri(e);return wW[t]+e.slice(t.length)}function jW(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q5(e){return typeof e!="number"?jW(e):{top:e,right:e,bottom:e,left:e}}function Np(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 WC(e,t,n){let{reference:r,floating:a}=e;const o=Ia(t),l=dA(t),c=fA(l),f=Ri(t),d=o==="y",m=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,g=r[c]/2-a[c]/2;let x;switch(f){case"top":x={x:m,y:r.y-a.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:h};break;case"left":x={x:r.x-a.width,y:h};break;default:x={x:r.x,y:r.y}}switch(_c(t)){case"start":x[l]-=g*(n&&d?-1:1);break;case"end":x[l]+=g*(n&&d?-1:1);break}return x}async function CW(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:g=!1,padding:x=0}=Ci(t,e),A=Q5(x),w=c[g?h==="floating"?"reference":"floating":h],O=Np(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:m,strategy:f})),E=h==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),C=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},j=Np(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:T,strategy:f}):E);return{top:(O.top-j.top+A.top)/C.y,bottom:(j.bottom-O.bottom+A.bottom)/C.y,left:(O.left-j.left+A.left)/C.x,right:(j.right-O.right+A.right)/C.x}}const RW=50,NW=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:CW},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:h}=WC(d,r,f),g=r,x=0;const A={};for(let S=0;S<o.length;S++){const w=o[S];if(!w)continue;const{name:O,fn:E}=w,{x:T,y:C,data:j,reset:R}=await E({x:m,y:h,initialPlacement:r,placement:g,strategy:a,middlewareData:A,rects:d,platform:c,elements:{reference:e,floating:t}});m=T??m,h=C??h,A[O]={...A[O],...j},R&&x<RW&&(x++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(d=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):R.rects),{x:m,y:h}=WC(d,g,f)),S=-1)}return{x:m,y:h,placement:g,strategy:a,middlewareData:A}},MW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:m=0}=Ci(e,t)||{};if(d==null)return{};const h=Q5(m),g={x:n,y:r},x=dA(a),A=fA(x),S=await l.getDimensions(d),w=x==="y",O=w?"top":"left",E=w?"bottom":"right",T=w?"clientHeight":"clientWidth",C=o.reference[A]+o.reference[x]-g[x]-o.floating[A],j=g[x]-o.reference[x],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let N=R?R[T]:0;(!N||!await(l.isElement==null?void 0:l.isElement(R)))&&(N=c.floating[T]||o.floating[A]);const D=C/2-j/2,z=N/2-S[A]/2-1,V=Eo(h[O],z),U=Eo(h[E],z),P=V,B=N-S[A]-U,q=N/2-S[A]/2+D,G=eS(P,q,B),$=!f.arrow&&_c(a)!=null&&q!==G&&o.reference[A]/2-(q<P?V:U)-S[A]/2<0,F=$?q<P?q-P:q-B:0;return{[x]:g[x]+F,data:{[x]:G,centerOffset:q-G-F,...$&&{alignmentOffset:F}},reset:$}}}),PW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:S=!0,...w}=Ci(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const O=Ri(a),E=Ia(c),T=Ri(c)===c,C=await(f.isRTL==null?void 0:f.isRTL(d.floating)),j=g||(T||!S?[Rp(c)]:_W(c)),R=A!=="none";!g&&R&&j.push(...TW(c,S,A,C));const N=[c,...j],D=await f.detectOverflow(t,w),z=[];let V=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&z.push(D[O]),h){const q=SW(a,l,C);z.push(D[q[0]],D[q[1]])}if(V=[...V,{placement:a,overflows:z}],!z.every(q=>q<=0)){var U,P;const q=(((U=o.flip)==null?void 0:U.index)||0)+1,G=N[q];if(G&&(!(h==="alignment"?E!==Ia(G):!1)||V.every(Z=>Ia(Z.placement)===E?Z.overflows[0]>0:!0)))return{data:{index:q,overflows:V},reset:{placement:G}};let $=(P=V.filter(F=>F.overflows[0]<=0).sort((F,Z)=>F.overflows[1]-Z.overflows[1])[0])==null?void 0:P.placement;if(!$)switch(x){case"bestFit":{var B;const F=(B=V.filter(Z=>{if(R){const X=Ia(Z.placement);return X===E||X==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(X=>X>0).reduce((X,oe)=>X+oe,0)]).sort((Z,X)=>Z[1]-X[1])[0])==null?void 0:B[0];F&&($=F);break}case"initialPlacement":$=c;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function YC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZC(e){return xW.some(t=>e[t]>=0)}const DW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=Ci(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=YC(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:ZC(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=YC(l,n.floating);return{data:{escapedOffsets:c,escaped:ZC(c)}}}default:return{}}}}},J5=new Set(["left","top"]);async function kW(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ri(n),c=_c(n),f=Ia(n)==="y",d=J5.has(l)?-1:1,m=o&&f?-1:1,h=Ci(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:A}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof A=="number"&&(x=c==="end"?A*-1:A),f?{x:x*m,y:g*d}:{x:g*d,y:x*m}}const $W=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:c}=t,f=await kW(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+f.x,y:o+f.y,data:{...f,placement:l}}}}},zW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:O=>{let{x:E,y:T}=O;return{x:E,y:T}}},...d}=Ci(e,t),m={x:n,y:r},h=await o.detectOverflow(t,d),g=Ia(Ri(a)),x=uA(g);let A=m[x],S=m[g];if(l){const O=x==="y"?"top":"left",E=x==="y"?"bottom":"right",T=A+h[O],C=A-h[E];A=eS(T,A,C)}if(c){const O=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=S+h[O],C=S-h[E];S=eS(T,S,C)}const w=f.fn({...t,[x]:A,[g]:S});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[x]:l,[g]:c}}}}}},LW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=Ci(e,t),m={x:n,y:r},h=Ia(a),g=uA(h);let x=m[g],A=m[h];const S=Ci(c,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const T=g==="y"?"height":"width",C=o.reference[g]-o.floating[T]+w.mainAxis,j=o.reference[g]+o.reference[T]-w.mainAxis;x<C?x=C:x>j&&(x=j)}if(d){var O,E;const T=g==="y"?"width":"height",C=J5.has(Ri(a)),j=o.reference[h]-o.floating[T]+(C&&((O=l.offset)==null?void 0:O[h])||0)+(C?0:w.crossAxis),R=o.reference[h]+o.reference[T]+(C?0:((E=l.offset)==null?void 0:E[h])||0)-(C?w.crossAxis:0);A<j?A=j:A>R&&(A=R)}return{[g]:x,[h]:A}}}},IW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...d}=Ci(e,t),m=await l.detectOverflow(t,d),h=Ri(a),g=_c(a),x=Ia(a)==="y",{width:A,height:S}=o.floating;let w,O;h==="top"||h==="bottom"?(w=h,O=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(O=h,w=g==="end"?"top":"bottom");const E=S-m.top-m.bottom,T=A-m.left-m.right,C=Eo(S-m[w],E),j=Eo(A-m[O],T),R=!t.middlewareData.shift;let N=C,D=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),R&&!g){const V=Rr(m.left,0),U=Rr(m.right,0),P=Rr(m.top,0),B=Rr(m.bottom,0);x?D=A-2*(V!==0||U!==0?V+U:Rr(m.left,m.right)):N=S-2*(P!==0||B!==0?P+B:Rr(m.top,m.bottom))}await f({...t,availableWidth:D,availableHeight:N});const z=await l.getDimensions(c.floating);return A!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function tv(){return typeof window<"u"}function Ac(e){return eL(e)?(e.nodeName||"").toLowerCase():"#document"}function Mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xa(e){var t;return(t=(eL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function eL(e){return tv()?e instanceof Node||e instanceof Mr(e).Node:!1}function Aa(e){return tv()?e instanceof Element||e instanceof Mr(e).Element:!1}function ki(e){return tv()?e instanceof HTMLElement||e instanceof Mr(e).HTMLElement:!1}function KC(e){return!tv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mr(e).ShadowRoot}function rd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Oa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function BW(e){return/^(table|td|th)$/.test(Ac(e))}function nv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const UW=/transform|translate|scale|rotate|perspective|filter/,qW=/paint|layout|strict|content/,rs=e=>!!e&&e!=="none";let Ib;function hA(e){const t=Aa(e)?Oa(e):e;return rs(t.transform)||rs(t.translate)||rs(t.scale)||rs(t.rotate)||rs(t.perspective)||!pA()&&(rs(t.backdropFilter)||rs(t.filter))||UW.test(t.willChange||"")||qW.test(t.contain||"")}function HW(e){let t=To(e);for(;ki(t)&&!Gl(t);){if(hA(t))return t;if(nv(t))return null;t=To(t)}return null}function pA(){return Ib==null&&(Ib=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ib}function Gl(e){return/^(html|body|#document)$/.test(Ac(e))}function Oa(e){return Mr(e).getComputedStyle(e)}function rv(e){return Aa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function To(e){if(Ac(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KC(e)&&e.host||Xa(e);return KC(t)?t.host:t}function tL(e){const t=To(e);return Gl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ki(t)&&rd(t)?t:tL(t)}function rf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=tL(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Mr(a);if(o){const c=nS(l);return t.concat(l,l.visualViewport||[],rd(a)?a:[],c&&n?rf(c):[])}else return t.concat(a,rf(a,[],n))}function nS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nL(e){const t=Oa(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ki(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,c=Cp(n)!==o||Cp(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function mA(e){return Aa(e)?e:e.contextElement}function zl(e){const t=mA(e);if(!ki(t))return Ha(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=nL(t);let l=(o?Cp(n.width):n.width)/r,c=(o?Cp(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const FW=Ha(0);function rL(e){const t=Mr(e);return!pA()||!t.visualViewport?FW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mr(e)?!1:t}function ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=mA(e);let l=Ha(1);t&&(r?Aa(r)&&(l=zl(r)):l=zl(e));const c=VW(o,n,r)?rL(o):Ha(0);let f=(a.left+c.x)/l.x,d=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(o){const g=Mr(o),x=r&&Aa(r)?Mr(r):r;let A=g,S=nS(A);for(;S&&r&&x!==A;){const w=zl(S),O=S.getBoundingClientRect(),E=Oa(S),T=O.left+(S.clientLeft+parseFloat(E.paddingLeft))*w.x,C=O.top+(S.clientTop+parseFloat(E.paddingTop))*w.y;f*=w.x,d*=w.y,m*=w.x,h*=w.y,f+=T,d+=C,A=Mr(S),S=nS(A)}}return Np({width:m,height:h,x:f,y:d})}function av(e,t){const n=rv(e).scrollLeft;return t?t.left+n:ys(Xa(e)).left+n}function aL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-av(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function GW(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Xa(r),c=t?nv(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},d=Ha(1);const m=Ha(0),h=ki(r);if((h||!h&&!o)&&((Ac(r)!=="body"||rd(l))&&(f=rv(r)),h)){const x=ys(r);d=zl(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const g=l&&!h&&!o?aL(l,f):Ha(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-f.scrollTop*d.y+m.y+g.y}}function WW(e){return Array.from(e.getClientRects())}function YW(e){const t=Xa(e),n=rv(e),r=e.ownerDocument.body,a=Rr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Rr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+av(e);const c=-n.scrollTop;return Oa(r).direction==="rtl"&&(l+=Rr(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:c}}const XC=25;function ZW(e,t){const n=Mr(e),r=Xa(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(a){o=a.width,l=a.height;const m=pA();(!m||m&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}const d=av(r);if(d<=0){const m=r.ownerDocument,h=m.body,g=getComputedStyle(h),x=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,A=Math.abs(r.clientWidth-h.clientWidth-x);A<=XC&&(o-=A)}else d<=XC&&(o+=d);return{width:o,height:l,x:c,y:f}}function KW(e,t){const n=ys(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=ki(e)?zl(e):Ha(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=a*o.x,d=r*o.y;return{width:l,height:c,x:f,y:d}}function QC(e,t,n){let r;if(t==="viewport")r=ZW(e,n);else if(t==="document")r=YW(Xa(e));else if(Aa(t))r=KW(t,n);else{const a=rL(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Np(r)}function iL(e,t){const n=To(e);return n===t||!Aa(n)||Gl(n)?!1:Oa(n).position==="fixed"||iL(n,t)}function XW(e,t){const n=t.get(e);if(n)return n;let r=rf(e,[],!1).filter(c=>Aa(c)&&Ac(c)!=="body"),a=null;const o=Oa(e).position==="fixed";let l=o?To(e):e;for(;Aa(l)&&!Gl(l);){const c=Oa(l),f=hA(l);!f&&c.position==="fixed"&&(a=null),(o?!f&&!a:!f&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||rd(l)&&!f&&iL(e,l))?r=r.filter(m=>m!==l):a=c,l=To(l)}return t.set(e,r),r}function QW(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?nv(t)?[]:XW(t,this._c):[].concat(n),r],c=QC(t,l[0],a);let f=c.top,d=c.right,m=c.bottom,h=c.left;for(let g=1;g<l.length;g++){const x=QC(t,l[g],a);f=Rr(x.top,f),d=Eo(x.right,d),m=Eo(x.bottom,m),h=Rr(x.left,h)}return{width:d-h,height:m-f,x:h,y:f}}function JW(e){const{width:t,height:n}=nL(e);return{width:t,height:n}}function eY(e,t,n){const r=ki(t),a=Xa(t),o=n==="fixed",l=ys(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=Ha(0);function d(){f.x=av(a)}if(r||!r&&!o)if((Ac(t)!=="body"||rd(a))&&(c=rv(t)),r){const x=ys(t,!0,o,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else a&&d();o&&!r&&a&&d();const m=a&&!r&&!o?aL(a,c):Ha(0),h=l.left+c.scrollLeft-f.x-m.x,g=l.top+c.scrollTop-f.y-m.y;return{x:h,y:g,width:l.width,height:l.height}}function Bb(e){return Oa(e).position==="static"}function JC(e,t){if(!ki(e)||Oa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xa(e)===n&&(n=n.ownerDocument.body),n}function oL(e,t){const n=Mr(e);if(nv(e))return n;if(!ki(e)){let a=To(e);for(;a&&!Gl(a);){if(Aa(a)&&!Bb(a))return a;a=To(a)}return n}let r=JC(e,t);for(;r&&BW(r)&&Bb(r);)r=JC(r,t);return r&&Gl(r)&&Bb(r)&&!hA(r)?n:r||HW(e)||n}const tY=async function(e){const t=this.getOffsetParent||oL,n=this.getDimensions,r=await n(e.floating);return{reference:eY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nY(e){return Oa(e).direction==="rtl"}const rY={convertOffsetParentRelativeRectToViewportRelativeRect:GW,getDocumentElement:Xa,getClippingRect:QW,getOffsetParent:oL,getElementRects:tY,getClientRects:WW,getDimensions:JW,getScale:zl,isElement:Aa,isRTL:nY};function sL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aY(e,t){let n=null,r;const a=Xa(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:m,top:h,width:g,height:x}=d;if(c||t(),!g||!x)return;const A=Wh(h),S=Wh(a.clientWidth-(m+g)),w=Wh(a.clientHeight-(h+x)),O=Wh(m),T={rootMargin:-A+"px "+-S+"px "+-w+"px "+-O+"px",threshold:Rr(0,Eo(1,f))||1};let C=!0;function j(R){const N=R[0].intersectionRatio;if(N!==f){if(!C)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!sL(d,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(j,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(j,T)}n.observe(e)}return l(!0),o}function iY(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=mA(e),m=a||o?[...d?rf(d):[],...t?rf(t):[]]:[];m.forEach(O=>{a&&O.addEventListener("scroll",n,{passive:!0}),o&&O.addEventListener("resize",n)});const h=d&&c?aY(d,n):null;let g=-1,x=null;l&&(x=new ResizeObserver(O=>{let[E]=O;E&&E.target===d&&x&&t&&(x.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=x)==null||T.observe(t)})),n()}),d&&!f&&x.observe(d),t&&x.observe(t));let A,S=f?ys(e):null;f&&w();function w(){const O=ys(e);S&&!sL(S,O)&&n(),S=O,A=requestAnimationFrame(w)}return n(),()=>{var O;m.forEach(E=>{a&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),h==null||h(),(O=x)==null||O.disconnect(),x=null,f&&cancelAnimationFrame(A)}}const oY=$W,sY=zW,lY=PW,cY=IW,uY=DW,eR=MW,fY=LW,dY=(e,t,n)=>{const r=new Map,a={platform:rY,...n},o={...a.platform,_c:r};return NW(e,t,{...a,platform:o})};var hY=typeof document<"u",pY=function(){},mp=hY?y.useLayoutEffect:pY;function Mp(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(!Mp(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 o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Mp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function lL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tR(e,t){const n=lL(e);return Math.round(t*n)/n}function Ub(e){const t=y.useRef(e);return mp(()=>{t.current=e}),t}function mY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[m,h]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=y.useState(r);Mp(g,r)||x(r);const[A,S]=y.useState(null),[w,O]=y.useState(null),E=y.useCallback(Z=>{Z!==R.current&&(R.current=Z,S(Z))},[]),T=y.useCallback(Z=>{Z!==N.current&&(N.current=Z,O(Z))},[]),C=o||A,j=l||w,R=y.useRef(null),N=y.useRef(null),D=y.useRef(m),z=f!=null,V=Ub(f),U=Ub(a),P=Ub(d),B=y.useCallback(()=>{if(!R.current||!N.current)return;const Z={placement:t,strategy:n,middleware:g};U.current&&(Z.platform=U.current),dY(R.current,N.current,Z).then(X=>{const oe={...X,isPositioned:P.current!==!1};q.current&&!Mp(D.current,oe)&&(D.current=oe,Zf.flushSync(()=>{h(oe)}))})},[g,t,n,U,P]);mp(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const q=y.useRef(!1);mp(()=>(q.current=!0,()=>{q.current=!1}),[]),mp(()=>{if(C&&(R.current=C),j&&(N.current=j),C&&j){if(V.current)return V.current(C,j,B);B()}},[C,j,B,V,z]);const G=y.useMemo(()=>({reference:R,floating:N,setReference:E,setFloating:T}),[E,T]),$=y.useMemo(()=>({reference:C,floating:j}),[C,j]),F=y.useMemo(()=>{const Z={position:n,left:0,top:0};if(!$.floating)return Z;const X=tR($.floating,m.x),oe=tR($.floating,m.y);return c?{...Z,transform:"translate("+X+"px, "+oe+"px)",...lL($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:oe}},[n,c,$.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:B,refs:G,elements:$,floatingStyles:F}),[m,B,G,$,F])}const vY=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?eR({element:r.current,padding:a}).fn(n):{}:r?eR({element:r,padding:a}).fn(n):{}}}},gY=(e,t)=>{const n=oY(e);return{name:n.name,fn:n.fn,options:[e,t]}},yY=(e,t)=>{const n=sY(e);return{name:n.name,fn:n.fn,options:[e,t]}},bY=(e,t)=>({fn:fY(e).fn,options:[e,t]}),xY=(e,t)=>{const n=lY(e);return{name:n.name,fn:n.fn,options:[e,t]}},wY=(e,t)=>{const n=cY(e);return{name:n.name,fn:n.fn,options:[e,t]}},SY=(e,t)=>{const n=uY(e);return{name:n.name,fn:n.fn,options:[e,t]}},_Y=(e,t)=>{const n=vY(e);return{name:n.name,fn:n.fn,options:[e,t]}};var AY="Arrow",cL=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return v.jsx(Xe.svg,{...o,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"})})});cL.displayName=AY;var OY=cL;function uL(e){const[t,n]=y.useState(void 0);return Fn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vA="Popper",[fL,Oc]=ia(vA),[EY,dL]=fL(vA),hL=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return v.jsx(EY,{scope:t,anchor:r,onAnchorChange:a,children:n})};hL.displayName=vA;var pL="PopperAnchor",mL=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=dL(pL,n),l=y.useRef(null),c=lt(t,l),f=y.useRef(null);return y.useEffect(()=>{const d=f.current;f.current=(r==null?void 0:r.current)||l.current,d!==f.current&&o.onAnchorChange(f.current)}),r?null:v.jsx(Xe.div,{...a,ref:c})});mL.displayName=pL;var gA="PopperContent",[TY,jY]=fL(gA),vL=y.forwardRef((e,t)=>{var ue,xe,se,_e,Se,ne;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:A,...S}=e,w=dL(gA,n),[O,E]=y.useState(null),T=lt(t,Ue=>E(Ue)),[C,j]=y.useState(null),R=uL(C),N=(R==null?void 0:R.width)??0,D=(R==null?void 0:R.height)??0,z=r+(o!=="center"?"-"+o:""),V=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(d)?d:[d],P=U.length>0,B={padding:V,boundary:U.filter(RY),altBoundary:P},{refs:q,floatingStyles:G,placement:$,isPositioned:F,middlewareData:Z}=mY({strategy:"fixed",placement:z,whileElementsMounted:(...Ue)=>iY(...Ue,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[gY({mainAxis:a+D,alignmentAxis:l}),f&&yY({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?bY():void 0,...B}),f&&xY({...B}),wY({...B,apply:({elements:Ue,rects:$e,availableWidth:rt,availableHeight:et})=>{const{width:tt,height:qt}=$e.reference,ct=Ue.floating.style;ct.setProperty("--radix-popper-available-width",`${rt}px`),ct.setProperty("--radix-popper-available-height",`${et}px`),ct.setProperty("--radix-popper-anchor-width",`${tt}px`),ct.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),C&&_Y({element:C,padding:c}),NY({arrowWidth:N,arrowHeight:D}),g&&SY({strategy:"referenceHidden",...B})]}),[X,oe]=bL($),I=Un(A);Fn(()=>{F&&(I==null||I())},[F,I]);const Y=(ue=Z.arrow)==null?void 0:ue.x,Q=(xe=Z.arrow)==null?void 0:xe.y,ce=((se=Z.arrow)==null?void 0:se.centerOffset)!==0,[ve,fe]=y.useState();return Fn(()=>{O&&fe(window.getComputedStyle(O).zIndex)},[O]),v.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:F?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(_e=Z.transformOrigin)==null?void 0:_e.x,(Se=Z.transformOrigin)==null?void 0:Se.y].join(" "),...((ne=Z.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(TY,{scope:n,placedSide:X,onArrowChange:j,arrowX:Y,arrowY:Q,shouldHideArrow:ce,children:v.jsx(Xe.div,{"data-side":X,"data-align":oe,...S,ref:T,style:{...S.style,animation:F?void 0:"none"}})})})});vL.displayName=gA;var gL="PopperArrow",CY={top:"bottom",right:"left",bottom:"top",left:"right"},yL=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=jY(gL,r),l=CY[o.placedSide];return v.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:v.jsx(OY,{...a,ref:n,style:{...a.style,display:"block"}})})});yL.displayName=gL;function RY(e){return e!==null}var NY=e=>({name:"transformOrigin",options:e,fn(t){var w,O,E;const{placement:n,rects:r,middlewareData:a}=t,l=((w=a.arrow)==null?void 0:w.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,m]=bL(n),h={start:"0%",center:"50%",end:"100%"}[m],g=(((O=a.arrow)==null?void 0:O.x)??0)+c/2,x=(((E=a.arrow)==null?void 0:E.y)??0)+f/2;let A="",S="";return d==="bottom"?(A=l?h:`${g}px`,S=`${-f}px`):d==="top"?(A=l?h:`${g}px`,S=`${r.floating.height+f}px`):d==="right"?(A=`${-f}px`,S=l?h:`${x}px`):d==="left"&&(A=`${r.floating.width+f}px`,S=l?h:`${x}px`),{data:{x:A,y:S}}}});function bL(e){const[t,n="center"]=e.split("-");return[t,n]}var yA=hL,bA=mL,xA=vL,wA=yL,xL=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"}),MY="VisuallyHidden",wL=y.forwardRef((e,t)=>v.jsx(Xe.span,{...e,ref:t,style:{...xL,...e.style}}));wL.displayName=MY;var PY=wL,[iv]=ia("Tooltip",[Oc]),ov=Oc(),SL="TooltipProvider",DY=700,rS="tooltip.open",[kY,SA]=iv(SL),_L=e=>{const{__scopeTooltip:t,delayDuration:n=DY,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,l=y.useRef(!0),c=y.useRef(!1),f=y.useRef(0);return y.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),v.jsx(kY,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(d=>{c.current=d},[]),disableHoverableContent:a,children:o})};_L.displayName=SL;var af="Tooltip",[$Y,ad]=iv(af),AL=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:c}=e,f=SA(af,e.__scopeTooltip),d=ov(t),[m,h]=y.useState(null),g=wa(),x=y.useRef(0),A=l??f.disableHoverableContent,S=c??f.delayDuration,w=y.useRef(!1),[O,E]=Oo({prop:r,defaultProp:a??!1,onChange:N=>{N?(f.onOpen(),document.dispatchEvent(new CustomEvent(rS))):f.onClose(),o==null||o(N)},caller:af}),T=y.useMemo(()=>O?w.current?"delayed-open":"instant-open":"closed",[O]),C=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,w.current=!1,E(!0)},[E]),j=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,E(!1)},[E]),R=y.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{w.current=!0,E(!0),x.current=0},S)},[S,E]);return y.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),v.jsx(yA,{...d,children:v.jsx($Y,{scope:t,contentId:g,open:O,stateAttribute:T,trigger:m,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{f.isOpenDelayedRef.current?R():C()},[f.isOpenDelayedRef,R,C]),onTriggerLeave:y.useCallback(()=>{A?j():(window.clearTimeout(x.current),x.current=0)},[j,A]),onOpen:C,onClose:j,disableHoverableContent:A,children:n})})};AL.displayName=af;var aS="TooltipTrigger",OL=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=ad(aS,n),o=SA(aS,n),l=ov(n),c=y.useRef(null),f=lt(t,c,a.onTriggerChange),d=y.useRef(!1),m=y.useRef(!1),h=y.useCallback(()=>d.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),v.jsx(bA,{asChild:!0,...l,children:v.jsx(Xe.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:f,onPointerMove:ze(e.onPointerMove,g=>{g.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:ze(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:ze(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ze(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:ze(e.onBlur,a.onClose),onClick:ze(e.onClick,a.onClose)})})});OL.displayName=aS;var _A="TooltipPortal",[zY,LY]=iv(_A,{forceMount:void 0}),EL=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,o=ad(_A,t);return v.jsx(zY,{scope:t,forceMount:n,children:v.jsx(ir,{present:n||o.open,children:v.jsx(Qf,{asChild:!0,container:a,children:r})})})};EL.displayName=_A;var Wl="TooltipContent",TL=y.forwardRef((e,t)=>{const n=LY(Wl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,l=ad(Wl,e.__scopeTooltip);return v.jsx(ir,{present:r||l.open,children:l.disableHoverableContent?v.jsx(jL,{side:a,...o,ref:t}):v.jsx(IY,{side:a,...o,ref:t})})}),IY=y.forwardRef((e,t)=>{const n=ad(Wl,e.__scopeTooltip),r=SA(Wl,e.__scopeTooltip),a=y.useRef(null),o=lt(t,a),[l,c]=y.useState(null),{trigger:f,onClose:d}=n,m=a.current,{onPointerInTransitChange:h}=r,g=y.useCallback(()=>{c(null),h(!1)},[h]),x=y.useCallback((A,S)=>{const w=A.currentTarget,O={x:A.clientX,y:A.clientY},E=FY(O,w.getBoundingClientRect()),T=VY(O,E),C=GY(S.getBoundingClientRect()),j=YY([...T,...C]);c(j),h(!0)},[h]);return y.useEffect(()=>()=>g(),[g]),y.useEffect(()=>{if(f&&m){const A=w=>x(w,m),S=w=>x(w,f);return f.addEventListener("pointerleave",A),m.addEventListener("pointerleave",S),()=>{f.removeEventListener("pointerleave",A),m.removeEventListener("pointerleave",S)}}},[f,m,x,g]),y.useEffect(()=>{if(l){const A=S=>{const w=S.target,O={x:S.clientX,y:S.clientY},E=(f==null?void 0:f.contains(w))||(m==null?void 0:m.contains(w)),T=!WY(O,l);E?g():T&&(g(),d())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[f,m,l,d,g]),v.jsx(jL,{...e,ref:o})}),[BY,UY]=iv(af,{isInside:!1}),qY=v5("TooltipContent"),jL=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...c}=e,f=ad(Wl,n),d=ov(n),{onClose:m}=f;return y.useEffect(()=>(document.addEventListener(rS,m),()=>document.removeEventListener(rS,m)),[m]),y.useEffect(()=>{if(f.trigger){const h=g=>{const x=g.target;x!=null&&x.contains(f.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[f.trigger,m]),v.jsx(Xf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:v.jsxs(xA,{"data-state":f.stateAttribute,...d,...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(qY,{children:r}),v.jsx(BY,{scope:n,isInside:!0,children:v.jsx(PY,{id:f.contentId,role:"tooltip",children:a||r})})]})})});TL.displayName=Wl;var CL="TooltipArrow",HY=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=ov(n);return UY(CL,n).isInside?null:v.jsx(wA,{...a,...r,ref:t})});HY.displayName=CL;function FY(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function VY(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 GY(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 WY(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],d=c.x,m=c.y,h=f.x,g=f.y;m>r!=g>r&&n<(h-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function YY(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),ZY(t)}function ZY(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 o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.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 o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.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 KY=_L,XY=AL,QY=OL,JY=EL,RL=TL;const AA=KY,Fa=XY,Va=QY,Sa=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(JY,{children:v.jsx(RL,{ref:r,sideOffset:t,className:be("z-[50] overflow-hidden rounded bg-black/75 px-[7px] py-0.5 text-[11px] text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));Sa.displayName=RL.displayName;const eZ="sidebar_state",tZ=3600*24*7,nZ="16rem",rZ="18rem",aZ="3rem",iZ="b",NL=y.createContext(null);function sv(){const e=y.useContext(NL);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const ML=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...l},c)=>{const f=lV(),[d,m]=y.useState(!1),[h,g]=y.useState(e),x=t??h,A=y.useCallback(E=>{const T=typeof E=="function"?E(x):E;n?n(T):g(T),document.cookie=`${eZ}=${T}; path=/; max-age=${tZ}`},[n,x]),S=y.useCallback(()=>f?m(E=>!E):A(E=>!E),[f,A,m]);y.useEffect(()=>{const E=T=>{T.key===iZ&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),S())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[S]);const w=x?"expanded":"collapsed",O=y.useMemo(()=>({state:w,open:x,setOpen:A,isMobile:f,openMobile:d,setOpenMobile:m,toggleSidebar:S}),[w,x,A,f,d,m,S]);return v.jsx(NL.Provider,{value:O,children:v.jsx(AA,{delayDuration:0,children:v.jsx("div",{style:{"--sidebar-width":nZ,"--sidebar-width-icon":aZ,...a},className:be("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...l,children:o})})})});ML.displayName="SidebarProvider";const PL=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},l)=>{const{isMobile:c,state:f,openMobile:d,setOpenMobile:m}=sv();return n==="none"?v.jsx("div",{className:be("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:l,...o,children:a}):c?v.jsx(gW,{open:d,onOpenChange:m,...o,children:v.jsxs(Y5,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":rZ},side:e,children:[v.jsxs(Z5,{className:"sr-only",children:[v.jsx(K5,{children:"Sidebar"}),v.jsx(X5,{children:"Displays the mobile sidebar."})]}),v.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):v.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[v.jsx("div",{className:be("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),v.jsx("div",{className:be("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:v.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});PL.displayName="Sidebar";const DL=y.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a}=sv();return v.jsxs(ut,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:be("h-7 w-7",e),onClick:o=>{t==null||t(o),a()},...n,children:[v.jsx(YF,{}),v.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});DL.displayName="SidebarTrigger";const oZ=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=sv();return v.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:be("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});oZ.displayName="SidebarRail";const kL=y.forwardRef(({className:e,...t},n)=>v.jsx("main",{ref:n,className:be("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));kL.displayName="SidebarInset";const sZ=y.forwardRef(({className:e,...t},n)=>v.jsx(hn,{ref:n,"data-sidebar":"input",className:be("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));sZ.displayName="SidebarInput";const $L=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"header",className:be("flex flex-col gap-2 p-2",e),...t}));$L.displayName="SidebarHeader";const zL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"footer",className:be("flex flex-col gap-2 p-2",e),...t}));zL.displayName="SidebarFooter";const lZ=y.forwardRef(({className:e,...t},n)=>v.jsx(Ya,{ref:n,"data-sidebar":"separator",className:be("mx-2 w-auto bg-sidebar-border",e),...t}));lZ.displayName="SidebarSeparator";const LL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"content",className:be("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));LL.displayName="SidebarContent";const vp=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group",className:be("relative flex w-full min-w-0 flex-col p-2",e),...t}));vp.displayName="SidebarGroup";const iS=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ns:"div";return v.jsx(a,{ref:r,"data-sidebar":"group-label",className:be("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});iS.displayName="SidebarGroupLabel";const cZ=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ns:"button";return v.jsx(a,{ref:r,"data-sidebar":"group-action",className:be("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});cZ.displayName="SidebarGroupAction";const gp=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group-content",className:be("w-full text-sm",e),...t}));gp.displayName="SidebarGroupContent";const yp=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu",className:be("flex w-full min-w-0 flex-col gap-1",e),...t}));yp.displayName="SidebarMenu";const bp=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,"data-sidebar":"menu-item",className:be("group/menu-item relative",e),...t}));bp.displayName="SidebarMenuItem";const uZ=wc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),xp=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...l},c)=>{const f=e?Ns:"button",{isMobile:d,state:m}=sv(),h=v.jsx(f,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:be(uZ({variant:n,size:r}),o),...l});return a?(typeof a=="string"&&(a={children:a}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:h}),v.jsx(Sa,{side:"right",align:"center",hidden:m!=="collapsed"||d,...a})]})):h});xp.displayName="SidebarMenuButton";const fZ=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?Ns:"button";return v.jsx(o,{ref:a,"data-sidebar":"menu-action",className:be("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});fZ.displayName="SidebarMenuAction";const dZ=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:be("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));dZ.displayName="SidebarMenuBadge";const hZ=y.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const a=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return v.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:be("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&v.jsx(FC,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),v.jsx(FC,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});hZ.displayName="SidebarMenuSkeleton";const pZ=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:be("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));pZ.displayName="SidebarMenuSub";const mZ=y.forwardRef(({...e},t)=>v.jsx("li",{ref:t,...e}));mZ.displayName="SidebarMenuSubItem";const vZ=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const l=e?Ns:"a";return v.jsx(l,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:be("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...a})});vZ.displayName="SidebarMenuSubButton";function OA(e){const t=e+"CollectionProvider",[n,r]=ia(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:w,children:O}=S,E=L.useRef(null),T=L.useRef(new Map).current;return v.jsx(a,{scope:w,itemMap:T,collectionRef:E,children:O})};l.displayName=t;const c=e+"CollectionSlot",f=Vl(c),d=L.forwardRef((S,w)=>{const{scope:O,children:E}=S,T=o(c,O),C=lt(w,T.collectionRef);return v.jsx(f,{ref:C,children:E})});d.displayName=c;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=Vl(m),x=L.forwardRef((S,w)=>{const{scope:O,children:E,...T}=S,C=L.useRef(null),j=lt(w,C),R=o(m,O);return L.useEffect(()=>(R.itemMap.set(C,{ref:C,...T}),()=>void R.itemMap.delete(C))),v.jsx(g,{[h]:"",ref:j,children:E})});x.displayName=m;function A(S){const w=o(e+"CollectionConsumer",S);return L.useCallback(()=>{const E=w.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((R,N)=>T.indexOf(R.ref.current)-T.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},A,r]}var gZ=y.createContext(void 0);function id(e){const t=y.useContext(gZ);return e||t||"ltr"}var qb="rovingFocusGroup.onEntryFocus",yZ={bubbles:!1,cancelable:!0},od="RovingFocusGroup",[oS,IL,bZ]=OA(od),[xZ,lv]=ia(od,[bZ]),[wZ,SZ]=xZ(od),BL=y.forwardRef((e,t)=>v.jsx(oS.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(oS.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(_Z,{...e,ref:t})})}));BL.displayName=od;var _Z=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...h}=e,g=y.useRef(null),x=lt(t,g),A=id(o),[S,w]=Oo({prop:l,defaultProp:c??null,onChange:f,caller:od}),[O,E]=y.useState(!1),T=Un(d),C=IL(n),j=y.useRef(!1),[R,N]=y.useState(0);return y.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(qb,T),()=>D.removeEventListener(qb,T)},[T]),v.jsx(wZ,{scope:n,orientation:r,dir:A,loop:a,currentTabStopId:S,onItemFocus:y.useCallback(D=>w(D),[w]),onItemShiftTab:y.useCallback(()=>E(!0),[]),onFocusableItemAdd:y.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:y.useCallback(()=>N(D=>D-1),[]),children:v.jsx(Xe.div,{tabIndex:O||R===0?-1:0,"data-orientation":r,...h,ref:x,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,()=>{j.current=!0}),onFocus:ze(e.onFocus,D=>{const z=!j.current;if(D.target===D.currentTarget&&z&&!O){const V=new CustomEvent(qb,yZ);if(D.currentTarget.dispatchEvent(V),!V.defaultPrevented){const U=C().filter($=>$.focusable),P=U.find($=>$.active),B=U.find($=>$.id===S),G=[P,B,...U].filter(Boolean).map($=>$.ref.current);HL(G,m)}}j.current=!1}),onBlur:ze(e.onBlur,()=>E(!1))})})}),UL="RovingFocusGroupItem",qL=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:l,...c}=e,f=wa(),d=o||f,m=SZ(UL,n),h=m.currentTabStopId===d,g=IL(n),{onFocusableItemAdd:x,onFocusableItemRemove:A,currentTabStopId:S}=m;return y.useEffect(()=>{if(r)return x(),()=>A()},[r,x,A]),v.jsx(oS.ItemSlot,{scope:n,id:d,focusable:r,active:a,children:v.jsx(Xe.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:ze(e.onMouseDown,w=>{r?m.onItemFocus(d):w.preventDefault()}),onFocus:ze(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:ze(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const O=EZ(w,m.orientation,m.dir);if(O!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let T=g().filter(C=>C.focusable).map(C=>C.ref.current);if(O==="last")T.reverse();else if(O==="prev"||O==="next"){O==="prev"&&T.reverse();const C=T.indexOf(w.currentTarget);T=m.loop?TZ(T,C+1):T.slice(C+1)}setTimeout(()=>HL(T))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:S!=null}):l})})});qL.displayName=UL;var AZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function OZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function EZ(e,t,n){const r=OZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return AZ[r]}function HL(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var FL=BL,VL=qL,sS=["Enter"," "],jZ=["ArrowDown","PageUp","Home"],GL=["ArrowUp","PageDown","End"],CZ=[...jZ,...GL],RZ={ltr:[...sS,"ArrowRight"],rtl:[...sS,"ArrowLeft"]},NZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sd="Menu",[of,MZ,PZ]=OA(sd),[Ms,WL]=ia(sd,[PZ,Oc,lv]),cv=Oc(),YL=lv(),[DZ,Ps]=Ms(sd),[kZ,ld]=Ms(sd),ZL=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:l=!0}=e,c=cv(t),[f,d]=y.useState(null),m=y.useRef(!1),h=Un(o),g=id(a);return y.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),v.jsx(yA,{...c,children:v.jsx(DZ,{scope:t,open:n,onOpenChange:h,content:f,onContentChange:d,children:v.jsx(kZ,{scope:t,onClose:y.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};ZL.displayName=sd;var $Z="MenuAnchor",EA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=cv(n);return v.jsx(bA,{...a,...r,ref:t})});EA.displayName=$Z;var TA="MenuPortal",[zZ,KL]=Ms(TA,{forceMount:void 0}),XL=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=Ps(TA,t);return v.jsx(zZ,{scope:t,forceMount:n,children:v.jsx(ir,{present:n||o.open,children:v.jsx(Qf,{asChild:!0,container:a,children:r})})})};XL.displayName=TA;var ta="MenuContent",[LZ,jA]=Ms(ta),QL=y.forwardRef((e,t)=>{const n=KL(ta,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=Ps(ta,e.__scopeMenu),l=ld(ta,e.__scopeMenu);return v.jsx(of.Provider,{scope:e.__scopeMenu,children:v.jsx(ir,{present:r||o.open,children:v.jsx(of.Slot,{scope:e.__scopeMenu,children:l.modal?v.jsx(IZ,{...a,ref:t}):v.jsx(BZ,{...a,ref:t})})})})}),IZ=y.forwardRef((e,t)=>{const n=Ps(ta,e.__scopeMenu),r=y.useRef(null),a=lt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return aA(o)},[]),v.jsx(CA,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ze(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),BZ=y.forwardRef((e,t)=>{const n=Ps(ta,e.__scopeMenu);return v.jsx(CA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),UZ=Vl("MenuContent.ScrollLock"),CA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:x,disableOutsideScroll:A,...S}=e,w=Ps(ta,n),O=ld(ta,n),E=cv(n),T=YL(n),C=MZ(n),[j,R]=y.useState(null),N=y.useRef(null),D=lt(t,N,w.onContentChange),z=y.useRef(0),V=y.useRef(""),U=y.useRef(0),P=y.useRef(null),B=y.useRef("right"),q=y.useRef(0),G=A?Qm:y.Fragment,$=A?{as:UZ,allowPinchZoom:!0}:void 0,F=X=>{var ue,xe;const oe=V.current+X,I=C().filter(se=>!se.disabled),Y=document.activeElement,Q=(ue=I.find(se=>se.ref.current===Y))==null?void 0:ue.textValue,ce=I.map(se=>se.textValue),ve=JZ(ce,oe,Q),fe=(xe=I.find(se=>se.textValue===ve))==null?void 0:xe.ref.current;(function se(_e){V.current=_e,window.clearTimeout(z.current),_e!==""&&(z.current=window.setTimeout(()=>se(""),1e3))})(oe),fe&&setTimeout(()=>fe.focus())};y.useEffect(()=>()=>window.clearTimeout(z.current),[]),rA();const Z=y.useCallback(X=>{var I,Y;return B.current===((I=P.current)==null?void 0:I.side)&&tK(X,(Y=P.current)==null?void 0:Y.area)},[]);return v.jsx(LZ,{scope:n,searchRef:V,onItemEnter:y.useCallback(X=>{Z(X)&&X.preventDefault()},[Z]),onItemLeave:y.useCallback(X=>{var oe;Z(X)||((oe=N.current)==null||oe.focus(),R(null))},[Z]),onTriggerLeave:y.useCallback(X=>{Z(X)&&X.preventDefault()},[Z]),pointerGraceTimerRef:U,onPointerGraceIntentChange:y.useCallback(X=>{P.current=X},[]),children:v.jsx(G,{...$,children:v.jsx(Km,{asChild:!0,trapped:a,onMountAutoFocus:ze(o,X=>{var oe;X.preventDefault(),(oe=N.current)==null||oe.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:v.jsx(Xf,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:x,children:v.jsx(FL,{asChild:!0,...T,dir:O.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:R,onEntryFocus:ze(f,X=>{O.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(xA,{role:"menu","aria-orientation":"vertical","data-state":pI(w.open),"data-radix-menu-content":"",dir:O.dir,...E,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:ze(S.onKeyDown,X=>{const I=X.target.closest("[data-radix-menu-content]")===X.currentTarget,Y=X.ctrlKey||X.altKey||X.metaKey,Q=X.key.length===1;I&&(X.key==="Tab"&&X.preventDefault(),!Y&&Q&&F(X.key));const ce=N.current;if(X.target!==ce||!CZ.includes(X.key))return;X.preventDefault();const fe=C().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);GL.includes(X.key)&&fe.reverse(),XZ(fe)}),onBlur:ze(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:ze(e.onPointerMove,sf(X=>{const oe=X.target,I=q.current!==X.clientX;if(X.currentTarget.contains(oe)&&I){const Y=X.clientX>q.current?"right":"left";B.current=Y,q.current=X.clientX}}))})})})})})})});QL.displayName=ta;var qZ="MenuGroup",RA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Xe.div,{role:"group",...r,ref:t})});RA.displayName=qZ;var HZ="MenuLabel",JL=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Xe.div,{...r,ref:t})});JL.displayName=HZ;var Pp="MenuItem",nR="menu.itemSelect",uv=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=y.useRef(null),l=ld(Pp,e.__scopeMenu),c=jA(Pp,e.__scopeMenu),f=lt(t,o),d=y.useRef(!1),m=()=>{const h=o.current;if(!n&&h){const g=new CustomEvent(nR,{bubbles:!0,cancelable:!0});h.addEventListener(nR,x=>r==null?void 0:r(x),{once:!0}),g5(h,g),g.defaultPrevented?d.current=!1:l.onClose()}};return v.jsx(eI,{...a,ref:f,disabled:n,onClick:ze(e.onClick,m),onPointerDown:h=>{var g;(g=e.onPointerDown)==null||g.call(e,h),d.current=!0},onPointerUp:ze(e.onPointerUp,h=>{var g;d.current||(g=h.currentTarget)==null||g.click()}),onKeyDown:ze(e.onKeyDown,h=>{const g=c.searchRef.current!=="";n||g&&h.key===" "||sS.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});uv.displayName=Pp;var eI=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,l=jA(Pp,n),c=YL(n),f=y.useRef(null),d=lt(t,f),[m,h]=y.useState(!1),[g,x]=y.useState("");return y.useEffect(()=>{const A=f.current;A&&x((A.textContent??"").trim())},[o.children]),v.jsx(of.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:v.jsx(VL,{asChild:!0,...c,focusable:!r,children:v.jsx(Xe.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:ze(e.onPointerMove,sf(A=>{r?l.onItemLeave(A):(l.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ze(e.onPointerLeave,sf(A=>l.onItemLeave(A))),onFocus:ze(e.onFocus,()=>h(!0)),onBlur:ze(e.onBlur,()=>h(!1))})})})}),FZ="MenuCheckboxItem",tI=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.jsx(oI,{scope:e.__scopeMenu,checked:n,children:v.jsx(uv,{role:"menuitemcheckbox","aria-checked":Dp(n)?"mixed":n,...a,ref:t,"data-state":MA(n),onSelect:ze(a.onSelect,()=>r==null?void 0:r(Dp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tI.displayName=FZ;var nI="MenuRadioGroup",[VZ,GZ]=Ms(nI,{value:void 0,onValueChange:()=>{}}),rI=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=Un(r);return v.jsx(VZ,{scope:e.__scopeMenu,value:n,onValueChange:o,children:v.jsx(RA,{...a,ref:t})})});rI.displayName=nI;var aI="MenuRadioItem",iI=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=GZ(aI,e.__scopeMenu),o=n===a.value;return v.jsx(oI,{scope:e.__scopeMenu,checked:o,children:v.jsx(uv,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":MA(o),onSelect:ze(r.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});iI.displayName=aI;var NA="MenuItemIndicator",[oI,WZ]=Ms(NA,{checked:!1}),sI=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=WZ(NA,n);return v.jsx(ir,{present:r||Dp(o.checked)||o.checked===!0,children:v.jsx(Xe.span,{...a,ref:t,"data-state":MA(o.checked)})})});sI.displayName=NA;var YZ="MenuSeparator",lI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Xe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lI.displayName=YZ;var ZZ="MenuArrow",cI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=cv(n);return v.jsx(wA,{...a,...r,ref:t})});cI.displayName=ZZ;var KZ="MenuSub",[bxe,uI]=Ms(KZ),Uu="MenuSubTrigger",fI=y.forwardRef((e,t)=>{const n=Ps(Uu,e.__scopeMenu),r=ld(Uu,e.__scopeMenu),a=uI(Uu,e.__scopeMenu),o=jA(Uu,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=o,d={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),f(null)}},[c,f]),v.jsx(EA,{asChild:!0,...d,children:v.jsx(eI,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":pI(n.open),...e,ref:Kf(t,a.onTriggerChange),onClick:h=>{var g;(g=e.onClick)==null||g.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ze(e.onPointerMove,sf(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:ze(e.onPointerLeave,sf(h=>{var x,A;m();const g=(x=n.content)==null?void 0:x.getBoundingClientRect();if(g){const S=(A=n.content)==null?void 0:A.dataset.side,w=S==="right",O=w?-5:5,E=g[w?"left":"right"],T=g[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+O,y:h.clientY},{x:E,y:g.top},{x:T,y:g.top},{x:T,y:g.bottom},{x:E,y:g.bottom}],side:S}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ze(e.onKeyDown,h=>{var x;const g=o.searchRef.current!=="";e.disabled||g&&h.key===" "||RZ[r.dir].includes(h.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),h.preventDefault())})})})});fI.displayName=Uu;var dI="MenuSubContent",hI=y.forwardRef((e,t)=>{const n=KL(ta,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=Ps(ta,e.__scopeMenu),l=ld(ta,e.__scopeMenu),c=uI(dI,e.__scopeMenu),f=y.useRef(null),d=lt(t,f);return v.jsx(of.Provider,{scope:e.__scopeMenu,children:v.jsx(ir,{present:r||o.open,children:v.jsx(of.Slot,{scope:e.__scopeMenu,children:v.jsx(CA,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var h;l.isUsingKeyboardRef.current&&((h=f.current)==null||h.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:ze(e.onFocusOutside,m=>{m.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ze(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:ze(e.onKeyDown,m=>{var x;const h=m.currentTarget.contains(m.target),g=NZ[l.dir].includes(m.key);h&&g&&(o.onOpenChange(!1),(x=c.trigger)==null||x.focus(),m.preventDefault())})})})})})});hI.displayName=dI;function pI(e){return e?"open":"closed"}function Dp(e){return e==="indeterminate"}function MA(e){return Dp(e)?"indeterminate":e?"checked":"unchecked"}function XZ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function QZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function JZ(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=QZ(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function eK(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],d=c.x,m=c.y,h=f.x,g=f.y;m>r!=g>r&&n<(h-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function tK(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return eK(n,t)}function sf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nK=ZL,rK=EA,aK=XL,iK=QL,oK=RA,sK=JL,lK=uv,cK=tI,uK=rI,fK=iI,dK=sI,hK=lI,pK=cI,mK=fI,vK=hI,fv="DropdownMenu",[gK]=ia(fv,[WL]),or=WL(),[yK,mI]=gK(fv),vI=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=or(t),d=y.useRef(null),[m,h]=Oo({prop:a,defaultProp:o??!1,onChange:l,caller:fv});return v.jsx(yK,{scope:t,triggerId:wa(),triggerRef:d,contentId:wa(),open:m,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(g=>!g),[h]),modal:c,children:v.jsx(nK,{...f,open:m,onOpenChange:h,dir:r,modal:c,children:n})})};vI.displayName=fv;var gI="DropdownMenuTrigger",yI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=mI(gI,n),l=or(n);return v.jsx(rK,{asChild:!0,...l,children:v.jsx(Xe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Kf(t,o.triggerRef),onPointerDown:ze(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:ze(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});yI.displayName=gI;var bK="DropdownMenuPortal",bI=e=>{const{__scopeDropdownMenu:t,...n}=e,r=or(t);return v.jsx(aK,{...r,...n})};bI.displayName=bK;var xI="DropdownMenuContent",wI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mI(xI,n),o=or(n),l=y.useRef(!1);return v.jsx(iK,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:ze(e.onCloseAutoFocus,c=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:ze(e.onInteractOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,m=f.button===2||d;(!a.modal||m)&&(l.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)"}})});wI.displayName=xI;var xK="DropdownMenuGroup",wK=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(oK,{...a,...r,ref:t})});wK.displayName=xK;var SK="DropdownMenuLabel",SI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(sK,{...a,...r,ref:t})});SI.displayName=SK;var _K="DropdownMenuItem",_I=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(lK,{...a,...r,ref:t})});_I.displayName=_K;var AK="DropdownMenuCheckboxItem",AI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(cK,{...a,...r,ref:t})});AI.displayName=AK;var OK="DropdownMenuRadioGroup",EK=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(uK,{...a,...r,ref:t})});EK.displayName=OK;var TK="DropdownMenuRadioItem",OI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(fK,{...a,...r,ref:t})});OI.displayName=TK;var jK="DropdownMenuItemIndicator",EI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(dK,{...a,...r,ref:t})});EI.displayName=jK;var CK="DropdownMenuSeparator",TI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(hK,{...a,...r,ref:t})});TI.displayName=CK;var RK="DropdownMenuArrow",NK=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(pK,{...a,...r,ref:t})});NK.displayName=RK;var MK="DropdownMenuSubTrigger",jI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(mK,{...a,...r,ref:t})});jI.displayName=MK;var PK="DropdownMenuSubContent",CI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=or(n);return v.jsx(vK,{...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)"}})});CI.displayName=PK;var DK=vI,kK=yI,$K=bI,RI=wI,NI=SI,MI=_I,PI=AI,DI=OI,kI=EI,$I=TI,zI=jI,LI=CI;const zK=DK,LK=kK,IK=y.forwardRef(({className:e,inset:t,children:n,...r},a)=>v.jsxs(zI,{ref:a,className:be("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,v.jsx(eA,{className:"ml-auto"})]}));IK.displayName=zI.displayName;const BK=y.forwardRef(({className:e,...t},n)=>v.jsx(LI,{ref:n,className:be("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));BK.displayName=LI.displayName;const II=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx($K,{children:v.jsx(RI,{ref:r,sideOffset:t,className:be("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));II.displayName=RI.displayName;const lS=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(MI,{ref:r,className:be("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));lS.displayName=MI.displayName;const UK=y.forwardRef(({className:e,children:t,checked:n,...r},a)=>v.jsxs(PI,{ref:a,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(kI,{children:v.jsx(e5,{className:"h-4 w-4"})})}),t]}));UK.displayName=PI.displayName;const qK=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(DI,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(kI,{children:v.jsx(kF,{className:"h-2 w-2 fill-current"})})}),t]}));qK.displayName=DI.displayName;const HK=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(NI,{ref:r,className:be("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));HK.displayName=NI.displayName;const BI=y.forwardRef(({className:e,...t},n)=>v.jsx($I,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));BI.displayName=$I.displayName;const cS="";async function Yh(e,t,n,r){const a=await fetch(`${cS}${t}`,{method:e,credentials:"include",headers:{"Content-Type":"application/json",...r},body:n!=null?JSON.stringify(n):void 0});if(a.status===204)return{data:null,status:204};const o=await a.json().catch(()=>null);return a.ok?{data:o,status:a.status}:{data:null,status:a.status,error:(o==null?void 0:o.error)??"Request failed"}}const UI={get:e=>Yh("GET",e),post:(e,t)=>Yh("POST",e,t),patch:(e,t)=>Yh("PATCH",e,t),delete:e=>Yh("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${cS}${e}`,{method:"POST",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}},uploadPatch:async(e,t)=>{const n=await fetch(`${cS}${e}`,{method:"PATCH",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}}};function PA(){const[e,t]=y.useState({user:null,loading:!0}),n=Ka();return y.useEffect(()=>{let r=!1;return UI.get("/api/v1/auth/me").then(({data:a,status:o})=>{r||(o===401||!a?(t({user:null,loading:!1}),n("/login",{replace:!0})):t({user:a,loading:!1}))}),()=>{r=!0}},[n]),e}const FK=6;function VK(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function DA(e){const t=VK(e)%FK+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function qI({name:e,avatarUrl:t,size:n=28}){const r=((e==null?void 0:e[0])??"?").toUpperCase(),a={width:n,height:n,borderRadius:"50%",flexShrink:0};if(t)return v.jsx("img",{src:t,alt:e,style:{...a,objectFit:"cover"}});const{bg:o,fg:l}=DA(e);return v.jsx("span",{style:{...a,background:o,display:"inline-flex",alignItems:"center",justifyContent:"center",color:l,fontSize:n*.42,fontWeight:600,userSelect:"none"},children:r})}const GK=[{label:"App Center",href:"/app-center",icon:n5},{label:"Mac Resources",href:"/mac-resources",icon:r5}],WK=[{label:"Default",href:"/settings/default",icon:i5,adminOnly:!1},{label:"Team",href:"/settings/team",icon:aV,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:BF,adminOnly:!0}],YK=[{label:"Docs",href:"https://www.tapflow.dev",icon:MF}];function ZK(){const{pathname:e}=kr(),t=Ka(),{user:n}=PA(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:a}=Gf(),o=a==="dark"?"/logo-dark.svg":"/logo.svg",[l,c]=y.useState(null),[f,d]=y.useState("tapflow");y.useEffect(()=>{fetch("/api/v1/settings",{credentials:"include"}).then(h=>h.ok?h.json():null).then(h=>{h!=null&&h.logo_url&&c(h.logo_url),h!=null&&h.team_name&&d(h.team_name)})},[]);async function m(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return v.jsxs(PL,{collapsible:"icon",children:[v.jsx($L,{className:"p-2",children:v.jsxs(Rl,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[v.jsx("img",{src:l??o,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),v.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:f})]})}),v.jsxs(LL,{children:[v.jsx(vp,{children:v.jsx(gp,{children:v.jsx(yp,{children:GK.map(h=>v.jsx(bp,{children:v.jsx(xp,{asChild:!0,isActive:e.startsWith(h.href),tooltip:h.label,children:v.jsxs(Rl,{to:h.href,children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})}),v.jsxs(vp,{children:[v.jsx(iS,{children:"Settings"}),v.jsx(gp,{children:v.jsx(yp,{children:WK.filter(h=>!h.adminOnly||r).map(h=>v.jsx(bp,{children:v.jsx(xp,{asChild:!0,isActive:e===h.href,tooltip:h.label,children:v.jsxs(Rl,{to:h.href,children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})]}),v.jsxs(vp,{children:[v.jsx(iS,{children:"Reference"}),v.jsx(gp,{children:v.jsx(yp,{children:YK.map(h=>v.jsx(bp,{children:v.jsx(xp,{asChild:!0,tooltip:h.label,children:v.jsxs("a",{href:h.href,target:"_blank",rel:"noopener noreferrer",children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})]})]}),n&&v.jsx(zL,{className:"px-3 py-3",children:v.jsxs(zK,{children:[v.jsx(LK,{asChild:!0,children:v.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[v.jsx(qI,{name:n.displayName??"",avatarUrl:n.avatarUrl,size:28}),v.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[v.jsx("span",{className:"text-sm font-medium truncate",children:n.displayName}),v.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n.email})]})]})}),v.jsxs(II,{side:"top",align:"start",className:"w-56",children:[v.jsx(lS,{asChild:!0,children:v.jsxs(Rl,{to:"/settings/default",children:[v.jsx(i5,{className:"mr-2 h-4 w-4"}),"Settings"]})}),v.jsx(BI,{}),v.jsxs(lS,{onClick:m,className:"text-destructive focus:text-destructive",children:[v.jsx(FF,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function KK(){const{theme:e,setTheme:t}=Gf();return v.jsxs(ut,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[v.jsx(eV,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(GF,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const HI=y.createContext({node:null,setNode:()=>{}});function XK({children:e}){const[t,n]=y.useState(null),r=y.useMemo(()=>({node:t,setNode:n}),[t]);return v.jsx(HI.Provider,{value:r,children:e})}function kA(){return y.useContext(HI)}function QK(){const{node:e}=kA();return v.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[v.jsx(DL,{className:"-ml-1"}),v.jsx(Ya,{orientation:"vertical",className:"h-4"}),e,v.jsx("div",{className:"flex-1"}),v.jsx(KK,{}),v.jsx(Ya,{orientation:"vertical",className:"h-4"}),v.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:v.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:v.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})})]})}function JK(){const{user:e,loading:t}=PA(),n=kr();return t?null:e?["/settings/team","/settings/tokens"].some(a=>n.pathname.startsWith(a))&&e.role!=="Admin"?v.jsx("div",{className:"flex h-screen items-center justify-center",children:v.jsxs("div",{className:"text-center space-y-2",children:[v.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}):v.jsx(XK,{children:v.jsxs(ML,{children:[v.jsx(ZK,{}),v.jsxs(kL,{children:[v.jsx(QK,{}),v.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:v.jsx(u7,{})})]})]})}):v.jsx(G1,{to:"/login",replace:!0})}var cd=e=>e.type==="checkbox",cs=e=>e instanceof Date,rr=e=>e==null;const FI=e=>typeof e=="object";var cn=e=>!rr(e)&&!Array.isArray(e)&&FI(e)&&!cs(e),VI=e=>cn(e)&&e.target?cd(e.target)?e.target.checked:e.target.value:e,GI=(e,t)=>t.split(".").some((n,r,a)=>!isNaN(Number(n))&&e.has(a.slice(0,r).join("."))),eX=e=>{const t=e.constructor&&e.constructor.prototype;return cn(t)&&t.hasOwnProperty("isPrototypeOf")},$A=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function dn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if($A&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(cn(e)&&eX(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=dn(e[a]));return r}var dv=e=>/^\w*$/.test(e),Kt=e=>e===void 0,zA=e=>Array.isArray(e)?e.filter(Boolean):[],LA=e=>zA(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ke=(e,t,n)=>{if(!t||!cn(e))return n;const a=(dv(t)?[t]:LA(t)).reduce((o,l)=>rr(o)?void 0:o[l],e);return Kt(a)||a===e?Kt(e[t])?n:e[t]:a},jr=e=>typeof e=="boolean",Xn=e=>typeof e=="function",Pt=(e,t,n)=>{let r=-1;const a=dv(t)?[t]:LA(t),o=a.length,l=o-1;for(;++r<o;){const c=a[r];let f=n;if(r!==l){const d=e[c];f=cn(d)||Array.isArray(d)?d:isNaN(+a[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=f,e=e[c]}};const vo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},va={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ha={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hb="form",WI="root",YI=L.createContext(null);YI.displayName="HookFormControlContext";const IA=()=>L.useContext(YI);var ZI=(e,t,n,r=!0)=>{const a={};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==va.all&&(t._proxyFormState[l]=!r||va.all),n&&(n[l]=!0),e[l]}});return a};const BA=typeof window<"u"?L.useLayoutEffect:L.useEffect;function tX(e){const t=IA(),{control:n=t,disabled:r,name:a,exact:o}=e||{},[l,c]=L.useState(()=>({...n._formState,defaultValues:n._defaultValues})),f=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return BA(()=>n._subscribe({name:a,formState:f.current,exact:o,callback:d=>{!r&&c({...n._formState,...d,defaultValues:n._defaultValues})}}),[a,r,o]),L.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),L.useMemo(()=>ZI(l,n,f.current,!1),[l,n])}var er=e=>typeof e=="string",uS=(e,t,n,r,a)=>er(e)?(r&&t.watch.add(e),ke(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),ke(n,o))):(r&&(t.watchAll=!0),n),fS=e=>rr(e)||!FI(e);function Cr(e,t,n=new WeakSet){if(e===t)return!0;if(fS(e)||fS(t))return Object.is(e,t);if(cs(e)&&cs(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const o of r){const l=e[o];if(!(o in t))return!1;if(o!=="ref"){const c=t[o];if(cs(l)&&cs(c)||(cn(l)||Array.isArray(l))&&(cn(c)||Array.isArray(c))?!Cr(l,c,n):!Object.is(l,c))return!1}}return!0}function UA(e){const t=IA(),{control:n=t,name:r,defaultValue:a,disabled:o,exact:l,compute:c}=e||{},f=L.useRef(a),d=L.useRef(c),m=L.useRef(void 0),h=L.useRef(n),g=L.useRef(r);d.current=c;const[x,A]=L.useState(()=>{const C=n._getWatch(r,f.current);return d.current?d.current(C):C}),S=L.useCallback(C=>{const j=uS(r,n._names,C||n._formValues,!1,f.current);return d.current?d.current(j):j},[n._formValues,n._names,r]),w=L.useCallback(C=>{if(!o){const j=uS(r,n._names,C||n._formValues,!1,f.current);if(d.current){const R=d.current(j);Cr(R,m.current)||(A(R),m.current=R)}else A(j)}},[n._formValues,n._names,o,r]);BA(()=>((h.current!==n||!Cr(g.current,r))&&(h.current=n,g.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:C=>{w(C.values)}})),[n,l,r,w]),L.useEffect(()=>n._removeUnmounted());const O=h.current!==n,E=g.current,T=L.useMemo(()=>{if(o)return null;const C=!O&&!Cr(E,r);return O||C?S():null},[o,O,r,E,S]);return T!==null?T:x}function nX(e){const t=IA(),{name:n,disabled:r,control:a=t,shouldUnregister:o,defaultValue:l,exact:c=!0}=e,f=GI(a._names.array,n),d=L.useMemo(()=>ke(a._formValues,n,ke(a._defaultValues,n,l)),[a,n,l]),m=UA({control:a,name:n,defaultValue:d,exact:c}),h=tX({control:a,name:n,exact:c}),g=L.useRef(e),x=L.useRef(a.register(n,{...e.rules,value:m,...jr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const A=L.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ke(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!ke(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ke(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ke(h.validatingFields,n)},error:{enumerable:!0,get:()=>ke(h.errors,n)}}),[h,n]),S=L.useCallback(T=>x.current.onChange({target:{value:VI(T),name:n},type:vo.CHANGE}),[n]),w=L.useCallback(()=>x.current.onBlur({target:{value:ke(a._formValues,n),name:n},type:vo.BLUR}),[n,a._formValues]),O=L.useCallback(T=>{const C=ke(a._fields,n);C&&C._f&&T&&(C._f.ref={focus:()=>Xn(T.focus)&&T.focus(),select:()=>Xn(T.select)&&T.select(),setCustomValidity:j=>Xn(T.setCustomValidity)&&T.setCustomValidity(j),reportValidity:()=>Xn(T.reportValidity)&&T.reportValidity()})},[a._fields,n]),E=L.useMemo(()=>({name:n,value:m,...jr(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:S,onBlur:w,ref:O}),[n,r,h.disabled,S,w,O,m]);return L.useEffect(()=>{const T=a._options.shouldUnregister||o;a.register(n,{...g.current.rules,...jr(g.current.disabled)?{disabled:g.current.disabled}:{}});const C=(j,R)=>{const N=ke(a._fields,j);N&&N._f&&(N._f.mount=R)};if(C(n,!0),T){const j=dn(ke(a._options.defaultValues,n,g.current.defaultValue));Pt(a._defaultValues,n,j),Kt(ke(a._formValues,n))&&Pt(a._formValues,n,j)}return!f&&a.register(n),()=>{(f?T&&!a._state.action:T)?a.unregister(n):C(n,!1)}},[n,a,f,o]),L.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),L.useMemo(()=>({field:E,formState:h,fieldState:A}),[E,h,A])}const kp=e=>e.render(nX(e)),rX=L.createContext(null);rX.displayName="HookFormContext";var qA=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Zu=e=>Array.isArray(e)?e:[e],rR=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}};function KI(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],o=t[r];if(a&&cn(a)&&o){const l=KI(a,o);cn(l)&&(n[r]=l)}else e[r]&&(n[r]=o)}return n}var Zn=e=>cn(e)&&!Object.keys(e).length,HA=e=>e.type==="file",$p=e=>{if(!$A)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},XI=e=>e.type==="select-multiple",FA=e=>e.type==="radio",aX=e=>FA(e)||cd(e),Fb=e=>$p(e)&&e.isConnected;function iX(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(rr(e)){e=void 0;break}e=e[t[r]],r++}return e}function oX(e){for(const t in e)if(e.hasOwnProperty(t)&&!Kt(e[t]))return!1;return!0}function bn(e,t){if(er(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:dv(t)?[t]:LA(t),r=n.length===1?e:iX(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(cn(r)&&Zn(r)||Array.isArray(r)&&oX(r))&&bn(e,n.slice(0,-1)),e}var sX=e=>{for(const t in e)if(Xn(e[t]))return!0;return!1};function QI(e){return Array.isArray(e)||cn(e)&&!sX(e)}function dS(e,t={}){for(const n in e){const r=e[n];QI(r)?(t[n]=Array.isArray(r)?[]:{},dS(r,t[n])):Kt(r)||(t[n]=!0)}return t}function hS(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>hS(n));return t.some(n=>n!==void 0)?t:void 0}if(cn(e)){const t={};for(const n in e){const r=hS(e[n]);Kt(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function qu(e,t,n){n||(n=dS(t));for(const r in e){const a=e[r];if(QI(a))Kt(t)||fS(n[r])?n[r]=dS(a,Array.isArray(a)?[]:{}):qu(a,rr(t)?{}:t[r],n[r]);else{const o=t[r];n[r]=!Cr(a,o)}}return hS(n)||{}}const aR={value:!1,isValid:!1},iR={value:!0,isValid:!0};var JI=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Kt(e[0].attributes.value)?Kt(e[0].value)||e[0].value===""?iR:{value:e[0].value,isValid:!0}:iR:aR}return aR},e3=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Kt(e)?e:t?e===""?NaN:e&&+e:n&&er(e)?new Date(e):r?r(e):e;const oR={isValid:!1,value:null};var t3=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,oR):oR;function sR(e){const t=e.ref;return HA(t)?t.files:FA(t)?t3(e.refs).value:XI(t)?[...t.selectedOptions].map(({value:n})=>n):cd(t)?JI(e.refs).value:e3(Kt(t.value)?e.ref.value:t.value,e)}var lX=(e,t,n,r)=>{const a={};for(const o of e){const l=ke(t,o);l&&Pt(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},zp=e=>e instanceof RegExp,Nu=e=>Kt(e)?e:zp(e)?e.source:cn(e)?zp(e.value)?e.value.source:e.value:e,lR=e=>({isOnSubmit:!e||e===va.onSubmit,isOnBlur:e===va.onBlur,isOnChange:e===va.onChange,isOnAll:e===va.all,isOnTouch:e===va.onTouched});const cR="AsyncFunction";var cX=e=>!!e&&!!e.validate&&!!(Xn(e.validate)&&e.validate.constructor.name===cR||cn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===cR)),uX=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),uR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ku=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=ke(e,a);if(o){const{_f:l,...c}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Ku(c,t))break}else if(cn(c)&&Ku(c,t))break}}};function fR(e,t,n){const r=ke(e,n);if(r||dv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=ke(t,o),c=ke(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(c&&c.type)return{name:o,error:c};if(c&&c.root&&c.root.type)return{name:`${o}.root`,error:c.root};a.pop()}return{name:n}}var fX=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Zn(o)||r&&Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||va.all))},dX=(e,t,n)=>!e||!t||e===t||Zu(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),hX=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,pX=(e,t)=>!zA(ke(e,t)).length&&bn(e,t),mX=(e,t,n)=>{const r=Zu(ke(e,n));return Pt(r,WI,t[n]),Pt(e,n,r),e};function dR(e,t,n="validate"){if(er(e)||Array.isArray(e)&&e.every(er)||jr(e)&&!e)return{type:n,message:er(e)?e:"",ref:t}}var El=e=>cn(e)&&!zp(e)?e:{value:e,message:""},hR=async(e,t,n,r,a,o)=>{const{ref:l,refs:c,required:f,maxLength:d,minLength:m,min:h,max:g,pattern:x,validate:A,name:S,valueAsNumber:w,mount:O}=e._f,E=ke(n,S);if(!O||t.has(S))return{};const T=c?c[0]:l,C=P=>{a&&T.reportValidity&&(T.setCustomValidity(jr(P)?"":P||""),T.reportValidity())},j={},R=FA(l),N=cd(l),D=R||N,z=(w||HA(l))&&Kt(l.value)&&Kt(E)||$p(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||w&&typeof E=="number"&&isNaN(E),V=qA.bind(null,S,r,j),U=(P,B,q,G=ha.maxLength,$=ha.minLength)=>{const F=P?B:q;j[S]={type:P?G:$,message:F,ref:l,...V(P?G:$,F)}};if(o?!Array.isArray(E)||!E.length:f&&(!D&&(z||rr(E))||jr(E)&&!E||N&&!JI(c).isValid||R&&!t3(c).isValid)){const{value:P,message:B}=er(f)?{value:!!f,message:f}:El(f);if(P&&(j[S]={type:ha.required,message:B,ref:T,...V(ha.required,B)},!r))return C(B),j}if(!z&&(!rr(h)||!rr(g))){let P,B;const q=El(g),G=El(h);if(!rr(E)&&!isNaN(E)){const $=l.valueAsNumber||E&&+E;rr(q.value)||(P=$>q.value),rr(G.value)||(B=$<G.value)}else{const $=l.valueAsDate||new Date(E),F=oe=>new Date(new Date().toDateString()+" "+oe),Z=l.type=="time",X=l.type=="week";er(q.value)&&E&&(P=Z?F(E)>F(q.value):X?E>q.value:$>new Date(q.value)),er(G.value)&&E&&(B=Z?F(E)<F(G.value):X?E<G.value:$<new Date(G.value))}if((P||B)&&(U(!!P,q.message,G.message,ha.max,ha.min),!r))return C(j[S].message),j}if((d||m)&&!z&&(er(E)||o&&Array.isArray(E))){const P=El(d),B=El(m),q=!rr(P.value)&&E.length>+P.value,G=!rr(B.value)&&E.length<+B.value;if((q||G)&&(U(q,P.message,B.message),!r))return C(j[S].message),j}if(x&&!z&&er(E)){const{value:P,message:B}=El(x);if(zp(P)&&!E.match(P)&&(j[S]={type:ha.pattern,message:B,ref:l,...V(ha.pattern,B)},!r))return C(B),j}if(A){if(Xn(A)){const P=await A(E,n),B=dR(P,T);if(B&&(j[S]={...B,...V(ha.validate,B.message)},!r))return C(B.message),j}else if(cn(A)){let P={};for(const B in A){if(!Zn(P)&&!r)break;const q=dR(await A[B](E,n),T,B);q&&(P={...q,...V(B,q.message)},C(q.message),r&&(j[S]=P))}if(!Zn(P)&&(j[S]={ref:T,...P},!r))return j}}return C(!0),j};const vX={mode:va.onSubmit,reValidateMode:va.onChange,shouldFocusError:!0},n3={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function gX(e={}){let t={...vX,...e},n={...dn(n3),isLoading:Xn(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},a=cn(t.defaultValues)||cn(t.values)?dn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:dn(a),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},f,d=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...m};let g={...h};const x={array:rR(),state:rR()},A=t.criteriaMode===va.all,S=H=>ee=>{clearTimeout(d),d=setTimeout(H,ee)},w=async H=>{if(!l.keepIsValid&&!t.disabled&&(h.isValid||g.isValid||H)){let ee;t.resolver?(ee=Zn((await z()).errors),O()):ee=await P({fields:r,onlyCheckValid:!0,eventType:vo.VALID}),ee!==n.isValid&&x.state.next({isValid:ee})}},O=(H,ee)=>{!t.disabled&&(h.isValidating||h.validatingFields||g.isValidating||g.validatingFields)&&((H||Array.from(c.mount)).forEach(te=>{te&&(ee?Pt(n.validatingFields,te,ee):bn(n.validatingFields,te))}),x.state.next({validatingFields:n.validatingFields,isValidating:!Zn(n.validatingFields)}))},E=()=>{n.dirtyFields=qu(a,o)},T=(H,ee=[],te,Ce,je=!0,Te=!0)=>{if(Ce&&te&&!t.disabled){if(l.action=!0,Te&&Array.isArray(ke(r,H))){const Me=te(ke(r,H),Ce.argA,Ce.argB);je&&Pt(r,H,Me)}if(Te&&Array.isArray(ke(n.errors,H))){const Me=te(ke(n.errors,H),Ce.argA,Ce.argB);je&&Pt(n.errors,H,Me),pX(n.errors,H)}if((h.touchedFields||g.touchedFields)&&Te&&Array.isArray(ke(n.touchedFields,H))){const Me=te(ke(n.touchedFields,H),Ce.argA,Ce.argB);je&&Pt(n.touchedFields,H,Me)}(h.dirtyFields||g.dirtyFields)&&E(),x.state.next({name:H,isDirty:q(H,ee),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Pt(o,H,ee)},C=(H,ee)=>{Pt(n.errors,H,ee),x.state.next({errors:n.errors})},j=H=>{n.errors=H,x.state.next({errors:n.errors,isValid:!1})},R=(H,ee,te,Ce)=>{const je=ke(r,H);if(je){const Te=Kt(ke(o,H)),Me=ke(o,H,Kt(te)?ke(a,H):te);Kt(Me)||Ce&&Ce.defaultChecked||ee?Pt(o,H,ee?Me:sR(je._f)):F(H,Me),l.mount&&!l.action&&(w(),Te&&n.isDirty&&(h.isDirty||g.isDirty)&&(q()||(n.isDirty=!1,x.state.next({...n}))))}},N=(H,ee,te,Ce,je)=>{let Te=!1,Me=!1;const Fe={name:H};if(!t.disabled){if(!te||Ce){(h.isDirty||g.isDirty)&&(Me=n.isDirty,n.isDirty=Fe.isDirty=q(),Te=Me!==Fe.isDirty);const Ve=Cr(ke(a,H),ee);Me=!!ke(n.dirtyFields,H),Ve?bn(n.dirtyFields,H):Pt(n.dirtyFields,H,!0),Fe.dirtyFields=n.dirtyFields,Te=Te||(h.dirtyFields||g.dirtyFields)&&Me!==!Ve}if(te){const Ve=ke(n.touchedFields,H);Ve||(Pt(n.touchedFields,H,te),Fe.touchedFields=n.touchedFields,Te=Te||(h.touchedFields||g.touchedFields)&&Ve!==te)}Te&&je&&x.state.next(Fe)}return Te?Fe:{}},D=(H,ee,te,Ce)=>{const je=ke(n.errors,H),Te=(h.isValid||g.isValid)&&jr(ee)&&n.isValid!==ee;if(t.delayError&&te?(f=S(()=>C(H,te)),f(t.delayError)):(clearTimeout(d),f=null,te?Pt(n.errors,H,te):bn(n.errors,H)),(te?!Cr(je,te):je)||!Zn(Ce)||Te){const Me={...Ce,...Te&&jr(ee)?{isValid:ee}:{},errors:n.errors,name:H};n={...n,...Me},x.state.next(Me)}},z=async H=>(O(H,!0),await t.resolver(o,t.context,lX(H||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),V=async H=>{const{errors:ee}=await z(H);if(O(H),H)for(const te of H){const Ce=ke(ee,te);Ce?Pt(n.errors,te,Ce):bn(n.errors,te)}else n.errors=ee;return ee},U=async({name:H,eventType:ee})=>{if(e.validate){const te=await e.validate({formValues:o,formState:n,name:H,eventType:ee});if(cn(te))for(const Ce in te)te[Ce]&&ue(`${Hb}.${Ce}`,{message:er(te.message)?te.message:"",type:ha.validate});else er(te)||!te?ue(Hb,{message:te||"",type:ha.validate}):fe(Hb);return te}return!0},P=async({fields:H,onlyCheckValid:ee,name:te,eventType:Ce,context:je={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(je.runRootValidation=!0,!await U({name:te,eventType:Ce})&&(je.valid=!1,ee)))return je.valid;for(const Te in H){const Me=H[Te];if(Me){const{_f:Fe,...Ve}=Me;if(Fe){const Et=c.array.has(Fe.name),bt=Me._f&&cX(Me._f);bt&&h.validatingFields&&O([Fe.name],!0);const xt=await hR(Me,c.disabled,o,A,t.shouldUseNativeValidation&&!ee,Et);if(bt&&h.validatingFields&&O([Fe.name]),xt[Fe.name]&&(je.valid=!1,ee)||(!ee&&(ke(xt,Fe.name)?Et?mX(n.errors,xt,Fe.name):Pt(n.errors,Fe.name,xt[Fe.name]):bn(n.errors,Fe.name)),e.shouldUseNativeValidation&&xt[Fe.name]))break}!Zn(Ve)&&await P({context:je,onlyCheckValid:ee,fields:Ve,name:Te,eventType:Ce})}}return je.valid},B=()=>{for(const H of c.unMount){const ee=ke(r,H);ee&&(ee._f.refs?ee._f.refs.every(te=>!Fb(te)):!Fb(ee._f.ref))&&Se(H)}c.unMount=new Set},q=(H,ee)=>!t.disabled&&(H&&ee&&Pt(o,H,ee),!Cr(ce(),a)),G=(H,ee,te)=>uS(H,c,{...l.mount?o:Kt(ee)?a:er(H)?{[H]:ee}:ee},te,ee),$=H=>zA(ke(l.mount?o:a,H,t.shouldUnregister?ke(a,H,[]):[])),F=(H,ee,te={})=>{const Ce=ke(r,H);let je=ee;if(Ce){const Te=Ce._f;Te&&(!Te.disabled&&Pt(o,H,e3(ee,Te)),je=$p(Te.ref)&&rr(ee)?"":ee,XI(Te.ref)?[...Te.ref.options].forEach(Me=>Me.selected=je.includes(Me.value)):Te.refs?cd(Te.ref)?Te.refs.forEach(Me=>{(!Me.defaultChecked||!Me.disabled)&&(Array.isArray(je)?Me.checked=!!je.find(Fe=>Fe===Me.value):Me.checked=je===Me.value||!!je)}):Te.refs.forEach(Me=>Me.checked=Me.value===je):HA(Te.ref)?Te.ref.value="":(Te.ref.value=je,Te.ref.type||x.state.next({name:H,values:dn(o)})))}(te.shouldDirty||te.shouldTouch)&&N(H,je,te.shouldTouch,te.shouldDirty,!0),te.shouldValidate&&Q(H)},Z=(H,ee,te)=>{for(const Ce in ee){if(!ee.hasOwnProperty(Ce))return;const je=ee[Ce],Te=H+"."+Ce,Me=ke(r,Te);(c.array.has(H)||cn(je)||Me&&!Me._f)&&!cs(je)?Z(Te,je,te):F(Te,je,te)}},X=(H,ee,te={})=>{const Ce=ke(r,H),je=c.array.has(H),Te=dn(ee),Me=ke(o,H),Fe=Cr(Me,Te);if(Pt(o,H,Te),je)x.array.next({name:H,values:dn(o)}),(h.isDirty||h.dirtyFields||g.isDirty||g.dirtyFields)&&te.shouldDirty&&(E(),x.state.next({name:H,dirtyFields:n.dirtyFields,isDirty:q(H,Te)}));else{const Ve=Array.isArray(Te)&&!Te.length||Zn(Te);!Ce||Ce._f||rr(Te)||Ve?F(H,Te,te):Z(H,Te,te)}if(!Fe){const Ve=uR(H,c);x.state.next({...Ve&&n,name:l.mount||Ve?H:void 0,values:dn(o)})}},oe=H=>{const ee=Xn(H)?H(o):H;Cr(o,ee)||(o={...o,...ee},x.state.next({...n,values:o}))},I=async H=>{l.mount=!0;const ee=H.target;let te=ee.name,Ce=!0;const je=ke(r,te),Te=Ve=>{Ce=Number.isNaN(Ve)||cs(Ve)&&isNaN(Ve.getTime())||Cr(Ve,ke(o,te,Ve))},Me=lR(t.mode),Fe=lR(t.reValidateMode);if(je){let Ve,Et;const bt=ee.type?sR(je._f):VI(H),xt=H.type===vo.BLUR||H.type===vo.FOCUS_OUT,Ae=!uX(je._f)&&!e.validate&&!t.resolver&&!ke(n.errors,te)&&!je._f.deps||hX(xt,ke(n.touchedFields,te),n.isSubmitted,Fe,Me),Ze=uR(te,c,xt);Pt(o,te,bt),xt?(!ee||!ee.readOnly)&&(je._f.onBlur&&je._f.onBlur(H),f&&f(0)):je._f.onChange&&je._f.onChange(H);const Re=N(te,bt,xt),Ye=!Zn(Re)||Ze;if(!xt&&x.state.next({name:te,type:H.type,values:dn(o)}),Ae)return(h.isValid||g.isValid)&&(t.mode==="onBlur"?xt&&w():xt||w()),Ye&&x.state.next({name:te,...Ze?{}:Re});if(!t.resolver&&e.validate&&await U({name:te,eventType:H.type}),!xt&&Ze&&x.state.next({...n}),t.resolver){const{errors:jt}=await z([te]);if(O([te]),Te(bt),Ce){const ie=fR(n.errors,r,te),Ee=fR(jt,r,ie.name||te);Ve=Ee.error,te=Ee.name,Et=Zn(jt)}}else O([te],!0),Ve=(await hR(je,c.disabled,o,A,t.shouldUseNativeValidation))[te],O([te]),Te(bt),Ce&&(Ve?Et=!1:(h.isValid||g.isValid)&&(Et=await P({fields:r,onlyCheckValid:!0,name:te,eventType:H.type})));Ce&&(je._f.deps&&(!Array.isArray(je._f.deps)||je._f.deps.length>0)&&Q(je._f.deps),D(te,Et,Ve,Re))}},Y=(H,ee)=>{if(ke(n.errors,ee)&&H.focus)return H.focus(),1},Q=async(H,ee={})=>{let te,Ce;const je=Zu(H);if(t.resolver){const Te=await V(Kt(H)?H:je);te=Zn(Te),Ce=H?!je.some(Me=>ke(Te,Me)):te}else H?(Ce=(await Promise.all(je.map(async Te=>{const Me=ke(r,Te);return await P({fields:Me&&Me._f?{[Te]:Me}:Me,eventType:vo.TRIGGER})}))).every(Boolean),!(!Ce&&!n.isValid)&&w()):Ce=te=await P({fields:r,name:H,eventType:vo.TRIGGER});return x.state.next({...!er(H)||(h.isValid||g.isValid)&&te!==n.isValid?{}:{name:H},...t.resolver||!H?{isValid:te}:{},errors:n.errors}),ee.shouldFocus&&!Ce&&Ku(r,Y,H?je:c.mount),Ce},ce=(H,ee)=>{let te={...l.mount?o:a};return ee&&(te=KI(ee.dirtyFields?n.dirtyFields:n.touchedFields,te)),Kt(H)?te:er(H)?ke(te,H):H.map(Ce=>ke(te,Ce))},ve=(H,ee)=>({invalid:!!ke((ee||n).errors,H),isDirty:!!ke((ee||n).dirtyFields,H),error:ke((ee||n).errors,H),isValidating:!!ke(n.validatingFields,H),isTouched:!!ke((ee||n).touchedFields,H)}),fe=H=>{const ee=H?Zu(H):void 0;ee==null||ee.forEach(te=>bn(n.errors,te)),ee?ee.forEach(te=>{x.state.next({name:te,errors:n.errors})}):x.state.next({errors:{}})},ue=(H,ee,te)=>{const Ce=(ke(r,H,{_f:{}})._f||{}).ref,je=ke(n.errors,H)||{},{ref:Te,message:Me,type:Fe,...Ve}=je;Pt(n.errors,H,{...Ve,...ee,ref:Ce}),x.state.next({name:H,errors:n.errors,isValid:!1}),te&&te.shouldFocus&&Ce&&Ce.focus&&Ce.focus()},xe=(H,ee)=>Xn(H)?x.state.subscribe({next:te=>"values"in te&&H(te.values||G(void 0,ee),te)}):G(H,ee,!0),se=H=>x.state.subscribe({next:ee=>{if(dX(H.name,ee.name,H.exact)&&fX(ee,H.formState||h,an,H.reRenderRoot)){const te={...o};H.callback({values:te,...n,...ee,defaultValues:a})}}}).unsubscribe,_e=H=>(l.mount=!0,g={...g,...H.formState},se({...H,formState:{...m,...H.formState}})),Se=(H,ee={})=>{for(const te of H?Zu(H):c.mount)c.mount.delete(te),c.array.delete(te),ee.keepValue||(bn(r,te),bn(o,te)),!ee.keepError&&bn(n.errors,te),!ee.keepDirty&&bn(n.dirtyFields,te),!ee.keepTouched&&bn(n.touchedFields,te),!ee.keepIsValidating&&bn(n.validatingFields,te),!t.shouldUnregister&&!ee.keepDefaultValue&&bn(a,te);x.state.next({values:dn(o)}),x.state.next({...n,...ee.keepDirty?{isDirty:q()}:{}}),!ee.keepIsValid&&w()},ne=({disabled:H,name:ee})=>{if(jr(H)&&l.mount||H||c.disabled.has(ee)){const je=c.disabled.has(ee)!==!!H;H?c.disabled.add(ee):c.disabled.delete(ee),je&&l.mount&&!l.action&&w()}},Ue=(H,ee={})=>{let te=ke(r,H);const Ce=jr(ee.disabled)||jr(t.disabled),je=!c.registerName.has(H)&&te&&te._f&&!te._f.mount;return Pt(r,H,{...te||{},_f:{...te&&te._f?te._f:{ref:{name:H}},name:H,mount:!0,...ee}}),c.mount.add(H),te&&!je?ne({disabled:jr(ee.disabled)?ee.disabled:t.disabled,name:H}):R(H,!0,ee.value),{...Ce?{disabled:ee.disabled||t.disabled}:{},...t.progressive?{required:!!ee.required,min:Nu(ee.min),max:Nu(ee.max),minLength:Nu(ee.minLength),maxLength:Nu(ee.maxLength),pattern:Nu(ee.pattern)}:{},name:H,onChange:I,onBlur:I,ref:Te=>{if(Te){c.registerName.add(H),Ue(H,ee),c.registerName.delete(H),te=ke(r,H);const Me=Kt(Te.value)&&Te.querySelectorAll&&Te.querySelectorAll("input,select,textarea")[0]||Te,Fe=aX(Me),Ve=te._f.refs||[];if(Fe?Ve.find(Et=>Et===Me):Me===te._f.ref)return;Pt(r,H,{_f:{...te._f,...Fe?{refs:[...Ve.filter(Fb),Me,...Array.isArray(ke(a,H))?[{}]:[]],ref:{type:Me.type,name:H}}:{ref:Me}}}),R(H,!1,void 0,Me)}else te=ke(r,H,{}),te._f&&(te._f.mount=!1),(t.shouldUnregister||ee.shouldUnregister)&&!(GI(c.array,H)&&l.action)&&c.unMount.add(H)}}},$e=()=>t.shouldFocusError&&Ku(r,Y,c.mount),rt=H=>{jr(H)&&(x.state.next({disabled:H}),Ku(r,(ee,te)=>{const Ce=ke(r,te);Ce&&(ee.disabled=Ce._f.disabled||H,Array.isArray(Ce._f.refs)&&Ce._f.refs.forEach(je=>{je.disabled=Ce._f.disabled||H}))},0,!1))},et=(H,ee)=>async te=>{let Ce;te&&(te.preventDefault&&te.preventDefault(),te.persist&&te.persist());let je=dn(o);if(x.state.next({isSubmitting:!0}),t.resolver){const{errors:Te,values:Me}=await z();O(),n.errors=Te,je=dn(Me)}else await P({fields:r,eventType:vo.SUBMIT});if(c.disabled.size)for(const Te of c.disabled)bn(je,Te);if(bn(n.errors,WI),Zn(n.errors)){x.state.next({errors:{}});try{await H(je,te)}catch(Te){Ce=Te}}else ee&&await ee({...n.errors},te),$e(),setTimeout($e);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Zn(n.errors)&&!Ce,submitCount:n.submitCount+1,errors:n.errors}),Ce)throw Ce},tt=(H,ee={})=>{ke(r,H)&&(Kt(ee.defaultValue)?X(H,dn(ke(a,H))):(X(H,ee.defaultValue),Pt(a,H,dn(ee.defaultValue))),ee.keepTouched||bn(n.touchedFields,H),ee.keepDirty||(bn(n.dirtyFields,H),n.isDirty=ee.defaultValue?q(H,dn(ke(a,H))):q()),ee.keepError||(bn(n.errors,H),h.isValid&&w()),x.state.next({...n}))},qt=(H,ee={})=>{const te=H?dn(H):a,Ce=dn(te),je=Zn(H),Te=je?a:Ce;if(ee.keepDefaultValues||(a=te),!ee.keepValues){if(ee.keepDirtyValues){const Me=new Set([...c.mount,...Object.keys(qu(a,o))]);for(const Fe of Array.from(Me)){const Ve=ke(n.dirtyFields,Fe),Et=ke(o,Fe),bt=ke(Te,Fe);Ve&&!Kt(Et)?Pt(Te,Fe,Et):!Ve&&!Kt(bt)&&X(Fe,bt)}}else{if($A&&Kt(H))for(const Me of c.mount){const Fe=ke(r,Me);if(Fe&&Fe._f){const Ve=Array.isArray(Fe._f.refs)?Fe._f.refs[0]:Fe._f.ref;if($p(Ve)){const Et=Ve.closest("form");if(Et){Et.reset();break}}}}if(ee.keepFieldsRef)for(const Me of c.mount)X(Me,ke(Te,Me));else r={}}o=t.shouldUnregister?ee.keepDefaultValues?dn(a):{}:dn(Te),x.array.next({values:{...Te}}),x.state.next({values:{...Te}})}c={mount:ee.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!ee.keepIsValid||!!ee.keepDirtyValues||!t.shouldUnregister&&!Zn(Te),l.watch=!!t.shouldUnregister,l.keepIsValid=!!ee.keepIsValid,l.action=!1,ee.keepErrors||(n.errors={}),x.state.next({submitCount:ee.keepSubmitCount?n.submitCount:0,isDirty:je?!1:ee.keepDirty?n.isDirty:!!(ee.keepDefaultValues&&!Cr(H,a)),isSubmitted:ee.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:ee.keepDirtyValues?ee.keepDefaultValues&&o?qu(a,o):n.dirtyFields:ee.keepDefaultValues&&H?qu(a,H):ee.keepDirty?n.dirtyFields:{},touchedFields:ee.keepTouched?n.touchedFields:{},errors:ee.keepErrors?n.errors:{},isSubmitSuccessful:ee.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},ct=(H,ee)=>qt(Xn(H)?H(o):H,{...t.resetOptions,...ee}),pn=(H,ee={})=>{const te=ke(r,H),Ce=te&&te._f;if(Ce){const je=Ce.refs?Ce.refs[0]:Ce.ref;je.focus&&setTimeout(()=>{je.focus(),ee.shouldSelect&&Xn(je.select)&&je.select()})}},an=H=>{n={...n,...H}},An={control:{register:Ue,unregister:Se,getFieldState:ve,handleSubmit:et,setError:ue,_subscribe:se,_runSchema:z,_updateIsValidating:O,_focusError:$e,_getWatch:G,_getDirty:q,_setValid:w,_setFieldArray:T,_setDisabledField:ne,_setErrors:j,_getFieldArray:$,_reset:qt,_resetDefaultValues:()=>Xn(t.defaultValues)&&t.defaultValues().then(H=>{ct(H,t.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:B,_disableForm:rt,_subjects:x,_proxyFormState:h,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(H){l=H},get _defaultValues(){return a},get _names(){return c},set _names(H){c=H},get _formState(){return n},get _options(){return t},set _options(H){t={...t,...H}}},subscribe:_e,trigger:Q,register:Ue,handleSubmit:et,watch:xe,setValue:X,setValues:oe,getValues:ce,reset:ct,resetField:tt,clearErrors:fe,unregister:Se,setError:ue,setFocus:pn,getFieldState:ve};return{...An,formControl:An}}function wo(e={}){const t=L.useRef(void 0),n=L.useRef(void 0),[r,a]=L.useState(()=>({...dn(n3),isLoading:Xn(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Xn(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Xn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=gX(e);t.current={...c,formState:r}}const o=t.current.control;return o._options=e,BA(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(c=>({...c,isReady:!0})),o._formState.isReady=!0,l},[o]),L.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),L.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),L.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),L.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),L.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),L.useEffect(()=>{var l;e.values&&!Cr(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((l=o._options.resetOptions)===null||l===void 0)&&l.keepIsValid||o._setValid(),n.current=e.values,a(c=>({...c}))):o._resetDefaultValues()},[o,e.values]),L.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=L.useMemo(()=>ZI(r,o),[o,r]),t.current}const pR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ke(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},pS=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?pR(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>pR(a,n,e))}},mR=(e,t)=>{t.shouldUseNativeValidation&&pS(e,t);const n={};for(const r in e){const a=ke(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(yX(t.names||Object.keys(e),r)){const l=Object.assign({},ke(n,r));Pt(l,"root",o),Pt(n,r,l)}else Pt(n,r,o)}return n},yX=(e,t)=>{const n=vR(t);return e.some(r=>vR(r).match(`^${n}\\.\\d+`))};function vR(e){return e.replace(/\]|\[/g,"")}var gR;function we(e,t,n){function r(c,f){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,f);const d=l.prototype,m=Object.keys(d);for(let h=0;h<m.length;h++){const g=m[h];g in c||(c[g]=d[g].bind(c))}}const a=(n==null?void 0:n.Parent)??Object;class o extends a{}Object.defineProperty(o,"name",{value:e});function l(c){var f;const d=n!=null&&n.Parent?new o:this;r(d,c),(f=d._zod).deferred??(f.deferred=[]);for(const m of d._zod.deferred)m();return d}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>{var f,d;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(d=(f=c==null?void 0:c._zod)==null?void 0:f.traits)==null?void 0:d.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Ll extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class r3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(gR=globalThis).__zod_globalConfig??(gR.__zod_globalConfig={});const VA=globalThis.__zod_globalConfig;function bs(e){return VA}function a3(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function mS(e,t){return typeof t=="bigint"?t.toString():t}function GA(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function WA(e){return e==null}function YA(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const yR=Symbol("evaluating");function Bt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==yR)return r===void 0&&(r=yR,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ds(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ro(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function bR(e){return JSON.stringify(e)}function bX(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const i3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Lp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const xX=GA(()=>{var e;if(VA.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function lf(e){if(Lp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Lp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function o3(e){return lf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const wX=new Set(["string","number","symbol"]);function hv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function No(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Ke(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function SX(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function _X(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Ro(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return Ds(this,"shape",l),l},checks:[]});return No(e,o)}function AX(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Ro(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return Ds(this,"shape",l),l},checks:[]});return No(e,o)}function OX(e,t){if(!lf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(o,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Ro(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ds(this,"shape",o),o}});return No(e,a)}function EX(e,t){if(!lf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ro(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ds(this,"shape",r),r}});return No(e,n)}function TX(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Ro(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Ds(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return No(e,n)}function jX(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Ro(t._zod.def,{get shape(){const c=t._zod.def.shape,f={...c};if(n)for(const d in n){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(f[d]=e?new e({type:"optional",innerType:c[d]}):c[d])}else for(const d in c)f[d]=e?new e({type:"optional",innerType:c[d]}):c[d];return Ds(this,"shape",f),f},checks:[]});return No(t,l)}function CX(e,t,n){const r=Ro(t._zod.def,{get shape(){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)o[l]=new e({type:"nonoptional",innerType:a[l]});return Ds(this,"shape",o),o}});return No(t,r)}function Nl(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function RX(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function s3(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Zh(e){return typeof e=="string"?e:e==null?void 0:e.message}function xs(e,t,n){var f,d,m,h,g,x;const r=e.message?e.message:Zh((m=(d=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:d.error)==null?void 0:m.call(d,e))??Zh((h=t==null?void 0:t.error)==null?void 0:h.call(t,e))??Zh((g=n.customError)==null?void 0:g.call(n,e))??Zh((x=n.localeError)==null?void 0:x.call(n,e))??"Invalid input",{inst:a,continue:o,input:l,...c}=e;return c.path??(c.path=[]),c.message=r,t!=null&&t.reportInput&&(c.input=l),c}function ZA(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const l3=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},KA=we("$ZodError",l3),pv=we("$ZodError",l3,{Parent:Error});function NX(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function MX(e,t=n=>n.message){const n={_errors:[]},r=(a,o=[])=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>r({issues:c},[...o,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...o,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...o,...l.path]);else{const c=[...o,...l.path];if(c.length===0)n._errors.push(t(l));else{let f=n,d=0;for(;d<c.length;){const m=c[d];d===c.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(t(l))):f[m]=f[m]||{_errors:[]},f=f[m],d++}}}};return r(e),n}const mv=e=>(t,n,r,a)=>{const o=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Ll;if(l.issues.length){const c=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>xs(f,o,bs())));throw i3(c,a==null?void 0:a.callee),c}return l.value},PX=mv(pv),vv=e=>async(t,n,r,a)=>{const o=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>xs(f,o,bs())));throw i3(c,a==null?void 0:a.callee),c}return l.value},DX=vv(pv),gv=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ll;return o.issues.length?{success:!1,error:new(e??KA)(o.issues.map(l=>xs(l,a,bs())))}:{success:!0,data:o.value}},kX=gv(pv),yv=e=>async(t,n,r)=>{const a=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(l=>xs(l,a,bs())))}:{success:!0,data:o.value}},$X=yv(pv),zX=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return mv(e)(t,n,a)},LX=e=>(t,n,r)=>mv(e)(t,n,r),IX=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return vv(e)(t,n,a)},BX=e=>async(t,n,r)=>vv(e)(t,n,r),UX=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return gv(e)(t,n,a)},qX=e=>(t,n,r)=>gv(e)(t,n,r),HX=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return yv(e)(t,n,a)},FX=e=>async(t,n,r)=>yv(e)(t,n,r),VX=/^[cC][0-9a-z]{6,}$/,GX=/^[0-9a-z]+$/,WX=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,YX=/^[0-9a-vA-V]{20}$/,ZX=/^[A-Za-z0-9]{27}$/,KX=/^[a-zA-Z0-9_-]{21}$/,XX=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,QX=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xR=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,JX=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tQ(){return new RegExp(eQ,"u")}const nQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rQ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,aQ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,iQ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,oQ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,c3=/^[A-Za-z0-9_-]*$/,sQ=/^https?$/,lQ=/^\+[1-9]\d{6,14}$/,u3="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",cQ=new RegExp(`^${u3}$`);function f3(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function uQ(e){return new RegExp(`^${f3(e)}$`)}function fQ(e){const t=f3({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${u3}T(?:${r})$`)}const dQ=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},hQ=/^(?:true|false)$/i,pQ=/^[^A-Z]*$/,mQ=/^[^a-z]*$/,Qa=we("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vQ=we("$ZodCheckMaxLength",(e,t)=>{var n;Qa.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!WA(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=ZA(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),gQ=we("$ZodCheckMinLength",(e,t)=>{var n;Qa.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!WA(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=ZA(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),yQ=we("$ZodCheckLengthEquals",(e,t)=>{var n;Qa.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!WA(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,o=a.length;if(o===t.length)return;const l=ZA(a),c=o>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),bv=we("$ZodCheckStringFormat",(e,t)=>{var n,r;Qa.init(e,t),e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),bQ=we("$ZodCheckRegex",(e,t)=>{bv.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xQ=we("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=pQ),bv.init(e,t)}),wQ=we("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=mQ),bv.init(e,t)}),SQ=we("$ZodCheckIncludes",(e,t)=>{Qa.init(e,t);const n=hv(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),_Q=we("$ZodCheckStartsWith",(e,t)=>{Qa.init(e,t);const n=new RegExp(`^${hv(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),AQ=we("$ZodCheckEndsWith",(e,t)=>{Qa.init(e,t);const n=new RegExp(`.*${hv(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),OQ=we("$ZodCheckOverwrite",(e,t)=>{Qa.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class EQ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
345
- `).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),o=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of o)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...n,a.join(`
346
- `))}}const TQ={major:4,minor:4,patch:3},Sn=we("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=TQ;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const l of o._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const o=(c,f,d)=>{let m=Nl(c),h;for(const g of f){if(g._zod.def.when){if(RX(c)||!g._zod.def.when(c))continue}else if(m)continue;const x=c.issues.length,A=g._zod.check(c);if(A instanceof Promise&&(d==null?void 0:d.async)===!1)throw new Ll;if(h||A instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await A,c.issues.length!==x&&(m||(m=Nl(c,x)))});else{if(c.issues.length===x)continue;m||(m=Nl(c,x))}}return h?h.then(()=>c):c},l=(c,f,d)=>{if(Nl(c))return c.aborted=!0,c;const m=o(f,r,d);if(m instanceof Promise){if(d.async===!1)throw new Ll;return m.then(h=>e._zod.parse(h,d))}return e._zod.parse(m,d)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const m=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return m instanceof Promise?m.then(h=>l(h,c,f)):l(m,c,f)}const d=e._zod.parse(c,f);if(d instanceof Promise){if(f.async===!1)throw new Ll;return d.then(m=>o(m,r,f))}return o(d,r,f)}}Bt(e,"~standard",()=>({validate:o=>{var l;try{const c=kX(e,o);return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}}catch{return $X(e,o).then(f=>{var d;return f.success?{value:f.data}:{issues:(d=f.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),XA=we("$ZodString",(e,t)=>{var n;Sn.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??dQ(e._zod.bag),e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),tn=we("$ZodStringFormat",(e,t)=>{bv.init(e,t),XA.init(e,t)}),jQ=we("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=QX),tn.init(e,t)}),CQ=we("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=xR(r))}else t.pattern??(t.pattern=xR());tn.init(e,t)}),RQ=we("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=JX),tn.init(e,t)}),NQ=we("$ZodURL",(e,t)=>{tn.init(e,t),e._zod.check=n=>{var r;try{const a=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===sQ.source&&!/^https?:\/\//i.test(a)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const o=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),MQ=we("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=tQ()),tn.init(e,t)}),PQ=we("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=KX),tn.init(e,t)}),DQ=we("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=VX),tn.init(e,t)}),kQ=we("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=GX),tn.init(e,t)}),$Q=we("$ZodULID",(e,t)=>{t.pattern??(t.pattern=WX),tn.init(e,t)}),zQ=we("$ZodXID",(e,t)=>{t.pattern??(t.pattern=YX),tn.init(e,t)}),LQ=we("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ZX),tn.init(e,t)}),IQ=we("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fQ(t)),tn.init(e,t)}),BQ=we("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cQ),tn.init(e,t)}),UQ=we("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=uQ(t)),tn.init(e,t)}),qQ=we("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=XX),tn.init(e,t)}),HQ=we("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=nQ),tn.init(e,t),e._zod.bag.format="ipv4"}),FQ=we("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=rQ),tn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),VQ=we("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=aQ),tn.init(e,t)}),GQ=we("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=iQ),tn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,o]=r;if(!o)throw new Error;const l=Number(o);if(`${l}`!==o)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function d3(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const WQ=we("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=oQ),tn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{d3(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function YQ(e){if(!c3.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return d3(n)}const ZQ=we("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=c3),tn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{YQ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),KQ=we("$ZodE164",(e,t)=>{t.pattern??(t.pattern=lQ),tn.init(e,t)});function XQ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const QQ=we("$ZodJWT",(e,t)=>{tn.init(e,t),e._zod.check=n=>{XQ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),JQ=we("$ZodBoolean",(e,t)=>{Sn.init(e,t),e._zod.pattern=hQ,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),eJ=we("$ZodUnknown",(e,t)=>{Sn.init(e,t),e._zod.parse=n=>n}),tJ=we("$ZodNever",(e,t)=>{Sn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function wR(e,t,n){e.issues.length&&t.issues.push(...s3(n,e.issues)),t.value[n]=e.value}const nJ=we("$ZodArray",(e,t)=>{Sn.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const o=[];for(let l=0;l<a.length;l++){const c=a[l],f=t.element._zod.run({value:c,issues:[]},r);f instanceof Promise?o.push(f.then(d=>wR(d,n,l))):wR(f,n,l)}return o.length?Promise.all(o).then(()=>n):n}});function Ip(e,t,n,r,a,o){const l=n in r;if(e.issues.length){if(a&&o&&!l)return;t.issues.push(...s3(n,e.issues))}if(!l&&!a){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function h3(e){var r,a,o,l;const t=Object.keys(e.shape);for(const c of t)if(!((l=(o=(a=(r=e.shape)==null?void 0:r[c])==null?void 0:a._zod)==null?void 0:o.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${c}": expected a Zod schema`);const n=SX(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function p3(e,t,n,r,a,o){const l=[],c=a.keySet,f=a.catchall._zod,d=f.def.type,m=f.optin==="optional",h=f.optout==="optional";for(const g in t){if(g==="__proto__"||c.has(g))continue;if(d==="never"){l.push(g);continue}const x=f.run({value:t[g],issues:[]},r);x instanceof Promise?e.push(x.then(A=>Ip(A,n,g,t,m,h))):Ip(x,n,g,t,m,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const rJ=we("$ZodObject",(e,t)=>{Sn.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...c};return Object.defineProperty(t,"shape",{value:f}),f}})}const r=GA(()=>h3(t));Bt(e._zod,"propValues",()=>{const c=t.shape,f={};for(const d in c){const m=c[d]._zod;if(m.values){f[d]??(f[d]=new Set);for(const h of m.values)f[d].add(h)}}return f});const a=Lp,o=t.catchall;let l;e._zod.parse=(c,f)=>{l??(l=r.value);const d=c.value;if(!a(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const m=[],h=l.shape;for(const g of l.keys){const x=h[g],A=x._zod.optin==="optional",S=x._zod.optout==="optional",w=x._zod.run({value:d[g],issues:[]},f);w instanceof Promise?m.push(w.then(O=>Ip(O,c,g,d,A,S))):Ip(w,c,g,d,A,S)}return o?p3(m,d,c,f,r.value,e):m.length?Promise.all(m).then(()=>c):c}}),aJ=we("$ZodObjectJIT",(e,t)=>{rJ.init(e,t);const n=e._zod.parse,r=GA(()=>h3(t)),a=g=>{var T,C;const x=new EQ(["shape","payload","ctx"]),A=r.value,S=j=>{const R=bR(j);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};x.write("const input = payload.value;");const w=Object.create(null);let O=0;for(const j of A.keys)w[j]=`key_${O++}`;x.write("const newResult = {};");for(const j of A.keys){const R=w[j],N=bR(j),D=g[j],z=((T=D==null?void 0:D._zod)==null?void 0:T.optin)==="optional",V=((C=D==null?void 0:D._zod)==null?void 0:C.optout)==="optional";x.write(`const ${R} = ${S(j)};`),z&&V?x.write(`
347
- if (${R}.issues.length) {
348
- if (${N} in input) {
349
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
350
- ...iss,
351
- path: iss.path ? [${N}, ...iss.path] : [${N}]
352
- })));
353
- }
354
- }
355
-
356
- if (${R}.value === undefined) {
357
- if (${N} in input) {
358
- newResult[${N}] = undefined;
359
- }
360
- } else {
361
- newResult[${N}] = ${R}.value;
362
- }
363
-
364
- `):z?x.write(`
365
- if (${R}.issues.length) {
366
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
367
- ...iss,
368
- path: iss.path ? [${N}, ...iss.path] : [${N}]
369
- })));
370
- }
371
-
372
- if (${R}.value === undefined) {
373
- if (${N} in input) {
374
- newResult[${N}] = undefined;
375
- }
376
- } else {
377
- newResult[${N}] = ${R}.value;
378
- }
379
-
380
- `):x.write(`
381
- const ${R}_present = ${N} in input;
382
- if (${R}.issues.length) {
383
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
384
- ...iss,
385
- path: iss.path ? [${N}, ...iss.path] : [${N}]
386
- })));
387
- }
388
- if (!${R}_present && !${R}.issues.length) {
389
- payload.issues.push({
390
- code: "invalid_type",
391
- expected: "nonoptional",
392
- input: undefined,
393
- path: [${N}]
394
- });
395
- }
396
-
397
- if (${R}_present) {
398
- if (${R}.value === undefined) {
399
- newResult[${N}] = undefined;
400
- } else {
401
- newResult[${N}] = ${R}.value;
402
- }
403
- }
404
-
405
- `)}x.write("payload.value = newResult;"),x.write("return payload;");const E=x.compile();return(j,R)=>E(g,j,R)};let o;const l=Lp,c=!VA.jitless,d=c&&xX.value,m=t.catchall;let h;e._zod.parse=(g,x)=>{h??(h=r.value);const A=g.value;return l(A)?c&&d&&(x==null?void 0:x.async)===!1&&x.jitless!==!0?(o||(o=a(t.shape)),g=o(g,x),m?p3([],A,g,x,h,e):g):n(g,x):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function SR(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const a=e.filter(o=>!Nl(o));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(l=>xs(l,r,bs())))}),t)}const iJ=we("$ZodUnion",(e,t)=>{Sn.init(e,t),Bt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Bt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Bt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Bt(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${r.map(a=>YA(a.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,a)=>{if(n)return n(r,a);let o=!1;const l=[];for(const c of t.options){const f=c._zod.run({value:r.value,issues:[]},a);if(f instanceof Promise)l.push(f),o=!0;else{if(f.issues.length===0)return f;l.push(f)}}return o?Promise.all(l).then(c=>SR(c,r,e,a)):SR(l,r,e,a)}}),oJ=we("$ZodIntersection",(e,t)=>{Sn.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,o=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return o instanceof Promise||l instanceof Promise?Promise.all([o,l]).then(([f,d])=>_R(n,f,d)):_R(n,o,l)}});function vS(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lf(e)&&lf(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),a={...e,...t};for(const o of r){const l=vS(e[o],t[o]);if(!l.valid)return{valid:!1,mergeErrorPath:[o,...l.mergeErrorPath]};a[o]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],o=t[r],l=vS(a,o);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function _R(e,t,n){const r=new Map;let a;for(const c of t.issues)if(c.code==="unrecognized_keys"){a??(a=c);for(const f of c.keys)r.has(f)||r.set(f,{}),r.get(f).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const f of c.keys)r.has(f)||r.set(f,{}),r.get(f).r=!0;else e.issues.push(c);const o=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&a&&e.issues.push({...a,keys:o}),Nl(e))return e;const l=vS(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const sJ=we("$ZodEnum",(e,t)=>{Sn.init(e,t);const n=a3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>wX.has(typeof a)).map(a=>typeof a=="string"?hv(a):a.toString()).join("|")})$`),e._zod.parse=(a,o)=>{const l=a.value;return r.has(l)||a.issues.push({code:"invalid_value",values:n,input:l,inst:e}),a}}),lJ=we("$ZodTransform",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new r3(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n.fallback=!0,n));if(a instanceof Promise)throw new Ll;return n.value=a,n.fallback=!0,n}});function AR(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const m3=we("$ZodOptional",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Bt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Bt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${YA(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=n.value,o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>AR(l,a)):AR(o,a)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),cJ=we("$ZodExactOptional",(e,t)=>{m3.init(e,t),Bt(e._zod,"values",()=>t.innerType._zod.values),Bt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),uJ=we("$ZodNullable",(e,t)=>{Sn.init(e,t),Bt(e._zod,"optin",()=>t.innerType._zod.optin),Bt(e._zod,"optout",()=>t.innerType._zod.optout),Bt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${YA(n.source)}|null)$`):void 0}),Bt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),fJ=we("$ZodDefault",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",Bt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>OR(o,t)):OR(a,t)}});function OR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const dJ=we("$ZodPrefault",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",Bt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),hJ=we("$ZodNonOptional",(e,t)=>{Sn.init(e,t),Bt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>ER(o,e)):ER(a,e)}});function ER(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const pJ=we("$ZodCatch",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",Bt(e._zod,"optout",()=>t.innerType._zod.optout),Bt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>xs(l,r,bs()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(o=>xs(o,r,bs()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),mJ=we("$ZodPipe",(e,t)=>{Sn.init(e,t),Bt(e._zod,"values",()=>t.in._zod.values),Bt(e._zod,"optin",()=>t.in._zod.optin),Bt(e._zod,"optout",()=>t.out._zod.optout),Bt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(l=>Kh(l,t.in,r)):Kh(o,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(o=>Kh(o,t.out,r)):Kh(a,t.out,r)}});function Kh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const vJ=we("$ZodReadonly",(e,t)=>{Sn.init(e,t),Bt(e._zod,"propValues",()=>t.innerType._zod.propValues),Bt(e._zod,"values",()=>t.innerType._zod.values),Bt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),Bt(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(TR):TR(a)}});function TR(e){return e.value=Object.freeze(e.value),e}const gJ=we("$ZodCustom",(e,t)=>{Qa.init(e,t),Sn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(o=>jR(o,n,r,e));jR(a,n,r,e)}});function jR(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(cf(a))}}var CR;class yJ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function bJ(){return new yJ}(CR=globalThis).__zod_globalRegistry??(CR.__zod_globalRegistry=bJ());const Hu=globalThis.__zod_globalRegistry;function xJ(e,t){return new e({type:"string",...Ke(t)})}function wJ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ke(t)})}function RR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ke(t)})}function SJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ke(t)})}function _J(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ke(t)})}function AJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ke(t)})}function OJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ke(t)})}function EJ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ke(t)})}function TJ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ke(t)})}function jJ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ke(t)})}function CJ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ke(t)})}function RJ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ke(t)})}function NJ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ke(t)})}function MJ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ke(t)})}function PJ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ke(t)})}function DJ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ke(t)})}function kJ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ke(t)})}function $J(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ke(t)})}function zJ(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ke(t)})}function LJ(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ke(t)})}function IJ(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ke(t)})}function BJ(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ke(t)})}function UJ(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ke(t)})}function qJ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ke(t)})}function HJ(e,t){return new e({type:"string",format:"date",check:"string_format",...Ke(t)})}function FJ(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ke(t)})}function VJ(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ke(t)})}function GJ(e,t){return new e({type:"boolean",...Ke(t)})}function WJ(e){return new e({type:"unknown"})}function YJ(e,t){return new e({type:"never",...Ke(t)})}function v3(e,t){return new vQ({check:"max_length",...Ke(t),maximum:e})}function Bp(e,t){return new gQ({check:"min_length",...Ke(t),minimum:e})}function g3(e,t){return new yQ({check:"length_equals",...Ke(t),length:e})}function ZJ(e,t){return new bQ({check:"string_format",format:"regex",...Ke(t),pattern:e})}function KJ(e){return new xQ({check:"string_format",format:"lowercase",...Ke(e)})}function XJ(e){return new wQ({check:"string_format",format:"uppercase",...Ke(e)})}function QJ(e,t){return new SQ({check:"string_format",format:"includes",...Ke(t),includes:e})}function JJ(e,t){return new _Q({check:"string_format",format:"starts_with",...Ke(t),prefix:e})}function eee(e,t){return new AQ({check:"string_format",format:"ends_with",...Ke(t),suffix:e})}function Ec(e){return new OQ({check:"overwrite",tx:e})}function tee(e){return Ec(t=>t.normalize(e))}function nee(){return Ec(e=>e.trim())}function ree(){return Ec(e=>e.toLowerCase())}function aee(){return Ec(e=>e.toUpperCase())}function iee(){return Ec(e=>bX(e))}function oee(e,t,n){return new e({type:"array",element:t,...Ke(n)})}function see(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ke(n)})}function lee(e,t){const n=cee(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(cf(a,r.value,n._zod.def));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(cf(o))}},e(r.value,r)),t);return n}function cee(e,t){const n=new Qa({check:"custom",...Ke(t)});return n._zod.check=e,n}function y3(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Hu,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Vn(e,t,n={path:[],schemaPath:[]}){var m,h;var r;const a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=(h=(m=e._zod).toJSONSchema)==null?void 0:h.call(m);if(c)l.schema=c;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const A=l.schema,S=t.processors[a.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);S(e,t,A,g)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),Vn(x,t,g),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&nr(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function b3(e,t){var l,c,f,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const m of e.seen.entries()){const h=(l=e.metadataRegistry.get(m[0]))==null?void 0:l.id;if(h){const g=r.get(h);if(g&&g!==m[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,m[0])}}const a=m=>{var S;const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const w=(S=e.external.registry.get(m[0]))==null?void 0:S.id,O=e.external.uri??(T=>T);if(w)return{ref:O(w)};const E=m[1].defId??m[1].schema.id??`schema${e.counter++}`;return m[1].defId=E,{defId:E,ref:`${O("__shared")}#/${h}/${E}`}}if(m[1]===n)return{ref:"#"};const x=`#/${h}/`,A=m[1].schema.id??`__schema${e.counter++}`;return{defId:A,ref:x+A}},o=m=>{if(m[1].schema.$ref)return;const h=m[1],{ref:g,defId:x}=a(m);h.def={...h.schema},x&&(h.defId=x);const A=h.schema;for(const S in A)delete A[S];A.$ref=g};if(e.cycles==="throw")for(const m of e.seen.entries()){const h=m[1];if(h.cycle)throw new Error(`Cycle detected: #/${(c=h.cycle)==null?void 0:c.join("/")}/<root>
406
-
407
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of e.seen.entries()){const h=m[1];if(t===m[0]){o(m);continue}if(e.external){const x=(f=e.external.registry.get(m[0]))==null?void 0:f.id;if(t!==m[0]&&x){o(m);continue}}if((d=e.metadataRegistry.get(m[0]))==null?void 0:d.id){o(m);continue}if(h.cycle){o(m);continue}if(h.count>1&&e.reused==="ref"){o(m);continue}}}function x3(e,t){var c,f,d,m;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const g=e.seen.get(h);if(g.ref===null)return;const x=g.def??g.schema,A={...x},S=g.ref;if(g.ref=null,S){r(S);const O=e.seen.get(S),E=O.schema;if(E.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(x.allOf=x.allOf??[],x.allOf.push(E)):Object.assign(x,E),Object.assign(x,A),h._zod.parent===S)for(const C in x)C==="$ref"||C==="allOf"||C in A||delete x[C];if(E.$ref&&O.def)for(const C in x)C==="$ref"||C==="allOf"||C in O.def&&JSON.stringify(x[C])===JSON.stringify(O.def[C])&&delete x[C]}const w=h._zod.parent;if(w&&w!==S){r(w);const O=e.seen.get(w);if(O!=null&&O.schema.$ref&&(x.$ref=O.schema.$ref,O.def))for(const E in x)E==="$ref"||E==="allOf"||E in O.def&&JSON.stringify(x[E])===JSON.stringify(O.def[E])&&delete x[E]}e.override({zodSchema:h,jsonSchema:x,path:g.path??[]})};for(const h of[...e.seen.entries()].reverse())r(h[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const h=(f=e.external.registry.get(t))==null?void 0:f.id;if(!h)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(h)}Object.assign(a,n.def??n.schema);const o=(d=e.metadataRegistry.get(t))==null?void 0:d.id;o!==void 0&&a.id===o&&delete a.id;const l=((m=e.external)==null?void 0:m.defs)??{};for(const h of e.seen.entries()){const g=h[1];g.def&&g.defId&&(g.def.id===g.defId&&delete g.def.id,l[g.defId]=g.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?a.$defs=l:a.definitions=l);try{const h=JSON.parse(JSON.stringify(a));return Object.defineProperty(h,"~standard",{value:{...t["~standard"],jsonSchema:{input:Up(t,"input",e.processors),output:Up(t,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function nr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return nr(r.element,n);if(r.type==="set")return nr(r.valueType,n);if(r.type==="lazy")return nr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return nr(r.innerType,n);if(r.type==="intersection")return nr(r.left,n)||nr(r.right,n);if(r.type==="record"||r.type==="map")return nr(r.keyType,n)||nr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:nr(r.in,n)||nr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(nr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(nr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(nr(a,n))return!0;return!!(r.rest&&nr(r.rest,n))}return!1}const uee=(e,t={})=>n=>{const r=y3({...n,processors:t});return Vn(e,r),b3(r,e),x3(r,e)},Up=(e,t,n={})=>r=>{const{libraryOptions:a,target:o}=r??{},l=y3({...a??{},target:o,io:t,processors:n});return Vn(e,l),b3(l,e),x3(l,e)},fee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},dee=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:o,maximum:l,format:c,patterns:f,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof l=="number"&&(a.maxLength=l),c&&(a.format=fee[c]??c,a.format===""&&delete a.format,c==="time"&&delete a.format),d&&(a.contentEncoding=d),f&&f.size>0){const m=[...f];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},hee=(e,t,n,r)=>{n.type="boolean"},pee=(e,t,n,r)=>{n.not={}},mee=(e,t,n,r)=>{},vee=(e,t,n,r)=>{const a=e._zod.def,o=a3(a.entries);o.every(l=>typeof l=="number")&&(n.type="number"),o.every(l=>typeof l=="string")&&(n.type="string"),n.enum=o},gee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},yee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bee=(e,t,n,r)=>{const a=n,o=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof c=="number"&&(a.maxItems=c),a.type="array",a.items=Vn(o.element,t,{...r,path:[...r.path,"items"]})},xee=(e,t,n,r)=>{var d;const a=n,o=e._zod.def;a.type="object",a.properties={};const l=o.shape;for(const m in l)a.properties[m]=Vn(l[m],t,{...r,path:[...r.path,"properties",m]});const c=new Set(Object.keys(l)),f=new Set([...c].filter(m=>{const h=o.shape[m]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));f.size>0&&(a.required=Array.from(f)),((d=o.catchall)==null?void 0:d._zod.def.type)==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=Vn(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},wee=(e,t,n,r)=>{const a=e._zod.def,o=a.inclusive===!1,l=a.options.map((c,f)=>Vn(c,t,{...r,path:[...r.path,o?"oneOf":"anyOf",f]}));o?n.oneOf=l:n.anyOf=l},See=(e,t,n,r)=>{const a=e._zod.def,o=Vn(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Vn(a.right,t,{...r,path:[...r.path,"allOf",1]}),c=d=>"allOf"in d&&Object.keys(d).length===1,f=[...c(o)?o.allOf:[o],...c(l)?l.allOf:[l]];n.allOf=f},_ee=(e,t,n,r)=>{const a=e._zod.def,o=Vn(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Aee=(e,t,n,r)=>{const a=e._zod.def;Vn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType},Oee=(e,t,n,r)=>{const a=e._zod.def;Vn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},Eee=(e,t,n,r)=>{const a=e._zod.def;Vn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},Tee=(e,t,n,r)=>{const a=e._zod.def;Vn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},jee=(e,t,n,r)=>{const a=e._zod.def,o=a.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?o?a.out:a.in:a.out;Vn(l,t,r);const c=t.seen.get(e);c.ref=l},Cee=(e,t,n,r)=>{const a=e._zod.def;Vn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.readOnly=!0},w3=(e,t,n,r)=>{const a=e._zod.def;Vn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType};function NR(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Ree(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(h){return e.push(h)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=qA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function Nee(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(h){return e.push(h)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=qA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function So(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,a,o){try{return Promise.resolve(NR(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&pS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c==null?void 0:c.issues)})(l))return{values:{},errors:mR(Ree(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,o){try{return Promise.resolve(NR(function(){return Promise.resolve((n.mode==="sync"?PX:DX)(e,r,t)).then(function(l){return o.shouldUseNativeValidation&&pS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof KA})(l))return{values:{},errors:mR(Nee(l.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}const Mee=we("ZodISODateTime",(e,t)=>{IQ.init(e,t),rn.init(e,t)});function Pee(e){return qJ(Mee,e)}const Dee=we("ZodISODate",(e,t)=>{BQ.init(e,t),rn.init(e,t)});function kee(e){return HJ(Dee,e)}const $ee=we("ZodISOTime",(e,t)=>{UQ.init(e,t),rn.init(e,t)});function zee(e){return FJ($ee,e)}const Lee=we("ZodISODuration",(e,t)=>{qQ.init(e,t),rn.init(e,t)});function Iee(e){return VJ(Lee,e)}const Bee=(e,t)=>{KA.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>MX(e,n)},flatten:{value:n=>NX(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,mS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,mS,2)}},isEmpty:{get(){return e.issues.length===0}}})},oa=we("ZodError",Bee,{Parent:Error}),Uee=mv(oa),qee=vv(oa),Hee=gv(oa),Fee=yv(oa),Vee=zX(oa),Gee=LX(oa),Wee=IX(oa),Yee=BX(oa),Zee=UX(oa),Kee=qX(oa),Xee=HX(oa),Qee=FX(oa),MR=new WeakMap;function xv(e,t,n){const r=Object.getPrototypeOf(e);let a=MR.get(r);if(a||(a=new Set,MR.set(r,a)),!a.has(t)){a.add(t);for(const o in n){const l=n[o];Object.defineProperty(r,o,{configurable:!0,enumerable:!1,get(){const c=l.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}const _n=we("ZodType",(e,t)=>(Sn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Up(e,"input"),output:Up(e,"output")}}),e.toJSONSchema=uee(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Uee(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Hee(e,n,r),e.parseAsync=async(n,r)=>qee(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Fee(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Vee(e,n,r),e.decode=(n,r)=>Gee(e,n,r),e.encodeAsync=async(n,r)=>Wee(e,n,r),e.decodeAsync=async(n,r)=>Yee(e,n,r),e.safeEncode=(n,r)=>Zee(e,n,r),e.safeDecode=(n,r)=>Kee(e,n,r),e.safeEncodeAsync=async(n,r)=>Xee(e,n,r),e.safeDecodeAsync=async(n,r)=>Qee(e,n,r),xv(e,"ZodType",{check(...n){const r=this.def;return this.clone(Ro(r,{checks:[...r.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return No(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Vte(n,r))},superRefine(n,r){return this.check(Gte(n,r))},overwrite(n){return this.check(Ec(n))},optional(){return kR(this)},exactOptional(){return Pte(this)},nullable(){return $R(this)},nullish(){return kR($R(this))},nonoptional(n){return Ite(this,n)},array(){return _te(this)},or(n){return Ete([this,n])},and(n){return jte(this,n)},transform(n){return zR(this,Nte(n))},default(n){return $te(this,n)},prefault(n){return Lte(this,n)},catch(n){return Ute(this,n)},pipe(n){return zR(this,n)},readonly(){return Fte(this)},describe(n){const r=this.clone();return Hu.add(r,{description:n}),r},meta(...n){if(n.length===0)return Hu.get(this);const r=this.clone();return Hu.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=Hu.get(e))==null?void 0:n.description},configurable:!0}),e)),S3=we("_ZodString",(e,t)=>{XA.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(r,a,o)=>dee(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,xv(e,"_ZodString",{regex(...r){return this.check(ZJ(...r))},includes(...r){return this.check(QJ(...r))},startsWith(...r){return this.check(JJ(...r))},endsWith(...r){return this.check(eee(...r))},min(...r){return this.check(Bp(...r))},max(...r){return this.check(v3(...r))},length(...r){return this.check(g3(...r))},nonempty(...r){return this.check(Bp(1,...r))},lowercase(r){return this.check(KJ(r))},uppercase(r){return this.check(XJ(r))},trim(){return this.check(nee())},normalize(...r){return this.check(tee(...r))},toLowerCase(){return this.check(ree())},toUpperCase(){return this.check(aee())},slugify(){return this.check(iee())}})}),Jee=we("ZodString",(e,t)=>{XA.init(e,t),S3.init(e,t),e.email=n=>e.check(wJ(ete,n)),e.url=n=>e.check(EJ(tte,n)),e.jwt=n=>e.check(UJ(vte,n)),e.emoji=n=>e.check(TJ(nte,n)),e.guid=n=>e.check(RR(PR,n)),e.uuid=n=>e.check(SJ(Xh,n)),e.uuidv4=n=>e.check(_J(Xh,n)),e.uuidv6=n=>e.check(AJ(Xh,n)),e.uuidv7=n=>e.check(OJ(Xh,n)),e.nanoid=n=>e.check(jJ(rte,n)),e.guid=n=>e.check(RR(PR,n)),e.cuid=n=>e.check(CJ(ate,n)),e.cuid2=n=>e.check(RJ(ite,n)),e.ulid=n=>e.check(NJ(ote,n)),e.base64=n=>e.check(LJ(hte,n)),e.base64url=n=>e.check(IJ(pte,n)),e.xid=n=>e.check(MJ(ste,n)),e.ksuid=n=>e.check(PJ(lte,n)),e.ipv4=n=>e.check(DJ(cte,n)),e.ipv6=n=>e.check(kJ(ute,n)),e.cidrv4=n=>e.check($J(fte,n)),e.cidrv6=n=>e.check(zJ(dte,n)),e.e164=n=>e.check(BJ(mte,n)),e.datetime=n=>e.check(Pee(n)),e.date=n=>e.check(kee(n)),e.time=n=>e.check(zee(n)),e.duration=n=>e.check(Iee(n))});function Hn(e){return xJ(Jee,e)}const rn=we("ZodStringFormat",(e,t)=>{tn.init(e,t),S3.init(e,t)}),ete=we("ZodEmail",(e,t)=>{RQ.init(e,t),rn.init(e,t)}),PR=we("ZodGUID",(e,t)=>{jQ.init(e,t),rn.init(e,t)}),Xh=we("ZodUUID",(e,t)=>{CQ.init(e,t),rn.init(e,t)}),tte=we("ZodURL",(e,t)=>{NQ.init(e,t),rn.init(e,t)}),nte=we("ZodEmoji",(e,t)=>{MQ.init(e,t),rn.init(e,t)}),rte=we("ZodNanoID",(e,t)=>{PQ.init(e,t),rn.init(e,t)}),ate=we("ZodCUID",(e,t)=>{DQ.init(e,t),rn.init(e,t)}),ite=we("ZodCUID2",(e,t)=>{kQ.init(e,t),rn.init(e,t)}),ote=we("ZodULID",(e,t)=>{$Q.init(e,t),rn.init(e,t)}),ste=we("ZodXID",(e,t)=>{zQ.init(e,t),rn.init(e,t)}),lte=we("ZodKSUID",(e,t)=>{LQ.init(e,t),rn.init(e,t)}),cte=we("ZodIPv4",(e,t)=>{HQ.init(e,t),rn.init(e,t)}),ute=we("ZodIPv6",(e,t)=>{FQ.init(e,t),rn.init(e,t)}),fte=we("ZodCIDRv4",(e,t)=>{VQ.init(e,t),rn.init(e,t)}),dte=we("ZodCIDRv6",(e,t)=>{GQ.init(e,t),rn.init(e,t)}),hte=we("ZodBase64",(e,t)=>{WQ.init(e,t),rn.init(e,t)}),pte=we("ZodBase64URL",(e,t)=>{ZQ.init(e,t),rn.init(e,t)}),mte=we("ZodE164",(e,t)=>{KQ.init(e,t),rn.init(e,t)}),vte=we("ZodJWT",(e,t)=>{QQ.init(e,t),rn.init(e,t)}),gte=we("ZodBoolean",(e,t)=>{JQ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hee(e,n,r)});function yte(e){return GJ(gte,e)}const bte=we("ZodUnknown",(e,t)=>{eJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mee()});function DR(){return WJ(bte)}const xte=we("ZodNever",(e,t)=>{tJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>pee(e,n,r)});function wte(e){return YJ(xte,e)}const Ste=we("ZodArray",(e,t)=>{nJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bee(e,n,r,a),e.element=t.element,xv(e,"ZodArray",{min(n,r){return this.check(Bp(n,r))},nonempty(n){return this.check(Bp(1,n))},max(n,r){return this.check(v3(n,r))},length(n,r){return this.check(g3(n,r))},unwrap(){return this.element}})});function _te(e,t){return oee(Ste,e,t)}const Ate=we("ZodObject",(e,t)=>{aJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>xee(e,n,r,a),Bt(e,"shape",()=>t.shape),xv(e,"ZodObject",{keyof(){return Cte(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:DR()})},loose(){return this.clone({...this._zod.def,catchall:DR()})},strict(){return this.clone({...this._zod.def,catchall:wte()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return OX(this,n)},safeExtend(n){return EX(this,n)},merge(n){return TX(this,n)},pick(n){return _X(this,n)},omit(n){return AX(this,n)},partial(...n){return jX(_3,this,n[0])},required(...n){return CX(A3,this,n[0])}})});function $i(e,t){const n={type:"object",shape:e??{},...Ke(t)};return new Ate(n)}const Ote=we("ZodUnion",(e,t)=>{iJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wee(e,n,r,a),e.options=t.options});function Ete(e,t){return new Ote({type:"union",options:e,...Ke(t)})}const Tte=we("ZodIntersection",(e,t)=>{oJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>See(e,n,r,a)});function jte(e,t){return new Tte({type:"intersection",left:e,right:t})}const gS=we("ZodEnum",(e,t)=>{sJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(r,a,o)=>vee(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const o={};for(const l of r)if(n.has(l))o[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new gS({...t,checks:[],...Ke(a),entries:o})},e.exclude=(r,a)=>{const o={...t.entries};for(const l of r)if(n.has(l))delete o[l];else throw new Error(`Key ${l} not found in enum`);return new gS({...t,checks:[],...Ke(a),entries:o})}});function Cte(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new gS({type:"enum",entries:n,...Ke(t)})}const Rte=we("ZodTransform",(e,t)=>{lJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>yee(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new r3(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(cf(o,n.value,t));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(cf(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function Nte(e){return new Rte({type:"transform",transform:e})}const _3=we("ZodOptional",(e,t)=>{m3.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>w3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function kR(e){return new _3({type:"optional",innerType:e})}const Mte=we("ZodExactOptional",(e,t)=>{cJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>w3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Pte(e){return new Mte({type:"optional",innerType:e})}const Dte=we("ZodNullable",(e,t)=>{uJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_ee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function $R(e){return new Dte({type:"nullable",innerType:e})}const kte=we("ZodDefault",(e,t)=>{fJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Oee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $te(e,t){return new kte({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():o3(t)}})}const zte=we("ZodPrefault",(e,t)=>{dJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Eee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Lte(e,t){return new zte({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():o3(t)}})}const A3=we("ZodNonOptional",(e,t)=>{hJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Aee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Ite(e,t){return new A3({type:"nonoptional",innerType:e,...Ke(t)})}const Bte=we("ZodCatch",(e,t)=>{pJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Tee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ute(e,t){return new Bte({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const qte=we("ZodPipe",(e,t)=>{mJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jee(e,n,r,a),e.in=t.in,e.out=t.out});function zR(e,t){return new qte({type:"pipe",in:e,out:t})}const Hte=we("ZodReadonly",(e,t)=>{vJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Cee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Fte(e){return new Hte({type:"readonly",innerType:e})}const O3=we("ZodCustom",(e,t)=>{gJ.init(e,t),_n.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gee(e,n)});function Vte(e,t={}){return see(O3,e,t)}function Gte(e,t){return lee(e,t)}function QA(e,t={}){const n=new O3({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ke(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Wte="Label",E3=y.forwardRef((e,t)=>v.jsx(d5.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())}}));E3.displayName=Wte;var T3=E3;const Yte=wc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ft=y.forwardRef(({className:e,...t},n)=>v.jsx(T3,{ref:n,className:be(Yte(),e),...t}));Ft.displayName=T3.displayName;const Zte=wc("rounded-lg bg-card text-card-foreground",{variants:{level:{0:"",1:"shadow-card-1",2:"shadow-card-2",3:"shadow-card-3",4:"shadow-card-4"}},defaultVariants:{level:2}}),Xr=y.forwardRef(({className:e,level:t,...n},r)=>v.jsx("div",{ref:r,className:be(Zte({level:t}),e),...n}));Xr.displayName="Card";const Qr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));Qr.displayName="CardHeader";const Jr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",e),...t}));Jr.displayName="CardTitle";const ws=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));ws.displayName="CardDescription";const Ba=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("p-6 pt-0",e),...t}));Ba.displayName="CardContent";const Kte=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));Kte.displayName="CardFooter";const Xte=$i({email:Hn().email(),password:Hn().min(8)});function Qte(){const e=Ka(),{resolvedTheme:t}=Gf(),n=t==="dark"?"/logo-dark.svg":"/logo.svg",{register:r,handleSubmit:a,setError:o,formState:{errors:l,isSubmitting:c}}=wo({resolver:So(Xte),mode:"onBlur"});async function f(d){try{const{status:m}=await UI.post("/api/v1/auth/login",{email:d.email,password:d.password});if(m!==200){o("root",{message:"Invalid email or password"});return}e("/app-center",{replace:!0})}catch{o("root",{message:"Network error. Please try again."})}}return v.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),v.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),v.jsxs(Xr,{level:4,className:"w-full",children:[v.jsxs(Qr,{className:"text-center",children:[v.jsx(Jr,{className:"text-2xl tracking-display-md",children:"Welcome back"}),v.jsx(ws,{children:"Sign in to your team workspace"})]}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:a(f),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"email",children:"Email"}),v.jsx(hn,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email",...r("email")}),l.email&&v.jsx("p",{className:"text-sm text-destructive",children:l.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"password",children:"Password"}),v.jsx(hn,{id:"password",type:"password",autoComplete:"current-password",...r("password")}),l.password&&v.jsx("p",{className:"text-sm text-destructive",children:l.password.message})]}),l.root&&v.jsx("p",{className:"text-sm text-destructive",children:l.root.message}),v.jsx(ut,{type:"submit",size:"pill",disabled:c,className:"w-full mt-1",children:c?"Signing in…":"Sign in"}),v.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["First time here?"," ",v.jsx("a",{href:"https://www.tapflow.dev/dashboard/setup.html",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-4 hover:text-foreground transition-colors",children:"Set up your workspace"})]})]})})]})]})})}const Jte=$i({displayName:Hn().optional(),avatar:QA(File).nullable().optional(),password:Hn().min(8),confirm:Hn()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function ene(){const e=Ka(),[t]=Ym(),n=t.get("token")??"",[r,a]=y.useState("loading"),[o,l]=y.useState(""),[c,f]=y.useState(null),d=y.useRef(null),{register:m,handleSubmit:h,control:g,setError:x,formState:{errors:A,isSubmitting:S}}=wo({resolver:So(Jte),mode:"onBlur",defaultValues:{displayName:"",avatar:null}}),w=UA({control:g,name:"displayName"})??"";y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/invitations/verify?token=${n}`).then(E=>E.ok?E.json():Promise.reject()).then(E=>{l(E.role),a("valid")}).catch(()=>a("invalid"))},[n]);async function O(E){var T;try{const C=new FormData;if(C.append("token",n),C.append("password",E.password),(T=E.displayName)!=null&&T.trim()&&C.append("display_name",E.displayName.trim()),E.avatar&&C.append("avatar",E.avatar),!(await fetch("/api/v1/invitations/accept",{method:"POST",body:C})).ok){x("root",{message:"Failed to accept invitation"});return}e("/app-center",{replace:!0})}catch{x("root",{message:"Network error. Please try again."})}}return r==="loading"?v.jsx("div",{className:"flex min-h-svh items-center justify-center"}):r==="invalid"?v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsx(Xr,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(Qr,{children:[v.jsx(Jr,{children:"Invitation expired"}),v.jsx(ws,{children:"This invite link is invalid or has expired. Ask your admin for a new one."})]})})}):v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs(Xr,{level:4,className:"w-full max-w-sm",children:[v.jsxs(Qr,{className:"text-center",children:[v.jsx(Jr,{children:"Set up your account"}),v.jsxs(ws,{children:["You're joining as ",v.jsx("strong",{children:o})]})]}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:h(O),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Ft,{htmlFor:"display-name",children:["Nickname ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),v.jsx(hn,{id:"display-name",placeholder:"Your name",...m("displayName")})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Ft,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional, png · jpg, max 2MB)"})]}),v.jsx(kp,{name:"avatar",control:g,render:({field:E})=>{var T;return v.jsxs("div",{className:"relative w-14 h-14",children:[c?v.jsx("img",{src:c,alt:"avatar",className:"w-14 h-14 rounded-full object-cover border"}):v.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const C=DA(w);return{backgroundColor:C.bg,color:C.fg}})(),children:((T=w==null?void 0:w[0])==null?void 0:T.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var C;return(C=d.current)==null?void 0:C.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(K1,{className:"w-3 h-3"})}),v.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg",className:"hidden",onChange:C=>{var R;const j=(R=C.target.files)==null?void 0:R[0];if(j){if(j.size>2*1024*1024){x("avatar",{message:"Max 2MB for avatar"});return}E.onChange(j),f(URL.createObjectURL(j))}}})]})}}),A.avatar&&v.jsx("p",{className:"text-sm text-destructive",children:A.avatar.message})]}),v.jsx(Ya,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"password",children:"Password"}),v.jsx(hn,{id:"password",type:"password",...m("password")}),A.password&&v.jsx("p",{className:"text-sm text-destructive",children:A.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(hn,{id:"confirm",type:"password",...m("confirm")}),A.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:A.confirm.message})]}),A.root&&v.jsx("p",{className:"text-sm text-destructive",children:A.root.message}),v.jsx(ut,{type:"submit",disabled:S,className:"w-full",children:S?"Creating account…":"Create account"})]})})]})})}const tne=$i({password:Hn().min(8),confirm:Hn()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function nne(){const e=Ka(),[t]=Ym(),n=t.get("token")??"",[r,a]=y.useState("loading"),{register:o,handleSubmit:l,setError:c,formState:{errors:f,isSubmitting:d}}=wo({resolver:So(tne),mode:"onBlur"});y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/auth/reset-password/verify?token=${n}`).then(h=>h.ok?a("valid"):Promise.reject()).catch(()=>a("invalid"))},[n]);async function m(h){try{const g=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:n,password:h.password})});if(!g.ok){const x=await g.json();c("root",{message:x.error??"Failed to reset password"});return}e("/login",{replace:!0})}catch{c("root",{message:"Network error. Please try again."})}}return r==="loading"?v.jsx("div",{className:"flex min-h-svh items-center justify-center"}):r==="invalid"?v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsx(Xr,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(Qr,{children:[v.jsx(Jr,{children:"Link expired"}),v.jsx(ws,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs(Xr,{level:4,className:"w-full max-w-sm",children:[v.jsxs(Qr,{className:"text-center",children:[v.jsx(Jr,{children:"Reset password"}),v.jsx(ws,{children:"Enter your new password below."})]}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:l(m),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"password",children:"New password"}),v.jsx(hn,{id:"password",type:"password",...o("password")}),f.password&&v.jsx("p",{className:"text-sm text-destructive",children:f.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(hn,{id:"confirm",type:"password",...o("confirm")}),f.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:f.confirm.message})]}),f.root&&v.jsx("p",{className:"text-sm text-destructive",children:f.root.message}),v.jsx(ut,{type:"submit",disabled:d,className:"w-full",children:d?"Saving…":"Set new password"})]})})]})})}function j3({value:e,onChange:t,placeholder:n,className:r}){return v.jsxs("div",{className:"relative",children:[v.jsx(QF,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),v.jsx(hn,{placeholder:n,value:e,onChange:a=>t(a.target.value),className:`h-8 pl-8 ${r??"w-48"}`})]})}function yS(e,[t,n]){return Math.min(n,Math.max(t,e))}function C3(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rne=[" ","Enter","ArrowUp","ArrowDown"],ane=[" ","Enter"],Ss="Select",[wv,Sv,ine]=OA(Ss),[Tc]=ia(Ss,[ine,Oc]),_v=Oc(),[one,Mo]=Tc(Ss),[sne,lne]=Tc(Ss),R3=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:h,disabled:g,required:x,form:A}=e,S=_v(t),[w,O]=y.useState(null),[E,T]=y.useState(null),[C,j]=y.useState(!1),R=id(d),[N,D]=Oo({prop:r,defaultProp:a??!1,onChange:o,caller:Ss}),[z,V]=Oo({prop:l,defaultProp:c,onChange:f,caller:Ss}),U=y.useRef(null),P=w?A||!!w.closest("form"):!0,[B,q]=y.useState(new Set),G=Array.from(B).map($=>$.props.value).join(";");return v.jsx(yA,{...S,children:v.jsxs(one,{required:x,scope:t,trigger:w,onTriggerChange:O,valueNode:E,onValueNodeChange:T,valueNodeHasChildren:C,onValueNodeHasChildrenChange:j,contentId:wa(),value:z,onValueChange:V,open:N,onOpenChange:D,dir:R,triggerPointerDownPosRef:U,disabled:g,children:[v.jsx(wv.Provider,{scope:t,children:v.jsx(sne,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{q(F=>new Set(F).add($))},[]),onNativeOptionRemove:y.useCallback($=>{q(F=>{const Z=new Set(F);return Z.delete($),Z})},[]),children:n})}),P?v.jsxs(e4,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:h,value:z,onChange:$=>V($.target.value),disabled:g,form:A,children:[z===void 0?v.jsx("option",{value:""}):null,Array.from(B)]},G):null]})})};R3.displayName=Ss;var N3="SelectTrigger",M3=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=_v(n),l=Mo(N3,n),c=l.disabled||r,f=lt(t,l.onTriggerChange),d=Sv(n),m=y.useRef("touch"),[h,g,x]=n4(S=>{const w=d().filter(T=>!T.disabled),O=w.find(T=>T.value===l.value),E=r4(w,S,O);E!==void 0&&l.onValueChange(E.value)}),A=S=>{c||(l.onOpenChange(!0),x()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return v.jsx(bA,{asChild:!0,...o,children:v.jsx(Xe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":t4(l.value)?"":void 0,...a,ref:f,onClick:ze(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&A(S)}),onPointerDown:ze(a.onPointerDown,S=>{m.current=S.pointerType;const w=S.target;w.hasPointerCapture(S.pointerId)&&w.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(A(S),S.preventDefault())}),onKeyDown:ze(a.onKeyDown,S=>{const w=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(w&&S.key===" ")&&rne.includes(S.key)&&(A(),S.preventDefault())})})})});M3.displayName=N3;var P3="SelectValue",D3=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...c}=e,f=Mo(P3,n),{onValueNodeHasChildrenChange:d}=f,m=o!==void 0,h=lt(t,f.onValueNodeChange);return Fn(()=>{d(m)},[d,m]),v.jsx(Xe.span,{...c,ref:h,style:{pointerEvents:"none"},children:t4(f.value)?v.jsx(v.Fragment,{children:l}):o})});D3.displayName=P3;var cne="SelectIcon",k3=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.jsx(Xe.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});k3.displayName=cne;var une="SelectPortal",$3=e=>v.jsx(Qf,{asChild:!0,...e});$3.displayName=une;var _s="SelectContent",z3=y.forwardRef((e,t)=>{const n=Mo(_s,e.__scopeSelect),[r,a]=y.useState();if(Fn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?Zf.createPortal(v.jsx(L3,{scope:e.__scopeSelect,children:v.jsx(wv.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),o):null}return v.jsx(I3,{...e,ref:t})});z3.displayName=_s;var pa=10,[L3,Po]=Tc(_s),fne="SelectContentImpl",dne=Vl("SelectContent.RemoveScroll"),I3=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w,...O}=e,E=Mo(_s,n),[T,C]=y.useState(null),[j,R]=y.useState(null),N=lt(t,ue=>C(ue)),[D,z]=y.useState(null),[V,U]=y.useState(null),P=Sv(n),[B,q]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(T)return aA(T)},[T]),rA();const $=y.useCallback(ue=>{const[xe,...se]=P().map(ne=>ne.ref.current),[_e]=se.slice(-1),Se=document.activeElement;for(const ne of ue)if(ne===Se||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===xe&&j&&(j.scrollTop=0),ne===_e&&j&&(j.scrollTop=j.scrollHeight),ne==null||ne.focus(),document.activeElement!==Se))return},[P,j]),F=y.useCallback(()=>$([D,T]),[$,D,T]);y.useEffect(()=>{B&&F()},[B,F]);const{onOpenChange:Z,triggerPointerDownPosRef:X}=E;y.useEffect(()=>{if(T){let ue={x:0,y:0};const xe=_e=>{var Se,ne;ue={x:Math.abs(Math.round(_e.pageX)-(((Se=X.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((ne=X.current)==null?void 0:ne.y)??0))}},se=_e=>{ue.x<=10&&ue.y<=10?_e.preventDefault():T.contains(_e.target)||Z(!1),document.removeEventListener("pointermove",xe),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",se,{capture:!0})}}},[T,Z,X]),y.useEffect(()=>{const ue=()=>Z(!1);return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[Z]);const[oe,I]=n4(ue=>{const xe=P().filter(Se=>!Se.disabled),se=xe.find(Se=>Se.ref.current===document.activeElement),_e=r4(xe,ue,se);_e&&setTimeout(()=>_e.ref.current.focus())}),Y=y.useCallback((ue,xe,se)=>{const _e=!G.current&&!se;(E.value!==void 0&&E.value===xe||_e)&&(z(ue),_e&&(G.current=!0))},[E.value]),Q=y.useCallback(()=>T==null?void 0:T.focus(),[T]),ce=y.useCallback((ue,xe,se)=>{const _e=!G.current&&!se;(E.value!==void 0&&E.value===xe||_e)&&U(ue)},[E.value]),ve=r==="popper"?bS:B3,fe=ve===bS?{side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w}:{};return v.jsx(L3,{scope:n,content:T,viewport:j,onViewportChange:R,itemRefCallback:Y,selectedItem:D,onItemLeave:Q,itemTextRefCallback:ce,focusSelectedItem:F,selectedItemText:V,position:r,isPositioned:B,searchRef:oe,children:v.jsx(Qm,{as:dne,allowPinchZoom:!0,children:v.jsx(Km,{asChild:!0,trapped:E.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:ze(a,ue=>{var xe;(xe=E.trigger)==null||xe.focus({preventScroll:!0}),ue.preventDefault()}),children:v.jsx(Xf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:v.jsx(ve,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:ue=>ue.preventDefault(),...O,...fe,onPlaced:()=>q(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:ze(O.onKeyDown,ue=>{const xe=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!xe&&ue.key.length===1&&I(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let _e=P().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const Se=ue.target,ne=_e.indexOf(Se);_e=_e.slice(ne+1)}setTimeout(()=>$(_e)),ue.preventDefault()}})})})})})})});I3.displayName=fne;var hne="SelectItemAlignedPosition",B3=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Mo(_s,n),l=Po(_s,n),[c,f]=y.useState(null),[d,m]=y.useState(null),h=lt(t,N=>m(N)),g=Sv(n),x=y.useRef(!1),A=y.useRef(!0),{viewport:S,selectedItem:w,selectedItemText:O,focusSelectedItem:E}=l,T=y.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&S&&w&&O){const N=o.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),z=o.valueNode.getBoundingClientRect(),V=O.getBoundingClientRect();if(o.dir!=="rtl"){const Se=V.left-D.left,ne=z.left-Se,Ue=N.left-ne,$e=N.width+Ue,rt=Math.max($e,D.width),et=window.innerWidth-pa,tt=yS(ne,[pa,Math.max(pa,et-rt)]);c.style.minWidth=$e+"px",c.style.left=tt+"px"}else{const Se=D.right-V.right,ne=window.innerWidth-z.right-Se,Ue=window.innerWidth-N.right-ne,$e=N.width+Ue,rt=Math.max($e,D.width),et=window.innerWidth-pa,tt=yS(ne,[pa,Math.max(pa,et-rt)]);c.style.minWidth=$e+"px",c.style.right=tt+"px"}const U=g(),P=window.innerHeight-pa*2,B=S.scrollHeight,q=window.getComputedStyle(d),G=parseInt(q.borderTopWidth,10),$=parseInt(q.paddingTop,10),F=parseInt(q.borderBottomWidth,10),Z=parseInt(q.paddingBottom,10),X=G+$+B+Z+F,oe=Math.min(w.offsetHeight*5,X),I=window.getComputedStyle(S),Y=parseInt(I.paddingTop,10),Q=parseInt(I.paddingBottom,10),ce=N.top+N.height/2-pa,ve=P-ce,fe=w.offsetHeight/2,ue=w.offsetTop+fe,xe=G+$+ue,se=X-xe;if(xe<=ce){const Se=U.length>0&&w===U[U.length-1].ref.current;c.style.bottom="0px";const ne=d.clientHeight-S.offsetTop-S.offsetHeight,Ue=Math.max(ve,fe+(Se?Q:0)+ne+F),$e=xe+Ue;c.style.height=$e+"px"}else{const Se=U.length>0&&w===U[0].ref.current;c.style.top="0px";const Ue=Math.max(ce,G+S.offsetTop+(Se?Y:0)+fe)+se;c.style.height=Ue+"px",S.scrollTop=xe-ce+S.offsetTop}c.style.margin=`${pa}px 0`,c.style.minHeight=oe+"px",c.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[g,o.trigger,o.valueNode,c,d,S,w,O,o.dir,r]);Fn(()=>T(),[T]);const[C,j]=y.useState();Fn(()=>{d&&j(window.getComputedStyle(d).zIndex)},[d]);const R=y.useCallback(N=>{N&&A.current===!0&&(T(),E==null||E(),A.current=!1)},[T,E]);return v.jsx(mne,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:R,children:v.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:v.jsx(Xe.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});B3.displayName=hne;var pne="SelectPopperPosition",bS=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=pa,...o}=e,l=_v(n);return v.jsx(xA,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.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)"}})});bS.displayName=pne;var[mne,JA]=Tc(_s,{}),xS="SelectViewport",U3=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Po(xS,n),l=JA(xS,n),c=lt(t,o.onViewportChange),f=y.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(wv.Slot,{scope:n,children:v.jsx(Xe.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:ze(a.onScroll,d=>{const m=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&h){const x=Math.abs(f.current-m.scrollTop);if(x>0){const A=window.innerHeight-pa*2,S=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),O=Math.max(S,w);if(O<A){const E=O+x,T=Math.min(A,E),C=E-T;h.style.height=T+"px",h.style.bottom==="0px"&&(m.scrollTop=C>0?C:0,h.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});U3.displayName=xS;var q3="SelectGroup",[vne,gne]=Tc(q3),yne=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=wa();return v.jsx(vne,{scope:n,id:a,children:v.jsx(Xe.div,{role:"group","aria-labelledby":a,...r,ref:t})})});yne.displayName=q3;var H3="SelectLabel",F3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=gne(H3,n);return v.jsx(Xe.div,{id:a.id,...r,ref:t})});F3.displayName=H3;var qp="SelectItem",[bne,V3]=Tc(qp),G3=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,c=Mo(qp,n),f=Po(qp,n),d=c.value===r,[m,h]=y.useState(o??""),[g,x]=y.useState(!1),A=lt(t,E=>{var T;return(T=f.itemRefCallback)==null?void 0:T.call(f,E,r,a)}),S=wa(),w=y.useRef("touch"),O=()=>{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(bne,{scope:n,value:r,disabled:a,textId:S,isSelected:d,onItemTextChange:y.useCallback(E=>{h(T=>T||((E==null?void 0:E.textContent)??"").trim())},[]),children:v.jsx(wv.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:v.jsx(Xe.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:A,onFocus:ze(l.onFocus,()=>x(!0)),onBlur:ze(l.onBlur,()=>x(!1)),onClick:ze(l.onClick,()=>{w.current!=="mouse"&&O()}),onPointerUp:ze(l.onPointerUp,()=>{w.current==="mouse"&&O()}),onPointerDown:ze(l.onPointerDown,E=>{w.current=E.pointerType}),onPointerMove:ze(l.onPointerMove,E=>{var T;w.current=E.pointerType,a?(T=f.onItemLeave)==null||T.call(f):w.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ze(l.onPointerLeave,E=>{var T;E.currentTarget===document.activeElement&&((T=f.onItemLeave)==null||T.call(f))}),onKeyDown:ze(l.onKeyDown,E=>{var C;((C=f.searchRef)==null?void 0:C.current)!==""&&E.key===" "||(ane.includes(E.key)&&O(),E.key===" "&&E.preventDefault())})})})})});G3.displayName=qp;var Fu="SelectItemText",W3=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=Mo(Fu,n),c=Po(Fu,n),f=V3(Fu,n),d=lne(Fu,n),[m,h]=y.useState(null),g=lt(t,O=>h(O),f.onItemTextChange,O=>{var E;return(E=c.itemTextRefCallback)==null?void 0:E.call(c,O,f.value,f.disabled)}),x=m==null?void 0:m.textContent,A=y.useMemo(()=>v.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:w}=d;return Fn(()=>(S(A),()=>w(A)),[S,w,A]),v.jsxs(v.Fragment,{children:[v.jsx(Xe.span,{id:f.textId,...o,ref:g}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Zf.createPortal(o.children,l.valueNode):null]})});W3.displayName=Fu;var Y3="SelectItemIndicator",Z3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return V3(Y3,n).isSelected?v.jsx(Xe.span,{"aria-hidden":!0,...r,ref:t}):null});Z3.displayName=Y3;var wS="SelectScrollUpButton",K3=y.forwardRef((e,t)=>{const n=Po(wS,e.__scopeSelect),r=JA(wS,e.__scopeSelect),[a,o]=y.useState(!1),l=lt(t,r.onScrollButtonChange);return Fn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(Q3,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});K3.displayName=wS;var SS="SelectScrollDownButton",X3=y.forwardRef((e,t)=>{const n=Po(SS,e.__scopeSelect),r=JA(SS,e.__scopeSelect),[a,o]=y.useState(!1),l=lt(t,r.onScrollButtonChange);return Fn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<d;o(m)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(Q3,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});X3.displayName=SS;var Q3=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Po("SelectScrollButton",n),l=y.useRef(null),c=Sv(n),f=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),Fn(()=>{var m;const d=c().find(h=>h.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),v.jsx(Xe.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:ze(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ze(a.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ze(a.onPointerLeave,()=>{f()})})}),xne="SelectSeparator",J3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(Xe.div,{"aria-hidden":!0,...r,ref:t})});J3.displayName=xne;var _S="SelectArrow",wne=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=_v(n),o=Mo(_S,n),l=Po(_S,n);return o.open&&l.position==="popper"?v.jsx(wA,{...a,...r,ref:t}):null});wne.displayName=_S;var Sne="SelectBubbleInput",e4=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),o=lt(r,a),l=C3(t);return y.useEffect(()=>{const c=a.current;if(!c)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const h=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(h)}},[l,t]),v.jsx(Xe.select,{...n,style:{...xL,...n.style},ref:o,defaultValue:t})});e4.displayName=Sne;function t4(e){return e===""||e===void 0}function n4(e){const t=Un(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(l=>{const c=n.current+l;t(c),(function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function r4(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=_ne(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function _ne(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ane=R3,a4=M3,One=D3,Ene=k3,Tne=$3,i4=z3,jne=U3,o4=F3,s4=G3,Cne=W3,Rne=Z3,l4=K3,c4=X3,u4=J3;const As=Ane,Os=One,jo=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(a4,{ref:r,className:be("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,v.jsx(Ene,{asChild:!0,children:v.jsx(J_,{className:"h-4 w-4 opacity-50"})})]}));jo.displayName=a4.displayName;const f4=y.forwardRef(({className:e,...t},n)=>v.jsx(l4,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(DF,{className:"h-4 w-4"})}));f4.displayName=l4.displayName;const d4=y.forwardRef(({className:e,...t},n)=>v.jsx(c4,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(J_,{className:"h-4 w-4"})}));d4.displayName=c4.displayName;const Co=y.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>v.jsx(Tne,{children:v.jsxs(i4,{ref:a,className:be("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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 origin-[--radix-select-content-transform-origin]",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,...r,children:[v.jsx(f4,{}),v.jsx(jne,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(d4,{})]})}));Co.displayName=i4.displayName;const Nne=y.forwardRef(({className:e,...t},n)=>v.jsx(o4,{ref:n,className:be("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Nne.displayName=o4.displayName;const kt=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(s4,{ref:r,className:be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(Rne,{children:v.jsx(e5,{className:"h-4 w-4"})})}),v.jsx(Cne,{children:t})]}));kt.displayName=s4.displayName;const Mne=y.forwardRef(({className:e,...t},n)=>v.jsx(u4,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));Mne.displayName=u4.displayName;const Av=lA,Ov=G5,Pne=cA,h4=y.forwardRef(({className:e,...t},n)=>v.jsx(Jf,{ref:n,className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));h4.displayName=Jf.displayName;const ud=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Pne,{children:[v.jsx(h4,{}),v.jsxs(ed,{ref:r,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,v.jsxs(ev,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[v.jsx(o5,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ud.displayName=ed.displayName;const fd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});fd.displayName="DialogHeader";const dd=y.forwardRef(({className:e,...t},n)=>v.jsx(td,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));dd.displayName=td.displayName;const Dne=y.forwardRef(({className:e,...t},n)=>v.jsx(nd,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Dne.displayName=nd.displayName;function kne({onSuccess:e,appId:t}){const[n,r]=y.useState(!1),[a,o]=y.useState(null),[l,c]=y.useState("none"),f=y.useRef(null);function d(h){if(h.preventDefault(),!a)return;const g=new FormData;g.append("file",a),l!=="none"&&g.append("status",l),t&&g.append("app_id",String(t));const x=fetch("/api/v1/builds",{method:"POST",credentials:"include",body:g}).then(async A=>{if(!A.ok){const S=await A.json().catch(()=>({}));throw new Error(S.error??"Upload failed. Check the file format.")}e()});Dt.promise(x,{loading:"Uploading build…",success:"Build uploaded",error:A=>A instanceof Error?A.message:"Failed to upload build"}),r(!1),o(null),c("none")}function m(h){r(h),h||(o(null),c("none"))}return v.jsxs(Av,{open:n,onOpenChange:m,children:[v.jsx(Ov,{asChild:!0,children:v.jsxs(ut,{size:"sm",children:[v.jsx(nV,{className:"mr-2 h-4 w-4"}),"Upload build"]})}),v.jsxs(ud,{className:"sm:max-w-md",children:[v.jsx(fd,{children:v.jsx(dd,{children:"Upload build"})}),v.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{children:"File"}),v.jsx("div",{className:"flex h-24 cursor-pointer items-center justify-center rounded-md border-2 border-dashed text-sm text-muted-foreground hover:border-primary",onClick:()=>{var h;return(h=f.current)==null?void 0:h.click()},onDragOver:h=>h.preventDefault(),onDrop:h=>{h.preventDefault();const g=h.dataTransfer.files[0];g&&o(g)},children:a?a.name:"Click or drag to upload"}),v.jsx("input",{ref:f,type:"file",accept:".zip,.apk",className:"hidden",onChange:h=>{var g;return o(((g=h.target.files)==null?void 0:g[0])??null)}}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["iOS: ",v.jsx("code",{children:".app.zip"})," (zip the ",v.jsx("code",{children:".app"})," folder after ",v.jsx("code",{children:"xcodebuild -sdk iphonesimulator"}),")  · Android: ",v.jsx("code",{children:".apk"})]})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Ft,{children:["Status ",v.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),v.jsxs(As,{value:l,onValueChange:c,children:[v.jsx(jo,{children:v.jsx(Os,{})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"none",children:"None"}),v.jsx(kt,{value:"Backlog",children:"Backlog"}),v.jsx(kt,{value:"In Progress",children:"In Progress"}),v.jsx(kt,{value:"Done",children:"Done"}),v.jsx(kt,{value:"Rejected",children:"Rejected"})]})]})]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(ut,{type:"button",variant:"outline",className:"w-24",onClick:()=>r(!1),children:"Cancel"}),v.jsx(ut,{type:"submit",className:"w-24",disabled:!a,children:"Upload"})]})]})]})]})}function Hp({className:e,...t}){return v.jsx("span",{className:be("font-mono text-xs tabular-nums tracking-tight",e),...t})}async function $ne(){const e=await fetch("/api/v1/apps",{credentials:"include"});return e.ok?(await e.json()).items:[]}async function zne({appId:e,search:t,statusFilter:n}){const r=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});t&&r.set("q",t),n&&n!=="all"&&r.set("status",n);const a=await fetch(`/api/v1/builds?${r}`,{credentials:"include"});return a.ok?(await a.json()).items:[]}async function Lne(e){const t=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return t.status===409?{error:"App with this bundle ID and platform already exists"}:t.ok?t.json():null}async function Ine(e,t){await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:t})})}async function Bne(e){const t=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return t.ok?t.json():null}function Une(e){const t=new Map;for(const n of e){const r=n.version_name??"Unversioned";t.has(r)||t.set(r,[]),t.get(r).push(n)}return Array.from(t.entries()).map(([n,r])=>({versionName:n,builds:r}))}function qne({onSuccess:e}){const[t,n]=y.useState(!1),[r,a]=y.useState(""),[o,l]=y.useState(""),[c,f]=y.useState("ios"),[d,m]=y.useState(""),[h,g]=y.useState(!1);async function x(A){A.preventDefault(),m(""),g(!0);try{const S=await Lne({name:r.trim(),bundle_id_key:o.trim(),platform:c});if(!S){m("Failed to create app");return}if("error"in S){m(S.error);return}n(!1),a(""),l(""),f("ios"),Dt.success("App created"),e()}catch{Dt.error("Failed to create app — check your network")}finally{g(!1)}}return v.jsxs(Av,{open:t,onOpenChange:n,children:[v.jsx(Ov,{asChild:!0,children:v.jsxs("button",{className:"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:[v.jsx(a5,{className:"size-3.5 shrink-0"}),v.jsx("span",{children:"Add App"})]})}),v.jsxs(ud,{className:"sm:max-w-sm",children:[v.jsx(fd,{children:v.jsx(dd,{children:"Add App"})}),v.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Ft,{htmlFor:"app-name",children:"Name"}),v.jsx(hn,{id:"app-name",value:r,onChange:A=>a(A.target.value),placeholder:"My App",required:!0})]}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Ft,{htmlFor:"bundle-id",children:"Bundle ID"}),v.jsx(hn,{id:"bundle-id",value:o,onChange:A=>l(A.target.value),placeholder:"com.example.myapp",required:!0})]}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Ft,{htmlFor:"platform",children:"Platform"}),v.jsxs(As,{value:c,onValueChange:A=>f(A),children:[v.jsx(jo,{id:"platform",children:v.jsx(Os,{})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"ios",children:"iOS"}),v.jsx(kt,{value:"android",children:"Android"}),v.jsx(kt,{value:"both",children:"Both"})]})]})]}),d&&v.jsx("p",{className:"text-sm text-destructive",children:d}),v.jsx(ut,{type:"submit",disabled:h,className:"w-full",children:h?"Creating…":"Create App"})]})]})]})}function Hne({apps:e,selectedAppId:t,onSelect:n,onAdd:r}){return v.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[v.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Apps"}),e.length===0&&v.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:"No apps yet"}),e.map(a=>v.jsxs("button",{onClick:()=>n(a.id),className:["flex flex-col gap-0.5 rounded-md px-2 py-2 text-left text-sm hover:bg-accent overflow-hidden",a.id===t?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:"truncate",children:a.name}),v.jsx(Hp,{className:"text-muted-foreground truncate",children:a.bundle_id_key})]},a.id)),v.jsx("div",{className:"mt-1 border-t pt-1",children:v.jsx(qne,{onSuccess:r})})]})}const Fne=wc("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function Yl({className:e,variant:t,tone:n,...r}){return v.jsx("div",{className:be(Fne({variant:t,tone:n}),e),...r})}var p4="AlertDialog",[Vne]=ia(p4,[R5]),zi=R5(),m4=e=>{const{__scopeAlertDialog:t,...n}=e,r=zi(t);return v.jsx(lA,{...r,...n,modal:!0})};m4.displayName=p4;var Gne="AlertDialogTrigger",v4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=zi(n);return v.jsx(G5,{...a,...r,ref:t})});v4.displayName=Gne;var Wne="AlertDialogPortal",g4=e=>{const{__scopeAlertDialog:t,...n}=e,r=zi(t);return v.jsx(cA,{...r,...n})};g4.displayName=Wne;var Yne="AlertDialogOverlay",y4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=zi(n);return v.jsx(Jf,{...a,...r,ref:t})});y4.displayName=Yne;var Il="AlertDialogContent",[Zne,Kne]=Vne(Il),Xne=v5("AlertDialogContent"),b4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=zi(n),l=y.useRef(null),c=lt(t,l),f=y.useRef(null);return v.jsx(hW,{contentName:Il,titleName:x4,docsSlug:"alert-dialog",children:v.jsx(Zne,{scope:n,cancelRef:f,children:v.jsxs(ed,{role:"alertdialog",...o,...a,ref:c,onOpenAutoFocus:ze(a.onOpenAutoFocus,d=>{var m;d.preventDefault(),(m=f.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[v.jsx(Xne,{children:r}),v.jsx(Jne,{contentRef:l})]})})})});b4.displayName=Il;var x4="AlertDialogTitle",w4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=zi(n);return v.jsx(td,{...a,...r,ref:t})});w4.displayName=x4;var S4="AlertDialogDescription",_4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=zi(n);return v.jsx(nd,{...a,...r,ref:t})});_4.displayName=S4;var Qne="AlertDialogAction",A4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=zi(n);return v.jsx(ev,{...a,...r,ref:t})});A4.displayName=Qne;var O4="AlertDialogCancel",E4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=Kne(O4,n),o=zi(n),l=lt(t,a);return v.jsx(ev,{...o,...r,ref:l})});E4.displayName=O4;var Jne=({contentRef:e})=>{const t=`\`${Il}\` requires a description for the component to be accessible for screen reader users.
408
-
409
- You can add a description to the \`${Il}\` by passing a \`${S4}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
410
-
411
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Il}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
412
-
413
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ere=m4,tre=v4,nre=g4,T4=y4,j4=b4,C4=A4,R4=E4,N4=w4,M4=_4;const Ev=ere,rre=tre,are=nre,P4=y.forwardRef(({className:e,...t},n)=>v.jsx(T4,{className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));P4.displayName=T4.displayName;const hd=y.forwardRef(({className:e,...t},n)=>v.jsxs(are,{children:[v.jsx(P4,{}),v.jsx(j4,{ref:n,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));hd.displayName=j4.displayName;const pd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});pd.displayName="AlertDialogHeader";const md=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});md.displayName="AlertDialogFooter";const vd=y.forwardRef(({className:e,...t},n)=>v.jsx(N4,{ref:n,className:be("text-lg font-semibold",e),...t}));vd.displayName=N4.displayName;const gd=y.forwardRef(({className:e,...t},n)=>v.jsx(M4,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));gd.displayName=M4.displayName;const Tv=y.forwardRef(({className:e,...t},n)=>v.jsx(C4,{ref:n,className:be(Zm(),e),...t}));Tv.displayName=C4.displayName;const yd=y.forwardRef(({className:e,...t},n)=>v.jsx(R4,{ref:n,className:be(Zm({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));yd.displayName=R4.displayName;const D4={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function LR(e){return e.version_name&&e.build_number?`${e.version_name} · build ${e.build_number}`:e.version_name??e.version_label??(e.build_number?`build ${e.build_number}`:"Build")}function ire(e){const r=new Date(e).getTime()+6048e5-Date.now();if(r<=0)return{label:"Expired",urgent:!0};const a=Math.floor(r/36e5);return a<1?{label:"< 1 hour left",urgent:!0}:a<24?{label:`Expires in ${a}h`,urgent:a<6}:{label:`Expires in ${Math.floor(a/24)}d`,urgent:!1}}function ore({build:e,isLast:t,onNavigate:n,onStatusChange:r}){const[a,o]=y.useState(!1),l=e.status_label==="Done",c=l&&e.completed_at?ire(e.completed_at):null;function f(d){if(d==="Done"){o(!0);return}r(e.id,d==="none"?null:d)}return v.jsxs(v.Fragment,{children:[v.jsx(Ev,{open:a,onOpenChange:o,children:v.jsxs(hd,{children:[v.jsxs(pd,{children:[v.jsx(vd,{children:"Mark as Done?"}),v.jsx(gd,{children:"Build files will be automatically deleted after 7 days. Reverting the status will cancel the scheduled deletion."})]}),v.jsxs(md,{children:[v.jsx(yd,{children:"Cancel"}),v.jsx(Tv,{onClick:()=>{r(e.id,"Done"),o(!1)},children:"Confirm"})]})]})}),v.jsxs("div",{className:["flex items-center gap-3 px-4 py-3",t?"":"border-b"].join(" "),children:[v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[v.jsxs("span",{className:"text-sm font-medium",children:["build ",v.jsx(Hp,{children:e.build_number??"—"})]}),v.jsx(Yl,{tone:e.platform==="ios"?"ios":"android",className:"text-xs capitalize",children:e.platform}),e.status_label&&v.jsx(Yl,{tone:D4[e.status_label],className:"text-xs",children:e.status_label})]}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"14px",marginTop:"0.7rem",alignItems:"center"},className:"text-xs text-muted-foreground",children:[e.uploader&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:e.uploader}),v.jsx(Ya,{orientation:"vertical",className:"h-3"})]}),v.jsx(Hp,{children:new Date(e.uploaded_at).toLocaleDateString()}),c&&v.jsxs(v.Fragment,{children:[v.jsx(Ya,{orientation:"vertical",className:"h-3"}),v.jsx("span",{className:c.urgent?"text-destructive":"",children:c.label})]})]})]}),v.jsxs(As,{value:e.status_label??"none",onValueChange:f,children:[v.jsx(jo,{className:"h-9 w-32 text-xs",children:v.jsx(Os,{})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"none",children:v.jsx("span",{className:"text-muted-foreground",children:"—"})}),v.jsx(kt,{value:"Backlog",children:"Backlog"}),v.jsx(kt,{value:"In Progress",children:"In Progress"}),v.jsx(kt,{value:"Done",children:"Done"}),v.jsx(kt,{value:"Rejected",children:"Rejected"})]})]}),v.jsxs(ut,{size:"sm",onClick:()=>n(e.id),disabled:l,children:[v.jsx(tA,{className:"mr-1.5 h-3.5 w-3.5"}),"Start QA"]})]})]})}function sre({versionName:e,builds:t,isOpen:n,onToggle:r,onNavigate:a,onStatusChange:o}){return v.jsxs("div",{className:"rounded-lg shadow-card-2 overflow-hidden",children:[v.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-3 text-left hover:bg-accent/50 bg-card",onClick:r,children:[n?v.jsx(J_,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):v.jsx(eA,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),v.jsx(Hp,{className:"font-medium text-sm text-foreground",children:e}),v.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length," build",t.length>1?"s":"",")"]})]}),n&&v.jsx("div",{className:"border-t bg-card",children:t.map((l,c)=>v.jsx(ore,{build:l,isLast:c===t.length-1,onNavigate:a,onStatusChange:o},l.id))})]})}function lre(){const e=Ka(),[t,n]=Ym(),[r,a]=y.useState([]),[o,l]=y.useState([]),[c,f]=y.useState(""),[d,m]=y.useState("all"),[h,g]=y.useState(!0),[x,A]=y.useState(new Set),S=t.get("appId")?Number(t.get("appId")):null,w=r.find(N=>N.id===S)??null,O=y.useCallback(async()=>{const N=await $ne();a(N),!t.get("appId")&&N.length>0&&n({appId:String(N[0].id)},{replace:!0})},[t,n]),E=y.useCallback(async()=>{if(!S){l([]),g(!1);return}g(!0);try{const N=await zne({appId:S,search:c,statusFilter:d});l(N),N.length>0&&x.size===0&&A(new Set([N[0].version_name??"Unversioned"]))}finally{g(!1)}},[S,c,d]);y.useEffect(()=>{O()},[]),y.useEffect(()=>{E()},[E]);function T(N){N!==S&&(l([]),A(new Set)),n({appId:String(N)})}function C(N){A(D=>{const z=new Set(D);return z.has(N)?z.delete(N):z.add(N),z})}async function j(N,D){await Ine(N,D),l(z=>z.map(V=>V.id===N?{...V,status_label:D}:V))}const R=Une(o);return v.jsxs("div",{className:"flex h-full gap-0",children:[v.jsx(Hne,{apps:r,selectedAppId:S,onSelect:T,onAdd:O}),v.jsxs("main",{className:"flex-1 flex flex-col gap-4 p-4 overflow-y-auto min-w-0",children:[v.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:w?w.name:"App Center"}),v.jsx(kne,{onSuccess:()=>{O(),E()},appId:S})]}),S?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.jsx(j3,{placeholder:"Search version…",value:c,onChange:f}),v.jsxs(As,{value:d,onValueChange:m,children:[v.jsx(jo,{className:"h-8 w-36",children:v.jsx(Os,{placeholder:"Status"})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"all",children:"All statuses"}),v.jsx(kt,{value:"Backlog",children:"Backlog"}),v.jsx(kt,{value:"In Progress",children:"In Progress"}),v.jsx(kt,{value:"Done",children:"Done"}),v.jsx(kt,{value:"Rejected",children:"Rejected"})]})]})]}),h?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):R.length===0?v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(WF,{className:"w-8 h-8 text-muted-foreground/40"}),v.jsx("p",{className:"text-sm font-medium",children:"No builds yet"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload the first build to get started."})]}):v.jsx("div",{className:"flex flex-col gap-2",children:R.map(({versionName:N,builds:D})=>v.jsx(sre,{versionName:N,builds:D,isOpen:x.has(N),onToggle:()=>C(N),onNavigate:z=>e(`/app-center/build?id=${z}`),onStatusChange:j},N))})]}):v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(qF,{className:"w-8 h-8 text-muted-foreground/40"}),v.jsx("p",{className:"text-sm font-medium",children:"No app selected"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose an app from the sidebar to view its builds."})]})]})]})}const cre=`ws://${location.host}`,ure=2e3;function eO(e,t){const n=y.useRef(null),[r,a]=y.useState(!1),o=y.useRef(e);o.current=e;const l=y.useRef(t);return l.current=t,y.useEffect(()=>{let f=!1;const d=()=>{if(f)return;const m=new WebSocket(cre);m.binaryType="arraybuffer",n.current=m,m.onopen=()=>a(!0),m.onclose=()=>{a(!1),f||setTimeout(d,ure)},m.onmessage=h=>{var g;if(h.data instanceof ArrayBuffer){(g=l.current)==null||g.call(l,h.data);return}try{o.current(JSON.parse(h.data))}catch{}}};return d(),()=>{var m;f=!0,(m=n.current)==null||m.close()}},[]),{send:y.useCallback(f=>{var d;((d=n.current)==null?void 0:d.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(f))},[]),connected:r}}const fre=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"];function k4({sessionId:e,buildId:t,onRecordingUploaded:n}){const[r,a]=y.useState("idle"),o=y.useRef(null),l=y.useRef(n);y.useEffect(()=>{l.current=n},[n]);const c=y.useRef(!1),f=y.useRef(null),d=y.useRef([]),m=y.useRef(""),h=y.useRef(0),g=y.useRef(null),x=y.useCallback(()=>{var w;c.current&&((w=g.current)==null||w.call(g),h.current=requestAnimationFrame(x))},[]),A=y.useCallback(w=>{const O=o.current;if(!O)return;const E=O.getContext("2d");E&&(E.fillStyle="#000",E.fillRect(0,0,O.width,O.height));const T=fre.find(j=>MediaRecorder.isTypeSupported(j))??"";if(!T)return;m.current=T,d.current=[];const C=new MediaRecorder(O.captureStream(30),{mimeType:T});C.ondataavailable=j=>{j.data.size>0&&d.current.push(j.data)},f.current=C,C.start(1e3),g.current=w,c.current=!0,h.current=requestAnimationFrame(x),a("recording")},[x]),S=y.useCallback(async()=>{var j;a("uploading"),c.current=!1,cancelAnimationFrame(h.current);const w=f.current;if(!w){a("idle");return}await new Promise(R=>{const N=setTimeout(R,5e3);w.onstop=()=>{clearTimeout(N),R()};try{w.stop()}catch{clearTimeout(N),R()}}),f.current=null;const O=m.current,E=O.includes("mp4")?".mp4":".webm",T=new Blob(d.current,{type:O});d.current=[];const C=new FormData;C.append("file",T,`tapflow-${Date.now()}${E}`);try{const R=new URLSearchParams({sessionId:e});t&&R.set("buildId",String(t));const N=await fetch(`/api/v1/recordings/upload?${R}`,{method:"POST",credentials:"include",body:C}),D=await N.json();if(N.ok&&D.url){const z=document.createElement("a");z.href=D.url,z.download="",z.click(),(j=l.current)==null||j.call(l),a("done"),setTimeout(()=>a("idle"),2e3)}else a("idle")}catch{a("idle")}},[e,t]);return y.useEffect(()=>{if(r!=="recording")return;const w=()=>{document.visibilityState==="hidden"&&S()};return document.addEventListener("visibilitychange",w),()=>{var O;document.removeEventListener("visibilitychange",w),c.current&&(c.current=!1,cancelAnimationFrame(h.current),(O=f.current)==null||O.stop(),f.current=null)}},[r,S]),{recordState:r,recordCanvasRef:o,startClientRecording:A,stopClientRecording:S}}function $4(){const e=y.useRef(0),[t,n]=y.useState(0);return y.useEffect(()=>{const r=setInterval(()=>{n(e.current),e.current=0},1e3);return()=>clearInterval(r)},[]),{fps:t,frameCount:e}}function z4({joined:e,onScreenshot:t,onRecordToggle:n,recordState:r,onRotate:a,platformSlot:o,launchSlot:l}){return e?v.jsx(AA,{delayDuration:400,children:v.jsxs("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 backdrop-blur-sm px-1.5 py-2.5 shrink-0 mt-3",children:[l,o,v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:t,children:v.jsx(PF,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:"Screenshot"})]}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:be("h-8 w-8",r==="recording"&&"text-red-500 hover:text-red-500"),disabled:r==="uploading"||r==="done",onClick:n,children:r==="uploading"?v.jsx(Tp,{className:"h-4 w-4 animate-spin"}):r==="recording"?v.jsx(JF,{className:"h-4 w-4 fill-current"}):v.jsx(iV,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:r==="idle"?"Start recording":r==="recording"?"Stop recording":"Processing…"})]}),v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:a,children:v.jsx(KF,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:"Rotate"})]})]})}):null}function dre(e){const{connected:t,joined:n,bootError:r,deviceReady:a,installing:o,installError:l}=e;return t?n?r?`Boot failed: ${r.length>40?r.slice(0,40)+"…":r}`:a?o?"Installing app…":l?`Install failed: ${l}`:null:"Starting device…":"Joining session…":"Connecting…"}function tO(e){const{joined:t,fps:n,keyboardActive:r}=e,a=dre(e),o=n>15,l=n>0&&n<=15,c=o?"#10b981":l?"#94a3b8":"transparent",f=o?"Active":l?"Idle":null;return v.jsxs("div",{className:"w-[300px] shrink-0 mt-3 rounded-xl border bg-background px-4 py-4 flex flex-col gap-3",children:[v.jsxs("div",{className:be("flex items-center",r?"text-emerald-500":"text-muted-foreground"),style:{gap:6},children:[v.jsx(XF,{className:"h-3.5 w-3.5 shrink-0"}),v.jsx("span",{className:"text-[12px] font-medium",children:"Focus"})]}),t&&n>0&&v.jsxs("div",{className:"flex items-center",style:{gap:6},children:[v.jsx("span",{className:"h-2 w-2 rounded-full shrink-0",style:{background:c}}),v.jsx("span",{className:"text-[12px] font-mono text-foreground/75",children:n}),v.jsx("span",{className:"text-[12px] text-muted-foreground",children:"fps"}),f&&v.jsxs("span",{className:be("text-[11px]",o?"text-emerald-500":"text-muted-foreground/60"),children:["· ",f]})]}),a&&v.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-all",children:a})]})}function hre(e,t,n,r,a,o){const{x:l,y:c,width:f,height:d}=a;let m,h;if(o){const g=(e.x-t.left)/t.width;m=(1-(e.y-t.top)/t.height)*n,h=g*r}else m=(e.x-t.left)*(n/t.width),h=(e.y-t.top)*(r/t.height);return m<l||m>l+f||h<c||h>c+d?null:{x:(m-l)/f,y:(h-c)/d}}function pre(e,t,n){const r=(e.x-t.left)/t.width,a=(e.y-t.top)/t.height;return r<0||r>1||a<0||a>1?null:n?{x:a,y:1-r}:{x:r,y:a}}function L4(e){return{f0:{x:1-e.x,y:1-e.y},f1:e}}function mre(e,t){return e>0?Math.min(1,t/e):1}const ka=13,as=8,IR=16,vre=.02,gre=100;function yre({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:c,installError:f,bootError:d,launching:m,setLaunching:h,chrome:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,swKeyboardVisible:S,swKeyboardPending:w,onKbdToggle:O}){const E=y.useRef(null),T=y.useRef(null),C=y.useRef(null),{fps:j,frameCount:R}=$4(),{recordState:N,recordCanvasRef:D,startClientRecording:z,stopClientRecording:V}=k4({sessionId:e,buildId:t,onRecordingUploaded:A}),U=y.useRef(0),[P,B]=y.useState(!1),[q,G]=y.useState(!1),[$,F]=y.useState(!1),[Z,X]=y.useState(null),[oe,I]=y.useState(null),[Y,Q]=y.useState(!1),[ce,ve]=y.useState(null),fe=y.useRef(ce);y.useEffect(()=>{fe.current=ce},[ce]);const ue=y.useRef(null),xe=y.useRef(null),se=y.useRef(!1),_e=y.useRef(!1),Se=y.useRef(0),ne=y.useRef(null),Ue=y.useRef(null),$e=y.useRef("idle"),rt=y.useRef(null),et=y.useRef(null),tt=y.useRef(null);y.useEffect(()=>{tt.current=g},[g]),y.useEffect(()=>{const ie=new Image;ie.onload=()=>{et.current=ie},ie.src=`data:image/png;base64,${g.framePng}`},[g.framePng]),y.useEffect(()=>(x.current=ie=>{const Ee=U.current;createImageBitmap(new Blob([ie],{type:"image/jpeg"})).then(he=>{if(U.current!==Ee){he.close();return}const Oe=E.current,Pe=Oe==null?void 0:Oe.getContext("2d");if(!Oe||!Pe){he.close();return}if((Oe.width!==he.width||Oe.height!==he.height)&&(Oe.width=he.width,Oe.height=he.height,!tt.current)){const De=D.current;De&&(De.width=he.width,De.height=he.height)}Pe.drawImage(he,0,0),he.close(),B(!0),R.current+=1}).catch(()=>{})},()=>{x.current=void 0}),[x,R]),y.useEffect(()=>{const ie=D.current,Ee=T.current;ie&&Ee&&(ie.width=Ee.clientWidth,ie.height=Ee.clientHeight)},[g]);const qt=y.useCallback(()=>{const ie=D.current,Ee=E.current;if(!ie||!Ee)return;const he=ie.getContext("2d");if(!he)return;const Oe=tt.current;if(he.clearRect(0,0,ie.width,ie.height),Oe){et.current&&he.drawImage(et.current,0,0,ie.width,ie.height);const He=Math.round(Oe.screenCornerRadius/2*(ie.height/(Oe.compositeHeight/2)));he.save(),he.beginPath(),He>0?he.roundRect(Ee.offsetLeft,Ee.offsetTop,Ee.clientWidth,Ee.clientHeight,He):he.rect(Ee.offsetLeft,Ee.offsetTop,Ee.clientWidth,Ee.clientHeight),he.clip(),he.drawImage(Ee,Ee.offsetLeft,Ee.offsetTop,Ee.clientWidth,Ee.clientHeight),he.restore()}else he.drawImage(Ee,0,0,ie.width,ie.height);const Pe=fe.current;if(Pe)for(const He of[Pe.f0,Pe.f1]){const wt=Oe?Ee.offsetLeft+He.x*Ee.clientWidth:He.x*ie.width,st=Oe?Ee.offsetTop+He.y*Ee.clientHeight:He.y*ie.height;se.current?(he.beginPath(),he.arc(wt,st,as,0,Math.PI*2),he.fillStyle="rgba(255,255,255,0.92)",he.fill(),he.strokeStyle="rgba(0,0,0,0.2)",he.lineWidth=1,he.stroke()):(he.beginPath(),he.arc(wt,st,ka,0,Math.PI*2),he.strokeStyle="rgba(0,0,0,0.3)",he.lineWidth=3,he.stroke(),he.beginPath(),he.arc(wt,st,ka,0,Math.PI*2),he.strokeStyle="rgba(255,255,255,0.65)",he.lineWidth=1.5,he.stroke())}const De=Ue.current;if(De){const He=$e.current,wt=rt.current;if(he.save(),He==="down")he.beginPath(),he.arc(De.x,De.y,as,0,Math.PI*2),he.fillStyle="rgba(255,255,255,0.92)",he.fill(),he.strokeStyle="rgba(0,0,0,0.2)",he.lineWidth=1,he.stroke();else if(He==="release"&&wt){const st=Math.min((performance.now()-wt.startTime)/350,1);he.beginPath(),he.arc(De.x,De.y,as+26*st,0,Math.PI*2),he.strokeStyle=`rgba(255,255,255,${(1-st)*.55})`,he.lineWidth=1.5,he.stroke(),st>=1&&($e.current="idle",rt.current=null)}else he.beginPath(),he.arc(De.x,De.y,ka,0,Math.PI*2),he.strokeStyle="rgba(0,0,0,0.3)",he.lineWidth=3,he.stroke(),he.beginPath(),he.arc(De.x,De.y,ka,0,Math.PI*2),he.strokeStyle="rgba(255,255,255,0.65)",he.lineWidth=1.5,he.stroke();he.restore()}},[]);y.useEffect(()=>{const ie=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),Ee=De=>{if(De.code==="AltLeft"||De.code==="AltRight"){_e.current=!0;return}if(!$||ie.has(De.code))return;De.preventDefault();const He=(De.shiftKey?2:0)|(De.ctrlKey?1:0)|(De.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:De.code,modifiers:He}})},he=()=>{se.current&&(se.current=!1,Q(!1),n({type:"input:pinch:end",sessionId:e})),_e.current=!1,ve(null)},Oe=De=>{(De.code==="AltLeft"||De.code==="AltRight")&&he()},Pe=()=>{_e.current&&he()};return window.addEventListener("keydown",Ee),window.addEventListener("keyup",Oe),window.addEventListener("blur",Pe),()=>{window.removeEventListener("keydown",Ee),window.removeEventListener("keyup",Oe),window.removeEventListener("blur",Pe)}},[$,n,e]),y.useEffect(()=>{if(!$)return;const ie=Ee=>{const he=T.current??E.current;he&&!he.contains(Ee.target)&&F(!1)};return document.addEventListener("pointerdown",ie),()=>document.removeEventListener("pointerdown",ie)},[$]);const ct=y.useCallback(ie=>{const Ee=(q?C.current:null)??T.current;if(!Ee)return null;const he=Ee.getBoundingClientRect(),Oe=g.compositeWidth/2,Pe=g.compositeHeight/2,De=g.screenRect.x/2,He=g.screenRect.y/2,wt=g.screenRect.width/2,st=g.screenRect.height/2;return hre({x:ie.clientX,y:ie.clientY},he,Oe,Pe,{x:De,y:He,width:wt,height:st},q)},[g,q]),pn=y.useCallback(ie=>{const Ee=ct(ie);return Ee?L4(Ee):null},[ct]),an=y.useCallback(ie=>{if(!T.current||q)return null;const Ee=T.current.getBoundingClientRect(),he=(ie.clientX-Ee.left)*(g.compositeWidth/Ee.width),Oe=(ie.clientY-Ee.top)*(g.compositeHeight/Ee.height);for(const Pe of g.buttons){const De=he-Pe.normalOffset.x,He=Oe-Pe.normalOffset.y;if(De*De+He*He<gre**2)return Pe.name}return null},[g,q]),St=y.useCallback(ie=>{const Ee=E.current,he=D.current;return Ee&&Ee.clientWidth>0?{x:Ee.offsetLeft+ie.x*Ee.clientWidth,y:Ee.offsetTop+ie.y*Ee.clientHeight}:{x:ie.x*((he==null?void 0:he.width)??1),y:ie.y*((he==null?void 0:he.height)??1)}},[]),An=y.useCallback(ie=>{if(F(!0),_e.current){const De=pn(ie);if(!De)return;se.current=!0,Q(!0),ie.target.setPointerCapture(ie.pointerId),ve(De),n({type:"input:pinch:start",sessionId:e,payload:De});return}const Ee=an(ie);if(Ee){ue.current=Ee,X(Ee);return}const he=ct(ie);if(!he)return;xe.current=he,ie.target.setPointerCapture(ie.pointerId),Ue.current=St(he),$e.current="down",rt.current=null;const Oe=ie.currentTarget.getBoundingClientRect(),Pe=ne.current;Pe&&(Pe.style.display="block",Pe.style.left=`${ie.clientX-Oe.left}px`,Pe.style.top=`${ie.clientY-Oe.top}px`,Pe.style.width=`${as*2}px`,Pe.style.height=`${as*2}px`,Pe.style.background="rgba(255,255,255,0.92)",Pe.style.border="1.5px solid rgba(0,0,0,0.2)",Pe.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),n({type:"input:touch:start",sessionId:e,payload:he})},[an,ct,pn,St,n,e]),H=y.useCallback(ie=>{if(ie.buttons===0){if(I(an(ie)),_e.current){ve(pn(ie)),Ue.current=null;const He=ne.current;He&&(He.style.display="none")}else{ve(null);const He=ct(ie);Ue.current=He?St(He):null,$e.current!=="down"&&($e.current="idle");const wt=ne.current;if(wt)if(He){const st=ie.currentTarget.getBoundingClientRect();wt.style.display="block",wt.style.left=`${ie.clientX-st.left}px`,wt.style.top=`${ie.clientY-st.top}px`,wt.style.width=`${ka*2}px`,wt.style.height=`${ka*2}px`,wt.style.background="transparent",wt.style.border="1.5px solid rgba(255,255,255,0.6)",wt.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"}else wt.style.display="none"}return}if(se.current){const He=pn(ie);if(!He)return;const wt=performance.now();if(wt-Se.current<IR)return;Se.current=wt,ve(He),n({type:"input:pinch:move",sessionId:e,payload:He});return}if(ue.current||!xe.current)return;const Ee=ct(ie);if(!Ee)return;const he=Ee.x-xe.current.x,Oe=Ee.y-xe.current.y;if(Math.sqrt(he*he+Oe*Oe)<vre)return;const Pe=performance.now();if(Pe-Se.current<IR)return;Se.current=Pe,Ue.current=St(Ee);const De=ne.current;if(De&&De.style.display!=="none"){const He=ie.currentTarget.getBoundingClientRect();De.style.left=`${ie.clientX-He.left}px`,De.style.top=`${ie.clientY-He.top}px`}n({type:"input:touch:move",sessionId:e,payload:Ee})},[an,ct,pn,St,n,e]),ee=y.useCallback(()=>{if(se.current){se.current=!1,Q(!1),ve(null),n({type:"input:pinch:end",sessionId:e});return}if(xe.current=null,ue.current){n({type:"input:button",sessionId:e,payload:{name:ue.current}}),ue.current=null,setTimeout(()=>X(null),100);return}$e.current="release",rt.current={startTime:performance.now()};const ie=ne.current;ie&&(ie.style.width=`${ka*2}px`,ie.style.height=`${ka*2}px`,ie.style.background="transparent",ie.style.border="1.5px solid rgba(255,255,255,0.6)",ie.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),n({type:"input:touch:end",sessionId:e})},[n,e]),te=y.useCallback(()=>{if(se.current){se.current=!1,Q(!1),ve(null),n({type:"input:pinch:end",sessionId:e});return}if(xe.current=null,ue.current){ue.current=null,X(null);return}$e.current="release",rt.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),Ce=y.useCallback(()=>{I(null),ve(null),Ue.current=null;const ie=ne.current;ie&&(ie.style.display="none")},[]),je=g.compositeWidth/2,Te=g.compositeHeight/2,Fe=mre(Te,750),Ve=Math.round(je*Fe),Et=Math.round(Te*Fe),bt=g.screenRect.x/g.compositeWidth*100,xt=g.screenRect.y/g.compositeHeight*100,Ae=g.screenRect.width/g.compositeWidth*100,Ze=g.screenRect.height/g.compositeHeight*100,Re=Math.round(g.screenCornerRadius/2*Fe),Ye=v.jsxs(v.Fragment,{children:[v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:"home"}}),children:v.jsx(t5,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:"Home"})]}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:w,onClick:O,"data-active":S,children:w?v.jsx(Tp,{className:"h-4 w-4 animate-spin"}):v.jsx(UF,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:"Software keyboard"})]})]}),jt=c&&t?v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m,onClick:()=>{h(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(Tp,{className:"h-4 w-4 animate-spin"}):v.jsx(tA,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:m?"Launching…":"Launch app"})]}):null;return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("canvas",{ref:D,style:{display:"none"}}),v.jsx(z4,{joined:a,onScreenshot:()=>{const ie=E.current;if(!ie)return;const Ee=document.createElement("canvas"),he=Ee.getContext("2d");he&&(Ee.width=ie.width,Ee.height=ie.height,he.drawImage(ie,0,0),Ee.toBlob(Oe=>{if(!Oe)return;const Pe=URL.createObjectURL(Oe),De=document.createElement("a");De.href=Pe,De.download=`tapflow-${Date.now()}.png`,De.click(),URL.revokeObjectURL(Pe)},"image/png"))},onRecordToggle:()=>{if(N==="idle"){const ie=D.current;if(!ie)return;const Ee=T.current;if(Ee&&Ee.clientWidth>0)ie.width=Ee.clientWidth,ie.height=Ee.clientHeight;else{const he=E.current;if(he&&he.width>0)ie.width=he.width,ie.height=he.height;else return}z(qt)}else N==="recording"&&V()},recordState:N,onRotate:()=>{n({type:"input:rotate",sessionId:e}),G(ie=>!ie)},platformSlot:Ye,launchSlot:jt}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsxs("div",{ref:C,style:{width:q?Et:Ve,height:q?Ve:Et,position:"relative",flexShrink:0},children:[v.jsxs("div",{ref:T,className:`relative ${oe?"cursor-pointer":"cursor-default"}`,style:{width:Ve,height:Et,...q?{position:"absolute",top:(Ve-Et)/2,left:(Et-Ve)/2,transform:"rotate(-90deg)",transformOrigin:"center center"}:{}},onPointerDown:An,onPointerMove:H,onPointerUp:ee,onPointerCancel:te,onPointerLeave:Ce,children:[v.jsx("img",{src:`data:image/png;base64,${g.framePng}`,style:{position:"absolute",top:0,left:0,zIndex:2,width:"100%",height:"100%",display:"block",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),v.jsx("canvas",{ref:E,style:{position:"absolute",zIndex:3,left:`${bt}%`,top:`${xt}%`,width:`${Ae}%`,height:`${Ze}%`,borderRadius:Re>0?`${Re}px`:void 0,backgroundColor:"#010101",cursor:"none",visibility:P?"visible":"hidden"}}),!P&&v.jsx("div",{className:"absolute animate-pulse bg-zinc-700",style:{zIndex:3,left:`${bt}%`,top:`${xt}%`,width:`${Ae}%`,height:`${Ze}%`,borderRadius:Re>0?`${Re}px`:void 0}}),ce&&(()=>{const ie=bt/100,Ee=xt/100,he=Ae/100,Oe=Ze/100,Pe=(De,He)=>({left:`${(ie+De*he)*100}%`,top:`${(Ee+He*Oe)*100}%`});return v.jsx(v.Fragment,{children:[ce.f0,ce.f1].map((De,He)=>v.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",...Y?{width:as*2,height:as*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:ka*2,height:ka*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"},...Pe(De.x,De.y)}},He))})})(),a&&j===0&&v.jsx("div",{style:{position:"absolute",zIndex:8,left:`${bt}%`,top:`${xt}%`,width:`${Ae}%`,height:`${Ze}%`,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:v.jsx("span",{style:{color:"white",fontSize:"0.875rem"},children:"Waiting for first frame..."})}),g.buttons.map(ie=>{const Ee=Z===ie.name,he=oe===ie.name,Oe=ie.anchor==="bottom",Pe=ie.anchor==="top",De=Oe?(ie.normalOffset.y-ie.buttonH/2)/g.compositeHeight*100:Pe?ie.rolloverOffset.y/g.compositeHeight*100:ie.normalOffset.y/g.compositeHeight*100,He=ie.buttonH/g.compositeHeight*100,wt=ie.buttonW/g.compositeWidth*100,st=ie.buttonW/2,On=(ie.rolloverOffset.x-st)/g.compositeWidth*100,Ca=(2*ie.rolloverOffset.x-ie.normalOffset.x-st)/g.compositeWidth*100,Gn=ie.rolloverOffset.x/g.compositeWidth*100,Wn=Oe?(ie.normalOffset.y-ie.buttonH/2)/g.compositeHeight*100:Pe?ie.rolloverOffset.y/g.compositeHeight*100:ie.normalOffset.y/g.compositeHeight*100,ti=Pe?(2*ie.rolloverOffset.y-ie.normalOffset.y)/g.compositeHeight*100:0,gr=ie.onTop?4:1;return v.jsxs(y.Fragment,{children:[ie.buttonPng&&v.jsx("img",{src:`data:image/png;base64,${ie.buttonPng}`,style:{position:"absolute",zIndex:gr,top:`${Pe&&he?ti:De}%`,left:`${Pe?On:he?Ca:On}%`,width:`${wt}%`,height:`${He}%`,transition:Pe?"top 0.15s ease":"left 0.15s ease",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),Ee&&ie.pressedPng&&ie.pressedRect&&v.jsx("img",{src:`data:image/png;base64,${ie.pressedPng}`,style:{position:"absolute",zIndex:ie.onTop?3:1,left:`${Pe?On:he?Ca:On}%`,top:`${Pe?he?ti:De:ie.pressedRect.y/g.compositeHeight*100}%`,width:`${ie.pressedRect.width/g.compositeWidth*100}%`,height:`${ie.pressedRect.height/g.compositeHeight*100}%`,pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),he&&v.jsx("div",{style:{position:"absolute",zIndex:5,left:`${Gn}%`,top:`${Wn}%`,transform:"translate(-50%, calc(-100% - 8px))",background:"rgba(0,0,0,0.72)",color:"#fff",fontSize:11,padding:"2px 7px",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none"},children:ie.accessibilityTitle})]},ie.name)})]}),v.jsx("div",{ref:ne,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}})]}),v.jsx(tO,{joined:a,fps:j,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:$})]})]})}class bre{constructor(t){this.onFrame=t,this.decoder=null,this.sps=null,this.pps=null,this.frameCount=0}decode(t){const n=new Uint8Array(t),a=n[0]===0&&n[1]===0&&n[2]===0&&n[3]===1?n.subarray(4):n,o=a[0]&31;if(o===7){const c=!this.sps||n.length!==this.sps.length||n.some((f,d)=>f!==this.sps[d]);this.sps=n,c&&this.decoder&&(this.decoder.close(),this.decoder=null);return}if(o===8){this.pps=n;return}if(o===5&&this.sps&&this.pps&&!this.decoder&&this.initDecoder(this.sps,this.pps),!this.decoder)return;const l=new Uint8Array(4+a.length);new DataView(l.buffer).setUint32(0,a.length,!1),l.set(a,4);try{this.decoder.decode(new EncodedVideoChunk({type:o===5?"key":"delta",timestamp:this.frameCount++*(1e6/30),data:l}))}catch{}}close(){var t;(t=this.decoder)==null||t.close(),this.decoder=null}initDecoder(t,n){const r=t[0]===0?t.subarray(4):t,a=`avc1.${r[1].toString(16).padStart(2,"0")}${r[2].toString(16).padStart(2,"0")}${r[3].toString(16).padStart(2,"0")}`,o=this.buildAVCC(t,n);this.decoder=new VideoDecoder({output:l=>this.onFrame(l),error:l=>console.error("[H264Decoder]",l)}),this.decoder.configure({codec:a,description:o,optimizeForLatency:!0})}buildAVCC(t,n){const r=t[0]===0?t.subarray(4):t,a=n[0]===0?n.subarray(4):n,o=new Uint8Array(8+r.length+1+2+a.length);let l=0;return o[l++]=1,o[l++]=r[1],o[l++]=r[2],o[l++]=r[3],o[l++]=255,o[l++]=225,o[l++]=r.length>>8&255,o[l++]=r.length&255,o.set(r,l),l+=r.length,o[l++]=1,o[l++]=a.length>>8&255,o[l++]=a.length&255,o.set(a,l),o}}const xre=`#version 300 es
414
- in vec2 a_pos;
415
- out vec2 v_uv;
416
- void main() {
417
- v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
418
- gl_Position = vec4(a_pos, 0.0, 1.0);
419
- }`,wre=`#version 300 es
420
- precision mediump float;
421
- in vec2 v_uv;
422
- uniform sampler2D u_tex;
423
- out vec4 out_color;
424
- void main() {
425
- out_color = texture(u_tex, v_uv);
426
- }`;function Sre(e){const t=e.getContext("webgl2",{alpha:!1,antialias:!1,powerPreference:"high-performance",preserveDrawingBuffer:!0});if(!t)return null;const n=(m,h)=>{const g=t.createShader(m);return t.shaderSource(g,h),t.compileShader(g),g},r=t.createProgram(),a=n(t.VERTEX_SHADER,xre),o=n(t.FRAGMENT_SHADER,wre);t.attachShader(r,a),t.attachShader(r,o),t.linkProgram(r),t.deleteShader(a),t.deleteShader(o),t.useProgram(r);const l=t.createVertexArray();t.bindVertexArray(l);const c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);const f=t.getAttribLocation(r,"a_pos");t.enableVertexAttribArray(f),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.bindVertexArray(null);const d=t.createTexture();return t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,d),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.uniform1i(t.getUniformLocation(r,"u_tex"),0),{gl:t,program:r,tex:d,vao:l}}function _re(e){const t=y.useRef(null),n=y.useCallback(()=>{const o=e.current;if(!o)return!1;const l=Sre(o);return t.current=l,l!==null},[e]),r=y.useCallback(()=>{const o=t.current;o&&(o.gl.deleteTexture(o.tex),o.gl.deleteVertexArray(o.vao),o.gl.deleteProgram(o.program),t.current=null)},[]),a=y.useCallback(o=>{const l=e.current,c=t.current;if(!l||!c)return o.close(),null;const f=o.displayWidth,d=o.displayHeight;return(l.width!==f||l.height!==d)&&(l.width=f,l.height=d,c.gl.viewport(0,0,f,d)),c.gl.activeTexture(c.gl.TEXTURE0),c.gl.bindTexture(c.gl.TEXTURE_2D,c.tex),c.gl.texImage2D(c.gl.TEXTURE_2D,0,c.gl.RGBA,c.gl.RGBA,c.gl.UNSIGNED_BYTE,o),o.close(),c.gl.bindVertexArray(c.vao),c.gl.drawArrays(c.gl.TRIANGLES,0,6),c.gl.bindVertexArray(null),c.gl.bindTexture(c.gl.TEXTURE_2D,null),{width:f,height:d}},[e]);return{init:n,dispose:r,drawFrame:a}}const $a=13,is=8,BR=16,Are=.02,Ore=720;function Ere({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:c,installError:f,bootError:d,launching:m,setLaunching:h,androidButtons:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,screenWidth:S,screenHeight:w,deviceRotation:O=0}){const E=y.useRef(null),T=y.useRef(null),{init:C,dispose:j,drawFrame:R}=_re(E),{fps:N,frameCount:D}=$4(),{recordState:z,recordCanvasRef:V,startClientRecording:U,stopClientRecording:P}=k4({sessionId:e,buildId:t,onRecordingUploaded:A}),[B,q]=y.useState(!1),[G,$]=y.useState(!1),F=y.useRef(null),[Z,X]=y.useState(null),[oe,I]=y.useState(!1),[Y,Q]=y.useState(!1),[ce,ve]=y.useState(null),fe=y.useRef(ce);y.useEffect(()=>{fe.current=ce},[ce]);const ue=y.useRef(!1),xe=y.useRef(!1),se=y.useRef(null),_e=y.useRef(0),Se=y.useRef(null),ne=y.useRef(null),Ue=y.useRef("idle"),$e=y.useRef(null);y.useEffect(()=>{if(!C()){$(!0);return}const Ze=new bre(Re=>{const Ye=R(Re);if(!Ye)return;D.current+=1,q(!0);const jt=F.current;(!jt||jt.width!==Ye.width||jt.height!==Ye.height)&&(F.current=Ye,X(Ye))});return x.current=Re=>Ze.decode(Re),()=>{x.current=void 0,Ze.close(),j()}},[C,j,R,D,x]);const rt=y.useCallback(()=>{const Ae=V.current,Ze=E.current;if(!Ae||!Ze)return;const Re=Ae.getContext("2d");if(!Re)return;Re.drawImage(Ze,0,0,Ae.width,Ae.height);const Ye=window.devicePixelRatio||1,jt=Ae.width/Ye,ie=Ae.height/Ye;Re.save(),Re.scale(Ye,Ye);const Ee=fe.current;if(Ee)for(const Oe of[Ee.f0,Ee.f1]){const Pe=Oe.x*jt,De=Oe.y*ie;ue.current?(Re.beginPath(),Re.arc(Pe,De,is,0,Math.PI*2),Re.fillStyle="rgba(255,255,255,0.92)",Re.fill(),Re.strokeStyle="rgba(0,0,0,0.2)",Re.lineWidth=1,Re.stroke()):(Re.beginPath(),Re.arc(Pe,De,$a,0,Math.PI*2),Re.strokeStyle="rgba(0,0,0,0.3)",Re.lineWidth=3,Re.stroke(),Re.beginPath(),Re.arc(Pe,De,$a,0,Math.PI*2),Re.strokeStyle="rgba(255,255,255,0.65)",Re.lineWidth=1.5,Re.stroke())}const he=ne.current;if(he){const Oe=Ue.current,Pe=$e.current;if(Oe==="down")Re.beginPath(),Re.arc(he.x,he.y,is,0,Math.PI*2),Re.fillStyle="rgba(255,255,255,0.92)",Re.fill(),Re.strokeStyle="rgba(0,0,0,0.2)",Re.lineWidth=1,Re.stroke();else if(Oe==="release"&&Pe){const De=Math.min((performance.now()-Pe.startTime)/350,1);Re.beginPath(),Re.arc(he.x,he.y,is+26*De,0,Math.PI*2),Re.strokeStyle=`rgba(255,255,255,${(1-De)*.55})`,Re.lineWidth=1.5,Re.stroke(),De>=1&&(Ue.current="idle",$e.current=null)}else Re.beginPath(),Re.arc(he.x,he.y,$a,0,Math.PI*2),Re.strokeStyle="rgba(0,0,0,0.3)",Re.lineWidth=3,Re.stroke(),Re.beginPath(),Re.arc(he.x,he.y,$a,0,Math.PI*2),Re.strokeStyle="rgba(255,255,255,0.65)",Re.lineWidth=1.5,Re.stroke()}Re.restore()},[]);y.useEffect(()=>{const Ae=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),Ze=ie=>{if(ie.code==="AltLeft"||ie.code==="AltRight"){xe.current=!0;return}if(!oe||Ae.has(ie.code))return;ie.preventDefault();const Ee=(ie.shiftKey?2:0)|(ie.ctrlKey?1:0)|(ie.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:ie.code,modifiers:Ee}})},Re=()=>{ue.current&&(ue.current=!1,Q(!1),n({type:"input:pinch:end",sessionId:e})),xe.current=!1,ve(null)},Ye=ie=>{(ie.code==="AltLeft"||ie.code==="AltRight")&&Re()},jt=()=>{xe.current&&Re()};return window.addEventListener("keydown",Ze),window.addEventListener("keyup",Ye),window.addEventListener("blur",jt),()=>{window.removeEventListener("keydown",Ze),window.removeEventListener("keyup",Ye),window.removeEventListener("blur",jt)}},[oe,n,e]),y.useEffect(()=>{if(!oe)return;const Ae=Ze=>{const Re=T.current??E.current;Re&&!Re.contains(Ze.target)&&I(!1)};return document.addEventListener("pointerdown",Ae),()=>document.removeEventListener("pointerdown",Ae)},[oe]);const et=y.useRef(!1),tt=y.useCallback(Ae=>{const Ze=E.current;if(!Ze)return null;const Re=Ze.getBoundingClientRect();return pre({x:Ae.clientX,y:Ae.clientY},Re,et.current)},[]),qt=y.useCallback(Ae=>{const Ze=tt(Ae);return Ze?L4(Ze):null},[tt]),ct=y.useCallback(Ae=>{if(xe.current){const jt=qt(Ae);if(!jt)return;ue.current=!0,Q(!0),Ae.target.setPointerCapture(Ae.pointerId);const ie=Se.current;ie&&(ie.style.display="none"),ve(jt),n({type:"input:pinch:start",sessionId:e,payload:jt});return}const Ze=tt(Ae);if(!Ze)return;I(!0),se.current=Ze,Ae.target.setPointerCapture(Ae.pointerId);const Re=Ae.currentTarget.getBoundingClientRect();ne.current={x:Ae.clientX-Re.left,y:Ae.clientY-Re.top},Ue.current="down",$e.current=null;const Ye=Se.current;Ye&&(Ye.style.display="block",Ye.style.left=`${Ae.clientX-Re.left}px`,Ye.style.top=`${Ae.clientY-Re.top}px`,Ye.style.width=`${is*2}px`,Ye.style.height=`${is*2}px`,Ye.style.background="rgba(255,255,255,0.92)",Ye.style.border="1.5px solid rgba(0,0,0,0.2)",Ye.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),n({type:"input:touch:start",sessionId:e,payload:Ze})},[tt,qt,n,e]),pn=y.useCallback(Ae=>{if(Ae.buttons===0){if(xe.current){ve(qt(Ae)),ne.current=null;const De=Se.current;De&&(De.style.display="none");return}const he=tt(Ae),Oe=Ae.currentTarget.getBoundingClientRect(),Pe=Se.current;he?(ne.current={x:Ae.clientX-Oe.left,y:Ae.clientY-Oe.top},Ue.current!=="down"&&(Ue.current="idle"),Pe&&(Pe.style.display="block",Pe.style.left=`${Ae.clientX-Oe.left}px`,Pe.style.top=`${Ae.clientY-Oe.top}px`,Pe.style.width=`${$a*2}px`,Pe.style.height=`${$a*2}px`,Pe.style.background="transparent",Pe.style.border="1.5px solid rgba(255,255,255,0.6)",Pe.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)")):(ne.current=null,Pe&&(Pe.style.display="none"));return}if(ue.current){const he=qt(Ae);if(!he)return;const Oe=performance.now();if(Oe-_e.current<BR)return;_e.current=Oe,ve(he),n({type:"input:pinch:move",sessionId:e,payload:he});return}if(!se.current)return;const Ze=tt(Ae);if(!Ze)return;const Re=Ze.x-se.current.x,Ye=Ze.y-se.current.y;if(Math.sqrt(Re*Re+Ye*Ye)<Are)return;const jt=performance.now();if(jt-_e.current<BR)return;_e.current=jt;const ie=Ae.currentTarget.getBoundingClientRect();ne.current={x:Ae.clientX-ie.left,y:Ae.clientY-ie.top};const Ee=Se.current;Ee&&Ee.style.display!=="none"&&(Ee.style.left=`${Ae.clientX-ie.left}px`,Ee.style.top=`${Ae.clientY-ie.top}px`),n({type:"input:touch:move",sessionId:e,payload:Ze})},[tt,qt,n,e]),an=y.useCallback(()=>{if(ue.current){ue.current=!1,Q(!1),ve(null),n({type:"input:pinch:end",sessionId:e});return}se.current=null,Ue.current="release",$e.current={startTime:performance.now()};const Ae=Se.current;Ae&&(Ae.style.width=`${$a*2}px`,Ae.style.height=`${$a*2}px`,Ae.style.background="transparent",Ae.style.border="1.5px solid rgba(255,255,255,0.6)",Ae.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),n({type:"input:touch:end",sessionId:e})},[n,e]),St=y.useCallback(()=>{if(ue.current){ue.current=!1,Q(!1),ve(null),n({type:"input:pinch:end",sessionId:e});return}se.current=null,Ue.current="release",$e.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),An=y.useCallback(()=>{ve(null),ne.current=null;const Ae=Se.current;Ae&&(Ae.style.display="none")},[]),H=Z??(S&&w?{width:S,height:w}:null),ee=H?Math.min(1,Ore/Math.max(H.width,H.height)):.3,te=H?Math.round(H.width*ee):324,Ce=H?Math.round(H.height*ee):720,je=O===1||O===3,Te=H?H.width>H.height:!1,Me=je&&!Te;y.useLayoutEffect(()=>{et.current=Me},[Me]);const Fe=Me?Ce:te,Ve=Me?te:Ce,Et=Me?{position:"absolute",width:te,height:Ce,top:(te-Ce)/2,left:(Ce-te)/2,transform:"rotate(90deg)",transformOrigin:"center center",visibility:B?"visible":"hidden",cursor:"none"}:{visibility:B?"visible":"hidden",cursor:"none"},bt=v.jsx(v.Fragment,{children:g==null?void 0:g.map(Ae=>v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:Ae.name}}),children:Ae.name==="back"?v.jsx(RF,{className:"h-4 w-4"}):Ae.name==="recent_apps"?v.jsx(n5,{className:"h-4 w-4"}):Ae.name==="volume_up"?v.jsx(sV,{className:"h-4 w-4"}):Ae.name==="volume_down"?v.jsx(oV,{className:"h-4 w-4"}):Ae.name==="power"?v.jsx(ZF,{className:"h-4 w-4"}):v.jsx(t5,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:Ae.accessibilityTitle})]},Ae.name))}),xt=c&&t?v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ut,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m||l,onClick:()=>{h(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(Tp,{className:"h-4 w-4 animate-spin"}):v.jsx(tA,{className:"h-4 w-4"})})}),v.jsx(Sa,{side:"left",children:m?"Launching…":l?"Installing…":"Launch app"})]}):null;return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("canvas",{ref:V,style:{display:"none"}}),v.jsx(z4,{joined:a,onScreenshot:()=>{const Ae=E.current;if(!Ae)return;const Ze=document.createElement("canvas"),Re=Ze.getContext("2d");Re&&(Ze.width=Ae.width,Ze.height=Ae.height,Re.drawImage(Ae,0,0),Ze.toBlob(Ye=>{if(!Ye)return;const jt=URL.createObjectURL(Ye),ie=document.createElement("a");ie.href=jt,ie.download=`tapflow-${Date.now()}.png`,ie.click(),URL.revokeObjectURL(jt)},"image/png"))},onRecordToggle:()=>{if(z==="idle"){const Ae=V.current;if(!Ae)return;const Ze=window.devicePixelRatio||1,Re=T.current;if(Re&&Re.clientWidth>0)Ae.width=Re.clientWidth*Ze,Ae.height=Re.clientHeight*Ze;else{const Ye=E.current;if(Ye&&Ye.width>0)Ae.width=Ye.width,Ae.height=Ye.height;else return}U(rt)}else z==="recording"&&P()},recordState:z,onRotate:()=>n({type:"input:rotate",sessionId:e}),platformSlot:bt,launchSlot:xt}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsx("div",{style:{background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0,boxShadow:"0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06)"},children:v.jsx("div",{ref:T,className:"relative",style:{width:Fe,height:Ve,backgroundColor:"#010101",borderRadius:"22px",overflow:"hidden"},children:G?v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"0.875rem"},children:"WebGL2 not supported"})}):v.jsxs(v.Fragment,{children:[v.jsx("canvas",{ref:E,className:Me?void 0:"block w-full h-full",style:Et,onPointerDown:ct,onPointerMove:pn,onPointerUp:an,onPointerCancel:St,onPointerLeave:An}),!B&&v.jsx("div",{className:"absolute inset-0 animate-pulse bg-zinc-700"}),!B&&o&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:v.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"0.875rem"},children:"Waiting for stream…"})}),v.jsx("div",{ref:Se,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}}),ce&&v.jsx(v.Fragment,{children:[ce.f0,ce.f1].map((Ae,Ze)=>v.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",left:`${Ae.x*100}%`,top:`${Ae.y*100}%`,...Y?{width:is*2,height:is*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:$a*2,height:$a*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"}}},Ze))})]})})}),v.jsx(tO,{joined:a,fps:N,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:oe})]})]})}function Tre({sessionId:e,deviceId:t,buildId:n,resetMode:r,onRecordingUploaded:a}){const o=y.useRef(()=>{}),[l,c]=y.useState(!1),[f,d]=y.useState(!1),[m,h]=y.useState(null),[g,x]=y.useState(!1),[A,S]=y.useState(!1),[w,O]=y.useState(null),[E,T]=y.useState(null),[C,j]=y.useState(!1),[R,N]=y.useState(0),[D,z]=y.useState(!1),[V,U]=y.useState(!1),P=y.useRef(void 0),B=y.useCallback(I=>{if(I.type==="session:joined"&&(c(!0),o.current({type:"device:boot",sessionId:e,payload:{deviceId:t,resetMode:r}})),I.type==="device:boot-error"&&T(I.message),I.type==="device:booting"&&(d(!1),x(!1),S(!1),O(null),T(null),h(null),N(0)),I.type==="device:rotate"&&N(I.payload.rotation),I.type==="device:ready"&&(d(!0),n&&(x(!0),o.current({type:"app:install",sessionId:e,buildId:n}))),I.type==="app:install-done"&&(x(!1),S(!0)),I.type==="app:install-error"&&(x(!1),O(I.message)),I.type==="app:launch-done"&&j(!1),I.type==="app:launch-error"&&j(!1),I.type==="session:chrome"&&h(I.payload),I.type==="keyboard:toggled"){const{visible:Y}=I.payload;z(Y),U(!1)}},[e,t,n]),q=y.useCallback(I=>{var Y;(Y=P.current)==null||Y.call(P,I)},[]),{send:G,connected:$}=eO(B,q);o.current=G,y.useEffect(()=>{$&&G({type:"session:start",sessionId:e})},[$,G,e]);const F=m!==null&&"framePng"in m?m:null,Z=m!==null&&!("framePng"in m)?m:null,oe={sessionId:e,buildId:n,send:G,connected:$,joined:l,deviceReady:f,installing:g,installed:A,installError:w,bootError:E,launching:C,setLaunching:j,binaryFrameHandlerRef:P,onRecordingUploaded:a,swKeyboardVisible:D,swKeyboardPending:V,onKbdToggle:()=>{U(!0),G({type:"input:keyboard:toggle",sessionId:e})}};return!F&&!Z?v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 px-1.5 py-2.5 shrink-0 mt-3 opacity-40",children:Array.from({length:5}).map((I,Y)=>v.jsx("div",{className:"h-8 w-8 rounded-md bg-muted animate-pulse"},Y))}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsx("div",{style:{background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0},children:v.jsx("div",{className:"animate-pulse bg-zinc-700",style:{width:324,height:720,borderRadius:"22px"}})}),v.jsx(tO,{joined:l,fps:0,connected:$,deviceReady:f,bootError:E,installing:g,installError:w,keyboardActive:!1})]})]}):v.jsxs(v.Fragment,{children:[F&&v.jsx(yre,{...oe,chrome:F}),Z&&v.jsx(Ere,{...oe,androidButtons:Z.buttons,screenWidth:Z.screenWidth,screenHeight:Z.screenHeight,deviceRotation:R})]})}var jv="Tabs",[jre]=ia(jv,[lv]),I4=lv(),[Cre,nO]=jre(jv),B4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=e,m=id(c),[h,g]=Oo({prop:r,onChange:a,defaultProp:o??"",caller:jv});return v.jsx(Cre,{scope:n,baseId:wa(),value:h,onValueChange:g,orientation:l,dir:m,activationMode:f,children:v.jsx(Xe.div,{dir:m,"data-orientation":l,...d,ref:t})})});B4.displayName=jv;var U4="TabsList",q4=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=nO(U4,n),l=I4(n);return v.jsx(FL,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:v.jsx(Xe.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});q4.displayName=U4;var H4="TabsTrigger",F4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,l=nO(H4,n),c=I4(n),f=W4(l.baseId,r),d=Y4(l.baseId,r),m=r===l.value;return v.jsx(VL,{asChild:!0,...c,focusable:!a,active:m,children:v.jsx(Xe.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...o,ref:t,onMouseDown:ze(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?l.onValueChange(r):h.preventDefault()}),onKeyDown:ze(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&l.onValueChange(r)}),onFocus:ze(e.onFocus,()=>{const h=l.activationMode!=="manual";!m&&!a&&h&&l.onValueChange(r)})})})});F4.displayName=H4;var V4="TabsContent",G4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...l}=e,c=nO(V4,n),f=W4(c.baseId,r),d=Y4(c.baseId,r),m=r===c.value,h=y.useRef(m);return y.useEffect(()=>{const g=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(g)},[]),v.jsx(ir,{present:a||m,children:({present:g})=>v.jsx(Xe.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!g,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:g&&o})})});G4.displayName=V4;function W4(e,t){return`${e}-trigger-${t}`}function Y4(e,t){return`${e}-content-${t}`}var Rre=B4,Z4=q4,K4=F4,X4=G4;const Q4=Rre,rO=y.forwardRef(({className:e,...t},n)=>v.jsx(Z4,{ref:n,className:be("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));rO.displayName=Z4.displayName;const Fp=y.forwardRef(({className:e,...t},n)=>v.jsx(K4,{ref:n,className:be("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Fp.displayName=K4.displayName;const AS=y.forwardRef(({className:e,...t},n)=>v.jsx(X4,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));AS.displayName=X4.displayName;const J4=y.forwardRef(({className:e,...t},n)=>v.jsx("textarea",{className:be("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));J4.displayName="Textarea";function Nre(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var aO="ScrollArea",[eB]=ia(aO),[Mre,sa]=eB(aO),tB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...l}=e,[c,f]=y.useState(null),[d,m]=y.useState(null),[h,g]=y.useState(null),[x,A]=y.useState(null),[S,w]=y.useState(null),[O,E]=y.useState(0),[T,C]=y.useState(0),[j,R]=y.useState(!1),[N,D]=y.useState(!1),z=lt(t,U=>f(U)),V=id(a);return v.jsx(Mre,{scope:n,type:r,dir:V,scrollHideDelay:o,scrollArea:c,viewport:d,onViewportChange:m,content:h,onContentChange:g,scrollbarX:x,onScrollbarXChange:A,scrollbarXEnabled:j,onScrollbarXEnabledChange:R,scrollbarY:S,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:D,onCornerWidthChange:E,onCornerHeightChange:C,children:v.jsx(Xe.div,{dir:V,...l,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":O+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});tB.displayName=aO;var nB="ScrollAreaViewport",rB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,l=sa(nB,n),c=y.useRef(null),f=lt(t,c,l.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(Xe.div,{"data-radix-scroll-area-viewport":"",...o,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});rB.displayName=nB;var Ja="ScrollAreaScrollbar",iO=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=sa(Ja,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,c=e.orientation==="horizontal";return y.useEffect(()=>(c?o(!0):l(!0),()=>{c?o(!1):l(!1)}),[c,o,l]),a.type==="hover"?v.jsx(Pre,{...r,ref:t,forceMount:n}):a.type==="scroll"?v.jsx(Dre,{...r,ref:t,forceMount:n}):a.type==="auto"?v.jsx(aB,{...r,ref:t,forceMount:n}):a.type==="always"?v.jsx(oO,{...r,ref:t}):null});iO.displayName=Ja;var Pre=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=sa(Ja,e.__scopeScrollArea),[o,l]=y.useState(!1);return y.useEffect(()=>{const c=a.scrollArea;let f=0;if(c){const d=()=>{window.clearTimeout(f),l(!0)},m=()=>{f=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),v.jsx(ir,{present:n||o,children:v.jsx(aB,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Dre=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=sa(Ja,e.__scopeScrollArea),o=e.orientation==="horizontal",l=Rv(()=>f("SCROLL_END"),100),[c,f]=Nre("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 y.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,a.scrollHideDelay,f]),y.useEffect(()=>{const d=a.viewport,m=o?"scrollLeft":"scrollTop";if(d){let h=d[m];const g=()=>{const x=d[m];h!==x&&(f("SCROLL"),l()),h=x};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[a.viewport,o,f,l]),v.jsx(ir,{present:n||c!=="hidden",children:v.jsx(oO,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ze(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:ze(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),aB=y.forwardRef((e,t)=>{const n=sa(Ja,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,l]=y.useState(!1),c=e.orientation==="horizontal",f=Rv(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(c?d:m)}},10);return Zl(n.viewport,f),Zl(n.content,f),v.jsx(ir,{present:r||o,children:v.jsx(oO,{"data-state":o?"visible":"hidden",...a,ref:t})})}),oO=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=sa(Ja,e.__scopeScrollArea),o=y.useRef(null),l=y.useRef(0),[c,f]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=cB(c.viewport,c.content),m={...r,sizes:c,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function h(g,x){return Bre(g,l.current,c,x)}return n==="horizontal"?v.jsx(kre,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,x=UR(g,c,a.dir);o.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollLeft=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollLeft=h(g,a.dir))}}):n==="vertical"?v.jsx($re,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,x=UR(g,c);o.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=h(g))}}):null}),kre=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=sa(Ja,e.__scopeScrollArea),[l,c]=y.useState(),f=y.useRef(null),d=lt(t,f,o.onScrollbarXChange);return y.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx(oB,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Cv(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,h)=>{if(o.viewport){const g=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),fB(g,h)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Gp(l.paddingLeft),paddingEnd:Gp(l.paddingRight)}})}})}),$re=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=sa(Ja,e.__scopeScrollArea),[l,c]=y.useState(),f=y.useRef(null),d=lt(t,f,o.onScrollbarYChange);return y.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx(oB,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Cv(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,h)=>{if(o.viewport){const g=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),fB(g,h)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Gp(l.paddingTop),paddingEnd:Gp(l.paddingBottom)}})}})}),[zre,iB]=eB(Ja),oB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:m,onResize:h,...g}=e,x=sa(Ja,n),[A,S]=y.useState(null),w=lt(t,z=>S(z)),O=y.useRef(null),E=y.useRef(""),T=x.viewport,C=r.content-r.viewport,j=Un(m),R=Un(f),N=Rv(h,10);function D(z){if(O.current){const V=z.clientX-O.current.left,U=z.clientY-O.current.top;d({x:V,y:U})}}return y.useEffect(()=>{const z=V=>{const U=V.target;(A==null?void 0:A.contains(U))&&j(V,C)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[T,A,C,j]),y.useEffect(R,[r,R]),Zl(A,N),Zl(x.content,N),v.jsx(zre,{scope:n,scrollbar:A,hasThumb:a,onThumbChange:Un(o),onThumbPointerUp:Un(l),onThumbPositionChange:R,onThumbPointerDown:Un(c),children:v.jsx(Xe.div,{...g,ref:w,style:{position:"absolute",...g.style},onPointerDown:ze(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),O.current=A.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),D(z))}),onPointerMove:ze(e.onPointerMove,D),onPointerUp:ze(e.onPointerUp,z=>{const V=z.target;V.hasPointerCapture(z.pointerId)&&V.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=E.current,x.viewport&&(x.viewport.style.scrollBehavior=""),O.current=null})})})}),Vp="ScrollAreaThumb",sB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=iB(Vp,e.__scopeScrollArea);return v.jsx(ir,{present:n||a.hasThumb,children:v.jsx(Lre,{ref:t,...r})})}),Lre=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=sa(Vp,n),l=iB(Vp,n),{onThumbPositionChange:c}=l,f=lt(t,h=>l.onThumbChange(h)),d=y.useRef(void 0),m=Rv(()=>{d.current&&(d.current(),d.current=void 0)},100);return y.useEffect(()=>{const h=o.viewport;if(h){const g=()=>{if(m(),!d.current){const x=Ure(h,c);d.current=x,c()}};return c(),h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[o.viewport,m,c]),v.jsx(Xe.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ze(e.onPointerDownCapture,h=>{const x=h.target.getBoundingClientRect(),A=h.clientX-x.left,S=h.clientY-x.top;l.onThumbPointerDown({x:A,y:S})}),onPointerUp:ze(e.onPointerUp,l.onThumbPointerUp)})});sB.displayName=Vp;var sO="ScrollAreaCorner",lB=y.forwardRef((e,t)=>{const n=sa(sO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(Ire,{...e,ref:t}):null});lB.displayName=sO;var Ire=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=sa(sO,n),[o,l]=y.useState(0),[c,f]=y.useState(0),d=!!(o&&c);return Zl(a.scrollbarX,()=>{var h;const m=((h=a.scrollbarX)==null?void 0:h.offsetHeight)||0;a.onCornerHeightChange(m),f(m)}),Zl(a.scrollbarY,()=>{var h;const m=((h=a.scrollbarY)==null?void 0:h.offsetWidth)||0;a.onCornerWidthChange(m),l(m)}),d?v.jsx(Xe.div,{...r,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Gp(e){return e?parseInt(e,10):0}function cB(e,t){const n=e/t;return isNaN(n)?0:n}function Cv(e){const t=cB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Bre(e,t,n,r="ltr"){const a=Cv(n),o=a/2,l=t||o,c=a-l,f=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,h=r==="ltr"?[0,m]:[m*-1,0];return uB([f,d],h)(e)}function UR(e,t,n="ltr"){const r=Cv(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,c=o-r,f=n==="ltr"?[0,l]:[l*-1,0],d=yS(e,f);return uB([0,l],[0,c])(d)}function uB(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 fB(e,t){return e>0&&e<t}var Ure=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,c=n.top!==o.top;(l||c)&&t(),n=o,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function Rv(e,t){const n=Un(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Zl(e,t){const n=Un(t);Fn(()=>{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 dB=tB,qre=rB,Hre=lB;const hB=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(dB,{ref:r,className:be("relative overflow-hidden",e),...n,children:[v.jsx(qre,{className:"h-full w-full rounded-[inherit]",children:t}),v.jsx(pB,{}),v.jsx(Hre,{})]}));hB.displayName=dB.displayName;const pB=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>v.jsx(iO,{ref:r,orientation:t,className:be("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:v.jsx(sB,{className:"relative flex-1 rounded-full bg-border"})}));pB.displayName=iO.displayName;function mB(e){return/[Zz]|[+-]\d{2}/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function Fre(e){const t=new Map;for(const a of e){const o=mB(a.created_at).toDateString();t.has(o)||t.set(o,[]),t.get(o).push(a)}const n=new Date().toDateString(),r=new Date(Date.now()-864e5).toDateString();return Array.from(t.entries()).map(([a,o])=>{let l;if(a===n)l="Today";else if(a===r)l="Yesterday";else{const c=new Date(a);l=c.toLocaleDateString(void 0,{month:"short",day:"numeric",...c.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{}})}return{label:l,items:o}})}function Vre(e){return mB(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}const Gre=5*1024*1024,Wre=["image/png","image/jpeg","image/webp"];function Yre({buildId:e}){const[t,n]=y.useState([]),[r,a]=y.useState(""),[o,l]=y.useState(null),[c,f]=y.useState(!1),[d,m]=y.useState(""),h=y.useRef(null),g=y.useRef({});function x(){fetch(`/api/v1/comments?build_id=${e}`,{credentials:"include"}).then(E=>E.ok?E.json():[]).then(n)}y.useEffect(()=>{x()},[e]),y.useEffect(()=>{const E=window.location.hash;if(!E.startsWith("#comment-"))return;const T=Number(E.replace("#comment-","")),C=g.current[T];if(!C)return;C.scrollIntoView({behavior:"smooth"});const j=document.documentElement.classList.contains("dark");C.style.backgroundColor=j?"rgb(0 112 243 / 0.18)":"#d3e5ff",setTimeout(()=>{C.style.backgroundColor=""},2e3)},[t]);function A(E){const T=`${location.origin}${location.pathname}${location.search}#comment-${E}`;navigator.clipboard.writeText(T).catch(()=>{})}function S(E){if(m(""),!Wre.includes(E.type)){m("Only png, jpg, webp allowed");return}if(E.size>Gre){m("Max 5MB");return}l(E)}async function w(E){if(E.preventDefault(),!r.trim()&&!o)return;f(!0);const T=new FormData;T.append("build_id",String(e)),T.append("body",r),o&&T.append("attachment",o),(await fetch("/api/v1/comments",{method:"POST",credentials:"include",body:T})).ok&&(a(""),l(null),x()),f(!1)}const O=Fre(t);return v.jsxs("div",{className:"flex h-full flex-col gap-3",children:[v.jsx(hB,{className:"flex-1 rounded-md border",children:v.jsx("div",{className:"p-3",children:t.length===0?v.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No comments yet."}):v.jsx("div",{className:"flex flex-col",children:O.map(({label:E,items:T})=>v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-2 py-3",children:[v.jsx("div",{className:"h-px flex-1 bg-border"}),v.jsx("span",{className:"text-[11px] font-medium text-muted-foreground px-1 select-none",children:E}),v.jsx("div",{className:"h-px flex-1 bg-border"})]}),v.jsx("div",{className:"flex flex-col gap-4",children:T.map(C=>v.jsxs("div",{id:`comment-${C.id}`,ref:j=>{g.current[C.id]=j},className:"group flex gap-2.5 rounded-md px-2 py-1.5 transition-all",children:[v.jsx("div",{className:"mt-0.5 shrink-0",children:v.jsx(qI,{name:C.author,avatarUrl:C.authorAvatarUrl,size:28})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-sm font-semibold leading-none",children:C.author}),v.jsx("span",{className:"text-[11px] text-muted-foreground leading-none",children:Vre(C.created_at)}),v.jsx(ut,{variant:"ghost",size:"icon",className:"h-4 w-4 ml-0.5 opacity-0 group-hover:opacity-50 hover:!opacity-100 transition-opacity",onClick:()=>A(C.id),children:v.jsx(HF,{className:"h-3 w-3"})})]}),v.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap mt-1",children:C.body}),C.attachments.map(j=>v.jsx("a",{href:j.file_path,target:"_blank",rel:"noreferrer",className:"mt-1.5 block",children:v.jsx("img",{src:j.file_path,alt:"attachment",className:"max-h-48 rounded border object-contain"})},j.id))]})]},C.id))})]},E))})})}),v.jsx("div",{className:"px-1 pb-1",children:v.jsx("form",{onSubmit:w,children:v.jsxs("div",{className:"rounded-xl border border-input bg-background ring-offset-background transition-shadow focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",children:[v.jsx(J4,{placeholder:"Leave a comment…",value:r,onChange:E=>a(E.target.value),className:"min-h-16 resize-none border-0 bg-transparent shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm"}),(o||d)&&v.jsxs("div",{className:"px-3 -mt-1 pb-1",children:[o&&v.jsx("p",{className:"text-xs text-muted-foreground",children:o.name}),d&&v.jsx("p",{className:"text-xs text-destructive",children:d})]}),v.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[v.jsx(ut,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>{var E;return(E=h.current)==null?void 0:E.click()},children:v.jsx(LF,{className:"h-4 w-4"})}),v.jsx("input",{ref:h,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:E=>{var C;const T=(C=E.target.files)==null?void 0:C[0];T&&S(T)}}),v.jsx("div",{className:"flex-1"}),v.jsx(ut,{type:"submit",size:"icon",className:"h-7 w-7 rounded-full",disabled:c||!r.trim()&&!o,children:v.jsx(NF,{className:"h-3.5 w-3.5"})})]})]})})})]})}function Zre(e){return e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Kre(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Xre(e){const t=new Date(e).getTime()-Date.now();if(t<=0)return{label:"Expired",urgent:!0};const n=Math.floor(t/36e5);return n<1?{label:"< 1 hour left",urgent:!0}:n<24?{label:`Expires in ${n}h`,urgent:n<6}:{label:`Expires in ${Math.floor(n/24)}d`,urgent:!1}}function Qre({buildId:e,refreshKey:t}){const[n,r]=y.useState([]),[a,o]=y.useState(!0);return y.useEffect(()=>{o(!0),fetch(`/api/v1/recordings?buildId=${e}`,{credentials:"include"}).then(l=>l.ok?l.json():[]).then(l=>r(l)).catch(()=>r([])).finally(()=>o(!1))},[e,t]),a?v.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading recordings…"}):n.length===0?v.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No recordings yet."}):v.jsx("div",{className:"flex flex-col gap-2",children:n.map(l=>{const c=Xre(l.expiresAt);return v.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[v.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[v.jsx("span",{className:"text-xs font-medium truncate",children:Kre(l.createdAt)}),v.jsxs("span",{className:`text-xs ${c.urgent?"text-destructive":"text-muted-foreground"}`,children:[c.label," · ",Zre(l.fileSize)]})]}),v.jsx(ut,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 ml-2",title:"Download",onClick:()=>{const f=document.createElement("a");f.href=l.url,f.download="",f.click()},children:v.jsx($F,{className:"h-3.5 w-3.5"})})]},l.id)})})}function Jre({buildId:e,recordingsRefreshKey:t=0}){return v.jsxs(Q4,{defaultValue:"comments",className:"flex h-full flex-col",children:[v.jsxs(rO,{className:"w-full shrink-0",children:[v.jsxs(Fp,{value:"comments",className:"flex-1 gap-1.5",children:[v.jsx(VF,{className:"h-3.5 w-3.5"}),"Comments"]}),v.jsxs(Fp,{value:"recordings",className:"flex-1 gap-1.5",children:[v.jsx(zF,{className:"h-3.5 w-3.5"}),"Recordings"]})]}),v.jsx(AS,{value:"comments",className:"mt-3 min-h-0 flex-1 overflow-hidden",children:v.jsx(Yre,{buildId:e})}),v.jsx(AS,{value:"recordings",className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:v.jsx(Qre,{buildId:e,refreshKey:t})})]})}const vB=y.forwardRef(({...e},t)=>v.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));vB.displayName="Breadcrumb";const gB=y.forwardRef(({className:e,...t},n)=>v.jsx("ol",{ref:n,className:be("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));gB.displayName="BreadcrumbList";const Vu=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,className:be("inline-flex items-center gap-1.5",e),...t}));Vu.displayName="BreadcrumbItem";const wp=y.forwardRef(({asChild:e,className:t,...n},r)=>{const a=e?Ns:"a";return v.jsx(a,{ref:r,className:be("transition-colors hover:text-foreground cursor-pointer",t),...n})});wp.displayName="BreadcrumbLink";const Sp=y.forwardRef(({className:e,...t},n)=>v.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:be("font-medium text-foreground",e),...t}));Sp.displayName="BreadcrumbPage";const _p=({children:e,className:t,...n})=>v.jsx("li",{role:"presentation","aria-hidden":"true",className:be("[&>svg]:h-3.5 [&>svg]:w-3.5",t),...n,children:e??v.jsx(eA,{})});_p.displayName="BreadcrumbSeparator";var Nv="Switch",[eae]=ia(Nv),[tae,nae]=eae(Nv),yB=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:l,disabled:c,value:f="on",onCheckedChange:d,form:m,...h}=e,[g,x]=y.useState(null),A=lt(t,T=>x(T)),S=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[O,E]=Oo({prop:a,defaultProp:o??!1,onChange:d,caller:Nv});return v.jsxs(tae,{scope:n,checked:O,disabled:c,children:[v.jsx(Xe.button,{type:"button",role:"switch","aria-checked":O,"aria-required":l,"data-state":SB(O),"data-disabled":c?"":void 0,disabled:c,value:f,...h,ref:A,onClick:ze(e.onClick,T=>{E(C=>!C),w&&(S.current=T.isPropagationStopped(),S.current||T.stopPropagation())})}),w&&v.jsx(wB,{control:g,bubbles:!S.current,name:r,value:f,checked:O,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});yB.displayName=Nv;var bB="SwitchThumb",xB=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=nae(bB,n);return v.jsx(Xe.span,{"data-state":SB(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});xB.displayName=bB;var rae="SwitchBubbleInput",wB=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),c=lt(l,o),f=C3(n),d=uL(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(h,"checked").set;if(f!==n&&x){const A=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(A)}},[f,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});wB.displayName=rae;function SB(e){return e?"checked":"unchecked"}var _B=yB,aae=xB;const AB=y.forwardRef(({className:e,...t},n)=>v.jsx(_B,{className:be("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:v.jsx(aae,{className:be("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));AB.displayName=_B.displayName;function iae(){const[e]=Ym(),t=Ka(),n=e.get("id"),[r,a]=y.useState(null),[o,l]=y.useState([]),[c,f]=y.useState(null),[d,m]=y.useState(""),[h,g]=y.useState(null),[x,A]=y.useState(!1),[S,w]=y.useState(""),[O,E]=y.useState(0),[T,C]=y.useState("app-only");y.useEffect(()=>{n&&Bne(n).then(a)},[n]);const j=y.useCallback(fe=>{fe.type==="agents:listed"&&l(fe.sessions),fe.type==="session:joined"&&(A(!1),w("Connected")),fe.type==="error"&&(A(!1),w(`Error: ${fe.message}`))},[]),{send:R,connected:N}=eO(j);y.useEffect(()=>{if(!N)return;R({type:"agents:list"});const fe=setInterval(()=>R({type:"agents:list"}),5e3);return()=>clearInterval(fe)},[N,R]);const D=(r==null?void 0:r.platform)??"ios",z=o.filter(fe=>fe.devices.some(ue=>ue.platform===D)),V=z.find(fe=>fe.agentName===c),U=(V==null?void 0:V.devices.filter(fe=>fe.platform===D))??[],B=o.flatMap(fe=>fe.devices).find(fe=>fe.id===d),q=B?`${B.name}${B.osVersion?` · ${B.osVersion}`:""}`:"",G=[...new Set(U.map(fe=>fe.osVersion).filter(Boolean))].sort((fe,ue)=>{const xe=Se=>Se.replace(/^[^\d]*/,"").split(".").map(Number),[se,_e]=[xe(fe),xe(ue)];for(let Se=0;Se<Math.max(se.length,_e.length);Se++){const ne=(_e[Se]??0)-(se[Se]??0);if(ne!==0)return ne}return 0}),[$,F]=y.useState(""),[Z,X]=y.useState(""),oe=($?U.filter(fe=>fe.osVersion===$):U).filter(fe=>!Z||fe.name.toLowerCase().includes(Z.toLowerCase())),I=y.useCallback(()=>{h&&d&&R({type:"device:shutdown",sessionId:h,payload:{deviceId:d}}),g(null),A(!1),w("")},[h,d,R]),Y=y.useCallback(()=>E(fe=>fe+1),[]),Q=y.useCallback(()=>{h&&d&&R({type:"device:shutdown",sessionId:h,payload:{deviceId:d}}),g(null),f(null),A(!1),w("")},[h,d,R]),ce=y.useRef({sessionId:h,deviceId:d});y.useEffect(()=>{ce.current={sessionId:h,deviceId:d}},[h,d]),y.useEffect(()=>()=>{const{sessionId:fe,deviceId:ue}=ce.current;fe&&ue&&R({type:"device:shutdown",sessionId:fe,payload:{deviceId:ue}})},[R]);const{setNode:ve}=kA();return y.useEffect(()=>{if(r)return ve(v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(vB,{children:v.jsxs(gB,{children:[v.jsx(Vu,{children:v.jsx(wp,{asChild:!0,children:v.jsx("button",{onClick:()=>t(`/app-center?appId=${r.app_id}`),children:r.name})})}),v.jsx(_p,{}),v.jsx(Vu,{children:c?v.jsx(wp,{asChild:!0,children:v.jsx("button",{onClick:Q,children:LR(r)})}):v.jsx(Sp,{children:LR(r)})}),c&&v.jsxs(v.Fragment,{children:[v.jsx(_p,{}),v.jsx(Vu,{children:h?v.jsx(wp,{asChild:!0,children:v.jsx("button",{onClick:I,children:c})}):v.jsx(Sp,{children:c})})]}),h&&v.jsxs(v.Fragment,{children:[v.jsx(_p,{}),v.jsx(Vu,{children:v.jsx(Sp,{children:q})})]})]})}),!c&&r.status_label&&v.jsx(Yl,{tone:D4[r.status_label],children:r.status_label})]})),()=>ve(null)},[r,c,h,q,t,I,Q,ve]),v.jsxs("div",{className:"flex h-full min-h-0 gap-6 p-6",children:[v.jsx("div",{className:"flex flex-col gap-3 flex-1 min-w-0 min-h-0",children:v.jsx("div",{className:"flex-1 min-h-0 overflow-auto -ml-1 pl-1 -mr-4 pr-4",children:h?v.jsx("div",{className:"min-h-full flex items-center justify-center py-6 px-8 min-w-max",children:v.jsx(Tre,{sessionId:h,deviceId:d,buildId:r==null?void 0:r.id,resetMode:T,onRecordingUploaded:Y})}):c?v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:Q,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"← All Macs"}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select device"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(j3,{placeholder:"Search device…",value:Z,onChange:X}),G.length>0&&v.jsxs(As,{value:$||"__all__",onValueChange:fe=>{F(fe==="__all__"?"":fe),m("")},children:[v.jsx(jo,{className:"h-8 w-36 shrink-0",children:v.jsx(Os,{})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"__all__",children:"Any version"}),G.map(fe=>v.jsx(kt,{value:fe,children:fe},fe))]})]}),v.jsx(AA,{children:v.jsxs(Fa,{children:[v.jsxs("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:[v.jsx(Va,{asChild:!0,children:v.jsxs(Ft,{htmlFor:"reset-mode",className:"flex items-center gap-1 text-sm cursor-pointer whitespace-nowrap",children:[v.jsx(IF,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Full reset"]})}),v.jsx(AB,{id:"reset-mode",checked:T==="full-erase",onCheckedChange:fe=>C(fe?"full-erase":"app-only")})]}),v.jsx(Sa,{children:T==="full-erase"?"Erase all data before booting":"Keep existing data"})]})})]}),oe.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:N?"No devices available for this OS.":"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:oe.map(fe=>{const ue=fe.status==="booted",xe=fe.busy,se=xe?"In use":ue?"Booted":"Available",_e=xe?"bg-amber-400":ue?"bg-emerald-400":"bg-muted-foreground/40";return v.jsxs("button",{disabled:xe||x||!N,onClick:()=>{m(fe.id),A(!0),w("Booting…"),g(fe.sessionId)},className:be("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px]","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),children:[v.jsx("span",{className:"text-sm font-medium leading-tight",children:fe.name}),fe.osVersion&&v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:fe.osVersion}),v.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsx("span",{className:be("inline-block h-1.5 w-1.5 rounded-full",_e)}),se]})]},fe.id)})}),S&&v.jsx("p",{className:"text-sm text-muted-foreground",children:S})]}):v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select Mac"}),z.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:N?`No agents available for ${D}.`:"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:z.map(fe=>{const ue=fe.resources,xe=ue?Date.now()-ue.reportedAt>3e4:!1,se=fe.devices.filter(ne=>ne.platform===D).length,_e=(ue==null?void 0:ue.cpuPercent)??0,Se=ue?ue.memUsedMB/ue.memTotalMB*100:0;return v.jsxs("button",{onClick:()=>f(fe.agentName??null),className:be("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px]","hover:bg-accent"),children:[v.jsxs("div",{className:"flex items-start justify-between gap-2",children:[v.jsx("span",{className:"text-sm font-medium leading-tight truncate",children:fe.agentName??"Unknown"}),xe&&v.jsx("span",{className:"shrink-0 text-[10px] font-medium text-amber-500",children:"Stale"})]}),v.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsxs("span",{children:[se," device",se!==1?"s":""]}),ue&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsxs("span",{children:[ue.slotsAvailable,"/",ue.slotsTotal," slots"]})]})]}),ue&&!xe&&v.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[v.jsx(qR,{label:"CPU",percent:_e,colorClass:"bg-blue-400"}),v.jsx(qR,{label:"RAM",percent:Se,colorClass:"bg-violet-400"})]})]},fe.agentName)})})]})})}),n&&v.jsxs(v.Fragment,{children:[v.jsx(Ya,{orientation:"vertical",className:"h-auto"}),v.jsx("div",{className:"w-80 shrink-0 h-full",children:v.jsx(Jre,{buildId:Number(n),recordingsRefreshKey:O})})]})]})}function qR({label:e,percent:t,colorClass:n}){return v.jsxs("div",{className:"flex flex-col gap-0.5",children:[v.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground",children:[v.jsx("span",{children:e}),v.jsxs("span",{children:[t.toFixed(0),"%"]})]}),v.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:v.jsx("div",{className:be("h-full rounded-full transition-all",n),style:{width:`${Math.min(100,t)}%`}})})]})}var Vb,HR;function vr(){if(HR)return Vb;HR=1;var e=Array.isArray;return Vb=e,Vb}var Gb,FR;function OB(){if(FR)return Gb;FR=1;var e=typeof Ih=="object"&&Ih&&Ih.Object===Object&&Ih;return Gb=e,Gb}var Wb,VR;function ei(){if(VR)return Wb;VR=1;var e=OB(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Wb=n,Wb}var Yb,GR;function bd(){if(GR)return Yb;GR=1;var e=ei(),t=e.Symbol;return Yb=t,Yb}var Zb,WR;function oae(){if(WR)return Zb;WR=1;var e=bd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function o(l){var c=n.call(l,a),f=l[a];try{l[a]=void 0;var d=!0}catch{}var m=r.call(l);return d&&(c?l[a]=f:delete l[a]),m}return Zb=o,Zb}var Kb,YR;function sae(){if(YR)return Kb;YR=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Kb=n,Kb}var Xb,ZR;function Li(){if(ZR)return Xb;ZR=1;var e=bd(),t=oae(),n=sae(),r="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?a:r:o&&o in Object(c)?t(c):n(c)}return Xb=l,Xb}var Qb,KR;function Ii(){if(KR)return Qb;KR=1;function e(t){return t!=null&&typeof t=="object"}return Qb=e,Qb}var Jb,XR;function jc(){if(XR)return Jb;XR=1;var e=Li(),t=Ii(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return Jb=r,Jb}var e0,QR;function lO(){if(QR)return e0;QR=1;var e=vr(),t=jc(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(o,l){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return e0=a,e0}var t0,JR;function Do(){if(JR)return t0;JR=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return t0=e,t0}var n0,eN;function cO(){if(eN)return n0;eN=1;var e=Li(),t=Do(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",o="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==a||f==n||f==o}return n0=l,n0}var r0,tN;function lae(){if(tN)return r0;tN=1;var e=ei(),t=e["__core-js_shared__"];return r0=t,r0}var a0,nN;function cae(){if(nN)return a0;nN=1;var e=lae(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return a0=n,a0}var i0,rN;function EB(){if(rN)return i0;rN=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return i0=n,i0}var o0,aN;function uae(){if(aN)return o0;aN=1;var e=cO(),t=cae(),n=Do(),r=EB(),a=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,m=RegExp("^"+f.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!n(g)||t(g))return!1;var x=e(g)?m:o;return x.test(r(g))}return o0=h,o0}var s0,iN;function fae(){if(iN)return s0;iN=1;function e(t,n){return t==null?void 0:t[n]}return s0=e,s0}var l0,oN;function ks(){if(oN)return l0;oN=1;var e=uae(),t=fae();function n(r,a){var o=t(r,a);return e(o)?o:void 0}return l0=n,l0}var c0,sN;function Mv(){if(sN)return c0;sN=1;var e=ks(),t=e(Object,"create");return c0=t,c0}var u0,lN;function dae(){if(lN)return u0;lN=1;var e=Mv();function t(){this.__data__=e?e(null):{},this.size=0}return u0=t,u0}var f0,cN;function hae(){if(cN)return f0;cN=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return f0=e,f0}var d0,uN;function pae(){if(uN)return d0;uN=1;var e=Mv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(o){var l=this.__data__;if(e){var c=l[o];return c===t?void 0:c}return r.call(l,o)?l[o]:void 0}return d0=a,d0}var h0,fN;function mae(){if(fN)return h0;fN=1;var e=Mv(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var o=this.__data__;return e?o[a]!==void 0:n.call(o,a)}return h0=r,h0}var p0,dN;function vae(){if(dN)return p0;dN=1;var e=Mv(),t="__lodash_hash_undefined__";function n(r,a){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&a===void 0?t:a,this}return p0=n,p0}var m0,hN;function gae(){if(hN)return m0;hN=1;var e=dae(),t=hae(),n=pae(),r=mae(),a=vae();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,m0=o,m0}var v0,pN;function yae(){if(pN)return v0;pN=1;function e(){this.__data__=[],this.size=0}return v0=e,v0}var g0,mN;function uO(){if(mN)return g0;mN=1;function e(t,n){return t===n||t!==t&&n!==n}return g0=e,g0}var y0,vN;function Pv(){if(vN)return y0;vN=1;var e=uO();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return y0=t,y0}var b0,gN;function bae(){if(gN)return b0;gN=1;var e=Pv(),t=Array.prototype,n=t.splice;function r(a){var o=this.__data__,l=e(o,a);if(l<0)return!1;var c=o.length-1;return l==c?o.pop():n.call(o,l,1),--this.size,!0}return b0=r,b0}var x0,yN;function xae(){if(yN)return x0;yN=1;var e=Pv();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return x0=t,x0}var w0,bN;function wae(){if(bN)return w0;bN=1;var e=Pv();function t(n){return e(this.__data__,n)>-1}return w0=t,w0}var S0,xN;function Sae(){if(xN)return S0;xN=1;var e=Pv();function t(n,r){var a=this.__data__,o=e(a,n);return o<0?(++this.size,a.push([n,r])):a[o][1]=r,this}return S0=t,S0}var _0,wN;function Dv(){if(wN)return _0;wN=1;var e=yae(),t=bae(),n=xae(),r=wae(),a=Sae();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,_0=o,_0}var A0,SN;function fO(){if(SN)return A0;SN=1;var e=ks(),t=ei(),n=e(t,"Map");return A0=n,A0}var O0,_N;function _ae(){if(_N)return O0;_N=1;var e=gae(),t=Dv(),n=fO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return O0=r,O0}var E0,AN;function Aae(){if(AN)return E0;AN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return E0=e,E0}var T0,ON;function kv(){if(ON)return T0;ON=1;var e=Aae();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return T0=t,T0}var j0,EN;function Oae(){if(EN)return j0;EN=1;var e=kv();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return j0=t,j0}var C0,TN;function Eae(){if(TN)return C0;TN=1;var e=kv();function t(n){return e(this,n).get(n)}return C0=t,C0}var R0,jN;function Tae(){if(jN)return R0;jN=1;var e=kv();function t(n){return e(this,n).has(n)}return R0=t,R0}var N0,CN;function jae(){if(CN)return N0;CN=1;var e=kv();function t(n,r){var a=e(this,n),o=a.size;return a.set(n,r),this.size+=a.size==o?0:1,this}return N0=t,N0}var M0,RN;function dO(){if(RN)return M0;RN=1;var e=_ae(),t=Oae(),n=Eae(),r=Tae(),a=jae();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,M0=o,M0}var P0,NN;function TB(){if(NN)return P0;NN=1;var e=dO(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var o=function(){var l=arguments,c=a?a.apply(this,l):l[0],f=o.cache;if(f.has(c))return f.get(c);var d=r.apply(this,l);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,P0=n,P0}var D0,MN;function Cae(){if(MN)return D0;MN=1;var e=TB(),t=500;function n(r){var a=e(r,function(l){return o.size===t&&o.clear(),l}),o=a.cache;return a}return D0=n,D0}var k0,PN;function Rae(){if(PN)return k0;PN=1;var e=Cae(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var o=[];return a.charCodeAt(0)===46&&o.push(""),a.replace(t,function(l,c,f,d){o.push(f?d.replace(n,"$1"):c||l)}),o});return k0=r,k0}var $0,DN;function hO(){if(DN)return $0;DN=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=Array(a);++r<a;)o[r]=n(t[r],r,t);return o}return $0=e,$0}var z0,kN;function Nae(){if(kN)return z0;kN=1;var e=bd(),t=hO(),n=vr(),r=jc(),a=e?e.prototype:void 0,o=a?a.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return z0=l,z0}var L0,$N;function jB(){if($N)return L0;$N=1;var e=Nae();function t(n){return n==null?"":e(n)}return L0=t,L0}var I0,zN;function CB(){if(zN)return I0;zN=1;var e=vr(),t=lO(),n=Rae(),r=jB();function a(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return I0=a,I0}var B0,LN;function $v(){if(LN)return B0;LN=1;var e=jc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return B0=t,B0}var U0,IN;function pO(){if(IN)return U0;IN=1;var e=CB(),t=$v();function n(r,a){a=e(a,r);for(var o=0,l=a.length;r!=null&&o<l;)r=r[t(a[o++])];return o&&o==l?r:void 0}return U0=n,U0}var q0,BN;function RB(){if(BN)return q0;BN=1;var e=pO();function t(n,r,a){var o=n==null?void 0:e(n,r);return o===void 0?a:o}return q0=t,q0}var Mae=RB();const na=Ut(Mae);var H0,UN;function Pae(){if(UN)return H0;UN=1;function e(t){return t==null}return H0=e,H0}var Dae=Pae();const vt=Ut(Dae);var F0,qN;function kae(){if(qN)return F0;qN=1;var e=Li(),t=vr(),n=Ii(),r="[object String]";function a(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return F0=a,F0}var $ae=kae();const Es=Ut($ae);var zae=cO();const ot=Ut(zae);var Lae=Do();const Cc=Ut(Lae);var V0={exports:{}},Ct={};/**
427
- * @license React
428
- * react-is.production.min.js
429
- *
430
- * Copyright (c) Facebook, Inc. and its affiliates.
431
- *
432
- * This source code is licensed under the MIT license found in the
433
- * LICENSE file in the root directory of this source tree.
434
- */var HN;function Iae(){if(HN)return Ct;HN=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),A;A=Symbol.for("react.module.reference");function S(w){if(typeof w=="object"&&w!==null){var O=w.$$typeof;switch(O){case e:switch(w=w.type,w){case n:case a:case r:case d:case m:return w;default:switch(w=w&&w.$$typeof,w){case c:case l:case f:case g:case h:case o:return w;default:return O}}case t:return O}}}return Ct.ContextConsumer=l,Ct.ContextProvider=o,Ct.Element=e,Ct.ForwardRef=f,Ct.Fragment=n,Ct.Lazy=g,Ct.Memo=h,Ct.Portal=t,Ct.Profiler=a,Ct.StrictMode=r,Ct.Suspense=d,Ct.SuspenseList=m,Ct.isAsyncMode=function(){return!1},Ct.isConcurrentMode=function(){return!1},Ct.isContextConsumer=function(w){return S(w)===l},Ct.isContextProvider=function(w){return S(w)===o},Ct.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Ct.isForwardRef=function(w){return S(w)===f},Ct.isFragment=function(w){return S(w)===n},Ct.isLazy=function(w){return S(w)===g},Ct.isMemo=function(w){return S(w)===h},Ct.isPortal=function(w){return S(w)===t},Ct.isProfiler=function(w){return S(w)===a},Ct.isStrictMode=function(w){return S(w)===r},Ct.isSuspense=function(w){return S(w)===d},Ct.isSuspenseList=function(w){return S(w)===m},Ct.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===a||w===r||w===d||w===m||w===x||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===o||w.$$typeof===l||w.$$typeof===f||w.$$typeof===A||w.getModuleId!==void 0)},Ct.typeOf=S,Ct}var FN;function Bae(){return FN||(FN=1,V0.exports=Iae()),V0.exports}var Uae=Bae(),G0,VN;function NB(){if(VN)return G0;VN=1;var e=Li(),t=Ii(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return G0=r,G0}var W0,GN;function qae(){if(GN)return W0;GN=1;var e=NB();function t(n){return e(n)&&n!=+n}return W0=t,W0}var Hae=qae();const Rc=Ut(Hae);var Fae=NB();const Vae=Ut(Fae);var ba=function(t){return t===0?0:t>0?1:-1},us=function(t){return Es(t)&&t.indexOf("%")===t.length-1},Ne=function(t){return Vae(t)&&!Rc(t)},Gae=function(t){return vt(t)},Cn=function(t){return Ne(t)||Es(t)},Wae=0,xd=function(t){var n=++Wae;return"".concat(t||"").concat(n)},Ts=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(!Ne(t)&&!Es(t))return r;var o;if(us(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Rc(o)&&(o=r),a&&o>n&&(o=n),o},yo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Yae=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},Zr=function(t,n){return Ne(t)&&Ne(n)?function(r){return t+r*(n-t)}:function(){return n}};function Wp(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):na(r,t))===n})}var Zae=function(t,n){return Ne(t)&&Ne(n)?t-n:Es(t)&&Es(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Bl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function OS(e){"@babel/helpers - typeof";return OS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},OS(e)}var Kae=["viewBox","children"],Xae=["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"],WN=["points","pathLength"],Y0={svg:Kae,polygon:WN,polyline:WN},mO=["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"],Yp=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(y.isValidElement(t)&&(r=t.props),!Cc(r))return null;var a={};return Object.keys(r).forEach(function(o){mO.includes(o)&&(a[o]=n||function(l){return r[o](r,l)})}),a},Qae=function(t,n,r){return function(a){return t(n,r,a),null}},Zp=function(t,n,r){if(!Cc(t)||OS(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(o){var l=t[o];mO.includes(o)&&typeof l=="function"&&(a||(a={}),a[o]=Qae(l,n,r))}),a},Jae=["children"],eie=["children"];function YN(e,t){if(e==null)return{};var n=tie(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ES(e){"@babel/helpers - typeof";return ES=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ES(e)}var ZN={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Oi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},KN=null,Z0=null,vO=function e(t){if(t===KN&&Array.isArray(Z0))return Z0;var n=[];return y.Children.forEach(t,function(r){vt(r)||(Uae.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Z0=n,KN=t,n};function _a(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Oi(a)}):r=[Oi(t)],vO(e).forEach(function(a){var o=na(a,"type.displayName")||na(a,"type.name");r.indexOf(o)!==-1&&n.push(a)}),n}function Tr(e,t){var n=_a(e,t);return n&&n[0]}var XN=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Ne(r)||r<=0||!Ne(a)||a<=0)},nie=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],rie=function(t){return t&&t.type&&Es(t.type)&&nie.indexOf(t.type)>=0},aie=function(t){return t&&ES(t)==="object"&&"clipDot"in t},iie=function(t,n,r,a){var o,l=(o=Y0==null?void 0:Y0[a])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!ot(t)&&(a&&l.includes(n)||Xae.includes(n))||r&&mO.includes(n)},ht=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(y.isValidElement(t)&&(a=t.props),!Cc(a))return null;var o={};return Object.keys(a).forEach(function(l){var c;iie((c=a)===null||c===void 0?void 0:c[l],l,n,r)&&(o[l]=a[l])}),o},TS=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return QN(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var o=t[a],l=n[a];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!QN(o,l))return!1}return!0},QN=function(t,n){if(vt(t)&&vt(n))return!0;if(!vt(t)&&!vt(n)){var r=t.props||{},a=r.children,o=YN(r,Jae),l=n.props||{},c=l.children,f=YN(l,eie);return a&&c?Bl(o,f)&&TS(a,c):!a&&!c?Bl(o,f):!1}return!1},JN=function(t,n){var r=[],a={};return vO(t).forEach(function(o,l){if(rie(o))r.push(o);else if(o){var c=Oi(o.type),f=n[c]||{},d=f.handler,m=f.once;if(d&&(!m||!a[c])){var h=d(o,c,l);r.push(h),a[c]=!0}}}),r},oie=function(t){var n=t&&t.type;return n&&ZN[n]?ZN[n]:null},sie=function(t,n){return vO(n).indexOf(t)},lie=["children","width","height","viewBox","className","style","title","desc"];function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jS.apply(this,arguments)}function cie(e,t){if(e==null)return{};var n=uie(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CS(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,o=e.className,l=e.style,c=e.title,f=e.desc,d=cie(e,lie),m=a||{width:n,height:r,x:0,y:0},h=yt("recharts-surface",o);return L.createElement("svg",jS({},ht(d,!0,"svg"),{className:h,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),L.createElement("title",null,c),L.createElement("desc",null,f),t)}var fie=["children","className"];function RS(){return RS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RS.apply(this,arguments)}function die(e,t){if(e==null)return{};var n=hie(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var nn=L.forwardRef(function(e,t){var n=e.children,r=e.className,a=die(e,fie),o=yt("recharts-layer",r);return L.createElement("g",RS({className:o},ht(a,!0),{ref:t}),n)}),Ei=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o]},K0,eM;function pie(){if(eM)return K0;eM=1;function e(t,n,r){var a=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++a<o;)l[a]=t[a+n];return l}return K0=e,K0}var X0,tM;function mie(){if(tM)return X0;tM=1;var e=pie();function t(n,r,a){var o=n.length;return a=a===void 0?o:a,!r&&a>=o?n:e(n,r,a)}return X0=t,X0}var Q0,nM;function MB(){if(nM)return Q0;nM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+a+o+"]");function f(d){return c.test(d)}return Q0=f,Q0}var J0,rM;function vie(){if(rM)return J0;rM=1;function e(t){return t.split("")}return J0=e,J0}var ex,aM;function gie(){if(aM)return ex;aM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",c="["+a+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",m="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",A=d+"?",S="["+o+"]?",w="(?:"+x+"(?:"+[m,h,g].join("|")+")"+S+A+")*",O=S+A+w,E="(?:"+[m+c+"?",c,h,g,l].join("|")+")",T=RegExp(f+"(?="+f+")|"+E+O,"g");function C(j){return j.match(T)||[]}return ex=C,ex}var tx,iM;function yie(){if(iM)return tx;iM=1;var e=vie(),t=MB(),n=gie();function r(a){return t(a)?n(a):e(a)}return tx=r,tx}var nx,oM;function bie(){if(oM)return nx;oM=1;var e=mie(),t=MB(),n=yie(),r=jB();function a(o){return function(l){l=r(l);var c=t(l)?n(l):void 0,f=c?c[0]:l.charAt(0),d=c?e(c,1).join(""):l.slice(1);return f[o]()+d}}return nx=a,nx}var rx,sM;function xie(){if(sM)return rx;sM=1;var e=bie(),t=e("toUpperCase");return rx=t,rx}var wie=xie();const zv=Ut(wie);function Gt(e){return function(){return e}}const PB=Math.cos,Kp=Math.sin,ja=Math.sqrt,Xp=Math.PI,Lv=2*Xp,NS=Math.PI,MS=2*NS,ss=1e-6,Sie=MS-ss;function DB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function _ie(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return DB;const n=10**t;return function(r){this._+=r[0];for(let a=1,o=r.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class Aie{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?DB:_ie(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,o,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,a,o){if(t=+t,n=+n,r=+r,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,f=r-t,d=a-n,m=l-t,h=c-n,g=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>ss)if(!(Math.abs(h*f-d*m)>ss)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-l,A=a-c,S=f*f+d*d,w=x*x+A*A,O=Math.sqrt(S),E=Math.sqrt(g),T=o*Math.tan((NS-Math.acos((S+g-w)/(2*O*E)))/2),C=T/E,j=T/O;Math.abs(C-1)>ss&&this._append`L${t+C*m},${n+C*h}`,this._append`A${o},${o},0,0,${+(h*x>m*A)},${this._x1=t+j*f},${this._y1=n+j*d}`}}arc(t,n,r,a,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(a),f=r*Math.sin(a),d=t+c,m=n+f,h=1^l,g=l?a-o:o-a;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>ss||Math.abs(this._y1-m)>ss)&&this._append`L${d},${m}`,r&&(g<0&&(g=g%MS+MS),g>Sie?this._append`A${r},${r},0,1,${h},${t-c},${n-f}A${r},${r},0,1,${h},${this._x1=d},${this._y1=m}`:g>ss&&this._append`A${r},${r},0,${+(g>=NS)},${h},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 gO(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 Aie(t)}function yO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kB(e){this._context=e}kB.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 Iv(e){return new kB(e)}function $B(e){return e[0]}function zB(e){return e[1]}function LB(e,t){var n=Gt(!0),r=null,a=Iv,o=null,l=gO(c);e=typeof e=="function"?e:e===void 0?$B:Gt(e),t=typeof t=="function"?t:t===void 0?zB:Gt(t);function c(f){var d,m=(f=yO(f)).length,h,g=!1,x;for(r==null&&(o=a(x=l())),d=0;d<=m;++d)!(d<m&&n(h=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(h,d,f),+t(h,d,f));if(x)return o=null,x+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Gt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Gt(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:Gt(!!f),c):n},c.curve=function(f){return arguments.length?(a=f,r!=null&&(o=a(r)),c):a},c.context=function(f){return arguments.length?(f==null?r=o=null:o=a(r=f),c):r},c}function Qh(e,t,n){var r=null,a=Gt(!0),o=null,l=Iv,c=null,f=gO(d);e=typeof e=="function"?e:e===void 0?$B:Gt(+e),t=typeof t=="function"?t:Gt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?zB:Gt(+n);function d(h){var g,x,A,S=(h=yO(h)).length,w,O=!1,E,T=new Array(S),C=new Array(S);for(o==null&&(c=l(E=f())),g=0;g<=S;++g){if(!(g<S&&a(w=h[g],g,h))===O)if(O=!O)x=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),A=g-1;A>=x;--A)c.point(T[A],C[A]);c.lineEnd(),c.areaEnd()}O&&(T[g]=+e(w,g,h),C[g]=+t(w,g,h),c.point(r?+r(w,g,h):T[g],n?+n(w,g,h):C[g]))}if(E)return c=null,E+""||null}function m(){return LB().defined(a).curve(l).context(o)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:Gt(+h),r=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Gt(+h),d):e},d.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Gt(+h),d):r},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:Gt(+h),n=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Gt(+h),d):t},d.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Gt(+h),d):n},d.lineX0=d.lineY0=function(){return m().x(e).y(t)},d.lineY1=function(){return m().x(e).y(n)},d.lineX1=function(){return m().x(r).y(t)},d.defined=function(h){return arguments.length?(a=typeof h=="function"?h:Gt(!!h),d):a},d.curve=function(h){return arguments.length?(l=h,o!=null&&(c=l(o)),d):l},d.context=function(h){return arguments.length?(h==null?o=c=null:c=l(o=h),d):o},d}class IB{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 Oie(e){return new IB(e,!0)}function Eie(e){return new IB(e,!1)}const bO={draw(e,t){const n=ja(t/Xp);e.moveTo(n,0),e.arc(0,0,n,0,Lv)}},Tie={draw(e,t){const n=ja(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()}},BB=ja(1/3),jie=BB*2,Cie={draw(e,t){const n=ja(t/jie),r=n*BB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Rie={draw(e,t){const n=ja(t),r=-n/2;e.rect(r,r,n,n)}},Nie=.8908130915292852,UB=Kp(Xp/10)/Kp(7*Xp/10),Mie=Kp(Lv/10)*UB,Pie=-PB(Lv/10)*UB,Die={draw(e,t){const n=ja(t*Nie),r=Mie*n,a=Pie*n;e.moveTo(0,-n),e.lineTo(r,a);for(let o=1;o<5;++o){const l=Lv*o/5,c=PB(l),f=Kp(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*a,f*r+c*a)}e.closePath()}},ax=ja(3),kie={draw(e,t){const n=-ja(t/(ax*3));e.moveTo(0,n*2),e.lineTo(-ax*n,-n),e.lineTo(ax*n,-n),e.closePath()}},Gr=-.5,Wr=ja(3)/2,PS=1/ja(12),$ie=(PS/2+1)*3,zie={draw(e,t){const n=ja(t/$ie),r=n/2,a=n*PS,o=r,l=n*PS+n,c=-o,f=l;e.moveTo(r,a),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(Gr*r-Wr*a,Wr*r+Gr*a),e.lineTo(Gr*o-Wr*l,Wr*o+Gr*l),e.lineTo(Gr*c-Wr*f,Wr*c+Gr*f),e.lineTo(Gr*r+Wr*a,Gr*a-Wr*r),e.lineTo(Gr*o+Wr*l,Gr*l-Wr*o),e.lineTo(Gr*c+Wr*f,Gr*f-Wr*c),e.closePath()}};function Lie(e,t){let n=null,r=gO(a);e=typeof e=="function"?e:Gt(e||bO),t=typeof t=="function"?t:Gt(t===void 0?64:+t);function a(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:Gt(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:Gt(+o),a):t},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function Qp(){}function Jp(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 qB(e){this._context=e}qB.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:Jp(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:Jp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iie(e){return new qB(e)}function HB(e){this._context=e}HB.prototype={areaStart:Qp,areaEnd:Qp,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:Jp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bie(e){return new HB(e)}function FB(e){this._context=e}FB.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:Jp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uie(e){return new FB(e)}function VB(e){this._context=e}VB.prototype={areaStart:Qp,areaEnd:Qp,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 qie(e){return new VB(e)}function lM(e){return e<0?-1:1}function cM(e,t,n){var r=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),c=(o*a+l*r)/(r+a);return(lM(o)+lM(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function uM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ix(e,t,n){var r=e._x0,a=e._y0,o=e._x1,l=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,a+c*t,o-c,l-c*n,o,l)}function em(e){this._context=e}em.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:ix(this,this._t0,uM(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,ix(this,uM(this,n=cM(this,e,t)),n);break;default:ix(this,this._t0,n=cM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function GB(e){this._context=new WB(e)}(GB.prototype=Object.create(em.prototype)).point=function(e,t){em.prototype.point.call(this,t,e)};function WB(e){this._context=e}WB.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,o){this._context.bezierCurveTo(t,e,r,n,o,a)}};function Hie(e){return new em(e)}function Fie(e){return new GB(e)}function YB(e){this._context=e}YB.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=fM(e),a=fM(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],a[0][o],r[1][o],a[1][o],e[l],t[l]);(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 fM(e){var t,n=e.length-1,r,a=new Array(n),o=new Array(n),l=new Array(n);for(a[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/o[t];for(o[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function Vie(e){return new YB(e)}function Bv(e,t){this._context=e,this._t=t}Bv.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 Gie(e){return new Bv(e,.5)}function Wie(e){return new Bv(e,0)}function Yie(e){return new Bv(e,1)}function Kl(e,t){if((l=e.length)>1)for(var n=1,r,a,o=e[t[0]],l,c=o.length;n<l;++n)for(a=o,o=e[t[n]],r=0;r<c;++r)o[r][1]+=o[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function DS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Zie(e,t){return e[t]}function Kie(e){const t=[];return t.key=e,t}function Xie(){var e=Gt([]),t=DS,n=Kl,r=Zie;function a(o){var l=Array.from(e.apply(this,arguments),Kie),c,f=l.length,d=-1,m;for(const h of o)for(c=0,++d;c<f;++c)(l[c][d]=[0,+r(h,l[c].key,d,o)]).data=h;for(c=0,m=yO(t(l));c<f;++c)l[m[c]].index=c;return n(l,m),l}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Gt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(r=typeof o=="function"?o:Gt(+o),a):r},a.order=function(o){return arguments.length?(t=o==null?DS:typeof o=="function"?o:Gt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(n=o??Kl,a):n},a}function Qie(e,t){if((r=e.length)>0){for(var n,r,a=0,o=e[0].length,l;a<o;++a){for(l=n=0;n<r;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<r;++n)e[n][a][1]/=l}Kl(e,t)}}function Jie(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,o=r.length;n<o;++n){for(var l=0,c=0;l<a;++l)c+=e[l][n][1]||0;r[n][1]+=r[n][0]=-c/2}Kl(e,t)}}function eoe(e,t){if(!(!((l=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,o,l;r<o;++r){for(var c=0,f=0,d=0;c<l;++c){for(var m=e[t[c]],h=m[r][1]||0,g=m[r-1][1]||0,x=(h-g)/2,A=0;A<c;++A){var S=e[t[A]],w=S[r][1]||0,O=S[r-1][1]||0;x+=w-O}f+=h,d+=x*h}a[r-1][1]+=a[r-1][0]=n,f&&(n-=d/f)}a[r-1][1]+=a[r-1][0]=n,Kl(e,t)}}function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}var toe=["type","size","sizeType"];function kS(){return kS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kS.apply(this,arguments)}function dM(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 hM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dM(Object(n),!0).forEach(function(r){noe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function noe(e,t,n){return t=roe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function roe(e){var t=aoe(e,"string");return uf(t)=="symbol"?t:t+""}function aoe(e,t){if(uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ioe(e,t){if(e==null)return{};var n=ooe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ooe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZB={symbolCircle:bO,symbolCross:Tie,symbolDiamond:Cie,symbolSquare:Rie,symbolStar:Die,symbolTriangle:kie,symbolWye:zie},soe=Math.PI/180,loe=function(t){var n="symbol".concat(zv(t));return ZB[n]||bO},coe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*soe;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},uoe=function(t,n){ZB["symbol".concat(zv(t))]=n},xO=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,o=a===void 0?64:a,l=t.sizeType,c=l===void 0?"area":l,f=ioe(t,toe),d=hM(hM({},f),{},{type:r,size:o,sizeType:c}),m=function(){var w=loe(r),O=Lie().type(w).size(coe(o,c,r));return O()},h=d.className,g=d.cx,x=d.cy,A=ht(d,!0);return g===+g&&x===+x&&o===+o?L.createElement("path",kS({},A,{className:yt("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(x,")"),d:m()})):null};xO.registerSymbol=uoe;function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$S.apply(this,arguments)}function pM(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 foe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pM(Object(n),!0).forEach(function(r){ff(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function doe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hoe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XB(r.key),r)}}function poe(e,t,n){return t&&hoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function moe(e,t,n){return t=tm(t),voe(e,KB()?Reflect.construct(t,n||[],tm(e).constructor):t.apply(e,n))}function voe(e,t){if(t&&(Xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return goe(e)}function goe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KB=function(){return!!e})()}function tm(e){return tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tm(e)}function yoe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zS(e,t)}function zS(e,t){return zS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},zS(e,t)}function ff(e,t,n){return t=XB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XB(e){var t=boe(e,"string");return Xl(t)=="symbol"?t:t+""}function boe(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yr=32,wO=(function(e){function t(){return doe(this,t),moe(this,t,arguments)}return yoe(t,e),poe(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,o=Yr/2,l=Yr/6,c=Yr/3,f=r.inactive?a:r.color;if(r.type==="plainline")return L.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:Yr,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return L.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(c,`
435
- A`).concat(l,",").concat(l,",0,1,1,").concat(2*c,",").concat(o,`
436
- H`).concat(Yr,"M").concat(2*c,",").concat(o,`
437
- A`).concat(l,",").concat(l,",0,1,1,").concat(c,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return L.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(Yr/8,"h").concat(Yr,"v").concat(Yr*3/4,"h").concat(-Yr,"z"),className:"recharts-legend-icon"});if(L.isValidElement(r.legendIcon)){var d=foe({},r);return delete d.legendIcon,L.cloneElement(r.legendIcon,d)}return L.createElement(xO,{fill:f,cx:o,cy:o,size:Yr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,o=a.payload,l=a.iconSize,c=a.layout,f=a.formatter,d=a.inactiveColor,m={x:0,y:0,width:Yr,height:Yr},h={display:c==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(x,A){var S=x.formatter||f,w=yt(ff(ff({"recharts-legend-item":!0},"legend-item-".concat(A),!0),"inactive",x.inactive));if(x.type==="none")return null;var O=ot(x.value)?null:x.value;Ei(!ot(x.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var E=x.inactive?d:x.color;return L.createElement("li",$S({className:w,style:h,key:"legend-item-".concat(A)},Zp(r.props,x,A)),L.createElement(CS,{width:l,height:l,viewBox:m,style:g},r.renderIcon(x)),L.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},S?S(O,x,A):O))})}},{key:"render",value:function(){var r=this.props,a=r.payload,o=r.layout,l=r.align;if(!a||!a.length)return null;var c={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return L.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(y.PureComponent);ff(wO,"displayName","Legend");ff(wO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var ox,mM;function xoe(){if(mM)return ox;mM=1;var e=Dv();function t(){this.__data__=new e,this.size=0}return ox=t,ox}var sx,vM;function woe(){if(vM)return sx;vM=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return sx=e,sx}var lx,gM;function Soe(){if(gM)return lx;gM=1;function e(t){return this.__data__.get(t)}return lx=e,lx}var cx,yM;function _oe(){if(yM)return cx;yM=1;function e(t){return this.__data__.has(t)}return cx=e,cx}var ux,bM;function Aoe(){if(bM)return ux;bM=1;var e=Dv(),t=fO(),n=dO(),r=200;function a(o,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,l),this.size=c.size,this}return ux=a,ux}var fx,xM;function QB(){if(xM)return fx;xM=1;var e=Dv(),t=xoe(),n=woe(),r=Soe(),a=_oe(),o=Aoe();function l(c){var f=this.__data__=new e(c);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=a,l.prototype.set=o,fx=l,fx}var dx,wM;function Ooe(){if(wM)return dx;wM=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return dx=t,dx}var hx,SM;function Eoe(){if(SM)return hx;SM=1;function e(t){return this.__data__.has(t)}return hx=e,hx}var px,_M;function JB(){if(_M)return px;_M=1;var e=dO(),t=Ooe(),n=Eoe();function r(a){var o=-1,l=a==null?0:a.length;for(this.__data__=new e;++o<l;)this.add(a[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,px=r,px}var mx,AM;function e6(){if(AM)return mx;AM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return mx=e,mx}var vx,OM;function t6(){if(OM)return vx;OM=1;function e(t,n){return t.has(n)}return vx=e,vx}var gx,EM;function n6(){if(EM)return gx;EM=1;var e=JB(),t=e6(),n=t6(),r=1,a=2;function o(l,c,f,d,m,h){var g=f&r,x=l.length,A=c.length;if(x!=A&&!(g&&A>x))return!1;var S=h.get(l),w=h.get(c);if(S&&w)return S==c&&w==l;var O=-1,E=!0,T=f&a?new e:void 0;for(h.set(l,c),h.set(c,l);++O<x;){var C=l[O],j=c[O];if(d)var R=g?d(j,C,O,c,l,h):d(C,j,O,l,c,h);if(R!==void 0){if(R)continue;E=!1;break}if(T){if(!t(c,function(N,D){if(!n(T,D)&&(C===N||m(C,N,f,d,h)))return T.push(D)})){E=!1;break}}else if(!(C===j||m(C,j,f,d,h))){E=!1;break}}return h.delete(l),h.delete(c),E}return gx=o,gx}var yx,TM;function Toe(){if(TM)return yx;TM=1;var e=ei(),t=e.Uint8Array;return yx=t,yx}var bx,jM;function joe(){if(jM)return bx;jM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,o){r[++n]=[o,a]}),r}return bx=e,bx}var xx,CM;function SO(){if(CM)return xx;CM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return xx=e,xx}var wx,RM;function Coe(){if(RM)return wx;RM=1;var e=bd(),t=Toe(),n=uO(),r=n6(),a=joe(),o=SO(),l=1,c=2,f="[object Boolean]",d="[object Date]",m="[object Error]",h="[object Map]",g="[object Number]",x="[object RegExp]",A="[object Set]",S="[object String]",w="[object Symbol]",O="[object ArrayBuffer]",E="[object DataView]",T=e?e.prototype:void 0,C=T?T.valueOf:void 0;function j(R,N,D,z,V,U,P){switch(D){case E:if(R.byteLength!=N.byteLength||R.byteOffset!=N.byteOffset)return!1;R=R.buffer,N=N.buffer;case O:return!(R.byteLength!=N.byteLength||!U(new t(R),new t(N)));case f:case d:case g:return n(+R,+N);case m:return R.name==N.name&&R.message==N.message;case x:case S:return R==N+"";case h:var B=a;case A:var q=z&l;if(B||(B=o),R.size!=N.size&&!q)return!1;var G=P.get(R);if(G)return G==N;z|=c,P.set(R,N);var $=r(B(R),B(N),z,V,U,P);return P.delete(R),$;case w:if(C)return C.call(R)==C.call(N)}return!1}return wx=j,wx}var Sx,NM;function r6(){if(NM)return Sx;NM=1;function e(t,n){for(var r=-1,a=n.length,o=t.length;++r<a;)t[o+r]=n[r];return t}return Sx=e,Sx}var _x,MM;function Roe(){if(MM)return _x;MM=1;var e=r6(),t=vr();function n(r,a,o){var l=a(r);return t(r)?l:e(l,o(r))}return _x=n,_x}var Ax,PM;function Noe(){if(PM)return Ax;PM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=0,l=[];++r<a;){var c=t[r];n(c,r,t)&&(l[o++]=c)}return l}return Ax=e,Ax}var Ox,DM;function Moe(){if(DM)return Ox;DM=1;function e(){return[]}return Ox=e,Ox}var Ex,kM;function Poe(){if(kM)return Ex;kM=1;var e=Noe(),t=Moe(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(l){return l==null?[]:(l=Object(l),e(a(l),function(c){return r.call(l,c)}))}:t;return Ex=o,Ex}var Tx,$M;function Doe(){if($M)return Tx;$M=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return Tx=e,Tx}var jx,zM;function koe(){if(zM)return jx;zM=1;var e=Li(),t=Ii(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return jx=r,jx}var Cx,LM;function _O(){if(LM)return Cx;LM=1;var e=koe(),t=Ii(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!a.call(l,"callee")};return Cx=o,Cx}var Gu={exports:{}},Rx,IM;function $oe(){if(IM)return Rx;IM=1;function e(){return!1}return Rx=e,Rx}Gu.exports;var BM;function a6(){return BM||(BM=1,(function(e,t){var n=ei(),r=$oe(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===a,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||r;e.exports=d})(Gu,Gu.exports)),Gu.exports}var Nx,UM;function AO(){if(UM)return Nx;UM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var o=typeof r;return a=a??e,!!a&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return Nx=n,Nx}var Mx,qM;function OO(){if(qM)return Mx;qM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Mx=t,Mx}var Px,HM;function zoe(){if(HM)return Px;HM=1;var e=Li(),t=OO(),n=Ii(),r="[object Arguments]",a="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",m="[object Number]",h="[object Object]",g="[object RegExp]",x="[object Set]",A="[object String]",S="[object WeakMap]",w="[object ArrayBuffer]",O="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",N="[object Uint8Array]",D="[object Uint8ClampedArray]",z="[object Uint16Array]",V="[object Uint32Array]",U={};U[E]=U[T]=U[C]=U[j]=U[R]=U[N]=U[D]=U[z]=U[V]=!0,U[r]=U[a]=U[w]=U[o]=U[O]=U[l]=U[c]=U[f]=U[d]=U[m]=U[h]=U[g]=U[x]=U[A]=U[S]=!1;function P(B){return n(B)&&t(B.length)&&!!U[e(B)]}return Px=P,Px}var Dx,FM;function i6(){if(FM)return Dx;FM=1;function e(t){return function(n){return t(n)}}return Dx=e,Dx}var Wu={exports:{}};Wu.exports;var VM;function Loe(){return VM||(VM=1,(function(e,t){var n=OB(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,l=o&&n.process,c=(function(){try{var f=a&&a.require&&a.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(Wu,Wu.exports)),Wu.exports}var kx,GM;function o6(){if(GM)return kx;GM=1;var e=zoe(),t=i6(),n=Loe(),r=n&&n.isTypedArray,a=r?t(r):e;return kx=a,kx}var $x,WM;function Ioe(){if(WM)return $x;WM=1;var e=Doe(),t=_O(),n=vr(),r=a6(),a=AO(),o=o6(),l=Object.prototype,c=l.hasOwnProperty;function f(d,m){var h=n(d),g=!h&&t(d),x=!h&&!g&&r(d),A=!h&&!g&&!x&&o(d),S=h||g||x||A,w=S?e(d.length,String):[],O=w.length;for(var E in d)(m||c.call(d,E))&&!(S&&(E=="length"||x&&(E=="offset"||E=="parent")||A&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||a(E,O)))&&w.push(E);return w}return $x=f,$x}var zx,YM;function Boe(){if(YM)return zx;YM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return zx=t,zx}var Lx,ZM;function s6(){if(ZM)return Lx;ZM=1;function e(t,n){return function(r){return t(n(r))}}return Lx=e,Lx}var Ix,KM;function Uoe(){if(KM)return Ix;KM=1;var e=s6(),t=e(Object.keys,Object);return Ix=t,Ix}var Bx,XM;function qoe(){if(XM)return Bx;XM=1;var e=Boe(),t=Uoe(),n=Object.prototype,r=n.hasOwnProperty;function a(o){if(!e(o))return t(o);var l=[];for(var c in Object(o))r.call(o,c)&&c!="constructor"&&l.push(c);return l}return Bx=a,Bx}var Ux,QM;function wd(){if(QM)return Ux;QM=1;var e=cO(),t=OO();function n(r){return r!=null&&t(r.length)&&!e(r)}return Ux=n,Ux}var qx,JM;function Uv(){if(JM)return qx;JM=1;var e=Ioe(),t=qoe(),n=wd();function r(a){return n(a)?e(a):t(a)}return qx=r,qx}var Hx,eP;function Hoe(){if(eP)return Hx;eP=1;var e=Roe(),t=Poe(),n=Uv();function r(a){return e(a,n,t)}return Hx=r,Hx}var Fx,tP;function Foe(){if(tP)return Fx;tP=1;var e=Hoe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(o,l,c,f,d,m){var h=c&t,g=e(o),x=g.length,A=e(l),S=A.length;if(x!=S&&!h)return!1;for(var w=x;w--;){var O=g[w];if(!(h?O in l:r.call(l,O)))return!1}var E=m.get(o),T=m.get(l);if(E&&T)return E==l&&T==o;var C=!0;m.set(o,l),m.set(l,o);for(var j=h;++w<x;){O=g[w];var R=o[O],N=l[O];if(f)var D=h?f(N,R,O,l,o,m):f(R,N,O,o,l,m);if(!(D===void 0?R===N||d(R,N,c,f,m):D)){C=!1;break}j||(j=O=="constructor")}if(C&&!j){var z=o.constructor,V=l.constructor;z!=V&&"constructor"in o&&"constructor"in l&&!(typeof z=="function"&&z instanceof z&&typeof V=="function"&&V instanceof V)&&(C=!1)}return m.delete(o),m.delete(l),C}return Fx=a,Fx}var Vx,nP;function Voe(){if(nP)return Vx;nP=1;var e=ks(),t=ei(),n=e(t,"DataView");return Vx=n,Vx}var Gx,rP;function Goe(){if(rP)return Gx;rP=1;var e=ks(),t=ei(),n=e(t,"Promise");return Gx=n,Gx}var Wx,aP;function l6(){if(aP)return Wx;aP=1;var e=ks(),t=ei(),n=e(t,"Set");return Wx=n,Wx}var Yx,iP;function Woe(){if(iP)return Yx;iP=1;var e=ks(),t=ei(),n=e(t,"WeakMap");return Yx=n,Yx}var Zx,oP;function Yoe(){if(oP)return Zx;oP=1;var e=Voe(),t=fO(),n=Goe(),r=l6(),a=Woe(),o=Li(),l=EB(),c="[object Map]",f="[object Object]",d="[object Promise]",m="[object Set]",h="[object WeakMap]",g="[object DataView]",x=l(e),A=l(t),S=l(n),w=l(r),O=l(a),E=o;return(e&&E(new e(new ArrayBuffer(1)))!=g||t&&E(new t)!=c||n&&E(n.resolve())!=d||r&&E(new r)!=m||a&&E(new a)!=h)&&(E=function(T){var C=o(T),j=C==f?T.constructor:void 0,R=j?l(j):"";if(R)switch(R){case x:return g;case A:return c;case S:return d;case w:return m;case O:return h}return C}),Zx=E,Zx}var Kx,sP;function Zoe(){if(sP)return Kx;sP=1;var e=QB(),t=n6(),n=Coe(),r=Foe(),a=Yoe(),o=vr(),l=a6(),c=o6(),f=1,d="[object Arguments]",m="[object Array]",h="[object Object]",g=Object.prototype,x=g.hasOwnProperty;function A(S,w,O,E,T,C){var j=o(S),R=o(w),N=j?m:a(S),D=R?m:a(w);N=N==d?h:N,D=D==d?h:D;var z=N==h,V=D==h,U=N==D;if(U&&l(S)){if(!l(w))return!1;j=!0,z=!1}if(U&&!z)return C||(C=new e),j||c(S)?t(S,w,O,E,T,C):n(S,w,N,O,E,T,C);if(!(O&f)){var P=z&&x.call(S,"__wrapped__"),B=V&&x.call(w,"__wrapped__");if(P||B){var q=P?S.value():S,G=B?w.value():w;return C||(C=new e),T(q,G,O,E,C)}}return U?(C||(C=new e),r(S,w,O,E,T,C)):!1}return Kx=A,Kx}var Xx,lP;function EO(){if(lP)return Xx;lP=1;var e=Zoe(),t=Ii();function n(r,a,o,l,c){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,o,l,n,c)}return Xx=n,Xx}var Qx,cP;function Koe(){if(cP)return Qx;cP=1;var e=QB(),t=EO(),n=1,r=2;function a(o,l,c,f){var d=c.length,m=d,h=!f;if(o==null)return!m;for(o=Object(o);d--;){var g=c[d];if(h&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<m;){g=c[d];var x=g[0],A=o[x],S=g[1];if(h&&g[2]){if(A===void 0&&!(x in o))return!1}else{var w=new e;if(f)var O=f(A,S,x,o,l,w);if(!(O===void 0?t(S,A,n|r,f,w):O))return!1}}return!0}return Qx=a,Qx}var Jx,uP;function c6(){if(uP)return Jx;uP=1;var e=Do();function t(n){return n===n&&!e(n)}return Jx=t,Jx}var ew,fP;function Xoe(){if(fP)return ew;fP=1;var e=c6(),t=Uv();function n(r){for(var a=t(r),o=a.length;o--;){var l=a[o],c=r[l];a[o]=[l,c,e(c)]}return a}return ew=n,ew}var tw,dP;function u6(){if(dP)return tw;dP=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return tw=e,tw}var nw,hP;function Qoe(){if(hP)return nw;hP=1;var e=Koe(),t=Xoe(),n=u6();function r(a){var o=t(a);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===a||e(l,a,o)}}return nw=r,nw}var rw,pP;function Joe(){if(pP)return rw;pP=1;function e(t,n){return t!=null&&n in Object(t)}return rw=e,rw}var aw,mP;function ese(){if(mP)return aw;mP=1;var e=CB(),t=_O(),n=vr(),r=AO(),a=OO(),o=$v();function l(c,f,d){f=e(f,c);for(var m=-1,h=f.length,g=!1;++m<h;){var x=o(f[m]);if(!(g=c!=null&&d(c,x)))break;c=c[x]}return g||++m!=h?g:(h=c==null?0:c.length,!!h&&a(h)&&r(x,h)&&(n(c)||t(c)))}return aw=l,aw}var iw,vP;function tse(){if(vP)return iw;vP=1;var e=Joe(),t=ese();function n(r,a){return r!=null&&t(r,a,e)}return iw=n,iw}var ow,gP;function nse(){if(gP)return ow;gP=1;var e=EO(),t=RB(),n=tse(),r=lO(),a=c6(),o=u6(),l=$v(),c=1,f=2;function d(m,h){return r(m)&&a(h)?o(l(m),h):function(g){var x=t(g,m);return x===void 0&&x===h?n(g,m):e(h,x,c|f)}}return ow=d,ow}var sw,yP;function Nc(){if(yP)return sw;yP=1;function e(t){return t}return sw=e,sw}var lw,bP;function rse(){if(bP)return lw;bP=1;function e(t){return function(n){return n==null?void 0:n[t]}}return lw=e,lw}var cw,xP;function ase(){if(xP)return cw;xP=1;var e=pO();function t(n){return function(r){return e(r,n)}}return cw=t,cw}var uw,wP;function ise(){if(wP)return uw;wP=1;var e=rse(),t=ase(),n=lO(),r=$v();function a(o){return n(o)?e(r(o)):t(o)}return uw=a,uw}var fw,SP;function ko(){if(SP)return fw;SP=1;var e=Qoe(),t=nse(),n=Nc(),r=vr(),a=ise();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):a(l)}return fw=o,fw}var dw,_P;function f6(){if(_P)return dw;_P=1;function e(t,n,r,a){for(var o=t.length,l=r+(a?1:-1);a?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return dw=e,dw}var hw,AP;function ose(){if(AP)return hw;AP=1;function e(t){return t!==t}return hw=e,hw}var pw,OP;function sse(){if(OP)return pw;OP=1;function e(t,n,r){for(var a=r-1,o=t.length;++a<o;)if(t[a]===n)return a;return-1}return pw=e,pw}var mw,EP;function lse(){if(EP)return mw;EP=1;var e=f6(),t=ose(),n=sse();function r(a,o,l){return o===o?n(a,o,l):e(a,t,l)}return mw=r,mw}var vw,TP;function cse(){if(TP)return vw;TP=1;var e=lse();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return vw=t,vw}var gw,jP;function use(){if(jP)return gw;jP=1;function e(t,n,r){for(var a=-1,o=t==null?0:t.length;++a<o;)if(r(n,t[a]))return!0;return!1}return gw=e,gw}var yw,CP;function fse(){if(CP)return yw;CP=1;function e(){}return yw=e,yw}var bw,RP;function dse(){if(RP)return bw;RP=1;var e=l6(),t=fse(),n=SO(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return bw=a,bw}var xw,NP;function hse(){if(NP)return xw;NP=1;var e=JB(),t=cse(),n=use(),r=t6(),a=dse(),o=SO(),l=200;function c(f,d,m){var h=-1,g=t,x=f.length,A=!0,S=[],w=S;if(m)A=!1,g=n;else if(x>=l){var O=d?null:a(f);if(O)return o(O);A=!1,g=r,w=new e}else w=d?[]:S;e:for(;++h<x;){var E=f[h],T=d?d(E):E;if(E=m||E!==0?E:0,A&&T===T){for(var C=w.length;C--;)if(w[C]===T)continue e;d&&w.push(T),S.push(E)}else g(w,T,m)||(w!==S&&w.push(T),S.push(E))}return S}return xw=c,xw}var ww,MP;function pse(){if(MP)return ww;MP=1;var e=ko(),t=hse();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return ww=n,ww}var mse=pse();const PP=Ut(mse);function d6(e,t,n){return t===!0?PP(e,n):ot(t)?PP(e,t):e}function Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}var vse=["ref"];function DP(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 wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DP(Object(n),!0).forEach(function(r){qv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p6(r.key),r)}}function yse(e,t,n){return t&&kP(e.prototype,t),n&&kP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bse(e,t,n){return t=nm(t),xse(e,h6()?Reflect.construct(t,n||[],nm(e).constructor):t.apply(e,n))}function xse(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wse(e)}function wse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h6=function(){return!!e})()}function nm(e){return nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nm(e)}function Sse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LS(e,t)}function LS(e,t){return LS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},LS(e,t)}function qv(e,t,n){return t=p6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p6(e){var t=_se(e,"string");return Ql(t)=="symbol"?t:t+""}function _se(e,t){if(Ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ase(e,t){if(e==null)return{};var n=Ose(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ose(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ese(e){return e.value}function Tse(e,t){if(L.isValidElement(e))return L.cloneElement(e,t);if(typeof e=="function")return L.createElement(e,t);t.ref;var n=Ase(t,vse);return L.createElement(wO,n)}var $P=1,Ul=(function(e){function t(){var n;gse(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=bse(this,t,[].concat(a)),qv(n,"lastBoundingBox",{width:-1,height:-1}),n}return Sse(t,e),yse(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>$P||Math.abs(a.height-this.lastBoundingBox.height)>$P)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?wi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,o=a.layout,l=a.align,c=a.verticalAlign,f=a.margin,d=a.chartWidth,m=a.chartHeight,h,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var x=this.getBBoxSnapshot();h={left:((d||0)-x.width)/2}}else h=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var A=this.getBBoxSnapshot();g={top:((m||0)-A.height)/2}}else g=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return wi(wi({},h),g)}},{key:"render",value:function(){var r=this,a=this.props,o=a.content,l=a.width,c=a.height,f=a.wrapperStyle,d=a.payloadUniqBy,m=a.payload,h=wi(wi({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return L.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(x){r.wrapperNode=x}},Tse(o,wi(wi({},this.props),{},{payload:d6(m,d,Ese)})))}}],[{key:"getWithHeight",value:function(r,a){var o=wi(wi({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&Ne(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])})(y.PureComponent);qv(Ul,"displayName","Legend");qv(Ul,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Sw,zP;function jse(){if(zP)return Sw;zP=1;var e=bd(),t=_O(),n=vr(),r=e?e.isConcatSpreadable:void 0;function a(o){return n(o)||t(o)||!!(r&&o&&o[r])}return Sw=a,Sw}var _w,LP;function m6(){if(LP)return _w;LP=1;var e=r6(),t=jse();function n(r,a,o,l,c){var f=-1,d=r.length;for(o||(o=t),c||(c=[]);++f<d;){var m=r[f];a>0&&o(m)?a>1?n(m,a-1,o,l,c):e(c,m):l||(c[c.length]=m)}return c}return _w=n,_w}var Aw,IP;function Cse(){if(IP)return Aw;IP=1;function e(t){return function(n,r,a){for(var o=-1,l=Object(n),c=a(n),f=c.length;f--;){var d=c[t?f:++o];if(r(l[d],d,l)===!1)break}return n}}return Aw=e,Aw}var Ow,BP;function Rse(){if(BP)return Ow;BP=1;var e=Cse(),t=e();return Ow=t,Ow}var Ew,UP;function v6(){if(UP)return Ew;UP=1;var e=Rse(),t=Uv();function n(r,a){return r&&e(r,a,t)}return Ew=n,Ew}var Tw,qP;function Nse(){if(qP)return Tw;qP=1;var e=wd();function t(n,r){return function(a,o){if(a==null)return a;if(!e(a))return n(a,o);for(var l=a.length,c=r?l:-1,f=Object(a);(r?c--:++c<l)&&o(f[c],c,f)!==!1;);return a}}return Tw=t,Tw}var jw,HP;function TO(){if(HP)return jw;HP=1;var e=v6(),t=Nse(),n=t(e);return jw=n,jw}var Cw,FP;function g6(){if(FP)return Cw;FP=1;var e=TO(),t=wd();function n(r,a){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(c,f,d){l[++o]=a(c,f,d)}),l}return Cw=n,Cw}var Rw,VP;function Mse(){if(VP)return Rw;VP=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Rw=e,Rw}var Nw,GP;function Pse(){if(GP)return Nw;GP=1;var e=jc();function t(n,r){if(n!==r){var a=n!==void 0,o=n===null,l=n===n,c=e(n),f=r!==void 0,d=r===null,m=r===r,h=e(r);if(!d&&!h&&!c&&n>r||c&&f&&m&&!d&&!h||o&&f&&m||!a&&m||!l)return 1;if(!o&&!c&&!h&&n<r||h&&a&&l&&!o&&!c||d&&a&&l||!f&&l||!m)return-1}return 0}return Nw=t,Nw}var Mw,WP;function Dse(){if(WP)return Mw;WP=1;var e=Pse();function t(n,r,a){for(var o=-1,l=n.criteria,c=r.criteria,f=l.length,d=a.length;++o<f;){var m=e(l[o],c[o]);if(m){if(o>=d)return m;var h=a[o];return m*(h=="desc"?-1:1)}}return n.index-r.index}return Mw=t,Mw}var Pw,YP;function kse(){if(YP)return Pw;YP=1;var e=hO(),t=pO(),n=ko(),r=g6(),a=Mse(),o=i6(),l=Dse(),c=Nc(),f=vr();function d(m,h,g){h.length?h=e(h,function(S){return f(S)?function(w){return t(w,S.length===1?S[0]:S)}:S}):h=[c];var x=-1;h=e(h,o(n));var A=r(m,function(S,w,O){var E=e(h,function(T){return T(S)});return{criteria:E,index:++x,value:S}});return a(A,function(S,w){return l(S,w,g)})}return Pw=d,Pw}var Dw,ZP;function $se(){if(ZP)return Dw;ZP=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Dw=e,Dw}var kw,KP;function zse(){if(KP)return kw;KP=1;var e=$se(),t=Math.max;function n(r,a,o){return a=t(a===void 0?r.length-1:a,0),function(){for(var l=arguments,c=-1,f=t(l.length-a,0),d=Array(f);++c<f;)d[c]=l[a+c];c=-1;for(var m=Array(a+1);++c<a;)m[c]=l[c];return m[a]=o(d),e(r,this,m)}}return kw=n,kw}var $w,XP;function Lse(){if(XP)return $w;XP=1;function e(t){return function(){return t}}return $w=e,$w}var zw,QP;function y6(){if(QP)return zw;QP=1;var e=ks(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return zw=t,zw}var Lw,JP;function Ise(){if(JP)return Lw;JP=1;var e=Lse(),t=y6(),n=Nc(),r=t?function(a,o){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Lw=r,Lw}var Iw,eD;function Bse(){if(eD)return Iw;eD=1;var e=800,t=16,n=Date.now;function r(a){var o=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++o>=e)return arguments[0]}else o=0;return a.apply(void 0,arguments)}}return Iw=r,Iw}var Bw,tD;function Use(){if(tD)return Bw;tD=1;var e=Ise(),t=Bse(),n=t(e);return Bw=n,Bw}var Uw,nD;function qse(){if(nD)return Uw;nD=1;var e=Nc(),t=zse(),n=Use();function r(a,o){return n(t(a,o,e),a+"")}return Uw=r,Uw}var qw,rD;function Hv(){if(rD)return qw;rD=1;var e=uO(),t=wd(),n=AO(),r=Do();function a(o,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],o):!1}return qw=a,qw}var Hw,aD;function Hse(){if(aD)return Hw;aD=1;var e=m6(),t=kse(),n=qse(),r=Hv(),a=n(function(o,l){if(o==null)return[];var c=l.length;return c>1&&r(o,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return Hw=a,Hw}var Fse=Hse();const jO=Ut(Fse);function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}function IS(){return IS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IS.apply(this,arguments)}function Vse(e,t){return Zse(e)||Yse(e,t)||Wse(e,t)||Gse()}function Gse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
438
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wse(e,t){if(e){if(typeof e=="string")return iD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iD(e,t)}}function iD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Zse(e){if(Array.isArray(e))return e}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 Fw(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){Kse(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 Kse(e,t,n){return t=Xse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xse(e){var t=Qse(e,"string");return df(t)=="symbol"?t:t+""}function Qse(e,t){if(df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jse(e){return Array.isArray(e)&&Cn(e[0])&&Cn(e[1])?e.join(" ~ "):e}var ele=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,o=a===void 0?{}:a,l=t.itemStyle,c=l===void 0?{}:l,f=t.labelStyle,d=f===void 0?{}:f,m=t.payload,h=t.formatter,g=t.itemSorter,x=t.wrapperClassName,A=t.labelClassName,S=t.label,w=t.labelFormatter,O=t.accessibilityLayer,E=O===void 0?!1:O,T=function(){if(m&&m.length){var P={padding:0,margin:0},B=(g?jO(m,g):m).map(function(q,G){if(q.type==="none")return null;var $=Fw({display:"block",paddingTop:4,paddingBottom:4,color:q.color||"#000"},c),F=q.formatter||h||Jse,Z=q.value,X=q.name,oe=Z,I=X;if(F&&oe!=null&&I!=null){var Y=F(Z,X,q,G,m);if(Array.isArray(Y)){var Q=Vse(Y,2);oe=Q[0],I=Q[1]}else oe=Y}return L.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(G),style:$},Cn(I)?L.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Cn(I)?L.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,L.createElement("span",{className:"recharts-tooltip-item-value"},oe),L.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return L.createElement("ul",{className:"recharts-tooltip-item-list",style:P},B)}return null},C=Fw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),j=Fw({margin:0},d),R=!vt(S),N=R?S:"",D=yt("recharts-default-tooltip",x),z=yt("recharts-tooltip-label",A);R&&w&&m!==void 0&&m!==null&&(N=w(S,m));var V=E?{role:"status","aria-live":"assertive"}:{};return L.createElement("div",IS({className:D,style:C},V),L.createElement("p",{className:z,style:j},L.isValidElement(N)?N:"".concat(N)),T())};function hf(e){"@babel/helpers - typeof";return hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hf(e)}function Jh(e,t,n){return t=tle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tle(e){var t=nle(e,"string");return hf(t)=="symbol"?t:t+""}function nle(e,t){if(hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mu="recharts-tooltip-wrapper",rle={visibility:"hidden"};function ale(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return yt(Mu,Jh(Jh(Jh(Jh({},"".concat(Mu,"-right"),Ne(n)&&t&&Ne(t.x)&&n>=t.x),"".concat(Mu,"-left"),Ne(n)&&t&&Ne(t.x)&&n<t.x),"".concat(Mu,"-bottom"),Ne(r)&&t&&Ne(t.y)&&r>=t.y),"".concat(Mu,"-top"),Ne(r)&&t&&Ne(t.y)&&r<t.y))}function sD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,o=e.position,l=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,d=e.viewBoxDimension;if(o&&Ne(o[r]))return o[r];var m=n[r]-c-a,h=n[r]+a;if(t[r])return l[r]?m:h;if(l[r]){var g=m,x=f[r];return g<x?Math.max(h,f[r]):Math.max(m,f[r])}var A=h+c,S=f[r]+d;return A>S?Math.max(m,f[r]):Math.max(h,f[r])}function ile(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function ole(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,f=e.viewBox,d,m,h;return l.height>0&&l.width>0&&n?(m=sD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),h=sD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=ile({translateX:m,translateY:h,useTranslate3d:c})):d=rle,{cssProperties:d,cssClasses:ale({translateX:m,translateY:h,coordinate:n})}}function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function lD(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 cD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lD(Object(n),!0).forEach(function(r){US(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x6(r.key),r)}}function cle(e,t,n){return t&&lle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ule(e,t,n){return t=rm(t),fle(e,b6()?Reflect.construct(t,n||[],rm(e).constructor):t.apply(e,n))}function fle(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dle(e)}function dle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b6=function(){return!!e})()}function rm(e){return rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rm(e)}function hle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BS(e,t)}function BS(e,t){return BS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},BS(e,t)}function US(e,t,n){return t=x6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x6(e){var t=ple(e,"string");return Jl(t)=="symbol"?t:t+""}function ple(e,t){if(Jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uD=1,mle=(function(e){function t(){var n;sle(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=ule(this,t,[].concat(a)),US(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),US(n,"handleKeyDown",function(l){if(l.key==="Escape"){var c,f,d,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(c=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&c!==void 0?c:0,y:(d=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&d!==void 0?d:0}})}}),n}return hle(t,e),cle(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>uD||Math.abs(r.height-this.state.lastBoundingBox.height)>uD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,f=a.animationEasing,d=a.children,m=a.coordinate,h=a.hasPayload,g=a.isAnimationActive,x=a.offset,A=a.position,S=a.reverseDirection,w=a.useTranslate3d,O=a.viewBox,E=a.wrapperStyle,T=ole({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:x,position:A,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:O}),C=T.cssClasses,j=T.cssProperties,R=cD(cD({transition:g&&o?"transform ".concat(c,"ms ").concat(f):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&h?"visible":"hidden",position:"absolute",top:0,left:0},E);return L.createElement("div",{tabIndex:-1,className:C,style:R,ref:function(D){r.wrapperNode=D}},d)}}])})(y.PureComponent),vle=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Mc={isSsr:vle()};function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}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){CO(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 gle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S6(r.key),r)}}function ble(e,t,n){return t&&yle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xle(e,t,n){return t=am(t),wle(e,w6()?Reflect.construct(t,n||[],am(e).constructor):t.apply(e,n))}function wle(e,t){if(t&&(ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sle(e)}function Sle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w6=function(){return!!e})()}function am(e){return am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},am(e)}function _le(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qS(e,t)}function qS(e,t){return qS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},qS(e,t)}function CO(e,t,n){return t=S6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S6(e){var t=Ale(e,"string");return ec(t)=="symbol"?t:t+""}function Ale(e,t){if(ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ole(e){return e.dataKey}function Ele(e,t){return L.isValidElement(e)?L.cloneElement(e,t):typeof e=="function"?L.createElement(e,t):L.createElement(ele,t)}var za=(function(e){function t(){return gle(this,t),xle(this,t,arguments)}return _le(t,e),ble(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,f=a.animationEasing,d=a.content,m=a.coordinate,h=a.filterNull,g=a.isAnimationActive,x=a.offset,A=a.payload,S=a.payloadUniqBy,w=a.position,O=a.reverseDirection,E=a.useTranslate3d,T=a.viewBox,C=a.wrapperStyle,j=A??[];h&&j.length&&(j=d6(A.filter(function(N){return N.value!=null&&(N.hide!==!0||r.props.includeHidden)}),S,Ole));var R=j.length>0;return L.createElement(mle,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:g,active:o,coordinate:m,hasPayload:R,offset:x,position:w,reverseDirection:O,useTranslate3d:E,viewBox:T,wrapperStyle:C},Ele(d,dD(dD({},this.props),{},{payload:j})))}}])})(y.PureComponent);CO(za,"displayName","Tooltip");CO(za,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Mc.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Vw,hD;function Tle(){if(hD)return Vw;hD=1;var e=ei(),t=function(){return e.Date.now()};return Vw=t,Vw}var Gw,pD;function jle(){if(pD)return Gw;pD=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Gw=t,Gw}var Ww,mD;function Cle(){if(mD)return Ww;mD=1;var e=jle(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Ww=n,Ww}var Yw,vD;function _6(){if(vD)return Yw;vD=1;var e=Cle(),t=Do(),n=jc(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||l.test(d)?c(d.slice(2),h?2:8):a.test(d)?r:+d}return Yw=f,Yw}var Zw,gD;function Rle(){if(gD)return Zw;gD=1;var e=Do(),t=Tle(),n=_6(),r="Expected a function",a=Math.max,o=Math.min;function l(c,f,d){var m,h,g,x,A,S,w=0,O=!1,E=!1,T=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(O=!!d.leading,E="maxWait"in d,g=E?a(n(d.maxWait)||0,f):g,T="trailing"in d?!!d.trailing:T);function C(B){var q=m,G=h;return m=h=void 0,w=B,x=c.apply(G,q),x}function j(B){return w=B,A=setTimeout(D,f),O?C(B):x}function R(B){var q=B-S,G=B-w,$=f-q;return E?o($,g-G):$}function N(B){var q=B-S,G=B-w;return S===void 0||q>=f||q<0||E&&G>=g}function D(){var B=t();if(N(B))return z(B);A=setTimeout(D,R(B))}function z(B){return A=void 0,T&&m?C(B):(m=h=void 0,x)}function V(){A!==void 0&&clearTimeout(A),w=0,m=S=h=A=void 0}function U(){return A===void 0?x:z(t())}function P(){var B=t(),q=N(B);if(m=arguments,h=this,S=B,q){if(A===void 0)return j(S);if(E)return clearTimeout(A),A=setTimeout(D,f),C(S)}return A===void 0&&(A=setTimeout(D,f)),x}return P.cancel=V,P.flush=U,P}return Zw=l,Zw}var Kw,yD;function Nle(){if(yD)return Kw;yD=1;var e=Rle(),t=Do(),n="Expected a function";function r(a,o,l){var c=!0,f=!0;if(typeof a!="function")throw new TypeError(n);return t(l)&&(c="leading"in l?!!l.leading:c,f="trailing"in l?!!l.trailing:f),e(a,o,{leading:c,maxWait:o,trailing:f})}return Kw=r,Kw}var Mle=Nle();const A6=Ut(Mle);function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pf(e)}function bD(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 ep(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bD(Object(n),!0).forEach(function(r){Ple(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ple(e,t,n){return t=Dle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dle(e){var t=kle(e,"string");return pf(t)=="symbol"?t:t+""}function kle(e,t){if(pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $le(e,t){return Ble(e)||Ile(e,t)||Lle(e,t)||zle()}function zle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
439
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lle(e,t){if(e){if(typeof e=="string")return xD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xD(e,t)}}function xD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ile(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Ble(e){if(Array.isArray(e))return e}var Ule=y.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,c=e.height,f=c===void 0?"100%":c,d=e.minWidth,m=d===void 0?0:d,h=e.minHeight,g=e.maxHeight,x=e.children,A=e.debounce,S=A===void 0?0:A,w=e.id,O=e.className,E=e.onResize,T=e.style,C=T===void 0?{}:T,j=y.useRef(null),R=y.useRef();R.current=E,y.useImperativeHandle(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var N=y.useState({containerWidth:a.width,containerHeight:a.height}),D=$le(N,2),z=D[0],V=D[1],U=y.useCallback(function(B,q){V(function(G){var $=Math.round(B),F=Math.round(q);return G.containerWidth===$&&G.containerHeight===F?G:{containerWidth:$,containerHeight:F}})},[]);y.useEffect(function(){var B=function(X){var oe,I=X[0].contentRect,Y=I.width,Q=I.height;U(Y,Q),(oe=R.current)===null||oe===void 0||oe.call(R,Y,Q)};S>0&&(B=A6(B,S,{trailing:!0,leading:!1}));var q=new ResizeObserver(B),G=j.current.getBoundingClientRect(),$=G.width,F=G.height;return U($,F),q.observe(j.current),function(){q.disconnect()}},[U,S]);var P=y.useMemo(function(){var B=z.containerWidth,q=z.containerHeight;if(B<0||q<0)return null;Ei(us(l)||us(f),`The width(%s) and height(%s) are both fixed numbers,
440
- maybe you don't need to use a ResponsiveContainer.`,l,f),Ei(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=us(l)?B:l,$=us(f)?q:f;n&&n>0&&(G?$=G/n:$&&(G=$*n),g&&$>g&&($=g)),Ei(G>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
441
- please check the style of container, or the props width(%s) and height(%s),
442
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
443
- height and width.`,G,$,l,f,m,h,n);var F=!Array.isArray(x)&&Oi(x.type).endsWith("Chart");return L.Children.map(x,function(Z){return L.isValidElement(Z)?y.cloneElement(Z,ep({width:G,height:$},F?{style:ep({height:"100%",width:"100%",maxHeight:$,maxWidth:G},Z.props.style)}:{})):Z})},[n,x,f,g,h,m,z,l]);return L.createElement("div",{id:w?"".concat(w):void 0,className:yt("recharts-responsive-container",O),style:ep(ep({},C),{},{width:l,height:f,minWidth:m,minHeight:h,maxHeight:g}),ref:j},P)}),O6=function(t){return null};O6.displayName="Cell";function mf(e){"@babel/helpers - typeof";return mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(e)}function wD(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 HS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wD(Object(n),!0).forEach(function(r){qle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qle(e,t,n){return t=Hle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hle(e){var t=Fle(e,"string");return mf(t)=="symbol"?t:t+""}function Fle(e,t){if(mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tl={widthCache:{},cacheCount:0},Vle=2e3,Gle={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},SD="recharts_measurement_span";function Wle(e){var t=HS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Xu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Mc.isSsr)return{width:0,height:0};var r=Wle(n),a=JSON.stringify({text:t,copyStyle:r});if(Tl.widthCache[a])return Tl.widthCache[a];try{var o=document.getElementById(SD);o||(o=document.createElement("span"),o.setAttribute("id",SD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=HS(HS({},Gle),r);Object.assign(o.style,l),o.textContent="".concat(t);var c=o.getBoundingClientRect(),f={width:c.width,height:c.height};return Tl.widthCache[a]=f,++Tl.cacheCount>Vle&&(Tl.cacheCount=0,Tl.widthCache={}),f}catch{return{width:0,height:0}}},Yle=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vf(e)}function im(e,t){return Qle(e)||Xle(e,t)||Kle(e,t)||Zle()}function Zle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
444
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kle(e,t){if(e){if(typeof e=="string")return _D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _D(e,t)}}function _D(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Qle(e){if(Array.isArray(e))return e}function Jle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tce(r.key),r)}}function ece(e,t,n){return t&&AD(e.prototype,t),n&&AD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tce(e){var t=nce(e,"string");return vf(t)=="symbol"?t:t+""}function nce(e,t){if(vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ED=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,rce=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ace=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,E6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ice=Object.keys(E6),Ml="NaN";function oce(e,t){return e*E6[t]}var tp=(function(){function e(t,n){Jle(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!rce.test(n)&&(this.num=NaN,this.unit=""),ice.includes(n)&&(this.num=oce(t,n),this.unit="px")}return ece(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=ace.exec(n))!==null&&r!==void 0?r:[],o=im(a,3),l=o[1],c=o[2];return new e(parseFloat(l),c??"")}}])})();function T6(e){if(e.includes(Ml))return Ml;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=OD.exec(t))!==null&&n!==void 0?n:[],a=im(r,4),o=a[1],l=a[2],c=a[3],f=tp.parse(o??""),d=tp.parse(c??""),m=l==="*"?f.multiply(d):f.divide(d);if(m.isNaN())return Ml;t=t.replace(OD,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,g=(h=ED.exec(t))!==null&&h!==void 0?h:[],x=im(g,4),A=x[1],S=x[2],w=x[3],O=tp.parse(A??""),E=tp.parse(w??""),T=S==="+"?O.add(E):O.subtract(E);if(T.isNaN())return Ml;t=t.replace(ED,T.toString())}return t}var TD=/\(([^()]*)\)/;function sce(e){for(var t=e;t.includes("(");){var n=TD.exec(t),r=im(n,2),a=r[1];t=t.replace(TD,T6(a))}return t}function lce(e){var t=e.replace(/\s+/g,"");return t=sce(t),t=T6(t),t}function cce(e){try{return lce(e)}catch{return Ml}}function Xw(e){var t=cce(e.slice(5,-1));return t===Ml?"":t}var uce=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],fce=["dx","dy","angle","className","breakAll"];function FS(){return FS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FS.apply(this,arguments)}function jD(e,t){if(e==null)return{};var n=dce(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CD(e,t){return vce(e)||mce(e,t)||pce(e,t)||hce()}function hce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
445
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pce(e,t){if(e){if(typeof e=="string")return RD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RD(e,t)}}function RD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function vce(e){if(Array.isArray(e))return e}var j6=/[ \f\n\r\t\v\u2028\u2029]+/,C6=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var o=[];vt(n)||(r?o=n.toString().split(""):o=n.toString().split(j6));var l=o.map(function(f){return{word:f,width:Xu(f,a).width}}),c=r?0:Xu(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:c}}catch{return null}},gce=function(t,n,r,a,o){var l=t.maxLines,c=t.children,f=t.style,d=t.breakAll,m=Ne(l),h=c,g=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function($,F){var Z=F.word,X=F.width,oe=$[$.length-1];if(oe&&(a==null||o||oe.width+X+r<Number(a)))oe.words.push(Z),oe.width+=X+r;else{var I={words:[Z],width:X};$.push(I)}return $},[])},x=g(n),A=function(G){return G.reduce(function($,F){return $.width>F.width?$:F})};if(!m)return x;for(var S="…",w=function(G){var $=h.slice(0,G),F=C6({breakAll:d,style:f,children:$+S}).wordsWithComputedWidth,Z=g(F),X=Z.length>l||A(Z).width>Number(a);return[X,Z]},O=0,E=h.length-1,T=0,C;O<=E&&T<=h.length-1;){var j=Math.floor((O+E)/2),R=j-1,N=w(R),D=CD(N,2),z=D[0],V=D[1],U=w(j),P=CD(U,1),B=P[0];if(!z&&!B&&(O=j+1),z&&B&&(E=j-1),!z&&B){C=V;break}T++}return C||x},ND=function(t){var n=vt(t)?[]:t.toString().split(j6);return[{words:n}]},yce=function(t){var n=t.width,r=t.scaleToFit,a=t.children,o=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!Mc.isSsr){var f,d,m=C6({breakAll:l,children:a,style:o});if(m){var h=m.wordsWithComputedWidth,g=m.spaceWidth;f=h,d=g}else return ND(a);return gce({breakAll:l,children:a,maxLines:c,style:o},f,d,n,r)}return ND(a)},MD="#808080",om=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.lineHeight,c=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,m=t.scaleToFit,h=m===void 0?!1:m,g=t.textAnchor,x=g===void 0?"start":g,A=t.verticalAnchor,S=A===void 0?"end":A,w=t.fill,O=w===void 0?MD:w,E=jD(t,uce),T=y.useMemo(function(){return yce({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:h,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,h,E.style,E.width]),C=E.dx,j=E.dy,R=E.angle,N=E.className,D=E.breakAll,z=jD(E,fce);if(!Cn(r)||!Cn(o))return null;var V=r+(Ne(C)?C:0),U=o+(Ne(j)?j:0),P;switch(S){case"start":P=Xw("calc(".concat(d,")"));break;case"middle":P=Xw("calc(".concat((T.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:P=Xw("calc(".concat(T.length-1," * -").concat(c,")"));break}var B=[];if(h){var q=T[0].width,G=E.width;B.push("scale(".concat((Ne(G)?G/q:1)/q,")"))}return R&&B.push("rotate(".concat(R,", ").concat(V,", ").concat(U,")")),B.length&&(z.transform=B.join(" ")),L.createElement("text",FS({},ht(z,!0),{x:V,y:U,className:yt("recharts-text",N),textAnchor:x,fill:O.includes("url")?MD:O}),T.map(function($,F){var Z=$.words.join(D?"":" ");return L.createElement("tspan",{x:V,dy:F===0?P:c,key:"".concat(Z,"-").concat(F)},Z)}))};function _o(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function bce(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function RO(e){let t,n,r;e.length!==2?(t=_o,n=(c,f)=>_o(e(c),f),r=(c,f)=>e(c)-f):(t=e===_o||e===bce?e:xce,n=e,r=e);function a(c,f,d=0,m=c.length){if(d<m){if(t(f,f)!==0)return m;do{const h=d+m>>>1;n(c[h],f)<0?d=h+1:m=h}while(d<m)}return d}function o(c,f,d=0,m=c.length){if(d<m){if(t(f,f)!==0)return m;do{const h=d+m>>>1;n(c[h],f)<=0?d=h+1:m=h}while(d<m)}return d}function l(c,f,d=0,m=c.length){const h=a(c,f,d,m-1);return h>d&&r(c[h-1],f)>-r(c[h],f)?h-1:h}return{left:a,center:l,right:o}}function xce(){return 0}function R6(e){return e===null?NaN:+e}function*wce(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Sce=RO(_o),Sd=Sce.right;RO(R6).center;class PD extends Map{constructor(t,n=Oce){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(DD(this,t))}has(t){return super.has(DD(this,t))}set(t,n){return super.set(_ce(this,t),n)}delete(t){return super.delete(Ace(this,t))}}function DD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function _ce({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ace({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Oce(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ece(e=_o){if(e===_o)return N6;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 N6(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Tce=Math.sqrt(50),jce=Math.sqrt(10),Cce=Math.sqrt(2);function sm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),l=o>=Tce?10:o>=jce?5:o>=Cce?2:1;let c,f,d;return a<0?(d=Math.pow(10,-a)/l,c=Math.round(e*d),f=Math.round(t*d),c/d<e&&++c,f/d>t&&--f,d=-d):(d=Math.pow(10,a)*l,c=Math.round(e/d),f=Math.round(t/d),c*d<e&&++c,f*d>t&&--f),f<c&&.5<=n&&n<2?sm(e,t,n*2):[c,f,d]}function VS(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,o,l]=r?sm(t,e,n):sm(e,t,n);if(!(o>=a))return[];const c=o-a+1,f=new Array(c);if(r)if(l<0)for(let d=0;d<c;++d)f[d]=(o-d)/-l;else for(let d=0;d<c;++d)f[d]=(o-d)*l;else if(l<0)for(let d=0;d<c;++d)f[d]=(a+d)/-l;else for(let d=0;d<c;++d)f[d]=(a+d)*l;return f}function GS(e,t,n){return t=+t,e=+e,n=+n,sm(e,t,n)[2]}function WS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?GS(t,e,n):GS(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 $D(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function M6(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?N6:Ece(a);r>n;){if(r-n>600){const f=r-n+1,d=t-n+1,m=Math.log(f),h=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*h*(f-h)/f)*(d-f/2<0?-1:1),x=Math.max(n,Math.floor(t-d*h/f+g)),A=Math.min(r,Math.floor(t+(f-d)*h/f+g));M6(e,t,x,A,a)}const o=e[t];let l=n,c=r;for(Pu(e,n,t),a(e[r],o)>0&&Pu(e,n,r);l<c;){for(Pu(e,l,c),++l,--c;a(e[l],o)<0;)++l;for(;a(e[c],o)>0;)--c}a(e[n],o)===0?Pu(e,n,c):(++c,Pu(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function Pu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Rce(e,t,n){if(e=Float64Array.from(wce(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return $D(e);if(t>=1)return kD(e);var r,a=(r-1)*t,o=Math.floor(a),l=kD(M6(e,o).subarray(0,o+1)),c=$D(e.subarray(o+1));return l+(c-l)*(a-o)}}function Nce(e,t,n=R6){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,o=Math.floor(a),l=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return l+(c-l)*(a-o)}}function Mce(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,o=new Array(a);++r<a;)o[r]=e+r*n;return o}function la(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Bi(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 YS=Symbol("implicit");function NO(){var e=new PD,t=[],n=[],r=YS;function a(o){let l=e.get(o);if(l===void 0){if(r!==YS)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new PD;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(o){return arguments.length?(n=Array.from(o),a):n.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return NO(t,n).unknown(r)},la.apply(a,arguments),a}function gf(){var e=NO().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,o,l,c=!1,f=0,d=0,m=.5;delete e.unknown;function h(){var g=t().length,x=a<r,A=x?a:r,S=x?r:a;o=(S-A)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),A+=(S-A-o*(g-f))*m,l=o*(1-f),c&&(A=Math.round(A),l=Math.round(l));var w=Mce(g).map(function(O){return A+o*O});return n(x?w.reverse():w)}return e.domain=function(g){return arguments.length?(t(g),h()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,h()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,c=!0,h()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,h()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),h()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),h()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,h()):d},e.align=function(g){return arguments.length?(m=Math.max(0,Math.min(1,g)),h()):m},e.copy=function(){return gf(t(),[r,a]).round(c).paddingInner(f).paddingOuter(d).align(m)},la.apply(h(),arguments)}function P6(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return P6(t())},e}function Qu(){return P6(gf.apply(null,arguments).paddingInner(1))}function MO(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function D6(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function _d(){}var yf=.7,lm=1/yf,ql="\\s*([+-]?\\d+)\\s*",bf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ga="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pce=/^#([0-9a-f]{3,8})$/,Dce=new RegExp(`^rgb\\(${ql},${ql},${ql}\\)$`),kce=new RegExp(`^rgb\\(${Ga},${Ga},${Ga}\\)$`),$ce=new RegExp(`^rgba\\(${ql},${ql},${ql},${bf}\\)$`),zce=new RegExp(`^rgba\\(${Ga},${Ga},${Ga},${bf}\\)$`),Lce=new RegExp(`^hsl\\(${bf},${Ga},${Ga}\\)$`),Ice=new RegExp(`^hsla\\(${bf},${Ga},${Ga},${bf}\\)$`),zD={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};MO(_d,xf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:LD,formatHex:LD,formatHex8:Bce,formatHsl:Uce,formatRgb:ID,toString:ID});function LD(){return this.rgb().formatHex()}function Bce(){return this.rgb().formatHex8()}function Uce(){return k6(this).formatHsl()}function ID(){return this.rgb().formatRgb()}function xf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Pce.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?BD(t):n===3?new mr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?np(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?np(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=Dce.exec(e))?new mr(t[1],t[2],t[3],1):(t=kce.exec(e))?new mr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$ce.exec(e))?np(t[1],t[2],t[3],t[4]):(t=zce.exec(e))?np(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Lce.exec(e))?HD(t[1],t[2]/100,t[3]/100,1):(t=Ice.exec(e))?HD(t[1],t[2]/100,t[3]/100,t[4]):zD.hasOwnProperty(e)?BD(zD[e]):e==="transparent"?new mr(NaN,NaN,NaN,0):null}function BD(e){return new mr(e>>16&255,e>>8&255,e&255,1)}function np(e,t,n,r){return r<=0&&(e=t=n=NaN),new mr(e,t,n,r)}function qce(e){return e instanceof _d||(e=xf(e)),e?(e=e.rgb(),new mr(e.r,e.g,e.b,e.opacity)):new mr}function ZS(e,t,n,r){return arguments.length===1?qce(e):new mr(e,t,n,r??1)}function mr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}MO(mr,ZS,D6(_d,{brighter(e){return e=e==null?lm:Math.pow(lm,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yf:Math.pow(yf,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mr(ms(this.r),ms(this.g),ms(this.b),cm(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:UD,formatHex:UD,formatHex8:Hce,formatRgb:qD,toString:qD}));function UD(){return`#${fs(this.r)}${fs(this.g)}${fs(this.b)}`}function Hce(){return`#${fs(this.r)}${fs(this.g)}${fs(this.b)}${fs((isNaN(this.opacity)?1:this.opacity)*255)}`}function qD(){const e=cm(this.opacity);return`${e===1?"rgb(":"rgba("}${ms(this.r)}, ${ms(this.g)}, ${ms(this.b)}${e===1?")":`, ${e})`}`}function cm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ms(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fs(e){return e=ms(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 ga(e,t,n,r)}function k6(e){if(e instanceof ga)return new ga(e.h,e.s,e.l,e.opacity);if(e instanceof _d||(e=xf(e)),!e)return new ga;if(e instanceof ga)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,c=o-a,f=(o+a)/2;return c?(t===o?l=(n-r)/c+(n<r)*6:n===o?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?o+a:2-o-a,l*=60):c=f>0&&f<1?0:l,new ga(l,c,f,e.opacity)}function Fce(e,t,n,r){return arguments.length===1?k6(e):new ga(e,t,n,r??1)}function ga(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}MO(ga,Fce,D6(_d,{brighter(e){return e=e==null?lm:Math.pow(lm,e),new ga(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yf:Math.pow(yf,e),new ga(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 mr(Qw(e>=240?e-240:e+120,a,r),Qw(e,a,r),Qw(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new ga(FD(this.h),rp(this.s),rp(this.l),cm(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=cm(this.opacity);return`${e===1?"hsl(":"hsla("}${FD(this.h)}, ${rp(this.s)*100}%, ${rp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FD(e){return e=(e||0)%360,e<0?e+360:e}function rp(e){return Math.max(0,Math.min(1,e||0))}function Qw(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 PO=e=>()=>e;function Vce(e,t){return function(n){return e+n*t}}function Gce(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 Wce(e){return(e=+e)==1?$6:function(t,n){return n-t?Gce(t,n,e):PO(isNaN(t)?n:t)}}function $6(e,t){var n=t-e;return n?Vce(e,n):PO(isNaN(e)?t:e)}const VD=(function e(t){var n=Wce(t);function r(a,o){var l=n((a=ZS(a)).r,(o=ZS(o)).r),c=n(a.g,o.g),f=n(a.b,o.b),d=$6(a.opacity,o.opacity);return function(m){return a.r=l(m),a.g=c(m),a.b=f(m),a.opacity=d(m),a+""}}return r.gamma=e,r})(1);function Yce(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;a<n;++a)r[a]=e[a]*(1-o)+t[a]*o;return r}}function Zce(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kce(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)a[l]=Pc(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(c){for(l=0;l<r;++l)o[l]=a[l](c);return o}}function Xce(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function um(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Qce(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]=Pc(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var KS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jw=new RegExp(KS.source,"g");function Jce(e){return function(){return e}}function eue(e){return function(t){return e(t)+""}}function tue(e,t){var n=KS.lastIndex=Jw.lastIndex=0,r,a,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=KS.exec(e))&&(a=Jw.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(r=r[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,f.push({i:l,x:um(r,a)})),n=Jw.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?eue(f[0].x):Jce(t):(t=f.length,function(d){for(var m=0,h;m<t;++m)c[(h=f[m]).i]=h.x(d);return c.join("")})}function Pc(e,t){var n=typeof t,r;return t==null||n==="boolean"?PO(t):(n==="number"?um:n==="string"?(r=xf(t))?(t=r,VD):tue:t instanceof xf?VD:t instanceof Date?Xce:Zce(t)?Yce:Array.isArray(t)?Kce:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Qce:um)(e,t)}function DO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function nue(e,t){t===void 0&&(t=e,e=Pc);for(var n=0,r=t.length-1,a=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(a,a=t[++n]);return function(l){var c=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[c](l-c)}}function rue(e){return function(){return e}}function fm(e){return+e}var GD=[0,1];function ar(e){return e}function XS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rue(isNaN(t)?NaN:.5)}function aue(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function iue(e,t,n){var r=e[0],a=e[1],o=t[0],l=t[1];return a<r?(r=XS(a,r),o=n(l,o)):(r=XS(r,a),o=n(o,l)),function(c){return o(r(c))}}function oue(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=XS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=Sd(e,c,1,r)-1;return o[f](a[f](c))}}function Ad(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Fv(){var e=GD,t=GD,n=Pc,r,a,o,l=ar,c,f,d;function m(){var g=Math.min(e.length,t.length);return l!==ar&&(l=aue(e[0],e[g-1])),c=g>2?oue:iue,f=d=null,h}function h(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(r),t,n)))(r(l(g)))}return h.invert=function(g){return l(a((d||(d=c(t,e.map(r),um)))(g)))},h.domain=function(g){return arguments.length?(e=Array.from(g,fm),m()):e.slice()},h.range=function(g){return arguments.length?(t=Array.from(g),m()):t.slice()},h.rangeRound=function(g){return t=Array.from(g),n=DO,m()},h.clamp=function(g){return arguments.length?(l=g?!0:ar,m()):l!==ar},h.interpolate=function(g){return arguments.length?(n=g,m()):n},h.unknown=function(g){return arguments.length?(o=g,h):o},function(g,x){return r=g,a=x,m()}}function kO(){return Fv()(ar,ar)}function sue(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function dm(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 tc(e){return e=dm(Math.abs(e)),e?e[1]:NaN}function lue(e,t){return function(n,r){for(var a=n.length,o=[],l=0,c=e[0],f=0;a>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),o.push(n.substring(a-=c,a+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function cue(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var uue=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wf(e){if(!(t=uue.exec(e)))throw new Error("invalid format: "+e);var t;return new $O({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]})}wf.prototype=$O.prototype;function $O(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+""}$O.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 fue(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 hm;function due(e,t){var n=dm(e,t);if(!n)return hm=void 0,e.toPrecision(t);var r=n[0],a=n[1],o=a-(hm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+dm(e,Math.max(0,t+o-1))[0]}function WD(e,t){var n=dm(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 YD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:sue,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)=>WD(e*100,t),r:WD,s:due,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ZD(e){return e}var KD=Array.prototype.map,XD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hue(e){var t=e.grouping===void 0||e.thousands===void 0?ZD:lue(KD.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+"",o=e.numerals===void 0?ZD:cue(KD.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(h,g){h=wf(h);var x=h.fill,A=h.align,S=h.sign,w=h.symbol,O=h.zero,E=h.width,T=h.comma,C=h.precision,j=h.trim,R=h.type;R==="n"?(T=!0,R="g"):YD[R]||(C===void 0&&(C=12),j=!0,R="g"),(O||x==="0"&&A==="=")&&(O=!0,x="0",A="=");var N=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?n:w==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():""),D=(w==="$"?r:/[%p]/.test(R)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),z=YD[R],V=/[defgprs%]/.test(R);C=C===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function U(P){var B=N,q=D,G,$,F;if(R==="c")q=z(P)+q,P="";else{P=+P;var Z=P<0||1/P<0;if(P=isNaN(P)?f:z(Math.abs(P),C),j&&(P=fue(P)),Z&&+P==0&&S!=="+"&&(Z=!1),B=(Z?S==="("?S:c:S==="-"||S==="("?"":S)+B,q=(R==="s"&&!isNaN(P)&&hm!==void 0?XD[8+hm/3]:"")+q+(Z&&S==="("?")":""),V){for(G=-1,$=P.length;++G<$;)if(F=P.charCodeAt(G),48>F||F>57){q=(F===46?a+P.slice(G+1):P.slice(G))+q,P=P.slice(0,G);break}}}T&&!O&&(P=t(P,1/0));var X=B.length+P.length+q.length,oe=X<E?new Array(E-X+1).join(x):"";switch(T&&O&&(P=t(oe+P,oe.length?E-q.length:1/0),oe=""),A){case"<":P=B+P+q+oe;break;case"=":P=B+oe+P+q;break;case"^":P=oe.slice(0,X=oe.length>>1)+B+P+q+oe.slice(X);break;default:P=oe+B+P+q;break}return o(P)}return U.toString=function(){return h+""},U}function m(h,g){var x=Math.max(-8,Math.min(8,Math.floor(tc(g)/3)))*3,A=Math.pow(10,-x),S=d((h=wf(h),h.type="f",h),{suffix:XD[8+x/3]});return function(w){return S(A*w)}}return{format:d,formatPrefix:m}}var ap,zO,z6;pue({thousands:",",grouping:[3],currency:["$",""]});function pue(e){return ap=hue(e),zO=ap.format,z6=ap.formatPrefix,ap}function mue(e){return Math.max(0,-tc(Math.abs(e)))}function vue(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(tc(t)/3)))*3-tc(Math.abs(e)))}function gue(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,tc(t)-tc(e))+1}function L6(e,t,n,r){var a=WS(e,t,n),o;switch(r=wf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=vue(a,l))&&(r.precision=o),z6(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=gue(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=mue(a))&&(r.precision=o-(r.type==="%")*2);break}}return zO(r)}function $o(e){var t=e.domain;return e.ticks=function(n){var r=t();return VS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L6(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,o=r.length-1,l=r[a],c=r[o],f,d,m=10;for(c<l&&(d=l,l=c,c=d,d=a,a=o,o=d);m-- >0;){if(d=GS(l,c,n),d===f)return r[a]=l,r[o]=c,t(r);if(d>0)l=Math.floor(l/d)*d,c=Math.ceil(c/d)*d;else if(d<0)l=Math.ceil(l*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function pm(){var e=kO();return e.copy=function(){return Ad(e,pm())},la.apply(e,arguments),$o(e)}function I6(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,fm),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return I6(e).unknown(t)},e=arguments.length?Array.from(e,fm):[0,1],$o(n)}function B6(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],o=e[r],l;return o<a&&(l=n,n=r,r=l,l=a,a=o,o=l),e[n]=t.floor(a),e[r]=t.ceil(o),e}function QD(e){return Math.log(e)}function JD(e){return Math.exp(e)}function yue(e){return-Math.log(-e)}function bue(e){return-Math.exp(-e)}function xue(e){return isFinite(e)?+("1e"+e):e<0?0:e}function wue(e){return e===10?xue:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Sue(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 ek(e){return(t,n)=>-e(-t,n)}function LO(e){const t=e(QD,JD),n=t.domain;let r=10,a,o;function l(){return a=Sue(r),o=wue(r),n()[0]<0?(a=ek(a),o=ek(o),e(yue,bue)):e(QD,JD),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let d=f[0],m=f[f.length-1];const h=m<d;h&&([d,m]=[m,d]);let g=a(d),x=a(m),A,S;const w=c==null?10:+c;let O=[];if(!(r%1)&&x-g<w){if(g=Math.floor(g),x=Math.ceil(x),d>0){for(;g<=x;++g)for(A=1;A<r;++A)if(S=g<0?A/o(-g):A*o(g),!(S<d)){if(S>m)break;O.push(S)}}else for(;g<=x;++g)for(A=r-1;A>=1;--A)if(S=g>0?A/o(-g):A*o(g),!(S<d)){if(S>m)break;O.push(S)}O.length*2<w&&(O=VS(d,m,w))}else O=VS(g,x,Math.min(x-g,w)).map(o);return h?O.reverse():O},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=wf(f)).precision==null&&(f.trim=!0),f=zO(f)),c===1/0)return f;const d=Math.max(1,r*c/t.ticks().length);return m=>{let h=m/o(Math.round(a(m)));return h*r<r-.5&&(h*=r),h<=d?f(m):""}},t.nice=()=>n(B6(n(),{floor:c=>o(Math.floor(a(c))),ceil:c=>o(Math.ceil(a(c)))})),t}function U6(){const e=LO(Fv()).domain([1,10]);return e.copy=()=>Ad(e,U6()).base(e.base()),la.apply(e,arguments),e}function tk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function IO(e){var t=1,n=e(tk(t),nk(t));return n.constant=function(r){return arguments.length?e(tk(t=+r),nk(t)):t},$o(n)}function q6(){var e=IO(Fv());return e.copy=function(){return Ad(e,q6()).constant(e.constant())},la.apply(e,arguments)}function rk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function _ue(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Aue(e){return e<0?-e*e:e*e}function BO(e){var t=e(ar,ar),n=1;function r(){return n===1?e(ar,ar):n===.5?e(_ue,Aue):e(rk(n),rk(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},$o(t)}function UO(){var e=BO(Fv());return e.copy=function(){return Ad(e,UO()).exponent(e.exponent())},la.apply(e,arguments),e}function Oue(){return UO.apply(null,arguments).exponent(.5)}function ak(e){return Math.sign(e)*e*e}function Eue(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function H6(){var e=kO(),t=[0,1],n=!1,r;function a(o){var l=Eue(e(o));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(o){return e.invert(ak(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,fm)).map(ak)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(n=!!o,a):n},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return H6(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},la.apply(a,arguments),$o(a)}function F6(){var e=[],t=[],n=[],r;function a(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l<c;)n[l-1]=Nce(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Sd(n,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(_o),a()},o.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return F6().domain(e).range(t).unknown(r)},la.apply(o,arguments)}function V6(){var e=0,t=1,n=1,r=[.5],a=[0,1],o;function l(f){return f!=null&&f<=f?a[Sd(r,f,0,n)]:o}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(n=(a=Array.from(f)).length-1,c()):a.slice()},l.invertExtent=function(f){var d=a.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return V6().domain([e,t]).range(a).unknown(o)},la.apply($o(l),arguments)}function G6(){var e=[.5],t=[0,1],n,r=1;function a(o){return o!=null&&o<=o?t[Sd(e,o,0,r)]:n}return a.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return G6().domain(e).range(t).unknown(n)},la.apply(a,arguments)}const e1=new Date,t1=new Date;function Rn(e,t,n,r){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const l=a(o),c=a.ceil(o);return o-l<c-o?l:c},a.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),a.range=(o,l,c)=>{const f=[];if(o=a.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let d;do f.push(d=new Date(+o)),t(o,c),e(o);while(d<o&&o<l);return f},a.filter=o=>Rn(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),n&&(a.count=(o,l)=>(e1.setTime(+o),t1.setTime(+l),e(e1),e(t1),Math.floor(n(e1,t1))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(r?l=>r(l)%o===0:l=>a.count(0,l)%o===0):a)),a}const mm=Rn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);mm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Rn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):mm);mm.range;const Si=1e3,ea=Si*60,_i=ea*60,Ni=_i*24,qO=Ni*7,ik=Ni*30,n1=Ni*365,ds=Rn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Si)},(e,t)=>(t-e)/Si,e=>e.getUTCSeconds());ds.range;const HO=Rn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Si)},(e,t)=>{e.setTime(+e+t*ea)},(e,t)=>(t-e)/ea,e=>e.getMinutes());HO.range;const FO=Rn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ea)},(e,t)=>(t-e)/ea,e=>e.getUTCMinutes());FO.range;const VO=Rn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Si-e.getMinutes()*ea)},(e,t)=>{e.setTime(+e+t*_i)},(e,t)=>(t-e)/_i,e=>e.getHours());VO.range;const GO=Rn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*_i)},(e,t)=>(t-e)/_i,e=>e.getUTCHours());GO.range;const Od=Rn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ea)/Ni,e=>e.getDate()-1);Od.range;const Vv=Rn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ni,e=>e.getUTCDate()-1);Vv.range;const W6=Rn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ni,e=>Math.floor(e/Ni));W6.range;function $s(e){return Rn(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())*ea)/qO)}const Gv=$s(0),vm=$s(1),Tue=$s(2),jue=$s(3),nc=$s(4),Cue=$s(5),Rue=$s(6);Gv.range;vm.range;Tue.range;jue.range;nc.range;Cue.range;Rue.range;function zs(e){return Rn(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)/qO)}const Wv=zs(0),gm=zs(1),Nue=zs(2),Mue=zs(3),rc=zs(4),Pue=zs(5),Due=zs(6);Wv.range;gm.range;Nue.range;Mue.range;rc.range;Pue.range;Due.range;const WO=Rn(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());WO.range;const YO=Rn(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());YO.range;const Mi=Rn(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());Mi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rn(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)});Mi.range;const Pi=Rn(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());Pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rn(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)});Pi.range;function Y6(e,t,n,r,a,o){const l=[[ds,1,Si],[ds,5,5*Si],[ds,15,15*Si],[ds,30,30*Si],[o,1,ea],[o,5,5*ea],[o,15,15*ea],[o,30,30*ea],[a,1,_i],[a,3,3*_i],[a,6,6*_i],[a,12,12*_i],[r,1,Ni],[r,2,2*Ni],[n,1,qO],[t,1,ik],[t,3,3*ik],[e,1,n1]];function c(d,m,h){const g=m<d;g&&([d,m]=[m,d]);const x=h&&typeof h.range=="function"?h:f(d,m,h),A=x?x.range(d,+m+1):[];return g?A.reverse():A}function f(d,m,h){const g=Math.abs(m-d)/h,x=RO(([,,w])=>w).right(l,g);if(x===l.length)return e.every(WS(d/n1,m/n1,h));if(x===0)return mm.every(Math.max(WS(d,m,h),1));const[A,S]=l[g/l[x-1][2]<l[x][2]/g?x-1:x];return A.every(S)}return[c,f]}const[kue,$ue]=Y6(Pi,YO,Wv,W6,GO,FO),[zue,Lue]=Y6(Mi,WO,Gv,Od,VO,HO);function r1(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 a1(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 Du(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Iue(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,d=ku(a),m=$u(a),h=ku(o),g=$u(o),x=ku(l),A=$u(l),S=ku(c),w=$u(c),O=ku(f),E=$u(f),T={a:F,A:Z,b:X,B:oe,c:null,d:fk,e:fk,f:lfe,g:yfe,G:xfe,H:ife,I:ofe,j:sfe,L:Z6,m:cfe,M:ufe,p:I,q:Y,Q:pk,s:mk,S:ffe,u:dfe,U:hfe,V:pfe,w:mfe,W:vfe,x:null,X:null,y:gfe,Y:bfe,Z:wfe,"%":hk},C={a:Q,A:ce,b:ve,B:fe,c:null,d:dk,e:dk,f:Ofe,g:kfe,G:zfe,H:Sfe,I:_fe,j:Afe,L:X6,m:Efe,M:Tfe,p:ue,q:xe,Q:pk,s:mk,S:jfe,u:Cfe,U:Rfe,V:Nfe,w:Mfe,W:Pfe,x:null,X:null,y:Dfe,Y:$fe,Z:Lfe,"%":hk},j={a:V,A:U,b:P,B,c:q,d:ck,e:ck,f:tfe,g:lk,G:sk,H:uk,I:uk,j:Xue,L:efe,m:Kue,M:Que,p:z,q:Zue,Q:rfe,s:afe,S:Jue,u:Fue,U:Vue,V:Gue,w:Hue,W:Wue,x:G,X:$,y:lk,Y:sk,Z:Yue,"%":nfe};T.x=R(n,T),T.X=R(r,T),T.c=R(t,T),C.x=R(n,C),C.X=R(r,C),C.c=R(t,C);function R(se,_e){return function(Se){var ne=[],Ue=-1,$e=0,rt=se.length,et,tt,qt;for(Se instanceof Date||(Se=new Date(+Se));++Ue<rt;)se.charCodeAt(Ue)===37&&(ne.push(se.slice($e,Ue)),(tt=ok[et=se.charAt(++Ue)])!=null?et=se.charAt(++Ue):tt=et==="e"?" ":"0",(qt=_e[et])&&(et=qt(Se,tt)),ne.push(et),$e=Ue+1);return ne.push(se.slice($e,Ue)),ne.join("")}}function N(se,_e){return function(Se){var ne=Du(1900,void 0,1),Ue=D(ne,se,Se+="",0),$e,rt;if(Ue!=Se.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(_e&&!("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?($e=a1(Du(ne.y,0,1)),rt=$e.getUTCDay(),$e=rt>4||rt===0?gm.ceil($e):gm($e),$e=Vv.offset($e,(ne.V-1)*7),ne.y=$e.getUTCFullYear(),ne.m=$e.getUTCMonth(),ne.d=$e.getUTCDate()+(ne.w+6)%7):($e=r1(Du(ne.y,0,1)),rt=$e.getDay(),$e=rt>4||rt===0?vm.ceil($e):vm($e),$e=Od.offset($e,(ne.V-1)*7),ne.y=$e.getFullYear(),ne.m=$e.getMonth(),ne.d=$e.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),rt="Z"in ne?a1(Du(ne.y,0,1)).getUTCDay():r1(Du(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(rt+5)%7:ne.w+ne.U*7-(rt+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,a1(ne)):r1(ne)}}function D(se,_e,Se,ne){for(var Ue=0,$e=_e.length,rt=Se.length,et,tt;Ue<$e;){if(ne>=rt)return-1;if(et=_e.charCodeAt(Ue++),et===37){if(et=_e.charAt(Ue++),tt=j[et in ok?_e.charAt(Ue++):et],!tt||(ne=tt(se,Se,ne))<0)return-1}else if(et!=Se.charCodeAt(ne++))return-1}return ne}function z(se,_e,Se){var ne=d.exec(_e.slice(Se));return ne?(se.p=m.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function V(se,_e,Se){var ne=x.exec(_e.slice(Se));return ne?(se.w=A.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function U(se,_e,Se){var ne=h.exec(_e.slice(Se));return ne?(se.w=g.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function P(se,_e,Se){var ne=O.exec(_e.slice(Se));return ne?(se.m=E.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function B(se,_e,Se){var ne=S.exec(_e.slice(Se));return ne?(se.m=w.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function q(se,_e,Se){return D(se,t,_e,Se)}function G(se,_e,Se){return D(se,n,_e,Se)}function $(se,_e,Se){return D(se,r,_e,Se)}function F(se){return l[se.getDay()]}function Z(se){return o[se.getDay()]}function X(se){return f[se.getMonth()]}function oe(se){return c[se.getMonth()]}function I(se){return a[+(se.getHours()>=12)]}function Y(se){return 1+~~(se.getMonth()/3)}function Q(se){return l[se.getUTCDay()]}function ce(se){return o[se.getUTCDay()]}function ve(se){return f[se.getUTCMonth()]}function fe(se){return c[se.getUTCMonth()]}function ue(se){return a[+(se.getUTCHours()>=12)]}function xe(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var _e=R(se+="",T);return _e.toString=function(){return se},_e},parse:function(se){var _e=N(se+="",!1);return _e.toString=function(){return se},_e},utcFormat:function(se){var _e=R(se+="",C);return _e.toString=function(){return se},_e},utcParse:function(se){var _e=N(se+="",!0);return _e.toString=function(){return se},_e}}}var ok={"-":"",_:" ",0:"0"},Dn=/^\s*\d+/,Bue=/^%/,Uue=/[\\^$*+?|[\]().{}]/g;function Ot(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",o=a.length;return r+(o<n?new Array(n-o+1).join(t)+a:a)}function que(e){return e.replace(Uue,"\\$&")}function ku(e){return new RegExp("^(?:"+e.map(que).join("|")+")","i")}function $u(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Hue(e,t,n){var r=Dn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Fue(e,t,n){var r=Dn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Vue(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gue(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wue(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sk(e,t,n){var r=Dn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lk(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yue(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 Zue(e,t,n){var r=Dn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Kue(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ck(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Xue(e,t,n){var r=Dn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function uk(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Que(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Jue(e,t,n){var r=Dn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function efe(e,t,n){var r=Dn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tfe(e,t,n){var r=Dn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nfe(e,t,n){var r=Bue.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rfe(e,t,n){var r=Dn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function afe(e,t,n){var r=Dn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fk(e,t){return Ot(e.getDate(),t,2)}function ife(e,t){return Ot(e.getHours(),t,2)}function ofe(e,t){return Ot(e.getHours()%12||12,t,2)}function sfe(e,t){return Ot(1+Od.count(Mi(e),e),t,3)}function Z6(e,t){return Ot(e.getMilliseconds(),t,3)}function lfe(e,t){return Z6(e,t)+"000"}function cfe(e,t){return Ot(e.getMonth()+1,t,2)}function ufe(e,t){return Ot(e.getMinutes(),t,2)}function ffe(e,t){return Ot(e.getSeconds(),t,2)}function dfe(e){var t=e.getDay();return t===0?7:t}function hfe(e,t){return Ot(Gv.count(Mi(e)-1,e),t,2)}function K6(e){var t=e.getDay();return t>=4||t===0?nc(e):nc.ceil(e)}function pfe(e,t){return e=K6(e),Ot(nc.count(Mi(e),e)+(Mi(e).getDay()===4),t,2)}function mfe(e){return e.getDay()}function vfe(e,t){return Ot(vm.count(Mi(e)-1,e),t,2)}function gfe(e,t){return Ot(e.getFullYear()%100,t,2)}function yfe(e,t){return e=K6(e),Ot(e.getFullYear()%100,t,2)}function bfe(e,t){return Ot(e.getFullYear()%1e4,t,4)}function xfe(e,t){var n=e.getDay();return e=n>=4||n===0?nc(e):nc.ceil(e),Ot(e.getFullYear()%1e4,t,4)}function wfe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ot(t/60|0,"0",2)+Ot(t%60,"0",2)}function dk(e,t){return Ot(e.getUTCDate(),t,2)}function Sfe(e,t){return Ot(e.getUTCHours(),t,2)}function _fe(e,t){return Ot(e.getUTCHours()%12||12,t,2)}function Afe(e,t){return Ot(1+Vv.count(Pi(e),e),t,3)}function X6(e,t){return Ot(e.getUTCMilliseconds(),t,3)}function Ofe(e,t){return X6(e,t)+"000"}function Efe(e,t){return Ot(e.getUTCMonth()+1,t,2)}function Tfe(e,t){return Ot(e.getUTCMinutes(),t,2)}function jfe(e,t){return Ot(e.getUTCSeconds(),t,2)}function Cfe(e){var t=e.getUTCDay();return t===0?7:t}function Rfe(e,t){return Ot(Wv.count(Pi(e)-1,e),t,2)}function Q6(e){var t=e.getUTCDay();return t>=4||t===0?rc(e):rc.ceil(e)}function Nfe(e,t){return e=Q6(e),Ot(rc.count(Pi(e),e)+(Pi(e).getUTCDay()===4),t,2)}function Mfe(e){return e.getUTCDay()}function Pfe(e,t){return Ot(gm.count(Pi(e)-1,e),t,2)}function Dfe(e,t){return Ot(e.getUTCFullYear()%100,t,2)}function kfe(e,t){return e=Q6(e),Ot(e.getUTCFullYear()%100,t,2)}function $fe(e,t){return Ot(e.getUTCFullYear()%1e4,t,4)}function zfe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?rc(e):rc.ceil(e),Ot(e.getUTCFullYear()%1e4,t,4)}function Lfe(){return"+0000"}function hk(){return"%"}function pk(e){return+e}function mk(e){return Math.floor(+e/1e3)}var jl,J6,e8;Ife({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 Ife(e){return jl=Iue(e),J6=jl.format,jl.parse,e8=jl.utcFormat,jl.utcParse,jl}function Bfe(e){return new Date(e)}function Ufe(e){return e instanceof Date?+e:+new Date(+e)}function ZO(e,t,n,r,a,o,l,c,f,d){var m=kO(),h=m.invert,g=m.domain,x=d(".%L"),A=d(":%S"),S=d("%I:%M"),w=d("%I %p"),O=d("%a %d"),E=d("%b %d"),T=d("%B"),C=d("%Y");function j(R){return(f(R)<R?x:c(R)<R?A:l(R)<R?S:o(R)<R?w:r(R)<R?a(R)<R?O:E:n(R)<R?T:C)(R)}return m.invert=function(R){return new Date(h(R))},m.domain=function(R){return arguments.length?g(Array.from(R,Ufe)):g().map(Bfe)},m.ticks=function(R){var N=g();return e(N[0],N[N.length-1],R??10)},m.tickFormat=function(R,N){return N==null?j:d(N)},m.nice=function(R){var N=g();return(!R||typeof R.range!="function")&&(R=t(N[0],N[N.length-1],R??10)),R?g(B6(N,R)):m},m.copy=function(){return Ad(m,ZO(e,t,n,r,a,o,l,c,f,d))},m}function qfe(){return la.apply(ZO(zue,Lue,Mi,WO,Gv,Od,VO,HO,ds,J6).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Hfe(){return la.apply(ZO(kue,$ue,Pi,YO,Wv,Vv,GO,FO,ds,e8).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Yv(){var e=0,t=1,n,r,a,o,l=ar,c=!1,f;function d(h){return h==null||isNaN(h=+h)?f:l(a===0?.5:(h=(o(h)-n)*a,c?Math.max(0,Math.min(1,h)):h))}d.domain=function(h){return arguments.length?([e,t]=h,n=o(e=+e),r=o(t=+t),a=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(h){return arguments.length?(c=!!h,d):c},d.interpolator=function(h){return arguments.length?(l=h,d):l};function m(h){return function(g){var x,A;return arguments.length?([x,A]=g,l=h(x,A),d):[l(0),l(1)]}}return d.range=m(Pc),d.rangeRound=m(DO),d.unknown=function(h){return arguments.length?(f=h,d):f},function(h){return o=h,n=h(e),r=h(t),a=n===r?0:1/(r-n),d}}function zo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function t8(){var e=$o(Yv()(ar));return e.copy=function(){return zo(e,t8())},Bi.apply(e,arguments)}function n8(){var e=LO(Yv()).domain([1,10]);return e.copy=function(){return zo(e,n8()).base(e.base())},Bi.apply(e,arguments)}function r8(){var e=IO(Yv());return e.copy=function(){return zo(e,r8()).constant(e.constant())},Bi.apply(e,arguments)}function KO(){var e=BO(Yv());return e.copy=function(){return zo(e,KO()).exponent(e.exponent())},Bi.apply(e,arguments)}function Ffe(){return KO.apply(null,arguments).exponent(.5)}function a8(){var e=[],t=ar;function n(r){if(r!=null&&!isNaN(r=+r))return t((Sd(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(_o),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,o)=>Rce(e,o/r))},n.copy=function(){return a8(t).domain(e)},Bi.apply(n,arguments)}function Zv(){var e=0,t=.5,n=1,r=1,a,o,l,c,f,d=ar,m,h=!1,g;function x(S){return isNaN(S=+S)?g:(S=.5+((S=+m(S))-o)*(r*S<r*o?c:f),d(h?Math.max(0,Math.min(1,S)):S))}x.domain=function(S){return arguments.length?([e,t,n]=S,a=m(e=+e),o=m(t=+t),l=m(n=+n),c=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x):[e,t,n]},x.clamp=function(S){return arguments.length?(h=!!S,x):h},x.interpolator=function(S){return arguments.length?(d=S,x):d};function A(S){return function(w){var O,E,T;return arguments.length?([O,E,T]=w,d=nue(S,[O,E,T]),x):[d(0),d(.5),d(1)]}}return x.range=A(Pc),x.rangeRound=A(DO),x.unknown=function(S){return arguments.length?(g=S,x):g},function(S){return m=S,a=S(e),o=S(t),l=S(n),c=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x}}function i8(){var e=$o(Zv()(ar));return e.copy=function(){return zo(e,i8())},Bi.apply(e,arguments)}function o8(){var e=LO(Zv()).domain([.1,1,10]);return e.copy=function(){return zo(e,o8()).base(e.base())},Bi.apply(e,arguments)}function s8(){var e=IO(Zv());return e.copy=function(){return zo(e,s8()).constant(e.constant())},Bi.apply(e,arguments)}function XO(){var e=BO(Zv());return e.copy=function(){return zo(e,XO()).exponent(e.exponent())},Bi.apply(e,arguments)}function Vfe(){return XO.apply(null,arguments).exponent(.5)}const vk=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:gf,scaleDiverging:i8,scaleDivergingLog:o8,scaleDivergingPow:XO,scaleDivergingSqrt:Vfe,scaleDivergingSymlog:s8,scaleIdentity:I6,scaleImplicit:YS,scaleLinear:pm,scaleLog:U6,scaleOrdinal:NO,scalePoint:Qu,scalePow:UO,scaleQuantile:F6,scaleQuantize:V6,scaleRadial:H6,scaleSequential:t8,scaleSequentialLog:n8,scaleSequentialPow:KO,scaleSequentialQuantile:a8,scaleSequentialSqrt:Ffe,scaleSequentialSymlog:r8,scaleSqrt:Oue,scaleSymlog:q6,scaleThreshold:G6,scaleTime:qfe,scaleUtc:Hfe,tickFormat:L6},Symbol.toStringTag,{value:"Module"}));var i1,gk;function l8(){if(gk)return i1;gk=1;var e=jc();function t(n,r,a){for(var o=-1,l=n.length;++o<l;){var c=n[o],f=r(c);if(f!=null&&(d===void 0?f===f&&!e(f):a(f,d)))var d=f,m=c}return m}return i1=t,i1}var o1,yk;function Gfe(){if(yk)return o1;yk=1;function e(t,n){return t>n}return o1=e,o1}var s1,bk;function Wfe(){if(bk)return s1;bk=1;var e=l8(),t=Gfe(),n=Nc();function r(a){return a&&a.length?e(a,n,t):void 0}return s1=r,s1}var Yfe=Wfe();const bo=Ut(Yfe);var l1,xk;function Zfe(){if(xk)return l1;xk=1;function e(t,n){return t<n}return l1=e,l1}var c1,wk;function Kfe(){if(wk)return c1;wk=1;var e=l8(),t=Zfe(),n=Nc();function r(a){return a&&a.length?e(a,n,t):void 0}return c1=r,c1}var Xfe=Kfe();const Kv=Ut(Xfe);var u1,Sk;function Qfe(){if(Sk)return u1;Sk=1;var e=hO(),t=ko(),n=g6(),r=vr();function a(o,l){var c=r(o)?e:n;return c(o,t(l,3))}return u1=a,u1}var f1,_k;function Jfe(){if(_k)return f1;_k=1;var e=m6(),t=Qfe();function n(r,a){return e(t(r,a),1)}return f1=n,f1}var ede=Jfe();const tde=Ut(ede);var d1,Ak;function nde(){if(Ak)return d1;Ak=1;var e=EO();function t(n,r){return e(n,r)}return d1=t,d1}var rde=nde();const Sf=Ut(rde);var Dc=1e9,ade={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},JO,Jt=!0,aa="[DecimalError] ",vs=aa+"Invalid argument: ",QO=aa+"Exponent out of range: ",kc=Math.floor,ls=Math.pow,ide=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Nr,Pn=1e7,Xt=7,c8=9007199254740991,ym=kc(c8/Xt),Le={};Le.absoluteValue=Le.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Le.comparedTo=Le.cmp=function(e){var t,n,r,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===a?0:r>a^o.s<0?1:-1};Le.decimalPlaces=Le.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Xt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Le.dividedBy=Le.div=function(e){return Ti(this,new this.constructor(e))};Le.dividedToIntegerBy=Le.idiv=function(e){var t=this,n=t.constructor;return Vt(Ti(t,new n(e),0,1),n.precision)};Le.equals=Le.eq=function(e){return!this.cmp(e)};Le.exponent=function(){return wn(this)};Le.greaterThan=Le.gt=function(e){return this.cmp(e)>0};Le.greaterThanOrEqualTo=Le.gte=function(e){return this.cmp(e)>=0};Le.isInteger=Le.isint=function(){return this.e>this.d.length-2};Le.isNegative=Le.isneg=function(){return this.s<0};Le.isPositive=Le.ispos=function(){return this.s>0};Le.isZero=function(){return this.s===0};Le.lessThan=Le.lt=function(e){return this.cmp(e)<0};Le.lessThanOrEqualTo=Le.lte=function(e){return this.cmp(e)<1};Le.logarithm=Le.log=function(e){var t,n=this,r=n.constructor,a=r.precision,o=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Nr))throw Error(aa+"NaN");if(n.s<1)throw Error(aa+(n.s?"NaN":"-Infinity"));return n.eq(Nr)?new r(0):(Jt=!1,t=Ti(_f(n,o),_f(e,o),o),Jt=!0,Vt(t,a))};Le.minus=Le.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?d8(t,e):u8(t,(e.s=-e.s,e))};Le.modulo=Le.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(aa+"NaN");return n.s?(Jt=!1,t=Ti(n,e,0,1).times(e),Jt=!0,n.minus(t)):Vt(new r(n),a)};Le.naturalExponential=Le.exp=function(){return f8(this)};Le.naturalLogarithm=Le.ln=function(){return _f(this)};Le.negated=Le.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Le.plus=Le.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?u8(t,e):d8(t,(e.s=-e.s,e))};Le.precision=Le.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(vs+e);if(t=wn(a)+1,r=a.d.length-1,n=r*Xt+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};Le.squareRoot=Le.sqrt=function(){var e,t,n,r,a,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(aa+"NaN")}for(e=wn(c),Jt=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=Ua(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=kc((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=l=n+3;;)if(o=r,r=o.plus(Ti(c,o,l+2)).times(.5),Ua(o.d).slice(0,l)===(t=Ua(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Vt(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return Jt=!0,Vt(r,n)};Le.times=Le.mul=function(e){var t,n,r,a,o,l,c,f,d,m=this,h=m.constructor,g=m.d,x=(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=g.length,d=x.length,f<d&&(o=g,g=x,x=o,l=f,f=d,d=l),o=[],l=f+d,r=l;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,a=f+r;a>r;)c=o[a]+x[r]*g[a-r-1]+t,o[a--]=c%Pn|0,t=c/Pn|0;o[a]=(o[a]+t)%Pn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Jt?Vt(e,h.precision):e};Le.toDecimalPlaces=Le.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Za(e,0,Dc),t===void 0?t=r.rounding:Za(t,0,8),Vt(n,e+wn(n)+1,t))};Le.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=js(r,!0):(Za(e,0,Dc),t===void 0?t=a.rounding:Za(t,0,8),r=Vt(new a(r),e+1,t),n=js(r,!0,e+1)),n};Le.toFixed=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?js(a):(Za(e,0,Dc),t===void 0?t=o.rounding:Za(t,0,8),r=Vt(new o(a),e+wn(a)+1,t),n=js(r.abs(),!1,e+wn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Le.toInteger=Le.toint=function(){var e=this,t=e.constructor;return Vt(new t(e),wn(e)+1,t.rounding)};Le.toNumber=function(){return+this};Le.toPower=Le.pow=function(e){var t,n,r,a,o,l,c=this,f=c.constructor,d=12,m=+(e=new f(e));if(!e.s)return new f(Nr);if(c=new f(c),!c.s){if(e.s<1)throw Error(aa+"Infinity");return c}if(c.eq(Nr))return c;if(r=f.precision,e.eq(Nr))return Vt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=m<0?-m:m)<=c8){for(a=new f(Nr),t=Math.ceil(r/Xt+4),Jt=!1;n%2&&(a=a.times(c),Ek(a.d,t)),n=kc(n/2),n!==0;)c=c.times(c),Ek(c.d,t);return Jt=!0,e.s<0?new f(Nr).div(a):Vt(a,r)}}else if(o<0)throw Error(aa+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,Jt=!1,a=e.times(_f(c,r+d)),Jt=!0,a=f8(a),a.s=o,a};Le.toPrecision=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?(n=wn(a),r=js(a,n<=o.toExpNeg||n>=o.toExpPos)):(Za(e,1,Dc),t===void 0?t=o.rounding:Za(t,0,8),a=Vt(new o(a),e,t),n=wn(a),r=js(a,e<=n||n<=o.toExpNeg,e)),r};Le.toSignificantDigits=Le.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Za(e,1,Dc),t===void 0?t=r.rounding:Za(t,0,8)),Vt(new r(n),e,t)};Le.toString=Le.valueOf=Le.val=Le.toJSON=Le[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=wn(e),n=e.constructor;return js(e,t<=n.toExpNeg||t>=n.toExpPos)};function u8(e,t){var n,r,a,o,l,c,f,d,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Jt?Vt(t,h):t;if(f=e.d,d=t.d,l=e.e,a=t.e,f=f.slice(),o=l-a,o){for(o<0?(r=f,o=-o,c=d.length):(r=d,a=l,c=f.length),l=Math.ceil(h/Xt),c=l>c?l+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,r=d,d=f,f=r),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Pn|0,f[o]%=Pn;for(n&&(f.unshift(n),++a),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=a,Jt?Vt(t,h):t}function Za(e,t,n){if(e!==~~e||e<t||e>n)throw Error(vs+e)}function Ua(e){var t,n,r,a=e.length-1,o="",l=e[0];if(a>0){for(o+=l,t=1;t<a;t++)r=e[t]+"",n=Xt-r.length,n&&(o+=go(n)),o+=r;l=e[t],r=l+"",n=Xt-r.length,n&&(o+=go(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ti=(function(){function e(r,a){var o,l=0,c=r.length;for(r=r.slice();c--;)o=r[c]*a+l,r[c]=o%Pn|0,l=o/Pn|0;return l&&r.unshift(l),r}function t(r,a,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(r[c]!=a[c]){f=r[c]>a[c]?1:-1;break}return f}function n(r,a,o){for(var l=0;o--;)r[o]-=l,l=r[o]<a[o]?1:0,r[o]=l*Pn+r[o]-a[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,o,l){var c,f,d,m,h,g,x,A,S,w,O,E,T,C,j,R,N,D,z=r.constructor,V=r.s==a.s?1:-1,U=r.d,P=a.d;if(!r.s)return new z(r);if(!a.s)throw Error(aa+"Division by zero");for(f=r.e-a.e,N=P.length,j=U.length,x=new z(V),A=x.d=[],d=0;P[d]==(U[d]||0);)++d;if(P[d]>(U[d]||0)&&--f,o==null?E=o=z.precision:l?E=o+(wn(r)-wn(a))+1:E=o,E<0)return new z(0);if(E=E/Xt+2|0,d=0,N==1)for(m=0,P=P[0],E++;(d<j||m)&&E--;d++)T=m*Pn+(U[d]||0),A[d]=T/P|0,m=T%P|0;else{for(m=Pn/(P[0]+1)|0,m>1&&(P=e(P,m),U=e(U,m),N=P.length,j=U.length),C=N,S=U.slice(0,N),w=S.length;w<N;)S[w++]=0;D=P.slice(),D.unshift(0),R=P[0],P[1]>=Pn/2&&++R;do m=0,c=t(P,S,N,w),c<0?(O=S[0],N!=w&&(O=O*Pn+(S[1]||0)),m=O/R|0,m>1?(m>=Pn&&(m=Pn-1),h=e(P,m),g=h.length,w=S.length,c=t(h,S,g,w),c==1&&(m--,n(h,N<g?D:P,g))):(m==0&&(c=m=1),h=P.slice()),g=h.length,g<w&&h.unshift(0),n(S,h,w),c==-1&&(w=S.length,c=t(P,S,N,w),c<1&&(m++,n(S,N<w?D:P,w))),w=S.length):c===0&&(m++,S=[0]),A[d++]=m,c&&S[0]?S[w++]=U[C]||0:(S=[U[C]],w=1);while((C++<j||S[0]!==void 0)&&E--)}return A[0]||A.shift(),x.e=f,Vt(x,l?o+wn(x)+1:o)}})();function f8(e,t){var n,r,a,o,l,c,f=0,d=0,m=e.constructor,h=m.precision;if(wn(e)>16)throw Error(QO+wn(e));if(!e.s)return new m(Nr);for(Jt=!1,c=h,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(ls(2,d))/Math.LN10*2+5|0,c+=r,n=a=o=new m(Nr),m.precision=c;;){if(a=Vt(a.times(e),c),n=n.times(++f),l=o.plus(Ti(a,n,c)),Ua(l.d).slice(0,c)===Ua(o.d).slice(0,c)){for(;d--;)o=Vt(o.times(o),c);return m.precision=h,t==null?(Jt=!0,Vt(o,h)):o}o=l}}function wn(e){for(var t=e.e*Xt,n=e.d[0];n>=10;n/=10)t++;return t}function h1(e,t,n){if(t>e.LN10.sd())throw Jt=!0,n&&(e.precision=n),Error(aa+"LN10 precision limit exceeded");return Vt(new e(e.LN10),t)}function go(e){for(var t="";e--;)t+="0";return t}function _f(e,t){var n,r,a,o,l,c,f,d,m,h=1,g=10,x=e,A=x.d,S=x.constructor,w=S.precision;if(x.s<1)throw Error(aa+(x.s?"NaN":"-Infinity"));if(x.eq(Nr))return new S(0);if(t==null?(Jt=!1,d=w):d=t,x.eq(10))return t==null&&(Jt=!0),h1(S,d);if(d+=g,S.precision=d,n=Ua(A),r=n.charAt(0),o=wn(x),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=Ua(x.d),r=n.charAt(0),h++;o=wn(x),r>1?(x=new S("0."+n),o++):x=new S(r+"."+n.slice(1))}else return f=h1(S,d+2,w).times(o+""),x=_f(new S(r+"."+n.slice(1)),d-g).plus(f),S.precision=w,t==null?(Jt=!0,Vt(x,w)):x;for(c=l=x=Ti(x.minus(Nr),x.plus(Nr),d),m=Vt(x.times(x),d),a=3;;){if(l=Vt(l.times(m),d),f=c.plus(Ti(l,new S(a),d)),Ua(f.d).slice(0,d)===Ua(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(h1(S,d+2,w).times(o+""))),c=Ti(c,new S(h),d),S.precision=w,t==null?(Jt=!0,Vt(c,w)):c;c=f,a+=2}}function Ok(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=kc(n/Xt),e.d=[],r=(n+1)%Xt,n<0&&(r+=Xt),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Xt;r<a;)e.d.push(+t.slice(r,r+=Xt));t=t.slice(r),r=Xt-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Jt&&(e.e>ym||e.e<-ym))throw Error(QO+n)}else e.s=0,e.e=0,e.d=[0];return e}function Vt(e,t,n){var r,a,o,l,c,f,d,m,h=e.d;for(l=1,o=h[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=Xt,a=t,d=h[m=0];else{if(m=Math.ceil((r+1)/Xt),o=h.length,m>=o)return e;for(d=o=h[m],l=1;o>=10;o/=10)l++;r%=Xt,a=r-Xt+l}if(n!==void 0&&(o=ls(10,l-a-1),c=d/o%10|0,f=t<0||h[m+1]!==void 0||d%o,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?d/ls(10,l-a):0:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return f?(o=wn(e),h.length=1,t=t-o-1,h[0]=ls(10,(Xt-t%Xt)%Xt),e.e=kc(-t/Xt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,o=1,m--):(h.length=m+1,o=ls(10,Xt-r),h[m]=a>0?(d/ls(10,l-a)%ls(10,a)|0)*o:0),f)for(;;)if(m==0){(h[0]+=o)==Pn&&(h[0]=1,++e.e);break}else{if(h[m]+=o,h[m]!=Pn)break;h[m--]=0,o=1}for(r=h.length;h[--r]===0;)h.pop();if(Jt&&(e.e>ym||e.e<-ym))throw Error(QO+wn(e));return e}function d8(e,t){var n,r,a,o,l,c,f,d,m,h,g=e.constructor,x=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Jt?Vt(t,x):t;if(f=e.d,h=t.d,r=t.e,d=e.e,f=f.slice(),l=d-r,l){for(m=l<0,m?(n=f,l=-l,c=h.length):(n=h,r=d,c=f.length),a=Math.max(Math.ceil(x/Xt),c)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;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}l=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>l;){if(f[--a]<h[a]){for(o=a;o&&f[--o]===0;)f[o]=Pn-1;--f[o],f[a]+=Pn}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,Jt?Vt(t,x):t):new g(0)}function js(e,t,n){var r,a=wn(e),o=Ua(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+go(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+go(-a-1)+o,n&&(r=n-l)>0&&(o+=go(r))):a>=l?(o+=go(a+1-l),n&&(r=n-a-1)>0&&(o=o+"."+go(r))):((r=a+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(o+="."),o+=go(r))),e.s<0?"-"+o:o}function Ek(e,t){if(e.length>t)return e.length=t,!0}function h8(e){var t,n,r;function a(o){var l=this;if(!(l instanceof a))return new a(o);if(l.constructor=a,o instanceof a){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(vs+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return Ok(l,o.toString())}else if(typeof o!="string")throw Error(vs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,ide.test(o))Ok(l,o);else throw Error(vs+o)}if(a.prototype=Le,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=h8,a.config=a.set=ode,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 ode(e){if(!e||typeof e!="object")throw Error(aa+"Object expected");var t,n,r,a=["precision",1,Dc,"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(kc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(vs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(vs+n+": "+r);return this}var JO=h8(ade);Nr=new JO(1);const It=JO;function sde(e){return fde(e)||ude(e)||cde(e)||lde()}function lde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
446
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cde(e,t){if(e){if(typeof e=="string")return QS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QS(e,t)}}function ude(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function fde(e){if(Array.isArray(e))return QS(e)}function QS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dde=function(t){return t},p8={},m8=function(t){return t===p8},Tk=function(t){return function n(){return arguments.length===0||arguments.length===1&&m8(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},hde=function e(t,n){return t===1?n:Tk(function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var l=a.filter(function(c){return c!==p8}).length;return l>=t?n.apply(void 0,a):e(t-l,Tk(function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var m=a.map(function(h){return m8(h)?f.shift():h});return n.apply(void 0,sde(m).concat(f))}))})},Xv=function(t){return hde(t.length,t)},JS=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},pde=Xv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),mde=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return dde;var a=n.reverse(),o=a[0],l=a.slice(1);return function(){return l.reduce(function(c,f){return f(c)},o.apply(void 0,arguments))}},e_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},v8=function(t){var n=null,r=null;return function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return n&&o.every(function(c,f){return c===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function vde(e){var t;return e===0?t=1:t=Math.floor(new It(e).abs().log(10).toNumber())+1,t}function gde(e,t,n){for(var r=new It(e),a=0,o=[];r.lt(t)&&a<1e5;)o.push(r.toNumber()),r=r.add(n),a++;return o}var yde=Xv(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),bde=Xv(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),xde=Xv(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Qv={rangeStep:gde,getDigitCount:vde,interpolateNumber:yde,uninterpolateNumber:bde,uninterpolateTruncation:xde};function t_(e){return _de(e)||Sde(e)||g8(e)||wde()}function wde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
447
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function _de(e){if(Array.isArray(e))return n_(e)}function Af(e,t){return Ede(e)||Ode(e,t)||g8(e,t)||Ade()}function Ade(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
448
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g8(e,t){if(e){if(typeof e=="string")return n_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return n_(e,t)}}function n_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ode(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator](),c;!(r=(c=l.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(f){a=!0,o=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function Ede(e){if(Array.isArray(e))return e}function y8(e){var t=Af(e,2),n=t[0],r=t[1],a=n,o=r;return n>r&&(a=r,o=n),[a,o]}function b8(e,t,n){if(e.lte(0))return new It(0);var r=Qv.getDigitCount(e.toNumber()),a=new It(10).pow(r),o=e.div(a),l=r!==1?.05:.1,c=new It(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(a);return t?f:new It(Math.ceil(f))}function Tde(e,t,n){var r=1,a=new It(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(r=new It(10).pow(Qv.getDigitCount(e)-1),a=new It(Math.floor(a.div(r).toNumber())).mul(r)):o>1&&(a=new It(Math.floor(e)))}else e===0?a=new It(Math.floor((t-1)/2)):n||(a=new It(Math.floor(e)));var l=Math.floor((t-1)/2),c=mde(pde(function(f){return a.add(new It(f-l).mul(r)).toNumber()}),JS);return c(0,t)}function x8(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new It(0),tickMin:new It(0),tickMax:new It(0)};var o=b8(new It(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new It(0):(l=new It(e).add(t).div(2),l=l.sub(new It(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new It(t).sub(l).div(o).toNumber()),d=c+f+1;return d>n?x8(e,t,n,r,a+1):(d<n&&(f=t>0?f+(n-d):f,c=t>0?c:c+(n-d)),{step:o,tickMin:l.sub(new It(c).mul(o)),tickMax:l.add(new It(f).mul(o))})}function jde(e){var t=Af(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),c=y8([n,r]),f=Af(c,2),d=f[0],m=f[1];if(d===-1/0||m===1/0){var h=m===1/0?[d].concat(t_(JS(0,a-1).map(function(){return 1/0}))):[].concat(t_(JS(0,a-1).map(function(){return-1/0})),[m]);return n>r?e_(h):h}if(d===m)return Tde(d,a,o);var g=x8(d,m,l,o),x=g.step,A=g.tickMin,S=g.tickMax,w=Qv.rangeStep(A,S.add(new It(.1).mul(x)),x);return n>r?e_(w):w}function Cde(e,t){var n=Af(e,2),r=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=y8([r,a]),c=Af(l,2),f=c[0],d=c[1];if(f===-1/0||d===1/0)return[r,a];if(f===d)return[f];var m=Math.max(t,2),h=b8(new It(d).sub(f).div(m-1),o,0),g=[].concat(t_(Qv.rangeStep(new It(f),new It(d).sub(new It(.99).mul(h)),h)),[d]);return r>a?e_(g):g}var Rde=v8(jde),Nde=v8(Cde),Mde="Invariant failed";function Cs(e,t){throw new Error(Mde)}var Pde=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bm.apply(this,arguments)}function Dde(e,t){return Lde(e)||zde(e,t)||$de(e,t)||kde()}function kde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
449
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $de(e,t){if(e){if(typeof e=="string")return jk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jk(e,t)}}function jk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Lde(e){if(Array.isArray(e))return e}function Ide(e,t){if(e==null)return{};var n=Bde(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ude(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_8(r.key),r)}}function Hde(e,t,n){return t&&qde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fde(e,t,n){return t=xm(t),Vde(e,w8()?Reflect.construct(t,n||[],xm(e).constructor):t.apply(e,n))}function Vde(e,t){if(t&&(ac(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gde(e)}function Gde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w8=function(){return!!e})()}function xm(e){return xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xm(e)}function Wde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r_(e,t)}function r_(e,t){return r_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},r_(e,t)}function S8(e,t,n){return t=_8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _8(e){var t=Yde(e,"string");return ac(t)=="symbol"?t:t+""}function Yde(e,t){if(ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Jv=(function(e){function t(){return Ude(this,t),Fde(this,t,arguments)}return Wde(t,e),Hde(t,[{key:"render",value:function(){var r=this.props,a=r.offset,o=r.layout,l=r.width,c=r.dataKey,f=r.data,d=r.dataPointFormatter,m=r.xAxis,h=r.yAxis,g=Ide(r,Pde),x=ht(g,!1);this.props.direction==="x"&&m.type!=="number"&&Cs();var A=f.map(function(S){var w=d(S,c),O=w.x,E=w.y,T=w.value,C=w.errorVal;if(!C)return null;var j=[],R,N;if(Array.isArray(C)){var D=Dde(C,2);R=D[0],N=D[1]}else R=N=C;if(o==="vertical"){var z=m.scale,V=E+a,U=V+l,P=V-l,B=z(T-R),q=z(T+N);j.push({x1:q,y1:U,x2:q,y2:P}),j.push({x1:B,y1:V,x2:q,y2:V}),j.push({x1:B,y1:U,x2:B,y2:P})}else if(o==="horizontal"){var G=h.scale,$=O+a,F=$-l,Z=$+l,X=G(T-R),oe=G(T+N);j.push({x1:F,y1:oe,x2:Z,y2:oe}),j.push({x1:$,y1:X,x2:$,y2:oe}),j.push({x1:F,y1:X,x2:Z,y2:X})}return L.createElement(nn,bm({className:"recharts-errorBar",key:"bar-".concat(j.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},x),j.map(function(I){return L.createElement("line",bm({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return L.createElement(nn,{className:"recharts-errorBars"},A)}}])})(L.Component);S8(Jv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});S8(Jv,"displayName","ErrorBar");function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}function Ck(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 os(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(r){Zde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zde(e,t,n){return t=Kde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kde(e){var t=Xde(e,"string");return Of(t)=="symbol"?t:t+""}function Xde(e,t){if(Of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A8=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,o=t.legendContent,l=Tr(n,Ul);if(!l)return null;var c=Ul.defaultProps,f=c!==void 0?os(os({},c),l.props):{},d;return l.props&&l.props.payload?d=l.props&&l.props.payload:o==="children"?d=(r||[]).reduce(function(m,h){var g=h.item,x=h.props,A=x.sectors||x.data||[];return m.concat(A.map(function(S){return{type:l.props.iconType||g.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):d=(r||[]).map(function(m){var h=m.item,g=h.type.defaultProps,x=g!==void 0?os(os({},g),h.props):{},A=x.dataKey,S=x.name,w=x.legendType,O=x.hide;return{inactive:O,dataKey:A,type:f.iconType||w||"square",color:eE(h),value:S||A,payload:x}}),os(os(os({},f),Ul.getWithHeight(l,a)),{},{payload:d,item:l})};function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function Rk(e){return the(e)||ehe(e)||Jde(e)||Qde()}function Qde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
450
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jde(e,t){if(e){if(typeof e=="string")return a_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a_(e,t)}}function ehe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function the(e){if(Array.isArray(e))return a_(e)}function a_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nk(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 ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nk(Object(n),!0).forEach(function(r){Hl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hl(e,t,n){return t=nhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nhe(e){var t=rhe(e,"string");return Ef(t)=="symbol"?t:t+""}function rhe(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pr(e,t,n){return vt(e)||vt(t)?n:Cn(t)?na(e,t,n):ot(t)?t(e):n}function Ju(e,t,n,r){var a=tde(e,function(c){return Pr(c,t)});if(n==="number"){var o=a.filter(function(c){return Ne(c)||parseFloat(c)});return o.length?[Kv(o),bo(o)]:[1/0,-1/0]}var l=r?a.filter(function(c){return!vt(c)}):a;return l.map(function(c){return Cn(c)||c instanceof Date?c:""})}var ahe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,d=0;d<c;d++){var m=d>0?a[d-1].coordinate:a[c-1].coordinate,h=a[d].coordinate,g=d>=c-1?a[0].coordinate:a[d+1].coordinate,x=void 0;if(ba(h-m)!==ba(g-h)){var A=[];if(ba(g-h)===ba(f[1]-f[0])){x=g;var S=h+f[1]-f[0];A[0]=Math.min(S,(S+m)/2),A[1]=Math.max(S,(S+m)/2)}else{x=m;var w=g+f[1]-f[0];A[0]=Math.min(h,(w+h)/2),A[1]=Math.max(h,(w+h)/2)}var O=[Math.min(h,(x+h)/2),Math.max(h,(x+h)/2)];if(t>O[0]&&t<=O[1]||t>=A[0]&&t<=A[1]){l=a[d].index;break}}else{var E=Math.min(m,g),T=Math.max(m,g);if(t>(E+h)/2&&t<=(T+h)/2){l=a[d].index;break}}}else for(var C=0;C<c;C++)if(C===0&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C>0&&C<c-1&&t>(r[C].coordinate+r[C-1].coordinate)/2&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C===c-1&&t>(r[C].coordinate+r[C-1].coordinate)/2){l=r[C].index;break}return l},eE=function(t){var n,r=t,a=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ln(ln({},t.type.defaultProps),t.props):t.props,l=o.stroke,c=o.fill,f;switch(a){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:c;break;default:f=c;break}return f},ihe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var l={},c=Object.keys(o),f=0,d=c.length;f<d;f++)for(var m=o[c[f]].stackGroups,h=Object.keys(m),g=0,x=h.length;g<x;g++){var A=m[h[g]],S=A.items,w=A.cateAxisId,O=S.filter(function(N){return Oi(N.type).indexOf("Bar")>=0});if(O&&O.length){var E=O[0].type.defaultProps,T=E!==void 0?ln(ln({},E),O[0].props):O[0].props,C=T.barSize,j=T[w];l[j]||(l[j]=[]);var R=vt(C)?n:C;l[j].push({item:O[0],stackList:O.slice(1),barSize:vt(R)?void 0:Ts(R,r,0)})}}return l},ohe=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,c=t.maxBarSize,f=l.length;if(f<1)return null;var d=Ts(n,a,0,!0),m,h=[];if(l[0].barSize===+l[0].barSize){var g=!1,x=a/f,A=l.reduce(function(C,j){return C+j.barSize||0},0);A+=(f-1)*d,A>=a&&(A-=(f-1)*d,d=0),A>=a&&x>0&&(g=!0,x*=.9,A=f*x);var S=(a-A)/2>>0,w={offset:S-d,size:0};m=l.reduce(function(C,j){var R={item:j.item,position:{offset:w.offset+w.size+d,size:g?x:j.barSize}},N=[].concat(Rk(C),[R]);return w=N[N.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(D){N.push({item:D,position:w})}),N},h)}else{var O=Ts(r,a,0,!0);a-2*O-(f-1)*d<=0&&(d=0);var E=(a-2*O-(f-1)*d)/f;E>1&&(E>>=0);var T=c===+c?Math.min(E,c):E;m=l.reduce(function(C,j,R){var N=[].concat(Rk(C),[{item:j.item,position:{offset:O+(E+d)*R+(E-T)/2,size:T}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(D){N.push({item:D,position:N[N.length-1].position})}),N},h)}return m},she=function(t,n,r,a){var o=r.children,l=r.width,c=r.margin,f=l-(c.left||0)-(c.right||0),d=A8({children:o,legendWidth:f});if(d){var m=a||{},h=m.width,g=m.height,x=d.align,A=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&A==="middle")&&x!=="center"&&Ne(t[x]))return ln(ln({},t),{},Hl({},x,t[x]+(h||0)));if((S==="horizontal"||S==="vertical"&&x==="center")&&A!=="middle"&&Ne(t[A]))return ln(ln({},t),{},Hl({},A,t[A]+(g||0)))}return t},lhe=function(t,n,r){return vt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},O8=function(t,n,r,a,o){var l=n.props.children,c=_a(l,Jv).filter(function(d){return lhe(a,o,d.props.direction)});if(c&&c.length){var f=c.map(function(d){return d.props.dataKey});return t.reduce(function(d,m){var h=Pr(m,r);if(vt(h))return d;var g=Array.isArray(h)?[Kv(h),bo(h)]:[h,h],x=f.reduce(function(A,S){var w=Pr(m,S,0),O=g[0]-Math.abs(Array.isArray(w)?w[0]:w),E=g[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(O,A[0]),Math.max(E,A[1])]},[1/0,-1/0]);return[Math.min(x[0],d[0]),Math.max(x[1],d[1])]},[1/0,-1/0])}return null},che=function(t,n,r,a,o){var l=n.map(function(c){return O8(t,c,r,o,a)}).filter(function(c){return!vt(c)});return l&&l.length?l.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]):null},E8=function(t,n,r,a,o){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&O8(t,f,d,a)||Ju(t,d,r,o)});if(r==="number")return l.reduce(function(f,d){return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);var c={};return l.reduce(function(f,d){for(var m=0,h=d.length;m<h;m++)c[d[m]]||(c[d[m]]=!0,f.push(d[m]));return f},[])},T8=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},j8=function(t,n,r,a){if(a)return t.map(function(f){return f.coordinate});var o,l,c=t.map(function(f){return f.coordinate===n&&(o=!0),f.coordinate===r&&(l=!0),f.coordinate});return o||c.push(n),l||c.push(r),c},Ai=function(t,n,r){if(!t)return null;var a=t.scale,o=t.duplicateDomain,l=t.type,c=t.range,f=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,d=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/f:0;if(d=t.axisType==="angleAxis"&&(c==null?void 0:c.length)>=2?ba(c[0]-c[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(h){var g=o?o.indexOf(h):h;return{coordinate:a(g)+d,value:h,offset:d}});return m.filter(function(h){return!Rc(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,g){return{coordinate:a(h)+d,value:h,index:g,offset:d}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(h){return{coordinate:a(h)+d,value:h,offset:d}}):a.domain().map(function(h,g){return{coordinate:a(h)+d,value:o?o[h]:h,index:g,offset:d}})},p1=new WeakMap,ip=function(t,n){if(typeof n!="function")return t;p1.has(t)||p1.set(t,new WeakMap);var r=p1.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},uhe=function(t,n,r){var a=t.scale,o=t.type,l=t.layout,c=t.axisType;if(a==="auto")return l==="radial"&&c==="radiusAxis"?{scale:gf(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:pm(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Qu(),realScaleType:"point"}:o==="category"?{scale:gf(),realScaleType:"band"}:{scale:pm(),realScaleType:"linear"};if(Es(a)){var f="scale".concat(zv(a));return{scale:(vk[f]||Qu)(),realScaleType:vk[f]?f:"point"}}return ot(a)?{scale:a}:{scale:Qu(),realScaleType:"point"}},Mk=1e-4,fhe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),o=Math.min(a[0],a[1])-Mk,l=Math.max(a[0],a[1])+Mk,c=t(n[0]),f=t(n[r-1]);(c<o||c>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},dhe=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},hhe=function(t,n){if(!n||n.length!==2||!Ne(n[0])||!Ne(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!Ne(t[0])||t[0]<r)&&(o[0]=r),(!Ne(t[1])||t[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<r&&(o[1]=r),o},phe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0,c=0;c<n;++c){var f=Rc(t[c][r][1])?t[c][r][0]:t[c][r][1];f>=0?(t[c][r][0]=o,t[c][r][1]=o+f,o=t[c][r][1]):(t[c][r][0]=l,t[c][r][1]=l+f,l=t[c][r][1])}},mhe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0;l<n;++l){var c=Rc(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},vhe={sign:phe,expand:Qie,none:Kl,silhouette:Jie,wiggle:eoe,positive:mhe},ghe=function(t,n,r){var a=n.map(function(c){return c.props.dataKey}),o=vhe[r],l=Xie().keys(a).value(function(c,f){return+Pr(c,f,0)}).order(DS).offset(o);return l(t)},yhe=function(t,n,r,a,o,l){if(!t)return null;var c=l?n.reverse():n,f={},d=c.reduce(function(h,g){var x,A=(x=g.type)!==null&&x!==void 0&&x.defaultProps?ln(ln({},g.type.defaultProps),g.props):g.props,S=A.stackId,w=A.hide;if(w)return h;var O=A[r],E=h[O]||{hasStack:!1,stackGroups:{}};if(Cn(S)){var T=E.stackGroups[S]||{numericAxisId:r,cateAxisId:a,items:[]};T.items.push(g),E.hasStack=!0,E.stackGroups[S]=T}else E.stackGroups[xd("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[g]};return ln(ln({},h),{},Hl({},O,E))},f),m={};return Object.keys(d).reduce(function(h,g){var x=d[g];if(x.hasStack){var A={};x.stackGroups=Object.keys(x.stackGroups).reduce(function(S,w){var O=x.stackGroups[w];return ln(ln({},S),{},Hl({},w,{numericAxisId:r,cateAxisId:a,items:O.items,stackedData:ghe(t,O.items,o)}))},A)}return ln(ln({},h),{},Hl({},g,x))},m)},bhe=function(t,n){var r=n.realScaleType,a=n.type,o=n.tickCount,l=n.originalDomain,c=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var d=t.domain();if(!d.length)return null;var m=Rde(d,o,c);return t.domain([Kv(m),bo(m)]),{niceTicks:m}}if(o&&a==="number"){var h=t.domain(),g=Nde(h,o,c);return{niceTicks:g}}return null};function Pk(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!vt(a[t.dataKey])){var c=Wp(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=Pr(a,vt(l)?t.dataKey:l);return vt(f)?null:t.scale(f)}var Dk=function(t){var n=t.axis,r=t.ticks,a=t.offset,o=t.bandSize,l=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+a:null;var f=Pr(l,n.dataKey,n.domain[c]);return vt(f)?null:n.scale(f)-o/2+a},xhe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return a<=0&&o>=0?0:o<0?o:a}return r[0]},whe=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ln(ln({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(Cn(o)){var l=n[o];if(l){var c=l.items.indexOf(t);return c>=0?l.stackedData[c]:null}}return null},She=function(t){return t.reduce(function(n,r){return[Kv(r.concat([n[0]]).filter(Ne)),bo(r.concat([n[1]]).filter(Ne))]},[1/0,-1/0])},C8=function(t,n,r){return Object.keys(t).reduce(function(a,o){var l=t[o],c=l.stackedData,f=c.reduce(function(d,m){var h=She(m.slice(n,r+1));return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);return[Math.min(f[0],a[0]),Math.max(f[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},kk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$k=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,i_=function(t,n,r){if(ot(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Ne(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(kk.test(t[0])){var o=+kk.exec(t[0])[1];a[0]=n[0]-o}else ot(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Ne(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if($k.test(t[1])){var l=+$k.exec(t[1])[1];a[1]=n[1]+l}else ot(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},wm=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var o=jO(n,function(h){return h.coordinate}),l=1/0,c=1,f=o.length;c<f;c++){var d=o[c],m=o[c-1];l=Math.min((d.coordinate||0)-(m.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},zk=function(t,n,r){return!t||!t.length||Sf(t,na(r,"type.defaultProps.domain"))?n:t},R8=function(t,n){var r=t.type.defaultProps?ln(ln({},t.type.defaultProps),t.props):t.props,a=r.dataKey,o=r.name,l=r.unit,c=r.formatter,f=r.tooltipType,d=r.chartType,m=r.hide;return ln(ln({},ht(t,!1)),{},{dataKey:a,unit:l,formatter:c,name:o||a,color:eE(t),value:Pr(n,a),type:f,payload:n,chartType:d,hide:m})};function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(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 Ik(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){_he(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 _he(e,t,n){return t=Ahe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ahe(e){var t=Ohe(e,"string");return Tf(t)=="symbol"?t:t+""}function Ohe(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sm=Math.PI/180,Ehe=function(t){return t*180/Math.PI},qn=function(t,n,r,a){return{x:t+Math.cos(-Sm*a)*r,y:n+Math.sin(-Sm*a)*r}},The=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(a-l,2))},jhe=function(t,n){var r=t.x,a=t.y,o=n.cx,l=n.cy,c=The({x:r,y:a},{x:o,y:l});if(c<=0)return{radius:c};var f=(r-o)/c,d=Math.acos(f);return a>l&&(d=2*Math.PI-d),{radius:c,angle:Ehe(d),angleInRadian:d}},Che=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(a,o);return{startAngle:n-l*360,endAngle:r-l*360}},Rhe=function(t,n){var r=n.startAngle,a=n.endAngle,o=Math.floor(r/360),l=Math.floor(a/360),c=Math.min(o,l);return t+c*360},Bk=function(t,n){var r=t.x,a=t.y,o=jhe({x:r,y:a},n),l=o.radius,c=o.angle,f=n.innerRadius,d=n.outerRadius;if(l<f||l>d)return!1;if(l===0)return!0;var m=Che(n),h=m.startAngle,g=m.endAngle,x=c,A;if(h<=g){for(;x>g;)x-=360;for(;x<h;)x+=360;A=x>=h&&x<=g}else{for(;x>h;)x-=360;for(;x<g;)x+=360;A=x>=g&&x<=h}return A?Ik(Ik({},n),{},{radius:l,angle:Rhe(x,n)}):null};function jf(e){"@babel/helpers - typeof";return jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jf(e)}var Nhe=["offset"];function Mhe(e){return $he(e)||khe(e)||Dhe(e)||Phe()}function Phe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
451
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dhe(e,t){if(e){if(typeof e=="string")return o_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o_(e,t)}}function khe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $he(e){if(Array.isArray(e))return o_(e)}function o_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zhe(e,t){if(e==null)return{};var n=Lhe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lhe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}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 jn(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){Ihe(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 Ihe(e,t,n){return t=Bhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bhe(e){var t=Uhe(e,"string");return jf(t)=="symbol"?t:t+""}function Uhe(e,t){if(jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cf(){return Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cf.apply(this,arguments)}var qhe=function(t){var n=t.value,r=t.formatter,a=vt(t.children)?n:t.children;return ot(r)?r(a):a},Hhe=function(t,n){var r=ba(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Fhe=function(t,n,r){var a=t.position,o=t.viewBox,l=t.offset,c=t.className,f=o,d=f.cx,m=f.cy,h=f.innerRadius,g=f.outerRadius,x=f.startAngle,A=f.endAngle,S=f.clockWise,w=(h+g)/2,O=Hhe(x,A),E=O>=0?1:-1,T,C;a==="insideStart"?(T=x+E*l,C=S):a==="insideEnd"?(T=A-E*l,C=!S):a==="end"&&(T=A+E*l,C=S),C=O<=0?C:!C;var j=qn(d,m,w,T),R=qn(d,m,w,T+(C?1:-1)*359),N="M".concat(j.x,",").concat(j.y,`
452
- A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`,
453
- `).concat(R.x,",").concat(R.y),D=vt(t.id)?xd("recharts-radial-line-"):t.id;return L.createElement("text",Cf({},r,{dominantBaseline:"central",className:yt("recharts-radial-bar-label",c)}),L.createElement("defs",null,L.createElement("path",{id:D,d:N})),L.createElement("textPath",{xlinkHref:"#".concat(D)},n))},Vhe=function(t){var n=t.viewBox,r=t.offset,a=t.position,o=n,l=o.cx,c=o.cy,f=o.innerRadius,d=o.outerRadius,m=o.startAngle,h=o.endAngle,g=(m+h)/2;if(a==="outside"){var x=qn(l,c,d+r,g),A=x.x,S=x.y;return{x:A,y:S,textAnchor:A>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"end"};var w=(f+d)/2,O=qn(l,c,w,g),E=O.x,T=O.y;return{x:E,y:T,textAnchor:"middle",verticalAnchor:"middle"}},Ghe=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,o=t.position,l=n,c=l.x,f=l.y,d=l.width,m=l.height,h=m>=0?1:-1,g=h*a,x=h>0?"end":"start",A=h>0?"start":"end",S=d>=0?1:-1,w=S*a,O=S>0?"end":"start",E=S>0?"start":"end";if(o==="top"){var T={x:c+d/2,y:f-h*a,textAnchor:"middle",verticalAnchor:x};return jn(jn({},T),r?{height:Math.max(f-r.y,0),width:d}:{})}if(o==="bottom"){var C={x:c+d/2,y:f+m+g,textAnchor:"middle",verticalAnchor:A};return jn(jn({},C),r?{height:Math.max(r.y+r.height-(f+m),0),width:d}:{})}if(o==="left"){var j={x:c-w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"};return jn(jn({},j),r?{width:Math.max(j.x-r.x,0),height:m}:{})}if(o==="right"){var R={x:c+d+w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"};return jn(jn({},R),r?{width:Math.max(r.x+r.width-R.x,0),height:m}:{})}var N=r?{width:d,height:m}:{};return o==="insideLeft"?jn({x:c+w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"},N):o==="insideRight"?jn({x:c+d-w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"},N):o==="insideTop"?jn({x:c+d/2,y:f+g,textAnchor:"middle",verticalAnchor:A},N):o==="insideBottom"?jn({x:c+d/2,y:f+m-g,textAnchor:"middle",verticalAnchor:x},N):o==="insideTopLeft"?jn({x:c+w,y:f+g,textAnchor:E,verticalAnchor:A},N):o==="insideTopRight"?jn({x:c+d-w,y:f+g,textAnchor:O,verticalAnchor:A},N):o==="insideBottomLeft"?jn({x:c+w,y:f+m-g,textAnchor:E,verticalAnchor:x},N):o==="insideBottomRight"?jn({x:c+d-w,y:f+m-g,textAnchor:O,verticalAnchor:x},N):Cc(o)&&(Ne(o.x)||us(o.x))&&(Ne(o.y)||us(o.y))?jn({x:c+Ts(o.x,d),y:f+Ts(o.y,m),textAnchor:"end",verticalAnchor:"end"},N):jn({x:c+d/2,y:f+m/2,textAnchor:"middle",verticalAnchor:"middle"},N)},Whe=function(t){return"cx"in t&&Ne(t.cx)};function Qn(e){var t=e.offset,n=t===void 0?5:t,r=zhe(e,Nhe),a=jn({offset:n},r),o=a.viewBox,l=a.position,c=a.value,f=a.children,d=a.content,m=a.className,h=m===void 0?"":m,g=a.textBreakAll;if(!o||vt(c)&&vt(f)&&!y.isValidElement(d)&&!ot(d))return null;if(y.isValidElement(d))return y.cloneElement(d,a);var x;if(ot(d)){if(x=y.createElement(d,a),y.isValidElement(x))return x}else x=qhe(a);var A=Whe(o),S=ht(a,!0);if(A&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Fhe(a,x,S);var w=A?Vhe(a):Ghe(a);return L.createElement(om,Cf({className:yt("recharts-label",h)},S,w,{breakAll:g}),x)}Qn.displayName="Label";var N8=function(t){var n=t.cx,r=t.cy,a=t.angle,o=t.startAngle,l=t.endAngle,c=t.r,f=t.radius,d=t.innerRadius,m=t.outerRadius,h=t.x,g=t.y,x=t.top,A=t.left,S=t.width,w=t.height,O=t.clockWise,E=t.labelViewBox;if(E)return E;if(Ne(S)&&Ne(w)){if(Ne(h)&&Ne(g))return{x:h,y:g,width:S,height:w};if(Ne(x)&&Ne(A))return{x,y:A,width:S,height:w}}return Ne(h)&&Ne(g)?{x:h,y:g,width:0,height:0}:Ne(n)&&Ne(r)?{cx:n,cy:r,startAngle:o||a||0,endAngle:l||a||0,innerRadius:d||0,outerRadius:m||f||c||0,clockWise:O}:t.viewBox?t.viewBox:{}},Yhe=function(t,n){return t?t===!0?L.createElement(Qn,{key:"label-implicit",viewBox:n}):Cn(t)?L.createElement(Qn,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===Qn?y.cloneElement(t,{key:"label-implicit",viewBox:n}):L.createElement(Qn,{key:"label-implicit",content:t,viewBox:n}):ot(t)?L.createElement(Qn,{key:"label-implicit",content:t,viewBox:n}):Cc(t)?L.createElement(Qn,Cf({viewBox:n},t,{key:"label-implicit"})):null:null},Zhe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,o=N8(t),l=_a(a,Qn).map(function(f,d){return y.cloneElement(f,{viewBox:n||o,key:"label-".concat(d)})});if(!r)return l;var c=Yhe(t.label,n||o);return[c].concat(Mhe(l))};Qn.parseViewBox=N8;Qn.renderCallByParent=Zhe;var m1,qk;function Khe(){if(qk)return m1;qk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return m1=e,m1}var Xhe=Khe();const Qhe=Ut(Xhe);function Rf(e){"@babel/helpers - typeof";return Rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rf(e)}var Jhe=["valueAccessor"],epe=["data","dataKey","clockWise","id","textBreakAll"];function tpe(e){return ipe(e)||ape(e)||rpe(e)||npe()}function npe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
454
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rpe(e,t){if(e){if(typeof e=="string")return s_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s_(e,t)}}function ape(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ipe(e){if(Array.isArray(e))return s_(e)}function s_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_m.apply(this,arguments)}function Hk(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 Fk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hk(Object(n),!0).forEach(function(r){ope(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ope(e,t,n){return t=spe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function spe(e){var t=lpe(e,"string");return Rf(t)=="symbol"?t:t+""}function lpe(e,t){if(Rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vk(e,t){if(e==null)return{};var n=cpe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var upe=function(t){return Array.isArray(t.value)?Qhe(t.value):t.value};function Ao(e){var t=e.valueAccessor,n=t===void 0?upe:t,r=Vk(e,Jhe),a=r.data,o=r.dataKey,l=r.clockWise,c=r.id,f=r.textBreakAll,d=Vk(r,epe);return!a||!a.length?null:L.createElement(nn,{className:"recharts-label-list"},a.map(function(m,h){var g=vt(o)?n(m,h):Pr(m&&m.payload,o),x=vt(c)?{}:{id:"".concat(c,"-").concat(h)};return L.createElement(Qn,_m({},ht(m,!0),d,x,{parentViewBox:m.parentViewBox,value:g,textBreakAll:f,viewBox:Qn.parseViewBox(vt(l)?m:Fk(Fk({},m),{},{clockWise:l})),key:"label-".concat(h),index:h}))}))}Ao.displayName="LabelList";function fpe(e,t){return e?e===!0?L.createElement(Ao,{key:"labelList-implicit",data:t}):L.isValidElement(e)||ot(e)?L.createElement(Ao,{key:"labelList-implicit",data:t,content:e}):Cc(e)?L.createElement(Ao,_m({data:t},e,{key:"labelList-implicit"})):null:null}function dpe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=_a(r,Ao).map(function(l,c){return y.cloneElement(l,{data:t,key:"labelList-".concat(c)})});if(!n)return a;var o=fpe(e.label,t);return[o].concat(tpe(a))}Ao.renderCallByParent=dpe;function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function l_(){return l_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l_.apply(this,arguments)}function Gk(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 Wk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gk(Object(n),!0).forEach(function(r){hpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hpe(e,t,n){return t=ppe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ppe(e){var t=mpe(e,"string");return Nf(t)=="symbol"?t:t+""}function mpe(e,t){if(Nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vpe=function(t,n){var r=ba(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},op=function(t){var n=t.cx,r=t.cy,a=t.radius,o=t.angle,l=t.sign,c=t.isExternal,f=t.cornerRadius,d=t.cornerIsExternal,m=f*(c?1:-1)+a,h=Math.asin(f/m)/Sm,g=d?o:o+l*h,x=qn(n,r,m,g),A=qn(n,r,a,g),S=d?o-l*h:o,w=qn(n,r,m*Math.cos(h*Sm),S);return{center:x,circleTangency:A,lineTangency:w,theta:h}},M8=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.startAngle,c=t.endAngle,f=vpe(l,c),d=l+f,m=qn(n,r,o,l),h=qn(n,r,o,d),g="M ".concat(m.x,",").concat(m.y,`
455
- A `).concat(o,",").concat(o,`,0,
456
- `).concat(+(Math.abs(f)>180),",").concat(+(l>d),`,
457
- `).concat(h.x,",").concat(h.y,`
458
- `);if(a>0){var x=qn(n,r,a,l),A=qn(n,r,a,d);g+="L ".concat(A.x,",").concat(A.y,`
459
- A `).concat(a,",").concat(a,`,0,
460
- `).concat(+(Math.abs(f)>180),",").concat(+(l<=d),`,
461
- `).concat(x.x,",").concat(x.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},gpe=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,d=t.startAngle,m=t.endAngle,h=ba(m-d),g=op({cx:n,cy:r,radius:o,angle:d,sign:h,cornerRadius:l,cornerIsExternal:f}),x=g.circleTangency,A=g.lineTangency,S=g.theta,w=op({cx:n,cy:r,radius:o,angle:m,sign:-h,cornerRadius:l,cornerIsExternal:f}),O=w.circleTangency,E=w.lineTangency,T=w.theta,C=f?Math.abs(d-m):Math.abs(d-m)-S-T;if(C<0)return c?"M ".concat(A.x,",").concat(A.y,`
462
- a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
463
- a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
464
- `):M8({cx:n,cy:r,innerRadius:a,outerRadius:o,startAngle:d,endAngle:m});var j="M ".concat(A.x,",").concat(A.y,`
465
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(x.x,",").concat(x.y,`
466
- A`).concat(o,",").concat(o,",0,").concat(+(C>180),",").concat(+(h<0),",").concat(O.x,",").concat(O.y,`
467
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
468
- `);if(a>0){var R=op({cx:n,cy:r,radius:a,angle:d,sign:h,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),N=R.circleTangency,D=R.lineTangency,z=R.theta,V=op({cx:n,cy:r,radius:a,angle:m,sign:-h,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),U=V.circleTangency,P=V.lineTangency,B=V.theta,q=f?Math.abs(d-m):Math.abs(d-m)-z-B;if(q<0&&l===0)return"".concat(j,"L").concat(n,",").concat(r,"Z");j+="L".concat(P.x,",").concat(P.y,`
469
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(U.x,",").concat(U.y,`
470
- A`).concat(a,",").concat(a,",0,").concat(+(q>180),",").concat(+(h>0),",").concat(N.x,",").concat(N.y,`
471
- A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(D.x,",").concat(D.y,"Z")}else j+="L".concat(n,",").concat(r,"Z");return j},ype={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},P8=function(t){var n=Wk(Wk({},ype),t),r=n.cx,a=n.cy,o=n.innerRadius,l=n.outerRadius,c=n.cornerRadius,f=n.forceCornerRadius,d=n.cornerIsExternal,m=n.startAngle,h=n.endAngle,g=n.className;if(l<o||m===h)return null;var x=yt("recharts-sector",g),A=l-o,S=Ts(c,A,0,!0),w;return S>0&&Math.abs(m-h)<360?w=gpe({cx:r,cy:a,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,A/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:m,endAngle:h}):w=M8({cx:r,cy:a,innerRadius:o,outerRadius:l,startAngle:m,endAngle:h}),L.createElement("path",l_({},ht(n,!0),{className:x,d:w,role:"img"}))};function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function c_(){return c_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c_.apply(this,arguments)}function Yk(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 Zk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yk(Object(n),!0).forEach(function(r){bpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bpe(e,t,n){return t=xpe(t),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 Mf(t)=="symbol"?t:t+""}function wpe(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kk={curveBasisClosed:Bie,curveBasisOpen:Uie,curveBasis:Iie,curveBumpX:Oie,curveBumpY:Eie,curveLinearClosed:qie,curveLinear:Iv,curveMonotoneX:Hie,curveMonotoneY:Fie,curveNatural:Vie,curveStep:Gie,curveStepAfter:Yie,curveStepBefore:Wie},sp=function(t){return t.x===+t.x&&t.y===+t.y},zu=function(t){return t.x},Lu=function(t){return t.y},Spe=function(t,n){if(ot(t))return t;var r="curve".concat(zv(t));return(r==="curveMonotone"||r==="curveBump")&&n?Kk["".concat(r).concat(n==="vertical"?"Y":"X")]:Kk[r]||Iv},_pe=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,o=a===void 0?[]:a,l=t.baseLine,c=t.layout,f=t.connectNulls,d=f===void 0?!1:f,m=Spe(r,c),h=d?o.filter(function(S){return sp(S)}):o,g;if(Array.isArray(l)){var x=d?l.filter(function(S){return sp(S)}):l,A=h.map(function(S,w){return Zk(Zk({},S),{},{base:x[w]})});return c==="vertical"?g=Qh().y(Lu).x1(zu).x0(function(S){return S.base.x}):g=Qh().x(zu).y1(Lu).y0(function(S){return S.base.y}),g.defined(sp).curve(m),g(A)}return c==="vertical"&&Ne(l)?g=Qh().y(Lu).x1(zu).x0(l):Ne(l)?g=Qh().x(zu).y1(Lu).y0(l):g=LB().x(zu).y(Lu),g.defined(sp).curve(m),g(h)},ef=function(t){var n=t.className,r=t.points,a=t.path,o=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?_pe(t):a;return y.createElement("path",c_({},ht(t,!1),Yp(t),{className:yt("recharts-curve",n),d:l,ref:o}))},v1={exports:{}},g1,Xk;function Ape(){if(Xk)return g1;Xk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return g1=e,g1}var y1,Qk;function Ope(){if(Qk)return y1;Qk=1;var e=Ape();function t(){}function n(){}return n.resetWarningCache=t,y1=function(){function r(l,c,f,d,m,h){if(h!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},y1}var Jk;function Epe(){return Jk||(Jk=1,v1.exports=Ope()()),v1.exports}var Tpe=Epe();const Rt=Ut(Tpe),{getOwnPropertyNames:jpe,getOwnPropertySymbols:Cpe}=Object,{hasOwnProperty:Rpe}=Object.prototype;function b1(e,t){return function(r,a,o){return e(r,a,o)&&t(r,a,o)}}function lp(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:o}=a,l=o.get(n),c=o.get(r);if(l&&c)return l===r&&c===n;o.set(n,r),o.set(r,n);const f=e(n,r,a);return o.delete(n),o.delete(r),f}}function Npe(e){return e!=null?e[Symbol.toStringTag]:void 0}function e$(e){return jpe(e).concat(Cpe(e))}const Mpe=Object.hasOwn||((e,t)=>Rpe.call(e,t));function Ls(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Ppe="__v",Dpe="__o",kpe="_owner",{getOwnPropertyDescriptor:t$,keys:n$}=Object;function $pe(e,t){return e.byteLength===t.byteLength&&Am(new Uint8Array(e),new Uint8Array(t))}function zpe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Lpe(e,t){return e.byteLength===t.byteLength&&Am(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Ipe(e,t){return Ls(e.getTime(),t.getTime())}function Bpe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Upe(e,t){return e===t}function r$(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),o=e.entries();let l,c,f=0;for(;(l=o.next())&&!l.done;){const d=t.entries();let m=!1,h=0;for(;(c=d.next())&&!c.done;){if(a[h]){h++;continue}const g=l.value,x=c.value;if(n.equals(g[0],x[0],f,h,e,t,n)&&n.equals(g[1],x[1],g[0],x[0],e,t,n)){m=a[h]=!0;break}h++}if(!m)return!1;f++}return!0}const qpe=Ls;function Hpe(e,t,n){const r=n$(e);let a=r.length;if(n$(t).length!==a)return!1;for(;a-- >0;)if(!D8(e,t,n,r[a]))return!1;return!0}function Iu(e,t,n){const r=e$(e);let a=r.length;if(e$(t).length!==a)return!1;let o,l,c;for(;a-- >0;)if(o=r[a],!D8(e,t,n,o)||(l=t$(e,o),c=t$(t,o),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function Fpe(e,t){return Ls(e.valueOf(),t.valueOf())}function Vpe(e,t){return e.source===t.source&&e.flags===t.flags}function a$(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),o=e.values();let l,c;for(;(l=o.next())&&!l.done;){const f=t.values();let d=!1,m=0;for(;(c=f.next())&&!c.done;){if(!a[m]&&n.equals(l.value,c.value,l.value,c.value,e,t,n)){d=a[m]=!0;break}m++}if(!d)return!1}return!0}function Am(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Gpe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function D8(e,t,n,r){return(r===kpe||r===Dpe||r===Ppe)&&(e.$$typeof||t.$$typeof)?!0:Mpe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Wpe="[object ArrayBuffer]",Ype="[object Arguments]",Zpe="[object Boolean]",Kpe="[object DataView]",Xpe="[object Date]",Qpe="[object Error]",Jpe="[object Map]",eme="[object Number]",tme="[object Object]",nme="[object RegExp]",rme="[object Set]",ame="[object String]",ime={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},ome="[object URL]",sme=Object.prototype.toString;function lme({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:c,areObjectsEqual:f,arePrimitiveWrappersEqual:d,areRegExpsEqual:m,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:x,unknownTagComparators:A}){return function(w,O,E){if(w===O)return!0;if(w==null||O==null)return!1;const T=typeof w;if(T!==typeof O)return!1;if(T!=="object")return T==="number"?c(w,O,E):T==="function"?o(w,O,E):!1;const C=w.constructor;if(C!==O.constructor)return!1;if(C===Object)return f(w,O,E);if(Array.isArray(w))return t(w,O,E);if(C===Date)return r(w,O,E);if(C===RegExp)return m(w,O,E);if(C===Map)return l(w,O,E);if(C===Set)return h(w,O,E);const j=sme.call(w);if(j===Xpe)return r(w,O,E);if(j===nme)return m(w,O,E);if(j===Jpe)return l(w,O,E);if(j===rme)return h(w,O,E);if(j===tme)return typeof w.then!="function"&&typeof O.then!="function"&&f(w,O,E);if(j===ome)return x(w,O,E);if(j===Qpe)return a(w,O,E);if(j===Ype)return f(w,O,E);if(ime[j])return g(w,O,E);if(j===Wpe)return e(w,O,E);if(j===Kpe)return n(w,O,E);if(j===Zpe||j===eme||j===ame)return d(w,O,E);if(A){let R=A[j];if(!R){const N=Npe(w);N&&(R=A[N])}if(R)return R(w,O,E)}return!1}}function cme({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:$pe,areArraysEqual:n?Iu:zpe,areDataViewsEqual:Lpe,areDatesEqual:Ipe,areErrorsEqual:Bpe,areFunctionsEqual:Upe,areMapsEqual:n?b1(r$,Iu):r$,areNumbersEqual:qpe,areObjectsEqual:n?Iu:Hpe,arePrimitiveWrappersEqual:Fpe,areRegExpsEqual:Vpe,areSetsEqual:n?b1(a$,Iu):a$,areTypedArraysEqual:n?b1(Am,Iu):Am,areUrlsEqual:Gpe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=lp(r.areArraysEqual),o=lp(r.areMapsEqual),l=lp(r.areObjectsEqual),c=lp(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return r}function ume(e){return function(t,n,r,a,o,l,c){return e(t,n,c)}}function fme({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(c,f){const{cache:d=e?new WeakMap:void 0,meta:m}=n();return t(c,f,{cache:d,equals:r,meta:m,strict:a})};if(e)return function(c,f){return t(c,f,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const o={cache:void 0,equals:r,meta:void 0,strict:a};return function(c,f){return t(c,f,o)}}const dme=Lo();Lo({strict:!0});Lo({circular:!0});Lo({circular:!0,strict:!0});Lo({createInternalComparator:()=>Ls});Lo({strict:!0,createInternalComparator:()=>Ls});Lo({circular:!0,createInternalComparator:()=>Ls});Lo({circular:!0,createInternalComparator:()=>Ls,strict:!0});function Lo(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,o=cme(e),l=lme(o),c=n?n(l):ume(l);return fme({circular:t,comparator:l,createState:r,equals:c,strict:a})}function hme(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function i$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(o){n<0&&(n=o),o-n>t?(e(o),n=-1):hme(a)};requestAnimationFrame(r)}function u_(e){"@babel/helpers - typeof";return u_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u_(e)}function pme(e){return yme(e)||gme(e)||vme(e)||mme()}function mme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
472
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vme(e,t){if(e){if(typeof e=="string")return o$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o$(e,t)}}function o$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yme(e){if(Array.isArray(e))return e}function bme(){var e={},t=function(){return null},n=!1,r=function a(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,c=pme(l),f=c[0],d=c.slice(1);if(typeof f=="number"){i$(a.bind(null,d),f);return}a(f),i$(a.bind(null,d));return}u_(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function s$(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 l$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s$(Object(n),!0).forEach(function(r){k8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k8(e,t,n){return t=xme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xme(e){var t=wme(e,"string");return Pf(t)==="symbol"?t:String(t)}function wme(e,t){if(Pf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sme=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(o){return a.includes(o)})})},_me=function(t){return t},Ame=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},tf=function(t,n){return Object.keys(n).reduce(function(r,a){return l$(l$({},r),{},k8({},a,t(a,n[a])))},{})},c$=function(t,n,r){return t.map(function(a){return"".concat(Ame(a)," ").concat(n,"ms ").concat(r)}).join(",")};function Ome(e,t){return jme(e)||Tme(e,t)||$8(e,t)||Eme()}function Eme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
473
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function jme(e){if(Array.isArray(e))return e}function Cme(e){return Mme(e)||Nme(e)||$8(e)||Rme()}function Rme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
474
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8(e,t){if(e){if(typeof e=="string")return f_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f_(e,t)}}function Nme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mme(e){if(Array.isArray(e))return f_(e)}function f_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Om=1e-4,z8=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},L8=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},u$=function(t,n){return function(r){var a=z8(t,n);return L8(a,r)}},Pme=function(t,n){return function(r){var a=z8(t,n),o=[].concat(Cme(a.map(function(l,c){return l*c}).slice(1)),[0]);return L8(o,r)}},f$=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],o=n[1],l=n[2],c=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,o=0,l=1,c=1;break;case"ease":a=.25,o=.1,l=.25,c=1;break;case"ease-in":a=.42,o=0,l=1,c=1;break;case"ease-out":a=.42,o=0,l=.58,c=1;break;case"ease-in-out":a=0,o=0,l=.58,c=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var d=f[1].split(")")[0].split(",").map(function(w){return parseFloat(w)}),m=Ome(d,4);a=m[0],o=m[1],l=m[2],c=m[3]}}}var h=u$(a,l),g=u$(o,c),x=Pme(a,l),A=function(O){return O>1?1:O<0?0:O},S=function(O){for(var E=O>1?1:O,T=E,C=0;C<8;++C){var j=h(T)-E,R=x(T);if(Math.abs(j-E)<Om||R<Om)return g(T);T=A(T-j/R)}return g(T)};return S.isStepper=!1,S},Dme=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,o=a===void 0?8:a,l=t.dt,c=l===void 0?17:l,f=function(m,h,g){var x=-(m-h)*r,A=g*o,S=g+(x-A)*c/1e3,w=g*c/1e3+m;return Math.abs(w-h)<Om&&Math.abs(S)<Om?[h,0]:[w,S]};return f.isStepper=!0,f.dt=c,f},kme=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return f$(a);case"spring":return Dme();default:if(a.split("(")[0]==="cubic-bezier")return f$(a)}return typeof a=="function"?a:null};function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function d$(e){return Lme(e)||zme(e)||I8(e)||$me()}function $me(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
475
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lme(e){if(Array.isArray(e))return h_(e)}function h$(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 Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h$(Object(n),!0).forEach(function(r){d_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function d_(e,t,n){return t=Ime(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ime(e){var t=Bme(e,"string");return Df(t)==="symbol"?t:String(t)}function Bme(e,t){if(Df(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ume(e,t){return Fme(e)||Hme(e,t)||I8(e,t)||qme()}function qme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
476
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I8(e,t){if(e){if(typeof e=="string")return h_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h_(e,t)}}function h_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Fme(e){if(Array.isArray(e))return e}var Em=function(t,n,r){return t+(n-t)*r},p_=function(t){var n=t.from,r=t.to;return n!==r},Vme=function e(t,n,r){var a=tf(function(o,l){if(p_(l)){var c=t(l.from,l.to,l.velocity),f=Ume(c,2),d=f[0],m=f[1];return Bn(Bn({},l),{},{from:d,velocity:m})}return l},n);return r<1?tf(function(o,l){return p_(l)?Bn(Bn({},l),{},{velocity:Em(l.velocity,a[o].velocity,r),from:Em(l.from,a[o].from,r)}):l},n):e(t,a,r-1)};const Gme=(function(e,t,n,r,a){var o=Sme(e,t),l=o.reduce(function(w,O){return Bn(Bn({},w),{},d_({},O,[e[O],t[O]]))},{}),c=o.reduce(function(w,O){return Bn(Bn({},w),{},d_({},O,{from:e[O],velocity:0,to:t[O]}))},{}),f=-1,d,m,h=function(){return null},g=function(){return tf(function(O,E){return E.from},c)},x=function(){return!Object.values(c).filter(p_).length},A=function(O){d||(d=O);var E=O-d,T=E/n.dt;c=Vme(n,c,T),a(Bn(Bn(Bn({},e),t),g())),d=O,x()||(f=requestAnimationFrame(h))},S=function(O){m||(m=O);var E=(O-m)/r,T=tf(function(j,R){return Em.apply(void 0,d$(R).concat([n(E)]))},l);if(a(Bn(Bn(Bn({},e),t),T)),E<1)f=requestAnimationFrame(h);else{var C=tf(function(j,R){return Em.apply(void 0,d$(R).concat([n(1)]))},l);a(Bn(Bn(Bn({},e),t),C))}};return h=n.isStepper?A:S,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(f)}}});function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}var Wme=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Yme(e,t){if(e==null)return{};var n=Zme(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zme(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function x1(e){return Jme(e)||Qme(e)||Xme(e)||Kme()}function Kme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
477
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xme(e,t){if(e){if(typeof e=="string")return m_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m_(e,t)}}function Qme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jme(e){if(Array.isArray(e))return m_(e)}function m_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p$(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 da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p$(Object(n),!0).forEach(function(r){Yu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yu(e,t,n){return t=B8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B8(r.key),r)}}function nve(e,t,n){return t&&tve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B8(e){var t=rve(e,"string");return ic(t)==="symbol"?t:String(t)}function rve(e,t){if(ic(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ic(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ave(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v_(e,t)}function v_(e,t){return v_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},v_(e,t)}function ive(e){var t=ove();return function(){var r=Tm(e),a;if(t){var o=Tm(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return g_(this,a)}}function g_(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y_(e)}function y_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ove(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}var Di=(function(e){ave(n,e);var t=ive(n);function n(r,a){var o;eve(this,n),o=t.call(this,r,a);var l=o.props,c=l.isActive,f=l.attributeName,d=l.from,m=l.to,h=l.steps,g=l.children,x=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(y_(o)),o.changeStyle=o.changeStyle.bind(y_(o)),!c||x<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),g_(o);if(h&&h.length)o.state={style:h[0].style};else if(d){if(typeof g=="function")return o.state={style:d},g_(o);o.state={style:f?Yu({},f,d):d}}else o.state={style:{}};return o}return nve(n,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,l=a.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,l=o.isActive,c=o.canBegin,f=o.attributeName,d=o.shouldReAnimate,m=o.to,h=o.from,g=this.state.style;if(c){if(!l){var x={style:f?Yu({},f,m):m};this.state&&g&&(f&&g[f]!==m||!f&&g!==m)&&this.setState(x);return}if(!(dme(a.to,m)&&a.canBegin&&a.isActive)){var A=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=A||d?h:a.to;if(this.state&&g){var w={style:f?Yu({},f,S):S};(f&&g[f]!==S||!f&&g!==S)&&this.setState(w)}this.runAnimation(da(da({},this.props),{},{from:S,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,l=a.from,c=a.to,f=a.duration,d=a.easing,m=a.begin,h=a.onAnimationEnd,g=a.onAnimationStart,x=Gme(l,c,kme(d),f,this.changeStyle),A=function(){o.stopJSAnimation=x()};this.manager.start([g,m,A,f,h])}},{key:"runStepAnimation",value:function(a){var o=this,l=a.steps,c=a.begin,f=a.onAnimationStart,d=l[0],m=d.style,h=d.duration,g=h===void 0?0:h,x=function(S,w,O){if(O===0)return S;var E=w.duration,T=w.easing,C=T===void 0?"ease":T,j=w.style,R=w.properties,N=w.onAnimationEnd,D=O>0?l[O-1]:w,z=R||Object.keys(j);if(typeof C=="function"||C==="spring")return[].concat(x1(S),[o.runJSAnimation.bind(o,{from:D.style,to:j,duration:E,easing:C}),E]);var V=c$(z,E,C),U=da(da(da({},D.style),j),{},{transition:V});return[].concat(x1(S),[U,E,N]).filter(_me)};return this.manager.start([f].concat(x1(l.reduce(x,[m,Math.max(g,c)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=bme());var o=a.begin,l=a.duration,c=a.attributeName,f=a.to,d=a.easing,m=a.onAnimationStart,h=a.onAnimationEnd,g=a.steps,x=a.children,A=this.manager;if(this.unSubscribe=A.subscribe(this.handleStyleChange),typeof d=="function"||typeof x=="function"||d==="spring"){this.runJSAnimation(a);return}if(g.length>1){this.runStepAnimation(a);return}var S=c?Yu({},c,f):f,w=c$(Object.keys(S),l,d);A.start([m,o,da(da({},S),{},{transition:w}),l,h])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var c=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var f=Yme(a,Wme),d=y.Children.count(o),m=this.state.style;if(typeof o=="function")return o(m);if(!c||d===0||l<=0)return o;var h=function(x){var A=x.props,S=A.style,w=S===void 0?{}:S,O=A.className,E=y.cloneElement(x,da(da({},f),{},{style:da(da({},w),m),className:O}));return E};return d===1?h(y.Children.only(o)):L.createElement("div",null,y.Children.map(o,function(g){return h(g)}))}}]),n})(y.PureComponent);Di.displayName="Animate";Di.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Di.propTypes={from:Rt.oneOfType([Rt.object,Rt.string]),to:Rt.oneOfType([Rt.object,Rt.string]),attributeName:Rt.string,duration:Rt.number,begin:Rt.number,easing:Rt.oneOfType([Rt.string,Rt.func]),steps:Rt.arrayOf(Rt.shape({duration:Rt.number.isRequired,style:Rt.object.isRequired,easing:Rt.oneOfType([Rt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Rt.func]),properties:Rt.arrayOf("string"),onAnimationEnd:Rt.func})),children:Rt.oneOfType([Rt.node,Rt.func]),isActive:Rt.bool,canBegin:Rt.bool,onAnimationEnd:Rt.func,shouldReAnimate:Rt.bool,onAnimationStart:Rt.func,onAnimationReStart:Rt.func};function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function jm(){return jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jm.apply(this,arguments)}function sve(e,t){return fve(e)||uve(e,t)||cve(e,t)||lve()}function lve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
478
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cve(e,t){if(e){if(typeof e=="string")return m$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m$(e,t)}}function m$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function fve(e){if(Array.isArray(e))return e}function v$(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 g$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(n),!0).forEach(function(r){dve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dve(e,t,n){return t=hve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hve(e){var t=pve(e,"string");return kf(t)=="symbol"?t:t+""}function pve(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y$=function(t,n,r,a,o){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),c=a>=0?1:-1,f=r>=0?1:-1,d=a>=0&&r>=0||a<0&&r<0?1:0,m;if(l>0&&o instanceof Array){for(var h=[0,0,0,0],g=0,x=4;g<x;g++)h[g]=o[g]>l?l:o[g];m="M".concat(t,",").concat(n+c*h[0]),h[0]>0&&(m+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(d,",").concat(t+f*h[0],",").concat(n)),m+="L ".concat(t+r-f*h[1],",").concat(n),h[1]>0&&(m+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(d,`,
479
- `).concat(t+r,",").concat(n+c*h[1])),m+="L ".concat(t+r,",").concat(n+a-c*h[2]),h[2]>0&&(m+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(d,`,
480
- `).concat(t+r-f*h[2],",").concat(n+a)),m+="L ".concat(t+f*h[3],",").concat(n+a),h[3]>0&&(m+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(d,`,
481
- `).concat(t,",").concat(n+a-c*h[3])),m+="Z"}else if(l>0&&o===+o&&o>0){var A=Math.min(l,o);m="M ".concat(t,",").concat(n+c*A,`
482
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+f*A,",").concat(n,`
483
- L `).concat(t+r-f*A,",").concat(n,`
484
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r,",").concat(n+c*A,`
485
- L `).concat(t+r,",").concat(n+a-c*A,`
486
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r-f*A,",").concat(n+a,`
487
- L `).concat(t+f*A,",").concat(n+a,`
488
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t,",").concat(n+a-c*A," Z")}else m="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return m},mve=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,o=n.x,l=n.y,c=n.width,f=n.height;if(Math.abs(c)>0&&Math.abs(f)>0){var d=Math.min(o,o+c),m=Math.max(o,o+c),h=Math.min(l,l+f),g=Math.max(l,l+f);return r>=d&&r<=m&&a>=h&&a<=g}return!1},vve={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tE=function(t){var n=g$(g$({},vve),t),r=y.useRef(),a=y.useState(-1),o=sve(a,2),l=o[0],c=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&c(C)}catch{}},[]);var f=n.x,d=n.y,m=n.width,h=n.height,g=n.radius,x=n.className,A=n.animationEasing,S=n.animationDuration,w=n.animationBegin,O=n.isAnimationActive,E=n.isUpdateAnimationActive;if(f!==+f||d!==+d||m!==+m||h!==+h||m===0||h===0)return null;var T=yt("recharts-rectangle",x);return E?L.createElement(Di,{canBegin:l>0,from:{width:m,height:h,x:f,y:d},to:{width:m,height:h,x:f,y:d},duration:S,animationEasing:A,isActive:E},function(C){var j=C.width,R=C.height,N=C.x,D=C.y;return L.createElement(Di,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,isActive:O,easing:A},L.createElement("path",jm({},ht(n,!0),{className:T,d:y$(N,D,j,R,g),ref:r})))}):L.createElement("path",jm({},ht(n,!0),{className:T,d:y$(f,d,m,h,g)}))};function b_(){return b_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b_.apply(this,arguments)}var nE=function(t){var n=t.cx,r=t.cy,a=t.r,o=t.className,l=yt("recharts-dot",o);return n===+n&&r===+r&&a===+a?y.createElement("circle",b_({},ht(t,!1),Yp(t),{className:l,cx:n,cy:r,r:a})):null};function $f(e){"@babel/helpers - typeof";return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}var gve=["x","y","top","left","width","height","className"];function x_(){return x_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x_.apply(this,arguments)}function b$(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 yve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b$(Object(n),!0).forEach(function(r){bve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bve(e,t,n){return t=xve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xve(e){var t=wve(e,"string");return $f(t)=="symbol"?t:t+""}function wve(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sve(e,t){if(e==null)return{};var n=_ve(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _ve(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ave=function(t,n,r,a,o,l){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},Ove=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.top,c=l===void 0?0:l,f=t.left,d=f===void 0?0:f,m=t.width,h=m===void 0?0:m,g=t.height,x=g===void 0?0:g,A=t.className,S=Sve(t,gve),w=yve({x:r,y:o,top:c,left:d,width:h,height:x},S);return!Ne(r)||!Ne(o)||!Ne(h)||!Ne(x)||!Ne(c)||!Ne(d)?null:L.createElement("path",x_({},ht(w,!0),{className:yt("recharts-cross",A),d:Ave(r,o,h,x,c,d)}))},w1,x$;function Eve(){if(x$)return w1;x$=1;var e=s6(),t=e(Object.getPrototypeOf,Object);return w1=t,w1}var S1,w$;function Tve(){if(w$)return S1;w$=1;var e=Li(),t=Eve(),n=Ii(),r="[object Object]",a=Function.prototype,o=Object.prototype,l=a.toString,c=o.hasOwnProperty,f=l.call(Object);function d(m){if(!n(m)||e(m)!=r)return!1;var h=t(m);if(h===null)return!0;var g=c.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return S1=d,S1}var jve=Tve();const Cve=Ut(jve);var _1,S$;function Rve(){if(S$)return _1;S$=1;var e=Li(),t=Ii(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return _1=r,_1}var Nve=Rve();const Mve=Ut(Nve);function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function Cm(){return Cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cm.apply(this,arguments)}function Pve(e,t){return zve(e)||$ve(e,t)||kve(e,t)||Dve()}function Dve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
489
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kve(e,t){if(e){if(typeof e=="string")return _$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _$(e,t)}}function _$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $ve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function zve(e){if(Array.isArray(e))return e}function A$(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 O$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(n),!0).forEach(function(r){Lve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lve(e,t,n){return t=Ive(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ive(e){var t=Bve(e,"string");return zf(t)=="symbol"?t:t+""}function Bve(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E$=function(t,n,r,a,o){var l=r-a,c;return c="M ".concat(t,",").concat(n),c+="L ".concat(t+r,",").concat(n),c+="L ".concat(t+r-l/2,",").concat(n+o),c+="L ".concat(t+r-l/2-a,",").concat(n+o),c+="L ".concat(t,",").concat(n," Z"),c},Uve={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qve=function(t){var n=O$(O$({},Uve),t),r=y.useRef(),a=y.useState(-1),o=Pve(a,2),l=o[0],c=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&c(T)}catch{}},[]);var f=n.x,d=n.y,m=n.upperWidth,h=n.lowerWidth,g=n.height,x=n.className,A=n.animationEasing,S=n.animationDuration,w=n.animationBegin,O=n.isUpdateAnimationActive;if(f!==+f||d!==+d||m!==+m||h!==+h||g!==+g||m===0&&h===0||g===0)return null;var E=yt("recharts-trapezoid",x);return O?L.createElement(Di,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:d},to:{upperWidth:m,lowerWidth:h,height:g,x:f,y:d},duration:S,animationEasing:A,isActive:O},function(T){var C=T.upperWidth,j=T.lowerWidth,R=T.height,N=T.x,D=T.y;return L.createElement(Di,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,easing:A},L.createElement("path",Cm({},ht(n,!0),{className:E,d:E$(N,D,C,j,R),ref:r})))}):L.createElement("g",null,L.createElement("path",Cm({},ht(n,!0),{className:E,d:E$(f,d,m,h,g)})))},Hve=["option","shapeType","propTransformer","activeClassName","isActive"];function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function Fve(e,t){if(e==null)return{};var n=Vve(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vve(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T$(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 Rm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(n),!0).forEach(function(r){Gve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gve(e,t,n){return t=Wve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wve(e){var t=Yve(e,"string");return Lf(t)=="symbol"?t:t+""}function Yve(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zve(e,t){return Rm(Rm({},t),e)}function Kve(e,t){return e==="symbols"}function j$(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return L.createElement(tE,n);case"trapezoid":return L.createElement(qve,n);case"sector":return L.createElement(P8,n);case"symbols":if(Kve(t))return L.createElement(xO,n);break;default:return null}}function Xve(e){return y.isValidElement(e)?e.props:e}function Qve(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?Zve:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,c=e.isActive,f=Fve(e,Hve),d;if(y.isValidElement(t))d=y.cloneElement(t,Rm(Rm({},f),Xve(t)));else if(ot(t))d=t(f);else if(Cve(t)&&!Mve(t)){var m=a(t,f);d=L.createElement(j$,{shapeType:n,elementProps:m})}else{var h=f;d=L.createElement(j$,{shapeType:n,elementProps:h})}return c?L.createElement(nn,{className:l},d):d}function eg(e,t){return t!=null&&"trapezoids"in e.props}function tg(e,t){return t!=null&&"sectors"in e.props}function If(e,t){return t!=null&&"points"in e.props}function Jve(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&o}function ege(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function tge(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function nge(e,t){var n;return eg(e,t)?n=Jve:tg(e,t)?n=ege:If(e,t)&&(n=tge),n}function rge(e,t){var n;return eg(e,t)?n="trapezoids":tg(e,t)?n="sectors":If(e,t)&&(n="points"),n}function age(e,t){if(eg(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(tg(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return If(e,t)?t.payload:{}}function ige(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=rge(n,t),o=age(n,t),l=r.filter(function(f,d){var m=Sf(o,f),h=n.props[a].filter(function(A){var S=nge(n,t);return S(A,t)}),g=n.props[a].indexOf(h[h.length-1]),x=d===g;return m&&x}),c=r.indexOf(l[l.length-1]);return c}var A1,C$;function oge(){if(C$)return A1;C$=1;var e=Math.ceil,t=Math.max;function n(r,a,o,l){for(var c=-1,f=t(e((a-r)/(o||1)),0),d=Array(f);f--;)d[l?f:++c]=r,r+=o;return d}return A1=n,A1}var O1,R$;function U8(){if(R$)return O1;R$=1;var e=_6(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var o=a<0?-1:1;return o*n}return a===a?a:0}return O1=r,O1}var E1,N$;function sge(){if(N$)return E1;N$=1;var e=oge(),t=Hv(),n=U8();function r(a){return function(o,l,c){return c&&typeof c!="number"&&t(o,l,c)&&(l=c=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),c=c===void 0?o<l?1:-1:n(c),e(o,l,c,a)}}return E1=r,E1}var T1,M$;function lge(){if(M$)return T1;M$=1;var e=sge(),t=e();return T1=t,T1}var cge=lge();const Nm=Ut(cge);function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function P$(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 D$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P$(Object(n),!0).forEach(function(r){q8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q8(e,t,n){return t=uge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uge(e){var t=fge(e,"string");return Bf(t)=="symbol"?t:t+""}function fge(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dge=["Webkit","Moz","O","ms"],hge=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),a=dge.reduce(function(o,l){return D$(D$({},o),{},q8({},l+r,n))},{});return a[t]=n,a};function oc(e){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(e)}function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mm.apply(this,arguments)}function k$(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 j1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){Er(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F8(r.key),r)}}function mge(e,t,n){return t&&$$(e.prototype,t),n&&$$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vge(e,t,n){return t=Pm(t),gge(e,H8()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function gge(e,t){if(t&&(oc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yge(e)}function yge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H8=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pm(e)}function bge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w_(e,t)}function w_(e,t){return w_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},w_(e,t)}function Er(e,t,n){return t=F8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F8(e){var t=xge(e,"string");return oc(t)=="symbol"?t:t+""}function xge(e,t){if(oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wge=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,o=t.x,l=t.width,c=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,d=Qu().domain(Nm(0,f)).range([o,o+l-c]),m=d.domain().map(function(h){return d(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(r),endX:d(a),scale:d,scaleValues:m}},z$=function(t){return t.changedTouches&&!!t.changedTouches.length},sc=(function(e){function t(n){var r;return pge(this,t),r=vge(this,t,[n]),Er(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),Er(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),Er(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,o=a.endIndex,l=a.onDragEnd,c=a.startIndex;l==null||l({endIndex:o,startIndex:c})}),r.detachDragEndListener()}),Er(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Er(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Er(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Er(r,"handleSlideDragStart",function(a){var o=z$(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return bge(t,e),mge(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,o=r.endX,l=this.state.scaleValues,c=this.props,f=c.gap,d=c.data,m=d.length-1,h=Math.min(a,o),g=Math.max(a,o),x=t.getIndexInRange(l,h),A=t.getIndexInRange(l,g);return{startIndex:x-x%f,endIndex:A===m?m:A-A%f}}},{key:"getTextOfTick",value:function(r){var a=this.props,o=a.data,l=a.tickFormatter,c=a.dataKey,f=Pr(o[r],c,r);return ot(l)?l(f,r):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,o=a.slideMoveStartX,l=a.startX,c=a.endX,f=this.props,d=f.x,m=f.width,h=f.travellerWidth,g=f.startIndex,x=f.endIndex,A=f.onChange,S=r.pageX-o;S>0?S=Math.min(S,d+m-h-c,d+m-h-l):S<0&&(S=Math.max(S,d-l,d-c));var w=this.getIndex({startX:l+S,endX:c+S});(w.startIndex!==g||w.endIndex!==x)&&A&&A(w),this.setState({startX:l+S,endX:c+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var o=z$(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,o=a.brushMoveStartX,l=a.movingTravellerId,c=a.endX,f=a.startX,d=this.state[l],m=this.props,h=m.x,g=m.width,x=m.travellerWidth,A=m.onChange,S=m.gap,w=m.data,O={startX:this.state.startX,endX:this.state.endX},E=r.pageX-o;E>0?E=Math.min(E,h+g-x-d):E<0&&(E=Math.max(E,h-d)),O[l]=d+E;var T=this.getIndex(O),C=T.startIndex,j=T.endIndex,R=function(){var D=w.length-1;return l==="startX"&&(c>f?C%S===0:j%S===0)||c<f&&j===D||l==="endX"&&(c>f?j%S===0:C%S===0)||c>f&&j===D};this.setState(Er(Er({},l,d+E),"brushMoveStartX",r.pageX),function(){A&&R()&&A(T)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var o=this,l=this.state,c=l.scaleValues,f=l.startX,d=l.endX,m=this.state[a],h=c.indexOf(m);if(h!==-1){var g=h+r;if(!(g===-1||g>=c.length)){var x=c[g];a==="startX"&&x>=d||a==="endX"&&x<=f||this.setState(Er({},a,x),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.fill,d=r.stroke;return L.createElement("rect",{stroke:d,fill:f,x:a,y:o,width:l,height:c})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.data,d=r.children,m=r.padding,h=y.Children.only(d);return h?L.cloneElement(h,{x:a,y:o,width:l,height:c,margin:m,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,a){var o,l,c=this,f=this.props,d=f.y,m=f.travellerWidth,h=f.height,g=f.traveller,x=f.ariaLabel,A=f.data,S=f.startIndex,w=f.endIndex,O=Math.max(r,this.props.x),E=j1(j1({},ht(this.props,!1)),{},{x:O,y:d,width:m,height:h}),T=x||"Min value: ".concat((o=A[S])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=A[w])===null||l===void 0?void 0:l.name);return L.createElement(nn,{tabIndex:0,role:"slider","aria-label":T,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),c.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,a))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,E))}},{key:"renderSlide",value:function(r,a){var o=this.props,l=o.y,c=o.height,f=o.stroke,d=o.travellerWidth,m=Math.min(r,a)+d,h=Math.max(Math.abs(a-r)-d,0);return L.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:m,y:l,width:h,height:c})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,o=r.endIndex,l=r.y,c=r.height,f=r.travellerWidth,d=r.stroke,m=this.state,h=m.startX,g=m.endX,x=5,A={pointerEvents:"none",fill:d};return L.createElement(nn,{className:"recharts-brush-texts"},L.createElement(om,Mm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-x,y:l+c/2},A),this.getTextOfTick(a)),L.createElement(om,Mm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+f+x,y:l+c/2},A),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,a=r.data,o=r.className,l=r.children,c=r.x,f=r.y,d=r.width,m=r.height,h=r.alwaysShowText,g=this.state,x=g.startX,A=g.endX,S=g.isTextActive,w=g.isSlideMoving,O=g.isTravellerMoving,E=g.isTravellerFocused;if(!a||!a.length||!Ne(c)||!Ne(f)||!Ne(d)||!Ne(m)||d<=0||m<=0)return null;var T=yt("recharts-brush",o),C=L.Children.count(l)===1,j=hge("userSelect","none");return L.createElement(nn,{className:T,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(x,A),this.renderTravellerLayer(x,"startX"),this.renderTravellerLayer(A,"endX"),(S||w||O||E||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,o=r.y,l=r.width,c=r.height,f=r.stroke,d=Math.floor(o+c/2)-1;return L.createElement(L.Fragment,null,L.createElement("rect",{x:a,y:o,width:l,height:c,fill:f,stroke:"none"}),L.createElement("line",{x1:a+1,y1:d,x2:a+l-1,y2:d,fill:"none",stroke:"#fff"}),L.createElement("line",{x1:a+1,y1:d+2,x2:a+l-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var o;return L.isValidElement(r)?o=L.cloneElement(r,a):ot(r)?o=r(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(r,a){var o=r.data,l=r.width,c=r.x,f=r.travellerWidth,d=r.updateId,m=r.startIndex,h=r.endIndex;if(o!==a.prevData||d!==a.prevUpdateId)return j1({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l},o&&o.length?wge({data:o,width:l,x:c,travellerWidth:f,startIndex:m,endIndex:h}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||c!==a.prevX||f!==a.prevTravellerWidth)){a.scale.range([c,c+l-f]);var g=a.scale.domain().map(function(x){return a.scale(x)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,a){for(var o=r.length,l=0,c=o-1;c-l>1;){var f=Math.floor((l+c)/2);r[f]>a?c=f:l=f}return a>=r[c]?c:l}}])})(y.PureComponent);Er(sc,"displayName","Brush");Er(sc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var C1,L$;function Sge(){if(L$)return C1;L$=1;var e=TO();function t(n,r){var a;return e(n,function(o,l,c){return a=r(o,l,c),!a}),!!a}return C1=t,C1}var R1,I$;function _ge(){if(I$)return R1;I$=1;var e=e6(),t=ko(),n=Sge(),r=vr(),a=Hv();function o(l,c,f){var d=r(l)?e:n;return f&&a(l,c,f)&&(c=void 0),d(l,t(c,3))}return R1=o,R1}var Age=_ge();const Oge=Ut(Age);var Wa=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},N1,B$;function Ege(){if(B$)return N1;B$=1;var e=y6();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return N1=t,N1}var M1,U$;function Tge(){if(U$)return M1;U$=1;var e=Ege(),t=v6(),n=ko();function r(a,o){var l={};return o=n(o,3),t(a,function(c,f,d){e(l,f,o(c,f,d))}),l}return M1=r,M1}var jge=Tge();const Cge=Ut(jge);var P1,q$;function Rge(){if(q$)return P1;q$=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(!n(t[r],r,t))return!1;return!0}return P1=e,P1}var D1,H$;function Nge(){if(H$)return D1;H$=1;var e=TO();function t(n,r){var a=!0;return e(n,function(o,l,c){return a=!!r(o,l,c),a}),a}return D1=t,D1}var k1,F$;function Mge(){if(F$)return k1;F$=1;var e=Rge(),t=Nge(),n=ko(),r=vr(),a=Hv();function o(l,c,f){var d=r(l)?e:t;return f&&a(l,c,f)&&(c=void 0),d(l,n(c,3))}return k1=o,k1}var Pge=Mge();const V8=Ut(Pge);var Dge=["x","y"];function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function S_(){return S_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S_.apply(this,arguments)}function V$(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?V$(Object(n),!0).forEach(function(r){kge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kge(e,t,n){return t=$ge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ge(e){var t=zge(e,"string");return Uf(t)=="symbol"?t:t+""}function zge(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lge(e,t){if(e==null)return{};var n=Ige(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ige(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bge(e,t){var n=e.x,r=e.y,a=Lge(e,Dge),o="".concat(n),l=parseInt(o,10),c="".concat(r),f=parseInt(c,10),d="".concat(t.height||a.height),m=parseInt(d,10),h="".concat(t.width||a.width),g=parseInt(h,10);return Bu(Bu(Bu(Bu(Bu({},t),a),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function G$(e){return L.createElement(Qve,S_({shapeType:"rectangle",propTransformer:Bge,activeClassName:"recharts-active-bar"},e))}var Uge=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var o=Ne(r)||Gae(r);return o?t(r,a):(o||Cs(),n)}},qge=["value","background"],G8;function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function Hge(e,t){if(e==null)return{};var n=Fge(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dm.apply(this,arguments)}function W$(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 xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W$(Object(n),!0).forEach(function(r){xo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Y8(r.key),r)}}function Gge(e,t,n){return t&&Y$(e.prototype,t),n&&Y$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wge(e,t,n){return t=km(t),Yge(e,W8()?Reflect.construct(t,n||[],km(e).constructor):t.apply(e,n))}function Yge(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zge(e)}function Zge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W8=function(){return!!e})()}function km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}function Kge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&__(e,t)}function __(e,t){return __=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},__(e,t)}function xo(e,t,n){return t=Y8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y8(e){var t=Xge(e,"string");return lc(t)=="symbol"?t:t+""}function Xge(e,t){if(lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ed=(function(e){function t(){var n;Vge(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Wge(this,t,[].concat(a)),xo(n,"state",{isAnimationFinished:!1}),xo(n,"id",xd("recharts-bar-")),xo(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),xo(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Kge(t,e),Gge(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,o=this.props,l=o.shape,c=o.dataKey,f=o.activeIndex,d=o.activeBar,m=ht(this.props,!1);return r&&r.map(function(h,g){var x=g===f,A=x?d:l,S=xn(xn(xn({},m),h),{},{isActive:x,option:A,index:g,dataKey:c,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return L.createElement(nn,Dm({className:"recharts-bar-rectangle"},Zp(a.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),L.createElement(G$,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,o=a.data,l=a.layout,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,m=a.animationEasing,h=a.animationId,g=this.state.prevData;return L.createElement(Di,{begin:f,duration:d,isActive:c,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var A=x.t,S=o.map(function(w,O){var E=g&&g[O];if(E){var T=Zr(E.x,w.x),C=Zr(E.y,w.y),j=Zr(E.width,w.width),R=Zr(E.height,w.height);return xn(xn({},w),{},{x:T(A),y:C(A),width:j(A),height:R(A)})}if(l==="horizontal"){var N=Zr(0,w.height),D=N(A);return xn(xn({},w),{},{y:w.y+w.height-D,height:D})}var z=Zr(0,w.width),V=z(A);return xn(xn({},w),{},{width:V})});return L.createElement(nn,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&a&&a.length&&(!l||!Sf(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,o=a.data,l=a.dataKey,c=a.activeIndex,f=ht(this.props.background,!1);return o.map(function(d,m){d.value;var h=d.background,g=Hge(d,qge);if(!h)return null;var x=xn(xn(xn(xn(xn({},g),{},{fill:"#eee"},h),f),Zp(r.props,d,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return L.createElement(G$,Dm({key:"background-bar-".concat(m),option:r.props.background,isActive:m===c},x))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,c=o.xAxis,f=o.yAxis,d=o.layout,m=o.children,h=_a(m,Jv);if(!h)return null;var g=d==="vertical"?l[0].height/2:l[0].width/2,x=function(w,O){var E=Array.isArray(w.value)?w.value[1]:w.value;return{x:w.x,y:w.y,value:E,errorVal:Pr(w,O)}},A={clipPath:r?"url(#clipPath-".concat(a,")"):null};return L.createElement(nn,A,h.map(function(S){return L.cloneElement(S,{key:"error-bar-".concat(a,"-").concat(S.props.dataKey),data:l,xAxis:c,yAxis:f,layout:d,offset:g,dataPointFormatter:x})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,o=r.data,l=r.className,c=r.xAxis,f=r.yAxis,d=r.left,m=r.top,h=r.width,g=r.height,x=r.isAnimationActive,A=r.background,S=r.id;if(a||!o||!o.length)return null;var w=this.state.isAnimationFinished,O=yt("recharts-bar",l),E=c&&c.allowDataOverflow,T=f&&f.allowDataOverflow,C=E||T,j=vt(S)?this.id:S;return L.createElement(nn,{className:O},E||T?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(j)},L.createElement("rect",{x:E?d:d-h/2,y:T?m:m-g/2,width:E?h:h*2,height:T?g:g*2}))):null,L.createElement(nn,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(j,")"):null},A?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,j),(!x||w)&&Ao.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])})(y.PureComponent);G8=Ed;xo(Ed,"displayName","Bar");xo(Ed,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Mc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});xo(Ed,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,o=e.xAxis,l=e.yAxis,c=e.xAxisTicks,f=e.yAxisTicks,d=e.stackedData,m=e.dataStartIndex,h=e.displayedData,g=e.offset,x=dhe(r,n);if(!x)return null;var A=t.layout,S=n.type.defaultProps,w=S!==void 0?xn(xn({},S),n.props):n.props,O=w.dataKey,E=w.children,T=w.minPointSize,C=A==="horizontal"?l:o,j=d?C.scale.domain():null,R=xhe({numericAxis:C}),N=_a(E,O6),D=h.map(function(z,V){var U,P,B,q,G,$;d?U=hhe(d[m+V],j):(U=Pr(z,O),Array.isArray(U)||(U=[R,U]));var F=Uge(T,G8.defaultProps.minPointSize)(U[1],V);if(A==="horizontal"){var Z,X=[l.scale(U[0]),l.scale(U[1])],oe=X[0],I=X[1];P=Dk({axis:o,ticks:c,bandSize:a,offset:x.offset,entry:z,index:V}),B=(Z=I??oe)!==null&&Z!==void 0?Z:void 0,q=x.size;var Y=oe-I;if(G=Number.isNaN(Y)?0:Y,$={x:P,y:l.y,width:q,height:l.height},Math.abs(F)>0&&Math.abs(G)<Math.abs(F)){var Q=ba(G||F)*(Math.abs(F)-Math.abs(G));B-=Q,G+=Q}}else{var ce=[o.scale(U[0]),o.scale(U[1])],ve=ce[0],fe=ce[1];if(P=ve,B=Dk({axis:l,ticks:f,bandSize:a,offset:x.offset,entry:z,index:V}),q=fe-ve,G=x.size,$={x:o.x,y:B,width:o.width,height:G},Math.abs(F)>0&&Math.abs(q)<Math.abs(F)){var ue=ba(q||F)*(Math.abs(F)-Math.abs(q));q+=ue}}return xn(xn(xn({},z),{},{x:P,y:B,width:q,height:G,value:d?U:U[1],payload:z,background:$},N&&N[V]&&N[V].props),{},{tooltipPayload:[R8(n,z)],tooltipPosition:{x:P+q/2,y:B+G/2}})});return xn({data:D,layout:A},g)});function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function Qge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z8(r.key),r)}}function Jge(e,t,n){return t&&Z$(e.prototype,t),n&&Z$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K$(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 ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K$(Object(n),!0).forEach(function(r){ng(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ng(e,t,n){return t=Z8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z8(e){var t=eye(e,"string");return qf(t)=="symbol"?t:t+""}function eye(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tye=function(t,n,r,a,o){var l=t.width,c=t.height,f=t.layout,d=t.children,m=Object.keys(n),h={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:c-r.bottom,bottomMirror:c-r.bottom},g=!!Tr(d,Ed);return m.reduce(function(x,A){var S=n[A],w=S.orientation,O=S.domain,E=S.padding,T=E===void 0?{}:E,C=S.mirror,j=S.reversed,R="".concat(w).concat(C?"Mirror":""),N,D,z,V,U;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var P=O[1]-O[0],B=1/0,q=S.categoricalDomain.sort(Zae);if(q.forEach(function(ce,ve){ve>0&&(B=Math.min((ce||0)-(q[ve-1]||0),B))}),Number.isFinite(B)){var G=B/P,$=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(N=G*$/2),S.padding==="no-gap"){var F=Ts(t.barCategoryGap,G*$),Z=G*$/2;N=Z-F-(Z-F)/$*F}}}a==="xAxis"?D=[r.left+(T.left||0)+(N||0),r.left+r.width-(T.right||0)-(N||0)]:a==="yAxis"?D=f==="horizontal"?[r.top+r.height-(T.bottom||0),r.top+(T.top||0)]:[r.top+(T.top||0)+(N||0),r.top+r.height-(T.bottom||0)-(N||0)]:D=S.range,j&&(D=[D[1],D[0]]);var X=uhe(S,o,g),oe=X.scale,I=X.realScaleType;oe.domain(O).range(D),fhe(oe);var Y=bhe(oe,ma(ma({},S),{},{realScaleType:I}));a==="xAxis"?(U=w==="top"&&!C||w==="bottom"&&C,z=r.left,V=h[R]-U*S.height):a==="yAxis"&&(U=w==="left"&&!C||w==="right"&&C,z=h[R]-U*S.width,V=r.top);var Q=ma(ma(ma({},S),Y),{},{realScaleType:I,x:z,y:V,scale:oe,width:a==="xAxis"?r.width:S.width,height:a==="yAxis"?r.height:S.height});return Q.bandSize=wm(Q,Y),!S.hide&&a==="xAxis"?h[R]+=(U?-1:1)*Q.height:S.hide||(h[R]+=(U?-1:1)*Q.width),ma(ma({},x),{},ng({},A,Q))},{})},K8=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(a,l),width:Math.abs(o-r),height:Math.abs(l-a)}},nye=function(t){var n=t.x1,r=t.y1,a=t.x2,o=t.y2;return K8({x:n,y:r},{x:a,y:o})},X8=(function(){function e(t){Qge(this,e),this.scale=t}return Jge(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}default:return this.scale(n)}if(a){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],o=r[r.length-1];return a<=o?n>=a&&n<=o:n>=o&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])})();ng(X8,"EPS",1e-4);var rE=function(t){var n=Object.keys(t).reduce(function(r,a){return ma(ma({},r),{},ng({},a,X8.create(t[a])))},{});return ma(ma({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,c=o.position;return Cge(a,function(f,d){return n[d].apply(f,{bandAware:l,position:c})})},isInRange:function(a){return V8(a,function(o,l){return n[l].isInRange(o)})}})};function rye(e){return(e%180+180)%180}var aye=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=rye(a),l=o*Math.PI/180,c=Math.atan(r/n),f=l>c&&l<Math.PI-c?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},$1,X$;function iye(){if(X$)return $1;X$=1;var e=ko(),t=wd(),n=Uv();function r(a){return function(o,l,c){var f=Object(o);if(!t(o)){var d=e(l,3);o=n(o),l=function(h){return d(f[h],h,f)}}var m=a(o,l,c);return m>-1?f[d?o[m]:m]:void 0}}return $1=r,$1}var z1,Q$;function oye(){if(Q$)return z1;Q$=1;var e=U8();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return z1=t,z1}var L1,J$;function sye(){if(J$)return L1;J$=1;var e=f6(),t=ko(),n=oye(),r=Math.max;function a(o,l,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=r(f+d,0)),e(o,t(l,3),d)}return L1=a,L1}var I1,ez;function lye(){if(ez)return I1;ez=1;var e=iye(),t=sye(),n=e(t);return I1=n,I1}var cye=lye();const uye=Ut(cye);var fye=TB();const dye=Ut(fye);var hye=dye(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),aE=y.createContext(void 0),iE=y.createContext(void 0),Q8=y.createContext(void 0),J8=y.createContext({}),eU=y.createContext(void 0),tU=y.createContext(0),nU=y.createContext(0),tz=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,o=n.offset,l=t.clipPathId,c=t.children,f=t.width,d=t.height,m=hye(o);return L.createElement(aE.Provider,{value:r},L.createElement(iE.Provider,{value:a},L.createElement(J8.Provider,{value:o},L.createElement(Q8.Provider,{value:m},L.createElement(eU.Provider,{value:l},L.createElement(tU.Provider,{value:d},L.createElement(nU.Provider,{value:f},c)))))))},pye=function(){return y.useContext(eU)},rU=function(t){var n=y.useContext(aE);n==null&&Cs();var r=n[t];return r==null&&Cs(),r},mye=function(){var t=y.useContext(aE);return yo(t)},vye=function(){var t=y.useContext(iE),n=uye(t,function(r){return V8(r.domain,Number.isFinite)});return n||yo(t)},aU=function(t){var n=y.useContext(iE);n==null&&Cs();var r=n[t];return r==null&&Cs(),r},gye=function(){var t=y.useContext(Q8);return t},yye=function(){return y.useContext(J8)},oE=function(){return y.useContext(nU)},sE=function(){return y.useContext(tU)};function cc(e){"@babel/helpers - typeof";return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function bye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oU(r.key),r)}}function wye(e,t,n){return t&&xye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sye(e,t,n){return t=$m(t),_ye(e,iU()?Reflect.construct(t,n||[],$m(e).constructor):t.apply(e,n))}function _ye(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aye(e)}function Aye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iU=function(){return!!e})()}function $m(e){return $m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$m(e)}function Oye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A_(e,t)}function A_(e,t){return A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},A_(e,t)}function nz(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 rz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nz(Object(n),!0).forEach(function(r){lE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lE(e,t,n){return t=oU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oU(e){var t=Eye(e,"string");return cc(t)=="symbol"?t:t+""}function Eye(e,t){if(cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Tye(e,t){return Nye(e)||Rye(e,t)||Cye(e,t)||jye()}function jye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
490
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cye(e,t){if(e){if(typeof e=="string")return az(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return az(e,t)}}function az(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function Nye(e){if(Array.isArray(e))return e}function O_(){return O_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O_.apply(this,arguments)}var Mye=function(t,n){var r;return L.isValidElement(t)?r=L.cloneElement(t,n):ot(t)?r=t(n):r=L.createElement("line",O_({},n,{className:"recharts-reference-line-line"})),r},Pye=function(t,n,r,a,o,l,c,f,d){var m=o.x,h=o.y,g=o.width,x=o.height;if(r){var A=d.y,S=t.y.apply(A,{position:l});if(Wa(d,"discard")&&!t.y.isInRange(S))return null;var w=[{x:m+g,y:S},{x:m,y:S}];return f==="left"?w.reverse():w}if(n){var O=d.x,E=t.x.apply(O,{position:l});if(Wa(d,"discard")&&!t.x.isInRange(E))return null;var T=[{x:E,y:h+x},{x:E,y:h}];return c==="top"?T.reverse():T}if(a){var C=d.segment,j=C.map(function(R){return t.apply(R,{position:l})});return Wa(d,"discard")&&Oge(j,function(R){return!t.isInRange(R)})?null:j}return null};function Dye(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,o=e.yAxisId,l=e.shape,c=e.className,f=e.alwaysShow,d=pye(),m=rU(a),h=aU(o),g=gye();if(!d||!g)return null;Ei(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=rE({x:m.scale,y:h.scale}),A=Cn(t),S=Cn(n),w=r&&r.length===2,O=Pye(x,A,S,w,g,e.position,m.orientation,h.orientation,e);if(!O)return null;var E=Tye(O,2),T=E[0],C=T.x,j=T.y,R=E[1],N=R.x,D=R.y,z=Wa(e,"hidden")?"url(#".concat(d,")"):void 0,V=rz(rz({clipPath:z},ht(e,!0)),{},{x1:C,y1:j,x2:N,y2:D});return L.createElement(nn,{className:yt("recharts-reference-line",c)},Mye(l,V),Qn.renderCallByParent(e,nye({x1:C,y1:j,x2:N,y2:D})))}var cE=(function(e){function t(){return bye(this,t),Sye(this,t,arguments)}return Oye(t,e),wye(t,[{key:"render",value:function(){return L.createElement(Dye,this.props)}}])})(L.Component);lE(cE,"displayName","ReferenceLine");lE(cE,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function E_(){return E_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E_.apply(this,arguments)}function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}function iz(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 oz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iz(Object(n),!0).forEach(function(r){rg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lU(r.key),r)}}function zye(e,t,n){return t&&$ye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lye(e,t,n){return t=zm(t),Iye(e,sU()?Reflect.construct(t,n||[],zm(e).constructor):t.apply(e,n))}function Iye(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bye(e)}function Bye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sU=function(){return!!e})()}function zm(e){return zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zm(e)}function Uye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T_(e,t)}function T_(e,t){return T_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},T_(e,t)}function rg(e,t,n){return t=lU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lU(e){var t=qye(e,"string");return uc(t)=="symbol"?t:t+""}function qye(e,t){if(uc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hye=function(t){var n=t.x,r=t.y,a=t.xAxis,o=t.yAxis,l=rE({x:a.scale,y:o.scale}),c=l.apply({x:n,y:r},{bandAware:!0});return Wa(t,"discard")&&!l.isInRange(c)?null:c},ag=(function(e){function t(){return kye(this,t),Lye(this,t,arguments)}return Uye(t,e),zye(t,[{key:"render",value:function(){var r=this.props,a=r.x,o=r.y,l=r.r,c=r.alwaysShow,f=r.clipPathId,d=Cn(a),m=Cn(o);if(Ei(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!m)return null;var h=Hye(this.props);if(!h)return null;var g=h.x,x=h.y,A=this.props,S=A.shape,w=A.className,O=Wa(this.props,"hidden")?"url(#".concat(f,")"):void 0,E=oz(oz({clipPath:O},ht(this.props,!0)),{},{cx:g,cy:x});return L.createElement(nn,{className:yt("recharts-reference-dot",w)},t.renderDot(S,E),Qn.renderCallByParent(this.props,{x:g-l,y:x-l,width:2*l,height:2*l}))}}])})(L.Component);rg(ag,"displayName","ReferenceDot");rg(ag,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});rg(ag,"renderDot",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):ot(e)?n=e(t):n=L.createElement(nE,E_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function j_(){return j_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j_.apply(this,arguments)}function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function sz(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 lz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sz(Object(n),!0).forEach(function(r){ig(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uU(r.key),r)}}function Gye(e,t,n){return t&&Vye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wye(e,t,n){return t=Lm(t),Yye(e,cU()?Reflect.construct(t,n||[],Lm(e).constructor):t.apply(e,n))}function Yye(e,t){if(t&&(fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zye(e)}function Zye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cU=function(){return!!e})()}function Lm(e){return Lm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lm(e)}function Kye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C_(e,t)}function C_(e,t){return C_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},C_(e,t)}function ig(e,t,n){return t=uU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(e){var t=Xye(e,"string");return fc(t)=="symbol"?t:t+""}function Xye(e,t){if(fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qye=function(t,n,r,a,o){var l=o.x1,c=o.x2,f=o.y1,d=o.y2,m=o.xAxis,h=o.yAxis;if(!m||!h)return null;var g=rE({x:m.scale,y:h.scale}),x={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},A={x:n?g.x.apply(c,{position:"end"}):g.x.rangeMax,y:a?g.y.apply(d,{position:"end"}):g.y.rangeMax};return Wa(o,"discard")&&(!g.isInRange(x)||!g.isInRange(A))?null:K8(x,A)},og=(function(e){function t(){return Fye(this,t),Wye(this,t,arguments)}return Kye(t,e),Gye(t,[{key:"render",value:function(){var r=this.props,a=r.x1,o=r.x2,l=r.y1,c=r.y2,f=r.className,d=r.alwaysShow,m=r.clipPathId;Ei(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Cn(a),g=Cn(o),x=Cn(l),A=Cn(c),S=this.props.shape;if(!h&&!g&&!x&&!A&&!S)return null;var w=Qye(h,g,x,A,this.props);if(!w&&!S)return null;var O=Wa(this.props,"hidden")?"url(#".concat(m,")"):void 0;return L.createElement(nn,{className:yt("recharts-reference-area",f)},t.renderRect(S,lz(lz({clipPath:O},ht(this.props,!0)),w)),Qn.renderCallByParent(this.props,w))}}])})(L.Component);ig(og,"displayName","ReferenceArea");ig(og,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ig(og,"renderRect",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):ot(e)?n=e(t):n=L.createElement(tE,j_({},t,{className:"recharts-reference-area-rect"})),n});function fU(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function Jye(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return aye(r,n)}function ebe(e,t,n){var r=n==="width",a=e.x,o=e.y,l=e.width,c=e.height;return t===1?{start:r?a:o,end:r?a+l:o+c}:{start:r?a+l:o+c,end:r?a:o}}function Im(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-a)<=0}function tbe(e,t){return fU(e,t+1)}function nbe(e,t,n,r,a){for(var o=(r||[]).slice(),l=t.start,c=t.end,f=0,d=1,m=l,h=function(){var A=r==null?void 0:r[f];if(A===void 0)return{v:fU(r,d)};var S=f,w,O=function(){return w===void 0&&(w=n(A,S)),w},E=A.coordinate,T=f===0||Im(e,E,O,m,c);T||(f=0,m=l,d+=1),T&&(m=E+e*(O()/2+a),f+=d)},g;d<=o.length;)if(g=h(),g)return g.v;return[]}function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function cz(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 Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cz(Object(n),!0).forEach(function(r){rbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rbe(e,t,n){return t=abe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function abe(e){var t=ibe(e,"string");return Hf(t)=="symbol"?t:t+""}function ibe(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function obe(e,t,n,r,a){for(var o=(r||[]).slice(),l=o.length,c=t.start,f=t.end,d=function(g){var x=o[g],A,S=function(){return A===void 0&&(A=n(x,g)),A};if(g===l-1){var w=e*(x.coordinate+e*S()/2-f);o[g]=x=Kn(Kn({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else o[g]=x=Kn(Kn({},x),{},{tickCoord:x.coordinate});var O=Im(e,x.tickCoord,S,c,f);O&&(f=x.tickCoord-e*(S()/2+a),o[g]=Kn(Kn({},x),{},{isShow:!0}))},m=l-1;m>=0;m--)d(m);return o}function sbe(e,t,n,r,a,o){var l=(r||[]).slice(),c=l.length,f=t.start,d=t.end;if(o){var m=r[c-1],h=n(m,c-1),g=e*(m.coordinate+e*h/2-d);l[c-1]=m=Kn(Kn({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var x=Im(e,m.tickCoord,function(){return h},f,d);x&&(d=m.tickCoord-e*(h/2+a),l[c-1]=Kn(Kn({},m),{},{isShow:!0}))}for(var A=o?c-1:c,S=function(E){var T=l[E],C,j=function(){return C===void 0&&(C=n(T,E)),C};if(E===0){var R=e*(T.coordinate-e*j()/2-f);l[E]=T=Kn(Kn({},T),{},{tickCoord:R<0?T.coordinate-R*e:T.coordinate})}else l[E]=T=Kn(Kn({},T),{},{tickCoord:T.coordinate});var N=Im(e,T.tickCoord,j,f,d);N&&(f=T.tickCoord+e*(j()/2+a),l[E]=Kn(Kn({},T),{},{isShow:!0}))},w=0;w<A;w++)S(w);return l}function uE(e,t,n){var r=e.tick,a=e.ticks,o=e.viewBox,l=e.minTickGap,c=e.orientation,f=e.interval,d=e.tickFormatter,m=e.unit,h=e.angle;if(!a||!a.length||!r)return[];if(Ne(f)||Mc.isSsr)return tbe(a,typeof f=="number"&&Ne(f)?f:0);var g=[],x=c==="top"||c==="bottom"?"width":"height",A=m&&x==="width"?Xu(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(T,C){var j=ot(d)?d(T.value,C):T.value;return x==="width"?Jye(Xu(j,{fontSize:t,letterSpacing:n}),A,h):Xu(j,{fontSize:t,letterSpacing:n})[x]},w=a.length>=2?ba(a[1].coordinate-a[0].coordinate):1,O=ebe(o,w,x);return f==="equidistantPreserveStart"?nbe(w,O,S,a,l):(f==="preserveStart"||f==="preserveStartEnd"?g=sbe(w,O,S,a,l,f==="preserveStartEnd"):g=obe(w,O,S,a,l),g.filter(function(E){return E.isShow}))}var lbe=["viewBox"],cbe=["viewBox"],ube=["ticks"];function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pl.apply(this,arguments)}function uz(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 Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uz(Object(n),!0).forEach(function(r){fE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B1(e,t){if(e==null)return{};var n=fbe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function dbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hU(r.key),r)}}function hbe(e,t,n){return t&&fz(e.prototype,t),n&&fz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pbe(e,t,n){return t=Bm(t),mbe(e,dU()?Reflect.construct(t,n||[],Bm(e).constructor):t.apply(e,n))}function mbe(e,t){if(t&&(dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vbe(e)}function vbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dU=function(){return!!e})()}function Bm(e){return Bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bm(e)}function gbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},R_(e,t)}function fE(e,t,n){return t=hU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hU(e){var t=ybe(e,"string");return dc(t)=="symbol"?t:t+""}function ybe(e,t){if(dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $c=(function(e){function t(n){var r;return dbe(this,t),r=pbe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return gbe(t,e),hbe(t,[{key:"shouldComponentUpdate",value:function(r,a){var o=r.viewBox,l=B1(r,lbe),c=this.props,f=c.viewBox,d=B1(c,cbe);return!Bl(o,f)||!Bl(l,d)||!Bl(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,o=a.x,l=a.y,c=a.width,f=a.height,d=a.orientation,m=a.tickSize,h=a.mirror,g=a.tickMargin,x,A,S,w,O,E,T=h?-1:1,C=r.tickSize||m,j=Ne(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":x=A=r.coordinate,w=l+ +!h*f,S=w-T*C,E=S-T*g,O=j;break;case"left":S=w=r.coordinate,A=o+ +!h*c,x=A-T*C,O=x-T*g,E=j;break;case"right":S=w=r.coordinate,A=o+ +h*c,x=A+T*C,O=x+T*g,E=j;break;default:x=A=r.coordinate,w=l+ +h*f,S=w+T*C,E=S+T*g,O=j;break}return{line:{x1:x,y1:S,x2:A,y2:w},tick:{x:O,y:E}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l;switch(a){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.orientation,d=r.mirror,m=r.axisLine,h=Tn(Tn(Tn({},ht(this.props,!1)),ht(m,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!d||f==="bottom"&&d);h=Tn(Tn({},h),{},{x1:a,y1:o+g*c,x2:a+l,y2:o+g*c})}else{var x=+(f==="left"&&!d||f==="right"&&d);h=Tn(Tn({},h),{},{x1:a+x*l,y1:o,x2:a+x*l,y2:o+c})}return L.createElement("line",Pl({},h,{className:yt("recharts-cartesian-axis-line",na(m,"className"))}))}},{key:"renderTicks",value:function(r,a,o){var l=this,c=this.props,f=c.tickLine,d=c.stroke,m=c.tick,h=c.tickFormatter,g=c.unit,x=uE(Tn(Tn({},this.props),{},{ticks:r}),a,o),A=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),w=ht(this.props,!1),O=ht(m,!1),E=Tn(Tn({},w),{},{fill:"none"},ht(f,!1)),T=x.map(function(C,j){var R=l.getTickLineCoord(C),N=R.line,D=R.tick,z=Tn(Tn(Tn(Tn({textAnchor:A,verticalAnchor:S},w),{},{stroke:"none",fill:d},O),D),{},{index:j,payload:C,visibleTicksCount:x.length,tickFormatter:h});return L.createElement(nn,Pl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},Zp(l.props,C,j)),f&&L.createElement("line",Pl({},E,N,{className:yt("recharts-cartesian-axis-tick-line",na(f,"className"))})),m&&t.renderTickItem(m,z,"".concat(ot(h)?h(C.value,j):C.value).concat(g||"")))});return L.createElement("g",{className:"recharts-cartesian-axis-ticks"},T)}},{key:"render",value:function(){var r=this,a=this.props,o=a.axisLine,l=a.width,c=a.height,f=a.ticksGenerator,d=a.className,m=a.hide;if(m)return null;var h=this.props,g=h.ticks,x=B1(h,ube),A=g;return ot(f)&&(A=g&&g.length>0?f(this.props):f(x)),l<=0||c<=0||!A||!A.length?null:L.createElement(nn,{className:yt("recharts-cartesian-axis",d),ref:function(w){r.layerReference=w}},o&&this.renderAxisLine(),this.renderTicks(A,this.state.fontSize,this.state.letterSpacing),Qn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,o){var l,c=yt(a.className,"recharts-cartesian-axis-tick-value");return L.isValidElement(r)?l=L.cloneElement(r,Tn(Tn({},a),{},{className:c})):ot(r)?l=r(Tn(Tn({},a),{},{className:c})):l=L.createElement(om,Pl({},a,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(y.Component);fE($c,"displayName","CartesianAxis");fE($c,"defaultProps",{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"});var bbe=["x1","y1","x2","y2","key"],xbe=["offset"];function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function dz(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 Jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dz(Object(n),!0).forEach(function(r){wbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wbe(e,t,n){return t=Sbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sbe(e){var t=_be(e,"string");return Rs(t)=="symbol"?t:t+""}function _be(e,t){if(Rs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hs(){return hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hs.apply(this,arguments)}function hz(e,t){if(e==null)return{};var n=Abe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Abe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Obe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,o=t.y,l=t.width,c=t.height,f=t.ry;return L.createElement("rect",{x:a,y:o,ry:f,width:l,height:c,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function pU(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(ot(e))n=e(t);else{var r=t.x1,a=t.y1,o=t.x2,l=t.y2,c=t.key,f=hz(t,bbe),d=ht(f,!1);d.offset;var m=hz(d,xbe);n=L.createElement("line",hs({},m,{x1:r,y1:a,x2:o,y2:l,fill:"none",key:c}))}return n}function Ebe(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(c,f){var d=Jn(Jn({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(f),index:f});return pU(a,d)});return L.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Tbe(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,o=e.verticalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(c,f){var d=Jn(Jn({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(f),index:f});return pU(a,d)});return L.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function jbe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,o=e.width,l=e.height,c=e.horizontalPoints,f=e.horizontal,d=f===void 0?!0:f;if(!d||!t||!t.length)return null;var m=c.map(function(g){return Math.round(g+a-a)}).sort(function(g,x){return g-x});a!==m[0]&&m.unshift(0);var h=m.map(function(g,x){var A=!m[x+1],S=A?a+l-g:m[x+1]-g;if(S<=0)return null;var w=x%t.length;return L.createElement("rect",{key:"react-".concat(x),y:g,x:r,height:S,width:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function Cbe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,o=e.x,l=e.y,c=e.width,f=e.height,d=e.verticalPoints;if(!n||!r||!r.length)return null;var m=d.map(function(g){return Math.round(g+o-o)}).sort(function(g,x){return g-x});o!==m[0]&&m.unshift(0);var h=m.map(function(g,x){var A=!m[x+1],S=A?o+c-g:m[x+1]-g;if(S<=0)return null;var w=x%r.length;return L.createElement("rect",{key:"react-".concat(x),x:g,y:l,width:S,height:f,stroke:"none",fill:r[w],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var Rbe=function(t,n){var r=t.xAxis,a=t.width,o=t.height,l=t.offset;return j8(uE(Jn(Jn(Jn({},$c.defaultProps),r),{},{ticks:Ai(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.left,l.left+l.width,n)},Nbe=function(t,n){var r=t.yAxis,a=t.width,o=t.height,l=t.offset;return j8(uE(Jn(Jn(Jn({},$c.defaultProps),r),{},{ticks:Ai(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.top,l.top+l.height,n)},Cl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function mU(e){var t,n,r,a,o,l,c=oE(),f=sE(),d=yye(),m=Jn(Jn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Cl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Cl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Cl.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Cl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Cl.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Cl.verticalFill,x:Ne(e.x)?e.x:d.left,y:Ne(e.y)?e.y:d.top,width:Ne(e.width)?e.width:d.width,height:Ne(e.height)?e.height:d.height}),h=m.x,g=m.y,x=m.width,A=m.height,S=m.syncWithTicks,w=m.horizontalValues,O=m.verticalValues,E=mye(),T=vye();if(!Ne(x)||x<=0||!Ne(A)||A<=0||!Ne(h)||h!==+h||!Ne(g)||g!==+g)return null;var C=m.verticalCoordinatesGenerator||Rbe,j=m.horizontalCoordinatesGenerator||Nbe,R=m.horizontalPoints,N=m.verticalPoints;if((!R||!R.length)&&ot(j)){var D=w&&w.length,z=j({yAxis:T?Jn(Jn({},T),{},{ticks:D?w:T.ticks}):void 0,width:c,height:f,offset:d},D?!0:S);Ei(Array.isArray(z),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(z),"]")),Array.isArray(z)&&(R=z)}if((!N||!N.length)&&ot(C)){var V=O&&O.length,U=C({xAxis:E?Jn(Jn({},E),{},{ticks:V?O:E.ticks}):void 0,width:c,height:f,offset:d},V?!0:S);Ei(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(U),"]")),Array.isArray(U)&&(N=U)}return L.createElement("g",{className:"recharts-cartesian-grid"},L.createElement(Obe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),L.createElement(Ebe,hs({},m,{offset:d,horizontalPoints:R,xAxis:E,yAxis:T})),L.createElement(Tbe,hs({},m,{offset:d,verticalPoints:N,xAxis:E,yAxis:T})),L.createElement(jbe,hs({},m,{horizontalPoints:R})),L.createElement(Cbe,hs({},m,{verticalPoints:N})))}mU.displayName="CartesianGrid";var Mbe=["layout","type","stroke","connectNulls","isRange","ref"],Pbe=["key"],vU;function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function gU(e,t){if(e==null)return{};var n=Dbe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ps.apply(this,arguments)}function pz(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 mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pz(Object(n),!0).forEach(function(r){qa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bU(r.key),r)}}function $be(e,t,n){return t&&mz(e.prototype,t),n&&mz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zbe(e,t,n){return t=Um(t),Lbe(e,yU()?Reflect.construct(t,n||[],Um(e).constructor):t.apply(e,n))}function Lbe(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ibe(e)}function Ibe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yU=function(){return!!e})()}function Um(e){return Um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Um(e)}function Bbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N_(e,t)}function N_(e,t){return N_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},N_(e,t)}function qa(e,t,n){return t=bU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bU(e){var t=Ube(e,"string");return hc(t)=="symbol"?t:t+""}function Ube(e,t){if(hc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Io=(function(e){function t(){var n;kbe(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=zbe(this,t,[].concat(a)),qa(n,"state",{isAnimationFinished:!0}),qa(n,"id",xd("recharts-area-")),qa(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),ot(l)&&l()}),qa(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),ot(l)&&l()}),n}return Bbe(t,e),$be(t,[{key:"renderDots",value:function(r,a,o){var l=this.props.isAnimationActive,c=this.state.isAnimationFinished;if(l&&!c)return null;var f=this.props,d=f.dot,m=f.points,h=f.dataKey,g=ht(this.props,!1),x=ht(d,!0),A=m.map(function(w,O){var E=mo(mo(mo({key:"dot-".concat(O),r:3},g),x),{},{index:O,cx:w.x,cy:w.y,dataKey:h,value:w.value,payload:w.payload,points:m});return t.renderDotItem(d,E)}),S={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(o,")"):null};return L.createElement(nn,ps({className:"recharts-area-dots"},S),A)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,f=l[0].x,d=l[l.length-1].x,m=r*Math.abs(f-d),h=bo(l.map(function(g){return g.y||0}));return Ne(o)&&typeof o=="number"?h=Math.max(o,h):o&&Array.isArray(o)&&o.length&&(h=Math.max(bo(o.map(function(g){return g.y||0})),h)),Ne(h)?L.createElement("rect",{x:f<d?f:f-m,y:0,width:m,height:Math.floor(h+(c?parseInt("".concat(c),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,f=l[0].y,d=l[l.length-1].y,m=r*Math.abs(f-d),h=bo(l.map(function(g){return g.x||0}));return Ne(o)&&typeof o=="number"?h=Math.max(o,h):o&&Array.isArray(o)&&o.length&&(h=Math.max(bo(o.map(function(g){return g.x||0})),h)),Ne(h)?L.createElement("rect",{x:0,y:f<d?f:f-m,width:h+(c?parseInt("".concat(c),10):1),height:Math.floor(m)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,o,l){var c=this.props,f=c.layout,d=c.type,m=c.stroke,h=c.connectNulls,g=c.isRange;c.ref;var x=gU(c,Mbe);return L.createElement(nn,{clipPath:o?"url(#clipPath-".concat(l,")"):null},L.createElement(ef,ps({},ht(x,!0),{points:r,connectNulls:h,type:d,baseLine:a,layout:f,stroke:"none",className:"recharts-area-area"})),m!=="none"&&L.createElement(ef,ps({},ht(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:h,fill:"none",points:r})),m!=="none"&&g&&L.createElement(ef,ps({},ht(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:h,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var o=this,l=this.props,c=l.points,f=l.baseLine,d=l.isAnimationActive,m=l.animationBegin,h=l.animationDuration,g=l.animationEasing,x=l.animationId,A=this.state,S=A.prevPoints,w=A.prevBaseLine;return L.createElement(Di,{begin:m,duration:h,isActive:d,easing:g,from:{t:0},to:{t:1},key:"area-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(S){var T=S.length/c.length,C=c.map(function(D,z){var V=Math.floor(z*T);if(S[V]){var U=S[V],P=Zr(U.x,D.x),B=Zr(U.y,D.y);return mo(mo({},D),{},{x:P(E),y:B(E)})}return D}),j;if(Ne(f)&&typeof f=="number"){var R=Zr(w,f);j=R(E)}else if(vt(f)||Rc(f)){var N=Zr(w,0);j=N(E)}else j=f.map(function(D,z){var V=Math.floor(z*T);if(w[V]){var U=w[V],P=Zr(U.x,D.x),B=Zr(U.y,D.y);return mo(mo({},D),{},{x:P(E),y:B(E)})}return D});return o.renderAreaStatically(C,j,r,a)}return L.createElement(nn,null,L.createElement("defs",null,L.createElement("clipPath",{id:"animationClipPath-".concat(a)},o.renderClipRect(E))),L.createElement(nn,{clipPath:"url(#animationClipPath-".concat(a,")")},o.renderAreaStatically(c,f,r,a)))})}},{key:"renderArea",value:function(r,a){var o=this.props,l=o.points,c=o.baseLine,f=o.isAnimationActive,d=this.state,m=d.prevPoints,h=d.prevBaseLine,g=d.totalLength;return f&&l&&l.length&&(!m&&g>0||!Sf(m,l)||!Sf(h,c))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,c,r,a)}},{key:"render",value:function(){var r,a=this.props,o=a.hide,l=a.dot,c=a.points,f=a.className,d=a.top,m=a.left,h=a.xAxis,g=a.yAxis,x=a.width,A=a.height,S=a.isAnimationActive,w=a.id;if(o||!c||!c.length)return null;var O=this.state.isAnimationFinished,E=c.length===1,T=yt("recharts-area",f),C=h&&h.allowDataOverflow,j=g&&g.allowDataOverflow,R=C||j,N=vt(w)?this.id:w,D=(r=ht(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},z=D.r,V=z===void 0?3:z,U=D.strokeWidth,P=U===void 0?2:U,B=aie(l)?l:{},q=B.clipDot,G=q===void 0?!0:q,$=V*2+P;return L.createElement(nn,{className:T},C||j?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(N)},L.createElement("rect",{x:C?m:m-x/2,y:j?d:d-A/2,width:C?x:x*2,height:j?A:A*2})),!G&&L.createElement("clipPath",{id:"clipPath-dots-".concat(N)},L.createElement("rect",{x:m-$/2,y:d-$/2,width:x+$,height:A+$}))):null,E?null:this.renderArea(R,N),(l||E)&&this.renderDots(R,G,N),(!S||O)&&Ao.renderCallByParent(this.props,c))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(y.PureComponent);vU=Io;qa(Io,"displayName","Area");qa(Io,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Mc.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});qa(Io,"getBaseValue",function(e,t,n,r){var a=e.layout,o=e.baseValue,l=t.props.baseValue,c=l??o;if(Ne(c)&&typeof c=="number")return c;var f=a==="horizontal"?r:n,d=f.scale.domain();if(f.type==="number"){var m=Math.max(d[0],d[1]),h=Math.min(d[0],d[1]);return c==="dataMin"?h:c==="dataMax"||m<0?m:Math.max(Math.min(d[0],d[1]),0)}return c==="dataMin"?d[0]:c==="dataMax"?d[1]:d[0]});qa(Io,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,c=e.bandSize,f=e.dataKey,d=e.stackedData,m=e.dataStartIndex,h=e.displayedData,g=e.offset,x=t.layout,A=d&&d.length,S=vU.getBaseValue(t,n,r,a),w=x==="horizontal",O=!1,E=h.map(function(C,j){var R;A?R=d[m+j]:(R=Pr(C,f),Array.isArray(R)?O=!0:R=[S,R]);var N=R[1]==null||A&&Pr(C,f)==null;return w?{x:Pk({axis:r,ticks:o,bandSize:c,entry:C,index:j}),y:N?null:a.scale(R[1]),value:R,payload:C}:{x:N?null:r.scale(R[1]),y:Pk({axis:a,ticks:l,bandSize:c,entry:C,index:j}),value:R,payload:C}}),T;return A||O?T=E.map(function(C){var j=Array.isArray(C.value)?C.value[0]:null;return w?{x:C.x,y:j!=null&&C.y!=null?a.scale(j):null}:{x:j!=null?r.scale(j):null,y:C.y}}):T=w?a.scale(S):r.scale(S),mo({points:E,baseLine:T,layout:x,isRange:O},g)});qa(Io,"renderDotItem",function(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(ot(e))n=e(t);else{var r=yt("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,o=gU(t,Pbe);n=L.createElement(nE,ps({},o,{key:a,className:r}))}return n});function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function qbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hbe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SU(r.key),r)}}function Fbe(e,t,n){return t&&Hbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vbe(e,t,n){return t=qm(t),Gbe(e,xU()?Reflect.construct(t,n||[],qm(e).constructor):t.apply(e,n))}function Gbe(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wbe(e)}function Wbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xU=function(){return!!e})()}function qm(e){return qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qm(e)}function Ybe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M_(e,t)}function M_(e,t){return M_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},M_(e,t)}function wU(e,t,n){return t=SU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SU(e){var t=Zbe(e,"string");return pc(t)=="symbol"?t:t+""}function Zbe(e,t){if(pc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P_.apply(this,arguments)}function Kbe(e){var t=e.xAxisId,n=oE(),r=sE(),a=rU(t);return a==null?null:y.createElement($c,P_({},a,{className:yt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Ai(l,!0)}}))}var sg=(function(e){function t(){return qbe(this,t),Vbe(this,t,arguments)}return Ybe(t,e),Fbe(t,[{key:"render",value:function(){return y.createElement(Kbe,this.props)}}])})(y.Component);wU(sg,"displayName","XAxis");wU(sg,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function mc(e){"@babel/helpers - typeof";return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(e)}function Xbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qbe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OU(r.key),r)}}function Jbe(e,t,n){return t&&Qbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function e0e(e,t,n){return t=Hm(t),t0e(e,_U()?Reflect.construct(t,n||[],Hm(e).constructor):t.apply(e,n))}function t0e(e,t){if(t&&(mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n0e(e)}function n0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_U=function(){return!!e})()}function Hm(e){return Hm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hm(e)}function r0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D_(e,t)}function D_(e,t){return D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},D_(e,t)}function AU(e,t,n){return t=OU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OU(e){var t=a0e(e,"string");return mc(t)=="symbol"?t:t+""}function a0e(e,t){if(mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(this,arguments)}var i0e=function(t){var n=t.yAxisId,r=oE(),a=sE(),o=aU(n);return o==null?null:y.createElement($c,k_({},o,{className:yt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(c){return Ai(c,!0)}}))},lg=(function(e){function t(){return Xbe(this,t),e0e(this,t,arguments)}return r0e(t,e),Jbe(t,[{key:"render",value:function(){return y.createElement(i0e,this.props)}}])})(y.Component);AU(lg,"displayName","YAxis");AU(lg,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function vz(e){return c0e(e)||l0e(e)||s0e(e)||o0e()}function o0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
491
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s0e(e,t){if(e){if(typeof e=="string")return $_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $_(e,t)}}function l0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c0e(e){if(Array.isArray(e))return $_(e)}function $_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z_=function(t,n,r,a,o){var l=_a(t,cE),c=_a(t,ag),f=[].concat(vz(l),vz(c)),d=_a(t,og),m="".concat(a,"Id"),h=a[0],g=n;if(f.length&&(g=f.reduce(function(S,w){if(w.props[m]===r&&Wa(w.props,"extendDomain")&&Ne(w.props[h])){var O=w.props[h];return[Math.min(S[0],O),Math.max(S[1],O)]}return S},g)),d.length){var x="".concat(h,"1"),A="".concat(h,"2");g=d.reduce(function(S,w){if(w.props[m]===r&&Wa(w.props,"extendDomain")&&Ne(w.props[x])&&Ne(w.props[A])){var O=w.props[x],E=w.props[A];return[Math.min(S[0],O,E),Math.max(S[1],O,E)]}return S},g)}return o&&o.length&&(g=o.reduce(function(S,w){return Ne(w)?[Math.min(S[0],w),Math.max(S[1],w)]:S},g)),g},U1={exports:{}},gz;function u0e(){return gz||(gz=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,d,m){this.fn=f,this.context=d,this.once=m||!1}function o(f,d,m,h,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new a(m,h||f,g),A=n?n+d:d;return f._events[A]?f._events[A].fn?f._events[A]=[f._events[A],x]:f._events[A].push(x):(f._events[A]=x,f._eventsCount++),f}function l(f,d){--f._eventsCount===0?f._events=new r:delete f._events[d]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],m,h;if(this._eventsCount===0)return d;for(h in m=this._events)t.call(m,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},c.prototype.listeners=function(d){var m=n?n+d:d,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,x=h.length,A=new Array(x);g<x;g++)A[g]=h[g].fn;return A},c.prototype.listenerCount=function(d){var m=n?n+d:d,h=this._events[m];return h?h.fn?1:h.length:0},c.prototype.emit=function(d,m,h,g,x,A){var S=n?n+d:d;if(!this._events[S])return!1;var w=this._events[S],O=arguments.length,E,T;if(w.fn){switch(w.once&&this.removeListener(d,w.fn,void 0,!0),O){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,m),!0;case 3:return w.fn.call(w.context,m,h),!0;case 4:return w.fn.call(w.context,m,h,g),!0;case 5:return w.fn.call(w.context,m,h,g,x),!0;case 6:return w.fn.call(w.context,m,h,g,x,A),!0}for(T=1,E=new Array(O-1);T<O;T++)E[T-1]=arguments[T];w.fn.apply(w.context,E)}else{var C=w.length,j;for(T=0;T<C;T++)switch(w[T].once&&this.removeListener(d,w[T].fn,void 0,!0),O){case 1:w[T].fn.call(w[T].context);break;case 2:w[T].fn.call(w[T].context,m);break;case 3:w[T].fn.call(w[T].context,m,h);break;case 4:w[T].fn.call(w[T].context,m,h,g);break;default:if(!E)for(j=1,E=new Array(O-1);j<O;j++)E[j-1]=arguments[j];w[T].fn.apply(w[T].context,E)}}return!0},c.prototype.on=function(d,m,h){return o(this,d,m,h,!1)},c.prototype.once=function(d,m,h){return o(this,d,m,h,!0)},c.prototype.removeListener=function(d,m,h,g){var x=n?n+d:d;if(!this._events[x])return this;if(!m)return l(this,x),this;var A=this._events[x];if(A.fn)A.fn===m&&(!g||A.once)&&(!h||A.context===h)&&l(this,x);else{for(var S=0,w=[],O=A.length;S<O;S++)(A[S].fn!==m||g&&!A[S].once||h&&A[S].context!==h)&&w.push(A[S]);w.length?this._events[x]=w.length===1?w[0]:w:l(this,x)}return this},c.prototype.removeAllListeners=function(d){var m;return d?(m=n?n+d:d,this._events[m]&&l(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})(U1)),U1.exports}var f0e=u0e();const d0e=Ut(f0e);var q1=new d0e,H1="recharts.syncMouseEvents";function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}function h0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p0e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EU(r.key),r)}}function m0e(e,t,n){return t&&p0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function F1(e,t,n){return t=EU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EU(e){var t=v0e(e,"string");return Ff(t)=="symbol"?t:t+""}function v0e(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var g0e=(function(){function e(){h0e(this,e),F1(this,"activeIndex",0),F1(this,"coordinateList",[]),F1(this,"layout","horizontal")}return m0e(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,o=a===void 0?null:a,l=n.container,c=l===void 0?null:l,f=n.layout,d=f===void 0?null:f,m=n.offset,h=m===void 0?null:m,g=n.mouseHandlerCallback,x=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=c??this.container,this.layout=d??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=x??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),o=a.x,l=a.y,c=a.height,f=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=o+f+d,g=l+this.offset.top+c/2+m;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function y0e(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&Ne(r)&&Ne(a))return!0}return!1}function b0e(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 TU(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,o=e.endAngle,l=qn(t,n,r,a),c=qn(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:a,endAngle:o}}function x0e(e,t,n){var r,a,o,l;if(e==="horizontal")r=t.x,o=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var c=t.cx,f=t.cy,d=t.innerRadius,m=t.outerRadius,h=t.angle,g=qn(c,f,d,h),x=qn(c,f,m,h);r=g.x,a=g.y,o=x.x,l=x.y}else return TU(t);return[{x:r,y:a},{x:o,y:l}]}function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vf(e)}function yz(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 cp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yz(Object(n),!0).forEach(function(r){w0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w0e(e,t,n){return t=S0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S0e(e){var t=_0e(e,"string");return Vf(t)=="symbol"?t:t+""}function _0e(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A0e(e){var t,n,r=e.element,a=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,c=e.activePayload,f=e.offset,d=e.activeTooltipIndex,m=e.tooltipAxisBandSize,h=e.layout,g=e.chartName,x=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!x||!o||!l||g!=="ScatterChart"&&a!=="axis")return null;var A,S=ef;if(g==="ScatterChart")A=l,S=Ove;else if(g==="BarChart")A=b0e(h,l,f,m),S=tE;else if(h==="radial"){var w=TU(l),O=w.cx,E=w.cy,T=w.radius,C=w.startAngle,j=w.endAngle;A={cx:O,cy:E,startAngle:C,endAngle:j,innerRadius:T,outerRadius:T},S=P8}else A={points:x0e(h,l,f)},S=ef;var R=cp(cp(cp(cp({stroke:"#ccc",pointerEvents:"none"},f),A),ht(x,!1)),{},{payload:c,payloadIndex:d,className:yt("recharts-tooltip-cursor",x.className)});return y.isValidElement(x)?y.cloneElement(x,R):y.createElement(S,R)}var O0e=["item"],E0e=["children","className","width","height","style","compact","title","desc"];function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dl.apply(this,arguments)}function bz(e,t){return C0e(e)||j0e(e,t)||CU(e,t)||T0e()}function T0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
492
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j0e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return c}}function C0e(e){if(Array.isArray(e))return e}function xz(e,t){if(e==null)return{};var n=R0e(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function N0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M0e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RU(r.key),r)}}function P0e(e,t,n){return t&&M0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function D0e(e,t,n){return t=Fm(t),k0e(e,jU()?Reflect.construct(t,n||[],Fm(e).constructor):t.apply(e,n))}function k0e(e,t){if(t&&(vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $0e(e)}function $0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jU=function(){return!!e})()}function Fm(e){return Fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fm(e)}function z0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L_(e,t)}function L_(e,t){return L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},L_(e,t)}function gc(e){return B0e(e)||I0e(e)||CU(e)||L0e()}function L0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
493
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CU(e,t){if(e){if(typeof e=="string")return I_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I_(e,t)}}function I0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B0e(e){if(Array.isArray(e))return I_(e)}function I_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wz(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 me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wz(Object(n),!0).forEach(function(r){We(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function We(e,t,n){return t=RU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RU(e){var t=U0e(e,"string");return vc(t)=="symbol"?t:t+""}function U0e(e,t){if(vc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var q0e={xAxis:["bottom","top"],yAxis:["left","right"]},H0e={width:"100%",height:"100%"},NU={x:0,y:0};function up(e){return e}var F0e=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},V0e=function(t,n,r,a){var o=n.find(function(m){return m&&m.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,c=a.radius;return me(me(me({},a),qn(a.cx,a.cy,c,l)),{},{angle:l,radius:c})}var f=o.coordinate,d=a.angle;return me(me(me({},a),qn(a.cx,a.cy,f,d)),{},{angle:d,radius:f})}return NU},cg=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(c,f){var d=f.props.data;return d&&d.length?[].concat(gc(c),gc(d)):c},[]);return l.length>0?l:t&&t.length&&Ne(a)&&Ne(o)?t.slice(a,o+1):[]};function MU(e){return e==="number"?[0,"auto"]:void 0}var B_=function(t,n,r,a){var o=t.graphicalItems,l=t.tooltipAxis,c=cg(n,t);return r<0||!o||!o.length||r>=c.length?null:o.reduce(function(f,d){var m,h=(m=d.props.data)!==null&&m!==void 0?m:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var x=h===void 0?c:h;g=Wp(x,l.dataKey,a)}else g=h&&h[r]||c[r];return g?[].concat(gc(f),[R8(d,g)]):f},[])},Sz=function(t,n,r,a){var o=a||{x:t.chartX,y:t.chartY},l=F0e(o,r),c=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,m=ahe(l,c,d,f);if(m>=0&&d){var h=d[m]&&d[m].value,g=B_(t,n,m,h),x=V0e(r,c,m,o);return{activeTooltipIndex:m,activeLabel:h,activePayload:g,activeCoordinate:x}}return null},G0e=function(t,n){var r=n.axes,a=n.graphicalItems,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,h=t.children,g=t.stackOffset,x=T8(m,o);return r.reduce(function(A,S){var w,O=S.type.defaultProps!==void 0?me(me({},S.type.defaultProps),S.props):S.props,E=O.type,T=O.dataKey,C=O.allowDataOverflow,j=O.allowDuplicatedCategory,R=O.scale,N=O.ticks,D=O.includeHidden,z=O[l];if(A[z])return A;var V=cg(t.data,{graphicalItems:a.filter(function(Y){var Q,ce=l in Y.props?Y.props[l]:(Q=Y.type.defaultProps)===null||Q===void 0?void 0:Q[l];return ce===z}),dataStartIndex:f,dataEndIndex:d}),U=V.length,P,B,q;y0e(O.domain,C,E)&&(P=i_(O.domain,null,C),x&&(E==="number"||R!=="auto")&&(q=Ju(V,T,"category")));var G=MU(E);if(!P||P.length===0){var $,F=($=O.domain)!==null&&$!==void 0?$:G;if(T){if(P=Ju(V,T,E),E==="category"&&x){var Z=Yae(P);j&&Z?(B=P,P=Nm(0,U)):j||(P=zk(F,P,S).reduce(function(Y,Q){return Y.indexOf(Q)>=0?Y:[].concat(gc(Y),[Q])},[]))}else if(E==="category")j?P=P.filter(function(Y){return Y!==""&&!vt(Y)}):P=zk(F,P,S).reduce(function(Y,Q){return Y.indexOf(Q)>=0||Q===""||vt(Q)?Y:[].concat(gc(Y),[Q])},[]);else if(E==="number"){var X=che(V,a.filter(function(Y){var Q,ce,ve=l in Y.props?Y.props[l]:(Q=Y.type.defaultProps)===null||Q===void 0?void 0:Q[l],fe="hide"in Y.props?Y.props.hide:(ce=Y.type.defaultProps)===null||ce===void 0?void 0:ce.hide;return ve===z&&(D||!fe)}),T,o,m);X&&(P=X)}x&&(E==="number"||R!=="auto")&&(q=Ju(V,T,"category"))}else x?P=Nm(0,U):c&&c[z]&&c[z].hasStack&&E==="number"?P=g==="expand"?[0,1]:C8(c[z].stackGroups,f,d):P=E8(V,a.filter(function(Y){var Q=l in Y.props?Y.props[l]:Y.type.defaultProps[l],ce="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return Q===z&&(D||!ce)}),E,m,!0);if(E==="number")P=z_(h,P,z,o,N),F&&(P=i_(F,P,C));else if(E==="category"&&F){var oe=F,I=P.every(function(Y){return oe.indexOf(Y)>=0});I&&(P=oe)}}return me(me({},A),{},We({},z,me(me({},O),{},{axisType:o,domain:P,categoricalDomain:q,duplicateDomain:B,originalDomain:(w=O.domain)!==null&&w!==void 0?w:G,isCategorical:x,layout:m})))},{})},W0e=function(t,n){var r=n.graphicalItems,a=n.Axis,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,h=t.children,g=cg(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:d}),x=g.length,A=T8(m,o),S=-1;return r.reduce(function(w,O){var E=O.type.defaultProps!==void 0?me(me({},O.type.defaultProps),O.props):O.props,T=E[l],C=MU("number");if(!w[T]){S++;var j;return A?j=Nm(0,x):c&&c[T]&&c[T].hasStack?(j=C8(c[T].stackGroups,f,d),j=z_(h,j,T,o)):(j=i_(C,E8(g,r.filter(function(R){var N,D,z=l in R.props?R.props[l]:(N=R.type.defaultProps)===null||N===void 0?void 0:N[l],V="hide"in R.props?R.props.hide:(D=R.type.defaultProps)===null||D===void 0?void 0:D.hide;return z===T&&!V}),"number",m),a.defaultProps.allowDataOverflow),j=z_(h,j,T,o)),me(me({},w),{},We({},T,me(me({axisType:o},a.defaultProps),{},{hide:!0,orientation:na(q0e,"".concat(o,".").concat(S%2),null),domain:j,originalDomain:C,isCategorical:A,layout:m})))}return w},{})},Y0e=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.children,h="".concat(a,"Id"),g=_a(m,o),x={};return g&&g.length?x=G0e(t,{axes:g,graphicalItems:l,axisType:a,axisIdKey:h,stackGroups:c,dataStartIndex:f,dataEndIndex:d}):l&&l.length&&(x=W0e(t,{Axis:o,graphicalItems:l,axisType:a,axisIdKey:h,stackGroups:c,dataStartIndex:f,dataEndIndex:d})),x},Z0e=function(t){var n=yo(t),r=Ai(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:jO(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:wm(n,r)}},_z=function(t){var n=t.children,r=t.defaultShowTooltip,a=Tr(n,sc),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},K0e=function(t){return!t||!t.length?!1:t.some(function(n){var r=Oi(n&&n.type);return r&&r.indexOf("Bar")>=0})},Az=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},X0e=function(t,n){var r=t.props,a=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,c=t.yAxisMap,f=c===void 0?{}:c,d=r.width,m=r.height,h=r.children,g=r.margin||{},x=Tr(h,sc),A=Tr(h,Ul),S=Object.keys(f).reduce(function(j,R){var N=f[R],D=N.orientation;return!N.mirror&&!N.hide?me(me({},j),{},We({},D,j[D]+N.width)):j},{left:g.left||0,right:g.right||0}),w=Object.keys(l).reduce(function(j,R){var N=l[R],D=N.orientation;return!N.mirror&&!N.hide?me(me({},j),{},We({},D,na(j,"".concat(D))+N.height)):j},{top:g.top||0,bottom:g.bottom||0}),O=me(me({},w),S),E=O.bottom;x&&(O.bottom+=x.props.height||sc.defaultProps.height),A&&n&&(O=she(O,a,r,n));var T=d-O.left-O.right,C=m-O.top-O.bottom;return me(me({brushBottom:E},O),{},{width:Math.max(T,0),height:Math.max(C,0)})},Q0e=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},J0e=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,l=t.validateTooltipEventTypes,c=l===void 0?["axis"]:l,f=t.axisComponents,d=t.legendContent,m=t.formatAxisMap,h=t.defaultProps,g=function(O,E){var T=E.graphicalItems,C=E.stackGroups,j=E.offset,R=E.updateId,N=E.dataStartIndex,D=E.dataEndIndex,z=O.barSize,V=O.layout,U=O.barGap,P=O.barCategoryGap,B=O.maxBarSize,q=Az(V),G=q.numericAxisName,$=q.cateAxisName,F=K0e(T),Z=[];return T.forEach(function(X,oe){var I=cg(O.data,{graphicalItems:[X],dataStartIndex:N,dataEndIndex:D}),Y=X.type.defaultProps!==void 0?me(me({},X.type.defaultProps),X.props):X.props,Q=Y.dataKey,ce=Y.maxBarSize,ve=Y["".concat(G,"Id")],fe=Y["".concat($,"Id")],ue={},xe=f.reduce(function(an,St){var An=E["".concat(St.axisType,"Map")],H=Y["".concat(St.axisType,"Id")];An&&An[H]||St.axisType==="zAxis"||Cs();var ee=An[H];return me(me({},an),{},We(We({},St.axisType,ee),"".concat(St.axisType,"Ticks"),Ai(ee)))},ue),se=xe[$],_e=xe["".concat($,"Ticks")],Se=C&&C[ve]&&C[ve].hasStack&&whe(X,C[ve].stackGroups),ne=Oi(X.type).indexOf("Bar")>=0,Ue=wm(se,_e),$e=[],rt=F&&ihe({barSize:z,stackGroups:C,totalSize:Q0e(xe,$)});if(ne){var et,tt,qt=vt(ce)?B:ce,ct=(et=(tt=wm(se,_e,!0))!==null&&tt!==void 0?tt:qt)!==null&&et!==void 0?et:0;$e=ohe({barGap:U,barCategoryGap:P,bandSize:ct!==Ue?ct:Ue,sizeList:rt[fe],maxBarSize:qt}),ct!==Ue&&($e=$e.map(function(an){return me(me({},an),{},{position:me(me({},an.position),{},{offset:an.position.offset-ct/2})})}))}var pn=X&&X.type&&X.type.getComposedData;pn&&Z.push({props:me(me({},pn(me(me({},xe),{},{displayedData:I,props:O,dataKey:Q,item:X,bandSize:Ue,barPosition:$e,offset:j,stackedData:Se,layout:V,dataStartIndex:N,dataEndIndex:D}))),{},We(We(We({key:X.key||"item-".concat(oe)},G,xe[G]),$,xe[$]),"animationId",R)),childIndex:sie(X,O.children),item:X})}),Z},x=function(O,E){var T=O.props,C=O.dataStartIndex,j=O.dataEndIndex,R=O.updateId;if(!XN({props:T}))return null;var N=T.children,D=T.layout,z=T.stackOffset,V=T.data,U=T.reverseStackOrder,P=Az(D),B=P.numericAxisName,q=P.cateAxisName,G=_a(N,r),$=yhe(V,G,"".concat(B,"Id"),"".concat(q,"Id"),z,U),F=f.reduce(function(Y,Q){var ce="".concat(Q.axisType,"Map");return me(me({},Y),{},We({},ce,Y0e(T,me(me({},Q),{},{graphicalItems:G,stackGroups:Q.axisType===B&&$,dataStartIndex:C,dataEndIndex:j}))))},{}),Z=X0e(me(me({},F),{},{props:T,graphicalItems:G}),E==null?void 0:E.legendBBox);Object.keys(F).forEach(function(Y){F[Y]=m(T,F[Y],Z,Y.replace("Map",""),n)});var X=F["".concat(q,"Map")],oe=Z0e(X),I=g(T,me(me({},F),{},{dataStartIndex:C,dataEndIndex:j,updateId:R,graphicalItems:G,stackGroups:$,offset:Z}));return me(me({formattedGraphicalItems:I,graphicalItems:G,offset:Z,stackGroups:$},oe),F)},A=(function(w){function O(E){var T,C,j;return N0e(this,O),j=D0e(this,O,[E]),We(j,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),We(j,"accessibilityManager",new g0e),We(j,"handleLegendBBoxUpdate",function(R){if(R){var N=j.state,D=N.dataStartIndex,z=N.dataEndIndex,V=N.updateId;j.setState(me({legendBBox:R},x({props:j.props,dataStartIndex:D,dataEndIndex:z,updateId:V},me(me({},j.state),{},{legendBBox:R}))))}}),We(j,"handleReceiveSyncEvent",function(R,N,D){if(j.props.syncId===R){if(D===j.eventEmitterSymbol&&typeof j.props.syncMethod!="function")return;j.applySyncEvent(N)}}),We(j,"handleBrushChange",function(R){var N=R.startIndex,D=R.endIndex;if(N!==j.state.dataStartIndex||D!==j.state.dataEndIndex){var z=j.state.updateId;j.setState(function(){return me({dataStartIndex:N,dataEndIndex:D},x({props:j.props,dataStartIndex:N,dataEndIndex:D,updateId:z},j.state))}),j.triggerSyncEvent({dataStartIndex:N,dataEndIndex:D})}}),We(j,"handleMouseEnter",function(R){var N=j.getMouseInfo(R);if(N){var D=me(me({},N),{},{isTooltipActive:!0});j.setState(D),j.triggerSyncEvent(D);var z=j.props.onMouseEnter;ot(z)&&z(D,R)}}),We(j,"triggeredAfterMouseMove",function(R){var N=j.getMouseInfo(R),D=N?me(me({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};j.setState(D),j.triggerSyncEvent(D);var z=j.props.onMouseMove;ot(z)&&z(D,R)}),We(j,"handleItemMouseEnter",function(R){j.setState(function(){return{isTooltipActive:!0,activeItem:R,activePayload:R.tooltipPayload,activeCoordinate:R.tooltipPosition||{x:R.cx,y:R.cy}}})}),We(j,"handleItemMouseLeave",function(){j.setState(function(){return{isTooltipActive:!1}})}),We(j,"handleMouseMove",function(R){R.persist(),j.throttleTriggeredAfterMouseMove(R)}),We(j,"handleMouseLeave",function(R){j.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};j.setState(N),j.triggerSyncEvent(N);var D=j.props.onMouseLeave;ot(D)&&D(N,R)}),We(j,"handleOuterEvent",function(R){var N=oie(R),D=na(j.props,"".concat(N));if(N&&ot(D)){var z,V;/.*touch.*/i.test(N)?V=j.getMouseInfo(R.changedTouches[0]):V=j.getMouseInfo(R),D((z=V)!==null&&z!==void 0?z:{},R)}}),We(j,"handleClick",function(R){var N=j.getMouseInfo(R);if(N){var D=me(me({},N),{},{isTooltipActive:!0});j.setState(D),j.triggerSyncEvent(D);var z=j.props.onClick;ot(z)&&z(D,R)}}),We(j,"handleMouseDown",function(R){var N=j.props.onMouseDown;if(ot(N)){var D=j.getMouseInfo(R);N(D,R)}}),We(j,"handleMouseUp",function(R){var N=j.props.onMouseUp;if(ot(N)){var D=j.getMouseInfo(R);N(D,R)}}),We(j,"handleTouchMove",function(R){R.changedTouches!=null&&R.changedTouches.length>0&&j.throttleTriggeredAfterMouseMove(R.changedTouches[0])}),We(j,"handleTouchStart",function(R){R.changedTouches!=null&&R.changedTouches.length>0&&j.handleMouseDown(R.changedTouches[0])}),We(j,"handleTouchEnd",function(R){R.changedTouches!=null&&R.changedTouches.length>0&&j.handleMouseUp(R.changedTouches[0])}),We(j,"handleDoubleClick",function(R){var N=j.props.onDoubleClick;if(ot(N)){var D=j.getMouseInfo(R);N(D,R)}}),We(j,"handleContextMenu",function(R){var N=j.props.onContextMenu;if(ot(N)){var D=j.getMouseInfo(R);N(D,R)}}),We(j,"triggerSyncEvent",function(R){j.props.syncId!==void 0&&q1.emit(H1,j.props.syncId,R,j.eventEmitterSymbol)}),We(j,"applySyncEvent",function(R){var N=j.props,D=N.layout,z=N.syncMethod,V=j.state.updateId,U=R.dataStartIndex,P=R.dataEndIndex;if(R.dataStartIndex!==void 0||R.dataEndIndex!==void 0)j.setState(me({dataStartIndex:U,dataEndIndex:P},x({props:j.props,dataStartIndex:U,dataEndIndex:P,updateId:V},j.state)));else if(R.activeTooltipIndex!==void 0){var B=R.chartX,q=R.chartY,G=R.activeTooltipIndex,$=j.state,F=$.offset,Z=$.tooltipTicks;if(!F)return;if(typeof z=="function")G=z(Z,R);else if(z==="value"){G=-1;for(var X=0;X<Z.length;X++)if(Z[X].value===R.activeLabel){G=X;break}}var oe=me(me({},F),{},{x:F.left,y:F.top}),I=Math.min(B,oe.x+oe.width),Y=Math.min(q,oe.y+oe.height),Q=Z[G]&&Z[G].value,ce=B_(j.state,j.props.data,G),ve=Z[G]?{x:D==="horizontal"?Z[G].coordinate:I,y:D==="horizontal"?Y:Z[G].coordinate}:NU;j.setState(me(me({},R),{},{activeLabel:Q,activeCoordinate:ve,activePayload:ce,activeTooltipIndex:G}))}else j.setState(R)}),We(j,"renderCursor",function(R){var N,D=j.state,z=D.isTooltipActive,V=D.activeCoordinate,U=D.activePayload,P=D.offset,B=D.activeTooltipIndex,q=D.tooltipAxisBandSize,G=j.getTooltipEventType(),$=(N=R.props.active)!==null&&N!==void 0?N:z,F=j.props.layout,Z=R.key||"_recharts-cursor";return L.createElement(A0e,{key:Z,activeCoordinate:V,activePayload:U,activeTooltipIndex:B,chartName:n,element:R,isActive:$,layout:F,offset:P,tooltipAxisBandSize:q,tooltipEventType:G})}),We(j,"renderPolarAxis",function(R,N,D){var z=na(R,"type.axisType"),V=na(j.state,"".concat(z,"Map")),U=R.type.defaultProps,P=U!==void 0?me(me({},U),R.props):R.props,B=V&&V[P["".concat(z,"Id")]];return y.cloneElement(R,me(me({},B),{},{className:yt(z,B.className),key:R.key||"".concat(N,"-").concat(D),ticks:Ai(B,!0)}))}),We(j,"renderPolarGrid",function(R){var N=R.props,D=N.radialLines,z=N.polarAngles,V=N.polarRadius,U=j.state,P=U.radiusAxisMap,B=U.angleAxisMap,q=yo(P),G=yo(B),$=G.cx,F=G.cy,Z=G.innerRadius,X=G.outerRadius;return y.cloneElement(R,{polarAngles:Array.isArray(z)?z:Ai(G,!0).map(function(oe){return oe.coordinate}),polarRadius:Array.isArray(V)?V:Ai(q,!0).map(function(oe){return oe.coordinate}),cx:$,cy:F,innerRadius:Z,outerRadius:X,key:R.key||"polar-grid",radialLines:D})}),We(j,"renderLegend",function(){var R=j.state.formattedGraphicalItems,N=j.props,D=N.children,z=N.width,V=N.height,U=j.props.margin||{},P=z-(U.left||0)-(U.right||0),B=A8({children:D,formattedGraphicalItems:R,legendWidth:P,legendContent:d});if(!B)return null;var q=B.item,G=xz(B,O0e);return y.cloneElement(q,me(me({},G),{},{chartWidth:z,chartHeight:V,margin:U,onBBoxUpdate:j.handleLegendBBoxUpdate}))}),We(j,"renderTooltip",function(){var R,N=j.props,D=N.children,z=N.accessibilityLayer,V=Tr(D,za);if(!V)return null;var U=j.state,P=U.isTooltipActive,B=U.activeCoordinate,q=U.activePayload,G=U.activeLabel,$=U.offset,F=(R=V.props.active)!==null&&R!==void 0?R:P;return y.cloneElement(V,{viewBox:me(me({},$),{},{x:$.left,y:$.top}),active:F,label:G,payload:F?q:[],coordinate:B,accessibilityLayer:z})}),We(j,"renderBrush",function(R){var N=j.props,D=N.margin,z=N.data,V=j.state,U=V.offset,P=V.dataStartIndex,B=V.dataEndIndex,q=V.updateId;return y.cloneElement(R,{key:R.key||"_recharts-brush",onChange:ip(j.handleBrushChange,R.props.onChange),data:z,x:Ne(R.props.x)?R.props.x:U.left,y:Ne(R.props.y)?R.props.y:U.top+U.height+U.brushBottom-(D.bottom||0),width:Ne(R.props.width)?R.props.width:U.width,startIndex:P,endIndex:B,updateId:"brush-".concat(q)})}),We(j,"renderReferenceElement",function(R,N,D){if(!R)return null;var z=j,V=z.clipPathId,U=j.state,P=U.xAxisMap,B=U.yAxisMap,q=U.offset,G=R.type.defaultProps||{},$=R.props,F=$.xAxisId,Z=F===void 0?G.xAxisId:F,X=$.yAxisId,oe=X===void 0?G.yAxisId:X;return y.cloneElement(R,{key:R.key||"".concat(N,"-").concat(D),xAxis:P[Z],yAxis:B[oe],viewBox:{x:q.left,y:q.top,width:q.width,height:q.height},clipPathId:V})}),We(j,"renderActivePoints",function(R){var N=R.item,D=R.activePoint,z=R.basePoint,V=R.childIndex,U=R.isRange,P=[],B=N.props.key,q=N.item.type.defaultProps!==void 0?me(me({},N.item.type.defaultProps),N.item.props):N.item.props,G=q.activeDot,$=q.dataKey,F=me(me({index:V,dataKey:$,cx:D.x,cy:D.y,r:4,fill:eE(N.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},ht(G,!1)),Yp(G));return P.push(O.renderActiveDot(G,F,"".concat(B,"-activePoint-").concat(V))),z?P.push(O.renderActiveDot(G,me(me({},F),{},{cx:z.x,cy:z.y}),"".concat(B,"-basePoint-").concat(V))):U&&P.push(null),P}),We(j,"renderGraphicChild",function(R,N,D){var z=j.filterFormatItem(R,N,D);if(!z)return null;var V=j.getTooltipEventType(),U=j.state,P=U.isTooltipActive,B=U.tooltipAxis,q=U.activeTooltipIndex,G=U.activeLabel,$=j.props.children,F=Tr($,za),Z=z.props,X=Z.points,oe=Z.isRange,I=Z.baseLine,Y=z.item.type.defaultProps!==void 0?me(me({},z.item.type.defaultProps),z.item.props):z.item.props,Q=Y.activeDot,ce=Y.hide,ve=Y.activeBar,fe=Y.activeShape,ue=!!(!ce&&P&&F&&(Q||ve||fe)),xe={};V!=="axis"&&F&&F.props.trigger==="click"?xe={onClick:ip(j.handleItemMouseEnter,R.props.onClick)}:V!=="axis"&&(xe={onMouseLeave:ip(j.handleItemMouseLeave,R.props.onMouseLeave),onMouseEnter:ip(j.handleItemMouseEnter,R.props.onMouseEnter)});var se=y.cloneElement(R,me(me({},z.props),xe));function _e(St){return typeof B.dataKey=="function"?B.dataKey(St.payload):null}if(ue)if(q>=0){var Se,ne;if(B.dataKey&&!B.allowDuplicatedCategory){var Ue=typeof B.dataKey=="function"?_e:"payload.".concat(B.dataKey.toString());Se=Wp(X,Ue,G),ne=oe&&I&&Wp(I,Ue,G)}else Se=X==null?void 0:X[q],ne=oe&&I&&I[q];if(fe||ve){var $e=R.props.activeIndex!==void 0?R.props.activeIndex:q;return[y.cloneElement(R,me(me(me({},z.props),xe),{},{activeIndex:$e})),null,null]}if(!vt(Se))return[se].concat(gc(j.renderActivePoints({item:z,activePoint:Se,basePoint:ne,childIndex:q,isRange:oe})))}else{var rt,et=(rt=j.getItemByXY(j.state.activeCoordinate))!==null&&rt!==void 0?rt:{graphicalItem:se},tt=et.graphicalItem,qt=tt.item,ct=qt===void 0?R:qt,pn=tt.childIndex,an=me(me(me({},z.props),xe),{},{activeIndex:pn});return[y.cloneElement(ct,an),null,null]}return oe?[se,null,null]:[se,null]}),We(j,"renderCustomized",function(R,N,D){return y.cloneElement(R,me(me({key:"recharts-customized-".concat(D)},j.props),j.state))}),We(j,"renderMap",{CartesianGrid:{handler:up,once:!0},ReferenceArea:{handler:j.renderReferenceElement},ReferenceLine:{handler:up},ReferenceDot:{handler:j.renderReferenceElement},XAxis:{handler:up},YAxis:{handler:up},Brush:{handler:j.renderBrush,once:!0},Bar:{handler:j.renderGraphicChild},Line:{handler:j.renderGraphicChild},Area:{handler:j.renderGraphicChild},Radar:{handler:j.renderGraphicChild},RadialBar:{handler:j.renderGraphicChild},Scatter:{handler:j.renderGraphicChild},Pie:{handler:j.renderGraphicChild},Funnel:{handler:j.renderGraphicChild},Tooltip:{handler:j.renderCursor,once:!0},PolarGrid:{handler:j.renderPolarGrid,once:!0},PolarAngleAxis:{handler:j.renderPolarAxis},PolarRadiusAxis:{handler:j.renderPolarAxis},Customized:{handler:j.renderCustomized}}),j.clipPathId="".concat((T=E.id)!==null&&T!==void 0?T:xd("recharts"),"-clip"),j.throttleTriggeredAfterMouseMove=A6(j.triggeredAfterMouseMove,(C=E.throttleDelay)!==null&&C!==void 0?C:1e3/60),j.state={},j}return z0e(O,w),P0e(O,[{key:"componentDidMount",value:function(){var T,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var T=this.props,C=T.children,j=T.data,R=T.height,N=T.layout,D=Tr(C,za);if(D){var z=D.props.defaultIndex;if(!(typeof z!="number"||z<0||z>this.state.tooltipTicks.length-1)){var V=this.state.tooltipTicks[z]&&this.state.tooltipTicks[z].value,U=B_(this.state,j,z,V),P=this.state.tooltipTicks[z].coordinate,B=(this.state.offset.top+R)/2,q=N==="horizontal",G=q?{x:P,y:B}:{y:P,x:B},$=this.state.formattedGraphicalItems.find(function(Z){var X=Z.item;return X.type.name==="Scatter"});$&&(G=me(me({},G),$.props.points[z].tooltipPosition),U=$.props.points[z].tooltipPayload);var F={activeTooltipIndex:z,isTooltipActive:!0,activeLabel:V,activePayload:U,activeCoordinate:G};this.setState(F),this.renderCursor(D),this.accessibilityManager.setIndex(z)}}}},{key:"getSnapshotBeforeUpdate",value:function(T,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==T.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==T.margin){var j,R;this.accessibilityManager.setDetails({offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(R=this.props.margin.top)!==null&&R!==void 0?R:0}})}return null}},{key:"componentDidUpdate",value:function(T){TS([Tr(T.children,za)],[Tr(this.props.children,za)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var T=Tr(this.props.children,za);if(T&&typeof T.props.shared=="boolean"){var C=T.props.shared?"axis":"item";return c.indexOf(C)>=0?C:o}return o}},{key:"getMouseInfo",value:function(T){if(!this.container)return null;var C=this.container,j=C.getBoundingClientRect(),R=Yle(j),N={chartX:Math.round(T.pageX-R.left),chartY:Math.round(T.pageY-R.top)},D=j.width/C.offsetWidth||1,z=this.inRange(N.chartX,N.chartY,D);if(!z)return null;var V=this.state,U=V.xAxisMap,P=V.yAxisMap,B=this.getTooltipEventType(),q=Sz(this.state,this.props.data,this.props.layout,z);if(B!=="axis"&&U&&P){var G=yo(U).scale,$=yo(P).scale,F=G&&G.invert?G.invert(N.chartX):null,Z=$&&$.invert?$.invert(N.chartY):null;return me(me({},N),{},{xValue:F,yValue:Z},q)}return q?me(me({},N),q):null}},{key:"inRange",value:function(T,C){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,R=this.props.layout,N=T/j,D=C/j;if(R==="horizontal"||R==="vertical"){var z=this.state.offset,V=N>=z.left&&N<=z.left+z.width&&D>=z.top&&D<=z.top+z.height;return V?{x:N,y:D}:null}var U=this.state,P=U.angleAxisMap,B=U.radiusAxisMap;if(P&&B){var q=yo(P);return Bk({x:N,y:D},q)}return null}},{key:"parseEventsOfWrapper",value:function(){var T=this.props.children,C=this.getTooltipEventType(),j=Tr(T,za),R={};j&&C==="axis"&&(j.props.trigger==="click"?R={onClick:this.handleClick}:R={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var N=Yp(this.props,this.handleOuterEvent);return me(me({},N),R)}},{key:"addListener",value:function(){q1.on(H1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){q1.removeListener(H1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(T,C,j){for(var R=this.state.formattedGraphicalItems,N=0,D=R.length;N<D;N++){var z=R[N];if(z.item===T||z.props.key===T.key||C===Oi(z.item.type)&&j===z.childIndex)return z}return null}},{key:"renderClipPath",value:function(){var T=this.clipPathId,C=this.state.offset,j=C.left,R=C.top,N=C.height,D=C.width;return L.createElement("defs",null,L.createElement("clipPath",{id:T},L.createElement("rect",{x:j,y:R,height:N,width:D})))}},{key:"getXScales",value:function(){var T=this.state.xAxisMap;return T?Object.entries(T).reduce(function(C,j){var R=bz(j,2),N=R[0],D=R[1];return me(me({},C),{},We({},N,D.scale))},{}):null}},{key:"getYScales",value:function(){var T=this.state.yAxisMap;return T?Object.entries(T).reduce(function(C,j){var R=bz(j,2),N=R[0],D=R[1];return me(me({},C),{},We({},N,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(T){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[T])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(T){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[T])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(T){var C=this.state,j=C.formattedGraphicalItems,R=C.activeItem;if(j&&j.length)for(var N=0,D=j.length;N<D;N++){var z=j[N],V=z.props,U=z.item,P=U.type.defaultProps!==void 0?me(me({},U.type.defaultProps),U.props):U.props,B=Oi(U.type);if(B==="Bar"){var q=(V.data||[]).find(function(Z){return mve(T,Z)});if(q)return{graphicalItem:z,payload:q}}else if(B==="RadialBar"){var G=(V.data||[]).find(function(Z){return Bk(T,Z)});if(G)return{graphicalItem:z,payload:G}}else if(eg(z,R)||tg(z,R)||If(z,R)){var $=ige({graphicalItem:z,activeTooltipItem:R,itemData:P.data}),F=P.activeIndex===void 0?$:P.activeIndex;return{graphicalItem:me(me({},z),{},{childIndex:F}),payload:If(z,R)?P.data[$]:z.props.data[$]}}}return null}},{key:"render",value:function(){var T=this;if(!XN(this))return null;var C=this.props,j=C.children,R=C.className,N=C.width,D=C.height,z=C.style,V=C.compact,U=C.title,P=C.desc,B=xz(C,E0e),q=ht(B,!1);if(V)return L.createElement(tz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement(CS,Dl({},q,{width:N,height:D,title:U,desc:P}),this.renderClipPath(),JN(j,this.renderMap)));if(this.props.accessibilityLayer){var G,$;q.tabIndex=(G=this.props.tabIndex)!==null&&G!==void 0?G:0,q.role=($=this.props.role)!==null&&$!==void 0?$:"application",q.onKeyDown=function(Z){T.accessibilityManager.keyboardEvent(Z)},q.onFocus=function(){T.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return L.createElement(tz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement("div",Dl({className:yt("recharts-wrapper",R),style:me({position:"relative",cursor:"default",width:N,height:D},z)},F,{ref:function(X){T.container=X}}),L.createElement(CS,Dl({},q,{width:N,height:D,title:U,desc:P,style:H0e}),this.renderClipPath(),JN(j,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(y.Component);We(A,"displayName",n),We(A,"defaultProps",me({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),We(A,"getDerivedStateFromProps",function(w,O){var E=w.dataKey,T=w.data,C=w.children,j=w.width,R=w.height,N=w.layout,D=w.stackOffset,z=w.margin,V=O.dataStartIndex,U=O.dataEndIndex;if(O.updateId===void 0){var P=_z(w);return me(me(me({},P),{},{updateId:0},x(me(me({props:w},P),{},{updateId:0}),O)),{},{prevDataKey:E,prevData:T,prevWidth:j,prevHeight:R,prevLayout:N,prevStackOffset:D,prevMargin:z,prevChildren:C})}if(E!==O.prevDataKey||T!==O.prevData||j!==O.prevWidth||R!==O.prevHeight||N!==O.prevLayout||D!==O.prevStackOffset||!Bl(z,O.prevMargin)){var B=_z(w),q={chartX:O.chartX,chartY:O.chartY,isTooltipActive:O.isTooltipActive},G=me(me({},Sz(O,T,N)),{},{updateId:O.updateId+1}),$=me(me(me({},B),q),G);return me(me(me({},$),x(me({props:w},$),O)),{},{prevDataKey:E,prevData:T,prevWidth:j,prevHeight:R,prevLayout:N,prevStackOffset:D,prevMargin:z,prevChildren:C})}if(!TS(C,O.prevChildren)){var F,Z,X,oe,I=Tr(C,sc),Y=I&&(F=(Z=I.props)===null||Z===void 0?void 0:Z.startIndex)!==null&&F!==void 0?F:V,Q=I&&(X=(oe=I.props)===null||oe===void 0?void 0:oe.endIndex)!==null&&X!==void 0?X:U,ce=Y!==V||Q!==U,ve=!vt(T),fe=ve&&!ce?O.updateId:O.updateId+1;return me(me({updateId:fe},x(me(me({props:w},O),{},{updateId:fe,dataStartIndex:Y,dataEndIndex:Q}),O)),{},{prevChildren:C,dataStartIndex:Y,dataEndIndex:Q})}return null}),We(A,"renderActiveDot",function(w,O,E){var T;return y.isValidElement(w)?T=y.cloneElement(w,O):ot(w)?T=w(O):T=L.createElement(nE,O),L.createElement(nn,{className:"recharts-active-dot",key:E},T)});var S=y.forwardRef(function(O,E){return L.createElement(A,Dl({},O,{ref:E}))});return S.displayName=A.displayName,S},exe=J0e({chartName:"AreaChart",GraphicalChild:Io,axisComponents:[{axisType:"xAxis",AxisComp:sg},{axisType:"yAxis",AxisComp:lg}],formatAxisMap:tye});const txe={light:"",dark:".dark"},PU=y.createContext(null);function DU(){const e=y.useContext(PU);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const kU=y.forwardRef(({id:e,className:t,children:n,config:r,...a},o)=>{const l=y.useId(),c=`chart-${e||l.replace(/:/g,"")}`;return v.jsx(PU.Provider,{value:{config:r},children:v.jsxs("div",{"data-chart":c,ref:o,className:be("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...a,children:[v.jsx(nxe,{id:c,config:r}),v.jsx(Ule,{children:n})]})})});kU.displayName="Chart";const nxe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?v.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(txe).map(([r,a])=>`
494
- ${a} [data-chart=${e}] {
495
- ${n.map(([o,l])=>{var f;const c=((f=l.theme)==null?void 0:f[r])||l.color;return c?` --color-${o}: ${c};`:null}).join(`
496
- `)}
497
- }
498
- `).join(`
499
- `)}}):null},rxe=za,axe=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:c,labelClassName:f,formatter:d,color:m,nameKey:h,labelKey:g},x)=>{const{config:A}=DU(),S=y.useMemo(()=>{var j;if(a||!(t!=null&&t.length))return null;const[O]=t,E=`${g||(O==null?void 0:O.dataKey)||(O==null?void 0:O.name)||"value"}`,T=U_(A,O,E),C=!g&&typeof l=="string"?((j=A[l])==null?void 0:j.label)||l:T==null?void 0:T.label;return c?v.jsx("div",{className:be("font-medium",f),children:c(C,t)}):C?v.jsx("div",{className:be("font-medium",f),children:C}):null},[l,c,t,a,f,A,g]);if(!e||!(t!=null&&t.length))return null;const w=t.length===1&&r!=="dot";return v.jsxs("div",{ref:x,className:be("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:S,v.jsx("div",{className:"grid gap-1.5",children:t.filter(O=>O.type!=="none").map((O,E)=>{const T=`${h||O.name||O.dataKey||"value"}`,C=U_(A,O,T),j=m||O.payload.fill||O.color;return v.jsx("div",{className:be("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:d&&(O==null?void 0:O.value)!==void 0&&O.name?d(O.value,O.name,O,E,O.payload):v.jsxs(v.Fragment,{children:[C!=null&&C.icon?v.jsx(C.icon,{}):!o&&v.jsx("div",{className:be("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":j,"--color-border":j}}),v.jsxs("div",{className:be("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[v.jsxs("div",{className:"grid gap-1.5",children:[w?S:null,v.jsx("span",{className:"text-muted-foreground",children:(C==null?void 0:C.label)||O.name})]}),O.value&&v.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:O.value.toLocaleString()})]})]})},O.dataKey)})})]})});axe.displayName="ChartTooltip";const ixe=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=DU();return n!=null&&n.length?v.jsx("div",{ref:o,className:be("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(c=>c.type!=="none").map(c=>{const f=`${a||c.dataKey||"value"}`,d=U_(l,c,f);return v.jsxs("div",{className:be("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[d!=null&&d.icon&&!t?v.jsx(d.icon,{}):v.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),d==null?void 0:d.label]},c.value)})}):null});ixe.displayName="ChartLegend";function U_(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const Oz={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},Ez={"1h":"1h","6h":"6h","24h":"24h","7d":"7d"};function Tz(e,t){const n=new Date(e);return t==="7d"?`${n.getMonth()+1}/${n.getDate()}`:`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function oxe(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[a,o]=y.useState(null),[l,c]=y.useState("24h"),[f,d]=y.useState([]),[m,h]=y.useState(!1),{setNode:g}=kA();y.useEffect(()=>(g(v.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>g(null)),[g]);const x=y.useCallback(C=>{C.type==="agents:listed"&&t(C.sessions??[])},[]),{send:A,connected:S}=eO(x);y.useEffect(()=>{if(!S)return;A({type:"agents:list"});const C=setInterval(()=>A({type:"agents:list"}),1e4);return()=>clearInterval(C)},[S,A]),y.useEffect(()=>{fetch("/api/v1/agents",{credentials:"include"}).then(C=>C.ok?C.json():[]).then(r)},[]);const w=e.map(C=>C.agentName).filter(Boolean),O=[...new Set([...w,...n])],E=new Set(w);y.useEffect(()=>{!a&&O.length>0&&o(O[0])},[O.join(",")]),y.useEffect(()=>{a&&(h(!0),fetch(`/api/v1/agents/${encodeURIComponent(a)}/resources?range=${l}`,{credentials:"include"}).then(C=>C.ok?C.json():[]).then(d).finally(()=>h(!1)))},[a,l]);const T=f.map(C=>({time:C.recorded_at,cpu:Math.round(C.cpu_percent*10)/10,mem:Math.round(C.mem_percent*10)/10}));return v.jsxs("div",{className:"flex h-full min-h-0",children:[v.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[v.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Macs"}),O.length===0?v.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:S?"No agents yet.":"Connecting…"}):O.map(C=>{const j=E.has(C),R=a===C;return v.jsxs("button",{onClick:()=>o(C),className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",R?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${j?"bg-emerald-400":"bg-muted-foreground/40"}`}),v.jsx("span",{className:"truncate min-w-0",children:C})]},C)})]}),v.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:a?v.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h2",{className:"text-base font-semibold",children:a}),v.jsx(Q4,{value:l,onValueChange:C=>c(C),children:v.jsx(rO,{children:Object.keys(Ez).map(C=>v.jsx(Fp,{value:C,children:Ez[C]},C))})})]}),m?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading…"}):T.length===0?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"No data yet for this range. Data is collected every minute while the agent is connected."}):v.jsxs("div",{className:"flex flex-col gap-6",children:[v.jsx(jz,{title:"CPU %",color:"cpu",data:T,dataKey:"cpu",range:l,formatTick:Tz}),v.jsx(jz,{title:"RAM %",color:"mem",data:T,dataKey:"mem",range:l,formatTick:Tz})]})]}):v.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-muted-foreground",children:[v.jsx(r5,{className:"h-8 w-8"}),v.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})})]})}function jz({title:e,color:t,data:n,dataKey:r,range:a,formatTick:o}){var m;const l=Math.min(n.length,a==="7d"?7:a==="24h"?8:6),c=Math.max(1,Math.floor(n.length/l)),f=n.filter((h,g)=>g%c===0).map(h=>h.time),d=(m=n[n.length-1])==null?void 0:m.time;return d&&!f.includes(d)&&f.push(d),v.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:t==="cpu"?"#60a5fa":"#a78bfa"}}),v.jsx("span",{className:"text-sm font-medium",children:e})]}),v.jsx(kU,{config:Oz,className:"h-[220px] w-full",children:v.jsxs(exe,{data:n,margin:{top:8,right:24,bottom:24,left:8},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:`fill-${r}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"5%",stopColor:t==="cpu"?"#60a5fa":"#a78bfa",stopOpacity:.3}),v.jsx("stop",{offset:"95%",stopColor:t==="cpu"?"#60a5fa":"#a78bfa",stopOpacity:0})]})}),v.jsx(mU,{strokeDasharray:"3 3",vertical:!1,className:"stroke-border"}),v.jsx(sg,{dataKey:"time",ticks:f,tickFormatter:h=>o(h,a),tick:{fontSize:11},tickLine:!1,axisLine:!1,dy:6,padding:{left:16,right:16}}),v.jsx(lg,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:h=>`${h}%`,tick:{fontSize:11},tickLine:!1,axisLine:!1,width:40,dx:-4,padding:{top:16,bottom:0}}),v.jsx(rxe,{content:({active:h,payload:g})=>{if(!h||!(g!=null&&g.length))return null;const A=new Date(g[0].payload.time).toLocaleString("ko-KR",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}),S=g[0].value;return v.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md text-xs",children:[v.jsxs("p",{className:"mb-1",children:["Date: ",A]}),v.jsxs("p",{children:[Oz[r].label,": ",S,"%"]})]})}}),v.jsx(Io,{type:"monotone",dataKey:r,stroke:t==="cpu"?"#60a5fa":"#a78bfa",strokeWidth:1.5,fill:`url(#fill-${r})`,dot:!1,isAnimationActive:!1})]})})]})}const sxe=$i({teamName:Hn().min(1),logo:QA(File).nullable().optional()}),lxe=$i({displayName:Hn().min(1),avatar:QA(File).nullable().optional()}),cxe=$i({currentPassword:Hn().min(1),newPassword:Hn().min(8),confirmPassword:Hn()}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function uxe(){const{resolvedTheme:e}=Gf(),t=e==="dark"?"/logo-dark.svg":"/logo.svg",{user:n}=PA(),r=(n==null?void 0:n.role)==="Admin",a=(n==null?void 0:n.role)==="Admin"||(n==null?void 0:n.role)==="Developer",[o,l]=y.useState(null),c=y.useRef(null),f=wo({resolver:So(sxe),mode:"onBlur",defaultValues:{teamName:"",logo:null}});y.useEffect(()=>{r&&fetch("/api/v1/settings",{credentials:"include"}).then(P=>P.ok?P.json():null).then(P=>{P&&(f.reset({teamName:P.team_name,logo:null}),l(P.logo_url))})},[r]);async function d(P){const B=new FormData;B.append("team_name",P.teamName),P.logo&&B.append("logo",P.logo);try{if(!(await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:B})).ok){Dt.error("Failed to update workspace");return}Dt.success("Workspace updated")}catch{Dt.error("Failed to update workspace")}}const[m,h]=y.useState(null),g=y.useRef(null),x=wo({resolver:So(lxe),mode:"onBlur",defaultValues:{displayName:"",avatar:null}});y.useEffect(()=>{n&&(x.reset({displayName:n.displayName??"",avatar:null}),h(n.avatarUrl??null))},[n]);async function A(P){const B=new FormData;B.append("display_name",P.displayName),P.avatar&&B.append("avatar",P.avatar);try{if(!(await fetch("/api/v1/profile",{method:"PATCH",credentials:"include",body:B})).ok){Dt.error("Failed to update profile");return}Dt.success("Profile updated")}catch{Dt.error("Failed to update profile")}}const S=wo({resolver:So(cxe),mode:"onBlur"});async function w(P){try{const B=await fetch("/api/v1/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.currentPassword,newPassword:P.newPassword})});if(!B.ok){const q=await B.json();S.setError("root",{message:q.error??"Failed to change password"});return}S.reset(),Dt.success("Password changed")}catch{S.setError("root",{message:"Network error"})}}const[O,E]=y.useState([]),[T,C]=y.useState({}),[j,R]=y.useState({}),[N,D]=y.useState({});y.useEffect(()=>{a&&fetch("/api/v1/apps",{credentials:"include"}).then(P=>P.ok?P.json():null).then(P=>{if(!P)return;E(P.items);const B={};P.items.forEach(q=>{B[q.id]=q.name}),C(B)})},[a]);async function z(P){D(B=>({...B,[P]:!0}));try{if(!(await fetch(`/api/v1/apps/${P}`,{method:"DELETE",credentials:"include"})).ok){Dt.error("Failed to delete app");return}E(q=>q.filter(G=>G.id!==P)),Dt.success("App deleted")}catch{Dt.error("Failed to delete app")}finally{D(B=>({...B,[P]:!1}))}}async function V(P){R(B=>({...B,[P]:!0}));try{if(!(await fetch(`/api/v1/apps/${P}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T[P]})})).ok){Dt.error("Failed to update app");return}Dt.success("App updated")}catch{Dt.error("Failed to update app")}finally{R(B=>({...B,[P]:!1}))}}const U=UA({control:x.control,name:"displayName"});return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:"Settings"}),r&&v.jsxs(Xr,{children:[v.jsx(Qr,{children:v.jsx(Jr,{children:"Workspace"})}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:f.handleSubmit(d),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"team-name",children:"Team name"}),v.jsx(hn,{id:"team-name",placeholder:"My QA Team",...f.register("teamName")}),f.formState.errors.teamName&&v.jsx("p",{className:"text-sm text-destructive",children:f.formState.errors.teamName.message})]}),v.jsx(Ya,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Ft,{children:["Logo ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(kp,{name:"logo",control:f.control,render:({field:P})=>v.jsxs("div",{className:"relative w-16 h-16",children:[v.jsx("img",{src:o??t,alt:"logo",className:"w-16 h-16 rounded-lg object-contain"}),v.jsx("button",{type:"button",onClick:()=>{var B;return(B=c.current)==null?void 0:B.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(K1,{className:"w-3 h-3"})}),v.jsx("input",{ref:c,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:B=>{var G;const q=(G=B.target.files)==null?void 0:G[0];if(q&&q.size>2*1024*1024){Dt.error("Image must be 2MB or less");return}q&&(P.onChange(q),l(URL.createObjectURL(q)))}})]})})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ut,{type:"submit",size:"sm",disabled:f.formState.isSubmitting,children:f.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs(Xr,{children:[v.jsx(Qr,{children:v.jsx(Jr,{children:"Profile"})}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:x.handleSubmit(A),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"display-name",children:"Nickname"}),v.jsx(hn,{id:"display-name",placeholder:"Your name",...x.register("displayName")}),x.formState.errors.displayName&&v.jsx("p",{className:"text-sm text-destructive",children:x.formState.errors.displayName.message})]}),v.jsx(Ya,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Ft,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(kp,{name:"avatar",control:x.control,render:({field:P})=>{var B;return v.jsxs("div",{className:"relative w-14 h-14",children:[m?v.jsx("img",{src:m,alt:"avatar",className:"w-14 h-14 rounded-full object-cover border"}):v.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const q=DA(U||(n==null?void 0:n.email)||"");return{backgroundColor:q.bg,color:q.fg}})(),children:((B=U==null?void 0:U[0])==null?void 0:B.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var q;return(q=g.current)==null?void 0:q.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(K1,{className:"w-3 h-3"})}),v.jsx("input",{ref:g,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:q=>{var $;const G=($=q.target.files)==null?void 0:$[0];if(G&&G.size>2*1024*1024){Dt.error("Image must be 2MB or less");return}G&&(P.onChange(G),h(URL.createObjectURL(G)))}})]})}})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ut,{type:"submit",size:"sm",disabled:x.formState.isSubmitting,children:x.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs(Xr,{children:[v.jsx(Qr,{children:v.jsx(Jr,{children:"Password"})}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:S.handleSubmit(w),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"current-password",children:"Current password"}),v.jsx(hn,{id:"current-password",type:"password",...S.register("currentPassword")}),S.formState.errors.currentPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.currentPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"new-password",children:"New password"}),v.jsx(hn,{id:"new-password",type:"password",...S.register("newPassword")}),S.formState.errors.newPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.newPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"confirm-password",children:"Confirm new password"}),v.jsx(hn,{id:"confirm-password",type:"password",...S.register("confirmPassword")}),S.formState.errors.confirmPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.confirmPassword.message})]}),S.formState.errors.root&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.root.message}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ut,{type:"submit",size:"sm",disabled:S.formState.isSubmitting,children:S.formState.isSubmitting?"Saving…":"Change password"})})]})})]}),a&&O.length>0&&v.jsxs(Xr,{children:[v.jsx(Qr,{children:v.jsx(Jr,{children:"Apps"})}),v.jsx(Ba,{children:v.jsx("div",{className:"flex flex-col divide-y divide-border",children:O.map(P=>v.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[v.jsx(Ft,{htmlFor:`app-${P.id}`,children:"App Name"}),v.jsx(hn,{id:`app-${P.id}`,value:T[P.id]??"",onChange:B=>C(q=>({...q,[P.id]:B.target.value}))}),v.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:P.bundle_id_key}),v.jsx(Yl,{tone:P.platform==="ios"?"ios":P.platform==="android"?"android":void 0,variant:P.platform==="both"?"secondary":void 0,className:"capitalize",children:P.platform})]}),v.jsxs("div",{className:"flex items-center justify-end gap-2",children:[v.jsx(ut,{size:"sm",variant:"outline",disabled:j[P.id],onClick:()=>V(P.id),children:j[P.id]?"Saving…":"Save"}),v.jsxs(Ev,{children:[v.jsx(rre,{asChild:!0,children:v.jsx(ut,{size:"sm",variant:"destructive",disabled:N[P.id],children:N[P.id]?"Deleting…":"Delete"})}),v.jsxs(hd,{children:[v.jsxs(pd,{children:[v.jsx(vd,{children:"Delete app?"}),v.jsxs(gd,{children:["This will permanently delete ",v.jsx("strong",{children:P.name})," and all its builds. This action cannot be undone."]})]}),v.jsxs(md,{children:[v.jsx(yd,{className:"w-24",children:"Cancel"}),v.jsx(Tv,{className:be(Zm({variant:"destructive"}),"w-24"),onClick:()=>z(P.id),children:"Delete"})]})]})]})]})]})]},P.id))})})]})]})}const dE=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{ref:n,className:be("w-full caption-bottom text-sm",e),...t})}));dE.displayName="Table";const hE=y.forwardRef(({className:e,...t},n)=>v.jsx("thead",{ref:n,className:be("[&_tr]:border-b",e),...t}));hE.displayName="TableHeader";const pE=y.forwardRef(({className:e,...t},n)=>v.jsx("tbody",{ref:n,className:be("[&_tr:last-child]:border-0",e),...t}));pE.displayName="TableBody";const fxe=y.forwardRef(({className:e,...t},n)=>v.jsx("tfoot",{ref:n,className:be("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));fxe.displayName="TableFooter";const Fl=y.forwardRef(({className:e,...t},n)=>v.jsx("tr",{ref:n,className:be("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Fl.displayName="TableRow";const ya=y.forwardRef(({className:e,...t},n)=>v.jsx("th",{ref:n,className:be("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ya.displayName="TableHead";const Kr=y.forwardRef(({className:e,...t},n)=>v.jsx("td",{ref:n,className:be("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Kr.displayName="TableCell";const dxe=y.forwardRef(({className:e,...t},n)=>v.jsx("caption",{ref:n,className:be("mt-4 text-sm text-muted-foreground",e),...t}));dxe.displayName="TableCaption";const hxe=$i({email:Hn().email(),role:Hn().min(1)}),pxe=$i({token:Hn(),emailSent:yte()});function mxe(){const[e,t]=y.useState([]),[n,r]=y.useState({}),[a,o]=y.useState(""),[l,c]=y.useState(!1),[f,d]=y.useState(null),{register:m,handleSubmit:h,control:g,reset:x,formState:{errors:A,isSubmitting:S}}=wo({resolver:So(hxe),mode:"onBlur",defaultValues:{email:"",role:"QA"}});function w(){fetch("/api/v1/team/members",{credentials:"include"}).then(R=>R.json()).then(t)}y.useEffect(()=>{w()},[]);async function O(R){try{const N=await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:R.email,role:R.role})});if(!N.ok)throw new Error(`Server error: ${N.status}`);const D=pxe.parse(await N.json()),z=`${location.origin}/invite?token=${D.token}`;o(z),navigator.clipboard.writeText(z).catch(()=>{}),D.emailSent?Dt.success(`Invite email sent to ${R.email}`):Dt.warning("Invite link copied — email could not be sent. Check your SMTP settings.")}catch{Dt.error("Failed to create invite link")}}function E(R){c(R),R||(o(""),x())}async function T(R,N){await fetch(`/api/v1/team/members/${R}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:N})}),w()}async function C(R){const z=(await(await fetch(`/api/v1/team/members/${R}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";r(V=>({...V,[R]:z})),setTimeout(()=>r(V=>{const U={...V};return delete U[R],U}),3e3)}async function j(R){await fetch(`/api/v1/team/members/${R}`,{method:"DELETE",credentials:"include"}),d(null),w()}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsx(Ev,{open:f!==null,onOpenChange:R=>{R||d(null)},children:v.jsxs(hd,{children:[v.jsxs(pd,{children:[v.jsx(vd,{children:"Remove this member?"}),v.jsx(gd,{children:"This member will lose access to the team immediately."})]}),v.jsxs(md,{children:[v.jsx(yd,{children:"Cancel"}),v.jsx(Tv,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>f!==null&&j(f),children:"Remove"})]})]})}),v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),v.jsxs(Av,{open:l,onOpenChange:E,children:[v.jsx(Ov,{asChild:!0,children:v.jsxs(ut,{size:"sm",children:[v.jsx(rV,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),v.jsxs(ud,{className:"sm:max-w-md",children:[v.jsx(fd,{children:v.jsx(dd,{children:"Invite team member"})}),a?v.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Invite link copied to clipboard:"}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all",children:a}),v.jsx(ut,{onClick:()=>c(!1),children:"Done"})]}):v.jsxs("form",{onSubmit:h(O),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"invite-email",children:"Email"}),v.jsx(hn,{id:"invite-email",type:"email",...m("email")}),A.email&&v.jsx("p",{className:"text-sm text-destructive",children:A.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{children:"Role"}),v.jsx(kp,{name:"role",control:g,render:({field:R})=>v.jsxs(As,{value:R.value,onValueChange:R.onChange,children:[v.jsx(jo,{children:v.jsx(Os,{})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"Admin",children:"Admin"}),v.jsx(kt,{value:"Developer",children:"Developer"}),v.jsx(kt,{value:"QA",children:"QA"}),v.jsx(kt,{value:"Viewer",children:"Viewer"})]})]})})]}),v.jsx(ut,{type:"submit",disabled:S,children:S?"Creating link…":"Generate invite link"})]})]})]})]}),v.jsxs(Xr,{children:[v.jsx(Qr,{children:v.jsxs(Jr,{children:["Members (",e.length,")"]})}),v.jsx(Ba,{className:"px-4 pt-0 pb-2",children:v.jsxs(dE,{children:[v.jsx(hE,{children:v.jsxs(Fl,{children:[v.jsx(ya,{children:"Nickname"}),v.jsx(ya,{children:"Email"}),v.jsx(ya,{children:"Role"}),v.jsx(ya,{children:"Joined"}),v.jsx(ya,{className:"w-10"})]})}),v.jsx(pE,{children:e.map(R=>v.jsxs(Fl,{className:"hover:bg-transparent",children:[v.jsx(Kr,{className:"font-medium",children:R.display_name||"—"}),v.jsx(Kr,{className:"text-muted-foreground text-sm",children:R.email}),v.jsx(Kr,{children:v.jsxs(As,{value:R.role,onValueChange:N=>T(R.id,N),children:[v.jsx(jo,{className:"h-7 w-28",children:v.jsx(Os,{})}),v.jsxs(Co,{children:[v.jsx(kt,{value:"Admin",children:"Admin"}),v.jsx(kt,{value:"Developer",children:"Developer"}),v.jsx(kt,{value:"QA",children:"QA"}),v.jsx(kt,{value:"Viewer",children:"Viewer"})]})]})}),v.jsx(Kr,{className:"text-muted-foreground text-sm",children:new Date(R.joined_at).toLocaleDateString()}),v.jsx(Kr,{children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(ut,{variant:"secondary",size:"nav",onClick:()=>C(R.id),children:n[R.id]??"Reset pwd"}),v.jsx(ut,{variant:"destructive",size:"nav",onClick:()=>d(R.id),children:"Remove"})]})})]},R.id))})]})})]})]})}const vxe=$i({name:Hn().min(1),expiresDays:Hn().refine(e=>{const t=parseInt(e,10);return!isNaN(t)&&t>=1&&t<=365},{message:"Must be between 1 and 365"})});function gxe(){const[e,t]=y.useState([]),[n,r]=y.useState(!1),[a,o]=y.useState(""),[l,c]=y.useState(null),{register:f,handleSubmit:d,reset:m,formState:{errors:h,isSubmitting:g}}=wo({resolver:So(vxe),mode:"onBlur",defaultValues:{name:"",expiresDays:"30"}});function x(){fetch("/api/v1/tokens",{credentials:"include"}).then(E=>E.json()).then(t)}y.useEffect(()=>{x()},[]);async function A(E){try{const T=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:E.name,expires_in_days:parseInt(E.expiresDays,10)})});if(!T.ok){Dt.error("Failed to create token");return}const C=await T.json();Dt.success("Token created"),o(C.token),x()}catch{Dt.error("Network error")}}function S(E){r(E),E||(o(""),m())}async function w(E){try{return(await fetch(`/api/v1/tokens/${E}`,{method:"DELETE",credentials:"include"})).ok?(Dt.success("Token revoked"),x(),!0):(Dt.error("Failed to revoke token"),!1)}catch{return Dt.error("Network error"),!1}}function O(E){return E.expires_at&&new Date(E.expires_at)<new Date}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),v.jsxs(Av,{open:n,onOpenChange:S,children:[v.jsx(Ov,{asChild:!0,children:v.jsxs(ut,{size:"sm",children:[v.jsx(a5,{className:"mr-2 h-4 w-4"}),"New token"]})}),v.jsxs(ud,{className:"sm:max-w-md",children:[v.jsx(fd,{children:v.jsx(dd,{children:"Create token"})}),a?v.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all font-mono",children:a}),v.jsx(ut,{onClick:()=>{navigator.clipboard.writeText(a).then(()=>{Dt.success("Token copied to clipboard"),r(!1)}).catch(()=>Dt.error("Failed to copy — copy manually"))},children:"Copy & close"})]}):v.jsxs("form",{onSubmit:d(A),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"token-name",children:"Name"}),v.jsx(hn,{id:"token-name",placeholder:"e.g. ci-deploy",...f("name")}),h.name&&v.jsx("p",{className:"text-sm text-destructive",children:h.name.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Ft,{htmlFor:"expires",children:"Expires in (days)"}),v.jsx(hn,{id:"expires",type:"number",...f("expiresDays")}),h.expiresDays&&v.jsx("p",{className:"text-sm text-destructive",children:h.expiresDays.message})]}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",v.jsx(Yl,{variant:"secondary",children:"builds:write"})]}),v.jsx(ut,{type:"submit",disabled:g,children:g?"Creating…":"Create token"})]})]})]})]}),v.jsxs(Xr,{children:[v.jsxs(Qr,{children:[v.jsx(Jr,{children:"Active tokens"}),v.jsxs(ws,{children:["Use these tokens with ",v.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),v.jsx(Ba,{className:"px-4 pt-0 pb-2",children:v.jsxs(dE,{children:[v.jsx(hE,{children:v.jsxs(Fl,{children:[v.jsx(ya,{children:"Name"}),v.jsx(ya,{children:"Scope"}),v.jsx(ya,{children:"Last used"}),v.jsx(ya,{children:"Expires"}),v.jsx(ya,{className:"w-10"})]})}),v.jsx(pE,{children:e.length===0?v.jsx(Fl,{children:v.jsx(Kr,{colSpan:5,className:"h-20 text-center text-muted-foreground",children:"No tokens yet."})}):e.map(E=>v.jsxs(Fl,{className:"hover:bg-transparent",children:[v.jsx(Kr,{className:"font-medium",children:E.name}),v.jsx(Kr,{children:v.jsx(Yl,{variant:"secondary",children:E.scope})}),v.jsx(Kr,{className:"text-muted-foreground text-sm",children:E.last_used_at?new Date(E.last_used_at).toLocaleDateString():"Never"}),v.jsx(Kr,{children:E.expires_at?v.jsx("span",{className:O(E)?"text-destructive text-sm":"text-muted-foreground text-sm",children:O(E)?"Expired":new Date(E.expires_at).toLocaleDateString()}):v.jsx("span",{className:"text-muted-foreground text-sm",children:"Never"})}),v.jsx(Kr,{children:v.jsx(ut,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>c(E.id),children:v.jsx(tV,{className:"h-4 w-4"})})})]},E.id))})]})})]}),v.jsx(Ev,{open:l!==null,onOpenChange:E=>{E||c(null)},children:v.jsxs(hd,{children:[v.jsxs(pd,{children:[v.jsx(vd,{children:"Revoke token?"}),v.jsx(gd,{children:"Any active API calls using this token will immediately fail."})]}),v.jsxs(md,{children:[v.jsx(yd,{children:"Cancel"}),v.jsx(ut,{variant:"destructive",onClick:async()=>{if(l===null)return;await w(l)&&c(null)},children:"Revoke"})]})]})})]})}function yxe(){const{resolvedTheme:e}=Gf();return v.jsxs(z7,{children:[v.jsxs(d7,{children:[v.jsx(Or,{path:"/login",element:v.jsx(Qte,{})}),v.jsx(Or,{path:"/invite",element:v.jsx(ene,{})}),v.jsx(Or,{path:"/reset-password",element:v.jsx(nne,{})}),v.jsxs(Or,{element:v.jsx(JK,{}),children:[v.jsx(Or,{index:!0,element:v.jsx(G1,{to:"/app-center",replace:!0})}),v.jsx(Or,{path:"/app-center",element:v.jsx(lre,{})}),v.jsx(Or,{path:"/app-center/build",element:v.jsx(iae,{})}),v.jsx(Or,{path:"/mac-resources",element:v.jsx(oxe,{})}),v.jsx(Or,{path:"/settings/default",element:v.jsx(uxe,{})}),v.jsx(Or,{path:"/settings/team",element:v.jsx(mxe,{})}),v.jsx(Or,{path:"/settings/tokens",element:v.jsx(gxe,{})}),v.jsx(Or,{path:"*",element:v.jsx(G1,{to:"/app-center",replace:!0})})]})]}),v.jsx(bF,{position:"bottom-right",richColors:!0,theme:e})]})}n9.createRoot(document.getElementById("root")).render(v.jsx(y.StrictMode,{children:v.jsx(o9,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:v.jsx(yxe,{})})}));