- Change getProjects() to call /api/bzzz/active-repos instead of /projects
- Transform Bzzz repository response structure from nested {repositories: [...]} to flat array
- Map repository fields to Project interface with status field (ready_to_claim -> active/inactive)
- Remove defensive array checks since API now returns proper array structure
- Fix TypeError: r.filter is not a function by ensuring proper data flow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
348 lines
1.2 MiB
348 lines
1.2 MiB
var Vj=e=>{throw TypeError(e)};var Lv=(e,t,r)=>t.has(e)||Vj("Cannot "+r);var z=(e,t,r)=>(Lv(e,t,"read from private field"),r?r.call(e):t.get(e)),be=(e,t,r)=>t.has(e)?Vj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),se=(e,t,r,n)=>(Lv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Me=(e,t,r)=>(Lv(e,t,"access private method"),r);var Ah=(e,t,r,n)=>({set _(i){se(e,t,i,r)},get _(){return z(e,t,n)}});function AL(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var kh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jT={exports:{}},Zg={},NT={exports:{}},Fe={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var ah=Symbol.for("react.element"),kL=Symbol.for("react.portal"),PL=Symbol.for("react.fragment"),TL=Symbol.for("react.strict_mode"),CL=Symbol.for("react.profiler"),$L=Symbol.for("react.provider"),ML=Symbol.for("react.context"),RL=Symbol.for("react.forward_ref"),IL=Symbol.for("react.suspense"),DL=Symbol.for("react.memo"),LL=Symbol.for("react.lazy"),Hj=Symbol.iterator;function FL(e){return e===null||typeof e!="object"?null:(e=Hj&&e[Hj]||e["@@iterator"],typeof e=="function"?e:null)}var ET={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OT=Object.assign,AT={};function su(e,t,r){this.props=e,this.context=t,this.refs=AT,this.updater=r||ET}su.prototype.isReactComponent={};su.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};su.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kT(){}kT.prototype=su.prototype;function B1(e,t,r){this.props=e,this.context=t,this.refs=AT,this.updater=r||ET}var z1=B1.prototype=new kT;z1.constructor=B1;OT(z1,su.prototype);z1.isPureReactComponent=!0;var qj=Array.isArray,PT=Object.prototype.hasOwnProperty,U1={current:null},TT={key:!0,ref:!0,__self:!0,__source:!0};function CT(e,t,r){var n,i={},a=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)PT.call(t,n)&&!TT.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:ah,type:e,key:a,ref:s,props:i,_owner:U1.current}}function BL(e,t){return{$$typeof:ah,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function W1(e){return typeof e=="object"&&e!==null&&e.$$typeof===ah}function zL(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Kj=/\/+/g;function Fv(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zL(""+e.key):t.toString(36)}function wp(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ah:case kL:s=!0}}if(s)return s=e,i=i(s),e=n===""?"."+Fv(s,0):n,qj(i)?(r="",e!=null&&(r=e.replace(Kj,"$&/")+"/"),wp(i,t,r,"",function(c){return c})):i!=null&&(W1(i)&&(i=BL(i,r+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Kj,"$&/")+"/")+e)),t.push(i)),1;if(s=0,n=n===""?".":n+":",qj(e))for(var o=0;o<e.length;o++){a=e[o];var l=n+Fv(a,o);s+=wp(a,t,r,l,i)}else if(l=FL(e),typeof l=="function")for(e=l.call(e),o=0;!(a=e.next()).done;)a=a.value,l=n+Fv(a,o++),s+=wp(a,t,r,l,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ph(e,t,r){if(e==null)return e;var n=[],i=0;return wp(e,n,"","",function(a){return t.call(r,a,i++)}),n}function UL(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Tr={current:null},_p={transition:null},WL={ReactCurrentDispatcher:Tr,ReactCurrentBatchConfig:_p,ReactCurrentOwner:U1};function $T(){throw Error("act(...) is not supported in production builds of React.")}Fe.Children={map:Ph,forEach:function(e,t,r){Ph(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ph(e,function(){t++}),t},toArray:function(e){return Ph(e,function(t){return t})||[]},only:function(e){if(!W1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Fe.Component=su;Fe.Fragment=PL;Fe.Profiler=CL;Fe.PureComponent=B1;Fe.StrictMode=TL;Fe.Suspense=IL;Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WL;Fe.act=$T;Fe.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=OT({},e.props),i=e.key,a=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,s=U1.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)PT.call(t,l)&&!TT.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];n.children=o}return{$$typeof:ah,type:e.type,key:i,ref:a,props:n,_owner:s}};Fe.createContext=function(e){return e={$$typeof:ML,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$L,_context:e},e.Consumer=e};Fe.createElement=CT;Fe.createFactory=function(e){var t=CT.bind(null,e);return t.type=e,t};Fe.createRef=function(){return{current:null}};Fe.forwardRef=function(e){return{$$typeof:RL,render:e}};Fe.isValidElement=W1;Fe.lazy=function(e){return{$$typeof:LL,_payload:{_status:-1,_result:e},_init:UL}};Fe.memo=function(e,t){return{$$typeof:DL,type:e,compare:t===void 0?null:t}};Fe.startTransition=function(e){var t=_p.transition;_p.transition={};try{e()}finally{_p.transition=t}};Fe.unstable_act=$T;Fe.useCallback=function(e,t){return Tr.current.useCallback(e,t)};Fe.useContext=function(e){return Tr.current.useContext(e)};Fe.useDebugValue=function(){};Fe.useDeferredValue=function(e){return Tr.current.useDeferredValue(e)};Fe.useEffect=function(e,t){return Tr.current.useEffect(e,t)};Fe.useId=function(){return Tr.current.useId()};Fe.useImperativeHandle=function(e,t,r){return Tr.current.useImperativeHandle(e,t,r)};Fe.useInsertionEffect=function(e,t){return Tr.current.useInsertionEffect(e,t)};Fe.useLayoutEffect=function(e,t){return Tr.current.useLayoutEffect(e,t)};Fe.useMemo=function(e,t){return Tr.current.useMemo(e,t)};Fe.useReducer=function(e,t,r){return Tr.current.useReducer(e,t,r)};Fe.useRef=function(e){return Tr.current.useRef(e)};Fe.useState=function(e){return Tr.current.useState(e)};Fe.useSyncExternalStore=function(e,t,r){return Tr.current.useSyncExternalStore(e,t,r)};Fe.useTransition=function(){return Tr.current.useTransition()};Fe.version="18.3.1";NT.exports=Fe;var w=NT.exports;const k=Xe(w),mx=AL({__proto__:null,default:k},[w]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var VL=w,HL=Symbol.for("react.element"),qL=Symbol.for("react.fragment"),KL=Object.prototype.hasOwnProperty,GL=VL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,YL={key:!0,ref:!0,__self:!0,__source:!0};function MT(e,t,r){var n,i={},a=null,s=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)KL.call(t,n)&&!YL.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:HL,type:e,key:a,ref:s,props:i,_owner:GL.current}}Zg.Fragment=qL;Zg.jsx=MT;Zg.jsxs=MT;jT.exports=Zg;var u=jT.exports,gx={},RT={exports:{}},un={},IT={exports:{}},DT={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(e){function t(D,I){var L=D.length;D.push(I);e:for(;0<L;){var W=L-1>>>1,U=D[W];if(0<i(U,I))D[W]=I,D[L]=U,L=W;else break e}}function r(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var I=D[0],L=D.pop();if(L!==I){D[0]=L;e:for(var W=0,U=D.length,G=U>>>1;W<G;){var X=2*(W+1)-1,ne=D[X],ue=X+1,we=D[ue];if(0>i(ne,L))ue<U&&0>i(we,ne)?(D[W]=we,D[ue]=L,W=ue):(D[W]=ne,D[X]=L,W=X);else if(ue<U&&0>i(we,L))D[W]=we,D[ue]=L,W=ue;else break e}}return I}function i(D,I){var L=D.sortIndex-I.sortIndex;return L!==0?L:D.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(D){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=D)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function S(D){if(m=!1,b(D),!g)if(r(l)!==null)g=!0,M(_);else{var I=r(c);I!==null&&F(S,I.startTime-D)}}function _(D,I){g=!1,m&&(m=!1,y(A),A=-1),p=!0;var L=h;try{for(b(I),f=r(l);f!==null&&(!(f.expirationTime>I)||D&&!P());){var W=f.callback;if(typeof W=="function"){f.callback=null,h=f.priorityLevel;var U=W(f.expirationTime<=I);I=e.unstable_now(),typeof U=="function"?f.callback=U:f===r(l)&&n(l),b(I)}else n(l);f=r(l)}if(f!==null)var G=!0;else{var X=r(c);X!==null&&F(S,X.startTime-I),G=!1}return G}finally{f=null,h=L,p=!1}}var j=!1,N=null,A=-1,E=5,C=-1;function P(){return!(e.unstable_now()-C<E)}function T(){if(N!==null){var D=e.unstable_now();C=D;var I=!0;try{I=N(!0,D)}finally{I?$():(j=!1,N=null)}}else j=!1}var $;if(typeof x=="function")$=function(){x(T)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,R=O.port2;O.port1.onmessage=T,$=function(){R.postMessage(null)}}else $=function(){v(T,0)};function M(D){N=D,j||(j=!0,$())}function F(D,I){A=v(function(){D(e.unstable_now())},I)}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(D){D.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,M(_))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(D){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var L=h;h=I;try{return D()}finally{h=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,I){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var L=h;h=D;try{return I()}finally{h=L}},e.unstable_scheduleCallback=function(D,I,L){var W=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?W+L:W):L=W,D){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=L+U,D={id:d++,callback:I,priorityLevel:D,startTime:L,expirationTime:U,sortIndex:-1},L>W?(D.sortIndex=L,t(c,D),r(l)===null&&D===r(c)&&(m?(y(A),A=-1):m=!0,F(S,L-W))):(D.sortIndex=U,t(l,D),g||p||(g=!0,M(_))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var I=h;return function(){var L=h;h=I;try{return D.apply(this,arguments)}finally{h=L}}}})(DT);IT.exports=DT;var XL=IT.exports;/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var ZL=w,on=XL;function ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var LT=new Set,Ud={};function al(e,t){yc(e,t),yc(e+"Capture",t)}function yc(e,t){for(Ud[e]=t,e=0;e<t.length;e++)LT.add(t[e])}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yx=Object.prototype.hasOwnProperty,QL=/^[: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]*$/,Gj={},Yj={};function JL(e){return yx.call(Yj,e)?!0:yx.call(Gj,e)?!1:QL.test(e)?Yj[e]=!0:(Gj[e]=!0,!1)}function e6(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function t6(e,t,r,n){if(t===null||typeof t>"u"||e6(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Cr(e,t,r,n,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var ur={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ur[e]=new Cr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ur[t]=new Cr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ur[e]=new Cr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ur[e]=new Cr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ur[e]=new Cr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ur[e]=new Cr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ur[e]=new Cr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ur[e]=new Cr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ur[e]=new Cr(e,5,!1,e.toLowerCase(),null,!1,!1)});var V1=/[\-:]([a-z])/g;function H1(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(V1,H1);ur[t]=new Cr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(V1,H1);ur[t]=new Cr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(V1,H1);ur[t]=new Cr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ur[e]=new Cr(e,1,!1,e.toLowerCase(),null,!1,!1)});ur.xlinkHref=new Cr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ur[e]=new Cr(e,1,!1,e.toLowerCase(),null,!0,!0)});function q1(e,t,r,n){var i=ur.hasOwnProperty(t)?ur[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(t6(t,r,i,n)&&(r=null),n||i===null?JL(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var wa=ZL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Th=Symbol.for("react.element"),Ol=Symbol.for("react.portal"),Al=Symbol.for("react.fragment"),K1=Symbol.for("react.strict_mode"),vx=Symbol.for("react.profiler"),FT=Symbol.for("react.provider"),BT=Symbol.for("react.context"),G1=Symbol.for("react.forward_ref"),xx=Symbol.for("react.suspense"),bx=Symbol.for("react.suspense_list"),Y1=Symbol.for("react.memo"),Ia=Symbol.for("react.lazy"),zT=Symbol.for("react.offscreen"),Xj=Symbol.iterator;function ku(e){return e===null||typeof e!="object"?null:(e=Xj&&e[Xj]||e["@@iterator"],typeof e=="function"?e:null)}var _t=Object.assign,Bv;function od(e){if(Bv===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Bv=t&&t[1]||""}return`
|
||
`+Bv+e}var zv=!1;function Uv(e,t){if(!e||zv)return"";zv=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
||
`),a=n.stack.split(`
|
||
`),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==a[o]){var l=`
|
||
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=o);break}}}finally{zv=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?od(e):""}function r6(e){switch(e.tag){case 5:return od(e.type);case 16:return od("Lazy");case 13:return od("Suspense");case 19:return od("SuspenseList");case 0:case 2:case 15:return e=Uv(e.type,!1),e;case 11:return e=Uv(e.type.render,!1),e;case 1:return e=Uv(e.type,!0),e;default:return""}}function wx(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Al:return"Fragment";case Ol:return"Portal";case vx:return"Profiler";case K1:return"StrictMode";case xx:return"Suspense";case bx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case BT:return(e.displayName||"Context")+".Consumer";case FT:return(e._context.displayName||"Context")+".Provider";case G1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y1:return t=e.displayName||null,t!==null?t:wx(e.type)||"Memo";case Ia:t=e._payload,e=e._init;try{return wx(e(t))}catch{}}return null}function n6(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wx(t);case 8:return t===K1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Es(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function i6(e){var t=UT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ch(e){e._valueTracker||(e._valueTracker=i6(e))}function WT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=UT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Yp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _x(e,t){var r=t.checked;return _t({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Zj(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Es(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function VT(e,t){t=t.checked,t!=null&&q1(e,"checked",t,!1)}function Sx(e,t){VT(e,t);var r=Es(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jx(e,t.type,r):t.hasOwnProperty("defaultValue")&&jx(e,t.type,Es(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qj(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function jx(e,t,r){(t!=="number"||Yp(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ld=Array.isArray;function ql(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Es(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Nx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ee(91));return _t({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jj(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ee(92));if(ld(r)){if(1<r.length)throw Error(ee(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Es(r)}}function HT(e,t){var r=Es(t.value),n=Es(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function e2(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qT(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ex(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $h,KT=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for($h=$h||document.createElement("div"),$h.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$h.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var _d={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},a6=["Webkit","ms","Moz","O"];Object.keys(_d).forEach(function(e){a6.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_d[t]=_d[e]})});function GT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||_d.hasOwnProperty(e)&&_d[e]?(""+t).trim():t+"px"}function YT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=GT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var s6=_t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ox(e,t){if(t){if(s6[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ee(62))}}function Ax(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kx=null;function X1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Px=null,Kl=null,Gl=null;function t2(e){if(e=lh(e)){if(typeof Px!="function")throw Error(ee(280));var t=e.stateNode;t&&(t=ry(t),Px(e.stateNode,e.type,t))}}function XT(e){Kl?Gl?Gl.push(e):Gl=[e]:Kl=e}function ZT(){if(Kl){var e=Kl,t=Gl;if(Gl=Kl=null,t2(e),t)for(e=0;e<t.length;e++)t2(t[e])}}function QT(e,t){return e(t)}function JT(){}var Wv=!1;function eC(e,t,r){if(Wv)return e(t,r);Wv=!0;try{return QT(e,t,r)}finally{Wv=!1,(Kl!==null||Gl!==null)&&(JT(),ZT())}}function Vd(e,t){var r=e.stateNode;if(r===null)return null;var n=ry(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ee(231,t,typeof r));return r}var Tx=!1;if(la)try{var Pu={};Object.defineProperty(Pu,"passive",{get:function(){Tx=!0}}),window.addEventListener("test",Pu,Pu),window.removeEventListener("test",Pu,Pu)}catch{Tx=!1}function o6(e,t,r,n,i,a,s,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var Sd=!1,Xp=null,Zp=!1,Cx=null,l6={onError:function(e){Sd=!0,Xp=e}};function c6(e,t,r,n,i,a,s,o,l){Sd=!1,Xp=null,o6.apply(l6,arguments)}function u6(e,t,r,n,i,a,s,o,l){if(c6.apply(this,arguments),Sd){if(Sd){var c=Xp;Sd=!1,Xp=null}else throw Error(ee(198));Zp||(Zp=!0,Cx=c)}}function sl(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function tC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function r2(e){if(sl(e)!==e)throw Error(ee(188))}function d6(e){var t=e.alternate;if(!t){if(t=sl(e),t===null)throw Error(ee(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return r2(i),e;if(a===n)return r2(i),t;a=a.sibling}throw Error(ee(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,o=i.child;o;){if(o===r){s=!0,r=i,n=a;break}if(o===n){s=!0,n=i,r=a;break}o=o.sibling}if(!s){for(o=a.child;o;){if(o===r){s=!0,r=a,n=i;break}if(o===n){s=!0,n=a,r=i;break}o=o.sibling}if(!s)throw Error(ee(189))}}if(r.alternate!==n)throw Error(ee(190))}if(r.tag!==3)throw Error(ee(188));return r.stateNode.current===r?e:t}function rC(e){return e=d6(e),e!==null?nC(e):null}function nC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=nC(e);if(t!==null)return t;e=e.sibling}return null}var iC=on.unstable_scheduleCallback,n2=on.unstable_cancelCallback,f6=on.unstable_shouldYield,h6=on.unstable_requestPaint,At=on.unstable_now,p6=on.unstable_getCurrentPriorityLevel,Z1=on.unstable_ImmediatePriority,aC=on.unstable_UserBlockingPriority,Qp=on.unstable_NormalPriority,m6=on.unstable_LowPriority,sC=on.unstable_IdlePriority,Qg=null,Ei=null;function g6(e){if(Ei&&typeof Ei.onCommitFiberRoot=="function")try{Ei.onCommitFiberRoot(Qg,e,void 0,(e.current.flags&128)===128)}catch{}}var ri=Math.clz32?Math.clz32:x6,y6=Math.log,v6=Math.LN2;function x6(e){return e>>>=0,e===0?32:31-(y6(e)/v6|0)|0}var Mh=64,Rh=4194304;function cd(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Jp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,s=r&268435455;if(s!==0){var o=s&~i;o!==0?n=cd(o):(a&=s,a!==0&&(n=cd(a)))}else s=r&~i,s!==0?n=cd(s):a!==0&&(n=cd(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-ri(t),i=1<<r,n|=e[r],t&=~i;return n}function b6(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function w6(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-ri(a),o=1<<s,l=i[s];l===-1?(!(o&r)||o&n)&&(i[s]=b6(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}}function $x(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function oC(){var e=Mh;return Mh<<=1,!(Mh&4194240)&&(Mh=64),e}function Vv(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function sh(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ri(t),e[t]=r}function _6(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-ri(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function Q1(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-ri(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Je=0;function lC(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var cC,J1,uC,dC,fC,Mx=!1,Ih=[],ds=null,fs=null,hs=null,Hd=new Map,qd=new Map,za=[],S6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function i2(e,t){switch(e){case"focusin":case"focusout":ds=null;break;case"dragenter":case"dragleave":fs=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":Hd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qd.delete(t.pointerId)}}function Tu(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lh(t),t!==null&&J1(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function j6(e,t,r,n,i){switch(t){case"focusin":return ds=Tu(ds,e,t,r,n,i),!0;case"dragenter":return fs=Tu(fs,e,t,r,n,i),!0;case"mouseover":return hs=Tu(hs,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return Hd.set(a,Tu(Hd.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,qd.set(a,Tu(qd.get(a)||null,e,t,r,n,i)),!0}return!1}function hC(e){var t=io(e.target);if(t!==null){var r=sl(t);if(r!==null){if(t=r.tag,t===13){if(t=tC(r),t!==null){e.blockedOn=t,fC(e.priority,function(){uC(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Sp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Rx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);kx=n,r.target.dispatchEvent(n),kx=null}else return t=lh(r),t!==null&&J1(t),e.blockedOn=r,!1;t.shift()}return!0}function a2(e,t,r){Sp(e)&&r.delete(t)}function N6(){Mx=!1,ds!==null&&Sp(ds)&&(ds=null),fs!==null&&Sp(fs)&&(fs=null),hs!==null&&Sp(hs)&&(hs=null),Hd.forEach(a2),qd.forEach(a2)}function Cu(e,t){e.blockedOn===t&&(e.blockedOn=null,Mx||(Mx=!0,on.unstable_scheduleCallback(on.unstable_NormalPriority,N6)))}function Kd(e){function t(i){return Cu(i,e)}if(0<Ih.length){Cu(Ih[0],e);for(var r=1;r<Ih.length;r++){var n=Ih[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ds!==null&&Cu(ds,e),fs!==null&&Cu(fs,e),hs!==null&&Cu(hs,e),Hd.forEach(t),qd.forEach(t),r=0;r<za.length;r++)n=za[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<za.length&&(r=za[0],r.blockedOn===null);)hC(r),r.blockedOn===null&&za.shift()}var Yl=wa.ReactCurrentBatchConfig,em=!0;function E6(e,t,r,n){var i=Je,a=Yl.transition;Yl.transition=null;try{Je=1,e_(e,t,r,n)}finally{Je=i,Yl.transition=a}}function O6(e,t,r,n){var i=Je,a=Yl.transition;Yl.transition=null;try{Je=4,e_(e,t,r,n)}finally{Je=i,Yl.transition=a}}function e_(e,t,r,n){if(em){var i=Rx(e,t,r,n);if(i===null)e0(e,t,n,tm,r),i2(e,n);else if(j6(i,e,t,r,n))n.stopPropagation();else if(i2(e,n),t&4&&-1<S6.indexOf(e)){for(;i!==null;){var a=lh(i);if(a!==null&&cC(a),a=Rx(e,t,r,n),a===null&&e0(e,t,n,tm,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else e0(e,t,n,null,r)}}var tm=null;function Rx(e,t,r,n){if(tm=null,e=X1(n),e=io(e),e!==null)if(t=sl(e),t===null)e=null;else if(r=t.tag,r===13){if(e=tC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return tm=e,null}function pC(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(p6()){case Z1:return 1;case aC:return 4;case Qp:case m6:return 16;case sC:return 536870912;default:return 16}default:return 16}}var ns=null,t_=null,jp=null;function mC(){if(jp)return jp;var e,t=t_,r=t.length,n,i="value"in ns?ns.value:ns.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===i[a-n];n++);return jp=i.slice(e,1<n?1-n:void 0)}function Np(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Dh(){return!0}function s2(){return!1}function dn(e){function t(r,n,i,a,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Dh:s2,this.isPropagationStopped=s2,this}return _t(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Dh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Dh)},persist:function(){},isPersistent:Dh}),t}var ou={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},r_=dn(ou),oh=_t({},ou,{view:0,detail:0}),A6=dn(oh),Hv,qv,$u,Jg=_t({},oh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:n_,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==$u&&($u&&e.type==="mousemove"?(Hv=e.screenX-$u.screenX,qv=e.screenY-$u.screenY):qv=Hv=0,$u=e),Hv)},movementY:function(e){return"movementY"in e?e.movementY:qv}}),o2=dn(Jg),k6=_t({},Jg,{dataTransfer:0}),P6=dn(k6),T6=_t({},oh,{relatedTarget:0}),Kv=dn(T6),C6=_t({},ou,{animationName:0,elapsedTime:0,pseudoElement:0}),$6=dn(C6),M6=_t({},ou,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R6=dn(M6),I6=_t({},ou,{data:0}),l2=dn(I6),D6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L6={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"},F6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F6[e])?!!t[e]:!1}function n_(){return B6}var z6=_t({},oh,{key:function(e){if(e.key){var t=D6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Np(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?L6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:n_,charCode:function(e){return e.type==="keypress"?Np(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Np(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U6=dn(z6),W6=_t({},Jg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),c2=dn(W6),V6=_t({},oh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:n_}),H6=dn(V6),q6=_t({},ou,{propertyName:0,elapsedTime:0,pseudoElement:0}),K6=dn(q6),G6=_t({},Jg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Y6=dn(G6),X6=[9,13,27,32],i_=la&&"CompositionEvent"in window,jd=null;la&&"documentMode"in document&&(jd=document.documentMode);var Z6=la&&"TextEvent"in window&&!jd,gC=la&&(!i_||jd&&8<jd&&11>=jd),u2=" ",d2=!1;function yC(e,t){switch(e){case"keyup":return X6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kl=!1;function Q6(e,t){switch(e){case"compositionend":return vC(t);case"keypress":return t.which!==32?null:(d2=!0,u2);case"textInput":return e=t.data,e===u2&&d2?null:e;default:return null}}function J6(e,t){if(kl)return e==="compositionend"||!i_&&yC(e,t)?(e=mC(),jp=t_=ns=null,kl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return gC&&t.locale!=="ko"?null:t.data;default:return null}}var eF={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 f2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eF[e.type]:t==="textarea"}function xC(e,t,r,n){XT(n),t=rm(t,"onChange"),0<t.length&&(r=new r_("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Nd=null,Gd=null;function tF(e){PC(e,0)}function ey(e){var t=Cl(e);if(WT(t))return e}function rF(e,t){if(e==="change")return t}var bC=!1;if(la){var Gv;if(la){var Yv="oninput"in document;if(!Yv){var h2=document.createElement("div");h2.setAttribute("oninput","return;"),Yv=typeof h2.oninput=="function"}Gv=Yv}else Gv=!1;bC=Gv&&(!document.documentMode||9<document.documentMode)}function p2(){Nd&&(Nd.detachEvent("onpropertychange",wC),Gd=Nd=null)}function wC(e){if(e.propertyName==="value"&&ey(Gd)){var t=[];xC(t,Gd,e,X1(e)),eC(tF,t)}}function nF(e,t,r){e==="focusin"?(p2(),Nd=t,Gd=r,Nd.attachEvent("onpropertychange",wC)):e==="focusout"&&p2()}function iF(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ey(Gd)}function aF(e,t){if(e==="click")return ey(t)}function sF(e,t){if(e==="input"||e==="change")return ey(t)}function oF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var li=typeof Object.is=="function"?Object.is:oF;function Yd(e,t){if(li(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!yx.call(t,i)||!li(e[i],t[i]))return!1}return!0}function m2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function g2(e,t){var r=m2(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=m2(r)}}function _C(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_C(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function SC(){for(var e=window,t=Yp();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Yp(e.document)}return t}function a_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function lF(e){var t=SC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&_C(r.ownerDocument.documentElement,r)){if(n!==null&&a_(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=g2(r,a);var s=g2(r,n);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var cF=la&&"documentMode"in document&&11>=document.documentMode,Pl=null,Ix=null,Ed=null,Dx=!1;function y2(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Dx||Pl==null||Pl!==Yp(n)||(n=Pl,"selectionStart"in n&&a_(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ed&&Yd(Ed,n)||(Ed=n,n=rm(Ix,"onSelect"),0<n.length&&(t=new r_("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Pl)))}function Lh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Tl={animationend:Lh("Animation","AnimationEnd"),animationiteration:Lh("Animation","AnimationIteration"),animationstart:Lh("Animation","AnimationStart"),transitionend:Lh("Transition","TransitionEnd")},Xv={},jC={};la&&(jC=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function ty(e){if(Xv[e])return Xv[e];if(!Tl[e])return e;var t=Tl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in jC)return Xv[e]=t[r];return e}var NC=ty("animationend"),EC=ty("animationiteration"),OC=ty("animationstart"),AC=ty("transitionend"),kC=new Map,v2="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ps(e,t){kC.set(e,t),al(t,[e])}for(var Zv=0;Zv<v2.length;Zv++){var Qv=v2[Zv],uF=Qv.toLowerCase(),dF=Qv[0].toUpperCase()+Qv.slice(1);Ps(uF,"on"+dF)}Ps(NC,"onAnimationEnd");Ps(EC,"onAnimationIteration");Ps(OC,"onAnimationStart");Ps("dblclick","onDoubleClick");Ps("focusin","onFocus");Ps("focusout","onBlur");Ps(AC,"onTransitionEnd");yc("onMouseEnter",["mouseout","mouseover"]);yc("onMouseLeave",["mouseout","mouseover"]);yc("onPointerEnter",["pointerout","pointerover"]);yc("onPointerLeave",["pointerout","pointerover"]);al("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));al("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));al("onBeforeInput",["compositionend","keypress","textInput","paste"]);al("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));al("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));al("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ud="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(" "),fF=new Set("cancel close invalid load scroll toggle".split(" ").concat(ud));function x2(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,u6(n,t,void 0,e),e.currentTarget=null}function PC(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;x2(i,o,c),a=l}else for(s=0;s<n.length;s++){if(o=n[s],l=o.instance,c=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;x2(i,o,c),a=l}}}if(Zp)throw e=Cx,Zp=!1,Cx=null,e}function ht(e,t){var r=t[Ux];r===void 0&&(r=t[Ux]=new Set);var n=e+"__bubble";r.has(n)||(TC(t,e,2,!1),r.add(n))}function Jv(e,t,r){var n=0;t&&(n|=4),TC(r,e,n,t)}var Fh="_reactListening"+Math.random().toString(36).slice(2);function Xd(e){if(!e[Fh]){e[Fh]=!0,LT.forEach(function(r){r!=="selectionchange"&&(fF.has(r)||Jv(r,!1,e),Jv(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fh]||(t[Fh]=!0,Jv("selectionchange",!1,t))}}function TC(e,t,r,n){switch(pC(t)){case 1:var i=E6;break;case 4:i=O6;break;default:i=e_}r=i.bind(null,t,r,e),i=void 0,!Tx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function e0(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;o!==null;){if(s=io(o),s===null)return;if(l=s.tag,l===5||l===6){n=a=s;continue e}o=o.parentNode}}n=n.return}eC(function(){var c=a,d=X1(r),f=[];e:{var h=kC.get(e);if(h!==void 0){var p=r_,g=e;switch(e){case"keypress":if(Np(r)===0)break e;case"keydown":case"keyup":p=U6;break;case"focusin":g="focus",p=Kv;break;case"focusout":g="blur",p=Kv;break;case"beforeblur":case"afterblur":p=Kv;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=o2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=P6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=H6;break;case NC:case EC:case OC:p=$6;break;case AC:p=K6;break;case"scroll":p=A6;break;case"wheel":p=Y6;break;case"copy":case"cut":case"paste":p=R6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=c2}var m=(t&4)!==0,v=!m&&e==="scroll",y=m?h!==null?h+"Capture":null:h;m=[];for(var x=c,b;x!==null;){b=x;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=Vd(x,y),S!=null&&m.push(Zd(x,S,b)))),v)break;x=x.return}0<m.length&&(h=new p(h,g,null,r,d),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==kx&&(g=r.relatedTarget||r.fromElement)&&(io(g)||g[ca]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=c,g=g?io(g):null,g!==null&&(v=sl(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(m=o2,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(m=c2,S="onPointerLeave",y="onPointerEnter",x="pointer"),v=p==null?h:Cl(p),b=g==null?h:Cl(g),h=new m(S,x+"leave",p,r,d),h.target=v,h.relatedTarget=b,S=null,io(d)===c&&(m=new m(y,x+"enter",g,r,d),m.target=b,m.relatedTarget=v,S=m),v=S,p&&g)t:{for(m=p,y=g,x=0,b=m;b;b=pl(b))x++;for(b=0,S=y;S;S=pl(S))b++;for(;0<x-b;)m=pl(m),x--;for(;0<b-x;)y=pl(y),b--;for(;x--;){if(m===y||y!==null&&m===y.alternate)break t;m=pl(m),y=pl(y)}m=null}else m=null;p!==null&&b2(f,h,p,m,!1),g!==null&&v!==null&&b2(f,v,g,m,!0)}}e:{if(h=c?Cl(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var _=rF;else if(f2(h))if(bC)_=sF;else{_=iF;var j=nF}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=aF);if(_&&(_=_(e,c))){xC(f,_,r,d);break e}j&&j(e,h,c),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&jx(h,"number",h.value)}switch(j=c?Cl(c):window,e){case"focusin":(f2(j)||j.contentEditable==="true")&&(Pl=j,Ix=c,Ed=null);break;case"focusout":Ed=Ix=Pl=null;break;case"mousedown":Dx=!0;break;case"contextmenu":case"mouseup":case"dragend":Dx=!1,y2(f,r,d);break;case"selectionchange":if(cF)break;case"keydown":case"keyup":y2(f,r,d)}var N;if(i_)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else kl?yC(e,r)&&(A="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(A="onCompositionStart");A&&(gC&&r.locale!=="ko"&&(kl||A!=="onCompositionStart"?A==="onCompositionEnd"&&kl&&(N=mC()):(ns=d,t_="value"in ns?ns.value:ns.textContent,kl=!0)),j=rm(c,A),0<j.length&&(A=new l2(A,e,null,r,d),f.push({event:A,listeners:j}),N?A.data=N:(N=vC(r),N!==null&&(A.data=N)))),(N=Z6?Q6(e,r):J6(e,r))&&(c=rm(c,"onBeforeInput"),0<c.length&&(d=new l2("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:c}),d.data=N))}PC(f,t)})}function Zd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function rm(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Vd(e,r),a!=null&&n.unshift(Zd(e,a,i)),a=Vd(e,t),a!=null&&n.push(Zd(e,a,i))),e=e.return}return n}function pl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function b2(e,t,r,n,i){for(var a=t._reactName,s=[];r!==null&&r!==n;){var o=r,l=o.alternate,c=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&c!==null&&(o=c,i?(l=Vd(r,a),l!=null&&s.unshift(Zd(r,l,o))):i||(l=Vd(r,a),l!=null&&s.push(Zd(r,l,o)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var hF=/\r\n?/g,pF=/\u0000|\uFFFD/g;function w2(e){return(typeof e=="string"?e:""+e).replace(hF,`
|
||
`).replace(pF,"")}function Bh(e,t,r){if(t=w2(t),w2(e)!==t&&r)throw Error(ee(425))}function nm(){}var Lx=null,Fx=null;function Bx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zx=typeof setTimeout=="function"?setTimeout:void 0,mF=typeof clearTimeout=="function"?clearTimeout:void 0,_2=typeof Promise=="function"?Promise:void 0,gF=typeof queueMicrotask=="function"?queueMicrotask:typeof _2<"u"?function(e){return _2.resolve(null).then(e).catch(yF)}:zx;function yF(e){setTimeout(function(){throw e})}function t0(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Kd(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Kd(t)}function ps(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function S2(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var lu=Math.random().toString(36).slice(2),_i="__reactFiber$"+lu,Qd="__reactProps$"+lu,ca="__reactContainer$"+lu,Ux="__reactEvents$"+lu,vF="__reactListeners$"+lu,xF="__reactHandles$"+lu;function io(e){var t=e[_i];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ca]||r[_i]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=S2(e);e!==null;){if(r=e[_i])return r;e=S2(e)}return t}e=r,r=e.parentNode}return null}function lh(e){return e=e[_i]||e[ca],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ee(33))}function ry(e){return e[Qd]||null}var Wx=[],$l=-1;function Ts(e){return{current:e}}function gt(e){0>$l||(e.current=Wx[$l],Wx[$l]=null,$l--)}function ot(e,t){$l++,Wx[$l]=e.current,e.current=t}var Os={},br=Ts(Os),Br=Ts(!1),Do=Os;function vc(e,t){var r=e.type.contextTypes;if(!r)return Os;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zr(e){return e=e.childContextTypes,e!=null}function im(){gt(Br),gt(br)}function j2(e,t,r){if(br.current!==Os)throw Error(ee(168));ot(br,t),ot(Br,r)}function CC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(ee(108,n6(e)||"Unknown",i));return _t({},r,n)}function am(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Os,Do=br.current,ot(br,e),ot(Br,Br.current),!0}function N2(e,t,r){var n=e.stateNode;if(!n)throw Error(ee(169));r?(e=CC(e,t,Do),n.__reactInternalMemoizedMergedChildContext=e,gt(Br),gt(br),ot(br,e)):gt(Br),ot(Br,r)}var qi=null,ny=!1,r0=!1;function $C(e){qi===null?qi=[e]:qi.push(e)}function bF(e){ny=!0,$C(e)}function Cs(){if(!r0&&qi!==null){r0=!0;var e=0,t=Je;try{var r=qi;for(Je=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}qi=null,ny=!1}catch(i){throw qi!==null&&(qi=qi.slice(e+1)),iC(Z1,Cs),i}finally{Je=t,r0=!1}}return null}var Ml=[],Rl=0,sm=null,om=0,xn=[],bn=0,Lo=null,Yi=1,Xi="";function Gs(e,t){Ml[Rl++]=om,Ml[Rl++]=sm,sm=e,om=t}function MC(e,t,r){xn[bn++]=Yi,xn[bn++]=Xi,xn[bn++]=Lo,Lo=e;var n=Yi;e=Xi;var i=32-ri(n)-1;n&=~(1<<i),r+=1;var a=32-ri(t)+i;if(30<a){var s=i-i%5;a=(n&(1<<s)-1).toString(32),n>>=s,i-=s,Yi=1<<32-ri(t)+i|r<<i|n,Xi=a+e}else Yi=1<<a|r<<i|n,Xi=e}function s_(e){e.return!==null&&(Gs(e,1),MC(e,1,0))}function o_(e){for(;e===sm;)sm=Ml[--Rl],Ml[Rl]=null,om=Ml[--Rl],Ml[Rl]=null;for(;e===Lo;)Lo=xn[--bn],xn[bn]=null,Xi=xn[--bn],xn[bn]=null,Yi=xn[--bn],xn[bn]=null}var nn=null,tn=null,vt=!1,Yn=null;function RC(e,t){var r=jn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function E2(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,nn=e,tn=ps(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,nn=e,tn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Lo!==null?{id:Yi,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=jn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,nn=e,tn=null,!0):!1;default:return!1}}function Vx(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hx(e){if(vt){var t=tn;if(t){var r=t;if(!E2(e,t)){if(Vx(e))throw Error(ee(418));t=ps(r.nextSibling);var n=nn;t&&E2(e,t)?RC(n,r):(e.flags=e.flags&-4097|2,vt=!1,nn=e)}}else{if(Vx(e))throw Error(ee(418));e.flags=e.flags&-4097|2,vt=!1,nn=e}}}function O2(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;nn=e}function zh(e){if(e!==nn)return!1;if(!vt)return O2(e),vt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bx(e.type,e.memoizedProps)),t&&(t=tn)){if(Vx(e))throw IC(),Error(ee(418));for(;t;)RC(e,t),t=ps(t.nextSibling)}if(O2(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ee(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){tn=ps(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}tn=null}}else tn=nn?ps(e.stateNode.nextSibling):null;return!0}function IC(){for(var e=tn;e;)e=ps(e.nextSibling)}function xc(){tn=nn=null,vt=!1}function l_(e){Yn===null?Yn=[e]:Yn.push(e)}var wF=wa.ReactCurrentBatchConfig;function Mu(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ee(309));var n=r.stateNode}if(!n)throw Error(ee(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(s){var o=i.refs;s===null?delete o[a]:o[a]=s},t._stringRef=a,t)}if(typeof e!="string")throw Error(ee(284));if(!r._owner)throw Error(ee(290,e))}return e}function Uh(e,t){throw e=Object.prototype.toString.call(t),Error(ee(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function A2(e){var t=e._init;return t(e._payload)}function DC(e){function t(y,x){if(e){var b=y.deletions;b===null?(y.deletions=[x],y.flags|=16):b.push(x)}}function r(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function n(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=vs(y,x),y.index=0,y.sibling=null,y}function a(y,x,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<x?(y.flags|=2,x):b):(y.flags|=2,x)):(y.flags|=1048576,x)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function o(y,x,b,S){return x===null||x.tag!==6?(x=c0(b,y.mode,S),x.return=y,x):(x=i(x,b),x.return=y,x)}function l(y,x,b,S){var _=b.type;return _===Al?d(y,x,b.props.children,S,b.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ia&&A2(_)===x.type)?(S=i(x,b.props),S.ref=Mu(y,x,b),S.return=y,S):(S=Cp(b.type,b.key,b.props,null,y.mode,S),S.ref=Mu(y,x,b),S.return=y,S)}function c(y,x,b,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=u0(b,y.mode,S),x.return=y,x):(x=i(x,b.children||[]),x.return=y,x)}function d(y,x,b,S,_){return x===null||x.tag!==7?(x=Ao(b,y.mode,S,_),x.return=y,x):(x=i(x,b),x.return=y,x)}function f(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=c0(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Th:return b=Cp(x.type,x.key,x.props,null,y.mode,b),b.ref=Mu(y,null,x),b.return=y,b;case Ol:return x=u0(x,y.mode,b),x.return=y,x;case Ia:var S=x._init;return f(y,S(x._payload),b)}if(ld(x)||ku(x))return x=Ao(x,y.mode,b,null),x.return=y,x;Uh(y,x)}return null}function h(y,x,b,S){var _=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return _!==null?null:o(y,x,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Th:return b.key===_?l(y,x,b,S):null;case Ol:return b.key===_?c(y,x,b,S):null;case Ia:return _=b._init,h(y,x,_(b._payload),S)}if(ld(b)||ku(b))return _!==null?null:d(y,x,b,S,null);Uh(y,b)}return null}function p(y,x,b,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,o(x,y,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Th:return y=y.get(S.key===null?b:S.key)||null,l(x,y,S,_);case Ol:return y=y.get(S.key===null?b:S.key)||null,c(x,y,S,_);case Ia:var j=S._init;return p(y,x,b,j(S._payload),_)}if(ld(S)||ku(S))return y=y.get(b)||null,d(x,y,S,_,null);Uh(x,S)}return null}function g(y,x,b,S){for(var _=null,j=null,N=x,A=x=0,E=null;N!==null&&A<b.length;A++){N.index>A?(E=N,N=null):E=N.sibling;var C=h(y,N,b[A],S);if(C===null){N===null&&(N=E);break}e&&N&&C.alternate===null&&t(y,N),x=a(C,x,A),j===null?_=C:j.sibling=C,j=C,N=E}if(A===b.length)return r(y,N),vt&&Gs(y,A),_;if(N===null){for(;A<b.length;A++)N=f(y,b[A],S),N!==null&&(x=a(N,x,A),j===null?_=N:j.sibling=N,j=N);return vt&&Gs(y,A),_}for(N=n(y,N);A<b.length;A++)E=p(N,y,A,b[A],S),E!==null&&(e&&E.alternate!==null&&N.delete(E.key===null?A:E.key),x=a(E,x,A),j===null?_=E:j.sibling=E,j=E);return e&&N.forEach(function(P){return t(y,P)}),vt&&Gs(y,A),_}function m(y,x,b,S){var _=ku(b);if(typeof _!="function")throw Error(ee(150));if(b=_.call(b),b==null)throw Error(ee(151));for(var j=_=null,N=x,A=x=0,E=null,C=b.next();N!==null&&!C.done;A++,C=b.next()){N.index>A?(E=N,N=null):E=N.sibling;var P=h(y,N,C.value,S);if(P===null){N===null&&(N=E);break}e&&N&&P.alternate===null&&t(y,N),x=a(P,x,A),j===null?_=P:j.sibling=P,j=P,N=E}if(C.done)return r(y,N),vt&&Gs(y,A),_;if(N===null){for(;!C.done;A++,C=b.next())C=f(y,C.value,S),C!==null&&(x=a(C,x,A),j===null?_=C:j.sibling=C,j=C);return vt&&Gs(y,A),_}for(N=n(y,N);!C.done;A++,C=b.next())C=p(N,y,A,C.value,S),C!==null&&(e&&C.alternate!==null&&N.delete(C.key===null?A:C.key),x=a(C,x,A),j===null?_=C:j.sibling=C,j=C);return e&&N.forEach(function(T){return t(y,T)}),vt&&Gs(y,A),_}function v(y,x,b,S){if(typeof b=="object"&&b!==null&&b.type===Al&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Th:e:{for(var _=b.key,j=x;j!==null;){if(j.key===_){if(_=b.type,_===Al){if(j.tag===7){r(y,j.sibling),x=i(j,b.props.children),x.return=y,y=x;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ia&&A2(_)===j.type){r(y,j.sibling),x=i(j,b.props),x.ref=Mu(y,j,b),x.return=y,y=x;break e}r(y,j);break}else t(y,j);j=j.sibling}b.type===Al?(x=Ao(b.props.children,y.mode,S,b.key),x.return=y,y=x):(S=Cp(b.type,b.key,b.props,null,y.mode,S),S.ref=Mu(y,x,b),S.return=y,y=S)}return s(y);case Ol:e:{for(j=b.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){r(y,x.sibling),x=i(x,b.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else t(y,x);x=x.sibling}x=u0(b,y.mode,S),x.return=y,y=x}return s(y);case Ia:return j=b._init,v(y,x,j(b._payload),S)}if(ld(b))return g(y,x,b,S);if(ku(b))return m(y,x,b,S);Uh(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(r(y,x.sibling),x=i(x,b),x.return=y,y=x):(r(y,x),x=c0(b,y.mode,S),x.return=y,y=x),s(y)):r(y,x)}return v}var bc=DC(!0),LC=DC(!1),lm=Ts(null),cm=null,Il=null,c_=null;function u_(){c_=Il=cm=null}function d_(e){var t=lm.current;gt(lm),e._currentValue=t}function qx(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Xl(e,t){cm=e,c_=Il=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Lr=!0),e.firstContext=null)}function Pn(e){var t=e._currentValue;if(c_!==e)if(e={context:e,memoizedValue:t,next:null},Il===null){if(cm===null)throw Error(ee(308));Il=e,cm.dependencies={lanes:0,firstContext:e}}else Il=Il.next=e;return t}var ao=null;function f_(e){ao===null?ao=[e]:ao.push(e)}function FC(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,f_(t)):(r.next=i.next,i.next=r),t.interleaved=r,ua(e,n)}function ua(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Da=!1;function h_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function BC(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function na(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ms(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ve&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,ua(e,r)}return i=n.interleaved,i===null?(t.next=t,f_(n)):(t.next=i.next,i.next=t),n.interleaved=t,ua(e,r)}function Ep(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Q1(e,r)}}function k2(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=s:a=a.next=s,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function um(e,t,r,n){var i=e.updateQueue;Da=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?a=c:s.next=c,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==s&&(o===null?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;s=0,d=c=l=null,o=a;do{var h=o.lane,p=o.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,m=o;switch(h=t,p=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=_t({},f,h);break e;case 2:Da=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[o]:h.push(o))}else p={eventTime:p,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,s|=h;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Bo|=s,e.lanes=s,e.memoizedState=f}}function P2(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ee(191,i));i.call(n)}}}var ch={},Oi=Ts(ch),Jd=Ts(ch),ef=Ts(ch);function so(e){if(e===ch)throw Error(ee(174));return e}function p_(e,t){switch(ot(ef,t),ot(Jd,e),ot(Oi,ch),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ex(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ex(t,e)}gt(Oi),ot(Oi,t)}function wc(){gt(Oi),gt(Jd),gt(ef)}function zC(e){so(ef.current);var t=so(Oi.current),r=Ex(t,e.type);t!==r&&(ot(Jd,e),ot(Oi,r))}function m_(e){Jd.current===e&&(gt(Oi),gt(Jd))}var bt=Ts(0);function dm(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var n0=[];function g_(){for(var e=0;e<n0.length;e++)n0[e]._workInProgressVersionPrimary=null;n0.length=0}var Op=wa.ReactCurrentDispatcher,i0=wa.ReactCurrentBatchConfig,Fo=0,wt=null,Vt=null,Jt=null,fm=!1,Od=!1,tf=0,_F=0;function fr(){throw Error(ee(321))}function y_(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!li(e[r],t[r]))return!1;return!0}function v_(e,t,r,n,i,a){if(Fo=a,wt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Op.current=e===null||e.memoizedState===null?EF:OF,e=r(n,i),Od){a=0;do{if(Od=!1,tf=0,25<=a)throw Error(ee(301));a+=1,Jt=Vt=null,t.updateQueue=null,Op.current=AF,e=r(n,i)}while(Od)}if(Op.current=hm,t=Vt!==null&&Vt.next!==null,Fo=0,Jt=Vt=wt=null,fm=!1,t)throw Error(ee(300));return e}function x_(){var e=tf!==0;return tf=0,e}function yi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?wt.memoizedState=Jt=e:Jt=Jt.next=e,Jt}function Tn(){if(Vt===null){var e=wt.alternate;e=e!==null?e.memoizedState:null}else e=Vt.next;var t=Jt===null?wt.memoizedState:Jt.next;if(t!==null)Jt=t,Vt=e;else{if(e===null)throw Error(ee(310));Vt=e,e={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},Jt===null?wt.memoizedState=Jt=e:Jt=Jt.next=e}return Jt}function rf(e,t){return typeof t=="function"?t(e):t}function a0(e){var t=Tn(),r=t.queue;if(r===null)throw Error(ee(311));r.lastRenderedReducer=e;var n=Vt,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var o=s=null,l=null,c=a;do{var d=c.lane;if((Fo&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=f,s=n):l=l.next=f,wt.lanes|=d,Bo|=d}c=c.next}while(c!==null&&c!==a);l===null?s=n:l.next=o,li(n,t.memoizedState)||(Lr=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,wt.lanes|=a,Bo|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function s0(e){var t=Tn(),r=t.queue;if(r===null)throw Error(ee(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);li(a,t.memoizedState)||(Lr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function UC(){}function WC(e,t){var r=wt,n=Tn(),i=t(),a=!li(n.memoizedState,i);if(a&&(n.memoizedState=i,Lr=!0),n=n.queue,b_(qC.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Jt!==null&&Jt.memoizedState.tag&1){if(r.flags|=2048,nf(9,HC.bind(null,r,n,i,t),void 0,null),rr===null)throw Error(ee(349));Fo&30||VC(r,t,i)}return i}function VC(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=wt.updateQueue,t===null?(t={lastEffect:null,stores:null},wt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function HC(e,t,r,n){t.value=r,t.getSnapshot=n,KC(t)&&GC(e)}function qC(e,t,r){return r(function(){KC(t)&&GC(e)})}function KC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!li(e,r)}catch{return!0}}function GC(e){var t=ua(e,1);t!==null&&ni(t,e,1,-1)}function T2(e){var t=yi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rf,lastRenderedState:e},t.queue=e,e=e.dispatch=NF.bind(null,wt,e),[t.memoizedState,e]}function nf(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=wt.updateQueue,t===null?(t={lastEffect:null,stores:null},wt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function YC(){return Tn().memoizedState}function Ap(e,t,r,n){var i=yi();wt.flags|=e,i.memoizedState=nf(1|t,r,void 0,n===void 0?null:n)}function iy(e,t,r,n){var i=Tn();n=n===void 0?null:n;var a=void 0;if(Vt!==null){var s=Vt.memoizedState;if(a=s.destroy,n!==null&&y_(n,s.deps)){i.memoizedState=nf(t,r,a,n);return}}wt.flags|=e,i.memoizedState=nf(1|t,r,a,n)}function C2(e,t){return Ap(8390656,8,e,t)}function b_(e,t){return iy(2048,8,e,t)}function XC(e,t){return iy(4,2,e,t)}function ZC(e,t){return iy(4,4,e,t)}function QC(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function JC(e,t,r){return r=r!=null?r.concat([e]):null,iy(4,4,QC.bind(null,t,e),r)}function w_(){}function e$(e,t){var r=Tn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&y_(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function t$(e,t){var r=Tn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&y_(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function r$(e,t,r){return Fo&21?(li(r,t)||(r=oC(),wt.lanes|=r,Bo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Lr=!0),e.memoizedState=r)}function SF(e,t){var r=Je;Je=r!==0&&4>r?r:4,e(!0);var n=i0.transition;i0.transition={};try{e(!1),t()}finally{Je=r,i0.transition=n}}function n$(){return Tn().memoizedState}function jF(e,t,r){var n=ys(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},i$(e))a$(t,r);else if(r=FC(e,t,r,n),r!==null){var i=Pr();ni(r,e,n,i),s$(r,t,n)}}function NF(e,t,r){var n=ys(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(i$(e))a$(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,r);if(i.hasEagerState=!0,i.eagerState=o,li(o,s)){var l=t.interleaved;l===null?(i.next=i,f_(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=FC(e,t,i,n),r!==null&&(i=Pr(),ni(r,e,n,i),s$(r,t,n))}}function i$(e){var t=e.alternate;return e===wt||t!==null&&t===wt}function a$(e,t){Od=fm=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function s$(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Q1(e,r)}}var hm={readContext:Pn,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},EF={readContext:Pn,useCallback:function(e,t){return yi().memoizedState=[e,t===void 0?null:t],e},useContext:Pn,useEffect:C2,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ap(4194308,4,QC.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ap(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ap(4,2,e,t)},useMemo:function(e,t){var r=yi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=yi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=jF.bind(null,wt,e),[n.memoizedState,e]},useRef:function(e){var t=yi();return e={current:e},t.memoizedState=e},useState:T2,useDebugValue:w_,useDeferredValue:function(e){return yi().memoizedState=e},useTransition:function(){var e=T2(!1),t=e[0];return e=SF.bind(null,e[1]),yi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=wt,i=yi();if(vt){if(r===void 0)throw Error(ee(407));r=r()}else{if(r=t(),rr===null)throw Error(ee(349));Fo&30||VC(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,C2(qC.bind(null,n,a,e),[e]),n.flags|=2048,nf(9,HC.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=yi(),t=rr.identifierPrefix;if(vt){var r=Xi,n=Yi;r=(n&~(1<<32-ri(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=tf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=_F++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},OF={readContext:Pn,useCallback:e$,useContext:Pn,useEffect:b_,useImperativeHandle:JC,useInsertionEffect:XC,useLayoutEffect:ZC,useMemo:t$,useReducer:a0,useRef:YC,useState:function(){return a0(rf)},useDebugValue:w_,useDeferredValue:function(e){var t=Tn();return r$(t,Vt.memoizedState,e)},useTransition:function(){var e=a0(rf)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:UC,useSyncExternalStore:WC,useId:n$,unstable_isNewReconciler:!1},AF={readContext:Pn,useCallback:e$,useContext:Pn,useEffect:b_,useImperativeHandle:JC,useInsertionEffect:XC,useLayoutEffect:ZC,useMemo:t$,useReducer:s0,useRef:YC,useState:function(){return s0(rf)},useDebugValue:w_,useDeferredValue:function(e){var t=Tn();return Vt===null?t.memoizedState=e:r$(t,Vt.memoizedState,e)},useTransition:function(){var e=s0(rf)[0],t=Tn().memoizedState;return[e,t]},useMutableSource:UC,useSyncExternalStore:WC,useId:n$,unstable_isNewReconciler:!1};function zn(e,t){if(e&&e.defaultProps){t=_t({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Kx(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:_t({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ay={isMounted:function(e){return(e=e._reactInternals)?sl(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Pr(),i=ys(e),a=na(n,i);a.payload=t,r!=null&&(a.callback=r),t=ms(e,a,i),t!==null&&(ni(t,e,i,n),Ep(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Pr(),i=ys(e),a=na(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=ms(e,a,i),t!==null&&(ni(t,e,i,n),Ep(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Pr(),n=ys(e),i=na(r,n);i.tag=2,t!=null&&(i.callback=t),t=ms(e,i,n),t!==null&&(ni(t,e,n,r),Ep(t,e,n))}};function $2(e,t,r,n,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,s):t.prototype&&t.prototype.isPureReactComponent?!Yd(r,n)||!Yd(i,a):!0}function o$(e,t,r){var n=!1,i=Os,a=t.contextType;return typeof a=="object"&&a!==null?a=Pn(a):(i=zr(t)?Do:br.current,n=t.contextTypes,a=(n=n!=null)?vc(e,i):Os),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ay,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function M2(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ay.enqueueReplaceState(t,t.state,null)}function Gx(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},h_(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Pn(a):(a=zr(t)?Do:br.current,i.context=vc(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Kx(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ay.enqueueReplaceState(i,i.state,null),um(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function _c(e,t){try{var r="",n=t;do r+=r6(n),n=n.return;while(n);var i=r}catch(a){i=`
|
||
Error generating stack: `+a.message+`
|
||
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function o0(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Yx(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var kF=typeof WeakMap=="function"?WeakMap:Map;function l$(e,t,r){r=na(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){mm||(mm=!0,ab=n),Yx(e,t)},r}function c$(e,t,r){r=na(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Yx(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Yx(e,t),typeof n!="function"&&(gs===null?gs=new Set([this]):gs.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function R2(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new kF;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=WF.bind(null,e,t,r),t.then(e,e))}function I2(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function D2(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=na(-1,1),t.tag=2,ms(r,t,1))),r.lanes|=1),e)}var PF=wa.ReactCurrentOwner,Lr=!1;function Sr(e,t,r,n){t.child=e===null?LC(t,null,r,n):bc(t,e.child,r,n)}function L2(e,t,r,n,i){r=r.render;var a=t.ref;return Xl(t,i),n=v_(e,t,r,n,a,i),r=x_(),e!==null&&!Lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,da(e,t,i)):(vt&&r&&s_(t),t.flags|=1,Sr(e,t,n,i),t.child)}function F2(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!k_(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,u$(e,t,a,n,i)):(e=Cp(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var s=a.memoizedProps;if(r=r.compare,r=r!==null?r:Yd,r(s,n)&&e.ref===t.ref)return da(e,t,i)}return t.flags|=1,e=vs(a,n),e.ref=t.ref,e.return=t,t.child=e}function u$(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(Yd(a,n)&&e.ref===t.ref)if(Lr=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(Lr=!0);else return t.lanes=e.lanes,da(e,t,i)}return Xx(e,t,r,n,i)}function d$(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ot(Ll,Zr),Zr|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ot(Ll,Zr),Zr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,ot(Ll,Zr),Zr|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,ot(Ll,Zr),Zr|=n;return Sr(e,t,i,r),t.child}function f$(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Xx(e,t,r,n,i){var a=zr(r)?Do:br.current;return a=vc(t,a),Xl(t,i),r=v_(e,t,r,n,a,i),n=x_(),e!==null&&!Lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,da(e,t,i)):(vt&&n&&s_(t),t.flags|=1,Sr(e,t,r,i),t.child)}function B2(e,t,r,n,i){if(zr(r)){var a=!0;am(t)}else a=!1;if(Xl(t,i),t.stateNode===null)kp(e,t),o$(t,r,n),Gx(t,r,n,i),n=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=Pn(c):(c=zr(r)?Do:br.current,c=vc(t,c));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==n||l!==c)&&M2(t,s,n,c),Da=!1;var h=t.memoizedState;s.state=h,um(t,n,s,i),l=t.memoizedState,o!==n||h!==l||Br.current||Da?(typeof d=="function"&&(Kx(t,r,d,n),l=t.memoizedState),(o=Da||$2(t,r,o,n,h,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=c,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,BC(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:zn(t.type,o),s.props=c,f=t.pendingProps,h=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=Pn(l):(l=zr(r)?Do:br.current,l=vc(t,l));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==f||h!==l)&&M2(t,s,n,l),Da=!1,h=t.memoizedState,s.state=h,um(t,n,s,i);var g=t.memoizedState;o!==f||h!==g||Br.current||Da?(typeof p=="function"&&(Kx(t,r,p,n),g=t.memoizedState),(c=Da||$2(t,r,c,n,h,g,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,g,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),s.props=n,s.state=g,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Zx(e,t,r,n,a,i)}function Zx(e,t,r,n,i,a){f$(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return i&&N2(t,r,!1),da(e,t,a);n=t.stateNode,PF.current=t;var o=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=bc(t,e.child,null,a),t.child=bc(t,null,o,a)):Sr(e,t,o,a),t.memoizedState=n.state,i&&N2(t,r,!0),t.child}function h$(e){var t=e.stateNode;t.pendingContext?j2(e,t.pendingContext,t.pendingContext!==t.context):t.context&&j2(e,t.context,!1),p_(e,t.containerInfo)}function z2(e,t,r,n,i){return xc(),l_(i),t.flags|=256,Sr(e,t,r,n),t.child}var Qx={dehydrated:null,treeContext:null,retryLane:0};function Jx(e){return{baseLanes:e,cachePool:null,transitions:null}}function p$(e,t,r){var n=t.pendingProps,i=bt.current,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ot(bt,i&1),e===null)return Hx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=n.children,e=n.fallback,a?(n=t.mode,a=t.child,s={mode:"hidden",children:s},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=s):a=ly(s,n,0,null),e=Ao(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Jx(r),t.memoizedState=Qx,e):__(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return TF(e,t,s,n,o,i,r);if(a){a=n.fallback,s=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(s&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=vs(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?a=vs(o,a):(a=Ao(a,s,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,s=e.child.memoizedState,s=s===null?Jx(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~r,t.memoizedState=Qx,n}return a=e.child,e=a.sibling,n=vs(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function __(e,t){return t=ly({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Wh(e,t,r,n){return n!==null&&l_(n),bc(t,e.child,null,r),e=__(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function TF(e,t,r,n,i,a,s){if(r)return t.flags&256?(t.flags&=-257,n=o0(Error(ee(422))),Wh(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=ly({mode:"visible",children:n.children},i,0,null),a=Ao(a,i,s,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&bc(t,e.child,null,s),t.child.memoizedState=Jx(s),t.memoizedState=Qx,a);if(!(t.mode&1))return Wh(e,t,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,a=Error(ee(419)),n=o0(a,n,void 0),Wh(e,t,s,n)}if(o=(s&e.childLanes)!==0,Lr||o){if(n=rr,n!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|s)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,ua(e,i),ni(n,e,i,-1))}return A_(),n=o0(Error(ee(421))),Wh(e,t,s,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=VF.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,tn=ps(i.nextSibling),nn=t,vt=!0,Yn=null,e!==null&&(xn[bn++]=Yi,xn[bn++]=Xi,xn[bn++]=Lo,Yi=e.id,Xi=e.overflow,Lo=t),t=__(t,n.children),t.flags|=4096,t)}function U2(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),qx(e.return,t,r)}function l0(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function m$(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(Sr(e,t,n.children,r),n=bt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&U2(e,r,t);else if(e.tag===19)U2(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ot(bt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&dm(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),l0(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dm(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}l0(t,!0,r,null,a);break;case"together":l0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function kp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function da(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Bo|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ee(153));if(t.child!==null){for(e=t.child,r=vs(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=vs(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function CF(e,t,r){switch(t.tag){case 3:h$(t),xc();break;case 5:zC(t);break;case 1:zr(t.type)&&am(t);break;case 4:p_(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;ot(lm,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ot(bt,bt.current&1),t.flags|=128,null):r&t.child.childLanes?p$(e,t,r):(ot(bt,bt.current&1),e=da(e,t,r),e!==null?e.sibling:null);ot(bt,bt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return m$(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ot(bt,bt.current),n)break;return null;case 22:case 23:return t.lanes=0,d$(e,t,r)}return da(e,t,r)}var g$,eb,y$,v$;g$=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};eb=function(){};y$=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,so(Oi.current);var a=null;switch(r){case"input":i=_x(e,i),n=_x(e,n),a=[];break;case"select":i=_t({},i,{value:void 0}),n=_t({},n,{value:void 0}),a=[];break;case"textarea":i=Nx(e,i),n=Nx(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=nm)}Ox(r,n);var s;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(s in o)o.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ud.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in n){var l=n[c];if(o=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(s in o)!o.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&o[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(a||(a=[]),a.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(a=a||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ud.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ht("scroll",e),a||o===l||(a=[])):(a=a||[]).push(c,l))}r&&(a=a||[]).push("style",r);var c=a;(t.updateQueue=c)&&(t.flags|=4)}};v$=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ru(e,t){if(!vt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function hr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function $F(e,t,r){var n=t.pendingProps;switch(o_(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hr(t),null;case 1:return zr(t.type)&&im(),hr(t),null;case 3:return n=t.stateNode,wc(),gt(Br),gt(br),g_(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yn!==null&&(lb(Yn),Yn=null))),eb(e,t),hr(t),null;case 5:m_(t);var i=so(ef.current);if(r=t.type,e!==null&&t.stateNode!=null)y$(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ee(166));return hr(t),null}if(e=so(Oi.current),zh(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[_i]=t,n[Qd]=a,e=(t.mode&1)!==0,r){case"dialog":ht("cancel",n),ht("close",n);break;case"iframe":case"object":case"embed":ht("load",n);break;case"video":case"audio":for(i=0;i<ud.length;i++)ht(ud[i],n);break;case"source":ht("error",n);break;case"img":case"image":case"link":ht("error",n),ht("load",n);break;case"details":ht("toggle",n);break;case"input":Zj(n,a),ht("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},ht("invalid",n);break;case"textarea":Jj(n,a),ht("invalid",n)}Ox(r,a),i=null;for(var s in a)if(a.hasOwnProperty(s)){var o=a[s];s==="children"?typeof o=="string"?n.textContent!==o&&(a.suppressHydrationWarning!==!0&&Bh(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&Bh(n.textContent,o,e),i=["children",""+o]):Ud.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ht("scroll",n)}switch(r){case"input":Ch(n),Qj(n,a,!0);break;case"textarea":Ch(n),e2(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=nm)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qT(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[_i]=t,e[Qd]=n,g$(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ax(r,n),r){case"dialog":ht("cancel",e),ht("close",e),i=n;break;case"iframe":case"object":case"embed":ht("load",e),i=n;break;case"video":case"audio":for(i=0;i<ud.length;i++)ht(ud[i],e);i=n;break;case"source":ht("error",e),i=n;break;case"img":case"image":case"link":ht("error",e),ht("load",e),i=n;break;case"details":ht("toggle",e),i=n;break;case"input":Zj(e,n),i=_x(e,n),ht("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=_t({},n,{value:void 0}),ht("invalid",e);break;case"textarea":Jj(e,n),i=Nx(e,n),ht("invalid",e);break;default:i=n}Ox(r,i),o=i;for(a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="style"?YT(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&KT(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Wd(e,l):typeof l=="number"&&Wd(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Ud.hasOwnProperty(a)?l!=null&&a==="onScroll"&&ht("scroll",e):l!=null&&q1(e,a,l,s))}switch(r){case"input":Ch(e),Qj(e,n,!1);break;case"textarea":Ch(e),e2(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Es(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?ql(e,!!n.multiple,a,!1):n.defaultValue!=null&&ql(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=nm)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return hr(t),null;case 6:if(e&&t.stateNode!=null)v$(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ee(166));if(r=so(ef.current),so(Oi.current),zh(t)){if(n=t.stateNode,r=t.memoizedProps,n[_i]=t,(a=n.nodeValue!==r)&&(e=nn,e!==null))switch(e.tag){case 3:Bh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Bh(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[_i]=t,t.stateNode=n}return hr(t),null;case 13:if(gt(bt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(vt&&tn!==null&&t.mode&1&&!(t.flags&128))IC(),xc(),t.flags|=98560,a=!1;else if(a=zh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(ee(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(ee(317));a[_i]=t}else xc(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hr(t),a=!1}else Yn!==null&&(lb(Yn),Yn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||bt.current&1?Kt===0&&(Kt=3):A_())),t.updateQueue!==null&&(t.flags|=4),hr(t),null);case 4:return wc(),eb(e,t),e===null&&Xd(t.stateNode.containerInfo),hr(t),null;case 10:return d_(t.type._context),hr(t),null;case 17:return zr(t.type)&&im(),hr(t),null;case 19:if(gt(bt),a=t.memoizedState,a===null)return hr(t),null;if(n=(t.flags&128)!==0,s=a.rendering,s===null)if(n)Ru(a,!1);else{if(Kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=dm(e),s!==null){for(t.flags|=128,Ru(a,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,s=a.alternate,s===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ot(bt,bt.current&1|2),t.child}e=e.sibling}a.tail!==null&&At()>Sc&&(t.flags|=128,n=!0,Ru(a,!1),t.lanes=4194304)}else{if(!n)if(e=dm(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ru(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!vt)return hr(t),null}else 2*At()-a.renderingStartTime>Sc&&r!==1073741824&&(t.flags|=128,n=!0,Ru(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(r=a.last,r!==null?r.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=At(),t.sibling=null,r=bt.current,ot(bt,n?r&1|2:r&1),t):(hr(t),null);case 22:case 23:return O_(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Zr&1073741824&&(hr(t),t.subtreeFlags&6&&(t.flags|=8192)):hr(t),null;case 24:return null;case 25:return null}throw Error(ee(156,t.tag))}function MF(e,t){switch(o_(t),t.tag){case 1:return zr(t.type)&&im(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wc(),gt(Br),gt(br),g_(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return m_(t),null;case 13:if(gt(bt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ee(340));xc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return gt(bt),null;case 4:return wc(),null;case 10:return d_(t.type._context),null;case 22:case 23:return O_(),null;case 24:return null;default:return null}}var Vh=!1,gr=!1,RF=typeof WeakSet=="function"?WeakSet:Set,le=null;function Dl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){jt(e,t,n)}else r.current=null}function tb(e,t,r){try{r()}catch(n){jt(e,t,n)}}var W2=!1;function IF(e,t){if(Lx=em,e=SC(),a_(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var s=0,o=-1,l=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(o=s+i),f!==a||n!==0&&f.nodeType!==3||(l=s+n),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++c===i&&(o=s),h===a&&++d===n&&(l=s),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Fx={focusedElem:e,selectionRange:r},em=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:zn(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(S){jt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return g=W2,W2=!1,g}function Ad(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&tb(t,r,a)}i=i.next}while(i!==n)}}function sy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function rb(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function x$(e){var t=e.alternate;t!==null&&(e.alternate=null,x$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_i],delete t[Qd],delete t[Ux],delete t[vF],delete t[xF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function b$(e){return e.tag===5||e.tag===3||e.tag===4}function V2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||b$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nb(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=nm));else if(n!==4&&(e=e.child,e!==null))for(nb(e,t,r),e=e.sibling;e!==null;)nb(e,t,r),e=e.sibling}function ib(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ib(e,t,r),e=e.sibling;e!==null;)ib(e,t,r),e=e.sibling}var lr=null,Vn=!1;function Aa(e,t,r){for(r=r.child;r!==null;)w$(e,t,r),r=r.sibling}function w$(e,t,r){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(Qg,r)}catch{}switch(r.tag){case 5:gr||Dl(r,t);case 6:var n=lr,i=Vn;lr=null,Aa(e,t,r),lr=n,Vn=i,lr!==null&&(Vn?(e=lr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):lr.removeChild(r.stateNode));break;case 18:lr!==null&&(Vn?(e=lr,r=r.stateNode,e.nodeType===8?t0(e.parentNode,r):e.nodeType===1&&t0(e,r),Kd(e)):t0(lr,r.stateNode));break;case 4:n=lr,i=Vn,lr=r.stateNode.containerInfo,Vn=!0,Aa(e,t,r),lr=n,Vn=i;break;case 0:case 11:case 14:case 15:if(!gr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&tb(r,t,s),i=i.next}while(i!==n)}Aa(e,t,r);break;case 1:if(!gr&&(Dl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){jt(r,t,o)}Aa(e,t,r);break;case 21:Aa(e,t,r);break;case 22:r.mode&1?(gr=(n=gr)||r.memoizedState!==null,Aa(e,t,r),gr=n):Aa(e,t,r);break;default:Aa(e,t,r)}}function H2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new RF),t.forEach(function(n){var i=HF.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Fn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:lr=o.stateNode,Vn=!1;break e;case 3:lr=o.stateNode.containerInfo,Vn=!0;break e;case 4:lr=o.stateNode.containerInfo,Vn=!0;break e}o=o.return}if(lr===null)throw Error(ee(160));w$(a,s,i),lr=null,Vn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){jt(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_$(t,e),t=t.sibling}function _$(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Fn(t,e),mi(e),n&4){try{Ad(3,e,e.return),sy(3,e)}catch(m){jt(e,e.return,m)}try{Ad(5,e,e.return)}catch(m){jt(e,e.return,m)}}break;case 1:Fn(t,e),mi(e),n&512&&r!==null&&Dl(r,r.return);break;case 5:if(Fn(t,e),mi(e),n&512&&r!==null&&Dl(r,r.return),e.flags&32){var i=e.stateNode;try{Wd(i,"")}catch(m){jt(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,s=r!==null?r.memoizedProps:a,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&a.type==="radio"&&a.name!=null&&VT(i,a),Ax(o,s);var c=Ax(o,a);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d==="style"?YT(i,f):d==="dangerouslySetInnerHTML"?KT(i,f):d==="children"?Wd(i,f):q1(i,d,f,c)}switch(o){case"input":Sx(i,a);break;case"textarea":HT(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ql(i,!!a.multiple,p,!1):h!==!!a.multiple&&(a.defaultValue!=null?ql(i,!!a.multiple,a.defaultValue,!0):ql(i,!!a.multiple,a.multiple?[]:"",!1))}i[Qd]=a}catch(m){jt(e,e.return,m)}}break;case 6:if(Fn(t,e),mi(e),n&4){if(e.stateNode===null)throw Error(ee(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){jt(e,e.return,m)}}break;case 3:if(Fn(t,e),mi(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Kd(t.containerInfo)}catch(m){jt(e,e.return,m)}break;case 4:Fn(t,e),mi(e);break;case 13:Fn(t,e),mi(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(N_=At())),n&4&&H2(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(gr=(c=gr)||d,Fn(t,e),gr=c):Fn(t,e),mi(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(le=e,d=e.child;d!==null;){for(f=le=d;le!==null;){switch(h=le,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ad(4,h,h.return);break;case 1:Dl(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){jt(n,r,m)}}break;case 5:Dl(h,h.return);break;case 22:if(h.memoizedState!==null){K2(f);continue}}p!==null?(p.return=h,le=p):K2(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,c?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(o=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=GT("display",s))}catch(m){jt(e,e.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){jt(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Fn(t,e),mi(e),n&4&&H2(e);break;case 21:break;default:Fn(t,e),mi(e)}}function mi(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(b$(r)){var n=r;break e}r=r.return}throw Error(ee(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Wd(i,""),n.flags&=-33);var a=V2(e);ib(e,a,i);break;case 3:case 4:var s=n.stateNode.containerInfo,o=V2(e);nb(e,o,s);break;default:throw Error(ee(161))}}catch(l){jt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function DF(e,t,r){le=e,S$(e)}function S$(e,t,r){for(var n=(e.mode&1)!==0;le!==null;){var i=le,a=i.child;if(i.tag===22&&n){var s=i.memoizedState!==null||Vh;if(!s){var o=i.alternate,l=o!==null&&o.memoizedState!==null||gr;o=Vh;var c=gr;if(Vh=s,(gr=l)&&!c)for(le=i;le!==null;)s=le,l=s.child,s.tag===22&&s.memoizedState!==null?G2(i):l!==null?(l.return=s,le=l):G2(i);for(;a!==null;)le=a,S$(a),a=a.sibling;le=i,Vh=o,gr=c}q2(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,le=a):q2(e)}}function q2(e){for(;le!==null;){var t=le;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:gr||sy(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!gr)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:zn(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&P2(t,a,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}P2(t,s,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Kd(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ee(163))}gr||t.flags&512&&rb(t)}catch(h){jt(t,t.return,h)}}if(t===e){le=null;break}if(r=t.sibling,r!==null){r.return=t.return,le=r;break}le=t.return}}function K2(e){for(;le!==null;){var t=le;if(t===e){le=null;break}var r=t.sibling;if(r!==null){r.return=t.return,le=r;break}le=t.return}}function G2(e){for(;le!==null;){var t=le;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{sy(4,t)}catch(l){jt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){jt(t,i,l)}}var a=t.return;try{rb(t)}catch(l){jt(t,a,l)}break;case 5:var s=t.return;try{rb(t)}catch(l){jt(t,s,l)}}}catch(l){jt(t,t.return,l)}if(t===e){le=null;break}var o=t.sibling;if(o!==null){o.return=t.return,le=o;break}le=t.return}}var LF=Math.ceil,pm=wa.ReactCurrentDispatcher,S_=wa.ReactCurrentOwner,An=wa.ReactCurrentBatchConfig,Ve=0,rr=null,Lt=null,cr=0,Zr=0,Ll=Ts(0),Kt=0,af=null,Bo=0,oy=0,j_=0,kd=null,Dr=null,N_=0,Sc=1/0,Vi=null,mm=!1,ab=null,gs=null,Hh=!1,is=null,gm=0,Pd=0,sb=null,Pp=-1,Tp=0;function Pr(){return Ve&6?At():Pp!==-1?Pp:Pp=At()}function ys(e){return e.mode&1?Ve&2&&cr!==0?cr&-cr:wF.transition!==null?(Tp===0&&(Tp=oC()),Tp):(e=Je,e!==0||(e=window.event,e=e===void 0?16:pC(e.type)),e):1}function ni(e,t,r,n){if(50<Pd)throw Pd=0,sb=null,Error(ee(185));sh(e,r,n),(!(Ve&2)||e!==rr)&&(e===rr&&(!(Ve&2)&&(oy|=r),Kt===4&&Ua(e,cr)),Ur(e,n),r===1&&Ve===0&&!(t.mode&1)&&(Sc=At()+500,ny&&Cs()))}function Ur(e,t){var r=e.callbackNode;w6(e,t);var n=Jp(e,e===rr?cr:0);if(n===0)r!==null&&n2(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&n2(r),t===1)e.tag===0?bF(Y2.bind(null,e)):$C(Y2.bind(null,e)),gF(function(){!(Ve&6)&&Cs()}),r=null;else{switch(lC(n)){case 1:r=Z1;break;case 4:r=aC;break;case 16:r=Qp;break;case 536870912:r=sC;break;default:r=Qp}r=T$(r,j$.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function j$(e,t){if(Pp=-1,Tp=0,Ve&6)throw Error(ee(327));var r=e.callbackNode;if(Zl()&&e.callbackNode!==r)return null;var n=Jp(e,e===rr?cr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=ym(e,n);else{t=n;var i=Ve;Ve|=2;var a=E$();(rr!==e||cr!==t)&&(Vi=null,Sc=At()+500,Oo(e,t));do try{zF();break}catch(o){N$(e,o)}while(!0);u_(),pm.current=a,Ve=i,Lt!==null?t=0:(rr=null,cr=0,t=Kt)}if(t!==0){if(t===2&&(i=$x(e),i!==0&&(n=i,t=ob(e,i))),t===1)throw r=af,Oo(e,0),Ua(e,n),Ur(e,At()),r;if(t===6)Ua(e,n);else{if(i=e.current.alternate,!(n&30)&&!FF(i)&&(t=ym(e,n),t===2&&(a=$x(e),a!==0&&(n=a,t=ob(e,a))),t===1))throw r=af,Oo(e,0),Ua(e,n),Ur(e,At()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(ee(345));case 2:Ys(e,Dr,Vi);break;case 3:if(Ua(e,n),(n&130023424)===n&&(t=N_+500-At(),10<t)){if(Jp(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Pr(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=zx(Ys.bind(null,e,Dr,Vi),t);break}Ys(e,Dr,Vi);break;case 4:if(Ua(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var s=31-ri(n);a=1<<s,s=t[s],s>i&&(i=s),n&=~a}if(n=i,n=At()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*LF(n/1960))-n,10<n){e.timeoutHandle=zx(Ys.bind(null,e,Dr,Vi),n);break}Ys(e,Dr,Vi);break;case 5:Ys(e,Dr,Vi);break;default:throw Error(ee(329))}}}return Ur(e,At()),e.callbackNode===r?j$.bind(null,e):null}function ob(e,t){var r=kd;return e.current.memoizedState.isDehydrated&&(Oo(e,t).flags|=256),e=ym(e,t),e!==2&&(t=Dr,Dr=r,t!==null&&lb(t)),e}function lb(e){Dr===null?Dr=e:Dr.push.apply(Dr,e)}function FF(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!li(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ua(e,t){for(t&=~j_,t&=~oy,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ri(t),n=1<<r;e[r]=-1,t&=~n}}function Y2(e){if(Ve&6)throw Error(ee(327));Zl();var t=Jp(e,0);if(!(t&1))return Ur(e,At()),null;var r=ym(e,t);if(e.tag!==0&&r===2){var n=$x(e);n!==0&&(t=n,r=ob(e,n))}if(r===1)throw r=af,Oo(e,0),Ua(e,t),Ur(e,At()),r;if(r===6)throw Error(ee(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ys(e,Dr,Vi),Ur(e,At()),null}function E_(e,t){var r=Ve;Ve|=1;try{return e(t)}finally{Ve=r,Ve===0&&(Sc=At()+500,ny&&Cs())}}function zo(e){is!==null&&is.tag===0&&!(Ve&6)&&Zl();var t=Ve;Ve|=1;var r=An.transition,n=Je;try{if(An.transition=null,Je=1,e)return e()}finally{Je=n,An.transition=r,Ve=t,!(Ve&6)&&Cs()}}function O_(){Zr=Ll.current,gt(Ll)}function Oo(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,mF(r)),Lt!==null)for(r=Lt.return;r!==null;){var n=r;switch(o_(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&im();break;case 3:wc(),gt(Br),gt(br),g_();break;case 5:m_(n);break;case 4:wc();break;case 13:gt(bt);break;case 19:gt(bt);break;case 10:d_(n.type._context);break;case 22:case 23:O_()}r=r.return}if(rr=e,Lt=e=vs(e.current,null),cr=Zr=t,Kt=0,af=null,j_=oy=Bo=0,Dr=kd=null,ao!==null){for(t=0;t<ao.length;t++)if(r=ao[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var s=a.next;a.next=i,n.next=s}r.pending=n}ao=null}return e}function N$(e,t){do{var r=Lt;try{if(u_(),Op.current=hm,fm){for(var n=wt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}fm=!1}if(Fo=0,Jt=Vt=wt=null,Od=!1,tf=0,S_.current=null,r===null||r.return===null){Kt=1,af=t,Lt=null;break}e:{var a=e,s=r.return,o=r,l=t;if(t=cr,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=o,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=I2(s);if(p!==null){p.flags&=-257,D2(p,s,o,a,t),p.mode&1&&R2(a,c,t),t=p,l=c;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){R2(a,c,t),A_();break e}l=Error(ee(426))}}else if(vt&&o.mode&1){var v=I2(s);if(v!==null){!(v.flags&65536)&&(v.flags|=256),D2(v,s,o,a,t),l_(_c(l,o));break e}}a=l=_c(l,o),Kt!==4&&(Kt=2),kd===null?kd=[a]:kd.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=l$(a,l,t);k2(a,y);break e;case 1:o=l;var x=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(gs===null||!gs.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var S=c$(a,o,t);k2(a,S);break e}}a=a.return}while(a!==null)}A$(r)}catch(_){t=_,Lt===r&&r!==null&&(Lt=r=r.return);continue}break}while(!0)}function E$(){var e=pm.current;return pm.current=hm,e===null?hm:e}function A_(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),rr===null||!(Bo&268435455)&&!(oy&268435455)||Ua(rr,cr)}function ym(e,t){var r=Ve;Ve|=2;var n=E$();(rr!==e||cr!==t)&&(Vi=null,Oo(e,t));do try{BF();break}catch(i){N$(e,i)}while(!0);if(u_(),Ve=r,pm.current=n,Lt!==null)throw Error(ee(261));return rr=null,cr=0,Kt}function BF(){for(;Lt!==null;)O$(Lt)}function zF(){for(;Lt!==null&&!f6();)O$(Lt)}function O$(e){var t=P$(e.alternate,e,Zr);e.memoizedProps=e.pendingProps,t===null?A$(e):Lt=t,S_.current=null}function A$(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=MF(r,t),r!==null){r.flags&=32767,Lt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kt=6,Lt=null;return}}else if(r=$F(r,t,Zr),r!==null){Lt=r;return}if(t=t.sibling,t!==null){Lt=t;return}Lt=t=e}while(t!==null);Kt===0&&(Kt=5)}function Ys(e,t,r){var n=Je,i=An.transition;try{An.transition=null,Je=1,UF(e,t,r,n)}finally{An.transition=i,Je=n}return null}function UF(e,t,r,n){do Zl();while(is!==null);if(Ve&6)throw Error(ee(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ee(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(_6(e,a),e===rr&&(Lt=rr=null,cr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Hh||(Hh=!0,T$(Qp,function(){return Zl(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=An.transition,An.transition=null;var s=Je;Je=1;var o=Ve;Ve|=4,S_.current=null,IF(e,r),_$(r,e),lF(Fx),em=!!Lx,Fx=Lx=null,e.current=r,DF(r),h6(),Ve=o,Je=s,An.transition=a}else e.current=r;if(Hh&&(Hh=!1,is=e,gm=i),a=e.pendingLanes,a===0&&(gs=null),g6(r.stateNode),Ur(e,At()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(mm)throw mm=!1,e=ab,ab=null,e;return gm&1&&e.tag!==0&&Zl(),a=e.pendingLanes,a&1?e===sb?Pd++:(Pd=0,sb=e):Pd=0,Cs(),null}function Zl(){if(is!==null){var e=lC(gm),t=An.transition,r=Je;try{if(An.transition=null,Je=16>e?16:e,is===null)var n=!1;else{if(e=is,is=null,gm=0,Ve&6)throw Error(ee(331));var i=Ve;for(Ve|=4,le=e.current;le!==null;){var a=le,s=a.child;if(le.flags&16){var o=a.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(le=c;le!==null;){var d=le;switch(d.tag){case 0:case 11:case 15:Ad(8,d,a)}var f=d.child;if(f!==null)f.return=d,le=f;else for(;le!==null;){d=le;var h=d.sibling,p=d.return;if(x$(d),d===c){le=null;break}if(h!==null){h.return=p,le=h;break}le=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}le=a}}if(a.subtreeFlags&2064&&s!==null)s.return=a,le=s;else e:for(;le!==null;){if(a=le,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Ad(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,le=y;break e}le=a.return}}var x=e.current;for(le=x;le!==null;){s=le;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,le=b;else e:for(s=x;le!==null;){if(o=le,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:sy(9,o)}}catch(_){jt(o,o.return,_)}if(o===s){le=null;break e}var S=o.sibling;if(S!==null){S.return=o.return,le=S;break e}le=o.return}}if(Ve=i,Cs(),Ei&&typeof Ei.onPostCommitFiberRoot=="function")try{Ei.onPostCommitFiberRoot(Qg,e)}catch{}n=!0}return n}finally{Je=r,An.transition=t}}return!1}function X2(e,t,r){t=_c(r,t),t=l$(e,t,1),e=ms(e,t,1),t=Pr(),e!==null&&(sh(e,1,t),Ur(e,t))}function jt(e,t,r){if(e.tag===3)X2(e,e,r);else for(;t!==null;){if(t.tag===3){X2(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(gs===null||!gs.has(n))){e=_c(r,e),e=c$(t,e,1),t=ms(t,e,1),e=Pr(),t!==null&&(sh(t,1,e),Ur(t,e));break}}t=t.return}}function WF(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Pr(),e.pingedLanes|=e.suspendedLanes&r,rr===e&&(cr&r)===r&&(Kt===4||Kt===3&&(cr&130023424)===cr&&500>At()-N_?Oo(e,0):j_|=r),Ur(e,t)}function k$(e,t){t===0&&(e.mode&1?(t=Rh,Rh<<=1,!(Rh&130023424)&&(Rh=4194304)):t=1);var r=Pr();e=ua(e,t),e!==null&&(sh(e,t,r),Ur(e,r))}function VF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),k$(e,r)}function HF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ee(314))}n!==null&&n.delete(t),k$(e,r)}var P$;P$=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Br.current)Lr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Lr=!1,CF(e,t,r);Lr=!!(e.flags&131072)}else Lr=!1,vt&&t.flags&1048576&&MC(t,om,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;kp(e,t),e=t.pendingProps;var i=vc(t,br.current);Xl(t,r),i=v_(null,t,n,e,i,r);var a=x_();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zr(n)?(a=!0,am(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,h_(t),i.updater=ay,t.stateNode=i,i._reactInternals=t,Gx(t,n,e,r),t=Zx(null,t,n,!0,a,r)):(t.tag=0,vt&&a&&s_(t),Sr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(kp(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=KF(n),e=zn(n,e),i){case 0:t=Xx(null,t,n,e,r);break e;case 1:t=B2(null,t,n,e,r);break e;case 11:t=L2(null,t,n,e,r);break e;case 14:t=F2(null,t,n,zn(n.type,e),r);break e}throw Error(ee(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:zn(n,i),Xx(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:zn(n,i),B2(e,t,n,i,r);case 3:e:{if(h$(t),e===null)throw Error(ee(387));n=t.pendingProps,a=t.memoizedState,i=a.element,BC(e,t),um(t,n,null,r);var s=t.memoizedState;if(n=s.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=_c(Error(ee(423)),t),t=z2(e,t,n,r,i);break e}else if(n!==i){i=_c(Error(ee(424)),t),t=z2(e,t,n,r,i);break e}else for(tn=ps(t.stateNode.containerInfo.firstChild),nn=t,vt=!0,Yn=null,r=LC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xc(),n===i){t=da(e,t,r);break e}Sr(e,t,n,r)}t=t.child}return t;case 5:return zC(t),e===null&&Hx(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,Bx(n,i)?s=null:a!==null&&Bx(n,a)&&(t.flags|=32),f$(e,t),Sr(e,t,s,r),t.child;case 6:return e===null&&Hx(t),null;case 13:return p$(e,t,r);case 4:return p_(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=bc(t,null,n,r):Sr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:zn(n,i),L2(e,t,n,i,r);case 7:return Sr(e,t,t.pendingProps,r),t.child;case 8:return Sr(e,t,t.pendingProps.children,r),t.child;case 12:return Sr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,ot(lm,n._currentValue),n._currentValue=s,a!==null)if(li(a.value,s)){if(a.children===i.children&&!Br.current){t=da(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=na(-1,r&-r),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),qx(a.return,r,t),o.lanes|=r;break}l=l.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(ee(341));s.lanes|=r,o=s.alternate,o!==null&&(o.lanes|=r),qx(s,r,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}Sr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Xl(t,r),i=Pn(i),n=n(i),t.flags|=1,Sr(e,t,n,r),t.child;case 14:return n=t.type,i=zn(n,t.pendingProps),i=zn(n.type,i),F2(e,t,n,i,r);case 15:return u$(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:zn(n,i),kp(e,t),t.tag=1,zr(n)?(e=!0,am(t)):e=!1,Xl(t,r),o$(t,n,i),Gx(t,n,i,r),Zx(null,t,n,!0,e,r);case 19:return m$(e,t,r);case 22:return d$(e,t,r)}throw Error(ee(156,t.tag))};function T$(e,t){return iC(e,t)}function qF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(e,t,r,n){return new qF(e,t,r,n)}function k_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function KF(e){if(typeof e=="function")return k_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G1)return 11;if(e===Y1)return 14}return 2}function vs(e,t){var r=e.alternate;return r===null?(r=jn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cp(e,t,r,n,i,a){var s=2;if(n=e,typeof e=="function")k_(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Al:return Ao(r.children,i,a,t);case K1:s=8,i|=8;break;case vx:return e=jn(12,r,t,i|2),e.elementType=vx,e.lanes=a,e;case xx:return e=jn(13,r,t,i),e.elementType=xx,e.lanes=a,e;case bx:return e=jn(19,r,t,i),e.elementType=bx,e.lanes=a,e;case zT:return ly(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case FT:s=10;break e;case BT:s=9;break e;case G1:s=11;break e;case Y1:s=14;break e;case Ia:s=16,n=null;break e}throw Error(ee(130,e==null?e:typeof e,""))}return t=jn(s,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ao(e,t,r,n){return e=jn(7,e,n,t),e.lanes=r,e}function ly(e,t,r,n){return e=jn(22,e,n,t),e.elementType=zT,e.lanes=r,e.stateNode={isHidden:!1},e}function c0(e,t,r){return e=jn(6,e,null,t),e.lanes=r,e}function u0(e,t,r){return t=jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GF(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vv(0),this.expirationTimes=Vv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vv(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function P_(e,t,r,n,i,a,s,o,l){return e=new GF(e,t,r,o,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=jn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},h_(a),e}function YF(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ol,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function C$(e){if(!e)return Os;e=e._reactInternals;e:{if(sl(e)!==e||e.tag!==1)throw Error(ee(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ee(171))}if(e.tag===1){var r=e.type;if(zr(r))return CC(e,r,t)}return t}function $$(e,t,r,n,i,a,s,o,l){return e=P_(r,n,!0,e,i,a,s,o,l),e.context=C$(null),r=e.current,n=Pr(),i=ys(r),a=na(n,i),a.callback=t??null,ms(r,a,i),e.current.lanes=i,sh(e,i,n),Ur(e,n),e}function cy(e,t,r,n){var i=t.current,a=Pr(),s=ys(i);return r=C$(r),t.context===null?t.context=r:t.pendingContext=r,t=na(a,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ms(i,t,s),e!==null&&(ni(e,i,s,a),Ep(e,i,s)),s}function vm(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Z2(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function T_(e,t){Z2(e,t),(e=e.alternate)&&Z2(e,t)}function XF(){return null}var M$=typeof reportError=="function"?reportError:function(e){console.error(e)};function C_(e){this._internalRoot=e}uy.prototype.render=C_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ee(409));cy(e,t,null,null)};uy.prototype.unmount=C_.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zo(function(){cy(null,e,null,null)}),t[ca]=null}};function uy(e){this._internalRoot=e}uy.prototype.unstable_scheduleHydration=function(e){if(e){var t=dC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<za.length&&t!==0&&t<za[r].priority;r++);za.splice(r,0,e),r===0&&hC(e)}};function $_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function dy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Q2(){}function ZF(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var c=vm(s);a.call(c)}}var s=$$(t,n,e,0,null,!1,!1,"",Q2);return e._reactRootContainer=s,e[ca]=s.current,Xd(e.nodeType===8?e.parentNode:e),zo(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var c=vm(l);o.call(c)}}var l=P_(e,0,!1,null,null,!1,!1,"",Q2);return e._reactRootContainer=l,e[ca]=l.current,Xd(e.nodeType===8?e.parentNode:e),zo(function(){cy(t,l,r,n)}),l}function fy(e,t,r,n,i){var a=r._reactRootContainer;if(a){var s=a;if(typeof i=="function"){var o=i;i=function(){var l=vm(s);o.call(l)}}cy(t,s,e,i)}else s=ZF(r,t,e,i,n);return vm(s)}cC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=cd(t.pendingLanes);r!==0&&(Q1(t,r|1),Ur(t,At()),!(Ve&6)&&(Sc=At()+500,Cs()))}break;case 13:zo(function(){var n=ua(e,1);if(n!==null){var i=Pr();ni(n,e,1,i)}}),T_(e,1)}};J1=function(e){if(e.tag===13){var t=ua(e,134217728);if(t!==null){var r=Pr();ni(t,e,134217728,r)}T_(e,134217728)}};uC=function(e){if(e.tag===13){var t=ys(e),r=ua(e,t);if(r!==null){var n=Pr();ni(r,e,t,n)}T_(e,t)}};dC=function(){return Je};fC=function(e,t){var r=Je;try{return Je=e,t()}finally{Je=r}};Px=function(e,t,r){switch(t){case"input":if(Sx(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=ry(n);if(!i)throw Error(ee(90));WT(n),Sx(n,i)}}}break;case"textarea":HT(e,r);break;case"select":t=r.value,t!=null&&ql(e,!!r.multiple,t,!1)}};QT=E_;JT=zo;var QF={usingClientEntryPoint:!1,Events:[lh,Cl,ry,XT,ZT,E_]},Iu={findFiberByHostInstance:io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},JF={bundleType:Iu.bundleType,version:Iu.version,rendererPackageName:Iu.rendererPackageName,rendererConfig:Iu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rC(e),e===null?null:e.stateNode},findFiberByHostInstance:Iu.findFiberByHostInstance||XF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qh.isDisabled&&qh.supportsFiber)try{Qg=qh.inject(JF),Ei=qh}catch{}}un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QF;un.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$_(t))throw Error(ee(200));return YF(e,t,null,r)};un.createRoot=function(e,t){if(!$_(e))throw Error(ee(299));var r=!1,n="",i=M$;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=P_(e,1,!1,null,null,r,!1,n,i),e[ca]=t.current,Xd(e.nodeType===8?e.parentNode:e),new C_(t)};un.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ee(188)):(e=Object.keys(e).join(","),Error(ee(268,e)));return e=rC(t),e=e===null?null:e.stateNode,e};un.flushSync=function(e){return zo(e)};un.hydrate=function(e,t,r){if(!dy(t))throw Error(ee(200));return fy(null,e,t,!0,r)};un.hydrateRoot=function(e,t,r){if(!$_(e))throw Error(ee(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",s=M$;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=$$(t,null,e,1,r??null,i,!1,a,s),e[ca]=t.current,Xd(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new uy(t)};un.render=function(e,t,r){if(!dy(t))throw Error(ee(200));return fy(null,e,t,!1,r)};un.unmountComponentAtNode=function(e){if(!dy(e))throw Error(ee(40));return e._reactRootContainer?(zo(function(){fy(null,null,e,!1,function(){e._reactRootContainer=null,e[ca]=null})}),!0):!1};un.unstable_batchedUpdates=E_;un.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!dy(r))throw Error(ee(200));if(e==null||e._reactInternals===void 0)throw Error(ee(38));return fy(e,t,r,!1,n)};un.version="18.3.1-next-f1338f8080-20240426";function R$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(R$)}catch(e){console.error(e)}}R$(),RT.exports=un;var e8=RT.exports,J2=e8;gx.createRoot=J2.createRoot,gx.hydrateRoot=J2.hydrateRoot;var cu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Uo=typeof window>"u"||"Deno"in globalThis;function jr(){}function t8(e,t){return typeof e=="function"?e(t):e}function cb(e){return typeof e=="number"&&e>=0&&e!==1/0}function I$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xs(e,t){return typeof e=="function"?e(t):e}function Xn(e,t){return typeof e=="function"?e(t):e}function eN(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==M_(s,t.options))return!1}else if(!sf(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function tN(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Wo(t.options.mutationKey)!==Wo(a))return!1}else if(!sf(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function M_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Wo)(e)}function Wo(e){return JSON.stringify(e,(t,r)=>ub(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function sf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>sf(e[r],t[r])):!1}function D$(e,t){if(e===t)return e;const r=rN(e)&&rN(t);if(r||ub(e)&&ub(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let c=0;for(let d=0;d<s;d++){const f=r?d:a[d];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,c++):(o[f]=D$(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&c++)}return i===s&&c===i?e:o}return t}function xm(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function rN(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ub(e){if(!nN(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!nN(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nN(e){return Object.prototype.toString.call(e)==="[object Object]"}function r8(e){return new Promise(t=>{setTimeout(t,e)})}function db(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?D$(e,t):t}function n8(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function i8(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var R_=Symbol();function L$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===R_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function F$(e,t){return typeof e=="function"?e(...t):!!e}var vo,Ka,ac,pT,a8=(pT=class extends cu{constructor(){super();be(this,vo);be(this,Ka);be(this,ac);se(this,ac,t=>{if(!Uo&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,Ka)||this.setEventListener(z(this,ac))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Ka))==null||t.call(this),se(this,Ka,void 0))}setEventListener(t){var r;se(this,ac,t),(r=z(this,Ka))==null||r.call(this),se(this,Ka,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,vo)!==t&&(se(this,vo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,vo)=="boolean"?z(this,vo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vo=new WeakMap,Ka=new WeakMap,ac=new WeakMap,pT),I_=new a8,sc,Ga,oc,mT,s8=(mT=class extends cu{constructor(){super();be(this,sc,!0);be(this,Ga);be(this,oc);se(this,oc,t=>{if(!Uo&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,Ga)||this.setEventListener(z(this,oc))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Ga))==null||t.call(this),se(this,Ga,void 0))}setEventListener(t){var r;se(this,oc,t),(r=z(this,Ga))==null||r.call(this),se(this,Ga,t(this.setOnline.bind(this)))}setOnline(t){z(this,sc)!==t&&(se(this,sc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,sc)}},sc=new WeakMap,Ga=new WeakMap,oc=new WeakMap,mT),bm=new s8;function fb(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function o8(e){return Math.min(1e3*2**e,3e4)}function B$(e){return(e??"online")==="online"?bm.isOnline():!0}var z$=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function d0(e){return e instanceof z$}function U$(e){let t=!1,r=0,n=!1,i;const a=fb(),s=m=>{var v;n||(h(new z$(m)),(v=e.abort)==null||v.call(e))},o=()=>{t=!0},l=()=>{t=!1},c=()=>I_.isFocused()&&(e.networkMode==="always"||bm.isOnline())&&e.canRun(),d=()=>B$(e.networkMode)&&e.canRun(),f=m=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var v;i=y=>{(n||c())&&m(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(n)return;let m;const v=r===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var j;if(n)return;const x=e.retry??(Uo?0:3),b=e.retryDelay??o8,S=typeof b=="function"?b(r,y):b,_=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,y);if(t||!_){h(y);return}r++,(j=e.onFail)==null||j.call(e,r,y),r8(S).then(()=>c()?void 0:p()).then(()=>{t?h(y):g()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),a)}}var l8=e=>setTimeout(e,0);function c8(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=l8;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ht=c8(),xo,gT,W$=(gT=class{constructor(){be(this,xo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cb(this.gcTime)&&se(this,xo,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Uo?1/0:5*60*1e3))}clearGcTimeout(){z(this,xo)&&(clearTimeout(z(this,xo)),se(this,xo,void 0))}},xo=new WeakMap,gT),lc,bo,vn,wo,pr,th,_o,Un,Wi,yT,u8=(yT=class extends W${constructor(t){super();be(this,Un);be(this,lc);be(this,bo);be(this,vn);be(this,wo);be(this,pr);be(this,th);be(this,_o);se(this,_o,!1),se(this,th,t.defaultOptions),this.setOptions(t.options),this.observers=[],se(this,wo,t.client),se(this,vn,z(this,wo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,se(this,lc,d8(this.options)),this.state=t.state??z(this,lc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,pr))==null?void 0:t.promise}setOptions(t){this.options={...z(this,th),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,vn).remove(this)}setData(t,r){const n=db(this.state.data,t,this.options);return Me(this,Un,Wi).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Me(this,Un,Wi).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=z(this,pr))==null?void 0:n.promise;return(i=z(this,pr))==null||i.cancel(t),r?r.then(jr).catch(jr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(z(this,lc))}isActive(){return this.observers.some(t=>Xn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===R_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!I$(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,pr))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,pr))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,vn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,pr)&&(z(this,_o)?z(this,pr).cancel({revert:!0}):z(this,pr).cancelRetry()),this.scheduleGc()),z(this,vn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,Un,Wi).call(this,{type:"invalidate"})}fetch(t,r){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,pr))return z(this,pr).continueRetry(),z(this,pr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(se(this,_o,!0),n.signal)})},a=()=>{const h=L$(this.options,r),g=(()=>{const m={client:z(this,wo),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return se(this,_o,!1),this.options.persister?this.options.persister(h,g,this):h(g)},o=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,wo),state:this.state,fetchFn:a};return i(h),h})();(c=this.options.behavior)==null||c.onFetch(o,this),se(this,bo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&Me(this,Un,Wi).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const l=h=>{var p,g,m,v;d0(h)&&h.silent||Me(this,Un,Wi).call(this,{type:"error",error:h}),d0(h)||((g=(p=z(this,vn).config).onError)==null||g.call(p,h,this),(v=(m=z(this,vn).config).onSettled)==null||v.call(m,this.state.data,h,this)),this.scheduleGc()};return se(this,pr,U$({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var p,g,m,v;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(y){l(y);return}(g=(p=z(this,vn).config).onSuccess)==null||g.call(p,h,this),(v=(m=z(this,vn).config).onSettled)==null||v.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,p)=>{Me(this,Un,Wi).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{Me(this,Un,Wi).call(this,{type:"pause"})},onContinue:()=>{Me(this,Un,Wi).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),z(this,pr).start()}},lc=new WeakMap,bo=new WeakMap,vn=new WeakMap,wo=new WeakMap,pr=new WeakMap,th=new WeakMap,_o=new WeakMap,Un=new WeakSet,Wi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...V$(n.data,this.options),fetchMeta:t.meta??null};case"success":return se(this,bo,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return d0(i)&&i.revert&&z(this,bo)?{...z(this,bo),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,vn).notify({query:this,type:"updated",action:t})})},yT);function V$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:B$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function d8(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var xi,vT,f8=(vT=class extends cu{constructor(t={}){super();be(this,xi);this.config=t,se(this,xi,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??M_(i,r);let s=this.get(a);return s||(s=new u8({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){z(this,xi).has(t.queryHash)||(z(this,xi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,xi).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,xi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,xi).get(t)}getAll(){return[...z(this,xi).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>eN(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>eN(t,n)):r}notify(t){Ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xi=new WeakMap,vT),bi,wr,So,wi,$a,xT,h8=(xT=class extends W${constructor(t){super();be(this,wi);be(this,bi);be(this,wr);be(this,So);this.mutationId=t.mutationId,se(this,wr,t.mutationCache),se(this,bi,[]),this.state=t.state||H$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,bi).includes(t)||(z(this,bi).push(t),this.clearGcTimeout(),z(this,wr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){se(this,bi,z(this,bi).filter(r=>r!==t)),this.scheduleGc(),z(this,wr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,bi).length||(this.state.status==="pending"?this.scheduleGc():z(this,wr).remove(this))}continue(){var t;return((t=z(this,So))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,c,d,f,h,p,g,m,v,y,x,b,S,_,j,N,A;const r=()=>{Me(this,wi,$a).call(this,{type:"continue"})};se(this,So,U$({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,C)=>{Me(this,wi,$a).call(this,{type:"failed",failureCount:E,error:C})},onPause:()=>{Me(this,wi,$a).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,wr).canRun(this)}));const n=this.state.status==="pending",i=!z(this,So).canStart();try{if(n)r();else{Me(this,wi,$a).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=z(this,wr).config).onMutate)==null?void 0:s.call(a,t,this));const C=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));C!==this.state.context&&Me(this,wi,$a).call(this,{type:"pending",context:C,variables:t,isPaused:i})}const E=await z(this,So).start();return await((d=(c=z(this,wr).config).onSuccess)==null?void 0:d.call(c,E,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,E,t,this.state.context)),await((g=(p=z(this,wr).config).onSettled)==null?void 0:g.call(p,E,null,this.state.variables,this.state.context,this)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,E,null,t,this.state.context)),Me(this,wi,$a).call(this,{type:"success",data:E}),E}catch(E){try{throw await((x=(y=z(this,wr).config).onError)==null?void 0:x.call(y,E,t,this.state.context,this)),await((S=(b=this.options).onError)==null?void 0:S.call(b,E,t,this.state.context)),await((j=(_=z(this,wr).config).onSettled)==null?void 0:j.call(_,void 0,E,this.state.variables,this.state.context,this)),await((A=(N=this.options).onSettled)==null?void 0:A.call(N,void 0,E,t,this.state.context)),E}finally{Me(this,wi,$a).call(this,{type:"error",error:E})}}finally{z(this,wr).runNext(this)}}},bi=new WeakMap,wr=new WeakMap,So=new WeakMap,wi=new WeakSet,$a=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ht.batch(()=>{z(this,bi).forEach(n=>{n.onMutationUpdate(t)}),z(this,wr).notify({mutation:this,type:"updated",action:t})})},xT);function H$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ki,Wn,rh,bT,p8=(bT=class extends cu{constructor(t={}){super();be(this,Ki);be(this,Wn);be(this,rh);this.config=t,se(this,Ki,new Set),se(this,Wn,new Map),se(this,rh,0)}build(t,r,n){const i=new h8({mutationCache:this,mutationId:++Ah(this,rh)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){z(this,Ki).add(t);const r=Kh(t);if(typeof r=="string"){const n=z(this,Wn).get(r);n?n.push(t):z(this,Wn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Ki).delete(t)){const r=Kh(t);if(typeof r=="string"){const n=z(this,Wn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&z(this,Wn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Kh(t);if(typeof r=="string"){const n=z(this,Wn).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Kh(t);if(typeof r=="string"){const i=(n=z(this,Wn).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{z(this,Ki).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Ki).clear(),z(this,Wn).clear()})}getAll(){return Array.from(z(this,Ki))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>tN(r,n))}findAll(t={}){return this.getAll().filter(r=>tN(t,r))}notify(t){Ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ht.batch(()=>Promise.all(t.map(r=>r.continue().catch(jr))))}},Ki=new WeakMap,Wn=new WeakMap,rh=new WeakMap,bT);function Kh(e){var t;return(t=e.options.scope)==null?void 0:t.id}function iN(e){return{onFetch:(t,r)=>{var d,f,h,p,g;const n=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((g=t.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const v=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=L$(t.options,t.fetchOptions),x=async(b,S,_)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const N=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return v(P),P})(),A=await y(N),{maxPages:E}=t.options,C=_?i8:n8;return{pages:C(b.pages,A,E),pageParams:C(b.pageParams,S,E)}};if(i&&a.length){const b=i==="backward",S=b?m8:aN,_={pages:a,pageParams:s},j=S(n,_);o=await x(_,j,b)}else{const b=e??a.length;do{const S=l===0?s[0]??n.initialPageParam:aN(n,o);if(l>0&&S==null)break;o=await x(o,S),l++}while(l<b)}return o};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function aN(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function m8(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var St,Ya,Xa,cc,uc,Za,dc,fc,wT,g8=(wT=class{constructor(e={}){be(this,St);be(this,Ya);be(this,Xa);be(this,cc);be(this,uc);be(this,Za);be(this,dc);be(this,fc);se(this,St,e.queryCache||new f8),se(this,Ya,e.mutationCache||new p8),se(this,Xa,e.defaultOptions||{}),se(this,cc,new Map),se(this,uc,new Map),se(this,Za,0)}mount(){Ah(this,Za)._++,z(this,Za)===1&&(se(this,dc,I_.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,St).onFocus())})),se(this,fc,bm.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,St).onOnline())})))}unmount(){var e,t;Ah(this,Za)._--,z(this,Za)===0&&((e=z(this,dc))==null||e.call(this),se(this,dc,void 0),(t=z(this,fc))==null||t.call(this),se(this,fc,void 0))}isFetching(e){return z(this,St).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,Ya).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,St).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,St).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(xs(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,St).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=z(this,St).get(n.queryHash),a=i==null?void 0:i.state.data,s=t8(t,a);if(s!==void 0)return z(this,St).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ht.batch(()=>z(this,St).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,St).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,St);Ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,St);return Ht.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ht.batch(()=>z(this,St).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(jr).catch(jr)}invalidateQueries(e,t={}){return Ht.batch(()=>(z(this,St).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ht.batch(()=>z(this,St).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(jr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(jr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,St).build(this,t);return r.isStaleByTime(xs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jr).catch(jr)}fetchInfiniteQuery(e){return e.behavior=iN(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jr).catch(jr)}ensureInfiniteQueryData(e){return e.behavior=iN(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bm.isOnline()?z(this,Ya).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,St)}getMutationCache(){return z(this,Ya)}getDefaultOptions(){return z(this,Xa)}setDefaultOptions(e){se(this,Xa,e)}setQueryDefaults(e,t){z(this,cc).set(Wo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,cc).values()],r={};return t.forEach(n=>{sf(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,uc).set(Wo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,uc).values()],r={};return t.forEach(n=>{sf(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Xa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=M_(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===R_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Xa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,St).clear(),z(this,Ya).clear()}},St=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,cc=new WeakMap,uc=new WeakMap,Za=new WeakMap,dc=new WeakMap,fc=new WeakMap,wT),$r,ze,nh,_r,jo,hc,Qa,Ja,ih,pc,mc,No,Eo,es,gc,Ye,dd,hb,pb,mb,gb,yb,vb,xb,q$,_T,y8=(_T=class extends cu{constructor(t,r){super();be(this,Ye);be(this,$r);be(this,ze);be(this,nh);be(this,_r);be(this,jo);be(this,hc);be(this,Qa);be(this,Ja);be(this,ih);be(this,pc);be(this,mc);be(this,No);be(this,Eo);be(this,es);be(this,gc,new Set);this.options=r,se(this,$r,t),se(this,Ja,null),se(this,Qa,fb()),this.options.experimental_prefetchInRender||z(this,Qa).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,ze).addObserver(this),sN(z(this,ze),this.options)?Me(this,Ye,dd).call(this):this.updateResult(),Me(this,Ye,gb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bb(z(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bb(z(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,Ye,yb).call(this),Me(this,Ye,vb).call(this),z(this,ze).removeObserver(this)}setOptions(t){const r=this.options,n=z(this,ze);if(this.options=z(this,$r).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xn(this.options.enabled,z(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,Ye,xb).call(this),z(this,ze).setOptions(this.options),r._defaulted&&!xm(this.options,r)&&z(this,$r).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,ze),observer:this});const i=this.hasListeners();i&&oN(z(this,ze),n,this.options,r)&&Me(this,Ye,dd).call(this),this.updateResult(),i&&(z(this,ze)!==n||Xn(this.options.enabled,z(this,ze))!==Xn(r.enabled,z(this,ze))||xs(this.options.staleTime,z(this,ze))!==xs(r.staleTime,z(this,ze)))&&Me(this,Ye,hb).call(this);const a=Me(this,Ye,pb).call(this);i&&(z(this,ze)!==n||Xn(this.options.enabled,z(this,ze))!==Xn(r.enabled,z(this,ze))||a!==z(this,es))&&Me(this,Ye,mb).call(this,a)}getOptimisticResult(t){const r=z(this,$r).getQueryCache().build(z(this,$r),t),n=this.createResult(r,t);return x8(this,n)&&(se(this,_r,n),se(this,hc,this.options),se(this,jo,z(this,ze).state)),n}getCurrentResult(){return z(this,_r)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){z(this,gc).add(t)}getCurrentQuery(){return z(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,$r).defaultQueryOptions(t),n=z(this,$r).getQueryCache().build(z(this,$r),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Me(this,Ye,dd).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,_r)))}createResult(t,r){var E;const n=z(this,ze),i=this.options,a=z(this,_r),s=z(this,jo),o=z(this,hc),c=t!==n?t.state:z(this,nh),{state:d}=t;let f={...d},h=!1,p;if(r._optimisticResults){const C=this.hasListeners(),P=!C&&sN(t,r),T=C&&oN(t,n,r,i);(P||T)&&(f={...f,...V$(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:v}=f;p=f.data;let y=!1;if(r.placeholderData!==void 0&&p===void 0&&v==="pending"){let C;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(C=a.data,y=!0):C=typeof r.placeholderData=="function"?r.placeholderData((E=z(this,mc))==null?void 0:E.state.data,z(this,mc)):r.placeholderData,C!==void 0&&(v="success",p=db(a==null?void 0:a.data,C,r),h=!0)}if(r.select&&p!==void 0&&!y)if(a&&p===(s==null?void 0:s.data)&&r.select===z(this,ih))p=z(this,pc);else try{se(this,ih,r.select),p=r.select(p),p=db(a==null?void 0:a.data,p,r),se(this,pc,p),se(this,Ja,null)}catch(C){se(this,Ja,C)}z(this,Ja)&&(g=z(this,Ja),p=z(this,pc),m=Date.now(),v="error");const x=f.fetchStatus==="fetching",b=v==="pending",S=v==="error",_=b&&x,j=p!==void 0,A={status:v,fetchStatus:f.fetchStatus,isPending:b,isSuccess:v==="success",isError:S,isInitialLoading:_,isLoading:_,data:p,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:S&&!j,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&j,isStale:D_(t,r),refetch:this.refetch,promise:z(this,Qa)};if(this.options.experimental_prefetchInRender){const C=$=>{A.status==="error"?$.reject(A.error):A.data!==void 0&&$.resolve(A.data)},P=()=>{const $=se(this,Qa,A.promise=fb());C($)},T=z(this,Qa);switch(T.status){case"pending":t.queryHash===n.queryHash&&C(T);break;case"fulfilled":(A.status==="error"||A.data!==T.value)&&P();break;case"rejected":(A.status!=="error"||A.error!==T.reason)&&P();break}}return A}updateResult(){const t=z(this,_r),r=this.createResult(z(this,ze),this.options);if(se(this,jo,z(this,ze).state),se(this,hc,this.options),z(this,jo).data!==void 0&&se(this,mc,z(this,ze)),xm(r,t))return;se(this,_r,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!z(this,gc).size)return!0;const s=new Set(a??z(this,gc));return this.options.throwOnError&&s.add("error"),Object.keys(z(this,_r)).some(o=>{const l=o;return z(this,_r)[l]!==t[l]&&s.has(l)})};Me(this,Ye,q$).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,Ye,gb).call(this)}},$r=new WeakMap,ze=new WeakMap,nh=new WeakMap,_r=new WeakMap,jo=new WeakMap,hc=new WeakMap,Qa=new WeakMap,Ja=new WeakMap,ih=new WeakMap,pc=new WeakMap,mc=new WeakMap,No=new WeakMap,Eo=new WeakMap,es=new WeakMap,gc=new WeakMap,Ye=new WeakSet,dd=function(t){Me(this,Ye,xb).call(this);let r=z(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jr)),r},hb=function(){Me(this,Ye,yb).call(this);const t=xs(this.options.staleTime,z(this,ze));if(Uo||z(this,_r).isStale||!cb(t))return;const n=I$(z(this,_r).dataUpdatedAt,t)+1;se(this,No,setTimeout(()=>{z(this,_r).isStale||this.updateResult()},n))},pb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,ze)):this.options.refetchInterval)??!1},mb=function(t){Me(this,Ye,vb).call(this),se(this,es,t),!(Uo||Xn(this.options.enabled,z(this,ze))===!1||!cb(z(this,es))||z(this,es)===0)&&se(this,Eo,setInterval(()=>{(this.options.refetchIntervalInBackground||I_.isFocused())&&Me(this,Ye,dd).call(this)},z(this,es)))},gb=function(){Me(this,Ye,hb).call(this),Me(this,Ye,mb).call(this,Me(this,Ye,pb).call(this))},yb=function(){z(this,No)&&(clearTimeout(z(this,No)),se(this,No,void 0))},vb=function(){z(this,Eo)&&(clearInterval(z(this,Eo)),se(this,Eo,void 0))},xb=function(){const t=z(this,$r).getQueryCache().build(z(this,$r),this.options);if(t===z(this,ze))return;const r=z(this,ze);se(this,ze,t),se(this,nh,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},q$=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,_r))}),z(this,$r).getQueryCache().notify({query:z(this,ze),type:"observerResultsUpdated"})})},_T);function v8(e,t){return Xn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sN(e,t){return v8(e,t)||e.state.data!==void 0&&bb(e,t,t.refetchOnMount)}function bb(e,t,r){if(Xn(t.enabled,e)!==!1&&xs(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&D_(e,t)}return!1}function oN(e,t,r,n){return(e!==t||Xn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&D_(e,r)}function D_(e,t){return Xn(t.enabled,e)!==!1&&e.isStaleByTime(xs(t.staleTime,e))}function x8(e,t){return!xm(e.getCurrentResult(),t)}var ts,rs,Mr,Gi,oa,$p,wb,ST,b8=(ST=class extends cu{constructor(r,n){super();be(this,oa);be(this,ts);be(this,rs);be(this,Mr);be(this,Gi);se(this,ts,r),this.setOptions(n),this.bindMethods(),Me(this,oa,$p).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=z(this,ts).defaultMutationOptions(r),xm(this.options,n)||z(this,ts).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,Mr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Wo(n.mutationKey)!==Wo(this.options.mutationKey)?this.reset():((i=z(this,Mr))==null?void 0:i.state.status)==="pending"&&z(this,Mr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=z(this,Mr))==null||r.removeObserver(this)}onMutationUpdate(r){Me(this,oa,$p).call(this),Me(this,oa,wb).call(this,r)}getCurrentResult(){return z(this,rs)}reset(){var r;(r=z(this,Mr))==null||r.removeObserver(this),se(this,Mr,void 0),Me(this,oa,$p).call(this),Me(this,oa,wb).call(this)}mutate(r,n){var i;return se(this,Gi,n),(i=z(this,Mr))==null||i.removeObserver(this),se(this,Mr,z(this,ts).getMutationCache().build(z(this,ts),this.options)),z(this,Mr).addObserver(this),z(this,Mr).execute(r)}},ts=new WeakMap,rs=new WeakMap,Mr=new WeakMap,Gi=new WeakMap,oa=new WeakSet,$p=function(){var n;const r=((n=z(this,Mr))==null?void 0:n.state)??H$();se(this,rs,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},wb=function(r){Ht.batch(()=>{var n,i,a,s,o,l,c,d;if(z(this,Gi)&&this.hasListeners()){const f=z(this,rs).variables,h=z(this,rs).context;(r==null?void 0:r.type)==="success"?((i=(n=z(this,Gi)).onSuccess)==null||i.call(n,r.data,f,h),(s=(a=z(this,Gi)).onSettled)==null||s.call(a,r.data,null,f,h)):(r==null?void 0:r.type)==="error"&&((l=(o=z(this,Gi)).onError)==null||l.call(o,r.error,f,h),(d=(c=z(this,Gi)).onSettled)==null||d.call(c,void 0,r.error,f,h))}this.listeners.forEach(f=>{f(z(this,rs))})})},ST),K$=w.createContext(void 0),L_=e=>{const t=w.useContext(K$);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},w8=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(K$.Provider,{value:e,children:t})),G$=w.createContext(!1),_8=()=>w.useContext(G$);G$.Provider;function S8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var j8=w.createContext(S8()),N8=()=>w.useContext(j8),E8=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},O8=e=>{w.useEffect(()=>{e.clearReset()},[e])},A8=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||F$(r,[e.error,n])),k8=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},P8=(e,t)=>e.isLoading&&e.isFetching&&!t,T8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,lN=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function C8(e,t,r){var f,h,p,g,m;const n=_8(),i=N8(),a=L_(),s=a.defaultQueryOptions(e);(h=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,s),s._optimisticResults=n?"isRestoring":"optimistic",k8(s),E8(s,i),O8(i);const o=!a.getQueryCache().get(s.queryHash),[l]=w.useState(()=>new t(a,s)),c=l.getOptimisticResult(s),d=!n&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(v=>{const y=d?l.subscribe(Ht.batchCalls(v)):jr;return l.updateResult(),y},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(s)},[s,l]),T8(s,c))throw lN(s,l,i);if(A8({result:c,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;if((g=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,s,c),s.experimental_prefetchInRender&&!Uo&&P8(c,n)){const v=o?lN(s,l,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;v==null||v.catch(jr).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?c:l.trackResult(c)}function rn(e,t){return C8(e,y8)}function wm(e,t){const r=L_(),[n]=w.useState(()=>new b8(r,e));w.useEffect(()=>{n.setOptions(e)},[n,e]);const i=w.useSyncExternalStore(w.useCallback(s=>n.subscribe(Ht.batchCalls(s)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=w.useCallback((s,o)=>{n.mutate(s,o).catch(jr)},[n]);if(i.error&&F$(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}let $8={data:""},M8=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||$8,R8=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,I8=/\/\*[^]*?\*\/| +/g,cN=/\n+/g,Wa=(e,t)=>{let r="",n="",i="";for(let a in e){let s=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+s+";":n+=a[1]=="f"?Wa(s,a):a+"{"+Wa(s,a[1]=="k"?"":t)+"}":typeof s=="object"?n+=Wa(s,t?t.replace(/([^,])+/g,o=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,o):o?o+" "+l:l)):a):s!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Wa.p?Wa.p(a,s):a+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},Li={},Y$=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+Y$(e[r]);return t}return e},D8=(e,t,r,n,i)=>{let a=Y$(e),s=Li[a]||(Li[a]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(a));if(!Li[s]){let l=a!==e?e:(c=>{let d,f,h=[{}];for(;d=R8.exec(c.replace(I8,""));)d[4]?h.shift():d[3]?(f=d[3].replace(cN," ").trim(),h.unshift(h[0][f]=h[0][f]||{})):h[0][d[1]]=d[2].replace(cN," ").trim();return h[0]})(e);Li[s]=Wa(i?{["@keyframes "+s]:l}:l,r?"":"."+s)}let o=r&&Li.g?Li.g:null;return r&&(Li.g=Li[s]),((l,c,d,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(Li[s],t,n,o),s},L8=(e,t,r)=>e.reduce((n,i,a)=>{let s=t[a];if(s&&s.call){let o=s(r),l=o&&o.props&&o.props.className||/^go/.test(o)&&o;s=l?"."+l:o&&typeof o=="object"?o.props?"":Wa(o,""):o===!1?"":o}return n+i+(s??"")},"");function hy(e){let t=this||{},r=e.call?e(t.p):e;return D8(r.unshift?r.raw?L8(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,M8(t.target),t.g,t.o,t.k)}let X$,_b,Sb;hy.bind({g:1});let fa=hy.bind({k:1});function F8(e,t,r,n){Wa.p=t,X$=e,_b=r,Sb=n}function $s(e,t){let r=this||{};return function(){let n=arguments;function i(a,s){let o=Object.assign({},a),l=o.className||i.className;r.p=Object.assign({theme:_b&&_b()},o),r.o=/ *go\d+/.test(l),o.className=hy.apply(r,n)+(l?" "+l:"");let c=e;return e[0]&&(c=o.as||e,delete o.as),Sb&&c[0]&&Sb(o),X$(c,o)}return i}}var B8=e=>typeof e=="function",_m=(e,t)=>B8(e)?e(t):e,z8=(()=>{let e=0;return()=>(++e).toString()})(),Z$=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),U8=20,Q$=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,U8)};case 1:return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return Q$(e,{type:e.toasts.find(a=>a.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Mp=[],oo={toasts:[],pausedAt:void 0},ol=e=>{oo=Q$(oo,e),Mp.forEach(t=>{t(oo)})},W8={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},V8=(e={})=>{let[t,r]=w.useState(oo),n=w.useRef(oo);w.useEffect(()=>(n.current!==oo&&r(oo),Mp.push(r),()=>{let a=Mp.indexOf(r);a>-1&&Mp.splice(a,1)}),[]);let i=t.toasts.map(a=>{var s,o,l;return{...e,...e[a.type],...a,removeDelay:a.removeDelay||((s=e[a.type])==null?void 0:s.removeDelay)||(e==null?void 0:e.removeDelay),duration:a.duration||((o=e[a.type])==null?void 0:o.duration)||(e==null?void 0:e.duration)||W8[a.type],style:{...e.style,...(l=e[a.type])==null?void 0:l.style,...a.style}}});return{...t,toasts:i}},H8=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||z8()}),uh=e=>(t,r)=>{let n=H8(t,e,r);return ol({type:2,toast:n}),n.id},Er=(e,t)=>uh("blank")(e,t);Er.error=uh("error");Er.success=uh("success");Er.loading=uh("loading");Er.custom=uh("custom");Er.dismiss=e=>{ol({type:3,toastId:e})};Er.remove=e=>ol({type:4,toastId:e});Er.promise=(e,t,r)=>{let n=Er.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let a=t.success?_m(t.success,i):void 0;return a?Er.success(a,{id:n,...r,...r==null?void 0:r.success}):Er.dismiss(n),i}).catch(i=>{let a=t.error?_m(t.error,i):void 0;a?Er.error(a,{id:n,...r,...r==null?void 0:r.error}):Er.dismiss(n)}),e};var q8=(e,t)=>{ol({type:1,toast:{id:e,height:t}})},K8=()=>{ol({type:5,time:Date.now()})},Td=new Map,G8=1e3,Y8=(e,t=G8)=>{if(Td.has(e))return;let r=setTimeout(()=>{Td.delete(e),ol({type:4,toastId:e})},t);Td.set(e,r)},X8=e=>{let{toasts:t,pausedAt:r}=V8(e);w.useEffect(()=>{if(r)return;let a=Date.now(),s=t.map(o=>{if(o.duration===1/0)return;let l=(o.duration||0)+o.pauseDuration-(a-o.createdAt);if(l<0){o.visible&&Er.dismiss(o.id);return}return setTimeout(()=>Er.dismiss(o.id),l)});return()=>{s.forEach(o=>o&&clearTimeout(o))}},[t,r]);let n=w.useCallback(()=>{r&&ol({type:6,time:Date.now()})},[r]),i=w.useCallback((a,s)=>{let{reverseOrder:o=!1,gutter:l=8,defaultPosition:c}=s||{},d=t.filter(p=>(p.position||c)===(a.position||c)&&p.height),f=d.findIndex(p=>p.id===a.id),h=d.filter((p,g)=>g<f&&p.visible).length;return d.filter(p=>p.visible).slice(...o?[h+1]:[0,h]).reduce((p,g)=>p+(g.height||0)+l,0)},[t]);return w.useEffect(()=>{t.forEach(a=>{if(a.dismissed)Y8(a.id,a.removeDelay);else{let s=Td.get(a.id);s&&(clearTimeout(s),Td.delete(a.id))}})},[t]),{toasts:t,handlers:{updateHeight:q8,startPause:K8,endPause:n,calculateOffset:i}}},Z8=fa`
|
||
from {
|
||
transform: scale(0) rotate(45deg);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1) rotate(45deg);
|
||
opacity: 1;
|
||
}`,Q8=fa`
|
||
from {
|
||
transform: scale(0);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}`,J8=fa`
|
||
from {
|
||
transform: scale(0) rotate(90deg);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1) rotate(90deg);
|
||
opacity: 1;
|
||
}`,eB=$s("div")`
|
||
width: 20px;
|
||
opacity: 0;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
background: ${e=>e.primary||"#ff4b4b"};
|
||
position: relative;
|
||
transform: rotate(45deg);
|
||
|
||
animation: ${Z8} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||
forwards;
|
||
animation-delay: 100ms;
|
||
|
||
&:after,
|
||
&:before {
|
||
content: '';
|
||
animation: ${Q8} 0.15s ease-out forwards;
|
||
animation-delay: 150ms;
|
||
position: absolute;
|
||
border-radius: 3px;
|
||
opacity: 0;
|
||
background: ${e=>e.secondary||"#fff"};
|
||
bottom: 9px;
|
||
left: 4px;
|
||
height: 2px;
|
||
width: 12px;
|
||
}
|
||
|
||
&:before {
|
||
animation: ${J8} 0.15s ease-out forwards;
|
||
animation-delay: 180ms;
|
||
transform: rotate(90deg);
|
||
}
|
||
`,tB=fa`
|
||
from {
|
||
transform: rotate(0deg);
|
||
}
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
`,rB=$s("div")`
|
||
width: 12px;
|
||
height: 12px;
|
||
box-sizing: border-box;
|
||
border: 2px solid;
|
||
border-radius: 100%;
|
||
border-color: ${e=>e.secondary||"#e0e0e0"};
|
||
border-right-color: ${e=>e.primary||"#616161"};
|
||
animation: ${tB} 1s linear infinite;
|
||
`,nB=fa`
|
||
from {
|
||
transform: scale(0) rotate(45deg);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1) rotate(45deg);
|
||
opacity: 1;
|
||
}`,iB=fa`
|
||
0% {
|
||
height: 0;
|
||
width: 0;
|
||
opacity: 0;
|
||
}
|
||
40% {
|
||
height: 0;
|
||
width: 6px;
|
||
opacity: 1;
|
||
}
|
||
100% {
|
||
opacity: 1;
|
||
height: 10px;
|
||
}`,aB=$s("div")`
|
||
width: 20px;
|
||
opacity: 0;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
background: ${e=>e.primary||"#61d345"};
|
||
position: relative;
|
||
transform: rotate(45deg);
|
||
|
||
animation: ${nB} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||
forwards;
|
||
animation-delay: 100ms;
|
||
&:after {
|
||
content: '';
|
||
box-sizing: border-box;
|
||
animation: ${iB} 0.2s ease-out forwards;
|
||
opacity: 0;
|
||
animation-delay: 200ms;
|
||
position: absolute;
|
||
border-right: 2px solid;
|
||
border-bottom: 2px solid;
|
||
border-color: ${e=>e.secondary||"#fff"};
|
||
bottom: 6px;
|
||
left: 6px;
|
||
height: 10px;
|
||
width: 6px;
|
||
}
|
||
`,sB=$s("div")`
|
||
position: absolute;
|
||
`,oB=$s("div")`
|
||
position: relative;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
min-width: 20px;
|
||
min-height: 20px;
|
||
`,lB=fa`
|
||
from {
|
||
transform: scale(0.6);
|
||
opacity: 0.4;
|
||
}
|
||
to {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}`,cB=$s("div")`
|
||
position: relative;
|
||
transform: scale(0.6);
|
||
opacity: 0.4;
|
||
min-width: 20px;
|
||
animation: ${lB} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||
forwards;
|
||
`,uB=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?w.createElement(cB,null,t):t:r==="blank"?null:w.createElement(oB,null,w.createElement(rB,{...n}),r!=="loading"&&w.createElement(sB,null,r==="error"?w.createElement(eB,{...n}):w.createElement(aB,{...n})))},dB=e=>`
|
||
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
||
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
||
`,fB=e=>`
|
||
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
||
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
||
`,hB="0%{opacity:0;} 100%{opacity:1;}",pB="0%{opacity:1;} 100%{opacity:0;}",mB=$s("div")`
|
||
display: flex;
|
||
align-items: center;
|
||
background: #fff;
|
||
color: #363636;
|
||
line-height: 1.3;
|
||
will-change: transform;
|
||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
||
max-width: 350px;
|
||
pointer-events: auto;
|
||
padding: 8px 10px;
|
||
border-radius: 8px;
|
||
`,gB=$s("div")`
|
||
display: flex;
|
||
justify-content: center;
|
||
margin: 4px 10px;
|
||
color: inherit;
|
||
flex: 1 1 auto;
|
||
white-space: pre-line;
|
||
`,yB=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=Z$()?[hB,pB]:[dB(r),fB(r)];return{animation:t?`${fa(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${fa(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},vB=w.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?yB(e.position||t||"top-center",e.visible):{opacity:0},a=w.createElement(uB,{toast:e}),s=w.createElement(gB,{...e.ariaProps},_m(e.message,e));return w.createElement(mB,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:a,message:s}):w.createElement(w.Fragment,null,a,s))});F8(w.createElement);var xB=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let a=w.useCallback(s=>{if(s){let o=()=>{let l=s.getBoundingClientRect().height;n(e,l)};o(),new MutationObserver(o).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return w.createElement("div",{ref:a,className:t,style:r},i)},bB=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Z$()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},wB=hy`
|
||
z-index: 9999;
|
||
> * {
|
||
pointer-events: auto;
|
||
}
|
||
`,Gh=16,_B=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:a,containerClassName:s})=>{let{toasts:o,handlers:l}=X8(r);return w.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Gh,left:Gh,right:Gh,bottom:Gh,pointerEvents:"none",...a},className:s,onMouseEnter:l.startPause,onMouseLeave:l.endPause},o.map(c=>{let d=c.position||t,f=l.calculateOffset(c,{reverseOrder:e,gutter:n,defaultPosition:t}),h=bB(d,f);return w.createElement(xB,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?wB:"",style:h},c.type==="custom"?_m(c.message,c):i?i(c):w.createElement(vB,{toast:c,position:d}))}))},as=Er;/**
|
||
* @remix-run/router v1.23.0
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function of(){return of=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},of.apply(this,arguments)}var ss;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ss||(ss={}));const uN="popstate";function SB(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:s,hash:o}=n.location;return jb("",{pathname:a,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Sm(i)}return NB(t,r,null,e)}function Pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function J$(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jB(){return Math.random().toString(36).substr(2,8)}function dN(e,t){return{usr:e.state,key:e.key,idx:t}}function jb(e,t,r,n){return r===void 0&&(r=null),of({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?uu(t):t,{state:r,key:t&&t.key||n||jB()})}function Sm(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function uu(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function NB(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,o=ss.Pop,l=null,c=d();c==null&&(c=0,s.replaceState(of({},s.state,{idx:c}),""));function d(){return(s.state||{idx:null}).idx}function f(){o=ss.Pop;let v=d(),y=v==null?null:v-c;c=v,l&&l({action:o,location:m.location,delta:y})}function h(v,y){o=ss.Push;let x=jb(m.location,v,y);c=d()+1;let b=dN(x,c),S=m.createHref(x);try{s.pushState(b,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(S)}a&&l&&l({action:o,location:m.location,delta:1})}function p(v,y){o=ss.Replace;let x=jb(m.location,v,y);c=d();let b=dN(x,c),S=m.createHref(x);s.replaceState(b,"",S),a&&l&&l({action:o,location:m.location,delta:0})}function g(v){let y=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof v=="string"?v:Sm(v);return x=x.replace(/ $/,"%20"),Pt(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let m={get action(){return o},get location(){return e(i,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(uN,f),l=v,()=>{i.removeEventListener(uN,f),l=null}},createHref(v){return t(i,v)},createURL:g,encodeLocation(v){let y=g(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(v){return s.go(v)}};return m}var fN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fN||(fN={}));function EB(e,t,r){return r===void 0&&(r="/"),OB(e,t,r)}function OB(e,t,r,n){let i=typeof t=="string"?uu(t):t,a=F_(i.pathname||"/",r);if(a==null)return null;let s=e5(e);AB(s);let o=null;for(let l=0;o==null&&l<s.length;++l){let c=BB(a);o=DB(s[l],c)}return o}function e5(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,s,o)=>{let l={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(Pt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=bs([n,l.relativePath]),d=r.concat(l);a.children&&a.children.length>0&&(Pt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),e5(a.children,t,d,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:RB(c,a.index),routesMeta:d})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let l of t5(a.path))i(a,s,l)}),t}function t5(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=t5(n.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),i&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function AB(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:IB(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const kB=/^:[\w-]+$/,PB=3,TB=2,CB=1,$B=10,MB=-2,hN=e=>e==="*";function RB(e,t){let r=e.split("/"),n=r.length;return r.some(hN)&&(n+=MB),t&&(n+=TB),r.filter(i=>!hN(i)).reduce((i,a)=>i+(kB.test(a)?PB:a===""?CB:$B),n)}function IB(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function DB(e,t,r){let{routesMeta:n}=e,i={},a="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],c=o===n.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=LB({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),h=l.route;if(!f)return null;Object.assign(i,f.params),s.push({params:i,pathname:bs([a,f.pathname]),pathnameBase:VB(bs([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=bs([a,f.pathnameBase]))}return s}function LB(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=FB(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce((c,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=o[f]||"";s=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const g=o[f];return p&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:e}}function FB(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),J$(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function BB(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return J$(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function F_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function zB(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?uu(e):e;return{pathname:r?r.startsWith("/")?r:UB(r,t):t,search:HB(n),hash:qB(i)}}function UB(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function f0(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function WB(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function B_(e,t){let r=WB(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function z_(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=uu(e):(i=of({},e),Pt(!i.pathname||!i.pathname.includes("?"),f0("?","pathname","search",i)),Pt(!i.pathname||!i.pathname.includes("#"),f0("#","pathname","hash",i)),Pt(!i.search||!i.search.includes("#"),f0("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,o;if(s==null)o=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}o=f>=0?t[f]:"/"}let l=zB(i,o),c=s&&s!=="/"&&s.endsWith("/"),d=(a||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const bs=e=>e.join("/").replace(/\/\/+/g,"/"),VB=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HB=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qB=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function KB(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const r5=["post","put","patch","delete"];new Set(r5);const GB=["get",...r5];new Set(GB);/**
|
||
* React Router v6.30.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function lf(){return lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lf.apply(this,arguments)}const U_=w.createContext(null),YB=w.createContext(null),Ms=w.createContext(null),py=w.createContext(null),_a=w.createContext({outlet:null,matches:[],isDataRoute:!1}),n5=w.createContext(null);function XB(e,t){let{relative:r}=t===void 0?{}:t;du()||Pt(!1);let{basename:n,navigator:i}=w.useContext(Ms),{hash:a,pathname:s,search:o}=s5(e,{relative:r}),l=s;return n!=="/"&&(l=s==="/"?n:bs([n,s])),i.createHref({pathname:l,search:o,hash:a})}function du(){return w.useContext(py)!=null}function Rs(){return du()||Pt(!1),w.useContext(py).location}function i5(e){w.useContext(Ms).static||w.useLayoutEffect(e)}function Is(){let{isDataRoute:e}=w.useContext(_a);return e?c9():ZB()}function ZB(){du()||Pt(!1);let e=w.useContext(U_),{basename:t,future:r,navigator:n}=w.useContext(Ms),{matches:i}=w.useContext(_a),{pathname:a}=Rs(),s=JSON.stringify(B_(i,r.v7_relativeSplatPath)),o=w.useRef(!1);return i5(()=>{o.current=!0}),w.useCallback(function(c,d){if(d===void 0&&(d={}),!o.current)return;if(typeof c=="number"){n.go(c);return}let f=z_(c,JSON.parse(s),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:bs([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,s,a,e])}function a5(){let{matches:e}=w.useContext(_a),t=e[e.length-1];return t?t.params:{}}function s5(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(Ms),{matches:i}=w.useContext(_a),{pathname:a}=Rs(),s=JSON.stringify(B_(i,n.v7_relativeSplatPath));return w.useMemo(()=>z_(e,JSON.parse(s),a,r==="path"),[e,s,a,r])}function QB(e,t){return JB(e,t)}function JB(e,t,r,n){du()||Pt(!1);let{navigator:i}=w.useContext(Ms),{matches:a}=w.useContext(_a),s=a[a.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Rs(),d;if(t){var f;let v=typeof t=="string"?uu(t):t;l==="/"||(f=v.pathname)!=null&&f.startsWith(l)||Pt(!1),d=v}else d=c;let h=d.pathname||"/",p=h;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let g=EB(e,{pathname:p}),m=i9(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:bs([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:bs([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r,n);return t&&m?w.createElement(py.Provider,{value:{location:lf({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ss.Pop}},m):m}function e9(){let e=l9(),t=KB(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:i},r):null,null)}const t9=w.createElement(e9,null);class r9 extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?w.createElement(_a.Provider,{value:this.props.routeContext},w.createElement(n5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function n9(e){let{routeContext:t,match:r,children:n}=e,i=w.useContext(U_);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(_a.Provider,{value:t},n)}function i9(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,o=(i=r)==null?void 0:i.errors;if(o!=null){let d=s.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);d>=0||Pt(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<s.length;d++){let f=s[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:h,errors:p}=r,g=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){l=!0,c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((d,f,h)=>{let p,g=!1,m=null,v=null;r&&(p=o&&f.route.id?o[f.route.id]:void 0,m=f.route.errorElement||t9,l&&(c<0&&h===0?(u9("route-fallback"),g=!0,v=null):c===h&&(g=!0,v=f.route.hydrateFallbackElement||null)));let y=t.concat(s.slice(0,h+1)),x=()=>{let b;return p?b=m:g?b=v:f.route.Component?b=w.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,w.createElement(n9,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?w.createElement(r9,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var o5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(o5||{}),l5=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(l5||{});function a9(e){let t=w.useContext(U_);return t||Pt(!1),t}function s9(e){let t=w.useContext(YB);return t||Pt(!1),t}function o9(e){let t=w.useContext(_a);return t||Pt(!1),t}function c5(e){let t=o9(),r=t.matches[t.matches.length-1];return r.route.id||Pt(!1),r.route.id}function l9(){var e;let t=w.useContext(n5),r=s9(),n=c5();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function c9(){let{router:e}=a9(o5.UseNavigateStable),t=c5(l5.UseNavigateStable),r=w.useRef(!1);return i5(()=>{r.current=!0}),w.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,lf({fromRouteId:t},a)))},[e,t])}const pN={};function u9(e,t,r){pN[e]||(pN[e]=!0)}function d9(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function f9(e){let{to:t,replace:r,state:n,relative:i}=e;du()||Pt(!1);let{future:a,static:s}=w.useContext(Ms),{matches:o}=w.useContext(_a),{pathname:l}=Rs(),c=Is(),d=z_(t,B_(o,a.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return w.useEffect(()=>c(JSON.parse(f),{replace:r,state:n,relative:i}),[c,f,i,r,n]),null}function $t(e){Pt(!1)}function h9(e){let{basename:t="/",children:r=null,location:n,navigationType:i=ss.Pop,navigator:a,static:s=!1,future:o}=e;du()&&Pt(!1);let l=t.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:a,static:s,future:lf({v7_relativeSplatPath:!1},o)}),[l,o,a,s]);typeof n=="string"&&(n=uu(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:g="default"}=n,m=w.useMemo(()=>{let v=F_(d,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:p,key:g},navigationType:i}},[l,d,f,h,p,g,i]);return m==null?null:w.createElement(Ms.Provider,{value:c},w.createElement(py.Provider,{children:r,value:m}))}function p9(e){let{children:t,location:r}=e;return QB(Nb(t),r)}new Promise(()=>{});function Nb(e,t){t===void 0&&(t=[]);let r=[];return w.Children.forEach(e,(n,i)=>{if(!w.isValidElement(n))return;let a=[...t,i];if(n.type===w.Fragment){r.push.apply(r,Nb(n.props.children,a));return}n.type!==$t&&Pt(!1),!n.props.index||!n.props.children||Pt(!1);let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=Nb(n.props.children,a)),r.push(s)}),r}/**
|
||
* React Router DOM v6.30.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Eb(){return Eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eb.apply(this,arguments)}function m9(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function g9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function y9(e,t){return e.button===0&&(!t||t==="_self")&&!g9(e)}const v9=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],x9="6";try{window.__reactRouterVersion=x9}catch{}const b9="startTransition",mN=mx[b9];function w9(e){let{basename:t,children:r,future:n,window:i}=e,a=w.useRef();a.current==null&&(a.current=SB({window:i,v5Compat:!0}));let s=a.current,[o,l]=w.useState({action:s.action,location:s.location}),{v7_startTransition:c}=n||{},d=w.useCallback(f=>{c&&mN?mN(()=>l(f)):l(f)},[l,c]);return w.useLayoutEffect(()=>s.listen(d),[s,d]),w.useEffect(()=>d9(n),[n]),w.createElement(h9,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:s,future:n})}const _9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nt=w.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:s,state:o,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,h=m9(t,v9),{basename:p}=w.useContext(Ms),g,m=!1;if(typeof c=="string"&&S9.test(c)&&(g=c,_9))try{let b=new URL(window.location.href),S=c.startsWith("//")?new URL(b.protocol+c):new URL(c),_=F_(S.pathname,p);S.origin===b.origin&&_!=null?c=_+S.search+S.hash:m=!0}catch{}let v=XB(c,{relative:i}),y=j9(c,{replace:s,state:o,target:l,preventScrollReset:d,relative:i,viewTransition:f});function x(b){n&&n(b),b.defaultPrevented||y(b)}return w.createElement("a",Eb({},h,{href:g||v,onClick:m||a?n:x,ref:r,target:l}))});var gN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(gN||(gN={}));var yN;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yN||(yN={}));function j9(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:s,viewTransition:o}=t===void 0?{}:t,l=Is(),c=Rs(),d=s5(e,{relative:s});return w.useCallback(f=>{if(y9(f,r)){f.preventDefault();let h=n!==void 0?n:Sm(c)===Sm(d);l(e,{replace:h,state:i,preventScrollReset:a,relative:s,viewTransition:o})}},[c,l,d,n,i,r,e,a,s,o])}function dr(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=dr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var u5={exports:{}},d5={},f5={exports:{}},h5={};/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var jc=w;function N9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var E9=typeof Object.is=="function"?Object.is:N9,O9=jc.useState,A9=jc.useEffect,k9=jc.useLayoutEffect,P9=jc.useDebugValue;function T9(e,t){var r=t(),n=O9({inst:{value:r,getSnapshot:t}}),i=n[0].inst,a=n[1];return k9(function(){i.value=r,i.getSnapshot=t,h0(i)&&a({inst:i})},[e,r,t]),A9(function(){return h0(i)&&a({inst:i}),e(function(){h0(i)&&a({inst:i})})},[e]),P9(r),r}function h0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!E9(e,r)}catch{return!0}}function C9(e,t){return t()}var $9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?C9:T9;h5.useSyncExternalStore=jc.useSyncExternalStore!==void 0?jc.useSyncExternalStore:$9;f5.exports=h5;var M9=f5.exports;/**
|
||
* @license React
|
||
* use-sync-external-store-shim/with-selector.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var my=w,R9=M9;function I9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var D9=typeof Object.is=="function"?Object.is:I9,L9=R9.useSyncExternalStore,F9=my.useRef,B9=my.useEffect,z9=my.useMemo,U9=my.useDebugValue;d5.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var a=F9(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=z9(function(){function l(p){if(!c){if(c=!0,d=p,p=n(p),i!==void 0&&s.hasValue){var g=s.value;if(i(g,p))return f=g}return f=p}if(g=f,D9(d,p))return g;var m=n(p);return i!==void 0&&i(g,m)?(d=p,g):(d=p,f=m)}var c=!1,d,f,h=r===void 0?null:r;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,r,n,i]);var o=L9(e,a[0],a[1]);return B9(function(){s.hasValue=!0,s.value=o},[o]),U9(o),o};u5.exports=d5;var W9=u5.exports;const V9=Xe(W9),H9={},vN=e=>{let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(g=>g(t,p))}},i=()=>t,l={setState:n,getState:i,getInitialState:()=>c,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(H9?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},c=t=e(n,i,l);return l},q9=e=>e?vN(e):vN,{useDebugValue:K9}=k,{useSyncExternalStoreWithSelector:G9}=V9,Y9=e=>e;function p5(e,t=Y9,r){const n=G9(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return K9(n),n}const xN=(e,t)=>{const r=q9(e),n=(i,a=t)=>p5(r,i,a);return Object.assign(n,r),n},X9=(e,t)=>e?xN(e,t):xN;function nr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,i]of e)if(!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}var Z9={value:()=>{}};function gy(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Rp(r)}function Rp(e){this._=e}function Q9(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Rp.prototype=gy.prototype={constructor:Rp,on:function(e,t){var r=this._,n=Q9(e+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(e=n[a]).type)&&(i=J9(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=n[a]).type)r[i]=bN(r[i],e.name,t);else if(t==null)for(i in r)r[i]=bN(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Rp(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,i=a.length;n<i;++n)a[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)}};function J9(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function bN(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=Z9,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ob="http://www.w3.org/1999/xhtml";const wN={svg:"http://www.w3.org/2000/svg",xhtml:Ob,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yy(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),wN.hasOwnProperty(t)?{space:wN[t],local:e}:e}function ez(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ob&&t.documentElement.namespaceURI===Ob?t.createElement(e):t.createElementNS(r,e)}}function tz(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function m5(e){var t=yy(e);return(t.local?tz:ez)(t)}function rz(){}function W_(e){return e==null?rz:function(){return this.querySelector(e)}}function nz(e){typeof e!="function"&&(e=W_(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=new Array(s),l,c,d=0;d<s;++d)(l=a[d])&&(c=e.call(l,l.__data__,d,a))&&("__data__"in l&&(c.__data__=l.__data__),o[d]=c);return new ln(n,this._parents)}function iz(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function az(){return[]}function g5(e){return e==null?az:function(){return this.querySelectorAll(e)}}function sz(e){return function(){return iz(e.apply(this,arguments))}}function oz(e){typeof e=="function"?e=sz(e):e=g5(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(n.push(e.call(l,l.__data__,c,s)),i.push(l));return new ln(n,i)}function y5(e){return function(){return this.matches(e)}}function v5(e){return function(t){return t.matches(e)}}var lz=Array.prototype.find;function cz(e){return function(){return lz.call(this.children,e)}}function uz(){return this.firstElementChild}function dz(e){return this.select(e==null?uz:cz(typeof e=="function"?e:v5(e)))}var fz=Array.prototype.filter;function hz(){return Array.from(this.children)}function pz(e){return function(){return fz.call(this.children,e)}}function mz(e){return this.selectAll(e==null?hz:pz(typeof e=="function"?e:v5(e)))}function gz(e){typeof e!="function"&&(e=y5(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new ln(n,this._parents)}function x5(e){return new Array(e.length)}function yz(){return new ln(this._enter||this._groups.map(x5),this._parents)}function jm(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}jm.prototype={constructor:jm,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function vz(e){return function(){return e}}function xz(e,t,r,n,i,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],n[s]=o):r[s]=new jm(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function bz(e,t,r,n,i,a,s){var o,l,c=new Map,d=t.length,f=a.length,h=new Array(d),p;for(o=0;o<d;++o)(l=t[o])&&(h[o]=p=s.call(l,l.__data__,o,t)+"",c.has(p)?i[o]=l:c.set(p,l));for(o=0;o<f;++o)p=s.call(e,a[o],o,a)+"",(l=c.get(p))?(n[o]=l,l.__data__=a[o],c.delete(p)):r[o]=new jm(e,a[o]);for(o=0;o<d;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function wz(e){return e.__data__}function _z(e,t){if(!arguments.length)return Array.from(this,wz);var r=t?bz:xz,n=this._parents,i=this._groups;typeof e!="function"&&(e=vz(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var d=n[c],f=i[c],h=f.length,p=Sz(e.call(d,d&&d.__data__,c,n)),g=p.length,m=o[c]=new Array(g),v=s[c]=new Array(g),y=l[c]=new Array(h);r(d,f,m,v,y,p,t);for(var x=0,b=0,S,_;x<g;++x)if(S=m[x]){for(x>=b&&(b=x+1);!(_=v[b])&&++b<g;);S._next=_||null}}return s=new ln(s,n),s._enter=o,s._exit=l,s}function Sz(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jz(){return new ln(this._exit||this._groups.map(x5),this._parents)}function Nz(e,t,r){var n=this.enter(),i=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}function Ez(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var c=r[l],d=n[l],f=c.length,h=o[l]=new Array(f),p,g=0;g<f;++g)(p=c[g]||d[g])&&(h[g]=p);for(;l<i;++l)o[l]=r[l];return new ln(o,this._parents)}function Oz(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Az(e){e||(e=kz);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],o=s.length,l=i[a]=new Array(o),c,d=0;d<o;++d)(c=s[d])&&(l[d]=c);l.sort(t)}return new ln(i,this._parents).order()}function kz(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Pz(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Tz(){return Array.from(this)}function Cz(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}function $z(){let e=0;for(const t of this)++e;return e}function Mz(){return!this.node()}function Rz(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,s=i.length,o;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this}function Iz(e){return function(){this.removeAttribute(e)}}function Dz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Lz(e,t){return function(){this.setAttribute(e,t)}}function Fz(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Bz(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function zz(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Uz(e,t){var r=yy(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?Dz:Iz:typeof t=="function"?r.local?zz:Bz:r.local?Fz:Lz)(r,t))}function b5(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Wz(e){return function(){this.style.removeProperty(e)}}function Vz(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Hz(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function qz(e,t,r){return arguments.length>1?this.each((t==null?Wz:typeof t=="function"?Hz:Vz)(e,t,r??"")):Nc(this.node(),e)}function Nc(e,t){return e.style.getPropertyValue(t)||b5(e).getComputedStyle(e,null).getPropertyValue(t)}function Kz(e){return function(){delete this[e]}}function Gz(e,t){return function(){this[e]=t}}function Yz(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Xz(e,t){return arguments.length>1?this.each((t==null?Kz:typeof t=="function"?Yz:Gz)(e,t)):this.node()[e]}function w5(e){return e.trim().split(/^|\s+/)}function V_(e){return e.classList||new _5(e)}function _5(e){this._node=e,this._names=w5(e.getAttribute("class")||"")}_5.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function S5(e,t){for(var r=V_(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function j5(e,t){for(var r=V_(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function Zz(e){return function(){S5(this,e)}}function Qz(e){return function(){j5(this,e)}}function Jz(e,t){return function(){(t.apply(this,arguments)?S5:j5)(this,e)}}function e7(e,t){var r=w5(e+"");if(arguments.length<2){for(var n=V_(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?Jz:t?Zz:Qz)(r,t))}function t7(){this.textContent=""}function r7(e){return function(){this.textContent=e}}function n7(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function i7(e){return arguments.length?this.each(e==null?t7:(typeof e=="function"?n7:r7)(e)):this.node().textContent}function a7(){this.innerHTML=""}function s7(e){return function(){this.innerHTML=e}}function o7(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function l7(e){return arguments.length?this.each(e==null?a7:(typeof e=="function"?o7:s7)(e)):this.node().innerHTML}function c7(){this.nextSibling&&this.parentNode.appendChild(this)}function u7(){return this.each(c7)}function d7(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function f7(){return this.each(d7)}function h7(e){var t=typeof e=="function"?e:m5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function p7(){return null}function m7(e,t){var r=typeof e=="function"?e:m5(e),n=t==null?p7:typeof t=="function"?t:W_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function g7(){var e=this.parentNode;e&&e.removeChild(this)}function y7(){return this.each(g7)}function v7(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function x7(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function b7(e){return this.select(e?x7:v7)}function w7(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _7(e){return function(t){e.call(this,t,this.__data__)}}function S7(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function j7(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,a;r<i;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++n]=a;++n?t.length=n:delete this.__on}}}function N7(e,t,r){return function(){var n=this.__on,i,a=_7(t);if(n){for(var s=0,o=n.length;s<o;++s)if((i=n[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=t;return}}this.addEventListener(e.type,a,r),i={type:e.type,name:e.name,value:t,listener:a,options:r},n?n.push(i):this.__on=[i]}}function E7(e,t,r){var n=S7(e+""),i,a=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,d;l<c;++l)for(i=0,d=o[l];i<a;++i)if((s=n[i]).type===d.type&&s.name===d.name)return d.value}return}for(o=t?N7:j7,i=0;i<a;++i)this.each(o(n[i],t,r));return this}function N5(e,t,r){var n=b5(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function O7(e,t){return function(){return N5(this,e,t)}}function A7(e,t){return function(){return N5(this,e,t.apply(this,arguments))}}function k7(e,t){return this.each((typeof t=="function"?A7:O7)(e,t))}function*P7(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s)}var E5=[null];function ln(e,t){this._groups=e,this._parents=t}function dh(){return new ln([[document.documentElement]],E5)}function T7(){return this}ln.prototype=dh.prototype={constructor:ln,select:nz,selectAll:oz,selectChild:dz,selectChildren:mz,filter:gz,data:_z,enter:yz,exit:jz,join:Nz,merge:Ez,selection:T7,order:Oz,sort:Az,call:Pz,nodes:Tz,node:Cz,size:$z,empty:Mz,each:Rz,attr:Uz,style:qz,property:Xz,classed:e7,text:i7,html:l7,raise:u7,lower:f7,append:h7,insert:m7,remove:y7,clone:b7,datum:w7,on:E7,dispatch:k7,[Symbol.iterator]:P7};function _n(e){return typeof e=="string"?new ln([[document.querySelector(e)]],[document.documentElement]):new ln([[e]],E5)}function C7(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Hn(e,t){if(e=C7(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const $7={passive:!1},cf={capture:!0,passive:!1};function p0(e){e.stopImmediatePropagation()}function Ql(e){e.preventDefault(),e.stopImmediatePropagation()}function O5(e){var t=e.document.documentElement,r=_n(e).on("dragstart.drag",Ql,cf);"onselectstart"in t?r.on("selectstart.drag",Ql,cf):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function A5(e,t){var r=e.document.documentElement,n=_n(e).on("dragstart.drag",null);t&&(n.on("click.drag",Ql,cf),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Yh=e=>()=>e;function Ab(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:a,x:s,y:o,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}Ab.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function M7(e){return!e.ctrlKey&&!e.button}function R7(){return this.parentNode}function I7(e,t){return t??{x:e.x,y:e.y}}function D7(){return navigator.maxTouchPoints||"ontouchstart"in this}function L7(){var e=M7,t=R7,r=I7,n=D7,i={},a=gy("start","drag","end"),s=0,o,l,c,d,f=0;function h(S){S.on("mousedown.drag",p).filter(n).on("touchstart.drag",v).on("touchmove.drag",y,$7).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(S,_){if(!(d||!e.call(this,S,_))){var j=b(this,t.call(this,S,_),S,_,"mouse");j&&(_n(S.view).on("mousemove.drag",g,cf).on("mouseup.drag",m,cf),O5(S.view),p0(S),c=!1,o=S.clientX,l=S.clientY,j("start",S))}}function g(S){if(Ql(S),!c){var _=S.clientX-o,j=S.clientY-l;c=_*_+j*j>f}i.mouse("drag",S)}function m(S){_n(S.view).on("mousemove.drag mouseup.drag",null),A5(S.view,c),Ql(S),i.mouse("end",S)}function v(S,_){if(e.call(this,S,_)){var j=S.changedTouches,N=t.call(this,S,_),A=j.length,E,C;for(E=0;E<A;++E)(C=b(this,N,S,_,j[E].identifier,j[E]))&&(p0(S),C("start",S,j[E]))}}function y(S){var _=S.changedTouches,j=_.length,N,A;for(N=0;N<j;++N)(A=i[_[N].identifier])&&(Ql(S),A("drag",S,_[N]))}function x(S){var _=S.changedTouches,j=_.length,N,A;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<j;++N)(A=i[_[N].identifier])&&(p0(S),A("end",S,_[N]))}function b(S,_,j,N,A,E){var C=a.copy(),P=Hn(E||j,_),T,$,O;if((O=r.call(S,new Ab("beforestart",{sourceEvent:j,target:h,identifier:A,active:s,x:P[0],y:P[1],dx:0,dy:0,dispatch:C}),N))!=null)return T=O.x-P[0]||0,$=O.y-P[1]||0,function R(M,F,D){var I=P,L;switch(M){case"start":i[A]=R,L=s++;break;case"end":delete i[A],--s;case"drag":P=Hn(D||F,_),L=s;break}C.call(M,S,new Ab(M,{sourceEvent:F,subject:O,target:h,identifier:A,active:L,x:P[0]+T,y:P[1]+$,dx:P[0]-I[0],dy:P[1]-I[1],dispatch:C}),N)}}return h.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Yh(!!S),h):e},h.container=function(S){return arguments.length?(t=typeof S=="function"?S:Yh(S),h):t},h.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Yh(S),h):r},h.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:Yh(!!S),h):n},h.on=function(){var S=a.on.apply(a,arguments);return S===a?h:S},h.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,h):Math.sqrt(f)},h}function H_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function k5(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function fh(){}var uf=.7,Nm=1/uf,Jl="\\s*([+-]?\\d+)\\s*",df="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",F7=/^#([0-9a-f]{3,8})$/,B7=new RegExp(`^rgb\\(${Jl},${Jl},${Jl}\\)$`),z7=new RegExp(`^rgb\\(${Ai},${Ai},${Ai}\\)$`),U7=new RegExp(`^rgba\\(${Jl},${Jl},${Jl},${df}\\)$`),W7=new RegExp(`^rgba\\(${Ai},${Ai},${Ai},${df}\\)$`),V7=new RegExp(`^hsl\\(${df},${Ai},${Ai}\\)$`),H7=new RegExp(`^hsla\\(${df},${Ai},${Ai},${df}\\)$`),_N={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};H_(fh,Vo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:SN,formatHex:SN,formatHex8:q7,formatHsl:K7,formatRgb:jN,toString:jN});function SN(){return this.rgb().formatHex()}function q7(){return this.rgb().formatHex8()}function K7(){return P5(this).formatHsl()}function jN(){return this.rgb().formatRgb()}function Vo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=F7.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NN(t):r===3?new Fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Xh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Xh(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=B7.exec(e))?new Fr(t[1],t[2],t[3],1):(t=z7.exec(e))?new Fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U7.exec(e))?Xh(t[1],t[2],t[3],t[4]):(t=W7.exec(e))?Xh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=V7.exec(e))?AN(t[1],t[2]/100,t[3]/100,1):(t=H7.exec(e))?AN(t[1],t[2]/100,t[3]/100,t[4]):_N.hasOwnProperty(e)?NN(_N[e]):e==="transparent"?new Fr(NaN,NaN,NaN,0):null}function NN(e){return new Fr(e>>16&255,e>>8&255,e&255,1)}function Xh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fr(e,t,r,n)}function G7(e){return e instanceof fh||(e=Vo(e)),e?(e=e.rgb(),new Fr(e.r,e.g,e.b,e.opacity)):new Fr}function kb(e,t,r,n){return arguments.length===1?G7(e):new Fr(e,t,r,n??1)}function Fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}H_(Fr,kb,k5(fh,{brighter(e){return e=e==null?Nm:Math.pow(Nm,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uf:Math.pow(uf,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fr(ko(this.r),ko(this.g),ko(this.b),Em(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:EN,formatHex:EN,formatHex8:Y7,formatRgb:ON,toString:ON}));function EN(){return`#${lo(this.r)}${lo(this.g)}${lo(this.b)}`}function Y7(){return`#${lo(this.r)}${lo(this.g)}${lo(this.b)}${lo((isNaN(this.opacity)?1:this.opacity)*255)}`}function ON(){const e=Em(this.opacity);return`${e===1?"rgb(":"rgba("}${ko(this.r)}, ${ko(this.g)}, ${ko(this.b)}${e===1?")":`, ${e})`}`}function Em(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ko(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lo(e){return e=ko(e),(e<16?"0":"")+e.toString(16)}function AN(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Qn(e,t,r,n)}function P5(e){if(e instanceof Qn)return new Qn(e.h,e.s,e.l,e.opacity);if(e instanceof fh||(e=Vo(e)),!e)return new Qn;if(e instanceof Qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Qn(s,o,l,e.opacity)}function X7(e,t,r,n){return arguments.length===1?P5(e):new Qn(e,t,r,n??1)}function Qn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}H_(Qn,X7,k5(fh,{brighter(e){return e=e==null?Nm:Math.pow(Nm,e),new Qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uf:Math.pow(uf,e),new Qn(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Fr(m0(e>=240?e-240:e+120,i,n),m0(e,i,n),m0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Qn(kN(this.h),Zh(this.s),Zh(this.l),Em(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=Em(this.opacity);return`${e===1?"hsl(":"hsla("}${kN(this.h)}, ${Zh(this.s)*100}%, ${Zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kN(e){return e=(e||0)%360,e<0?e+360:e}function Zh(e){return Math.max(0,Math.min(1,e||0))}function m0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const q_=e=>()=>e;function Z7(e,t){return function(r){return e+r*t}}function Q7(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function J7(e){return(e=+e)==1?T5:function(t,r){return r-t?Q7(t,r,e):q_(isNaN(t)?r:t)}}function T5(e,t){var r=t-e;return r?Z7(e,r):q_(isNaN(e)?t:e)}const Om=function e(t){var r=J7(t);function n(i,a){var s=r((i=kb(i)).r,(a=kb(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),c=T5(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=o(d),i.b=l(d),i.opacity=c(d),i+""}}return n.gamma=e,n}(1);function eU(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function tU(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rU(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=fu(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(o){for(s=0;s<n;++s)a[s]=i[s](o);return a}}function nU(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Zn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function iU(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=fu(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Pb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,g0=new RegExp(Pb.source,"g");function aU(e){return function(){return e}}function sU(e){return function(t){return e(t)+""}}function C5(e,t){var r=Pb.lastIndex=g0.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(n=Pb.exec(e))&&(i=g0.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Zn(n,i)})),r=g0.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?sU(l[0].x):aU(t):(t=l.length,function(c){for(var d=0,f;d<t;++d)o[(f=l[d]).i]=f.x(c);return o.join("")})}function fu(e,t){var r=typeof t,n;return t==null||r==="boolean"?q_(t):(r==="number"?Zn:r==="string"?(n=Vo(t))?(t=n,Om):C5:t instanceof Vo?Om:t instanceof Date?nU:tU(t)?eU:Array.isArray(t)?rU:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?iU:Zn)(e,t)}function K_(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var PN=180/Math.PI,Tb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $5(e,t,r,n,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*PN,skewX:Math.atan(l)*PN,scaleX:s,scaleY:o}}var Qh;function oU(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tb:$5(t.a,t.b,t.c,t.d,t.e,t.f)}function lU(e){return e==null||(Qh||(Qh=document.createElementNS("http://www.w3.org/2000/svg","g")),Qh.setAttribute("transform",e),!(e=Qh.transform.baseVal.consolidate()))?Tb:(e=e.matrix,$5(e.a,e.b,e.c,e.d,e.e,e.f))}function M5(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function a(c,d,f,h,p,g){if(c!==f||d!==h){var m=p.push("translate(",null,t,null,r);g.push({i:m-4,x:Zn(c,f)},{i:m-2,x:Zn(d,h)})}else(f||h)&&p.push("translate("+f+t+h+r)}function s(c,d,f,h){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:Zn(c,d)})):d&&f.push(i(f)+"rotate("+d+n)}function o(c,d,f,h){c!==d?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:Zn(c,d)}):d&&f.push(i(f)+"skewX("+d+n)}function l(c,d,f,h,p,g){if(c!==f||d!==h){var m=p.push(i(p)+"scale(",null,",",null,")");g.push({i:m-4,x:Zn(c,f)},{i:m-2,x:Zn(d,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(c,d){var f=[],h=[];return c=e(c),d=e(d),a(c.translateX,c.translateY,d.translateX,d.translateY,f,h),s(c.rotate,d.rotate,f,h),o(c.skewX,d.skewX,f,h),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,h),c=d=null,function(p){for(var g=-1,m=h.length,v;++g<m;)f[(v=h[g]).i]=v.x(p);return f.join("")}}}var cU=M5(oU,"px, ","px)","deg)"),uU=M5(lU,", ",")",")"),dU=1e-12;function TN(e){return((e=Math.exp(e))+1/e)/2}function fU(e){return((e=Math.exp(e))-1/e)/2}function hU(e){return((e=Math.exp(2*e))-1)/(e+1)}const pU=function e(t,r,n){function i(a,s){var o=a[0],l=a[1],c=a[2],d=s[0],f=s[1],h=s[2],p=d-o,g=f-l,m=p*p+g*g,v,y;if(m<dU)y=Math.log(h/c)/t,v=function(N){return[o+N*p,l+N*g,c*Math.exp(t*N*y)]};else{var x=Math.sqrt(m),b=(h*h-c*c+n*m)/(2*c*r*x),S=(h*h-c*c-n*m)/(2*h*r*x),_=Math.log(Math.sqrt(b*b+1)-b),j=Math.log(Math.sqrt(S*S+1)-S);y=(j-_)/t,v=function(N){var A=N*y,E=TN(_),C=c/(r*x)*(E*hU(t*A+_)-fU(_));return[o+C*p,l+C*g,c*E/TN(t*A+_)]}}return v.duration=y*1e3*t/Math.SQRT2,v}return i.rho=function(a){var s=Math.max(.001,+a),o=s*s,l=o*o;return e(s,o,l)},i}(Math.SQRT2,2,4);function mU(e,t){t===void 0&&(t=e,e=fu);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(s){var o=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[o](s-o)}}var Ec=0,fd=0,Du=0,R5=1e3,Am,hd,km=0,Ho=0,vy=0,ff=typeof performance=="object"&&performance.now?performance:Date,I5=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function G_(){return Ho||(I5(gU),Ho=ff.now()+vy)}function gU(){Ho=0}function Pm(){this._call=this._time=this._next=null}Pm.prototype=D5.prototype={constructor:Pm,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?G_():+r)+(t==null?0:+t),!this._next&&hd!==this&&(hd?hd._next=this:Am=this,hd=this),this._call=e,this._time=r,Cb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cb())}};function D5(e,t,r){var n=new Pm;return n.restart(e,t,r),n}function yU(){G_(),++Ec;for(var e=Am,t;e;)(t=Ho-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ec}function CN(){Ho=(km=ff.now())+vy,Ec=fd=0;try{yU()}finally{Ec=0,xU(),Ho=0}}function vU(){var e=ff.now(),t=e-km;t>R5&&(vy-=t,km=e)}function xU(){for(var e,t=Am,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Am=r);hd=e,Cb(n)}function Cb(e){if(!Ec){fd&&(fd=clearTimeout(fd));var t=e-Ho;t>24?(e<1/0&&(fd=setTimeout(CN,e-ff.now()-vy)),Du&&(Du=clearInterval(Du))):(Du||(km=ff.now(),Du=setInterval(vU,R5)),Ec=1,I5(CN))}}function $N(e,t,r){var n=new Pm;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var bU=gy("start","end","cancel","interrupt"),wU=[],L5=0,MN=1,$b=2,Ip=3,RN=4,Mb=5,Dp=6;function xy(e,t,r,n,i,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;_U(e,r,{name:t,index:n,group:i,on:bU,tween:wU,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:L5})}function Y_(e,t){var r=ui(e,t);if(r.state>L5)throw new Error("too late; already scheduled");return r}function Mi(e,t){var r=ui(e,t);if(r.state>Ip)throw new Error("too late; already running");return r}function ui(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function _U(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=D5(a,0,r.time);function a(c){r.state=MN,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var d,f,h,p;if(r.state!==MN)return l();for(d in n)if(p=n[d],p.name===r.name){if(p.state===Ip)return $N(s);p.state===RN?(p.state=Dp,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[d]):+d<t&&(p.state=Dp,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[d])}if($N(function(){r.state===Ip&&(r.state=RN,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=$b,r.on.call("start",e,e.__data__,r.index,r.group),r.state===$b){for(r.state=Ip,i=new Array(h=r.tween.length),d=0,f=-1;d<h;++d)(p=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++f]=p);i.length=f+1}}function o(c){for(var d=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Mb,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);r.state===Mb&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Dp,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}function Lp(e,t){var r=e.__transition,n,i,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){a=!1;continue}i=n.state>$b&&n.state<Mb,n.state=Dp,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[s]}a&&delete e.__transition}}function SU(e){return this.each(function(){Lp(this,e)})}function jU(e,t){var r,n;return function(){var i=Mi(this,e),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s<o;++s)if(n[s].name===t){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function NU(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=Mi(this,e),s=a.tween;if(s!==n){i=(n=s).slice();for(var o={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}a.tween=i}}function EU(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=ui(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===e)return s.value;return null}return this.each((t==null?jU:NU)(r,e,t))}function X_(e,t,r){var n=e._id;return e.each(function(){var i=Mi(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return ui(i,n).value[t]}}function F5(e,t){var r;return(typeof t=="number"?Zn:t instanceof Vo?Om:(r=Vo(t))?(t=r,Om):C5)(e,t)}function OU(e){return function(){this.removeAttribute(e)}}function AU(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kU(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===n?a:a=t(n=s,r)}}function PU(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===n?a:a=t(n=s,r)}}function TU(e,t,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o)))}}function CU(e,t,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o)))}}function $U(e,t){var r=yy(e),n=r==="transform"?uU:F5;return this.attrTween(e,typeof t=="function"?(r.local?CU:TU)(r,n,X_(this,"attr."+e,t)):t==null?(r.local?AU:OU)(r):(r.local?PU:kU)(r,n,t))}function MU(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function RU(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function IU(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&RU(e,a)),r}return i._value=t,i}function DU(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&MU(e,a)),r}return i._value=t,i}function LU(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=yy(e);return this.tween(r,(n.local?IU:DU)(n,t))}function FU(e,t){return function(){Y_(this,e).delay=+t.apply(this,arguments)}}function BU(e,t){return t=+t,function(){Y_(this,e).delay=t}}function zU(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FU:BU)(t,e)):ui(this.node(),t).delay}function UU(e,t){return function(){Mi(this,e).duration=+t.apply(this,arguments)}}function WU(e,t){return t=+t,function(){Mi(this,e).duration=t}}function VU(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?UU:WU)(t,e)):ui(this.node(),t).duration}function HU(e,t){if(typeof t!="function")throw new Error;return function(){Mi(this,e).ease=t}}function qU(e){var t=this._id;return arguments.length?this.each(HU(t,e)):ui(this.node(),t).ease}function KU(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Mi(this,e).ease=r}}function GU(e){if(typeof e!="function")throw new Error;return this.each(KU(this._id,e))}function YU(e){typeof e!="function"&&(e=y5(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new ha(n,this._parents,this._name,this._id)}function XU(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o<a;++o)for(var l=t[o],c=r[o],d=l.length,f=s[o]=new Array(d),h,p=0;p<d;++p)(h=l[p]||c[p])&&(f[p]=h);for(;o<n;++o)s[o]=t[o];return new ha(s,this._parents,this._name,this._id)}function ZU(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function QU(e,t,r){var n,i,a=ZU(t)?Y_:Mi;return function(){var s=a(this,e),o=s.on;o!==n&&(i=(n=o).copy()).on(t,r),s.on=i}}function JU(e,t){var r=this._id;return arguments.length<2?ui(this.node(),r).on.on(e):this.each(QU(r,e,t))}function eW(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function tW(){return this.on("end.remove",eW(this._id))}function rW(e){var t=this._name,r=this._id;typeof e!="function"&&(e=W_(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o=n[s],l=o.length,c=a[s]=new Array(l),d,f,h=0;h<l;++h)(d=o[h])&&(f=e.call(d,d.__data__,h,o))&&("__data__"in d&&(f.__data__=d.__data__),c[h]=f,xy(c[h],t,r,h,c,ui(d,r)));return new ha(a,this._parents,t,r)}function nW(e){var t=this._name,r=this._id;typeof e!="function"&&(e=g5(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l=n[o],c=l.length,d,f=0;f<c;++f)if(d=l[f]){for(var h=e.call(d,d.__data__,f,l),p,g=ui(d,r),m=0,v=h.length;m<v;++m)(p=h[m])&&xy(p,t,r,m,h,g);a.push(h),s.push(d)}return new ha(a,s,t,r)}var iW=dh.prototype.constructor;function aW(){return new iW(this._groups,this._parents)}function sW(e,t){var r,n,i;return function(){var a=Nc(this,e),s=(this.style.removeProperty(e),Nc(this,e));return a===s?null:a===r&&s===n?i:i=t(r=a,n=s)}}function B5(e){return function(){this.style.removeProperty(e)}}function oW(e,t,r){var n,i=r+"",a;return function(){var s=Nc(this,e);return s===i?null:s===n?a:a=t(n=s,r)}}function lW(e,t,r){var n,i,a;return function(){var s=Nc(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Nc(this,e))),s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o))}}function cW(e,t){var r,n,i,a="style."+t,s="end."+a,o;return function(){var l=Mi(this,e),c=l.on,d=l.value[a]==null?o||(o=B5(t)):void 0;(c!==r||i!==d)&&(n=(r=c).copy()).on(s,i=d),l.on=n}}function uW(e,t,r){var n=(e+="")=="transform"?cU:F5;return t==null?this.styleTween(e,sW(e,n)).on("end.style."+e,B5(e)):typeof t=="function"?this.styleTween(e,lW(e,n,X_(this,"style."+e,t))).each(cW(this._id,e)):this.styleTween(e,oW(e,n,t),r).on("end.style."+e,null)}function dW(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function fW(e,t,r){var n,i;function a(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&dW(e,s,r)),n}return a._value=t,a}function hW(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,fW(e,t,r??""))}function pW(e){return function(){this.textContent=e}}function mW(e){return function(){var t=e(this);this.textContent=t??""}}function gW(e){return this.tween("text",typeof e=="function"?mW(X_(this,"text",e)):pW(e==null?"":e+""))}function yW(e){return function(t){this.textContent=e.call(this,t)}}function vW(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&yW(i)),t}return n._value=e,n}function xW(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,vW(e))}function bW(){for(var e=this._name,t=this._id,r=z5(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var d=ui(l,t);xy(l,e,r,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ha(n,this._parents,e,r)}function wW(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var c=Mi(this,n),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&a()})}var _W=0;function ha(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function z5(){return++_W}var Fi=dh.prototype;ha.prototype={constructor:ha,select:rW,selectAll:nW,selectChild:Fi.selectChild,selectChildren:Fi.selectChildren,filter:YU,merge:XU,selection:aW,transition:bW,call:Fi.call,nodes:Fi.nodes,node:Fi.node,size:Fi.size,empty:Fi.empty,each:Fi.each,on:JU,attr:$U,attrTween:LU,style:uW,styleTween:hW,text:gW,textTween:xW,remove:tW,tween:EU,delay:zU,duration:VU,ease:qU,easeVarying:GU,end:wW,[Symbol.iterator]:Fi[Symbol.iterator]};function SW(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var jW={time:null,delay:0,duration:250,ease:SW};function NW(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function EW(e){var t,r;e instanceof ha?(t=e._id,e=e._name):(t=z5(),(r=jW).time=G_(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&xy(l,e,t,c,s,r||NW(l,t));return new ha(n,this._parents,e,t)}dh.prototype.interrupt=SU;dh.prototype.transition=EW;const Jh=e=>()=>e;function OW(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function Zi(e,t,r){this.k=e,this.x=t,this.y=r}Zi.prototype={constructor:Zi,scale:function(e){return e===1?this:new Zi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Zi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ia=new Zi(1,0,0);Zi.prototype;function y0(e){e.stopImmediatePropagation()}function Lu(e){e.preventDefault(),e.stopImmediatePropagation()}function AW(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function kW(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function IN(){return this.__zoom||ia}function PW(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function TW(){return navigator.maxTouchPoints||"ontouchstart"in this}function CW(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],a=e.invertY(t[0][1])-r[0][1],s=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function U5(){var e=AW,t=kW,r=CW,n=PW,i=TW,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,l=pU,c=gy("start","zoom","end"),d,f,h,p=500,g=150,m=0,v=10;function y(O){O.property("__zoom",IN).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",C).filter(i).on("touchstart.zoom",P).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(O,R,M,F){var D=O.selection?O.selection():O;D.property("__zoom",IN),O!==D?_(O,R,M,F):D.interrupt().each(function(){j(this,arguments).event(F).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},y.scaleBy=function(O,R,M,F){y.scaleTo(O,function(){var D=this.__zoom.k,I=typeof R=="function"?R.apply(this,arguments):R;return D*I},M,F)},y.scaleTo=function(O,R,M,F){y.transform(O,function(){var D=t.apply(this,arguments),I=this.__zoom,L=M==null?S(D):typeof M=="function"?M.apply(this,arguments):M,W=I.invert(L),U=typeof R=="function"?R.apply(this,arguments):R;return r(b(x(I,U),L,W),D,s)},M,F)},y.translateBy=function(O,R,M,F){y.transform(O,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),s)},null,F)},y.translateTo=function(O,R,M,F,D){y.transform(O,function(){var I=t.apply(this,arguments),L=this.__zoom,W=F==null?S(I):typeof F=="function"?F.apply(this,arguments):F;return r(ia.translate(W[0],W[1]).scale(L.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof M=="function"?-M.apply(this,arguments):-M),I,s)},F,D)};function x(O,R){return R=Math.max(a[0],Math.min(a[1],R)),R===O.k?O:new Zi(R,O.x,O.y)}function b(O,R,M){var F=R[0]-M[0]*O.k,D=R[1]-M[1]*O.k;return F===O.x&&D===O.y?O:new Zi(O.k,F,D)}function S(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function _(O,R,M,F){O.on("start.zoom",function(){j(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(F).end()}).tween("zoom",function(){var D=this,I=arguments,L=j(D,I).event(F),W=t.apply(D,I),U=M==null?S(W):typeof M=="function"?M.apply(D,I):M,G=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),X=D.__zoom,ne=typeof R=="function"?R.apply(D,I):R,ue=l(X.invert(U).concat(G/X.k),ne.invert(U).concat(G/ne.k));return function(we){if(we===1)we=ne;else{var je=ue(we),Z=G/je[2];we=new Zi(Z,U[0]-je[0]*Z,U[1]-je[1]*Z)}L.zoom(null,we)}})}function j(O,R,M){return!M&&O.__zooming||new N(O,R)}function N(O,R){this.that=O,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(O,R),this.taps=0}N.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,R){return this.mouse&&O!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var R=_n(this.that).datum();c.call(O,this.that,new OW(O,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:c}),R)}};function A(O,...R){if(!e.apply(this,arguments))return;var M=j(this,R).event(O),F=this.__zoom,D=Math.max(a[0],Math.min(a[1],F.k*Math.pow(2,n.apply(this,arguments)))),I=Hn(O);if(M.wheel)(M.mouse[0][0]!==I[0]||M.mouse[0][1]!==I[1])&&(M.mouse[1]=F.invert(M.mouse[0]=I)),clearTimeout(M.wheel);else{if(F.k===D)return;M.mouse=[I,F.invert(I)],Lp(this),M.start()}Lu(O),M.wheel=setTimeout(L,g),M.zoom("mouse",r(b(x(F,D),M.mouse[0],M.mouse[1]),M.extent,s));function L(){M.wheel=null,M.end()}}function E(O,...R){if(h||!e.apply(this,arguments))return;var M=O.currentTarget,F=j(this,R,!0).event(O),D=_n(O.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",G,!0),I=Hn(O,M),L=O.clientX,W=O.clientY;O5(O.view),y0(O),F.mouse=[I,this.__zoom.invert(I)],Lp(this),F.start();function U(X){if(Lu(X),!F.moved){var ne=X.clientX-L,ue=X.clientY-W;F.moved=ne*ne+ue*ue>m}F.event(X).zoom("mouse",r(b(F.that.__zoom,F.mouse[0]=Hn(X,M),F.mouse[1]),F.extent,s))}function G(X){D.on("mousemove.zoom mouseup.zoom",null),A5(X.view,F.moved),Lu(X),F.event(X).end()}}function C(O,...R){if(e.apply(this,arguments)){var M=this.__zoom,F=Hn(O.changedTouches?O.changedTouches[0]:O,this),D=M.invert(F),I=M.k*(O.shiftKey?.5:2),L=r(b(x(M,I),F,D),t.apply(this,R),s);Lu(O),o>0?_n(this).transition().duration(o).call(_,L,F,O):_n(this).call(y.transform,L,F,O)}}function P(O,...R){if(e.apply(this,arguments)){var M=O.touches,F=M.length,D=j(this,R,O.changedTouches.length===F).event(O),I,L,W,U;for(y0(O),L=0;L<F;++L)W=M[L],U=Hn(W,this),U=[U,this.__zoom.invert(U),W.identifier],D.touch0?!D.touch1&&D.touch0[2]!==U[2]&&(D.touch1=U,D.taps=0):(D.touch0=U,I=!0,D.taps=1+!!d);d&&(d=clearTimeout(d)),I&&(D.taps<2&&(f=U[0],d=setTimeout(function(){d=null},p)),Lp(this),D.start())}}function T(O,...R){if(this.__zooming){var M=j(this,R).event(O),F=O.changedTouches,D=F.length,I,L,W,U;for(Lu(O),I=0;I<D;++I)L=F[I],W=Hn(L,this),M.touch0&&M.touch0[2]===L.identifier?M.touch0[0]=W:M.touch1&&M.touch1[2]===L.identifier&&(M.touch1[0]=W);if(L=M.that.__zoom,M.touch1){var G=M.touch0[0],X=M.touch0[1],ne=M.touch1[0],ue=M.touch1[1],we=(we=ne[0]-G[0])*we+(we=ne[1]-G[1])*we,je=(je=ue[0]-X[0])*je+(je=ue[1]-X[1])*je;L=x(L,Math.sqrt(we/je)),W=[(G[0]+ne[0])/2,(G[1]+ne[1])/2],U=[(X[0]+ue[0])/2,(X[1]+ue[1])/2]}else if(M.touch0)W=M.touch0[0],U=M.touch0[1];else return;M.zoom("touch",r(b(L,W,U),M.extent,s))}}function $(O,...R){if(this.__zooming){var M=j(this,R).event(O),F=O.changedTouches,D=F.length,I,L;for(y0(O),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),I=0;I<D;++I)L=F[I],M.touch0&&M.touch0[2]===L.identifier?delete M.touch0:M.touch1&&M.touch1[2]===L.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(L=Hn(L,this),Math.hypot(f[0]-L[0],f[1]-L[1])<v)){var W=_n(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return y.wheelDelta=function(O){return arguments.length?(n=typeof O=="function"?O:Jh(+O),y):n},y.filter=function(O){return arguments.length?(e=typeof O=="function"?O:Jh(!!O),y):e},y.touchable=function(O){return arguments.length?(i=typeof O=="function"?O:Jh(!!O),y):i},y.extent=function(O){return arguments.length?(t=typeof O=="function"?O:Jh([[+O[0][0],+O[0][1]],[+O[1][0],+O[1][1]]]),y):t},y.scaleExtent=function(O){return arguments.length?(a[0]=+O[0],a[1]=+O[1],y):[a[0],a[1]]},y.translateExtent=function(O){return arguments.length?(s[0][0]=+O[0][0],s[1][0]=+O[1][0],s[0][1]=+O[0][1],s[1][1]=+O[1][1],y):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},y.constrain=function(O){return arguments.length?(r=O,y):r},y.duration=function(O){return arguments.length?(o=+O,y):o},y.interpolate=function(O){return arguments.length?(l=O,y):l},y.on=function(){var O=c.on.apply(c,arguments);return O===c?y:O},y.clickDistance=function(O){return arguments.length?(m=(O=+O)*O,y):Math.sqrt(m)},y.tapDistance=function(O){return arguments.length?(v=+O,y):v},y}const by=w.createContext(null),$W=by.Provider,pa={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},W5=pa.error001();function ut(e,t){const r=w.useContext(by);if(r===null)throw new Error(W5);return p5(r,e,t)}const Yt=()=>{const e=w.useContext(by);if(e===null)throw new Error(W5);return w.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},MW=e=>e.userSelectionActive?"none":"all";function wy({position:e,children:t,className:r,style:n,...i}){const a=ut(MW),s=`${e}`.split("-");return k.createElement("div",{className:dr(["react-flow__panel",r,...s]),style:{...n,pointerEvents:a},...i},t)}function RW({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:k.createElement(wy,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},k.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const IW=({x:e,y:t,label:r,labelStyle:n={},labelShowBg:i=!0,labelBgStyle:a={},labelBgPadding:s=[2,4],labelBgBorderRadius:o=2,children:l,className:c,...d})=>{const f=w.useRef(null),[h,p]=w.useState({x:0,y:0,width:0,height:0}),g=dr(["react-flow__edge-textwrapper",c]);return w.useEffect(()=>{if(f.current){const m=f.current.getBBox();p({x:m.x,y:m.y,width:m.width,height:m.height})}},[r]),typeof r>"u"||!r?null:k.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...d},i&&k.createElement("rect",{width:h.width+2*s[0],x:-s[0],y:-s[1],height:h.height+2*s[1],className:"react-flow__edge-textbg",style:a,rx:o,ry:o}),k.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:f,style:n},r),l)};var DW=w.memo(IW);const Z_=e=>({width:e.offsetWidth,height:e.offsetHeight}),Oc=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Q_=(e={x:0,y:0},t)=>({x:Oc(e.x,t[0][0],t[1][0]),y:Oc(e.y,t[0][1],t[1][1])}),DN=(e,t,r)=>e<t?Oc(Math.abs(e-t),1,50)/50:e>r?-Oc(Math.abs(e-r),1,50)/50:0,V5=(e,t)=>{const r=DN(e.x,35,t.width-35)*20,n=DN(e.y,35,t.height-35)*20;return[r,n]},H5=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},q5=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),hf=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),K5=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),LN=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),LW=(e,t)=>K5(q5(hf(e),hf(t))),Rb=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),n=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*n)},FW=e=>Nn(e.width)&&Nn(e.height)&&Nn(e.x)&&Nn(e.y),Nn=e=>!isNaN(e)&&isFinite(e),Ot=Symbol.for("internals"),G5=["Enter"," ","Escape"],BW=(e,t)=>{},zW=e=>"nativeEvent"in e;function Ib(e){var i,a;const t=zW(e)?e.nativeEvent:e,r=((a=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:a[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))||!!(r!=null&&r.closest(".nokey"))}const Y5=e=>"clientX"in e,ws=(e,t)=>{var a,s;const r=Y5(e),n=r?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,i=r?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:n-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},Tm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},hh=({id:e,path:t,labelX:r,labelY:n,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:f,markerStart:h,interactionWidth:p=20})=>k.createElement(k.Fragment,null,k.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:h}),p&&k.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),i&&Nn(r)&&Nn(n)?k.createElement(DW,{x:r,y:n,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null);hh.displayName="BaseEdge";function Fu(e,t,r){return r===void 0?r:n=>{const i=t().edges.find(a=>a.id===e);i&&r(n,{...i})}}function X5({sourceX:e,sourceY:t,targetX:r,targetY:n}){const i=Math.abs(r-e)/2,a=r<e?r+i:r-i,s=Math.abs(n-t)/2,o=n<t?n+s:n-s;return[a,o,i,s]}function Z5({sourceX:e,sourceY:t,targetX:r,targetY:n,sourceControlX:i,sourceControlY:a,targetControlX:s,targetControlY:o}){const l=e*.125+i*.375+s*.375+r*.125,c=t*.125+a*.375+o*.375+n*.125,d=Math.abs(l-e),f=Math.abs(c-t);return[l,c,d,f]}var qo;(function(e){e.Strict="strict",e.Loose="loose"})(qo||(qo={}));var co;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(co||(co={}));var pf;(function(e){e.Partial="partial",e.Full="full"})(pf||(pf={}));var Va;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Va||(Va={}));var Cm;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Cm||(Cm={}));var ve;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ve||(ve={}));function FN({pos:e,x1:t,y1:r,x2:n,y2:i}){return e===ve.Left||e===ve.Right?[.5*(t+n),r]:[t,.5*(r+i)]}function Q5({sourceX:e,sourceY:t,sourcePosition:r=ve.Bottom,targetX:n,targetY:i,targetPosition:a=ve.Top}){const[s,o]=FN({pos:r,x1:e,y1:t,x2:n,y2:i}),[l,c]=FN({pos:a,x1:n,y1:i,x2:e,y2:t}),[d,f,h,p]=Z5({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:s,sourceControlY:o,targetControlX:l,targetControlY:c});return[`M${e},${t} C${s},${o} ${l},${c} ${n},${i}`,d,f,h,p]}const J_=w.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:i=ve.Bottom,targetPosition:a=ve.Top,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:m})=>{const[v,y,x]=Q5({sourceX:e,sourceY:t,sourcePosition:i,targetX:r,targetY:n,targetPosition:a});return k.createElement(hh,{path:v,labelX:y,labelY:x,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:m})});J_.displayName="SimpleBezierEdge";const BN={[ve.Left]:{x:-1,y:0},[ve.Right]:{x:1,y:0},[ve.Top]:{x:0,y:-1},[ve.Bottom]:{x:0,y:1}},UW=({source:e,sourcePosition:t=ve.Bottom,target:r})=>t===ve.Left||t===ve.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},zN=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function WW({source:e,sourcePosition:t=ve.Bottom,target:r,targetPosition:n=ve.Top,center:i,offset:a}){const s=BN[t],o=BN[n],l={x:e.x+s.x*a,y:e.y+s.y*a},c={x:r.x+o.x*a,y:r.y+o.y*a},d=UW({source:l,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f];let p=[],g,m;const v={x:0,y:0},y={x:0,y:0},[x,b,S,_]=X5({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(s[f]*o[f]===-1){g=i.x??x,m=i.y??b;const N=[{x:g,y:l.y},{x:g,y:c.y}],A=[{x:l.x,y:m},{x:c.x,y:m}];s[f]===h?p=f==="x"?N:A:p=f==="x"?A:N}else{const N=[{x:l.x,y:c.y}],A=[{x:c.x,y:l.y}];if(f==="x"?p=s.x===h?A:N:p=s.y===h?N:A,t===n){const $=Math.abs(e[f]-r[f]);if($<=a){const O=Math.min(a-1,a-$);s[f]===h?v[f]=(l[f]>e[f]?-1:1)*O:y[f]=(c[f]>r[f]?-1:1)*O}}if(t!==n){const $=f==="x"?"y":"x",O=s[f]===o[$],R=l[$]>c[$],M=l[$]<c[$];(s[f]===1&&(!O&&R||O&&M)||s[f]!==1&&(!O&&M||O&&R))&&(p=f==="x"?N:A)}const E={x:l.x+v.x,y:l.y+v.y},C={x:c.x+y.x,y:c.y+y.y},P=Math.max(Math.abs(E.x-p[0].x),Math.abs(C.x-p[0].x)),T=Math.max(Math.abs(E.y-p[0].y),Math.abs(C.y-p[0].y));P>=T?(g=(E.x+C.x)/2,m=p[0].y):(g=p[0].x,m=(E.y+C.y)/2)}return[[e,{x:l.x+v.x,y:l.y+v.y},...p,{x:c.x+y.x,y:c.y+y.y},r],g,m,S,_]}function VW(e,t,r,n){const i=Math.min(zN(e,t)/2,zN(t,r)/2,n),{x:a,y:s}=t;if(e.x===a&&a===r.x||e.y===s&&s===r.y)return`L${a} ${s}`;if(e.y===s){const c=e.x<r.x?-1:1,d=e.y<r.y?1:-1;return`L ${a+i*c},${s}Q ${a},${s} ${a},${s+i*d}`}const o=e.x<r.x?1:-1,l=e.y<r.y?-1:1;return`L ${a},${s+i*l}Q ${a},${s} ${a+i*o},${s}`}function Db({sourceX:e,sourceY:t,sourcePosition:r=ve.Bottom,targetX:n,targetY:i,targetPosition:a=ve.Top,borderRadius:s=5,centerX:o,centerY:l,offset:c=20}){const[d,f,h,p,g]=WW({source:{x:e,y:t},sourcePosition:r,target:{x:n,y:i},targetPosition:a,center:{x:o,y:l},offset:c});return[d.reduce((v,y,x)=>{let b="";return x>0&&x<d.length-1?b=VW(d[x-1],y,d[x+1],s):b=`${x===0?"M":"L"}${y.x} ${y.y}`,v+=b,v},""),f,h,p,g]}const _y=w.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:d,sourcePosition:f=ve.Bottom,targetPosition:h=ve.Top,markerEnd:p,markerStart:g,pathOptions:m,interactionWidth:v})=>{const[y,x,b]=Db({sourceX:e,sourceY:t,sourcePosition:f,targetX:r,targetY:n,targetPosition:h,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset});return k.createElement(hh,{path:y,labelX:x,labelY:b,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:p,markerStart:g,interactionWidth:v})});_y.displayName="SmoothStepEdge";const eS=w.memo(e=>{var t;return k.createElement(_y,{...e,pathOptions:w.useMemo(()=>{var r;return{borderRadius:0,offset:(r=e.pathOptions)==null?void 0:r.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});eS.displayName="StepEdge";function HW({sourceX:e,sourceY:t,targetX:r,targetY:n}){const[i,a,s,o]=X5({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,i,a,s,o]}const tS=w.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:f,markerStart:h,interactionWidth:p})=>{const[g,m,v]=HW({sourceX:e,sourceY:t,targetX:r,targetY:n});return k.createElement(hh,{path:g,labelX:m,labelY:v,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:f,markerStart:h,interactionWidth:p})});tS.displayName="StraightEdge";function ep(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function UN({pos:e,x1:t,y1:r,x2:n,y2:i,c:a}){switch(e){case ve.Left:return[t-ep(t-n,a),r];case ve.Right:return[t+ep(n-t,a),r];case ve.Top:return[t,r-ep(r-i,a)];case ve.Bottom:return[t,r+ep(i-r,a)]}}function J5({sourceX:e,sourceY:t,sourcePosition:r=ve.Bottom,targetX:n,targetY:i,targetPosition:a=ve.Top,curvature:s=.25}){const[o,l]=UN({pos:r,x1:e,y1:t,x2:n,y2:i,c:s}),[c,d]=UN({pos:a,x1:n,y1:i,x2:e,y2:t,c:s}),[f,h,p,g]=Z5({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${o},${l} ${c},${d} ${n},${i}`,f,h,p,g]}const $m=w.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:i=ve.Bottom,targetPosition:a=ve.Top,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,pathOptions:m,interactionWidth:v})=>{const[y,x,b]=J5({sourceX:e,sourceY:t,sourcePosition:i,targetX:r,targetY:n,targetPosition:a,curvature:m==null?void 0:m.curvature});return k.createElement(hh,{path:y,labelX:x,labelY:b,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:v})});$m.displayName="BezierEdge";const rS=w.createContext(null),qW=rS.Provider;rS.Consumer;const KW=()=>w.useContext(rS),GW=e=>"id"in e&&"source"in e&&"target"in e,YW=({source:e,sourceHandle:t,target:r,targetHandle:n})=>`reactflow__edge-${e}${t||""}-${r}${n||""}`,Lb=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`,XW=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),e3=(e,t)=>{if(!e.source||!e.target)return t;let r;return GW(e)?r={...e}:r={...e,id:YW(e)},XW(r,t)?t:t.concat(r)},Fb=({x:e,y:t},[r,n,i],a,[s,o])=>{const l={x:(e-r)/i,y:(t-n)/i};return a?{x:s*Math.round(l.x/s),y:o*Math.round(l.y/o)}:l},t3=({x:e,y:t},[r,n,i])=>({x:e*i+r,y:t*i+n}),Po=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const r=(e.width??0)*t[0],n=(e.height??0)*t[1],i={x:e.position.x-r,y:e.position.y-n};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-r,y:e.positionAbsolute.y-n}:i}},Sy=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((n,i)=>{const{x:a,y:s}=Po(i,t).positionAbsolute;return q5(n,hf({x:a,y:s,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return K5(r)},r3=(e,t,[r,n,i]=[0,0,1],a=!1,s=!1,o=[0,0])=>{const l={x:(t.x-r)/i,y:(t.y-n)/i,width:t.width/i,height:t.height/i},c=[];return e.forEach(d=>{const{width:f,height:h,selectable:p=!0,hidden:g=!1}=d;if(s&&!p||g)return!1;const{positionAbsolute:m}=Po(d,o),v={x:m.x,y:m.y,width:f||0,height:h||0},y=Rb(l,v),x=typeof f>"u"||typeof h>"u"||f===null||h===null,b=a&&y>0,S=(f||0)*(h||0);(x||b||y>=S||d.dragging)&&c.push(d)}),c},n3=(e,t)=>{const r=e.map(n=>n.id);return t.filter(n=>r.includes(n.source)||r.includes(n.target))},i3=(e,t,r,n,i,a=.1)=>{const s=t/(e.width*(1+a)),o=r/(e.height*(1+a)),l=Math.min(s,o),c=Oc(l,n,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,p=r/2-f*c;return{x:h,y:p,zoom:c}},Xs=(e,t=0)=>e.transition().duration(t);function WN(e,t,r,n){return(t[r]||[]).reduce((i,a)=>{var s,o;return`${e.id}-${a.id}-${r}`!==n&&i.push({id:a.id||null,type:r,nodeId:e.id,x:(((s=e.positionAbsolute)==null?void 0:s.x)??0)+a.x+a.width/2,y:(((o=e.positionAbsolute)==null?void 0:o.y)??0)+a.y+a.height/2}),i},[])}function ZW(e,t,r,n,i,a){const{x:s,y:o}=ws(e),c=t.elementsFromPoint(s,o).find(g=>g.classList.contains("react-flow__handle"));if(c){const g=c.getAttribute("data-nodeid");if(g){const m=nS(void 0,c),v=c.getAttribute("data-handleid"),y=a({nodeId:g,id:v,type:m});if(y){const x=i.find(b=>b.nodeId===g&&b.type===m&&b.id===v);return{handle:{id:v,type:m,nodeId:g,x:(x==null?void 0:x.x)||r.x,y:(x==null?void 0:x.y)||r.y},validHandleResult:y}}}}let d=[],f=1/0;if(i.forEach(g=>{const m=Math.sqrt((g.x-r.x)**2+(g.y-r.y)**2);if(m<=n){const v=a(g);m<=f&&(m<f?d=[{handle:g,validHandleResult:v}]:m===f&&d.push({handle:g,validHandleResult:v}),f=m)}}),!d.length)return{handle:null,validHandleResult:a3()};if(d.length===1)return d[0];const h=d.some(({validHandleResult:g})=>g.isValid),p=d.some(({handle:g})=>g.type==="target");return d.find(({handle:g,validHandleResult:m})=>p?g.type==="target":h?m.isValid:!0)||d[0]}const QW={source:null,target:null,sourceHandle:null,targetHandle:null},a3=()=>({handleDomNode:null,isValid:!1,connection:QW,endHandle:null});function s3(e,t,r,n,i,a,s){const o=i==="target",l=s.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),c={...a3(),handleDomNode:l};if(l){const d=nS(void 0,l),f=l.getAttribute("data-nodeid"),h=l.getAttribute("data-handleid"),p=l.classList.contains("connectable"),g=l.classList.contains("connectableend"),m={source:o?f:r,sourceHandle:o?h:n,target:o?r:f,targetHandle:o?n:h};c.connection=m,p&&g&&(t===qo.Strict?o&&d==="source"||!o&&d==="target":f!==r||h!==n)&&(c.endHandle={nodeId:f,handleId:h,type:d},c.isValid=a(m))}return c}function JW({nodes:e,nodeId:t,handleId:r,handleType:n}){return e.reduce((i,a)=>{if(a[Ot]){const{handleBounds:s}=a[Ot];let o=[],l=[];s&&(o=WN(a,s,"source",`${t}-${r}-${n}`),l=WN(a,s,"target",`${t}-${r}-${n}`)),i.push(...o,...l)}return i},[])}function nS(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function v0(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function eV(e,t){let r=null;return t?r="valid":e&&!t&&(r="invalid"),r}function o3({event:e,handleId:t,nodeId:r,onConnect:n,isTarget:i,getState:a,setState:s,isValidConnection:o,edgeUpdaterType:l,onReconnectEnd:c}){const d=H5(e.target),{connectionMode:f,domNode:h,autoPanOnConnect:p,connectionRadius:g,onConnectStart:m,panBy:v,getNodes:y,cancelConnection:x}=a();let b=0,S;const{x:_,y:j}=ws(e),N=d==null?void 0:d.elementFromPoint(_,j),A=nS(l,N),E=h==null?void 0:h.getBoundingClientRect();if(!E||!A)return;let C,P=ws(e,E),T=!1,$=null,O=!1,R=null;const M=JW({nodes:y(),nodeId:r,handleId:t,handleType:A}),F=()=>{if(!p)return;const[L,W]=V5(P,E);v({x:L,y:W}),b=requestAnimationFrame(F)};s({connectionPosition:P,connectionStatus:null,connectionNodeId:r,connectionHandleId:t,connectionHandleType:A,connectionStartHandle:{nodeId:r,handleId:t,type:A},connectionEndHandle:null}),m==null||m(e,{nodeId:r,handleId:t,handleType:A});function D(L){const{transform:W}=a();P=ws(L,E);const{handle:U,validHandleResult:G}=ZW(L,d,Fb(P,W,!1,[1,1]),g,M,X=>s3(X,f,r,t,i?"target":"source",o,d));if(S=U,T||(F(),T=!0),R=G.handleDomNode,$=G.connection,O=G.isValid,s({connectionPosition:S&&O?t3({x:S.x,y:S.y},W):P,connectionStatus:eV(!!S,O),connectionEndHandle:G.endHandle}),!S&&!O&&!R)return v0(C);$.source!==$.target&&R&&(v0(C),C=R,R.classList.add("connecting","react-flow__handle-connecting"),R.classList.toggle("valid",O),R.classList.toggle("react-flow__handle-valid",O))}function I(L){var W,U;(S||R)&&$&&O&&(n==null||n($)),(U=(W=a()).onConnectEnd)==null||U.call(W,L),l&&(c==null||c(L)),v0(C),x(),cancelAnimationFrame(b),T=!1,O=!1,$=null,R=null,d.removeEventListener("mousemove",D),d.removeEventListener("mouseup",I),d.removeEventListener("touchmove",D),d.removeEventListener("touchend",I)}d.addEventListener("mousemove",D),d.addEventListener("mouseup",I),d.addEventListener("touchmove",D),d.addEventListener("touchend",I)}const VN=()=>!0,tV=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),rV=(e,t,r)=>n=>{const{connectionStartHandle:i,connectionEndHandle:a,connectionClickStartHandle:s}=n;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===r||(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===r,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===r}},l3=w.forwardRef(({type:e="source",position:t=ve.Top,isValidConnection:r,isConnectable:n=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:s,onConnect:o,children:l,className:c,onMouseDown:d,onTouchStart:f,...h},p)=>{var E,C;const g=s||null,m=e==="target",v=Yt(),y=KW(),{connectOnClick:x,noPanClassName:b}=ut(tV,nr),{connecting:S,clickConnecting:_}=ut(rV(y,g,e),nr);y||(C=(E=v.getState()).onError)==null||C.call(E,"010",pa.error010());const j=P=>{const{defaultEdgeOptions:T,onConnect:$,hasDefaultEdges:O}=v.getState(),R={...T,...P};if(O){const{edges:M,setEdges:F}=v.getState();F(e3(R,M))}$==null||$(R),o==null||o(R)},N=P=>{if(!y)return;const T=Y5(P);i&&(T&&P.button===0||!T)&&o3({event:P,handleId:g,nodeId:y,onConnect:j,isTarget:m,getState:v.getState,setState:v.setState,isValidConnection:r||v.getState().isValidConnection||VN}),T?d==null||d(P):f==null||f(P)},A=P=>{const{onClickConnectStart:T,onClickConnectEnd:$,connectionClickStartHandle:O,connectionMode:R,isValidConnection:M}=v.getState();if(!y||!O&&!i)return;if(!O){T==null||T(P,{nodeId:y,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,handleId:g}});return}const F=H5(P.target),D=r||M||VN,{connection:I,isValid:L}=s3({nodeId:y,id:g,type:e},R,O.nodeId,O.handleId||null,O.type,D,F);L&&j(I),$==null||$(P),v.setState({connectionClickStartHandle:null})};return k.createElement("div",{"data-handleid":g,"data-nodeid":y,"data-handlepos":t,"data-id":`${y}-${g}-${e}`,className:dr(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",b,c,{source:!m,target:m,connectable:n,connectablestart:i,connectableend:a,connecting:_,connectionindicator:n&&(i&&!S||a&&S)}]),onMouseDown:N,onTouchStart:N,onClick:x?A:void 0,ref:p,...h},l)});l3.displayName="Handle";var Mm=w.memo(l3);const c3=({data:e,isConnectable:t,targetPosition:r=ve.Top,sourcePosition:n=ve.Bottom})=>k.createElement(k.Fragment,null,k.createElement(Mm,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,k.createElement(Mm,{type:"source",position:n,isConnectable:t}));c3.displayName="DefaultNode";var Bb=w.memo(c3);const u3=({data:e,isConnectable:t,sourcePosition:r=ve.Bottom})=>k.createElement(k.Fragment,null,e==null?void 0:e.label,k.createElement(Mm,{type:"source",position:r,isConnectable:t}));u3.displayName="InputNode";var d3=w.memo(u3);const f3=({data:e,isConnectable:t,targetPosition:r=ve.Top})=>k.createElement(k.Fragment,null,k.createElement(Mm,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label);f3.displayName="OutputNode";var h3=w.memo(f3);const iS=()=>null;iS.displayName="GroupNode";const nV=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),tp=e=>e.id;function iV(e,t){return nr(e.selectedNodes.map(tp),t.selectedNodes.map(tp))&&nr(e.selectedEdges.map(tp),t.selectedEdges.map(tp))}const p3=w.memo(({onSelectionChange:e})=>{const t=Yt(),{selectedNodes:r,selectedEdges:n}=ut(nV,iV);return w.useEffect(()=>{const i={nodes:r,edges:n};e==null||e(i),t.getState().onSelectionChange.forEach(a=>a(i))},[r,n,e]),null});p3.displayName="SelectionListener";const aV=e=>!!e.onSelectionChange;function sV({onSelectionChange:e}){const t=ut(aV);return e||t?k.createElement(p3,{onSelectionChange:e}):null}const oV=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function ml(e,t){w.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Re(e,t,r){w.useEffect(()=>{typeof t<"u"&&r({[e]:t})},[t])}const lV=({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:i,onConnectStart:a,onConnectEnd:s,onClickConnectStart:o,onClickConnectEnd:l,nodesDraggable:c,nodesConnectable:d,nodesFocusable:f,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:g,minZoom:m,maxZoom:v,nodeExtent:y,onNodesChange:x,onEdgesChange:b,elementsSelectable:S,connectionMode:_,snapGrid:j,snapToGrid:N,translateExtent:A,connectOnClick:E,defaultEdgeOptions:C,fitView:P,fitViewOptions:T,onNodesDelete:$,onEdgesDelete:O,onNodeDrag:R,onNodeDragStart:M,onNodeDragStop:F,onSelectionDrag:D,onSelectionDragStart:I,onSelectionDragStop:L,noPanClassName:W,nodeOrigin:U,rfId:G,autoPanOnConnect:X,autoPanOnNodeDrag:ne,onError:ue,connectionRadius:we,isValidConnection:je,nodeDragThreshold:Z})=>{const{setNodes:ae,setEdges:ge,setDefaultNodesAndEdges:Y,setMinZoom:$e,setMaxZoom:xe,setTranslateExtent:Ae,setNodeExtent:Be,reset:Oe}=ut(oV,nr),de=Yt();return w.useEffect(()=>{const dt=n==null?void 0:n.map(B=>({...B,...C}));return Y(r,dt),()=>{Oe()}},[]),Re("defaultEdgeOptions",C,de.setState),Re("connectionMode",_,de.setState),Re("onConnect",i,de.setState),Re("onConnectStart",a,de.setState),Re("onConnectEnd",s,de.setState),Re("onClickConnectStart",o,de.setState),Re("onClickConnectEnd",l,de.setState),Re("nodesDraggable",c,de.setState),Re("nodesConnectable",d,de.setState),Re("nodesFocusable",f,de.setState),Re("edgesFocusable",h,de.setState),Re("edgesUpdatable",p,de.setState),Re("elementsSelectable",S,de.setState),Re("elevateNodesOnSelect",g,de.setState),Re("snapToGrid",N,de.setState),Re("snapGrid",j,de.setState),Re("onNodesChange",x,de.setState),Re("onEdgesChange",b,de.setState),Re("connectOnClick",E,de.setState),Re("fitViewOnInit",P,de.setState),Re("fitViewOnInitOptions",T,de.setState),Re("onNodesDelete",$,de.setState),Re("onEdgesDelete",O,de.setState),Re("onNodeDrag",R,de.setState),Re("onNodeDragStart",M,de.setState),Re("onNodeDragStop",F,de.setState),Re("onSelectionDrag",D,de.setState),Re("onSelectionDragStart",I,de.setState),Re("onSelectionDragStop",L,de.setState),Re("noPanClassName",W,de.setState),Re("nodeOrigin",U,de.setState),Re("rfId",G,de.setState),Re("autoPanOnConnect",X,de.setState),Re("autoPanOnNodeDrag",ne,de.setState),Re("onError",ue,de.setState),Re("connectionRadius",we,de.setState),Re("isValidConnection",je,de.setState),Re("nodeDragThreshold",Z,de.setState),ml(e,ae),ml(t,ge),ml(m,$e),ml(v,xe),ml(A,Ae),ml(y,Be),null},HN={display:"none"},cV={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},m3="react-flow__node-desc",g3="react-flow__edge-desc",uV="react-flow__aria-live",dV=e=>e.ariaLiveMessage;function fV({rfId:e}){const t=ut(dV);return k.createElement("div",{id:`${uV}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:cV},t)}function hV({rfId:e,disableKeyboardA11y:t}){return k.createElement(k.Fragment,null,k.createElement("div",{id:`${m3}-${e}`,style:HN},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),k.createElement("div",{id:`${g3}-${e}`,style:HN},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&k.createElement(fV,{rfId:e}))}var mf=(e=null,t={actInsideInputWithModifier:!0})=>{const[r,n]=w.useState(!1),i=w.useRef(!1),a=w.useRef(new Set([])),[s,o]=w.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),d=c.reduce((f,h)=>f.concat(...h),[]);return[c,d]}return[[],[]]},[e]);return w.useEffect(()=>{const l=typeof document<"u"?document:null,c=(t==null?void 0:t.target)||l;if(e!==null){const d=p=>{if(i.current=p.ctrlKey||p.metaKey||p.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&Ib(p))return!1;const m=KN(p.code,o);a.current.add(p[m]),qN(s,a.current,!1)&&(p.preventDefault(),n(!0))},f=p=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Ib(p))return!1;const m=KN(p.code,o);qN(s,a.current,!0)?(n(!1),a.current.clear()):a.current.delete(p[m]),p.key==="Meta"&&a.current.clear(),i.current=!1},h=()=>{a.current.clear(),n(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",h),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",h)}}},[e,n]),r};function qN(e,t,r){return e.filter(n=>r||n.length===t.size).some(n=>n.every(i=>t.has(i)))}function KN(e,t){return t.includes(e)?"code":"key"}function y3(e,t,r,n){var o,l;const i=e.parentNode||e.parentId;if(!i)return r;const a=t.get(i),s=Po(a,n);return y3(a,t,{x:(r.x??0)+s.x,y:(r.y??0)+s.y,z:(((o=a[Ot])==null?void 0:o.z)??0)>(r.z??0)?((l=a[Ot])==null?void 0:l.z)??0:r.z??0},n)}function v3(e,t,r){e.forEach(n=>{var a;const i=n.parentNode||n.parentId;if(i&&!e.has(i))throw new Error(`Parent node ${i} not found`);if(i||r!=null&&r[n.id]){const{x:s,y:o,z:l}=y3(n,e,{...n.position,z:((a=n[Ot])==null?void 0:a.z)??0},t);n.positionAbsolute={x:s,y:o},n[Ot].z=l,r!=null&&r[n.id]&&(n[Ot].isParent=!0)}})}function x0(e,t,r,n){const i=new Map,a={},s=n?1e3:0;return e.forEach(o=>{var p;const l=(Nn(o.zIndex)?o.zIndex:0)+(o.selected?s:0),c=t.get(o.id),d={...o,positionAbsolute:{x:o.position.x,y:o.position.y}},f=o.parentNode||o.parentId;f&&(a[f]=!0);const h=(c==null?void 0:c.type)&&(c==null?void 0:c.type)!==o.type;Object.defineProperty(d,Ot,{enumerable:!1,value:{handleBounds:h||(p=c==null?void 0:c[Ot])==null?void 0:p.handleBounds,z:l}}),i.set(o.id,d)}),v3(i,r,a),i}function x3(e,t={}){const{getNodes:r,width:n,height:i,minZoom:a,maxZoom:s,d3Zoom:o,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:d,nodeOrigin:f}=e(),h=t.initial&&!c&&d;if(o&&l&&(h||!t.initial)){const g=r().filter(v=>{var x;const y=t.includeHiddenNodes?v.width&&v.height:!v.hidden;return(x=t.nodes)!=null&&x.length?y&&t.nodes.some(b=>b.id===v.id):y}),m=g.every(v=>v.width&&v.height);if(g.length>0&&m){const v=Sy(g,f),{x:y,y:x,zoom:b}=i3(v,n,i,t.minZoom??a,t.maxZoom??s,t.padding??.1),S=ia.translate(y,x).scale(b);return typeof t.duration=="number"&&t.duration>0?o.transform(Xs(l,t.duration),S):o.transform(l,S),!0}}return!1}function pV(e,t){return e.forEach(r=>{const n=t.get(r.id);n&&t.set(n.id,{...n,[Ot]:n[Ot],selected:r.selected})}),new Map(t)}function mV(e,t){return t.map(r=>{const n=e.find(i=>i.id===r.id);return n&&(r.selected=n.selected),r})}function rp({changedNodes:e,changedEdges:t,get:r,set:n}){const{nodeInternals:i,edges:a,onNodesChange:s,onEdgesChange:o,hasDefaultNodes:l,hasDefaultEdges:c}=r();e!=null&&e.length&&(l&&n({nodeInternals:pV(e,i)}),s==null||s(e)),t!=null&&t.length&&(c&&n({edges:mV(t,a)}),o==null||o(t))}const gl=()=>{},gV={zoomIn:gl,zoomOut:gl,zoomTo:gl,getZoom:()=>1,setViewport:gl,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:gl,fitBounds:gl,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},yV=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),vV=()=>{const e=Yt(),{d3Zoom:t,d3Selection:r}=ut(yV,nr);return w.useMemo(()=>r&&t?{zoomIn:i=>t.scaleBy(Xs(r,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(Xs(r,i==null?void 0:i.duration),1/1.2),zoomTo:(i,a)=>t.scaleTo(Xs(r,a==null?void 0:a.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,a)=>{const[s,o,l]=e.getState().transform,c=ia.translate(i.x??s,i.y??o).scale(i.zoom??l);t.transform(Xs(r,a==null?void 0:a.duration),c)},getViewport:()=>{const[i,a,s]=e.getState().transform;return{x:i,y:a,zoom:s}},fitView:i=>x3(e.getState,i),setCenter:(i,a,s)=>{const{width:o,height:l,maxZoom:c}=e.getState(),d=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:c,f=o/2-i*d,h=l/2-a*d,p=ia.translate(f,h).scale(d);t.transform(Xs(r,s==null?void 0:s.duration),p)},fitBounds:(i,a)=>{const{width:s,height:o,minZoom:l,maxZoom:c}=e.getState(),{x:d,y:f,zoom:h}=i3(i,s,o,l,c,(a==null?void 0:a.padding)??.1),p=ia.translate(d,f).scale(h);t.transform(Xs(r,a==null?void 0:a.duration),p)},project:i=>{const{transform:a,snapToGrid:s,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Fb(i,a,s,o)},screenToFlowPosition:i=>{const{transform:a,snapToGrid:s,snapGrid:o,domNode:l}=e.getState();if(!l)return i;const{x:c,y:d}=l.getBoundingClientRect(),f={x:i.x-c,y:i.y-d};return Fb(f,a,s,o)},flowToScreenPosition:i=>{const{transform:a,domNode:s}=e.getState();if(!s)return i;const{x:o,y:l}=s.getBoundingClientRect(),c=t3(i,a);return{x:c.x+o,y:c.y+l}},viewportInitialized:!0}:gV,[t,r])};function aS(){const e=vV(),t=Yt(),r=w.useCallback(()=>t.getState().getNodes().map(m=>({...m})),[]),n=w.useCallback(m=>t.getState().nodeInternals.get(m),[]),i=w.useCallback(()=>{const{edges:m=[]}=t.getState();return m.map(v=>({...v}))},[]),a=w.useCallback(m=>{const{edges:v=[]}=t.getState();return v.find(y=>y.id===m)},[]),s=w.useCallback(m=>{const{getNodes:v,setNodes:y,hasDefaultNodes:x,onNodesChange:b}=t.getState(),S=v(),_=typeof m=="function"?m(S):m;if(x)y(_);else if(b){const j=_.length===0?S.map(N=>({type:"remove",id:N.id})):_.map(N=>({item:N,type:"reset"}));b(j)}},[]),o=w.useCallback(m=>{const{edges:v=[],setEdges:y,hasDefaultEdges:x,onEdgesChange:b}=t.getState(),S=typeof m=="function"?m(v):m;if(x)y(S);else if(b){const _=S.length===0?v.map(j=>({type:"remove",id:j.id})):S.map(j=>({item:j,type:"reset"}));b(_)}},[]),l=w.useCallback(m=>{const v=Array.isArray(m)?m:[m],{getNodes:y,setNodes:x,hasDefaultNodes:b,onNodesChange:S}=t.getState();if(b){const j=[...y(),...v];x(j)}else if(S){const _=v.map(j=>({item:j,type:"add"}));S(_)}},[]),c=w.useCallback(m=>{const v=Array.isArray(m)?m:[m],{edges:y=[],setEdges:x,hasDefaultEdges:b,onEdgesChange:S}=t.getState();if(b)x([...y,...v]);else if(S){const _=v.map(j=>({item:j,type:"add"}));S(_)}},[]),d=w.useCallback(()=>{const{getNodes:m,edges:v=[],transform:y}=t.getState(),[x,b,S]=y;return{nodes:m().map(_=>({..._})),edges:v.map(_=>({..._})),viewport:{x,y:b,zoom:S}}},[]),f=w.useCallback(({nodes:m,edges:v})=>{const{nodeInternals:y,getNodes:x,edges:b,hasDefaultNodes:S,hasDefaultEdges:_,onNodesDelete:j,onEdgesDelete:N,onNodesChange:A,onEdgesChange:E}=t.getState(),C=(m||[]).map(R=>R.id),P=(v||[]).map(R=>R.id),T=x().reduce((R,M)=>{const F=M.parentNode||M.parentId,D=!C.includes(M.id)&&F&&R.find(L=>L.id===F);return(typeof M.deletable=="boolean"?M.deletable:!0)&&(C.includes(M.id)||D)&&R.push(M),R},[]),$=b.filter(R=>typeof R.deletable=="boolean"?R.deletable:!0),O=$.filter(R=>P.includes(R.id));if(T||O){const R=n3(T,$),M=[...O,...R],F=M.reduce((D,I)=>(D.includes(I.id)||D.push(I.id),D),[]);if((_||S)&&(_&&t.setState({edges:b.filter(D=>!F.includes(D.id))}),S&&(T.forEach(D=>{y.delete(D.id)}),t.setState({nodeInternals:new Map(y)}))),F.length>0&&(N==null||N(M),E&&E(F.map(D=>({id:D,type:"remove"})))),T.length>0&&(j==null||j(T),A)){const D=T.map(I=>({id:I.id,type:"remove"}));A(D)}}},[]),h=w.useCallback(m=>{const v=FW(m),y=v?null:t.getState().nodeInternals.get(m.id);return!v&&!y?[null,null,v]:[v?m:LN(y),y,v]},[]),p=w.useCallback((m,v=!0,y)=>{const[x,b,S]=h(m);return x?(y||t.getState().getNodes()).filter(_=>{if(!S&&(_.id===b.id||!_.positionAbsolute))return!1;const j=LN(_),N=Rb(j,x);return v&&N>0||N>=x.width*x.height}):[]},[]),g=w.useCallback((m,v,y=!0)=>{const[x]=h(m);if(!x)return!1;const b=Rb(x,v);return y&&b>0||b>=x.width*x.height},[]);return w.useMemo(()=>({...e,getNodes:r,getNode:n,getEdges:i,getEdge:a,setNodes:s,setEdges:o,addNodes:l,addEdges:c,toObject:d,deleteElements:f,getIntersectingNodes:p,isNodeIntersecting:g}),[e,r,n,i,a,s,o,l,c,d,f,p,g])}const xV={actInsideInputWithModifier:!1};var bV=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const r=Yt(),{deleteElements:n}=aS(),i=mf(e,xV),a=mf(t);w.useEffect(()=>{if(i){const{edges:s,getNodes:o}=r.getState(),l=o().filter(d=>d.selected),c=s.filter(d=>d.selected);n({nodes:l,edges:c}),r.setState({nodesSelectionActive:!1})}},[i]),w.useEffect(()=>{r.setState({multiSelectionActive:a})},[a])};function wV(e){const t=Yt();w.useEffect(()=>{let r;const n=()=>{var a,s;if(!e.current)return;const i=Z_(e.current);(i.height===0||i.width===0)&&((s=(a=t.getState()).onError)==null||s.call(a,"004",pa.error004())),t.setState({width:i.width||500,height:i.height||500})};return n(),window.addEventListener("resize",n),e.current&&(r=new ResizeObserver(()=>n()),r.observe(e.current)),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}},[])}const sS={position:"absolute",width:"100%",height:"100%",top:0,left:0},_V=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,np=e=>({x:e.x,y:e.y,zoom:e.k}),yl=(e,t)=>e.target.closest(`.${t}`),GN=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),YN=e=>{const t=e.ctrlKey&&Tm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},SV=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),jV=({onMove:e,onMoveStart:t,onMoveEnd:r,onPaneContextMenu:n,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:s=!1,panOnScrollSpeed:o=.5,panOnScrollMode:l=co.Free,zoomOnDoubleClick:c=!0,elementsSelectable:d,panOnDrag:f=!0,defaultViewport:h,translateExtent:p,minZoom:g,maxZoom:m,zoomActivationKeyCode:v,preventScrolling:y=!0,children:x,noWheelClassName:b,noPanClassName:S})=>{const _=w.useRef(),j=Yt(),N=w.useRef(!1),A=w.useRef(!1),E=w.useRef(null),C=w.useRef({x:0,y:0,zoom:0}),{d3Zoom:P,d3Selection:T,d3ZoomHandler:$,userSelectionActive:O}=ut(SV,nr),R=mf(v),M=w.useRef(0),F=w.useRef(!1),D=w.useRef();return wV(E),w.useEffect(()=>{if(E.current){const I=E.current.getBoundingClientRect(),L=U5().scaleExtent([g,m]).translateExtent(p),W=_n(E.current).call(L),U=ia.translate(h.x,h.y).scale(Oc(h.zoom,g,m)),G=[[0,0],[I.width,I.height]],X=L.constrain()(U,G,p);L.transform(W,X),L.wheelDelta(YN),j.setState({d3Zoom:L,d3Selection:W,d3ZoomHandler:W.on("wheel.zoom"),transform:[X.x,X.y,X.k],domNode:E.current.closest(".react-flow")})}},[]),w.useEffect(()=>{T&&P&&(s&&!R&&!O?T.on("wheel.zoom",I=>{if(yl(I,b))return!1;I.preventDefault(),I.stopImmediatePropagation();const L=T.property("__zoom").k||1;if(I.ctrlKey&&a){const je=Hn(I),Z=YN(I),ae=L*Math.pow(2,Z);P.scaleTo(T,ae,je,I);return}const W=I.deltaMode===1?20:1;let U=l===co.Vertical?0:I.deltaX*W,G=l===co.Horizontal?0:I.deltaY*W;!Tm()&&I.shiftKey&&l!==co.Vertical&&(U=I.deltaY*W,G=0),P.translateBy(T,-(U/L)*o,-(G/L)*o,{internal:!0});const X=np(T.property("__zoom")),{onViewportChangeStart:ne,onViewportChange:ue,onViewportChangeEnd:we}=j.getState();clearTimeout(D.current),F.current||(F.current=!0,t==null||t(I,X),ne==null||ne(X)),F.current&&(e==null||e(I,X),ue==null||ue(X),D.current=setTimeout(()=>{r==null||r(I,X),we==null||we(X),F.current=!1},150))},{passive:!1}):typeof $<"u"&&T.on("wheel.zoom",function(I,L){if(!y&&I.type==="wheel"&&!I.ctrlKey||yl(I,b))return null;I.preventDefault(),$.call(this,I,L)},{passive:!1}))},[O,s,l,T,P,$,R,a,y,b,t,e,r]),w.useEffect(()=>{P&&P.on("start",I=>{var U,G;if(!I.sourceEvent||I.sourceEvent.internal)return null;M.current=(U=I.sourceEvent)==null?void 0:U.button;const{onViewportChangeStart:L}=j.getState(),W=np(I.transform);N.current=!0,C.current=W,((G=I.sourceEvent)==null?void 0:G.type)==="mousedown"&&j.setState({paneDragging:!0}),L==null||L(W),t==null||t(I.sourceEvent,W)})},[P,t]),w.useEffect(()=>{P&&(O&&!N.current?P.on("zoom",null):O||P.on("zoom",I=>{var W;const{onViewportChange:L}=j.getState();if(j.setState({transform:[I.transform.x,I.transform.y,I.transform.k]}),A.current=!!(n&&GN(f,M.current??0)),(e||L)&&!((W=I.sourceEvent)!=null&&W.internal)){const U=np(I.transform);L==null||L(U),e==null||e(I.sourceEvent,U)}}))},[O,P,e,f,n]),w.useEffect(()=>{P&&P.on("end",I=>{if(!I.sourceEvent||I.sourceEvent.internal)return null;const{onViewportChangeEnd:L}=j.getState();if(N.current=!1,j.setState({paneDragging:!1}),n&&GN(f,M.current??0)&&!A.current&&n(I.sourceEvent),A.current=!1,(r||L)&&_V(C.current,I.transform)){const W=np(I.transform);C.current=W,clearTimeout(_.current),_.current=setTimeout(()=>{L==null||L(W),r==null||r(I.sourceEvent,W)},s?150:0)}})},[P,s,f,r,n]),w.useEffect(()=>{P&&P.filter(I=>{const L=R||i,W=a&&I.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&I.button===1&&I.type==="mousedown"&&(yl(I,"react-flow__node")||yl(I,"react-flow__edge")))return!0;if(!f&&!L&&!s&&!c&&!a||O||!c&&I.type==="dblclick"||yl(I,b)&&I.type==="wheel"||yl(I,S)&&(I.type!=="wheel"||s&&I.type==="wheel"&&!R)||!a&&I.ctrlKey&&I.type==="wheel"||!L&&!s&&!W&&I.type==="wheel"||!f&&(I.type==="mousedown"||I.type==="touchstart")||Array.isArray(f)&&!f.includes(I.button)&&I.type==="mousedown")return!1;const U=Array.isArray(f)&&f.includes(I.button)||!I.button||I.button<=1;return(!I.ctrlKey||I.type==="wheel")&&U})},[O,P,i,a,s,c,f,d,R]),k.createElement("div",{className:"react-flow__renderer",ref:E,style:sS},x)},NV=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function EV(){const{userSelectionActive:e,userSelectionRect:t}=ut(NV,nr);return e&&t?k.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function XN(e,t){const r=t.parentNode||t.parentId,n=e.find(i=>i.id===r);if(n){const i=t.position.x+t.width-n.width,a=t.position.y+t.height-n.height;if(i>0||a>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,i>0&&(n.style.width+=i),a>0&&(n.style.height+=a),t.position.x<0){const s=Math.abs(t.position.x);n.position.x=n.position.x-s,n.style.width+=s,t.position.x=0}if(t.position.y<0){const s=Math.abs(t.position.y);n.position.y=n.position.y-s,n.style.height+=s,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function b3(e,t){if(e.some(n=>n.type==="reset"))return e.filter(n=>n.type==="reset").map(n=>n.item);const r=e.filter(n=>n.type==="add").map(n=>n.item);return t.reduce((n,i)=>{const a=e.filter(o=>o.id===i.id);if(a.length===0)return n.push(i),n;const s={...i};for(const o of a)if(o)switch(o.type){case"select":{s.selected=o.selected;break}case"position":{typeof o.position<"u"&&(s.position=o.position),typeof o.positionAbsolute<"u"&&(s.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(s.dragging=o.dragging),s.expandParent&&XN(n,s);break}case"dimensions":{typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),typeof o.updateStyle<"u"&&(s.style={...s.style||{},...o.dimensions}),typeof o.resizing=="boolean"&&(s.resizing=o.resizing),s.expandParent&&XN(n,s);break}case"remove":return n}return n.push(s),n},r)}function w3(e,t){return b3(e,t)}function OV(e,t){return b3(e,t)}const La=(e,t)=>({id:e,type:"select",selected:t});function Fl(e,t){return e.reduce((r,n)=>{const i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(La(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(La(n.id,!1))),r},[])}const b0=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},AV=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),_3=w.memo(({isSelecting:e,selectionMode:t=pf.Full,panOnDrag:r,onSelectionStart:n,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:s,onPaneScroll:o,onPaneMouseEnter:l,onPaneMouseMove:c,onPaneMouseLeave:d,children:f})=>{const h=w.useRef(null),p=Yt(),g=w.useRef(0),m=w.useRef(0),v=w.useRef(),{userSelectionActive:y,elementsSelectable:x,dragging:b}=ut(AV,nr),S=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,m.current=0},_=$=>{a==null||a($),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},j=$=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){$.preventDefault();return}s==null||s($)},N=o?$=>o($):void 0,A=$=>{const{resetSelectedElements:O,domNode:R}=p.getState();if(v.current=R==null?void 0:R.getBoundingClientRect(),!x||!e||$.button!==0||$.target!==h.current||!v.current)return;const{x:M,y:F}=ws($,v.current);O(),p.setState({userSelectionRect:{width:0,height:0,startX:M,startY:F,x:M,y:F}}),n==null||n($)},E=$=>{const{userSelectionRect:O,nodeInternals:R,edges:M,transform:F,onNodesChange:D,onEdgesChange:I,nodeOrigin:L,getNodes:W}=p.getState();if(!e||!v.current||!O)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const U=ws($,v.current),G=O.startX??0,X=O.startY??0,ne={...O,x:U.x<G?U.x:G,y:U.y<X?U.y:X,width:Math.abs(U.x-G),height:Math.abs(U.y-X)},ue=W(),we=r3(R,ne,F,t===pf.Partial,!0,L),je=n3(we,M).map(ae=>ae.id),Z=we.map(ae=>ae.id);if(g.current!==Z.length){g.current=Z.length;const ae=Fl(ue,Z);ae.length&&(D==null||D(ae))}if(m.current!==je.length){m.current=je.length;const ae=Fl(M,je);ae.length&&(I==null||I(ae))}p.setState({userSelectionRect:ne})},C=$=>{if($.button!==0)return;const{userSelectionRect:O}=p.getState();!y&&O&&$.target===h.current&&(_==null||_($)),p.setState({nodesSelectionActive:g.current>0}),S(),i==null||i($)},P=$=>{y&&(p.setState({nodesSelectionActive:g.current>0}),i==null||i($)),S()},T=x&&(e||y);return k.createElement("div",{className:dr(["react-flow__pane",{dragging:b,selection:e}]),onClick:T?void 0:b0(_,h),onContextMenu:b0(j,h),onWheel:b0(N,h),onMouseEnter:T?void 0:l,onMouseDown:T?A:void 0,onMouseMove:T?E:c,onMouseUp:T?C:void 0,onMouseLeave:T?P:d,ref:h,style:sS},f,k.createElement(EV,null))});_3.displayName="Pane";function S3(e,t){const r=e.parentNode||e.parentId;if(!r)return!1;const n=t.get(r);return n?n.selected?!0:S3(n,t):!1}function ZN(e,t,r){let n=e;do{if(n!=null&&n.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function kV(e,t,r,n){return Array.from(e.values()).filter(i=>(i.selected||i.id===n)&&(!i.parentNode||i.parentId||!S3(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var a,s;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:r.x-(((a=i.positionAbsolute)==null?void 0:a.x)??0),y:r.y-(((s=i.positionAbsolute)==null?void 0:s.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode||i.parentId,parentId:i.parentNode||i.parentId,width:i.width,height:i.height,expandParent:i.expandParent}})}function PV(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function j3(e,t,r,n,i=[0,0],a){const s=PV(e,e.extent||n);let o=s;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const f=r.get(l),{x:h,y:p}=Po(f,i).positionAbsolute;o=f&&Nn(h)&&Nn(p)&&Nn(f.width)&&Nn(f.height)?[[h+e.width*i[0],p+e.height*i[1]],[h+f.width-e.width+e.width*i[0],p+f.height-e.height+e.height*i[1]]]:o}else a==null||a("005",pa.error005()),o=s;else if(e.extent&&l&&e.extent!=="parent"){const f=r.get(l),{x:h,y:p}=Po(f,i).positionAbsolute;o=[[e.extent[0][0]+h,e.extent[0][1]+p],[e.extent[1][0]+h,e.extent[1][1]+p]]}let c={x:0,y:0};if(l){const f=r.get(l);c=Po(f,i).positionAbsolute}const d=o&&o!=="parent"?Q_(t,o):t;return{position:{x:d.x-c.x,y:d.y-c.y},positionAbsolute:d}}function w0({nodeId:e,dragItems:t,nodeInternals:r}){const n=t.map(i=>({...r.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?n.find(i=>i.id===e):n[0],n]}const QN=(e,t,r,n)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const a=Array.from(i),s=t.getBoundingClientRect(),o={x:s.width*n[0],y:s.height*n[1]};return a.map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(c.left-s.left-o.x)/r,y:(c.top-s.top-o.y)/r,...Z_(l)}})};function Bu(e,t,r){return r===void 0?r:n=>{const i=t().nodeInternals.get(e);i&&r(n,{...i})}}function zb({id:e,store:t,unselect:r=!1,nodeRef:n}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:s,nodeInternals:o,onError:l}=t.getState(),c=o.get(e);if(!c){l==null||l("012",pa.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(r||c.selected&&s)&&(a({nodes:[c],edges:[]}),requestAnimationFrame(()=>{var d;return(d=n==null?void 0:n.current)==null?void 0:d.blur()})):i([e])}function TV(){const e=Yt();return w.useCallback(({sourceEvent:r})=>{const{transform:n,snapGrid:i,snapToGrid:a}=e.getState(),s=r.touches?r.touches[0].clientX:r.clientX,o=r.touches?r.touches[0].clientY:r.clientY,l={x:(s-n[0])/n[2],y:(o-n[1])/n[2]};return{xSnapped:a?i[0]*Math.round(l.x/i[0]):l.x,ySnapped:a?i[1]*Math.round(l.y/i[1]):l.y,...l}},[])}function _0(e){return(t,r,n)=>e==null?void 0:e(t,n)}function N3({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:n,nodeId:i,isSelectable:a,selectNodesOnDrag:s}){const o=Yt(),[l,c]=w.useState(!1),d=w.useRef([]),f=w.useRef({x:null,y:null}),h=w.useRef(0),p=w.useRef(null),g=w.useRef({x:0,y:0}),m=w.useRef(null),v=w.useRef(!1),y=w.useRef(!1),x=w.useRef(!1),b=TV();return w.useEffect(()=>{if(e!=null&&e.current){const S=_n(e.current),_=({x:A,y:E})=>{const{nodeInternals:C,onNodeDrag:P,onSelectionDrag:T,updateNodePositions:$,nodeExtent:O,snapGrid:R,snapToGrid:M,nodeOrigin:F,onError:D}=o.getState();f.current={x:A,y:E};let I=!1,L={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&O){const U=Sy(d.current,F);L=hf(U)}if(d.current=d.current.map(U=>{const G={x:A-U.distance.x,y:E-U.distance.y};M&&(G.x=R[0]*Math.round(G.x/R[0]),G.y=R[1]*Math.round(G.y/R[1]));const X=[[O[0][0],O[0][1]],[O[1][0],O[1][1]]];d.current.length>1&&O&&!U.extent&&(X[0][0]=U.positionAbsolute.x-L.x+O[0][0],X[1][0]=U.positionAbsolute.x+(U.width??0)-L.x2+O[1][0],X[0][1]=U.positionAbsolute.y-L.y+O[0][1],X[1][1]=U.positionAbsolute.y+(U.height??0)-L.y2+O[1][1]);const ne=j3(U,G,C,X,F,D);return I=I||U.position.x!==ne.position.x||U.position.y!==ne.position.y,U.position=ne.position,U.positionAbsolute=ne.positionAbsolute,U}),!I)return;$(d.current,!0,!0),c(!0);const W=i?P:_0(T);if(W&&m.current){const[U,G]=w0({nodeId:i,dragItems:d.current,nodeInternals:C});W(m.current,U,G)}},j=()=>{if(!p.current)return;const[A,E]=V5(g.current,p.current);if(A!==0||E!==0){const{transform:C,panBy:P}=o.getState();f.current.x=(f.current.x??0)-A/C[2],f.current.y=(f.current.y??0)-E/C[2],P({x:A,y:E})&&_(f.current)}h.current=requestAnimationFrame(j)},N=A=>{var F;const{nodeInternals:E,multiSelectionActive:C,nodesDraggable:P,unselectNodesAndEdges:T,onNodeDragStart:$,onSelectionDragStart:O}=o.getState();y.current=!0;const R=i?$:_0(O);(!s||!a)&&!C&&i&&((F=E.get(i))!=null&&F.selected||T()),i&&a&&s&&zb({id:i,store:o,nodeRef:e});const M=b(A);if(f.current=M,d.current=kV(E,P,M,i),R&&d.current){const[D,I]=w0({nodeId:i,dragItems:d.current,nodeInternals:E});R(A.sourceEvent,D,I)}};if(t)S.on(".drag",null);else{const A=L7().on("start",E=>{const{domNode:C,nodeDragThreshold:P}=o.getState();P===0&&N(E),x.current=!1;const T=b(E);f.current=T,p.current=(C==null?void 0:C.getBoundingClientRect())||null,g.current=ws(E.sourceEvent,p.current)}).on("drag",E=>{var $,O;const C=b(E),{autoPanOnNodeDrag:P,nodeDragThreshold:T}=o.getState();if(E.sourceEvent.type==="touchmove"&&E.sourceEvent.touches.length>1&&(x.current=!0),!x.current){if(!v.current&&y.current&&P&&(v.current=!0,j()),!y.current){const R=C.xSnapped-((($=f==null?void 0:f.current)==null?void 0:$.x)??0),M=C.ySnapped-(((O=f==null?void 0:f.current)==null?void 0:O.y)??0);Math.sqrt(R*R+M*M)>T&&N(E)}(f.current.x!==C.xSnapped||f.current.y!==C.ySnapped)&&d.current&&y.current&&(m.current=E.sourceEvent,g.current=ws(E.sourceEvent,p.current),_(C))}}).on("end",E=>{if(!(!y.current||x.current)&&(c(!1),v.current=!1,y.current=!1,cancelAnimationFrame(h.current),d.current)){const{updateNodePositions:C,nodeInternals:P,onNodeDragStop:T,onSelectionDragStop:$}=o.getState(),O=i?T:_0($);if(C(d.current,!1,!1),O){const[R,M]=w0({nodeId:i,dragItems:d.current,nodeInternals:P});O(E.sourceEvent,R,M)}}}).filter(E=>{const C=E.target;return!E.button&&(!r||!ZN(C,`.${r}`,e))&&(!n||ZN(C,n,e))});return S.call(A),()=>{S.on(".drag",null)}}}},[e,t,r,n,a,o,i,s,b]),l}function E3(){const e=Yt();return w.useCallback(r=>{const{nodeInternals:n,nodeExtent:i,updateNodePositions:a,getNodes:s,snapToGrid:o,snapGrid:l,onError:c,nodesDraggable:d}=e.getState(),f=s().filter(x=>x.selected&&(x.draggable||d&&typeof x.draggable>"u")),h=o?l[0]:5,p=o?l[1]:5,g=r.isShiftPressed?4:1,m=r.x*h*g,v=r.y*p*g,y=f.map(x=>{if(x.positionAbsolute){const b={x:x.positionAbsolute.x+m,y:x.positionAbsolute.y+v};o&&(b.x=l[0]*Math.round(b.x/l[0]),b.y=l[1]*Math.round(b.y/l[1]));const{positionAbsolute:S,position:_}=j3(x,b,n,i,void 0,c);x.position=_,x.positionAbsolute=S}return x});a(y,!0,!1)},[])}const ec={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var zu=e=>{const t=({id:r,type:n,data:i,xPos:a,yPos:s,xPosOrigin:o,yPosOrigin:l,selected:c,onClick:d,onMouseEnter:f,onMouseMove:h,onMouseLeave:p,onContextMenu:g,onDoubleClick:m,style:v,className:y,isDraggable:x,isSelectable:b,isConnectable:S,isFocusable:_,selectNodesOnDrag:j,sourcePosition:N,targetPosition:A,hidden:E,resizeObserver:C,dragHandle:P,zIndex:T,isParent:$,noDragClassName:O,noPanClassName:R,initialized:M,disableKeyboardA11y:F,ariaLabel:D,rfId:I,hasHandleBounds:L})=>{const W=Yt(),U=w.useRef(null),G=w.useRef(null),X=w.useRef(N),ne=w.useRef(A),ue=w.useRef(n),we=b||x||d||f||h||p,je=E3(),Z=Bu(r,W.getState,f),ae=Bu(r,W.getState,h),ge=Bu(r,W.getState,p),Y=Bu(r,W.getState,g),$e=Bu(r,W.getState,m),xe=Oe=>{const{nodeDragThreshold:de}=W.getState();if(b&&(!j||!x||de>0)&&zb({id:r,store:W,nodeRef:U}),d){const dt=W.getState().nodeInternals.get(r);dt&&d(Oe,{...dt})}},Ae=Oe=>{if(!Ib(Oe)&&!F)if(G5.includes(Oe.key)&&b){const de=Oe.key==="Escape";zb({id:r,store:W,unselect:de,nodeRef:U})}else x&&c&&Object.prototype.hasOwnProperty.call(ec,Oe.key)&&(W.setState({ariaLiveMessage:`Moved selected node ${Oe.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~a}, y: ${~~s}`}),je({x:ec[Oe.key].x,y:ec[Oe.key].y,isShiftPressed:Oe.shiftKey}))};w.useEffect(()=>()=>{G.current&&(C==null||C.unobserve(G.current),G.current=null)},[]),w.useEffect(()=>{if(U.current&&!E){const Oe=U.current;(!M||!L||G.current!==Oe)&&(G.current&&(C==null||C.unobserve(G.current)),C==null||C.observe(Oe),G.current=Oe)}},[E,M,L]),w.useEffect(()=>{const Oe=ue.current!==n,de=X.current!==N,dt=ne.current!==A;U.current&&(Oe||de||dt)&&(Oe&&(ue.current=n),de&&(X.current=N),dt&&(ne.current=A),W.getState().updateNodeDimensions([{id:r,nodeElement:U.current,forceUpdate:!0}]))},[r,n,N,A]);const Be=N3({nodeRef:U,disabled:E||!x,noDragClassName:O,handleSelector:P,nodeId:r,isSelectable:b,selectNodesOnDrag:j});return E?null:k.createElement("div",{className:dr(["react-flow__node",`react-flow__node-${n}`,{[R]:x},y,{selected:c,selectable:b,parent:$,dragging:Be}]),ref:U,style:{zIndex:T,transform:`translate(${o}px,${l}px)`,pointerEvents:we?"all":"none",visibility:M?"visible":"hidden",...v},"data-id":r,"data-testid":`rf__node-${r}`,onMouseEnter:Z,onMouseMove:ae,onMouseLeave:ge,onContextMenu:Y,onClick:xe,onDoubleClick:$e,onKeyDown:_?Ae:void 0,tabIndex:_?0:void 0,role:_?"button":void 0,"aria-describedby":F?void 0:`${m3}-${I}`,"aria-label":D},k.createElement(qW,{value:r},k.createElement(e,{id:r,data:i,type:n,xPos:a,yPos:s,selected:c,isConnectable:S,sourcePosition:N,targetPosition:A,dragging:Be,dragHandle:P,zIndex:T})))};return t.displayName="NodeWrapper",w.memo(t)};const CV=e=>{const t=e.getNodes().filter(r=>r.selected);return{...Sy(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function $V({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const n=Yt(),{width:i,height:a,x:s,y:o,transformString:l,userSelectionActive:c}=ut(CV,nr),d=E3(),f=w.useRef(null);if(w.useEffect(()=>{var g;r||(g=f.current)==null||g.focus({preventScroll:!0})},[r]),N3({nodeRef:f}),c||!i||!a)return null;const h=e?g=>{const m=n.getState().getNodes().filter(v=>v.selected);e(g,m)}:void 0,p=g=>{Object.prototype.hasOwnProperty.call(ec,g.key)&&d({x:ec[g.key].x,y:ec[g.key].y,isShiftPressed:g.shiftKey})};return k.createElement("div",{className:dr(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},k.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:i,height:a,top:o,left:s}}))}var MV=w.memo($V);const RV=e=>e.nodesSelectionActive,O3=({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:s,deleteKeyCode:o,onMove:l,onMoveStart:c,onMoveEnd:d,selectionKeyCode:f,selectionOnDrag:h,selectionMode:p,onSelectionStart:g,onSelectionEnd:m,multiSelectionKeyCode:v,panActivationKeyCode:y,zoomActivationKeyCode:x,elementsSelectable:b,zoomOnScroll:S,zoomOnPinch:_,panOnScroll:j,panOnScrollSpeed:N,panOnScrollMode:A,zoomOnDoubleClick:E,panOnDrag:C,defaultViewport:P,translateExtent:T,minZoom:$,maxZoom:O,preventScrolling:R,onSelectionContextMenu:M,noWheelClassName:F,noPanClassName:D,disableKeyboardA11y:I})=>{const L=ut(RV),W=mf(f),U=mf(y),G=U||C,X=U||j,ne=W||h&&G!==!0;return bV({deleteKeyCode:o,multiSelectionKeyCode:v}),k.createElement(jV,{onMove:l,onMoveStart:c,onMoveEnd:d,onPaneContextMenu:a,elementsSelectable:b,zoomOnScroll:S,zoomOnPinch:_,panOnScroll:X,panOnScrollSpeed:N,panOnScrollMode:A,zoomOnDoubleClick:E,panOnDrag:!W&&G,defaultViewport:P,translateExtent:T,minZoom:$,maxZoom:O,zoomActivationKeyCode:x,preventScrolling:R,noWheelClassName:F,noPanClassName:D},k.createElement(_3,{onSelectionStart:g,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:s,panOnDrag:G,isSelecting:!!ne,selectionMode:p},e,L&&k.createElement(MV,{onSelectionContextMenu:M,noPanClassName:D,disableKeyboardA11y:I})))};O3.displayName="FlowRenderer";var IV=w.memo(O3);function DV(e){return ut(w.useCallback(r=>e?r3(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):r.getNodes(),[e]))}function LV(e){const t={input:zu(e.input||d3),default:zu(e.default||Bb),output:zu(e.output||h3),group:zu(e.group||iS)},r={},n=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,a)=>(i[a]=zu(e[a]||Bb),i),r);return{...t,...n}}const FV=({x:e,y:t,width:r,height:n,origin:i})=>!r||!n?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-r*i[0],y:t-n*i[1]},BV=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),A3=e=>{const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:n,elementsSelectable:i,updateNodeDimensions:a,onError:s}=ut(BV,nr),o=DV(e.onlyRenderVisibleElements),l=w.useRef(),c=w.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const d=new ResizeObserver(f=>{const h=f.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));a(h)});return l.current=d,d},[]);return w.useEffect(()=>()=>{var d;(d=l==null?void 0:l.current)==null||d.disconnect()},[]),k.createElement("div",{className:"react-flow__nodes",style:sS},o.map(d=>{var _,j,N;let f=d.type||"default";e.nodeTypes[f]||(s==null||s("003",pa.error003(f)),f="default");const h=e.nodeTypes[f]||e.nodeTypes.default,p=!!(d.draggable||t&&typeof d.draggable>"u"),g=!!(d.selectable||i&&typeof d.selectable>"u"),m=!!(d.connectable||r&&typeof d.connectable>"u"),v=!!(d.focusable||n&&typeof d.focusable>"u"),y=e.nodeExtent?Q_(d.positionAbsolute,e.nodeExtent):d.positionAbsolute,x=(y==null?void 0:y.x)??0,b=(y==null?void 0:y.y)??0,S=FV({x,y:b,width:d.width??0,height:d.height??0,origin:e.nodeOrigin});return k.createElement(h,{key:d.id,id:d.id,className:d.className,style:d.style,type:f,data:d.data,sourcePosition:d.sourcePosition||ve.Bottom,targetPosition:d.targetPosition||ve.Top,hidden:d.hidden,xPos:x,yPos:b,xPosOrigin:S.x,yPosOrigin:S.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!d.selected,isDraggable:p,isSelectable:g,isConnectable:m,isFocusable:v,resizeObserver:c,dragHandle:d.dragHandle,zIndex:((_=d[Ot])==null?void 0:_.z)??0,isParent:!!((j=d[Ot])!=null&&j.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!d.width&&!!d.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:d.ariaLabel,hasHandleBounds:!!((N=d[Ot])!=null&&N.handleBounds)})}))};A3.displayName="NodeRenderer";var zV=w.memo(A3);const UV=(e,t,r)=>r===ve.Left?e-t:r===ve.Right?e+t:e,WV=(e,t,r)=>r===ve.Top?e-t:r===ve.Bottom?e+t:e,JN="react-flow__edgeupdater",eE=({position:e,centerX:t,centerY:r,radius:n=10,onMouseDown:i,onMouseEnter:a,onMouseOut:s,type:o})=>k.createElement("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:s,className:dr([JN,`${JN}-${o}`]),cx:UV(t,n,e),cy:WV(r,n,e),r:n,stroke:"transparent",fill:"transparent"}),VV=()=>!0;var vl=e=>{const t=({id:r,className:n,type:i,data:a,onClick:s,onEdgeDoubleClick:o,selected:l,animated:c,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,style:v,source:y,target:x,sourceX:b,sourceY:S,targetX:_,targetY:j,sourcePosition:N,targetPosition:A,elementsSelectable:E,hidden:C,sourceHandleId:P,targetHandleId:T,onContextMenu:$,onMouseEnter:O,onMouseMove:R,onMouseLeave:M,reconnectRadius:F,onReconnect:D,onReconnectStart:I,onReconnectEnd:L,markerEnd:W,markerStart:U,rfId:G,ariaLabel:X,isFocusable:ne,isReconnectable:ue,pathOptions:we,interactionWidth:je,disableKeyboardA11y:Z})=>{const ae=w.useRef(null),[ge,Y]=w.useState(!1),[$e,xe]=w.useState(!1),Ae=Yt(),Be=w.useMemo(()=>`url('#${Lb(U,G)}')`,[U,G]),Oe=w.useMemo(()=>`url('#${Lb(W,G)}')`,[W,G]);if(C)return null;const de=ft=>{var pn;const{edges:Kr,addSelectedEdges:Dn,unselectNodesAndEdges:Ln,multiSelectionActive:Di}=Ae.getState(),hn=Kr.find(Oa=>Oa.id===r);hn&&(E&&(Ae.setState({nodesSelectionActive:!1}),hn.selected&&Di?(Ln({nodes:[],edges:[hn]}),(pn=ae.current)==null||pn.blur()):Dn([r])),s&&s(ft,hn))},dt=Fu(r,Ae.getState,o),B=Fu(r,Ae.getState,$),V=Fu(r,Ae.getState,O),q=Fu(r,Ae.getState,R),ie=Fu(r,Ae.getState,M),te=(ft,Kr)=>{if(ft.button!==0)return;const{edges:Dn,isValidConnection:Ln}=Ae.getState(),Di=Kr?x:y,hn=(Kr?T:P)||null,pn=Kr?"target":"source",Oa=Ln||VV,Rv=Kr,Au=Dn.find(Us=>Us.id===r);xe(!0),I==null||I(ft,Au,pn);const Iv=Us=>{xe(!1),L==null||L(Us,Au,pn)};o3({event:ft,handleId:hn,nodeId:Di,onConnect:Us=>D==null?void 0:D(Au,Us),isTarget:Rv,getState:Ae.getState,setState:Ae.setState,isValidConnection:Oa,edgeUpdaterType:pn,onReconnectEnd:Iv})},Q=ft=>te(ft,!0),he=ft=>te(ft,!1),De=()=>Y(!0),We=()=>Y(!1),zt=!E&&!s,pi=ft=>{var Kr;if(!Z&&G5.includes(ft.key)&&E){const{unselectNodesAndEdges:Dn,addSelectedEdges:Ln,edges:Di}=Ae.getState();ft.key==="Escape"?((Kr=ae.current)==null||Kr.blur(),Dn({edges:[Di.find(pn=>pn.id===r)]})):Ln([r])}};return k.createElement("g",{className:dr(["react-flow__edge",`react-flow__edge-${i}`,n,{selected:l,animated:c,inactive:zt,updating:ge}]),onClick:de,onDoubleClick:dt,onContextMenu:B,onMouseEnter:V,onMouseMove:q,onMouseLeave:ie,onKeyDown:ne?pi:void 0,tabIndex:ne?0:void 0,role:ne?"button":"img","data-testid":`rf__edge-${r}`,"aria-label":X===null?void 0:X||`Edge from ${y} to ${x}`,"aria-describedby":ne?`${g3}-${G}`:void 0,ref:ae},!$e&&k.createElement(e,{id:r,source:y,target:x,selected:l,animated:c,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,data:a,style:v,sourceX:b,sourceY:S,targetX:_,targetY:j,sourcePosition:N,targetPosition:A,sourceHandleId:P,targetHandleId:T,markerStart:Be,markerEnd:Oe,pathOptions:we,interactionWidth:je}),ue&&k.createElement(k.Fragment,null,(ue==="source"||ue===!0)&&k.createElement(eE,{position:N,centerX:b,centerY:S,radius:F,onMouseDown:Q,onMouseEnter:De,onMouseOut:We,type:"source"}),(ue==="target"||ue===!0)&&k.createElement(eE,{position:A,centerX:_,centerY:j,radius:F,onMouseDown:he,onMouseEnter:De,onMouseOut:We,type:"target"})))};return t.displayName="EdgeWrapper",w.memo(t)};function HV(e){const t={default:vl(e.default||$m),straight:vl(e.bezier||tS),step:vl(e.step||eS),smoothstep:vl(e.step||_y),simplebezier:vl(e.simplebezier||J_)},r={},n=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,a)=>(i[a]=vl(e[a]||$m),i),r);return{...t,...n}}function tE(e,t,r=null){const n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,a=(r==null?void 0:r.width)||t.width,s=(r==null?void 0:r.height)||t.height;switch(e){case ve.Top:return{x:n+a/2,y:i};case ve.Right:return{x:n+a,y:i+s/2};case ve.Bottom:return{x:n+a/2,y:i+s};case ve.Left:return{x:n,y:i+s/2}}}function rE(e,t){return e?e.length===1||!t?e[0]:t&&e.find(r=>r.id===t)||null:null}const qV=(e,t,r,n,i,a)=>{const s=tE(r,e,t),o=tE(a,n,i);return{sourceX:s.x,sourceY:s.y,targetX:o.x,targetY:o.y}};function KV({sourcePos:e,targetPos:t,sourceWidth:r,sourceHeight:n,targetWidth:i,targetHeight:a,width:s,height:o,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+r,t.x+i),y2:Math.max(e.y+n,t.y+a)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=hf({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:o/l[2]}),f=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),h=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*h)>0}function nE(e){var n,i,a,s,o;const t=((n=e==null?void 0:e[Ot])==null?void 0:n.handleBounds)||null,r=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.y)<"u";return[{x:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.x)||0,y:((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!r]}const GV=[{level:0,isMaxLevel:!0,edges:[]}];function YV(e,t,r=!1){let n=-1;const i=e.reduce((s,o)=>{var d,f;const l=Nn(o.zIndex);let c=l?o.zIndex:0;if(r){const h=t.get(o.target),p=t.get(o.source),g=o.selected||(h==null?void 0:h.selected)||(p==null?void 0:p.selected),m=Math.max(((d=p==null?void 0:p[Ot])==null?void 0:d.z)||0,((f=h==null?void 0:h[Ot])==null?void 0:f.z)||0,1e3);c=(l?o.zIndex:0)+(g?m:0)}return s[c]?s[c].push(o):s[c]=[o],n=c>n?c:n,s},{}),a=Object.entries(i).map(([s,o])=>{const l=+s;return{edges:o,level:l,isMaxLevel:l===n}});return a.length===0?GV:a}function XV(e,t,r){const n=ut(w.useCallback(i=>e?i.edges.filter(a=>{const s=t.get(a.source),o=t.get(a.target);return(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&KV({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:o.width,targetHeight:o.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return YV(n,t,r)}const ZV=({color:e="none",strokeWidth:t=1})=>k.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),QV=({color:e="none",strokeWidth:t=1})=>k.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),iE={[Cm.Arrow]:ZV,[Cm.ArrowClosed]:QV};function JV(e){const t=Yt();return w.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(iE,e)?iE[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",pa.error009(e)),null)},[e])}const eH=({id:e,type:t,color:r,width:n=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:s,orient:o="auto-start-reverse"})=>{const l=JV(t);return l?k.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${n}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:o,refX:"0",refY:"0"},k.createElement(l,{color:r,strokeWidth:s})):null},tH=({defaultColor:e,rfId:t})=>r=>{const n=[];return r.edges.reduce((i,a)=>([a.markerStart,a.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const o=Lb(s,t);n.includes(o)||(i.push({id:o,color:s.color||e,...s}),n.push(o))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))},k3=({defaultColor:e,rfId:t})=>{const r=ut(w.useCallback(tH({defaultColor:e,rfId:t}),[e,t]),(n,i)=>!(n.length!==i.length||n.some((a,s)=>a.id!==i[s].id)));return k.createElement("defs",null,r.map(n=>k.createElement(eH,{id:n.id,key:n.id,type:n.type,color:n.color,width:n.width,height:n.height,markerUnits:n.markerUnits,strokeWidth:n.strokeWidth,orient:n.orient})))};k3.displayName="MarkerDefinitions";var rH=w.memo(k3);const nH=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),P3=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:r,rfId:n,edgeTypes:i,noPanClassName:a,onEdgeContextMenu:s,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:g,reconnectRadius:m,children:v,disableKeyboardA11y:y})=>{const{edgesFocusable:x,edgesUpdatable:b,elementsSelectable:S,width:_,height:j,connectionMode:N,nodeInternals:A,onError:E}=ut(nH,nr),C=XV(t,A,r);return _?k.createElement(k.Fragment,null,C.map(({level:P,edges:T,isMaxLevel:$})=>k.createElement("svg",{key:P,style:{zIndex:P},width:_,height:j,className:"react-flow__edges react-flow__container"},$&&k.createElement(rH,{defaultColor:e,rfId:n}),k.createElement("g",null,T.map(O=>{const[R,M,F]=nE(A.get(O.source)),[D,I,L]=nE(A.get(O.target));if(!F||!L)return null;let W=O.type||"default";i[W]||(E==null||E("011",pa.error011(W)),W="default");const U=i[W]||i.default,G=N===qo.Strict?I.target:(I.target??[]).concat(I.source??[]),X=rE(M.source,O.sourceHandle),ne=rE(G,O.targetHandle),ue=(X==null?void 0:X.position)||ve.Bottom,we=(ne==null?void 0:ne.position)||ve.Top,je=!!(O.focusable||x&&typeof O.focusable>"u"),Z=O.reconnectable||O.updatable,ae=typeof h<"u"&&(Z||b&&typeof Z>"u");if(!X||!ne)return E==null||E("008",pa.error008(X,O)),null;const{sourceX:ge,sourceY:Y,targetX:$e,targetY:xe}=qV(R,X,ue,D,ne,we);return k.createElement(U,{key:O.id,id:O.id,className:dr([O.className,a]),type:W,data:O.data,selected:!!O.selected,animated:!!O.animated,hidden:!!O.hidden,label:O.label,labelStyle:O.labelStyle,labelShowBg:O.labelShowBg,labelBgStyle:O.labelBgStyle,labelBgPadding:O.labelBgPadding,labelBgBorderRadius:O.labelBgBorderRadius,style:O.style,source:O.source,target:O.target,sourceHandleId:O.sourceHandle,targetHandleId:O.targetHandle,markerEnd:O.markerEnd,markerStart:O.markerStart,sourceX:ge,sourceY:Y,targetX:$e,targetY:xe,sourcePosition:ue,targetPosition:we,elementsSelectable:S,onContextMenu:s,onMouseEnter:o,onMouseMove:l,onMouseLeave:c,onClick:d,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:g,reconnectRadius:m,rfId:n,ariaLabel:O.ariaLabel,isFocusable:je,isReconnectable:ae,pathOptions:"pathOptions"in O?O.pathOptions:void 0,interactionWidth:O.interactionWidth,disableKeyboardA11y:y})})))),v):null};P3.displayName="EdgeRenderer";var iH=w.memo(P3);const aH=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function sH({children:e}){const t=ut(aH);return k.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function oH(e){const t=aS(),r=w.useRef(!1);w.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const lH={[ve.Left]:ve.Right,[ve.Right]:ve.Left,[ve.Top]:ve.Bottom,[ve.Bottom]:ve.Top},T3=({nodeId:e,handleType:t,style:r,type:n=Va.Bezier,CustomComponent:i,connectionStatus:a})=>{var j,N,A;const{fromNode:s,handleId:o,toX:l,toY:c,connectionMode:d}=ut(w.useCallback(E=>({fromNode:E.nodeInternals.get(e),handleId:E.connectionHandleId,toX:(E.connectionPosition.x-E.transform[0])/E.transform[2],toY:(E.connectionPosition.y-E.transform[1])/E.transform[2],connectionMode:E.connectionMode}),[e]),nr),f=(j=s==null?void 0:s[Ot])==null?void 0:j.handleBounds;let h=f==null?void 0:f[t];if(d===qo.Loose&&(h=h||(f==null?void 0:f[t==="source"?"target":"source"])),!s||!h)return null;const p=o?h.find(E=>E.id===o):h[0],g=p?p.x+p.width/2:(s.width??0)/2,m=p?p.y+p.height/2:s.height??0,v=(((N=s.positionAbsolute)==null?void 0:N.x)??0)+g,y=(((A=s.positionAbsolute)==null?void 0:A.y)??0)+m,x=p==null?void 0:p.position,b=x?lH[x]:null;if(!x||!b)return null;if(i)return k.createElement(i,{connectionLineType:n,connectionLineStyle:r,fromNode:s,fromHandle:p,fromX:v,fromY:y,toX:l,toY:c,fromPosition:x,toPosition:b,connectionStatus:a});let S="";const _={sourceX:v,sourceY:y,sourcePosition:x,targetX:l,targetY:c,targetPosition:b};return n===Va.Bezier?[S]=J5(_):n===Va.Step?[S]=Db({..._,borderRadius:0}):n===Va.SmoothStep?[S]=Db(_):n===Va.SimpleBezier?[S]=Q5(_):S=`M${v},${y} ${l},${c}`,k.createElement("path",{d:S,fill:"none",className:"react-flow__connection-path",style:r})};T3.displayName="ConnectionLine";const cH=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function uH({containerStyle:e,style:t,type:r,component:n}){const{nodeId:i,handleType:a,nodesConnectable:s,width:o,height:l,connectionStatus:c}=ut(cH,nr);return!(i&&a&&o&&s)?null:k.createElement("svg",{style:e,width:o,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},k.createElement("g",{className:dr(["react-flow__connection",c])},k.createElement(T3,{nodeId:i,handleType:a,style:t,type:r,CustomComponent:n,connectionStatus:c})))}function aE(e,t){return w.useRef(null),Yt(),w.useMemo(()=>t(e),[e])}const C3=({nodeTypes:e,edgeTypes:t,onMove:r,onMoveStart:n,onMoveEnd:i,onInit:a,onNodeClick:s,onEdgeClick:o,onNodeDoubleClick:l,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:g,onSelectionStart:m,onSelectionEnd:v,connectionLineType:y,connectionLineStyle:x,connectionLineComponent:b,connectionLineContainerStyle:S,selectionKeyCode:_,selectionOnDrag:j,selectionMode:N,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:C,deleteKeyCode:P,onlyRenderVisibleElements:T,elementsSelectable:$,selectNodesOnDrag:O,defaultViewport:R,translateExtent:M,minZoom:F,maxZoom:D,preventScrolling:I,defaultMarkerColor:L,zoomOnScroll:W,zoomOnPinch:U,panOnScroll:G,panOnScrollSpeed:X,panOnScrollMode:ne,zoomOnDoubleClick:ue,panOnDrag:we,onPaneClick:je,onPaneMouseEnter:Z,onPaneMouseMove:ae,onPaneMouseLeave:ge,onPaneScroll:Y,onPaneContextMenu:$e,onEdgeContextMenu:xe,onEdgeMouseEnter:Ae,onEdgeMouseMove:Be,onEdgeMouseLeave:Oe,onReconnect:de,onReconnectStart:dt,onReconnectEnd:B,reconnectRadius:V,noDragClassName:q,noWheelClassName:ie,noPanClassName:te,elevateEdgesOnSelect:Q,disableKeyboardA11y:he,nodeOrigin:De,nodeExtent:We,rfId:zt})=>{const pi=aE(e,LV),ft=aE(t,HV);return oH(a),k.createElement(IV,{onPaneClick:je,onPaneMouseEnter:Z,onPaneMouseMove:ae,onPaneMouseLeave:ge,onPaneContextMenu:$e,onPaneScroll:Y,deleteKeyCode:P,selectionKeyCode:_,selectionOnDrag:j,selectionMode:N,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:C,elementsSelectable:$,onMove:r,onMoveStart:n,onMoveEnd:i,zoomOnScroll:W,zoomOnPinch:U,zoomOnDoubleClick:ue,panOnScroll:G,panOnScrollSpeed:X,panOnScrollMode:ne,panOnDrag:we,defaultViewport:R,translateExtent:M,minZoom:F,maxZoom:D,onSelectionContextMenu:g,preventScrolling:I,noDragClassName:q,noWheelClassName:ie,noPanClassName:te,disableKeyboardA11y:he},k.createElement(sH,null,k.createElement(iH,{edgeTypes:ft,onEdgeClick:o,onEdgeDoubleClick:c,onlyRenderVisibleElements:T,onEdgeContextMenu:xe,onEdgeMouseEnter:Ae,onEdgeMouseMove:Be,onEdgeMouseLeave:Oe,onReconnect:de,onReconnectStart:dt,onReconnectEnd:B,reconnectRadius:V,defaultMarkerColor:L,noPanClassName:te,elevateEdgesOnSelect:!!Q,disableKeyboardA11y:he,rfId:zt},k.createElement(uH,{style:x,type:y,component:b,containerStyle:S})),k.createElement("div",{className:"react-flow__edgelabel-renderer"}),k.createElement(zV,{nodeTypes:pi,onNodeClick:s,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:O,onlyRenderVisibleElements:T,noPanClassName:te,noDragClassName:q,disableKeyboardA11y:he,nodeOrigin:De,nodeExtent:We,rfId:zt})))};C3.displayName="GraphView";var dH=w.memo(C3);const Ub=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ka={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ub,nodeExtent:Ub,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:qo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:BW,isValidConnection:void 0},fH=()=>X9((e,t)=>({...ka,setNodes:r=>{const{nodeInternals:n,nodeOrigin:i,elevateNodesOnSelect:a}=t();e({nodeInternals:x0(r,n,i,a)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:r=>{const{defaultEdgeOptions:n={}}=t();e({edges:r.map(i=>({...n,...i}))})},setDefaultNodesAndEdges:(r,n)=>{const i=typeof r<"u",a=typeof n<"u",s=i?x0(r,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:a?n:[],hasDefaultNodes:i,hasDefaultEdges:a})},updateNodeDimensions:r=>{const{onNodesChange:n,nodeInternals:i,fitViewOnInit:a,fitViewOnInitDone:s,fitViewOnInitOptions:o,domNode:l,nodeOrigin:c}=t(),d=l==null?void 0:l.querySelector(".react-flow__viewport");if(!d)return;const f=window.getComputedStyle(d),{m22:h}=new window.DOMMatrixReadOnly(f.transform),p=r.reduce((m,v)=>{const y=i.get(v.id);if(y!=null&&y.hidden)i.set(y.id,{...y,[Ot]:{...y[Ot],handleBounds:void 0}});else if(y){const x=Z_(v.nodeElement);!!(x.width&&x.height&&(y.width!==x.width||y.height!==x.height||v.forceUpdate))&&(i.set(y.id,{...y,[Ot]:{...y[Ot],handleBounds:{source:QN(".source",v.nodeElement,h,c),target:QN(".target",v.nodeElement,h,c)}},...x}),m.push({id:y.id,type:"dimensions",dimensions:x}))}return m},[]);v3(i,c);const g=s||a&&!s&&x3(t,{initial:!0,...o});e({nodeInternals:new Map(i),fitViewOnInitDone:g}),(p==null?void 0:p.length)>0&&(n==null||n(p))},updateNodePositions:(r,n=!0,i=!1)=>{const{triggerNodeChanges:a}=t(),s=r.map(o=>{const l={id:o.id,type:"position",dragging:i};return n&&(l.positionAbsolute=o.positionAbsolute,l.position=o.position),l});a(s)},triggerNodeChanges:r=>{const{onNodesChange:n,nodeInternals:i,hasDefaultNodes:a,nodeOrigin:s,getNodes:o,elevateNodesOnSelect:l}=t();if(r!=null&&r.length){if(a){const c=w3(r,o()),d=x0(c,i,s,l);e({nodeInternals:d})}n==null||n(r)}},addSelectedNodes:r=>{const{multiSelectionActive:n,edges:i,getNodes:a}=t();let s,o=null;n?s=r.map(l=>La(l,!0)):(s=Fl(a(),r),o=Fl(i,[])),rp({changedNodes:s,changedEdges:o,get:t,set:e})},addSelectedEdges:r=>{const{multiSelectionActive:n,edges:i,getNodes:a}=t();let s,o=null;n?s=r.map(l=>La(l,!0)):(s=Fl(i,r),o=Fl(a(),[])),rp({changedNodes:o,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:r,edges:n}={})=>{const{edges:i,getNodes:a}=t(),s=r||a(),o=n||i,l=s.map(d=>(d.selected=!1,La(d.id,!1))),c=o.map(d=>La(d.id,!1));rp({changedNodes:l,changedEdges:c,get:t,set:e})},setMinZoom:r=>{const{d3Zoom:n,maxZoom:i}=t();n==null||n.scaleExtent([r,i]),e({minZoom:r})},setMaxZoom:r=>{const{d3Zoom:n,minZoom:i}=t();n==null||n.scaleExtent([i,r]),e({maxZoom:r})},setTranslateExtent:r=>{var n;(n=t().d3Zoom)==null||n.translateExtent(r),e({translateExtent:r})},resetSelectedElements:()=>{const{edges:r,getNodes:n}=t(),a=n().filter(o=>o.selected).map(o=>La(o.id,!1)),s=r.filter(o=>o.selected).map(o=>La(o.id,!1));rp({changedNodes:a,changedEdges:s,get:t,set:e})},setNodeExtent:r=>{const{nodeInternals:n}=t();n.forEach(i=>{i.positionAbsolute=Q_(i.position,r)}),e({nodeExtent:r,nodeInternals:new Map(n)})},panBy:r=>{const{transform:n,width:i,height:a,d3Zoom:s,d3Selection:o,translateExtent:l}=t();if(!s||!o||!r.x&&!r.y)return!1;const c=ia.translate(n[0]+r.x,n[1]+r.y).scale(n[2]),d=[[0,0],[i,a]],f=s==null?void 0:s.constrain()(c,d,l);return s.transform(o,f),n[0]!==f.x||n[1]!==f.y||n[2]!==f.k},cancelConnection:()=>e({connectionNodeId:ka.connectionNodeId,connectionHandleId:ka.connectionHandleId,connectionHandleType:ka.connectionHandleType,connectionStatus:ka.connectionStatus,connectionStartHandle:ka.connectionStartHandle,connectionEndHandle:ka.connectionEndHandle}),reset:()=>e({...ka})}),Object.is),oS=({children:e})=>{const t=w.useRef(null);return t.current||(t.current=fH()),k.createElement($W,{value:t.current},e)};oS.displayName="ReactFlowProvider";const $3=({children:e})=>w.useContext(by)?k.createElement(k.Fragment,null,e):k.createElement(oS,null,e);$3.displayName="ReactFlowWrapper";const hH={input:d3,default:Bb,output:h3,group:iS},pH={default:$m,straight:tS,step:eS,smoothstep:_y,simplebezier:J_},mH=[0,0],gH=[15,15],yH={x:0,y:0,zoom:1},vH={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},M3=w.forwardRef(({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,className:i,nodeTypes:a=hH,edgeTypes:s=pH,onNodeClick:o,onEdgeClick:l,onInit:c,onMove:d,onMoveStart:f,onMoveEnd:h,onConnect:p,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:b,onNodeMouseLeave:S,onNodeContextMenu:_,onNodeDoubleClick:j,onNodeDragStart:N,onNodeDrag:A,onNodeDragStop:E,onNodesDelete:C,onEdgesDelete:P,onSelectionChange:T,onSelectionDragStart:$,onSelectionDrag:O,onSelectionDragStop:R,onSelectionContextMenu:M,onSelectionStart:F,onSelectionEnd:D,connectionMode:I=qo.Strict,connectionLineType:L=Va.Bezier,connectionLineStyle:W,connectionLineComponent:U,connectionLineContainerStyle:G,deleteKeyCode:X="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:ue=!1,selectionMode:we=pf.Full,panActivationKeyCode:je="Space",multiSelectionKeyCode:Z=Tm()?"Meta":"Control",zoomActivationKeyCode:ae=Tm()?"Meta":"Control",snapToGrid:ge=!1,snapGrid:Y=gH,onlyRenderVisibleElements:$e=!1,selectNodesOnDrag:xe=!0,nodesDraggable:Ae,nodesConnectable:Be,nodesFocusable:Oe,nodeOrigin:de=mH,edgesFocusable:dt,edgesUpdatable:B,elementsSelectable:V,defaultViewport:q=yH,minZoom:ie=.5,maxZoom:te=2,translateExtent:Q=Ub,preventScrolling:he=!0,nodeExtent:De,defaultMarkerColor:We="#b1b1b7",zoomOnScroll:zt=!0,zoomOnPinch:pi=!0,panOnScroll:ft=!1,panOnScrollSpeed:Kr=.5,panOnScrollMode:Dn=co.Free,zoomOnDoubleClick:Ln=!0,panOnDrag:Di=!0,onPaneClick:hn,onPaneMouseEnter:pn,onPaneMouseMove:Oa,onPaneMouseLeave:Rv,onPaneScroll:Au,onPaneContextMenu:Iv,children:Bj,onEdgeContextMenu:Us,onEdgeDoubleClick:YD,onEdgeMouseEnter:XD,onEdgeMouseMove:ZD,onEdgeMouseLeave:QD,onEdgeUpdate:JD,onEdgeUpdateStart:eL,onEdgeUpdateEnd:tL,onReconnect:rL,onReconnectStart:nL,onReconnectEnd:iL,reconnectRadius:aL=10,edgeUpdaterRadius:sL=10,onNodesChange:oL,onEdgesChange:lL,noDragClassName:cL="nodrag",noWheelClassName:uL="nowheel",noPanClassName:zj="nopan",fitView:dL=!1,fitViewOptions:fL,connectOnClick:hL=!0,attributionPosition:pL,proOptions:mL,defaultEdgeOptions:gL,elevateNodesOnSelect:yL=!0,elevateEdgesOnSelect:vL=!1,disableKeyboardA11y:Uj=!1,autoPanOnConnect:xL=!0,autoPanOnNodeDrag:bL=!0,connectionRadius:wL=20,isValidConnection:_L,onError:SL,style:jL,id:Wj,nodeDragThreshold:NL,...EL},OL)=>{const Dv=Wj||"1";return k.createElement("div",{...EL,style:{...jL,...vH},ref:OL,className:dr(["react-flow",i]),"data-testid":"rf__wrapper",id:Wj},k.createElement($3,null,k.createElement(dH,{onInit:c,onMove:d,onMoveStart:f,onMoveEnd:h,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:x,onNodeMouseMove:b,onNodeMouseLeave:S,onNodeContextMenu:_,onNodeDoubleClick:j,nodeTypes:a,edgeTypes:s,connectionLineType:L,connectionLineStyle:W,connectionLineComponent:U,connectionLineContainerStyle:G,selectionKeyCode:ne,selectionOnDrag:ue,selectionMode:we,deleteKeyCode:X,multiSelectionKeyCode:Z,panActivationKeyCode:je,zoomActivationKeyCode:ae,onlyRenderVisibleElements:$e,selectNodesOnDrag:xe,defaultViewport:q,translateExtent:Q,minZoom:ie,maxZoom:te,preventScrolling:he,zoomOnScroll:zt,zoomOnPinch:pi,zoomOnDoubleClick:Ln,panOnScroll:ft,panOnScrollSpeed:Kr,panOnScrollMode:Dn,panOnDrag:Di,onPaneClick:hn,onPaneMouseEnter:pn,onPaneMouseMove:Oa,onPaneMouseLeave:Rv,onPaneScroll:Au,onPaneContextMenu:Iv,onSelectionContextMenu:M,onSelectionStart:F,onSelectionEnd:D,onEdgeContextMenu:Us,onEdgeDoubleClick:YD,onEdgeMouseEnter:XD,onEdgeMouseMove:ZD,onEdgeMouseLeave:QD,onReconnect:rL??JD,onReconnectStart:nL??eL,onReconnectEnd:iL??tL,reconnectRadius:aL??sL,defaultMarkerColor:We,noDragClassName:cL,noWheelClassName:uL,noPanClassName:zj,elevateEdgesOnSelect:vL,rfId:Dv,disableKeyboardA11y:Uj,nodeOrigin:de,nodeExtent:De}),k.createElement(lV,{nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:p,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:y,nodesDraggable:Ae,nodesConnectable:Be,nodesFocusable:Oe,edgesFocusable:dt,edgesUpdatable:B,elementsSelectable:V,elevateNodesOnSelect:yL,minZoom:ie,maxZoom:te,nodeExtent:De,onNodesChange:oL,onEdgesChange:lL,snapToGrid:ge,snapGrid:Y,connectionMode:I,translateExtent:Q,connectOnClick:hL,defaultEdgeOptions:gL,fitView:dL,fitViewOptions:fL,onNodesDelete:C,onEdgesDelete:P,onNodeDragStart:N,onNodeDrag:A,onNodeDragStop:E,onSelectionDrag:O,onSelectionDragStart:$,onSelectionDragStop:R,noPanClassName:zj,nodeOrigin:de,rfId:Dv,autoPanOnConnect:xL,autoPanOnNodeDrag:bL,onError:SL,connectionRadius:wL,isValidConnection:_L,nodeDragThreshold:NL}),k.createElement(sV,{onSelectionChange:T}),Bj,k.createElement(RW,{proOptions:mL,position:pL}),k.createElement(hV,{rfId:Dv,disableKeyboardA11y:Uj})))});M3.displayName="ReactFlow";function R3(e){return t=>{const[r,n]=w.useState(t),i=w.useCallback(a=>n(s=>e(a,s)),[]);return[r,n,i]}}const xH=R3(w3),bH=R3(OV),I3=({id:e,x:t,y:r,width:n,height:i,style:a,color:s,strokeColor:o,strokeWidth:l,className:c,borderRadius:d,shapeRendering:f,onClick:h,selected:p})=>{const{background:g,backgroundColor:m}=a||{},v=s||g||m;return k.createElement("rect",{className:dr(["react-flow__minimap-node",{selected:p},c]),x:t,y:r,rx:d,ry:d,width:n,height:i,fill:v,stroke:o,strokeWidth:l,shapeRendering:f,onClick:h?y=>h(y,e):void 0})};I3.displayName="MiniMapNode";var wH=w.memo(I3);const _H=e=>e.nodeOrigin,SH=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),S0=e=>e instanceof Function?e:()=>e;function jH({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:r="",nodeBorderRadius:n=5,nodeStrokeWidth:i=2,nodeComponent:a=wH,onClick:s}){const o=ut(SH,nr),l=ut(_H),c=S0(t),d=S0(e),f=S0(r),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return k.createElement(k.Fragment,null,o.map(p=>{const{x:g,y:m}=Po(p,l).positionAbsolute;return k.createElement(a,{key:p.id,x:g,y:m,width:p.width,height:p.height,style:p.style,selected:p.selected,className:f(p),color:c(p),borderRadius:n,strokeColor:d(p),strokeWidth:i,shapeRendering:h,onClick:s,id:p.id})}))}var NH=w.memo(jH);const EH=200,OH=150,AH=e=>{const t=e.getNodes(),r={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:r,boundingRect:t.length>0?LW(Sy(t,e.nodeOrigin),r):r,rfId:e.rfId}},kH="react-flow__minimap-desc";function D3({style:e,className:t,nodeStrokeColor:r="transparent",nodeColor:n="#e2e2e2",nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:s=2,nodeComponent:o,maskColor:l="rgb(240, 240, 240, 0.6)",maskStrokeColor:c="none",maskStrokeWidth:d=1,position:f="bottom-right",onClick:h,onNodeClick:p,pannable:g=!1,zoomable:m=!1,ariaLabel:v="React Flow mini map",inversePan:y=!1,zoomStep:x=10,offsetScale:b=5}){const S=Yt(),_=w.useRef(null),{boundingRect:j,viewBB:N,rfId:A}=ut(AH,nr),E=(e==null?void 0:e.width)??EH,C=(e==null?void 0:e.height)??OH,P=j.width/E,T=j.height/C,$=Math.max(P,T),O=$*E,R=$*C,M=b*$,F=j.x-(O-j.width)/2-M,D=j.y-(R-j.height)/2-M,I=O+M*2,L=R+M*2,W=`${kH}-${A}`,U=w.useRef(0);U.current=$,w.useEffect(()=>{if(_.current){const ne=_n(_.current),ue=Z=>{const{transform:ae,d3Selection:ge,d3Zoom:Y}=S.getState();if(Z.sourceEvent.type!=="wheel"||!ge||!Y)return;const $e=-Z.sourceEvent.deltaY*(Z.sourceEvent.deltaMode===1?.05:Z.sourceEvent.deltaMode?1:.002)*x,xe=ae[2]*Math.pow(2,$e);Y.scaleTo(ge,xe)},we=Z=>{const{transform:ae,d3Selection:ge,d3Zoom:Y,translateExtent:$e,width:xe,height:Ae}=S.getState();if(Z.sourceEvent.type!=="mousemove"||!ge||!Y)return;const Be=U.current*Math.max(1,ae[2])*(y?-1:1),Oe={x:ae[0]-Z.sourceEvent.movementX*Be,y:ae[1]-Z.sourceEvent.movementY*Be},de=[[0,0],[xe,Ae]],dt=ia.translate(Oe.x,Oe.y).scale(ae[2]),B=Y.constrain()(dt,de,$e);Y.transform(ge,B)},je=U5().on("zoom",g?we:null).on("zoom.wheel",m?ue:null);return ne.call(je),()=>{ne.on("zoom",null)}}},[g,m,y,x]);const G=h?ne=>{const ue=Hn(ne);h(ne,{x:ue[0],y:ue[1]})}:void 0,X=p?(ne,ue)=>{const we=S.getState().nodeInternals.get(ue);p(ne,we)}:void 0;return k.createElement(wy,{position:f,style:e,className:dr(["react-flow__minimap",t]),"data-testid":"rf__minimap"},k.createElement("svg",{width:E,height:C,viewBox:`${F} ${D} ${I} ${L}`,role:"img","aria-labelledby":W,ref:_,onClick:G},v&&k.createElement("title",{id:W},v),k.createElement(NH,{onClick:X,nodeColor:n,nodeStrokeColor:r,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:o}),k.createElement("path",{className:"react-flow__minimap-mask",d:`M${F-M},${D-M}h${I+M*2}v${L+M*2}h${-I-M*2}z
|
||
M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fill:l,fillRule:"evenodd",stroke:c,strokeWidth:d,pointerEvents:"none"})))}D3.displayName="MiniMap";var PH=w.memo(D3);function TH(){return k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},k.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function CH(){return k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},k.createElement("path",{d:"M0 0h32v4.2H0z"}))}function $H(){return k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},k.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function MH(){return k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},k.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function RH(){return k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},k.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const pd=({children:e,className:t,...r})=>k.createElement("button",{type:"button",className:dr(["react-flow__controls-button",t]),...r},e);pd.displayName="ControlButton";const IH=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),L3=({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:n=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:s,onFitView:o,onInteractiveChange:l,className:c,children:d,position:f="bottom-left"})=>{const h=Yt(),[p,g]=w.useState(!1),{isInteractive:m,minZoomReached:v,maxZoomReached:y}=ut(IH,nr),{zoomIn:x,zoomOut:b,fitView:S}=aS();if(w.useEffect(()=>{g(!0)},[]),!p)return null;const _=()=>{x(),a==null||a()},j=()=>{b(),s==null||s()},N=()=>{S(i),o==null||o()},A=()=>{h.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),l==null||l(!m)};return k.createElement(wy,{className:dr(["react-flow__controls",c]),position:f,style:e,"data-testid":"rf__controls"},t&&k.createElement(k.Fragment,null,k.createElement(pd,{onClick:_,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:y},k.createElement(TH,null)),k.createElement(pd,{onClick:j,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:v},k.createElement(CH,null))),r&&k.createElement(pd,{className:"react-flow__controls-fitview",onClick:N,title:"fit view","aria-label":"fit view"},k.createElement($H,null)),n&&k.createElement(pd,{className:"react-flow__controls-interactive",onClick:A,title:"toggle interactivity","aria-label":"toggle interactivity"},m?k.createElement(RH,null):k.createElement(MH,null)),d)};L3.displayName="Controls";var DH=w.memo(L3),kn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(kn||(kn={}));function LH({color:e,dimensions:t,lineWidth:r}){return k.createElement("path",{stroke:e,strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function FH({color:e,radius:t}){return k.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const BH={[kn.Dots]:"#91919a",[kn.Lines]:"#eee",[kn.Cross]:"#e2e2e2"},zH={[kn.Dots]:1,[kn.Lines]:1,[kn.Cross]:6},UH=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function F3({id:e,variant:t=kn.Dots,gap:r=20,size:n,lineWidth:i=1,offset:a=2,color:s,style:o,className:l}){const c=w.useRef(null),{transform:d,patternId:f}=ut(UH,nr),h=s||BH[t],p=n||zH[t],g=t===kn.Dots,m=t===kn.Cross,v=Array.isArray(r)?r:[r,r],y=[v[0]*d[2]||1,v[1]*d[2]||1],x=p*d[2],b=m?[x,x]:y,S=g?[x/a,x/a]:[b[0]/a,b[1]/a];return k.createElement("svg",{className:dr(["react-flow__background",l]),style:{...o,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:c,"data-testid":"rf__background"},k.createElement("pattern",{id:f+e,x:d[0]%y[0],y:d[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`},g?k.createElement(FH,{color:h,radius:x/a}):k.createElement(LH,{dimensions:b,color:h,lineWidth:i})),k.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}F3.displayName="Background";var WH=w.memo(F3);function VH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const HH=w.forwardRef(VH);function qH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const Rm=w.forwardRef(qH);function KH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const B3=w.forwardRef(KH);function GH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"}))}const YH=w.forwardRef(GH);function XH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const Ws=w.forwardRef(XH);function ZH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"}))}const QH=w.forwardRef(ZH);function JH({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const sE=w.forwardRef(JH);function eq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const tq=w.forwardRef(eq);function rq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"}))}const nq=w.forwardRef(rq);function iq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z"}))}const aq=w.forwardRef(iq);function sq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const ph=w.forwardRef(sq);function oq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ii=w.forwardRef(oq);function lq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const cq=w.forwardRef(lq);function uq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const lS=w.forwardRef(uq);function dq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))}const fq=w.forwardRef(dq);function hq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const pq=w.forwardRef(hq);function mq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const oE=w.forwardRef(mq);function gq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const yq=w.forwardRef(gq);function vq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Wr=w.forwardRef(vq);function xq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Ko=w.forwardRef(xq);function bq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"}))}const Zs=w.forwardRef(bq);function wq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"}))}const To=w.forwardRef(wq);function _q({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"}))}const jy=w.forwardRef(_q);function Sq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))}const jq=w.forwardRef(Sq);function Nq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const md=w.forwardRef(Nq);function Eq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"}))}const Oq=w.forwardRef(Eq);function Aq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const z3=w.forwardRef(Aq);function kq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const Im=w.forwardRef(kq);function Pq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const Tq=w.forwardRef(Pq);function Cq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const cS=w.forwardRef(Cq);function $q({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const gf=w.forwardRef($q);function Mq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const uS=w.forwardRef(Mq);function Rq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const Iq=w.forwardRef(Rq);function Dq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const lE=w.forwardRef(Dq);function Lq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"}))}const Fq=w.forwardRef(Lq);function Bq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const cE=w.forwardRef(Bq);function zq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const dS=w.forwardRef(zq);function Uq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25v13.5m-7.5-13.5v13.5"}))}const Dm=w.forwardRef(Uq);function Wq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const yf=w.forwardRef(Wq);function Vq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const ai=w.forwardRef(Vq);function Hq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Go=w.forwardRef(Hq);function qq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 17.25v-.228a4.5 4.5 0 0 0-.12-1.03l-2.268-9.64a3.375 3.375 0 0 0-3.285-2.602H7.923a3.375 3.375 0 0 0-3.285 2.602l-2.268 9.64a4.5 4.5 0 0 0-.12 1.03v.228m19.5 0a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3m19.5 0a3 3 0 0 0-3-3H5.25a3 3 0 0 0-3 3m16.5 0h.008v.008h-.008v-.008Zm-3 0h.008v.008h-.008v-.008Z"}))}const gd=w.forwardRef(qq);function Kq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}const Gq=w.forwardRef(Kq);function Yq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))}const j0=w.forwardRef(Yq);function Xq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const uE=w.forwardRef(Xq);function Zq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}const fS=w.forwardRef(Zq);function Qq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const U3=w.forwardRef(Qq);function Jq({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Wb=w.forwardRef(Jq);function eK({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"}))}const W3=w.forwardRef(eK);function tK({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const V3=w.forwardRef(tK);function rK({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z"}))}const nK=w.forwardRef(rK);function iK({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const si=w.forwardRef(iK);function aK({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Ny=w.forwardRef(aK),H3=w.createContext(void 0),Uu="https://hive.home.deepblack.cloud/api",sK=({children:e})=>{const[t,r]=w.useState(null),[n,i]=w.useState(null),[a,s]=w.useState(!0),o=!!t&&!!n;w.useEffect(()=>{(async()=>{try{const x=localStorage.getItem("hive_tokens"),b=localStorage.getItem("hive_user");if(x&&b){const S=JSON.parse(x),_=JSON.parse(b);await l(S)?(i(S),r(_)):await c(S)||m()}}catch(x){console.error("Error initializing auth:",x),m()}finally{s(!1)}})()},[]);const l=async y=>{try{return(await fetch(`${Uu}/auth/me`,{headers:{Authorization:`Bearer ${y.access_token}`}})).ok}catch{return!1}},c=async y=>{try{const x=await fetch(`${Uu}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:y.refresh_token})});if(x.ok){const b=await x.json(),S={access_token:b.access_token,refresh_token:b.refresh_token,token_type:b.token_type,expires_in:b.expires_in};return i(S),r(b.user),localStorage.setItem("hive_tokens",JSON.stringify(S)),localStorage.setItem("hive_user",JSON.stringify(b.user)),!0}else return!1}catch(x){return console.error("Token refresh failed:",x),!1}},d=async(y,x)=>{try{const b=new FormData;b.append("username",y),b.append("password",x);const S=await fetch(`${Uu}/auth/login`,{method:"POST",body:b});if(!S.ok){const N=await S.json();throw new Error(N.detail||"Login failed")}const _=await S.json(),j={access_token:_.access_token,refresh_token:_.refresh_token,token_type:_.token_type,expires_in:_.expires_in};i(j),r(_.user),localStorage.setItem("hive_tokens",JSON.stringify(j)),localStorage.setItem("hive_user",JSON.stringify(_.user))}catch(b){throw new Error(b.message||"Login failed")}},f=async y=>{try{const x=await fetch(`${Uu}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)});if(!x.ok){const _=await x.json();throw new Error(_.detail||"Registration failed")}const b=await x.json(),S={access_token:b.access_token,refresh_token:b.refresh_token,token_type:b.token_type,expires_in:3600};i(S),r(b.user),localStorage.setItem("hive_tokens",JSON.stringify(S)),localStorage.setItem("hive_user",JSON.stringify(b.user))}catch(x){throw console.error("Registration failed:",x),x}},h=async()=>{try{n&&await fetch(`${Uu}/auth/logout`,{method:"POST",headers:{Authorization:`Bearer ${n.access_token}`}})}catch(y){console.error("Logout API call failed:",y)}finally{m()}},p=async()=>n!=null&&n.refresh_token?await c(n):!1,g=y=>{if(t){const x={...t,...y};r(x),localStorage.setItem("hive_user",JSON.stringify(x))}},m=()=>{r(null),i(null),localStorage.removeItem("hive_tokens"),localStorage.removeItem("hive_user")},v={user:t,tokens:n,isAuthenticated:o,isLoading:a,login:d,register:f,logout:h,refreshToken:p,updateUser:g};return u.jsx(H3.Provider,{value:v,children:e})},Ey=()=>{const e=w.useContext(H3);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function q3({isDropdown:e=!1,onClose:t}){const{user:r,logout:n}=Ey(),i=Is(),[a,s]=w.useState(!1),[o,l]=w.useState((r==null?void 0:r.name)||(r==null?void 0:r.full_name)||""),c=()=>{console.log("Saving user profile:",{name:o}),s(!1)},d=()=>{l((r==null?void 0:r.name)||(r==null?void 0:r.full_name)||""),s(!1)},f=()=>{n(),t==null||t()};return r?e?u.jsxs("div",{className:"w-64 bg-white rounded-lg shadow-lg border p-4",children:[u.jsxs("div",{className:"flex items-center space-x-3 pb-4 border-b",children:[u.jsx(Wb,{className:"h-12 w-12 text-gray-400"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-medium text-gray-900",children:r.name||r.full_name||r.username}),u.jsxs("p",{className:"text-sm text-gray-500",children:["@",r.username]}),u.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:r.role||(r.is_superuser?"Admin":"User")})]})]}),u.jsxs("div",{className:"pt-4 space-y-2",children:[u.jsxs("button",{onClick:()=>{i("/profile"),t==null||t()},className:"w-full flex items-center px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md",children:[u.jsx(Ko,{className:"h-4 w-4 mr-3"}),"View Profile"]}),u.jsxs("button",{onClick:f,className:"w-full flex items-center px-3 py-2 text-sm text-red-700 hover:bg-red-50 rounded-md",children:[u.jsx(YH,{className:"h-4 w-4 mr-3"}),"Sign out"]})]})]}):u.jsx("div",{className:"max-w-2xl mx-auto",children:u.jsxs("div",{className:"bg-white shadow rounded-lg",children:[u.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[u.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"User Profile"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Manage your account settings and preferences"})]}),u.jsxs("div",{className:"px-6 py-4",children:[u.jsxs("div",{className:"flex items-center space-x-6 mb-6",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Wb,{className:"h-24 w-24 text-gray-400"}),u.jsx("button",{className:"absolute bottom-0 right-0 bg-blue-600 text-white rounded-full p-2 hover:bg-blue-700",children:u.jsx(yf,{className:"h-4 w-4"})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:r.name||r.full_name||r.username}),u.jsxs("p",{className:"text-gray-600",children:["@",r.username]}),u.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-100 text-blue-800 mt-2",children:r.role||(r.is_superuser?"Admin":"User")})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Full Name"}),a?u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("input",{type:"text",value:o,onChange:h=>l(h.target.value),className:"flex-1 border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"}),u.jsx("button",{onClick:c,className:"p-2 text-green-600 hover:text-green-800",children:u.jsx(cq,{className:"h-5 w-5"})}),u.jsx("button",{onClick:d,className:"p-2 text-red-600 hover:text-red-800",children:u.jsx(Ny,{className:"h-5 w-5"})})]}):u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-gray-900",children:r.name||r.full_name||r.username}),u.jsx("button",{onClick:()=>s(!0),className:"text-blue-600 hover:text-blue-800",children:u.jsx(yf,{className:"h-4 w-4"})})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Username"}),u.jsx("span",{className:"text-gray-900",children:r.username}),u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Username cannot be changed"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),u.jsx("span",{className:"text-gray-900",children:r.email||"Not set"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Role"}),u.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-100 text-blue-800",children:r.role||(r.is_superuser?"Admin":"User")}),u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Role is managed by system administrators"})]})]}),u.jsx("div",{className:"mt-8 pt-6 border-t border-gray-200",children:u.jsxs("div",{className:"flex space-x-4",children:[u.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 text-sm font-medium",children:"Change Password"}),u.jsx("button",{onClick:f,className:"bg-red-600 text-white px-4 py-2 rounded-md hover:bg-red-700 text-sm font-medium",children:"Sign Out"})]})})]})]})}):null}const oK=[{name:"Dashboard",href:"/",icon:Iq},{name:"Projects",href:"/projects",icon:gf},{name:"Workflows",href:"/workflows",icon:Ko},{name:"Cluster",href:"/cluster",icon:To},{name:"Executions",href:"/executions",icon:ai},{name:"Agents",href:"/agents",icon:W3},{name:"Analytics",href:"/analytics",icon:ph},{name:"Settings",href:"/settings",icon:HH}];function ar({children:e}){const[t,r]=w.useState(!1),[n,i]=w.useState(!1),a=Rs(),{user:s}=Ey(),o=w.useRef(null);w.useEffect(()=>{function c(d){o.current&&!o.current.contains(d.target)&&i(!1)}if(n)return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const l=oK.map(c=>({...c,current:a.pathname===c.href||c.href!=="/"&&a.pathname.startsWith(c.href)}));return u.jsxs("div",{className:"min-h-screen bg-gray-50 flex",children:[t&&u.jsxs("div",{className:"fixed inset-0 z-40 lg:hidden",children:[u.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-75",onClick:()=>r(!1)}),u.jsxs("div",{className:"fixed inset-y-0 left-0 flex flex-col w-64 bg-white shadow-xl",children:[u.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("span",{className:"text-2xl",children:"🐝"}),u.jsx("span",{className:"text-lg font-semibold text-gray-900",children:"Hive"})]}),u.jsx("button",{onClick:()=>r(!1),className:"text-gray-400 hover:text-gray-600",children:u.jsx(Ny,{className:"h-6 w-6"})})]}),u.jsx("nav",{className:"flex-1 px-4 py-4 space-y-1",children:l.map(c=>u.jsxs(Nt,{to:c.href,className:`
|
||
group flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors
|
||
${c.current?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"}
|
||
`,onClick:()=>r(!1),children:[u.jsx(c.icon,{className:`mr-3 h-5 w-5 ${c.current?"text-blue-500":"text-gray-400"}`}),c.name]},c.name))})]})]}),u.jsx("div",{className:"hidden lg:flex lg:flex-shrink-0",children:u.jsxs("div",{className:"flex flex-col w-64 bg-white border-r border-gray-200",children:[u.jsxs("div",{className:"flex items-center px-6 py-4 border-b",children:[u.jsx("span",{className:"text-2xl mr-2",children:"🐝"}),u.jsx("span",{className:"text-xl font-semibold text-gray-900",children:"Hive"})]}),u.jsx("nav",{className:"flex-1 px-4 py-4 space-y-1",children:l.map(c=>u.jsxs(Nt,{to:c.href,className:`
|
||
group flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors
|
||
${c.current?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"}
|
||
`,children:[u.jsx(c.icon,{className:`mr-3 h-5 w-5 ${c.current?"text-blue-500":"text-gray-400"}`}),c.name]},c.name))}),u.jsx("div",{className:"border-t p-4",children:u.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-500",children:[u.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"}),u.jsx("span",{children:"All systems operational"})]})})]})}),u.jsxs("div",{className:"flex-1 flex flex-col",children:[u.jsx("div",{className:"bg-white border-b border-gray-200 px-4 py-2",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("button",{onClick:()=>r(!0),className:"lg:hidden text-gray-400 hover:text-gray-600",children:u.jsx(tq,{className:"h-6 w-6"})}),u.jsxs("div",{className:"lg:hidden flex items-center space-x-2",children:[u.jsx("span",{className:"text-2xl",children:"🐝"}),u.jsx("span",{className:"text-lg font-semibold text-gray-900",children:"Hive"})]})]}),u.jsxs("div",{className:"relative",ref:o,children:[u.jsxs("button",{onClick:()=>i(!n),className:"flex items-center space-x-2 text-sm text-gray-700 hover:text-gray-900 focus:outline-none",children:[u.jsx(Wb,{className:"h-8 w-8 text-gray-400"}),u.jsx("span",{className:"hidden sm:block",children:(s==null?void 0:s.name)||(s==null?void 0:s.full_name)||(s==null?void 0:s.username)}),u.jsx(lS,{className:"h-4 w-4"})]}),n&&u.jsx("div",{className:"absolute right-0 mt-2 z-50",children:u.jsx(q3,{isDropdown:!0,onClose:()=>i(!1)})})]})]})}),u.jsx("main",{className:"flex-1 overflow-auto",children:e})]})]})}const Ci=Object.create(null);Ci.open="0";Ci.close="1";Ci.ping="2";Ci.pong="3";Ci.message="4";Ci.upgrade="5";Ci.noop="6";const Fp=Object.create(null);Object.keys(Ci).forEach(e=>{Fp[Ci[e]]=e});const Vb={type:"error",data:"parser error"},K3=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",G3=typeof ArrayBuffer=="function",Y3=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hS=({type:e,data:t},r,n)=>K3&&t instanceof Blob?r?n(t):dE(t,n):G3&&(t instanceof ArrayBuffer||Y3(t))?r?n(t):dE(new Blob([t]),n):n(Ci[e]+(t||"")),dE=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function fE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let N0;function lK(e,t){if(K3&&e.data instanceof Blob)return e.data.arrayBuffer().then(fE).then(t);if(G3&&(e.data instanceof ArrayBuffer||Y3(e.data)))return t(fE(e.data));hS(e,!1,r=>{N0||(N0=new TextEncoder),t(N0.encode(r))})}const hE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<hE.length;e++)yd[hE.charCodeAt(e)]=e;const cK=e=>{let t=e.length*.75,r=e.length,n,i=0,a,s,o,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(n=0;n<r;n+=4)a=yd[e.charCodeAt(n)],s=yd[e.charCodeAt(n+1)],o=yd[e.charCodeAt(n+2)],l=yd[e.charCodeAt(n+3)],d[i++]=a<<2|s>>4,d[i++]=(s&15)<<4|o>>2,d[i++]=(o&3)<<6|l&63;return c},uK=typeof ArrayBuffer=="function",pS=(e,t)=>{if(typeof e!="string")return{type:"message",data:X3(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:dK(e.substring(1),t)}:Fp[r]?e.length>1?{type:Fp[r],data:e.substring(1)}:{type:Fp[r]}:Vb},dK=(e,t)=>{if(uK){const r=cK(e);return X3(r,t)}else return{base64:!0,data:e}},X3=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Z3="",fK=(e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach((a,s)=>{hS(a,!1,o=>{n[s]=o,++i===r&&t(n.join(Z3))})})},hK=(e,t)=>{const r=e.split(Z3),n=[];for(let i=0;i<r.length;i++){const a=pS(r[i],t);if(n.push(a),a.type==="error")break}return n};function pK(){return new TransformStream({transform(e,t){lK(e,r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(r)})}})}let E0;function ip(e){return e.reduce((t,r)=>t+r.length,0)}function ap(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let i=0;i<t;i++)r[i]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function mK(e,t){E0||(E0=new TextDecoder);const r=[];let n=0,i=-1,a=!1;return new TransformStream({transform(s,o){for(r.push(s);;){if(n===0){if(ip(r)<1)break;const l=ap(r,1);a=(l[0]&128)===128,i=l[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(ip(r)<2)break;const l=ap(r,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),n=3}else if(n===2){if(ip(r)<8)break;const l=ap(r,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){o.enqueue(Vb);break}i=d*Math.pow(2,32)+c.getUint32(4),n=3}else{if(ip(r)<i)break;const l=ap(r,i);o.enqueue(pS(a?l:E0.decode(l),t)),n=0}if(i===0||i>e){o.enqueue(Vb);break}}}})}const Q3=4;function Ft(e){if(e)return gK(e)}function gK(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ft.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,i=0;i<r.length;i++)if(n=r[i],n===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks["$"+e],this};Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,t)}return this};Ft.prototype.emitReserved=Ft.prototype.emit;Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Oy=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),wn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),yK="arraybuffer";function J3(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}const vK=wn.setTimeout,xK=wn.clearTimeout;function Ay(e,t){t.useNativeTimers?(e.setTimeoutFn=vK.bind(wn),e.clearTimeoutFn=xK.bind(wn)):(e.setTimeoutFn=wn.setTimeout.bind(wn),e.clearTimeoutFn=wn.clearTimeout.bind(wn))}const bK=1.33;function wK(e){return typeof e=="string"?_K(e):Math.ceil((e.byteLength||e.size)*bK)}function _K(e){let t=0,r=0;for(let n=0,i=e.length;n<i;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}function eM(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function SK(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function jK(e){let t={},r=e.split("&");for(let n=0,i=r.length;n<i;n++){let a=r[n].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class NK extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class mS extends Ft{constructor(t){super(),this.writable=!1,Ay(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,n){return super.emitReserved("error",new NK(t,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=pS(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=SK(t);return r.length?"?"+r:""}}class EK extends mS{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};hK(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,fK(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=eM()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let tM=!1;try{tM=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const OK=tM;function AK(){}class kK extends EK{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}let tc=class Bp extends Ft{constructor(t,r,n){super(),this.createRequest=t,Ay(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=J3(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Bp.requestsCount++,Bp.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=AK,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Bp.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};tc.requestsCount=0;tc.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pE);else if(typeof addEventListener=="function"){const e="onpagehide"in wn?"pagehide":"unload";addEventListener(e,pE,!1)}}function pE(){for(let e in tc.requests)tc.requests.hasOwnProperty(e)&&tc.requests[e].abort()}const PK=function(){const e=rM({xdomain:!1});return e&&e.responseType!==null}();class TK extends kK{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=PK&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new tc(rM,this.uri(),t)}}function rM(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||OK))return new XMLHttpRequest}catch{}if(!t)try{return new wn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const nM=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CK extends mS{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,n=nM?{}:J3(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],i=r===t.length-1;hS(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}i&&Oy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=eM()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const O0=wn.WebSocket||wn.MozWebSocket;class $K extends CK{createSocket(t,r,n){return nM?new O0(t,r,n):r?new O0(t,r):new O0(t)}doWrite(t,r){this.ws.send(r)}}class MK extends mS{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=mK(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),i=pK();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{n.read().then(({done:o,value:l})=>{o||(this.onPacket(l),a())}).catch(o=>{})};a();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],i=r===t.length-1;this._writer.write(n).then(()=>{i&&Oy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const RK={websocket:$K,webtransport:MK,polling:TK},IK=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,DK=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Hb(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=IK.exec(e||""),a={},s=14;for(;s--;)a[DK[s]]=i[s]||"";return r!=-1&&n!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=LK(a,a.path),a.queryKey=FK(a,a.query),a}function LK(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function FK(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}const qb=typeof addEventListener=="function"&&typeof removeEventListener=="function",zp=[];qb&&addEventListener("offline",()=>{zp.forEach(e=>e())},!1);class _s extends Ft{constructor(t,r){if(super(),this.binaryType=yK,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=Hb(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Hb(r.host).host);Ay(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=jK(this.opts.query)),qb&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},zp.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=Q3,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&_s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",_s.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(r+=wK(i)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Oy(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,i){if(typeof r=="function"&&(i=r,r=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:t,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(_s.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),qb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=zp.indexOf(this._offlineEventListener);n!==-1&&zp.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}_s.protocol=Q3;class BK extends _s{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),n=!1;_s.priorWebsocketSuccess=!1;const i=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",f=>{if(!n)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;_s.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=r.name,this.emitReserved("upgradeError",h)}}))};function a(){n||(n=!0,d(),r.close(),r=null)}const s=f=>{const h=new Error("probe error: "+f);h.transport=r.name,a(),this.emitReserved("upgradeError",h)};function o(){s("transport closed")}function l(){s("socket closed")}function c(f){r&&f.name!==r.name&&a()}const d=()=>{r.removeListener("open",i),r.removeListener("error",s),r.removeListener("close",o),this.off("close",l),this.off("upgrading",c)};r.once("open",i),r.once("error",s),r.once("close",o),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}}let zK=class extends BK{constructor(t,r={}){const n=typeof t=="object"?t:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(i=>RK[i]).filter(i=>!!i)),super(t,n)}};function UK(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=Hb(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+t,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const WK=typeof ArrayBuffer=="function",VK=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iM=Object.prototype.toString,HK=typeof Blob=="function"||typeof Blob<"u"&&iM.call(Blob)==="[object BlobConstructor]",qK=typeof File=="function"||typeof File<"u"&&iM.call(File)==="[object FileConstructor]";function gS(e){return WK&&(e instanceof ArrayBuffer||VK(e))||HK&&e instanceof Blob||qK&&e instanceof File}function Up(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(Up(e[r]))return!0;return!1}if(gS(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Up(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Up(e[r]))return!0;return!1}function KK(e){const t=[],r=e.data,n=e;return n.data=Kb(r,t),n.attachments=t.length,{packet:n,buffers:t}}function Kb(e,t){if(!e)return e;if(gS(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=Kb(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Kb(e[n],t));return r}return e}function GK(e,t){return e.data=Gb(e.data,t),delete e.attachments,e}function Gb(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Gb(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Gb(e[r],t));return e}const YK=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],XK=5;var Ue;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ue||(Ue={}));class ZK{constructor(t){this.replacer=t}encode(t){return(t.type===Ue.EVENT||t.type===Ue.ACK)&&Up(t)?this.encodeAsBinary({type:t.type===Ue.EVENT?Ue.BINARY_EVENT:Ue.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===Ue.BINARY_EVENT||t.type===Ue.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=KK(t),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}}function mE(e){return Object.prototype.toString.call(e)==="[object Object]"}class yS extends Ft{constructor(t){super(),this.reviver=t}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const n=r.type===Ue.BINARY_EVENT;n||r.type===Ue.BINARY_ACK?(r.type=n?Ue.EVENT:Ue.ACK,this.reconstructor=new QK(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(gS(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const n={type:Number(t.charAt(0))};if(Ue[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ue.BINARY_EVENT||n.type===Ue.BINARY_ACK){const a=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const s=t.substring(a,r);if(s!=Number(s)||t.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(t.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(a,r)}else n.nsp="/";const i=t.charAt(r+1);if(i!==""&&Number(i)==i){const a=r+1;for(;++r;){const s=t.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===t.length)break}n.id=Number(t.substring(a,r+1))}if(t.charAt(++r)){const a=this.tryParse(t.substr(r));if(yS.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case Ue.CONNECT:return mE(r);case Ue.DISCONNECT:return r===void 0;case Ue.CONNECT_ERROR:return typeof r=="string"||mE(r);case Ue.EVENT:case Ue.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&YK.indexOf(r[0])===-1);case Ue.ACK:case Ue.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class QK{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=GK(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const JK=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yS,Encoder:ZK,get PacketType(){return Ue},protocol:XK},Symbol.toStringTag,{value:"Module"}));function qn(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const eG=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class aM extends Ft{constructor(t,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[qn(t,"open",this.onopen.bind(this)),qn(t,"packet",this.onpacket.bind(this)),qn(t,"error",this.onerror.bind(this)),qn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var n,i,a;if(eG.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const s={type:Ue.EVENT,data:r};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const d=this.ids++,f=r.pop();this._registerAckCallback(d,f),s.id=d}const o=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!o||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,r){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[t]=r;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);r.call(this,new Error("operation has timed out"))},i),s=(...o)=>{this.io.clearTimeoutFn(a),r.apply(this,o)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...r){return new Promise((n,i)=>{const a=(s,o)=>s?i(s):n(o);a.withError=!0,r.push(a),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ue.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ue.EVENT:case Ue.BINARY_EVENT:this.onevent(t);break;case Ue.ACK:case Ue.BINARY_ACK:this.onack(t);break;case Ue.DISCONNECT:this.ondisconnect();break;case Ue.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...i){n||(n=!0,r.packet({type:Ue.ACK,id:t,data:i}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}function hu(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}hu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};hu.prototype.reset=function(){this.attempts=0};hu.prototype.setMin=function(e){this.ms=e};hu.prototype.setMax=function(e){this.max=e};hu.prototype.setJitter=function(e){this.jitter=e};class Yb extends Ft{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Ay(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new hu({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const i=r.parser||JK;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new zK(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=qn(r,"open",function(){n.onopen(),t&&t()}),a=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),t?t(o):this.maybeReconnectOnOpen()},s=qn(r,"error",a);if(this._timeout!==!1){const o=this._timeout,l=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),r.close()},o);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qn(t,"ping",this.onping.bind(this)),qn(t,"data",this.ondata.bind(this)),qn(t,"error",this.onerror.bind(this)),qn(t,"close",this.onclose.bind(this)),qn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){Oy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new aM(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wu={};function A0(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=UK(e,t.path||"/socket.io"),n=r.source,i=r.id,a=r.path,s=Wu[i]&&a in Wu[i].nsps,o=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return o?l=new Yb(n,t):(Wu[i]||(Wu[i]=new Yb(n,t)),l=Wu[i]),r.query&&!t.query&&(t.query=r.queryKey),l.socket(r.path,t)}Object.assign(A0,{Manager:Yb,Socket:aM,io:A0,connect:A0});w.createContext(null);function sr({children:e,requiredRole:t}){const{isAuthenticated:r,isLoading:n,user:i}=Ey(),a=Is(),s=Rs();return w.useEffect(()=>{if(!n){if(!r){a("/login",{state:{from:s.pathname},replace:!0});return}if(t&&((i==null?void 0:i.role)||(i!=null&&i.is_superuser?"Admin":"User"))!==t){a("/",{replace:!0});return}}},[r,n,i,a,s.pathname,t]),n?u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):r?t&&((i==null?void 0:i.role)||(i!=null&&i.is_superuser?"Admin":"User"))!==t?u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Access Denied"}),u.jsx("p",{className:"text-gray-600 mt-2",children:"You don't have permission to access this page."})]})}):u.jsx(u.Fragment,{children:e}):null}function tG(){var g;const e=Is(),t=Rs(),{login:r}=Ey(),[n,i]=w.useState({username:"",password:""}),[a,s]=w.useState(!1),[o,l]=w.useState(!1),[c,d]=w.useState(null),f=((g=t.state)==null?void 0:g.from)||"/",h=async m=>{m.preventDefault(),l(!0),d(null);try{await r(n.username,n.password),e(f)}catch(v){d(v.message||"Login failed. Please try again.")}finally{l(!1)}},p=(m,v)=>{i(y=>({...y,[m]:v})),c&&d(null)};return u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"max-w-md w-full space-y-8",children:[u.jsxs("div",{children:[u.jsx("div",{className:"mx-auto h-16 w-16 bg-blue-600 rounded-lg flex items-center justify-center",children:u.jsx("span",{className:"text-white text-2xl font-bold",children:"H"})}),u.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900",children:"Sign in to Hive"}),u.jsx("p",{className:"mt-2 text-center text-sm text-gray-600",children:"Distributed AI Management Platform"})]}),u.jsxs("form",{className:"mt-8 space-y-6",onSubmit:h,children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-gray-700",children:"Username"}),u.jsxs("div",{className:"mt-1 relative",children:[u.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:u.jsx(V3,{className:"h-5 w-5 text-gray-400"})}),u.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,value:n.username,onChange:m=>p("username",m.target.value),className:"appearance-none relative block w-full pl-10 pr-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm",placeholder:"Enter your username"})]})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700",children:"Password"}),u.jsxs("div",{className:"mt-1 relative",children:[u.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:u.jsx(Fq,{className:"h-5 w-5 text-gray-400"})}),u.jsx("input",{id:"password",name:"password",type:a?"text":"password",autoComplete:"current-password",required:!0,value:n.password,onChange:m=>p("password",m.target.value),className:"appearance-none relative block w-full pl-10 pr-10 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm",placeholder:"Enter your password"}),u.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:u.jsx("button",{type:"button",onClick:()=>s(!a),className:"text-gray-400 hover:text-gray-600",children:a?u.jsx(Tq,{className:"h-5 w-5"}):u.jsx(cS,{className:"h-5 w-5"})})})]})]})]}),c&&u.jsx("div",{className:"rounded-md bg-red-50 p-4",children:u.jsxs("div",{className:"flex",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx(z3,{className:"h-5 w-5 text-red-400"})}),u.jsxs("div",{className:"ml-3",children:[u.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Authentication failed"}),u.jsx("div",{className:"mt-2 text-sm text-red-700",children:u.jsx("p",{children:c})})]})]})}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("input",{id:"remember-me",name:"remember-me",type:"checkbox",className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),u.jsx("label",{htmlFor:"remember-me",className:"ml-2 block text-sm text-gray-900",children:"Remember me"})]}),u.jsx("div",{className:"text-sm",children:u.jsx("a",{href:"#",className:"font-medium text-blue-600 hover:text-blue-500",children:"Forgot your password?"})})]}),u.jsx("div",{children:u.jsx("button",{type:"submit",disabled:o,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:o?u.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white"}):"Sign in"})}),u.jsx("div",{className:"rounded-md bg-blue-50 p-4",children:u.jsxs("div",{className:"text-sm text-blue-800",children:[u.jsx("p",{className:"font-medium",children:"Demo Credentials:"}),u.jsxs("p",{children:["Username: ",u.jsx("code",{className:"bg-blue-100 px-1 rounded",children:"admin"})]}),u.jsxs("p",{children:["Password: ",u.jsx("code",{className:"bg-blue-100 px-1 rounded",children:"hiveadmin"})]})]})})]})]})})}const rG=[{id:"general",name:"General",description:"Basic system configuration and preferences",icon:Ko},{id:"cluster",name:"Cluster Management",description:"Configure cluster nodes, models, and resources",icon:gd},{id:"users",name:"User Management",description:"Manage users, roles, and permissions",icon:W3},{id:"security",name:"Security",description:"Authentication, authorization, and security policies",icon:Gq},{id:"notifications",name:"Notifications",description:"Configure alerts, webhooks, and notification channels",icon:nq},{id:"monitoring",name:"Monitoring",description:"Metrics collection, retention, and dashboard settings",icon:ph},{id:"advanced",name:"Advanced",description:"System tuning, performance optimization, and debugging",icon:nK},{id:"logs",name:"Logs & Audit",description:"Log management, audit trails, and compliance",icon:md}];function nG(){const[e,t]=w.useState("general"),r=()=>{switch(e){case"general":return u.jsx(gE,{});case"cluster":return u.jsx(iG,{});case"users":return u.jsx(aG,{});case"security":return u.jsx(sG,{});case"notifications":return u.jsx(oG,{});case"monitoring":return u.jsx(lG,{});case"advanced":return u.jsx(cG,{});case"logs":return u.jsx(uG,{});default:return u.jsx(gE,{})}};return u.jsx("div",{className:"min-h-screen bg-gray-50",children:u.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[u.jsxs("div",{className:"mb-8",children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Settings"}),u.jsx("p",{className:"text-gray-600 mt-2",children:"Configure and manage your Hive distributed AI platform"})]}),u.jsxs("div",{className:"flex gap-8",children:[u.jsx("div",{className:"w-80 flex-shrink-0",children:u.jsxs("div",{className:"bg-white rounded-lg shadow-sm border",children:[u.jsx("div",{className:"p-4 border-b",children:u.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Configuration"})}),u.jsx("nav",{className:"p-2",children:rG.map(n=>u.jsx("button",{onClick:()=>t(n.id),className:`w-full text-left p-3 rounded-lg mb-1 transition-colors ${e===n.id?"bg-blue-50 text-blue-900 border border-blue-200":"text-gray-700 hover:bg-gray-50"}`,children:u.jsxs("div",{className:"flex items-start space-x-3",children:[u.jsx(n.icon,{className:`h-5 w-5 mt-0.5 flex-shrink-0 ${e===n.id?"text-blue-600":"text-gray-400"}`}),u.jsxs("div",{children:[u.jsx("div",{className:"font-medium",children:n.name}),u.jsx("div",{className:"text-sm text-gray-500 mt-1",children:n.description})]})]})},n.id))})]})}),u.jsx("div",{className:"flex-1",children:u.jsx("div",{className:"bg-white rounded-lg shadow-sm border",children:r()})})]})]})})}function gE(){const[e,t]=w.useState({systemName:"Hive Development Cluster",description:"Distributed AI development platform for collaborative coding",timezone:"Australia/Melbourne",language:"en-US",autoRefresh:!0,refreshInterval:30});return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"General Settings"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Basic system configuration and preferences"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"System Information"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"System Name"}),u.jsx("input",{type:"text",value:e.systemName,onChange:r=>t({...e,systemName:r.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Timezone"}),u.jsxs("select",{value:e.timezone,onChange:r=>t({...e,timezone:r.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[u.jsx("option",{value:"Australia/Melbourne",children:"Australia/Melbourne"}),u.jsx("option",{value:"UTC",children:"UTC"}),u.jsx("option",{value:"America/New_York",children:"America/New_York"}),u.jsx("option",{value:"Europe/London",children:"Europe/London"})]})]})]}),u.jsxs("div",{className:"mt-4",children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),u.jsx("textarea",{value:e.description,onChange:r=>t({...e,description:r.target.value}),rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Interface Settings"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-sm font-medium text-gray-900",children:"Auto Refresh"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Automatically refresh data in real-time"})]}),u.jsx("button",{onClick:()=>t({...e,autoRefresh:!e.autoRefresh}),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e.autoRefresh?"bg-blue-600":"bg-gray-200"}`,children:u.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${e.autoRefresh?"translate-x-6":"translate-x-1"}`})})]}),e.autoRefresh&&u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Refresh Interval (seconds)"}),u.jsx("input",{type:"number",min:"5",max:"300",value:e.refreshInterval,onChange:r=>t({...e,refreshInterval:parseInt(r.target.value)}),className:"w-32 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),u.jsx("div",{className:"pt-6 border-t",children:u.jsxs("div",{className:"flex space-x-3",children:[u.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 text-sm font-medium",children:"Save Changes"}),u.jsx("button",{className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-md hover:bg-gray-50 text-sm font-medium",children:"Reset to Defaults"})]})})]})]})}function iG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Cluster Management"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Configure cluster nodes, models, and resources"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Cluster Nodes"}),u.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"bg-white p-4 rounded-lg border",children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"WALNUT"}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Primary Node"}),u.jsx("div",{className:"mt-2",children:u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"Online"})})]}),u.jsxs("div",{className:"bg-white p-4 rounded-lg border",children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"IRONWOOD"}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"GPU Node - 2x GTX 1070 + 2x Tesla P4"}),u.jsx("div",{className:"mt-2",children:u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"Online"})})]}),u.jsxs("div",{className:"bg-white p-4 rounded-lg border",children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"ACACIA"}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Secondary Node"}),u.jsx("div",{className:"mt-2",children:u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"Offline"})})]})]})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Model Configuration"}),u.jsx("div",{className:"space-y-4",children:u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"Default Model"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Primary model for new tasks"})]}),u.jsxs("select",{className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[u.jsx("option",{value:"codellama:34b",children:"CodeLlama 34B"}),u.jsx("option",{value:"codellama:13b",children:"CodeLlama 13B"}),u.jsx("option",{value:"deepseek-coder:33b",children:"DeepSeek Coder 33B"})]})]})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Resource Limits"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Max Concurrent Tasks per Node"}),u.jsx("input",{type:"number",min:"1",max:"10",defaultValue:"2",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Task Timeout (minutes)"}),u.jsx("input",{type:"number",min:"5",max:"120",defaultValue:"30",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]})]})]})}function aG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"User Management"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Manage users, roles, and permissions"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[u.jsx("h3",{className:"text-lg font-medium text-blue-900 mb-2",children:"Development Mode"}),u.jsx("p",{className:"text-blue-800",children:"User management is currently in development mode. Only the demo admin account is available. Full user management features will be implemented in a future release."})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Current Users"}),u.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"User"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Role"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Login"})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"h-8 w-8 bg-blue-100 rounded-full flex items-center justify-center",children:u.jsx("span",{className:"text-blue-600 font-medium text-sm",children:"A"})}),u.jsxs("div",{className:"ml-3",children:[u.jsx("div",{className:"text-sm font-medium text-gray-900",children:"Administrator"}),u.jsx("div",{className:"text-sm text-gray-500",children:"admin@hive.local"})]})]})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:"Administrator"})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"Active"})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:"Just now"})]})})]})})]})]})]})}function sG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Security Settings"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Authentication, authorization, and security policies"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[u.jsx("h3",{className:"text-lg font-medium text-yellow-900 mb-2",children:"Demo Mode"}),u.jsx("p",{className:"text-yellow-800",children:"Security features are currently in demo mode. Authentication uses mock tokens and passwords are not encrypted. Do not use in production environments."})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Authentication"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"Session Timeout"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Automatic logout after inactivity"})]}),u.jsxs("select",{className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[u.jsx("option",{value:"30",children:"30 minutes"}),u.jsx("option",{value:"60",children:"1 hour"}),u.jsx("option",{value:"240",children:"4 hours"}),u.jsx("option",{value:"480",children:"8 hours"})]})]}),u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"Remember Login"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Allow users to stay logged in across sessions"})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-blue-600",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-6"})})]})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"API Security"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"API Rate Limit (requests per minute)"}),u.jsx("input",{type:"number",min:"10",max:"1000",defaultValue:"60",className:"w-32 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"CORS Enabled"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Allow cross-origin requests"})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-blue-600",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-6"})})]})]})]})]})]})}function oG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Notification Settings"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Configure alerts, webhooks, and notification channels"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Email Notifications"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"Task Completion"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Notify when tasks complete or fail"})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-blue-600",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-6"})})]}),u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"System Alerts"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Notify about system issues and maintenance"})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-blue-600",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-6"})})]})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Webhook Configuration"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Webhook URL"}),u.jsx("input",{type:"url",placeholder:"https://your-webhook-endpoint.com/hive",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Events to Send"}),u.jsx("div",{className:"space-y-2",children:["task.completed","task.failed","agent.registered","system.alert"].map(e=>u.jsxs("label",{className:"flex items-center",children:[u.jsx("input",{type:"checkbox",className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500",defaultChecked:!0}),u.jsx("span",{className:"ml-2 text-sm text-gray-700",children:e})]},e))})]})]})]})]})]})}function lG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Monitoring Settings"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Metrics collection, retention, and dashboard settings"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Metrics Collection"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Collection Interval (seconds)"}),u.jsx("input",{type:"number",min:"10",max:"300",defaultValue:"30",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Retention Period (days)"}),u.jsx("input",{type:"number",min:"1",max:"365",defaultValue:"30",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Performance Monitoring"}),u.jsx("div",{className:"space-y-4",children:["CPU Usage","Memory Usage","GPU Utilization","Network I/O","Disk I/O"].map(e=>u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:e}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Monitor ",e.toLowerCase()," across cluster nodes"]})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-blue-600",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-6"})})]},e))})]})]})]})}function cG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Advanced Settings"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"System tuning, performance optimization, and debugging"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[u.jsx("h3",{className:"text-lg font-medium text-red-900 mb-2",children:"Warning"}),u.jsx("p",{className:"text-red-800",children:"These settings are for advanced users only. Incorrect configuration may impact system performance or stability."})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Debug & Logging"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Log Level"}),u.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[u.jsx("option",{value:"ERROR",children:"ERROR"}),u.jsx("option",{value:"WARN",children:"WARN"}),u.jsx("option",{value:"INFO",selected:!0,children:"INFO"}),u.jsx("option",{value:"DEBUG",children:"DEBUG"})]})]}),u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:"Enable Debug Mode"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Show detailed error messages and stack traces"})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-gray-200",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-1"})})]})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Performance Tuning"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Connection Pool Size"}),u.jsx("input",{type:"number",min:"5",max:"100",defaultValue:"20",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Worker Threads"}),u.jsx("input",{type:"number",min:"1",max:"16",defaultValue:"4",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]})]})]})}function uG(){return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"border-b pb-4 mb-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Logs & Audit"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Log management, audit trails, and compliance"})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Log Management"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Log Retention (days)"}),u.jsx("input",{type:"number",min:"1",max:"365",defaultValue:"90",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Max Log File Size (MB)"}),u.jsx("input",{type:"number",min:"10",max:"1000",defaultValue:"100",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Audit Trail"}),u.jsx("div",{className:"space-y-4",children:["User Authentication","Task Execution","Configuration Changes","API Access"].map(e=>u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-gray-50 rounded-lg",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900",children:e}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Log ",e.toLowerCase()," events"]})]}),u.jsx("button",{className:"relative inline-flex h-6 w-11 items-center rounded-full bg-blue-600",children:u.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white translate-x-6"})})]},e))})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Export Options"}),u.jsxs("div",{className:"flex space-x-3",children:[u.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 text-sm font-medium",children:"Export System Logs"}),u.jsx("button",{className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-md hover:bg-gray-50 text-sm font-medium",children:"Export Audit Trail"})]})]})]})]})}function dG({title:e,titleId:t,...r},n){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))}const Vu=w.forwardRef(dG);function fG({data:e,columns:t,searchable:r=!0,searchPlaceholder:n="Search...",pageSize:i=10,loading:a=!1,emptyMessage:s="No data available",className:o="",onRowClick:l}){const[c,d]=w.useState(""),[f,h]=w.useState(null),[p,g]=w.useState({}),[m,v]=w.useState(1),[y,x]=w.useState(!1),b=(T,$)=>typeof $=="string"&&$.includes(".")?$.split(".").reduce((O,R)=>O==null?void 0:O[R],T):T[$],S=w.useMemo(()=>{let T=[...e];return c&&(T=T.filter($=>t.some(O=>{const R=b($,O.key);return String(R).toLowerCase().includes(c.toLowerCase())}))),Object.entries(p).forEach(([$,O])=>{O!==""&&O!==null&&O!==void 0&&(T=T.filter(R=>{const M=b(R,$);return typeof O=="string"?String(M).toLowerCase().includes(O.toLowerCase()):M===O}))}),T},[e,c,p,t]),_=w.useMemo(()=>f?[...S].sort((T,$)=>{const O=b(T,f.key),R=b($,f.key);return O==null?1:R==null?-1:O<R?f.direction==="asc"?-1:1:O>R?f.direction==="asc"?1:-1:0}):S,[S,f]),j=w.useMemo(()=>{const T=(m-1)*i;return _.slice(T,T+i)},[_,m,i]),N=Math.ceil(_.length/i),A=T=>{if(!T.sortable)return;const $=T.key;let O="asc";f&&f.key===$&&f.direction==="asc"&&(O="desc"),h({key:$,direction:O})},E=(T,$)=>{g(O=>({...O,[T]:$})),v(1)},C=()=>{g({}),d(""),v(1)},P=T=>T.sortable?!f||f.key!==T.key?u.jsx(oE,{className:"h-4 w-4 text-gray-300"}):f.direction==="asc"?u.jsx(oE,{className:"h-4 w-4 text-blue-600"}):u.jsx(lS,{className:"h-4 w-4 text-blue-600"}):null;return a?u.jsx("div",{className:`bg-white rounded-lg shadow-sm border ${o}`,children:u.jsxs("div",{className:"p-8 text-center",children:[u.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto"}),u.jsx("p",{className:"text-gray-500 mt-2",children:"Loading..."})]})}):u.jsxs("div",{className:`bg-white rounded-lg shadow-sm border ${o}`,children:[u.jsxs("div",{className:"p-4 border-b border-gray-200",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-4",children:[r&&u.jsxs("div",{className:"relative",children:[u.jsx(dS,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),u.jsx("input",{type:"text",placeholder:n,value:c,onChange:T=>{d(T.target.value),v(1)},className:"pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),u.jsxs("button",{onClick:()=>x(!y),className:`flex items-center space-x-2 px-3 py-2 text-sm font-medium rounded-md transition-colors ${y||Object.keys(p).some(T=>p[T])?"bg-blue-100 text-blue-700":"text-gray-700 hover:bg-gray-100"}`,children:[u.jsx(uS,{className:"h-4 w-4"}),u.jsx("span",{children:"Filters"})]}),(c||Object.keys(p).some(T=>p[T]))&&u.jsxs("button",{onClick:C,className:"flex items-center space-x-2 px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md",children:[u.jsx(Ny,{className:"h-4 w-4"}),u.jsx("span",{children:"Clear"})]})]}),u.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",j.length," of ",_.length," entries"]})]}),y&&u.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200",children:u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:t.filter(T=>T.filterable).map(T=>{var $;return u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:T.header}),T.filterType==="select"?u.jsxs("select",{value:p[String(T.key)]||"",onChange:O=>E(String(T.key),O.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[u.jsx("option",{value:"",children:"All"}),($=T.filterOptions)==null?void 0:$.map(O=>u.jsx("option",{value:O.value,children:O.label},O.value))]}):u.jsx("input",{type:T.filterType||"text",value:p[String(T.key)]||"",onChange:O=>E(String(T.key),O.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:`Filter ${T.header.toLowerCase()}...`})]},String(T.key))})})})]}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsx("tr",{children:t.map(T=>u.jsx("th",{className:`px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider ${T.sortable?"cursor-pointer hover:bg-gray-100":""} ${T.width?T.width:""}`,onClick:()=>A(T),children:u.jsxs("div",{className:"flex items-center space-x-1",children:[u.jsx("span",{children:T.header}),P(T)]})},String(T.key)))})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:j.length===0?u.jsx("tr",{children:u.jsx("td",{colSpan:t.length,className:"px-6 py-12 text-center text-gray-500",children:s})}):j.map((T,$)=>u.jsx("tr",{className:`hover:bg-gray-50 ${l?"cursor-pointer":""}`,onClick:()=>l==null?void 0:l(T),children:t.map(O=>{const R=b(T,O.key);return u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:O.render?O.render(T,R):String(R||"")},String(O.key))})},$))})]})}),N>1&&u.jsx("div",{className:"px-6 py-4 border-t border-gray-200",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"text-sm text-gray-700",children:["Page ",m," of ",N]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("button",{onClick:()=>v(T=>Math.max(T-1,1)),disabled:m===1,className:"relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed rounded-md",children:u.jsx(fq,{className:"h-4 w-4"})}),Array.from({length:Math.min(5,N)},(T,$)=>{const O=Math.max(1,Math.min(N-4,m-2))+$;return O>N?null:u.jsx("button",{onClick:()=>v(O),className:`relative inline-flex items-center px-3 py-2 border text-sm font-medium rounded-md ${m===O?"bg-blue-600 border-blue-600 text-white":"bg-white border-gray-300 text-gray-700 hover:bg-gray-50"}`,children:O},O)}),u.jsx("button",{onClick:()=>v(T=>Math.min(T+1,N)),disabled:m===N,className:"relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed rounded-md",children:u.jsx(pq,{className:"h-4 w-4"})})]})]})})]})}function Lm(e){"@babel/helpers - typeof";return Lm=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},Lm(e)}function Yo(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function yt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function lt(e){yt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Lm(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function hG(e,t){yt(2,arguments);var r=lt(e).getTime(),n=Yo(t);return new Date(r+n)}var pG={};function mh(){return pG}function Xb(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Wp(e,t){yt(2,arguments);var r=lt(e),n=lt(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function mG(e){return yt(1,arguments),e instanceof Date||Lm(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gG(e){if(yt(1,arguments),!mG(e)&&typeof e!="number")return!1;var t=lt(e);return!isNaN(Number(t))}function yG(e,t){yt(2,arguments);var r=lt(e),n=lt(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function vG(e,t){return yt(2,arguments),lt(e).getTime()-lt(t).getTime()}var xG={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},bG="trunc";function wG(e){return xG[bG]}function _G(e){yt(1,arguments);var t=lt(e);return t.setHours(23,59,59,999),t}function SG(e){yt(1,arguments);var t=lt(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function jG(e){yt(1,arguments);var t=lt(e);return _G(t).getTime()===SG(t).getTime()}function NG(e,t){yt(2,arguments);var r=lt(e),n=lt(t),i=Wp(r,n),a=Math.abs(yG(r,n)),s;if(a<1)s=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var o=Wp(r,n)===-i;jG(lt(e))&&a===1&&Wp(e,n)===1&&(o=!1),s=i*(a-Number(o))}return s===0?0:s}function EG(e,t,r){yt(2,arguments);var n=vG(e,t)/1e3;return wG()(n)}function OG(e,t){yt(2,arguments);var r=Yo(t);return hG(e,-r)}var AG=864e5;function kG(e){yt(1,arguments);var t=lt(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/AG)+1}function Fm(e){yt(1,arguments);var t=1,r=lt(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function sM(e){yt(1,arguments);var t=lt(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=Fm(n),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var s=Fm(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}function PG(e){yt(1,arguments);var t=sM(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Fm(r);return n}var TG=6048e5;function CG(e){yt(1,arguments);var t=lt(e),r=Fm(t).getTime()-PG(t).getTime();return Math.round(r/TG)+1}function Bm(e,t){var r,n,i,a,s,o,l,c;yt(1,arguments);var d=mh(),f=Yo((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=lt(e),p=h.getUTCDay(),g=(p<f?7:0)+p-f;return h.setUTCDate(h.getUTCDate()-g),h.setUTCHours(0,0,0,0),h}function oM(e,t){var r,n,i,a,s,o,l,c;yt(1,arguments);var d=lt(e),f=d.getUTCFullYear(),h=mh(),p=Yo((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:h.firstWeekContainsDate)!==null&&n!==void 0?n:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(f+1,0,p),g.setUTCHours(0,0,0,0);var m=Bm(g,t),v=new Date(0);v.setUTCFullYear(f,0,p),v.setUTCHours(0,0,0,0);var y=Bm(v,t);return d.getTime()>=m.getTime()?f+1:d.getTime()>=y.getTime()?f:f-1}function $G(e,t){var r,n,i,a,s,o,l,c;yt(1,arguments);var d=mh(),f=Yo((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=oM(e,t),p=new Date(0);p.setUTCFullYear(h,0,f),p.setUTCHours(0,0,0,0);var g=Bm(p,t);return g}var MG=6048e5;function RG(e,t){yt(1,arguments);var r=lt(e),n=Bm(r,t).getTime()-$G(r,t).getTime();return Math.round(n/MG)+1}function Ze(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Pa={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return Ze(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Ze(n+1,2)},d:function(t,r){return Ze(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Ze(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Ze(t.getUTCHours(),r.length)},m:function(t,r){return Ze(t.getUTCMinutes(),r.length)},s:function(t,r){return Ze(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return Ze(a,r.length)}},xl={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},IG={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return Pa.y(t,r)},Y:function(t,r,n,i){var a=oM(t,i),s=a>0?a:1-a;if(r==="YY"){var o=s%100;return Ze(o,2)}return r==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ze(s,r.length)},R:function(t,r){var n=sM(t);return Ze(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Ze(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Ze(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Ze(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return Pa.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Ze(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=RG(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):Ze(a,r.length)},I:function(t,r,n){var i=CG(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Ze(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Pa.d(t,r)},D:function(t,r,n){var i=kG(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ze(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return Ze(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return Ze(s,r.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return Ze(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=xl.noon:i===0?a=xl.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=xl.evening:i>=12?a=xl.afternoon:i>=4?a=xl.morning:a=xl.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Pa.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Pa.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ze(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ze(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Pa.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Pa.s(t,r)},S:function(t,r){return Pa.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return vE(s);case"XXXX":case"XX":return Qs(s);case"XXXXX":case"XXX":default:return Qs(s,":")}},x:function(t,r,n,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(r){case"x":return vE(s);case"xxxx":case"xx":return Qs(s);case"xxxxx":case"xxx":default:return Qs(s,":")}},O:function(t,r,n,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yE(s,":");case"OOOO":default:return"GMT"+Qs(s,":")}},z:function(t,r,n,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yE(s,":");case"zzzz":default:return"GMT"+Qs(s,":")}},t:function(t,r,n,i){var a=i._originalDate||t,s=Math.floor(a.getTime()/1e3);return Ze(s,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,s=a.getTime();return Ze(s,r.length)}};function yE(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var s=t;return r+String(i)+s+Ze(a,2)}function vE(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Ze(Math.abs(e)/60,2)}return Qs(e,t)}function Qs(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=Ze(Math.floor(i/60),2),s=Ze(i%60,2);return n+a+r+s}var xE=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},lM=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},DG=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return xE(t,r);var s;switch(i){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",xE(i,r)).replace("{{time}}",lM(a,r))},LG={p:lM,P:DG},FG=["D","DD"],BG=["YY","YYYY"];function zG(e){return FG.indexOf(e)!==-1}function UG(e){return BG.indexOf(e)!==-1}function bE(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var WG={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},VG=function(t,r,n){var i,a=WG[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function k0(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var HG={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qG={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KG={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},GG={date:k0({formats:HG,defaultWidth:"full"}),time:k0({formats:qG,defaultWidth:"full"}),dateTime:k0({formats:KG,defaultWidth:"full"})},YG={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},XG=function(t,r,n,i){return YG[t]};function Hu(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{var o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var ZG={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},QG={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},JG={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},eY={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},tY={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},rY={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nY=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},iY={ordinalNumber:nY,era:Hu({values:ZG,defaultWidth:"wide"}),quarter:Hu({values:QG,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Hu({values:JG,defaultWidth:"wide"}),day:Hu({values:eY,defaultWidth:"wide"}),dayPeriod:Hu({values:tY,defaultWidth:"wide",formattingValues:rY,defaultFormattingWidth:"wide"})};function qu(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var s=a[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?sY(o,function(f){return f.test(s)}):aY(o,function(f){return f.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}function aY(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function sY(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function oY(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=r.valueCallback?r.valueCallback(s):s;var o=t.slice(i.length);return{value:s,rest:o}}}var lY=/^(\d+)(th|st|nd|rd)?/i,cY=/\d+/i,uY={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dY={any:[/^b/i,/^(a|c)/i]},fY={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hY={any:[/1/i,/2/i,/3/i,/4/i]},pY={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},mY={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gY={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yY={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vY={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xY={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},bY={ordinalNumber:oY({matchPattern:lY,parsePattern:cY,valueCallback:function(t){return parseInt(t,10)}}),era:qu({matchPatterns:uY,defaultMatchWidth:"wide",parsePatterns:dY,defaultParseWidth:"any"}),quarter:qu({matchPatterns:fY,defaultMatchWidth:"wide",parsePatterns:hY,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:qu({matchPatterns:pY,defaultMatchWidth:"wide",parsePatterns:mY,defaultParseWidth:"any"}),day:qu({matchPatterns:gY,defaultMatchWidth:"wide",parsePatterns:yY,defaultParseWidth:"any"}),dayPeriod:qu({matchPatterns:vY,defaultMatchWidth:"any",parsePatterns:xY,defaultParseWidth:"any"})},cM={code:"en-US",formatDistance:VG,formatLong:GG,formatRelative:XG,localize:iY,match:bY,options:{weekStartsOn:0,firstWeekContainsDate:1}},wY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_Y=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SY=/^'([^]*?)'?$/,jY=/''/g,NY=/[a-zA-Z]/;function Cd(e,t,r){var n,i,a,s,o,l,c,d,f,h,p,g,m,v;yt(2,arguments);var y=String(t),x=mh(),b=(n=(i=void 0)!==null&&i!==void 0?i:x.locale)!==null&&n!==void 0?n:cM,S=Yo((a=(s=(o=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&o!==void 0?o:x.firstWeekContainsDate)!==null&&s!==void 0?s:(c=x.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=Yo((f=(h=(p=(g=void 0)!==null&&g!==void 0?g:void 0)!==null&&p!==void 0?p:x.weekStartsOn)!==null&&h!==void 0?h:(m=x.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&f!==void 0?f:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var j=lt(e);if(!gG(j))throw new RangeError("Invalid time value");var N=Xb(j),A=OG(j,N),E={firstWeekContainsDate:S,weekStartsOn:_,locale:b,_originalDate:j},C=y.match(_Y).map(function(P){var T=P[0];if(T==="p"||T==="P"){var $=LG[T];return $(P,b.formatLong)}return P}).join("").match(wY).map(function(P){if(P==="''")return"'";var T=P[0];if(T==="'")return EY(P);var $=IG[T];if($)return UG(P)&&bE(P,t,String(e)),zG(P)&&bE(P,t,String(e)),$(A,P,b.localize,E);if(T.match(NY))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return P}).join("");return C}function EY(e){var t=e.match(SY);return t?t[1].replace(jY,"'"):e}function uM(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function OY(e){return uM({},e)}var wE=1440,AY=2520,P0=43200,kY=86400;function PY(e,t,r){var n,i;yt(2,arguments);var a=mh(),s=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:cM;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var o=Wp(e,t);if(isNaN(o))throw new RangeError("Invalid time value");var l=uM(OY(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:o}),c,d;o>0?(c=lt(t),d=lt(e)):(c=lt(e),d=lt(t));var f=EG(d,c),h=(Xb(d)-Xb(c))/1e3,p=Math.round((f-h)/60),g;if(p<2)return r!=null&&r.includeSeconds?f<5?s.formatDistance("lessThanXSeconds",5,l):f<10?s.formatDistance("lessThanXSeconds",10,l):f<20?s.formatDistance("lessThanXSeconds",20,l):f<40?s.formatDistance("halfAMinute",0,l):f<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):p===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",p,l);if(p<45)return s.formatDistance("xMinutes",p,l);if(p<90)return s.formatDistance("aboutXHours",1,l);if(p<wE){var m=Math.round(p/60);return s.formatDistance("aboutXHours",m,l)}else{if(p<AY)return s.formatDistance("xDays",1,l);if(p<P0){var v=Math.round(p/wE);return s.formatDistance("xDays",v,l)}else if(p<kY)return g=Math.round(p/P0),s.formatDistance("aboutXMonths",g,l)}if(g=NG(d,c),g<12){var y=Math.round(p/P0);return s.formatDistance("xMonths",y,l)}else{var x=g%12,b=Math.floor(g/12);return x<3?s.formatDistance("aboutXYears",b,l):x<9?s.formatDistance("overXYears",b,l):s.formatDistance("almostXYears",b+1,l)}}function rc(e,t){return yt(1,arguments),PY(e,Date.now(),t)}function TY(){const[e,t]=w.useState(null),[r,n]=w.useState(!1),[i,a]=w.useState("all"),{data:s=[],isLoading:o,refetch:l}=rn({queryKey:["workflow-templates"],queryFn:async()=>c()}),c=()=>{const y=["Development","Testing","Data Processing","Documentation","DevOps","AI/ML"],x=["beginner","intermediate","advanced"],b=["kernel_dev","pytorch_dev","profiler","docs_writer","tester"];return["Python Code Review Pipeline","React Component Generator","API Documentation Builder","Database Migration Runner","Model Training Pipeline","Test Suite Generator","Security Audit Workflow","Performance Profiling","Docker Container Builder","CI/CD Pipeline Setup","Data Validation Framework","Microservice Scaffold","Machine Learning Experiment","Code Quality Analysis","Deployment Automation"].map((_,j)=>{const N=y[Math.floor(Math.random()*y.length)],A=x[Math.floor(Math.random()*x.length)],E=Math.floor(Math.random()*8)+3,C=Array.from({length:E},(T,$)=>({id:`step-${$+1}`,name:`Step ${$+1}`,type:["task","condition","loop","parallel"][Math.floor(Math.random()*4)],agent_type:b[Math.floor(Math.random()*b.length)],description:`Description for step ${$+1}`,config:{timeout:300,retry_count:3},dependencies:$>0?[`step-${$}`]:[]})),P=[{name:"project_path",type:"string",required:!0,description:"Path to the project directory"},{name:"environment",type:"string",required:!1,default_value:"development",description:"Target environment"}];return{id:`template-${String(j+1).padStart(3,"0")}`,name:_,description:`${_} workflow template for automated ${N.toLowerCase()} tasks`,category:N,difficulty:A,estimated_duration:Math.floor(Math.random()*120)+15,created_by:`user-${Math.floor(Math.random()*5)+1}`,created_at:new Date(Date.now()-Math.random()*90*24*60*60*1e3).toISOString(),updated_at:new Date(Date.now()-Math.random()*30*24*60*60*1e3).toISOString(),usage_count:Math.floor(Math.random()*500),rating:Math.round((Math.random()*2+3)*10)/10,is_favorite:Math.random()>.8,tags:[N.toLowerCase(),A,"automation"].concat(Math.random()>.5?["popular"]:[],Math.random()>.7?["community"]:[]),steps:C,variables:P,version:`1.${Math.floor(Math.random()*10)}.${Math.floor(Math.random()*10)}`,is_public:Math.random()>.3}})},d=y=>`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${{beginner:"bg-green-100 text-green-800",intermediate:"bg-yellow-100 text-yellow-800",advanced:"bg-red-100 text-red-800"}[y]}`,f=y=>{const b={Development:yf,Testing:ai,"Data Processing":md,Documentation:md,DevOps:gf,"AI/ML":j0}[y]||md;return u.jsx(b,{className:"h-4 w-4"})},h=y=>{console.log("Toggle favorite for template:",y.id),l()},p=(y,x)=>{console.log(`${y} template:`,x.id),l()},g=["all",...Array.from(new Set(s.map(y=>y.category)))],m=i==="all"?s:s.filter(y=>y.category===i),v=[{key:"name",header:"Template",sortable:!0,filterable:!0,render:y=>u.jsxs("div",{className:"flex items-start space-x-3",children:[u.jsx("div",{className:"flex-shrink-0 mt-1",children:f(y.category)}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("span",{className:"font-medium text-gray-900",children:y.name}),y.is_favorite&&u.jsx(Vu,{className:"h-4 w-4 text-yellow-500"})]}),u.jsx("p",{className:"text-sm text-gray-500 mt-1 line-clamp-2",children:y.description}),u.jsxs("div",{className:"flex items-center space-x-2 mt-2",children:[u.jsx("span",{className:d(y.difficulty),children:y.difficulty}),u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:y.category})]})]})]})},{key:"estimated_duration",header:"Duration",sortable:!0,render:y=>u.jsxs("div",{className:"flex items-center space-x-1 text-sm text-gray-900",children:[u.jsx(Wr,{className:"h-4 w-4 text-gray-400"}),u.jsxs("span",{children:[y.estimated_duration,"m"]})]})},{key:"usage_count",header:"Usage",sortable:!0,render:y=>u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-sm font-medium text-gray-900",children:y.usage_count}),u.jsx("div",{className:"text-xs text-gray-500",children:"times used"})]})},{key:"rating",header:"Rating",sortable:!0,render:y=>u.jsxs("div",{className:"flex items-center space-x-1",children:[u.jsx(Vu,{className:"h-4 w-4 text-yellow-500"}),u.jsx("span",{className:"text-sm font-medium text-gray-900",children:y.rating})]})},{key:"created_by",header:"Author",sortable:!0,filterable:!0,render:y=>u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(V3,{className:"h-4 w-4 text-gray-400"}),u.jsx("span",{className:"text-sm text-gray-900",children:y.created_by})]})},{key:"updated_at",header:"Updated",sortable:!0,render:y=>u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-900",children:rc(new Date(y.updated_at),{addSuffix:!0})}),u.jsxs("div",{className:"text-xs text-gray-500",children:["v",y.version]})]})},{key:"actions",header:"Actions",render:y=>u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("button",{onClick:x=>{x.stopPropagation(),t(y),n(!0)},className:"text-blue-600 hover:text-blue-800",title:"View Details",children:u.jsx(cS,{className:"h-4 w-4"})}),u.jsx("button",{onClick:x=>{x.stopPropagation(),h(y)},className:`${y.is_favorite?"text-yellow-500":"text-gray-400"} hover:text-yellow-600`,title:"Toggle Favorite",children:y.is_favorite?u.jsx(Vu,{className:"h-4 w-4"}):u.jsx(j0,{className:"h-4 w-4"})}),u.jsx("button",{onClick:x=>{x.stopPropagation(),p("use",y)},className:"text-green-600 hover:text-green-800",title:"Use Template",children:u.jsx(ai,{className:"h-4 w-4"})}),u.jsx("button",{onClick:x=>{x.stopPropagation(),p("duplicate",y)},className:"text-purple-600 hover:text-purple-800",title:"Duplicate Template",children:u.jsx(jq,{className:"h-4 w-4"})})]})}];return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Workflow Templates"}),u.jsx("p",{className:"text-gray-600 mt-1",children:"Discover and manage reusable workflow templates for common development tasks"})]}),u.jsxs("button",{onClick:()=>console.log("Create template form coming soon"),className:"bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 flex items-center space-x-2",children:[u.jsx(Go,{className:"h-4 w-4"}),u.jsx("span",{children:"Create Template"})]})]}),u.jsx("div",{className:"mb-6",children:u.jsx("div",{className:"flex items-center space-x-2 overflow-x-auto",children:g.map(y=>u.jsx("button",{onClick:()=>a(y),className:`px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors ${i===y?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-100"}`,children:y==="all"?"All Categories":y},y))})}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-6",children:[u.jsx("div",{className:"bg-white rounded-lg shadow-sm border p-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Templates"}),u.jsx("p",{className:"text-2xl font-bold text-gray-900",children:s.length})]}),u.jsx(md,{className:"h-8 w-8 text-blue-500"})]})}),u.jsx("div",{className:"bg-white rounded-lg shadow-sm border p-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Favorites"}),u.jsx("p",{className:"text-2xl font-bold text-gray-900",children:s.filter(y=>y.is_favorite).length})]}),u.jsx(Vu,{className:"h-8 w-8 text-yellow-500"})]})}),u.jsx("div",{className:"bg-white rounded-lg shadow-sm border p-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Usage"}),u.jsx("p",{className:"text-2xl font-bold text-gray-900",children:s.reduce((y,x)=>y+x.usage_count,0).toLocaleString()})]}),u.jsx(ai,{className:"h-8 w-8 text-green-500"})]})}),u.jsx("div",{className:"bg-white rounded-lg shadow-sm border p-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Avg Rating"}),u.jsx("p",{className:"text-2xl font-bold text-gray-900",children:(s.reduce((y,x)=>y+x.rating,0)/s.length).toFixed(1)})]}),u.jsx(j0,{className:"h-8 w-8 text-purple-500"})]})})]}),u.jsx(fG,{data:m,columns:v,loading:o,searchPlaceholder:"Search templates...",pageSize:10,emptyMessage:"No templates found",onRowClick:y=>{t(y),n(!0)}}),r&&e&&u.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:u.jsxs("div",{className:"flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[u.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:()=>n(!1)}),u.jsxs("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full",children:[u.jsxs("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 max-h-96 overflow-y-auto",children:[u.jsxs("div",{className:"flex items-start justify-between mb-4",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[f(e.category),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900",children:e.name}),u.jsxs("p",{className:"text-sm text-gray-500",children:["v",e.version]})]})]}),u.jsx("button",{onClick:()=>n(!1),className:"text-gray-400 hover:text-gray-600",children:"×"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Description"}),u.jsx("p",{className:"text-sm text-gray-700",children:e.description})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Details"}),u.jsxs("div",{className:"space-y-2 text-sm",children:[u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-gray-600",children:"Category:"}),u.jsx("span",{className:"font-medium",children:e.category})]}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-gray-600",children:"Difficulty:"}),u.jsx("span",{className:d(e.difficulty),children:e.difficulty})]}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-gray-600",children:"Duration:"}),u.jsxs("span",{className:"font-medium",children:[e.estimated_duration," minutes"]})]}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-gray-600",children:"Rating:"}),u.jsxs("div",{className:"flex items-center space-x-1",children:[u.jsx(Vu,{className:"h-4 w-4 text-yellow-500"}),u.jsx("span",{className:"font-medium",children:e.rating})]})]}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("span",{className:"text-gray-600",children:"Usage Count:"}),u.jsx("span",{className:"font-medium",children:e.usage_count})]})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Tags"}),u.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map((y,x)=>u.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:[u.jsx(fS,{className:"h-3 w-3 mr-1"}),y]},x))})]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsxs("h4",{className:"font-medium text-gray-900 mb-2",children:["Workflow Steps (",e.steps.length,")"]}),u.jsx("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:e.steps.map(y=>u.jsxs("div",{className:"border border-gray-200 rounded p-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-gray-900",children:y.name}),u.jsx("span",{className:"text-xs text-gray-500",children:y.type})]}),u.jsx("p",{className:"text-xs text-gray-600 mt-1",children:y.description}),y.agent_type&&u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800 mt-1",children:y.agent_type})]},y.id))})]}),u.jsxs("div",{children:[u.jsxs("h4",{className:"font-medium text-gray-900 mb-2",children:["Variables (",e.variables.length,")"]}),u.jsx("div",{className:"space-y-2 max-h-32 overflow-y-auto",children:e.variables.map((y,x)=>u.jsxs("div",{className:"border border-gray-200 rounded p-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-gray-900",children:y.name}),u.jsxs("div",{className:"flex items-center space-x-1",children:[u.jsx("span",{className:"text-xs text-gray-500",children:y.type}),y.required&&u.jsx("span",{className:"text-xs text-red-600",children:"*"})]})]}),u.jsx("p",{className:"text-xs text-gray-600 mt-1",children:y.description})]},x))})]})]})]})]}),u.jsxs("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[u.jsx("button",{onClick:()=>p("use",e),className:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm",children:"Use Template"}),u.jsx("button",{onClick:()=>n(!1),className:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",children:"Close"})]})]})]})})]})}function dM(e,t){return function(){return e.apply(t,arguments)}}const{toString:CY}=Object.prototype,{getPrototypeOf:vS}=Object,{iterator:ky,toStringTag:fM}=Symbol,Py=(e=>t=>{const r=CY.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>Py(t)===e),Ty=e=>t=>typeof t===e,{isArray:pu}=Array,vf=Ty("undefined");function $Y(e){return e!==null&&!vf(e)&&e.constructor!==null&&!vf(e.constructor)&&Vr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hM=di("ArrayBuffer");function MY(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hM(e.buffer),t}const RY=Ty("string"),Vr=Ty("function"),pM=Ty("number"),Cy=e=>e!==null&&typeof e=="object",IY=e=>e===!0||e===!1,Vp=e=>{if(Py(e)!=="object")return!1;const t=vS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(fM in e)&&!(ky in e)},DY=di("Date"),LY=di("File"),FY=di("Blob"),BY=di("FileList"),zY=e=>Cy(e)&&Vr(e.pipe),UY=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Vr(e.append)&&((t=Py(e))==="formdata"||t==="object"&&Vr(e.toString)&&e.toString()==="[object FormData]"))},WY=di("URLSearchParams"),[VY,HY,qY,KY]=["ReadableStream","Request","Response","Headers"].map(di),GY=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gh(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),pu(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let o;for(n=0;n<s;n++)o=a[n],t.call(null,e[o],o,e)}}function mM(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const uo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gM=e=>!vf(e)&&e!==uo;function Zb(){const{caseless:e}=gM(this)&&this||{},t={},r=(n,i)=>{const a=e&&mM(t,i)||i;Vp(t[a])&&Vp(n)?t[a]=Zb(t[a],n):Vp(n)?t[a]=Zb({},n):pu(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&gh(arguments[n],r);return t}const YY=(e,t,r,{allOwnKeys:n}={})=>(gh(t,(i,a)=>{r&&Vr(i)?e[a]=dM(i,r):e[a]=i},{allOwnKeys:n}),e),XY=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ZY=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},QY=(e,t,r,n)=>{let i,a,s;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],(!n||n(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=r!==!1&&vS(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},JY=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},eX=e=>{if(!e)return null;if(pu(e))return e;let t=e.length;if(!pM(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},tX=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vS(Uint8Array)),rX=(e,t)=>{const n=(e&&e[ky]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},nX=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},iX=di("HTMLFormElement"),aX=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),_E=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),sX=di("RegExp"),yM=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};gh(r,(i,a)=>{let s;(s=t(i,a,e))!==!1&&(n[a]=s||i)}),Object.defineProperties(e,n)},oX=e=>{yM(e,(t,r)=>{if(Vr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Vr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},lX=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return pu(e)?n(e):n(String(e).split(t)),r},cX=()=>{},uX=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dX(e){return!!(e&&Vr(e.append)&&e[fM]==="FormData"&&e[ky])}const fX=e=>{const t=new Array(10),r=(n,i)=>{if(Cy(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=pu(n)?[]:{};return gh(n,(s,o)=>{const l=r(s,i+1);!vf(l)&&(a[o]=l)}),t[i]=void 0,a}}return n};return r(e,0)},hX=di("AsyncFunction"),pX=e=>e&&(Cy(e)||Vr(e))&&Vr(e.then)&&Vr(e.catch),vM=((e,t)=>e?setImmediate:t?((r,n)=>(uo.addEventListener("message",({source:i,data:a})=>{i===uo&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),uo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Vr(uo.postMessage)),mX=typeof queueMicrotask<"u"?queueMicrotask.bind(uo):typeof process<"u"&&process.nextTick||vM,gX=e=>e!=null&&Vr(e[ky]),H={isArray:pu,isArrayBuffer:hM,isBuffer:$Y,isFormData:UY,isArrayBufferView:MY,isString:RY,isNumber:pM,isBoolean:IY,isObject:Cy,isPlainObject:Vp,isReadableStream:VY,isRequest:HY,isResponse:qY,isHeaders:KY,isUndefined:vf,isDate:DY,isFile:LY,isBlob:FY,isRegExp:sX,isFunction:Vr,isStream:zY,isURLSearchParams:WY,isTypedArray:tX,isFileList:BY,forEach:gh,merge:Zb,extend:YY,trim:GY,stripBOM:XY,inherits:ZY,toFlatObject:QY,kindOf:Py,kindOfTest:di,endsWith:JY,toArray:eX,forEachEntry:rX,matchAll:nX,isHTMLForm:iX,hasOwnProperty:_E,hasOwnProp:_E,reduceDescriptors:yM,freezeMethods:oX,toObjectSet:lX,toCamelCase:aX,noop:cX,toFiniteNumber:uX,findKey:mM,global:uo,isContextDefined:gM,isSpecCompliantForm:dX,toJSONObject:fX,isAsyncFn:hX,isThenable:pX,setImmediate:vM,asap:mX,isIterable:gX};function Ce(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const xM=Ce.prototype,bM={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{bM[e]={value:e}});Object.defineProperties(Ce,bM);Object.defineProperty(xM,"isAxiosError",{value:!0});Ce.from=(e,t,r,n,i,a)=>{const s=Object.create(xM);return H.toFlatObject(e,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Ce.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const yX=null;function Qb(e){return H.isPlainObject(e)||H.isArray(e)}function wM(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function SE(e,t,r){return e?e.concat(t).map(function(i,a){return i=wM(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function vX(e){return H.isArray(e)&&!e.some(Qb)}const xX=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function $y(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!H.isUndefined(v[m])});const n=r.metaTokens,i=r.visitor||d,a=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(H.isDate(g))return g.toISOString();if(H.isBoolean(g))return g.toString();if(!l&&H.isBlob(g))throw new Ce("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(g)||H.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,m,v){let y=g;if(g&&!v&&typeof g=="object"){if(H.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(H.isArray(g)&&vX(g)||(H.isFileList(g)||H.endsWith(m,"[]"))&&(y=H.toArray(g)))return m=wM(m),y.forEach(function(b,S){!(H.isUndefined(b)||b===null)&&t.append(s===!0?SE([m],S,a):s===null?m:m+"[]",c(b))}),!1}return Qb(g)?!0:(t.append(SE(v,m,a),c(g)),!1)}const f=[],h=Object.assign(xX,{defaultVisitor:d,convertValue:c,isVisitable:Qb});function p(g,m){if(!H.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(g),H.forEach(g,function(y,x){(!(H.isUndefined(y)||y===null)&&i.call(t,y,H.isString(x)?x.trim():x,m,h))===!0&&p(y,m?m.concat(x):[x])}),f.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function jE(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function xS(e,t){this._pairs=[],e&&$y(e,this,t)}const _M=xS.prototype;_M.append=function(t,r){this._pairs.push([t,r])};_M.toString=function(t){const r=t?function(n){return t.call(this,n,jE)}:jE;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function bX(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function SM(e,t,r){if(!t)return e;const n=r&&r.encode||bX;H.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=H.isURLSearchParams(t)?t.toString():new xS(t,r).toString(n),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class NE{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const jM={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wX=typeof URLSearchParams<"u"?URLSearchParams:xS,_X=typeof FormData<"u"?FormData:null,SX=typeof Blob<"u"?Blob:null,jX={isBrowser:!0,classes:{URLSearchParams:wX,FormData:_X,Blob:SX},protocols:["http","https","file","blob","url","data"]},bS=typeof window<"u"&&typeof document<"u",Jb=typeof navigator=="object"&&navigator||void 0,NX=bS&&(!Jb||["ReactNative","NativeScript","NS"].indexOf(Jb.product)<0),EX=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OX=bS&&window.location.href||"http://localhost",AX=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bS,hasStandardBrowserEnv:NX,hasStandardBrowserWebWorkerEnv:EX,navigator:Jb,origin:OX},Symbol.toStringTag,{value:"Module"})),vr={...AX,...jX};function kX(e,t){return $y(e,new vr.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return vr.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function PX(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function TX(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function NM(e){function t(r,n,i,a){let s=r[a++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=a>=r.length;return s=!s&&H.isArray(i)?i.length:s,l?(H.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o):((!i[s]||!H.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],a)&&H.isArray(i[s])&&(i[s]=TX(i[s])),!o)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,i)=>{t(PX(n),i,r,0)}),r}return null}function CX(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const yh={transitional:jM,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=H.isObject(t);if(a&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(NM(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return kX(t,this.formSerializer).toString();if((o=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return $y(o?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),CX(t)):t}],transformResponse:[function(t){const r=this.transitional||yh.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(s)throw o.name==="SyntaxError"?Ce.from(o,Ce.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vr.classes.FormData,Blob:vr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{yh.headers[e]={}});const $X=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MX=e=>{const t={};let r,n,i;return e&&e.split(`
|
||
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&$X[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},EE=Symbol("internals");function Ku(e){return e&&String(e).trim().toLowerCase()}function Hp(e){return e===!1||e==null?e:H.isArray(e)?e.map(Hp):String(e)}function RX(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const IX=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function T0(e,t,r,n,i){if(H.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!H.isString(t)){if(H.isString(n))return t.indexOf(n)!==-1;if(H.isRegExp(n))return n.test(t)}}function DX(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function LX(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,s){return this[n].call(this,t,i,a,s)},configurable:!0})})}let Hr=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(o,l,c){const d=Ku(l);if(!d)throw new Error("header name must be a non-empty string");const f=H.findKey(i,d);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Hp(o))}const s=(o,l)=>H.forEach(o,(c,d)=>a(c,d,l));if(H.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(H.isString(t)&&(t=t.trim())&&!IX(t))s(MX(t),r);else if(H.isObject(t)&&H.isIterable(t)){let o={},l,c;for(const d of t){if(!H.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[c=d[0]]=(l=o[c])?H.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}s(o,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=Ku(t),t){const n=H.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return RX(i);if(H.isFunction(r))return r.call(this,i,n);if(H.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ku(t),t){const n=H.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||T0(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(s){if(s=Ku(s),s){const o=H.findKey(n,s);o&&(!r||T0(n,n[o],o,r))&&(delete n[o],i=!0)}}return H.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||T0(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return H.forEach(this,(i,a)=>{const s=H.findKey(n,a);if(s){r[s]=Hp(i),delete r[a];return}const o=t?DX(a):String(a).trim();o!==a&&delete r[a],r[o]=Hp(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return H.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&H.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[EE]=this[EE]={accessors:{}}).accessors,i=this.prototype;function a(s){const o=Ku(s);n[o]||(LX(i,s),n[o]=!0)}return H.isArray(t)?t.forEach(a):a(t),this}};Hr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Hr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(Hr);function C0(e,t){const r=this||yh,n=t||r,i=Hr.from(n.headers);let a=n.data;return H.forEach(e,function(o){a=o.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function EM(e){return!!(e&&e.__CANCEL__)}function mu(e,t,r){Ce.call(this,e??"canceled",Ce.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(mu,Ce,{__CANCEL__:!0});function OM(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ce("Request failed with status code "+r.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function FX(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function BX(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=n[a];s||(s=c),r[i]=l,n[i]=c;let f=a,h=0;for(;f!==i;)h+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-s<t)return;const p=d&&c-d;return p?Math.round(h*1e3/p):void 0}}function zX(e,t){let r=0,n=1e3/t,i,a;const s=(c,d=Date.now())=>{r=d,i=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?s(c,d):(i=c,a||(a=setTimeout(()=>{a=null,s(i)},n-f)))},()=>i&&s(i)]}const zm=(e,t,r=3)=>{let n=0;const i=BX(50,250);return zX(a=>{const s=a.loaded,o=a.lengthComputable?a.total:void 0,l=s-n,c=i(l),d=s<=o;n=s;const f={loaded:s,total:o,progress:o?s/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&d?(o-s)/c:void 0,event:a,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(f)},r)},OE=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},AE=e=>(...t)=>H.asap(()=>e(...t)),UX=vr.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,vr.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(vr.origin),vr.navigator&&/(msie|trident)/i.test(vr.navigator.userAgent)):()=>!0,WX=vr.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const s=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),H.isString(n)&&s.push("path="+n),H.isString(i)&&s.push("domain="+i),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function VX(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function HX(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function AM(e,t,r){let n=!VX(t);return e&&(n||r==!1)?HX(e,t):t}const kE=e=>e instanceof Hr?{...e}:e;function Xo(e,t){t=t||{};const r={};function n(c,d,f,h){return H.isPlainObject(c)&&H.isPlainObject(d)?H.merge.call({caseless:h},c,d):H.isPlainObject(d)?H.merge({},d):H.isArray(d)?d.slice():d}function i(c,d,f,h){if(H.isUndefined(d)){if(!H.isUndefined(c))return n(void 0,c,f,h)}else return n(c,d,f,h)}function a(c,d){if(!H.isUndefined(d))return n(void 0,d)}function s(c,d){if(H.isUndefined(d)){if(!H.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function o(c,d,f){if(f in t)return n(c,d);if(f in e)return n(void 0,c)}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(c,d,f)=>i(kE(c),kE(d),f,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||i,h=f(e[d],t[d],d);H.isUndefined(h)&&f!==o||(r[d]=h)}),r}const kM=e=>{const t=Xo({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:o}=t;t.headers=s=Hr.from(s),t.url=SM(AM(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(H.isFormData(r)){if(vr.hasStandardBrowserEnv||vr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...d].join("; "))}}if(vr.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&UX(t.url))){const c=i&&a&&WX.read(a);c&&s.set(i,c)}return t},qX=typeof XMLHttpRequest<"u",KX=qX&&function(e){return new Promise(function(r,n){const i=kM(e);let a=i.data;const s=Hr.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,d,f,h,p,g;function m(){p&&p(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function y(){if(!v)return;const b=Hr.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:b,config:e,request:v};OM(function(N){r(N),m()},function(N){n(N),m()},_),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(n(new Ce("Request aborted",Ce.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new Ce("Network Error",Ce.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||jM;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new Ce(S,_.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,v)),v=null},a===void 0&&s.setContentType(null),"setRequestHeader"in v&&H.forEach(s.toJSON(),function(S,_){v.setRequestHeader(_,S)}),H.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),o&&o!=="json"&&(v.responseType=i.responseType),c&&([h,g]=zm(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([f,p]=zm(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(d=b=>{v&&(n(!b||b.type?new mu(null,e,v):b),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const x=FX(i.url);if(x&&vr.protocols.indexOf(x)===-1){n(new Ce("Unsupported protocol "+x+":",Ce.ERR_BAD_REQUEST,e));return}v.send(a||null)})},GX=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(c){if(!i){i=!0,o();const d=c instanceof Error?c:this.reason;n.abort(d instanceof Ce?d:new mu(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,a(new Ce(`timeout ${t} of ms exceeded`,Ce.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>H.asap(o),l}},YX=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},XX=async function*(e,t){for await(const r of ZX(e))yield*YX(r,t)},ZX=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},PE=(e,t,r,n)=>{const i=XX(e,t);let a=0,s,o=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await i.next();if(c){o(),l.close();return}let f=d.byteLength;if(r){let h=a+=f;r(h)}l.enqueue(new Uint8Array(d))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})},My=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",PM=My&&typeof ReadableStream=="function",QX=My&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),TM=(e,...t)=>{try{return!!e(...t)}catch{return!1}},JX=PM&&TM(()=>{let e=!1;const t=new Request(vr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),TE=64*1024,ew=PM&&TM(()=>H.isReadableStream(new Response("").body)),Um={stream:ew&&(e=>e.body)};My&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Um[t]&&(Um[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Ce(`Response type '${t}' is not supported`,Ce.ERR_NOT_SUPPORT,n)})})})(new Response);const eZ=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(vr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await QX(e)).byteLength},tZ=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??eZ(t)},rZ=My&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:a,timeout:s,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:d,withCredentials:f="same-origin",fetchOptions:h}=kM(e);c=c?(c+"").toLowerCase():"text";let p=GX([i,a&&a.toAbortSignal()],s),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(l&&JX&&r!=="get"&&r!=="head"&&(v=await tZ(d,n))!==0){let _=new Request(t,{method:"POST",body:n,duplex:"half"}),j;if(H.isFormData(n)&&(j=_.headers.get("content-type"))&&d.setContentType(j),_.body){const[N,A]=OE(v,zm(AE(l)));n=PE(_.body,TE,N,A)}}H.isString(f)||(f=f?"include":"omit");const y="credentials"in Request.prototype;g=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:y?f:void 0});let x=await fetch(g,h);const b=ew&&(c==="stream"||c==="response");if(ew&&(o||b&&m)){const _={};["status","statusText","headers"].forEach(E=>{_[E]=x[E]});const j=H.toFiniteNumber(x.headers.get("content-length")),[N,A]=o&&OE(j,zm(AE(o),!0))||[];x=new Response(PE(x.body,TE,N,()=>{A&&A(),m&&m()}),_)}c=c||"text";let S=await Um[H.findKey(Um,c)||"text"](x,e);return!b&&m&&m(),await new Promise((_,j)=>{OM(_,j,{data:S,headers:Hr.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:g})})}catch(y){throw m&&m(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,e,g),{cause:y.cause||y}):Ce.from(y,y&&y.code,e,g)}}),tw={http:yX,xhr:KX,fetch:rZ};H.forEach(tw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const CE=e=>`- ${e}`,nZ=e=>H.isFunction(e)||e===null||e===!1,CM={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a<t;a++){r=e[a];let s;if(n=r,!nZ(r)&&(n=tw[(s=String(r)).toLowerCase()],n===void 0))throw new Ce(`Unknown adapter '${s}'`);if(n)break;i[s||"#"+a]=n}if(!n){const a=Object.entries(i).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
|
||
`+a.map(CE).join(`
|
||
`):" "+CE(a[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:tw};function $0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mu(null,e)}function $E(e){return $0(e),e.headers=Hr.from(e.headers),e.data=C0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),CM.getAdapter(e.adapter||yh.adapter)(e).then(function(n){return $0(e),n.data=C0.call(e,e.transformResponse,n),n.headers=Hr.from(n.headers),n},function(n){return EM(n)||($0(e),n&&n.response&&(n.response.data=C0.call(e,e.transformResponse,n.response),n.response.headers=Hr.from(n.response.headers))),Promise.reject(n)})}const $M="1.10.0",Ry={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ry[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ME={};Ry.transitional=function(t,r,n){function i(a,s){return"[Axios v"+$M+"] Transitional option '"+a+"'"+s+(n?". "+n:"")}return(a,s,o)=>{if(t===!1)throw new Ce(i(s," has been removed"+(r?" in "+r:"")),Ce.ERR_DEPRECATED);return r&&!ME[s]&&(ME[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,o):!0}};Ry.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function iZ(e,t,r){if(typeof e!="object")throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],s=t[a];if(s){const o=e[a],l=o===void 0||s(o,a,e);if(l!==!0)throw new Ce("option "+a+" must be "+l,Ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ce("Unknown option "+a,Ce.ERR_BAD_OPTION)}}const qp={assertOptions:iZ,validators:Ry},gi=qp.validators;let Co=class{constructor(t){this.defaults=t||{},this.interceptors={request:new NE,response:new NE}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
||
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Xo(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&qp.assertOptions(n,{silentJSONParsing:gi.transitional(gi.boolean),forcedJSONParsing:gi.transitional(gi.boolean),clarifyTimeoutError:gi.transitional(gi.boolean)},!1),i!=null&&(H.isFunction(i)?r.paramsSerializer={serialize:i}:qp.assertOptions(i,{encode:gi.function,serialize:gi.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),qp.assertOptions(r,{baseUrl:gi.spelling("baseURL"),withXsrfToken:gi.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=a&&H.merge(a.common,a[r.method]);a&&H.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),r.headers=Hr.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!l){const g=[$E.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,c),h=g.length,d=Promise.resolve(r);f<h;)d=d.then(g[f++],g[f++]);return d}h=o.length;let p=r;for(f=0;f<h;){const g=o[f++],m=o[f++];try{p=g(p)}catch(v){m.call(this,v);break}}try{d=$E.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=c.length;f<h;)d=d.then(c[f++],c[f++]);return d}getUri(t){t=Xo(this.defaults,t);const r=AM(t.baseURL,t.url,t.allowAbsoluteUrls);return SM(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Co.prototype[t]=function(r,n){return this.request(Xo(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(a,s,o){return this.request(Xo(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}Co.prototype[t]=r(),Co.prototype[t+"Form"]=r(!0)});let aZ=class MM{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const s=new Promise(o=>{n.subscribe(o),a=o}).then(i);return s.cancel=function(){n.unsubscribe(a)},s},t(function(a,s,o){n.reason||(n.reason=new mu(a,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new MM(function(i){t=i}),cancel:t}}};function sZ(e){return function(r){return e.apply(null,r)}}function oZ(e){return H.isObject(e)&&e.isAxiosError===!0}const rw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rw).forEach(([e,t])=>{rw[t]=e});function RM(e){const t=new Co(e),r=dM(Co.prototype.request,t);return H.extend(r,Co.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return RM(Xo(e,i))},r}const Ct=RM(yh);Ct.Axios=Co;Ct.CanceledError=mu;Ct.CancelToken=aZ;Ct.isCancel=EM;Ct.VERSION=$M;Ct.toFormData=$y;Ct.AxiosError=Ce;Ct.Cancel=Ct.CanceledError;Ct.all=function(t){return Promise.all(t)};Ct.spread=sZ;Ct.isAxiosError=oZ;Ct.mergeConfig=Xo;Ct.AxiosHeaders=Hr;Ct.formToJSON=e=>NM(H.isHTMLForm(e)?new FormData(e):e);Ct.getAdapter=CM.getAdapter;Ct.HttpStatusCode=rw;Ct.default=Ct;const{Axios:ANe,AxiosError:kNe,CanceledError:PNe,isCancel:TNe,CancelToken:CNe,VERSION:$Ne,all:MNe,Cancel:RNe,isAxiosError:INe,spread:DNe,toFormData:LNe,AxiosHeaders:FNe,HttpStatusCode:BNe,formToJSON:zNe,getAdapter:UNe,mergeConfig:WNe}=Ct;var lZ={};const Ne=Ct.create({baseURL:lZ.VITE_API_BASE_URL||"https://hive.home.deepblack.cloud",headers:{"Content-Type":"application/json"}});Ne.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));Ne.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("token"),localStorage.removeItem("refresh_token"),window.location.href="/login"),Promise.reject(e)});const Bl={getProjects:async()=>{const e=await Ne.get("/api/bzzz/active-repos");return e.data&&e.data.repositories?e.data.repositories.map(t=>({id:t.project_id,name:t.name,description:`${t.name} - ${t.owner}/${t.repository}`,status:t.ready_to_claim?"active":"inactive",git_url:t.git_url,owner:t.owner,repository:t.repository,branch:t.branch,bzzz_enabled:t.bzzz_enabled,ready_to_claim:t.ready_to_claim,private_repo:t.private_repo,github_token_required:t.github_token_required,created_at:new Date().toISOString(),updated_at:new Date().toISOString()})):[]},getProject:async e=>(await Ne.get(`/projects/${e}`)).data,createProject:async e=>(await Ne.post("/projects",e)).data,updateProject:async(e,t)=>(await Ne.put(`/projects/${e}`,t)).data,deleteProject:async e=>{await Ne.delete(`/projects/${e}`)},getProjectMetrics:async e=>(await Ne.get(`/projects/${e}/metrics`)).data,getProjectWorkflows:async e=>(await Ne.get(`/projects/${e}/workflows`)).data,getProjectExecutions:async e=>(await Ne.get(`/projects/${e}/executions`)).data},Ma={getExecutions:async()=>(await Ne.get("/executions")).data,getExecution:async e=>(await Ne.get(`/executions/${e}`)).data,cancelExecution:async e=>{await Ne.post(`/api/executions/${e}/cancel`)},retryExecution:async e=>(await Ne.post(`/api/executions/${e}/retry`)).data,pauseExecution:async e=>(await Ne.post(`/api/executions/${e}/pause`)).data,resumeExecution:async e=>(await Ne.post(`/api/executions/${e}/resume`)).data,getExecutionLogs:async e=>(await Ne.get(`/api/executions/${e}/logs`)).data,getExecutionSteps:async e=>(await Ne.get(`/api/executions/${e}/steps`)).data},bl={getAgents:async()=>(await Ne.get("/agents")).data,getAgentStatus:async e=>(await Ne.get(`/agents/${e}/status`)).data,registerAgent:async e=>(await Ne.post("/agents",e)).data,getCliAgents:async()=>(await Ne.get("/cli-agents/")).data,registerCliAgent:async e=>(await Ne.post("/cli-agents/register",e)).data,registerPredefinedCliAgents:async()=>(await Ne.post("/cli-agents/register-predefined")).data,healthCheckCliAgent:async e=>(await Ne.post(`/cli-agents/${e}/health-check`)).data,getCliAgentStatistics:async()=>(await Ne.get("/cli-agents/statistics/all")).data,unregisterCliAgent:async e=>(await Ne.delete(`/cli-agents/${e}`)).data},cZ={getStatus:async()=>(await Ne.get("/api/status")).data,getHealth:async()=>(await Ne.get("/api/health")).data,getMetrics:async()=>(await Ne.get("/api/metrics")).data,getConfig:async()=>(await Ne.get("/api/config")).data,updateConfig:async e=>(await Ne.put("/api/config",e)).data,getLogs:async e=>(await Ne.get("/api/logs",{params:e})).data,restart:async()=>(await Ne.post("/api/system/restart")).data,shutdown:async()=>(await Ne.post("/api/system/shutdown")).data},xf={getOverview:async()=>(await Ne.get("/api/cluster/overview")).data,getNodes:async()=>(await Ne.get("/api/cluster/nodes")).data,getNode:async e=>(await Ne.get(`/api/cluster/nodes/${e}`)).data,getModels:async()=>(await Ne.get("/api/cluster/models")).data,getWorkflows:async()=>(await Ne.get("/api/cluster/workflows")).data,getMetrics:async()=>(await Ne.get("/api/cluster/metrics")).data,getExecutions:async(e=10)=>(await Ne.get(`/api/cluster/executions?limit=${e}`)).data,addNode:async e=>(await Ne.post("/api/cluster/nodes",e)).data,removeNode:async e=>(await Ne.delete(`/api/cluster/nodes/${e}`)).data,startNode:async e=>(await Ne.post(`/api/cluster/nodes/${e}/start`)).data,stopNode:async e=>(await Ne.post(`/api/cluster/nodes/${e}/stop`)).data,restartNode:async e=>(await Ne.post(`/api/cluster/nodes/${e}/restart`)).data};function uZ(){const[e,t]=w.useState(null),{data:r=[]}=rn({queryKey:["projects"],queryFn:()=>Bl.getProjects()}),{data:n}=rn({queryKey:["cluster-overview"],queryFn:()=>xf.getOverview()}),{data:i=[]}=rn({queryKey:["workflows"],queryFn:()=>xf.getWorkflows()}),a={projects:{total:r.length,active:r.filter(s=>s.status==="active").length},workflows:{total:i.length,active:i.filter(s=>s.active).length},cluster:{total_nodes:(n==null?void 0:n.total_nodes)||0,active_nodes:(n==null?void 0:n.active_nodes)||0,total_models:(n==null?void 0:n.total_models)||0},executions:{recent:0,success_rate:.95}};return w.useEffect(()=>{const s=async()=>{try{const l=await cZ.getHealth();t(l)}catch(l){console.error("Failed to fetch system status:",l)}};s();const o=setInterval(s,3e4);return()=>clearInterval(o)},[]),u.jsxs("div",{className:"p-6",children:[u.jsx("div",{className:"mb-8",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Welcome to Hive"}),u.jsx("p",{className:"text-gray-600 mt-2",children:"Monitor your distributed AI orchestration platform"})]}),u.jsxs("div",{className:"flex items-center space-x-2 bg-white rounded-lg border px-4 py-2",children:[u.jsx("div",{className:`w-3 h-3 rounded-full ${(e==null?void 0:e.status)==="healthy"?"bg-green-500":"bg-yellow-500"}`}),u.jsx("span",{className:"text-sm font-medium",children:(e==null?void 0:e.status)==="healthy"?"All Systems Operational":"System Initializing"})]})]})}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[u.jsx(Nt,{to:"/projects",className:"group",children:u.jsxs("div",{className:"bg-white rounded-lg border p-6 hover:shadow-md transition-shadow",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:u.jsx(gf,{className:"h-6 w-6 text-blue-600"})}),u.jsxs("div",{className:"ml-4",children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[a.projects.active,"/",a.projects.total]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Active Projects"})]})]}),u.jsxs("div",{className:"mt-4 flex items-center text-sm text-blue-600 group-hover:text-blue-800",children:[u.jsx("span",{children:"View all projects"}),u.jsx(Ws,{className:"h-4 w-4 ml-1"})]})]})}),u.jsx(Nt,{to:"/workflows",className:"group",children:u.jsxs("div",{className:"bg-white rounded-lg border p-6 hover:shadow-md transition-shadow",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:u.jsx(Ko,{className:"h-6 w-6 text-purple-600"})}),u.jsxs("div",{className:"ml-4",children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[a.workflows.active,"/",a.workflows.total]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Active Workflows"})]})]}),u.jsxs("div",{className:"mt-4 flex items-center text-sm text-purple-600 group-hover:text-purple-800",children:[u.jsx("span",{children:"Manage workflows"}),u.jsx(Ws,{className:"h-4 w-4 ml-1"})]})]})}),u.jsx(Nt,{to:"/executions",className:"group",children:u.jsxs("div",{className:"bg-white rounded-lg border p-6 hover:shadow-md transition-shadow",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:u.jsx(ai,{className:"h-6 w-6 text-green-600"})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:a.executions.recent}),u.jsx("p",{className:"text-sm text-gray-500",children:"Recent Executions"})]})]}),u.jsxs("div",{className:"mt-4 flex items-center text-sm text-green-600 group-hover:text-green-800",children:[u.jsxs("span",{children:[(a.executions.success_rate*100).toFixed(0),"% success rate"]}),u.jsx(Ws,{className:"h-4 w-4 ml-1"})]})]})}),u.jsx(Nt,{to:"/cluster",className:"group",children:u.jsxs("div",{className:"bg-white rounded-lg border p-6 hover:shadow-md transition-shadow",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-2 bg-orange-100 rounded-lg",children:u.jsx(To,{className:"h-6 w-6 text-orange-600"})}),u.jsxs("div",{className:"ml-4",children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[a.cluster.active_nodes,"/",a.cluster.total_nodes]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Active Nodes"})]})]}),u.jsxs("div",{className:"mt-4 flex items-center text-sm text-orange-600 group-hover:text-orange-800",children:[u.jsxs("span",{children:[a.cluster.total_models," models available"]}),u.jsx(Ws,{className:"h-4 w-4 ml-1"})]})]})})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs(Nt,{to:"/projects/new",className:"flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[u.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:u.jsx(Go,{className:"h-5 w-5 text-blue-600"})}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"font-medium text-gray-900",children:"Create New Project"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Start organizing your workflows"})]}),u.jsx(Ws,{className:"h-5 w-5 text-gray-400 ml-auto"})]}),u.jsxs(Nt,{to:"/workflows/new",className:"flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[u.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:u.jsx(Ko,{className:"h-5 w-5 text-purple-600"})}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"font-medium text-gray-900",children:"Build Workflow"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Design automation processes"})]}),u.jsx(Ws,{className:"h-5 w-5 text-gray-400 ml-auto"})]}),u.jsxs(Nt,{to:"/cluster",className:"flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[u.jsx("div",{className:"p-2 bg-orange-100 rounded-lg",children:u.jsx(To,{className:"h-5 w-5 text-orange-600"})}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"font-medium text-gray-900",children:"Monitor Cluster"}),u.jsx("p",{className:"text-sm text-gray-500",children:"View nodes and AI models"})]}),u.jsx(Ws,{className:"h-5 w-5 text-gray-400 ml-auto"})]})]})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Recent Activity"}),u.jsx(Nt,{to:"/activity",className:"text-sm text-blue-600 hover:text-blue-800",children:"View all"})]}),u.jsx("div",{className:"space-y-3",children:u.jsxs("div",{className:"text-center py-8 text-gray-500",children:[u.jsx(Wr,{className:"h-8 w-8 mx-auto mb-2 text-gray-300"}),u.jsx("p",{className:"text-sm",children:"Recent activity will appear here"}),u.jsx("p",{className:"text-xs",children:"Activity from projects and workflows will be shown"})]})})]})]}),e&&e.status==="healthy"&&u.jsxs("div",{className:"mt-6 bg-white rounded-lg border p-6",children:[u.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"System Components"}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:"API"}),u.jsx("p",{className:"text-xs text-gray-500",children:e.components.api})]})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:"Database"}),u.jsx("p",{className:"text-xs text-gray-500",children:e.components.database})]})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:"Coordinator"}),u.jsx("p",{className:"text-xs text-gray-500",children:e.components.coordinator})]})]})]})]})]})}function dZ(){const[e,t]=w.useState(!1),[r,n]=w.useState(!1),[i,a]=w.useState("ollama"),[s,o]=w.useState({name:"",endpoint:"",model:"",specialty:"general",max_concurrent:1}),[l,c]=w.useState({id:"",host:"",node_version:"",model:"gemini-2.5-pro",specialization:"general_ai",max_concurrent:2,command_timeout:60,ssh_timeout:5,agent_type:"gemini"}),{data:d=[],isLoading:f,refetch:h}=rn({queryKey:["agents"],queryFn:async()=>{try{return await bl.getAgents()}catch{return[{id:"walnut-ollama",name:"WALNUT",endpoint:"http://192.168.1.27:11434",model:"deepseek-coder-v2:latest",specialty:"frontend",status:"online",agent_type:"ollama",max_concurrent:2,current_tasks:1,last_seen:new Date().toISOString(),capabilities:["React","TypeScript","TailwindCSS"],metrics:{tasks_completed:45,uptime:"23h 45m",response_time:2.3}},{id:"ironwood-ollama",name:"IRONWOOD",endpoint:"http://192.168.1.113:11434",model:"qwen2.5-coder:latest",specialty:"backend",status:"online",agent_type:"ollama",max_concurrent:2,current_tasks:0,last_seen:new Date().toISOString(),capabilities:["Python","FastAPI","PostgreSQL"],metrics:{tasks_completed:32,uptime:"18h 12m",response_time:1.8}},{id:"acacia",name:"ACACIA",endpoint:"http://192.168.1.72:11434",model:"qwen2.5:latest",specialty:"documentation",status:"offline",agent_type:"ollama",max_concurrent:1,current_tasks:0,last_seen:new Date(Date.now()-36e5).toISOString(),capabilities:["Documentation","Testing","QA"],metrics:{tasks_completed:18,uptime:"0h 0m",response_time:0}},{id:"walnut-gemini",name:"WALNUT-GEMINI",endpoint:"cli://walnut",model:"gemini-2.5-pro",specialty:"general_ai",status:"available",agent_type:"cli",max_concurrent:2,current_tasks:0,last_seen:new Date().toISOString(),cli_config:{host:"walnut",node_version:"v22.14.0",model:"gemini-2.5-pro",specialization:"general_ai",command_timeout:60,ssh_timeout:5},capabilities:["Advanced Reasoning","General AI","Multi-modal"],metrics:{tasks_completed:12,uptime:"4h 23m",response_time:3.1}},{id:"ironwood-gemini",name:"IRONWOOD-GEMINI",endpoint:"cli://ironwood",model:"gemini-2.5-pro",specialty:"reasoning",status:"available",agent_type:"cli",max_concurrent:2,current_tasks:1,last_seen:new Date().toISOString(),cli_config:{host:"ironwood",node_version:"v22.17.0",model:"gemini-2.5-pro",specialization:"reasoning",command_timeout:60,ssh_timeout:5},capabilities:["Complex Reasoning","Problem Solving","Analysis"],metrics:{tasks_completed:8,uptime:"2h 15m",response_time:2.7}}]}},refetchInterval:3e4}),p=async E=>{var C;E.preventDefault();try{await((C=bl.registerAgent)==null?void 0:C.call(bl,s)),o({name:"",endpoint:"",model:"",specialty:"general",max_concurrent:1}),t(!1),h()}catch(P){console.error("Failed to register agent:",P)}},g=async E=>{E.preventDefault();try{await bl.registerCliAgent(l),c({id:"",host:"",node_version:"",model:"gemini-2.5-pro",specialization:"general_ai",max_concurrent:2,command_timeout:60,ssh_timeout:5,agent_type:"gemini"}),n(!1),h()}catch(C){console.error("Failed to register CLI agent:",C)}},m=async()=>{try{await bl.registerPredefinedCliAgents(),h()}catch(E){console.error("Failed to register predefined CLI agents:",E)}},v=E=>{switch(E){case"online":case"available":return u.jsx(ii,{className:"h-5 w-5 text-green-500"});case"busy":return u.jsx(Wr,{className:"h-5 w-5 text-yellow-500 animate-pulse"});case"idle":return u.jsx(Wr,{className:"h-5 w-5 text-blue-500"});case"offline":return u.jsx(si,{className:"h-5 w-5 text-red-500"});default:return u.jsx(Im,{className:"h-5 w-5 text-gray-400"})}},y=E=>{switch(E){case"cli":return u.jsx(Zs,{className:"h-5 w-5 text-purple-500"});case"ollama":default:return u.jsx(gd,{className:"h-5 w-5 text-blue-500"})}},x=E=>{const C="inline-flex items-center px-2 py-1 rounded text-xs font-medium";switch(E){case"cli":return`${C} bg-purple-100 text-purple-800`;case"ollama":default:return`${C} bg-blue-100 text-blue-800`}},b=E=>{const C="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium";switch(E){case"online":case"available":return`${C} bg-green-100 text-green-800`;case"busy":return`${C} bg-yellow-100 text-yellow-800`;case"idle":return`${C} bg-blue-100 text-blue-800`;case"offline":return`${C} bg-red-100 text-red-800`;default:return`${C} bg-gray-100 text-gray-800`}};if(f)return u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),u.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:[1,2,3].map(E=>u.jsx("div",{className:"h-64 bg-gray-200 rounded"},E))})]})});const S=Array.isArray(d)?d:[],_=S.filter(E=>E.status==="online"||E.status==="available").length;S.filter(E=>E.status==="busy").length;const j=S.filter(E=>!E.agent_type||E.agent_type==="ollama").length,N=S.filter(E=>E.agent_type==="cli").length,A=S.reduce((E,C)=>{var P;return E+(((P=C.metrics)==null?void 0:P.tasks_completed)||0)},0);return u.jsxs("div",{className:"p-6",children:[u.jsx("div",{className:"mb-6",children:u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Agents"}),u.jsx("p",{className:"text-gray-600",children:"Manage AI agents in your distributed cluster"})]}),u.jsxs("div",{className:"flex space-x-3",children:[u.jsxs("button",{onClick:m,className:"inline-flex items-center px-4 py-2 border border-purple-600 rounded-md text-sm font-medium text-purple-600 bg-white hover:bg-purple-50",children:[u.jsx(Zs,{className:"h-4 w-4 mr-2"}),"Quick Setup CLI"]}),u.jsx("div",{className:"relative",children:u.jsxs("button",{onClick:()=>t(!0),className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700",children:[u.jsx(Go,{className:"h-4 w-4 mr-2"}),"Register Agent",u.jsx(lS,{className:"h-4 w-4 ml-1"})]})})]})]})}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-6 mb-8",children:[u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(To,{className:"h-8 w-8 text-blue-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:d.length}),u.jsx("p",{className:"text-sm text-gray-500",children:"Total Agents"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(gd,{className:"h-8 w-8 text-blue-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:j}),u.jsx("p",{className:"text-sm text-gray-500",children:"Ollama Agents"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(Zs,{className:"h-8 w-8 text-purple-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:N}),u.jsx("p",{className:"text-sm text-gray-500",children:"CLI Agents"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ii,{className:"h-8 w-8 text-green-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:_}),u.jsx("p",{className:"text-sm text-gray-500",children:"Available"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(jy,{className:"h-8 w-8 text-indigo-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:A}),u.jsx("p",{className:"text-sm text-gray-500",children:"Tasks Completed"})]})]})})]}),u.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:d.map(E=>{var C;return u.jsxs("div",{className:"bg-white rounded-lg border p-6 hover:shadow-lg transition-shadow",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[y(E.agent_type),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:E.name}),u.jsx("span",{className:x(E.agent_type),children:E.agent_type==="cli"?"⚡ CLI":"🤖 API"})]}),u.jsx("p",{className:"text-sm text-gray-500",children:E.specialty}),((C=E.cli_config)==null?void 0:C.host)&&u.jsxs("p",{className:"text-xs text-purple-600",children:["SSH: ",E.cli_config.host," (Node ",E.cli_config.node_version,")"]})]})]}),u.jsx("span",{className:b(E.status),children:E.status})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm text-gray-500",children:"Model"}),u.jsx("span",{className:"text-sm font-medium text-gray-900",children:E.model})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm text-gray-500",children:"Tasks"}),u.jsxs("span",{className:"text-sm font-medium text-gray-900",children:[E.current_tasks,"/",E.max_concurrent]})]}),E.metrics&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm text-gray-500",children:"Completed"}),u.jsx("span",{className:"text-sm font-medium text-gray-900",children:E.metrics.tasks_completed})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm text-gray-500",children:"Uptime"}),u.jsx("span",{className:"text-sm font-medium text-gray-900",children:E.metrics.uptime})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm text-gray-500",children:"Response Time"}),u.jsxs("span",{className:"text-sm font-medium text-gray-900",children:[E.metrics.response_time,"s"]})]})]})]}),E.capabilities&&E.capabilities.length>0&&u.jsxs("div",{className:"mt-4",children:[u.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Capabilities"}),u.jsx("div",{className:"flex flex-wrap gap-2",children:E.capabilities.map(P=>u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs bg-gray-100 text-gray-600",children:P},P))})]}),u.jsxs("div",{className:"mt-4 flex items-center space-x-2",children:[v(E.status),u.jsxs("span",{className:"text-sm text-gray-500",children:["Last seen: ",new Date(E.last_seen).toLocaleTimeString()]})]})]},E.id)})}),e&&u.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50",children:u.jsx("div",{className:"relative top-10 mx-auto p-5 border w-[500px] shadow-lg rounded-md bg-white max-h-[90vh] overflow-y-auto",children:u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Register New Agent"}),u.jsx("button",{onClick:()=>t(!1),className:"text-gray-400 hover:text-gray-600",children:u.jsx(si,{className:"h-6 w-6"})})]}),u.jsxs("div",{className:"flex space-x-1 mb-6 bg-gray-100 p-1 rounded-lg",children:[u.jsxs("button",{onClick:()=>a("ollama"),className:`flex-1 py-2 px-4 rounded-md text-sm font-medium transition-colors ${i==="ollama"?"bg-white text-blue-600 shadow":"text-gray-600 hover:text-gray-900"}`,children:[u.jsx(gd,{className:"h-4 w-4 inline mr-2"}),"Ollama Agent"]}),u.jsxs("button",{onClick:()=>a("cli"),className:`flex-1 py-2 px-4 rounded-md text-sm font-medium transition-colors ${i==="cli"?"bg-white text-purple-600 shadow":"text-gray-600 hover:text-gray-900"}`,children:[u.jsx(Zs,{className:"h-4 w-4 inline mr-2"}),"CLI Agent"]})]}),i==="ollama"&&u.jsxs("form",{onSubmit:p,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Agent Name"}),u.jsx("input",{type:"text",value:s.name,onChange:E=>o({...s,name:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",placeholder:"e.g., WALNUT",required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Endpoint URL"}),u.jsx("input",{type:"url",value:s.endpoint,onChange:E=>o({...s,endpoint:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",placeholder:"http://192.168.1.100:11434",required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Model"}),u.jsx("input",{type:"text",value:s.model,onChange:E=>o({...s,model:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",placeholder:"deepseek-coder-v2:latest",required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Specialty"}),u.jsxs("select",{value:s.specialty,onChange:E=>o({...s,specialty:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",children:[u.jsx("option",{value:"kernel_dev",children:"Kernel Development"}),u.jsx("option",{value:"pytorch_dev",children:"PyTorch Development"}),u.jsx("option",{value:"profiler",children:"Profiler"}),u.jsx("option",{value:"docs_writer",children:"Documentation"}),u.jsx("option",{value:"tester",children:"Testing"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Max Concurrent Tasks"}),u.jsx("input",{type:"number",min:"1",max:"10",value:s.max_concurrent,onChange:E=>o({...s,max_concurrent:parseInt(E.target.value)}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2"})]}),u.jsxs("div",{className:"flex justify-end space-x-3 pt-4",children:[u.jsx("button",{type:"button",onClick:()=>t(!1),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),u.jsxs("button",{type:"submit",className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700",children:[u.jsx(gd,{className:"h-4 w-4 inline mr-2"}),"Register Ollama Agent"]})]})]}),i==="cli"&&u.jsxs("form",{onSubmit:g,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Agent ID"}),u.jsx("input",{type:"text",value:l.id,onChange:E=>c({...l,id:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",placeholder:"e.g., walnut-gemini",required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"SSH Host"}),u.jsxs("select",{value:l.host,onChange:E=>c({...l,host:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",required:!0,children:[u.jsx("option",{value:"",children:"Select host..."}),u.jsx("option",{value:"walnut",children:"WALNUT (192.168.1.27)"}),u.jsx("option",{value:"ironwood",children:"IRONWOOD (192.168.1.113)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Node.js Version"}),u.jsxs("select",{value:l.node_version,onChange:E=>c({...l,node_version:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",required:!0,children:[u.jsx("option",{value:"",children:"Select version..."}),u.jsx("option",{value:"v22.14.0",children:"v22.14.0 (WALNUT)"}),u.jsx("option",{value:"v22.17.0",children:"v22.17.0 (IRONWOOD)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Model"}),u.jsxs("select",{value:l.model,onChange:E=>c({...l,model:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",children:[u.jsx("option",{value:"gemini-2.5-pro",children:"Gemini 2.5 Pro"}),u.jsx("option",{value:"gemini-1.5-pro",children:"Gemini 1.5 Pro"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Specialization"}),u.jsxs("select",{value:l.specialization,onChange:E=>c({...l,specialization:E.target.value}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2",children:[u.jsx("option",{value:"general_ai",children:"General AI"}),u.jsx("option",{value:"reasoning",children:"Advanced Reasoning"}),u.jsx("option",{value:"code_analysis",children:"Code Analysis"}),u.jsx("option",{value:"documentation",children:"Documentation"}),u.jsx("option",{value:"testing",children:"Testing"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Max Concurrent"}),u.jsx("input",{type:"number",min:"1",max:"5",value:l.max_concurrent,onChange:E=>c({...l,max_concurrent:parseInt(E.target.value)}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Timeout (sec)"}),u.jsx("input",{type:"number",min:"30",max:"300",value:l.command_timeout,onChange:E=>c({...l,command_timeout:parseInt(E.target.value)}),className:"mt-1 block w-full border border-gray-300 rounded-md px-3 py-2"})]})]}),u.jsx("div",{className:"bg-purple-50 p-3 rounded-md",children:u.jsxs("p",{className:"text-sm text-purple-700",children:[u.jsx(Zs,{className:"h-4 w-4 inline mr-1"}),"CLI agents require SSH access to the target machine and Gemini CLI installation."]})}),u.jsxs("div",{className:"flex justify-end space-x-3 pt-4",children:[u.jsx("button",{type:"button",onClick:()=>t(!1),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),u.jsxs("button",{type:"submit",className:"px-4 py-2 text-sm font-medium text-white bg-purple-600 border border-transparent rounded-md hover:bg-purple-700",children:[u.jsx(Zs,{className:"h-4 w-4 inline mr-2"}),"Register CLI Agent"]})]})]})]})})})]})}function fZ(){const[e,t]=w.useState("all"),[r,n]=w.useState(""),[i,a]=w.useState(null),[s,o]=w.useState(!1),{data:l=[],isLoading:c,refetch:d}=rn({queryKey:["executions"],queryFn:async()=>{try{return await Ma.getExecutions()}catch{return[{id:"exec-001",workflow_id:"wf-001",workflow_name:"Customer Data Processing",status:"completed",started_at:new Date(Date.now()-36e5).toISOString(),completed_at:new Date(Date.now()-33e5).toISOString(),duration:300,agent_id:"walnut",output:{processed_records:1250,status:"success"}},{id:"exec-002",workflow_id:"wf-002",workflow_name:"Document Analysis",status:"running",started_at:new Date(Date.now()-18e5).toISOString(),agent_id:"ironwood"},{id:"exec-003",workflow_id:"wf-001",workflow_name:"Customer Data Processing",status:"failed",started_at:new Date(Date.now()-72e5).toISOString(),completed_at:new Date(Date.now()-7e6).toISOString(),duration:200,agent_id:"acacia",error:"Database connection timeout"},{id:"exec-004",workflow_id:"wf-003",workflow_name:"Email Campaign",status:"pending",started_at:new Date().toISOString()},{id:"exec-005",workflow_id:"wf-002",workflow_name:"Document Analysis",status:"completed",started_at:new Date(Date.now()-144e5).toISOString(),completed_at:new Date(Date.now()-141e5).toISOString(),duration:300,agent_id:"walnut",output:{documents_processed:45,insights_extracted:23}}]}},refetchInterval:5e3}),f=async(b,S)=>{var _,j;try{S==="cancel"?await((_=Ma.cancelExecution)==null?void 0:_.call(Ma,b)):S==="retry"&&await((j=Ma.retryExecution)==null?void 0:j.call(Ma,b)),d()}catch(N){console.error(`Failed to ${S} execution:`,N)}},h=b=>{switch(b){case"completed":return u.jsx(ii,{className:"h-5 w-5 text-green-500"});case"failed":return u.jsx(si,{className:"h-5 w-5 text-red-500"});case"running":return u.jsx(Wr,{className:"h-5 w-5 text-blue-500 animate-spin"});case"pending":return u.jsx(Wr,{className:"h-5 w-5 text-yellow-500"});case"cancelled":return u.jsx(uE,{className:"h-5 w-5 text-gray-500"});default:return u.jsx(Im,{className:"h-5 w-5 text-gray-400"})}},p=b=>{const S="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium";switch(b){case"completed":return`${S} bg-green-100 text-green-800`;case"failed":return`${S} bg-red-100 text-red-800`;case"running":return`${S} bg-blue-100 text-blue-800`;case"pending":return`${S} bg-yellow-100 text-yellow-800`;case"cancelled":return`${S} bg-gray-100 text-gray-800`;default:return`${S} bg-gray-100 text-gray-800`}},g=b=>{const S=Math.floor(b/60),_=b%60;return`${S}m ${_}s`},m=l.filter(b=>{var j;const S=e==="all"||b.status===e,_=r===""||((j=b.workflow_name)==null?void 0:j.toLowerCase().includes(r.toLowerCase()))||b.id.toLowerCase().includes(r.toLowerCase());return S&&_}),v=l.filter(b=>b.status==="completed").length,y=l.filter(b=>b.status==="running").length,x=l.length>0?Math.round(v/l.length*100):0;return c?u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),u.jsx("div",{className:"h-64 bg-gray-200 rounded"})]})}):u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"mb-6",children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Executions"}),u.jsx("p",{className:"text-gray-600",children:"Monitor and manage workflow executions"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ai,{className:"h-8 w-8 text-blue-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:l.length}),u.jsx("p",{className:"text-sm text-gray-500",children:"Total Executions"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ii,{className:"h-8 w-8 text-green-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:v}),u.jsx("p",{className:"text-sm text-gray-500",children:"Completed"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(Wr,{className:"h-8 w-8 text-yellow-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:y}),u.jsx("p",{className:"text-sm text-gray-500",children:"Running"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(si,{className:"h-8 w-8 text-red-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[x,"%"]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Success Rate"})]})]})})]}),u.jsx("div",{className:"bg-white rounded-lg border p-6 mb-6",children:u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(uS,{className:"h-5 w-5 text-gray-400"}),u.jsxs("select",{value:e,onChange:b=>t(b.target.value),className:"border border-gray-300 rounded-md px-3 py-2 text-sm",children:[u.jsx("option",{value:"all",children:"All Status"}),u.jsx("option",{value:"completed",children:"Completed"}),u.jsx("option",{value:"running",children:"Running"}),u.jsx("option",{value:"failed",children:"Failed"}),u.jsx("option",{value:"pending",children:"Pending"}),u.jsx("option",{value:"cancelled",children:"Cancelled"})]})]}),u.jsxs("div",{className:"flex items-center space-x-2 flex-1",children:[u.jsx(dS,{className:"h-5 w-5 text-gray-400"}),u.jsx("input",{type:"text",placeholder:"Search executions...",value:r,onChange:b=>n(b.target.value),className:"flex-1 border border-gray-300 rounded-md px-3 py-2 text-sm"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border overflow-hidden",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Execution"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Workflow"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Agent"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Duration"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Started"}),u.jsx("th",{className:"relative px-6 py-3",children:u.jsx("span",{className:"sr-only",children:"Actions"})})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:m.map(b=>u.jsxs("tr",{className:"hover:bg-gray-50",children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsxs("div",{className:"flex items-center",children:[h(b.status),u.jsx("div",{className:"ml-3",children:u.jsx("div",{className:"text-sm font-medium text-gray-900",children:b.id})})]})}),u.jsxs("td",{className:"px-6 py-4 whitespace-nowrap",children:[u.jsx("div",{className:"text-sm font-medium text-gray-900",children:b.workflow_name}),u.jsx("div",{className:"text-sm text-gray-500",children:b.workflow_id})]}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsx("span",{className:p(b.status),children:b.status})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:b.agent_id||"-"}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:b.duration?g(b.duration):"-"}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:rc(new Date(b.started_at),{addSuffix:!0})}),u.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium space-x-2",children:[u.jsx("button",{onClick:()=>{a(b),o(!0)},className:"text-blue-600 hover:text-blue-900",children:u.jsx(cS,{className:"h-4 w-4"})}),b.status==="running"&&u.jsx("button",{onClick:()=>f(b.id,"cancel"),className:"text-red-600 hover:text-red-900",children:u.jsx(uE,{className:"h-4 w-4"})}),(b.status==="failed"||b.status==="cancelled")&&u.jsx("button",{onClick:()=>f(b.id,"retry"),className:"text-green-600 hover:text-green-900",children:u.jsx(B3,{className:"h-4 w-4"})})]})]},b.id))})]})})}),s&&i&&u.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50",children:u.jsx("div",{className:"relative top-20 mx-auto p-5 border w-3/4 max-w-4xl shadow-lg rounded-md bg-white",children:u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Execution Details"}),u.jsx("button",{onClick:()=>o(!1),className:"text-gray-400 hover:text-gray-600",children:u.jsx(si,{className:"h-6 w-6"})})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-md font-medium text-gray-900 mb-2",children:"Basic Information"}),u.jsxs("dl",{className:"space-y-2",children:[u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Execution ID"}),u.jsx("dd",{className:"text-sm text-gray-900",children:i.id})]}),u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Workflow"}),u.jsx("dd",{className:"text-sm text-gray-900",children:i.workflow_name})]}),u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Status"}),u.jsx("dd",{children:u.jsx("span",{className:p(i.status),children:i.status})})]}),u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Agent"}),u.jsx("dd",{className:"text-sm text-gray-900",children:i.agent_id||"Not assigned"})]})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"text-md font-medium text-gray-900 mb-2",children:"Timing"}),u.jsxs("dl",{className:"space-y-2",children:[u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Started"}),u.jsx("dd",{className:"text-sm text-gray-900",children:Cd(new Date(i.started_at),"PPp")})]}),i.completed_at&&u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Completed"}),u.jsx("dd",{className:"text-sm text-gray-900",children:Cd(new Date(i.completed_at),"PPp")})]}),i.duration&&u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Duration"}),u.jsx("dd",{className:"text-sm text-gray-900",children:g(i.duration)})]})]})]})]}),i.error&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h4",{className:"text-md font-medium text-red-900 mb-2",children:"Error Details"}),u.jsx("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:u.jsx("p",{className:"text-sm text-red-800",children:i.error})})]}),i.output&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h4",{className:"text-md font-medium text-gray-900 mb-2",children:"Output"}),u.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:u.jsx("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(i.output,null,2)})})]})]})})})]})}function IM(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=IM(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Te(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=IM(e))&&(n&&(n+=" "),n+=t);return n}var hZ=Array.isArray,qr=hZ,pZ=typeof kh=="object"&&kh&&kh.Object===Object&&kh,DM=pZ,mZ=DM,gZ=typeof self=="object"&&self&&self.Object===Object&&self,yZ=mZ||gZ||Function("return this")(),Ri=yZ,vZ=Ri,xZ=vZ.Symbol,vh=xZ,RE=vh,LM=Object.prototype,bZ=LM.hasOwnProperty,wZ=LM.toString,Gu=RE?RE.toStringTag:void 0;function _Z(e){var t=bZ.call(e,Gu),r=e[Gu];try{e[Gu]=void 0;var n=!0}catch{}var i=wZ.call(e);return n&&(t?e[Gu]=r:delete e[Gu]),i}var SZ=_Z,jZ=Object.prototype,NZ=jZ.toString;function EZ(e){return NZ.call(e)}var OZ=EZ,IE=vh,AZ=SZ,kZ=OZ,PZ="[object Null]",TZ="[object Undefined]",DE=IE?IE.toStringTag:void 0;function CZ(e){return e==null?e===void 0?TZ:PZ:DE&&DE in Object(e)?AZ(e):kZ(e)}var Sa=CZ;function $Z(e){return e!=null&&typeof e=="object"}var ja=$Z,MZ=Sa,RZ=ja,IZ="[object Symbol]";function DZ(e){return typeof e=="symbol"||RZ(e)&&MZ(e)==IZ}var gu=DZ,LZ=qr,FZ=gu,BZ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zZ=/^\w*$/;function UZ(e,t){if(LZ(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||FZ(e)?!0:zZ.test(e)||!BZ.test(e)||t!=null&&e in Object(t)}var wS=UZ;function WZ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ds=WZ;const yu=Xe(Ds);var VZ=Sa,HZ=Ds,qZ="[object AsyncFunction]",KZ="[object Function]",GZ="[object GeneratorFunction]",YZ="[object Proxy]";function XZ(e){if(!HZ(e))return!1;var t=VZ(e);return t==KZ||t==GZ||t==qZ||t==YZ}var _S=XZ;const Se=Xe(_S);var ZZ=Ri,QZ=ZZ["__core-js_shared__"],JZ=QZ,M0=JZ,LE=function(){var e=/[^.]+$/.exec(M0&&M0.keys&&M0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function eQ(e){return!!LE&&LE in e}var tQ=eQ,rQ=Function.prototype,nQ=rQ.toString;function iQ(e){if(e!=null){try{return nQ.call(e)}catch{}try{return e+""}catch{}}return""}var FM=iQ,aQ=_S,sQ=tQ,oQ=Ds,lQ=FM,cQ=/[\\^$.*+?()[\]{}|]/g,uQ=/^\[object .+?Constructor\]$/,dQ=Function.prototype,fQ=Object.prototype,hQ=dQ.toString,pQ=fQ.hasOwnProperty,mQ=RegExp("^"+hQ.call(pQ).replace(cQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gQ(e){if(!oQ(e)||sQ(e))return!1;var t=aQ(e)?mQ:uQ;return t.test(lQ(e))}var yQ=gQ;function vQ(e,t){return e==null?void 0:e[t]}var xQ=vQ,bQ=yQ,wQ=xQ;function _Q(e,t){var r=wQ(e,t);return bQ(r)?r:void 0}var ll=_Q,SQ=ll,jQ=SQ(Object,"create"),Iy=jQ,FE=Iy;function NQ(){this.__data__=FE?FE(null):{},this.size=0}var EQ=NQ;function OQ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var AQ=OQ,kQ=Iy,PQ="__lodash_hash_undefined__",TQ=Object.prototype,CQ=TQ.hasOwnProperty;function $Q(e){var t=this.__data__;if(kQ){var r=t[e];return r===PQ?void 0:r}return CQ.call(t,e)?t[e]:void 0}var MQ=$Q,RQ=Iy,IQ=Object.prototype,DQ=IQ.hasOwnProperty;function LQ(e){var t=this.__data__;return RQ?t[e]!==void 0:DQ.call(t,e)}var FQ=LQ,BQ=Iy,zQ="__lodash_hash_undefined__";function UQ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=BQ&&t===void 0?zQ:t,this}var WQ=UQ,VQ=EQ,HQ=AQ,qQ=MQ,KQ=FQ,GQ=WQ;function vu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}vu.prototype.clear=VQ;vu.prototype.delete=HQ;vu.prototype.get=qQ;vu.prototype.has=KQ;vu.prototype.set=GQ;var YQ=vu;function XQ(){this.__data__=[],this.size=0}var ZQ=XQ;function QQ(e,t){return e===t||e!==e&&t!==t}var SS=QQ,JQ=SS;function eJ(e,t){for(var r=e.length;r--;)if(JQ(e[r][0],t))return r;return-1}var Dy=eJ,tJ=Dy,rJ=Array.prototype,nJ=rJ.splice;function iJ(e){var t=this.__data__,r=tJ(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():nJ.call(t,r,1),--this.size,!0}var aJ=iJ,sJ=Dy;function oJ(e){var t=this.__data__,r=sJ(t,e);return r<0?void 0:t[r][1]}var lJ=oJ,cJ=Dy;function uJ(e){return cJ(this.__data__,e)>-1}var dJ=uJ,fJ=Dy;function hJ(e,t){var r=this.__data__,n=fJ(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var pJ=hJ,mJ=ZQ,gJ=aJ,yJ=lJ,vJ=dJ,xJ=pJ;function xu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xu.prototype.clear=mJ;xu.prototype.delete=gJ;xu.prototype.get=yJ;xu.prototype.has=vJ;xu.prototype.set=xJ;var Ly=xu,bJ=ll,wJ=Ri,_J=bJ(wJ,"Map"),jS=_J,BE=YQ,SJ=Ly,jJ=jS;function NJ(){this.size=0,this.__data__={hash:new BE,map:new(jJ||SJ),string:new BE}}var EJ=NJ;function OJ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var AJ=OJ,kJ=AJ;function PJ(e,t){var r=e.__data__;return kJ(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Fy=PJ,TJ=Fy;function CJ(e){var t=TJ(this,e).delete(e);return this.size-=t?1:0,t}var $J=CJ,MJ=Fy;function RJ(e){return MJ(this,e).get(e)}var IJ=RJ,DJ=Fy;function LJ(e){return DJ(this,e).has(e)}var FJ=LJ,BJ=Fy;function zJ(e,t){var r=BJ(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var UJ=zJ,WJ=EJ,VJ=$J,HJ=IJ,qJ=FJ,KJ=UJ;function bu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bu.prototype.clear=WJ;bu.prototype.delete=VJ;bu.prototype.get=HJ;bu.prototype.has=qJ;bu.prototype.set=KJ;var NS=bu,BM=NS,GJ="Expected a function";function ES(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(GJ);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(ES.Cache||BM),r}ES.Cache=BM;var zM=ES;const YJ=Xe(zM);var XJ=zM,ZJ=500;function QJ(e){var t=XJ(e,function(n){return r.size===ZJ&&r.clear(),n}),r=t.cache;return t}var JJ=QJ,eee=JJ,tee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ree=/\\(\\)?/g,nee=eee(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tee,function(r,n,i,a){t.push(i?a.replace(ree,"$1"):n||r)}),t}),iee=nee;function aee(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var OS=aee,zE=vh,see=OS,oee=qr,lee=gu,UE=zE?zE.prototype:void 0,WE=UE?UE.toString:void 0;function UM(e){if(typeof e=="string")return e;if(oee(e))return see(e,UM)+"";if(lee(e))return WE?WE.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var cee=UM,uee=cee;function dee(e){return e==null?"":uee(e)}var WM=dee,fee=qr,hee=wS,pee=iee,mee=WM;function gee(e,t){return fee(e)?e:hee(e,t)?[e]:pee(mee(e))}var VM=gee,yee=gu;function vee(e){if(typeof e=="string"||yee(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var By=vee,xee=VM,bee=By;function wee(e,t){t=xee(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[bee(t[r++])];return r&&r==n?e:void 0}var AS=wee,_ee=AS;function See(e,t,r){var n=e==null?void 0:_ee(e,t);return n===void 0?r:n}var HM=See;const an=Xe(HM);function jee(e){return e==null}var Nee=jee;const Ee=Xe(Nee);var Eee=Sa,Oee=qr,Aee=ja,kee="[object String]";function Pee(e){return typeof e=="string"||!Oee(e)&&Aee(e)&&Eee(e)==kee}var Tee=Pee;const Zo=Xe(Tee);var qM={exports:{}},et={};/**
|
||
* @license React
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var kS=Symbol.for("react.element"),PS=Symbol.for("react.portal"),zy=Symbol.for("react.fragment"),Uy=Symbol.for("react.strict_mode"),Wy=Symbol.for("react.profiler"),Vy=Symbol.for("react.provider"),Hy=Symbol.for("react.context"),Cee=Symbol.for("react.server_context"),qy=Symbol.for("react.forward_ref"),Ky=Symbol.for("react.suspense"),Gy=Symbol.for("react.suspense_list"),Yy=Symbol.for("react.memo"),Xy=Symbol.for("react.lazy"),$ee=Symbol.for("react.offscreen"),KM;KM=Symbol.for("react.module.reference");function $n(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case kS:switch(e=e.type,e){case zy:case Wy:case Uy:case Ky:case Gy:return e;default:switch(e=e&&e.$$typeof,e){case Cee:case Hy:case qy:case Xy:case Yy:case Vy:return e;default:return t}}case PS:return t}}}et.ContextConsumer=Hy;et.ContextProvider=Vy;et.Element=kS;et.ForwardRef=qy;et.Fragment=zy;et.Lazy=Xy;et.Memo=Yy;et.Portal=PS;et.Profiler=Wy;et.StrictMode=Uy;et.Suspense=Ky;et.SuspenseList=Gy;et.isAsyncMode=function(){return!1};et.isConcurrentMode=function(){return!1};et.isContextConsumer=function(e){return $n(e)===Hy};et.isContextProvider=function(e){return $n(e)===Vy};et.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===kS};et.isForwardRef=function(e){return $n(e)===qy};et.isFragment=function(e){return $n(e)===zy};et.isLazy=function(e){return $n(e)===Xy};et.isMemo=function(e){return $n(e)===Yy};et.isPortal=function(e){return $n(e)===PS};et.isProfiler=function(e){return $n(e)===Wy};et.isStrictMode=function(e){return $n(e)===Uy};et.isSuspense=function(e){return $n(e)===Ky};et.isSuspenseList=function(e){return $n(e)===Gy};et.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zy||e===Wy||e===Uy||e===Ky||e===Gy||e===$ee||typeof e=="object"&&e!==null&&(e.$$typeof===Xy||e.$$typeof===Yy||e.$$typeof===Vy||e.$$typeof===Hy||e.$$typeof===qy||e.$$typeof===KM||e.getModuleId!==void 0)};et.typeOf=$n;qM.exports=et;var Mee=qM.exports,Ree=Sa,Iee=ja,Dee="[object Number]";function Lee(e){return typeof e=="number"||Iee(e)&&Ree(e)==Dee}var GM=Lee;const Fee=Xe(GM);var Bee=GM;function zee(e){return Bee(e)&&e!=+e}var Uee=zee;const wu=Xe(Uee);var Or=function(t){return t===0?0:t>0?1:-1},fo=function(t){return Zo(t)&&t.indexOf("%")===t.length-1},J=function(t){return Fee(t)&&!wu(t)},Wee=function(t){return Ee(t)},Gt=function(t){return J(t)||Zo(t)},Vee=0,cl=function(t){var r=++Vee;return"".concat(t||"").concat(r)},Ar=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!J(t)&&!Zo(t))return n;var a;if(fo(t)){var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return wu(a)&&(a=n),i&&a>r&&(a=r),a},Ha=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},Hee=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},qt=function(t,r){return J(t)&&J(r)?function(n){return t+n*(r-t)}:function(){return r}};function Wm(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):an(n,t))===r})}var qee=function(t,r){return J(t)&&J(r)?t-r:Zo(t)&&Zo(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function nc(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function nw(e){"@babel/helpers - typeof";return nw=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},nw(e)}var Kee=["viewBox","children"],Gee=["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"],VE=["points","pathLength"],R0={svg:Kee,polygon:VE,polyline:VE},TS=["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"],Vm=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(w.isValidElement(t)&&(n=t.props),!yu(n))return null;var i={};return Object.keys(n).forEach(function(a){TS.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},Yee=function(t,r,n){return function(i){return t(r,n,i),null}},Qo=function(t,r,n){if(!yu(t)||nw(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var s=t[a];TS.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=Yee(s,r,n))}),i},Xee=["children"],Zee=["children"];function HE(e,t){if(e==null)return{};var r=Qee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function iw(e){"@babel/helpers - typeof";return iw=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},iw(e)}var qE={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"},aa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},KE=null,I0=null,CS=function e(t){if(t===KE&&Array.isArray(I0))return I0;var r=[];return w.Children.forEach(t,function(n){Ee(n)||(Mee.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),I0=r,KE=t,r};function sn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return aa(i)}):n=[aa(t)],CS(e).forEach(function(i){var a=an(i,"type.displayName")||an(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Qr(e,t){var r=sn(e,t);return r&&r[0]}var GE=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!J(n)||n<=0||!J(i)||i<=0)},Jee=["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"],ete=function(t){return t&&t.type&&Zo(t.type)&&Jee.indexOf(t.type)>=0},YM=function(t){return t&&iw(t)==="object"&&"clipDot"in t},tte=function(t,r,n,i){var a,s=(a=R0==null?void 0:R0[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!Se(t)&&(i&&s.includes(r)||Gee.includes(r))||n&&TS.includes(r)},ye=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(w.isValidElement(t)&&(i=t.props),!yu(i))return null;var a={};return Object.keys(i).forEach(function(s){var o;tte((o=i)===null||o===void 0?void 0:o[s],s,r,n)&&(a[s]=i[s])}),a},aw=function e(t,r){if(t===r)return!0;var n=w.Children.count(t);if(n!==w.Children.count(r))return!1;if(n===0)return!0;if(n===1)return YE(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!e(a,s))return!1}else if(!YE(a,s))return!1}return!0},YE=function(t,r){if(Ee(t)&&Ee(r))return!0;if(!Ee(t)&&!Ee(r)){var n=t.props||{},i=n.children,a=HE(n,Xee),s=r.props||{},o=s.children,l=HE(s,Zee);return i&&o?nc(a,l)&&aw(i,o):!i&&!o?nc(a,l):!1}return!1},XE=function(t,r){var n=[],i={};return CS(t).forEach(function(a,s){if(ete(a))n.push(a);else if(a){var o=aa(a.type),l=r[o]||{},c=l.handler,d=l.once;if(c&&(!d||!i[o])){var f=c(a,o,s);n.push(f),i[o]=!0}}}),n},rte=function(t){var r=t&&t.type;return r&&qE[r]?qE[r]:null},nte=function(t,r){return CS(r).indexOf(t)},ite=["children","width","height","viewBox","className","style","title","desc"];function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sw.apply(this,arguments)}function ate(e,t){if(e==null)return{};var r=ste(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ste(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ow(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,s=e.style,o=e.title,l=e.desc,c=ate(e,ite),d=i||{width:r,height:n,x:0,y:0},f=Te("recharts-surface",a);return k.createElement("svg",sw({},ye(c,!0,"svg"),{className:f,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),k.createElement("title",null,o),k.createElement("desc",null,l),t)}var ote=["children","className"];function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lw.apply(this,arguments)}function lte(e,t){if(e==null)return{};var r=cte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Le=k.forwardRef(function(e,t){var r=e.children,n=e.className,i=lte(e,ote),a=Te("recharts-layer",n);return k.createElement("g",lw({className:a},ye(i,!0),{ref:t}),r)}),oi=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function ute(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var dte=ute,fte=dte;function hte(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:fte(e,t,r)}var pte=hte,mte="\\ud800-\\udfff",gte="\\u0300-\\u036f",yte="\\ufe20-\\ufe2f",vte="\\u20d0-\\u20ff",xte=gte+yte+vte,bte="\\ufe0e\\ufe0f",wte="\\u200d",_te=RegExp("["+wte+mte+xte+bte+"]");function Ste(e){return _te.test(e)}var XM=Ste;function jte(e){return e.split("")}var Nte=jte,ZM="\\ud800-\\udfff",Ete="\\u0300-\\u036f",Ote="\\ufe20-\\ufe2f",Ate="\\u20d0-\\u20ff",kte=Ete+Ote+Ate,Pte="\\ufe0e\\ufe0f",Tte="["+ZM+"]",cw="["+kte+"]",uw="\\ud83c[\\udffb-\\udfff]",Cte="(?:"+cw+"|"+uw+")",QM="[^"+ZM+"]",JM="(?:\\ud83c[\\udde6-\\uddff]){2}",e4="[\\ud800-\\udbff][\\udc00-\\udfff]",$te="\\u200d",t4=Cte+"?",r4="["+Pte+"]?",Mte="(?:"+$te+"(?:"+[QM,JM,e4].join("|")+")"+r4+t4+")*",Rte=r4+t4+Mte,Ite="(?:"+[QM+cw+"?",cw,JM,e4,Tte].join("|")+")",Dte=RegExp(uw+"(?="+uw+")|"+Ite+Rte,"g");function Lte(e){return e.match(Dte)||[]}var Fte=Lte,Bte=Nte,zte=XM,Ute=Fte;function Wte(e){return zte(e)?Ute(e):Bte(e)}var Vte=Wte,Hte=pte,qte=XM,Kte=Vte,Gte=WM;function Yte(e){return function(t){t=Gte(t);var r=qte(t)?Kte(t):void 0,n=r?r[0]:t.charAt(0),i=r?Hte(r,1).join(""):t.slice(1);return n[e]()+i}}var Xte=Yte,Zte=Xte,Qte=Zte("toUpperCase"),Jte=Qte;const Zy=Xe(Jte);function st(e){return function(){return e}}const n4=Math.cos,Hm=Math.sin,fi=Math.sqrt,qm=Math.PI,Qy=2*qm,dw=Math.PI,fw=2*dw,Js=1e-6,ere=fw-Js;function i4(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function tre(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return i4;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class rre{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?i4:tre(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-t,c=i-r,d=s-t,f=o-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Js)if(!(Math.abs(f*l-c*d)>Js)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,g=i-o,m=l*l+c*c,v=p*p+g*g,y=Math.sqrt(m),x=Math.sqrt(h),b=a*Math.tan((dw-Math.acos((m+h-v)/(2*y*x)))/2),S=b/x,_=b/y;Math.abs(S-1)>Js&&this._append`L${t+S*d},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*p>d*g)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),c=t+o,d=r+l,f=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>Js||Math.abs(this._y1-d)>Js)&&this._append`L${c},${d}`,n&&(h<0&&(h=h%fw+fw),h>ere?this._append`A${n},${n},0,1,${f},${t-o},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=d}`:h>Js&&this._append`A${n},${n},0,${+(h>=dw)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function $S(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new rre(t)}function MS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function a4(e){this._context=e}a4.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 Jy(e){return new a4(e)}function s4(e){return e[0]}function o4(e){return e[1]}function l4(e,t){var r=st(!0),n=null,i=Jy,a=null,s=$S(o);e=typeof e=="function"?e:e===void 0?s4:st(e),t=typeof t=="function"?t:t===void 0?o4:st(t);function o(l){var c,d=(l=MS(l)).length,f,h=!1,p;for(n==null&&(a=i(p=s())),c=0;c<=d;++c)!(c<d&&r(f=l[c],c,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,c,l),+t(f,c,l));if(p)return a=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:st(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:st(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:st(!!l),o):r},o.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),o):i},o.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),o):n},o}function sp(e,t,r){var n=null,i=st(!0),a=null,s=Jy,o=null,l=$S(c);e=typeof e=="function"?e:e===void 0?s4:st(+e),t=typeof t=="function"?t:st(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?o4:st(+r);function c(f){var h,p,g,m=(f=MS(f)).length,v,y=!1,x,b=new Array(m),S=new Array(m);for(a==null&&(o=s(x=l())),h=0;h<=m;++h){if(!(h<m&&i(v=f[h],h,f))===y)if(y=!y)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=h-1;g>=p;--g)o.point(b[g],S[g]);o.lineEnd(),o.areaEnd()}y&&(b[h]=+e(v,h,f),S[h]=+t(v,h,f),o.point(n?+n(v,h,f):b[h],r?+r(v,h,f):S[h]))}if(x)return o=null,x+""||null}function d(){return l4().defined(i).curve(s).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:st(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:st(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:st(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:st(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:st(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:st(+f),c):r},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(r)},c.lineX1=function(){return d().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:st(!!f),c):i},c.curve=function(f){return arguments.length?(s=f,a!=null&&(o=s(a)),c):s},c.context=function(f){return arguments.length?(f==null?a=o=null:o=s(a=f),c):a},c}class c4{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function nre(e){return new c4(e,!0)}function ire(e){return new c4(e,!1)}const RS={draw(e,t){const r=fi(t/qm);e.moveTo(r,0),e.arc(0,0,r,0,Qy)}},are={draw(e,t){const r=fi(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},u4=fi(1/3),sre=u4*2,ore={draw(e,t){const r=fi(t/sre),n=r*u4;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},lre={draw(e,t){const r=fi(t),n=-r/2;e.rect(n,n,r,r)}},cre=.8908130915292852,d4=Hm(qm/10)/Hm(7*qm/10),ure=Hm(Qy/10)*d4,dre=-n4(Qy/10)*d4,fre={draw(e,t){const r=fi(t*cre),n=ure*r,i=dre*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=Qy*a/5,o=n4(s),l=Hm(s);e.lineTo(l*r,-o*r),e.lineTo(o*n-l*i,l*n+o*i)}e.closePath()}},D0=fi(3),hre={draw(e,t){const r=-fi(t/(D0*3));e.moveTo(0,r*2),e.lineTo(-D0*r,-r),e.lineTo(D0*r,-r),e.closePath()}},mn=-.5,gn=fi(3)/2,hw=1/fi(12),pre=(hw/2+1)*3,mre={draw(e,t){const r=fi(t/pre),n=r/2,i=r*hw,a=n,s=r*hw+r,o=-a,l=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(o,l),e.lineTo(mn*n-gn*i,gn*n+mn*i),e.lineTo(mn*a-gn*s,gn*a+mn*s),e.lineTo(mn*o-gn*l,gn*o+mn*l),e.lineTo(mn*n+gn*i,mn*i-gn*n),e.lineTo(mn*a+gn*s,mn*s-gn*a),e.lineTo(mn*o+gn*l,mn*l-gn*o),e.closePath()}};function gre(e,t){let r=null,n=$S(i);e=typeof e=="function"?e:st(e||RS),t=typeof t=="function"?t:st(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:st(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:st(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Km(){}function Gm(e,t,r){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+r)/6)}function f4(e){this._context=e}f4.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:Gm(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:Gm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yre(e){return new f4(e)}function h4(e){this._context=e}h4.prototype={areaStart:Km,areaEnd:Km,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:Gm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vre(e){return new h4(e)}function p4(e){this._context=e}p4.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Gm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xre(e){return new p4(e)}function m4(e){this._context=e}m4.prototype={areaStart:Km,areaEnd:Km,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 bre(e){return new m4(e)}function ZE(e){return e<0?-1:1}function QE(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(ZE(a)+ZE(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function JE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function L0(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-n)/3;e._context.bezierCurveTo(n+o,i+o*t,a-o,s-o*r,a,s)}function Ym(e){this._context=e}Ym.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:L0(this,this._t0,JE(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 r=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,L0(this,JE(this,r=QE(this,e,t)),r);break;default:L0(this,this._t0,r=QE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function g4(e){this._context=new y4(e)}(g4.prototype=Object.create(Ym.prototype)).point=function(e,t){Ym.prototype.point.call(this,t,e)};function y4(e){this._context=e}y4.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function wre(e){return new Ym(e)}function _re(e){return new g4(e)}function v4(e){this._context=e}v4.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=eO(e),i=eO(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&r===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 eO(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(i[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Sre(e){return new v4(e)}function ev(e,t){this._context=e,this._t=t}ev.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function jre(e){return new ev(e,.5)}function Nre(e){return new ev(e,0)}function Ere(e){return new ev(e,1)}function Ac(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,o=a.length;r<s;++r)for(i=a,a=e[t[r]],n=0;n<o;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function pw(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Ore(e,t){return e[t]}function Are(e){const t=[];return t.key=e,t}function kre(){var e=st([]),t=pw,r=Ac,n=Ore;function i(a){var s=Array.from(e.apply(this,arguments),Are),o,l=s.length,c=-1,d;for(const f of a)for(o=0,++c;o<l;++o)(s[o][c]=[0,+n(f,s[o].key,c,a)]).data=f;for(o=0,d=MS(t(s));o<l;++o)s[d[o]].index=o;return r(s,d),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:st(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:st(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?pw:typeof a=="function"?a:st(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Ac,i):r},i}function Pre(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=e[r][i][1]||0;if(s)for(r=0;r<n;++r)e[r][i][1]/=s}Ac(e,t)}}function Tre(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var s=0,o=0;s<i;++s)o+=e[s][r][1]||0;n[r][1]+=n[r][0]=-o/2}Ac(e,t)}}function Cre(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var o=0,l=0,c=0;o<s;++o){for(var d=e[t[o]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,g=0;g<o;++g){var m=e[t[g]],v=m[n][1]||0,y=m[n-1][1]||0;p+=v-y}l+=f,c+=p*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,Ac(e,t)}}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)}var $re=["type","size","sizeType"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mw.apply(this,arguments)}function tO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tO(Object(r),!0).forEach(function(n){Mre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mre(e,t,r){return t=Rre(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rre(e){var t=Ire(e,"string");return bf(t)=="symbol"?t:t+""}function Ire(e,t){if(bf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dre(e,t){if(e==null)return{};var r=Lre(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var x4={symbolCircle:RS,symbolCross:are,symbolDiamond:ore,symbolSquare:lre,symbolStar:fre,symbolTriangle:hre,symbolWye:mre},Fre=Math.PI/180,Bre=function(t){var r="symbol".concat(Zy(t));return x4[r]||RS},zre=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Fre;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},Ure=function(t,r){x4["symbol".concat(Zy(t))]=r},IS=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,s=t.sizeType,o=s===void 0?"area":s,l=Dre(t,$re),c=rO(rO({},l),{},{type:n,size:a,sizeType:o}),d=function(){var v=Bre(n),y=gre().type(v).size(zre(a,o,n));return y()},f=c.className,h=c.cx,p=c.cy,g=ye(c,!0);return h===+h&&p===+p&&a===+a?k.createElement("path",mw({},g,{className:Te("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};IS.registerSymbol=Ure;function kc(e){"@babel/helpers - typeof";return kc=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},kc(e)}function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gw.apply(this,arguments)}function nO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nO(Object(r),!0).forEach(function(n){wf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hre(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w4(n.key),n)}}function qre(e,t,r){return t&&Hre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kre(e,t,r){return t=Xm(t),Gre(e,b4()?Reflect.construct(t,r||[],Xm(e).constructor):t.apply(e,r))}function Gre(e,t){if(t&&(kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yre(e)}function Yre(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b4=function(){return!!e})()}function Xm(e){return Xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xm(e)}function Xre(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&&yw(e,t)}function yw(e,t){return yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yw(e,t)}function wf(e,t,r){return t=w4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w4(e){var t=Zre(e,"string");return kc(t)=="symbol"?t:t+""}function Zre(e,t){if(kc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yn=32,DS=function(e){function t(){return Vre(this,t),Kre(this,t,arguments)}return Xre(t,e),qre(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=yn/2,s=yn/6,o=yn/3,l=n.inactive?i:n.color;if(n.type==="plainline")return k.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:yn,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return k.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(o,`
|
||
A`).concat(s,",").concat(s,",0,1,1,").concat(2*o,",").concat(a,`
|
||
H`).concat(yn,"M").concat(2*o,",").concat(a,`
|
||
A`).concat(s,",").concat(s,",0,1,1,").concat(o,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return k.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(yn/8,"h").concat(yn,"v").concat(yn*3/4,"h").concat(-yn,"z"),className:"recharts-legend-icon"});if(k.isValidElement(n.legendIcon)){var c=Wre({},n);return delete c.legendIcon,k.cloneElement(n.legendIcon,c)}return k.createElement(IS,{fill:l,cx:a,cy:a,size:yn,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,s=i.iconSize,o=i.layout,l=i.formatter,c=i.inactiveColor,d={x:0,y:0,width:yn,height:yn},f={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,g){var m=p.formatter||l,v=Te(wf(wf({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var y=Se(p.value)?null:p.value;oi(!Se(p.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 x=p.inactive?c:p.color;return k.createElement("li",gw({className:v,style:f,key:"legend-item-".concat(g)},Qo(n.props,p,g)),k.createElement(ow,{width:s,height:s,viewBox:d,style:h},n.renderIcon(p)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(y,p,g):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var o={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return k.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(w.PureComponent);wf(DS,"displayName","Legend");wf(DS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Qre=Ly;function Jre(){this.__data__=new Qre,this.size=0}var ene=Jre;function tne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var rne=tne;function nne(e){return this.__data__.get(e)}var ine=nne;function ane(e){return this.__data__.has(e)}var sne=ane,one=Ly,lne=jS,cne=NS,une=200;function dne(e,t){var r=this.__data__;if(r instanceof one){var n=r.__data__;if(!lne||n.length<une-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cne(n)}return r.set(e,t),this.size=r.size,this}var fne=dne,hne=Ly,pne=ene,mne=rne,gne=ine,yne=sne,vne=fne;function _u(e){var t=this.__data__=new hne(e);this.size=t.size}_u.prototype.clear=pne;_u.prototype.delete=mne;_u.prototype.get=gne;_u.prototype.has=yne;_u.prototype.set=vne;var _4=_u,xne="__lodash_hash_undefined__";function bne(e){return this.__data__.set(e,xne),this}var wne=bne;function _ne(e){return this.__data__.has(e)}var Sne=_ne,jne=NS,Nne=wne,Ene=Sne;function Zm(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new jne;++t<r;)this.add(e[t])}Zm.prototype.add=Zm.prototype.push=Nne;Zm.prototype.has=Ene;var S4=Zm;function One(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var j4=One;function Ane(e,t){return e.has(t)}var N4=Ane,kne=S4,Pne=j4,Tne=N4,Cne=1,$ne=2;function Mne(e,t,r,n,i,a){var s=r&Cne,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=r&$ne?new kne:void 0;for(a.set(e,t),a.set(t,e);++f<o;){var g=e[f],m=t[f];if(n)var v=s?n(m,g,f,t,e,a):n(g,m,f,e,t,a);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!Pne(t,function(y,x){if(!Tne(p,x)&&(g===y||i(g,y,r,n,a)))return p.push(x)})){h=!1;break}}else if(!(g===m||i(g,m,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var E4=Mne,Rne=Ri,Ine=Rne.Uint8Array,Dne=Ine;function Lne(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Fne=Lne;function Bne(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var LS=Bne,iO=vh,aO=Dne,zne=SS,Une=E4,Wne=Fne,Vne=LS,Hne=1,qne=2,Kne="[object Boolean]",Gne="[object Date]",Yne="[object Error]",Xne="[object Map]",Zne="[object Number]",Qne="[object RegExp]",Jne="[object Set]",eie="[object String]",tie="[object Symbol]",rie="[object ArrayBuffer]",nie="[object DataView]",sO=iO?iO.prototype:void 0,F0=sO?sO.valueOf:void 0;function iie(e,t,r,n,i,a,s){switch(r){case nie:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rie:return!(e.byteLength!=t.byteLength||!a(new aO(e),new aO(t)));case Kne:case Gne:case Zne:return zne(+e,+t);case Yne:return e.name==t.name&&e.message==t.message;case Qne:case eie:return e==t+"";case Xne:var o=Wne;case Jne:var l=n&Hne;if(o||(o=Vne),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=qne,s.set(e,t);var d=Une(o(e),o(t),n,i,a,s);return s.delete(e),d;case tie:if(F0)return F0.call(e)==F0.call(t)}return!1}var aie=iie;function sie(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var O4=sie,oie=O4,lie=qr;function cie(e,t,r){var n=t(e);return lie(e)?n:oie(n,r(e))}var uie=cie;function die(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var fie=die;function hie(){return[]}var pie=hie,mie=fie,gie=pie,yie=Object.prototype,vie=yie.propertyIsEnumerable,oO=Object.getOwnPropertySymbols,xie=oO?function(e){return e==null?[]:(e=Object(e),mie(oO(e),function(t){return vie.call(e,t)}))}:gie,bie=xie;function wie(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _ie=wie,Sie=Sa,jie=ja,Nie="[object Arguments]";function Eie(e){return jie(e)&&Sie(e)==Nie}var Oie=Eie,lO=Oie,Aie=ja,A4=Object.prototype,kie=A4.hasOwnProperty,Pie=A4.propertyIsEnumerable,Tie=lO(function(){return arguments}())?lO:function(e){return Aie(e)&&kie.call(e,"callee")&&!Pie.call(e,"callee")},FS=Tie,Qm={exports:{}};function Cie(){return!1}var $ie=Cie;Qm.exports;(function(e,t){var r=Ri,n=$ie,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?r.Buffer:void 0,l=o?o.isBuffer:void 0,c=l||n;e.exports=c})(Qm,Qm.exports);var k4=Qm.exports,Mie=9007199254740991,Rie=/^(?:0|[1-9]\d*)$/;function Iie(e,t){var r=typeof e;return t=t??Mie,!!t&&(r=="number"||r!="symbol"&&Rie.test(e))&&e>-1&&e%1==0&&e<t}var BS=Iie,Die=9007199254740991;function Lie(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Die}var zS=Lie,Fie=Sa,Bie=zS,zie=ja,Uie="[object Arguments]",Wie="[object Array]",Vie="[object Boolean]",Hie="[object Date]",qie="[object Error]",Kie="[object Function]",Gie="[object Map]",Yie="[object Number]",Xie="[object Object]",Zie="[object RegExp]",Qie="[object Set]",Jie="[object String]",eae="[object WeakMap]",tae="[object ArrayBuffer]",rae="[object DataView]",nae="[object Float32Array]",iae="[object Float64Array]",aae="[object Int8Array]",sae="[object Int16Array]",oae="[object Int32Array]",lae="[object Uint8Array]",cae="[object Uint8ClampedArray]",uae="[object Uint16Array]",dae="[object Uint32Array]",pt={};pt[nae]=pt[iae]=pt[aae]=pt[sae]=pt[oae]=pt[lae]=pt[cae]=pt[uae]=pt[dae]=!0;pt[Uie]=pt[Wie]=pt[tae]=pt[Vie]=pt[rae]=pt[Hie]=pt[qie]=pt[Kie]=pt[Gie]=pt[Yie]=pt[Xie]=pt[Zie]=pt[Qie]=pt[Jie]=pt[eae]=!1;function fae(e){return zie(e)&&Bie(e.length)&&!!pt[Fie(e)]}var hae=fae;function pae(e){return function(t){return e(t)}}var P4=pae,Jm={exports:{}};Jm.exports;(function(e,t){var r=DM,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Jm,Jm.exports);var mae=Jm.exports,gae=hae,yae=P4,cO=mae,uO=cO&&cO.isTypedArray,vae=uO?yae(uO):gae,T4=vae,xae=_ie,bae=FS,wae=qr,_ae=k4,Sae=BS,jae=T4,Nae=Object.prototype,Eae=Nae.hasOwnProperty;function Oae(e,t){var r=wae(e),n=!r&&bae(e),i=!r&&!n&&_ae(e),a=!r&&!n&&!i&&jae(e),s=r||n||i||a,o=s?xae(e.length,String):[],l=o.length;for(var c in e)(t||Eae.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Sae(c,l)))&&o.push(c);return o}var Aae=Oae,kae=Object.prototype;function Pae(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||kae;return e===r}var Tae=Pae;function Cae(e,t){return function(r){return e(t(r))}}var C4=Cae,$ae=C4,Mae=$ae(Object.keys,Object),Rae=Mae,Iae=Tae,Dae=Rae,Lae=Object.prototype,Fae=Lae.hasOwnProperty;function Bae(e){if(!Iae(e))return Dae(e);var t=[];for(var r in Object(e))Fae.call(e,r)&&r!="constructor"&&t.push(r);return t}var zae=Bae,Uae=_S,Wae=zS;function Vae(e){return e!=null&&Wae(e.length)&&!Uae(e)}var xh=Vae,Hae=Aae,qae=zae,Kae=xh;function Gae(e){return Kae(e)?Hae(e):qae(e)}var tv=Gae,Yae=uie,Xae=bie,Zae=tv;function Qae(e){return Yae(e,Zae,Xae)}var Jae=Qae,dO=Jae,ese=1,tse=Object.prototype,rse=tse.hasOwnProperty;function nse(e,t,r,n,i,a){var s=r&ese,o=dO(e),l=o.length,c=dO(t),d=c.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var h=o[f];if(!(s?h in t:rse.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++f<l;){h=o[f];var y=e[h],x=t[h];if(n)var b=s?n(x,y,h,t,e,a):n(y,x,h,e,t,a);if(!(b===void 0?y===x||i(y,x,r,n,a):b)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return a.delete(e),a.delete(t),m}var ise=nse,ase=ll,sse=Ri,ose=ase(sse,"DataView"),lse=ose,cse=ll,use=Ri,dse=cse(use,"Promise"),fse=dse,hse=ll,pse=Ri,mse=hse(pse,"Set"),$4=mse,gse=ll,yse=Ri,vse=gse(yse,"WeakMap"),xse=vse,vw=lse,xw=jS,bw=fse,ww=$4,_w=xse,M4=Sa,Su=FM,fO="[object Map]",bse="[object Object]",hO="[object Promise]",pO="[object Set]",mO="[object WeakMap]",gO="[object DataView]",wse=Su(vw),_se=Su(xw),Sse=Su(bw),jse=Su(ww),Nse=Su(_w),eo=M4;(vw&&eo(new vw(new ArrayBuffer(1)))!=gO||xw&&eo(new xw)!=fO||bw&&eo(bw.resolve())!=hO||ww&&eo(new ww)!=pO||_w&&eo(new _w)!=mO)&&(eo=function(e){var t=M4(e),r=t==bse?e.constructor:void 0,n=r?Su(r):"";if(n)switch(n){case wse:return gO;case _se:return fO;case Sse:return hO;case jse:return pO;case Nse:return mO}return t});var Ese=eo,B0=_4,Ose=E4,Ase=aie,kse=ise,yO=Ese,vO=qr,xO=k4,Pse=T4,Tse=1,bO="[object Arguments]",wO="[object Array]",op="[object Object]",Cse=Object.prototype,_O=Cse.hasOwnProperty;function $se(e,t,r,n,i,a){var s=vO(e),o=vO(t),l=s?wO:yO(e),c=o?wO:yO(t);l=l==bO?op:l,c=c==bO?op:c;var d=l==op,f=c==op,h=l==c;if(h&&xO(e)){if(!xO(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new B0),s||Pse(e)?Ose(e,t,r,n,i,a):Ase(e,t,l,r,n,i,a);if(!(r&Tse)){var p=d&&_O.call(e,"__wrapped__"),g=f&&_O.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,v=g?t.value():t;return a||(a=new B0),i(m,v,r,n,a)}}return h?(a||(a=new B0),kse(e,t,r,n,i,a)):!1}var Mse=$se,Rse=Mse,SO=ja;function R4(e,t,r,n,i){return e===t?!0:e==null||t==null||!SO(e)&&!SO(t)?e!==e&&t!==t:Rse(e,t,r,n,R4,i)}var US=R4,Ise=_4,Dse=US,Lse=1,Fse=2;function Bse(e,t,r,n){var i=r.length,a=i,s=!n;if(e==null)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=r[i];var l=o[0],c=e[l],d=o[1];if(s&&o[2]){if(c===void 0&&!(l in e))return!1}else{var f=new Ise;if(n)var h=n(c,d,l,e,t,f);if(!(h===void 0?Dse(d,c,Lse|Fse,n,f):h))return!1}}return!0}var zse=Bse,Use=Ds;function Wse(e){return e===e&&!Use(e)}var I4=Wse,Vse=I4,Hse=tv;function qse(e){for(var t=Hse(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Vse(i)]}return t}var Kse=qse;function Gse(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var D4=Gse,Yse=zse,Xse=Kse,Zse=D4;function Qse(e){var t=Xse(e);return t.length==1&&t[0][2]?Zse(t[0][0],t[0][1]):function(r){return r===e||Yse(r,e,t)}}var Jse=Qse;function eoe(e,t){return e!=null&&t in Object(e)}var toe=eoe,roe=VM,noe=FS,ioe=qr,aoe=BS,soe=zS,ooe=By;function loe(e,t,r){t=roe(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=ooe(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&soe(i)&&aoe(s,i)&&(ioe(e)||noe(e)))}var coe=loe,uoe=toe,doe=coe;function foe(e,t){return e!=null&&doe(e,t,uoe)}var hoe=foe,poe=US,moe=HM,goe=hoe,yoe=wS,voe=I4,xoe=D4,boe=By,woe=1,_oe=2;function Soe(e,t){return yoe(e)&&voe(t)?xoe(boe(e),t):function(r){var n=moe(r,e);return n===void 0&&n===t?goe(r,e):poe(t,n,woe|_oe)}}var joe=Soe;function Noe(e){return e}var ju=Noe;function Eoe(e){return function(t){return t==null?void 0:t[e]}}var Ooe=Eoe,Aoe=AS;function koe(e){return function(t){return Aoe(t,e)}}var Poe=koe,Toe=Ooe,Coe=Poe,$oe=wS,Moe=By;function Roe(e){return $oe(e)?Toe(Moe(e)):Coe(e)}var Ioe=Roe,Doe=Jse,Loe=joe,Foe=ju,Boe=qr,zoe=Ioe;function Uoe(e){return typeof e=="function"?e:e==null?Foe:typeof e=="object"?Boe(e)?Loe(e[0],e[1]):Doe(e):zoe(e)}var Ii=Uoe;function Woe(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var L4=Woe;function Voe(e){return e!==e}var Hoe=Voe;function qoe(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Koe=qoe,Goe=L4,Yoe=Hoe,Xoe=Koe;function Zoe(e,t,r){return t===t?Xoe(e,t,r):Goe(e,Yoe,r)}var Qoe=Zoe,Joe=Qoe;function ele(e,t){var r=e==null?0:e.length;return!!r&&Joe(e,t,0)>-1}var tle=ele;function rle(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var nle=rle;function ile(){}var ale=ile,z0=$4,sle=ale,ole=LS,lle=1/0,cle=z0&&1/ole(new z0([,-0]))[1]==lle?function(e){return new z0(e)}:sle,ule=cle,dle=S4,fle=tle,hle=nle,ple=N4,mle=ule,gle=LS,yle=200;function vle(e,t,r){var n=-1,i=fle,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=hle;else if(a>=yle){var c=t?null:mle(e);if(c)return gle(c);s=!1,i=ple,l=new dle}else l=t?[]:o;e:for(;++n<a;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,s&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),o.push(d)}else i(l,f,r)||(l!==o&&l.push(f),o.push(d))}return o}var xle=vle,ble=Ii,wle=xle;function _le(e,t){return e&&e.length?wle(e,ble(t)):[]}var Sle=_le;const jO=Xe(Sle);function F4(e,t,r){return t===!0?jO(e,r):Se(t)?jO(e,t):e}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)}var jle=["ref"];function NO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NO(Object(r),!0).forEach(function(n){rv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,z4(n.key),n)}}function Ele(e,t,r){return t&&EO(e.prototype,t),r&&EO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ole(e,t,r){return t=eg(t),Ale(e,B4()?Reflect.construct(t,r||[],eg(e).constructor):t.apply(e,r))}function Ale(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 kle(e)}function kle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B4=function(){return!!e})()}function eg(e){return eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eg(e)}function Ple(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&&Sw(e,t)}function Sw(e,t){return Sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Sw(e,t)}function rv(e,t,r){return t=z4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z4(e){var t=Tle(e,"string");return Pc(t)=="symbol"?t:t+""}function Tle(e,t){if(Pc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Cle(e,t){if(e==null)return{};var r=$le(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $le(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Mle(e){return e.value}function Rle(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var r=Cle(t,jle);return k.createElement(DS,r)}var OO=1,Ss=function(e){function t(){var r;Nle(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Ole(this,t,[].concat(i)),rv(r,"lastBoundingBox",{width:-1,height:-1}),r}return Ple(t,e),Ele(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>OO||Math.abs(i.height-this.lastBoundingBox.height)>OO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Bi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,o=i.verticalAlign,l=i.margin,c=i.chartWidth,d=i.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((c||0)-p.width)/2}}else f=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(o==="middle"){var g=this.getBBoxSnapshot();h={top:((d||0)-g.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Bi(Bi({},f),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,o=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,d=i.payload,f=Bi(Bi({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return k.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},Rle(a,Bi(Bi({},this.props),{},{payload:F4(d,c,Mle)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Bi(Bi({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&J(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])}(w.PureComponent);rv(Ss,"displayName","Legend");rv(Ss,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var AO=vh,Ile=FS,Dle=qr,kO=AO?AO.isConcatSpreadable:void 0;function Lle(e){return Dle(e)||Ile(e)||!!(kO&&e&&e[kO])}var Fle=Lle,Ble=O4,zle=Fle;function U4(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=zle),i||(i=[]);++a<s;){var o=e[a];t>0&&r(o)?t>1?U4(o,t-1,r,n,i):Ble(i,o):n||(i[i.length]=o)}return i}var W4=U4;function Ule(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++i];if(r(a[l],l,a)===!1)break}return t}}var Wle=Ule,Vle=Wle,Hle=Vle(),qle=Hle,Kle=qle,Gle=tv;function Yle(e,t){return e&&Kle(e,t,Gle)}var V4=Yle,Xle=xh;function Zle(e,t){return function(r,n){if(r==null)return r;if(!Xle(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var Qle=Zle,Jle=V4,ece=Qle,tce=ece(Jle),WS=tce,rce=WS,nce=xh;function ice(e,t){var r=-1,n=nce(e)?Array(e.length):[];return rce(e,function(i,a,s){n[++r]=t(i,a,s)}),n}var H4=ice;function ace(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var sce=ace,PO=gu;function oce(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=PO(e),s=t!==void 0,o=t===null,l=t===t,c=PO(t);if(!o&&!c&&!a&&e>t||a&&s&&l&&!o&&!c||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&e<t||c&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!l)return-1}return 0}var lce=oce,cce=lce;function uce(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n<s;){var l=cce(i[n],a[n]);if(l){if(n>=o)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}var dce=uce,U0=OS,fce=AS,hce=Ii,pce=H4,mce=sce,gce=P4,yce=dce,vce=ju,xce=qr;function bce(e,t,r){t.length?t=U0(t,function(a){return xce(a)?function(s){return fce(s,a.length===1?a[0]:a)}:a}):t=[vce];var n=-1;t=U0(t,gce(hce));var i=pce(e,function(a,s,o){var l=U0(t,function(c){return c(a)});return{criteria:l,index:++n,value:a}});return mce(i,function(a,s){return yce(a,s,r)})}var wce=bce;function _ce(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Sce=_ce,jce=Sce,TO=Math.max;function Nce(e,t,r){return t=TO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=TO(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(s),jce(e,this,o)}}var Ece=Nce;function Oce(e){return function(){return e}}var Ace=Oce,kce=ll,Pce=function(){try{var e=kce(Object,"defineProperty");return e({},"",{}),e}catch{}}(),q4=Pce,Tce=Ace,CO=q4,Cce=ju,$ce=CO?function(e,t){return CO(e,"toString",{configurable:!0,enumerable:!1,value:Tce(t),writable:!0})}:Cce,Mce=$ce,Rce=800,Ice=16,Dce=Date.now;function Lce(e){var t=0,r=0;return function(){var n=Dce(),i=Ice-(n-r);if(r=n,i>0){if(++t>=Rce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Fce=Lce,Bce=Mce,zce=Fce,Uce=zce(Bce),Wce=Uce,Vce=ju,Hce=Ece,qce=Wce;function Kce(e,t){return qce(Hce(e,t,Vce),e+"")}var Gce=Kce,Yce=SS,Xce=xh,Zce=BS,Qce=Ds;function Jce(e,t,r){if(!Qce(r))return!1;var n=typeof t;return(n=="number"?Xce(r)&&Zce(t,r.length):n=="string"&&t in r)?Yce(r[t],e):!1}var nv=Jce,eue=W4,tue=wce,rue=Gce,$O=nv,nue=rue(function(e,t){if(e==null)return[];var r=t.length;return r>1&&$O(e,t[0],t[1])?t=[]:r>2&&$O(t[0],t[1],t[2])&&(t=[t[0]]),tue(e,eue(t,1),[])}),iue=nue;const VS=Xe(iue);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)}function jw(){return jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jw.apply(this,arguments)}function aue(e,t){return cue(e)||lue(e,t)||oue(e,t)||sue()}function sue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oue(e,t){if(e){if(typeof e=="string")return MO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MO(e,t)}}function MO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lue(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function cue(e){if(Array.isArray(e))return e}function RO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function W0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RO(Object(r),!0).forEach(function(n){uue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uue(e,t,r){return t=due(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function due(e){var t=fue(e,"string");return _f(t)=="symbol"?t:t+""}function fue(e,t){if(_f(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hue(e){return Array.isArray(e)&&Gt(e[0])&&Gt(e[1])?e.join(" ~ "):e}var pue=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,s=t.itemStyle,o=s===void 0?{}:s,l=t.labelStyle,c=l===void 0?{}:l,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,v=t.labelFormatter,y=t.accessibilityLayer,x=y===void 0?!1:y,b=function(){if(d&&d.length){var T={padding:0,margin:0},$=(h?VS(d,h):d).map(function(O,R){if(O.type==="none")return null;var M=W0({display:"block",paddingTop:4,paddingBottom:4,color:O.color||"#000"},o),F=O.formatter||f||hue,D=O.value,I=O.name,L=D,W=I;if(F&&L!=null&&W!=null){var U=F(D,I,O,R,d);if(Array.isArray(U)){var G=aue(U,2);L=G[0],W=G[1]}else L=U}return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:M},Gt(W)?k.createElement("span",{className:"recharts-tooltip-item-name"},W):null,Gt(W)?k.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,k.createElement("span",{className:"recharts-tooltip-item-value"},L),k.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:T},$)}return null},S=W0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),_=W0({margin:0},c),j=!Ee(m),N=j?m:"",A=Te("recharts-default-tooltip",p),E=Te("recharts-tooltip-label",g);j&&v&&d!==void 0&&d!==null&&(N=v(m,d));var C=x?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",jw({className:A,style:S},C),k.createElement("p",{className:E,style:_},k.isValidElement(N)?N:"".concat(N)),b())};function Sf(e){"@babel/helpers - typeof";return Sf=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},Sf(e)}function lp(e,t,r){return t=mue(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mue(e){var t=gue(e,"string");return Sf(t)=="symbol"?t:t+""}function gue(e,t){if(Sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yu="recharts-tooltip-wrapper",yue={visibility:"hidden"};function vue(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Te(Yu,lp(lp(lp(lp({},"".concat(Yu,"-right"),J(r)&&t&&J(t.x)&&r>=t.x),"".concat(Yu,"-left"),J(r)&&t&&J(t.x)&&r<t.x),"".concat(Yu,"-bottom"),J(n)&&t&&J(t.y)&&n>=t.y),"".concat(Yu,"-top"),J(n)&&t&&J(t.y)&&n<t.y))}function IO(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,s=e.reverseDirection,o=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(a&&J(a[n]))return a[n];var d=r[n]-o-i,f=r[n]+i;if(t[n])return s[n]?d:f;if(s[n]){var h=d,p=l[n];return h<p?Math.max(f,l[n]):Math.max(d,l[n])}var g=f+o,m=l[n]+c;return g>m?Math.max(d,l[n]):Math.max(f,l[n])}function xue(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function bue(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,c,d,f;return s.height>0&&s.width>0&&r?(d=IO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=IO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=xue({translateX:d,translateY:f,useTranslate3d:o})):c=yue,{cssProperties:c,cssClasses:vue({translateX:d,translateY:f,coordinate:r})}}function Tc(e){"@babel/helpers - typeof";return Tc=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},Tc(e)}function DO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DO(Object(r),!0).forEach(function(n){Ew(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _ue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,G4(n.key),n)}}function Sue(e,t,r){return t&&_ue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jue(e,t,r){return t=tg(t),Nue(e,K4()?Reflect.construct(t,r||[],tg(e).constructor):t.apply(e,r))}function Nue(e,t){if(t&&(Tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Eue(e)}function Eue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K4=function(){return!!e})()}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tg(e)}function Oue(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&&Nw(e,t)}function Nw(e,t){return Nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nw(e,t)}function Ew(e,t,r){return t=G4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G4(e){var t=Aue(e,"string");return Tc(t)=="symbol"?t:t+""}function Aue(e,t){if(Tc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var FO=1,kue=function(e){function t(){var r;wue(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=jue(this,t,[].concat(i)),Ew(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Ew(r,"handleKeyDown",function(s){if(s.key==="Escape"){var o,l,c,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&o!==void 0?o:0,y:(c=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0}})}}),r}return Oue(t,e),Sue(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>FO||Math.abs(n.height-this.state.lastBoundingBox.height)>FO)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,l=i.animationEasing,c=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,v=i.useTranslate3d,y=i.viewBox,x=i.wrapperStyle,b=bue({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),S=b.cssClasses,_=b.cssProperties,j=LO(LO({transition:h&&a?"transform ".concat(o,"ms ").concat(l):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return k.createElement("div",{tabIndex:-1,className:S,style:j,ref:function(A){n.wrapperNode=A}},c)}}])}(w.PureComponent),Pue=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ls={isSsr:Pue()};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 BO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BO(Object(r),!0).forEach(function(n){HS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,X4(n.key),n)}}function $ue(e,t,r){return t&&Cue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mue(e,t,r){return t=rg(t),Rue(e,Y4()?Reflect.construct(t,r||[],rg(e).constructor):t.apply(e,r))}function Rue(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 Iue(e)}function Iue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Y4=function(){return!!e})()}function rg(e){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rg(e)}function Due(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&&Ow(e,t)}function Ow(e,t){return Ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ow(e,t)}function HS(e,t,r){return t=X4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X4(e){var t=Lue(e,"string");return Cc(t)=="symbol"?t:t+""}function Lue(e,t){if(Cc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fue(e){return e.dataKey}function Bue(e,t){return k.isValidElement(e)?k.cloneElement(e,t):typeof e=="function"?k.createElement(e,t):k.createElement(pue,t)}var Ir=function(e){function t(){return Tue(this,t),Mue(this,t,arguments)}return Due(t,e),$ue(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,l=i.animationEasing,c=i.content,d=i.coordinate,f=i.filterNull,h=i.isAnimationActive,p=i.offset,g=i.payload,m=i.payloadUniqBy,v=i.position,y=i.reverseDirection,x=i.useTranslate3d,b=i.viewBox,S=i.wrapperStyle,_=g??[];f&&_.length&&(_=F4(g.filter(function(N){return N.value!=null&&(N.hide!==!0||n.props.includeHidden)}),m,Fue));var j=_.length>0;return k.createElement(kue,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:a,coordinate:d,hasPayload:j,offset:p,position:v,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:S},Bue(c,zO(zO({},this.props),{},{payload:_})))}}])}(w.PureComponent);HS(Ir,"displayName","Tooltip");HS(Ir,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ls.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 zue=Ri,Uue=function(){return zue.Date.now()},Wue=Uue,Vue=/\s/;function Hue(e){for(var t=e.length;t--&&Vue.test(e.charAt(t)););return t}var que=Hue,Kue=que,Gue=/^\s+/;function Yue(e){return e&&e.slice(0,Kue(e)+1).replace(Gue,"")}var Xue=Yue,Zue=Xue,UO=Ds,Que=gu,WO=NaN,Jue=/^[-+]0x[0-9a-f]+$/i,ede=/^0b[01]+$/i,tde=/^0o[0-7]+$/i,rde=parseInt;function nde(e){if(typeof e=="number")return e;if(Que(e))return WO;if(UO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Zue(e);var r=ede.test(e);return r||tde.test(e)?rde(e.slice(2),r?2:8):Jue.test(e)?WO:+e}var Z4=nde,ide=Ds,V0=Wue,VO=Z4,ade="Expected a function",sde=Math.max,ode=Math.min;function lde(e,t,r){var n,i,a,s,o,l,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(ade);t=VO(t)||0,ide(r)&&(d=!!r.leading,f="maxWait"in r,a=f?sde(VO(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(j){var N=n,A=i;return n=i=void 0,c=j,s=e.apply(A,N),s}function g(j){return c=j,o=setTimeout(y,t),d?p(j):s}function m(j){var N=j-l,A=j-c,E=t-N;return f?ode(E,a-A):E}function v(j){var N=j-l,A=j-c;return l===void 0||N>=t||N<0||f&&A>=a}function y(){var j=V0();if(v(j))return x(j);o=setTimeout(y,m(j))}function x(j){return o=void 0,h&&n?p(j):(n=i=void 0,s)}function b(){o!==void 0&&clearTimeout(o),c=0,n=l=i=o=void 0}function S(){return o===void 0?s:x(V0())}function _(){var j=V0(),N=v(j);if(n=arguments,i=this,l=j,N){if(o===void 0)return g(l);if(f)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return _.cancel=b,_.flush=S,_}var cde=lde,ude=cde,dde=Ds,fde="Expected a function";function hde(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(fde);return dde(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ude(e,t,{leading:n,maxWait:t,trailing:i})}var pde=hde;const Q4=Xe(pde);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)}function HO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(r),!0).forEach(function(n){mde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mde(e,t,r){return t=gde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gde(e){var t=yde(e,"string");return jf(t)=="symbol"?t:t+""}function yde(e,t){if(jf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vde(e,t){return _de(e)||wde(e,t)||bde(e,t)||xde()}function xde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bde(e,t){if(e){if(typeof e=="string")return qO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qO(e,t)}}function qO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wde(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function _de(e){if(Array.isArray(e))return e}var Xu=w.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,s=a===void 0?"100%":a,o=e.height,l=o===void 0?"100%":o,c=e.minWidth,d=c===void 0?0:c,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,v=e.id,y=e.className,x=e.onResize,b=e.style,S=b===void 0?{}:b,_=w.useRef(null),j=w.useRef();j.current=x,w.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var N=w.useState({containerWidth:i.width,containerHeight:i.height}),A=vde(N,2),E=A[0],C=A[1],P=w.useCallback(function($,O){C(function(R){var M=Math.round($),F=Math.round(O);return R.containerWidth===M&&R.containerHeight===F?R:{containerWidth:M,containerHeight:F}})},[]);w.useEffect(function(){var $=function(I){var L,W=I[0].contentRect,U=W.width,G=W.height;P(U,G),(L=j.current)===null||L===void 0||L.call(j,U,G)};m>0&&($=Q4($,m,{trailing:!0,leading:!1}));var O=new ResizeObserver($),R=_.current.getBoundingClientRect(),M=R.width,F=R.height;return P(M,F),O.observe(_.current),function(){O.disconnect()}},[P,m]);var T=w.useMemo(function(){var $=E.containerWidth,O=E.containerHeight;if($<0||O<0)return null;oi(fo(s)||fo(l),`The width(%s) and height(%s) are both fixed numbers,
|
||
maybe you don't need to use a ResponsiveContainer.`,s,l),oi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=fo(s)?$:s,M=fo(l)?O:l;r&&r>0&&(R?M=R/r:M&&(R=M*r),h&&M>h&&(M=h)),oi(R>0||M>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
||
please check the style of container, or the props width(%s) and height(%s),
|
||
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
||
height and width.`,R,M,s,l,d,f,r);var F=!Array.isArray(p)&&aa(p.type).endsWith("Chart");return k.Children.map(p,function(D){return k.isValidElement(D)?w.cloneElement(D,cp({width:R,height:M},F?{style:cp({height:"100%",width:"100%",maxHeight:M,maxWidth:R},D.props.style)}:{})):D})},[r,p,l,h,f,d,E,s]);return k.createElement("div",{id:v?"".concat(v):void 0,className:Te("recharts-responsive-container",y),style:cp(cp({},S),{},{width:s,height:l,minWidth:d,minHeight:f,maxHeight:h}),ref:_},T)}),iv=function(t){return null};iv.displayName="Cell";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 KO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Aw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KO(Object(r),!0).forEach(function(n){Sde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sde(e,t,r){return t=jde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jde(e){var t=Nde(e,"string");return Nf(t)=="symbol"?t:t+""}function Nde(e,t){if(Nf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wl={widthCache:{},cacheCount:0},Ede=2e3,Ode={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},GO="recharts_measurement_span";function Ade(e){var t=Aw({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var $d=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ls.isSsr)return{width:0,height:0};var n=Ade(r),i=JSON.stringify({text:t,copyStyle:n});if(wl.widthCache[i])return wl.widthCache[i];try{var a=document.getElementById(GO);a||(a=document.createElement("span"),a.setAttribute("id",GO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=Aw(Aw({},Ode),n);Object.assign(a.style,s),a.textContent="".concat(t);var o=a.getBoundingClientRect(),l={width:o.width,height:o.height};return wl.widthCache[i]=l,++wl.cacheCount>Ede&&(wl.cacheCount=0,wl.widthCache={}),l}catch{return{width:0,height:0}}},kde=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 ng(e,t){return $de(e)||Cde(e,t)||Tde(e,t)||Pde()}function Pde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tde(e,t){if(e){if(typeof e=="string")return YO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YO(e,t)}}function YO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cde(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function $de(e){if(Array.isArray(e))return e}function Mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XO(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ide(n.key),n)}}function Rde(e,t,r){return t&&XO(e.prototype,t),r&&XO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ide(e){var t=Dde(e,"string");return Ef(t)=="symbol"?t:t+""}function Dde(e,t){if(Ef(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ef(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,QO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Lde=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Fde=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,J4={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Bde=Object.keys(J4),zl="NaN";function zde(e,t){return e*J4[t]}var up=function(){function e(t,r){Mde(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Lde.test(r)&&(this.num=NaN,this.unit=""),Bde.includes(r)&&(this.num=zde(t,r),this.unit="px")}return Rde(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.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(r){var n,i=(n=Fde.exec(r))!==null&&n!==void 0?n:[],a=ng(i,3),s=a[1],o=a[2];return new e(parseFloat(s),o??"")}}])}();function eR(e){if(e.includes(zl))return zl;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=ZO.exec(t))!==null&&r!==void 0?r:[],i=ng(n,4),a=i[1],s=i[2],o=i[3],l=up.parse(a??""),c=up.parse(o??""),d=s==="*"?l.multiply(c):l.divide(c);if(d.isNaN())return zl;t=t.replace(ZO,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=QO.exec(t))!==null&&f!==void 0?f:[],p=ng(h,4),g=p[1],m=p[2],v=p[3],y=up.parse(g??""),x=up.parse(v??""),b=m==="+"?y.add(x):y.subtract(x);if(b.isNaN())return zl;t=t.replace(QO,b.toString())}return t}var JO=/\(([^()]*)\)/;function Ude(e){for(var t=e;t.includes("(");){var r=JO.exec(t),n=ng(r,2),i=n[1];t=t.replace(JO,eR(i))}return t}function Wde(e){var t=e.replace(/\s+/g,"");return t=Ude(t),t=eR(t),t}function Vde(e){try{return Wde(e)}catch{return zl}}function H0(e){var t=Vde(e.slice(5,-1));return t===zl?"":t}var Hde=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],qde=["dx","dy","angle","className","breakAll"];function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kw.apply(this,arguments)}function eA(e,t){if(e==null)return{};var r=Kde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tA(e,t){return Zde(e)||Xde(e,t)||Yde(e,t)||Gde()}function Gde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yde(e,t){if(e){if(typeof e=="string")return rA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rA(e,t)}}function rA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xde(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function Zde(e){if(Array.isArray(e))return e}var tR=/[ \f\n\r\t\v\u2028\u2029]+/,rR=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Ee(r)||(n?a=r.toString().split(""):a=r.toString().split(tR));var s=a.map(function(l){return{word:l,width:$d(l,i).width}}),o=n?0:$d(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},Qde=function(t,r,n,i,a){var s=t.maxLines,o=t.children,l=t.style,c=t.breakAll,d=J(s),f=o,h=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce(function(M,F){var D=F.word,I=F.width,L=M[M.length-1];if(L&&(i==null||a||L.width+I+n<Number(i)))L.words.push(D),L.width+=I+n;else{var W={words:[D],width:I};M.push(W)}return M},[])},p=h(r),g=function(R){return R.reduce(function(M,F){return M.width>F.width?M:F})};if(!d)return p;for(var m="…",v=function(R){var M=f.slice(0,R),F=rR({breakAll:c,style:l,children:M+m}).wordsWithComputedWidth,D=h(F),I=D.length>s||g(D).width>Number(i);return[I,D]},y=0,x=f.length-1,b=0,S;y<=x&&b<=f.length-1;){var _=Math.floor((y+x)/2),j=_-1,N=v(j),A=tA(N,2),E=A[0],C=A[1],P=v(_),T=tA(P,1),$=T[0];if(!E&&!$&&(y=_+1),E&&$&&(x=_-1),!E&&$){S=C;break}b++}return S||p},nA=function(t){var r=Ee(t)?[]:t.toString().split(tR);return[{words:r}]},Jde=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,o=t.maxLines;if((r||n)&&!Ls.isSsr){var l,c,d=rR({breakAll:s,children:i,style:a});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;l=f,c=h}else return nA(i);return Qde({breakAll:s,children:i,maxLines:o,style:a},l,c,r,n)}return nA(i)},iA="#808080",Jo=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,v=t.fill,y=v===void 0?iA:v,x=eA(t,Hde),b=w.useMemo(function(){return Jde({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),S=x.dx,_=x.dy,j=x.angle,N=x.className,A=x.breakAll,E=eA(x,qde);if(!Gt(n)||!Gt(a))return null;var C=n+(J(S)?S:0),P=a+(J(_)?_:0),T;switch(m){case"start":T=H0("calc(".concat(c,")"));break;case"middle":T=H0("calc(".concat((b.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:T=H0("calc(".concat(b.length-1," * -").concat(o,")"));break}var $=[];if(f){var O=b[0].width,R=x.width;$.push("scale(".concat((J(R)?R/O:1)/O,")"))}return j&&$.push("rotate(".concat(j,", ").concat(C,", ").concat(P,")")),$.length&&(E.transform=$.join(" ")),k.createElement("text",kw({},ye(E,!0),{x:C,y:P,className:Te("recharts-text",N),textAnchor:p,fill:y.includes("url")?iA:y}),b.map(function(M,F){var D=M.words.join(A?"":" ");return k.createElement("tspan",{x:C,dy:F===0?T:o,key:"".concat(D,"-").concat(F)},D)}))};function js(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function efe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function qS(e){let t,r,n;e.length!==2?(t=js,r=(o,l)=>js(e(o),l),n=(o,l)=>e(o)-l):(t=e===js||e===efe?e:tfe,r=e,n=e);function i(o,l,c=0,d=o.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;r(o[f],l)<0?c=f+1:d=f}while(c<d)}return c}function a(o,l,c=0,d=o.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;r(o[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function s(o,l,c=0,d=o.length){const f=i(o,l,c,d-1);return f>c&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function tfe(){return 0}function nR(e){return e===null?NaN:+e}function*rfe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const nfe=qS(js),bh=nfe.right;qS(nR).center;class aA extends Map{constructor(t,r=sfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(sA(this,t))}has(t){return super.has(sA(this,t))}set(t,r){return super.set(ife(this,t),r)}delete(t){return super.delete(afe(this,t))}}function sA({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function ife({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function afe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function sfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ofe(e=js){if(e===js)return iR;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function iR(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const lfe=Math.sqrt(50),cfe=Math.sqrt(10),ufe=Math.sqrt(2);function ig(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=lfe?10:a>=cfe?5:a>=ufe?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=r&&r<2?ig(e,t,r*2):[o,l,c]}function Pw(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,s]=n?ig(t,e,r):ig(e,t,r);if(!(a>=i))return[];const o=a-i+1,l=new Array(o);if(n)if(s<0)for(let c=0;c<o;++c)l[c]=(a-c)/-s;else for(let c=0;c<o;++c)l[c]=(a-c)*s;else if(s<0)for(let c=0;c<o;++c)l[c]=(i+c)/-s;else for(let c=0;c<o;++c)l[c]=(i+c)*s;return l}function Tw(e,t,r){return t=+t,e=+e,r=+r,ig(e,t,r)[2]}function Cw(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Tw(t,e,r):Tw(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function oA(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function lA(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function aR(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?iR:ofe(i);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,d=Math.log(l),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),p=Math.max(r,Math.floor(t-c*f/l+h)),g=Math.min(n,Math.floor(t+(l-c)*f/l+h));aR(e,t,p,g,i)}const a=e[t];let s=r,o=n;for(Zu(e,r,t),i(e[n],a)>0&&Zu(e,r,n);s<o;){for(Zu(e,s,o),++s,--o;i(e[s],a)<0;)++s;for(;i(e[o],a)>0;)--o}i(e[r],a)===0?Zu(e,r,o):(++o,Zu(e,o,n)),o<=t&&(r=o+1),t<=o&&(n=o-1)}return e}function Zu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function dfe(e,t,r){if(e=Float64Array.from(rfe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return lA(e);if(t>=1)return oA(e);var n,i=(n-1)*t,a=Math.floor(i),s=oA(aR(e,a).subarray(0,a+1)),o=lA(e.subarray(a+1));return s+(o-s)*(i-a)}}function ffe(e,t,r=nR){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),o=+r(e[a+1],a+1,e);return s+(o-s)*(i-a)}}function hfe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Mn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Na(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const $w=Symbol("implicit");function KS(){var e=new aA,t=[],r=[],n=$w;function i(a){let s=e.get(a);if(s===void 0){if(n!==$w)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new aA;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return KS(t,r).unknown(n)},Mn.apply(i,arguments),i}function Of(){var e=KS().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,s,o=!1,l=0,c=0,d=.5;delete e.unknown;function f(){var h=t().length,p=i<n,g=p?i:n,m=p?n:i;a=(m-g)/Math.max(1,h-l+c*2),o&&(a=Math.floor(a)),g+=(m-g-a*(h-l))*d,s=a*(1-l),o&&(g=Math.round(g),s=Math.round(s));var v=hfe(h).map(function(y){return g+a*y});return r(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,f()):c},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return Of(t(),[n,i]).round(o).paddingInner(l).paddingOuter(c).align(d)},Mn.apply(f(),arguments)}function sR(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return sR(t())},e}function Md(){return sR(Of.apply(null,arguments).paddingInner(1))}function pfe(e){return function(){return e}}function ag(e){return+e}var cA=[0,1];function kr(e){return e}function Mw(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:pfe(isNaN(t)?NaN:.5)}function mfe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function gfe(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=Mw(i,n),a=r(s,a)):(n=Mw(n,i),a=r(a,s)),function(o){return a(n(o))}}function yfe(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=Mw(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(o){var l=bh(e,o,1,n)-1;return a[l](i[l](o))}}function wh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function av(){var e=cA,t=cA,r=fu,n,i,a,s=kr,o,l,c;function d(){var h=Math.min(e.length,t.length);return s!==kr&&(s=mfe(e[0],e[h-1])),o=h>2?yfe:gfe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=o(e.map(n),t,r)))(n(s(h)))}return f.invert=function(h){return s(i((c||(c=o(t,e.map(n),Zn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,ag),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=K_,d()},f.clamp=function(h){return arguments.length?(s=h?!0:kr,d()):s!==kr},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return n=h,i=p,d()}}function GS(){return av()(kr,kr)}function vfe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function sg(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $c(e){return e=sg(Math.abs(e)),e?e[1]:NaN}function xfe(e,t){return function(r,n){for(var i=r.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function bfe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var wfe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Af(e){if(!(t=wfe.exec(e)))throw new Error("invalid format: "+e);var t;return new YS({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]})}Af.prototype=YS.prototype;function YS(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+""}YS.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 _fe(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var oR;function Sfe(e,t){var r=sg(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(oR=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+sg(e,Math.max(0,t+a-1))[0]}function uA(e,t){var r=sg(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const dA={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vfe,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)=>uA(e*100,t),r:uA,s:Sfe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fA(e){return e}var hA=Array.prototype.map,pA=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function jfe(e){var t=e.grouping===void 0||e.thousands===void 0?fA:xfe(hA.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?fA:bfe(hA.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Af(f);var h=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,y=f.width,x=f.comma,b=f.precision,S=f.trim,_=f.type;_==="n"?(x=!0,_="g"):dA[_]||(b===void 0&&(b=12),S=!0,_="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var j=m==="$"?r:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",N=m==="$"?n:/[%p]/.test(_)?s:"",A=dA[_],E=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function C(P){var T=j,$=N,O,R,M;if(_==="c")$=A(P)+$,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?l:A(Math.abs(P),b),S&&(P=_fe(P)),F&&+P==0&&g!=="+"&&(F=!1),T=(F?g==="("?g:o:g==="-"||g==="("?"":g)+T,$=(_==="s"?pA[8+oR/3]:"")+$+(F&&g==="("?")":""),E){for(O=-1,R=P.length;++O<R;)if(M=P.charCodeAt(O),48>M||M>57){$=(M===46?i+P.slice(O+1):P.slice(O))+$,P=P.slice(0,O);break}}}x&&!v&&(P=t(P,1/0));var D=T.length+P.length+$.length,I=D<y?new Array(y-D+1).join(h):"";switch(x&&v&&(P=t(I+P,I.length?y-$.length:1/0),I=""),p){case"<":P=T+P+$+I;break;case"=":P=T+I+P+$;break;case"^":P=I.slice(0,D=I.length>>1)+T+P+$+I.slice(D);break;default:P=I+T+P+$;break}return a(P)}return C.toString=function(){return f+""},C}function d(f,h){var p=c((f=Af(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor($c(h)/3)))*3,m=Math.pow(10,-g),v=pA[8+g/3];return function(y){return p(m*y)+v}}return{format:c,formatPrefix:d}}var dp,XS,lR;Nfe({thousands:",",grouping:[3],currency:["$",""]});function Nfe(e){return dp=jfe(e),XS=dp.format,lR=dp.formatPrefix,dp}function Efe(e){return Math.max(0,-$c(Math.abs(e)))}function Ofe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($c(t)/3)))*3-$c(Math.abs(e)))}function Afe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$c(t)-$c(e))+1}function cR(e,t,r,n){var i=Cw(e,t,r),a;switch(n=Af(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Ofe(i,s))&&(n.precision=a),lR(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=Afe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Efe(i))&&(n.precision=a-(n.type==="%")*2);break}}return XS(n)}function Fs(e){var t=e.domain;return e.ticks=function(r){var n=t();return Pw(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return cR(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],o=n[a],l,c,d=10;for(o<s&&(c=s,s=o,o=c,c=i,i=a,a=c);d-- >0;){if(c=Tw(s,o,r),c===l)return n[i]=s,n[a]=o,t(n);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function og(){var e=GS();return e.copy=function(){return wh(e,og())},Mn.apply(e,arguments),Fs(e)}function uR(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,ag),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return uR(e).unknown(t)},e=arguments.length?Array.from(e,ag):[0,1],Fs(r)}function dR(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),e[r]=t.floor(i),e[n]=t.ceil(a),e}function mA(e){return Math.log(e)}function gA(e){return Math.exp(e)}function kfe(e){return-Math.log(-e)}function Pfe(e){return-Math.exp(-e)}function Tfe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Cfe(e){return e===10?Tfe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $fe(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 yA(e){return(t,r)=>-e(-t,r)}function ZS(e){const t=e(mA,gA),r=t.domain;let n=10,i,a;function s(){return i=$fe(n),a=Cfe(n),r()[0]<0?(i=yA(i),a=yA(a),e(kfe,Pfe)):e(mA,gA),t}return t.base=function(o){return arguments.length?(n=+o,s()):n},t.domain=function(o){return arguments.length?(r(o),s()):r()},t.ticks=o=>{const l=r();let c=l[0],d=l[l.length-1];const f=d<c;f&&([c,d]=[d,c]);let h=i(c),p=i(d),g,m;const v=o==null?10:+o;let y=[];if(!(n%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(g=1;g<n;++g)if(m=h<0?g/a(-h):g*a(h),!(m<c)){if(m>d)break;y.push(m)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(m=h>0?g/a(-h):g*a(h),!(m<c)){if(m>d)break;y.push(m)}y.length*2<v&&(y=Pw(c,d,v))}else y=Pw(h,p,Math.min(p-h,v)).map(a);return f?y.reverse():y},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Af(l)).precision==null&&(l.trim=!0),l=XS(l)),o===1/0)return l;const c=Math.max(1,n*o/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*n<n-.5&&(f*=n),f<=c?l(d):""}},t.nice=()=>r(dR(r(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function fR(){const e=ZS(av()).domain([1,10]);return e.copy=()=>wh(e,fR()).base(e.base()),Mn.apply(e,arguments),e}function vA(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function xA(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function QS(e){var t=1,r=e(vA(t),xA(t));return r.constant=function(n){return arguments.length?e(vA(t=+n),xA(t)):t},Fs(r)}function hR(){var e=QS(av());return e.copy=function(){return wh(e,hR()).constant(e.constant())},Mn.apply(e,arguments)}function bA(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Mfe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Rfe(e){return e<0?-e*e:e*e}function JS(e){var t=e(kr,kr),r=1;function n(){return r===1?e(kr,kr):r===.5?e(Mfe,Rfe):e(bA(r),bA(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Fs(t)}function ej(){var e=JS(av());return e.copy=function(){return wh(e,ej()).exponent(e.exponent())},Mn.apply(e,arguments),e}function Ife(){return ej.apply(null,arguments).exponent(.5)}function wA(e){return Math.sign(e)*e*e}function Dfe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function pR(){var e=GS(),t=[0,1],r=!1,n;function i(a){var s=Dfe(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(wA(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,ag)).map(wA)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return pR(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Mn.apply(i,arguments),Fs(i)}function mR(){var e=[],t=[],r=[],n;function i(){var s=0,o=Math.max(1,t.length);for(r=new Array(o-1);++s<o;)r[s-1]=ffe(e,s/o);return a}function a(s){return s==null||isNaN(s=+s)?n:t[bh(r,s)]}return a.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?r[o-1]:e[0],o<r.length?r[o]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(js),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return mR().domain(e).range(t).unknown(n)},Mn.apply(a,arguments)}function gR(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function s(l){return l!=null&&l<=l?i[bh(n,l,0,r)]:a}function o(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,o()):i.slice()},s.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},s.unknown=function(l){return arguments.length&&(a=l),s},s.thresholds=function(){return n.slice()},s.copy=function(){return gR().domain([e,t]).range(i).unknown(a)},Mn.apply(Fs(s),arguments)}function yR(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[bh(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return yR().domain(e).range(t).unknown(r)},Mn.apply(i,arguments)}const q0=new Date,K0=new Date;function Xt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let c;do l.push(c=new Date(+a)),t(a,o),e(a);while(c<a&&a<s);return l},i.filter=a=>Xt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(q0.setTime(+a),K0.setTime(+s),e(q0),e(K0),Math.floor(r(q0,K0))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const lg=Xt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);lg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):lg);lg.range;const Qi=1e3,En=Qi*60,Ji=En*60,ma=Ji*24,tj=ma*7,_A=ma*30,G0=ma*365,ho=Xt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qi)},(e,t)=>(t-e)/Qi,e=>e.getUTCSeconds());ho.range;const rj=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qi)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getMinutes());rj.range;const nj=Xt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCMinutes());nj.range;const ij=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qi-e.getMinutes()*En)},(e,t)=>{e.setTime(+e+t*Ji)},(e,t)=>(t-e)/Ji,e=>e.getHours());ij.range;const aj=Xt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ji)},(e,t)=>(t-e)/Ji,e=>e.getUTCHours());aj.range;const _h=Xt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*En)/ma,e=>e.getDate()-1);_h.range;const sv=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ma,e=>e.getUTCDate()-1);sv.range;const vR=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ma,e=>Math.floor(e/ma));vR.range;function ul(e){return Xt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*En)/tj)}const ov=ul(0),cg=ul(1),Lfe=ul(2),Ffe=ul(3),Mc=ul(4),Bfe=ul(5),zfe=ul(6);ov.range;cg.range;Lfe.range;Ffe.range;Mc.range;Bfe.range;zfe.range;function dl(e){return Xt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/tj)}const lv=dl(0),ug=dl(1),Ufe=dl(2),Wfe=dl(3),Rc=dl(4),Vfe=dl(5),Hfe=dl(6);lv.range;ug.range;Ufe.range;Wfe.range;Rc.range;Vfe.range;Hfe.range;const sj=Xt(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());sj.range;const oj=Xt(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());oj.range;const ga=Xt(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());ga.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ga.range;const ya=Xt(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());ya.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ya.range;function xR(e,t,r,n,i,a){const s=[[ho,1,Qi],[ho,5,5*Qi],[ho,15,15*Qi],[ho,30,30*Qi],[a,1,En],[a,5,5*En],[a,15,15*En],[a,30,30*En],[i,1,Ji],[i,3,3*Ji],[i,6,6*Ji],[i,12,12*Ji],[n,1,ma],[n,2,2*ma],[r,1,tj],[t,1,_A],[t,3,3*_A],[e,1,G0]];function o(c,d,f){const h=d<c;h&&([c,d]=[d,c]);const p=f&&typeof f.range=="function"?f:l(c,d,f),g=p?p.range(c,+d+1):[];return h?g.reverse():g}function l(c,d,f){const h=Math.abs(d-c)/f,p=qS(([,,v])=>v).right(s,h);if(p===s.length)return e.every(Cw(c/G0,d/G0,f));if(p===0)return lg.every(Math.max(Cw(c,d,f),1));const[g,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(m)}return[o,l]}const[qfe,Kfe]=xR(ya,oj,lv,vR,aj,nj),[Gfe,Yfe]=xR(ga,sj,ov,_h,ij,rj);function Y0(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 X0(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 Qu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Xfe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Ju(i),d=ed(i),f=Ju(a),h=ed(a),p=Ju(s),g=ed(s),m=Ju(o),v=ed(o),y=Ju(l),x=ed(l),b={a:F,A:D,b:I,B:L,c:null,d:AA,e:AA,f:xhe,g:khe,G:The,H:ghe,I:yhe,j:vhe,L:bR,m:bhe,M:whe,p:W,q:U,Q:TA,s:CA,S:_he,u:She,U:jhe,V:Nhe,w:Ehe,W:Ohe,x:null,X:null,y:Ahe,Y:Phe,Z:Che,"%":PA},S={a:G,A:X,b:ne,B:ue,c:null,d:kA,e:kA,f:Ihe,g:qhe,G:Ghe,H:$he,I:Mhe,j:Rhe,L:_R,m:Dhe,M:Lhe,p:we,q:je,Q:TA,s:CA,S:Fhe,u:Bhe,U:zhe,V:Uhe,w:Whe,W:Vhe,x:null,X:null,y:Hhe,Y:Khe,Z:Yhe,"%":PA},_={a:C,A:P,b:T,B:$,c:O,d:EA,e:EA,f:fhe,g:NA,G:jA,H:OA,I:OA,j:lhe,L:dhe,m:ohe,M:che,p:E,q:she,Q:phe,s:mhe,S:uhe,u:the,U:rhe,V:nhe,w:ehe,W:ihe,x:R,X:M,y:NA,Y:jA,Z:ahe,"%":hhe};b.x=j(r,b),b.X=j(n,b),b.c=j(t,b),S.x=j(r,S),S.X=j(n,S),S.c=j(t,S);function j(Z,ae){return function(ge){var Y=[],$e=-1,xe=0,Ae=Z.length,Be,Oe,de;for(ge instanceof Date||(ge=new Date(+ge));++$e<Ae;)Z.charCodeAt($e)===37&&(Y.push(Z.slice(xe,$e)),(Oe=SA[Be=Z.charAt(++$e)])!=null?Be=Z.charAt(++$e):Oe=Be==="e"?" ":"0",(de=ae[Be])&&(Be=de(ge,Oe)),Y.push(Be),xe=$e+1);return Y.push(Z.slice(xe,$e)),Y.join("")}}function N(Z,ae){return function(ge){var Y=Qu(1900,void 0,1),$e=A(Y,Z,ge+="",0),xe,Ae;if($e!=ge.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(ae&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(xe=X0(Qu(Y.y,0,1)),Ae=xe.getUTCDay(),xe=Ae>4||Ae===0?ug.ceil(xe):ug(xe),xe=sv.offset(xe,(Y.V-1)*7),Y.y=xe.getUTCFullYear(),Y.m=xe.getUTCMonth(),Y.d=xe.getUTCDate()+(Y.w+6)%7):(xe=Y0(Qu(Y.y,0,1)),Ae=xe.getDay(),xe=Ae>4||Ae===0?cg.ceil(xe):cg(xe),xe=_h.offset(xe,(Y.V-1)*7),Y.y=xe.getFullYear(),Y.m=xe.getMonth(),Y.d=xe.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Ae="Z"in Y?X0(Qu(Y.y,0,1)).getUTCDay():Y0(Qu(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Ae+5)%7:Y.w+Y.U*7-(Ae+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,X0(Y)):Y0(Y)}}function A(Z,ae,ge,Y){for(var $e=0,xe=ae.length,Ae=ge.length,Be,Oe;$e<xe;){if(Y>=Ae)return-1;if(Be=ae.charCodeAt($e++),Be===37){if(Be=ae.charAt($e++),Oe=_[Be in SA?ae.charAt($e++):Be],!Oe||(Y=Oe(Z,ge,Y))<0)return-1}else if(Be!=ge.charCodeAt(Y++))return-1}return Y}function E(Z,ae,ge){var Y=c.exec(ae.slice(ge));return Y?(Z.p=d.get(Y[0].toLowerCase()),ge+Y[0].length):-1}function C(Z,ae,ge){var Y=p.exec(ae.slice(ge));return Y?(Z.w=g.get(Y[0].toLowerCase()),ge+Y[0].length):-1}function P(Z,ae,ge){var Y=f.exec(ae.slice(ge));return Y?(Z.w=h.get(Y[0].toLowerCase()),ge+Y[0].length):-1}function T(Z,ae,ge){var Y=y.exec(ae.slice(ge));return Y?(Z.m=x.get(Y[0].toLowerCase()),ge+Y[0].length):-1}function $(Z,ae,ge){var Y=m.exec(ae.slice(ge));return Y?(Z.m=v.get(Y[0].toLowerCase()),ge+Y[0].length):-1}function O(Z,ae,ge){return A(Z,t,ae,ge)}function R(Z,ae,ge){return A(Z,r,ae,ge)}function M(Z,ae,ge){return A(Z,n,ae,ge)}function F(Z){return s[Z.getDay()]}function D(Z){return a[Z.getDay()]}function I(Z){return l[Z.getMonth()]}function L(Z){return o[Z.getMonth()]}function W(Z){return i[+(Z.getHours()>=12)]}function U(Z){return 1+~~(Z.getMonth()/3)}function G(Z){return s[Z.getUTCDay()]}function X(Z){return a[Z.getUTCDay()]}function ne(Z){return l[Z.getUTCMonth()]}function ue(Z){return o[Z.getUTCMonth()]}function we(Z){return i[+(Z.getUTCHours()>=12)]}function je(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var ae=j(Z+="",b);return ae.toString=function(){return Z},ae},parse:function(Z){var ae=N(Z+="",!1);return ae.toString=function(){return Z},ae},utcFormat:function(Z){var ae=j(Z+="",S);return ae.toString=function(){return Z},ae},utcParse:function(Z){var ae=N(Z+="",!0);return ae.toString=function(){return Z},ae}}}var SA={"-":"",_:" ",0:"0"},ir=/^\s*\d+/,Zfe=/^%/,Qfe=/[\\^$*+?|[\]().{}]/g;function Ke(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Jfe(e){return e.replace(Qfe,"\\$&")}function Ju(e){return new RegExp("^(?:"+e.map(Jfe).join("|")+")","i")}function ed(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function ehe(e,t,r){var n=ir.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function the(e,t,r){var n=ir.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function rhe(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function nhe(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function ihe(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function jA(e,t,r){var n=ir.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function NA(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ahe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function she(e,t,r){var n=ir.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function ohe(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function EA(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function lhe(e,t,r){var n=ir.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function OA(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function che(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function uhe(e,t,r){var n=ir.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function dhe(e,t,r){var n=ir.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function fhe(e,t,r){var n=ir.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function hhe(e,t,r){var n=Zfe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function phe(e,t,r){var n=ir.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function mhe(e,t,r){var n=ir.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function AA(e,t){return Ke(e.getDate(),t,2)}function ghe(e,t){return Ke(e.getHours(),t,2)}function yhe(e,t){return Ke(e.getHours()%12||12,t,2)}function vhe(e,t){return Ke(1+_h.count(ga(e),e),t,3)}function bR(e,t){return Ke(e.getMilliseconds(),t,3)}function xhe(e,t){return bR(e,t)+"000"}function bhe(e,t){return Ke(e.getMonth()+1,t,2)}function whe(e,t){return Ke(e.getMinutes(),t,2)}function _he(e,t){return Ke(e.getSeconds(),t,2)}function She(e){var t=e.getDay();return t===0?7:t}function jhe(e,t){return Ke(ov.count(ga(e)-1,e),t,2)}function wR(e){var t=e.getDay();return t>=4||t===0?Mc(e):Mc.ceil(e)}function Nhe(e,t){return e=wR(e),Ke(Mc.count(ga(e),e)+(ga(e).getDay()===4),t,2)}function Ehe(e){return e.getDay()}function Ohe(e,t){return Ke(cg.count(ga(e)-1,e),t,2)}function Ahe(e,t){return Ke(e.getFullYear()%100,t,2)}function khe(e,t){return e=wR(e),Ke(e.getFullYear()%100,t,2)}function Phe(e,t){return Ke(e.getFullYear()%1e4,t,4)}function The(e,t){var r=e.getDay();return e=r>=4||r===0?Mc(e):Mc.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function Che(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function kA(e,t){return Ke(e.getUTCDate(),t,2)}function $he(e,t){return Ke(e.getUTCHours(),t,2)}function Mhe(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function Rhe(e,t){return Ke(1+sv.count(ya(e),e),t,3)}function _R(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function Ihe(e,t){return _R(e,t)+"000"}function Dhe(e,t){return Ke(e.getUTCMonth()+1,t,2)}function Lhe(e,t){return Ke(e.getUTCMinutes(),t,2)}function Fhe(e,t){return Ke(e.getUTCSeconds(),t,2)}function Bhe(e){var t=e.getUTCDay();return t===0?7:t}function zhe(e,t){return Ke(lv.count(ya(e)-1,e),t,2)}function SR(e){var t=e.getUTCDay();return t>=4||t===0?Rc(e):Rc.ceil(e)}function Uhe(e,t){return e=SR(e),Ke(Rc.count(ya(e),e)+(ya(e).getUTCDay()===4),t,2)}function Whe(e){return e.getUTCDay()}function Vhe(e,t){return Ke(ug.count(ya(e)-1,e),t,2)}function Hhe(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function qhe(e,t){return e=SR(e),Ke(e.getUTCFullYear()%100,t,2)}function Khe(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function Ghe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Rc(e):Rc.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function Yhe(){return"+0000"}function PA(){return"%"}function TA(e){return+e}function CA(e){return Math.floor(+e/1e3)}var _l,jR,NR;Xhe({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 Xhe(e){return _l=Xfe(e),jR=_l.format,_l.parse,NR=_l.utcFormat,_l.utcParse,_l}function Zhe(e){return new Date(e)}function Qhe(e){return e instanceof Date?+e:+new Date(+e)}function lj(e,t,r,n,i,a,s,o,l,c){var d=GS(),f=d.invert,h=d.domain,p=c(".%L"),g=c(":%S"),m=c("%I:%M"),v=c("%I %p"),y=c("%a %d"),x=c("%b %d"),b=c("%B"),S=c("%Y");function _(j){return(l(j)<j?p:o(j)<j?g:s(j)<j?m:a(j)<j?v:n(j)<j?i(j)<j?y:x:r(j)<j?b:S)(j)}return d.invert=function(j){return new Date(f(j))},d.domain=function(j){return arguments.length?h(Array.from(j,Qhe)):h().map(Zhe)},d.ticks=function(j){var N=h();return e(N[0],N[N.length-1],j??10)},d.tickFormat=function(j,N){return N==null?_:c(N)},d.nice=function(j){var N=h();return(!j||typeof j.range!="function")&&(j=t(N[0],N[N.length-1],j??10)),j?h(dR(N,j)):d},d.copy=function(){return wh(d,lj(e,t,r,n,i,a,s,o,l,c))},d}function Jhe(){return Mn.apply(lj(Gfe,Yfe,ga,sj,ov,_h,ij,rj,ho,jR).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function epe(){return Mn.apply(lj(qfe,Kfe,ya,oj,lv,sv,aj,nj,ho,NR).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cv(){var e=0,t=1,r,n,i,a,s=kr,o=!1,l;function c(f){return f==null||isNaN(f=+f)?l:s(i===0?.5:(f=(a(f)-r)*i,o?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(f){return arguments.length?(o=!!f,c):o},c.interpolator=function(f){return arguments.length?(s=f,c):s};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,s=f(p,g),c):[s(0),s(1)]}}return c.range=d(fu),c.rangeRound=d(K_),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),c}}function Bs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function ER(){var e=Fs(cv()(kr));return e.copy=function(){return Bs(e,ER())},Na.apply(e,arguments)}function OR(){var e=ZS(cv()).domain([1,10]);return e.copy=function(){return Bs(e,OR()).base(e.base())},Na.apply(e,arguments)}function AR(){var e=QS(cv());return e.copy=function(){return Bs(e,AR()).constant(e.constant())},Na.apply(e,arguments)}function cj(){var e=JS(cv());return e.copy=function(){return Bs(e,cj()).exponent(e.exponent())},Na.apply(e,arguments)}function tpe(){return cj.apply(null,arguments).exponent(.5)}function kR(){var e=[],t=kr;function r(n){if(n!=null&&!isNaN(n=+n))return t((bh(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(js),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>dfe(e,a/n))},r.copy=function(){return kR(t).domain(e)},Na.apply(r,arguments)}function uv(){var e=0,t=.5,r=1,n=1,i,a,s,o,l,c=kr,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-a)*(n*m<n*a?o:l),c(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,r]=m,i=d(e=+e),a=d(t=+t),s=d(r=+r),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),n=a<i?-1:1,p):[e,t,r]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(c=m,p):c};function g(m){return function(v){var y,x,b;return arguments.length?([y,x,b]=v,c=mU(m,[y,x,b]),p):[c(0),c(.5),c(1)]}}return p.range=g(fu),p.rangeRound=g(K_),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return d=m,i=m(e),a=m(t),s=m(r),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),n=a<i?-1:1,p}}function PR(){var e=Fs(uv()(kr));return e.copy=function(){return Bs(e,PR())},Na.apply(e,arguments)}function TR(){var e=ZS(uv()).domain([.1,1,10]);return e.copy=function(){return Bs(e,TR()).base(e.base())},Na.apply(e,arguments)}function CR(){var e=QS(uv());return e.copy=function(){return Bs(e,CR()).constant(e.constant())},Na.apply(e,arguments)}function uj(){var e=JS(uv());return e.copy=function(){return Bs(e,uj()).exponent(e.exponent())},Na.apply(e,arguments)}function rpe(){return uj.apply(null,arguments).exponent(.5)}const $A=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Of,scaleDiverging:PR,scaleDivergingLog:TR,scaleDivergingPow:uj,scaleDivergingSqrt:rpe,scaleDivergingSymlog:CR,scaleIdentity:uR,scaleImplicit:$w,scaleLinear:og,scaleLog:fR,scaleOrdinal:KS,scalePoint:Md,scalePow:ej,scaleQuantile:mR,scaleQuantize:gR,scaleRadial:pR,scaleSequential:ER,scaleSequentialLog:OR,scaleSequentialPow:cj,scaleSequentialQuantile:kR,scaleSequentialSqrt:tpe,scaleSequentialSymlog:AR,scaleSqrt:Ife,scaleSymlog:hR,scaleThreshold:yR,scaleTime:Jhe,scaleUtc:epe,tickFormat:cR},Symbol.toStringTag,{value:"Module"}));var npe=gu;function ipe(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],s=t(a);if(s!=null&&(o===void 0?s===s&&!npe(s):r(s,o)))var o=s,l=a}return l}var dv=ipe;function ape(e,t){return e>t}var $R=ape,spe=dv,ope=$R,lpe=ju;function cpe(e){return e&&e.length?spe(e,lpe,ope):void 0}var upe=cpe;const os=Xe(upe);function dpe(e,t){return e<t}var MR=dpe,fpe=dv,hpe=MR,ppe=ju;function mpe(e){return e&&e.length?fpe(e,ppe,hpe):void 0}var gpe=mpe;const fv=Xe(gpe);var ype=OS,vpe=Ii,xpe=H4,bpe=qr;function wpe(e,t){var r=bpe(e)?ype:xpe;return r(e,vpe(t))}var _pe=wpe,Spe=W4,jpe=_pe;function Npe(e,t){return Spe(jpe(e,t),1)}var Epe=Npe;const Ope=Xe(Epe);var Ape=US;function kpe(e,t){return Ape(e,t)}var Ppe=kpe;const el=Xe(Ppe);var Nu=1e9,Tpe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},fj,xt=!0,Cn="[DecimalError] ",$o=Cn+"Invalid argument: ",dj=Cn+"Exponent out of range: ",Eu=Math.floor,to=Math.pow,Cpe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,en,Qt=1e7,mt=7,RR=9007199254740991,dg=Eu(RR/mt),ce={};ce.absoluteValue=ce.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ce.comparedTo=ce.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};ce.decimalPlaces=ce.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ce.dividedBy=ce.div=function(e){return sa(this,new this.constructor(e))};ce.dividedToIntegerBy=ce.idiv=function(e){var t=this,r=t.constructor;return it(sa(t,new r(e),0,1),r.precision)};ce.equals=ce.eq=function(e){return!this.cmp(e)};ce.exponent=function(){return Bt(this)};ce.greaterThan=ce.gt=function(e){return this.cmp(e)>0};ce.greaterThanOrEqualTo=ce.gte=function(e){return this.cmp(e)>=0};ce.isInteger=ce.isint=function(){return this.e>this.d.length-2};ce.isNegative=ce.isneg=function(){return this.s<0};ce.isPositive=ce.ispos=function(){return this.s>0};ce.isZero=function(){return this.s===0};ce.lessThan=ce.lt=function(e){return this.cmp(e)<0};ce.lessThanOrEqualTo=ce.lte=function(e){return this.cmp(e)<1};ce.logarithm=ce.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(en))throw Error(Cn+"NaN");if(r.s<1)throw Error(Cn+(r.s?"NaN":"-Infinity"));return r.eq(en)?new n(0):(xt=!1,t=sa(kf(r,a),kf(e,a),a),xt=!0,it(t,i))};ce.minus=ce.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?LR(t,e):IR(t,(e.s=-e.s,e))};ce.modulo=ce.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Cn+"NaN");return r.s?(xt=!1,t=sa(r,e,0,1).times(e),xt=!0,r.minus(t)):it(new n(r),i)};ce.naturalExponential=ce.exp=function(){return DR(this)};ce.naturalLogarithm=ce.ln=function(){return kf(this)};ce.negated=ce.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ce.plus=ce.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?IR(t,e):LR(t,(e.s=-e.s,e))};ce.precision=ce.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($o+e);if(t=Bt(i)+1,n=i.d.length-1,r=n*mt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ce.squareRoot=ce.sqrt=function(){var e,t,r,n,i,a,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Cn+"NaN")}for(e=Bt(o),xt=!1,i=Math.sqrt(+o),i==0||i==1/0?(t=Si(o.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Eu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=s=r+3;;)if(a=n,n=a.plus(sa(o,a,s+2)).times(.5),Si(a.d).slice(0,s)===(t=Si(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(it(a,r+1,0),a.times(a).eq(o)){n=a;break}}else if(t!="9999")break;s+=4}return xt=!0,it(n,r)};ce.times=ce.mul=function(e){var t,r,n,i,a,s,o,l,c,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,l=h.length,c=p.length,l<c&&(a=h,h=p,p=a,s=l,l=c,c=s),a=[],s=l+c,n=s;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=l+n;i>n;)o=a[i]+p[n]*h[i-n-1]+t,a[i--]=o%Qt|0,t=o/Qt|0;a[i]=(a[i]+t)%Qt|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,xt?it(e,f.precision):e};ce.toDecimalPlaces=ce.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:($i(e,0,Nu),t===void 0?t=n.rounding:$i(t,0,8),it(r,e+Bt(r)+1,t))};ce.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=tl(n,!0):($i(e,0,Nu),t===void 0?t=i.rounding:$i(t,0,8),n=it(new i(n),e+1,t),r=tl(n,!0,e+1)),r};ce.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?tl(i):($i(e,0,Nu),t===void 0?t=a.rounding:$i(t,0,8),n=it(new a(i),e+Bt(i)+1,t),r=tl(n.abs(),!1,e+Bt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ce.toInteger=ce.toint=function(){var e=this,t=e.constructor;return it(new t(e),Bt(e)+1,t.rounding)};ce.toNumber=function(){return+this};ce.toPower=ce.pow=function(e){var t,r,n,i,a,s,o=this,l=o.constructor,c=12,d=+(e=new l(e));if(!e.s)return new l(en);if(o=new l(o),!o.s){if(e.s<1)throw Error(Cn+"Infinity");return o}if(o.eq(en))return o;if(n=l.precision,e.eq(en))return it(o,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=o.s,s){if((r=d<0?-d:d)<=RR){for(i=new l(en),t=Math.ceil(n/mt+4),xt=!1;r%2&&(i=i.times(o),RA(i.d,t)),r=Eu(r/2),r!==0;)o=o.times(o),RA(o.d,t);return xt=!0,e.s<0?new l(en).div(i):it(i,n)}}else if(a<0)throw Error(Cn+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,o.s=1,xt=!1,i=e.times(kf(o,n+c)),xt=!0,i=DR(i),i.s=a,i};ce.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Bt(i),n=tl(i,r<=a.toExpNeg||r>=a.toExpPos)):($i(e,1,Nu),t===void 0?t=a.rounding:$i(t,0,8),i=it(new a(i),e,t),r=Bt(i),n=tl(i,e<=r||r<=a.toExpNeg,e)),n};ce.toSignificantDigits=ce.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):($i(e,1,Nu),t===void 0?t=n.rounding:$i(t,0,8)),it(new n(r),e,t)};ce.toString=ce.valueOf=ce.val=ce.toJSON=ce[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Bt(e),r=e.constructor;return tl(e,t<=r.toExpNeg||t>=r.toExpPos)};function IR(e,t){var r,n,i,a,s,o,l,c,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),xt?it(t,f):t;if(l=e.d,c=t.d,s=e.e,i=t.e,l=l.slice(),a=s-i,a){for(a<0?(n=l,a=-a,o=c.length):(n=c,i=s,o=l.length),s=Math.ceil(f/mt),o=s>o?s+1:o+1,a>o&&(a=o,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(o=l.length,a=c.length,o-a<0&&(a=o,n=c,c=l,l=n),r=0;a;)r=(l[--a]=l[a]+c[a]+r)/Qt|0,l[a]%=Qt;for(r&&(l.unshift(r),++i),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=i,xt?it(t,f):t}function $i(e,t,r){if(e!==~~e||e<t||e>r)throw Error($o+e)}function Si(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)n=e[t]+"",r=mt-n.length,r&&(a+=Fa(r)),a+=n;s=e[t],n=s+"",r=mt-n.length,r&&(a+=Fa(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var sa=function(){function e(n,i){var a,s=0,o=n.length;for(n=n.slice();o--;)a=n[o]*i+s,n[o]=a%Qt|0,s=a/Qt|0;return s&&n.unshift(s),n}function t(n,i,a,s){var o,l;if(a!=s)l=a>s?1:-1;else for(o=l=0;o<a;o++)if(n[o]!=i[o]){l=n[o]>i[o]?1:-1;break}return l}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*Qt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var o,l,c,d,f,h,p,g,m,v,y,x,b,S,_,j,N,A,E=n.constructor,C=n.s==i.s?1:-1,P=n.d,T=i.d;if(!n.s)return new E(n);if(!i.s)throw Error(Cn+"Division by zero");for(l=n.e-i.e,N=T.length,_=P.length,p=new E(C),g=p.d=[],c=0;T[c]==(P[c]||0);)++c;if(T[c]>(P[c]||0)&&--l,a==null?x=a=E.precision:s?x=a+(Bt(n)-Bt(i))+1:x=a,x<0)return new E(0);if(x=x/mt+2|0,c=0,N==1)for(d=0,T=T[0],x++;(c<_||d)&&x--;c++)b=d*Qt+(P[c]||0),g[c]=b/T|0,d=b%T|0;else{for(d=Qt/(T[0]+1)|0,d>1&&(T=e(T,d),P=e(P,d),N=T.length,_=P.length),S=N,m=P.slice(0,N),v=m.length;v<N;)m[v++]=0;A=T.slice(),A.unshift(0),j=T[0],T[1]>=Qt/2&&++j;do d=0,o=t(T,m,N,v),o<0?(y=m[0],N!=v&&(y=y*Qt+(m[1]||0)),d=y/j|0,d>1?(d>=Qt&&(d=Qt-1),f=e(T,d),h=f.length,v=m.length,o=t(f,m,h,v),o==1&&(d--,r(f,N<h?A:T,h))):(d==0&&(o=d=1),f=T.slice()),h=f.length,h<v&&f.unshift(0),r(m,f,v),o==-1&&(v=m.length,o=t(T,m,N,v),o<1&&(d++,r(m,N<v?A:T,v))),v=m.length):o===0&&(d++,m=[0]),g[c++]=d,o&&m[0]?m[v++]=P[S]||0:(m=[P[S]],v=1);while((S++<_||m[0]!==void 0)&&x--)}return g[0]||g.shift(),p.e=l,it(p,s?a+Bt(p)+1:a)}}();function DR(e,t){var r,n,i,a,s,o,l=0,c=0,d=e.constructor,f=d.precision;if(Bt(e)>16)throw Error(dj+Bt(e));if(!e.s)return new d(en);for(xt=!1,o=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(n=Math.log(to(2,c))/Math.LN10*2+5|0,o+=n,r=i=a=new d(en),d.precision=o;;){if(i=it(i.times(e),o),r=r.times(++l),s=a.plus(sa(i,r,o)),Si(s.d).slice(0,o)===Si(a.d).slice(0,o)){for(;c--;)a=it(a.times(a),o);return d.precision=f,t==null?(xt=!0,it(a,f)):a}a=s}}function Bt(e){for(var t=e.e*mt,r=e.d[0];r>=10;r/=10)t++;return t}function Z0(e,t,r){if(t>e.LN10.sd())throw xt=!0,r&&(e.precision=r),Error(Cn+"LN10 precision limit exceeded");return it(new e(e.LN10),t)}function Fa(e){for(var t="";e--;)t+="0";return t}function kf(e,t){var r,n,i,a,s,o,l,c,d,f=1,h=10,p=e,g=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(Cn+(p.s?"NaN":"-Infinity"));if(p.eq(en))return new m(0);if(t==null?(xt=!1,c=v):c=t,p.eq(10))return t==null&&(xt=!0),Z0(m,c);if(c+=h,m.precision=c,r=Si(g),n=r.charAt(0),a=Bt(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Si(p.d),n=r.charAt(0),f++;a=Bt(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=Z0(m,c+2,v).times(a+""),p=kf(new m(n+"."+r.slice(1)),c-h).plus(l),m.precision=v,t==null?(xt=!0,it(p,v)):p;for(o=s=p=sa(p.minus(en),p.plus(en),c),d=it(p.times(p),c),i=3;;){if(s=it(s.times(d),c),l=o.plus(sa(s,new m(i),c)),Si(l.d).slice(0,c)===Si(o.d).slice(0,c))return o=o.times(2),a!==0&&(o=o.plus(Z0(m,c+2,v).times(a+""))),o=sa(o,new m(f),c),m.precision=v,t==null?(xt=!0,it(o,v)):o;o=l,i+=2}}function MA(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Eu(r/mt),e.d=[],n=(r+1)%mt,r<0&&(n+=mt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=mt;n<i;)e.d.push(+t.slice(n,n+=mt));t=t.slice(n),n=mt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),xt&&(e.e>dg||e.e<-dg))throw Error(dj+r)}else e.s=0,e.e=0,e.d=[0];return e}function it(e,t,r){var n,i,a,s,o,l,c,d,f=e.d;for(s=1,a=f[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=mt,i=t,c=f[d=0];else{if(d=Math.ceil((n+1)/mt),a=f.length,d>=a)return e;for(c=a=f[d],s=1;a>=10;a/=10)s++;n%=mt,i=n-mt+s}if(r!==void 0&&(a=to(10,s-i-1),o=c/a%10|0,l=t<0||f[d+1]!==void 0||c%a,l=r<4?(o||l)&&(r==0||r==(e.s<0?3:2)):o>5||o==5&&(r==4||l||r==6&&(n>0?i>0?c/to(10,s-i):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=Bt(e),f.length=1,t=t-a-1,f[0]=to(10,(mt-t%mt)%mt),e.e=Eu(-t/mt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,a=1,d--):(f.length=d+1,a=to(10,mt-n),f[d]=i>0?(c/to(10,s-i)%to(10,i)|0)*a:0),l)for(;;)if(d==0){(f[0]+=a)==Qt&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=Qt)break;f[d--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(xt&&(e.e>dg||e.e<-dg))throw Error(dj+Bt(e));return e}function LR(e,t){var r,n,i,a,s,o,l,c,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),xt?it(t,p):t;if(l=e.d,f=t.d,n=t.e,c=e.e,l=l.slice(),s=c-n,s){for(d=s<0,d?(r=l,s=-s,o=f.length):(r=f,n=c,o=l.length),i=Math.max(Math.ceil(p/mt),o)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=l.length,o=f.length,d=i<o,d&&(o=i),i=0;i<o;i++)if(l[i]!=f[i]){d=l[i]<f[i];break}s=0}for(d&&(r=l,l=f,f=r,t.s=-t.s),o=l.length,i=f.length-o;i>0;--i)l[o++]=0;for(i=f.length;i>s;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=Qt-1;--l[a],l[i]+=Qt}l[i]-=f[i]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,xt?it(t,p):t):new h(0)}function tl(e,t,r){var n,i=Bt(e),a=Si(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Fa(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Fa(-i-1)+a,r&&(n=r-s)>0&&(a+=Fa(n))):i>=s?(a+=Fa(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Fa(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Fa(n))),e.s<0?"-"+a:a}function RA(e,t){if(e.length>t)return e.length=t,!0}function FR(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error($o+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return MA(s,a.toString())}else if(typeof a!="string")throw Error($o+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,Cpe.test(a))MA(s,a);else throw Error($o+a)}if(i.prototype=ce,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=FR,i.config=i.set=$pe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function $pe(e){if(!e||typeof e!="object")throw Error(Cn+"Object expected");var t,r,n,i=["precision",1,Nu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Eu(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error($o+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error($o+r+": "+n);return this}var fj=FR(Tpe);en=new fj(1);const tt=fj;function Mpe(e){return Lpe(e)||Dpe(e)||Ipe(e)||Rpe()}function Rpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ipe(e,t){if(e){if(typeof e=="string")return Rw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rw(e,t)}}function Dpe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Lpe(e){if(Array.isArray(e))return Rw(e)}function Rw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Fpe=function(t){return t},BR={},zR=function(t){return t===BR},IA=function(t){return function r(){return arguments.length===0||arguments.length===1&&zR(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Bpe=function e(t,r){return t===1?r:IA(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i.filter(function(o){return o!==BR}).length;return s>=t?r.apply(void 0,i):e(t-s,IA(function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];var d=i.map(function(f){return zR(f)?l.shift():f});return r.apply(void 0,Mpe(d).concat(l))}))})},hv=function(t){return Bpe(t.length,t)},Iw=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},zpe=hv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),Upe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return Fpe;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(o,l){return l(o)},a.apply(void 0,arguments))}},Dw=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},UR=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&a.every(function(o,l){return o===r[l]})||(r=a,n=t.apply(void 0,a)),n}};function Wpe(e){var t;return e===0?t=1:t=Math.floor(new tt(e).abs().log(10).toNumber())+1,t}function Vpe(e,t,r){for(var n=new tt(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var Hpe=hv(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),qpe=hv(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Kpe=hv(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const pv={rangeStep:Vpe,getDigitCount:Wpe,interpolateNumber:Hpe,uninterpolateNumber:qpe,uninterpolateTruncation:Kpe};function Lw(e){return Xpe(e)||Ype(e)||WR(e)||Gpe()}function Gpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ype(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Xpe(e){if(Array.isArray(e))return Fw(e)}function Pf(e,t){return Jpe(e)||Qpe(e,t)||WR(e,t)||Zpe()}function Zpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WR(e,t){if(e){if(typeof e=="string")return Fw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fw(e,t)}}function Fw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qpe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function Jpe(e){if(Array.isArray(e))return e}function VR(e){var t=Pf(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function HR(e,t,r){if(e.lte(0))return new tt(0);var n=pv.getDigitCount(e.toNumber()),i=new tt(10).pow(n),a=e.div(i),s=n!==1?.05:.1,o=new tt(Math.ceil(a.div(s).toNumber())).add(r).mul(s),l=o.mul(i);return t?l:new tt(Math.ceil(l))}function eme(e,t,r){var n=1,i=new tt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new tt(10).pow(pv.getDigitCount(e)-1),i=new tt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new tt(Math.floor(e)))}else e===0?i=new tt(Math.floor((t-1)/2)):r||(i=new tt(Math.floor(e)));var s=Math.floor((t-1)/2),o=Upe(zpe(function(l){return i.add(new tt(l-s).mul(n)).toNumber()}),Iw);return o(0,t)}function qR(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new tt(0),tickMin:new tt(0),tickMax:new tt(0)};var a=HR(new tt(t).sub(e).div(r-1),n,i),s;e<=0&&t>=0?s=new tt(0):(s=new tt(e).add(t).div(2),s=s.sub(new tt(s).mod(a)));var o=Math.ceil(s.sub(e).div(a).toNumber()),l=Math.ceil(new tt(t).sub(s).div(a).toNumber()),c=o+l+1;return c>r?qR(e,t,r,n,i+1):(c<r&&(l=t>0?l+(r-c):l,o=t>0?o:o+(r-c)),{step:a,tickMin:s.sub(new tt(o).mul(a)),tickMax:s.add(new tt(l).mul(a))})}function tme(e){var t=Pf(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),o=VR([r,n]),l=Pf(o,2),c=l[0],d=l[1];if(c===-1/0||d===1/0){var f=d===1/0?[c].concat(Lw(Iw(0,i-1).map(function(){return 1/0}))):[].concat(Lw(Iw(0,i-1).map(function(){return-1/0})),[d]);return r>n?Dw(f):f}if(c===d)return eme(c,i,a);var h=qR(c,d,s,a),p=h.step,g=h.tickMin,m=h.tickMax,v=pv.rangeStep(g,m.add(new tt(.1).mul(p)),p);return r>n?Dw(v):v}function rme(e,t){var r=Pf(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=VR([n,i]),o=Pf(s,2),l=o[0],c=o[1];if(l===-1/0||c===1/0)return[n,i];if(l===c)return[l];var d=Math.max(t,2),f=HR(new tt(c).sub(l).div(d-1),a,0),h=[].concat(Lw(pv.rangeStep(new tt(l),new tt(c).sub(new tt(.99).mul(f)),f)),[c]);return n>i?Dw(h):h}var nme=UR(tme),ime=UR(rme),ame="Invariant failed";function rl(e,t){throw new Error(ame)}var sme=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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)}function fg(){return fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fg.apply(this,arguments)}function ome(e,t){return dme(e)||ume(e,t)||cme(e,t)||lme()}function lme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cme(e,t){if(e){if(typeof e=="string")return DA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DA(e,t)}}function DA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ume(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function dme(e){if(Array.isArray(e))return e}function fme(e,t){if(e==null)return{};var r=hme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mme(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,YR(n.key),n)}}function gme(e,t,r){return t&&mme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yme(e,t,r){return t=hg(t),vme(e,KR()?Reflect.construct(t,r||[],hg(e).constructor):t.apply(e,r))}function vme(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 xme(e)}function xme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KR=function(){return!!e})()}function hg(e){return hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hg(e)}function bme(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&&Bw(e,t)}function Bw(e,t){return Bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bw(e,t)}function GR(e,t,r){return t=YR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YR(e){var t=wme(e,"string");return Ic(t)=="symbol"?t:t+""}function wme(e,t){if(Ic(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ic(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Sh=function(e){function t(){return pme(this,t),yme(this,t,arguments)}return bme(t,e),gme(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,s=n.width,o=n.dataKey,l=n.data,c=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,h=fme(n,sme),p=ye(h,!1);this.props.direction==="x"&&d.type!=="number"&&rl();var g=l.map(function(m){var v=c(m,o),y=v.x,x=v.y,b=v.value,S=v.errorVal;if(!S)return null;var _=[],j,N;if(Array.isArray(S)){var A=ome(S,2);j=A[0],N=A[1]}else j=N=S;if(a==="vertical"){var E=d.scale,C=x+i,P=C+s,T=C-s,$=E(b-j),O=E(b+N);_.push({x1:O,y1:P,x2:O,y2:T}),_.push({x1:$,y1:C,x2:O,y2:C}),_.push({x1:$,y1:P,x2:$,y2:T})}else if(a==="horizontal"){var R=f.scale,M=y+i,F=M-s,D=M+s,I=R(b-j),L=R(b+N);_.push({x1:F,y1:L,x2:D,y2:L}),_.push({x1:M,y1:I,x2:M,y2:L}),_.push({x1:F,y1:I,x2:D,y2:I})}return k.createElement(Le,fg({className:"recharts-errorBar",key:"bar-".concat(_.map(function(W){return"".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))},p),_.map(function(W){return k.createElement("line",fg({},W,{key:"line-".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))}))});return k.createElement(Le,{className:"recharts-errorBars"},g)}}])}(k.Component);GR(Sh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});GR(Sh,"displayName","ErrorBar");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 LA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LA(Object(r),!0).forEach(function(n){_me(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _me(e,t,r){return t=Sme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sme(e){var t=jme(e,"string");return Tf(t)=="symbol"?t:t+""}function jme(e,t){if(Tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XR=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,s=Qr(r,Ss);if(!s)return null;var o=Ss.defaultProps,l=o!==void 0?Vs(Vs({},o),s.props):{},c;return s.props&&s.props.payload?c=s.props&&s.props.payload:a==="children"?c=(n||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(m){return{type:s.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):c=(n||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?Vs(Vs({},h),f.props):{},g=p.dataKey,m=p.name,v=p.legendType,y=p.hide;return{inactive:y,dataKey:g,type:l.iconType||v||"square",color:hj(f),value:m||g,payload:p}}),Vs(Vs(Vs({},l),Ss.getWithHeight(s,i)),{},{payload:c,item:s})};function Cf(e){"@babel/helpers - typeof";return Cf=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},Cf(e)}function FA(e){return Ame(e)||Ome(e)||Eme(e)||Nme()}function Nme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eme(e,t){if(e){if(typeof e=="string")return zw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zw(e,t)}}function Ome(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ame(e){if(Array.isArray(e))return zw(e)}function zw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(r),!0).forEach(function(n){ic(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ic(e,t,r){return t=kme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kme(e){var t=Pme(e,"string");return Cf(t)=="symbol"?t:t+""}function Pme(e,t){if(Cf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kt(e,t,r){return Ee(e)||Ee(t)?r:Gt(t)?an(e,t,r):Se(t)?t(e):r}function Rd(e,t,r,n){var i=Ope(e,function(o){return kt(o,t)});if(r==="number"){var a=i.filter(function(o){return J(o)||parseFloat(o)});return a.length?[fv(a),os(a)]:[1/0,-1/0]}var s=n?i.filter(function(o){return!Ee(o)}):i;return s.map(function(o){return Gt(o)||o instanceof Date?o:""})}var Tme=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,o=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(o<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,c=0;c<o;c++){var d=c>0?i[c-1].coordinate:i[o-1].coordinate,f=i[c].coordinate,h=c>=o-1?i[0].coordinate:i[c+1].coordinate,p=void 0;if(Or(f-d)!==Or(h-f)){var g=[];if(Or(h-f)===Or(l[1]-l[0])){p=h;var m=f+l[1]-l[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var v=h+l[1]-l[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var y=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>y[0]&&t<=y[1]||t>=g[0]&&t<=g[1]){s=i[c].index;break}}else{var x=Math.min(d,h),b=Math.max(d,h);if(t>(x+f)/2&&t<=(b+f)/2){s=i[c].index;break}}}else for(var S=0;S<o;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<o-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===o-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){s=n[S].index;break}return s},hj=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,s=a.stroke,o=a.fill,l;switch(i){case"Line":l=s;break;case"Area":case"Radar":l=s&&s!=="none"?s:o;break;default:l=o;break}return l},Cme=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},o=Object.keys(a),l=0,c=o.length;l<c;l++)for(var d=a[o[l]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],m=g.items,v=g.cateAxisId,y=m.filter(function(N){return aa(N.type).indexOf("Bar")>=0});if(y&&y.length){var x=y[0].type.defaultProps,b=x!==void 0?Et(Et({},x),y[0].props):y[0].props,S=b.barSize,_=b[v];s[_]||(s[_]=[]);var j=Ee(S)?r:S;s[_].push({item:y[0],stackList:y.slice(1),barSize:Ee(j)?void 0:Ar(j,n,0)})}}return s},$me=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,s=a===void 0?[]:a,o=t.maxBarSize,l=s.length;if(l<1)return null;var c=Ar(r,i,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=i/l,g=s.reduce(function(S,_){return S+_.barSize||0},0);g+=(l-1)*c,g>=i&&(g-=(l-1)*c,c=0),g>=i&&p>0&&(h=!0,p*=.9,g=l*p);var m=(i-g)/2>>0,v={offset:m-c,size:0};d=s.reduce(function(S,_){var j={item:_.item,position:{offset:v.offset+v.size+c,size:h?p:_.barSize}},N=[].concat(FA(S),[j]);return v=N[N.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(A){N.push({item:A,position:v})}),N},f)}else{var y=Ar(n,i,0,!0);i-2*y-(l-1)*c<=0&&(c=0);var x=(i-2*y-(l-1)*c)/l;x>1&&(x>>=0);var b=o===+o?Math.min(x,o):x;d=s.reduce(function(S,_,j){var N=[].concat(FA(S),[{item:_.item,position:{offset:y+(x+c)*j+(x-b)/2,size:b}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(A){N.push({item:A,position:N[N.length-1].position})}),N},f)}return d},Mme=function(t,r,n,i){var a=n.children,s=n.width,o=n.margin,l=s-(o.left||0)-(o.right||0),c=XR({children:a,legendWidth:l});if(c){var d=i||{},f=d.width,h=d.height,p=c.align,g=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&J(t[p]))return Et(Et({},t),{},ic({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&J(t[g]))return Et(Et({},t),{},ic({},g,t[g]+(h||0)))}return t},Rme=function(t,r,n){return Ee(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},ZR=function(t,r,n,i,a){var s=r.props.children,o=sn(s,Sh).filter(function(c){return Rme(i,a,c.props.direction)});if(o&&o.length){var l=o.map(function(c){return c.props.dataKey});return t.reduce(function(c,d){var f=kt(d,n);if(Ee(f))return c;var h=Array.isArray(f)?[fv(f),os(f)]:[f,f],p=l.reduce(function(g,m){var v=kt(d,m,0),y=h[0]-Math.abs(Array.isArray(v)?v[0]:v),x=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(y,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},Ime=function(t,r,n,i,a){var s=r.map(function(o){return ZR(t,o,n,a,i)}).filter(function(o){return!Ee(o)});return s&&s.length?s.reduce(function(o,l){return[Math.min(o[0],l[0]),Math.max(o[1],l[1])]},[1/0,-1/0]):null},QR=function(t,r,n,i,a){var s=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&ZR(t,l,c,i)||Rd(t,c,n,a)});if(n==="number")return s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var o={};return s.reduce(function(l,c){for(var d=0,f=c.length;d<f;d++)o[c[d]]||(o[c[d]]=!0,l.push(c[d]));return l},[])},JR=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},eI=function(t,r,n,i){if(i)return t.map(function(l){return l.coordinate});var a,s,o=t.map(function(l){return l.coordinate===r&&(a=!0),l.coordinate===n&&(s=!0),l.coordinate});return a||o.push(r),s||o.push(n),o},ea=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,s=t.type,o=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(r||n)&&s==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?Or(o[0]-o[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+c,value:f,offset:c}});return d.filter(function(f){return!wu(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+c,value:f,index:h,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+c,value:f,offset:c}}):i.domain().map(function(f,h){return{coordinate:i(f)+c,value:a?a[f]:f,index:h,offset:c}})},Q0=new WeakMap,fp=function(t,r){if(typeof r!="function")return t;Q0.has(t)||Q0.set(t,new WeakMap);var n=Q0.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},tI=function(t,r,n){var i=t.scale,a=t.type,s=t.layout,o=t.axisType;if(i==="auto")return s==="radial"&&o==="radiusAxis"?{scale:Of(),realScaleType:"band"}:s==="radial"&&o==="angleAxis"?{scale:og(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Md(),realScaleType:"point"}:a==="category"?{scale:Of(),realScaleType:"band"}:{scale:og(),realScaleType:"linear"};if(Zo(i)){var l="scale".concat(Zy(i));return{scale:($A[l]||Md)(),realScaleType:$A[l]?l:"point"}}return Se(i)?{scale:i}:{scale:Md(),realScaleType:"point"}},zA=1e-4,rI=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-zA,s=Math.max(i[0],i[1])+zA,o=t(r[0]),l=t(r[n-1]);(o<a||o>s||l<a||l>s)&&t.domain([r[0],r[n-1]])}},Dme=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},Lme=function(t,r){if(!r||r.length!==2||!J(r[0])||!J(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!J(t[0])||t[0]<n)&&(a[0]=n),(!J(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Fme=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,s=0,o=0;o<r;++o){var l=wu(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=s,t[o][n][1]=s+l,s=t[o][n][1])}},Bme=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,s=0;s<r;++s){var o=wu(t[s][n][1])?t[s][n][0]:t[s][n][1];o>=0?(t[s][n][0]=a,t[s][n][1]=a+o,a=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},zme={sign:Fme,expand:Pre,none:Ac,silhouette:Tre,wiggle:Cre,positive:Bme},Ume=function(t,r,n){var i=r.map(function(o){return o.props.dataKey}),a=zme[n],s=kre().keys(i).value(function(o,l){return+kt(o,l,0)}).order(pw).offset(a);return s(t)},Wme=function(t,r,n,i,a,s){if(!t)return null;var o=s?r.reverse():r,l={},c=o.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Et(Et({},h.type.defaultProps),h.props):h.props,m=g.stackId,v=g.hide;if(v)return f;var y=g[n],x=f[y]||{hasStack:!1,stackGroups:{}};if(Gt(m)){var b=x.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};b.items.push(h),x.hasStack=!0,x.stackGroups[m]=b}else x.stackGroups[cl("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return Et(Et({},f),{},ic({},y,x))},l),d={};return Object.keys(c).reduce(function(f,h){var p=c[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var y=p.stackGroups[v];return Et(Et({},m),{},ic({},v,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:Ume(t,y.items,a)}))},g)}return Et(Et({},f),{},ic({},h,p))},d)},nI=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,o=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var c=t.domain();if(!c.length)return null;var d=nme(c,a,o);return t.domain([fv(d),os(d)]),{niceTicks:d}}if(a&&i==="number"){var f=t.domain(),h=ime(f,a,o);return{niceTicks:h}}return null};function pg(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ee(i[t.dataKey])){var o=Wm(r,"value",i[t.dataKey]);if(o)return o.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=kt(i,Ee(s)?t.dataKey:s);return Ee(l)?null:t.scale(l)}var UA=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,s=t.entry,o=t.index;if(r.type==="category")return n[o]?n[o].coordinate+i:null;var l=kt(s,r.dataKey,r.domain[o]);return Ee(l)?null:r.scale(l)-a/2+i},Vme=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Hme=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Gt(a)){var s=r[a];if(s){var o=s.items.indexOf(t);return o>=0?s.stackedData[o]:null}}return null},qme=function(t){return t.reduce(function(r,n){return[fv(n.concat([r[0]]).filter(J)),os(n.concat([r[1]]).filter(J))]},[1/0,-1/0])},iI=function(t,r,n){return Object.keys(t).reduce(function(i,a){var s=t[a],o=s.stackedData,l=o.reduce(function(c,d){var f=qme(d.slice(r,n+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},WA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,VA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Uw=function(t,r,n){if(Se(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(J(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(WA.test(t[0])){var a=+WA.exec(t[0])[1];i[0]=r[0]-a}else Se(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(J(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(VA.test(t[1])){var s=+VA.exec(t[1])[1];i[1]=r[1]+s}else Se(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},mg=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=VS(r,function(f){return f.coordinate}),s=1/0,o=1,l=a.length;o<l;o++){var c=a[o],d=a[o-1];s=Math.min((c.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},HA=function(t,r,n){return!t||!t.length||el(t,an(n,"type.defaultProps.domain"))?r:t},aI=function(t,r){var n=t.type.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,s=n.unit,o=n.formatter,l=n.tooltipType,c=n.chartType,d=n.hide;return Et(Et({},ye(t,!1)),{},{dataKey:i,unit:s,formatter:o,name:a||i,color:hj(t),value:kt(r,i),type:l,payload:r,chartType:c,hide:d})};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)}function qA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qA(Object(r),!0).forEach(function(n){sI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sI(e,t,r){return t=Kme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kme(e){var t=Gme(e,"string");return $f(t)=="symbol"?t:t+""}function Gme(e,t){if($f(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yme(e,t){return Jme(e)||Qme(e,t)||Zme(e,t)||Xme()}function Xme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zme(e,t){if(e){if(typeof e=="string")return KA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KA(e,t)}}function KA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qme(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function Jme(e){if(Array.isArray(e))return e}var gg=Math.PI/180,ege=function(t){return t*180/Math.PI},ct=function(t,r,n,i){return{x:t+Math.cos(-gg*i)*n,y:r+Math.sin(-gg*i)*n}},oI=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},tge=function(t,r,n,i,a){var s=t.width,o=t.height,l=t.startAngle,c=t.endAngle,d=Ar(t.cx,s,s/2),f=Ar(t.cy,o,o/2),h=oI(s,o,n),p=Ar(t.innerRadius,h,0),g=Ar(t.outerRadius,h,h*.8),m=Object.keys(r);return m.reduce(function(v,y){var x=r[y],b=x.domain,S=x.reversed,_;if(Ee(x.range))i==="angleAxis"?_=[l,c]:i==="radiusAxis"&&(_=[p,g]),S&&(_=[_[1],_[0]]);else{_=x.range;var j=_,N=Yme(j,2);l=N[0],c=N[1]}var A=tI(x,a),E=A.realScaleType,C=A.scale;C.domain(b).range(_),rI(C);var P=nI(C,Hi(Hi({},x),{},{realScaleType:E})),T=Hi(Hi(Hi({},x),P),{},{range:_,radius:g,realScaleType:E,scale:C,cx:d,cy:f,innerRadius:p,outerRadius:g,startAngle:l,endAngle:c});return Hi(Hi({},v),{},sI({},y,T))},{})},rge=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},nge=function(t,r){var n=t.x,i=t.y,a=r.cx,s=r.cy,o=rge({x:n,y:i},{x:a,y:s});if(o<=0)return{radius:o};var l=(n-a)/o,c=Math.acos(l);return i>s&&(c=2*Math.PI-c),{radius:o,angle:ege(c),angleInRadian:c}},ige=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},age=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),o=Math.min(a,s);return t+o*360},GA=function(t,r){var n=t.x,i=t.y,a=nge({x:n,y:i},r),s=a.radius,o=a.angle,l=r.innerRadius,c=r.outerRadius;if(s<l||s>c)return!1;if(s===0)return!0;var d=ige(r),f=d.startAngle,h=d.endAngle,p=o,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?Hi(Hi({},r),{},{radius:s,angle:age(p,r)}):null},lI=function(t){return!w.isValidElement(t)&&!Se(t)&&typeof t!="boolean"?t.className:""};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)}var sge=["offset"];function oge(e){return dge(e)||uge(e)||cge(e)||lge()}function lge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cge(e,t){if(e){if(typeof e=="string")return Ww(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ww(e,t)}}function uge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dge(e){if(Array.isArray(e))return Ww(e)}function Ww(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fge(e,t){if(e==null)return{};var r=hge(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hge(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function YA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YA(Object(r),!0).forEach(function(n){pge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pge(e,t,r){return t=mge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mge(e){var t=gge(e,"string");return Mf(t)=="symbol"?t:t+""}function gge(e,t){if(Mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rf(){return Rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rf.apply(this,arguments)}var yge=function(t){var r=t.value,n=t.formatter,i=Ee(t.children)?r:t.children;return Se(n)?n(i):i},vge=function(t,r){var n=Or(r-t),i=Math.min(Math.abs(r-t),360);return n*i},xge=function(t,r,n){var i=t.position,a=t.viewBox,s=t.offset,o=t.className,l=a,c=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,g=l.endAngle,m=l.clockWise,v=(f+h)/2,y=vge(p,g),x=y>=0?1:-1,b,S;i==="insideStart"?(b=p+x*s,S=m):i==="insideEnd"?(b=g-x*s,S=!m):i==="end"&&(b=g+x*s,S=m),S=y<=0?S:!S;var _=ct(c,d,v,b),j=ct(c,d,v,b+(S?1:-1)*359),N="M".concat(_.x,",").concat(_.y,`
|
||
A`).concat(v,",").concat(v,",0,1,").concat(S?0:1,`,
|
||
`).concat(j.x,",").concat(j.y),A=Ee(t.id)?cl("recharts-radial-line-"):t.id;return k.createElement("text",Rf({},n,{dominantBaseline:"central",className:Te("recharts-radial-bar-label",o)}),k.createElement("defs",null,k.createElement("path",{id:A,d:N})),k.createElement("textPath",{xlinkHref:"#".concat(A)},r))},bge=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,s=a.cx,o=a.cy,l=a.innerRadius,c=a.outerRadius,d=a.startAngle,f=a.endAngle,h=(d+f)/2;if(i==="outside"){var p=ct(s,o,c+n,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,y=ct(s,o,v,h),x=y.x,b=y.y;return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},wge=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,s=r,o=s.x,l=s.y,c=s.width,d=s.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",g=f>0?"start":"end",m=c>=0?1:-1,v=m*i,y=m>0?"end":"start",x=m>0?"start":"end";if(a==="top"){var b={x:o+c/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return Wt(Wt({},b),n?{height:Math.max(l-n.y,0),width:c}:{})}if(a==="bottom"){var S={x:o+c/2,y:l+d+h,textAnchor:"middle",verticalAnchor:g};return Wt(Wt({},S),n?{height:Math.max(n.y+n.height-(l+d),0),width:c}:{})}if(a==="left"){var _={x:o-v,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return Wt(Wt({},_),n?{width:Math.max(_.x-n.x,0),height:d}:{})}if(a==="right"){var j={x:o+c+v,y:l+d/2,textAnchor:x,verticalAnchor:"middle"};return Wt(Wt({},j),n?{width:Math.max(n.x+n.width-j.x,0),height:d}:{})}var N=n?{width:c,height:d}:{};return a==="insideLeft"?Wt({x:o+v,y:l+d/2,textAnchor:x,verticalAnchor:"middle"},N):a==="insideRight"?Wt({x:o+c-v,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},N):a==="insideTop"?Wt({x:o+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},N):a==="insideBottom"?Wt({x:o+c/2,y:l+d-h,textAnchor:"middle",verticalAnchor:p},N):a==="insideTopLeft"?Wt({x:o+v,y:l+h,textAnchor:x,verticalAnchor:g},N):a==="insideTopRight"?Wt({x:o+c-v,y:l+h,textAnchor:y,verticalAnchor:g},N):a==="insideBottomLeft"?Wt({x:o+v,y:l+d-h,textAnchor:x,verticalAnchor:p},N):a==="insideBottomRight"?Wt({x:o+c-v,y:l+d-h,textAnchor:y,verticalAnchor:p},N):yu(a)&&(J(a.x)||fo(a.x))&&(J(a.y)||fo(a.y))?Wt({x:o+Ar(a.x,c),y:l+Ar(a.y,d),textAnchor:"end",verticalAnchor:"end"},N):Wt({x:o+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},N)},_ge=function(t){return"cx"in t&&J(t.cx)};function er(e){var t=e.offset,r=t===void 0?5:t,n=fge(e,sge),i=Wt({offset:r},n),a=i.viewBox,s=i.position,o=i.value,l=i.children,c=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!a||Ee(o)&&Ee(l)&&!w.isValidElement(c)&&!Se(c))return null;if(w.isValidElement(c))return w.cloneElement(c,i);var p;if(Se(c)){if(p=w.createElement(c,i),w.isValidElement(p))return p}else p=yge(i);var g=_ge(a),m=ye(i,!0);if(g&&(s==="insideStart"||s==="insideEnd"||s==="end"))return xge(i,p,m);var v=g?bge(i):wge(i);return k.createElement(Jo,Rf({className:Te("recharts-label",f)},m,v,{breakAll:h}),p)}er.displayName="Label";var cI=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,s=t.endAngle,o=t.r,l=t.radius,c=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,m=t.width,v=t.height,y=t.clockWise,x=t.labelViewBox;if(x)return x;if(J(m)&&J(v)){if(J(f)&&J(h))return{x:f,y:h,width:m,height:v};if(J(p)&&J(g))return{x:p,y:g,width:m,height:v}}return J(f)&&J(h)?{x:f,y:h,width:0,height:0}:J(r)&&J(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:c||0,outerRadius:d||l||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},Sge=function(t,r){return t?t===!0?k.createElement(er,{key:"label-implicit",viewBox:r}):Gt(t)?k.createElement(er,{key:"label-implicit",viewBox:r,value:t}):w.isValidElement(t)?t.type===er?w.cloneElement(t,{key:"label-implicit",viewBox:r}):k.createElement(er,{key:"label-implicit",content:t,viewBox:r}):Se(t)?k.createElement(er,{key:"label-implicit",content:t,viewBox:r}):yu(t)?k.createElement(er,Rf({viewBox:r},t,{key:"label-implicit"})):null:null},jge=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=cI(t),s=sn(i,er).map(function(l,c){return w.cloneElement(l,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return s;var o=Sge(t.label,r||a);return[o].concat(oge(s))};er.parseViewBox=cI;er.renderCallByParent=jge;function Nge(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ege=Nge;const Oge=Xe(Ege);function If(e){"@babel/helpers - typeof";return If=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},If(e)}var Age=["valueAccessor"],kge=["data","dataKey","clockWise","id","textBreakAll"];function Pge(e){return Mge(e)||$ge(e)||Cge(e)||Tge()}function Tge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cge(e,t){if(e){if(typeof e=="string")return Vw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vw(e,t)}}function $ge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mge(e){if(Array.isArray(e))return Vw(e)}function Vw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yg.apply(this,arguments)}function XA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XA(Object(r),!0).forEach(function(n){Rge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rge(e,t,r){return t=Ige(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ige(e){var t=Dge(e,"string");return If(t)=="symbol"?t:t+""}function Dge(e,t){if(If(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(If(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QA(e,t){if(e==null)return{};var r=Lge(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lge(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Fge=function(t){return Array.isArray(t.value)?Oge(t.value):t.value};function ki(e){var t=e.valueAccessor,r=t===void 0?Fge:t,n=QA(e,Age),i=n.data,a=n.dataKey,s=n.clockWise,o=n.id,l=n.textBreakAll,c=QA(n,kge);return!i||!i.length?null:k.createElement(Le,{className:"recharts-label-list"},i.map(function(d,f){var h=Ee(a)?r(d,f):kt(d&&d.payload,a),p=Ee(o)?{}:{id:"".concat(o,"-").concat(f)};return k.createElement(er,yg({},ye(d,!0),c,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:l,viewBox:er.parseViewBox(Ee(s)?d:ZA(ZA({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}ki.displayName="LabelList";function Bge(e,t){return e?e===!0?k.createElement(ki,{key:"labelList-implicit",data:t}):k.isValidElement(e)||Se(e)?k.createElement(ki,{key:"labelList-implicit",data:t,content:e}):yu(e)?k.createElement(ki,yg({data:t},e,{key:"labelList-implicit"})):null:null}function zge(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=sn(n,ki).map(function(s,o){return w.cloneElement(s,{data:t,key:"labelList-".concat(o)})});if(!r)return i;var a=Bge(e.label,t);return[a].concat(Pge(i))}ki.renderCallByParent=zge;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 Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hw.apply(this,arguments)}function JA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ek(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JA(Object(r),!0).forEach(function(n){Uge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uge(e,t,r){return t=Wge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wge(e){var t=Vge(e,"string");return Df(t)=="symbol"?t:t+""}function Vge(e,t){if(Df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hge=function(t,r){var n=Or(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},hp=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,s=t.sign,o=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,d=l*(o?1:-1)+i,f=Math.asin(l/d)/gg,h=c?a:a+s*f,p=ct(r,n,d,h),g=ct(r,n,i,h),m=c?a-s*f:a,v=ct(r,n,d*Math.cos(f*gg),m);return{center:p,circleTangency:g,lineTangency:v,theta:f}},uI=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.startAngle,o=t.endAngle,l=Hge(s,o),c=s+l,d=ct(r,n,a,s),f=ct(r,n,a,c),h="M ".concat(d.x,",").concat(d.y,`
|
||
A `).concat(a,",").concat(a,`,0,
|
||
`).concat(+(Math.abs(l)>180),",").concat(+(s>c),`,
|
||
`).concat(f.x,",").concat(f.y,`
|
||
`);if(i>0){var p=ct(r,n,i,s),g=ct(r,n,i,c);h+="L ".concat(g.x,",").concat(g.y,`
|
||
A `).concat(i,",").concat(i,`,0,
|
||
`).concat(+(Math.abs(l)>180),",").concat(+(s<=c),`,
|
||
`).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},qge=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,o=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,f=Or(d-c),h=hp({cx:r,cy:n,radius:a,angle:c,sign:f,cornerRadius:s,cornerIsExternal:l}),p=h.circleTangency,g=h.lineTangency,m=h.theta,v=hp({cx:r,cy:n,radius:a,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:l}),y=v.circleTangency,x=v.lineTangency,b=v.theta,S=l?Math.abs(c-d):Math.abs(c-d)-m-b;if(S<0)return o?"M ".concat(g.x,",").concat(g.y,`
|
||
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
|
||
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
|
||
`):uI({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d});var _="M ".concat(g.x,",").concat(g.y,`
|
||
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
|
||
A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,`
|
||
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
|
||
`);if(i>0){var j=hp({cx:r,cy:n,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),N=j.circleTangency,A=j.lineTangency,E=j.theta,C=hp({cx:r,cy:n,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),P=C.circleTangency,T=C.lineTangency,$=C.theta,O=l?Math.abs(c-d):Math.abs(c-d)-E-$;if(O<0&&s===0)return"".concat(_,"L").concat(r,",").concat(n,"Z");_+="L".concat(T.x,",").concat(T.y,`
|
||
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(O>180),",").concat(+(f>0),",").concat(N.x,",").concat(N.y,`
|
||
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(A.x,",").concat(A.y,"Z")}else _+="L".concat(r,",").concat(n,"Z");return _},Kge={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},dI=function(t){var r=ek(ek({},Kge),t),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,o=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(s<a||d===f)return null;var p=Te("recharts-sector",h),g=s-a,m=Ar(o,g,0,!0),v;return m>0&&Math.abs(d-f)<360?v=qge({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:f}):v=uI({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:d,endAngle:f}),k.createElement("path",Hw({},ye(r,!0),{className:p,d:v,role:"img"}))};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 qw(){return qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qw.apply(this,arguments)}function tk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(r),!0).forEach(function(n){Gge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gge(e,t,r){return t=Yge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yge(e){var t=Xge(e,"string");return Lf(t)=="symbol"?t:t+""}function Xge(e,t){if(Lf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nk={curveBasisClosed:vre,curveBasisOpen:xre,curveBasis:yre,curveBumpX:nre,curveBumpY:ire,curveLinearClosed:bre,curveLinear:Jy,curveMonotoneX:wre,curveMonotoneY:_re,curveNatural:Sre,curveStep:jre,curveStepAfter:Ere,curveStepBefore:Nre},pp=function(t){return t.x===+t.x&&t.y===+t.y},td=function(t){return t.x},rd=function(t){return t.y},Zge=function(t,r){if(Se(t))return t;var n="curve".concat(Zy(t));return(n==="curveMonotone"||n==="curveBump")&&r?nk["".concat(n).concat(r==="vertical"?"Y":"X")]:nk[n]||Jy},Qge=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,s=t.baseLine,o=t.layout,l=t.connectNulls,c=l===void 0?!1:l,d=Zge(n,o),f=c?a.filter(function(m){return pp(m)}):a,h;if(Array.isArray(s)){var p=c?s.filter(function(m){return pp(m)}):s,g=f.map(function(m,v){return rk(rk({},m),{},{base:p[v]})});return o==="vertical"?h=sp().y(rd).x1(td).x0(function(m){return m.base.x}):h=sp().x(td).y1(rd).y0(function(m){return m.base.y}),h.defined(pp).curve(d),h(g)}return o==="vertical"&&J(s)?h=sp().y(rd).x1(td).x0(s):J(s)?h=sp().x(td).y1(rd).y0(s):h=l4().x(td).y(rd),h.defined(pp).curve(d),h(f)},Mo=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var s=n&&n.length?Qge(t):i;return w.createElement("path",qw({},ye(t,!1),Vm(t),{className:Te("recharts-curve",r),d:s,ref:a}))},fI={exports:{}},Jge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",eye=Jge,tye=eye;function hI(){}function pI(){}pI.resetWarningCache=hI;var rye=function(){function e(n,i,a,s,o,l){if(l!==tye){var c=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 c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:pI,resetWarningCache:hI};return r.PropTypes=r,r};fI.exports=rye();var nye=fI.exports;const Ge=Xe(nye);var iye=Object.getOwnPropertyNames,aye=Object.getOwnPropertySymbols,sye=Object.prototype.hasOwnProperty;function ik(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function mp(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,s=a.get(r),o=a.get(n);if(s&&o)return s===n&&o===r;a.set(r,n),a.set(n,r);var l=e(r,n,i);return a.delete(r),a.delete(n),l}}function ak(e){return iye(e).concat(aye(e))}var oye=Object.hasOwn||function(e,t){return sye.call(e,t)};function fl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var lye="__v",cye="__o",uye="_owner",sk=Object.getOwnPropertyDescriptor,ok=Object.keys;function dye(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function fye(e,t){return fl(e.getTime(),t.getTime())}function hye(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function pye(e,t){return e===t}function lk(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),s,o,l=0;(s=a.next())&&!s.done;){for(var c=t.entries(),d=!1,f=0;(o=c.next())&&!o.done;){if(i[f]){f++;continue}var h=s.value,p=o.value;if(r.equals(h[0],p[0],l,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){d=i[f]=!0;break}f++}if(!d)return!1;l++}return!0}var mye=fl;function gye(e,t,r){var n=ok(e),i=n.length;if(ok(t).length!==i)return!1;for(;i-- >0;)if(!mI(e,t,r,n[i]))return!1;return!0}function nd(e,t,r){var n=ak(e),i=n.length;if(ak(t).length!==i)return!1;for(var a,s,o;i-- >0;)if(a=n[i],!mI(e,t,r,a)||(s=sk(e,a),o=sk(t,a),(s||o)&&(!s||!o||s.configurable!==o.configurable||s.enumerable!==o.enumerable||s.writable!==o.writable)))return!1;return!0}function yye(e,t){return fl(e.valueOf(),t.valueOf())}function vye(e,t){return e.source===t.source&&e.flags===t.flags}function ck(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),s,o;(s=a.next())&&!s.done;){for(var l=t.values(),c=!1,d=0;(o=l.next())&&!o.done;){if(!i[d]&&r.equals(s.value,o.value,s.value,o.value,e,t,r)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function xye(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function bye(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 mI(e,t,r,n){return(n===uye||n===cye||n===lye)&&(e.$$typeof||t.$$typeof)?!0:oye(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var wye="[object Arguments]",_ye="[object Boolean]",Sye="[object Date]",jye="[object Error]",Nye="[object Map]",Eye="[object Number]",Oye="[object Object]",Aye="[object RegExp]",kye="[object Set]",Pye="[object String]",Tye="[object URL]",Cye=Array.isArray,uk=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,dk=Object.assign,$ye=Object.prototype.toString.call.bind(Object.prototype.toString);function Mye(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,s=e.areNumbersEqual,o=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(g,m,v){if(g===m)return!0;if(g==null||m==null)return!1;var y=typeof g;if(y!==typeof m)return!1;if(y!=="object")return y==="number"?s(g,m,v):y==="function"?i(g,m,v):!1;var x=g.constructor;if(x!==m.constructor)return!1;if(x===Object)return o(g,m,v);if(Cye(g))return t(g,m,v);if(uk!=null&&uk(g))return f(g,m,v);if(x===Date)return r(g,m,v);if(x===RegExp)return c(g,m,v);if(x===Map)return a(g,m,v);if(x===Set)return d(g,m,v);var b=$ye(g);return b===Sye?r(g,m,v):b===Aye?c(g,m,v):b===Nye?a(g,m,v):b===kye?d(g,m,v):b===Oye?typeof g.then!="function"&&typeof m.then!="function"&&o(g,m,v):b===Tye?h(g,m,v):b===jye?n(g,m,v):b===wye?o(g,m,v):b===_ye||b===Eye||b===Pye?l(g,m,v):!1}}function Rye(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?nd:dye,areDatesEqual:fye,areErrorsEqual:hye,areFunctionsEqual:pye,areMapsEqual:n?ik(lk,nd):lk,areNumbersEqual:mye,areObjectsEqual:n?nd:gye,arePrimitiveWrappersEqual:yye,areRegExpsEqual:vye,areSetsEqual:n?ik(ck,nd):ck,areTypedArraysEqual:n?nd:xye,areUrlsEqual:bye};if(r&&(i=dk({},i,r(i))),t){var a=mp(i.areArraysEqual),s=mp(i.areMapsEqual),o=mp(i.areObjectsEqual),l=mp(i.areSetsEqual);i=dk({},i,{areArraysEqual:a,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:l})}return i}function Iye(e){return function(t,r,n,i,a,s,o){return e(t,r,o)}}function Dye(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(l,c){var d=n(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return r(l,c,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(l,c){return r(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var s={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return r(l,c,s)}}var Lye=zs();zs({strict:!0});zs({circular:!0});zs({circular:!0,strict:!0});zs({createInternalComparator:function(){return fl}});zs({strict:!0,createInternalComparator:function(){return fl}});zs({circular:!0,createInternalComparator:function(){return fl}});zs({circular:!0,createInternalComparator:function(){return fl},strict:!0});function zs(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,s=a===void 0?!1:a,o=Rye(e),l=Mye(o),c=n?n(l):Iye(l);return Dye({circular:r,comparator:l,createState:i,equals:c,strict:s})}function Fye(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function fk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):Fye(i)};requestAnimationFrame(n)}function Kw(e){"@babel/helpers - typeof";return Kw=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},Kw(e)}function Bye(e){return Vye(e)||Wye(e)||Uye(e)||zye()}function zye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uye(e,t){if(e){if(typeof e=="string")return hk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vye(e){if(Array.isArray(e))return e}function Hye(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,o=Bye(s),l=o[0],c=o.slice(1);if(typeof l=="number"){fk(i.bind(null,c),l);return}i(l),fk(i.bind(null,c));return}Kw(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}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 pk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pk(Object(r),!0).forEach(function(n){gI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gI(e,t,r){return t=qye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qye(e){var t=Kye(e,"string");return Ff(t)==="symbol"?t:String(t)}function Kye(e,t){if(Ff(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ff(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gye=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},Yye=function(t){return t},Xye=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Id=function(t,r){return Object.keys(r).reduce(function(n,i){return mk(mk({},n),{},gI({},i,t(i,r[i])))},{})},gk=function(t,r,n){return t.map(function(i){return"".concat(Xye(i)," ").concat(r,"ms ").concat(n)}).join(",")};function Zye(e,t){return eve(e)||Jye(e,t)||yI(e,t)||Qye()}function Qye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function eve(e){if(Array.isArray(e))return e}function tve(e){return ive(e)||nve(e)||yI(e)||rve()}function rve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yI(e,t){if(e){if(typeof e=="string")return Gw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gw(e,t)}}function nve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ive(e){if(Array.isArray(e))return Gw(e)}function Gw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var vg=1e-4,vI=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},xI=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},yk=function(t,r){return function(n){var i=vI(t,r);return xI(i,n)}},ave=function(t,r){return function(n){var i=vI(t,r),a=[].concat(tve(i.map(function(s,o){return s*o}).slice(1)),[0]);return xI(a,n)}},vk=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],s=r[2],o=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,s=1,o=1;break;case"ease":i=.25,a=.1,s=.25,o=1;break;case"ease-in":i=.42,a=0,s=1,o=1;break;case"ease-out":i=.42,a=0,s=.58,o=1;break;case"ease-in-out":i=0,a=0,s=.58,o=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=Zye(c,4);i=d[0],a=d[1],s=d[2],o=d[3]}}}var f=yk(i,s),h=yk(a,o),p=ave(i,s),g=function(y){return y>1?1:y<0?0:y},m=function(y){for(var x=y>1?1:y,b=x,S=0;S<8;++S){var _=f(b)-x,j=p(b);if(Math.abs(_-x)<vg||j<vg)return h(b);b=g(b-_/j)}return h(b)};return m.isStepper=!1,m},sve=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,s=t.dt,o=s===void 0?17:s,l=function(d,f,h){var p=-(d-f)*n,g=h*a,m=h+(p-g)*o/1e3,v=h*o/1e3+d;return Math.abs(v-f)<vg&&Math.abs(m)<vg?[f,0]:[v,m]};return l.isStepper=!0,l.dt=o,l},ove=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return vk(i);case"spring":return sve();default:if(i.split("(")[0]==="cubic-bezier")return vk(i)}return typeof i=="function"?i:null};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 xk(e){return uve(e)||cve(e)||bI(e)||lve()}function lve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uve(e){if(Array.isArray(e))return Xw(e)}function bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bk(Object(r),!0).forEach(function(n){Yw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yw(e,t,r){return t=dve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dve(e){var t=fve(e,"string");return Bf(t)==="symbol"?t:String(t)}function fve(e,t){if(Bf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hve(e,t){return gve(e)||mve(e,t)||bI(e,t)||pve()}function pve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bI(e,t){if(e){if(typeof e=="string")return Xw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xw(e,t)}}function Xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function gve(e){if(Array.isArray(e))return e}var xg=function(t,r,n){return t+(r-t)*n},Zw=function(t){var r=t.from,n=t.to;return r!==n},yve=function e(t,r,n){var i=Id(function(a,s){if(Zw(s)){var o=t(s.from,s.to,s.velocity),l=hve(o,2),c=l[0],d=l[1];return or(or({},s),{},{from:c,velocity:d})}return s},r);return n<1?Id(function(a,s){return Zw(s)?or(or({},s),{},{velocity:xg(s.velocity,i[a].velocity,n),from:xg(s.from,i[a].from,n)}):s},r):e(t,i,n-1)};const vve=function(e,t,r,n,i){var a=Gye(e,t),s=a.reduce(function(v,y){return or(or({},v),{},Yw({},y,[e[y],t[y]]))},{}),o=a.reduce(function(v,y){return or(or({},v),{},Yw({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,c,d,f=function(){return null},h=function(){return Id(function(y,x){return x.from},o)},p=function(){return!Object.values(o).filter(Zw).length},g=function(y){c||(c=y);var x=y-c,b=x/r.dt;o=yve(r,o,b),i(or(or(or({},e),t),h())),c=y,p()||(l=requestAnimationFrame(f))},m=function(y){d||(d=y);var x=(y-d)/n,b=Id(function(_,j){return xg.apply(void 0,xk(j).concat([r(x)]))},s);if(i(or(or(or({},e),t),b)),x<1)l=requestAnimationFrame(f);else{var S=Id(function(_,j){return xg.apply(void 0,xk(j).concat([r(1)]))},s);i(or(or(or({},e),t),S))}};return f=r.isStepper?g:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};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)}var xve=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function bve(e,t){if(e==null)return{};var r=wve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wve(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function J0(e){return Nve(e)||jve(e)||Sve(e)||_ve()}function _ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sve(e,t){if(e){if(typeof e=="string")return Qw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qw(e,t)}}function jve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nve(e){if(Array.isArray(e))return Qw(e)}function Qw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wk(Object(r),!0).forEach(function(n){vd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vd(e,t,r){return t=wI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ove(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wI(n.key),n)}}function Ave(e,t,r){return t&&Ove(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wI(e){var t=kve(e,"string");return Dc(t)==="symbol"?t:String(t)}function kve(e,t){if(Dc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pve(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&&Jw(e,t)}function Jw(e,t){return Jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Jw(e,t)}function Tve(e){var t=Cve();return function(){var n=bg(e),i;if(t){var a=bg(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return e1(this,i)}}function e1(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 t1(e)}function t1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cve(){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 bg(e){return bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bg(e)}var ci=function(e){Pve(r,e);var t=Tve(r);function r(n,i){var a;Eve(this,r),a=t.call(this,n,i);var s=a.props,o=s.isActive,l=s.attributeName,c=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(t1(a)),a.changeStyle=a.changeStyle.bind(t1(a)),!o||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:d}),e1(a);if(f&&f.length)a.state={style:f[0].style};else if(c){if(typeof h=="function")return a.state={style:c},e1(a);a.state={style:l?vd({},l,c):c}}else a.state={style:{}};return a}return Ave(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,o=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,d=a.to,f=a.from,h=this.state.style;if(o){if(!s){var p={style:l?vd({},l,d):d};this.state&&h&&(l&&h[l]!==d||!l&&h!==d)&&this.setState(p);return}if(!(Lye(i.to,d)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||c?f:i.to;if(this.state&&h){var v={style:l?vd({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(v)}this.runAnimation(Bn(Bn({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,o=i.to,l=i.duration,c=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=vve(s,o,ove(c),l,this.changeStyle),g=function(){a.stopJSAnimation=p()};this.manager.start([h,d,g,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,o=i.begin,l=i.onAnimationStart,c=s[0],d=c.style,f=c.duration,h=f===void 0?0:f,p=function(m,v,y){if(y===0)return m;var x=v.duration,b=v.easing,S=b===void 0?"ease":b,_=v.style,j=v.properties,N=v.onAnimationEnd,A=y>0?s[y-1]:v,E=j||Object.keys(_);if(typeof S=="function"||S==="spring")return[].concat(J0(m),[a.runJSAnimation.bind(a,{from:A.style,to:_,duration:x,easing:S}),x]);var C=gk(E,x,S),P=Bn(Bn(Bn({},A.style),_),{},{transition:C});return[].concat(J0(m),[P,x,N]).filter(Yye)};return this.manager.start([l].concat(J0(s.reduce(p,[d,Math.max(h,o)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Hye());var a=i.begin,s=i.duration,o=i.attributeName,l=i.to,c=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=o?vd({},o,l):l,v=gk(Object.keys(m),s,c);g.start([d,a,Bn(Bn({},m),{},{transition:v}),s,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var o=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=bve(i,xve),c=w.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!o||c===0||s<=0)return a;var f=function(p){var g=p.props,m=g.style,v=m===void 0?{}:m,y=g.className,x=w.cloneElement(p,Bn(Bn({},l),{},{style:Bn(Bn({},v),d),className:y}));return x};return c===1?f(w.Children.only(a)):k.createElement("div",null,w.Children.map(a,function(h){return f(h)}))}}]),r}(w.PureComponent);ci.displayName="Animate";ci.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ci.propTypes={from:Ge.oneOfType([Ge.object,Ge.string]),to:Ge.oneOfType([Ge.object,Ge.string]),attributeName:Ge.string,duration:Ge.number,begin:Ge.number,easing:Ge.oneOfType([Ge.string,Ge.func]),steps:Ge.arrayOf(Ge.shape({duration:Ge.number.isRequired,style:Ge.object.isRequired,easing:Ge.oneOfType([Ge.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ge.func]),properties:Ge.arrayOf("string"),onAnimationEnd:Ge.func})),children:Ge.oneOfType([Ge.node,Ge.func]),isActive:Ge.bool,canBegin:Ge.bool,onAnimationEnd:Ge.func,shouldReAnimate:Ge.bool,onAnimationStart:Ge.func,onAnimationReStart:Ge.func};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 wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wg.apply(this,arguments)}function $ve(e,t){return Dve(e)||Ive(e,t)||Rve(e,t)||Mve()}function Mve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rve(e,t){if(e){if(typeof e=="string")return _k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _k(e,t)}}function _k(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ive(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function Dve(e){if(Array.isArray(e))return e}function Sk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sk(Object(r),!0).forEach(function(n){Lve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lve(e,t,r){return t=Fve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fve(e){var t=Bve(e,"string");return zf(t)=="symbol"?t:t+""}function Bve(e,t){if(zf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nk=function(t,r,n,i,a){var s=Math.min(Math.abs(n)/2,Math.abs(i)/2),o=i>=0?1:-1,l=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,d;if(s>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=a[h]>s?s:a[h];d="M".concat(t,",").concat(r+o*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(r)),d+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`,
|
||
`).concat(t+n,",").concat(r+o*f[1])),d+="L ".concat(t+n,",").concat(r+i-o*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`,
|
||
`).concat(t+n-l*f[2],",").concat(r+i)),d+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`,
|
||
`).concat(t,",").concat(r+i-o*f[3])),d+="Z"}else if(s>0&&a===+a&&a>0){var g=Math.min(s,a);d="M ".concat(t,",").concat(r+o*g,`
|
||
A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+l*g,",").concat(r,`
|
||
L `).concat(t+n-l*g,",").concat(r,`
|
||
A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+n,",").concat(r+o*g,`
|
||
L `).concat(t+n,",").concat(r+i-o*g,`
|
||
A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+n-l*g,",").concat(r+i,`
|
||
L `).concat(t+l*g,",").concat(r+i,`
|
||
A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(r+i-o*g," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return d},zve=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,s=r.y,o=r.width,l=r.height;if(Math.abs(o)>0&&Math.abs(l)>0){var c=Math.min(a,a+o),d=Math.max(a,a+o),f=Math.min(s,s+l),h=Math.max(s,s+l);return n>=c&&n<=d&&i>=f&&i<=h}return!1},Uve={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},pj=function(t){var r=jk(jk({},Uve),t),n=w.useRef(),i=w.useState(-1),a=$ve(i,2),s=a[0],o=a[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&o(S)}catch{}},[]);var l=r.x,c=r.y,d=r.width,f=r.height,h=r.radius,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,y=r.isAnimationActive,x=r.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||d===0||f===0)return null;var b=Te("recharts-rectangle",p);return x?k.createElement(ci,{canBegin:s>0,from:{width:d,height:f,x:l,y:c},to:{width:d,height:f,x:l,y:c},duration:m,animationEasing:g,isActive:x},function(S){var _=S.width,j=S.height,N=S.x,A=S.y;return k.createElement(ci,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:y,easing:g},k.createElement("path",wg({},ye(r,!0),{className:b,d:Nk(N,A,_,j,h),ref:n})))}):k.createElement("path",wg({},ye(r,!0),{className:b,d:Nk(l,c,d,f,h)}))},Wve=["points","className","baseLinePoints","connectNulls"];function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ul.apply(this,arguments)}function Vve(e,t){if(e==null)return{};var r=Hve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ek(e){return Yve(e)||Gve(e)||Kve(e)||qve()}function qve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
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 r1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r1(e,t)}}function Gve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yve(e){if(Array.isArray(e))return r1(e)}function r1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ok=function(t){return t&&t.x===+t.x&&t.y===+t.y},Xve=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Ok(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Ok(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Dd=function(t,r){var n=Xve(t);r&&(n=[n.reduce(function(a,s){return[].concat(Ek(a),Ek(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,o,l){return"".concat(s).concat(l===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},Zve=function(t,r,n){var i=Dd(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Dd(r.reverse(),n).slice(1))},Qve=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,s=Vve(t,Wve);if(!r||!r.length)return null;var o=Te("recharts-polygon",n);if(i&&i.length){var l=s.stroke&&s.stroke!=="none",c=Zve(r,i,a);return k.createElement("g",{className:o},k.createElement("path",Ul({},ye(s,!0),{fill:c.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:c})),l?k.createElement("path",Ul({},ye(s,!0),{fill:"none",d:Dd(r,a)})):null,l?k.createElement("path",Ul({},ye(s,!0),{fill:"none",d:Dd(i,a)})):null)}var d=Dd(r,a);return k.createElement("path",Ul({},ye(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:o,d}))};function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n1.apply(this,arguments)}var jh=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,s=Te("recharts-dot",a);return r===+r&&n===+n&&i===+i?w.createElement("circle",n1({},ye(t,!1),Vm(t),{className:s,cx:r,cy:n,r:i})):null};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 Jve=["x","y","top","left","width","height","className"];function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i1.apply(this,arguments)}function Ak(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e0e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ak(Object(r),!0).forEach(function(n){t0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ak(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t0e(e,t,r){return t=r0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r0e(e){var t=n0e(e,"string");return Uf(t)=="symbol"?t:t+""}function n0e(e,t){if(Uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i0e(e,t){if(e==null)return{};var r=a0e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a0e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var s0e=function(t,r,n,i,a,s){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},o0e=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.top,o=s===void 0?0:s,l=t.left,c=l===void 0?0:l,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,m=i0e(t,Jve),v=e0e({x:n,y:a,top:o,left:c,width:f,height:p},m);return!J(n)||!J(a)||!J(f)||!J(p)||!J(o)||!J(c)?null:k.createElement("path",i1({},ye(v,!0),{className:Te("recharts-cross",g),d:s0e(n,a,f,p,o,c)}))},l0e=dv,c0e=$R,u0e=Ii;function d0e(e,t){return e&&e.length?l0e(e,u0e(t),c0e):void 0}var f0e=d0e;const h0e=Xe(f0e);var p0e=dv,m0e=Ii,g0e=MR;function y0e(e,t){return e&&e.length?p0e(e,m0e(t),g0e):void 0}var v0e=y0e;const x0e=Xe(v0e);var b0e=["cx","cy","angle","ticks","axisLine"],w0e=["ticks","tick","angle","tickFormatter","stroke"];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 Ld(){return Ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ld.apply(this,arguments)}function kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(r),!0).forEach(function(n){mv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pk(e,t){if(e==null)return{};var r=_0e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _0e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function S0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SI(n.key),n)}}function j0e(e,t,r){return t&&Tk(e.prototype,t),r&&Tk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N0e(e,t,r){return t=_g(t),E0e(e,_I()?Reflect.construct(t,r||[],_g(e).constructor):t.apply(e,r))}function E0e(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 O0e(e)}function O0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_I=function(){return!!e})()}function _g(e){return _g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_g(e)}function A0e(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&&a1(e,t)}function a1(e,t){return a1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},a1(e,t)}function mv(e,t,r){return t=SI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SI(e){var t=k0e(e,"string");return Lc(t)=="symbol"?t:t+""}function k0e(e,t){if(Lc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gv=function(e){function t(){return S0e(this,t),N0e(this,t,arguments)}return A0e(t,e),j0e(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,s=a.angle,o=a.cx,l=a.cy;return ct(o,l,i,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,o=n.ticks,l=h0e(o,function(d){return d.coordinate||0}),c=x0e(o,function(d){return d.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,o=n.ticks,l=n.axisLine,c=Pk(n,b0e),d=o.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),f=ct(i,a,d[0],s),h=ct(i,a,d[1],s),p=Hs(Hs(Hs({},ye(c,!1)),{},{fill:"none"},ye(l,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return k.createElement("line",Ld({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,o=i.angle,l=i.tickFormatter,c=i.stroke,d=Pk(i,w0e),f=this.getTickTextAnchor(),h=ye(d,!1),p=ye(s,!1),g=a.map(function(m,v){var y=n.getTickValueCoord(m),x=Hs(Hs(Hs(Hs({textAnchor:f,transform:"rotate(".concat(90-o,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:c},p),{},{index:v},y),{},{payload:m});return k.createElement(Le,Ld({className:Te("recharts-polar-radius-axis-tick",lI(s)),key:"tick-".concat(m.coordinate)},Qo(n.props,m,v)),t.renderTickItem(s,x,l?l(m.value,v):m.value))});return k.createElement(Le,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,s=n.tick;return!i||!i.length?null:k.createElement(Le,{className:Te("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),er.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var s;return k.isValidElement(n)?s=k.cloneElement(n,i):Se(n)?s=n(i):s=k.createElement(Jo,Ld({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])}(w.PureComponent);mv(gv,"displayName","PolarRadiusAxis");mv(gv,"axisType","radiusAxis");mv(gv,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});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 no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},no.apply(this,arguments)}function Ck(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(r),!0).forEach(function(n){yv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ck(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,NI(n.key),n)}}function T0e(e,t,r){return t&&$k(e.prototype,t),r&&$k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function C0e(e,t,r){return t=Sg(t),$0e(e,jI()?Reflect.construct(t,r||[],Sg(e).constructor):t.apply(e,r))}function $0e(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 M0e(e)}function M0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jI=function(){return!!e})()}function Sg(e){return Sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sg(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&&s1(e,t)}function s1(e,t){return s1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},s1(e,t)}function yv(e,t,r){return t=NI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NI(e){var t=I0e(e,"string");return Fc(t)=="symbol"?t:t+""}function I0e(e,t){if(Fc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var D0e=Math.PI/180,Mk=1e-5,vv=function(e){function t(){return P0e(this,t),C0e(this,t,arguments)}return R0e(t,e),T0e(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,s=i.cy,o=i.radius,l=i.orientation,c=i.tickSize,d=c||8,f=ct(a,s,o,n.coordinate),h=ct(a,s,o+(l==="inner"?-1:1)*d,n.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*D0e),s;return a>Mk?s=i==="outer"?"start":"end":a<-Mk?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,o=n.axisLine,l=n.axisLineType,c=qs(qs({},ye(this.props,!1)),{},{fill:"none"},ye(o,!1));if(l==="circle")return k.createElement(jh,no({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:s}));var d=this.props.ticks,f=d.map(function(h){return ct(i,a,s,h.coordinate)});return k.createElement(Qve,no({className:"recharts-polar-angle-axis-line"},c,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,o=i.tickLine,l=i.tickFormatter,c=i.stroke,d=ye(this.props,!1),f=ye(s,!1),h=qs(qs({},d),{},{fill:"none"},ye(o,!1)),p=a.map(function(g,m){var v=n.getTickLineCoord(g),y=n.getTickTextAnchor(g),x=qs(qs(qs({textAnchor:y},d),{},{stroke:"none",fill:c},f),{},{index:m,payload:g,x:v.x2,y:v.y2});return k.createElement(Le,no({className:Te("recharts-polar-angle-axis-tick",lI(s)),key:"tick-".concat(g.coordinate)},Qo(n.props,g,m)),o&&k.createElement("line",no({className:"recharts-polar-angle-axis-tick-line"},h,v)),s&&t.renderTickItem(s,x,l?l(g.value,m):g.value))});return k.createElement(Le,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:k.createElement(Le,{className:Te("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return k.isValidElement(n)?s=k.cloneElement(n,i):Se(n)?s=n(i):s=k.createElement(Jo,no({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])}(w.PureComponent);yv(vv,"displayName","PolarAngleAxis");yv(vv,"axisType","angleAxis");yv(vv,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var L0e=C4,F0e=L0e(Object.getPrototypeOf,Object),B0e=F0e,z0e=Sa,U0e=B0e,W0e=ja,V0e="[object Object]",H0e=Function.prototype,q0e=Object.prototype,EI=H0e.toString,K0e=q0e.hasOwnProperty,G0e=EI.call(Object);function Y0e(e){if(!W0e(e)||z0e(e)!=V0e)return!1;var t=U0e(e);if(t===null)return!0;var r=K0e.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&EI.call(r)==G0e}var X0e=Y0e;const Z0e=Xe(X0e);var Q0e=Sa,J0e=ja,exe="[object Boolean]";function txe(e){return e===!0||e===!1||J0e(e)&&Q0e(e)==exe}var rxe=txe;const nxe=Xe(rxe);function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jg.apply(this,arguments)}function ixe(e,t){return lxe(e)||oxe(e,t)||sxe(e,t)||axe()}function axe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sxe(e,t){if(e){if(typeof e=="string")return Rk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rk(e,t)}}function Rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oxe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function lxe(e){if(Array.isArray(e))return e}function Ik(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ik(Object(r),!0).forEach(function(n){cxe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ik(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cxe(e,t,r){return t=uxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uxe(e){var t=dxe(e,"string");return Wf(t)=="symbol"?t:t+""}function dxe(e,t){if(Wf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lk=function(t,r,n,i,a){var s=n-i,o;return o="M ".concat(t,",").concat(r),o+="L ".concat(t+n,",").concat(r),o+="L ".concat(t+n-s/2,",").concat(r+a),o+="L ".concat(t+n-s/2-i,",").concat(r+a),o+="L ".concat(t,",").concat(r," Z"),o},fxe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},hxe=function(t){var r=Dk(Dk({},fxe),t),n=w.useRef(),i=w.useState(-1),a=ixe(i,2),s=a[0],o=a[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&o(b)}catch{}},[]);var l=r.x,c=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,y=r.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var x=Te("recharts-trapezoid",p);return y?k.createElement(ci,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:d,lowerWidth:f,height:h,x:l,y:c},duration:m,animationEasing:g,isActive:y},function(b){var S=b.upperWidth,_=b.lowerWidth,j=b.height,N=b.x,A=b.y;return k.createElement(ci,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},k.createElement("path",jg({},ye(r,!0),{className:x,d:Lk(N,A,S,_,j),ref:n})))}):k.createElement("g",null,k.createElement("path",jg({},ye(r,!0),{className:x,d:Lk(l,c,d,f,h)})))},pxe=["option","shapeType","propTransformer","activeClassName","isActive"];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 mxe(e,t){if(e==null)return{};var r=gxe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gxe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Fk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ng(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(r),!0).forEach(function(n){yxe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yxe(e,t,r){return t=vxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vxe(e){var t=xxe(e,"string");return Vf(t)=="symbol"?t:t+""}function xxe(e,t){if(Vf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bxe(e,t){return Ng(Ng({},t),e)}function wxe(e,t){return e==="symbols"}function Bk(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return k.createElement(pj,r);case"trapezoid":return k.createElement(hxe,r);case"sector":return k.createElement(dI,r);case"symbols":if(wxe(t))return k.createElement(IS,r);break;default:return null}}function _xe(e){return w.isValidElement(e)?e.props:e}function OI(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?bxe:n,a=e.activeClassName,s=a===void 0?"recharts-active-shape":a,o=e.isActive,l=mxe(e,pxe),c;if(w.isValidElement(t))c=w.cloneElement(t,Ng(Ng({},l),_xe(t)));else if(Se(t))c=t(l);else if(Z0e(t)&&!nxe(t)){var d=i(t,l);c=k.createElement(Bk,{shapeType:r,elementProps:d})}else{var f=l;c=k.createElement(Bk,{shapeType:r,elementProps:f})}return o?k.createElement(Le,{className:s},c):c}function xv(e,t){return t!=null&&"trapezoids"in e.props}function bv(e,t){return t!=null&&"sectors"in e.props}function Hf(e,t){return t!=null&&"points"in e.props}function Sxe(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function jxe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Nxe(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Exe(e,t){var r;return xv(e,t)?r=Sxe:bv(e,t)?r=jxe:Hf(e,t)&&(r=Nxe),r}function Oxe(e,t){var r;return xv(e,t)?r="trapezoids":bv(e,t)?r="sectors":Hf(e,t)&&(r="points"),r}function Axe(e,t){if(xv(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}if(bv(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}return Hf(e,t)?t.payload:{}}function kxe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=Oxe(r,t),a=Axe(r,t),s=n.filter(function(l,c){var d=el(a,l),f=r.props[i].filter(function(g){var m=Exe(r,t);return m(g,t)}),h=r.props[i].indexOf(f[f.length-1]),p=c===h;return d&&p}),o=n.indexOf(s[s.length-1]);return o}var Kp;function Bc(e){"@babel/helpers - typeof";return Bc=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},Bc(e)}function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wl.apply(this,arguments)}function zk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zk(Object(r),!0).forEach(function(n){Sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kI(n.key),n)}}function Txe(e,t,r){return t&&Uk(e.prototype,t),r&&Uk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cxe(e,t,r){return t=Eg(t),$xe(e,AI()?Reflect.construct(t,r||[],Eg(e).constructor):t.apply(e,r))}function $xe(e,t){if(t&&(Bc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mxe(e)}function Mxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AI=function(){return!!e})()}function Eg(e){return Eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Eg(e)}function Rxe(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&&o1(e,t)}function o1(e,t){return o1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},o1(e,t)}function Sn(e,t,r){return t=kI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kI(e){var t=Ixe(e,"string");return Bc(t)=="symbol"?t:t+""}function Ixe(e,t){if(Bc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ea=function(e){function t(r){var n;return Pxe(this,t),n=Cxe(this,t,[r]),Sn(n,"pieRef",null),Sn(n,"sectorRefs",[]),Sn(n,"id",cl("recharts-pie-")),Sn(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Se(i)&&i()}),Sn(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Se(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return Rxe(t,e),Txe(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,o=a.labelLine,l=a.dataKey,c=a.valueKey,d=ye(this.props,!1),f=ye(s,!1),h=ye(o,!1),p=s&&s.offsetRadius||20,g=n.map(function(m,v){var y=(m.startAngle+m.endAngle)/2,x=ct(m.cx,m.cy,m.outerRadius+p,y),b=at(at(at(at({},d),m),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(x.x,m.cx)},x),S=at(at(at(at({},d),m),{},{fill:"none",stroke:m.fill},h),{},{index:v,points:[ct(m.cx,m.cy,m.outerRadius,y),x]}),_=l;return Ee(l)&&Ee(c)?_="value":Ee(l)&&(_=c),k.createElement(Le,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(v)},o&&t.renderLabelLineItem(o,S,"line"),t.renderLabelItem(s,b,kt(m,_)))});return k.createElement(Le,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,s=a.activeShape,o=a.blendStroke,l=a.inactiveShape;return n.map(function(c,d){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&n.length!==1)return null;var f=i.isActiveIndex(d),h=l&&i.hasActiveIndex()?l:null,p=f?s:h,g=at(at({},c),{},{stroke:o?c.fill:c.stroke,tabIndex:-1});return k.createElement(Le,Wl({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Qo(i.props,c,d),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(d)}),k.createElement(OI,Wl({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,s=i.isAnimationActive,o=i.animationBegin,l=i.animationDuration,c=i.animationEasing,d=i.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return k.createElement(ci,{begin:o,duration:l,isActive:s,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var m=g.t,v=[],y=a&&a[0],x=y.startAngle;return a.forEach(function(b,S){var _=h&&h[S],j=S>0?an(b,"paddingAngle",0):0;if(_){var N=qt(_.endAngle-_.startAngle,b.endAngle-b.startAngle),A=at(at({},b),{},{startAngle:x+j,endAngle:x+N(m)+j});v.push(A),x=A.endAngle}else{var E=b.endAngle,C=b.startAngle,P=qt(0,E-C),T=P(m),$=at(at({},b),{},{startAngle:x+j,endAngle:x+T+j});v.push($),x=$.endAngle}}),k.createElement(Le,null,n.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var o=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!el(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,o=i.className,l=i.label,c=i.cx,d=i.cy,f=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!s||!s.length||!J(c)||!J(d)||!J(f)||!J(h))return null;var m=Te("recharts-pie",o);return k.createElement(Le,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),l&&this.renderLabels(s),er.renderCallByParent(this.props,null,!1),(!p||g)&&ki.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(k.isValidElement(n))return k.cloneElement(n,i);if(Se(n))return n(i);var s=Te("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return k.createElement(Mo,Wl({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,i,a){if(k.isValidElement(n))return k.cloneElement(n,i);var s=a;if(Se(n)&&(s=n(i),k.isValidElement(s)))return s;var o=Te("recharts-pie-label-text",typeof n!="boolean"&&!Se(n)?n.className:"");return k.createElement(Jo,Wl({},i,{alignmentBaseline:"middle",className:o}),s)}}])}(w.PureComponent);Kp=Ea;Sn(Ea,"displayName","Pie");Sn(Ea,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ls.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Sn(Ea,"parseDeltaAngle",function(e,t){var r=Or(t-e),n=Math.min(Math.abs(t-e),360);return r*n});Sn(Ea,"getRealPieData",function(e){var t=e.data,r=e.children,n=ye(e,!1),i=sn(r,iv);return t&&t.length?t.map(function(a,s){return at(at(at({payload:a},n),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return at(at({},n),a.props)}):[]});Sn(Ea,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,s=oI(i,a),o=n+Ar(e.cx,i,i/2),l=r+Ar(e.cy,a,a/2),c=Ar(e.innerRadius,s,0),d=Ar(e.outerRadius,s,s*.8),f=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:o,cy:l,innerRadius:c,outerRadius:d,maxRadius:f}});Sn(Ea,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?at(at({},t.type.defaultProps),t.props):t.props,i=Kp.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,s=n.startAngle,o=n.endAngle,l=n.paddingAngle,c=n.dataKey,d=n.nameKey,f=n.valueKey,h=n.tooltipType,p=Math.abs(n.minAngle),g=Kp.parseCoordinateOfPie(n,r),m=Kp.parseDeltaAngle(s,o),v=Math.abs(m),y=c;Ee(c)&&Ee(f)?(oi(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),y="value"):Ee(c)&&(oi(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),y=f);var x=i.filter(function(A){return kt(A,y,0)!==0}).length,b=(v>=360?x:x-1)*l,S=v-x*p-b,_=i.reduce(function(A,E){var C=kt(E,y,0);return A+(J(C)?C:0)},0),j;if(_>0){var N;j=i.map(function(A,E){var C=kt(A,y,0),P=kt(A,d,E),T=(J(C)?C:0)/_,$;E?$=N.endAngle+Or(m)*l*(C!==0?1:0):$=s;var O=$+Or(m)*((C!==0?p:0)+T*S),R=($+O)/2,M=(g.innerRadius+g.outerRadius)/2,F=[{name:P,value:C,payload:A,dataKey:y,type:h}],D=ct(g.cx,g.cy,M,R);return N=at(at(at({percent:T,cornerRadius:a,name:P,tooltipPayload:F,midAngle:R,middleRadius:M,tooltipPosition:D},A),g),{},{value:kt(A,y),startAngle:$,endAngle:O,payload:A,paddingAngle:Or(m)*l}),N})}return at(at({},g),{},{sectors:j,data:i})});var Dxe=Math.ceil,Lxe=Math.max;function Fxe(e,t,r,n){for(var i=-1,a=Lxe(Dxe((t-e)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=e,e+=r;return s}var Bxe=Fxe,zxe=Z4,Wk=1/0,Uxe=17976931348623157e292;function Wxe(e){if(!e)return e===0?e:0;if(e=zxe(e),e===Wk||e===-Wk){var t=e<0?-1:1;return t*Uxe}return e===e?e:0}var PI=Wxe,Vxe=Bxe,Hxe=nv,ex=PI;function qxe(e){return function(t,r,n){return n&&typeof n!="number"&&Hxe(t,r,n)&&(r=n=void 0),t=ex(t),r===void 0?(r=t,t=0):r=ex(r),n=n===void 0?t<r?1:-1:ex(n),Vxe(t,r,n,e)}}var Kxe=qxe,Gxe=Kxe,Yxe=Gxe(),Xxe=Yxe;const Og=Xe(Xxe);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 Vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(r),!0).forEach(function(n){TI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TI(e,t,r){return t=Zxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zxe(e){var t=Qxe(e,"string");return qf(t)=="symbol"?t:t+""}function Qxe(e,t){if(qf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jxe=["Webkit","Moz","O","ms"],ebe=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Jxe.reduce(function(a,s){return Hk(Hk({},a),{},TI({},s+n,r))},{});return i[t]=r,i};function zc(e){"@babel/helpers - typeof";return zc=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},zc(e)}function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ag.apply(this,arguments)}function qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$I(n.key),n)}}function rbe(e,t,r){return t&&Kk(e.prototype,t),r&&Kk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nbe(e,t,r){return t=kg(t),ibe(e,CI()?Reflect.construct(t,r||[],kg(e).constructor):t.apply(e,r))}function ibe(e,t){if(t&&(zc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return abe(e)}function abe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CI=function(){return!!e})()}function kg(e){return kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kg(e)}function sbe(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&&l1(e,t)}function l1(e,t){return l1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},l1(e,t)}function Yr(e,t,r){return t=$I(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $I(e){var t=obe(e,"string");return zc(t)=="symbol"?t:t+""}function obe(e,t){if(zc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lbe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,s=t.width,o=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,c=Md().domain(Og(0,l)).range([a,a+s-o]),d=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(i),scale:c,scaleValues:d}},Gk=function(t){return t.changedTouches&&!!t.changedTouches.length},Uc=function(e){function t(r){var n;return tbe(this,t),n=nbe(this,t,[r]),Yr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Yr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Yr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,o=i.startIndex;s==null||s({endIndex:a,startIndex:o})}),n.detachDragEndListener()}),Yr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Yr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Yr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Yr(n,"handleSlideDragStart",function(i){var a=Gk(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return sbe(t,e),rbe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,o=this.props,l=o.gap,c=o.data,d=c.length-1,f=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(s,f),g=t.getIndexInRange(s,h);return{startIndex:p-p%l,endIndex:g===d?d:g-g%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,o=i.dataKey,l=kt(a[n],o,n);return Se(s)?s(l,n):l}},{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(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,o=i.endX,l=this.props,c=l.x,d=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,g=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,c+d-f-o,c+d-f-s):m<0&&(m=Math.max(m,c-s,c-o));var v=this.getIndex({startX:s+m,endX:o+m});(v.startIndex!==h||v.endIndex!==p)&&g&&g(v),this.setState({startX:s+m,endX:o+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=Gk(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,o=i.endX,l=i.startX,c=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,v=d.data,y={startX:this.state.startX,endX:this.state.endX},x=n.pageX-a;x>0?x=Math.min(x,f+h-p-c):x<0&&(x=Math.max(x,f-c)),y[s]=c+x;var b=this.getIndex(y),S=b.startIndex,_=b.endIndex,j=function(){var A=v.length-1;return s==="startX"&&(o>l?S%m===0:_%m===0)||o<l&&_===A||s==="endX"&&(o>l?_%m===0:S%m===0)||o>l&&_===A};this.setState(Yr(Yr({},s,c+x),"brushMoveStartX",n.pageX),function(){g&&j()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,o=s.scaleValues,l=s.startX,c=s.endX,d=this.state[i],f=o.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=o.length)){var p=o[h];i==="startX"&&p>=c||i==="endX"&&p<=l||this.setState(Yr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,o=n.height,l=n.fill,c=n.stroke;return k.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:s,height:o})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,o=n.height,l=n.data,c=n.children,d=n.padding,f=w.Children.only(c);return f?k.cloneElement(f,{x:i,y:a,width:s,height:o,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,o=this,l=this.props,c=l.y,d=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,g=l.data,m=l.startIndex,v=l.endIndex,y=Math.max(n,this.props.x),x=tx(tx({},ye(this.props,!1)),{},{x:y,y:c,width:d,height:f}),b=p||"Min value: ".concat((a=g[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=g[v])===null||s===void 0?void 0:s.name);return k.createElement(Le,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),o.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,o=a.height,l=a.stroke,c=a.travellerWidth,d=Math.min(n,i)+c,f=Math.max(Math.abs(i-n)-c,0);return k.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:s,width:f,height:o})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,o=n.height,l=n.travellerWidth,c=n.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:c};return k.createElement(Le,{className:"recharts-brush-texts"},k.createElement(Jo,Ag({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+o/2},g),this.getTextOfTick(i)),k.createElement(Jo,Ag({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:s+o/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,o=n.x,l=n.y,c=n.width,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!J(o)||!J(l)||!J(c)||!J(d)||c<=0||d<=0)return null;var b=Te("recharts-brush",a),S=k.Children.count(s)===1,_=ebe("userSelect","none");return k.createElement(Le,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||y||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,o=n.height,l=n.stroke,c=Math.floor(a+o/2)-1;return k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:s,height:o,fill:l,stroke:"none"}),k.createElement("line",{x1:i+1,y1:c,x2:i+s-1,y2:c,fill:"none",stroke:"#fff"}),k.createElement("line",{x1:i+1,y1:c+2,x2:i+s-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return k.isValidElement(n)?a=k.cloneElement(n,i):Se(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,o=n.x,l=n.travellerWidth,c=n.updateId,d=n.startIndex,f=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return tx({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:o,prevWidth:s},a&&a.length?lbe({data:a,width:s,x:o,travellerWidth:l,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||o!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([o,o+s-l]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:o,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,o=a-1;o-s>1;){var l=Math.floor((s+o)/2);n[l]>i?o=l:s=l}return i>=n[o]?o:s}}])}(w.PureComponent);Yr(Uc,"displayName","Brush");Yr(Uc,"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 cbe=WS;function ube(e,t){var r;return cbe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var dbe=ube,fbe=j4,hbe=Ii,pbe=dbe,mbe=qr,gbe=nv;function ybe(e,t,r){var n=mbe(e)?fbe:pbe;return r&&gbe(e,t,r)&&(t=void 0),n(e,hbe(t))}var vbe=ybe;const xbe=Xe(vbe);var Pi=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Yk=q4;function bbe(e,t,r){t=="__proto__"&&Yk?Yk(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var wbe=bbe,_be=wbe,Sbe=V4,jbe=Ii;function Nbe(e,t){var r={};return t=jbe(t),Sbe(e,function(n,i,a){_be(r,i,t(n,i,a))}),r}var Ebe=Nbe;const Obe=Xe(Ebe);function Abe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var kbe=Abe,Pbe=WS;function Tbe(e,t){var r=!0;return Pbe(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var Cbe=Tbe,$be=kbe,Mbe=Cbe,Rbe=Ii,Ibe=qr,Dbe=nv;function Lbe(e,t,r){var n=Ibe(e)?$be:Mbe;return r&&Dbe(e,t,r)&&(t=void 0),n(e,Rbe(t))}var Fbe=Lbe;const MI=Xe(Fbe);var Bbe=["x","y"];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 c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c1.apply(this,arguments)}function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function id(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xk(Object(r),!0).forEach(function(n){zbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zbe(e,t,r){return t=Ube(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ube(e){var t=Wbe(e,"string");return Kf(t)=="symbol"?t:t+""}function Wbe(e,t){if(Kf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vbe(e,t){if(e==null)return{};var r=Hbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hbe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qbe(e,t){var r=e.x,n=e.y,i=Vbe(e,Bbe),a="".concat(r),s=parseInt(a,10),o="".concat(n),l=parseInt(o,10),c="".concat(t.height||i.height),d=parseInt(c,10),f="".concat(t.width||i.width),h=parseInt(f,10);return id(id(id(id(id({},t),i),s?{x:s}:{}),l?{y:l}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function Zk(e){return k.createElement(OI,c1({shapeType:"rectangle",propTransformer:qbe,activeClassName:"recharts-active-bar"},e))}var Kbe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=J(n)||Wee(n);return a?t(n,i):(a||rl(),r)}},Gbe=["value","background"],RI;function Wc(e){"@babel/helpers - typeof";return Wc=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},Wc(e)}function Ybe(e,t){if(e==null)return{};var r=Xbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xbe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pg.apply(this,arguments)}function Qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DI(n.key),n)}}function Qbe(e,t,r){return t&&Jk(e.prototype,t),r&&Jk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jbe(e,t,r){return t=Tg(t),ewe(e,II()?Reflect.construct(t,r||[],Tg(e).constructor):t.apply(e,r))}function ewe(e,t){if(t&&(Wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return twe(e)}function twe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function II(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(II=function(){return!!e})()}function Tg(e){return Tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tg(e)}function rwe(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&&u1(e,t)}function u1(e,t){return u1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},u1(e,t)}function ls(e,t,r){return t=DI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DI(e){var t=nwe(e,"string");return Wc(t)=="symbol"?t:t+""}function nwe(e,t){if(Wc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hl=function(e){function t(){var r;Zbe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Jbe(this,t,[].concat(i)),ls(r,"state",{isAnimationFinished:!1}),ls(r,"id",cl("recharts-bar-")),ls(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),ls(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return rwe(t,e),Qbe(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,s=a.shape,o=a.dataKey,l=a.activeIndex,c=a.activeBar,d=ye(this.props,!1);return n&&n.map(function(f,h){var p=h===l,g=p?c:s,m=Rt(Rt(Rt({},d),f),{},{isActive:p,option:g,index:h,dataKey:o,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return k.createElement(Le,Pg({className:"recharts-bar-rectangle"},Qo(i.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),k.createElement(Zk,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,s=i.layout,o=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,d=i.animationEasing,f=i.animationId,h=this.state.prevData;return k.createElement(ci,{begin:l,duration:c,isActive:o,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=a.map(function(v,y){var x=h&&h[y];if(x){var b=qt(x.x,v.x),S=qt(x.y,v.y),_=qt(x.width,v.width),j=qt(x.height,v.height);return Rt(Rt({},v),{},{x:b(g),y:S(g),width:_(g),height:j(g)})}if(s==="horizontal"){var N=qt(0,v.height),A=N(g);return Rt(Rt({},v),{},{y:v.y+v.height-A,height:A})}var E=qt(0,v.width),C=E(g);return Rt(Rt({},v),{},{width:C})});return k.createElement(Le,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!el(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,s=i.dataKey,o=i.activeIndex,l=ye(this.props.background,!1);return a.map(function(c,d){c.value;var f=c.background,h=Ybe(c,Gbe);if(!f)return null;var p=Rt(Rt(Rt(Rt(Rt({},h),{},{fill:"#eee"},f),l),Qo(n.props,c,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return k.createElement(Zk,Pg({key:"background-bar-".concat(d),option:n.props.background,isActive:d===o},p))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,o=a.xAxis,l=a.yAxis,c=a.layout,d=a.children,f=sn(d,Sh);if(!f)return null;var h=c==="vertical"?s[0].height/2:s[0].width/2,p=function(v,y){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:kt(v,y)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(Le,g,f.map(function(m){return k.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:s,xAxis:o,yAxis:l,layout:c,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,s=n.className,o=n.xAxis,l=n.yAxis,c=n.left,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,g=n.background,m=n.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,y=Te("recharts-bar",s),x=o&&o.allowDataOverflow,b=l&&l.allowDataOverflow,S=x||b,_=Ee(m)?this.id:m;return k.createElement(Le,{className:y},x||b?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(_)},k.createElement("rect",{x:x?c:c-f/2,y:b?d:d-h/2,width:x?f:f*2,height:b?h:h*2}))):null,k.createElement(Le,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(_,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,_),(!p||v)&&ki.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(w.PureComponent);RI=hl;ls(hl,"displayName","Bar");ls(hl,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ls.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ls(hl,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,s=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=Dme(n,r);if(!p)return null;var g=t.layout,m=r.type.defaultProps,v=m!==void 0?Rt(Rt({},m),r.props):r.props,y=v.dataKey,x=v.children,b=v.minPointSize,S=g==="horizontal"?s:a,_=c?S.scale.domain():null,j=Vme({numericAxis:S}),N=sn(x,iv),A=f.map(function(E,C){var P,T,$,O,R,M;c?P=Lme(c[d+C],_):(P=kt(E,y),Array.isArray(P)||(P=[j,P]));var F=Kbe(b,RI.defaultProps.minPointSize)(P[1],C);if(g==="horizontal"){var D,I=[s.scale(P[0]),s.scale(P[1])],L=I[0],W=I[1];T=UA({axis:a,ticks:o,bandSize:i,offset:p.offset,entry:E,index:C}),$=(D=W??L)!==null&&D!==void 0?D:void 0,O=p.size;var U=L-W;if(R=Number.isNaN(U)?0:U,M={x:T,y:s.y,width:O,height:s.height},Math.abs(F)>0&&Math.abs(R)<Math.abs(F)){var G=Or(R||F)*(Math.abs(F)-Math.abs(R));$-=G,R+=G}}else{var X=[a.scale(P[0]),a.scale(P[1])],ne=X[0],ue=X[1];if(T=ne,$=UA({axis:s,ticks:l,bandSize:i,offset:p.offset,entry:E,index:C}),O=ue-ne,R=p.size,M={x:a.x,y:$,width:a.width,height:R},Math.abs(F)>0&&Math.abs(O)<Math.abs(F)){var we=Or(O||F)*(Math.abs(F)-Math.abs(O));O+=we}}return Rt(Rt(Rt({},E),{},{x:T,y:$,width:O,height:R,value:c?P:P[1],payload:E,background:M},N&&N[C]&&N[C].props),{},{tooltipPayload:[aI(r,E)],tooltipPosition:{x:T+O/2,y:$+R/2}})});return Rt({data:A,layout:g},h)});function Gf(e){"@babel/helpers - typeof";return Gf=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},Gf(e)}function iwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,LI(n.key),n)}}function awe(e,t,r){return t&&eP(e.prototype,t),r&&eP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(r),!0).forEach(function(n){wv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wv(e,t,r){return t=LI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LI(e){var t=swe(e,"string");return Gf(t)=="symbol"?t:t+""}function swe(e,t){if(Gf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mj=function(t,r,n,i,a){var s=t.width,o=t.height,l=t.layout,c=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},h=!!Qr(c,hl);return d.reduce(function(p,g){var m=r[g],v=m.orientation,y=m.domain,x=m.padding,b=x===void 0?{}:x,S=m.mirror,_=m.reversed,j="".concat(v).concat(S?"Mirror":""),N,A,E,C,P;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var T=y[1]-y[0],$=1/0,O=m.categoricalDomain.sort(qee);if(O.forEach(function(X,ne){ne>0&&($=Math.min((X||0)-(O[ne-1]||0),$))}),Number.isFinite($)){var R=$/T,M=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(N=R*M/2),m.padding==="no-gap"){var F=Ar(t.barCategoryGap,R*M),D=R*M/2;N=D-F-(D-F)/M*F}}}i==="xAxis"?A=[n.left+(b.left||0)+(N||0),n.left+n.width-(b.right||0)-(N||0)]:i==="yAxis"?A=l==="horizontal"?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(N||0),n.top+n.height-(b.bottom||0)-(N||0)]:A=m.range,_&&(A=[A[1],A[0]]);var I=tI(m,a,h),L=I.scale,W=I.realScaleType;L.domain(y).range(A),rI(L);var U=nI(L,Kn(Kn({},m),{},{realScaleType:W}));i==="xAxis"?(P=v==="top"&&!S||v==="bottom"&&S,E=n.left,C=f[j]-P*m.height):i==="yAxis"&&(P=v==="left"&&!S||v==="right"&&S,E=f[j]-P*m.width,C=n.top);var G=Kn(Kn(Kn({},m),U),{},{realScaleType:W,x:E,y:C,scale:L,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return G.bandSize=mg(G,U),!m.hide&&i==="xAxis"?f[j]+=(P?-1:1)*G.height:m.hide||(f[j]+=(P?-1:1)*G.width),Kn(Kn({},p),{},wv({},g,G))},{})},FI=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},owe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return FI({x:r,y:n},{x:i,y:a})},BI=function(){function e(t){iwe(this,e),this.scale=t}return awe(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(r)+o}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();wv(BI,"EPS",1e-4);var gj=function(t){var r=Object.keys(t).reduce(function(n,i){return Kn(Kn({},n),{},wv({},i,BI.create(t[i])))},{});return Kn(Kn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,o=a.position;return Obe(i,function(l,c){return r[c].apply(l,{bandAware:s,position:o})})},isInRange:function(i){return MI(i,function(a,s){return r[s].isInRange(a)})}})};function lwe(e){return(e%180+180)%180}var cwe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=lwe(i),s=a*Math.PI/180,o=Math.atan(n/r),l=s>o&&s<Math.PI-o?n/Math.sin(s):r/Math.cos(s);return Math.abs(l)},uwe=Ii,dwe=xh,fwe=tv;function hwe(e){return function(t,r,n){var i=Object(t);if(!dwe(t)){var a=uwe(r);t=fwe(t),r=function(o){return a(i[o],o,i)}}var s=e(t,r,n);return s>-1?i[a?t[s]:s]:void 0}}var pwe=hwe,mwe=PI;function gwe(e){var t=mwe(e),r=t%1;return t===t?r?t-r:t:0}var ywe=gwe,vwe=L4,xwe=Ii,bwe=ywe,wwe=Math.max;function _we(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:bwe(r);return i<0&&(i=wwe(n+i,0)),vwe(e,xwe(t),i)}var Swe=_we,jwe=pwe,Nwe=Swe,Ewe=jwe(Nwe),Owe=Ewe;const Awe=Xe(Owe);var kwe=YJ(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("")}),yj=w.createContext(void 0),vj=w.createContext(void 0),zI=w.createContext(void 0),UI=w.createContext({}),WI=w.createContext(void 0),VI=w.createContext(0),HI=w.createContext(0),rP=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=t.clipPathId,o=t.children,l=t.width,c=t.height,d=kwe(a);return k.createElement(yj.Provider,{value:n},k.createElement(vj.Provider,{value:i},k.createElement(UI.Provider,{value:a},k.createElement(zI.Provider,{value:d},k.createElement(WI.Provider,{value:s},k.createElement(VI.Provider,{value:c},k.createElement(HI.Provider,{value:l},o)))))))},Pwe=function(){return w.useContext(WI)},qI=function(t){var r=w.useContext(yj);r==null&&rl();var n=r[t];return n==null&&rl(),n},Twe=function(){var t=w.useContext(yj);return Ha(t)},Cwe=function(){var t=w.useContext(vj),r=Awe(t,function(n){return MI(n.domain,Number.isFinite)});return r||Ha(t)},KI=function(t){var r=w.useContext(vj);r==null&&rl();var n=r[t];return n==null&&rl(),n},$we=function(){var t=w.useContext(zI);return t},Mwe=function(){return w.useContext(UI)},xj=function(){return w.useContext(HI)},bj=function(){return w.useContext(VI)};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 Rwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iwe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,YI(n.key),n)}}function Dwe(e,t,r){return t&&Iwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lwe(e,t,r){return t=Cg(t),Fwe(e,GI()?Reflect.construct(t,r||[],Cg(e).constructor):t.apply(e,r))}function Fwe(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 Bwe(e)}function Bwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GI=function(){return!!e})()}function Cg(e){return Cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cg(e)}function zwe(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&&d1(e,t)}function d1(e,t){return d1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},d1(e,t)}function nP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nP(Object(r),!0).forEach(function(n){wj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wj(e,t,r){return t=YI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YI(e){var t=Uwe(e,"string");return Vc(t)=="symbol"?t:t+""}function Uwe(e,t){if(Vc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Wwe(e,t){return Kwe(e)||qwe(e,t)||Hwe(e,t)||Vwe()}function Vwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hwe(e,t){if(e){if(typeof e=="string")return aP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aP(e,t)}}function aP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function Kwe(e){if(Array.isArray(e))return e}function f1(){return f1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f1.apply(this,arguments)}var Gwe=function(t,r){var n;return k.isValidElement(t)?n=k.cloneElement(t,r):Se(t)?n=t(r):n=k.createElement("line",f1({},r,{className:"recharts-reference-line-line"})),n},Ywe=function(t,r,n,i,a,s,o,l,c){var d=a.x,f=a.y,h=a.width,p=a.height;if(n){var g=c.y,m=t.y.apply(g,{position:s});if(Pi(c,"discard")&&!t.y.isInRange(m))return null;var v=[{x:d+h,y:m},{x:d,y:m}];return l==="left"?v.reverse():v}if(r){var y=c.x,x=t.x.apply(y,{position:s});if(Pi(c,"discard")&&!t.x.isInRange(x))return null;var b=[{x,y:f+p},{x,y:f}];return o==="top"?b.reverse():b}if(i){var S=c.segment,_=S.map(function(j){return t.apply(j,{position:s})});return Pi(c,"discard")&&xbe(_,function(j){return!t.isInRange(j)})?null:_}return null};function Xwe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,s=e.shape,o=e.className,l=e.alwaysShow,c=Pwe(),d=qI(i),f=KI(a),h=$we();if(!c||!h)return null;oi(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=gj({x:d.scale,y:f.scale}),g=Gt(t),m=Gt(r),v=n&&n.length===2,y=Ywe(p,g,m,v,h,e.position,d.orientation,f.orientation,e);if(!y)return null;var x=Wwe(y,2),b=x[0],S=b.x,_=b.y,j=x[1],N=j.x,A=j.y,E=Pi(e,"hidden")?"url(#".concat(c,")"):void 0,C=iP(iP({clipPath:E},ye(e,!0)),{},{x1:S,y1:_,x2:N,y2:A});return k.createElement(Le,{className:Te("recharts-reference-line",o)},Gwe(s,C),er.renderCallByParent(e,owe({x1:S,y1:_,x2:N,y2:A})))}var _j=function(e){function t(){return Rwe(this,t),Lwe(this,t,arguments)}return zwe(t,e),Dwe(t,[{key:"render",value:function(){return k.createElement(Xwe,this.props)}}])}(k.Component);wj(_j,"displayName","ReferenceLine");wj(_j,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h1.apply(this,arguments)}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 sP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sP(Object(r),!0).forEach(function(n){_v(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qwe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ZI(n.key),n)}}function Jwe(e,t,r){return t&&Qwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function e1e(e,t,r){return t=$g(t),t1e(e,XI()?Reflect.construct(t,r||[],$g(e).constructor):t.apply(e,r))}function t1e(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 r1e(e)}function r1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XI=function(){return!!e})()}function $g(e){return $g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$g(e)}function n1e(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&&p1(e,t)}function p1(e,t){return p1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},p1(e,t)}function _v(e,t,r){return t=ZI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZI(e){var t=i1e(e,"string");return Hc(t)=="symbol"?t:t+""}function i1e(e,t){if(Hc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var a1e=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,s=gj({x:i.scale,y:a.scale}),o=s.apply({x:r,y:n},{bandAware:!0});return Pi(t,"discard")&&!s.isInRange(o)?null:o},Sv=function(e){function t(){return Zwe(this,t),e1e(this,t,arguments)}return n1e(t,e),Jwe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,s=n.r,o=n.alwaysShow,l=n.clipPathId,c=Gt(i),d=Gt(a);if(oi(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!d)return null;var f=a1e(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,m=g.shape,v=g.className,y=Pi(this.props,"hidden")?"url(#".concat(l,")"):void 0,x=oP(oP({clipPath:y},ye(this.props,!0)),{},{cx:h,cy:p});return k.createElement(Le,{className:Te("recharts-reference-dot",v)},t.renderDot(m,x),er.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])}(k.Component);_v(Sv,"displayName","ReferenceDot");_v(Sv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});_v(Sv,"renderDot",function(e,t){var r;return k.isValidElement(e)?r=k.cloneElement(e,t):Se(e)?r=e(t):r=k.createElement(jh,h1({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function m1(){return m1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m1.apply(this,arguments)}function qc(e){"@babel/helpers - typeof";return qc=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},qc(e)}function lP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(r),!0).forEach(function(n){jv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o1e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,JI(n.key),n)}}function l1e(e,t,r){return t&&o1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function c1e(e,t,r){return t=Mg(t),u1e(e,QI()?Reflect.construct(t,r||[],Mg(e).constructor):t.apply(e,r))}function u1e(e,t){if(t&&(qc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d1e(e)}function d1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QI=function(){return!!e})()}function Mg(e){return Mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mg(e)}function f1e(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&&g1(e,t)}function g1(e,t){return g1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},g1(e,t)}function jv(e,t,r){return t=JI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JI(e){var t=h1e(e,"string");return qc(t)=="symbol"?t:t+""}function h1e(e,t){if(qc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var p1e=function(t,r,n,i,a){var s=a.x1,o=a.x2,l=a.y1,c=a.y2,d=a.xAxis,f=a.yAxis;if(!d||!f)return null;var h=gj({x:d.scale,y:f.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Pi(a,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:FI(p,g)},Nv=function(e){function t(){return s1e(this,t),c1e(this,t,arguments)}return f1e(t,e),l1e(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,s=n.y1,o=n.y2,l=n.className,c=n.alwaysShow,d=n.clipPathId;oi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Gt(i),h=Gt(a),p=Gt(s),g=Gt(o),m=this.props.shape;if(!f&&!h&&!p&&!g&&!m)return null;var v=p1e(f,h,p,g,this.props);if(!v&&!m)return null;var y=Pi(this.props,"hidden")?"url(#".concat(d,")"):void 0;return k.createElement(Le,{className:Te("recharts-reference-area",l)},t.renderRect(m,cP(cP({clipPath:y},ye(this.props,!0)),v)),er.renderCallByParent(this.props,v))}}])}(k.Component);jv(Nv,"displayName","ReferenceArea");jv(Nv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});jv(Nv,"renderRect",function(e,t){var r;return k.isValidElement(e)?r=k.cloneElement(e,t):Se(e)?r=e(t):r=k.createElement(pj,m1({},t,{className:"recharts-reference-area-rect"})),r});function eD(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function m1e(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return cwe(n,r)}function g1e(e,t,r){var n=r==="width",i=e.x,a=e.y,s=e.width,o=e.height;return t===1?{start:n?i:a,end:n?i+s:a+o}:{start:n?i+s:a+o,end:n?i:a}}function Rg(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function y1e(e,t){return eD(e,t+1)}function v1e(e,t,r,n,i){for(var a=(n||[]).slice(),s=t.start,o=t.end,l=0,c=1,d=s,f=function(){var g=n==null?void 0:n[l];if(g===void 0)return{v:eD(n,c)};var m=l,v,y=function(){return v===void 0&&(v=r(g,m)),v},x=g.coordinate,b=l===0||Rg(e,x,y,d,o);b||(l=0,d=s,c+=1),b&&(d=x+e*(y()/2+i),l+=c)},h;c<=a.length;)if(h=f(),h)return h.v;return[]}function Yf(e){"@babel/helpers - typeof";return Yf=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},Yf(e)}function uP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uP(Object(r),!0).forEach(function(n){x1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x1e(e,t,r){return t=b1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b1e(e){var t=w1e(e,"string");return Yf(t)=="symbol"?t:t+""}function w1e(e,t){if(Yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _1e(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,o=t.start,l=t.end,c=function(h){var p=a[h],g,m=function(){return g===void 0&&(g=r(p,h)),g};if(h===s-1){var v=e*(p.coordinate+e*m()/2-l);a[h]=p=mr(mr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else a[h]=p=mr(mr({},p),{},{tickCoord:p.coordinate});var y=Rg(e,p.tickCoord,m,o,l);y&&(l=p.tickCoord-e*(m()/2+i),a[h]=mr(mr({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)c(d);return a}function S1e(e,t,r,n,i,a){var s=(n||[]).slice(),o=s.length,l=t.start,c=t.end;if(a){var d=n[o-1],f=r(d,o-1),h=e*(d.coordinate+e*f/2-c);s[o-1]=d=mr(mr({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Rg(e,d.tickCoord,function(){return f},l,c);p&&(c=d.tickCoord-e*(f/2+i),s[o-1]=mr(mr({},d),{},{isShow:!0}))}for(var g=a?o-1:o,m=function(x){var b=s[x],S,_=function(){return S===void 0&&(S=r(b,x)),S};if(x===0){var j=e*(b.coordinate-e*_()/2-l);s[x]=b=mr(mr({},b),{},{tickCoord:j<0?b.coordinate-j*e:b.coordinate})}else s[x]=b=mr(mr({},b),{},{tickCoord:b.coordinate});var N=Rg(e,b.tickCoord,_,l,c);N&&(l=b.tickCoord+e*(_()/2+i),s[x]=mr(mr({},b),{},{isShow:!0}))},v=0;v<g;v++)m(v);return s}function Sj(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,s=e.minTickGap,o=e.orientation,l=e.interval,c=e.tickFormatter,d=e.unit,f=e.angle;if(!i||!i.length||!n)return[];if(J(l)||Ls.isSsr)return y1e(i,typeof l=="number"&&J(l)?l:0);var h=[],p=o==="top"||o==="bottom"?"width":"height",g=d&&p==="width"?$d(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(b,S){var _=Se(c)?c(b.value,S):b.value;return p==="width"?m1e($d(_,{fontSize:t,letterSpacing:r}),g,f):$d(_,{fontSize:t,letterSpacing:r})[p]},v=i.length>=2?Or(i[1].coordinate-i[0].coordinate):1,y=g1e(a,v,p);return l==="equidistantPreserveStart"?v1e(v,y,m,i,s):(l==="preserveStart"||l==="preserveStartEnd"?h=S1e(v,y,m,i,s,l==="preserveStartEnd"):h=_1e(v,y,m,i,s),h.filter(function(x){return x.isShow}))}var j1e=["viewBox"],N1e=["viewBox"],E1e=["ticks"];function Kc(e){"@babel/helpers - typeof";return Kc=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},Kc(e)}function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vl.apply(this,arguments)}function dP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){jj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rx(e,t){if(e==null)return{};var r=O1e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function O1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function A1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rD(n.key),n)}}function k1e(e,t,r){return t&&fP(e.prototype,t),r&&fP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function P1e(e,t,r){return t=Ig(t),T1e(e,tD()?Reflect.construct(t,r||[],Ig(e).constructor):t.apply(e,r))}function T1e(e,t){if(t&&(Kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C1e(e)}function C1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tD=function(){return!!e})()}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ig(e)}function $1e(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&&y1(e,t)}function y1(e,t){return y1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},y1(e,t)}function jj(e,t,r){return t=rD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rD(e){var t=M1e(e,"string");return Kc(t)=="symbol"?t:t+""}function M1e(e,t){if(Kc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ou=function(e){function t(r){var n;return A1e(this,t),n=P1e(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return $1e(t,e),k1e(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=rx(n,j1e),o=this.props,l=o.viewBox,c=rx(o,N1e);return!nc(a,l)||!nc(s,c)||!nc(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,s=i.y,o=i.width,l=i.height,c=i.orientation,d=i.tickSize,f=i.mirror,h=i.tickMargin,p,g,m,v,y,x,b=f?-1:1,S=n.tickSize||d,_=J(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":p=g=n.coordinate,v=s+ +!f*l,m=v-b*S,x=m-b*h,y=_;break;case"left":m=v=n.coordinate,g=a+ +!f*o,p=g-b*S,y=p-b*h,x=_;break;case"right":m=v=n.coordinate,g=a+ +f*o,p=g+b*S,y=p+b*h,x=_;break;default:p=g=n.coordinate,v=s+ +f*l,m=v+b*S,x=m+b*h,y=_;break}return{line:{x1:p,y1:m,x2:g,y2:v},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,o=n.height,l=n.orientation,c=n.mirror,d=n.axisLine,f=Ut(Ut(Ut({},ye(this.props,!1)),ye(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);f=Ut(Ut({},f),{},{x1:i,y1:a+h*o,x2:i+s,y2:a+h*o})}else{var p=+(l==="left"&&!c||l==="right"&&c);f=Ut(Ut({},f),{},{x1:i+p*s,y1:a,x2:i+p*s,y2:a+o})}return k.createElement("line",Vl({},f,{className:Te("recharts-cartesian-axis-line",an(d,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var s=this,o=this.props,l=o.tickLine,c=o.stroke,d=o.tick,f=o.tickFormatter,h=o.unit,p=Sj(Ut(Ut({},this.props),{},{ticks:n}),i,a),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=ye(this.props,!1),y=ye(d,!1),x=Ut(Ut({},v),{},{fill:"none"},ye(l,!1)),b=p.map(function(S,_){var j=s.getTickLineCoord(S),N=j.line,A=j.tick,E=Ut(Ut(Ut(Ut({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:c},y),A),{},{index:_,payload:S,visibleTicksCount:p.length,tickFormatter:f});return k.createElement(Le,Vl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Qo(s.props,S,_)),l&&k.createElement("line",Vl({},x,N,{className:Te("recharts-cartesian-axis-tick-line",an(l,"className"))})),d&&t.renderTickItem(d,E,"".concat(Se(f)?f(S.value,_):S.value).concat(h||"")))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,s=i.width,o=i.height,l=i.ticksGenerator,c=i.className,d=i.hide;if(d)return null;var f=this.props,h=f.ticks,p=rx(f,E1e),g=h;return Se(l)&&(g=h&&h.length>0?l(this.props):l(p)),s<=0||o<=0||!g||!g.length?null:k.createElement(Le,{className:Te("recharts-cartesian-axis",c),ref:function(v){n.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),er.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,o=Te(i.className,"recharts-cartesian-axis-tick-value");return k.isValidElement(n)?s=k.cloneElement(n,Ut(Ut({},i),{},{className:o})):Se(n)?s=n(Ut(Ut({},i),{},{className:o})):s=k.createElement(Jo,Vl({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])}(w.Component);jj(Ou,"displayName","CartesianAxis");jj(Ou,"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 R1e=["x1","y1","x2","y2","key"],I1e=["offset"];function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function hP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){D1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D1e(e,t,r){return t=L1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L1e(e){var t=F1e(e,"string");return nl(t)=="symbol"?t:t+""}function F1e(e,t){if(nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},po.apply(this,arguments)}function pP(e,t){if(e==null)return{};var r=B1e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function B1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var z1e=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,s=t.width,o=t.height,l=t.ry;return k.createElement("rect",{x:i,y:a,ry:l,width:s,height:o,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function nD(e,t){var r;if(k.isValidElement(e))r=k.cloneElement(e,t);else if(Se(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,s=t.y2,o=t.key,l=pP(t,R1e),c=ye(l,!1);c.offset;var d=pP(c,I1e);r=k.createElement("line",po({},d,{x1:n,y1:i,x2:a,y2:s,fill:"none",key:o}))}return r}function U1e(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(o,l){var c=yr(yr({},e),{},{x1:t,y1:o,x2:t+r,y2:o,key:"line-".concat(l),index:l});return nD(i,c)});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function W1e(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(o,l){var c=yr(yr({},e),{},{x1:o,y1:t,x2:o,y2:t+r,key:"line-".concat(l),index:l});return nD(i,c)});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function V1e(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,s=e.height,o=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var d=o.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?i+s-h:d[p+1]-h;if(m<=0)return null;var v=p%t.length;return k.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:a,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function H1e(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,s=e.y,o=e.width,l=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var d=c.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?a+o-h:d[p+1]-h;if(m<=0)return null;var v=p%n.length;return k.createElement("rect",{key:"react-".concat(p),x:h,y:s,width:m,height:l,stroke:"none",fill:n[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var q1e=function(t,r){var n=t.xAxis,i=t.width,a=t.height,s=t.offset;return eI(Sj(yr(yr(yr({},Ou.defaultProps),n),{},{ticks:ea(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.left,s.left+s.width,r)},K1e=function(t,r){var n=t.yAxis,i=t.width,a=t.height,s=t.offset;return eI(Sj(yr(yr(yr({},Ou.defaultProps),n),{},{ticks:ea(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.top,s.top+s.height,r)},Sl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function xd(e){var t,r,n,i,a,s,o=xj(),l=bj(),c=Mwe(),d=yr(yr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Sl.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Sl.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Sl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Sl.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Sl.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:Sl.verticalFill,x:J(e.x)?e.x:c.left,y:J(e.y)?e.y:c.top,width:J(e.width)?e.width:c.width,height:J(e.height)?e.height:c.height}),f=d.x,h=d.y,p=d.width,g=d.height,m=d.syncWithTicks,v=d.horizontalValues,y=d.verticalValues,x=Twe(),b=Cwe();if(!J(p)||p<=0||!J(g)||g<=0||!J(f)||f!==+f||!J(h)||h!==+h)return null;var S=d.verticalCoordinatesGenerator||q1e,_=d.horizontalCoordinatesGenerator||K1e,j=d.horizontalPoints,N=d.verticalPoints;if((!j||!j.length)&&Se(_)){var A=v&&v.length,E=_({yAxis:b?yr(yr({},b),{},{ticks:A?v:b.ticks}):void 0,width:o,height:l,offset:c},A?!0:m);oi(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(nl(E),"]")),Array.isArray(E)&&(j=E)}if((!N||!N.length)&&Se(S)){var C=y&&y.length,P=S({xAxis:x?yr(yr({},x),{},{ticks:C?y:x.ticks}):void 0,width:o,height:l,offset:c},C?!0:m);oi(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(nl(P),"]")),Array.isArray(P)&&(N=P)}return k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(z1e,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),k.createElement(U1e,po({},d,{offset:c,horizontalPoints:j,xAxis:x,yAxis:b})),k.createElement(W1e,po({},d,{offset:c,verticalPoints:N,xAxis:x,yAxis:b})),k.createElement(V1e,po({},d,{horizontalPoints:j})),k.createElement(H1e,po({},d,{verticalPoints:N})))}xd.displayName="CartesianGrid";var G1e=["type","layout","connectNulls","ref"],Y1e=["key"];function Gc(e){"@babel/helpers - typeof";return Gc=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},Gc(e)}function mP(e,t){if(e==null)return{};var r=X1e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Fd(){return Fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fd.apply(this,arguments)}function gP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gP(Object(r),!0).forEach(function(n){Gn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jl(e){return e_e(e)||J1e(e)||Q1e(e)||Z1e()}function Z1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q1e(e,t){if(e){if(typeof e=="string")return v1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v1(e,t)}}function J1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function e_e(e){if(Array.isArray(e))return v1(e)}function v1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aD(n.key),n)}}function r_e(e,t,r){return t&&yP(e.prototype,t),r&&yP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function n_e(e,t,r){return t=Dg(t),i_e(e,iD()?Reflect.construct(t,r||[],Dg(e).constructor):t.apply(e,r))}function i_e(e,t){if(t&&(Gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a_e(e)}function a_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iD=function(){return!!e})()}function Dg(e){return Dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dg(e)}function s_e(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&&x1(e,t)}function x1(e,t){return x1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},x1(e,t)}function Gn(e,t,r){return t=aD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aD(e){var t=o_e(e,"string");return Gc(t)=="symbol"?t:t+""}function o_e(e,t){if(Gc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ro=function(e){function t(){var r;t_e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=n_e(this,t,[].concat(i)),Gn(r,"state",{isAnimationFinished:!0,totalLength:0}),Gn(r,"generateSimpleStrokeDasharray",function(s,o){return"".concat(o,"px ").concat(s-o,"px")}),Gn(r,"getStrokeDasharray",function(s,o,l){var c=l.reduce(function(y,x){return y+x});if(!c)return r.generateSimpleStrokeDasharray(o,s);for(var d=Math.floor(s/c),f=s%c,h=o-s,p=[],g=0,m=0;g<l.length;m+=l[g],++g)if(m+l[g]>f){p=[].concat(jl(l.slice(0,g)),[f-m]);break}var v=p.length%2===0?[0,h]:[h];return[].concat(jl(t.repeat(l,d)),jl(p),v).map(function(y){return"".concat(y,"px")}).join(", ")}),Gn(r,"id",cl("recharts-line-")),Gn(r,"pathRef",function(s){r.mainCurve=s}),Gn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Gn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return s_e(t,e),r_e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.points,o=a.xAxis,l=a.yAxis,c=a.layout,d=a.children,f=sn(d,Sh);if(!f)return null;var h=function(m,v){return{x:m.x,y:m.y,value:m.value,errorVal:kt(m.payload,v)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(Le,p,f.map(function(g){return k.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:s,xAxis:o,yAxis:l,layout:c,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.dot,c=o.points,d=o.dataKey,f=ye(this.props,!1),h=ye(l,!0),p=c.map(function(m,v){var y=Gr(Gr(Gr({key:"dot-".concat(v),r:3},f),h),{},{index:v,cx:m.x,cy:m.y,value:m.value,dataKey:d,payload:m.payload,points:c});return t.renderDotItem(l,y)}),g={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(Le,Fd({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,i,a,s){var o=this.props,l=o.type,c=o.layout,d=o.connectNulls;o.ref;var f=mP(o,G1e),h=Gr(Gr(Gr({},ye(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},s),{},{type:l,layout:c,connectNulls:d});return k.createElement(Mo,Fd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,s=this.props,o=s.points,l=s.strokeDasharray,c=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=s.animateNewValues,m=s.width,v=s.height,y=this.state,x=y.prevPoints,b=y.totalLength;return k.createElement(ci,{begin:d,duration:f,isActive:c,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var _=S.t;if(x){var j=x.length/o.length,N=o.map(function(T,$){var O=Math.floor($*j);if(x[O]){var R=x[O],M=qt(R.x,T.x),F=qt(R.y,T.y);return Gr(Gr({},T),{},{x:M(_),y:F(_)})}if(g){var D=qt(m*2,T.x),I=qt(v/2,T.y);return Gr(Gr({},T),{},{x:D(_),y:I(_)})}return Gr(Gr({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(N,n,i)}var A=qt(0,b),E=A(_),C;if(l){var P="".concat(l).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});C=a.getStrokeDasharray(E,b,P)}else C=a.generateSimpleStrokeDasharray(b,E);return a.renderCurveStatically(o,n,i,{strokeDasharray:C})})}},{key:"renderCurve",value:function(n,i){var a=this.props,s=a.points,o=a.isAnimationActive,l=this.state,c=l.prevPoints,d=l.totalLength;return o&&s&&s.length&&(!c&&d>0||!el(c,s))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,o=i.points,l=i.className,c=i.xAxis,d=i.yAxis,f=i.top,h=i.left,p=i.width,g=i.height,m=i.isAnimationActive,v=i.id;if(a||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=o.length===1,b=Te("recharts-line",l),S=c&&c.allowDataOverflow,_=d&&d.allowDataOverflow,j=S||_,N=Ee(v)?this.id:v,A=(n=ye(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=A.r,C=E===void 0?3:E,P=A.strokeWidth,T=P===void 0?2:P,$=YM(s)?s:{},O=$.clipDot,R=O===void 0?!0:O,M=C*2+T;return k.createElement(Le,{className:b},S||_?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(N)},k.createElement("rect",{x:S?h:h-p/2,y:_?f:f-g/2,width:S?p:p*2,height:_?g:g*2})),!R&&k.createElement("clipPath",{id:"clipPath-dots-".concat(N)},k.createElement("rect",{x:h-M/2,y:f-M/2,width:p+M,height:g+M}))):null,!x&&this.renderCurve(j,N),this.renderErrorBar(j,N),(x||s)&&this.renderDots(j,R,N),(!m||y)&&ki.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(jl(n),[0]):n,s=[],o=0;o<i;++o)s=[].concat(jl(s),jl(a));return s}},{key:"renderDotItem",value:function(n,i){var a;if(k.isValidElement(n))a=k.cloneElement(n,i);else if(Se(n))a=n(i);else{var s=i.key,o=mP(i,Y1e),l=Te("recharts-line-dot",typeof n!="boolean"?n.className:"");a=k.createElement(jh,Fd({key:s},o,{className:l}))}return a}}])}(w.PureComponent);Gn(Ro,"displayName","Line");Gn(Ro,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ls.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Gn(Ro,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.dataKey,o=e.bandSize,l=e.displayedData,c=e.offset,d=t.layout,f=l.map(function(h,p){var g=kt(h,s);return d==="horizontal"?{x:pg({axis:r,ticks:i,bandSize:o,entry:h,index:p}),y:Ee(g)?null:n.scale(g),value:g,payload:h}:{x:Ee(g)?null:r.scale(g),y:pg({axis:n,ticks:a,bandSize:o,entry:h,index:p}),value:g,payload:h}});return Gr({points:f,layout:d},c)});var l_e=["layout","type","stroke","connectNulls","isRange","ref"],c_e=["key"],sD;function Yc(e){"@babel/helpers - typeof";return Yc=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},Yc(e)}function oD(e,t){if(e==null)return{};var r=u_e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function u_e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mo(){return mo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mo.apply(this,arguments)}function vP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vP(Object(r),!0).forEach(function(n){ji(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cD(n.key),n)}}function f_e(e,t,r){return t&&xP(e.prototype,t),r&&xP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h_e(e,t,r){return t=Lg(t),p_e(e,lD()?Reflect.construct(t,r||[],Lg(e).constructor):t.apply(e,r))}function p_e(e,t){if(t&&(Yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m_e(e)}function m_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lD=function(){return!!e})()}function Lg(e){return Lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lg(e)}function g_e(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&&b1(e,t)}function b1(e,t){return b1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},b1(e,t)}function ji(e,t,r){return t=cD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cD(e){var t=y_e(e,"string");return Yc(t)=="symbol"?t:t+""}function y_e(e,t){if(Yc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var va=function(e){function t(){var r;d_e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=h_e(this,t,[].concat(i)),ji(r,"state",{isAnimationFinished:!0}),ji(r,"id",cl("recharts-area-")),ji(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Se(s)&&s()}),ji(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Se(s)&&s()}),r}return g_e(t,e),f_e(t,[{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(s&&!o)return null;var l=this.props,c=l.dot,d=l.points,f=l.dataKey,h=ye(this.props,!1),p=ye(c,!0),g=d.map(function(v,y){var x=Ra(Ra(Ra({key:"dot-".concat(y),r:3},h),p),{},{index:y,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:d});return t.renderDotItem(c,x)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(Le,mo({className:"recharts-area-dots"},m),g)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,o=i.strokeWidth,l=s[0].x,c=s[s.length-1].x,d=n*Math.abs(l-c),f=os(s.map(function(h){return h.y||0}));return J(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(os(a.map(function(h){return h.y||0})),f)),J(f)?k.createElement("rect",{x:l<c?l:l-d,y:0,width:d,height:Math.floor(f+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,o=i.strokeWidth,l=s[0].y,c=s[s.length-1].y,d=n*Math.abs(l-c),f=os(s.map(function(h){return h.x||0}));return J(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(os(a.map(function(h){return h.x||0})),f)),J(f)?k.createElement("rect",{x:0,y:l<c?l:l-d,width:f+(o?parseInt("".concat(o),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,s){var o=this.props,l=o.layout,c=o.type,d=o.stroke,f=o.connectNulls,h=o.isRange;o.ref;var p=oD(o,l_e);return k.createElement(Le,{clipPath:a?"url(#clipPath-".concat(s,")"):null},k.createElement(Mo,mo({},ye(p,!0),{points:n,connectNulls:f,type:c,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),d!=="none"&&k.createElement(Mo,mo({},ye(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:n})),d!=="none"&&h&&k.createElement(Mo,mo({},ye(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,s=this.props,o=s.points,l=s.baseLine,c=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=this.state,m=g.prevPoints,v=g.prevBaseLine;return k.createElement(ci,{begin:d,duration:f,isActive:c,easing:h,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var x=y.t;if(m){var b=m.length/o.length,S=o.map(function(A,E){var C=Math.floor(E*b);if(m[C]){var P=m[C],T=qt(P.x,A.x),$=qt(P.y,A.y);return Ra(Ra({},A),{},{x:T(x),y:$(x)})}return A}),_;if(J(l)&&typeof l=="number"){var j=qt(v,l);_=j(x)}else if(Ee(l)||wu(l)){var N=qt(v,0);_=N(x)}else _=l.map(function(A,E){var C=Math.floor(E*b);if(v[C]){var P=v[C],T=qt(P.x,A.x),$=qt(P.y,A.y);return Ra(Ra({},A),{},{x:T(x),y:$(x)})}return A});return a.renderAreaStatically(S,_,n,i)}return k.createElement(Le,null,k.createElement("defs",null,k.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(x))),k.createElement(Le,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(o,l,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,s=a.points,o=a.baseLine,l=a.isAnimationActive,c=this.state,d=c.prevPoints,f=c.prevBaseLine,h=c.totalLength;return l&&s&&s.length&&(!d&&h>0||!el(d,s)||!el(f,o))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(s,o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,o=i.points,l=i.className,c=i.top,d=i.left,f=i.xAxis,h=i.yAxis,p=i.width,g=i.height,m=i.isAnimationActive,v=i.id;if(a||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=o.length===1,b=Te("recharts-area",l),S=f&&f.allowDataOverflow,_=h&&h.allowDataOverflow,j=S||_,N=Ee(v)?this.id:v,A=(n=ye(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=A.r,C=E===void 0?3:E,P=A.strokeWidth,T=P===void 0?2:P,$=YM(s)?s:{},O=$.clipDot,R=O===void 0?!0:O,M=C*2+T;return k.createElement(Le,{className:b},S||_?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(N)},k.createElement("rect",{x:S?d:d-p/2,y:_?c:c-g/2,width:S?p:p*2,height:_?g:g*2})),!R&&k.createElement("clipPath",{id:"clipPath-dots-".concat(N)},k.createElement("rect",{x:d-M/2,y:c-M/2,width:p+M,height:g+M}))):null,x?null:this.renderArea(j,N),(s||x)&&this.renderDots(j,R,N),(!m||y)&&ki.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(w.PureComponent);sD=va;ji(va,"displayName","Area");ji(va,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ls.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ji(va,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,s=t.props.baseValue,o=s??a;if(J(o)&&typeof o=="number")return o;var l=i==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var d=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(c[0],c[1]),0)}return o==="dataMin"?c[0]:o==="dataMax"?c[1]:c[0]});ji(va,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,s=e.yAxisTicks,o=e.bandSize,l=e.dataKey,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,g=c&&c.length,m=sD.getBaseValue(t,r,n,i),v=p==="horizontal",y=!1,x=f.map(function(S,_){var j;g?j=c[d+_]:(j=kt(S,l),Array.isArray(j)?y=!0:j=[m,j]);var N=j[1]==null||g&&kt(S,l)==null;return v?{x:pg({axis:n,ticks:a,bandSize:o,entry:S,index:_}),y:N?null:i.scale(j[1]),value:j,payload:S}:{x:N?null:n.scale(j[1]),y:pg({axis:i,ticks:s,bandSize:o,entry:S,index:_}),value:j,payload:S}}),b;return g||y?b=x.map(function(S){var _=Array.isArray(S.value)?S.value[0]:null;return v?{x:S.x,y:_!=null&&S.y!=null?i.scale(_):null}:{x:_!=null?n.scale(_):null,y:S.y}}):b=v?i.scale(m):n.scale(m),Ra({points:x,baseLine:b,layout:p,isRange:y},h)});ji(va,"renderDotItem",function(e,t){var r;if(k.isValidElement(e))r=k.cloneElement(e,t);else if(Se(e))r=e(t);else{var n=Te("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=oD(t,c_e);r=k.createElement(jh,mo({},a,{key:i,className:n}))}return r});function Xc(e){"@babel/helpers - typeof";return Xc=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},Xc(e)}function v_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x_e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fD(n.key),n)}}function b_e(e,t,r){return t&&x_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function w_e(e,t,r){return t=Fg(t),__e(e,uD()?Reflect.construct(t,r||[],Fg(e).constructor):t.apply(e,r))}function __e(e,t){if(t&&(Xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S_e(e)}function S_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uD=function(){return!!e})()}function Fg(e){return Fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fg(e)}function j_e(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&&w1(e,t)}function w1(e,t){return w1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},w1(e,t)}function dD(e,t,r){return t=fD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fD(e){var t=N_e(e,"string");return Xc(t)=="symbol"?t:t+""}function N_e(e,t){if(Xc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function _1(){return _1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_1.apply(this,arguments)}function E_e(e){var t=e.xAxisId,r=xj(),n=bj(),i=qI(t);return i==null?null:w.createElement(Ou,_1({},i,{className:Te("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return ea(s,!0)}}))}var ta=function(e){function t(){return v_e(this,t),w_e(this,t,arguments)}return j_e(t,e),b_e(t,[{key:"render",value:function(){return w.createElement(E_e,this.props)}}])}(w.Component);dD(ta,"displayName","XAxis");dD(ta,"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 Zc(e){"@babel/helpers - typeof";return Zc=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},Zc(e)}function O_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A_e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mD(n.key),n)}}function k_e(e,t,r){return t&&A_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function P_e(e,t,r){return t=Bg(t),T_e(e,hD()?Reflect.construct(t,r||[],Bg(e).constructor):t.apply(e,r))}function T_e(e,t){if(t&&(Zc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C_e(e)}function C_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hD=function(){return!!e})()}function Bg(e){return Bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bg(e)}function $_e(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&&S1(e,t)}function S1(e,t){return S1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},S1(e,t)}function pD(e,t,r){return t=mD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mD(e){var t=M_e(e,"string");return Zc(t)=="symbol"?t:t+""}function M_e(e,t){if(Zc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function j1(){return j1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j1.apply(this,arguments)}var R_e=function(t){var r=t.yAxisId,n=xj(),i=bj(),a=KI(r);return a==null?null:w.createElement(Ou,j1({},a,{className:Te("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(o){return ea(o,!0)}}))},ra=function(e){function t(){return O_e(this,t),P_e(this,t,arguments)}return $_e(t,e),k_e(t,[{key:"render",value:function(){return w.createElement(R_e,this.props)}}])}(w.Component);pD(ra,"displayName","YAxis");pD(ra,"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 bP(e){return F_e(e)||L_e(e)||D_e(e)||I_e()}function I_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D_e(e,t){if(e){if(typeof e=="string")return N1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N1(e,t)}}function L_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F_e(e){if(Array.isArray(e))return N1(e)}function N1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var E1=function(t,r,n,i,a){var s=sn(t,_j),o=sn(t,Sv),l=[].concat(bP(s),bP(o)),c=sn(t,Nv),d="".concat(i,"Id"),f=i[0],h=r;if(l.length&&(h=l.reduce(function(m,v){if(v.props[d]===n&&Pi(v.props,"extendDomain")&&J(v.props[f])){var y=v.props[f];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},h)),c.length){var p="".concat(f,"1"),g="".concat(f,"2");h=c.reduce(function(m,v){if(v.props[d]===n&&Pi(v.props,"extendDomain")&&J(v.props[p])&&J(v.props[g])){var y=v.props[p],x=v.props[g];return[Math.min(m[0],y,x),Math.max(m[1],y,x)]}return m},h)}return a&&a.length&&(h=a.reduce(function(m,v){return J(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},h)),h},gD={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function a(l,c,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new i(d,f||l,h),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],d,f;if(this._eventsCount===0)return c;for(f in d=this._events)t.call(d,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},o.prototype.listeners=function(c){var d=r?r+c:c,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},o.prototype.listenerCount=function(c){var d=r?r+c:c,f=this._events[d];return f?f.fn?1:f.length:0},o.prototype.emit=function(c,d,f,h,p,g){var m=r?r+c:c;if(!this._events[m])return!1;var v=this._events[m],y=arguments.length,x,b;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,h),!0;case 5:return v.fn.call(v.context,d,f,h,p),!0;case 6:return v.fn.call(v.context,d,f,h,p,g),!0}for(b=1,x=new Array(y-1);b<y;b++)x[b-1]=arguments[b];v.fn.apply(v.context,x)}else{var S=v.length,_;for(b=0;b<S;b++)switch(v[b].once&&this.removeListener(c,v[b].fn,void 0,!0),y){case 1:v[b].fn.call(v[b].context);break;case 2:v[b].fn.call(v[b].context,d);break;case 3:v[b].fn.call(v[b].context,d,f);break;case 4:v[b].fn.call(v[b].context,d,f,h);break;default:if(!x)for(_=1,x=new Array(y-1);_<y;_++)x[_-1]=arguments[_];v[b].fn.apply(v[b].context,x)}}return!0},o.prototype.on=function(c,d,f){return a(this,c,d,f,!1)},o.prototype.once=function(c,d,f){return a(this,c,d,f,!0)},o.prototype.removeListener=function(c,d,f,h){var p=r?r+c:c;if(!this._events[p])return this;if(!d)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&s(this,p);else{for(var m=0,v=[],y=g.length;m<y;m++)(g[m].fn!==d||h&&!g[m].once||f&&g[m].context!==f)&&v.push(g[m]);v.length?this._events[p]=v.length===1?v[0]:v:s(this,p)}return this},o.prototype.removeAllListeners=function(c){var d;return c?(d=r?r+c:c,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(gD);var B_e=gD.exports;const z_e=Xe(B_e);var nx=new z_e,ix="recharts.syncMouseEvents";function Xf(e){"@babel/helpers - typeof";return Xf=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},Xf(e)}function U_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W_e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yD(n.key),n)}}function V_e(e,t,r){return t&&W_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ax(e,t,r){return t=yD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yD(e){var t=H_e(e,"string");return Xf(t)=="symbol"?t:t+""}function H_e(e,t){if(Xf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var q_e=function(){function e(){U_e(this,e),ax(this,"activeIndex",0),ax(this,"coordinateList",[]),ax(this,"layout","horizontal")}return V_e(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,s=r.container,o=s===void 0?null:s,l=r.layout,c=l===void 0?null:l,d=r.offset,f=d===void 0?null:d,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=o??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??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(r){if(this.coordinateList.length!==0)switch(r.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(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,o=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=a+l+c,h=s+this.offset.top+o/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function K_e(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&J(n)&&J(i))return!0}return!1}function G_e(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function vD(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,s=ct(t,r,n,i),o=ct(t,r,n,a);return{points:[s,o],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function Y_e(e,t,r){var n,i,a,s;if(e==="horizontal")n=t.x,a=n,i=r.top,s=r.top+r.height;else if(e==="vertical")i=t.y,s=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,l=t.cy,c=t.innerRadius,d=t.outerRadius,f=t.angle,h=ct(o,l,c,f),p=ct(o,l,d,f);n=h.x,i=h.y,a=p.x,s=p.y}else return vD(t);return[{x:n,y:i},{x:a,y:s}]}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 wP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){X_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X_e(e,t,r){return t=Z_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z_e(e){var t=Q_e(e,"string");return Zf(t)=="symbol"?t:t+""}function Q_e(e,t){if(Zf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J_e(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,s=e.activeCoordinate,o=e.activePayload,l=e.offset,c=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!a||!s||h!=="ScatterChart"&&i!=="axis")return null;var g,m=Mo;if(h==="ScatterChart")g=s,m=o0e;else if(h==="BarChart")g=G_e(f,s,l,d),m=pj;else if(f==="radial"){var v=vD(s),y=v.cx,x=v.cy,b=v.radius,S=v.startAngle,_=v.endAngle;g={cx:y,cy:x,startAngle:S,endAngle:_,innerRadius:b,outerRadius:b},m=dI}else g={points:Y_e(f,s,l)},m=Mo;var j=gp(gp(gp(gp({stroke:"#ccc",pointerEvents:"none"},l),g),ye(p,!1)),{},{payload:o,payloadIndex:c,className:Te("recharts-tooltip-cursor",p.className)});return w.isValidElement(p)?w.cloneElement(p,j):w.createElement(m,j)}var eSe=["item"],tSe=["children","className","width","height","style","compact","title","desc"];function Qc(e){"@babel/helpers - typeof";return Qc=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},Qc(e)}function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hl.apply(this,arguments)}function _P(e,t){return iSe(e)||nSe(e,t)||bD(e,t)||rSe()}function rSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function iSe(e){if(Array.isArray(e))return e}function SP(e,t){if(e==null)return{};var r=aSe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function aSe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wD(n.key),n)}}function lSe(e,t,r){return t&&oSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cSe(e,t,r){return t=zg(t),uSe(e,xD()?Reflect.construct(t,r||[],zg(e).constructor):t.apply(e,r))}function uSe(e,t){if(t&&(Qc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dSe(e)}function dSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xD=function(){return!!e})()}function zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zg(e)}function fSe(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&&O1(e,t)}function O1(e,t){return O1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},O1(e,t)}function Jc(e){return mSe(e)||pSe(e)||bD(e)||hSe()}function hSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bD(e,t){if(e){if(typeof e=="string")return A1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A1(e,t)}}function pSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mSe(e){if(Array.isArray(e))return A1(e)}function A1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _e(e,t,r){return t=wD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wD(e){var t=gSe(e,"string");return Qc(t)=="symbol"?t:t+""}function gSe(e,t){if(Qc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ySe={xAxis:["bottom","top"],yAxis:["left","right"]},vSe={width:"100%",height:"100%"},_D={x:0,y:0};function yp(e){return e}var xSe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},bSe=function(t,r,n,i){var a=r.find(function(d){return d&&d.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var s=a.coordinate,o=i.radius;return K(K(K({},i),ct(i.cx,i.cy,o,s)),{},{angle:s,radius:o})}var l=a.coordinate,c=i.angle;return K(K(K({},i),ct(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return _D},Ev=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,s=(n??[]).reduce(function(o,l){var c=l.props.data;return c&&c.length?[].concat(Jc(o),Jc(c)):o},[]);return s.length>0?s:t&&t.length&&J(i)&&J(a)?t.slice(i,a+1):[]};function SD(e){return e==="number"?[0,"auto"]:void 0}var k1=function(t,r,n,i){var a=t.graphicalItems,s=t.tooltipAxis,o=Ev(r,t);return n<0||!a||!a.length||n>=o.length?null:a.reduce(function(l,c){var d,f=(d=c.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?o:f;h=Wm(p,s.dataKey,i)}else h=f&&f[n]||o[n];return h?[].concat(Jc(l),[aI(c,h)]):l},[])},NP=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},s=xSe(a,n),o=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,d=Tme(s,o,c,l);if(d>=0&&c){var f=c[d]&&c[d].value,h=k1(t,r,d,f),p=bSe(n,o,d,a);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},wSe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,o=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=JR(d,a);return n.reduce(function(g,m){var v,y=m.type.defaultProps!==void 0?K(K({},m.type.defaultProps),m.props):m.props,x=y.type,b=y.dataKey,S=y.allowDataOverflow,_=y.allowDuplicatedCategory,j=y.scale,N=y.ticks,A=y.includeHidden,E=y[s];if(g[E])return g;var C=Ev(t.data,{graphicalItems:i.filter(function(U){var G,X=s in U.props?U.props[s]:(G=U.type.defaultProps)===null||G===void 0?void 0:G[s];return X===E}),dataStartIndex:l,dataEndIndex:c}),P=C.length,T,$,O;K_e(y.domain,S,x)&&(T=Uw(y.domain,null,S),p&&(x==="number"||j!=="auto")&&(O=Rd(C,b,"category")));var R=SD(x);if(!T||T.length===0){var M,F=(M=y.domain)!==null&&M!==void 0?M:R;if(b){if(T=Rd(C,b,x),x==="category"&&p){var D=Hee(T);_&&D?($=T,T=Og(0,P)):_||(T=HA(F,T,m).reduce(function(U,G){return U.indexOf(G)>=0?U:[].concat(Jc(U),[G])},[]))}else if(x==="category")_?T=T.filter(function(U){return U!==""&&!Ee(U)}):T=HA(F,T,m).reduce(function(U,G){return U.indexOf(G)>=0||G===""||Ee(G)?U:[].concat(Jc(U),[G])},[]);else if(x==="number"){var I=Ime(C,i.filter(function(U){var G,X,ne=s in U.props?U.props[s]:(G=U.type.defaultProps)===null||G===void 0?void 0:G[s],ue="hide"in U.props?U.props.hide:(X=U.type.defaultProps)===null||X===void 0?void 0:X.hide;return ne===E&&(A||!ue)}),b,a,d);I&&(T=I)}p&&(x==="number"||j!=="auto")&&(O=Rd(C,b,"category"))}else p?T=Og(0,P):o&&o[E]&&o[E].hasStack&&x==="number"?T=h==="expand"?[0,1]:iI(o[E].stackGroups,l,c):T=QR(C,i.filter(function(U){var G=s in U.props?U.props[s]:U.type.defaultProps[s],X="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return G===E&&(A||!X)}),x,d,!0);if(x==="number")T=E1(f,T,E,a,N),F&&(T=Uw(F,T,S));else if(x==="category"&&F){var L=F,W=T.every(function(U){return L.indexOf(U)>=0});W&&(T=L)}}return K(K({},g),{},_e({},E,K(K({},y),{},{axisType:a,domain:T,categoricalDomain:O,duplicateDomain:$,originalDomain:(v=y.domain)!==null&&v!==void 0?v:R,isCategorical:p,layout:d})))},{})},_Se=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,o=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,f=t.children,h=Ev(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),p=h.length,g=JR(d,a),m=-1;return n.reduce(function(v,y){var x=y.type.defaultProps!==void 0?K(K({},y.type.defaultProps),y.props):y.props,b=x[s],S=SD("number");if(!v[b]){m++;var _;return g?_=Og(0,p):o&&o[b]&&o[b].hasStack?(_=iI(o[b].stackGroups,l,c),_=E1(f,_,b,a)):(_=Uw(S,QR(h,n.filter(function(j){var N,A,E=s in j.props?j.props[s]:(N=j.type.defaultProps)===null||N===void 0?void 0:N[s],C="hide"in j.props?j.props.hide:(A=j.type.defaultProps)===null||A===void 0?void 0:A.hide;return E===b&&!C}),"number",d),i.defaultProps.allowDataOverflow),_=E1(f,_,b,a)),K(K({},v),{},_e({},b,K(K({axisType:a},i.defaultProps),{},{hide:!0,orientation:an(ySe,"".concat(a,".").concat(m%2),null),domain:_,originalDomain:S,isCategorical:g,layout:d})))}return v},{})},SSe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,o=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,d=t.children,f="".concat(i,"Id"),h=sn(d,a),p={};return h&&h.length?p=wSe(t,{axes:h,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:o,dataStartIndex:l,dataEndIndex:c}):s&&s.length&&(p=_Se(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:o,dataStartIndex:l,dataEndIndex:c})),p},jSe=function(t){var r=Ha(t),n=ea(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:VS(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:mg(r,n)}},EP=function(t){var r=t.children,n=t.defaultShowTooltip,i=Qr(r,Uc),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},NSe=function(t){return!t||!t.length?!1:t.some(function(r){var n=aa(r&&r.type);return n&&n.indexOf("Bar")>=0})},OP=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"}},ESe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,o=t.yAxisMap,l=o===void 0?{}:o,c=n.width,d=n.height,f=n.children,h=n.margin||{},p=Qr(f,Uc),g=Qr(f,Ss),m=Object.keys(l).reduce(function(_,j){var N=l[j],A=N.orientation;return!N.mirror&&!N.hide?K(K({},_),{},_e({},A,_[A]+N.width)):_},{left:h.left||0,right:h.right||0}),v=Object.keys(s).reduce(function(_,j){var N=s[j],A=N.orientation;return!N.mirror&&!N.hide?K(K({},_),{},_e({},A,an(_,"".concat(A))+N.height)):_},{top:h.top||0,bottom:h.bottom||0}),y=K(K({},v),m),x=y.bottom;p&&(y.bottom+=p.props.height||Uc.defaultProps.height),g&&r&&(y=Mme(y,i,n,r));var b=c-y.left-y.right,S=d-y.top-y.bottom;return K(K({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(S,0)})},OSe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Ov=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,o=s===void 0?["axis"]:s,l=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(y,x){var b=x.graphicalItems,S=x.stackGroups,_=x.offset,j=x.updateId,N=x.dataStartIndex,A=x.dataEndIndex,E=y.barSize,C=y.layout,P=y.barGap,T=y.barCategoryGap,$=y.maxBarSize,O=OP(C),R=O.numericAxisName,M=O.cateAxisName,F=NSe(b),D=[];return b.forEach(function(I,L){var W=Ev(y.data,{graphicalItems:[I],dataStartIndex:N,dataEndIndex:A}),U=I.type.defaultProps!==void 0?K(K({},I.type.defaultProps),I.props):I.props,G=U.dataKey,X=U.maxBarSize,ne=U["".concat(R,"Id")],ue=U["".concat(M,"Id")],we={},je=l.reduce(function(V,q){var ie=x["".concat(q.axisType,"Map")],te=U["".concat(q.axisType,"Id")];ie&&ie[te]||q.axisType==="zAxis"||rl();var Q=ie[te];return K(K({},V),{},_e(_e({},q.axisType,Q),"".concat(q.axisType,"Ticks"),ea(Q)))},we),Z=je[M],ae=je["".concat(M,"Ticks")],ge=S&&S[ne]&&S[ne].hasStack&&Hme(I,S[ne].stackGroups),Y=aa(I.type).indexOf("Bar")>=0,$e=mg(Z,ae),xe=[],Ae=F&&Cme({barSize:E,stackGroups:S,totalSize:OSe(je,M)});if(Y){var Be,Oe,de=Ee(X)?$:X,dt=(Be=(Oe=mg(Z,ae,!0))!==null&&Oe!==void 0?Oe:de)!==null&&Be!==void 0?Be:0;xe=$me({barGap:P,barCategoryGap:T,bandSize:dt!==$e?dt:$e,sizeList:Ae[ue],maxBarSize:de}),dt!==$e&&(xe=xe.map(function(V){return K(K({},V),{},{position:K(K({},V.position),{},{offset:V.position.offset-dt/2})})}))}var B=I&&I.type&&I.type.getComposedData;B&&D.push({props:K(K({},B(K(K({},je),{},{displayedData:W,props:y,dataKey:G,item:I,bandSize:$e,barPosition:xe,offset:_,stackedData:ge,layout:C,dataStartIndex:N,dataEndIndex:A}))),{},_e(_e(_e({key:I.key||"item-".concat(L)},R,je[R]),M,je[M]),"animationId",j)),childIndex:nte(I,y.children),item:I})}),D},p=function(y,x){var b=y.props,S=y.dataStartIndex,_=y.dataEndIndex,j=y.updateId;if(!GE({props:b}))return null;var N=b.children,A=b.layout,E=b.stackOffset,C=b.data,P=b.reverseStackOrder,T=OP(A),$=T.numericAxisName,O=T.cateAxisName,R=sn(N,n),M=Wme(C,R,"".concat($,"Id"),"".concat(O,"Id"),E,P),F=l.reduce(function(U,G){var X="".concat(G.axisType,"Map");return K(K({},U),{},_e({},X,SSe(b,K(K({},G),{},{graphicalItems:R,stackGroups:G.axisType===$&&M,dataStartIndex:S,dataEndIndex:_}))))},{}),D=ESe(K(K({},F),{},{props:b,graphicalItems:R}),x==null?void 0:x.legendBBox);Object.keys(F).forEach(function(U){F[U]=d(b,F[U],D,U.replace("Map",""),r)});var I=F["".concat(O,"Map")],L=jSe(I),W=h(b,K(K({},F),{},{dataStartIndex:S,dataEndIndex:_,updateId:j,graphicalItems:R,stackGroups:M,offset:D}));return K(K({formattedGraphicalItems:W,graphicalItems:R,offset:D,stackGroups:M},L),F)},g=function(v){function y(x){var b,S,_;return sSe(this,y),_=cSe(this,y,[x]),_e(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_e(_,"accessibilityManager",new q_e),_e(_,"handleLegendBBoxUpdate",function(j){if(j){var N=_.state,A=N.dataStartIndex,E=N.dataEndIndex,C=N.updateId;_.setState(K({legendBBox:j},p({props:_.props,dataStartIndex:A,dataEndIndex:E,updateId:C},K(K({},_.state),{},{legendBBox:j}))))}}),_e(_,"handleReceiveSyncEvent",function(j,N,A){if(_.props.syncId===j){if(A===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(N)}}),_e(_,"handleBrushChange",function(j){var N=j.startIndex,A=j.endIndex;if(N!==_.state.dataStartIndex||A!==_.state.dataEndIndex){var E=_.state.updateId;_.setState(function(){return K({dataStartIndex:N,dataEndIndex:A},p({props:_.props,dataStartIndex:N,dataEndIndex:A,updateId:E},_.state))}),_.triggerSyncEvent({dataStartIndex:N,dataEndIndex:A})}}),_e(_,"handleMouseEnter",function(j){var N=_.getMouseInfo(j);if(N){var A=K(K({},N),{},{isTooltipActive:!0});_.setState(A),_.triggerSyncEvent(A);var E=_.props.onMouseEnter;Se(E)&&E(A,j)}}),_e(_,"triggeredAfterMouseMove",function(j){var N=_.getMouseInfo(j),A=N?K(K({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(A),_.triggerSyncEvent(A);var E=_.props.onMouseMove;Se(E)&&E(A,j)}),_e(_,"handleItemMouseEnter",function(j){_.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),_e(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),_e(_,"handleMouseMove",function(j){j.persist(),_.throttleTriggeredAfterMouseMove(j)}),_e(_,"handleMouseLeave",function(j){_.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};_.setState(N),_.triggerSyncEvent(N);var A=_.props.onMouseLeave;Se(A)&&A(N,j)}),_e(_,"handleOuterEvent",function(j){var N=rte(j),A=an(_.props,"".concat(N));if(N&&Se(A)){var E,C;/.*touch.*/i.test(N)?C=_.getMouseInfo(j.changedTouches[0]):C=_.getMouseInfo(j),A((E=C)!==null&&E!==void 0?E:{},j)}}),_e(_,"handleClick",function(j){var N=_.getMouseInfo(j);if(N){var A=K(K({},N),{},{isTooltipActive:!0});_.setState(A),_.triggerSyncEvent(A);var E=_.props.onClick;Se(E)&&E(A,j)}}),_e(_,"handleMouseDown",function(j){var N=_.props.onMouseDown;if(Se(N)){var A=_.getMouseInfo(j);N(A,j)}}),_e(_,"handleMouseUp",function(j){var N=_.props.onMouseUp;if(Se(N)){var A=_.getMouseInfo(j);N(A,j)}}),_e(_,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),_e(_,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.handleMouseDown(j.changedTouches[0])}),_e(_,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&_.handleMouseUp(j.changedTouches[0])}),_e(_,"handleDoubleClick",function(j){var N=_.props.onDoubleClick;if(Se(N)){var A=_.getMouseInfo(j);N(A,j)}}),_e(_,"handleContextMenu",function(j){var N=_.props.onContextMenu;if(Se(N)){var A=_.getMouseInfo(j);N(A,j)}}),_e(_,"triggerSyncEvent",function(j){_.props.syncId!==void 0&&nx.emit(ix,_.props.syncId,j,_.eventEmitterSymbol)}),_e(_,"applySyncEvent",function(j){var N=_.props,A=N.layout,E=N.syncMethod,C=_.state.updateId,P=j.dataStartIndex,T=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)_.setState(K({dataStartIndex:P,dataEndIndex:T},p({props:_.props,dataStartIndex:P,dataEndIndex:T,updateId:C},_.state)));else if(j.activeTooltipIndex!==void 0){var $=j.chartX,O=j.chartY,R=j.activeTooltipIndex,M=_.state,F=M.offset,D=M.tooltipTicks;if(!F)return;if(typeof E=="function")R=E(D,j);else if(E==="value"){R=-1;for(var I=0;I<D.length;I++)if(D[I].value===j.activeLabel){R=I;break}}var L=K(K({},F),{},{x:F.left,y:F.top}),W=Math.min($,L.x+L.width),U=Math.min(O,L.y+L.height),G=D[R]&&D[R].value,X=k1(_.state,_.props.data,R),ne=D[R]?{x:A==="horizontal"?D[R].coordinate:W,y:A==="horizontal"?U:D[R].coordinate}:_D;_.setState(K(K({},j),{},{activeLabel:G,activeCoordinate:ne,activePayload:X,activeTooltipIndex:R}))}else _.setState(j)}),_e(_,"renderCursor",function(j){var N,A=_.state,E=A.isTooltipActive,C=A.activeCoordinate,P=A.activePayload,T=A.offset,$=A.activeTooltipIndex,O=A.tooltipAxisBandSize,R=_.getTooltipEventType(),M=(N=j.props.active)!==null&&N!==void 0?N:E,F=_.props.layout,D=j.key||"_recharts-cursor";return k.createElement(J_e,{key:D,activeCoordinate:C,activePayload:P,activeTooltipIndex:$,chartName:r,element:j,isActive:M,layout:F,offset:T,tooltipAxisBandSize:O,tooltipEventType:R})}),_e(_,"renderPolarAxis",function(j,N,A){var E=an(j,"type.axisType"),C=an(_.state,"".concat(E,"Map")),P=j.type.defaultProps,T=P!==void 0?K(K({},P),j.props):j.props,$=C&&C[T["".concat(E,"Id")]];return w.cloneElement(j,K(K({},$),{},{className:Te(E,$.className),key:j.key||"".concat(N,"-").concat(A),ticks:ea($,!0)}))}),_e(_,"renderPolarGrid",function(j){var N=j.props,A=N.radialLines,E=N.polarAngles,C=N.polarRadius,P=_.state,T=P.radiusAxisMap,$=P.angleAxisMap,O=Ha(T),R=Ha($),M=R.cx,F=R.cy,D=R.innerRadius,I=R.outerRadius;return w.cloneElement(j,{polarAngles:Array.isArray(E)?E:ea(R,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(C)?C:ea(O,!0).map(function(L){return L.coordinate}),cx:M,cy:F,innerRadius:D,outerRadius:I,key:j.key||"polar-grid",radialLines:A})}),_e(_,"renderLegend",function(){var j=_.state.formattedGraphicalItems,N=_.props,A=N.children,E=N.width,C=N.height,P=_.props.margin||{},T=E-(P.left||0)-(P.right||0),$=XR({children:A,formattedGraphicalItems:j,legendWidth:T,legendContent:c});if(!$)return null;var O=$.item,R=SP($,eSe);return w.cloneElement(O,K(K({},R),{},{chartWidth:E,chartHeight:C,margin:P,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),_e(_,"renderTooltip",function(){var j,N=_.props,A=N.children,E=N.accessibilityLayer,C=Qr(A,Ir);if(!C)return null;var P=_.state,T=P.isTooltipActive,$=P.activeCoordinate,O=P.activePayload,R=P.activeLabel,M=P.offset,F=(j=C.props.active)!==null&&j!==void 0?j:T;return w.cloneElement(C,{viewBox:K(K({},M),{},{x:M.left,y:M.top}),active:F,label:R,payload:F?O:[],coordinate:$,accessibilityLayer:E})}),_e(_,"renderBrush",function(j){var N=_.props,A=N.margin,E=N.data,C=_.state,P=C.offset,T=C.dataStartIndex,$=C.dataEndIndex,O=C.updateId;return w.cloneElement(j,{key:j.key||"_recharts-brush",onChange:fp(_.handleBrushChange,j.props.onChange),data:E,x:J(j.props.x)?j.props.x:P.left,y:J(j.props.y)?j.props.y:P.top+P.height+P.brushBottom-(A.bottom||0),width:J(j.props.width)?j.props.width:P.width,startIndex:T,endIndex:$,updateId:"brush-".concat(O)})}),_e(_,"renderReferenceElement",function(j,N,A){if(!j)return null;var E=_,C=E.clipPathId,P=_.state,T=P.xAxisMap,$=P.yAxisMap,O=P.offset,R=j.type.defaultProps||{},M=j.props,F=M.xAxisId,D=F===void 0?R.xAxisId:F,I=M.yAxisId,L=I===void 0?R.yAxisId:I;return w.cloneElement(j,{key:j.key||"".concat(N,"-").concat(A),xAxis:T[D],yAxis:$[L],viewBox:{x:O.left,y:O.top,width:O.width,height:O.height},clipPathId:C})}),_e(_,"renderActivePoints",function(j){var N=j.item,A=j.activePoint,E=j.basePoint,C=j.childIndex,P=j.isRange,T=[],$=N.props.key,O=N.item.type.defaultProps!==void 0?K(K({},N.item.type.defaultProps),N.item.props):N.item.props,R=O.activeDot,M=O.dataKey,F=K(K({index:C,dataKey:M,cx:A.x,cy:A.y,r:4,fill:hj(N.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},ye(R,!1)),Vm(R));return T.push(y.renderActiveDot(R,F,"".concat($,"-activePoint-").concat(C))),E?T.push(y.renderActiveDot(R,K(K({},F),{},{cx:E.x,cy:E.y}),"".concat($,"-basePoint-").concat(C))):P&&T.push(null),T}),_e(_,"renderGraphicChild",function(j,N,A){var E=_.filterFormatItem(j,N,A);if(!E)return null;var C=_.getTooltipEventType(),P=_.state,T=P.isTooltipActive,$=P.tooltipAxis,O=P.activeTooltipIndex,R=P.activeLabel,M=_.props.children,F=Qr(M,Ir),D=E.props,I=D.points,L=D.isRange,W=D.baseLine,U=E.item.type.defaultProps!==void 0?K(K({},E.item.type.defaultProps),E.item.props):E.item.props,G=U.activeDot,X=U.hide,ne=U.activeBar,ue=U.activeShape,we=!!(!X&&T&&F&&(G||ne||ue)),je={};C!=="axis"&&F&&F.props.trigger==="click"?je={onClick:fp(_.handleItemMouseEnter,j.props.onClick)}:C!=="axis"&&(je={onMouseLeave:fp(_.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:fp(_.handleItemMouseEnter,j.props.onMouseEnter)});var Z=w.cloneElement(j,K(K({},E.props),je));function ae(q){return typeof $.dataKey=="function"?$.dataKey(q.payload):null}if(we)if(O>=0){var ge,Y;if($.dataKey&&!$.allowDuplicatedCategory){var $e=typeof $.dataKey=="function"?ae:"payload.".concat($.dataKey.toString());ge=Wm(I,$e,R),Y=L&&W&&Wm(W,$e,R)}else ge=I==null?void 0:I[O],Y=L&&W&&W[O];if(ue||ne){var xe=j.props.activeIndex!==void 0?j.props.activeIndex:O;return[w.cloneElement(j,K(K(K({},E.props),je),{},{activeIndex:xe})),null,null]}if(!Ee(ge))return[Z].concat(Jc(_.renderActivePoints({item:E,activePoint:ge,basePoint:Y,childIndex:O,isRange:L})))}else{var Ae,Be=(Ae=_.getItemByXY(_.state.activeCoordinate))!==null&&Ae!==void 0?Ae:{graphicalItem:Z},Oe=Be.graphicalItem,de=Oe.item,dt=de===void 0?j:de,B=Oe.childIndex,V=K(K(K({},E.props),je),{},{activeIndex:B});return[w.cloneElement(dt,V),null,null]}return L?[Z,null,null]:[Z,null]}),_e(_,"renderCustomized",function(j,N,A){return w.cloneElement(j,K(K({key:"recharts-customized-".concat(A)},_.props),_.state))}),_e(_,"renderMap",{CartesianGrid:{handler:yp,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:yp},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:yp},YAxis:{handler:yp},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:cl("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=Q4(_.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),_.state={},_}return fSe(y,v),lSe(y,[{key:"componentDidMount",value:function(){var b,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,S=b.children,_=b.data,j=b.height,N=b.layout,A=Qr(S,Ir);if(A){var E=A.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,P=k1(this.state,_,E,C),T=this.state.tooltipTicks[E].coordinate,$=(this.state.offset.top+j)/2,O=N==="horizontal",R=O?{x:T,y:$}:{y:T,x:$},M=this.state.formattedGraphicalItems.find(function(D){var I=D.item;return I.type.name==="Scatter"});M&&(R=K(K({},R),M.props.points[E].tooltipPosition),P=M.props.points[E].tooltipPayload);var F={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:C,activePayload:P,activeCoordinate:R};this.setState(F),this.renderCursor(A),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var _,j;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(b){aw([Qr(b.children,Ir)],[Qr(this.props.children,Ir)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Qr(this.props.children,Ir);if(b&&typeof b.props.shared=="boolean"){var S=b.props.shared?"axis":"item";return o.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var S=this.container,_=S.getBoundingClientRect(),j=kde(_),N={chartX:Math.round(b.pageX-j.left),chartY:Math.round(b.pageY-j.top)},A=_.width/S.offsetWidth||1,E=this.inRange(N.chartX,N.chartY,A);if(!E)return null;var C=this.state,P=C.xAxisMap,T=C.yAxisMap,$=this.getTooltipEventType(),O=NP(this.state,this.props.data,this.props.layout,E);if($!=="axis"&&P&&T){var R=Ha(P).scale,M=Ha(T).scale,F=R&&R.invert?R.invert(N.chartX):null,D=M&&M.invert?M.invert(N.chartY):null;return K(K({},N),{},{xValue:F,yValue:D},O)}return O?K(K({},N),O):null}},{key:"inRange",value:function(b,S){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,N=b/_,A=S/_;if(j==="horizontal"||j==="vertical"){var E=this.state.offset,C=N>=E.left&&N<=E.left+E.width&&A>=E.top&&A<=E.top+E.height;return C?{x:N,y:A}:null}var P=this.state,T=P.angleAxisMap,$=P.radiusAxisMap;if(T&&$){var O=Ha(T);return GA({x:N,y:A},O)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,S=this.getTooltipEventType(),_=Qr(b,Ir),j={};_&&S==="axis"&&(_.props.trigger==="click"?j={onClick:this.handleClick}:j={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=Vm(this.props,this.handleOuterEvent);return K(K({},N),j)}},{key:"addListener",value:function(){nx.on(ix,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nx.removeListener(ix,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,S,_){for(var j=this.state.formattedGraphicalItems,N=0,A=j.length;N<A;N++){var E=j[N];if(E.item===b||E.props.key===b.key||S===aa(E.item.type)&&_===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,S=this.state.offset,_=S.left,j=S.top,N=S.height,A=S.width;return k.createElement("defs",null,k.createElement("clipPath",{id:b},k.createElement("rect",{x:_,y:j,height:N,width:A})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(S,_){var j=_P(_,2),N=j[0],A=j[1];return K(K({},S),{},_e({},N,A.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(S,_){var j=_P(_,2),N=j[0],A=j[1];return K(K({},S),{},_e({},N,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(b){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(b){var S=this.state,_=S.formattedGraphicalItems,j=S.activeItem;if(_&&_.length)for(var N=0,A=_.length;N<A;N++){var E=_[N],C=E.props,P=E.item,T=P.type.defaultProps!==void 0?K(K({},P.type.defaultProps),P.props):P.props,$=aa(P.type);if($==="Bar"){var O=(C.data||[]).find(function(D){return zve(b,D)});if(O)return{graphicalItem:E,payload:O}}else if($==="RadialBar"){var R=(C.data||[]).find(function(D){return GA(b,D)});if(R)return{graphicalItem:E,payload:R}}else if(xv(E,j)||bv(E,j)||Hf(E,j)){var M=kxe({graphicalItem:E,activeTooltipItem:j,itemData:T.data}),F=T.activeIndex===void 0?M:T.activeIndex;return{graphicalItem:K(K({},E),{},{childIndex:F}),payload:Hf(E,j)?T.data[M]:E.props.data[M]}}}return null}},{key:"render",value:function(){var b=this;if(!GE(this))return null;var S=this.props,_=S.children,j=S.className,N=S.width,A=S.height,E=S.style,C=S.compact,P=S.title,T=S.desc,$=SP(S,tSe),O=ye($,!1);if(C)return k.createElement(rP,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement(ow,Hl({},O,{width:N,height:A,title:P,desc:T}),this.renderClipPath(),XE(_,this.renderMap)));if(this.props.accessibilityLayer){var R,M;O.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,O.role=(M=this.props.role)!==null&&M!==void 0?M:"application",O.onKeyDown=function(D){b.accessibilityManager.keyboardEvent(D)},O.onFocus=function(){b.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return k.createElement(rP,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},k.createElement("div",Hl({className:Te("recharts-wrapper",j),style:K({position:"relative",cursor:"default",width:N,height:A},E)},F,{ref:function(I){b.container=I}}),k.createElement(ow,Hl({},O,{width:N,height:A,title:P,desc:T,style:vSe}),this.renderClipPath(),XE(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);_e(g,"displayName",r),_e(g,"defaultProps",K({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),_e(g,"getDerivedStateFromProps",function(v,y){var x=v.dataKey,b=v.data,S=v.children,_=v.width,j=v.height,N=v.layout,A=v.stackOffset,E=v.margin,C=y.dataStartIndex,P=y.dataEndIndex;if(y.updateId===void 0){var T=EP(v);return K(K(K({},T),{},{updateId:0},p(K(K({props:v},T),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:b,prevWidth:_,prevHeight:j,prevLayout:N,prevStackOffset:A,prevMargin:E,prevChildren:S})}if(x!==y.prevDataKey||b!==y.prevData||_!==y.prevWidth||j!==y.prevHeight||N!==y.prevLayout||A!==y.prevStackOffset||!nc(E,y.prevMargin)){var $=EP(v),O={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},R=K(K({},NP(y,b,N)),{},{updateId:y.updateId+1}),M=K(K(K({},$),O),R);return K(K(K({},M),p(K({props:v},M),y)),{},{prevDataKey:x,prevData:b,prevWidth:_,prevHeight:j,prevLayout:N,prevStackOffset:A,prevMargin:E,prevChildren:S})}if(!aw(S,y.prevChildren)){var F,D,I,L,W=Qr(S,Uc),U=W&&(F=(D=W.props)===null||D===void 0?void 0:D.startIndex)!==null&&F!==void 0?F:C,G=W&&(I=(L=W.props)===null||L===void 0?void 0:L.endIndex)!==null&&I!==void 0?I:P,X=U!==C||G!==P,ne=!Ee(b),ue=ne&&!X?y.updateId:y.updateId+1;return K(K({updateId:ue},p(K(K({props:v},y),{},{updateId:ue,dataStartIndex:U,dataEndIndex:G}),y)),{},{prevChildren:S,dataStartIndex:U,dataEndIndex:G})}return null}),_e(g,"renderActiveDot",function(v,y,x){var b;return w.isValidElement(v)?b=w.cloneElement(v,y):Se(v)?b=v(y):b=k.createElement(jh,y),k.createElement(Le,{className:"recharts-active-dot",key:x},b)});var m=w.forwardRef(function(y,x){return k.createElement(g,Hl({},y,{ref:x}))});return m.displayName=g.displayName,m},AP=Ov({chartName:"LineChart",GraphicalChild:Ro,axisComponents:[{axisType:"xAxis",AxisComp:ta},{axisType:"yAxis",AxisComp:ra}],formatAxisMap:mj}),ASe=Ov({chartName:"BarChart",GraphicalChild:hl,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ta},{axisType:"yAxis",AxisComp:ra}],formatAxisMap:mj}),kSe=Ov({chartName:"PieChart",GraphicalChild:Ea,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:vv},{axisType:"radiusAxis",AxisComp:gv}],formatAxisMap:tge,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),PSe=Ov({chartName:"AreaChart",GraphicalChild:va,axisComponents:[{axisType:"xAxis",AxisComp:ta},{axisType:"yAxis",AxisComp:ra}],formatAxisMap:mj});function TSe(){const[e,t]=w.useState("24h"),{data:r=[]}=rn({queryKey:["executions-analytics"],queryFn:()=>Ma.getExecutions(),refetchInterval:3e4}),n=()=>{const h=[],p=new Date,g=e==="24h"?24:e==="7d"?168:720,m=e==="24h"?1:e==="7d"?6:24;for(let v=g;v>=0;v-=m){const y=new Date(p.getTime()-v*60*60*1e3);h.push({timestamp:y.toISOString(),cpu_usage:Math.random()*80+10,memory_usage:Math.random()*70+20,active_executions:Math.floor(Math.random()*10)+1,completed_executions:Math.floor(Math.random()*50)+10,failed_executions:Math.floor(Math.random()*5),response_time:Math.random()*3+.5})}return h},[i]=w.useState(()=>n()),a=Array.isArray(r)?r:[],s={total:a.length,completed:a.filter(h=>h.status==="completed").length,failed:a.filter(h=>h.status==="failed").length,running:a.filter(h=>h.status==="running").length,success_rate:a.length>0?Math.round(a.filter(h=>h.status==="completed").length/a.length*100):0},o=[{name:"Completed",value:s.completed,color:"#10B981"},{name:"Failed",value:s.failed,color:"#EF4444"},{name:"Running",value:s.running,color:"#3B82F6"},{name:"Pending",value:a.filter(h=>h.status==="pending").length,color:"#F59E0B"}].filter(h=>h.value>0),l=i.slice(-7).map((h,p)=>({day:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"][p],executions:h.completed_executions,response_time:h.response_time,success_rate:Math.random()*20+80})),c=[{id:"alert-1",type:"warning",message:"High memory usage on WALNUT node (85%)",timestamp:new Date(Date.now()-18e5).toISOString()},{id:"alert-2",type:"info",message:"ACACIA node reconnected successfully",timestamp:new Date(Date.now()-36e5).toISOString(),resolved:!0},{id:"alert-3",type:"error",message:"Workflow execution failed: timeout after 5 minutes",timestamp:new Date(Date.now()-72e5).toISOString()}],d=h=>{const p=new Date(h);return e==="24h"?p.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}):p.toLocaleDateString("en-US",{month:"short",day:"numeric"})},f=h=>{switch(h){case"error":return u.jsx(si,{className:"h-5 w-5 text-red-500"});case"warning":return u.jsx(Im,{className:"h-5 w-5 text-yellow-500"});case"info":return u.jsx(ii,{className:"h-5 w-5 text-blue-500"});default:return u.jsx(Im,{className:"h-5 w-5 text-gray-500"})}};return u.jsxs("div",{className:"p-6",children:[u.jsx("div",{className:"mb-6",children:u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Analytics"}),u.jsx("p",{className:"text-gray-600",children:"System performance and execution analytics"})]}),u.jsx("div",{className:"flex items-center space-x-4",children:u.jsxs("select",{value:e,onChange:h=>t(h.target.value),className:"border border-gray-300 rounded-md px-3 py-2 text-sm",children:[u.jsx("option",{value:"24h",children:"Last 24 Hours"}),u.jsx("option",{value:"7d",children:"Last 7 Days"}),u.jsx("option",{value:"30d",children:"Last 30 Days"})]})})]})}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.total}),u.jsx("p",{className:"text-sm text-gray-500",children:"Total Executions"})]}),u.jsx(ph,{className:"h-8 w-8 text-blue-500"})]}),u.jsxs("div",{className:"mt-2 flex items-center",children:[u.jsx(sE,{className:"h-4 w-4 text-green-500 mr-1"}),u.jsx("span",{className:"text-sm text-green-600",children:"+12% from yesterday"})]})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[s.success_rate,"%"]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Success Rate"})]}),u.jsx(ii,{className:"h-8 w-8 text-green-500"})]}),u.jsxs("div",{className:"mt-2 flex items-center",children:[u.jsx(sE,{className:"h-4 w-4 text-green-500 mr-1"}),u.jsx("span",{className:"text-sm text-green-600",children:"+2.1% improvement"})]})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:"2.3s"}),u.jsx("p",{className:"text-sm text-gray-500",children:"Avg Response Time"})]}),u.jsx(Wr,{className:"h-8 w-8 text-yellow-500"})]}),u.jsxs("div",{className:"mt-2 flex items-center",children:[u.jsx(QH,{className:"h-4 w-4 text-green-500 mr-1"}),u.jsx("span",{className:"text-sm text-green-600",children:"-0.2s faster"})]})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.running}),u.jsx("p",{className:"text-sm text-gray-500",children:"Active Executions"})]}),u.jsx(jy,{className:"h-8 w-8 text-purple-500"})]}),u.jsx("div",{className:"mt-2 flex items-center",children:u.jsx("span",{className:"text-sm text-gray-600",children:"Currently processing"})})]})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Execution Trends"}),u.jsx(Xu,{width:"100%",height:300,children:u.jsxs(AP,{data:i,children:[u.jsx(xd,{strokeDasharray:"3 3"}),u.jsx(ta,{dataKey:"timestamp",tickFormatter:d,interval:"preserveStartEnd"}),u.jsx(ra,{}),u.jsx(Ir,{labelFormatter:h=>d(h),formatter:(h,p)=>[h,p==="completed_executions"?"Completed":"Failed"]}),u.jsx(Ss,{}),u.jsx(Ro,{type:"monotone",dataKey:"completed_executions",stroke:"#10B981",strokeWidth:2,name:"Completed"}),u.jsx(Ro,{type:"monotone",dataKey:"failed_executions",stroke:"#EF4444",strokeWidth:2,name:"Failed"})]})})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Resource Usage"}),u.jsx(Xu,{width:"100%",height:300,children:u.jsxs(PSe,{data:i,children:[u.jsx(xd,{strokeDasharray:"3 3"}),u.jsx(ta,{dataKey:"timestamp",tickFormatter:d,interval:"preserveStartEnd"}),u.jsx(ra,{domain:[0,100]}),u.jsx(Ir,{labelFormatter:h=>d(h),formatter:(h,p)=>[`${Math.round(h)}%`,p==="cpu_usage"?"CPU":"Memory"]}),u.jsx(Ss,{}),u.jsx(va,{type:"monotone",dataKey:"cpu_usage",stackId:"1",stroke:"#3B82F6",fill:"#3B82F6",fillOpacity:.3,name:"CPU Usage"}),u.jsx(va,{type:"monotone",dataKey:"memory_usage",stackId:"2",stroke:"#8B5CF6",fill:"#8B5CF6",fillOpacity:.3,name:"Memory Usage"})]})})]})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8",children:[u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Execution Status"}),u.jsx(Xu,{width:"100%",height:250,children:u.jsxs(kSe,{children:[u.jsx(Ea,{data:o,cx:"50%",cy:"50%",outerRadius:80,dataKey:"value",label:({name:h,percent:p})=>`${h} ${(p*100).toFixed(0)}%`,children:o.map((h,p)=>u.jsx(iv,{fill:h.color},`cell-${p}`))}),u.jsx(Ir,{})]})})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Weekly Performance"}),u.jsx(Xu,{width:"100%",height:250,children:u.jsxs(ASe,{data:l,children:[u.jsx(xd,{strokeDasharray:"3 3"}),u.jsx(ta,{dataKey:"day"}),u.jsx(ra,{}),u.jsx(Ir,{}),u.jsx(hl,{dataKey:"executions",fill:"#3B82F6",name:"Executions"})]})})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"System Alerts"}),u.jsx("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:c.map(h=>u.jsxs("div",{className:`flex items-start space-x-3 p-3 rounded-md ${h.resolved?"bg-gray-50":h.type==="error"?"bg-red-50":h.type==="warning"?"bg-yellow-50":"bg-blue-50"}`,children:[f(h.type),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:`text-sm ${h.resolved?"text-gray-600":"text-gray-900"}`,children:h.message}),u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:new Date(h.timestamp).toLocaleString()})]}),h.resolved&&u.jsx(ii,{className:"h-4 w-4 text-gray-400"})]},h.id))})]})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Response Time Trends"}),u.jsx(Xu,{width:"100%",height:200,children:u.jsxs(AP,{data:i,children:[u.jsx(xd,{strokeDasharray:"3 3"}),u.jsx(ta,{dataKey:"timestamp",tickFormatter:d,interval:"preserveStartEnd"}),u.jsx(ra,{domain:[0,"dataMax"]}),u.jsx(Ir,{labelFormatter:h=>d(h),formatter:h=>[`${h.toFixed(2)}s`,"Response Time"]}),u.jsx(Ro,{type:"monotone",dataKey:"response_time",stroke:"#F59E0B",strokeWidth:2,dot:{r:3}})]})})]})]})}var CSe=Object.defineProperty,$Se=(e,t,r)=>t in e?CSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sx=(e,t,r)=>($Se(e,typeof t!="symbol"?t+"":t,r),r);let MSe=class{constructor(){sx(this,"current",this.detect()),sx(this,"handoffState","pending"),sx(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Io=new MSe,xr=(e,t)=>{Io.isServer?w.useEffect(e,t):w.useLayoutEffect(e,t)};function On(e){let t=w.useRef(e);return xr(()=>{t.current=e},[e]),t}let Qe=function(e){let t=On(e);return k.useCallback((...r)=>t.current(...r),[t])};function jD(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function xa(){let e=[],t={addEventListener(r,n,i,a){return r.addEventListener(n,i,a),t.add(()=>r.removeEventListener(n,i,a))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return jD(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,i){let a=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:i}),this.add(()=>{Object.assign(r.style,{[n]:a})})},group(r){let n=xa();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let i of e.splice(n,1))i()}},dispose(){for(let r of e.splice(0))r()}};return t}function Av(){let[e]=w.useState(xa);return w.useEffect(()=>()=>e.dispose(),[e]),e}function RSe(){let e=typeof document>"u";return"useSyncExternalStore"in mx?(t=>t.useSyncExternalStore)(mx)(()=>()=>{},()=>!1,()=>!e):!1}function Nj(){let e=RSe(),[t,r]=w.useState(Io.isHandoffComplete);return t&&Io.isHandoffComplete===!1&&r(!1),w.useEffect(()=>{t!==!0&&r(!0)},[t]),w.useEffect(()=>Io.handoff(),[]),e?!1:t}var kP;let Nh=(kP=k.useId)!=null?kP:function(){let e=Nj(),[t,r]=k.useState(e?()=>Io.nextId():null);return xr(()=>{t===null&&r(Io.nextId())},[t]),t!=null?""+t:void 0};function tr(e,t,...r){if(e in t){let i=t[e];return typeof i=="function"?i(...r):i}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,tr),n}function Eh(e){return Io.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let P1=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Xr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Xr||{}),bd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(bd||{}),ISe=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ISe||{});function ND(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(P1)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ej=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ej||{});function Oj(e,t=0){var r;return e===((r=Eh(e))==null?void 0:r.body)?!1:tr(t,{0(){return e.matches(P1)},1(){let n=e;for(;n!==null;){if(n.matches(P1))return!0;n=n.parentElement}return!1}})}function ED(e){let t=Eh(e);xa().nextFrame(()=>{t&&!Oj(t.activeElement,0)&&LSe(e)})}var DSe=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(DSe||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function LSe(e){e==null||e.focus({preventScroll:!0})}let FSe=["textarea","input"].join(",");function BSe(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,FSe))!=null?r:!1}function go(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),a=t(n);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function zSe(e,t){return ro(ND(),t,{relativeTo:e})}function ro(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?go(e):e:ND(e);i.length>0&&s.length>1&&(s=s.filter(p=>!i.includes(p))),n=n??a.activeElement;let o=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},d=0,f=s.length,h;do{if(d>=f||d+f<=0)return 0;let p=l+d;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=s[p],h==null||h.focus(c),d+=o}while(h!==a.activeElement);return t&6&&BSe(h)&&h.select(),2}function USe(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function WSe(){return/Android/gi.test(window.navigator.userAgent)}function VSe(){return USe()||WSe()}function vp(e,t,r){let n=On(t);w.useEffect(()=>{function i(a){n.current(a)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function HSe(e,t,r){let n=On(t);w.useEffect(()=>{function i(a){n.current(a)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}function qSe(e,t,r=!0){let n=w.useRef(!1);w.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function i(s,o){if(!n.current||s.defaultPrevented)return;let l=o(s);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:d.current;if(f!=null&&f.contains(l)||s.composed&&s.composedPath().includes(f))return}return!Oj(l,Ej.Loose)&&l.tabIndex!==-1&&s.preventDefault(),t(s,l)}let a=w.useRef(null);vp("pointerdown",s=>{var o,l;n.current&&(a.current=((l=(o=s.composedPath)==null?void 0:o.call(s))==null?void 0:l[0])||s.target)},!0),vp("mousedown",s=>{var o,l;n.current&&(a.current=((l=(o=s.composedPath)==null?void 0:o.call(s))==null?void 0:l[0])||s.target)},!0),vp("click",s=>{VSe()||a.current&&(i(s,()=>a.current),a.current=null)},!0),vp("touchend",s=>i(s,()=>s.target instanceof HTMLElement?s.target:null),!0),HSe("blur",s=>i(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function KSe(...e){return w.useMemo(()=>Eh(...e),[...e])}function PP(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function OD(e,t){let[r,n]=w.useState(()=>PP(e));return xr(()=>{n(PP(e))},[e.type,e.as]),xr(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let GSe=Symbol();function hi(...e){let t=w.useRef(e);w.useEffect(()=>{t.current=e},[e]);let r=Qe(n=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return e.every(n=>n==null||(n==null?void 0:n[GSe]))?void 0:r}function TP(e){return[e.screenX,e.screenY]}function YSe(){let e=w.useRef([-1,-1]);return{wasMoved(t){let r=TP(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=TP(t)}}}function XSe({container:e,accept:t,walk:r,enabled:n=!0}){let i=w.useRef(t),a=w.useRef(r);w.useEffect(()=>{i.current=t,a.current=r},[t,r]),xr(()=>{if(!e||!n)return;let s=Eh(e);if(!s)return;let o=i.current,l=a.current,c=Object.assign(f=>o(f),{acceptNode:o}),d=s.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[e,n,i,a])}function Ug(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var eu=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(eu||{}),cs=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(cs||{});function Rn({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:a=!0,name:s,mergeRefs:o}){o=o??ZSe;let l=AD(t,e);if(a)return xp(l,r,n,s,o);let c=i??0;if(c&2){let{static:d=!1,...f}=l;if(d)return xp(f,r,n,s,o)}if(c&1){let{unmount:d=!0,...f}=l;return tr(d?0:1,{0(){return null},1(){return xp({...f,hidden:!0,style:{display:"none"}},r,n,s,o)}})}return xp(l,r,n,s,o)}function xp(e,t={},r,n,i){let{as:a=r,children:s,refName:o="ref",...l}=ox(e,["unmount","static"]),c=e.ref!==void 0?{[o]:e.ref}:{},d=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let f={};if(t){let h=!1,p=[];for(let[g,m]of Object.entries(t))typeof m=="boolean"&&(h=!0),m===!0&&p.push(g);h&&(f["data-headlessui-state"]=p.join(" "))}if(a===w.Fragment&&Object.keys(CP(l)).length>0){if(!w.isValidElement(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(m=>` - ${m}`).join(`
|
||
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(`
|
||
`)].join(`
|
||
`));let h=d.props,p=typeof(h==null?void 0:h.className)=="function"?(...m)=>Ug(h==null?void 0:h.className(...m),l.className):Ug(h==null?void 0:h.className,l.className),g=p?{className:p}:{};return w.cloneElement(d,Object.assign({},AD(d.props,CP(ox(l,["ref"]))),f,c,{ref:i(d.ref,c.ref)},g))}return w.createElement(a,Object.assign({},ox(l,["ref"]),a!==w.Fragment&&c,a!==w.Fragment&&f),d)}function ZSe(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function AD(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](i,...a){let s=r[n];for(let o of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;o(i,...a)}}});return t}function fn(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function CP(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function ox(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let QSe="div";var kD=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kD||{});function JSe(e,t){var r;let{features:n=1,...i}=e,a={ref:t,"aria-hidden":(n&2)===2?!0:(r=i["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Rn({ourProps:a,theirProps:i,slot:{},defaultTag:QSe,name:"Hidden"})}let PD=fn(JSe),Aj=w.createContext(null);Aj.displayName="OpenClosedContext";var Jr=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Jr||{});function kj(){return w.useContext(Aj)}function TD({value:e,children:t}){return k.createElement(Aj.Provider,{value:e},t)}function eje(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&tje(r)?!1:n}function tje(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function rje(e){throw new Error("Unexpected object: "+e)}var ti=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ti||{});function nje(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=n??-1;switch(e.focus){case 0:{for(let a=0;a<r.length;++a)if(!t.resolveDisabled(r[a],a,r))return a;return n}case 1:{for(let a=i-1;a>=0;--a)if(!t.resolveDisabled(r[a],a,r))return a;return n}case 2:{for(let a=i+1;a<r.length;++a)if(!t.resolveDisabled(r[a],a,r))return a;return n}case 3:{for(let a=r.length-1;a>=0;--a)if(!t.resolveDisabled(r[a],a,r))return a;return n}case 4:{for(let a=0;a<r.length;++a)if(t.resolveId(r[a],a,r)===e.id)return a;return n}case 5:return null;default:rje(e)}}var nt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(nt||{});function kv(){let e=w.useRef(!1);return xr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let $P=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function MP(e){var t,r;let n=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let a=!1;for(let o of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))o.remove(),a=!0;let s=a?(r=i.innerText)!=null?r:"":n;return $P.test(s)&&(s=s.replace($P,"")),s}function ije(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(i=>{let a=document.getElementById(i);if(a){let s=a.getAttribute("aria-label");return typeof s=="string"?s.trim():MP(a).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return MP(e).trim()}function aje(e){let t=w.useRef(""),r=w.useRef("");return Qe(()=>{let n=e.current;if(!n)return"";let i=n.innerText;if(t.current===i)return r.current;let a=ije(n).trim().toLowerCase();return t.current=i,r.current=a,a})}var sje=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(sje||{}),oje=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(oje||{}),lje=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(lje||{});function lx(e,t=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=go(t(e.items.slice()),a=>a.dataRef.current.domRef.current),i=r?n.indexOf(r):null;return i===-1&&(i=null),{items:n,activeItemIndex:i}}let cje={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var r;let n=lx(e),i=nje(t,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:a=>a.id,resolveDisabled:a=>a.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeItemIndex:i,activationTrigger:(r=t.trigger)!=null?r:1}},3:(e,t)=>{let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(s=>{var o;return((o=s.dataRef.current.textValue)==null?void 0:o.startsWith(n))&&!s.dataRef.current.disabled}),a=i?e.items.indexOf(i):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let r=lx(e,n=>[...n,{id:t.id,dataRef:t.dataRef}]);return{...e,...r}},6:(e,t)=>{let r=lx(e,n=>{let i=n.findIndex(a=>a.id===t.id);return i!==-1&&n.splice(i,1),n});return{...e,...r,activationTrigger:1}}},Pj=w.createContext(null);Pj.displayName="MenuContext";function Pv(e){let t=w.useContext(Pj);if(t===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Pv),r}return t}function uje(e,t){return tr(t.type,cje,e,t)}let dje=w.Fragment;function fje(e,t){let{__demoMode:r=!1,...n}=e,i=w.useReducer(uje,{__demoMode:r,menuState:r?0:1,buttonRef:w.createRef(),itemsRef:w.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:a,itemsRef:s,buttonRef:o},l]=i,c=hi(t);qSe([o,s],(p,g)=>{var m;l({type:1}),Oj(g,Ej.Loose)||(p.preventDefault(),(m=o.current)==null||m.focus())},a===0);let d=Qe(()=>{l({type:1})}),f=w.useMemo(()=>({open:a===0,close:d}),[a,d]),h={ref:c};return k.createElement(Pj.Provider,{value:i},k.createElement(TD,{value:tr(a,{0:Jr.Open,1:Jr.Closed})},Rn({ourProps:h,theirProps:n,slot:f,defaultTag:dje,name:"Menu"})))}let hje="button";function pje(e,t){var r;let n=Nh(),{id:i=`headlessui-menu-button-${n}`,...a}=e,[s,o]=Pv("Menu.Button"),l=hi(s.buttonRef,t),c=Av(),d=Qe(m=>{switch(m.key){case nt.Space:case nt.Enter:case nt.ArrowDown:m.preventDefault(),m.stopPropagation(),o({type:0}),c.nextFrame(()=>o({type:2,focus:ti.First}));break;case nt.ArrowUp:m.preventDefault(),m.stopPropagation(),o({type:0}),c.nextFrame(()=>o({type:2,focus:ti.Last}));break}}),f=Qe(m=>{switch(m.key){case nt.Space:m.preventDefault();break}}),h=Qe(m=>{if(eje(m.currentTarget))return m.preventDefault();e.disabled||(s.menuState===0?(o({type:1}),c.nextFrame(()=>{var v;return(v=s.buttonRef.current)==null?void 0:v.focus({preventScroll:!0})})):(m.preventDefault(),o({type:0})))}),p=w.useMemo(()=>({open:s.menuState===0}),[s]),g={ref:l,id:i,type:OD(e,s.buttonRef),"aria-haspopup":"menu","aria-controls":(r=s.itemsRef.current)==null?void 0:r.id,"aria-expanded":s.menuState===0,onKeyDown:d,onKeyUp:f,onClick:h};return Rn({ourProps:g,theirProps:a,slot:p,defaultTag:hje,name:"Menu.Button"})}let mje="div",gje=eu.RenderStrategy|eu.Static;function yje(e,t){var r,n;let i=Nh(),{id:a=`headlessui-menu-items-${i}`,...s}=e,[o,l]=Pv("Menu.Items"),c=hi(o.itemsRef,t),d=KSe(o.itemsRef),f=Av(),h=kj(),p=h!==null?(h&Jr.Open)===Jr.Open:o.menuState===0;w.useEffect(()=>{let x=o.itemsRef.current;x&&o.menuState===0&&x!==(d==null?void 0:d.activeElement)&&x.focus({preventScroll:!0})},[o.menuState,o.itemsRef,d]),XSe({container:o.itemsRef.current,enabled:o.menuState===0,accept(x){return x.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:x.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(x){x.setAttribute("role","none")}});let g=Qe(x=>{var b,S;switch(f.dispose(),x.key){case nt.Space:if(o.searchQuery!=="")return x.preventDefault(),x.stopPropagation(),l({type:3,value:x.key});case nt.Enter:if(x.preventDefault(),x.stopPropagation(),l({type:1}),o.activeItemIndex!==null){let{dataRef:_}=o.items[o.activeItemIndex];(S=(b=_.current)==null?void 0:b.domRef.current)==null||S.click()}ED(o.buttonRef.current);break;case nt.ArrowDown:return x.preventDefault(),x.stopPropagation(),l({type:2,focus:ti.Next});case nt.ArrowUp:return x.preventDefault(),x.stopPropagation(),l({type:2,focus:ti.Previous});case nt.Home:case nt.PageUp:return x.preventDefault(),x.stopPropagation(),l({type:2,focus:ti.First});case nt.End:case nt.PageDown:return x.preventDefault(),x.stopPropagation(),l({type:2,focus:ti.Last});case nt.Escape:x.preventDefault(),x.stopPropagation(),l({type:1}),xa().nextFrame(()=>{var _;return(_=o.buttonRef.current)==null?void 0:_.focus({preventScroll:!0})});break;case nt.Tab:x.preventDefault(),x.stopPropagation(),l({type:1}),xa().nextFrame(()=>{zSe(o.buttonRef.current,x.shiftKey?Xr.Previous:Xr.Next)});break;default:x.key.length===1&&(l({type:3,value:x.key}),f.setTimeout(()=>l({type:4}),350));break}}),m=Qe(x=>{switch(x.key){case nt.Space:x.preventDefault();break}}),v=w.useMemo(()=>({open:o.menuState===0}),[o]),y={"aria-activedescendant":o.activeItemIndex===null||(r=o.items[o.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=o.buttonRef.current)==null?void 0:n.id,id:a,onKeyDown:g,onKeyUp:m,role:"menu",tabIndex:0,ref:c};return Rn({ourProps:y,theirProps:s,slot:v,defaultTag:mje,features:gje,visible:p,name:"Menu.Items"})}let vje=w.Fragment;function xje(e,t){let r=Nh(),{id:n=`headlessui-menu-item-${r}`,disabled:i=!1,...a}=e,[s,o]=Pv("Menu.Item"),l=s.activeItemIndex!==null?s.items[s.activeItemIndex].id===n:!1,c=w.useRef(null),d=hi(t,c);xr(()=>{if(s.__demoMode||s.menuState!==0||!l||s.activationTrigger===0)return;let _=xa();return _.requestAnimationFrame(()=>{var j,N;(N=(j=c.current)==null?void 0:j.scrollIntoView)==null||N.call(j,{block:"nearest"})}),_.dispose},[s.__demoMode,c,l,s.menuState,s.activationTrigger,s.activeItemIndex]);let f=aje(c),h=w.useRef({disabled:i,domRef:c,get textValue(){return f()}});xr(()=>{h.current.disabled=i},[h,i]),xr(()=>(o({type:5,id:n,dataRef:h}),()=>o({type:6,id:n})),[h,n]);let p=Qe(()=>{o({type:1})}),g=Qe(_=>{if(i)return _.preventDefault();o({type:1}),ED(s.buttonRef.current)}),m=Qe(()=>{if(i)return o({type:2,focus:ti.Nothing});o({type:2,focus:ti.Specific,id:n})}),v=YSe(),y=Qe(_=>v.update(_)),x=Qe(_=>{v.wasMoved(_)&&(i||l||o({type:2,focus:ti.Specific,id:n,trigger:0}))}),b=Qe(_=>{v.wasMoved(_)&&(i||l&&o({type:2,focus:ti.Nothing}))}),S=w.useMemo(()=>({active:l,disabled:i,close:p}),[l,i,p]);return Rn({ourProps:{id:n,ref:d,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:y,onMouseEnter:y,onPointerMove:x,onMouseMove:x,onPointerLeave:b,onMouseLeave:b},theirProps:a,slot:S,defaultTag:vje,name:"Menu.Item"})}let bje=fn(fje),wje=fn(pje),_je=fn(yje),Sje=fn(xje),Ks=Object.assign(bje,{Button:wje,Items:_je,Item:Sje});function jje(e=0){let[t,r]=w.useState(e),n=kv(),i=w.useCallback(l=>{n.current&&r(c=>c|l)},[t,n]),a=w.useCallback(l=>!!(t&l),[t]),s=w.useCallback(l=>{n.current&&r(c=>c&~l)},[r,n]),o=w.useCallback(l=>{n.current&&r(c=>c^l)},[r]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:o}}function Nje({onFocus:e}){let[t,r]=w.useState(!0),n=kv();return t?k.createElement(PD,{as:"button",type:"button",features:kD.Focusable,onFocus:i=>{i.preventDefault();let a,s=50;function o(){if(s--<=0){a&&cancelAnimationFrame(a);return}if(e()){if(cancelAnimationFrame(a),!n.current)return;r(!1);return}a=requestAnimationFrame(o)}a=requestAnimationFrame(o)}}):null}const CD=w.createContext(null);function Eje(){return{groups:new Map,get(e,t){var r;let n=this.groups.get(e);n||(n=new Map,this.groups.set(e,n));let i=(r=n.get(t))!=null?r:0;n.set(t,i+1);let a=Array.from(n.keys()).indexOf(t);function s(){let o=n.get(t);o>1?n.set(t,o-1):n.delete(t)}return[a,s]}}}function Oje({children:e}){let t=w.useRef(Eje());return w.createElement(CD.Provider,{value:t},e)}function $D(e){let t=w.useContext(CD);if(!t)throw new Error("You must wrap your component in a <StableCollection>");let r=Aje(),[n,i]=t.current.get(e,r);return w.useEffect(()=>i,[]),n}function Aje(){var e,t,r;let n=(r=(t=(e=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:e.ReactCurrentOwner)==null?void 0:t.current)!=null?r:null;if(!n)return Symbol();let i=[],a=n;for(;a;)i.push(a.index),a=a.return;return"$."+i.join(".")}var kje=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(kje||{}),Pje=(e=>(e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e))(Pje||{}),Tje=(e=>(e[e.SetSelectedIndex=0]="SetSelectedIndex",e[e.RegisterTab=1]="RegisterTab",e[e.UnregisterTab=2]="UnregisterTab",e[e.RegisterPanel=3]="RegisterPanel",e[e.UnregisterPanel=4]="UnregisterPanel",e))(Tje||{});let Cje={0(e,t){var r;let n=go(e.tabs,d=>d.current),i=go(e.panels,d=>d.current),a=n.filter(d=>{var f;return!((f=d.current)!=null&&f.hasAttribute("disabled"))}),s={...e,tabs:n,panels:i};if(t.index<0||t.index>n.length-1){let d=tr(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>tr(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(a.length===0)return s;let f=tr(d,{0:()=>n.indexOf(a[0]),1:()=>n.indexOf(a[a.length-1])});return{...s,selectedIndex:f===-1?e.selectedIndex:f}}let o=n.slice(0,t.index),l=[...n.slice(t.index),...o].find(d=>a.includes(d));if(!l)return s;let c=(r=n.indexOf(l))!=null?r:e.selectedIndex;return c===-1&&(c=e.selectedIndex),{...s,selectedIndex:c}},1(e,t){if(e.tabs.includes(t.tab))return e;let r=e.tabs[e.selectedIndex],n=go([...e.tabs,t.tab],a=>a.current),i=e.selectedIndex;return e.info.current.isControlled||(i=n.indexOf(r),i===-1&&(i=e.selectedIndex)),{...e,tabs:n,selectedIndex:i}},2(e,t){return{...e,tabs:e.tabs.filter(r=>r!==t.tab)}},3(e,t){return e.panels.includes(t.panel)?e:{...e,panels:go([...e.panels,t.panel],r=>r.current)}},4(e,t){return{...e,panels:e.panels.filter(r=>r!==t.panel)}}},Tj=w.createContext(null);Tj.displayName="TabsDataContext";function tu(e){let t=w.useContext(Tj);if(t===null){let r=new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,tu),r}return t}let Cj=w.createContext(null);Cj.displayName="TabsActionsContext";function $j(e){let t=w.useContext(Cj);if(t===null){let r=new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$j),r}return t}function $je(e,t){return tr(t.type,Cje,e,t)}let Mje=w.Fragment;function Rje(e,t){let{defaultIndex:r=0,vertical:n=!1,manual:i=!1,onChange:a,selectedIndex:s=null,...o}=e;const l=n?"vertical":"horizontal",c=i?"manual":"auto";let d=s!==null,f=On({isControlled:d}),h=hi(t),[p,g]=w.useReducer($je,{info:f,selectedIndex:s??r,tabs:[],panels:[]}),m=w.useMemo(()=>({selectedIndex:p.selectedIndex}),[p.selectedIndex]),v=On(a||(()=>{})),y=On(p.tabs),x=w.useMemo(()=>({orientation:l,activation:c,...p}),[l,c,p]),b=Qe(E=>(g({type:1,tab:E}),()=>g({type:2,tab:E}))),S=Qe(E=>(g({type:3,panel:E}),()=>g({type:4,panel:E}))),_=Qe(E=>{j.current!==E&&v.current(E),d||g({type:0,index:E})}),j=On(d?e.selectedIndex:p.selectedIndex),N=w.useMemo(()=>({registerTab:b,registerPanel:S,change:_}),[]);xr(()=>{g({type:0,index:s??r})},[s]),xr(()=>{if(j.current===void 0||p.tabs.length<=0)return;let E=go(p.tabs,C=>C.current);E.some((C,P)=>p.tabs[P]!==C)&&_(E.indexOf(p.tabs[j.current]))});let A={ref:h};return k.createElement(Oje,null,k.createElement(Cj.Provider,{value:N},k.createElement(Tj.Provider,{value:x},x.tabs.length<=0&&k.createElement(Nje,{onFocus:()=>{var E,C;for(let P of y.current)if(((E=P.current)==null?void 0:E.tabIndex)===0)return(C=P.current)==null||C.focus(),!0;return!1}}),Rn({ourProps:A,theirProps:o,slot:m,defaultTag:Mje,name:"Tabs"}))))}let Ije="div";function Dje(e,t){let{orientation:r,selectedIndex:n}=tu("Tab.List"),i=hi(t);return Rn({ourProps:{ref:i,role:"tablist","aria-orientation":r},theirProps:e,slot:{selectedIndex:n},defaultTag:Ije,name:"Tabs.List"})}let Lje="button";function Fje(e,t){var r,n;let i=Nh(),{id:a=`headlessui-tabs-tab-${i}`,...s}=e,{orientation:o,activation:l,selectedIndex:c,tabs:d,panels:f}=tu("Tab"),h=$j("Tab"),p=tu("Tab"),g=w.useRef(null),m=hi(g,t);xr(()=>h.registerTab(g),[h,g]);let v=$D("tabs"),y=d.indexOf(g);y===-1&&(y=v);let x=y===c,b=Qe(C=>{var P;let T=C();if(T===bd.Success&&l==="auto"){let $=(P=Eh(g))==null?void 0:P.activeElement,O=p.tabs.findIndex(R=>R.current===$);O!==-1&&h.change(O)}return T}),S=Qe(C=>{let P=d.map(T=>T.current).filter(Boolean);if(C.key===nt.Space||C.key===nt.Enter){C.preventDefault(),C.stopPropagation(),h.change(y);return}switch(C.key){case nt.Home:case nt.PageUp:return C.preventDefault(),C.stopPropagation(),b(()=>ro(P,Xr.First));case nt.End:case nt.PageDown:return C.preventDefault(),C.stopPropagation(),b(()=>ro(P,Xr.Last))}if(b(()=>tr(o,{vertical(){return C.key===nt.ArrowUp?ro(P,Xr.Previous|Xr.WrapAround):C.key===nt.ArrowDown?ro(P,Xr.Next|Xr.WrapAround):bd.Error},horizontal(){return C.key===nt.ArrowLeft?ro(P,Xr.Previous|Xr.WrapAround):C.key===nt.ArrowRight?ro(P,Xr.Next|Xr.WrapAround):bd.Error}}))===bd.Success)return C.preventDefault()}),_=w.useRef(!1),j=Qe(()=>{var C;_.current||(_.current=!0,(C=g.current)==null||C.focus({preventScroll:!0}),h.change(y),jD(()=>{_.current=!1}))}),N=Qe(C=>{C.preventDefault()}),A=w.useMemo(()=>{var C;return{selected:x,disabled:(C=e.disabled)!=null?C:!1}},[x,e.disabled]),E={ref:m,onKeyDown:S,onMouseDown:N,onClick:j,id:a,role:"tab",type:OD(e,g),"aria-controls":(n=(r=f[y])==null?void 0:r.current)==null?void 0:n.id,"aria-selected":x,tabIndex:x?0:-1};return Rn({ourProps:E,theirProps:s,slot:A,defaultTag:Lje,name:"Tabs.Tab"})}let Bje="div";function zje(e,t){let{selectedIndex:r}=tu("Tab.Panels"),n=hi(t),i=w.useMemo(()=>({selectedIndex:r}),[r]);return Rn({ourProps:{ref:n},theirProps:e,slot:i,defaultTag:Bje,name:"Tabs.Panels"})}let Uje="div",Wje=eu.RenderStrategy|eu.Static;function Vje(e,t){var r,n,i,a;let s=Nh(),{id:o=`headlessui-tabs-panel-${s}`,tabIndex:l=0,...c}=e,{selectedIndex:d,tabs:f,panels:h}=tu("Tab.Panel"),p=$j("Tab.Panel"),g=w.useRef(null),m=hi(g,t);xr(()=>p.registerPanel(g),[p,g,o]);let v=$D("panels"),y=h.indexOf(g);y===-1&&(y=v);let x=y===d,b=w.useMemo(()=>({selected:x}),[x]),S={ref:m,id:o,role:"tabpanel","aria-labelledby":(n=(r=f[y])==null?void 0:r.current)==null?void 0:n.id,tabIndex:x?l:-1};return!x&&((i=c.unmount)==null||i)&&!((a=c.static)!=null&&a)?k.createElement(PD,{as:"span","aria-hidden":"true",...S}):Rn({ourProps:S,theirProps:c,slot:b,defaultTag:Uje,features:Wje,visible:x,name:"Tabs.Panel"})}let Hje=fn(Fje),qje=fn(Rje),Kje=fn(Dje),Gje=fn(zje),Yje=fn(Vje),Ta=Object.assign(Hje,{Group:qje,List:Kje,Panels:Gje,Panel:Yje});function Xje(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function cx(e,...t){e&&t.length>0&&e.classList.add(...t)}function ux(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Zje(e,t){let r=xa();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[a,s]=[n,i].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c}),o=a+s;if(o!==0){r.group(c=>{c.setTimeout(()=>{t(),c.dispose()},o),c.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&c.dispose()})});let l=r.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),l())})}else t();return r.add(()=>t()),r.dispose}function Qje(e,t,r,n){let i=r?"enter":"leave",a=xa(),s=n!==void 0?Xje(n):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let o=tr(i,{enter:()=>t.enter,leave:()=>t.leave}),l=tr(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=tr(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ux(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),cx(e,...t.base,...o,...c),a.nextFrame(()=>{ux(e,...t.base,...o,...c),cx(e,...t.base,...o,...l),Zje(e,()=>(ux(e,...t.base,...o),cx(e,...t.base,...t.entered),s()))}),a.dispose}function Jje({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:a}){let s=kv(),o=Av(),l=On(r);xr(()=>{e&&(l.current="enter")},[e]),xr(()=>{let c=xa();o.add(c.dispose);let d=t.current;if(d&&l.current!=="idle"&&s.current)return c.dispose(),i.current(l.current),c.add(Qje(d,n.current,l.current==="enter",()=>{c.dispose(),a.current(l.current)})),c.dispose},[r])}function Ca(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Tv=w.createContext(null);Tv.displayName="TransitionContext";var e2e=(e=>(e.Visible="visible",e.Hidden="hidden",e))(e2e||{});function t2e(){let e=w.useContext(Tv);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function r2e(){let e=w.useContext(Cv);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Cv=w.createContext(null);Cv.displayName="NestingContext";function $v(e){return"children"in e?$v(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function MD(e,t){let r=On(e),n=w.useRef([]),i=kv(),a=Av(),s=Qe((p,g=cs.Hidden)=>{let m=n.current.findIndex(({el:v})=>v===p);m!==-1&&(tr(g,{[cs.Unmount](){n.current.splice(m,1)},[cs.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var v;!$v(n)&&i.current&&((v=r.current)==null||v.call(r))}))}),o=Qe(p=>{let g=n.current.find(({el:m})=>m===p);return g?g.state!=="visible"&&(g.state="visible"):n.current.push({el:p,state:"visible"}),()=>s(p,cs.Unmount)}),l=w.useRef([]),c=w.useRef(Promise.resolve()),d=w.useRef({enter:[],leave:[],idle:[]}),f=Qe((p,g,m)=>{l.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([v])=>v!==p)),t==null||t.chains.current[g].push([p,new Promise(v=>{l.current.push(v)})]),t==null||t.chains.current[g].push([p,new Promise(v=>{Promise.all(d.current[g].map(([y,x])=>x)).then(()=>v())})]),g==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(g)):m(g)}),h=Qe((p,g,m)=>{Promise.all(d.current[g].splice(0).map(([v,y])=>y)).then(()=>{var v;(v=l.current.shift())==null||v()}).then(()=>m(g))});return w.useMemo(()=>({children:n,register:o,unregister:s,onStart:f,onStop:h,wait:c,chains:d}),[o,s,n,f,h,d,c])}function n2e(){}let i2e=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function RP(e){var t;let r={};for(let n of i2e)r[n]=(t=e[n])!=null?t:n2e;return r}function a2e(e){let t=w.useRef(RP(e));return w.useEffect(()=>{t.current=RP(e)},[e]),t}let s2e="div",RD=eu.RenderStrategy;function o2e(e,t){var r,n;let{beforeEnter:i,afterEnter:a,beforeLeave:s,afterLeave:o,enter:l,enterFrom:c,enterTo:d,entered:f,leave:h,leaveFrom:p,leaveTo:g,...m}=e,v=w.useRef(null),y=hi(v,t),x=(r=m.unmount)==null||r?cs.Unmount:cs.Hidden,{show:b,appear:S,initial:_}=t2e(),[j,N]=w.useState(b?"visible":"hidden"),A=r2e(),{register:E,unregister:C}=A;w.useEffect(()=>E(v),[E,v]),w.useEffect(()=>{if(x===cs.Hidden&&v.current){if(b&&j!=="visible"){N("visible");return}return tr(j,{hidden:()=>C(v),visible:()=>E(v)})}},[j,v,E,C,b,x]);let P=On({base:Ca(m.className),enter:Ca(l),enterFrom:Ca(c),enterTo:Ca(d),entered:Ca(f),leave:Ca(h),leaveFrom:Ca(p),leaveTo:Ca(g)}),T=a2e({beforeEnter:i,afterEnter:a,beforeLeave:s,afterLeave:o}),$=Nj();w.useEffect(()=>{if($&&j==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,j,$]);let O=_&&!S,R=S&&b&&_,M=!$||O?"idle":b?"enter":"leave",F=jje(0),D=Qe(X=>tr(X,{enter:()=>{F.addFlag(Jr.Opening),T.current.beforeEnter()},leave:()=>{F.addFlag(Jr.Closing),T.current.beforeLeave()},idle:()=>{}})),I=Qe(X=>tr(X,{enter:()=>{F.removeFlag(Jr.Opening),T.current.afterEnter()},leave:()=>{F.removeFlag(Jr.Closing),T.current.afterLeave()},idle:()=>{}})),L=MD(()=>{N("hidden"),C(v)},A),W=w.useRef(!1);Jje({immediate:R,container:v,classes:P,direction:M,onStart:On(X=>{W.current=!0,L.onStart(v,X,D)}),onStop:On(X=>{W.current=!1,L.onStop(v,X,I),X==="leave"&&!$v(L)&&(N("hidden"),C(v))})});let U=m,G={ref:y};return R?U={...U,className:Ug(m.className,...P.current.enter,...P.current.enterFrom)}:W.current&&(U.className=Ug(m.className,(n=v.current)==null?void 0:n.className),U.className===""&&delete U.className),k.createElement(Cv.Provider,{value:L},k.createElement(TD,{value:tr(j,{visible:Jr.Open,hidden:Jr.Closed})|F.flags},Rn({ourProps:G,theirProps:U,defaultTag:s2e,features:RD,visible:j==="visible",name:"Transition.Child"})))}function l2e(e,t){let{show:r,appear:n=!1,unmount:i=!0,...a}=e,s=w.useRef(null),o=hi(s,t);Nj();let l=kj();if(r===void 0&&l!==null&&(r=(l&Jr.Open)===Jr.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=w.useState(r?"visible":"hidden"),f=MD(()=>{d("hidden")}),[h,p]=w.useState(!0),g=w.useRef([r]);xr(()=>{h!==!1&&g.current[g.current.length-1]!==r&&(g.current.push(r),p(!1))},[g,r]);let m=w.useMemo(()=>({show:r,appear:n,initial:h}),[r,n,h]);w.useEffect(()=>{if(r)d("visible");else if(!$v(f))d("hidden");else{let b=s.current;if(!b)return;let S=b.getBoundingClientRect();S.x===0&&S.y===0&&S.width===0&&S.height===0&&d("hidden")}},[r,f]);let v={unmount:i},y=Qe(()=>{var b;h&&p(!1),(b=e.beforeEnter)==null||b.call(e)}),x=Qe(()=>{var b;h&&p(!1),(b=e.beforeLeave)==null||b.call(e)});return k.createElement(Cv.Provider,{value:f},k.createElement(Tv.Provider,{value:m},Rn({ourProps:{...v,as:w.Fragment,children:k.createElement(ID,{ref:o,...v,...a,beforeEnter:y,beforeLeave:x})},theirProps:{},defaultTag:w.Fragment,features:RD,visible:c==="visible",name:"Transition"})))}function c2e(e,t){let r=w.useContext(Tv)!==null,n=kj()!==null;return k.createElement(k.Fragment,null,!r&&n?k.createElement(T1,{ref:t,...e}):k.createElement(ID,{ref:t,...e}))}let T1=fn(l2e),ID=fn(o2e),u2e=fn(c2e),d2e=Object.assign(T1,{Child:u2e,Root:T1});function f2e(){const[e,t]=w.useState(""),[r,n]=w.useState("all"),[i,a]=w.useState("all"),{data:s=[],isLoading:o,error:l}=rn({queryKey:["projects"],queryFn:async()=>await Bl.getProjects()}),c=s.filter(f=>{var v,y;const h=f.name.toLowerCase().includes(e.toLowerCase())||((v=f.description)==null?void 0:v.toLowerCase().includes(e.toLowerCase())),p=r==="all"||f.status===r,g=((y=f.bzzz_config)==null?void 0:y.bzzz_enabled)||!1;return h&&p&&(i==="all"||i==="enabled"&&g||i==="disabled"&&!g)}),d=f=>{const h="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium";switch(f){case"active":return`${h} bg-green-100 text-green-800`;case"inactive":return`${h} bg-gray-100 text-gray-800`;case"archived":return`${h} bg-red-100 text-red-800`;default:return`${h} bg-gray-100 text-gray-800`}};return o?u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),u.jsx("div",{className:"space-y-4",children:[1,2,3].map(f=>u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("div",{className:"h-6 bg-gray-200 rounded w-1/3 mb-4"}),u.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mb-2"}),u.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]},f))})]})}):l?u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-md p-4",children:[u.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Error loading projects"}),u.jsx("p",{className:"mt-1 text-sm text-red-700",children:l instanceof Error?l.message:"Failed to load projects"})]})}):u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"sm:flex sm:items-center sm:justify-between mb-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Projects"}),u.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Manage your workflow projects and track their performance"})]}),u.jsx("div",{className:"mt-4 sm:mt-0",children:u.jsxs(Nt,{to:"/projects/new",className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[u.jsx(Go,{className:"h-4 w-4 mr-2"}),"New Project"]})})]}),u.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row gap-4",children:[u.jsxs("div",{className:"flex-1 relative",children:[u.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:u.jsx(dS,{className:"h-5 w-5 text-gray-400"})}),u.jsx("input",{type:"text",placeholder:"Search projects...",value:e,onChange:f=>t(f.target.value),className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(uS,{className:"h-5 w-5 text-gray-400"}),u.jsxs("select",{value:r,onChange:f=>n(f.target.value),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",children:[u.jsx("option",{value:"all",children:"All Status"}),u.jsx("option",{value:"active",children:"Active"}),u.jsx("option",{value:"inactive",children:"Inactive"}),u.jsx("option",{value:"archived",children:"Archived"})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("span",{className:"text-sm text-gray-500",children:"🐝"}),u.jsxs("select",{value:i,onChange:f=>a(f.target.value),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",children:[u.jsx("option",{value:"all",children:"All Projects"}),u.jsx("option",{value:"enabled",children:"Bzzz Enabled"}),u.jsx("option",{value:"disabled",children:"Bzzz Disabled"})]})]})]})]}),c.length===0?u.jsxs("div",{className:"text-center py-12",children:[u.jsx(gf,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No projects found"}),u.jsx("p",{className:"text-gray-500 mb-4",children:e||r!=="all"?"Try adjusting your search or filter criteria.":"Get started by creating your first project."}),u.jsxs(Nt,{to:"/projects/new",className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700",children:[u.jsx(Go,{className:"h-4 w-4 mr-2"}),"Create Project"]})]}):u.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:c.map(f=>{var h,p,g,m,v;return u.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 hover:shadow-md transition-shadow",children:[u.jsxs("div",{className:"p-6 pb-4",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(Nt,{to:`/projects/${f.id}`,className:"text-lg font-semibold text-gray-900 hover:text-blue-600 line-clamp-1",children:f.name}),u.jsx("p",{className:"text-sm text-gray-500 mt-1 line-clamp-2",children:f.description})]}),u.jsxs(Ks,{as:"div",className:"relative",children:[u.jsx(Ks.Button,{className:"p-1 rounded-full hover:bg-gray-100",children:u.jsx(Oq,{className:"h-5 w-5 text-gray-400"})}),u.jsx(d2e,{as:w.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:u.jsx(Ks.Items,{className:"absolute right-0 z-10 mt-2 w-48 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:u.jsxs("div",{className:"py-1",children:[u.jsx(Ks.Item,{children:({active:y})=>u.jsx(Nt,{to:`/projects/${f.id}/edit`,className:`${y?"bg-gray-100":""} block px-4 py-2 text-sm text-gray-700`,children:"Edit Project"})}),u.jsx(Ks.Item,{children:({active:y})=>u.jsx(Nt,{to:`/projects/${f.id}/workflows`,className:`${y?"bg-gray-100":""} block px-4 py-2 text-sm text-gray-700`,children:"Manage Workflows"})}),u.jsx(Ks.Item,{children:({active:y})=>u.jsx(Nt,{to:`/projects/${f.id}/bzzz`,className:`${y?"bg-gray-100":""} block px-4 py-2 text-sm text-gray-700`,children:"🐝 Bzzz Integration"})}),u.jsx(Ks.Item,{children:({active:y})=>u.jsx("button",{className:`${y?"bg-gray-100":""} block w-full text-left px-4 py-2 text-sm text-red-700`,onClick:()=>{},children:"Archive Project"})})]})})})]})]}),u.jsxs("div",{className:"flex items-center justify-between mt-4",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("span",{className:d(f.status),children:f.status}),((h=f.bzzz_config)==null?void 0:h.bzzz_enabled)&&u.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:["🐝 Bzzz",((p=f.bzzz_config)==null?void 0:p.ready_to_claim)&&u.jsx("span",{className:"ml-1 inline-block w-2 h-2 bg-green-400 rounded-full"})]})]}),u.jsxs("div",{className:"flex items-center space-x-1",children:[(g=f.tags)==null?void 0:g.slice(0,2).map(y=>u.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs bg-gray-100 text-gray-600",children:[u.jsx(fS,{className:"h-3 w-3 mr-1"}),y]},y)),f.tags&&f.tags.length>2&&u.jsxs("span",{className:"text-xs text-gray-500",children:["+",f.tags.length-2]})]})]}),((m=f.bzzz_config)==null?void 0:m.bzzz_enabled)&&((v=f.bzzz_config)==null?void 0:v.git_url)&&u.jsx("div",{className:"mt-3 text-xs text-gray-500",children:u.jsxs("div",{className:"flex items-center space-x-1",children:[u.jsx("svg",{className:"h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:u.jsx("path",{fillRule:"evenodd",d:"M10 0C4.477 0 0 4.484 0 10.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0110 4.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.942.359.31.678.921.678 1.856 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0020 10.017C20 4.484 15.522 0 10 0z",clipRule:"evenodd"})}),u.jsxs("span",{children:[f.bzzz_config.git_owner,"/",f.bzzz_config.git_repository]}),f.bzzz_config.ready_to_claim&&u.jsx("span",{className:"text-green-600",children:"• Ready for tasks"})]})})]}),u.jsx("div",{className:"border-t px-6 py-4",children:u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(Ko,{className:"h-4 w-4 text-gray-400"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:f.workflow_count||0}),u.jsx("p",{className:"text-xs text-gray-500",children:"Workflows"})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(gf,{className:"h-4 w-4 text-gray-400"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:f.file_count||0}),u.jsx("p",{className:"text-xs text-gray-500",children:"Files"})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(ph,{className:"h-4 w-4 text-gray-400"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:f.has_project_plan?"Yes":"No"}),u.jsx("p",{className:"text-xs text-gray-500",children:"Project Plan"})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(Wr,{className:"h-4 w-4 text-gray-400"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:rc(new Date(f.updated_at),{addSuffix:!0})}),u.jsx("p",{className:"text-xs text-gray-500",children:"Last Update"})]})]})]})}),u.jsx("div",{className:"border-t px-6 py-3 bg-gray-50 rounded-b-lg",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx(Nt,{to:`/projects/${f.id}/workflows`,className:"text-sm text-blue-600 hover:text-blue-800 font-medium",children:"View Workflows"}),u.jsx(Nt,{to:`/projects/${f.id}`,className:"text-sm text-gray-600 hover:text-gray-800 font-medium",children:"View Details →"})]})})]},f.id)})})]})}function h2e(){var p,g;const{id:e}=a5(),t=Is(),[r,n]=w.useState(0),{data:i,isLoading:a,error:s}=rn({queryKey:["project",e],queryFn:async()=>{if(!e)throw new Error("Project ID is required");return await Bl.getProject(e)},enabled:!!e}),{data:o=[]}=rn({queryKey:["project",e,"workflows"],queryFn:async()=>{if(!e)throw new Error("Project ID is required");return await Bl.getProjectWorkflows(e)},enabled:!!e}),{data:l=[]}=rn({queryKey:["project",e,"executions"],queryFn:async()=>{if(!e)throw new Error("Project ID is required");return await Bl.getProjectExecutions(e)},enabled:!!e}),{data:c}=rn({queryKey:["project",e,"metrics"],queryFn:async()=>{if(!e)throw new Error("Project ID is required");return await Bl.getProjectMetrics(e)},enabled:!!e}),d=m=>{const v="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium";switch(m){case"active":return`${v} bg-green-100 text-green-800`;case"inactive":return`${v} bg-gray-100 text-gray-800`;case"draft":return`${v} bg-yellow-100 text-yellow-800`;case"completed":return`${v} bg-green-100 text-green-800`;case"failed":return`${v} bg-red-100 text-red-800`;case"running":return`${v} bg-blue-100 text-blue-800`;case"pending":return`${v} bg-yellow-100 text-yellow-800`;default:return`${v} bg-gray-100 text-gray-800`}},f=m=>{switch(m){case"completed":return u.jsx(ii,{className:"h-5 w-5 text-green-500"});case"failed":return u.jsx(si,{className:"h-5 w-5 text-red-500"});case"running":return u.jsx(Wr,{className:"h-5 w-5 text-blue-500 animate-spin"});default:return u.jsx(Wr,{className:"h-5 w-5 text-gray-400"})}};if(a)return u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),u.jsx("div",{className:"h-32 bg-gray-200 rounded mb-6"}),u.jsx("div",{className:"h-64 bg-gray-200 rounded"})]})});if(s||!i)return u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"text-center py-12",children:[u.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Project not found"}),u.jsx("p",{className:"text-gray-600 mb-4",children:"The project you're looking for doesn't exist or has been deleted."}),u.jsxs("button",{onClick:()=>t("/projects"),className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700",children:[u.jsx(Rm,{className:"h-4 w-4 mr-2"}),"Back to Projects"]})]})});const h=[{name:"Overview",count:null},{name:"Workflows",count:o.length},{name:"Executions",count:l.length},{name:"Settings",count:null}];return u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"flex items-center space-x-4 mb-4",children:u.jsxs("button",{onClick:()=>t("/projects"),className:"flex items-center text-gray-500 hover:text-gray-700",children:[u.jsx(Rm,{className:"h-5 w-5 mr-1"}),"Back to Projects"]})}),u.jsxs("div",{className:"flex justify-between items-start",children:[u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:i.name}),u.jsx("span",{className:d(i.status),children:i.status})]}),u.jsx("p",{className:"text-gray-600 max-w-3xl",children:i.description}),i.tags&&i.tags.length>0&&u.jsxs("div",{className:"flex items-center space-x-2 mt-3",children:[u.jsx(fS,{className:"h-4 w-4 text-gray-400"}),u.jsx("div",{className:"flex flex-wrap gap-2",children:i.tags.map(m=>u.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded text-xs bg-gray-100 text-gray-600",children:m},m))})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("button",{onClick:()=>t(`/projects/${e}/edit`),className:"inline-flex items-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50",children:[u.jsx(yf,{className:"h-4 w-4 mr-2"}),"Edit"]}),u.jsxs("button",{className:"inline-flex items-center px-3 py-2 border border-red-300 rounded-md text-sm font-medium text-red-700 bg-white hover:bg-red-50",children:[u.jsx(U3,{className:"h-4 w-4 mr-2"}),"Archive"]})]})]})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(Ko,{className:"h-8 w-8 text-blue-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[(c==null?void 0:c.active_workflows)||o.filter(m=>m.status==="active").length,"/",(c==null?void 0:c.total_workflows)||o.length]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Active Workflows"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ai,{className:"h-8 w-8 text-green-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:(c==null?void 0:c.total_executions)||l.length}),u.jsx("p",{className:"text-sm text-gray-500",children:"Total Executions"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ph,{className:"h-8 w-8 text-purple-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsxs("p",{className:"text-2xl font-semibold text-gray-900",children:[c!=null&&c.success_rate?(c.success_rate*100).toFixed(0):l.length>0?Math.round(l.filter(m=>m.status==="completed").length/l.length*100):0,"%"]}),u.jsx("p",{className:"text-sm text-gray-500",children:"Success Rate"})]})]})}),u.jsx("div",{className:"bg-white rounded-lg border p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(Wr,{className:"h-8 w-8 text-orange-500"}),u.jsxs("div",{className:"ml-4",children:[u.jsx("p",{className:"text-lg font-semibold text-gray-900",children:rc(new Date((c==null?void 0:c.last_activity)||i.updated_at),{addSuffix:!0})}),u.jsx("p",{className:"text-sm text-gray-500",children:"Last Activity"})]})]})})]}),u.jsxs(Ta.Group,{selectedIndex:r,onChange:n,children:[u.jsx(Ta.List,{className:"flex space-x-1 rounded-xl bg-gray-100 p-1",children:h.map(m=>u.jsx(Ta,{className:({selected:v})=>`w-full rounded-lg py-2.5 text-sm font-medium leading-5 transition-all
|
||
${v?"bg-white text-blue-700 shadow":"text-gray-600 hover:bg-white/[0.12] hover:text-gray-900"}`,children:u.jsxs("span",{className:"flex items-center justify-center space-x-2",children:[u.jsx("span",{children:m.name}),m.count!==null&&u.jsx("span",{className:"bg-gray-200 text-gray-600 px-2 py-1 rounded-full text-xs",children:m.count})]})},m.name))}),u.jsxs(Ta.Panels,{className:"mt-6",children:[u.jsx(Ta.Panel,{children:u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Project Information"}),u.jsxs("dl",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Created"}),u.jsx("dd",{className:"text-sm text-gray-900",children:Cd(new Date(i.created_at),"PPP")})]}),u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Last Updated"}),u.jsx("dd",{className:"text-sm text-gray-900",children:Cd(new Date(i.updated_at),"PPP")})]}),((p=i.metadata)==null?void 0:p.owner)&&u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Owner"}),u.jsx("dd",{className:"text-sm text-gray-900",children:i.metadata.owner})]}),((g=i.metadata)==null?void 0:g.department)&&u.jsxs("div",{children:[u.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Department"}),u.jsx("dd",{className:"text-sm text-gray-900",children:i.metadata.department})]})]})]}),u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Recent Executions"}),u.jsx("div",{className:"space-y-3",children:l.slice(0,5).map(m=>{const v=o.find(y=>y.id===m.workflow_id);return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[f(m.status),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:v==null?void 0:v.name}),u.jsx("p",{className:"text-xs text-gray-500",children:rc(new Date(m.started_at),{addSuffix:!0})})]})]}),u.jsx("span",{className:d(m.status),children:m.status})]},m.id)})})]})]})}),u.jsx(Ta.Panel,{children:u.jsxs("div",{className:"bg-white rounded-lg border",children:[u.jsx("div",{className:"p-6 border-b",children:u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Workflows"}),u.jsxs(Nt,{to:`/projects/${e}/workflows/new`,className:"inline-flex items-center px-3 py-2 border border-transparent rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700",children:[u.jsx(Go,{className:"h-4 w-4 mr-2"}),"Add Workflow"]})]})}),u.jsx("div",{className:"divide-y",children:o.map(m=>u.jsx("div",{className:"p-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx(Nt,{to:`/workflows/${m.id}`,className:"text-lg font-medium text-gray-900 hover:text-blue-600",children:m.name}),u.jsx("span",{className:d(m.status),children:m.status})]}),u.jsx("p",{className:"text-gray-600 mt-1",children:m.description}),u.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:["Updated ",rc(new Date(m.updated_at),{addSuffix:!0})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("button",{className:"p-2 text-gray-400 hover:text-gray-600",children:m.status==="active"?u.jsx(Dm,{className:"h-5 w-5"}):u.jsx(ai,{className:"h-5 w-5"})}),u.jsx(Nt,{to:`/workflows/${m.id}/edit`,className:"p-2 text-gray-400 hover:text-gray-600",children:u.jsx(yf,{className:"h-5 w-5"})})]})]})},m.id))})]})}),u.jsx(Ta.Panel,{children:u.jsxs("div",{className:"bg-white rounded-lg border",children:[u.jsx("div",{className:"p-6 border-b",children:u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Execution History"})}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Workflow"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Started"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Duration"}),u.jsx("th",{className:"relative px-6 py-3",children:u.jsx("span",{className:"sr-only",children:"Actions"})})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:l.map(m=>{const v=o.find(x=>x.id===m.workflow_id),y=m.completed_at?new Date(m.completed_at).getTime()-new Date(m.started_at).getTime():null;return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsxs("div",{className:"flex items-center",children:[f(m.status),u.jsxs("div",{className:"ml-3",children:[u.jsx("div",{className:"text-sm font-medium text-gray-900",children:v==null?void 0:v.name}),u.jsx("div",{className:"text-sm text-gray-500",children:m.id})]})]})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsx("span",{className:d(m.status),children:m.status})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Cd(new Date(m.started_at),"PPp")}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:y?`${Math.round(y/1e3)}s`:"-"}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:u.jsx(Nt,{to:`/executions/${m.id}`,className:"text-blue-600 hover:text-blue-900",children:"View Details"})})]},m.id)})})]})})]})}),u.jsx(Ta.Panel,{children:u.jsxs("div",{className:"bg-white rounded-lg border p-6",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Project Settings"}),u.jsx("p",{className:"text-gray-600",children:"Project settings and configuration options will be available here."})]})})]})]})]})}var Oh=e=>e.type==="checkbox",yo=e=>e instanceof Date,Nr=e=>e==null;const DD=e=>typeof e=="object";var Tt=e=>!Nr(e)&&!Array.isArray(e)&&DD(e)&&!yo(e),p2e=e=>Tt(e)&&e.target?Oh(e.target)?e.target.checked:e.target.value:e,m2e=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,g2e=(e,t)=>e.has(m2e(t)),y2e=e=>{const t=e.constructor&&e.constructor.prototype;return Tt(t)&&t.hasOwnProperty("isPrototypeOf")},Mj=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Zt(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Mj&&(e instanceof Blob||n))&&(r||Tt(e)))if(t=r?[]:{},!r&&!y2e(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Zt(e[i]));else return e;return t}var Mv=e=>/^\w*$/.test(e),Dt=e=>e===void 0,Rj=e=>Array.isArray(e)?e.filter(Boolean):[],Ij=e=>Rj(e.replace(/["|']|\]/g,"").split(/\.|\[/)),fe=(e,t,r)=>{if(!t||!Tt(e))return r;const n=(Mv(t)?[t]:Ij(t)).reduce((i,a)=>Nr(i)?i:i[a],e);return Dt(n)||n===e?Dt(e[t])?r:e[t]:n},vi=e=>typeof e=="boolean",rt=(e,t,r)=>{let n=-1;const i=Mv(t)?[t]:Ij(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const c=e[o];l=Tt(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const IP={BLUR:"blur",FOCUS_OUT:"focusout"},Jn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},zi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},v2e=k.createContext(null);v2e.displayName="HookFormContext";var x2e=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==Jn.all&&(t._proxyFormState[s]=!n||Jn.all),e[s]}});return i};const b2e=typeof window<"u"?w.useLayoutEffect:w.useEffect;var Ni=e=>typeof e=="string",w2e=(e,t,r,n,i)=>Ni(e)?(n&&t.watch.add(e),fe(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),fe(r,a))):(n&&(t.watchAll=!0),r),LD=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Bd=e=>Array.isArray(e)?e:[e],DP=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},C1=e=>Nr(e)||!DD(e);function qa(e,t,r=new WeakSet){if(C1(e)||C1(t))return e===t;if(yo(e)&&yo(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const s=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const o=t[a];if(yo(s)&&yo(o)||Tt(s)&&Tt(o)||Array.isArray(s)&&Array.isArray(o)?!qa(s,o,r):s!==o)return!1}}return!0}var Rr=e=>Tt(e)&&!Object.keys(e).length,Dj=e=>e.type==="file",ei=e=>typeof e=="function",Wg=e=>{if(!Mj)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},FD=e=>e.type==="select-multiple",Lj=e=>e.type==="radio",_2e=e=>Lj(e)||Oh(e),dx=e=>Wg(e)&&e.isConnected;function S2e(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Dt(e)?n++:e[t[n++]];return e}function j2e(e){for(const t in e)if(e.hasOwnProperty(t)&&!Dt(e[t]))return!1;return!0}function Mt(e,t){const r=Array.isArray(t)?t:Mv(t)?[t]:Ij(t),n=r.length===1?e:S2e(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Tt(n)&&Rr(n)||Array.isArray(n)&&j2e(n))&&Mt(e,r.slice(0,-1)),e}var BD=e=>{for(const t in e)if(ei(e[t]))return!0;return!1};function Vg(e,t={}){const r=Array.isArray(e);if(Tt(e)||r)for(const n in e)Array.isArray(e[n])||Tt(e[n])&&!BD(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Vg(e[n],t[n])):Nr(e[n])||(t[n]=!0);return t}function zD(e,t,r){const n=Array.isArray(e);if(Tt(e)||n)for(const i in e)Array.isArray(e[i])||Tt(e[i])&&!BD(e[i])?Dt(t)||C1(r[i])?r[i]=Array.isArray(e[i])?Vg(e[i],[]):{...Vg(e[i])}:zD(e[i],Nr(t)?{}:t[i],r[i]):r[i]=!qa(e[i],t[i]);return r}var ad=(e,t)=>zD(e,t,Vg(t));const LP={value:!1,isValid:!1},FP={value:!0,isValid:!0};var UD=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Dt(e[0].attributes.value)?Dt(e[0].value)||e[0].value===""?FP:{value:e[0].value,isValid:!0}:FP:LP}return LP},WD=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Dt(e)?e:t?e===""?NaN:e&&+e:r&&Ni(e)?new Date(e):n?n(e):e;const BP={isValid:!1,value:null};var VD=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,BP):BP;function zP(e){const t=e.ref;return Dj(t)?t.files:Lj(t)?VD(e.refs).value:FD(t)?[...t.selectedOptions].map(({value:r})=>r):Oh(t)?UD(e.refs).value:WD(Dt(t.value)?e.ref.value:t.value,e)}var N2e=(e,t,r,n)=>{const i={};for(const a of e){const s=fe(t,a);s&&rt(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Hg=e=>e instanceof RegExp,sd=e=>Dt(e)?e:Hg(e)?e.source:Tt(e)?Hg(e.value)?e.value.source:e.value:e,UP=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched});const WP="AsyncFunction";var E2e=e=>!!e&&!!e.validate&&!!(ei(e.validate)&&e.validate.constructor.name===WP||Tt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===WP)),O2e=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),VP=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const zd=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=fe(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(zd(o,t))break}else if(Tt(o)&&zd(o,t))break}}};function HP(e,t,r){const n=fe(e,r);if(n||Mv(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=fe(t,a),o=fe(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var A2e=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Rr(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||Jn.all))},k2e=(e,t,r)=>!e||!t||e===t||Bd(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),P2e=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,T2e=(e,t)=>!Rj(fe(e,t)).length&&Mt(e,t),C2e=(e,t,r)=>{const n=Bd(fe(e,r));return rt(n,"root",t[r]),rt(e,r,n),e},Gp=e=>Ni(e);function qP(e,t,r="validate"){if(Gp(e)||Array.isArray(e)&&e.every(Gp)||vi(e)&&!e)return{type:r,message:Gp(e)?e:"",ref:t}}var Nl=e=>Tt(e)&&!Hg(e)?e:{value:e,message:""},KP=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:c,minLength:d,min:f,max:h,pattern:p,validate:g,name:m,valueAsNumber:v,mount:y}=e._f,x=fe(r,m);if(!y||t.has(m))return{};const b=o?o[0]:s,S=T=>{i&&b.reportValidity&&(b.setCustomValidity(vi(T)?"":T||""),b.reportValidity())},_={},j=Lj(s),N=Oh(s),A=j||N,E=(v||Dj(s))&&Dt(s.value)&&Dt(x)||Wg(s)&&s.value===""||x===""||Array.isArray(x)&&!x.length,C=LD.bind(null,m,n,_),P=(T,$,O,R=zi.maxLength,M=zi.minLength)=>{const F=T?$:O;_[m]={type:T?R:M,message:F,ref:s,...C(T?R:M,F)}};if(a?!Array.isArray(x)||!x.length:l&&(!A&&(E||Nr(x))||vi(x)&&!x||N&&!UD(o).isValid||j&&!VD(o).isValid)){const{value:T,message:$}=Gp(l)?{value:!!l,message:l}:Nl(l);if(T&&(_[m]={type:zi.required,message:$,ref:b,...C(zi.required,$)},!n))return S($),_}if(!E&&(!Nr(f)||!Nr(h))){let T,$;const O=Nl(h),R=Nl(f);if(!Nr(x)&&!isNaN(x)){const M=s.valueAsNumber||x&&+x;Nr(O.value)||(T=M>O.value),Nr(R.value)||($=M<R.value)}else{const M=s.valueAsDate||new Date(x),F=L=>new Date(new Date().toDateString()+" "+L),D=s.type=="time",I=s.type=="week";Ni(O.value)&&x&&(T=D?F(x)>F(O.value):I?x>O.value:M>new Date(O.value)),Ni(R.value)&&x&&($=D?F(x)<F(R.value):I?x<R.value:M<new Date(R.value))}if((T||$)&&(P(!!T,O.message,R.message,zi.max,zi.min),!n))return S(_[m].message),_}if((c||d)&&!E&&(Ni(x)||a&&Array.isArray(x))){const T=Nl(c),$=Nl(d),O=!Nr(T.value)&&x.length>+T.value,R=!Nr($.value)&&x.length<+$.value;if((O||R)&&(P(O,T.message,$.message),!n))return S(_[m].message),_}if(p&&!E&&Ni(x)){const{value:T,message:$}=Nl(p);if(Hg(T)&&!x.match(T)&&(_[m]={type:zi.pattern,message:$,ref:s,...C(zi.pattern,$)},!n))return S($),_}if(g){if(ei(g)){const T=await g(x,r),$=qP(T,b);if($&&(_[m]={...$,...C(zi.validate,$.message)},!n))return S($.message),_}else if(Tt(g)){let T={};for(const $ in g){if(!Rr(T)&&!n)break;const O=qP(await g[$](x,r),b,$);O&&(T={...O,...C($,O.message)},S(O.message),n&&(_[m]=T))}if(!Rr(T)&&(_[m]={ref:b,...T},!n))return _}}return S(!0),_};const $2e={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function M2e(e={}){let t={...$2e,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:ei(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=Tt(t.defaultValues)||Tt(t.values)?Zt(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Zt(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:DP(),state:DP()},p=t.criteriaMode===Jn.all,g=B=>V=>{clearTimeout(c),c=setTimeout(B,V)},m=async B=>{if(!t.disabled&&(d.isValid||f.isValid||B)){const V=t.resolver?Rr((await N()).errors):await E(n,!0);V!==r.isValid&&h.state.next({isValid:V})}},v=(B,V)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((B||Array.from(o.mount)).forEach(q=>{q&&(V?rt(r.validatingFields,q,V):Mt(r.validatingFields,q))}),h.state.next({validatingFields:r.validatingFields,isValidating:!Rr(r.validatingFields)}))},y=(B,V=[],q,ie,te=!0,Q=!0)=>{if(ie&&q&&!t.disabled){if(s.action=!0,Q&&Array.isArray(fe(n,B))){const he=q(fe(n,B),ie.argA,ie.argB);te&&rt(n,B,he)}if(Q&&Array.isArray(fe(r.errors,B))){const he=q(fe(r.errors,B),ie.argA,ie.argB);te&&rt(r.errors,B,he),T2e(r.errors,B)}if((d.touchedFields||f.touchedFields)&&Q&&Array.isArray(fe(r.touchedFields,B))){const he=q(fe(r.touchedFields,B),ie.argA,ie.argB);te&&rt(r.touchedFields,B,he)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=ad(i,a)),h.state.next({name:B,isDirty:P(B,V),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else rt(a,B,V)},x=(B,V)=>{rt(r.errors,B,V),h.state.next({errors:r.errors})},b=B=>{r.errors=B,h.state.next({errors:r.errors,isValid:!1})},S=(B,V,q,ie)=>{const te=fe(n,B);if(te){const Q=fe(a,B,Dt(q)?fe(i,B):q);Dt(Q)||ie&&ie.defaultChecked||V?rt(a,B,V?Q:zP(te._f)):O(B,Q),s.mount&&m()}},_=(B,V,q,ie,te)=>{let Q=!1,he=!1;const De={name:B};if(!t.disabled){if(!q||ie){(d.isDirty||f.isDirty)&&(he=r.isDirty,r.isDirty=De.isDirty=P(),Q=he!==De.isDirty);const We=qa(fe(i,B),V);he=!!fe(r.dirtyFields,B),We?Mt(r.dirtyFields,B):rt(r.dirtyFields,B,!0),De.dirtyFields=r.dirtyFields,Q=Q||(d.dirtyFields||f.dirtyFields)&&he!==!We}if(q){const We=fe(r.touchedFields,B);We||(rt(r.touchedFields,B,q),De.touchedFields=r.touchedFields,Q=Q||(d.touchedFields||f.touchedFields)&&We!==q)}Q&&te&&h.state.next(De)}return Q?De:{}},j=(B,V,q,ie)=>{const te=fe(r.errors,B),Q=(d.isValid||f.isValid)&&vi(V)&&r.isValid!==V;if(t.delayError&&q?(l=g(()=>x(B,q)),l(t.delayError)):(clearTimeout(c),l=null,q?rt(r.errors,B,q):Mt(r.errors,B)),(q?!qa(te,q):te)||!Rr(ie)||Q){const he={...ie,...Q&&vi(V)?{isValid:V}:{},errors:r.errors,name:B};r={...r,...he},h.state.next(he)}},N=async B=>{v(B,!0);const V=await t.resolver(a,t.context,N2e(B||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return v(B),V},A=async B=>{const{errors:V}=await N(B);if(B)for(const q of B){const ie=fe(V,q);ie?rt(r.errors,q,ie):Mt(r.errors,q)}else r.errors=V;return V},E=async(B,V,q={valid:!0})=>{for(const ie in B){const te=B[ie];if(te){const{_f:Q,...he}=te;if(Q){const De=o.array.has(Q.name),We=te._f&&E2e(te._f);We&&d.validatingFields&&v([ie],!0);const zt=await KP(te,o.disabled,a,p,t.shouldUseNativeValidation&&!V,De);if(We&&d.validatingFields&&v([ie]),zt[Q.name]&&(q.valid=!1,V))break;!V&&(fe(zt,Q.name)?De?C2e(r.errors,zt,Q.name):rt(r.errors,Q.name,zt[Q.name]):Mt(r.errors,Q.name))}!Rr(he)&&await E(he,V,q)}}return q.valid},C=()=>{for(const B of o.unMount){const V=fe(n,B);V&&(V._f.refs?V._f.refs.every(q=>!dx(q)):!dx(V._f.ref))&&we(B)}o.unMount=new Set},P=(B,V)=>!t.disabled&&(B&&V&&rt(a,B,V),!qa(L(),i)),T=(B,V,q)=>w2e(B,o,{...s.mount?a:Dt(V)?i:Ni(B)?{[B]:V}:V},q,V),$=B=>Rj(fe(s.mount?a:i,B,t.shouldUnregister?fe(i,B,[]):[])),O=(B,V,q={})=>{const ie=fe(n,B);let te=V;if(ie){const Q=ie._f;Q&&(!Q.disabled&&rt(a,B,WD(V,Q)),te=Wg(Q.ref)&&Nr(V)?"":V,FD(Q.ref)?[...Q.ref.options].forEach(he=>he.selected=te.includes(he.value)):Q.refs?Oh(Q.ref)?Q.refs.forEach(he=>{(!he.defaultChecked||!he.disabled)&&(Array.isArray(te)?he.checked=!!te.find(De=>De===he.value):he.checked=te===he.value||!!te)}):Q.refs.forEach(he=>he.checked=he.value===te):Dj(Q.ref)?Q.ref.value="":(Q.ref.value=te,Q.ref.type||h.state.next({name:B,values:Zt(a)})))}(q.shouldDirty||q.shouldTouch)&&_(B,te,q.shouldTouch,q.shouldDirty,!0),q.shouldValidate&&I(B)},R=(B,V,q)=>{for(const ie in V){if(!V.hasOwnProperty(ie))return;const te=V[ie],Q=B+"."+ie,he=fe(n,Q);(o.array.has(B)||Tt(te)||he&&!he._f)&&!yo(te)?R(Q,te,q):O(Q,te,q)}},M=(B,V,q={})=>{const ie=fe(n,B),te=o.array.has(B),Q=Zt(V);rt(a,B,Q),te?(h.array.next({name:B,values:Zt(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&q.shouldDirty&&h.state.next({name:B,dirtyFields:ad(i,a),isDirty:P(B,Q)})):ie&&!ie._f&&!Nr(Q)?R(B,Q,q):O(B,Q,q),VP(B,o)&&h.state.next({...r}),h.state.next({name:s.mount?B:void 0,values:Zt(a)})},F=async B=>{s.mount=!0;const V=B.target;let q=V.name,ie=!0;const te=fe(n,q),Q=We=>{ie=Number.isNaN(We)||yo(We)&&isNaN(We.getTime())||qa(We,fe(a,q,We))},he=UP(t.mode),De=UP(t.reValidateMode);if(te){let We,zt;const pi=V.type?zP(te._f):p2e(B),ft=B.type===IP.BLUR||B.type===IP.FOCUS_OUT,Kr=!O2e(te._f)&&!t.resolver&&!fe(r.errors,q)&&!te._f.deps||P2e(ft,fe(r.touchedFields,q),r.isSubmitted,De,he),Dn=VP(q,o,ft);rt(a,q,pi),ft?(te._f.onBlur&&te._f.onBlur(B),l&&l(0)):te._f.onChange&&te._f.onChange(B);const Ln=_(q,pi,ft),Di=!Rr(Ln)||Dn;if(!ft&&h.state.next({name:q,type:B.type,values:Zt(a)}),Kr)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?ft&&m():ft||m()),Di&&h.state.next({name:q,...Dn?{}:Ln});if(!ft&&Dn&&h.state.next({...r}),t.resolver){const{errors:hn}=await N([q]);if(Q(pi),ie){const pn=HP(r.errors,n,q),Oa=HP(hn,n,pn.name||q);We=Oa.error,q=Oa.name,zt=Rr(hn)}}else v([q],!0),We=(await KP(te,o.disabled,a,p,t.shouldUseNativeValidation))[q],v([q]),Q(pi),ie&&(We?zt=!1:(d.isValid||f.isValid)&&(zt=await E(n,!0)));ie&&(te._f.deps&&I(te._f.deps),j(q,zt,We,Ln))}},D=(B,V)=>{if(fe(r.errors,V)&&B.focus)return B.focus(),1},I=async(B,V={})=>{let q,ie;const te=Bd(B);if(t.resolver){const Q=await A(Dt(B)?B:te);q=Rr(Q),ie=B?!te.some(he=>fe(Q,he)):q}else B?(ie=(await Promise.all(te.map(async Q=>{const he=fe(n,Q);return await E(he&&he._f?{[Q]:he}:he)}))).every(Boolean),!(!ie&&!r.isValid)&&m()):ie=q=await E(n);return h.state.next({...!Ni(B)||(d.isValid||f.isValid)&&q!==r.isValid?{}:{name:B},...t.resolver||!B?{isValid:q}:{},errors:r.errors}),V.shouldFocus&&!ie&&zd(n,D,B?te:o.mount),ie},L=B=>{const V={...s.mount?a:i};return Dt(B)?V:Ni(B)?fe(V,B):B.map(q=>fe(V,q))},W=(B,V)=>({invalid:!!fe((V||r).errors,B),isDirty:!!fe((V||r).dirtyFields,B),error:fe((V||r).errors,B),isValidating:!!fe(r.validatingFields,B),isTouched:!!fe((V||r).touchedFields,B)}),U=B=>{B&&Bd(B).forEach(V=>Mt(r.errors,V)),h.state.next({errors:B?r.errors:{}})},G=(B,V,q)=>{const ie=(fe(n,B,{_f:{}})._f||{}).ref,te=fe(r.errors,B)||{},{ref:Q,message:he,type:De,...We}=te;rt(r.errors,B,{...We,...V,ref:ie}),h.state.next({name:B,errors:r.errors,isValid:!1}),q&&q.shouldFocus&&ie&&ie.focus&&ie.focus()},X=(B,V)=>ei(B)?h.state.subscribe({next:q=>B(T(void 0,V),q)}):T(B,V,!0),ne=B=>h.state.subscribe({next:V=>{k2e(B.name,V.name,B.exact)&&A2e(V,B.formState||d,Oe,B.reRenderRoot)&&B.callback({values:{...a},...r,...V})}}).unsubscribe,ue=B=>(s.mount=!0,f={...f,...B.formState},ne({...B,formState:f})),we=(B,V={})=>{for(const q of B?Bd(B):o.mount)o.mount.delete(q),o.array.delete(q),V.keepValue||(Mt(n,q),Mt(a,q)),!V.keepError&&Mt(r.errors,q),!V.keepDirty&&Mt(r.dirtyFields,q),!V.keepTouched&&Mt(r.touchedFields,q),!V.keepIsValidating&&Mt(r.validatingFields,q),!t.shouldUnregister&&!V.keepDefaultValue&&Mt(i,q);h.state.next({values:Zt(a)}),h.state.next({...r,...V.keepDirty?{isDirty:P()}:{}}),!V.keepIsValid&&m()},je=({disabled:B,name:V})=>{(vi(B)&&s.mount||B||o.disabled.has(V))&&(B?o.disabled.add(V):o.disabled.delete(V))},Z=(B,V={})=>{let q=fe(n,B);const ie=vi(V.disabled)||vi(t.disabled);return rt(n,B,{...q||{},_f:{...q&&q._f?q._f:{ref:{name:B}},name:B,mount:!0,...V}}),o.mount.add(B),q?je({disabled:vi(V.disabled)?V.disabled:t.disabled,name:B}):S(B,!0,V.value),{...ie?{disabled:V.disabled||t.disabled}:{},...t.progressive?{required:!!V.required,min:sd(V.min),max:sd(V.max),minLength:sd(V.minLength),maxLength:sd(V.maxLength),pattern:sd(V.pattern)}:{},name:B,onChange:F,onBlur:F,ref:te=>{if(te){Z(B,V),q=fe(n,B);const Q=Dt(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,he=_2e(Q),De=q._f.refs||[];if(he?De.find(We=>We===Q):Q===q._f.ref)return;rt(n,B,{_f:{...q._f,...he?{refs:[...De.filter(dx),Q,...Array.isArray(fe(i,B))?[{}]:[]],ref:{type:Q.type,name:B}}:{ref:Q}}}),S(B,!1,void 0,Q)}else q=fe(n,B,{}),q._f&&(q._f.mount=!1),(t.shouldUnregister||V.shouldUnregister)&&!(g2e(o.array,B)&&s.action)&&o.unMount.add(B)}}},ae=()=>t.shouldFocusError&&zd(n,D,o.mount),ge=B=>{vi(B)&&(h.state.next({disabled:B}),zd(n,(V,q)=>{const ie=fe(n,q);ie&&(V.disabled=ie._f.disabled||B,Array.isArray(ie._f.refs)&&ie._f.refs.forEach(te=>{te.disabled=ie._f.disabled||B}))},0,!1))},Y=(B,V)=>async q=>{let ie;q&&(q.preventDefault&&q.preventDefault(),q.persist&&q.persist());let te=Zt(a);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:Q,values:he}=await N();r.errors=Q,te=Zt(he)}else await E(n);if(o.disabled.size)for(const Q of o.disabled)Mt(te,Q);if(Mt(r.errors,"root"),Rr(r.errors)){h.state.next({errors:{}});try{await B(te,q)}catch(Q){ie=Q}}else V&&await V({...r.errors},q),ae(),setTimeout(ae);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Rr(r.errors)&&!ie,submitCount:r.submitCount+1,errors:r.errors}),ie)throw ie},$e=(B,V={})=>{fe(n,B)&&(Dt(V.defaultValue)?M(B,Zt(fe(i,B))):(M(B,V.defaultValue),rt(i,B,Zt(V.defaultValue))),V.keepTouched||Mt(r.touchedFields,B),V.keepDirty||(Mt(r.dirtyFields,B),r.isDirty=V.defaultValue?P(B,Zt(fe(i,B))):P()),V.keepError||(Mt(r.errors,B),d.isValid&&m()),h.state.next({...r}))},xe=(B,V={})=>{const q=B?Zt(B):i,ie=Zt(q),te=Rr(B),Q=te?i:ie;if(V.keepDefaultValues||(i=q),!V.keepValues){if(V.keepDirtyValues){const he=new Set([...o.mount,...Object.keys(ad(i,a))]);for(const De of Array.from(he))fe(r.dirtyFields,De)?rt(Q,De,fe(a,De)):M(De,fe(Q,De))}else{if(Mj&&Dt(B))for(const he of o.mount){const De=fe(n,he);if(De&&De._f){const We=Array.isArray(De._f.refs)?De._f.refs[0]:De._f.ref;if(Wg(We)){const zt=We.closest("form");if(zt){zt.reset();break}}}}if(V.keepFieldsRef)for(const he of o.mount)M(he,fe(Q,he));else n={}}a=t.shouldUnregister?V.keepDefaultValues?Zt(i):{}:Zt(Q),h.array.next({values:{...Q}}),h.state.next({values:{...Q}})}o={mount:V.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!d.isValid||!!V.keepIsValid||!!V.keepDirtyValues,s.watch=!!t.shouldUnregister,h.state.next({submitCount:V.keepSubmitCount?r.submitCount:0,isDirty:te?!1:V.keepDirty?r.isDirty:!!(V.keepDefaultValues&&!qa(B,i)),isSubmitted:V.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:te?{}:V.keepDirtyValues?V.keepDefaultValues&&a?ad(i,a):r.dirtyFields:V.keepDefaultValues&&B?ad(i,B):V.keepDirty?r.dirtyFields:{},touchedFields:V.keepTouched?r.touchedFields:{},errors:V.keepErrors?r.errors:{},isSubmitSuccessful:V.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ae=(B,V)=>xe(ei(B)?B(a):B,V),Be=(B,V={})=>{const q=fe(n,B),ie=q&&q._f;if(ie){const te=ie.refs?ie.refs[0]:ie.ref;te.focus&&(te.focus(),V.shouldSelect&&ei(te.select)&&te.select())}},Oe=B=>{r={...r,...B}},dt={control:{register:Z,unregister:we,getFieldState:W,handleSubmit:Y,setError:G,_subscribe:ne,_runSchema:N,_focusError:ae,_getWatch:T,_getDirty:P,_setValid:m,_setFieldArray:y,_setDisabledField:je,_setErrors:b,_getFieldArray:$,_reset:xe,_resetDefaultValues:()=>ei(t.defaultValues)&&t.defaultValues().then(B=>{Ae(B,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:C,_disableForm:ge,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(B){s=B},get _defaultValues(){return i},get _names(){return o},set _names(B){o=B},get _formState(){return r},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:ue,trigger:I,register:Z,handleSubmit:Y,watch:X,setValue:M,getValues:L,reset:Ae,resetField:$e,clearErrors:U,unregister:we,setError:G,setFocus:Be,getFieldState:W};return{...dt,formControl:dt}}function R2e(e={}){const t=k.useRef(void 0),r=k.useRef(void 0),[n,i]=k.useState({isDirty:!1,isValidating:!1,isLoading:ei(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ei(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ei(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=M2e(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,b2e(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),k.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),k.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),k.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),k.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),k.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),k.useEffect(()=>{e.values&&!qa(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),k.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=x2e(n,a),t.current}const GP=(e,t,r)=>{if(e&&"reportValidity"in e){const n=fe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},HD=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?GP(n.ref,r,e):n.refs&&n.refs.forEach(i=>GP(i,r,e))}},I2e=(e,t)=>{t.shouldUseNativeValidation&&HD(e,t);const r={};for(const n in e){const i=fe(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(D2e(t.names||Object.keys(e),n)){const s=Object.assign({},fe(r,n));rt(s,"root",a),rt(r,n,s)}else rt(r,n,a)}return r},D2e=(e,t)=>e.some(r=>r.startsWith(t+"."));var L2e=function(e,t){for(var r={};e.length;){var n=e[0],i=n.code,a=n.message,s=n.path.join(".");if(!r[s])if("unionErrors"in n){var o=n.unionErrors[0].errors[0];r[s]={message:o.message,type:o.code}}else r[s]={message:a,type:i};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=r[s].types,c=l&&l[n.code];r[s]=LD(s,t,r,i,c?[].concat(c,n.message):n.message)}e.shift()}return r},F2e=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(c){return a.shouldUseNativeValidation&&HD({},a),{errors:{},values:r.raw?n:c}})}catch(c){return o(c)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(s))return{values:{},errors:I2e(L2e(s.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw s}))}catch(s){return Promise.reject(s)}}},qe;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(const s of i)if(a(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(qe||(qe={}));var YP;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(YP||(YP={}));const pe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ba=e=>{switch(typeof e){case"undefined":return pe.undefined;case"string":return pe.string;case"number":return Number.isNaN(e)?pe.nan:pe.number;case"boolean":return pe.boolean;case"function":return pe.function;case"bigint":return pe.bigint;case"symbol":return pe.symbol;case"object":return Array.isArray(e)?pe.array:e===null?pe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?pe.promise:typeof Map<"u"&&e instanceof Map?pe.map:typeof Set<"u"&&e instanceof Set?pe.set:typeof Date<"u"&&e instanceof Date?pe.date:pe.object;default:return pe.unknown}},re=qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ba extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let o=n,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(r(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),n}static assert(t){if(!(t instanceof ba))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];r[a]=r[a]||[],r[a].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}ba.create=e=>new ba(e);const $1=(e,t)=>{let r;switch(e.code){case re.invalid_type:e.received===pe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:r=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case re.invalid_union:r="Invalid input";break;case re.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case re.invalid_enum_value:r=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:r="Invalid function arguments";break;case re.invalid_return_type:r="Invalid function return type";break;case re.invalid_date:r="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:qe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case re.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case re.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case re.custom:r="Invalid input";break;case re.invalid_intersection_types:r="Intersection results could not be merged";break;case re.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:r="Number must be finite";break;default:r=t.defaultError,qe.assertNever(e)}return{message:r}};let B2e=$1;function z2e(){return B2e}const U2e=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function oe(e,t){const r=z2e(),n=U2e({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===$1?void 0:$1].filter(i=>!!i)});e.common.issues.push(n)}class cn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return ke;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const a=await i.key,s=await i.value;n.push({key:a,value:s})}return cn.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return ke;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[a.value]=s.value)}return{status:t.value,value:n}}}const ke=Object.freeze({status:"aborted"}),wd=e=>({status:"dirty",value:e}),In=e=>({status:"valid",value:e}),XP=e=>e.status==="aborted",ZP=e=>e.status==="dirty",ru=e=>e.status==="valid",qg=e=>typeof Promise<"u"&&e instanceof Promise;var me;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(me||(me={}));class As{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const QP=(e,t)=>{if(ru(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new ba(e.common.issues);return this._error=r,this._error}}};function Ie(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,o)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??n??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??r??o.defaultError}},description:i}}class He{get description(){return this._def.description}_getType(t){return Ba(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ba(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cn,ctx:{common:t.parent.common,data:t.data,parsedType:Ba(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(qg(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ba(t)},i=this._parseSync({data:t,path:n.path,parent:n});return QP(n,i)}"~validate"(t){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ba(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return ru(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(i=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>ru(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ba(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(qg(i)?i:Promise.resolve(i));return QP(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const s=t(i),o=()=>a.addIssue({code:re.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new iu({schema:this,typeName:Pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ns.create(this,this._def)}nullable(){return au.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ti.create(this)}promise(){return Xg.create(this,this._def)}or(t){return Gg.create([this,t],this._def)}and(t){return Yg.create(this,t,this._def)}transform(t){return new iu({...Ie(this._def),schema:this,typeName:Pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new D1({...Ie(this._def),innerType:this,defaultValue:r,typeName:Pe.ZodDefault})}brand(){return new dNe({typeName:Pe.ZodBranded,type:this,...Ie(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new L1({...Ie(this._def),innerType:this,catchValue:r,typeName:Pe.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Fj.create(this,t)}readonly(){return F1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const W2e=/^c[^\s-]{8,}$/i,V2e=/^[0-9a-z]+$/,H2e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,q2e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,K2e=/^[a-z0-9_-]{21}$/i,G2e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Y2e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,X2e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Z2e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let fx;const Q2e=/^(?:(?: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])$/,J2e=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,eNe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,tNe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rNe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nNe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qD="((\\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])))",iNe=new RegExp(`^${qD}$`);function KD(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function aNe(e){return new RegExp(`^${KD(e)}$`)}function sNe(e){let t=`${qD}T${KD(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function oNe(e,t){return!!((t==="v4"||!t)&&Q2e.test(e)||(t==="v6"||!t)&&eNe.test(e))}function lNe(e,t){if(!G2e.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function cNe(e,t){return!!((t==="v4"||!t)&&J2e.test(e)||(t==="v6"||!t)&&tNe.test(e))}class us extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==pe.string){const a=this._getOrReturnCtx(t);return oe(a,{code:re.invalid_type,expected:pe.string,received:a.parsedType}),ke}const n=new cn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const s=t.data.length>a.value,o=t.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(t,i),s?oe(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&oe(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")X2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"email",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")fx||(fx=new RegExp(Z2e,"u")),fx.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"emoji",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")q2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"uuid",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")K2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"nanoid",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")W2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")V2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid2",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")H2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ulid",code:re.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),oe(i,{validation:"url",code:re.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"regex",code:re.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),oe(i,{code:re.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:re.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:re.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?sNe(a).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:re.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?iNe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:re.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?aNe(a).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:re.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Y2e.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"duration",code:re.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?oNe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ip",code:re.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?lNe(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"jwt",code:re.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?cNe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cidr",code:re.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?rNe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"base64",code:re.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?nNe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"base64url",code:re.invalid_string,message:a.message}),n.dirty()):qe.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:re.invalid_string,...me.errToObj(n)})}_addCheck(t){return new us({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...me.errToObj(t)})}url(t){return this._addCheck({kind:"url",...me.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...me.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...me.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...me.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...me.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...me.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...me.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...me.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...me.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...me.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...me.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...me.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...me.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...me.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...me.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...me.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...me.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...me.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...me.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...me.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...me.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...me.errToObj(r)})}nonempty(t){return this.min(1,me.errToObj(t))}trim(){return new us({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new us({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new us({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}us.create=e=>new us({checks:[],typeName:Pe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ie(e)});function uNe(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}class Qf extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==pe.number){const a=this._getOrReturnCtx(t);return oe(a,{code:re.invalid_type,expected:pe.number,received:a.parsedType}),ke}let n;const i=new cn;for(const a of this._def.checks)a.kind==="int"?qe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),oe(n,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:re.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?uNe(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),oe(n,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),oe(n,{code:re.not_finite,message:a.message}),i.dirty()):qe.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,me.toString(r))}setLimit(t,r,n,i){return new Qf({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:me.toString(i)}]})}_addCheck(t){return new Qf({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:me.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:me.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:me.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:me.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:me.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&qe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Qf.create=e=>new Qf({checks:[],typeName:Pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class Jf extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==pe.bigint)return this._getInvalidInput(t);let n;const i=new cn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:re.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):qe.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return oe(r,{code:re.invalid_type,expected:pe.bigint,received:r.parsedType}),ke}gte(t,r){return this.setLimit("min",t,!0,me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,me.toString(r))}setLimit(t,r,n,i){return new Jf({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:me.toString(i)}]})}_addCheck(t){return new Jf({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:me.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Jf.create=e=>new Jf({checks:[],typeName:Pe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ie(e)});class M1 extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==pe.boolean){const n=this._getOrReturnCtx(t);return oe(n,{code:re.invalid_type,expected:pe.boolean,received:n.parsedType}),ke}return In(t.data)}}M1.create=e=>new M1({typeName:Pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ie(e)});class Kg extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==pe.date){const a=this._getOrReturnCtx(t);return oe(a,{code:re.invalid_type,expected:pe.date,received:a.parsedType}),ke}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return oe(a,{code:re.invalid_date}),ke}const n=new cn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:re.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):qe.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Kg({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:me.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:me.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Kg.create=e=>new Kg({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Pe.ZodDate,...Ie(e)});class JP extends He{_parse(t){if(this._getType(t)!==pe.symbol){const n=this._getOrReturnCtx(t);return oe(n,{code:re.invalid_type,expected:pe.symbol,received:n.parsedType}),ke}return In(t.data)}}JP.create=e=>new JP({typeName:Pe.ZodSymbol,...Ie(e)});class eT extends He{_parse(t){if(this._getType(t)!==pe.undefined){const n=this._getOrReturnCtx(t);return oe(n,{code:re.invalid_type,expected:pe.undefined,received:n.parsedType}),ke}return In(t.data)}}eT.create=e=>new eT({typeName:Pe.ZodUndefined,...Ie(e)});class tT extends He{_parse(t){if(this._getType(t)!==pe.null){const n=this._getOrReturnCtx(t);return oe(n,{code:re.invalid_type,expected:pe.null,received:n.parsedType}),ke}return In(t.data)}}tT.create=e=>new tT({typeName:Pe.ZodNull,...Ie(e)});class rT extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return In(t.data)}}rT.create=e=>new rT({typeName:Pe.ZodAny,...Ie(e)});class nT extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return In(t.data)}}nT.create=e=>new nT({typeName:Pe.ZodUnknown,...Ie(e)});class ks extends He{_parse(t){const r=this._getOrReturnCtx(t);return oe(r,{code:re.invalid_type,expected:pe.never,received:r.parsedType}),ke}}ks.create=e=>new ks({typeName:Pe.ZodNever,...Ie(e)});class iT extends He{_parse(t){if(this._getType(t)!==pe.undefined){const n=this._getOrReturnCtx(t);return oe(n,{code:re.invalid_type,expected:pe.void,received:n.parsedType}),ke}return In(t.data)}}iT.create=e=>new iT({typeName:Pe.ZodVoid,...Ie(e)});class Ti extends He{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==pe.array)return oe(r,{code:re.invalid_type,expected:pe.array,received:r.parsedType}),ke;if(i.exactLength!==null){const s=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(s||o)&&(oe(r,{code:s?re.too_big:re.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(oe(r,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(oe(r,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,o)=>i.type._parseAsync(new As(r,s,r.path,o)))).then(s=>cn.mergeArray(n,s));const a=[...r.data].map((s,o)=>i.type._parseSync(new As(r,s,r.path,o)));return cn.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Ti({...this._def,minLength:{value:t,message:me.toString(r)}})}max(t,r){return new Ti({...this._def,maxLength:{value:t,message:me.toString(r)}})}length(t,r){return new Ti({...this._def,exactLength:{value:t,message:me.toString(r)}})}nonempty(t){return this.min(1,t)}}Ti.create=(e,t)=>new Ti({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Pe.ZodArray,...Ie(t)});function El(e){if(e instanceof It){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ns.create(El(n))}return new It({...e._def,shape:()=>t})}else return e instanceof Ti?new Ti({...e._def,type:El(e.element)}):e instanceof Ns?Ns.create(El(e.unwrap())):e instanceof au?au.create(El(e.unwrap())):e instanceof il?il.create(e.items.map(t=>El(t))):e}class It extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=qe.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==pe.object){const c=this._getOrReturnCtx(t);return oe(c,{code:re.invalid_type,expected:pe.object,received:c.parsedType}),ke}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof ks&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const d=a[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new As(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof ks){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")o.length>0&&(oe(i,{code:re.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of o){const f=i.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new As(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,h=await d.value;c.push({key:f,value:h,alwaysSet:d.alwaysSet})}return c}).then(c=>cn.mergeObjectSync(n,c)):cn.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return me.errToObj,new It({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,s;const i=((s=(a=this._def).errorMap)==null?void 0:s.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:me.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new It({...this._def,unknownKeys:"strip"})}passthrough(){return new It({...this._def,unknownKeys:"passthrough"})}extend(t){return new It({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new It({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Pe.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new It({...this._def,catchall:t})}pick(t){const r={};for(const n of qe.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new It({...this._def,shape:()=>r})}omit(t){const r={};for(const n of qe.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new It({...this._def,shape:()=>r})}deepPartial(){return El(this)}partial(t){const r={};for(const n of qe.objectKeys(this.shape)){const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new It({...this._def,shape:()=>r})}required(t){const r={};for(const n of qe.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Ns;)a=a._def.innerType;r[n]=a}return new It({...this._def,shape:()=>r})}keyof(){return GD(qe.objectKeys(this.shape))}}It.create=(e,t)=>new It({shape:()=>e,unknownKeys:"strip",catchall:ks.create(),typeName:Pe.ZodObject,...Ie(t)});It.strictCreate=(e,t)=>new It({shape:()=>e,unknownKeys:"strict",catchall:ks.create(),typeName:Pe.ZodObject,...Ie(t)});It.lazycreate=(e,t)=>new It({shape:e,unknownKeys:"strip",catchall:ks.create(),typeName:Pe.ZodObject,...Ie(t)});class Gg extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(o=>new ba(o.ctx.common.issues));return oe(r,{code:re.invalid_union,unionErrors:s}),ke}if(r.common.async)return Promise.all(n.map(async a=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let a;const s=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(l=>new ba(l));return oe(r,{code:re.invalid_union,unionErrors:o}),ke}}get options(){return this._def.options}}Gg.create=(e,t)=>new Gg({options:e,typeName:Pe.ZodUnion,...Ie(t)});function R1(e,t){const r=Ba(e),n=Ba(t);if(e===t)return{valid:!0,data:e};if(r===pe.object&&n===pe.object){const i=qe.objectKeys(t),a=qe.objectKeys(e).filter(o=>i.indexOf(o)!==-1),s={...e,...t};for(const o of a){const l=R1(e[o],t[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(r===pe.array&&n===pe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const s=e[a],o=t[a],l=R1(s,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===pe.date&&n===pe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Yg extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,s)=>{if(XP(a)||XP(s))return ke;const o=R1(a.value,s.value);return o.valid?((ZP(a)||ZP(s))&&r.dirty(),{status:r.value,value:o.data}):(oe(n,{code:re.invalid_intersection_types}),ke)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,s])=>i(a,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Yg.create=(e,t,r)=>new Yg({left:e,right:t,typeName:Pe.ZodIntersection,...Ie(r)});class il extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.array)return oe(n,{code:re.invalid_type,expected:pe.array,received:n.parsedType}),ke;if(n.data.length<this._def.items.length)return oe(n,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&n.data.length>this._def.items.length&&(oe(n,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new As(n,s,n.path,o)):null}).filter(s=>!!s);return n.common.async?Promise.all(a).then(s=>cn.mergeArray(r,s)):cn.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new il({...this._def,rest:t})}}il.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new il({items:e,typeName:Pe.ZodTuple,rest:null,...Ie(t)})};class aT extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.map)return oe(n,{code:re.invalid_type,expected:pe.map,received:n.parsedType}),ke;const i=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map(([o,l],c)=>({key:i._parse(new As(n,o,n.path,[c,"key"])),value:a._parse(new As(n,l,n.path,[c,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return ke;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(c.value,d.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return ke;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(c.value,d.value)}return{status:r.value,value:o}}}}aT.create=(e,t,r)=>new aT({valueType:t,keyType:e,typeName:Pe.ZodMap,...Ie(r)});class eh extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.set)return oe(n,{code:re.invalid_type,expected:pe.set,received:n.parsedType}),ke;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(oe(n,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(oe(n,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function s(l){const c=new Set;for(const d of l){if(d.status==="aborted")return ke;d.status==="dirty"&&r.dirty(),c.add(d.value)}return{status:r.value,value:c}}const o=[...n.data.values()].map((l,c)=>a._parse(new As(n,l,n.path,c)));return n.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(t,r){return new eh({...this._def,minSize:{value:t,message:me.toString(r)}})}max(t,r){return new eh({...this._def,maxSize:{value:t,message:me.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}eh.create=(e,t)=>new eh({valueType:e,minSize:null,maxSize:null,typeName:Pe.ZodSet,...Ie(t)});class sT extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}sT.create=(e,t)=>new sT({getter:e,typeName:Pe.ZodLazy,...Ie(t)});class I1 extends He{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return oe(r,{received:r.data,code:re.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}I1.create=(e,t)=>new I1({value:e,typeName:Pe.ZodLiteral,...Ie(t)});function GD(e,t){return new nu({values:e,typeName:Pe.ZodEnum,...Ie(t)})}class nu extends He{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return oe(r,{expected:qe.joinValues(n),received:r.parsedType,code:re.invalid_type}),ke}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return oe(r,{received:r.data,code:re.invalid_enum_value,options:n}),ke}return In(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return nu.create(t,{...this._def,...r})}exclude(t,r=this._def){return nu.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}nu.create=GD;class oT extends He{_parse(t){const r=qe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==pe.string&&n.parsedType!==pe.number){const i=qe.objectValues(r);return oe(n,{expected:qe.joinValues(i),received:n.parsedType,code:re.invalid_type}),ke}if(this._cache||(this._cache=new Set(qe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=qe.objectValues(r);return oe(n,{received:n.data,code:re.invalid_enum_value,options:i}),ke}return In(t.data)}get enum(){return this._def.values}}oT.create=(e,t)=>new oT({values:e,typeName:Pe.ZodNativeEnum,...Ie(t)});class Xg extends He{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.promise&&r.common.async===!1)return oe(r,{code:re.invalid_type,expected:pe.promise,received:r.parsedType}),ke;const n=r.parsedType===pe.promise?r.data:Promise.resolve(r.data);return In(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Xg.create=(e,t)=>new Xg({type:e,typeName:Pe.ZodPromise,...Ie(t)});class iu extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:s=>{oe(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const s=i.transform(n.data,a);if(n.common.async)return Promise.resolve(s).then(async o=>{if(r.value==="aborted")return ke;const l=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return l.status==="aborted"?ke:l.status==="dirty"||r.value==="dirty"?wd(l.value):l});{if(r.value==="aborted")return ke;const o=this._def.schema._parseSync({data:s,path:n.path,parent:n});return o.status==="aborted"?ke:o.status==="dirty"||r.value==="dirty"?wd(o.value):o}}if(i.type==="refinement"){const s=o=>{const l=i.refinement(o,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ke:(o.status==="dirty"&&r.dirty(),s(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?ke:(o.status==="dirty"&&r.dirty(),s(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ru(s))return ke;const o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>ru(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:r.value,value:o})):ke);qe.assertNever(i)}}iu.create=(e,t,r)=>new iu({schema:e,typeName:Pe.ZodEffects,effect:t,...Ie(r)});iu.createWithPreprocess=(e,t,r)=>new iu({schema:t,effect:{type:"preprocess",transform:e},typeName:Pe.ZodEffects,...Ie(r)});class Ns extends He{_parse(t){return this._getType(t)===pe.undefined?In(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ns.create=(e,t)=>new Ns({innerType:e,typeName:Pe.ZodOptional,...Ie(t)});class au extends He{_parse(t){return this._getType(t)===pe.null?In(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}au.create=(e,t)=>new au({innerType:e,typeName:Pe.ZodNullable,...Ie(t)});class D1 extends He{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===pe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}D1.create=(e,t)=>new D1({innerType:e,typeName:Pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ie(t)});class L1 extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return qg(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ba(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ba(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}L1.create=(e,t)=>new L1({innerType:e,typeName:Pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ie(t)});class lT extends He{_parse(t){if(this._getType(t)!==pe.nan){const n=this._getOrReturnCtx(t);return oe(n,{code:re.invalid_type,expected:pe.nan,received:n.parsedType}),ke}return{status:"valid",value:t.data}}}lT.create=e=>new lT({typeName:Pe.ZodNaN,...Ie(e)});class dNe extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Fj extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ke:a.status==="dirty"?(r.dirty(),wd(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ke:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new Fj({in:t,out:r,typeName:Pe.ZodPipeline})}}class F1 extends He{_parse(t){const r=this._def.innerType._parse(t),n=i=>(ru(i)&&(i.value=Object.freeze(i.value)),i);return qg(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}F1.create=(e,t)=>new F1({innerType:e,typeName:Pe.ZodReadonly,...Ie(t)});var Pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Pe||(Pe={}));const Ui=us.create,bp=M1.create;ks.create;const fNe=Ti.create,hx=It.create;Gg.create;Yg.create;il.create;const hNe=I1.create,pNe=nu.create;Xg.create;Ns.create;au.create;const mNe=hx({name:Ui().min(1,"Project name is required").max(100,"Name must be less than 100 characters"),description:Ui().max(500,"Description must be less than 500 characters").optional(),tags:fNe(Ui()).optional(),metadata:hx({owner:Ui().optional(),department:Ui().optional(),priority:pNe(["low","medium","high"]).optional()}).optional(),bzzz_config:hx({git_url:Ui().url("Must be a valid Git URL").optional().or(hNe("")),git_owner:Ui().optional(),git_repository:Ui().optional(),git_branch:Ui().optional(),bzzz_enabled:bp().optional(),ready_to_claim:bp().optional(),private_repo:bp().optional(),github_token_required:bp().optional()}).optional()});function cT({mode:e,initialData:t,projectId:r}){var N,A,E,C,P,T,$,O,R,M,F,D,I;const n=Is(),i=L_(),[a,s]=w.useState(""),{register:o,handleSubmit:l,formState:{errors:c,isSubmitting:d},watch:f,setValue:h}=R2e({resolver:F2e(mNe),defaultValues:{name:(t==null?void 0:t.name)||"",description:(t==null?void 0:t.description)||"",tags:(t==null?void 0:t.tags)||[],metadata:{owner:((N=t==null?void 0:t.metadata)==null?void 0:N.owner)||"",department:((A=t==null?void 0:t.metadata)==null?void 0:A.department)||"",priority:((E=t==null?void 0:t.metadata)==null?void 0:E.priority)||"medium"},bzzz_config:{git_url:((C=t==null?void 0:t.bzzz_config)==null?void 0:C.git_url)||"",git_owner:((P=t==null?void 0:t.bzzz_config)==null?void 0:P.git_owner)||"",git_repository:((T=t==null?void 0:t.bzzz_config)==null?void 0:T.git_repository)||"",git_branch:(($=t==null?void 0:t.bzzz_config)==null?void 0:$.git_branch)||"main",bzzz_enabled:((O=t==null?void 0:t.bzzz_config)==null?void 0:O.bzzz_enabled)||!1,ready_to_claim:((R=t==null?void 0:t.bzzz_config)==null?void 0:R.ready_to_claim)||!1,private_repo:((M=t==null?void 0:t.bzzz_config)==null?void 0:M.private_repo)||!1,github_token_required:((F=t==null?void 0:t.bzzz_config)==null?void 0:F.github_token_required)||!1}}}),p=f("tags")||[];f("bzzz_config.git_url");const g=f("bzzz_config.bzzz_enabled")||!1,m=L=>{if(L)try{const W=L.match(/github\.com[/:]([\w-]+)\/([\w-]+)(?:\.git)?$/);if(W){const[,U,G]=W;h("bzzz_config.git_owner",U),h("bzzz_config.git_repository",G)}}catch(W){console.log("Could not parse Git URL:",W)}},v=L=>{const W=L.target.value;m(W)},y=wm({mutationFn:async L=>{const W=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(!W.ok)throw new Error("Failed to create project");return W.json()},onSuccess:L=>{i.invalidateQueries({queryKey:["projects"]}),as.success("Project created successfully!"),n(`/projects/${L.id}`)},onError:L=>{as.error("Failed to create project"),console.error("Create project error:",L)}}),x=wm({mutationFn:async L=>{const W=await fetch(`/api/projects/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(!W.ok)throw new Error("Failed to update project");return W.json()},onSuccess:()=>{i.invalidateQueries({queryKey:["project",r]}),i.invalidateQueries({queryKey:["projects"]}),as.success("Project updated successfully!"),n(`/projects/${r}`)},onError:L=>{as.error("Failed to update project"),console.error("Update project error:",L)}}),b=L=>{e==="create"?y.mutate(L):x.mutate(L)},S=()=>{if(a.trim()&&!p.includes(a.trim())){const L=[...p,a.trim()];h("tags",L),s("")}},_=L=>{const W=p.filter(U=>U!==L);h("tags",W)},j=L=>{L.key==="Enter"&&(L.preventDefault(),S())};return u.jsx("div",{className:"min-h-screen bg-gray-50",children:u.jsxs("div",{className:"max-w-3xl mx-auto py-6 px-4 sm:px-6 lg:px-8",children:[u.jsxs("div",{className:"mb-8",children:[u.jsx("div",{className:"flex items-center space-x-4 mb-4",children:u.jsxs("button",{onClick:()=>n("/projects"),className:"flex items-center text-gray-500 hover:text-gray-700",children:[u.jsx(Rm,{className:"h-5 w-5 mr-1"}),"Back to Projects"]})}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:e==="create"?"Create New Project":"Edit Project"}),u.jsx("p",{className:"text-gray-600 mt-2",children:e==="create"?"Set up a new project to organize your workflows and track their progress.":"Update your project details and configuration."})]})]}),u.jsxs("form",{onSubmit:l(b),className:"space-y-8",children:[u.jsxs("div",{className:"bg-white shadow-sm rounded-lg",children:[u.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[u.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Basic Information"}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Provide the essential details for your project."})]}),u.jsxs("div",{className:"px-6 py-4 space-y-6",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Project Name *"}),u.jsx("input",{type:"text",id:"name",...o("name"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter project name"}),c.name&&u.jsx("p",{className:"mt-1 text-sm text-red-600",children:c.name.message})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),u.jsx("textarea",{id:"description",rows:4,...o("description"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Describe the purpose and goals of this project"}),u.jsxs("p",{className:"mt-1 text-sm text-gray-500",children:[((D=f("description"))==null?void 0:D.length)||0,"/500 characters"]}),c.description&&u.jsx("p",{className:"mt-1 text-sm text-red-600",children:c.description.message})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Tags"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("input",{type:"text",value:a,onChange:L=>s(L.target.value),onKeyPress:j,className:"flex-1 border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Add a tag"}),u.jsx("button",{type:"button",onClick:S,className:"inline-flex items-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50",children:u.jsx(Go,{className:"h-4 w-4"})})]}),p.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(L=>u.jsxs("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-blue-100 text-blue-800",children:[L,u.jsx("button",{type:"button",onClick:()=>_(L),className:"ml-2 text-blue-600 hover:text-blue-800",children:u.jsx(Ny,{className:"h-4 w-4"})})]},L))})]}),u.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Tags help categorize and filter your projects."})]})]})]}),u.jsxs("div",{className:"bg-white shadow-sm rounded-lg",children:[u.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[u.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Project Metadata"}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Additional information to help organize and manage your project."})]}),u.jsxs("div",{className:"px-6 py-4 space-y-6",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"owner",className:"block text-sm font-medium text-gray-700 mb-2",children:"Project Owner"}),u.jsx("input",{type:"text",id:"owner",...o("metadata.owner"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter owner name"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"department",className:"block text-sm font-medium text-gray-700 mb-2",children:"Department"}),u.jsx("input",{type:"text",id:"department",...o("metadata.department"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter department name"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"priority",className:"block text-sm font-medium text-gray-700 mb-2",children:"Priority"}),u.jsxs("select",{id:"priority",...o("metadata.priority"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[u.jsx("option",{value:"low",children:"Low"}),u.jsx("option",{value:"medium",children:"Medium"}),u.jsx("option",{value:"high",children:"High"})]})]})]})]}),u.jsxs("div",{className:"bg-white shadow-sm rounded-lg",children:[u.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"🐝 Bzzz P2P Integration"}),u.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"Beta"})]}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Configure this project for distributed AI task coordination via the Bzzz P2P network."})]}),u.jsxs("div",{className:"px-6 py-4 space-y-6",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("input",{type:"checkbox",id:"bzzz_enabled",...o("bzzz_config.bzzz_enabled"),className:"h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),u.jsx("label",{htmlFor:"bzzz_enabled",className:"text-sm font-medium text-gray-700",children:"Enable Bzzz P2P coordination for this project"})]}),u.jsx("p",{className:"text-sm text-gray-500 mt-1 ml-7",children:"Allow Bzzz agents to discover and work on tasks from this project's GitHub repository."})]}),g&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"git_url",className:"block text-sm font-medium text-gray-700 mb-2",children:"Git Repository URL *"}),u.jsx("input",{type:"url",id:"git_url",...o("bzzz_config.git_url"),onChange:v,className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"https://github.com/owner/repository"}),u.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"GitHub repository URL where Bzzz will look for issues labeled with 'bzzz-task'."}),((I=c.bzzz_config)==null?void 0:I.git_url)&&u.jsx("p",{className:"mt-1 text-sm text-red-600",children:c.bzzz_config.git_url.message})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"git_owner",className:"block text-sm font-medium text-gray-700 mb-2",children:"Repository Owner"}),u.jsx("input",{type:"text",id:"git_owner",...o("bzzz_config.git_owner"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Auto-detected from URL",readOnly:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"git_repository",className:"block text-sm font-medium text-gray-700 mb-2",children:"Repository Name"}),u.jsx("input",{type:"text",id:"git_repository",...o("bzzz_config.git_repository"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Auto-detected from URL",readOnly:!0})]})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"git_branch",className:"block text-sm font-medium text-gray-700 mb-2",children:"Default Branch"}),u.jsx("input",{type:"text",id:"git_branch",...o("bzzz_config.git_branch"),className:"block w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"main"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-700",children:"Repository Configuration"}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("input",{type:"checkbox",id:"ready_to_claim",...o("bzzz_config.ready_to_claim"),className:"h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),u.jsx("label",{htmlFor:"ready_to_claim",className:"text-sm text-gray-700",children:"Ready for task claims (agents can start working immediately)"})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("input",{type:"checkbox",id:"private_repo",...o("bzzz_config.private_repo"),className:"h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),u.jsx("label",{htmlFor:"private_repo",className:"text-sm text-gray-700",children:"Private repository (requires authentication)"})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("input",{type:"checkbox",id:"github_token_required",...o("bzzz_config.github_token_required"),className:"h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),u.jsx("label",{htmlFor:"github_token_required",className:"text-sm text-gray-700",children:"Requires GitHub token for API access"})]})]})]}),u.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:u.jsxs("div",{className:"flex",children:[u.jsx(lE,{className:"h-5 w-5 text-yellow-400"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("h3",{className:"text-sm font-medium text-yellow-800",children:"How Bzzz Integration Works"}),u.jsxs("div",{className:"mt-2 text-sm text-yellow-700",children:[u.jsx("p",{children:"When enabled, Bzzz agents will:"}),u.jsxs("ul",{className:"list-disc list-inside mt-1 space-y-1",children:[u.jsx("li",{children:"Monitor GitHub issues labeled with 'bzzz-task'"}),u.jsx("li",{children:"Coordinate P2P to assign tasks based on agent capabilities"}),u.jsx("li",{children:"Execute tasks using distributed AI reasoning"}),u.jsx("li",{children:"Report progress and escalate when needed"})]}),u.jsx("p",{className:"mt-2 font-medium",children:"Make sure your repository has issues labeled with 'bzzz-task' for agents to discover."})]})]})]})})]})]})]}),u.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:u.jsxs("div",{className:"flex",children:[u.jsx(lE,{className:"h-5 w-5 text-blue-400"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("h3",{className:"text-sm font-medium text-blue-800",children:"What happens next?"}),u.jsxs("div",{className:"mt-2 text-sm text-blue-700",children:[u.jsx("p",{children:"After creating your project, you can:"}),u.jsxs("ul",{className:"list-disc list-inside mt-1 space-y-1",children:[u.jsx("li",{children:"Add workflows to automate your processes"}),u.jsx("li",{children:"Configure project settings and permissions"}),u.jsx("li",{children:"Monitor execution history and performance"}),u.jsx("li",{children:"Collaborate with team members"})]})]})]})]})}),u.jsxs("div",{className:"flex justify-end space-x-4 pt-6",children:[u.jsx("button",{type:"button",onClick:()=>n("/projects"),className:"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:d,className:"px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:d?e==="create"?"Creating...":"Updating...":e==="create"?"Create Project":"Update Project"})]})]})]})})}const gNe=({data:e,selected:t})=>u.jsx("div",{className:`px-4 py-2 shadow-md rounded-md bg-white border-2 min-w-[150px] ${t?"border-blue-500":"border-gray-200"}`,children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"rounded-full w-3 h-3 mr-2 bg-blue-500"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-bold",children:e.label}),u.jsx("div",{className:"text-xs text-gray-500",children:e.nodeType})]})]})}),yNe=({selected:e})=>u.jsx("div",{className:`px-4 py-2 shadow-md rounded-md bg-green-100 border-2 min-w-[120px] ${e?"border-green-500":"border-green-300"}`,children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"rounded-full w-3 h-3 mr-2 bg-green-500"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-bold text-green-800",children:"Start"}),u.jsx("div",{className:"text-xs text-green-600",children:"Trigger"})]})]})}),vNe=({selected:e})=>u.jsx("div",{className:`px-4 py-2 shadow-md rounded-md bg-red-100 border-2 min-w-[120px] ${e?"border-red-500":"border-red-300"}`,children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"rounded-full w-3 h-3 mr-2 bg-red-500"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-bold text-red-800",children:"End"}),u.jsx("div",{className:"text-xs text-red-600",children:"Output"})]})]})}),xNe={custom:gNe,start:yNe,end:vNe},uT=[{id:"1",type:"start",position:{x:250,y:25},data:{label:"Start",nodeType:"trigger"}},{id:"2",type:"custom",position:{x:250,y:125},data:{label:"Process Data",nodeType:"function"}},{id:"3",type:"custom",position:{x:100,y:225},data:{label:"Send Email",nodeType:"notification"}},{id:"4",type:"custom",position:{x:400,y:225},data:{label:"Save to DB",nodeType:"database"}},{id:"5",type:"end",position:{x:250,y:325},data:{label:"End",nodeType:"output"}}],dT=[{id:"e1-2",source:"1",target:"2",animated:!0},{id:"e2-3",source:"2",target:"3",animated:!0},{id:"e2-4",source:"2",target:"4",animated:!0},{id:"e3-5",source:"3",target:"5",animated:!0},{id:"e4-5",source:"4",target:"5",animated:!0}],fT=[{type:"trigger",label:"HTTP Trigger",icon:"🌐"},{type:"function",label:"Function",icon:"⚙️"},{type:"database",label:"Database",icon:"🗄️"},{type:"notification",label:"Email",icon:"📧"},{type:"webhook",label:"Webhook",icon:"🔗"},{type:"condition",label:"Condition",icon:"🔀"},{type:"delay",label:"Delay",icon:"⏱️"},{type:"transform",label:"Transform",icon:"🔄"}];function px(){const{id:e}=a5(),t=Is(),r=w.useRef(null),[n,i]=w.useState(null),[a,s,o]=xH(uT),[l,c,d]=bH(dT),[f,h]=w.useState(null),[p,g]=w.useState(!1),{data:m,isLoading:v}=rn({queryKey:["workflow",e],queryFn:async()=>({id:e||"new",name:e?"Sample Workflow":"New Workflow",description:"A sample workflow for demonstration",status:"draft",nodes:uT,edges:dT,created_at:new Date().toISOString(),updated_at:new Date().toISOString()})}),y=wm({mutationFn:async P=>(await new Promise(T=>setTimeout(T,1e3)),P),onSuccess:()=>{as.success("Workflow saved successfully!")},onError:()=>{as.error("Failed to save workflow")}}),x=wm({mutationFn:async()=>(g(!0),await new Promise(P=>setTimeout(P,3e3)),{status:"completed",executionId:"exec-123"}),onSuccess:P=>{g(!1),as.success(`Workflow executed successfully! (${P.executionId})`)},onError:()=>{g(!1),as.error("Workflow execution failed")}}),b=w.useCallback(P=>c(T=>e3(P,T)),[c]),S=w.useCallback((P,T)=>{h(T)},[]),_=w.useCallback(P=>{P.preventDefault(),P.dataTransfer.dropEffect="move"},[]),j=w.useCallback(P=>{var M;P.preventDefault();const T=(M=r.current)==null?void 0:M.getBoundingClientRect(),$=P.dataTransfer.getData("application/reactflow");if(typeof $>"u"||!$||!T)return;const O=n.project({x:P.clientX-T.left,y:P.clientY-T.top}),R={id:`${a.length+1}`,type:"custom",position:O,data:{label:`New ${$}`,nodeType:$}};s(F=>F.concat(R))},[n,a,s]),N=(P,T)=>{P.dataTransfer.setData("application/reactflow",T),P.dataTransfer.effectAllowed="move"},A=()=>{const P={id:m==null?void 0:m.id,name:m==null?void 0:m.name,nodes:a,edges:l};y.mutate(P)},E=()=>{x.mutate()},C=()=>{f&&(s(P=>P.filter(T=>T.id!==f.id)),c(P=>P.filter(T=>T.source!==f.id&&T.target!==f.id)),h(null))};return v?u.jsx("div",{className:"h-screen flex items-center justify-center",children:u.jsx("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-blue-500"})}):u.jsxs("div",{className:"h-screen flex flex-col",children:[u.jsx("div",{className:"bg-white border-b border-gray-200 px-6 py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsxs("button",{onClick:()=>t("/workflows"),className:"flex items-center text-gray-500 hover:text-gray-700",children:[u.jsx(Rm,{className:"h-5 w-5 mr-1"}),"Back"]}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-semibold text-gray-900",children:m==null?void 0:m.name}),u.jsx("p",{className:"text-sm text-gray-500",children:"Workflow Editor"})]})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("button",{onClick:A,disabled:y.isPending,className:"inline-flex items-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50",children:[u.jsx(aq,{className:"h-4 w-4 mr-2"}),y.isPending?"Saving...":"Save"]}),u.jsx("button",{onClick:E,disabled:p,className:"inline-flex items-center px-3 py-2 border border-transparent rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50",children:p?u.jsxs(u.Fragment,{children:[u.jsx(Dm,{className:"h-4 w-4 mr-2 animate-spin"}),"Running..."]}):u.jsxs(u.Fragment,{children:[u.jsx(ai,{className:"h-4 w-4 mr-2"}),"Execute"]})})]})]})}),u.jsxs("div",{className:"flex flex-1",children:[u.jsxs("div",{className:"w-64 bg-white border-r border-gray-200 p-4",children:[u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Add Nodes"}),u.jsx("div",{className:"space-y-2",children:fT.map(P=>u.jsxs("div",{className:"flex items-center p-2 border border-gray-200 rounded-md cursor-move hover:bg-gray-50",onDragStart:T=>N(T,P.type),draggable:!0,children:[u.jsx("span",{className:"text-lg mr-3",children:P.icon}),u.jsx("span",{className:"text-sm text-gray-700",children:P.label})]},P.type))})]}),f&&u.jsxs("div",{className:"border-t pt-4",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Node Properties"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Label"}),u.jsx("input",{type:"text",value:f.data.label,onChange:P=>{s(T=>T.map($=>$.id===f.id?{...$,data:{...$.data,label:P.target.value}}:$)),h({...f,data:{...f.data,label:P.target.value}})},className:"block w-full text-xs border border-gray-300 rounded px-2 py-1"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),u.jsx("select",{value:f.data.nodeType,onChange:P=>{s(T=>T.map($=>$.id===f.id?{...$,data:{...$.data,nodeType:P.target.value}}:$)),h({...f,data:{...f.data,nodeType:P.target.value}})},className:"block w-full text-xs border border-gray-300 rounded px-2 py-1",children:fT.map(P=>u.jsx("option",{value:P.type,children:P.label},P.type))})]}),u.jsxs("button",{onClick:C,className:"w-full flex items-center justify-center px-3 py-2 border border-red-300 rounded-md text-xs font-medium text-red-700 bg-white hover:bg-red-50",children:[u.jsx(U3,{className:"h-3 w-3 mr-1"}),"Delete Node"]})]})]})]}),u.jsx("div",{className:"flex-1",ref:r,children:u.jsxs(M3,{nodes:a,edges:l,onNodesChange:o,onEdgesChange:d,onConnect:b,onNodeClick:S,onInit:i,onDrop:j,onDragOver:_,nodeTypes:xNe,fitView:!0,attributionPosition:"top-right",children:[u.jsx(DH,{}),u.jsx(PH,{}),u.jsx(WH,{variant:kn.Dots,gap:12,size:1}),u.jsx(wy,{position:"top-left",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg border p-3",children:u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:`w-3 h-3 rounded-full ${p?"bg-blue-500 animate-pulse":"bg-green-500"}`}),u.jsx("span",{className:"text-sm font-medium",children:p?"Executing...":"Ready"}),u.jsxs("span",{className:"text-xs text-gray-500",children:[a.length," nodes, ",l.length," connections"]})]})})})]})})]})]})}const bNe=()=>{const[e,t]=w.useState([]),[r,n]=w.useState([]),[i,a]=w.useState(!0),[s,o]=w.useState(null);w.useEffect(()=>{l();const g=setInterval(l,3e4);return()=>clearInterval(g)},[]);const l=async()=>{try{const[g,m]=await Promise.all([xf.getWorkflows(),xf.getExecutions()]);t(g),n(m),o(null)}catch(g){o("Failed to fetch workflow data"),console.error("Error fetching workflow data:",g)}finally{a(!1)}},c=g=>{switch(g){case"success":return u.jsx(ii,{className:"h-5 w-5 text-green-500"});case"running":return u.jsx(B3,{className:"h-5 w-5 text-blue-500 animate-spin"});case"error":return u.jsx(si,{className:"h-5 w-5 text-red-500"});default:return u.jsx(Wr,{className:"h-5 w-5 text-gray-500"})}},d=g=>{if(!g)return"N/A";if(g<60)return`${g}s`;const m=Math.floor(g/60),v=g%60;return`${m}m ${v}s`},f=g=>new Date(g).toLocaleString();if(i)return u.jsx("div",{className:"flex items-center justify-center h-64",children:u.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})});if(s)return u.jsx("div",{className:"bg-red-50 border border-red-200 rounded-md p-4",children:u.jsxs("div",{className:"flex",children:[u.jsx(si,{className:"h-5 w-5 text-red-400"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Error"}),u.jsx("p",{className:"mt-1 text-sm text-red-700",children:s})]})]})});const h=e.filter(g=>g.active),p=e.filter(g=>!g.active);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"n8n Workflow Overview"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[u.jsx("div",{className:"bg-blue-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(jy,{className:"h-8 w-8 text-blue-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-blue-600",children:"Total Workflows"}),u.jsx("p",{className:"text-2xl font-bold text-blue-900",children:e.length})]})]})}),u.jsx("div",{className:"bg-green-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ai,{className:"h-8 w-8 text-green-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-green-600",children:"Active"}),u.jsx("p",{className:"text-2xl font-bold text-green-900",children:h.length})]})]})}),u.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(Dm,{className:"h-8 w-8 text-gray-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Inactive"}),u.jsx("p",{className:"text-2xl font-bold text-gray-900",children:p.length})]})]})}),u.jsx("div",{className:"bg-purple-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(Wr,{className:"h-8 w-8 text-purple-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-purple-600",children:"Recent Executions"}),u.jsx("p",{className:"text-2xl font-bold text-purple-900",children:r.length})]})]})})]})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow",children:[u.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Active Workflows"})}),u.jsx("div",{className:"p-6",children:h.length===0?u.jsx("p",{className:"text-gray-500 text-center py-8",children:"No active workflows"}):u.jsx("div",{className:"space-y-4",children:h.map(g=>u.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(ai,{className:"h-5 w-5 text-green-500 mr-2"}),u.jsx("h4",{className:"text-lg font-medium text-gray-900",children:g.name})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("span",{className:"px-2 py-1 text-xs font-medium bg-green-100 text-green-800 rounded-full",children:"Active"}),u.jsxs("span",{className:"px-2 py-1 text-xs font-medium bg-gray-100 text-gray-800 rounded-full",children:[g.node_count," nodes"]})]})]}),u.jsx("p",{className:"text-sm text-gray-600 mb-3",children:g.description}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsxs("span",{className:"text-sm text-gray-500",children:["Updated: ",f(g.updated_at)]}),g.tags.length>0&&u.jsx("div",{className:"flex space-x-1",children:g.tags.map((m,v)=>u.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded",children:m},v))})]}),g.webhook_url&&u.jsxs("a",{href:g.webhook_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-3 py-1 border border-gray-300 rounded-md text-xs font-medium text-gray-700 hover:bg-gray-50",children:[u.jsx(cE,{className:"h-4 w-4 mr-1"}),"Webhook"]})]})]},g.id))})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow",children:[u.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Recent Executions"})}),u.jsx("div",{className:"p-6",children:r.length===0?u.jsx("p",{className:"text-gray-500 text-center py-8",children:"No recent executions"}):u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Mode"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Started"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Duration"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Workflow ID"})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(g=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:u.jsxs("div",{className:"flex items-center",children:[c(g.status),u.jsx("span",{className:"ml-2 text-sm font-medium text-gray-900",children:g.status})]})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:g.mode}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:f(g.started_at)}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:d(g.duration)}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:g.workflow_id})]},g.id))})]})})})]}),p.length>0&&u.jsxs("div",{className:"bg-white rounded-lg shadow",children:[u.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Inactive Workflows"})}),u.jsx("div",{className:"p-6",children:u.jsx("div",{className:"space-y-4",children:p.map(g=>u.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 bg-gray-50",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(Dm,{className:"h-5 w-5 text-gray-500 mr-2"}),u.jsx("h4",{className:"text-lg font-medium text-gray-700",children:g.name})]}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("span",{className:"px-2 py-1 text-xs font-medium bg-gray-100 text-gray-600 rounded-full",children:"Inactive"}),u.jsxs("span",{className:"px-2 py-1 text-xs font-medium bg-gray-100 text-gray-600 rounded-full",children:[g.node_count," nodes"]})]})]}),u.jsx("p",{className:"text-sm text-gray-600 mb-3",children:g.description}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-sm text-gray-500",children:["Updated: ",f(g.updated_at)]}),g.webhook_url&&u.jsxs("a",{href:g.webhook_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-3 py-1 border border-gray-300 rounded-md text-xs font-medium text-gray-700 hover:bg-gray-50",children:[u.jsx(cE,{className:"h-4 w-4 mr-1"}),"Webhook"]})]})]},g.id))})})]})]})},hT=()=>{const[e,t]=w.useState(null),[r,n]=w.useState(!0),[i,a]=w.useState(null);w.useEffect(()=>{s();const d=setInterval(s,3e4);return()=>clearInterval(d)},[]);const s=async()=>{try{const d=await xf.getOverview();t(d),a(null)}catch(d){a("Failed to fetch cluster overview"),console.error("Error fetching cluster overview:",d)}finally{n(!1)}},o=d=>{switch(d){case"online":return u.jsx(ii,{className:"h-5 w-5 text-green-500"});case"offline":return u.jsx(si,{className:"h-5 w-5 text-red-500"});default:return u.jsx(z3,{className:"h-5 w-5 text-yellow-500"})}},l=d=>{if(d===0)return"0 Bytes";const f=1024,h=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(d)/Math.log(f));return parseFloat((d/Math.pow(f,p)).toFixed(2))+" "+h[p]},c=d=>d?d<70?"bg-green-500":d<90?"bg-yellow-500":"bg-red-500":"bg-gray-200";return r?u.jsx("div",{className:"flex items-center justify-center h-64",children:u.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):i?u.jsx("div",{className:"bg-red-50 border border-red-200 rounded-md p-4",children:u.jsxs("div",{className:"flex",children:[u.jsx(si,{className:"h-5 w-5 text-red-400"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Error"}),u.jsx("p",{className:"mt-1 text-sm text-red-700",children:i})]})]})}):e?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Cluster Overview"}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[u.jsx("div",{className:"bg-blue-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(To,{className:"h-8 w-8 text-blue-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-blue-600",children:"Total Nodes"}),u.jsx("p",{className:"text-2xl font-bold text-blue-900",children:e.total_nodes})]})]})}),u.jsx("div",{className:"bg-green-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(ii,{className:"h-8 w-8 text-green-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-green-600",children:"Active Nodes"}),u.jsx("p",{className:"text-2xl font-bold text-green-900",children:e.active_nodes})]})]})}),u.jsx("div",{className:"bg-purple-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(jy,{className:"h-8 w-8 text-purple-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-purple-600",children:"Total Models"}),u.jsx("p",{className:"text-2xl font-bold text-purple-900",children:e.total_models})]})]})}),u.jsx("div",{className:"bg-orange-50 rounded-lg p-4",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx(yq,{className:"h-8 w-8 text-orange-600"}),u.jsxs("div",{className:"ml-3",children:[u.jsx("p",{className:"text-sm font-medium text-orange-600",children:"Cluster Health"}),u.jsxs("p",{className:"text-2xl font-bold text-orange-900",children:[Math.round(e.active_nodes/e.total_nodes*100),"%"]})]})]})})]})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow",children:[u.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:u.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Cluster Nodes"})}),u.jsx("div",{className:"p-6",children:u.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:e.nodes.map(d=>u.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx(To,{className:"h-6 w-6 text-gray-500 mr-2"}),u.jsx("h4",{className:"text-lg font-medium text-gray-900",children:d.hostname}),u.jsx("span",{className:`ml-2 px-2 py-1 text-xs font-medium rounded-full ${d.role==="manager"?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:d.role})]}),u.jsxs("div",{className:"flex items-center",children:[o(d.status),u.jsx("span",{className:"ml-1 text-sm font-medium text-gray-700",children:d.status})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-gray-600",children:"IP Address"}),u.jsx("p",{className:"text-sm font-medium text-gray-900",children:d.ip})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-gray-600",children:"Models"}),u.jsx("p",{className:"text-sm font-medium text-gray-900",children:d.model_count})]})]}),u.jsxs("div",{className:"space-y-2 mb-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-gray-600",children:"CPU"}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:d.hardware.cpu}),d.metrics.cpu_percent&&u.jsxs("span",{className:"text-xs text-gray-500",children:[d.metrics.cpu_percent.toFixed(1),"%"]})]}),d.metrics.cpu_percent&&u.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 mt-1",children:u.jsx("div",{className:`h-2 rounded-full ${c(d.metrics.cpu_percent)}`,style:{width:`${d.metrics.cpu_percent}%`}})})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-gray-600",children:"Memory"}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{className:"text-sm font-medium text-gray-900",children:d.hardware.memory}),d.metrics.memory_percent&&u.jsxs("span",{className:"text-xs text-gray-500",children:[d.metrics.memory_percent.toFixed(1),"%"]})]}),d.metrics.memory_percent&&u.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 mt-1",children:u.jsx("div",{className:`h-2 rounded-full ${c(d.metrics.memory_percent)}`,style:{width:`${d.metrics.memory_percent}%`}})})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-gray-600",children:"GPU"}),u.jsx("p",{className:"text-sm font-medium text-gray-900",children:d.hardware.gpu})]})]}),d.metrics.disk_usage&&u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{className:"text-sm text-gray-600",children:"Disk Usage"}),u.jsxs("span",{className:"text-xs text-gray-500",children:[l(d.metrics.disk_usage.used)," / ",l(d.metrics.disk_usage.total)]})]}),u.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 mt-1",children:u.jsx("div",{className:`h-2 rounded-full ${c(d.metrics.disk_usage.percent)}`,style:{width:`${d.metrics.disk_usage.percent}%`}})})]}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsxs("a",{href:d.services.ollama,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-3 py-1 border border-gray-300 rounded-md text-xs font-medium text-gray-700 hover:bg-gray-50",children:[u.jsx(Zs,{className:"h-4 w-4 mr-1"}),"Ollama"]}),u.jsxs("a",{href:d.services.cockpit,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-3 py-1 border border-gray-300 rounded-md text-xs font-medium text-gray-700 hover:bg-gray-50",children:[u.jsx(To,{className:"h-4 w-4 mr-1"}),"Cockpit"]})]})]},d.id))})})]})]}):u.jsx("div",{children:"No cluster data available"})};function wNe(){const e=()=>u.jsxs(p9,{children:[u.jsx($t,{path:"/login",element:u.jsx(tG,{})}),u.jsx($t,{path:"/",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(uZ,{})})})}),u.jsx($t,{path:"/projects",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(f2e,{})})})}),u.jsx($t,{path:"/projects/new",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(cT,{mode:"create"})})})}),u.jsx($t,{path:"/projects/:id",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(h2e,{})})})}),u.jsx($t,{path:"/projects/:id/edit",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(cT,{mode:"edit"})})})}),u.jsx($t,{path:"/workflows",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(bNe,{})})})}),u.jsx($t,{path:"/workflows/new",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(px,{})})})}),u.jsx($t,{path:"/workflows/:id",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(px,{})})})}),u.jsx($t,{path:"/workflows/:id/edit",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(px,{})})})}),u.jsx($t,{path:"/workflows/templates",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(TY,{})})})}),u.jsx($t,{path:"/cluster",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(hT,{})})})}),u.jsx($t,{path:"/cluster/nodes",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(hT,{})})})}),u.jsx($t,{path:"/agents",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(dZ,{})})})}),u.jsx($t,{path:"/executions",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(fZ,{})})})}),u.jsx($t,{path:"/analytics",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(TSe,{})})})}),u.jsx($t,{path:"/profile",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(q3,{})})})}),u.jsx($t,{path:"/settings",element:u.jsx(sr,{children:u.jsx(ar,{children:u.jsx(nG,{})})})}),u.jsx($t,{path:"*",element:u.jsx(f9,{to:"/",replace:!0})})]});return u.jsx(w9,{children:u.jsx(sK,{children:u.jsx(oS,{children:u.jsx(e,{})})})})}const _Ne=new g8({defaultOptions:{queries:{retry:3,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1}}});gx.createRoot(document.getElementById("root")).render(u.jsx(k.StrictMode,{children:u.jsxs(w8,{client:_Ne,children:[u.jsx(wNe,{}),u.jsx(_B,{position:"top-right",toastOptions:{duration:4e3,style:{background:"#363636",color:"#fff"},success:{style:{background:"#10b981"}},error:{style:{background:"#ef4444"}}}})]})}));
|