PageSourceSearch

https://simplifiedvaluationtool.lovable.app/assets/index-B8J-j-db.js

js simplifiedvaluationtool.lovable.app collected 2026-10-03 03:44:24 UTC 1,365,762 bytes, 959 lines download raw bytes

vendor: 5,975 bytes, lines 1-9
1var PB=Object.defineProperty;var YC=e=>{throw TypeError(e)};var AB=(e,t,r)=>t in e?PB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vi=(e,t,r)=>AB(e,typeof t!="symbol"?t+"":t,r),Iy=(e,t,r)=>t.has(e)||YC("Cannot "+r);var ve=(e,t,r)=>(Iy(e,t,"read from private field"),r?r.call(e):t.get(e)),bt=(e,t,r)=>t.has(e)?YC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ot=(e,t,r,n)=>(Iy(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Rr=(e,t,r)=>(Iy(e,t,"access private method"),r);var Rh=(e,t,r,n)=>({set _(a){ot(e,t,a,r)},get _(){return ve(e,t,n)}});function kB(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var $h=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V_={exports:{}},Ug={},W_={exports:{}},dt={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var uh=Symbol.for("react.element"),OB=Symbol.for("react.portal"),EB=Symbol.for("react.fragment"),_B=Symbol.for("react.strict_mode"),TB=Symbol.for("react.profiler"),MB=Symbol.for("react.provider"),RB=Symbol.for("react.context"),$B=Symbol.for("react.forward_ref"),IB=Symbol.for("react.suspense"),DB=Symbol.for("react.memo"),FB=Symbol.for("react.lazy"),XC=Symbol.iterator;function LB(e){return e===null||typeof e!="object"?null:(e=XC&&e[XC]||e["@@iterator"],typeof e=="function"?e:null)}var U_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G_=Object.assign,H_={};function mu(e,t,r){this.props=e,this.context=t,this.refs=H_,this.updater=r||U_}mu.prototype.isReactComponent={};mu.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")};mu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function q_(){}q_.prototype=mu.prototype;function _1(e,t,r){this.props=e,this.context=t,this.refs=H_,this.updater=r||U_}var T1=_1.prototype=new q_;T1.constructor=_1;G_(T1,mu.prototype);T1.isPureReactComponent=!0;var ZC=Array.isArray,K_=Object.prototype.hasOwnProperty,M1={current:null},Y_={key:!0,ref:!0,__self:!0,__source:!0};function X_(e,t,r){var n,a={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)K_.call(t,n)&&!Y_.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)a[n]===void 0&&(a[n]=l[n]);return{$$typeof:uh,type:e,key:i,ref:s,props:a,_owner:M1.current}}function BB(e,t){return{$$typeof:uh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function R1(e){return typeof e=="object"&&e!==null&&e.$$typeof===uh}function zB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var QC=/\/+/g;function Dy(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zB(""+e.key):t.toString(36)}function Np(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case uh:case OB:s=!0}}if(s)return s=e,a=a(s),e=n===""?"."+Dy(s,0):n,ZC(a)?(r="",e!=null&&(r=e.replace(QC,"$&/")+"/"),Np(a,t,r,"",function(u){return u})):a!=null&&(R1(a)&&(a=BB(a,r+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(QC,"$&/")+"/")+e)),t.push(a)),1;if(s=0,n=n===""?".":n+":",ZC(e))for(var l=0;l<e.length;l++){i=e[l];var c=n+Dy(i,l);s+=Np(i,t,r,c,a)}else if(c=LB(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=n+Dy(i,l++),s+=Np(i,t,r,c,a);else if(i==="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 Ih(e,t,r){if(e==null)return e;var n=[],a=0;return Np(e,n,"","",function(i){return t.call(r,i,a++)}),n}function VB(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 tn={current:null},Pp={transition:null},WB={ReactCurrentDispatcher:tn,ReactCurrentBatchConfig:Pp,ReactCurrentOwner:M1};function Z_(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,087 bytes, lines 9-25
9dt.Children={map:Ih,forEach:function(e,t,r){Ih(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ih(e,function(){t++}),t},toArray:function(e){return Ih(e,function(t){return t})||[]},only:function(e){if(!R1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};dt.Component=mu;dt.Fragment=EB;dt.Profiler=TB;dt.PureComponent=_1;dt.StrictMode=_B;dt.Suspense=IB;dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WB;dt.act=Z_;dt.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=G_({},e.props),a=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=M1.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)K_.call(t,c)&&!Y_.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:uh,type:e.type,key:a,ref:i,props:n,_owner:s}};dt.createContext=function(e){return e={$$typeof:RB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:MB,_context:e},e.Consumer=e};dt.createElement=X_;dt.createFactory=function(e){var t=X_.bind(null,e);return t.type=e,t};dt.createRef=function(){return{current:null}};dt.forwardRef=function(e){return{$$typeof:$B,render:e}};dt.isValidElement=R1;dt.lazy=function(e){return{$$typeof:FB,_payload:{_status:-1,_result:e},_init:VB}};dt.memo=function(e,t){return{$$typeof:DB,type:e,compare:t===void 0?null:t}};dt.startTransition=function(e){var t=Pp.transition;Pp.transition={};try{e()}finally{Pp.transition=t}};dt.unstable_act=Z_;dt.useCallback=function(e,t){return tn.current.useCallback(e,t)};dt.useContext=function(e){return tn.current.useContext(e)};dt.useDebugValue=function(){};dt.useDeferredValue=function(e){return tn.current.useDeferredValue(e)};dt.useEffect=function(e,t){return tn.current.useEffect(e,t)};dt.useId=function(){return tn.current.useId()};dt.useImperativeHandle=function(e,t,r){return tn.current.useImperativeHandle(e,t,r)};dt.useInsertionEffect=function(e,t){return tn.current.useInsertionEffect(e,t)};dt.useLayoutEffect=function(e,t){return tn.current.useLayoutEffect(e,t)};dt.useMemo=function(e,t){return tn.current.useMemo(e,t)};dt.useReducer=function(e,t,r){return tn.current.useReducer(e,t,r)};dt.useRef=function(e){return tn.current.useRef(e)};dt.useState=function(e){return tn.current.useState(e)};dt.useSyncExternalStore=function(e,t,r){return tn.current.useSyncExternalStore(e,t,r)};dt.useTransition=function(){return tn.current.useTransition()};dt.version="18.3.1";W_.exports=dt;var w=W_.exports;const _=vt(w),$1=kB({__proto__:null,default:_},[w]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var UB=w,GB=Symbol.for("react.element"),HB=Symbol.for("react.fragment"),qB=Object.prototype.hasOwnProperty,KB=UB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,YB={key:!0,ref:!0,__self:!0,__source:!0};function Q_(e,t,r){var n,a={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)qB.call(t,n)&&!YB.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:GB,type:e,key:i,ref:s,props:a,_owner:KB.current}}Ug.Fragment=HB;Ug.jsx=Q_;Ug.jsxs=Q_;V_.exports=Ug;var o=V_.exports,J_={exports:{}},_n={},eT={exports:{}},tT={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(F,D){var G=F.length;F.push(D);e:for(;0<G;){var K=G-1>>>1,z=F[K];if(0<a(z,D))F[K]=D,F[G]=z,G=K;else break e}}function r(F){return F.length===0?null:F[0]}function n(F){if(F.length===0)return null;var D=F[0],G=F.pop();if(G!==D){F[0]=G;e:for(var K=0,z=F.length,U=z>>>1;K<U;){var ee=2*(K+1)-1,Y=F[ee],W=ee+1,H=F[W];if(0>a(Y,G))W<z&&0>a(H,Y)?(F[K]=H,F[W]=G,K=W):(F[K]=Y,F[ee]=G,K=ee);else if(W<z&&0>a(H,G))F[K]=H,F[W]=G,K=W;else break e}}return D}function a(F,D){var G=F.sortIndex-D.sortIndex;return G!==0?G:F.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],u=[],f=1,d=null,h=3,m=!1,p=!1,g=!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);
vendor: 9,542 bytes, lines 25-34
25function b(F){for(var D=r(u);D!==null;){if(D.callback===null)n(u);else if(D.startTime<=F)n(u),D.sortIndex=D.expirationTime,t(c,D);else break;D=r(u)}}function S(F){if(g=!1,b(F),!p)if(r(c)!==null)p=!0,R(j);else{var D=r(u);D!==null&&B(S,D.startTime-F)}}function j(F,D){p=!1,g&&(g=!1,y(P),P=-1),m=!0;var G=h;try{for(b(D),d=r(c);d!==null&&(!(d.expirationTime>D)||F&&!M());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var z=K(d.expirationTime<=D);D=e.unstable_now(),typeof z=="function"?d.callback=z:d===r(c)&&n(c),b(D)}else n(c);d=r(c)}if(d!==null)var U=!0;else{var ee=r(u);ee!==null&&B(S,ee.startTime-D),U=!1}return U}finally{d=null,h=G,m=!1}}var C=!1,N=null,P=-1,A=5,O=-1;function M(){return!(e.unstable_now()-O<A)}function k(){if(N!==null){var F=e.unstable_now();O=F;var D=!0;try{D=N(!0,F)}finally{D?E():(C=!1,N=null)}}else C=!1}var E;if(typeof x=="function")E=function(){x(k)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,T=$.port2;$.port1.onmessage=k,E=function(){T.postMessage(null)}}else E=function(){v(k,0)};function R(F){N=F,C||(C=!0,E())}function B(F,D){P=v(function(){F(e.unstable_now())},D)}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(F){F.callback=null},e.unstable_continueExecution=function(){p||m||(p=!0,R(j))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(F){switch(h){case 1:case 2:case 3:var D=3;break;default:D=h}var G=h;h=D;try{return F()}finally{h=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,D){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var G=h;h=F;try{return D()}finally{h=G}},e.unstable_scheduleCallback=function(F,D,G){var K=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?K+G:K):G=K,F){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=G+z,F={id:f++,callback:D,priorityLevel:F,startTime:G,expirationTime:z,sortIndex:-1},G>K?(F.sortIndex=G,t(u,F),r(c)===null&&F===r(u)&&(g?(y(P),P=-1):g=!0,B(S,G-K))):(F.sortIndex=z,t(c,F),p||m||(p=!0,R(j))),F},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(F){var D=h;return function(){var G=h;h=D;try{return F.apply(this,arguments)}finally{h=G}}}})(tT);eT.exports=tT;var XB=eT.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var ZB=w,En=XB;function we(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 rT=new Set,Wd={};function dl(e,t){Cc(e,t),Cc(e+"Capture",t)}function Cc(e,t){for(Wd[e]=t,e=0;e<t.length;e++)rT.add(t[e])}var Bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u0=Object.prototype.hasOwnProperty,QB=/^[: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]*$/,JC={},eN={};function JB(e){return u0.call(eN,e)?!0:u0.call(JC,e)?!1:QB.test(e)?eN[e]=!0:(JC[e]=!0,!1)}function ez(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 tz(e,t,r,n){if(t===null||typeof t>"u"||ez(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 rn(e,t,r,n,a,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Er[e]=new rn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Er[t]=new rn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Er[e]=new rn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Er[e]=new rn(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){Er[e]=new rn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Er[e]=new rn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Er[e]=new rn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Er[e]=new rn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Er[e]=new rn(e,5,!1,e.toLowerCase(),null,!1,!1)});var I1=/[\-:]([a-z])/g;function D1(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(I1,D1);Er[t]=new rn(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(I1,D1);Er[t]=new rn(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(I1,D1);Er[t]=new rn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Er[e]=new rn(e,1,!1,e.toLowerCase(),null,!1,!1)});Er.xlinkHref=new rn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Er[e]=new rn(e,1,!1,e.toLowerCase(),null,!0,!0)});function F1(e,t,r,n){var a=Er.hasOwnProperty(t)?Er[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(tz(t,r,a,n)&&(r=null),n||a===null?JB(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Zi=ZB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Dh=Symbol.for("react.element"),$l=Symbol.for("react.portal"),Il=Symbol.for("react.fragment"),L1=Symbol.for("react.strict_mode"),d0=Symbol.for("react.profiler"),nT=Symbol.for("react.provider"),aT=Symbol.for("react.context"),B1=Symbol.for("react.forward_ref"),f0=Symbol.for("react.suspense"),h0=Symbol.for("react.suspense_list"),z1=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),iT=Symbol.for("react.offscreen"),tN=Symbol.iterator;function Ku(e){return e===null||typeof e!="object"?null:(e=tN&&e[tN]||e["@@iterator"],typeof e=="function"?e:null)}var Ut=Object.assign,Fy;function vd(e){if(Fy===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Fy=t&&t[1]||""}return`
34`+Fy+e}var Ly=!1;function By(e,t){if(!e||Ly)return"";Ly=!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(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 14,106 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var a=u.stack.split(`
35`),i=n.stack.split(`
36`),s=a.length-1,l=i.length-1;1<=s&&0<=l&&a[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(a[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||a[s]!==i[l]){var c=`
37`+a[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{Ly=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?vd(e):""}function rz(e){switch(e.tag){case 5:return vd(e.type);case 16:return vd("Lazy");case 13:return vd("Suspense");case 19:return vd("SuspenseList");case 0:case 2:case 15:return e=By(e.type,!1),e;case 11:return e=By(e.type.render,!1),e;case 1:return e=By(e.type,!0),e;default:return""}}function p0(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 Il:return"Fragment";case $l:return"Portal";case d0:return"Profiler";case L1:return"StrictMode";case f0:return"Suspense";case h0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aT:return(e.displayName||"Context")+".Consumer";case nT:return(e._context.displayName||"Context")+".Provider";case B1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z1:return t=e.displayName||null,t!==null?t:p0(e.type)||"Memo";case ho:t=e._payload,e=e._init;try{return p0(e(t))}catch{}}return null}function nz(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 p0(t);case 8:return t===L1?"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 Uo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function az(e){var t=oT(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 a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,i.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 Fh(e){e._valueTracker||(e._valueTracker=az(e))}function sT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=oT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Hp(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 m0(e,t){var r=t.checked;return Ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function rN(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Uo(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 lT(e,t){t=t.checked,t!=null&&F1(e,"checked",t,!1)}function g0(e,t){lT(e,t);var r=Uo(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")?v0(e,t.type,r):t.hasOwnProperty("defaultValue")&&v0(e,t.type,Uo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nN(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 v0(e,t,r){(t!=="number"||Hp(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var yd=Array.isArray;function Ql(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Uo(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function y0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(we(91));return Ut({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function aN(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(we(92));if(yd(r)){if(1<r.length)throw Error(we(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Uo(r)}}function cT(e,t){var r=Uo(t.value),n=Uo(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 iN(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uT(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 x0(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Lh,dT=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Lh=Lh||document.createElement("div"),Lh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Lh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ud(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Nd={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},iz=["Webkit","ms","Moz","O"];Object.keys(Nd).forEach(function(e){iz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nd[t]=Nd[e]})});function fT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Nd.hasOwnProperty(e)&&Nd[e]?(""+t).trim():t+"px"}function hT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=fT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var oz=Ut({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 b0(e,t){if(t){if(oz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(we(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(we(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(we(61))}if(t.style!=null&&typeof t.style!="object")throw Error(we(62))}}function w0(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 j0=null;function V1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var S0=null,Jl=null,ec=null;function oN(e){if(e=hh(e)){if(typeof S0!="function")throw Error(we(280));var t=e.stateNode;t&&(t=Yg(t),S0(e.stateNode,e.type,t))}}function pT(e){Jl?ec?ec.push(e):ec=[e]:Jl=e}function mT(){if(Jl){var e=Jl,t=ec;if(ec=Jl=null,oN(e),t)for(e=0;e<t.length;e++)oN(t[e])}}function gT(e,t){return e(t)}function vT(){}var zy=!1;function yT(e,t,r){if(zy)return e(t,r);zy=!0;try{return gT(e,t,r)}finally{zy=!1,(Jl!==null||ec!==null)&&(vT(),mT())}}function Gd(e,t){var r=e.stateNode;if(r===null)return null;var n=Yg(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(we(231,t,typeof r));return r}var C0=!1;if(Bi)try{var Yu={};Object.defineProperty(Yu,"passive",{get:function(){C0=!0}}),window.addEventListener("test",Yu,Yu),window.removeEventListener("test",Yu,Yu)}catch{C0=!1}function sz(e,t,r,n,a,i,s,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(f){this.onError(f)}}var Pd=!1,qp=null,Kp=!1,N0=null,lz={onError:function(e){Pd=!0,qp=e}};function cz(e,t,r,n,a,i,s,l,c){Pd=!1,qp=null,sz.apply(lz,arguments)}function uz(e,t,r,n,a,i,s,l,c){if(cz.apply(this,arguments),Pd){if(Pd){var u=qp;Pd=!1,qp=null}else throw Error(we(198));Kp||(Kp=!0,N0=u)}}function fl(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 xT(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 sN(e){if(fl(e)!==e)throw Error(we(188))}function dz(e){var t=e.alternate;if(!t){if(t=fl(e),t===null)throw Error(we(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return sN(a),e;if(i===n)return sN(a),t;i=i.sibling}throw Error(we(188))}if(r.return!==n.return)r=a,n=i;else{for(var s=!1,l=a.child;l;){if(l===r){s=!0,r=a,n=i;break}if(l===n){s=!0,n=a,r=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===r){s=!0,r=i,n=a;break}if(l===n){s=!0,n=i,r=a;break}l=l.sibling}if(!s)throw Error(we(189))}}if(r.alternate!==n)throw Error(we(190))}if(r.tag!==3)throw Error(we(188));return r.stateNode.current===r?e:t}function bT(e){return e=dz(e),e!==null?wT(e):null}function wT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=wT(e);if(t!==null)return t;e=e.sibling}return null}var jT=En.unstable_scheduleCallback,lN=En.unstable_cancelCallback,fz=En.unstable_shouldYield,hz=En.unstable_requestPaint,Yt=En.unstable_now,pz=En.unstable_getCurrentPriorityLevel,W1=En.unstable_ImmediatePriority,ST=En.unstable_UserBlockingPriority,Yp=En.unstable_NormalPriority,mz=En.unstable_LowPriority,CT=En.unstable_IdlePriority,Gg=null,ni=null;function gz(e){if(ni&&typeof ni.onCommitFiberRoot=="function")try{ni.onCommitFiberRoot(Gg,e,void 0,(e.current.flags&128)===128)}catch{}}var Ta=Math.clz32?Math.clz32:xz,vz=Math.log,yz=Math.LN2;function xz(e){return e>>>=0,e===0?32:31-(vz(e)/yz|0)|0}var Bh=64,zh=4194304;function xd(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 Xp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var l=s&~a;l!==0?n=xd(l):(i&=s,i!==0&&(n=xd(i)))}else s=r&~a,s!==0?n=xd(s):i!==0&&(n=xd(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&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-Ta(t),a=1<<r,n|=e[r],t&=~a;return n}function bz(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 wz(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Ta(i),l=1<<s,c=a[s];c===-1?(!(l&r)||l&n)&&(a[s]=bz(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function P0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function NT(){var e=Bh;return Bh<<=1,!(Bh&4194240)&&(Bh=64),e}function Vy(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function dh(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ta(t),e[t]=r}function jz(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 a=31-Ta(r),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~i}}function U1(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ta(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var Pt=0;function PT(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var AT,G1,kT,OT,ET,A0=!1,Vh=[],To=null,Mo=null,Ro=null,Hd=new Map,qd=new Map,vo=[],Sz="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 cN(e,t){switch(e){case"focusin":case"focusout":To=null;break;case"dragenter":case"dragleave":Mo=null;break;case"mouseover":case"mouseout":Ro=null;break;case"pointerover":case"pointerout":Hd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qd.delete(t.pointerId)}}function Xu(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=hh(t),t!==null&&G1(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Cz(e,t,r,n,a){switch(t){case"focusin":return To=Xu(To,e,t,r,n,a),!0;case"dragenter":return Mo=Xu(Mo,e,t,r,n,a),!0;case"mouseover":return Ro=Xu(Ro,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return Hd.set(i,Xu(Hd.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,qd.set(i,Xu(qd.get(i)||null,e,t,r,n,a)),!0}return!1}function _T(e){var t=Ns(e.target);if(t!==null){var r=fl(t);if(r!==null){if(t=r.tag,t===13){if(t=xT(r),t!==null){e.blockedOn=t,ET(e.priority,function(){kT(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 Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=k0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);j0=n,r.target.dispatchEvent(n),j0=null}else return t=hh(r),t!==null&&G1(t),e.blockedOn=r,!1;t.shift()}return!0}function uN(e,t,r){Ap(e)&&r.delete(t)}function Nz(){A0=!1,To!==null&&Ap(To)&&(To=null),Mo!==null&&Ap(Mo)&&(Mo=null),Ro!==null&&Ap(Ro)&&(Ro=null),Hd.forEach(uN),qd.forEach(uN)}function Zu(e,t){e.blockedOn===t&&(e.blockedOn=null,A0||(A0=!0,En.unstable_scheduleCallback(En.unstable_NormalPriority,Nz)))}function Kd(e){function t(a){return Zu(a,e)}if(0<Vh.length){Zu(Vh[0],e);for(var r=1;r<Vh.length;r++){var n=Vh[r];n.blockedOn===e&&(n.blockedOn=null)}}for(To!==null&&Zu(To,e),Mo!==null&&Zu(Mo,e),Ro!==null&&Zu(Ro,e),Hd.forEach(t),qd.forEach(t),r=0;r<vo.length;r++)n=vo[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<vo.length&&(r=vo[0],r.blockedOn===null);)_T(r),r.blockedOn===null&&vo.shift()}var tc=Zi.ReactCurrentBatchConfig,Zp=!0;function Pz(e,t,r,n){var a=Pt,i=tc.transition;tc.transition=null;try{Pt=1,H1(e,t,r,n)}finally{Pt=a,tc.transition=i}}function Az(e,t,r,n){var a=Pt,i=tc.transition;tc.transition=null;try{Pt=4,H1(e,t,r,n)}finally{Pt=a,tc.transition=i}}function H1(e,t,r,n){if(Zp){var a=k0(e,t,r,n);if(a===null)Qy(e,t,n,Qp,r),cN(e,n);else if(Cz(a,e,t,r,n))n.stopPropagation();else if(cN(e,n),t&4&&-1<Sz.indexOf(e)){for(;a!==null;){var i=hh(a);if(i!==null&&AT(i),i=k0(e,t,r,n),i===null&&Qy(e,t,n,Qp,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else Qy(e,t,n,null,r)}}var Qp=null;function k0(e,t,r,n){if(Qp=null,e=V1(n),e=Ns(e),e!==null)if(t=fl(e),t===null)e=null;else if(r=t.tag,r===13){if(e=xT(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 Qp=e,null}
vendor: 10,401 bytes, line 37
37function TT(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(pz()){case W1:return 1;case ST:return 4;case Yp:case mz:return 16;case CT:return 536870912;default:return 16}default:return 16}}var Po=null,q1=null,kp=null;function MT(){if(kp)return kp;var e,t=q1,r=t.length,n,a="value"in Po?Po.value:Po.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===a[i-n];n++);return kp=a.slice(e,1<n?1-n:void 0)}function Op(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 Wh(){return!0}function dN(){return!1}function Tn(e){function t(r,n,a,i,s){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Wh:dN,this.isPropagationStopped=dN,this}return Ut(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=Wh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Wh)},persist:function(){},isPersistent:Wh}),t}var gu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},K1=Tn(gu),fh=Ut({},gu,{view:0,detail:0}),kz=Tn(fh),Wy,Uy,Qu,Hg=Ut({},fh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Y1,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!==Qu&&(Qu&&e.type==="mousemove"?(Wy=e.screenX-Qu.screenX,Uy=e.screenY-Qu.screenY):Uy=Wy=0,Qu=e),Wy)},movementY:function(e){return"movementY"in e?e.movementY:Uy}}),fN=Tn(Hg),Oz=Ut({},Hg,{dataTransfer:0}),Ez=Tn(Oz),_z=Ut({},fh,{relatedTarget:0}),Gy=Tn(_z),Tz=Ut({},gu,{animationName:0,elapsedTime:0,pseudoElement:0}),Mz=Tn(Tz),Rz=Ut({},gu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$z=Tn(Rz),Iz=Ut({},gu,{data:0}),hN=Tn(Iz),Dz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fz={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"},Lz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bz(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Lz[e])?!!t[e]:!1}function Y1(){return Bz}var zz=Ut({},fh,{key:function(e){if(e.key){var t=Dz[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Op(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fz[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Y1,charCode:function(e){return e.type==="keypress"?Op(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Op(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vz=Tn(zz),Wz=Ut({},Hg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pN=Tn(Wz),Uz=Ut({},fh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Y1}),Gz=Tn(Uz),Hz=Ut({},gu,{propertyName:0,elapsedTime:0,pseudoElement:0}),qz=Tn(Hz),Kz=Ut({},Hg,{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}),Yz=Tn(Kz),Xz=[9,13,27,32],X1=Bi&&"CompositionEvent"in window,Ad=null;Bi&&"documentMode"in document&&(Ad=document.documentMode);var Zz=Bi&&"TextEvent"in window&&!Ad,RT=Bi&&(!X1||Ad&&8<Ad&&11>=Ad),mN=" ",gN=!1;function $T(e,t){switch(e){case"keyup":return Xz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dl=!1;function Qz(e,t){switch(e){case"compositionend":return IT(t);case"keypress":return t.which!==32?null:(gN=!0,mN);case"textInput":return e=t.data,e===mN&&gN?null:e;default:return null}}function Jz(e,t){if(Dl)return e==="compositionend"||!X1&&$T(e,t)?(e=MT(),kp=q1=Po=null,Dl=!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 RT&&t.locale!=="ko"?null:t.data;default:return null}}var eV={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 vN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eV[e.type]:t==="textarea"}function DT(e,t,r,n){pT(n),t=Jp(t,"onChange"),0<t.length&&(r=new K1("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var kd=null,Yd=null;function tV(e){KT(e,0)}function qg(e){var t=Bl(e);if(sT(t))return e}function rV(e,t){if(e==="change")return t}var FT=!1;if(Bi){var Hy;if(Bi){var qy="oninput"in document;if(!qy){var yN=document.createElement("div");yN.setAttribute("oninput","return;"),qy=typeof yN.oninput=="function"}Hy=qy}else Hy=!1;FT=Hy&&(!document.documentMode||9<document.documentMode)}function xN(){kd&&(kd.detachEvent("onpropertychange",LT),Yd=kd=null)}function LT(e){if(e.propertyName==="value"&&qg(Yd)){var t=[];DT(t,Yd,e,V1(e)),yT(tV,t)}}function nV(e,t,r){e==="focusin"?(xN(),kd=t,Yd=r,kd.attachEvent("onpropertychange",LT)):e==="focusout"&&xN()}function aV(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qg(Yd)}function iV(e,t){if(e==="click")return qg(t)}function oV(e,t){if(e==="input"||e==="change")return qg(t)}function sV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ia=typeof Object.is=="function"?Object.is:sV;function Xd(e,t){if(Ia(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 a=r[n];if(!u0.call(t,a)||!Ia(e[a],t[a]))return!1}return!0}function bN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wN(e,t){var r=bN(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=bN(r)}}function BT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?BT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zT(){for(var e=window,t=Hp();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Hp(e.document)}return t}function Z1(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 lV(e){var t=zT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&BT(r.ownerDocument.documentElement,r)){if(n!==null&&Z1(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 a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=wN(r,i);var s=wN(r,n);a&&s&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>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 cV=Bi&&"documentMode"in document&&11>=document.documentMode,Fl=null,O0=null,Od=null,E0=!1;function jN(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;E0||Fl==null||Fl!==Hp(n)||(n=Fl,"selectionStart"in n&&Z1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Od&&Xd(Od,n)||(Od=n,n=Jp(O0,"onSelect"),0<n.length&&(t=new K1("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Fl)))}function Uh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ll={animationend:Uh("Animation","AnimationEnd"),animationiteration:Uh("Animation","AnimationIteration"),animationstart:Uh("Animation","AnimationStart"),transitionend:Uh("Transition","TransitionEnd")},Ky={},VT={};Bi&&(VT=document.createElement("div").style,"AnimationEvent"in window||(delete Ll.animationend.animation,delete Ll.animationiteration.animation,delete Ll.animationstart.animation),"TransitionEvent"in window||delete Ll.transitionend.transition);function Kg(e){if(Ky[e])return Ky[e];if(!Ll[e])return e;var t=Ll[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in VT)return Ky[e]=t[r];return e}var WT=Kg("animationend"),UT=Kg("animationiteration"),GT=Kg("animationstart"),HT=Kg("transitionend"),qT=new Map,SN="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 Qo(e,t){qT.set(e,t),dl(t,[e])}for(var Yy=0;Yy<SN.length;Yy++){var Xy=SN[Yy],uV=Xy.toLowerCase(),dV=Xy[0].toUpperCase()+Xy.slice(1);Qo(uV,"on"+dV)}Qo(WT,"onAnimationEnd");Qo(UT,"onAnimationIteration");Qo(GT,"onAnimationStart");Qo("dblclick","onDoubleClick");Qo("focusin","onFocus");Qo("focusout","onBlur");Qo(HT,"onTransitionEnd");Cc("onMouseEnter",["mouseout","mouseover"]);Cc("onMouseLeave",["mouseout","mouseover"]);Cc("onPointerEnter",["pointerout","pointerover"]);Cc("onPointerLeave",["pointerout","pointerover"]);dl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));dl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));dl("onBeforeInput",["compositionend","keypress","textInput","paste"]);dl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));dl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));dl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bd="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(" "),fV=new Set("cancel close invalid load scroll toggle".split(" ").concat(bd));function CN(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,uz(n,t,void 0,e),e.currentTarget=null}function KT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var l=n[s],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&a.isPropagationStopped())break e;CN(a,l,u),i=c}else for(s=0;s<n.length;s++){if(l=n[s],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&a.isPropagationStopped())break e;CN(a,l,u),i=c}}}if(Kp)throw e=N0,Kp=!1,N0=null,e}function Rt(e,t){var r=t[$0];r===void 0&&(r=t[$0]=new Set);var n=e+"__bubble";r.has(n)||(YT(t,e,2,!1),r.add(n))}function Zy(e,t,r){var n=0;t&&(n|=4),YT(r,e,n,t)}var Gh="_reactListening"+Math.random().toString(36).slice(2);function Zd(e){if(!e[Gh]){e[Gh]=!0,rT.forEach(function(r){r!=="selectionchange"&&(fV.has(r)||Zy(r,!1,e),Zy(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gh]||(t[Gh]=!0,Zy("selectionchange",!1,t))}}function YT(e,t,r,n){switch(TT(t)){case 1:var a=Pz;break;case 4:a=Az;break;default:a=H1}r=a.bind(null,t,r,e),a=void 0,!C0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Qy(e,t,r,n,a){var i=n;
vendor: 2,645 bytes, line 37
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var l=n.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(s===4)for(s=n.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;s=s.return}for(;l!==null;){if(s=Ns(l),s===null)return;if(c=s.tag,c===5||c===6){n=i=s;continue e}l=l.parentNode}}n=n.return}yT(function(){var u=i,f=V1(r),d=[];e:{var h=qT.get(e);if(h!==void 0){var m=K1,p=e;switch(e){case"keypress":if(Op(r)===0)break e;case"keydown":case"keyup":m=Vz;break;case"focusin":p="focus",m=Gy;break;case"focusout":p="blur",m=Gy;break;case"beforeblur":case"afterblur":m=Gy;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":m=fN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Ez;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Gz;break;case WT:case UT:case GT:m=Mz;break;case HT:m=qz;break;case"scroll":m=kz;break;case"wheel":m=Yz;break;case"copy":case"cut":case"paste":m=$z;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=pN}var g=(t&4)!==0,v=!g&&e==="scroll",y=g?h!==null?h+"Capture":null:h;g=[];for(var x=u,b;x!==null;){b=x;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=Gd(x,y),S!=null&&g.push(Qd(x,S,b)))),v)break;x=x.return}0<g.length&&(h=new m(h,p,null,r,f),d.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&r!==j0&&(p=r.relatedTarget||r.fromElement)&&(Ns(p)||p[zi]))break e;if((m||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,m?(p=r.relatedTarget||r.toElement,m=u,p=p?Ns(p):null,p!==null&&(v=fl(p),p!==v||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=u),m!==p)){if(g=fN,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=pN,S="onPointerLeave",y="onPointerEnter",x="pointer"),v=m==null?h:Bl(m),b=p==null?h:Bl(p),h=new g(S,x+"leave",m,r,f),h.target=v,h.relatedTarget=b,S=null,Ns(f)===u&&(g=new g(y,x+"enter",p,r,f),g.target=b,g.relatedTarget=v,S=g),v=S,m&&p)t:{for(g=m,y=p,x=0,b=g;b;b=Cl(b))x++;for(b=0,S=y;S;S=Cl(S))b++;for(;0<x-b;)g=Cl(g),x--;for(;0<b-x;)y=Cl(y),b--;for(;x--;){if(g===y||y!==null&&g===y.alternate)break t;g=Cl(g),y=Cl(y)}g=null}else g=null;m!==null&&NN(d,h,m,g,!1),p!==null&&v!==null&&NN(d,v,p,g,!0)}}
vendor: 4,576 bytes, lines 37-38
37e:{if(h=u?Bl(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var j=rV;else if(vN(h))if(FT)j=oV;else{j=aV;var C=nV}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=iV);if(j&&(j=j(e,u))){DT(d,j,r,f);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&v0(h,"number",h.value)}switch(C=u?Bl(u):window,e){case"focusin":(vN(C)||C.contentEditable==="true")&&(Fl=C,O0=u,Od=null);break;case"focusout":Od=O0=Fl=null;break;case"mousedown":E0=!0;break;case"contextmenu":case"mouseup":case"dragend":E0=!1,jN(d,r,f);break;case"selectionchange":if(cV)break;case"keydown":case"keyup":jN(d,r,f)}var N;if(X1)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Dl?$T(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(RT&&r.locale!=="ko"&&(Dl||P!=="onCompositionStart"?P==="onCompositionEnd"&&Dl&&(N=MT()):(Po=f,q1="value"in Po?Po.value:Po.textContent,Dl=!0)),C=Jp(u,P),0<C.length&&(P=new hN(P,e,null,r,f),d.push({event:P,listeners:C}),N?P.data=N:(N=IT(r),N!==null&&(P.data=N)))),(N=Zz?Qz(e,r):Jz(e,r))&&(u=Jp(u,"onBeforeInput"),0<u.length&&(f=new hN("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=N))}KT(d,t)})}function Qd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Jp(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Gd(e,r),i!=null&&n.unshift(Qd(e,i,a)),i=Gd(e,t),i!=null&&n.push(Qd(e,i,a))),e=e.return}return n}function Cl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function NN(e,t,r,n,a){for(var i=t._reactName,s=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,a?(c=Gd(r,i),c!=null&&s.unshift(Qd(r,c,l))):a||(c=Gd(r,i),c!=null&&s.push(Qd(r,c,l)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var hV=/\r\n?/g,pV=/\u0000|\uFFFD/g;function PN(e){return(typeof e=="string"?e:""+e).replace(hV,`
38`).replace(pV,"")}function Hh(e,t,r){if(t=PN(t),PN(e)!==t&&r)throw Error(we(425))}function em(){}var _0=null,T0=null;function M0(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 R0=typeof setTimeout=="function"?setTimeout:void 0,mV=typeof clearTimeout=="function"?clearTimeout:void 0,AN=typeof Promise=="function"?Promise:void 0,gV=typeof queueMicrotask=="function"?queueMicrotask:typeof AN<"u"?function(e){return AN.resolve(null).then(e).catch(vV)}:R0;function vV(e){setTimeout(function(){throw e})}function Jy(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),Kd(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);Kd(t)}function $o(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 kN(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 vu=Math.random().toString(36).slice(2),Za="__reactFiber$"+vu,Jd="__reactProps$"+vu,zi="__reactContainer$"+vu,$0="__reactEvents$"+vu,yV="__reactListeners$"+vu,xV="__reactHandles$"+vu;function Ns(e){var t=e[Za];if(t)return t;for(var r=e.parentNode;r;){if(t=r[zi]||r[Za]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=kN(e);e!==null;){if(r=e[Za])return r;e=kN(e)}return t}e=r,r=e.parentNode}return null}function hh(e){return e=e[Za]||e[zi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(we(33))}function Yg(e){return e[Jd]||null}var I0=[],zl=-1;function Jo(e){return{current:e}}function Ft(e){0>zl||(e.current=I0[zl],I0[zl]=null,zl--)}function Tt(e,t){zl++,I0[zl]=e.current,e.current=t}var Go={},Hr=Jo(Go),un=Jo(!1),Ks=Go;function Nc(e,t){var r=e.type.contextTypes;if(!r)return Go;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a
vendor: 14,674 bytes, line 38
38),a}function dn(e){return e=e.childContextTypes,e!=null}function tm(){Ft(un),Ft(Hr)}function ON(e,t,r){if(Hr.current!==Go)throw Error(we(168));Tt(Hr,t),Tt(un,r)}function XT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(we(108,nz(e)||"Unknown",a));return Ut({},r,n)}function rm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Go,Ks=Hr.current,Tt(Hr,e),Tt(un,un.current),!0}function EN(e,t,r){var n=e.stateNode;if(!n)throw Error(we(169));r?(e=XT(e,t,Ks),n.__reactInternalMemoizedMergedChildContext=e,Ft(un),Ft(Hr),Tt(Hr,e)):Ft(un),Tt(un,r)}var Ai=null,Xg=!1,ex=!1;function ZT(e){Ai===null?Ai=[e]:Ai.push(e)}function bV(e){Xg=!0,ZT(e)}function es(){if(!ex&&Ai!==null){ex=!0;var e=0,t=Pt;try{var r=Ai;for(Pt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ai=null,Xg=!1}catch(a){throw Ai!==null&&(Ai=Ai.slice(e+1)),jT(W1,es),a}finally{Pt=t,ex=!1}}return null}var Vl=[],Wl=0,nm=null,am=0,Vn=[],Wn=0,Ys=null,Ei=1,_i="";function ys(e,t){Vl[Wl++]=am,Vl[Wl++]=nm,nm=e,am=t}function QT(e,t,r){Vn[Wn++]=Ei,Vn[Wn++]=_i,Vn[Wn++]=Ys,Ys=e;var n=Ei;e=_i;var a=32-Ta(n)-1;n&=~(1<<a),r+=1;var i=32-Ta(t)+a;if(30<i){var s=a-a%5;i=(n&(1<<s)-1).toString(32),n>>=s,a-=s,Ei=1<<32-Ta(t)+a|r<<a|n,_i=i+e}else Ei=1<<i|r<<a|n,_i=e}function Q1(e){e.return!==null&&(ys(e,1),QT(e,1,0))}function J1(e){for(;e===nm;)nm=Vl[--Wl],Vl[Wl]=null,am=Vl[--Wl],Vl[Wl]=null;for(;e===Ys;)Ys=Vn[--Wn],Vn[Wn]=null,_i=Vn[--Wn],Vn[Wn]=null,Ei=Vn[--Wn],Vn[Wn]=null}var An=null,Pn=null,Bt=!1,Sa=null;function JT(e,t){var r=qn(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 _N(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,An=e,Pn=$o(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,An=e,Pn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ys!==null?{id:Ei,overflow:_i}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=qn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,An=e,Pn=null,!0):!1;default:return!1}}function D0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function F0(e){if(Bt){var t=Pn;if(t){var r=t;if(!_N(e,t)){if(D0(e))throw Error(we(418));t=$o(r.nextSibling);var n=An;t&&_N(e,t)?JT(n,r):(e.flags=e.flags&-4097|2,Bt=!1,An=e)}}else{if(D0(e))throw Error(we(418));e.flags=e.flags&-4097|2,Bt=!1,An=e}}}function TN(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;An=e}function qh(e){if(e!==An)return!1;if(!Bt)return TN(e),Bt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!M0(e.type,e.memoizedProps)),t&&(t=Pn)){if(D0(e))throw e2(),Error(we(418));for(;t;)JT(e,t),t=$o(t.nextSibling)}if(TN(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(we(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Pn=$o(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Pn=null}}else Pn=An?$o(e.stateNode.nextSibling):null;return!0}function e2(){for(var e=Pn;e;)e=$o(e.nextSibling)}function Pc(){Pn=An=null,Bt=!1}function ej(e){Sa===null?Sa=[e]:Sa.push(e)}var wV=Zi.ReactCurrentBatchConfig;function Ju(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(we(309));var n=r.stateNode}if(!n)throw Error(we(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=a.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(we(284));if(!r._owner)throw Error(we(290,e))}return e}function Kh(e,t){throw e=Object.prototype.toString.call(t),Error(we(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function MN(e){var t=e._init;return t(e._payload)}function t2(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 a(y,x){return y=Lo(y,x),y.index=0,y.sibling=null,y}function i(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 l(y,x,b,S){return x===null||x.tag!==6?(x=sx(b,y.mode,S),x.return=y,x):(x=a(x,b),x.return=y,x)}function c(y,x,b,S){var j=b.type;return j===Il?f(y,x,b.props.children,S,b.key):x!==null&&(x.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ho&&MN(j)===x.type)?(S=a(x,b.props),S.ref=Ju(y,x,b),S.return=y,S):(S=Ip(b.type,b.key,b.props,null,y.mode,S),S.ref=Ju(y,x,b),S.return=y,S)}function u(y,x,b,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=lx(b,y.mode,S),x.return=y,x):(x=a(x,b.children||[]),x.return=y,x)}function f(y,x,b,S,j){return x===null||x.tag!==7?(x=zs(b,y.mode,S,j),x.return=y,x):(x=a(x,b),x.return=y,x)}function d(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=sx(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Dh:return b=Ip(x.type,x.key,x.props,null,y.mode,b),b.ref=Ju(y,null,x),b.return=y,b;case $l:return x=lx(x,y.mode,b),x.return=y,x;case ho:var S=x._init;return d(y,S(x._payload),b)}if(yd(x)||Ku(x))return x=zs(x,y.mode,b,null),x.return=y,x;Kh(y,x)}return null}function h(y,x,b,S){var j=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(y,x,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Dh:return b.key===j?c(y,x,b,S):null;case $l:return b.key===j?u(y,x,b,S):null;case ho:return j=b._init,h(y,x,j(b._payload),S)}if(yd(b)||Ku(b))return j!==null?null:f(y,x,b,S,null);Kh(y,b)}return null}function m(y,x,b,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,l(x,y,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Dh:return y=y.get(S.key===null?b:S.key)||null,c(x,y,S,j);case $l:return y=y.get(S.key===null?b:S.key)||null,u(x,y,S,j);case ho:var C=S._init;return m(y,x,b,C(S._payload),j)}if(yd(S)||Ku(S))return y=y.get(b)||null,f(x,y,S,j,null);Kh(x,S)}return null}function p(y,x,b,S){for(var j=null,C=null,N=x,P=x=0,A=null;N!==null&&P<b.length;P++){N.index>P?(A=N,N=null):A=N.sibling;var O=h(y,N,b[P],S);if(O===null){N===null&&(N=A);break}e&&N&&O.alternate===null&&t(y,N),x=i(O,x,P),C===null?j=O:C.sibling=O,C=O,N=A}if(P===b.length)return r(y,N),Bt&&ys(y,P),j;if(N===null){for(;P<b.length;P++)N=d(y,b[P],S),N!==null&&(x=i(N,x,P),C===null?j=N:C.sibling=N,C=N);return Bt&&ys(y,P),j}for(N=n(y,N);P<b.length;P++)A=m(N,y,P,b[P],S),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?P:A.key),x=i(A,x,P),C===null?j=A:C.sibling=A,C=A);return e&&N.forEach(function(M){return t(y,M)}),Bt&&ys(y,P),j}function g(y,x,b,S){var j=Ku(b);if(typeof j!="function")throw Error(we(150));if(b=j.call(b),b==null)throw Error(we(151));for(var C=j=null,N=x,P=x=0,A=null,O=b.next();N!==null&&!O.done;P++,O=b.next()){N.index>P?(A=N,N=null):A=N.sibling;var M=h(y,N,O.value,S);if(M===null){N===null&&(N=A);break}e&&N&&M.alternate===null&&t(y,N),x=i(M,x,P),C===null?j=M:C.sibling=M,C=M,N=A}if(O.done)return r(y,N),Bt&&ys(y,P),j;if(N===null){for(;!O.done;P++,O=b.next())O=d(y,O.value,S),O!==null&&(x=i(O,x,P),C===null?j=O:C.sibling=O,C=O);return Bt&&ys(y,P),j}for(N=n(y,N);!O.done;P++,O=b.next())O=m(N,y,P,O.value,S),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?P:O.key),x=i(O,x,P),C===null?j=O:C.sibling=O,C=O);return e&&N.forEach(function(k){return t(y,k)}),Bt&&ys(y,P),j}function v(y,x,b,S){if(typeof b=="object"&&b!==null&&b.type===Il&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Dh:e:{for(var j=b.key,C=x;C!==null;){if(C.key===j){if(j=b.type,j===Il){if(C.tag===7){r(y,C.sibling),x=a(C,b.props.children),x.return=y,y=x;break e}}else if(C.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ho&&MN(j)===C.type){r(y,C.sibling),x=a(C,b.props),x.ref=Ju(y,C,b),x.return=y,y=x;break e}r(y,C);break}else t(y,C);C=C.sibling}b.type===Il?(x=zs(b.props.children,y.mode,S,b.key),x.return=y,y=x):(S=Ip(b.type,b.key,b.props,null,y.mode,S),S.ref=Ju(y,x,b),S.return=y,y=S)}return s(y);case $l:e:{for(C=b.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){r(y,x.sibling),x=a(x,b.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else t(y,x);x=x.sibling}x=lx(b,y.mode,S),x.return=y,y=x}return s(y);case ho:return C=b._init,v(y,x,C(b._payload),S)}if(yd(b))return p(y,x,b,S);if(Ku(b))return g(y,x,b,S);Kh(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(r(y,x.sibling),x=a(x,b),x.return=y,y=x):(r(y,x),x=sx(b,y.mode,S),x.return=y,y=x),s(y)):r(y,x)}return v}var Ac=t2(!0),r2=t2(!1),im=Jo(null),om=null,Ul=null,tj=null;function rj(){tj=Ul=om=null}function nj(e){var t=im.current;Ft(im),e._currentValue=t}function L0(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 rc(e,t){om=e,tj=Ul=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ln=!0),e.firstContext=null)}function Jn(e){var t=e._currentValue;if(tj!==e)if(e={context:e,memoizedValue:t,next:null},Ul===null){if(om===null)throw Error(we(308));Ul=e,om.dependencies={lanes:0,firstContext:e}}else Ul=Ul.next=e;return t}var Ps=null;function aj(e){Ps===null?Ps=[e]:Ps.push(e)}function n2(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,aj(t)):(r.next=a.next,a.next=r),t.interleaved=r,Vi(e,n)}function Vi(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 po=!1;function ij(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function a2(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 Ii(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Io(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xt&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,Vi(e,r)}return a=n.interleaved,a===null?(t.next=t,aj(n)):(t.next=a.next,a.next=t),n.interleaved=t,Vi(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,U1(e,r)}}function RN(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=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};i===null?a=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,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 sm(e,t,r,n){var a=e.updateQueue;po=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,u=c.next;c.next=null,s===null?i=u:s.next=u,s=c;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=c))}if(i!==null){var d=a.baseState;s=0,f=u=c=null,l=i;do{var h=l.lane,m=l.eventTime;if((n&h)===h){f!==null&&(f=f.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=e,g=l;switch(h=t,m=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(m,d,h);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(m,d,h):p,h==null)break e;d=Ut({},d,h);break e;case 2:po=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=a.effects,h===null?a.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=m,c=d):f=f.next=m,s|=h;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;h=l,l=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);if(f===null&&(c=d),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=f,t=a.shared.interleaved,t!==null){a=t;do s|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Zs|=s,e.lanes=s,e.memoizedState=d}}function $N(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(we(191,a));a.call(n)}}}var ph={},ai=Jo(ph),ef=Jo(ph),tf=Jo(ph);function As(e){if(e===ph)throw Error(we(174));return e}function oj(e,t){switch(Tt(tf,t),Tt(ef,e),Tt(ai,ph),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:x0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=x0(t,e)}Ft(ai),Tt(ai,t)}function kc(){Ft(ai),Ft(ef),Ft(tf)}function i2(e){As(tf.current);var t=As(ai.current),r=x0(t,e.type);t!==r&&(Tt(ef,e),Tt(ai,r))}function sj(e){ef.current===e&&(Ft(ai),Ft(ef))}var Vt=Jo(0);function lm(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 tx=[];function lj(){for(var e=0;e<tx.length;e++)tx[e]._workInProgressVersionPrimary=null;tx.length=0}var _p=Zi.ReactCurrentDispatcher,rx=Zi.ReactCurrentBatchConfig,Xs=0,Wt=null,cr=null,yr=null,cm=!1,Ed=!1,rf=0,jV=0;function $r(){throw Error(we(321))}function cj(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ia(e[r],t[r]))return!1;return!0}function uj(e,t,r,n,a,i){if(Xs=i,Wt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_p.current=e===null||e.memoizedState===null?PV:AV,e=r(n,a),Ed){i=0;do{if(Ed=!1,rf=0,25<=i)throw Error(we(301));
vendor: 6,554 bytes, line 38
38i+=1,yr=cr=null,t.updateQueue=null,_p.current=kV,e=r(n,a)}while(Ed)}if(_p.current=um,t=cr!==null&&cr.next!==null,Xs=0,yr=cr=Wt=null,cm=!1,t)throw Error(we(300));return e}function dj(){var e=rf!==0;return rf=0,e}function qa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yr===null?Wt.memoizedState=yr=e:yr=yr.next=e,yr}function ea(){if(cr===null){var e=Wt.alternate;e=e!==null?e.memoizedState:null}else e=cr.next;var t=yr===null?Wt.memoizedState:yr.next;if(t!==null)yr=t,cr=e;else{if(e===null)throw Error(we(310));cr=e,e={memoizedState:cr.memoizedState,baseState:cr.baseState,baseQueue:cr.baseQueue,queue:cr.queue,next:null},yr===null?Wt.memoizedState=yr=e:yr=yr.next=e}return yr}function nf(e,t){return typeof t=="function"?t(e):t}function nx(e){var t=ea(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;var n=cr,a=n.baseQueue,i=r.pending;if(i!==null){if(a!==null){var s=a.next;a.next=i.next,i.next=s}n.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,n=n.baseState;var l=s=null,c=null,u=i;do{var f=u.lane;if((Xs&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,s=n):c=c.next=d,Wt.lanes|=f,Zs|=f}u=u.next}while(u!==null&&u!==i);c===null?s=n:c.next=l,Ia(n,t.memoizedState)||(ln=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do i=a.lane,Wt.lanes|=i,Zs|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ax(e){var t=ea(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var s=a=a.next;do i=e(i,s.action),s=s.next;while(s!==a);Ia(i,t.memoizedState)||(ln=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function o2(){}function s2(e,t){var r=Wt,n=ea(),a=t(),i=!Ia(n.memoizedState,a);if(i&&(n.memoizedState=a,ln=!0),n=n.queue,fj(u2.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||yr!==null&&yr.memoizedState.tag&1){if(r.flags|=2048,af(9,c2.bind(null,r,n,a,t),void 0,null),xr===null)throw Error(we(349));Xs&30||l2(r,t,a)}return a}function l2(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 c2(e,t,r,n){t.value=r,t.getSnapshot=n,d2(t)&&f2(e)}function u2(e,t,r){return r(function(){d2(t)&&f2(e)})}function d2(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ia(e,r)}catch{return!0}}function f2(e){var t=Vi(e,1);t!==null&&Ma(t,e,1,-1)}function IN(e){var t=qa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:nf,lastRenderedState:e},t.queue=e,e=e.dispatch=NV.bind(null,Wt,e),[t.memoizedState,e]}function af(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 h2(){return ea().memoizedState}function Tp(e,t,r,n){var a=qa();Wt.flags|=e,a.memoizedState=af(1|t,r,void 0,n===void 0?null:n)}function Zg(e,t,r,n){var a=ea();n=n===void 0?null:n;var i=void 0;if(cr!==null){var s=cr.memoizedState;if(i=s.destroy,n!==null&&cj(n,s.deps)){a.memoizedState=af(t,r,i,n);return}}Wt.flags|=e,a.memoizedState=af(1|t,r,i,n)}function DN(e,t){return Tp(8390656,8,e,t)}function fj(e,t){return Zg(2048,8,e,t)}function p2(e,t){return Zg(4,2,e,t)}function m2(e,t){return Zg(4,4,e,t)}function g2(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 v2(e,t,r){return r=r!=null?r.concat([e]):null,Zg(4,4,g2.bind(null,t,e),r)}function hj(){}function y2(e,t){var r=ea();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&cj(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function x2(e,t){var r=ea();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&cj(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function b2(e,t,r){return Xs&21?(Ia(r,t)||(r=NT(),Wt.lanes|=r,Zs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ln=!0),e.memoizedState=r)}function SV(e,t){var r=Pt;Pt=r!==0&&4>r?r:4,e(!0);var n=rx.transition;rx.transition={};try{e(!1),t()}finally{Pt=r,rx.transition=n}}function w2(){return ea().memoizedState}function CV(e,t,r){var n=Fo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},j2(e))S2(t,r);else if(r=n2(e,t,r,n),r!==null){var a=Jr();Ma(r,e,n,a),C2(r,t,n)}}function NV(e,t,r){var n=Fo(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(j2(e))S2(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,r);if(a.hasEagerState=!0,a.eagerState=l,Ia(l,s)){var c=t.interleaved;c===null?(a.next=a,aj(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=n2(e,t,a,n),r!==null&&(a=Jr(),Ma(r,e,n,a),C2(r,t,n))}}function j2(e){var t=e.alternate;return e===Wt||t!==null&&t===Wt}function S2(e,t){Ed=cm=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function C2(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,U1(e,r)}}var um={readContext:Jn,useCallback:$r,useContext:$r,useEffect:$r,useImperativeHandle:$r,useInsertionEffect:$r,useLayoutEffect:$r,useMemo:$r,useReducer:$r,useRef:$r,useState:$r,useDebugValue:$r,useDeferredValue:$r,useTransition:$r,useMutableSource:$r,useSyncExternalStore:$r,useId:$r,unstable_isNewReconciler:!1},PV={readContext:Jn,useCallback:function(e,t){return qa().memoizedState=[e,t===void 0?null:t],e},useContext:Jn,useEffect:DN,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Tp(4194308,4,g2.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Tp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tp(4,2,e,t)},useMemo:function(e,t){var r=qa();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=qa();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=CV.bind(null,Wt,e),[n.memoizedState,e]}
vendor: 6,917 bytes, lines 38-40
38,useRef:function(e){var t=qa();return e={current:e},t.memoizedState=e},useState:IN,useDebugValue:hj,useDeferredValue:function(e){return qa().memoizedState=e},useTransition:function(){var e=IN(!1),t=e[0];return e=SV.bind(null,e[1]),qa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Wt,a=qa();if(Bt){if(r===void 0)throw Error(we(407));r=r()}else{if(r=t(),xr===null)throw Error(we(349));Xs&30||l2(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,DN(u2.bind(null,n,i,e),[e]),n.flags|=2048,af(9,c2.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=qa(),t=xr.identifierPrefix;if(Bt){var r=_i,n=Ei;r=(n&~(1<<32-Ta(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=rf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=jV++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},AV={readContext:Jn,useCallback:y2,useContext:Jn,useEffect:fj,useImperativeHandle:v2,useInsertionEffect:p2,useLayoutEffect:m2,useMemo:x2,useReducer:nx,useRef:h2,useState:function(){return nx(nf)},useDebugValue:hj,useDeferredValue:function(e){var t=ea();return b2(t,cr.memoizedState,e)},useTransition:function(){var e=nx(nf)[0],t=ea().memoizedState;return[e,t]},useMutableSource:o2,useSyncExternalStore:s2,useId:w2,unstable_isNewReconciler:!1},kV={readContext:Jn,useCallback:y2,useContext:Jn,useEffect:fj,useImperativeHandle:v2,useInsertionEffect:p2,useLayoutEffect:m2,useMemo:x2,useReducer:ax,useRef:h2,useState:function(){return ax(nf)},useDebugValue:hj,useDeferredValue:function(e){var t=ea();return cr===null?t.memoizedState=e:b2(t,cr.memoizedState,e)},useTransition:function(){var e=ax(nf)[0],t=ea().memoizedState;return[e,t]},useMutableSource:o2,useSyncExternalStore:s2,useId:w2,unstable_isNewReconciler:!1};function ga(e,t){if(e&&e.defaultProps){t=Ut({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function B0(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ut({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Qg={isMounted:function(e){return(e=e._reactInternals)?fl(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Jr(),a=Fo(e),i=Ii(n,a);i.payload=t,r!=null&&(i.callback=r),t=Io(e,i,a),t!==null&&(Ma(t,e,a,n),Ep(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Jr(),a=Fo(e),i=Ii(n,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Io(e,i,a),t!==null&&(Ma(t,e,a,n),Ep(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Jr(),n=Fo(e),a=Ii(r,n);a.tag=2,t!=null&&(a.callback=t),t=Io(e,a,n),t!==null&&(Ma(t,e,n,r),Ep(t,e,n))}};function FN(e,t,r,n,a,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!Xd(r,n)||!Xd(a,i):!0}function N2(e,t,r){var n=!1,a=Go,i=t.contextType;return typeof i=="object"&&i!==null?i=Jn(i):(a=dn(t)?Ks:Hr.current,n=t.contextTypes,i=(n=n!=null)?Nc(e,a):Go),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qg,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function LN(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&&Qg.enqueueReplaceState(t,t.state,null)}function z0(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},ij(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Jn(i):(i=dn(t)?Ks:Hr.current,a.context=Nc(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(B0(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Qg.enqueueReplaceState(a,a.state,null),sm(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Oc(e,t){try{var r="",n=t;do r+=rz(n),n=n.return;while(n);var a=r}catch(i){a=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:a,digest:null}}function ix(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function V0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var OV=typeof WeakMap=="function"?WeakMap:Map;function P2(e,t,r){r=Ii(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){fm||(fm=!0,Q0=n),V0(e,t)},r}function A2(e,t,r){r=Ii(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){V0(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){V0(e,t),typeof n!="function"&&(Do===null?Do=new Set([this]):Do.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function BN(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new OV;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=WV.bind(null,e,t,r),t.then(e,e))}function zN(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 VN(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,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=Ii(-1,1),t.tag=2,Io(r,t,1))),r.lanes|=1),e)}var EV=Zi.ReactCurrentOwner,ln=!1;function Xr(e,t,r,n){t.child=e===null?r2(t,null,r,n):Ac(t,e.child,r,n)}function WN(e,t,r,n,a){r=r.render;var i=t.ref;return rc(t,a),n=uj(e,t,r,n,i,a),r=dj(),e!==null&&!ln?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Wi(e,t,a)):(Bt&&r&&Q1(t),t.flags|=1,Xr(e,t,n,a),t.child)}function UN(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!wj(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,k2(e,t,i,n,a)):(e=Ip(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:Xd,r(s,n)&&e.ref===t.ref)return Wi(e,t,a)}return t.flags|=1,e=Lo(i,n),e.ref=t.ref,e.return=t,t.child=e}function k2(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(Xd(i,n)&&e.ref===t.ref)if(ln=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(ln=!0);else return t.lanes=e.lanes,Wi(e,t,a)}return W0(e,t,r,n,a)}function O2(e,t,r){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null}
vendor: 5,227 bytes, line 40
40,Tt(Hl,wn),wn|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Tt(Hl,wn),wn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Tt(Hl,wn),wn|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Tt(Hl,wn),wn|=n;return Xr(e,t,a,r),t.child}function E2(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function W0(e,t,r,n,a){var i=dn(r)?Ks:Hr.current;return i=Nc(t,i),rc(t,a),r=uj(e,t,r,n,i,a),n=dj(),e!==null&&!ln?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Wi(e,t,a)):(Bt&&n&&Q1(t),t.flags|=1,Xr(e,t,r,a),t.child)}function GN(e,t,r,n,a){if(dn(r)){var i=!0;rm(t)}else i=!1;if(rc(t,a),t.stateNode===null)Mp(e,t),N2(t,r,n),z0(t,r,n,a),n=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,u=r.contextType;typeof u=="object"&&u!==null?u=Jn(u):(u=dn(r)?Ks:Hr.current,u=Nc(t,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==n||c!==u)&&LN(t,s,n,u),po=!1;var h=t.memoizedState;s.state=h,sm(t,n,s,a),c=t.memoizedState,l!==n||h!==c||un.current||po?(typeof f=="function"&&(B0(t,r,f,n),c=t.memoizedState),(l=po||FN(t,r,l,n,h,c,u))?(d||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=c),s.props=n,s.state=c,s.context=u,n=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,a2(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ga(t.type,l),s.props=u,d=t.pendingProps,h=s.context,c=r.contextType,typeof c=="object"&&c!==null?c=Jn(c):(c=dn(r)?Ks:Hr.current,c=Nc(t,c));var m=r.getDerivedStateFromProps;(f=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||h!==c)&&LN(t,s,n,c),po=!1,h=t.memoizedState,s.state=h,sm(t,n,s,a);var p=t.memoizedState;l!==d||h!==p||un.current||po?(typeof m=="function"&&(B0(t,r,m,n),p=t.memoizedState),(u=po||FN(t,r,u,n,h,p,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,p,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,p,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),s.props=n,s.state=p,s.context=c,n=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return U0(e,t,r,n,i,a)}function U0(e,t,r,n,a,i){E2(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return a&&EN(t,r,!1),Wi(e,t,i);n=t.stateNode,EV.current=t;var l=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=Ac(t,e.child,null,i),t.child=Ac(t,null,l,i)):Xr(e,t,l,i),t.memoizedState=n.state,a&&EN(t,r,!0),t.child}function _2(e){var t=e.stateNode;t.pendingContext?ON(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ON(e,t.context,!1),oj(e,t.containerInfo)}function HN(e,t,r,n,a){return Pc(),ej(a),t.flags|=256,Xr(e,t,r,n),t.child}var G0={dehydrated:null,treeContext:null,retryLane:0};function H0(e){return{baseLanes:e,cachePool:null,transitions:null}}function T2(e,t,r){var n=t.pendingProps,a=Vt.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Tt(Vt,a&1),e===null)return F0(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,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=tv(s,n,0,null),e=zs(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=H0(r),t.memoizedState=G0,e):pj(t,s));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return _V(e,t,s,n,l,a,r);if(i){i=n.fallback,s=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:n.children};return!(s&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Lo(a,c),n.subtreeFlags=a.subtreeFlags&14680064),l!==null?i=Lo(l,i):(i=zs(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?H0(r):{base
vendor: 4,808 bytes, line 40
40Lanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=G0,n}return i=e.child,e=i.sibling,n=Lo(i,{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 pj(e,t){return t=tv({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Yh(e,t,r,n){return n!==null&&ej(n),Ac(t,e.child,null,r),e=pj(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _V(e,t,r,n,a,i,s){if(r)return t.flags&256?(t.flags&=-257,n=ix(Error(we(422))),Yh(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=tv({mode:"visible",children:n.children},a,0,null),i=zs(i,a,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Ac(t,e.child,null,s),t.child.memoizedState=H0(s),t.memoizedState=G0,i);if(!(t.mode&1))return Yh(e,t,s,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(we(419)),n=ix(i,n,void 0),Yh(e,t,s,n)}if(l=(s&e.childLanes)!==0,ln||l){if(n=xr,n!==null){switch(s&-s){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|s)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Vi(e,a),Ma(n,e,a,-1))}return bj(),n=ix(Error(we(421))),Yh(e,t,s,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=UV.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,Pn=$o(a.nextSibling),An=t,Bt=!0,Sa=null,e!==null&&(Vn[Wn++]=Ei,Vn[Wn++]=_i,Vn[Wn++]=Ys,Ei=e.id,_i=e.overflow,Ys=t),t=pj(t,n.children),t.flags|=4096,t)}function qN(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),L0(e.return,t,r)}function ox(e,t,r,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=a)}function M2(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(Xr(e,t,n.children,r),n=Vt.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&&qN(e,r,t);else if(e.tag===19)qN(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(Tt(Vt,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&lm(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),ox(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&lm(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}ox(t,!0,r,null,i);break;case"together":ox(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Zs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(we(153));if(t.child!==null){for(e=t.child,r=Lo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Lo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function TV(e,t,r){switch(t.tag){case 3:_2(t),Pc();break;case 5:i2(t);break;case 1:dn(t.type)&&rm(t);break;case 4:oj(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;Tt(im,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Tt(Vt,Vt.current&1),t.flags|=128,null):r&t.child.childLanes?T2(e,t,r):(Tt(Vt,Vt.current&1),e=Wi(e,t,r),e!==null?e.sibling:null);Tt(Vt,Vt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return M2(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Tt(Vt,Vt.current),n)break;return null;case 22:case 23:return t.lanes=0,O2(e,t,r)}return Wi(e,t,r)}var R2,q0,$2,I2;R2=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}};q0=function(){};$2=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,As(ai.current);var i=null;
vendor: 4,115 bytes, line 40
40switch(r){case"input":a=m0(e,a),n=m0(e,n),i=[];break;case"select":a=Ut({},a,{value:void 0}),n=Ut({},n,{value:void 0}),i=[];break;case"textarea":a=y0(e,a),n=y0(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=em)}b0(r,n);var s;r=null;for(u in a)if(!n.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var l=a[u];for(s in l)l.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Wd.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var c=n[u];if(l=a!=null?a[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(r||(r={}),r[s]=c[s])}else r||(i||(i=[]),i.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Wd.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Rt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};I2=function(e,t,r,n){r!==n&&(t.flags|=4)};function ed(e,t){if(!Bt)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 Ir(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function MV(e,t,r){var n=t.pendingProps;switch(J1(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ir(t),null;case 1:return dn(t.type)&&tm(),Ir(t),null;case 3:return n=t.stateNode,kc(),Ft(un),Ft(Hr),lj(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Sa!==null&&(tb(Sa),Sa=null))),q0(e,t),Ir(t),null;case 5:sj(t);var a=As(tf.current);if(r=t.type,e!==null&&t.stateNode!=null)$2(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(we(166));return Ir(t),null}if(e=As(ai.current),qh(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Za]=t,n[Jd]=i,e=(t.mode&1)!==0,r){case"dialog":Rt("cancel",n),Rt("close",n);break;case"iframe":case"object":case"embed":Rt("load",n);break;case"video":case"audio":for(a=0;a<bd.length;a++)Rt(bd[a],n);break;case"source":Rt("error",n);break;case"img":case"image":case"link":Rt("error",n),Rt("load",n);break;case"details":Rt("toggle",n);break;case"input":rN(n,i),Rt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Rt("invalid",n);break;case"textarea":aN(n,i),Rt("invalid",n)}b0(r,i),a=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&Hh(n.textContent,l,e),a=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Hh(n.textContent,l,e),a=["children",""+l]):Wd.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Rt("scroll",n)}switch(r){case"input":Fh(n),nN(n,i,!0);break;case"textarea":Fh(n),iN(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=em)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uT(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>
40",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[Za]=t,e[Jd]=n,R2(e,t,!1,!1),t.stateNode=e;e:{switch(s=w0(r,n),r){case"dialog":Rt("cancel",e),Rt("close",e),a=n;break;case"iframe":case"object":case"embed":Rt("load",e),a=n;break;case"video":case"audio":for(a=0;a<bd.length;a++)Rt(bd[a],e);a=n;break;case"source":Rt("error",e),a=n;break;case"img":case"image":case"link":Rt("error",e),Rt("load",e),a=n;break;case"details":Rt("toggle",e),a=n;break;case"input":rN(e,n),a=m0(e,n),Rt("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=Ut({},n,{value:void 0}),Rt("invalid",e);break;case"textarea":aN(e,n),a=y0(e,n),Rt("invalid",e);break;default:a=n}b0(r,a),l=a;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?hT(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&dT(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Ud(e,c):typeof c=="number"&&Ud(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Wd.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Rt("scroll",e):c!=null&&F1(e,i,c,s))}switch(r){case"input":Fh(e),nN(e,n,!1);break;case"textarea":Fh(e),iN(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Uo(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Ql(e,!!n.multiple,i,!1):n.defaultValue!=null&&Ql(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=em)}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 Ir(t),null;case 6:if(e&&t.stateNode!=null)I2(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(we(166));if(r=As(tf.current),As(ai.current),qh(t)){if(n=t.stateNode,r=t.memoizedProps,n[Za]=t,(i=n.nodeValue!==r)&&(e=An,e!==null))switch(e.tag){case 3:Hh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hh(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Za]=t,t.stateNode=n}return Ir(t),null;case 13:if(Ft(Vt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Bt&&Pn!==null&&t.mode&1&&!(t.flags&128))e2(),Pc(),t.flags|=98560,i=!1;else if(i=qh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(we(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(we(317));i[Za]=t}else Pc(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ir(t),i=!1}else Sa!==null&&(tb(Sa),Sa=null),i=!0;if(!i)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||Vt.current&1?ur===0&&(ur=3):bj())),t.updateQueue!==null&&(t.flags|=4),Ir(t),null);case 4:return kc(),q0(e,t),e===null&&Zd(t.stateNode.containerInfo),Ir(t),null;case 10:return nj(t.type._context),Ir(t),null;case 17:return dn(t.type)&&tm(),Ir(t),null;case 19:if(Ft(Vt),i=t.memoizedState,i===null)return Ir(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)ed(i,!1);else{if(ur!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=lm(e),s!==null){for(t.flags|=128,ed(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Tt(Vt,Vt.current&1|2),t.child}e=e.sibling}i.tail!==null&&Yt()>Ec&&(t.flags|=128,n=!0,ed(i,!1),t.lanes=4194304)}else{if(!n)if(e=lm(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ed(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Bt)return Ir(t),null}else 2*Yt()-i.renderingStartTime>Ec&&r!==1073741824&&(t.flags|=128,n=!0,ed(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Yt(),t.sibling=null,r=Vt.current,Tt(Vt,n?r&1|2:r&1),t):(Ir(t),null);case 22:case 23:return xj(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?wn&1073741824&&(Ir(t),t.subtreeFlags&6&&(t.flags|=8192)):Ir(t),null;case 24:return null;case 25:return null}throw Error(we(156,t.tag))}function RV(e,t){switch(J1(t),t.tag){case 1:return dn(t.type)&&tm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,035 bytes, line 40
40case 3:return kc(),Ft(un),Ft(Hr),lj(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sj(t),null;case 13:if(Ft(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(we(340));Pc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ft(Vt),null;case 4:return kc(),null;case 10:return nj(t.type._context),null;case 22:case 23:return xj(),null;case 24:return null;default:return null}}var Xh=!1,Wr=!1,$V=typeof WeakSet=="function"?WeakSet:Set,Le=null;function Gl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){qt(e,t,n)}else r.current=null}function K0(e,t,r){try{r()}catch(n){qt(e,t,n)}}var KN=!1;function IV(e,t){if(_0=Zp,e=zT(),Z1(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 a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,l=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var m;d!==r||a!==0&&d.nodeType!==3||(l=s+a),d!==i||n!==0&&d.nodeType!==3||(c=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===r&&++u===a&&(l=s),h===i&&++f===n&&(c=s),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(T0={focusedElem:e,selectionRange:r},Zp=!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 p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,v=p.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ga(t.type,g),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(we(163))}}catch(S){qt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Le=e;break}Le=t.return}return p=KN,KN=!1,p}function _d(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&K0(t,r,i)}a=a.next}while(a!==n)}}function Jg(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 Y0(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 D2(e){var t=e.alternate;t!==null&&(e.alternate=null,D2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Za],delete t[Jd],delete t[$0],delete t[yV],delete t[xV])),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 F2(e){return e.tag===5||e.tag===3||e.tag===4}function YN(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||F2(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 X0(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=em));else if(n!==4&&(e=e.child,e!==null))for(X0(e,t,r),e=e.sibling;e!==null;)X0(e,t,r),e=e.sibling}function Z0(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(Z0(e,t,r),e=e.sibling;e!==null;)Z0(e,t,r),e=e.sibling}var Pr=null,ba=!1;function io(e,t,r){for(r=r.child;r!==null;)L2(e,t,r),r=r.sibling}function L2(e,t,r){if(ni&&typeof ni.onCommitFiberUnmount=="function")try{ni.onCommitFiberUnmount(Gg,r)}catch{}switch(r.tag){case 5:Wr||Gl(r,t);case 6:var n=Pr,a=ba;Pr=null,io(e,t,r),Pr=n,ba=a,Pr!==null&&(ba?(e=Pr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pr.removeChild(r.stateNode));break;case 18:Pr!==null&&(ba?(e=Pr,r=r.stateNode,e.nodeType===8?Jy(e.parentNode,r):e.nodeType===1&&Jy(e,r),Kd(e)):Jy(Pr,r.stateNode));break;case 4:n=Pr,a=ba,Pr=r.stateNode.containerInfo,ba=!0,io(e,t,r),Pr=n,ba=a;break;case 0:case 11:case 14:case 15:if(!Wr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&K0(r,t,s),a=a.next}while(a!==n)}io(e,t,r);break;case 1:if(!Wr&&(Gl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){qt(r,t,l)}io(e,t,r);break;case 21:io(e,t,r);break;case 22:r.mode&1?(Wr=(n=Wr)||r.memoizedState!==null,io(e,t,r),Wr=n):io(e,t,r);break;default:io(e,t,r)}}function XN(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new $V),t.forEach(function(n){var a=GV.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function ua(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Pr=l.stateNode,ba=!1;break e;case 3:Pr=l.stateNode.containerInfo,ba=!0;break e;case 4:Pr=l.stateNode.containerInfo,ba=!0;break e}l=l.return}if(Pr===null)throw Error(we(160));L2(i,s,a),Pr=null,ba=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){qt(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)B2(t,e),t=t.sibling}function B2(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ua(t,e),Ua(e),n&4){try{_d(3,e,e.return),Jg(3,e)}catch(g){qt(e,e.return,g)}try{_d(5,e,e.return)}catch(g){qt(e,e.return,g)}}break;case 1:ua(t,e),Ua(e),n&512&&r!==null&&Gl(r,r.return);break;case 5:if(ua(t,e),Ua(e),n&512&&r!==null&&Gl(r,r.return),e.flags&32){var a=e.stateNode;try{Ud(a,"")}catch(g){qt(e,e.return,g)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&lT(a,i),w0(l,s);var u=w0(l,i);for(s=0;s<c.length;s+=2){var f=c[s],d=c[s+1];f==="style"?hT(a,d):f==="dangerouslySetInnerHTML"?dT(a,d):f==="children"?Ud(a,d):F1(a,f,d,u)}switch(l){case"input":g0(a,i);break;case"textarea":cT(a,i);break;case"select":var h=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Ql(a,!!i.multiple,m,!1):h!==!!i.multiple&&(i.defaultValue!=null?Ql(a,!!i.multiple,i.defaultValue,!0):Ql(a,!!i.multiple,i.multiple?[]:"",!1))}a[Jd]=i}catch(g){qt(e,e.return,g)}}break;case 6:if(ua(t,e),Ua(e),n&4){if(e.stateNode===null)throw Error(we(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(g){qt(e,e.return,g)}}break;case 3:if(ua(t,e),Ua(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Kd(t.containerInfo)}catch(g){qt(e,e.return,g)}break;case 4:ua(t,e),Ua(e);break;case 13:ua(t,e),Ua(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(vj=Yt())),n&4&&XN(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(Wr=(u=Wr)||f,ua(t,e),Wr=u):ua(t,e),Ua(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(Le=e,f=e.child;f!==null;){for(d=Le=f;Le!==null;){switch(h=Le,m=h.child,h.tag){case 0:case 11:case 14:case 15:_d(4,h,h.return);break;case 1:Gl(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){qt(n,r,g)}}break;case 5:Gl(h,h.return);break;case 22:if(h.memoizedState!==null){QN(d);continue}}m!==null?(m.return=h,Le=m):QN(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{a=d.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=d.stateNode,c=d.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=fT("display",s))}catch(g){qt(e,e.return,g)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){qt(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ua(t,e),Ua(e),n&4&&XN(e);break;case 21:break;default:ua(t,e),Ua(e)}}function Ua(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(F2(r)){var n=r;break e}r=r.return}throw Error(we(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(Ud(a,""),n.flags&=-33);var i=YN(e);Z0(e,i,a);break;case 3:case 4:var s=n.stateNode.containerInfo,l=YN(e);X0(e,l,s);break;default:throw Error(we(161))}}catch(c){qt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function DV(e,t,r){Le=e,z2(e)}function z2(e,t,r){for(var n=(e.mode&1)!==0;Le!==null;){var a=Le,i=a.child;if(a.tag===22&&n){var s=a.memoizedState!==null||Xh;if(!s){var l=a.alternate,c=l!==null&&l.memoizedState!==null||Wr;l=Xh;var u=Wr;if(Xh=s,(Wr=c)&&!u)for(Le=a;Le!==null;)s=Le,c=s.child,s.tag===22&&s.memoizedState!==null?JN(a):c!==null?(c.return=s,Le=c):JN(a);for(;i!==null;)Le=i,z2(i),i=i.sibling;Le=a,Xh=l,Wr=u}ZN(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,Le=i):ZN(e)}}function ZN(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:Wr||Jg(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Wr)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:ga(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&$N(t,i,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}$N(t,s,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&Kd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(we(163))}Wr||t.flags&512&&Y0(t)}catch(h){qt(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 QN(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 JN(e){for(;Le!==null;){var t=Le;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Jg(4,t)}catch(c){qt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(c){qt(t,a,c)}}var i=t.return;try{Y0(t)}catch(c){qt(t,i,c)}break;case 5:var s=t.return;try{Y0(t)}catch(c){qt(t,s,c)}}}catch(c){qt(t,t.return,c)}if(t===e){Le=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Le=l;break}Le=t.return}}var FV=Math.ceil,dm=Zi.ReactCurrentDispatcher,mj=Zi.ReactCurrentOwner,Yn=Zi.ReactCurrentBatchConfig,xt=0,xr=null,nr=null,Or=0,wn=0,Hl=Jo(0),ur=0,of=null,Zs=0,ev=0,gj=0,Td=null,sn=null,vj=0,Ec=1/0,Ni=null,fm=!1,Q0=null,Do=null,Zh=!1,Ao=null,hm=0,Md=0,J0=null,Rp=-1,$p=0;function Jr(){return xt&6?Yt():Rp!==-1?Rp:Rp=Yt()}function Fo(e){return e.mode&1?xt&2&&Or!==0?Or&-Or:wV.transition!==null?($p===0&&($p=NT()),$p):(e=Pt,e!==0||(e=window.event,e=e===void 0?16:TT(e.type)),e):1}function Ma(e,t,r,n){if(50<Md)throw Md=0,J0=null,Error(we(185));dh(e,r,n),(!(xt&2)||e!==xr)&&(e===xr&&(!(xt&2)&&(ev|=r),ur===4&&yo(e,Or)),fn(e,n),r===1&&xt===0&&!(t.mode&1)&&(Ec=Yt()+500,Xg&&es()))}function fn(e,t){var r=e.callbackNode;wz(e,t);var n=Xp(e,e===xr?Or:0);if(n===0)r!==null&&lN(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&lN(r),t===1)e.tag===0?bV(eP.bind(null,e)):ZT(eP.bind(null,e)),gV(function(){!(xt&6)&&es()}),r=null;else{switch(PT(n)){case 1:r=W1;break;case 4:r=ST;break;case 16:r=Yp;break;case 536870912:r=CT;break;default:r=Yp}r=Y2(r,V2.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function V2(e,t){if(Rp=-1,$p=0,xt&6)throw Error(we(327));var r=e.callbackNode;if(nc()&&e.callbackNode!==r)return null;var n=Xp(e,e===xr?Or:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=pm(e,n);else{t=n;var a=xt;xt|=2;var i=U2();(xr!==e||Or!==t)&&(Ni=null,Ec=Yt()+500,Bs(e,t));do try{zV();break}catch(l){W2(e,l)}while(!0);rj(),dm.current=i,xt=a,nr!==null?t=0:(xr=null,Or=0,t=ur)}if(t!==0){if(t===2&&(a=P0(e),a!==0&&(n=a,t=eb(e,a))),t===1)throw r=of,Bs(e,0),yo(e,n),fn(e,Yt()),r;if(t===6)yo(e,n);else{if(a=e.current.alternate,!(n&30)&&!LV(a)&&(t=pm(e,n),t===2&&(i=P0(e),i!==0&&(n=i,t=eb(e,i))),t===1))throw r=of,Bs(e,0),yo(e,n),fn(e,Yt()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(we(345));case 2:xs(e,sn,Ni);break;case 3:if(yo(e,n),(n&130023424)===n&&(t=vj+500-Yt(),10<t)){if(Xp(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Jr(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=R0(xs.bind(null,e,sn,Ni),t);break}xs(e,sn,Ni);break;case 4:if(yo(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var s=31-Ta(n);i=1<<s,s=t[s],s>a&&(a=s),n&=~i}if(n=a,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*FV(n/1960))-n,10<n){e.timeoutHandle=R0(xs.bind(null,e,sn,Ni),n);break}xs(e,sn,Ni);break;case 5:xs(e,sn,Ni);break;default:throw Error(we(329))}}}return fn(e,Yt()),e.callbackNode===r?V2.bind(null,e):null}function eb(e,t){var r=Td;return e.current.memoizedState.isDehydrated&&(Bs(e,t).flags|=256),e=pm(e,t),e!==2&&(t=sn,sn=r,t!==null&&tb(t)),e}function tb(e){sn===null?sn=e:sn.push.apply(sn,e)}function LV(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 a=r[n],i=a.getSnapshot;a=a.value;try{if(!Ia(i(),a))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 yo(e,t){for(t&=~gj,t&=~ev,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ta(t),n=1<<r;e[r]=-1,t&=~n}}function eP(e){if(xt&6)throw Error(we(327));nc();var t=Xp(e,0);if(!(t&1))return fn(e,Yt()),null;var r=pm(e,t);if(e.tag!==0&&r===2){var n=P0(e);n!==0&&(t=n,r=eb(e,n))}if(r===1)throw r=of,Bs(e,0),yo(e,t),fn(e,Yt()),r;if(r===6)throw Error(we(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xs(e,sn,Ni),fn(e,Yt()),null}function yj(e,t){var r=xt;xt|=1;try{return e(t)}finally{xt=r,xt===0&&(Ec=Yt()+500,Xg&&es())}}function Qs(e){Ao!==null&&Ao.tag===0&&!(xt&6)&&nc();var t=xt;xt|=1;var r=Yn.transition,n=Pt;try{if(Yn.transition=null,Pt=1,e)return e()}finally{Pt=n,Yn.transition=r,xt=t,!(xt&6)&&es()}}function xj(){wn=Hl.current,Ft(Hl)}function Bs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,mV(r)),nr!==null)for(r=nr.return;r!==null;){var n=r;switch(J1(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&tm();break;case 3:kc(),Ft(un),Ft(Hr),lj();break;case 5:sj(n);break;case 4:kc();break;case 13:Ft(Vt);break;case 19:Ft(Vt);break;case 10:nj(n.type._context);break;case 22:case 23:xj()}r=r.return}if(xr=e,nr=e=Lo(e.current,null),Or=wn=t,ur=0,of=null,gj=ev=Zs=0,sn=Td=null,Ps!==null){for(t=0;t<Ps.length;t++)if(r=Ps[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=a,n.next=s}r.pending=n}Ps=null}return e}function W2(e,t){do{var r=nr;try{if(rj(),_p.current=um,cm){for(var n=Wt.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}cm=!1}if(Xs=0,yr=cr=Wt=null,Ed=!1,rf=0,mj.current=null,r===null||r.return===null){ur=1,of=t,nr=null;break}e:{var i=e,s=r.return,l=r,c=t;if(t=Or,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=zN(s);if(m!==null){m.flags&=-257,VN(m,s,l,i,t),m.mode&1&&BN(i,u,t),t=m,c=u;var p=t.updateQueue;if(p===null){var g=new Set;g.add(c),t.updateQueue=g}else p.add(c);break e}else{if(!(t&1)){BN(i,u,t),bj();break e}c=Error(we(426))}}else if(Bt&&l.mode&1){var v=zN(s);if(v!==null){!(v.flags&65536)&&(v.flags|=256),VN(v,s,l,i,t),ej(Oc(c,l));break e}}i=c=Oc(c,l),ur!==4&&(ur=2),Td===null?Td=[i]:Td.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=P2(i,c,t);RN(i,y);break e;case 1:l=c;var x=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Do===null||!Do.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=A2(i,l,t);RN(i,S);break e}}i=i.return}while(i!==null)}H2(r)}catch(j){t=j,nr===r&&r!==null&&(nr=r=r.return);continue}break}while(!0)}function U2(){var e=dm.current;return dm.current=um,e===null?um:e}function bj(){(ur===0||ur===3||ur===2)&&(ur=4),xr===null||!(Zs&268435455)&&!(ev&268435455)||yo(xr,Or)}function pm(e,t){var r=xt;xt|=2;var n=U2();(xr!==e||Or!==t)&&(Ni=null,Bs(e,t));do try{BV();break}catch(a){W2(e,a)}while(!0);if(rj(),xt=r,dm.current=n,nr!==null)throw Error(we(261));return xr=null,Or=0,ur}function BV(){for(;nr!==null;)G2(nr)}function zV(){for(;nr!==null&&!fz();)G2(nr)}function G2(e){var t=K2(e.alternate,e,wn);e.memoizedProps=e.pendingProps,t===null?H2(e):nr=t,mj.current=null}function H2(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=RV(r,t),r!==null){r.flags&=32767,nr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ur=6,nr=null;return}}else if(r=MV(r,t,wn),r!==null){nr=r;return}if(t=t.sibling,t!==null){nr=t;return}nr=t=e}while(t!==null);ur===0&&(ur=5)}function xs(e,t,r){var n=Pt,a=Yn.transition;try{Yn.transition=null,Pt=1,VV(e,t,r,n)}finally{Yn.transition=a,Pt=n}return null}function VV(e,t,r,n){do nc();while(Ao!==null);if(xt&6)throw Error(we(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(we(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(jz(e,i),e===xr&&(nr=xr=null,Or=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Zh||(Zh=!0,Y2(Yp,function(){return nc(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Yn.transition,Yn.transition=null;var s=Pt;Pt=1;var l=xt;xt|=4,mj.current=null,IV(e,r),B2(r,e),lV(T0),Zp=!!_0,T0=_0=null,e.current=r,DV(r),hz(),xt=l,Pt=s,Yn.transition=i}else e.current=r;if(Zh&&(Zh=!1,Ao=e,hm=a),i=e.pendingLanes,i===0&&(Do=null),gz(r.stateNode),fn(e,Yt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(fm)throw fm=!1,e=Q0,Q0=null,e;return hm&1&&e.tag!==0&&nc(),i=e.pendingLanes,i&1?e===J0?Md++:(Md=0,J0=e):Md=0,es(),null}function nc(){if(Ao!==null){var e=PT(hm),t=Yn.transition,r=Pt;try{if(Yn.transition=null,Pt=16>e?16:e,Ao===null)var n=!1;else{if(e=Ao,Ao=null,hm=0,xt&6)throw Error(we(331));var a=xt;for(xt|=4,Le=e.current;Le!==null;){var i=Le,s=i.child;if(Le.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Le=u;Le!==null;){var f=Le;switch(f.tag){case 0:case 11:case 15:_d(8,f,i)}var d=f.child;if(d!==null)d.return=f,Le=d;else for(;Le!==null;){f=Le;var h=f.sibling,m=f.return;if(D2(f),f===u){Le=null;break}if(h!==null){h.return=m,Le=h;break}Le=m}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}Le=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,Le=s;else e:for(;Le!==null;){if(i=Le,i.flags&2048)switch(i.tag){case 0:case 11:case 15:_d(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,Le=y;break e}Le=i.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(l=Le,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Jg(9,l)}}catch(j){qt(l,l.return,j)}if(l===s){Le=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,Le=S;break e}Le=l.return}}if(xt=a,es(),ni&&typeof ni.onPostCommitFiberRoot=="function")try{ni.onPostCommitFiberRoot(Gg,e)}catch{}n=!0}return n}finally{Pt=r,Yn.transition=t}}return!1}function tP(e,t,r){t=Oc(r,t),t=P2(e,t,1),e=Io(e,t,1),t=Jr(),e!==null&&(dh(e,1,t),fn(e,t))}function qt(e,t,r){if(e.tag===3)tP(e,e,r);else for(;t!==null;){if(t.tag===3){tP(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Do===null||!Do.has(n))){e=Oc(r,e),e=A2(t,e,1),t=Io(t,e,1),e=Jr(),t!==null&&(dh(t,1,e),fn(t,e));break}}t=t.return}}function WV(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Jr(),e.pingedLanes|=e.suspendedLanes&r,xr===e&&(Or&r)===r&&(ur===4||ur===3&&(Or&130023424)===Or&&500>Yt()-vj?Bs(e,0):gj|=r),fn(e,t)}function q2(e,t){t===0&&(e.mode&1?(t=zh,zh<<=1,!(zh&130023424)&&(zh=4194304)):t=1);var r=Jr();e=Vi(e,t),e!==null&&(dh(e,t,r),fn(e,r))}function UV(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),q2(e,r)}function GV(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(we(314))}n!==null&&n.delete(t),q2(e,r)}var K2;K2=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||un.current)ln=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ln=!1,TV(e,t,r);ln=!!(e.flags&131072)}else ln=!1,Bt&&t.flags&1048576&&QT(t,am,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Mp(e,t),e=t.pendingProps;var a=Nc(t,Hr.current);rc(t,r),a=uj(null,t,n,e,a,r);var i=dj();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dn(n)?(i=!0,rm(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ij(t),a.updater=Qg,t.stateNode=a,a._reactInternals=t,z0(t,n,e,r),t=U0(null,t,n,!0,i,r)):(t.tag=0,Bt&&i&&Q1(t),Xr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Mp(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=qV(n),e=ga(n,e),a){case 0:t=W0(null,t,n,e,r);break e;case 1:t=GN(null,t,n,e,r);break e;case 11:t=WN(null,t,n,e,r);break e;case 14:t=UN(null,t,n,ga(n.type,e),r);break e}throw Error(we(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ga(n,a),W0(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ga(n,a),GN(e,t,n,a,r);case 3:e:{if(_2(t),e===null)throw Error(we(387));n=t.pendingProps,i=t.memoizedState,a=i.element,a2(e,t),sm(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Oc(Error(we(423)),t),t=HN(e,t,n,r,a);break e}else if(n!==a){a=Oc(Error(we(424)),t),t=HN(e,t,n,r,a);break e}else for(Pn=$o(t.stateNode.containerInfo.firstChild),An=t,Bt=!0,Sa=null,r=r2(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Pc(),n===a){t=Wi(e,t,r);break e}Xr(e,t,n,r)}t=t.child}return t;case 5:return i2(t),e===null&&F0(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,s=a.children,M0(n,a)?s=null:i!==null&&M0(n,i)&&(t.flags|=32),E2(e,t),Xr(e,t,s,r),t.child;case 6:return e===null&&F0(t),null;case 13:return T2(e,t,r);case 4:return oj(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ac(t,null,n,r):Xr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ga(n,a),WN(e,t,n,a,r);case 7:return Xr(e,t,t.pendingProps,r),t.child;case 8:return Xr(e,t,t.pendingProps.children,r),t.child;case 12:return Xr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,s=a.value,Tt(im,n._currentValue),n._currentValue=s,i!==null)if(Ia(i.value,s)){if(i.children===a.children&&!un.current){t=Wi(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=Ii(-1,r&-r),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),L0(i.return,r,t),l.lanes|=r;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(we(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),L0(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Xr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,rc(t,r),a=Jn(a),n=n(a),t.flags|=1,Xr(e,t,n,r),t.child;case 14:return n=t.type,a=ga(n,t.pendingProps),a=ga(n.type,a),UN(e,t,n,a,r);case 15:return k2(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ga(n,a),Mp(e,t),t.tag=1,dn(n)?(e=!0,rm(t)):e=!1,rc(t,r),N2(t,n,a),z0(t,n,a,r),U0(null,t,n,!0,e,r);case 19:return M2(e,t,r);case 22:return O2(e,t,r)}throw Error(we(156,t.tag))};function Y2(e,t){return jT(e,t)}function HV(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 3,563 bytes, line 40
40ype=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 qn(e,t,r,n){return new HV(e,t,r,n)}function wj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qV(e){if(typeof e=="function")return wj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===B1)return 11;if(e===z1)return 14}return 2}function Lo(e,t){var r=e.alternate;return r===null?(r=qn(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 Ip(e,t,r,n,a,i){var s=2;if(n=e,typeof e=="function")wj(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Il:return zs(r.children,a,i,t);case L1:s=8,a|=8;break;case d0:return e=qn(12,r,t,a|2),e.elementType=d0,e.lanes=i,e;case f0:return e=qn(13,r,t,a),e.elementType=f0,e.lanes=i,e;case h0:return e=qn(19,r,t,a),e.elementType=h0,e.lanes=i,e;case iT:return tv(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nT:s=10;break e;case aT:s=9;break e;case B1:s=11;break e;case z1:s=14;break e;case ho:s=16,n=null;break e}throw Error(we(130,e==null?e:typeof e,""))}return t=qn(s,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function zs(e,t,r,n){return e=qn(7,e,n,t),e.lanes=r,e}function tv(e,t,r,n){return e=qn(22,e,n,t),e.elementType=iT,e.lanes=r,e.stateNode={isHidden:!1},e}function sx(e,t,r){return e=qn(6,e,null,t),e.lanes=r,e}function lx(e,t,r){return t=qn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function KV(e,t,r,n,a){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=Vy(0),this.expirationTimes=Vy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vy(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function jj(e,t,r,n,a,i,s,l,c){return e=new KV(e,t,r,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=qn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ij(i),e}function YV(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$l,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function X2(e){if(!e)return Go;e=e._reactInternals;e:{if(fl(e)!==e||e.tag!==1)throw Error(we(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(we(171))}if(e.tag===1){var r=e.type;if(dn(r))return XT(e,r,t)}return t}function Z2(e,t,r,n,a,i,s,l,c){return e=jj(r,n,!0,e,a,i,s,l,c),e.context=X2(null),r=e.current,n=Jr(),a=Fo(r),i=Ii(n,a),i.callback=t??null,Io(r,
vendor: 6,350 bytes, line 40
40i,a),e.current.lanes=a,dh(e,a,n),fn(e,n),e}function rv(e,t,r,n){var a=t.current,i=Jr(),s=Fo(a);return r=X2(r),t.context===null?t.context=r:t.pendingContext=r,t=Ii(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Io(a,t,s),e!==null&&(Ma(e,a,s,i),Ep(e,a,s)),s}function mm(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 rP(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Sj(e,t){rP(e,t),(e=e.alternate)&&rP(e,t)}function XV(){return null}var Q2=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cj(e){this._internalRoot=e}nv.prototype.render=Cj.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(we(409));rv(e,t,null,null)};nv.prototype.unmount=Cj.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qs(function(){rv(null,e,null,null)}),t[zi]=null}};function nv(e){this._internalRoot=e}nv.prototype.unstable_scheduleHydration=function(e){if(e){var t=OT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<vo.length&&t!==0&&t<vo[r].priority;r++);vo.splice(r,0,e),r===0&&_T(e)}};function Nj(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function av(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function nP(){}function ZV(e,t,r,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var u=mm(s);i.call(u)}}var s=Z2(t,n,e,0,null,!1,!1,"",nP);return e._reactRootContainer=s,e[zi]=s.current,Zd(e.nodeType===8?e.parentNode:e),Qs(),s}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var l=n;n=function(){var u=mm(c);l.call(u)}}var c=jj(e,0,!1,null,null,!1,!1,"",nP);return e._reactRootContainer=c,e[zi]=c.current,Zd(e.nodeType===8?e.parentNode:e),Qs(function(){rv(t,c,r,n)}),c}function iv(e,t,r,n,a){var i=r._reactRootContainer;if(i){var s=i;if(typeof a=="function"){var l=a;a=function(){var c=mm(s);l.call(c)}}rv(t,s,e,a)}else s=ZV(r,t,e,a,n);return mm(s)}AT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=xd(t.pendingLanes);r!==0&&(U1(t,r|1),fn(t,Yt()),!(xt&6)&&(Ec=Yt()+500,es()))}break;case 13:Qs(function(){var n=Vi(e,1);if(n!==null){var a=Jr();Ma(n,e,1,a)}}),Sj(e,1)}};G1=function(e){if(e.tag===13){var t=Vi(e,134217728);if(t!==null){var r=Jr();Ma(t,e,134217728,r)}Sj(e,134217728)}};kT=function(e){if(e.tag===13){var t=Fo(e),r=Vi(e,t);if(r!==null){var n=Jr();Ma(r,e,t,n)}Sj(e,t)}};OT=function(){return Pt};ET=function(e,t){var r=Pt;try{return Pt=e,t()}finally{Pt=r}};S0=function(e,t,r){switch(t){case"input":if(g0(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 a=Yg(n);if(!a)throw Error(we(90));sT(n),g0(n,a)}}}break;case"textarea":cT(e,r);break;case"select":t=r.value,t!=null&&Ql(e,!!r.multiple,t,!1)}};gT=yj;vT=Qs;var QV={usingClientEntryPoint:!1,Events:[hh,Bl,Yg,pT,mT,yj]},td={findFiberByHostInstance:Ns,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},JV={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bT(e),e===null?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||XV,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{Gg=Qh.inject(JV),ni=Qh}catch{}}_n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QV;_n.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nj(t))throw Error(we(200));return YV(e,t,null,r)};_n.createRoot=function(e,t){if(!Nj(e))throw Error(we(299));var r=!1,n="",a=Q2;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=jj(e,1,!1,null,null,r,!1,n,a),e[zi]=t.current,Zd(e.nodeType===8?e.parentNode:e),new Cj(t)};_n.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(we(188)):(e=Object.keys(e).join(","),Error(we(268,e)));return e=bT(t),e=e===null?null:e.stateNode,e};_n.flushSync=function(e){return Qs(e)};_n.hydrate=function(e,t,r){if(!av(t))throw Error(we(200));return iv(null,e,t,!0,r)};_n.hydrateRoot=function(e,t,r){if(!Nj(e))throw Error(we(405));var n=r!=null&&r.hydratedSources||null,a=!1,i="",s=Q2;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Z2(t,null,e,1,r??null,a,!1,i,s),e[zi]=t.current,Zd(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new nv(t)};_n.render=function(e,t,r){if(!av(t))throw Error(we(200));return iv(null,e,t,!1,r)};_n.unmountComponentAtNode=function(e){if(!av(e))throw Error(we(40));return e._reactRootContainer?(Qs(function(){iv(null,null,e,!1,function(){e._reactRootContainer=null,e[zi]=null})}),!0):!1};_n.unstable_batchedUpdates=yj;_n.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!av(r))throw Error(we(200));if(e==null||e._reactInternals===void 0)throw Error(we(38));return iv(e,t,r,!1,n)};_n.version="18.3.1-next-f1338f8080-20240426";function J2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(J2)}catch(e){console.error(e)}}J2(),J_.exports=_n;
40var hl=J_.exports;const eM=vt(hl);var tM,aP=hl;tM=aP.createRoot,aP.hydrateRoot;var e6=typeof Element<"u",t6=typeof Map=="function",r6=typeof Set=="function",n6=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Dp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Dp(e[n],t[n]))return!1;return!0}var i;if(t6&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!Dp(n.value[1],t.get(n.value[0])))return!1;return!0}if(r6&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(n6&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;if(e6&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Dp(e[a[n]],t[a[n]]))return!1;return!0}return e!==e&&t!==t}var a6=function(t,r){try{return Dp(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const i6=vt(a6);var o6=function(e,t,r,n,a,i,s,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,a,i,s,l],f=0;c=new Error(t.replace(/%s/g,function(){return u[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},s6=o6;const iP=vt(s6);var l6=function(t,r,n,a){var i=n?n.call(a,t,r):void 0;if(i!==void 0)return!!i;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var s=Object.keys(t),l=Object.keys(r);if(s.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<s.length;u++){var f=s[u];if(!c(f))return!1;var d=t[f],h=r[f];if(i=n?n.call(a,d,h,f):void 0,i===!1||i===void 0&&d!==h)return!1}return!0};const c6=vt(l6);var rM=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(rM||{}),cx={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},oP=Object.values(rM),ov={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},nM=Object.entries(ov).reduce((e,[t,r])=>(e[r]=t,e),{}),ka="data-rh",ac={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ic=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},u6=e=>{let t=ic(e,"title");const r=ic(e,ac.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=ic(e,ac.DEFAULT_TITLE);return t||n||void 0},d6=e=>ic(e,ac.ON_CHANGE_CLIENT_STATE)||(()=>{}),ux=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),f6=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let i=0;i<a.length;i+=1){const l=a[i].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),h6=e=>console&&typeof console.warn=="function"&&console.warn(e),rd=(e,t,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&h6(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(c=>{let u;const f=Object.keys(c);for(let h=0;h<f.length;h+=1){const m=f[h],p=m.toLowerCase();t.indexOf(p)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(p==="rel"&&c[p].toLowerCase()==="stylesheet")&&(u=p),t.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(u=m)}if(!u||!c[u])return!1;const d=c[u].toLowerCase();return n[u]||(n[u]={}),s[u]||(s[u]={}),n[u][d]?!1:(s[u][d]=!0,!0)}
40).reverse().forEach(c=>a.push(c));const l=Object.keys(s);for(let c=0;c<l.length;c+=1){const u=l[c],f={...n[u],...s[u]};n[u]=f}return a},[]).reverse()},p6=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},m6=e=>({baseTag:f6(["href"],e),bodyAttributes:ux("bodyAttributes",e),defer:ic(e,ac.DEFER),encode:ic(e,ac.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:ux("htmlAttributes",e),linkTags:rd("link",["rel","href"],e),metaTags:rd("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:rd("noscript",["innerHTML"],e),onChangeClientState:d6(e),scriptTags:rd("script",["src","innerHTML"],e),styleTags:rd("style",["cssText"],e),title:u6(e),titleAttributes:ux("titleAttributes",e),prioritizeSeoTags:p6(e,ac.PRIORITIZE_SEO_TAGS)}),aM=e=>Array.isArray(e)?e.join(""):e,g6=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},dx=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(g6(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},sP=(e,t)=>({...e,[t]:void 0}),v6=["noscript","script","style"],rb=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),iM=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),y6=(e,t,r,n)=>{const a=iM(r),i=aM(t);return a?`<${e} ${ka}="true" ${a}>${rb(i,n)}</${e}>`:`<${e} ${ka}="true">${rb(i,n)}</${e}>`},x6=(e,t,r=!0)=>t.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,f)=>{const d=typeof i[f]>"u"?f:`${f}="${rb(i[f],r)}"`;return u?`${u} ${d}`:d},""),l=i.innerHTML||i.cssText||"",c=v6.indexOf(e)===-1;return`${n}<${e} ${ka}="true" ${s}${c?"/>":`>${l}</${e}>`}`},""),oM=(e,t={})=>Object.keys(e).reduce((r,n)=>{const a=ov[n];return r[a||n]=e[n],r},t),b6=(e,t,r)=>{const n={key:t,[ka]:!0},a=oM(r,n);return[_.createElement("title",a,t)]},Fp=(e,t)=>t.map((r,n)=>{const a={key:n,[ka]:!0};return Object.keys(r).forEach(i=>{const l=ov[i]||i;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:c}}else a[l]=r[i]}),_.createElement(e,a)}),Bn=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>b6(e,t.title,t.titleAttributes),toString:()=>y6(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>oM(t),toString:()=>iM(t)};default:return{toComponent:()=>Fp(e,t),toString:()=>x6(e,t,r)}}},w6=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const a=dx(e,cx.meta),i=dx(t,cx.link),s=dx(r,cx.script);return{priorityMethods:{toComponent:()=>[...Fp("meta",a.priority),...Fp("link",i.priority),...Fp("script",s.priority)],toString:()=>`${Bn("meta",a.priority,n)} ${Bn("link",i.priority,n)} ${Bn("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},j6=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:f,metaTags:d,scriptTags:h}=e,m={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:m,linkTags:f,metaTags:d,scriptTags:h}=w6(e)),{priority:m,base:Bn("base",t,n),bodyAttributes:Bn("bodyAttributes",r,n),htmlAttributes:Bn("htmlAttributes",a,n),link:Bn("link",f,n),meta:Bn("meta",d,n),noscript:Bn("noscript",i,n),script:Bn("script",h,n),style:Bn("style",s,n),title:Bn("title",{title:l,titleAttributes:c},n)}},nb=j6,Jh=[],Pj=!!(typeof window<"u"&&window.document&&window.document.createElement),ab=class{constructor(e,t){vi(this,"instances",[]);vi(this,"canUseDOM",Pj);vi(this,"context");vi(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Jh:this.instances,add:e=>{(this.canUseDOM?Jh:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Jh:this.instances).indexOf(e);(this.canUseDOM?Jh:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=nb({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},S6=parseInt(_.version.split(".")[0],10),ib=S6>=19,C6={},sM=_.createContext(C6),Ms,lM=(Ms=class extends w.Component{constructor(r){super(r);vi(this,"helmetData");ib?this.helmetData=null:this.helmetData=new ab(this.props.context||{},Ms.canUseDOM)}render(){return ib?_.createElement(_.Fragment,null,this.props.children):_.createElement(sM.Provider,{value:this.helmetData.value},this.props.children)}},vi(Ms,"canUseDOM",Pj),Ms),Nl=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${ka}]`),a=[].slice.call(n),i=[];let s;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText"){const f=l.cssText;c.appendChild(document.createTextNode(f))}else{const f=u,d=typeof l[f]>"u"?"":l[f];c.setAttribute(u,d)}c.setAttribute(ka,"true"),a.some((u,f)=>(s=f,c.isEqualNode(u)))?a.splice(s,1):i.push(c)}),a.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}
40),i.forEach(l=>r.appendChild(l)),{oldTags:a,newTags:i}},ob=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(ka),a=n?n.split(","):[],i=[...a],s=Object.keys(t);for(const l of s){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),a.indexOf(l)===-1&&a.push(l);const u=i.indexOf(l);u!==-1&&i.splice(u,1)}for(let l=i.length-1;l>=0;l-=1)r.removeAttribute(i[l]);a.length===i.length?r.removeAttribute(ka):r.getAttribute(ka)!==s.join(",")&&r.setAttribute(ka,s.join(","))},N6=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=aM(e)),ob("title",t)},lP=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:f,title:d,titleAttributes:h}=e;ob("body",n),ob("html",a),N6(d,h);const m={baseTag:Nl("base",r),linkTags:Nl("link",i),metaTags:Nl("meta",s),noscriptTags:Nl("noscript",l),scriptTags:Nl("script",u),styleTags:Nl("style",f)},p={},g={};Object.keys(m).forEach(v=>{const{newTags:y,oldTags:x}=m[v];y.length&&(p[v]=y),x.length&&(g[v]=m[v].oldTags)}),t&&t(),c(e,p,g)},nd=null,P6=e=>{nd&&cancelAnimationFrame(nd),e.defer?nd=requestAnimationFrame(()=>{lP(e,()=>{nd=null})}):(lP(e),nd=null)},A6=P6,cP=class extends w.Component{constructor(){super(...arguments);vi(this,"rendered",!1)}shouldComponentUpdate(t){return!c6(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const a=m6(t.get().map(i=>{const{context:s,...l}=i.props;return l}));lM.canUseDOM?A6(a):nb&&(n=nb(a)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Lp=[],uP=e=>{const t={};for(const r of Object.keys(e))t[nM[r]||r]=e[r];return t},fs=e=>{const t={};for(const r of Object.keys(e)){const n=ov[r];t[n||r]=e[r]}return t},dP=(e,t)=>{if(!Pj)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",a=r.getAttribute(n),i=a?a.split(","):[],s=Object.keys(t);for(const l of i)s.includes(l)||r.removeAttribute(l);for(const l of s){const c=t[l];c==null||c===!1?r.removeAttribute(l):c===!0?r.setAttribute(l,""):r.setAttribute(l,String(c))}s.length>0?r.setAttribute(n,s.join(",")):r.removeAttribute(n)},fx=()=>{const e={},t={};for(const r of Lp){const{htmlAttributes:n,bodyAttributes:a}=r.props;n&&Object.assign(e,uP(n)),a&&Object.assign(t,uP(a))}dP("html",e),dP("body",t)},k6=class extends w.Component{componentDidMount(){Lp.push(this),fx()}componentDidUpdate(){fx()}componentWillUnmount(){const e=Lp.indexOf(this);e!==-1&&Lp.splice(e,1),fx()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return _.createElement("title",fs(t),e)}renderBase(){const{base:e}=this.props;return e?_.createElement("base",fs(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>_.createElement("meta",{key:r,...fs(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>_.createElement("link",{key:r,...fs(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...a}=t,i=fs(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),_.createElement("script",{key:r,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...a}=t,i=fs(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),_.createElement("style",{key:r,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...a}=t,i=fs(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),_.createElement("noscript",{key:r,...i})})}render(){return _.createElement(_.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},c0,sv=(c0=class extends w.Component{shouldComponentUpdate(e){return!i6(sP(this.props,"helmetData"),sP(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}
40warnOnInvalidChildren(e,t){return iP(oP.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${oP.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),iP(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return _.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((c,u)=>(c[nM[u]||u]=i[u],c),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,a),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(a,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,s,a);break;default:t=this.mapObjectTypeChildren(n,t,s,a);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof ab)){const a=n;n=new ab(a.context,!0),delete r.helmetData}return ib?_.createElement(k6,{...r}):n?_.createElement(cP,{...r,context:n.value}):_.createElement(sM.Consumer,null,a=>_.createElement(cP,{...r,context:a}))}},vi(c0,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),c0);const O6=1,E6=1e6;let hx=0;function _6(){return hx=(hx+1)%Number.MAX_SAFE_INTEGER,hx.toString()}const px=new Map,fP=e=>{if(px.has(e))return;const t=setTimeout(()=>{px.delete(e),Rd({type:"REMOVE_TOAST",toastId:e})},E6);px.set(e,t)},T6=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,O6)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?fP(r):e.toasts.forEach(n=>{fP(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,000 bytes, line 40
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Bp=[];let zp={toasts:[]};function Rd(e){zp=T6(zp,e),Bp.forEach(t=>{t(zp)})}function M6({...e}){const t=_6(),r=a=>Rd({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Rd({type:"DISMISS_TOAST",toastId:t});return Rd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function cM(){const[e,t]=w.useState(zp);return w.useEffect(()=>(Bp.push(t),()=>{const r=Bp.indexOf(t);r>-1&&Bp.splice(r,1)}),[e]),{...e,toast:M6,dismiss:r=>Rd({type:"DISMISS_TOAST",toastId:r})}}function je(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function hP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lv(...e){return t=>{let r=!1;const n=e.map(a=>{const i=hP(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():hP(e[a],null)}}}}function et(...e){return w.useCallback(lv(...e),e)}function R6(e,t){const r=w.createContext(t),n=i=>{const{children:s,...l}=i,c=w.useMemo(()=>l,Object.values(l));return o.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function a(i){const s=w.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function fr(e,t=[]){let r=[];function n(i,s){const l=w.createContext(s),c=r.length;r=[...r,s];const u=d=>{var y;const{scope:h,children:m,...p}=d,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,v=w.useMemo(()=>p,Object.values(p));return o.jsx(g.Provider,{value:v,children:m})};u.displayName=i+"Provider";function f(d,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[c])||l,p=w.useContext(m);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,f]}const a=()=>{const i=r.map(s=>w.createContext(s));return function(l){const c=(l==null?void 0:l[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[n,$6(a,...t)]}function $6(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const s=n.reduce((l,{useScope:c,scopeName:u})=>{const d=c(i)[`__scope${u}`];return{...l,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Js(e){const t=D6(e),r=w.forwardRef((n,a)=>{const{children:i,...s}=n,l=w.Children.toArray(i),c=l.find(F6);if(c){const u=c.props.children,f=l.map(d=>d===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:d);return o.jsx(t,{...s,ref:a,children:w.isValidElement(u)?w.cloneElement(u,void 0,f):null})}return o.jsx(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var I6=Js("Slot");function D6(e){const t=w.forwardRef((r,n)=>{const{children:a,...i}=r;if(w.isValidElement(a)){const s=B6(a),l=L6(i,a.props);return a.type!==w.Fragment&&(l.ref=n?lv(n,s):s),w.cloneElement(a,l)}return w.Children.count(a)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uM=Symbol("radix.slottable");function dM(e){const t=({children:r})=>o.jsx(o.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=uM,t}function F6(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uM}function L6(e,t){const r={...t};for(const n in t){const a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function B6(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function yu(e){const t=e+"CollectionProvider",[r,n]=fr(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:y}=g,x=_.useRef(null),b=_.useRef(new Map).current;return o.jsx(a,{scope:v,itemMap:b,collectionRef:x,children:y})};s.displayName=t;const l=e+"CollectionSlot",c=Js(l),u=_.forwardRef((g,v)=>{const{scope:y,children:x}=g,b=i(l,y),S=et(v,b.collectionRef);return o.jsx(c,{ref:S,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=Js(f),m=_.forwardRef((g,v)=>{const{scope:y,children:x,...b}=g,S=_.useRef(null),j=et(v,S),C=i(f,y);return _.useEffect(()=>(C.itemMap.set(S,{ref:S,...b}),()=>void C.itemMap.delete(S))),o.jsx(h,{[d]:"",ref:j,children:x})});m.displayName=f;function p(g){const v=i(e+"CollectionConsumer",g);return _.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,N)=>b.indexOf(C.ref.current)-b.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},p,n]}var z6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=z6.reduce((e,t)=>{const r=Js(`Primitive.${t}`),n=w.forwardRef((a,i)=>{const{asChild:s,...l}=a,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Aj(e,t){e&&hl.flushSync(()=>e.dispatchEvent(t))}function hn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function V6(e,t=globalThis==null?void 0:globalThis.document){const r=hn(e);w.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var W6="DismissableLayer",sb="dismissableLayer.update",U6="dismissableLayer.pointerDownOutside",G6="dismissableLayer.focusOutside",pP,fM=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xu=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=w.useContext(fM),[f,d]=w.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=w.useState({}),p=et(t,N=>d(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=f?g.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,j=q6(N=>{const P=N.target,A=[...u.branches].some(O=>O.contains(P));!S||A||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},h),C=K6(N=>{const P=N.target;[...u.branches].some(O=>O.contains(P))||(i==null||i(N),s==null||s(N),N.defaultPrevented||l==null||l())},h);return V6(N=>{x===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},h),w.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(pP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),mP(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=pP)}},[f,h,r,u]),w.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),mP())},[f,u]),w.useEffect(()=>{const N=()=>m({});return document.addEventListener(sb,N),()=>document.removeEventListener(sb,N)},[]),o.jsx($e.div,{...c,ref:p,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:je(e.onFocusCapture,C.onFocusCapture),onBlurCapture:je(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:je(e.onPointerDownCapture,j.onPointerDownCapture)})});xu.displayName=W6;var H6="DismissableLayerBranch",hM=w.forwardRef((e,t)=>{const r=w.useContext(fM),n=w.useRef(null),a=et(t,n);return w.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),o.jsx($e.div,{...e,ref:a})});hM.displayName=H6;function q6(e,t=globalThis==null?void 0:globalThis.document){const r=hn(e),n=w.useRef(!1),a=w.useRef(()=>{});return w.useEffect(()=>{const i=l=>{if(l.target&&!n.current){let c=function(){pM(U6,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function K6(e,t=globalThis==null?void 0:globalThis.document){const r=hn(e),n=w.useRef(!1);return w.useEffect(()=>{const a=i=>{i.target&&!n.current&&pM(G6,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function mP(){const e=new CustomEvent(sb);document.dispatchEvent(e)}function pM(e,t,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Aj(a,i):a.dispatchEvent(i)}var Y6=xu,X6=hM,br=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Z6="Portal",mh=w.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,i]=w.useState(!1);br(()=>i(!0),[]);const s=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?eM.createPortal(o.jsx($e.div,{...n,ref:t}),s):null});mh.displayName=Z6;function Q6(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var pn=e=>{const{present:t,children:r}=e,n=J6(t),a=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),i=et(n.ref,e8(a));return typeof r=="function"||n.isPresent?w.cloneElement(a,{ref:i}):null};pn.displayName="Presence";function J6(e){const[t,r]=w.useState(),n=w.useRef(null),a=w.useRef(e),i=w.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Q6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=ep(n.current);i.current=l==="mounted"?u:"none"},[l]),br(()=>{const u=n.current,f=a.current;if(f!==e){const h=i.current,m=ep(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),br(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=m=>{const g=ep(n.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(i.current=ep(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:w.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ep(e){return(e==null?void 0:e.animationName)||"none"}function e8(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var t8=$1[" useInsertionEffect ".trim().toString()]||br;function wr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,i,s]=r8({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:a;{const f=w.useRef(e!==void 0);w.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,n])}const u=w.useCallback(f=>{var d;if(l){const h=n8(f)?f(e):f;h!==e&&((d=s.current)==null||d.call(s,h))}else i(f)},[l,e,i,s]);return[c,u]}function r8({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),a=w.useRef(r),i=w.useRef(t);return t8(()=>{i.current=t},[t]),w.useEffect(()=>{var s;a.current!==r&&((s=i.current)==null||s.call(i,r),a.current=r)},[r,a]),[r,n,i]}function n8(e){return typeof e=="function"}var mM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a8="VisuallyHidden",cv=w.forwardRef((e,t)=>
40o.jsx($e.span,{...e,ref:t,style:{...mM,...e.style}}));cv.displayName=a8;var i8=cv,kj="ToastProvider",[Oj,o8,s8]=yu("Toast"),[gM,lPe]=fr("Toast",[s8]),[l8,uv]=gM(kj),vM=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:s}=e,[l,c]=w.useState(null),[u,f]=w.useState(0),d=w.useRef(!1),h=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${kj}\`. Expected non-empty \`string\`.`),o.jsx(Oj.Provider,{scope:t,children:o.jsx(l8,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:w.useCallback(()=>f(m=>m+1),[]),onToastRemove:w.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:s})})};vM.displayName=kj;var yM="ToastViewport",c8=["F8"],lb="toast.viewportPause",cb="toast.viewportResume",xM=w.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=c8,label:a="Notifications ({hotkey})",...i}=e,s=uv(yM,r),l=o8(r),c=w.useRef(null),u=w.useRef(null),f=w.useRef(null),d=w.useRef(null),h=et(t,d,s.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s.toastCount>0;w.useEffect(()=>{const v=y=>{var b;n.length!==0&&n.every(S=>y[S]||y.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),w.useEffect(()=>{const v=c.current,y=d.current;if(p&&v&&y){const x=()=>{if(!s.isClosePausedRef.current){const C=new CustomEvent(lb);y.dispatchEvent(C),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){const C=new CustomEvent(cb);y.dispatchEvent(C),s.isClosePausedRef.current=!1}},S=C=>{!v.contains(C.relatedTarget)&&b()},j=()=>{v.contains(document.activeElement)||b()};return v.addEventListener("focusin",x),v.addEventListener("focusout",S),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",j),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",j),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[p,s.isClosePausedRef]);const g=w.useCallback(({tabbingDirection:v})=>{const x=l().map(b=>{const S=b.ref.current,j=[S,...j8(S)];return v==="forwards"?j:j.reverse()});return(v==="forwards"?x.reverse():x).flat()},[l]);return w.useEffect(()=>{const v=d.current;if(v){const y=x=>{var j,C,N;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const P=document.activeElement,A=x.shiftKey;if(x.target===v&&A){(j=u.current)==null||j.focus();return}const k=g({tabbingDirection:A?"backwards":"forwards"}),E=k.findIndex($=>$===P);mx(k.slice(E+1))?x.preventDefault():A?(C=u.current)==null||C.focus():(N=f.current)==null||N.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[l,g]),o.jsxs(X6,{ref:c,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&o.jsx(ub,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});mx(v)}}),o.jsx(Oj.Slot,{scope:r,children:o.jsx($e.ol,{tabIndex:-1,...i,ref:h})}),p&&o.jsx(ub,{ref:f,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});mx(v)}})]})});xM.displayName=yM;var bM="ToastFocusProxy",ub=w.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,i=uv(bM,r);return o.jsx(cv,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const l=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&n()}})});ub.displayName=bM;var gh="Toast",u8="toast.swipeStart",d8="toast.swipeMove",f8="toast.swipeCancel",h8="toast.swipeEnd",wM=w.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:i,...s}=e,[l,c]=wr({prop:n,defaultProp:a??!0,onChange:i,caller:gh});return o.jsx(pn,{present:r||l,children:o.jsx(g8,{open:l,...s,ref:t,onClose:()=>c(!1),onPause:hn(e.onPause),onResume:hn(e.onResume),onSwipeStart:je(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:je(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:je(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:je(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});wM.displayName=gh;var[p8,m8]=gM(gh,{onClose(){}}),g8=w.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:a,open:i,onClose:s,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:m,...p}=e,g=uv(gh,r),[v,y]=w.useState(null),x=et(t,$=>y($)),b=w.useRef(null),S=w.useRef(null),j=a||g.duration,C=w.useRef(0),N=w.useRef(j),P=w.useRef(0),{onToastAdd:A,onToastRemove:O}=g,M=hn(()=>{var T;(v==null?void 0:v.contains(document.activeElement))&&((T=g.viewport)==null||T.focus()),s()}),k=w.useCallback($=>{!$||$===1/0||(window.clearTimeout(P.current),C.current=new Date().getTime(),P.current=window.setTimeout(M,$))},[M]);w.useEffect(()=>{const $=g.viewport;if($){const T=()=>{k(N.current),u==null||u()},R=()=>{const B=new Date().getTime()-C.current;N.current=N.current-B,window.clearTimeout(P.current),c==null||c()};return $.addEventListener(lb,R),$.addEventListener(cb,T),()=>{$.removeEventListener(lb,R),$.removeEventListener(cb,T)}}},[g.viewport,j,c,u,k]),w.useEffect(()=>{i&&!g.isClosePausedRef.current&&k(j)},[i,j,g.isClosePausedRef,k]),w.useEffect(()=>(A(),()=>O()),[A,O]);const E=w.useMemo(()=>v?kM(v):null,[v]);return g.viewport?o.jsxs(o.Fragment,{children:[E&&o.jsx(v8,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:E}),o.jsx(p8,{scope:r,onClose:M,children:hl.createPortal(o.jsx(Oj.ItemSlot,{scope:r,children:o.jsx(Y6,{asChild:!0,onEscapeKeyDown:je(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx($e.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...p,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:je(e.onKeyDown,$=>{$.key==="Escape"&&(l==null||l($.nativeEvent),$.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:je(e.onPointerDown,$=>{$.button===0&&(b.current={x:$.clientX,y:$.clientY})}),onPointerMove:je(e.onPointerMove,$=>{if(!b.current)return;const T=$.clientX-b.current.x,R=$.clientY-b.current.y,B=!!S.current,F=["left","right"].includes(g.swipeDirection),D=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,G=F?D(0,T):0,K=F?0:D(0,R),z=$.pointerType==="touch"?10:2,U={x:G,y:K},ee={originalEvent:$,delta:U};B?(S.current=U,tp(d8,d,ee,{discrete:!1})):gP(U,g.swipeDirection,z)?(S.current=U,tp(u8,f,ee,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(T)>z||Math.abs(R)>z)&&(b.current=null)}),onPointerUp:je(e.onPointerUp,$=>{const T=S.current,R=$.target;if(R.hasPointerCapture($.pointerId)&&R.releasePointerCapture($.pointerId),S.current=null,b.current=null,T){const B=$.currentTarget,F={originalEvent:$,delta:T};gP(T,g.swipeDirection,g.swipeThreshold)?tp(h8,m,F,{discrete:!0}):tp(f8,h,F,{discrete:!0}),B.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),v8=e=>{const{__scopeToast:t,children:r,...n}=e,a=uv(gh,t),[i,s]=w.useState(!1),[l,c]=w.useState(!1);return b8(()=>s(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:o.jsx(mh,{asChild:!0,children:o.jsx(cv,{...n,children:i&&o.jsxs(o.Fragment,{children:[a.label," ",r]})})})},y8="ToastTitle",jM=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx($e.div,{...n,ref:t})});jM.displayName=y8;var x8="ToastDescription",SM=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx($e.div,{...n,ref:t})});SM.displayName=x8;var CM="ToastAction",NM=w.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(AM,{altText:r,asChild:!0,children:o.jsx(Ej,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${CM}\`. Expected non-empty \`string\`.`),null)});NM.displayName=CM;var PM="ToastClose",Ej=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=m8(PM,r);return o.jsx(AM,{asChild:!0,children:o.jsx($e.button,{type:"button",...n,ref:t,onClick:je(e.onClick,a.onClose)})})});Ej.displayName=PM;var AM=w.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return o.jsx($e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function kM(e){const t=[];
vendor: 4,279 bytes, lines 40-65
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),w8(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...kM(n))}}),t}function tp(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Aj(a,i):a.dispatchEvent(i)}var gP=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),i=n>a;return t==="left"||t==="right"?i&&n>r:!i&&a>r};function b8(e=()=>{}){const t=hn(e);br(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function w8(e){return e.nodeType===e.ELEMENT_NODE}function j8(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function mx(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var S8=vM,OM=xM,EM=wM,_M=jM,TM=SM,MM=NM,RM=Ej;function $M(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=$M(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function at(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=$M(e))&&(n&&(n+=" "),n+=t);return n}const vP=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yP=at,bu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return yP(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,s=Object.keys(a).map(u=>{const f=r==null?void 0:r[u],d=i==null?void 0:i[u];if(f===null)return null;const h=vP(f)||vP(d);return a[u][h]}),l=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:h,...m}=f;return Object.entries(m).every(p=>{let[g,v]=p;return Array.isArray(v)?v.includes({...i,...l}[g]):{...i,...l}[g]===v})?[...u,d,h]:u},[]);return yP(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const C8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),IM=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var N8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const P8=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...l},c)=>w.createElement("svg",{ref:c,...N8,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:IM("lucide",a),...l},[...s.map(([u,f])=>w.createElement(u,f)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Ke=(e,t)=>{const r=w.forwardRef(({className:n,...a},i)=>w.createElement(P8,{ref:i,iconNode:t,className:IM(`lucide-${C8(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const A8=Ke("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
65-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const xP=Ke("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const dv=Ke("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const ko=Ke("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const fv=Ke("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const DM=Ke("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const hv=Ke("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const _c=Ke("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const k8=Ke("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const FM=Ke("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const _j=Ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const vh=Ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const O8=Ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const LM=Ke("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const bP=Ke("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const Be=Ke("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const BM=Ke("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const gm=Ke("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Si=Ke("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const E8=Ke("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const _8=Ke("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Un=Ke("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const db=Ke("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const T8=Ke("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const fb=Ke("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const zM=Ke("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const Tj=Ke("FileSpreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const sf=Ke("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const VM=Ke("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const M8=Ke("GitCompareArrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const Tc=Ke("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const R8=Ke("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const $8=Ke("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const wP=Ke("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const WM=Ke("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const ql=Ke("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const UM=Ke("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const I8=Ke("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const D8=Ke("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const Ss=Ke("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const F8=Ke("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const L8=Ke("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const Mj=Ke("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const vm=Ke("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const pv=Ke("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const B8=Ke("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const Oa=Ke("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 7,966 bytes, lines 295-335
295],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const z8=Ke("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const ym=Ke("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const wu=Ke("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const GM=Ke("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const HM=Ke("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
321 * @license lucide-react v0.462.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const qM=Ke("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
326 * @license lucide-react v0.462.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const jP=Ke("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
331 * @license lucide-react v0.462.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const Rj=Ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),$j="-",V8=e=>{const t=U8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split($j);return l[0]===""&&l.length!==1&&l.shift(),KM(l,t)||W8(s)},getConflictingClassGroupIds:(s,l)=>{const c=r[s]||[];return l&&n[s]?[...c,...n[s]]:c}}},KM=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?KM(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join($j);return(s=t.validators.find(({validator:l})=>l(i)))==null?void 0:s.classGroupId},SP=/^\[(.+)\]$/,W8=e=>{if(SP.test(e)){const t=SP.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},U8=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return H8(Object.entries(e.classGroups),r).forEach(([i,s])=>{hb(s,n,i,t)}),n},hb=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:CP(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(G8(a)){hb(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,s])=>{hb(s,CP(t,i),r,n)})})},CP=(e,t)=>{let r=e;return t.split($j).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},G8=e=>e.isThemeGetter,H8=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[r,a]}):e,q8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){r.has(i)?r.set(i,s):a(i,s)}}},YM="!",K8=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,s=l=>{const c=[];let u=0,f=0,d;for(let v=0;v<l.length;v++){let y=l[v];if(u===0){if(y===a&&(n||l.slice(v,v+i)===t)){c.push(l.slice(f,v)),f=v+i;continue}if(y==="/"){d=v;continue}}y==="["?u++:y==="]"&&u--}const h=c.length===0?l:l.substring(f),m=h.startsWith(YM),p=m?h.substring(1):h,g=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:g}};return r?l=>r({className:l,parseClassName:s}):s},Y8=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},X8=e=>({cache:q8(e.cacheSize),parseClassName:K8(e),...V8(e)}),Z8=/\s+/,Q8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],s=e.trim().split(Z8);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=r(u);let p=!!m,g=n(p?h.substring(0,m):h);if(!g){if(!p){l=u+(l.length>0?" "+l:l);continue}if(g=n(h),!g){l=u+(l.length>0?" "+l:l);continue}p=!1}const v=Y8(f).join(":"),y=d?v+YM:v,x=y+g;if(i.includes(x))continue;i.push(x);const b=a(g,p);for(let S=0;S<b.length;++S){const j=b[S];i.push(y+j)}l=u+(l.length>0?" "+l:l)}return l};function J8(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=XM(t))&&(n&&(n+=" "),n+=r);return n}const XM=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=XM(e[n]))&&(r&&(r+=" "),r+=t);return r};function eW(e,...t){let r,n,a,i=s;function s(c){const u=t.reduce((f,d)=>d(f),e());return r=X8(u),n=r.cache.get,a=r.cache.set,i=l,l(c)}function l(c){const u=n(c);if(u)return u;const f=Q8(c,r);return a(c,f),f}return function(){return i(J8.apply(null,arguments))}}const Mt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ZM=/^\[(?:([a-z-]+):)?(.+)\]$/i,tW=/^\d+\/\d+$/,rW=new Set(["px","full","screen"]),nW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yi=e=>oc(e)||rW.has(e)||tW.test(e),oo=e=>ju(e,"length",mW),oc=e=>!!e&&!Number.isNaN(Number(e)),gx=e=>ju(e,"number",oc),ad=e=>!!e&&Number.isInteger(Number(e)),lW=e=>e.endsWith("%")&&oc(e.slice(0,-1)),lt=e=>ZM.test(e),so=e=>nW.test(e),cW=new Set(["length","size","percentage"]),uW=e=>ju(e,cW,QM),dW=e=>ju(e,"position",QM),fW=new Set(["image","url"]),hW=e=>ju(e,fW,vW),pW=e=>ju(e,"",gW),id=()=>!0,ju=(e,t,r)=>{const n=ZM.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},mW=e=>aW.test(e)&&!iW.test(e),QM=()=>!1,gW=e=>oW.test(e),vW=e=>sW.test(e),yW=()=>{const e=Mt("colors"),t=Mt("spacing"),r=Mt("blur"),n=Mt("brightness"),a=Mt("borderColor"),i=Mt("borderRadius"),s=Mt("borderSpacing"),l=
vendor: 12,634 bytes, line 335
335Mt("borderWidth"),c=Mt("contrast"),u=Mt("grayscale"),f=Mt("hueRotate"),d=Mt("invert"),h=Mt("gap"),m=Mt("gradientColorStops"),p=Mt("gradientColorStopPositions"),g=Mt("inset"),v=Mt("margin"),y=Mt("opacity"),x=Mt("padding"),b=Mt("saturate"),S=Mt("scale"),j=Mt("sepia"),C=Mt("skew"),N=Mt("space"),P=Mt("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",lt,t],k=()=>[lt,t],E=()=>["",yi,oo],$=()=>["auto",oc,lt],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",lt],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[oc,lt];return{cacheSize:500,separator:":",theme:{colors:[id],spacing:[yi,oo],blur:["none","",so,lt],brightness:K(),borderColor:[e],borderRadius:["none","","full",so,lt],borderSpacing:k(),borderWidth:E(),contrast:K(),grayscale:D(),hueRotate:K(),invert:D(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[lW,oo],inset:M(),margin:M(),opacity:K(),padding:k(),saturate:K(),scale:K(),sepia:D(),skew:K(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",lt]}],container:["container"],columns:[{columns:[so]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),lt]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ad,lt]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",lt]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ad,lt]}],"grid-cols":[{"grid-cols":[id]}],"col-start-end":[{col:["auto",{span:["full",ad,lt]},lt]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[id]}],"row-start-end":[{row:["auto",{span:[ad,lt]},lt]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",lt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",lt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",lt,t]}],"min-w":[{"min-w":[lt,t,"min","max","fit"]}],"max-w":[{"max-w":[lt,t,"none","full","min","max","fit","prose",{screen:[so]},so]}],h:[{h:[lt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[lt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[lt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[lt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",so,oo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gx]}],"font-family":[{font:[id]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",lt]}],"line-clamp":[{"line-clamp":["none",oc,gx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yi,lt]}],"list-image":[{"list-image":["none",lt]}],"list-style-type":[{list:["none","disc","decimal",lt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yi,oo]}],"underline-offset":[{"underline-offset":["auto",yi,lt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",lt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),dW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:R()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[yi,lt]}],"outline-w":[{outline:[yi,oo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[yi,oo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",so,pW]}],"shadow-color":[{shadow:[id]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",so,lt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",lt]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",lt]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",lt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ad,lt]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",lt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",lt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
335],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",lt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yi,oo,gx]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},xW=eW(yW);function Oe(...e){return xW(at(e))}function ne(e,t="GBP",r="normal"){let n=e,a="";r==="thousands"?(n=e/1e3,a="k"):r==="millions"&&(n=e/1e6,a="m");const i=new Intl.NumberFormat("en-GB",{style:"currency",currency:t,minimumFractionDigits:r==="normal"?0:1,maximumFractionDigits:r==="normal"?0:1}).format(n);return r==="normal"?i:`${i}${a}`}const bW=S8,JM=w.forwardRef(({className:e,...t},r)=>o.jsx(OM,{ref:r,className:Oe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));JM.displayName=OM.displayName;const wW=bu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),eR=w.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(EM,{ref:n,className:Oe(wW({variant:t}),e),...r}));eR.displayName=EM.displayName;const jW=w.forwardRef(({className:e,...t},r)=>o.jsx(MM,{ref:r,className:Oe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));jW.displayName=MM.displayName;const tR=w.forwardRef(({className:e,...t},r)=>o.jsx(RM,{ref:r,className:Oe("absolute right-2 top-2 rounded-md p-1 text-foreground
335/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:o.jsx(Rj,{className:"h-4 w-4"})}));tR.displayName=RM.displayName;const rR=w.forwardRef(({className:e,...t},r)=>o.jsx(_M,{ref:r,className:Oe("text-sm font-semibold",e),...t}));rR.displayName=_M.displayName;const nR=w.forwardRef(({className:e,...t},r)=>o.jsx(TM,{ref:r,className:Oe("text-sm opacity-90",e),...t}));nR.displayName=TM.displayName;function SW(){const{toasts:e}=cM();return o.jsxs(bW,{children:[e.map(function({id:t,title:r,description:n,action:a,...i}){return o.jsxs(eR,{...i,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(rR,{children:r}),n&&o.jsx(nR,{children:n})]}),a,o.jsx(tR,{})]},t)}),o.jsx(JM,{})]})}var NP=["light","dark"],CW="(prefers-color-scheme: dark)",NW=w.createContext(void 0),PW={setTheme:e=>{},themes:[]},AW=()=>{var e;return(e=w.useContext(NW))!=null?e:PW};w.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:a,defaultTheme:i,value:s,attrs:l,nonce:c})=>{let u=i==="system",f=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(p=>`'${p}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=a?NP.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(p,g=!1,v=!0)=>{let y=s?s[p]:p,x=g?p+"|| ''":`'${y}'`,b="";return a&&v&&!g&&NP.includes(p)&&(b+=`d.style.colorScheme = '${p}';`),r==="class"?g||y?b+=`c.add(${x})`:b+="null":y&&(b+=`d[s](n,${x})`),b},m=e?`!function(){${f}${h(e)}}()`:n?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${CW}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${d}}catch(t){}}();`;return w.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var kW=e=>{switch(e){case"success":return _W;case"info":return MW;case"warning":return TW;case"error":return RW;default:return null}},OW=Array(12).fill(0),EW=({visible:e,className:t})=>_.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},_.createElement("div",{className:"sonner-spinner"},OW.map((r,n)=>_.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),_W=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),TW=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),MW=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),RW=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$W=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},_.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),_.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),IW=()=>{let[e,t]=_.useState(document.hidden);return _.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},pb=1,DW=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 335
335{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:pb++,i=this.toasts.find(l=>l.id===a),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:r}),{...l,...e,id:a,dismissible:s,title:r}):l):this.addToast({title:r,...n,dismissible:s,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
335this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,i,s=n.then(async c=>{if(i=["resolve",c],_.isValidElement(c))a=!1,this.create({id:r,type:"default",message:c});else if(LW(c)&&!c.ok){a=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:f})}else if(t.success!==void 0){a=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:f})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){a=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:f})}}).finally(()=>{var c;a&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>s.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||pb++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},on=new DW,FW=(e,t)=>{let r=(t==null?void 0:t.id)||pb++;return on.addToast({title:e,...t,id:r}),r},LW=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",BW=FW,zW=()=>on.toasts,VW=()=>on.getActiveToasts(),rt=Object.assign(BW,{success:on.success,info:on.info,warning:on.warning,error:on.error,custom:on.custom,message:on.message,promise:on.promise,dismiss:on.dismiss,loading:on.loading},{getHistory:zW,getToasts:VW});function WW(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}WW(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
335left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
335:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
335--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
336`);function rp(e){return e.label!==void 0}var UW=3,GW="32px",HW="16px",PP=4e3,qW=356,KW=14,YW=20,XW=200;function da(...e){return e.filter(Boolean).join(" ")}function ZW(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var QW=e=>{var t,r,n,a,i,s,l,c,u,f,d;let{invert:h,toast:m,unstyled:p,interacting:g,setHeights:v,visibleToasts:y,heights:x,index:b,toasts:S,expanded:j,removeToast:C,defaultRichColors:N,closeButton:P,style:A,cancelButtonStyle:O,actionButtonStyle:M,className:k="",descriptionClassName:E="",duration:$,position:T,gap:R,loadingIcon:B,expandByDefault:F,classNames:D,icons:G,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:z}=e,[U,ee]=_.useState(null),[Y,W]=_.useState(null),[H,me]=_.useState(!1),[q,ue]=_.useState(!1),[I,L]=_.useState(!1),[Q,le]=_.useState(!1),[V,oe]=_.useState(!1),[ae,ye]=_.useState(0),[X,ge]=_.useState(0),de=_.useRef(m.duration||$||PP),be=_.useRef(null),ie=_.useRef(null),Z=b===0,fe=b+1<=y,xe=m.type,J=m.dismissible!==!1,te=m.className||"",ce=m.descriptionClassName||"",re=_.useMemo(()=>x.findIndex(Ye=>Ye.toastId===m.id)||0,[x,m.id]),Ie=_.useMemo(()=>{var Ye;return(Ye=m.closeButton)!=null?Ye:P},[m.closeButton,P]),Fe=_.useMemo(()=>m.duration||$||PP,[m.duration,$]),he=_.useRef(0),ke=_.useRef(0),We=_.useRef(0),Ae=_.useRef(null),[tt,St]=T.split("-"),Tr=_.useMemo(()=>x.reduce((Ye,yt,Lt)=>Lt>=re?Ye:Ye+yt.height,0),[x,re]),Mr=IW(),Sr=m.invert||h,gn=xe==="loading";ke.current=_.useMemo(()=>re*R+Tr,[re,Tr]),_.useEffect(()=>{de.current=Fe},[Fe]),_.useEffect(()=>{me(!0)},[]),_.useEffect(()=>{let Ye=ie.current;if(Ye){let yt=Ye.getBoundingClientRect().height;return ge(yt),v(Lt=>[{toastId:m.id,height:yt,position:m.position},...Lt]),()=>v(Lt=>Lt.filter(sa=>sa.toastId!==m.id))}},[v,m.id]),_.useLayoutEffect(()=>{if(!H)return;let Ye=ie.current,yt=Ye.style.height;Ye.style.height="auto";let Lt=Ye.getBoundingClientRect().height;Ye.style.height=yt,ge(Lt),v(sa=>sa.find(la=>la.toastId===m.id)?sa.map(la=>la.toastId===m.id?{...la,height:Lt}:la):[{toastId:m.id,height:Lt,position:m.position},...sa])},[H,m.title,m.description,v,m.id]);let Ze=_.useCallback(()=>{ue(!0),ye(ke.current),v(Ye=>Ye.filter(yt=>yt.toastId!==m.id)),setTimeout(()=>{C(m)},XW)},[m,C,v,ke]);_.useEffect(()=>{if(m.promise&&xe==="loading"||m.duration===1/0||m.type==="loading")return;let Ye;return j||g||z&&Mr?(()=>{if(We.current<he.current){let yt=new Date().getTime()-he.current;de.current=de.current-yt}
336We.current=new Date().getTime()})():de.current!==1/0&&(he.current=new Date().getTime(),Ye=setTimeout(()=>{var yt;(yt=m.onAutoClose)==null||yt.call(m,m),Ze()},de.current)),()=>clearTimeout(Ye)},[j,g,m,xe,z,Mr,Ze]),_.useEffect(()=>{m.delete&&Ze()},[Ze,m.delete]);function qr(){var Ye,yt,Lt;return G!=null&&G.loading?_.createElement("div",{className:da(D==null?void 0:D.loader,(Ye=m==null?void 0:m.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":xe==="loading"},G.loading):B?_.createElement("div",{className:da(D==null?void 0:D.loader,(yt=m==null?void 0:m.classNames)==null?void 0:yt.loader,"sonner-loader"),"data-visible":xe==="loading"},B):_.createElement(EW,{className:da(D==null?void 0:D.loader,(Lt=m==null?void 0:m.classNames)==null?void 0:Lt.loader),visible:xe==="loading"})}return _.createElement("li",{tabIndex:0,ref:ie,className:da(k,te,D==null?void 0:D.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[xe],(r=m==null?void 0:m.classNames)==null?void 0:r[xe]),"data-sonner-toast":"","data-rich-colors":(n=m.richColors)!=null?n:N,"data-styled":!(m.jsx||m.unstyled||p),"data-mounted":H,"data-promise":!!m.promise,"data-swiped":V,"data-removed":q,"data-visible":fe,"data-y-position":tt,"data-x-position":St,"data-index":b,"data-front":Z,"data-swiping":I,"data-dismissible":J,"data-type":xe,"data-invert":Sr,"data-swipe-out":Q,"data-swipe-direction":Y,"data-expanded":!!(j||F&&H),style:{"--index":b,"--toasts-before":b,"--z-index":S.length-b,"--offset":`${q?ae:ke.current}px`,"--initial-height":F?"auto":`${X}px`,...A,...m.style},onDragEnd:()=>{L(!1),ee(null),Ae.current=null},onPointerDown:Ye=>{gn||!J||(be.current=new Date,ye(ke.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(L(!0),Ae.current={x:Ye.clientX,y:Ye.clientY}))},onPointerUp:()=>{var Ye,yt,Lt,sa;if(Q||!J)return;Ae.current=null;let la=Number(((Ye=ie.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),no=Number(((yt=ie.current)==null?void 0:yt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ds=new Date().getTime()-((Lt=be.current)==null?void 0:Lt.getTime()),ca=U==="x"?la:no,ao=Math.abs(ca)/ds;if(Math.abs(ca)>=YW||ao>.11){ye(ke.current),(sa=m.onDismiss)==null||sa.call(m,m),W(U==="x"?la>0?"right":"left":no>0?"down":"up"),Ze(),le(!0),oe(!1);return}L(!1),ee(null)},onPointerMove:Ye=>{var yt,Lt,sa,la;if(!Ae.current||!J||((yt=window.getSelection())==null?void 0:yt.toString().length)>0)return;let no=Ye.clientY-Ae.current.y,ds=Ye.clientX-Ae.current.x,ca=(Lt=e.swipeDirections)!=null?Lt:ZW(T);!U&&(Math.abs(ds)>1||Math.abs(no)>1)&&ee(Math.abs(ds)>Math.abs(no)?"x":"y");let ao={x:0,y:0};U==="y"?(ca.includes("top")||ca.includes("bottom"))&&(ca.includes("top")&&no<0||ca.includes("bottom")&&no>0)&&(ao.y=no):U==="x"&&(ca.includes("left")||ca.includes("right"))&&(ca.includes("left")&&ds<0||ca.includes("right")&&ds>0)&&(ao.x=ds),(Math.abs(ao.x)>0||Math.abs(ao.y)>0)&&oe(!0),(sa=ie.current)==null||sa.style.setProperty("--swipe-amount-x",`${ao.x}px`),(la=ie.current)==null||la.style.setProperty("--swipe-amount-y",`${ao.y}px`)}},Ie&&!m.jsx?_.createElement("button",{"aria-label":K,"data-disabled":gn,"data-close-button":!0,onClick:gn||!J?()=>{}:()=>{var Ye;Ze(),(Ye=m.onDismiss)==null||Ye.call(m,m)},className:da(D==null?void 0:D.closeButton,(a=m==null?void 0:m.classNames)==null?void 0:a.closeButton)},(i=G==null?void 0:G.close)!=null?i:$W):null,m.jsx||w.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:_.createElement(_.Fragment,null,xe||m.icon||m.promise?_.createElement("div",{"data-icon":"",className:da(D==null?void 0:D.icon,(s=m==null?void 0:m.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||qr():null,m.type!=="loading"?m.
336icon||(G==null?void 0:G[xe])||kW(xe):null):null,_.createElement("div",{"data-content":"",className:da(D==null?void 0:D.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},_.createElement("div",{"data-title":"",className:da(D==null?void 0:D.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?_.createElement("div",{"data-description":"",className:da(E,ce,D==null?void 0:D.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),w.isValidElement(m.cancel)?m.cancel:m.cancel&&rp(m.cancel)?_.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||O,onClick:Ye=>{var yt,Lt;rp(m.cancel)&&J&&((Lt=(yt=m.cancel).onClick)==null||Lt.call(yt,Ye),Ze())},className:da(D==null?void 0:D.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,w.isValidElement(m.action)?m.action:m.action&&rp(m.action)?_.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||M,onClick:Ye=>{var yt,Lt;rp(m.action)&&((Lt=(yt=m.action).onClick)==null||Lt.call(yt,Ye),!Ye.defaultPrevented&&Ze())},className:da(D==null?void 0:D.actionButton,(d=m==null?void 0:m.classNames)==null?void 0:d.actionButton)},m.action.label):null))};function AP(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function JW(e,t){let r={};return[e,t].forEach((n,a)=>{let i=a===1,s=i?"--mobile-offset":"--offset",l=i?HW:GW;function c(u){["top","right","bottom","left"].forEach(f=>{r[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${s}-${u}`]=l:r[`${s}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var eU=w.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:c,mobileOffset:u,theme:f="light",richColors:d,duration:h,style:m,visibleToasts:p=UW,toastOptions:g,dir:v=AP(),gap:y=KW,loadingIcon:x,icons:b,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:j}=e,[C,N]=_.useState([]),P=_.useMemo(()=>Array.from(new Set([n].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,n]),[A,O]=_.useState([]),[M,k]=_.useState(!1),[E,$]=_.useState(!1),[T,R]=_.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=_.useRef(null),F=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=_.useRef(null),G=_.useRef(!1),K=_.useCallback(z=>{N(U=>{var ee;return(ee=U.find(Y=>Y.id===z.id))!=null&&ee.delete||on.dismiss(z.id),U.filter(({id:Y})=>Y!==z.id)})},[]);return _.useEffect(()=>on.subscribe(z=>{if(z.dismiss){N(U=>U.map(ee=>ee.id===z.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{eM.flushSync(()=>{N(U=>{let ee=U.findIndex(Y=>Y.id===z.id);return ee!==-1?[...U.slice(0,ee),{...U[ee],...z},...U.slice(ee+1)]:[z,...U]})})})}),[]),_.useEffect(()=>{if(f!=="system"){R(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:U})=>{R(U?"dark":"light")})}catch{z.addListener(({matches:ee})=>{try{R(ee?"dark":"light")}catch(Y){console.error(Y)}})}},[f]),_.useEffect(()=>{C.length<=1&&k(!1)},[C]),_.useEffect(()=>{let z=U=>{var ee,Y;a.every(W=>U[W]||U.code===W)&&(k(!0),(ee=B.current)==null||ee.focus()),U.code==="Escape"&&(document.activeElement===B.current||(Y=B.current)!=null&&Y.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[a]),_.useEffect(()=>{if(B.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,G.current=!1)}},[B.current]),_.createElement("section",{ref:t,"aria-label":`${S} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((z,U)=>{var ee;let[Y,W]=z.split("-");return C.length?_.createElement("ol",{key:z,dir:v==="auto"?AP():v,tabIndex:-1,ref:B,className:l,"data-sonner-toaster":!0,"data-theme":T,"data-y-position":Y,"data-lifted":M&&C.length>1&&!i,"data-x-position":W,style:{"--front-toast-height":`${((ee=A[0])==null?void 0:ee.height)||0}px`,"--width":`${qW}px`,"--gap":`${y}px`,...m,...JW(c,u)},onBlur:H=>{G.current&&!H.currentTarget.contains(H.relatedTarget)&&(G.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||G.current||(G.current=!0,D.current=H.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{E||k(!1)},onDragEnd:()=>k(!1),onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},C.filter(H=>!H.position&&U===0||H.position===z).map((H,me)=>{var q,ue;return _.createElement(QW,{key:H.id,icons:b,index:me,toast:H,defaultRichColors:d,duration:(q=g==null?void 0:g.duration)!=null?q:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:p,closeButton:(ue=g==null?void 0:g.closeButton)!=null?ue:s,interacting:E,position:z,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:K,toasts:C.filter(I=>I.position==H.position),heights:A.filter(I=>I.position==H.position),setHeights:O,expandByDefault:i,gap:y,loadingIcon:x,expanded:M,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const tU=({...e})=>{const{theme:t="system"}=AW();return o.jsx(eU,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var rU=$1[" useId ".trim().toString()]||(()=>{}),nU=0;function kn(e){const[t,r]=w.useState(rU());return br(()=>{e||r(n=>n??String(nU++))},[e]),e||(t?`radix-${t}`:"")}const aU=["top","right","bottom","left"],Ho=Math.min,Sn=Math.max,xm=Math.round,np=Math.floor,ii=e=>({x:e,y:e}
vendor: 9,304 bytes, line 336
336),iU={left:"right",right:"left",bottom:"top",top:"bottom"},oU={start:"end",end:"start"};function mb(e,t,r){return Sn(e,Ho(t,r))}function Ui(e,t){return typeof e=="function"?e(t):e}function Gi(e){return e.split("-")[0]}function Su(e){return e.split("-")[1]}function Ij(e){return e==="x"?"y":"x"}function Dj(e){return e==="y"?"height":"width"}const sU=new Set(["top","bottom"]);function Ja(e){return sU.has(Gi(e))?"y":"x"}function Fj(e){return Ij(Ja(e))}function lU(e,t,r){r===void 0&&(r=!1);const n=Su(e),a=Fj(e),i=Dj(a);let s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=bm(s)),[s,bm(s)]}function cU(e){const t=bm(e);return[gb(e),t,gb(t)]}function gb(e){return e.replace(/start|end/g,t=>oU[t])}const kP=["left","right"],OP=["right","left"],uU=["top","bottom"],dU=["bottom","top"];function fU(e,t,r){switch(e){case"top":case"bottom":return r?t?OP:kP:t?kP:OP;case"left":case"right":return t?uU:dU;default:return[]}}function hU(e,t,r,n){const a=Su(e);let i=fU(Gi(e),r==="start",n);return a&&(i=i.map(s=>s+"-"+a),t&&(i=i.concat(i.map(gb)))),i}function bm(e){return e.replace(/left|right|bottom|top/g,t=>iU[t])}function pU(e){return{top:0,right:0,bottom:0,left:0,...e}}function aR(e){return typeof e!="number"?pU(e):{top:e,right:e,bottom:e,left:e}}function wm(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function EP(e,t,r){let{reference:n,floating:a}=e;const i=Ja(t),s=Fj(t),l=Dj(s),c=Gi(t),u=i==="y",f=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,h=n[l]/2-a[l]/2;let m;switch(c){case"top":m={x:f,y:n.y-a.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-a.width,y:d};break;default:m={x:n.x,y:n.y}}switch(Su(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}const mU=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:d}=EP(u,n,c),h=n,m={},p=0;for(let g=0;g<l.length;g++){const{name:v,fn:y}=l[g],{x,y:b,data:S,reset:j}=await y({x:f,y:d,initialPlacement:n,placement:h,strategy:a,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});f=x??f,d=b??d,m={...m,[v]:{...m[v],...S}},j&&p<=50&&(p++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(u=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):j.rects),{x:f,y:d}=EP(u,h,c)),g=-1)}return{x:f,y:d,placement:h,strategy:a,middlewareData:m}};async function lf(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=Ui(t,e),p=aR(m),v=l[h?d==="floating"?"reference":"floating":d],y=wm(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),x=d==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},j=wm(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:b,strategy:c}):x);return{top:(y.top-j.top+p.top)/S.y,bottom:(j.bottom-y.bottom+p.bottom)/S.y,left:(y.left-j.left+p.left)/S.x,right:(j.right-y.right+p.right)/S.x}}const gU=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=Ui(e,t)||{};if(u==null)return{};const d=aR(f),h={x:r,y:n},m=Fj(a),p=Dj(m),g=await s.getDimensions(u),v=m==="y",y=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[m]-h[m]-i.floating[p],j=h[m]-i.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let N=C?C[b]:0;(!N||!await(s.isElement==null?void 0:s.isElement(C)))&&(N=l.floating[b]||i.floating[p]);const P=S/2-j/2,A=N/2-g[p]/2-1,O=Ho(d[y],A),M=Ho(d[x],A),k=O,E=N-g[p]-M,$=N/2-g[p]/2+P,T=mb(k,$,E),R=!c.arrow&&Su(a)!=null&&$!==T&&i.reference[p]/2-($<k?O:M)-g[p]/2<0,B=R?$<k?$-k:$-E:0;return{[m]:h[m]+B,data:{[m]:T,centerOffset:$-T-B,...R&&{alignmentOffset:B}},reset:R}}}),vU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=Ui(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=Gi(a),x=Ja(l),b=Gi(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=h||(b||!g?[bm(l)]:cU(l)),C=p!=="none";!h&&C&&j.push(...hU(l,g,p,S));const N=[l,...j],P=await lf(t,v),A=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&A.push(P[y]),d){const $=lU(a,s,S);A.push(P[$[0]],P[$[1]])}if(O=[...O,{placement:a,overflows:A}],!A.every($=>$<=0)){var M,k;const $=(((M=i.flip)==null?void 0:M.index)||0)+1,T=N[$];if(T&&(!(d==="alignment"?x!==Ja(T):!1)||O.every(F=>F.overflows[0]>0&&Ja(F.placement)===x)))return{data:{index:$,overflows:O},reset:{placement:T}};let R=(k=O.filter(B=>B.overflows[0]<=0).sort((B,F)=>B.overflows[1]-F.overflows[1])[0])==null?void 0:k.placement;if(!R)switch(m){case"bestFit":{var E;const B=(E=O.filter(F=>{if(C){const D=Ja(F.placement);return D===x||D==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(D=>D>0).reduce((D,G)=>D+G,0)]).sort((F,D)=>F[1]-D[1])[0])==null?void 0:E[0];B&&(R=B);break}case"initialPlacement":R=l;break}if(a!==R)return{reset:{placement:R}}}return{}}}};function _P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TP(e){return aU.some(t=>e[t]>=0)}const yU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Ui(e,t);switch(n){case"referenceHidden":{const i=await lf(t,{...a,elementContext:"reference"}),s=_P(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:TP(s)}}}case"escaped":{const i=await lf(t,{...a,altBoundary:!0}),s=_P(i,r.floating);return{data:{escapedOffsets:s,escaped:TP(s)}}}default:return{}}}}},iR=new Set(["left","top"]);async function xU(e,t){const{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),s=Gi(r),l=Su(r),c=Ja(r)==="y",u=iR.has(s)?-1:1,f=i&&c?-1:1,d=Ui(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),c?{x:m*f,y:h*u}:{x:h*u,y:m*f}}const bU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:i,placement:s,middlewareData:l}=t,c=await xU(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:s}}}}},wU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=Ui(e,t),u={x:r,y:n},f=await lf(t,c),d=Ja(Gi(a)),h=Ij(d);let m=u[h],p=u[d];if(i){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+f[v],b=m-f[y];m=mb(x,m,b)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=p+f[v],b=p-f[y];p=mb(x,p,b)}const g=l.fn({...t,[h]:m,[d]:p});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[d]:s}}}}}},jU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Ui(e,t),f={x:r,y:n},d=Ja(a),h=Ij(d);let m=f[h],p=f[d];const g=Ui(l,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=h==="y"?"height":"width",S=i.reference[h]-i.floating[b]+v.mainAxis,j=i.reference[h]+i.reference[b]-v.mainAxis;m<S?m=S:m>j&&(m=j)}if(u){var y,x;const b=h==="y"?"width":"height",S=iR.has(Gi(a)),j=i.reference[d]-i.floating[b]+(S&&((y=s.offset)==null?void 0:y[d])||0)+(S?0:v.crossAxis),C=i.reference[d]+i.reference[b]+(S?0:((x=s.offset)==null?void 0:x[d])||0)-(S?v.crossAxis:0);p<j?p=j:p>C&&(p=C)}return{[h]:m,[d]:p}}}},SU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}=Ui(e,t),f=await lf(t,u),d=Gi(a),h=Su(a),m=Ja(a)==="y",{width:p,height:g}=i.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,v=h==="end"?"top":"bottom");const x=g-f.top-f.bottom,b=p-f.left-f.right,S=Ho(g-f[v],x),j=Ho(p-f[y],b),C=!t.middlewareData.shift;let N=S,P=j;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=x),C&&!h){const O=Sn(f.left,0),M=Sn(f.right,0),k=Sn(f.to
vendor: 4,502 bytes, line 336
336p,0),E=Sn(f.bottom,0);m?P=p-2*(O!==0||M!==0?O+M:Sn(f.left,f.right)):N=g-2*(k!==0||E!==0?k+E:Sn(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:N});const A=await s.getDimensions(l.floating);return p!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function mv(){return typeof window<"u"}function Cu(e){return oR(e)?(e.nodeName||"").toLowerCase():"#document"}function On(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pi(e){var t;return(t=(oR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oR(e){return mv()?e instanceof Node||e instanceof On(e).Node:!1}function Da(e){return mv()?e instanceof Element||e instanceof On(e).Element:!1}function di(e){return mv()?e instanceof HTMLElement||e instanceof On(e).HTMLElement:!1}function MP(e){return!mv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof On(e).ShadowRoot}const CU=new Set(["inline","contents"]);function yh(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Fa(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!CU.has(a)}const NU=new Set(["table","td","th"]);function PU(e){return NU.has(Cu(e))}const AU=[":popover-open",":modal"];function gv(e){return AU.some(t=>{try{return e.matches(t)}catch{return!1}})}const kU=["transform","translate","scale","rotate","perspective"],OU=["transform","translate","scale","rotate","perspective","filter"],EU=["paint","layout","strict","content"];function Lj(e){const t=Bj(),r=Da(e)?Fa(e):e;return kU.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||OU.some(n=>(r.willChange||"").includes(n))||EU.some(n=>(r.contain||"").includes(n))}function _U(e){let t=qo(e);for(;di(t)&&!Mc(t);){if(Lj(t))return t;if(gv(t))return null;t=qo(t)}return null}function Bj(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const TU=new Set(["html","body","#document"]);function Mc(e){return TU.has(Cu(e))}function Fa(e){return On(e).getComputedStyle(e)}function vv(e){return Da(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qo(e){if(Cu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||MP(e)&&e.host||pi(e);return MP(t)?t.host:t}function sR(e){const t=qo(e);return Mc(t)?e.ownerDocument?e.ownerDocument.body:e.body:di(t)&&yh(t)?t:sR(t)}function cf(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=sR(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=On(a);if(i){const l=vb(s);return t.concat(s,s.visualViewport||[],yh(a)?a:[],l&&r?cf(l):[])}return t.concat(a,cf(a,[],r))}function vb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lR(e){const t=Fa(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=di(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=xm(r)!==i||xm(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function zj(e){return Da(e)?e:e.contextElement}function sc(e){const t=zj(e);if(!di(t))return ii(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:i}=lR(t);let s=(i?xm(r.width):r.width)/n,l=(i?xm(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const MU=ii(0);function cR(e){const t=On(e);return!Bj()||!t.visualViewport?MU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RU(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==On(e)?!1:t}function el(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),i=zj(e);let s=ii(1);t&&(n?Da(n)&&(s=sc(n)):s=sc(e));const l=RU(i,r,n)?cR(i):ii(0);let c=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,f=a.width/s.x,d=a.height/s.y;if(i){const h=On(i),m=n&&Da(n)?On(n):n;let p=h,g=vb(p);for(;g&&n&&m!==p;){const v=sc(g),y=g.getBoundingClientRect(),x=Fa(g),b=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=y.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,d*=v.y,c+=b,u+=S,p=On(g),g=vb(p)}}return wm({width:f,height:d,x:c,y:u})}function Vj(e,t){const r=vv(e).scrollLeft;return t?t.left+r:el(pi(e)).left+r}function uR(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:Vj(e,n)),i=n.top+t.scrollTop;return{x:a,y:i}}function $U(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const i=a==="fixed",s=pi(n),l=t?gv(t.floating):!1;if(n===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=ii(1);const f=ii(0),d=di(n);
vendor: 9,373 bytes, line 336
336if((d||!d&&!i)&&((Cu(n)!=="body"||yh(s))&&(c=vv(n)),di(n))){const m=el(n);u=sc(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const h=s&&!d&&!i?uR(s,c,!0):ii(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:r.y*u.y-c.scrollTop*u.y+f.y+h.y}}function IU(e){return Array.from(e.getClientRects())}function DU(e){const t=pi(e),r=vv(e),n=e.ownerDocument.body,a=Sn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Sn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Vj(e);const l=-r.scrollTop;return Fa(n).direction==="rtl"&&(s+=Sn(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}function FU(e,t){const r=On(e),n=pi(e),a=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,l=0,c=0;if(a){i=a.width,s=a.height;const u=Bj();(!u||u&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:i,height:s,x:l,y:c}}const LU=new Set(["absolute","fixed"]);function BU(e,t){const r=el(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=di(e)?sc(e):ii(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,u=n*i.y;return{width:s,height:l,x:c,y:u}}function RP(e,t,r){let n;if(t==="viewport")n=FU(e,r);else if(t==="document")n=DU(pi(e));else if(Da(t))n=BU(t,r);else{const a=cR(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return wm(n)}function dR(e,t){const r=qo(e);return r===t||!Da(r)||Mc(r)?!1:Fa(r).position==="fixed"||dR(r,t)}function zU(e,t){const r=t.get(e);if(r)return r;let n=cf(e,[],!1).filter(l=>Da(l)&&Cu(l)!=="body"),a=null;const i=Fa(e).position==="fixed";let s=i?qo(e):e;for(;Da(s)&&!Mc(s);){const l=Fa(s),c=Lj(s);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&LU.has(a.position)||yh(s)&&!c&&dR(e,s))?n=n.filter(f=>f!==s):a=l,s=qo(s)}return t.set(e,n),n}function VU(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const s=[...r==="clippingAncestors"?gv(t)?[]:zU(t,this._c):[].concat(r),n],l=s[0],c=s.reduce((u,f)=>{const d=RP(t,f,a);return u.top=Sn(d.top,u.top),u.right=Ho(d.right,u.right),u.bottom=Ho(d.bottom,u.bottom),u.left=Sn(d.left,u.left),u},RP(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function WU(e){const{width:t,height:r}=lR(e);return{width:t,height:r}}function UU(e,t,r){const n=di(t),a=pi(t),i=r==="fixed",s=el(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=ii(0);function u(){c.x=Vj(a)}if(n||!n&&!i)if((Cu(t)!=="body"||yh(a))&&(l=vv(t)),n){const m=el(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else a&&u();i&&!n&&a&&u();const f=a&&!n&&!i?uR(a,l):ii(0),d=s.left+l.scrollLeft-c.x-f.x,h=s.top+l.scrollTop-c.y-f.y;return{x:d,y:h,width:s.width,height:s.height}}function vx(e){return Fa(e).position==="static"}function $P(e,t){if(!di(e)||Fa(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return pi(e)===r&&(r=r.ownerDocument.body),r}function fR(e,t){const r=On(e);if(gv(e))return r;if(!di(e)){let a=qo(e);for(;a&&!Mc(a);){if(Da(a)&&!vx(a))return a;a=qo(a)}return r}let n=$P(e,t);for(;n&&PU(n)&&vx(n);)n=$P(n,t);return n&&Mc(n)&&vx(n)&&!Lj(n)?r:n||_U(e)||r}const GU=async function(e){const t=this.getOffsetParent||fR,r=this.getDimensions,n=await r(e.floating);return{reference:UU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function HU(e){return Fa(e).direction==="rtl"}const qU={convertOffsetParentRelativeRectToViewportRelativeRect:$U,getDocumentElement:pi,getClippingRect:VU,getOffsetParent:fR,getElementRects:GU,getClientRects:IU,getDimensions:WU,getScale:sc,isElement:Da,isRTL:HU};function hR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KU(e,t){let r=null,n;const a=pi(e);function i(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:m}=u;if(l||t(),!h||!m)return;const p=np(d),g=np(a.clientWidth-(f+h)),v=np(a.clientHeight-(d+m)),y=np(f),b={rootMargin:-p+"px "+-g+"px "+-v+"px "+-y+"px",threshold:Sn(0,Ho(1,c))||1};let S=!0;function j(C){const N=C[0].intersectionRatio;if(N!==c){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!hR(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(j,{...b,root:a.ownerDocument})}catch{r=new IntersectionObserver(j,b)}r.observe(e)}return s(!0),i}function YU(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=zj(e),f=a||i?[...u?cf(u):[],...cf(t)]:[];f.forEach(y=>{a&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const d=u&&l?KU(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),r()}),u&&!c&&m.observe(u),m.observe(t));let p,g=c?el(e):null;c&&v();function v(){const y=el(e);g&&!hR(g,y)&&r(),g=y,p=requestAnimationFrame(v)}return r(),()=>{var y;f.forEach(x=>{a&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const XU=bU,ZU=wU,QU=vU,JU=SU,e9=yU,IP=gU,t9=jU,r9=(e,t,r)=>{const n=new Map,a={platform:qU,...r},i={...a.platform,_c:n};return mU(e,t,{...a,platform:i})};var n9=typeof document<"u",a9=function(){},Vp=n9?w.useLayoutEffect:a9;function jm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!jm(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!jm(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function pR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function DP(e,t){const r=pR(e);return Math.round(t*r)/r}function yx(e){const t=w.useRef(e);return Vp(()=>{t.current=e}),t}function i9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=w.useState(n);jm(h,n)||m(n);const[p,g]=w.useState(null),[v,y]=w.useState(null),x=w.useCallback(F=>{F!==C.current&&(C.current=F,g(F))},[]),b=w.useCallback(F=>{F!==N.current&&(N.current=F,y(F))},[]),S=i||p,j=s||v,C=w.useRef(null),N=w.useRef(null),P=w.useRef(f),A=c!=null,O=yx(c),M=yx(a),k=yx(u),E=w.useCallback(()=>{if(!C.current||!N.current)return;const F={placement:t,strategy:r,middleware:h};M.current&&(F.platform=M.current),r9(C.current,N.current,F).then(D=>{const G={...D,isPositioned:k.current!==!1};$.current&&!jm(P.current,G)&&(P.current=G,hl.flushSync(()=>{d(G)}))})},[h,t,r,M,k]);Vp(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[u]);const $=w.useRef(!1);Vp(()=>($.current=!0,()=>{$.current=!1}),[]),Vp(()=>{if(S&&(C.current=S),j&&(N.current=j),S&&j){if(O.current)return O.current(S,j,E);E()}},[S,j,E,O,A]);const T=w.useMemo(()=>({reference:C,floating:N,setReference:x,setFloating:b}),[x,b]),R=w.useMemo(()=>({reference:S,floating:j}),[S,j]),B=w.useMemo(()=>{const F={position:r,left:0,top:0};if(!R.floating)return F;const D=DP(R.floating,f.x),G=DP(R.floating,f.y);return l?{...F,transform:"translate("+D+"px, "+G+"px)",...pR(R.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:D,top:G}},[r,l,R.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:E,refs:T,elements:R,floatingStyles:B}),[f,E,T,R,B])}const o9=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?IP({element:n.current,padding:a}).fn(r):{}:n?IP({element:n,padding:a}).fn(r):{}}}},s9=(e,t)=>({...XU(e),options:[e,t]}),l9=(e,t)=>({...ZU(e),options:[e,t]}),c9=(e,t)=>({...t9(e),options:[e,t]}),u9=(e,t)=>({...QU(e),options:[e,t]}),d9=(e,t)=>({...JU(e),options:[e,t]}),f9=(e,t)=>({...e9(e),options:[e,t]}),h9=(e,t)=>({...o9(e),options:[e,t]});var p9="Arrow",mR=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...i}=e;return o.jsx($e.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});mR.displayName=p9;var m9=mR;function xh(e){const[t,r]=w.useState(void 0);return br(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Wj="Popper",[gR,Nu]=fr(Wj),[g9,vR]=gR(Wj),yR=e=>{const{__scopePopper:t,children:r}=e,[n,a]=w.useState(null);return o.jsx(g9,{scope:t,anchor:n,onAnchorChange:a,children:r})};yR.displayName=Wj;var xR="PopperAnchor",bR=w.forwardRef((e,t)=>
vendor: 5,307 bytes, line 336
336{const{__scopePopper:r,virtualRef:n,...a}=e,i=vR(xR,r),s=w.useRef(null),l=et(t,s);return w.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:o.jsx($e.div,{...a,ref:l})});bR.displayName=xR;var Uj="PopperContent",[v9,y9]=gR(Uj),wR=w.forwardRef((e,t)=>{var H,me,q,ue,I,L;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:p,...g}=e,v=vR(Uj,r),[y,x]=w.useState(null),b=et(t,Q=>x(Q)),[S,j]=w.useState(null),C=xh(S),N=(C==null?void 0:C.width)??0,P=(C==null?void 0:C.height)??0,A=n+(i!=="center"?"-"+i:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],k=M.length>0,E={padding:O,boundary:M.filter(b9),altBoundary:k},{refs:$,floatingStyles:T,placement:R,isPositioned:B,middlewareData:F}=i9({strategy:"fixed",placement:A,whileElementsMounted:(...Q)=>YU(...Q,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[s9({mainAxis:a+P,alignmentAxis:s}),c&&l9({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?c9():void 0,...E}),c&&u9({...E}),d9({...E,apply:({elements:Q,rects:le,availableWidth:V,availableHeight:oe})=>{const{width:ae,height:ye}=le.reference,X=Q.floating.style;X.setProperty("--radix-popper-available-width",`${V}px`),X.setProperty("--radix-popper-available-height",`${oe}px`),X.setProperty("--radix-popper-anchor-width",`${ae}px`),X.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),S&&h9({element:S,padding:l}),w9({arrowWidth:N,arrowHeight:P}),h&&f9({strategy:"referenceHidden",...E})]}),[D,G]=CR(R),K=hn(p);br(()=>{B&&(K==null||K())},[B,K]);const z=(H=F.arrow)==null?void 0:H.x,U=(me=F.arrow)==null?void 0:me.y,ee=((q=F.arrow)==null?void 0:q.centerOffset)!==0,[Y,W]=w.useState();return br(()=>{y&&W(window.getComputedStyle(y).zIndex)},[y]),o.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:B?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(ue=F.transformOrigin)==null?void 0:ue.x,(I=F.transformOrigin)==null?void 0:I.y].join(" "),...((L=F.hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(v9,{scope:r,placedSide:D,onArrowChange:j,arrowX:z,arrowY:U,shouldHideArrow:ee,children:o.jsx($e.div,{"data-side":D,"data-align":G,...g,ref:b,style:{...g.style,animation:B?void 0:"none"}})})})});wR.displayName=Uj;var jR="PopperArrow",x9={top:"bottom",right:"left",bottom:"top",left:"right"},SR=w.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,i=y9(jR,n),s=x9[i.placedSide];return o.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:o.jsx(m9,{...a,ref:r,style:{...a.style,display:"block"}})})});SR.displayName=jR;function b9(e){return e!==null}var w9=e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:r,rects:n,middlewareData:a}=t,s=((v=a.arrow)==null?void 0:v.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=CR(r),d={start:"0%",center:"50%",end:"100%"}[f],h=(((y=a.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=a.arrow)==null?void 0:x.y)??0)+c/2;let p="",g="";return u==="bottom"?(p=s?d:`${h}px`,g=`${-c}px`):u==="top"?(p=s?d:`${h}px`,g=`${n.floating.height+c}px`):u==="right"?(p=`${-c}px`,g=s?d:`${m}px`):u==="left"&&(p=`${n.floating.width+c}px`,g=s?d:`${m}px`),{data:{x:p,y:g}}}});function CR(e){const[t,r="center"]=e.split("-");return[t,r]}var Gj=yR,Hj=bR,qj=wR,Kj=SR,[yv,cPe]=fr("Tooltip",[Nu]),xv=Nu(),NR="TooltipProvider",j9=700,yb="tooltip.open",[S9,Yj]=yv(NR),PR=e=>{const{__scopeTooltip:t,delayDuration:r=j9,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,s=w.useRef(!0),l=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsx(S9,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:w.useCallback(u=>{l.current=u},[]),disableHoverableContent:a,children:i})};PR.displayName=NR;var uf="Tooltip",[C9,bv]=yv(uf),AR=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=Yj(uf,e.__scopeTooltip),u=xv(t),[f,d]=w.useState(null),h=kn(),m=w.useRef(0),p=s??c.disableHoverableContent,g=l??c.delayDuration,v=w.useRef(!1),[y,x]=wr({prop:n,defaultProp:a??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(yb))):c.onClose(),i==null||i(N)},caller:uf}),b=w.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=w.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,x(!0)},[x]),j=w.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)}
vendor: 4,210 bytes, line 336
336,[x]),C=w.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,x(!0),m.current=0},g)},[g,x]);return w.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),o.jsx(Gj,{...u,children:o.jsx(C9,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:f,onTriggerChange:d,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayedRef.current?C():S()},[c.isOpenDelayedRef,C,S]),onTriggerLeave:w.useCallback(()=>{p?j():(window.clearTimeout(m.current),m.current=0)},[j,p]),onOpen:S,onClose:j,disableHoverableContent:p,children:r})})};AR.displayName=uf;var xb="TooltipTrigger",kR=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=bv(xb,r),i=Yj(xb,r),s=xv(r),l=w.useRef(null),c=et(t,l,a.onTriggerChange),u=w.useRef(!1),f=w.useRef(!1),d=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),o.jsx(Hj,{asChild:!0,...s,children:o.jsx($e.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:c,onPointerMove:je(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:je(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:je(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:je(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:je(e.onBlur,a.onClose),onClick:je(e.onClick,a.onClose)})})});kR.displayName=xb;var N9="TooltipPortal",[uPe,P9]=yv(N9,{forceMount:void 0}),Rc="TooltipContent",OR=w.forwardRef((e,t)=>{const r=P9(Rc,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,s=bv(Rc,e.__scopeTooltip);return o.jsx(pn,{present:n||s.open,children:s.disableHoverableContent?o.jsx(ER,{side:a,...i,ref:t}):o.jsx(A9,{side:a,...i,ref:t})})}),A9=w.forwardRef((e,t)=>{const r=bv(Rc,e.__scopeTooltip),n=Yj(Rc,e.__scopeTooltip),a=w.useRef(null),i=et(t,a),[s,l]=w.useState(null),{trigger:c,onClose:u}=r,f=a.current,{onPointerInTransitChange:d}=n,h=w.useCallback(()=>{l(null),d(!1)},[d]),m=w.useCallback((p,g)=>{const v=p.currentTarget,y={x:p.clientX,y:p.clientY},x=T9(y,v.getBoundingClientRect()),b=M9(y,x),S=R9(g.getBoundingClientRect()),j=I9([...b,...S]);l(j),d(!0)},[d]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(c&&f){const p=v=>m(v,f),g=v=>m(v,c);return c.addEventListener("pointerleave",p),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",p),f.removeEventListener("pointerleave",g)}}},[c,f,m,h]),w.useEffect(()=>{if(s){const p=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),b=!$9(y,s);x?h():b&&(h(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,f,s,u,h]),o.jsx(ER,{...e,ref:i})}),[k9,O9]=yv(uf,{isInside:!1}),E9=dM("TooltipContent"),ER=w.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=bv(Rc,r),u=xv(r),{onClose:f}=c;return w.useEffect(()=>(document.addEventListener(yb,f),()=>document.removeEventListener(yb,f)),[f]),w.useEffect(()=>{if(c.trigger){const d=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),o.jsx(xu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:o.jsxs(qj,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(E9,{children:n}),o.jsx(k9,{scope:r,isInside:!0,children:o.jsx(i8,{id:c.contentId,role:"tooltip",children:a||n})})]})})});OR.displayName=Rc;var _R="TooltipArrow",_9=w.forwardRef((e,t)=>
336{const{__scopeTooltip:r,...n}=e,a=xv(r);return O9(_R,r).isInside?null:o.jsx(Kj,{...a,...n,ref:t})});_9.displayName=_R;function T9(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function M9(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function R9(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function $9(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const l=t[i],c=t[s],u=l.x,f=l.y,d=c.x,h=c.y;f>n!=h>n&&r<(d-u)*(n-f)/(h-f)+u&&(a=!a)}return a}function I9(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),D9(t)}function D9(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var F9=PR,L9=AR,B9=kR,TR=OR;const nn=F9,_e=L9,Te=B9,Ee=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(TR,{ref:n,sideOffset:t,className:Oe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Ee.displayName=TR.displayName;var wv=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(){}},jv=typeof window>"u"||"Deno"in globalThis;function va(){}function z9(e,t){return typeof e=="function"?e(t):e}function V9(e){return typeof e=="number"&&e>=0&&e!==1/0}function W9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bb(e,t){return typeof e=="function"?e(t):e}function U9(e,t){return typeof e=="function"?e(t):e}function FP(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:s,stale:l}=e;if(s){if(n){if(t.queryHash!==Xj(s,t.options))return!1}else if(!ff(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function LP(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(df(t.options.mutationKey)!==df(i))return!1}else if(!ff(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Xj(e,t){return((t==null?void 0:t.queryKeyHashFn)||df)(e)}function df(e){return JSON.stringify(e,(t,r)=>wb(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function ff(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ff(e[r],t[r])):!1}function MR(e,t){if(e===t)return e;const r=BP(e)&&BP(t);if(r||wb(e)&&wb(t)){const n=r?e:Object.keys(e),a=n.length,i=r?t:Object.keys(t),s=i.length,l=r?[]:{},c=new Set(n);let u=0;for(let f=0;f<s;f++){const d=r?f:i[f];(!r&&c.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,u++):(l[d]=MR(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&u++)}return a===s&&u===a?e:l}return t}function BP(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wb(e){if(!zP(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!zP(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zP(e){return Object.prototype.toString.call(e)==="[object Object]"}function G9(e){return new Promise(t=>{setTimeout(t,e)})}function H9(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?MR(e,t):t}function q9(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function K9(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Zj=Symbol();function RR(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Zj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Rs,wo,gc,R_,Y9=(R_=class extends wv{constructor(){super();bt(this,Rs);bt(this,wo);bt(this,gc);ot(this,gc,t=>{if(!jv&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ve(this,wo)||this.setEventListener(ve(this,gc))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,wo))==null||t.call(this),ot(this,wo,void 0))}setEventListener(t){var r;ot(this,gc,t),(r=ve(this,wo))==null||r.call(this),ot(this,wo,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ve(this,Rs)!==t&&(ot(this,Rs,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 22,690 bytes, line 336
336this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ve(this,Rs)=="boolean"?ve(this,Rs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rs=new WeakMap,wo=new WeakMap,gc=new WeakMap,R_),$R=new Y9,vc,jo,yc,$_,X9=($_=class extends wv{constructor(){super();bt(this,vc,!0);bt(this,jo);bt(this,yc);ot(this,yc,t=>{if(!jv&&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(){ve(this,jo)||this.setEventListener(ve(this,yc))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,jo))==null||t.call(this),ot(this,jo,void 0))}setEventListener(t){var r;ot(this,yc,t),(r=ve(this,jo))==null||r.call(this),ot(this,jo,t(this.setOnline.bind(this)))}setOnline(t){ve(this,vc)!==t&&(ot(this,vc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ve(this,vc)}},vc=new WeakMap,jo=new WeakMap,yc=new WeakMap,$_),Sm=new X9;function Z9(){let e,t;const r=new Promise((a,i)=>{e=a,t=i});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}function Q9(e){return Math.min(1e3*2**e,3e4)}function IR(e){return(e??"online")==="online"?Sm.isOnline():!0}var DR=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xx(e){return e instanceof DR}function FR(e){let t=!1,r=0,n=!1,a;const i=Z9(),s=g=>{var v;n||(h(new DR(g)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>$R.isFocused()&&(e.networkMode==="always"||Sm.isOnline())&&e.canRun(),f=()=>IR(e.networkMode)&&e.canRun(),d=g=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,g),a==null||a(),i.resolve(g))},h=g=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,g),a==null||a(),i.reject(g))},m=()=>new Promise(g=>{var v;a=y=>{(n||u())&&g(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;a=void 0,n||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(n)return;let g;const v=r===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var C;if(n)return;const x=e.retry??(jv?0:3),b=e.retryDelay??Q9,S=typeof b=="function"?b(r,y):b,j=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,y);if(t||!j){h(y);return}r++,(C=e.onFail)==null||C.call(e,r,y),G9(S).then(()=>u()?void 0:m()).then(()=>{t?h(y):p()})})};return{promise:i,cancel:s,continue:()=>(a==null||a(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?p():m().then(p),i)}}var J9=e=>setTimeout(e,0);function eG(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=J9;const i=l=>{t?e.push(l):a(()=>{r(l)})},s=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||s()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Zr=eG(),$s,I_,LR=(I_=class{constructor(){bt(this,$s)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),V9(this.gcTime)&&ot(this,$s,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(jv?1/0:5*60*1e3))}clearGcTimeout(){ve(this,$s)&&(clearTimeout(ve(this,$s)),ot(this,$s,void 0))}},$s=new WeakMap,I_),xc,Is,zn,Ds,Br,lh,Fs,ya,Ci,D_,tG=(D_=class extends LR{constructor(t){super();bt(this,ya);bt(this,xc);bt(this,Is);bt(this,zn);bt(this,Ds);bt(this,Br);bt(this,lh);bt(this,Fs);ot(this,Fs,!1),ot(this,lh,t.defaultOptions),this.setOptions(t.options),this.observers=[],ot(this,Ds,t.client),ot(this,zn,ve(this,Ds).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ot(this,xc,nG(this.options)),this.state=t.state??ve(this,xc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ve(this,Br))==null?void 0:t.promise}setOptions(t){this.options={...ve(this,lh),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,zn).remove(this)}setData(t,r){const n=H9(this.state.data,t,this.options);return Rr(this,ya,Ci).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Rr(this,ya,Ci).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,a;const r=(n=ve(this,Br))==null?void 0:n.promise;return(a=ve(this,Br))==null||a.cancel(t),r?r.then(va).catch(va):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,xc))}isActive(){return this.observers.some(t=>U9(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>bb(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:!W9(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ve(this,Br))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ve(this,Br))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ve(this,zn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ve(this,Br)&&(ve(this,Fs)?ve(this,Br).cancel({revert:!0}):ve(this,Br).cancelRetry()),this.scheduleGc()),ve(this,zn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Rr(this,ya,Ci).call(this,{type:"invalidate"})}fetch(t,r){var u,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ve(this,Br))return ve(this,Br).continueRetry(),ve(this,Br).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ot(this,Fs,!0),n.signal)})},i=()=>{const h=RR(this.options,r),p=(()=>{const g={client:ve(this,Ds),queryKey:this.queryKey,meta:this.meta};return a(g),g})();return ot(this,Fs,!1),this.options.persister?this.options.persister(h,p,this):h(p)},l=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ve(this,Ds),state:this.state,fetchFn:i};return a(h),h})();(u=this.options.behavior)==null||u.onFetch(l,this),ot(this,Is,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Rr(this,ya,Ci).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta});const c=h=>{var m,p,g,v;xx(h)&&h.silent||Rr(this,ya,Ci).call(this,{type:"error",error:h}),xx(h)||((p=(m=ve(this,zn).config).onError)==null||p.call(m,h,this),(v=(g=ve(this,zn).config).onSettled)==null||v.call(g,this.state.data,h,this)),this.scheduleGc()};return ot(this,Br,FR({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var m,p,g,v;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(y){c(y);return}(p=(m=ve(this,zn).config).onSuccess)==null||p.call(m,h,this),(v=(g=ve(this,zn).config).onSettled)==null||v.call(g,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{Rr(this,ya,Ci).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{Rr(this,ya,Ci).call(this,{type:"pause"})},onContinue:()=>{Rr(this,ya,Ci).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),ve(this,Br).start()}},xc=new WeakMap,Is=new WeakMap,zn=new WeakMap,Ds=new WeakMap,Br=new WeakMap,lh=new WeakMap,Fs=new WeakMap,ya=new WeakSet,Ci=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,...rG(n.data,this.options),fetchMeta:t.meta??null};case"success":return ot(this,Is,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 a=t.error;return xx(a)&&a.revert&&ve(this,Is)?{...ve(this,Is),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Zr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ve(this,zn).notify({query:this,type:"updated",action:t})})},D_);function rG(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:IR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nG(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 Ka,F_,aG=(F_=class extends wv{constructor(t={}){super();bt(this,Ka);this.config=t,ot(this,Ka,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??Xj(a,r);let s=this.get(i);return s||(s=new tG({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){ve(this,Ka).has(t.queryHash)||(ve(this,Ka).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ve(this,Ka).get(t.queryHash);r&&(t.destroy(),r===t&&ve(this,Ka).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ve(this,Ka).get(t)}getAll(){return[...ve(this,Ka).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>FP(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>FP(t,n)):r}notify(t){Zr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Zr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ka=new WeakMap,F_),Ya,Kr,Ls,Xa,co,L_,iG=(L_=class extends LR{constructor(t){super();bt(this,Xa);bt(this,Ya);bt(this,Kr);bt(this,Ls);this.mutationId=t.mutationId,ot(this,Kr,t.mutationCache),ot(this,Ya,[]),this.state=t.state||oG(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ve(this,Ya).includes(t)||(ve(this,Ya).push(t),this.clearGcTimeout(),ve(this,Kr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ot(this,Ya,ve(this,Ya).filter(r=>r!==t)),this.scheduleGc(),ve(this,Kr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ve(this,Ya).length||(this.state.status==="pending"?this.scheduleGc():ve(this,Kr).remove(this))}continue(){var t;return((t=ve(this,Ls))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,l,c,u,f,d,h,m,p,g,v,y,x,b,S,j,C,N,P;const r=()=>{Rr(this,Xa,co).call(this,{type:"continue"})};ot(this,Ls,FR({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{Rr(this,Xa,co).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{Rr(this,Xa,co).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,Kr).canRun(this)}));const n=this.state.status==="pending",a=!ve(this,Ls).canStart();try{if(n)r();else{Rr(this,Xa,co).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(i=ve(this,Kr).config).onMutate)==null?void 0:s.call(i,t,this));const O=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));O!==this.state.context&&Rr(this,Xa,co).call(this,{type:"pending",context:O,variables:t,isPaused:a})}const A=await ve(this,Ls).start();return await((f=(u=ve(this,Kr).config).onSuccess)==null?void 0:f.call(u,A,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,A,t,this.state.context)),await((p=(m=ve(this,Kr).config).onSettled)==null?void 0:p.call(m,A,null,this.state.variables,this.state.context,this)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,A,null,t,this.state.context)),Rr(this,Xa,co).call(this,{type:"success",data:A}),A}catch(A){try{throw await((x=(y=ve(this,Kr).config).onError)==null?void 0:x.call(y,A,t,this.state.context,this)),await((S=(b=this.options).onError)==null?void 0:S.call(b,A,t,this.state.context)),await((C=(j=ve(this,Kr).config).onSettled)==null?void 0:C.call(j,void 0,A,this.state.variables,this.state.context,this)),await((P=(N=this.options).onSettled)==null?void 0:P.call(N,void 0,A,t,this.state.context)),A}finally{Rr(this,Xa,co).call(this,{type:"error",error:A})}}finally{ve(this,Kr).runNext(this)}}},Ya=new WeakMap,Kr=new WeakMap,Ls=new WeakMap,Xa=new WeakSet,co=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),Zr.batch(()=>{ve(this,Ya).forEach(n=>{n.onMutationUpdate(t)}),ve(this,Kr).notify({mutation:this,type:"updated",action:t})})},L_);function oG(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ki,xa,ch,B_,sG=(B_=class extends wv{constructor(t={}){super();bt(this,ki);bt(this,xa);bt(this,ch);this.config=t,ot(this,ki,new Set),ot(this,xa,new Map),ot(this,ch,0)}build(t,r,n){const a=new iG({mutationCache:this,mutationId:++Rh(this,ch)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){ve(this,ki).add(t);const r=ap(t);if(typeof r=="string"){const n=ve(this,xa).get(r);n?n.push(t):ve(this,xa).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ve(this,ki).delete(t)){const r=ap(t);if(typeof r=="string"){const n=ve(this,xa).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&ve(this,xa).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ap(t);if(typeof r=="string"){const n=ve(this,xa).get(r),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=ap(t);if(typeof r=="string"){const a=(n=ve(this,xa).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Zr.batch(()=>{ve(this,ki).forEach(t=>{this.notify({type:"removed",mutation:t})}),ve(this,ki).clear(),ve(this,xa).clear()})}getAll(){return Array.from(ve(this,ki))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>LP(r,n))}findAll(t={}){return this.getAll().filter(r=>LP(t,r))}notify(t){Zr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Zr.batch(()=>Promise.all(t.map(r=>r.continue().catch(va))))}},ki=new WeakMap,xa=new WeakMap,ch=new WeakMap,B_);function ap(e){var t;return(t=e.options.scope)==null?void 0:t.id}function VP(e){return{onFetch:(t,r)=>{var f,d,h,m,p;const n=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const v=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=RR(t.options,t.fetchOptions),x=async(b,S,j)=>{if(g)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const N=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return v(M),M})(),P=await y(N),{maxPages:A}=t.options,O=j?K9:q9;return{pages:O(b.pages,P,A),pageParams:O(b.pageParams,S,A)}};if(a&&i.length){const b=a==="backward",S=b?lG:WP,j={pages:i,pageParams:s},C=S(n,j);l=await x(j,C,b)}else{const b=e??i.length;do{const S=c===0?s[0]??n.initialPageParam:WP(n,l);if(c>0&&S==null)break;l=await x(l,S),c++}while(c<b)}return l};t.options.persister?t.fetchFn=()=>{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function WP(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 lG(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 Gt,So,Co,bc,wc,No,jc,Sc,z_,cG=(z_=class{constructor(e={}){bt(this,Gt);bt(this,So);bt(this,Co);bt(this,bc);bt(this,wc);bt(this,No);bt(this,jc);bt(this,Sc);ot(this,Gt,e.queryCache||new aG),ot(this,So,e.mutationCache||new sG),ot(this,Co,e.defaultOptions||{}),ot(this,bc,new Map),ot(this,wc,new Map),ot(this,No,0)}mount(){Rh(this,No)._++,ve(this,No)===1&&(ot(this,jc,$R.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,Gt).onFocus())})),ot(this,Sc,Sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,Gt).onOnline())})))}unmount(){var e,t;Rh(this,No)._--,ve(this,No)===0&&((e=ve(this,jc))==null||e.call(this),ot(this,jc,void 0),(t=ve(this,Sc))==null||t.call(this),ot(this,Sc,void 0))}isFetching(e){return ve(this,Gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ve(this,So).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ve(this,Gt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ve(this,Gt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(bb(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ve(this,Gt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=ve(this,Gt).get(n.queryHash),i=a==null?void 0:a.state.data,s=z9(t,i);if(s!==void 0)return ve(this,Gt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Zr.batch(()=>ve(this,Gt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ve(this,Gt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ve(this,Gt);Zr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ve(this,Gt);return Zr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Zr.batch(()=>ve(this,Gt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(va).catch(va)}invalidateQueries(e,t={}){return Zr.batch(()=>(ve(this,Gt).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=Zr.batch(()=>ve(this,Gt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(va)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(va)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ve(this,Gt).build(this,t);return r.isStaleByTime(bb(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(va).catch(va)}fetchInfiniteQuery(e){return e.behavior=VP(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(va).catch(va)}ensureInfiniteQueryData(e){return e.behavior=VP(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sm.isOnline()?ve(this,So).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,Gt)}getMutationCache(){return ve(this,So)}getDefaultOptions(){return ve(this,Co)}setDefaultOptions(e){ot(this,Co,e)}setQueryDefaults(e,t){ve(this,bc).set(df(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ve(this,bc).values()],r={};return t.forEach(n=>{ff(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ve(this,wc).set(df(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ve(this,wc).values()],r={};return t.forEach(n=>{ff(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ve(this,Co).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Xj(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===Zj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ve(this,Co).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}
vendor: 5,188 bytes, lines 336-345
336clear(){ve(this,Gt).clear(),ve(this,So).clear()}},Gt=new WeakMap,So=new WeakMap,Co=new WeakMap,bc=new WeakMap,wc=new WeakMap,No=new WeakMap,jc=new WeakMap,Sc=new WeakMap,z_),uG=w.createContext(void 0),dG=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(uG.Provider,{value:e,children:t}));/**
337 * @remix-run/router v1.23.0
338 *
339 * Copyright (c) Remix Software Inc.
340 *
341 * This source code is licensed under the MIT license found in the
342 * LICENSE.md file in the root directory of this source tree.
343 *
344 * @license MIT
345 */function hf(){return hf=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},hf.apply(this,arguments)}var Oo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Oo||(Oo={}));const UP="popstate";function fG(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:s,hash:l}=n.location;return jb("",{pathname:i,search:s,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Cm(a)}return pG(t,r,null,e)}function Qt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function BR(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hG(){return Math.random().toString(36).substr(2,8)}function GP(e,t){return{usr:e.state,key:e.key,idx:t}}function jb(e,t,r,n){return r===void 0&&(r=null),hf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pu(t):t,{state:r,key:t&&t.key||n||hG()})}function Cm(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 Pu(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 pG(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.history,l=Oo.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(hf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function d(){l=Oo.Pop;let v=f(),y=v==null?null:v-u;u=v,c&&c({action:l,location:g.location,delta:y})}function h(v,y){l=Oo.Push;let x=jb(g.location,v,y);u=f()+1;let b=GP(x,u),S=g.createHref(x);try{s.pushState(b,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;a.location.assign(S)}i&&c&&c({action:l,location:g.location,delta:1})}function m(v,y){l=Oo.Replace;let x=jb(g.location,v,y);u=f();let b=GP(x,u),S=g.createHref(x);s.replaceState(b,"",S),i&&c&&c({action:l,location:g.location,delta:0})}function p(v){let y=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof v=="string"?v:Cm(v);return x=x.replace(/ $/,"%20"),Qt(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let g={get action(){return l},get location(){return e(a,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(UP,d),c=v,()=>{a.removeEventListener(UP,d),c=null}},createHref(v){return t(a,v)},createURL:p,encodeLocation(v){let y=p(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(v){return s.go(v)}};return g}var HP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(HP||(HP={}));function mG(e,t,r){return r===void 0&&(r="/"),gG(e,t,r,!1)}function gG(e,t,r,n){let a=typeof t=="string"?Pu(t):t,i=Qj(a.pathname||"/",r);if(i==null)return null;let s=zR(e);vG(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let u=kG(i);l=PG(s[c],u,n)}return l}function zR(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(i,s,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(Qt(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=Bo([n,c.relativePath]),f=r.concat(c);i.children&&i.children.length>0&&(Qt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),zR(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:CG(u,i.index),routesMeta:f})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,s);else for(let c of VR(i.path))a(i,s,c)}),t}function VR(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let s=VR(n.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function vG(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:NG(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const yG=/^:[\w-]+$/,xG=3,bG=2,wG=1,jG=10,SG=-2,qP=e=>e==="*";function CG(e,t){let r=e.split("/"),n=r.length;return r.some(qP)&&(n+=SG),t&&(n+=bG),r.filter(a=>
vendor: 9,778 bytes, lines 345-354
345!qP(a)).reduce((a,i)=>a+(yG.test(i)?xG:i===""?wG:jG),n)}function NG(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function PG(e,t,r){let{routesMeta:n}=e,a={},i="/",s=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,f=i==="/"?t:t.slice(i.length)||"/",d=KP({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=KP({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),s.push({params:a,pathname:Bo([i,d.pathname]),pathnameBase:TG(Bo([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=Bo([i,d.pathnameBase]))}return s}function KP(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=AG(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,f,d)=>{let{paramName:h,isOptional:m}=f;if(h==="*"){let g=l[d]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const p=l[d];return m&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function AG(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),BR(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function kG(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return BR(!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 Qj(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 OG(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Pu(e):e;return{pathname:r?r.startsWith("/")?r:EG(r,t):t,search:MG(n),hash:RG(a)}}function EG(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function bx(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 _G(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Jj(e,t){let r=_G(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function eS(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Pu(e):(a=hf({},e),Qt(!a.pathname||!a.pathname.includes("?"),bx("?","pathname","search",a)),Qt(!a.pathname||!a.pathname.includes("#"),bx("#","pathname","hash",a)),Qt(!a.search||!a.search.includes("#"),bx("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,l;if(s==null)l=r;else{let d=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}l=d>=0?t[d]:"/"}let c=OG(a,l),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Bo=e=>e.join("/").replace(/\/\/+/g,"/"),TG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),MG=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,RG=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $G(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const WR=["post","put","patch","delete"];new Set(WR);const IG=["get",...WR];new Set(IG);/**
346 * React Router v6.30.1
347 *
348 * Copyright (c) Remix Software Inc.
349 *
350 * This source code is licensed under the MIT license found in the
351 * LICENSE.md file in the root directory of this source tree.
352 *
353 * @license MIT
354 */function pf(){return pf=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},pf.apply(this,arguments)}const tS=w.createContext(null),DG=w.createContext(null),ts=w.createContext(null),Sv=w.createContext(null),Qi=w.createContext({outlet:null,matches:[],isDataRoute:!1}),UR=w.createContext(null);function FG(e,t){let{relative:r}=t===void 0?{}:t;Au()||Qt(!1);let{basename:n,navigator:a}=w.useContext(ts),{hash:i,pathname:s,search:l}=HR(e,{relative:r}),c=s;return n!=="/"&&(c=s==="/"?n:Bo([n,s])),a.createHref({pathname:c,search:l,hash:i})}function Au(){return w.useContext(Sv)!=null}function pl(){return Au()||Qt(!1),w.useContext(Sv).location}function GR(e){w.useContext(ts).static||w.useLayoutEffect(e)}function rS(){let{isDataRoute:e}=w.useContext(Qi);return e?QG():LG()}function LG(){Au()||Qt(!1);let e=w.useContext(tS),{basename:t,future:r,navigator:n}=w.useContext(ts),{matches:a}=w.useContext(Qi),{pathname:i}=pl(),s=JSON.stringify(Jj(a,r.v7_relativeSplatPath)),l=w.useRef(!1);return GR(()=>{l.current=!0}),w.useCallback(function(u,f){if(f===void 0&&(f={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let d=eS(u,JSON.parse(s),i,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Bo([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,s,i,e])}function BG(){let{matches:e}=w.useContext(Qi),t=e[e.length-1];return t?t.params:{}}function HR(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(ts),{matches:a}=w.useContext(Qi),{pathname:i}=pl(),s=JSON.stringify(Jj(a,n.v7_relativeSplatPath));return w.useMemo(()=>eS(e,JSON.parse(s),i,r==="path"),[e,s,i,r])}function zG(e,t){return VG(e,t)}function VG(e,t,r,n){Au()||Qt(!1);let{navigator:a}=w.useContext(ts),{matches:i}=w.useContext(Qi),s=i[i.length-1],l=s?s.params:{};s&&s.pathname;let c=s?s.pathnameBase:"/";s&&s.route;let u=pl(),f;if(t){var d;let v=typeof t=="string"?Pu(t):t;c==="/"||(d=v.pathname)!=null&&d.startsWith(c)||Qt(!1),f=v}else f=u;let h=f.pathname||"/",m=h;if(c!=="/"){let v=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=mG(e,{pathname:m}),g=qG(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:Bo([c,a.encodeLocation?a.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:Bo([c,a.encodeLocation?a.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r,n);return t&&g?w.createElement(Sv.Provider,{value:{location:pf({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Oo.Pop}},g):g}function WG(){let e=ZG(),t=$G(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={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:a},r):null,null)}const UG=w.createElement(WG,null);class GG 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(Qi.Provider,{value:this.props.routeContext},w.createElement(UR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HG(e){let{routeContext:t,match:r,children:n}=e,a=w.useContext(tS);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(Qi.Provider,{value:t},n)}function qG(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,l=(a=r)==null?void 0:a.errors;if(l!=null){let f=s.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);f>=0||Qt(!1),s=s.slice(0,Math.min(s.length,f+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f<s.length;f++){let d=s[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:h,errors:m}=r,p=d.route.loader&&h[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||p){c=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((f,d,h)=>{let m,p=!1,g=null,v=null;r&&(m=l&&d.route.id?l[d.route.id]:void 0,g=d.route.errorElement||UG,c&&(u<0&&h===0?(p=!0,v=null):u===h&&(p=!0,v=d.route.hydrateFallbackElement||null)));let y=t.concat(s.slice(0,h+1)),x=()=>{let b;return m?b=g:p?b=v:d.route.Component?b=w.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=f,w.createElement(HG,{match:d,routeC
354ontext:{outlet:f,matches:y,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?w.createElement(GG,{location:r.location,revalidation:r.revalidation,component:g,error:m,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var qR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qR||{}),Nm=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}(Nm||{});function KG(e){let t=w.useContext(tS);return t||Qt(!1),t}function YG(e){let t=w.useContext(DG);return t||Qt(!1),t}function XG(e){let t=w.useContext(Qi);return t||Qt(!1),t}function KR(e){let t=XG(),r=t.matches[t.matches.length-1];return r.route.id||Qt(!1),r.route.id}function ZG(){var e;let t=w.useContext(UR),r=YG(Nm.UseRouteError),n=KR(Nm.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function QG(){let{router:e}=KG(qR.UseNavigateStable),t=KR(Nm.UseNavigateStable),r=w.useRef(!1);return GR(()=>{r.current=!0}),w.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,pf({fromRouteId:t},i)))},[e,t])}function JG(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function e7(e){let{to:t,replace:r,state:n,relative:a}=e;Au()||Qt(!1);let{future:i,static:s}=w.useContext(ts),{matches:l}=w.useContext(Qi),{pathname:c}=pl(),u=rS(),f=eS(t,Jj(l,i.v7_relativeSplatPath),c,a==="path"),d=JSON.stringify(f);return w.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:a}),[u,d,a,r,n]),null}function Ml(e){Qt(!1)}function t7(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Oo.Pop,navigator:i,static:s=!1,future:l}=e;Au()&&Qt(!1);let c=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:c,navigator:i,static:s,future:pf({v7_relativeSplatPath:!1},l)}),[c,l,i,s]);typeof n=="string"&&(n=Pu(n));let{pathname:f="/",search:d="",hash:h="",state:m=null,key:p="default"}=n,g=w.useMemo(()=>{let v=Qj(f,c);return v==null?null:{location:{pathname:v,search:d,hash:h,state:m,key:p},navigationType:a}},[c,f,d,h,m,p,a]);return g==null?null:w.createElement(ts.Provider,{value:u},w.createElement(Sv.Provider,{children:r,value:g}))}function r7(e){let{children:t,location:r}=e;return zG(Sb(t),r)}new Promise(()=>{});function Sb(e,t){t===void 0&&(t=[]);let r=[];return w.Children.forEach(e,(n,a)=>{if(!w.isValidElement(n))return;let i=[...t,a];if(n.type===w.Fragment){r.push.apply(r,Sb(n.props.children,i));return}n.type!==Ml&&Qt(!1),!n.props.index||!n.props.children||Qt(!1);let s={id:n.props.id||i.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=Sb(n.props.children,i)),r.push(s)}),r}/**
355 * React Router DOM v6.30.1
356 *
357 * Copyright (c) Remix Software Inc.
358 *
359 * This source code is licensed under the MIT license found in the
360 * LICENSE.md file in the root directory of this source tree.
361 *
362 * @license MIT
363 */function Cb(){return Cb=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},Cb.apply(this,arguments)}function n7(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function a7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function i7(e,t){return e.button===0&&(!t||t==="_self")&&!a7(e)}function Nb(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function o7(e,t){let r=Nb(e);return t&&t.forEach((n,a)=>
363{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}const s7=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],l7="6";try{window.__reactRouterVersion=l7}catch{}const c7="startTransition",YP=$1[c7];function u7(e){let{basename:t,children:r,future:n,window:a}=e,i=w.useRef();i.current==null&&(i.current=fG({window:a,v5Compat:!0}));let s=i.current,[l,c]=w.useState({action:s.action,location:s.location}),{v7_startTransition:u}=n||{},f=w.useCallback(d=>{u&&YP?YP(()=>c(d)):c(d)},[c,u]);return w.useLayoutEffect(()=>s.listen(f),[s,f]),w.useEffect(()=>JG(n),[n]),w.createElement(t7,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:n})}const d7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lr=w.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:s,state:l,target:c,to:u,preventScrollReset:f,viewTransition:d}=t,h=n7(t,s7),{basename:m}=w.useContext(ts),p,g=!1;if(typeof u=="string"&&f7.test(u)&&(p=u,d7))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),j=Qj(S.pathname,m);S.origin===b.origin&&j!=null?u=j+S.search+S.hash:g=!0}catch{}let v=FG(u,{relative:a}),y=h7(u,{replace:s,state:l,target:c,preventScrollReset:f,relative:a,viewTransition:d});function x(b){n&&n(b),b.defaultPrevented||y(b)}return w.createElement("a",Cb({},h,{href:p||v,onClick:g||i?n:x,ref:r,target:c}))});var XP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(XP||(XP={}));var ZP;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ZP||(ZP={}));function h7(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:s,viewTransition:l}=t===void 0?{}:t,c=rS(),u=pl(),f=HR(e,{relative:s});return w.useCallback(d=>{if(i7(d,r)){d.preventDefault();let h=n!==void 0?n:Cm(u)===Cm(f);c(e,{replace:h,state:a,preventScrollReset:i,relative:s,viewTransition:l})}},[u,c,f,n,a,r,e,i,s,l])}function p7(e){let t=w.useRef(Nb(e)),r=w.useRef(!1),n=pl(),a=w.useMemo(()=>o7(n.search,r.current?null:t.current),[n.search]),i=rS(),s=w.useCallback((l,c)=>{const u=Nb(typeof l=="function"?l(a):l);r.current=!0,i("?"+u,c)},[i,a]);return[a,s]}const YR=w.createContext({theme:"light",toggleTheme:()=>{}}),m7=({children:e})=>{const[t,r]=w.useState(()=>localStorage.getItem("valuation-theme")||"light");w.useEffect(()=>{const a=document.documentElement;a.classList.remove("light","dark"),a.classList.add(t),localStorage.setItem("valuation-theme",t)},[t]);const n=()=>r(a=>a==="light"?"dark":"light");return o.jsx(YR.Provider,{value:{theme:t,toggleTheme:n},children:e})},g7=()=>w.useContext(YR),v7="modulepreload",y7=function(e){return"/"+e},QP={},x7=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=Promise.allSettled(r.map(c=>{if(c=y7(c),c in QP)return;QP[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":v7,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((h,m)=>{d.addEventListener("load",h),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return a.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Qe=w.forwardRef(({className:e,type:t,...r},n)=>o.jsx("input",{type:t,className:Oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));Qe.displayName="Input";var b7=w.createContext(void 0);function rs(e){const t=w.useContext(b7);return e||t||"ltr"}var wx="rovingFocusGroup.onEntryFocus",w7={bubbles:!1,cancelable:!0},bh="RovingFocusGroup",[Pb,XR,j7]=yu(bh),[S7,ns]=fr(bh,[j7]),[C7,N7]=S7(bh),ZR=w.forwardRef((e,t)=>
vendor: 10,787 bytes, line 363
363o.jsx(Pb.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(Pb.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(P7,{...e,ref:t})})}));ZR.displayName=bh;var P7=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,h=w.useRef(null),m=et(t,h),p=rs(i),[g,v]=wr({prop:s,defaultProp:l??null,onChange:c,caller:bh}),[y,x]=w.useState(!1),b=hn(u),S=XR(r),j=w.useRef(!1),[C,N]=w.useState(0);return w.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(wx,b),()=>P.removeEventListener(wx,b)},[b]),o.jsx(C7,{scope:r,orientation:n,dir:p,loop:a,currentTabStopId:g,onItemFocus:w.useCallback(P=>v(P),[v]),onItemShiftTab:w.useCallback(()=>x(!0),[]),onFocusableItemAdd:w.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:w.useCallback(()=>N(P=>P-1),[]),children:o.jsx($e.div,{tabIndex:y||C===0?-1:0,"data-orientation":n,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:je(e.onMouseDown,()=>{j.current=!0}),onFocus:je(e.onFocus,P=>{const A=!j.current;if(P.target===P.currentTarget&&A&&!y){const O=new CustomEvent(wx,w7);if(P.currentTarget.dispatchEvent(O),!O.defaultPrevented){const M=S().filter(R=>R.focusable),k=M.find(R=>R.active),E=M.find(R=>R.id===g),T=[k,E,...M].filter(Boolean).map(R=>R.ref.current);e$(T,f)}}j.current=!1}),onBlur:je(e.onBlur,()=>x(!1))})})}),QR="RovingFocusGroupItem",JR=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=e,c=kn(),u=i||c,f=N7(QR,r),d=f.currentTabStopId===u,h=XR(r),{onFocusableItemAdd:m,onFocusableItemRemove:p,currentTabStopId:g}=f;return w.useEffect(()=>{if(n)return m(),()=>p()},[n,m,p]),o.jsx(Pb.ItemSlot,{scope:r,id:u,focusable:n,active:a,children:o.jsx($e.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:je(e.onMouseDown,v=>{n?f.onItemFocus(u):v.preventDefault()}),onFocus:je(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:je(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=O7(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const S=b.indexOf(v.currentTarget);b=f.loop?E7(b,S+1):b.slice(S+1)}setTimeout(()=>e$(b))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:g!=null}):s})})});JR.displayName=QR;var A7={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function k7(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function O7(e,t,r){const n=k7(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return A7[n]}function e$(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function E7(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Cv=ZR,Nv=JR,Pv="Tabs",[_7,dPe]=fr(Pv,[ns]),t$=ns(),[T7,nS]=_7(Pv),r$=w.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=rs(l),[d,h]=wr({prop:n,onChange:a,defaultProp:i??"",caller:Pv});return o.jsx(T7,{scope:r,baseId:kn(),value:d,onValueChange:h,orientation:s,dir:f,activationMode:c,children:o.jsx($e.div,{dir:f,"data-orientation":s,...u,ref:t})})});r$.displayName=Pv;var n$="TabsList",a$=w.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...a}=e,i=nS(n$,r),s=t$(r);return o.jsx(Cv,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:n,children:o.jsx($e.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});a$.displayName=n$;var i$="TabsTrigger",o$=w.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:a=!1,...i}=e,s=nS(i$,r),l=t$(r),c=c$(s.baseId,n),u=u$(s.baseId,n),f=n===s.value;return o.jsx(Nv,{asChild:!0,...l,focusable:!a,active:f,children:o.jsx($e.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:je(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:je(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:je(e.onFocus,()=>{const d=s.activationMode!=="manual";!f&&!a&&d&&s.onValueChange(n)})})})});o$.displayName=i$;var s$="TabsContent",l$=w.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:a,children:i,...s}=e,l=nS(s$,r),c=c$(l.baseId,n),u=u$(l.baseId,n),f=n===l.value,d=w.useRef(f);return w.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),o.jsx(pn,{present:a||f,children:({present:h})=>o.jsx($e.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&i})})});l$.displayName=s$;function c$(e,t){return`${e}-trigger-${t}`}function u$(e,t){return`${e}-content-${t}`}var M7=r$,d$=a$,f$=o$,h$=l$;const JP=M7,Ab=w.forwardRef(({className:e,...t},r)=>o.jsx(d$,{ref:r,className:Oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ab.displayName=d$.displayName;const Fr=w.forwardRef(({className:e,...t},r)=>o.jsx(f$,{ref:r,className:Oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));Fr.displayName=f$.displayName;const Lr=w.forwardRef(({className:e,...t},r)=>o.jsx(h$,{ref:r,className:Oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Lr.displayName=h$.displayName;function Pm(e,[t,r]){return Math.min(r,Math.max(t,e))}var jx=0;function aS(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eA()),document.body.insertAdjacentElement("beforeend",e[1]??eA()),jx++,()=>{jx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jx--}},[])}function eA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Sx="focusScope.autoFocusOnMount",Cx="focusScope.autoFocusOnUnmount",tA={bubbles:!1,cancelable:!0},R7="FocusScope",Av=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[l,c]=w.useState(null),u=hn(a),f=hn(i),d=w.useRef(null),h=et(t,g=>c(g)),m=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let g=function(b){if(m.paused||!l)return;const S=b.target;l.contains(S)?d.current=S:uo(d.current,{select:!0})},v=function(b){if(m.paused||!l)return;const S=b.relatedTarget;S!==null&&(l.contains(S)||uo(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const j of b)j.removedNodes.length>0&&uo(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[n,l,m.paused]),w.useEffect(()=>{if(l){nA.add(m);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(Sx,tA);l.addEventListener(Sx,u),l.dispatchEvent(y),y.defaultPrevented||($7(B7(p$(l)),{select:!0}),document.activeElement===g&&uo(l))}return()=>{l.removeEventListener(Sx,u),setTimeout(()=>{const y=new CustomEvent(Cx,tA);l.addEventListener(Cx,f),l.dispatchEvent(y),y.defaultPrevented||uo(g??document.body,{select:!0}),l.removeEventListener(Cx,f),nA.remove(m)},0)}}},[l,u,f,m]);const p=w.useCallback(g=>{if(!r&&!n||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const x=g.currentTarget,[b,S]=I7(x);b&&S?!g.shiftKey&&y===S?(g.preventDefault(),r&&uo(b,{select:!0})):g.shiftKey&&y===b&&(g.preventDefault(),r&&uo(S,{select:!0})):y===x&&g.preventDefault()}},[r,n,m.paused]);return o.jsx($e.div,{tabIndex:-1,...s,ref:h,onKeyDown:p})});Av.displayName=R7;function $7(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(uo(n,{select:t}),document.activeElement!==r)return}function I7(e){const t=p$(e),r=rA(t,e),n=rA(t.reverse(),e);return[r,n]}function p$(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function rA(e,t){for(const r of e)if(!D7(r,{upTo:t}))return r}function D7(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function F7(e){return e instanceof HTMLInputElement&&"select"in e}function uo(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&F7(e)&&t&&e.select()}}var nA=L7();function L7(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=aA(e,t),e.unshift(t)},remove(t){var r;e=aA(e,t),(r=e[0])==null||r.resume()}}}function aA(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function B7(e){return e.filter(t=>t.tagName!=="A")}function wh(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var z7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Pl=new WeakMap,ip=new WeakMap,op={},Nx=0,m$=function(e){return e&&(e.host||m$(e.parentNode))},V7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=m$(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},W7=function(e,t,r,n){var a=V7(t,Array.isArray(e)?e:[e]);op[r]||(op[r]=new WeakMap);
vendor: 7,128 bytes, lines 363-400
363var i=op[r],s=[],l=new Set,c=new Set(a),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};a.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(l.has(h))f(h);else try{var m=h.getAttribute(n),p=m!==null&&m!=="false",g=(Pl.get(h)||0)+1,v=(i.get(h)||0)+1;Pl.set(h,g),i.set(h,v),s.push(h),g===1&&p&&ip.set(h,!0),v===1&&h.setAttribute(r,"true"),p||h.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),l.clear(),Nx++,function(){s.forEach(function(d){var h=Pl.get(d)-1,m=i.get(d)-1;Pl.set(d,h),i.set(d,m),h||(ip.has(d)||d.removeAttribute(n),ip.delete(d)),m||d.removeAttribute(r)}),Nx--,Nx||(Pl=new WeakMap,Pl=new WeakMap,ip=new WeakMap,op={})}},iS=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=z7(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),W7(n,a,r,"aria-hidden")):function(){return null}},Qa=function(){return Qa=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Qa.apply(this,arguments)};function g$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function U7(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Wp="right-scroll-bar-position",Up="width-before-scroll-bar",G7="with-scroll-bars-hidden",H7="--removed-body-scroll-bar-size";function Px(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function q7(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var K7=typeof window<"u"?w.useLayoutEffect:w.useEffect,iA=new WeakMap;function Y7(e,t){var r=q7(null,function(n){return e.forEach(function(a){return Px(a,n)})});return K7(function(){var n=iA.get(r);if(n){var a=new Set(n),i=new Set(e),s=r.current;a.forEach(function(l){i.has(l)||Px(l,null)}),i.forEach(function(l){a.has(l)||Px(l,s)})}iA.set(r,e)},[e]),r}function X7(e){return e}function Z7(e,t){t===void 0&&(t=X7);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(l){return i(l)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var l=r;r=[],l.forEach(i),s=r}var c=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return a}function Q7(e){e===void 0&&(e={});var t=Z7(null);return t.options=Qa({async:!0,ssr:!1},e),t}var v$=function(e){var t=e.sideCar,r=g$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,Qa({},r))};v$.isSideCarExport=!0;function J7(e,t){return e.useMedium(t),v$}var y$=Q7(),Ax=function(){},kv=w.forwardRef(function(e,t){var r=w.useRef(null),n=w.useState({onScrollCapture:Ax,onWheelCapture:Ax,onTouchMoveCapture:Ax}),a=n[0],i=n[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,m=e.noRelative,p=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,S=g$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,C=Y7([r,t]),N=Qa(Qa({},S),a);return w.createElement(w.Fragment,null,f&&w.createElement(j,{sideCar:y$,removeScrollBar:u,shards:d,noRelative:m,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r,gapMode:b}),s?w.cloneElement(w.Children.only(l),Qa(Qa({},N),{ref:C})):w.createElement(x,Qa({},N,{className:c,ref:C}),l))});kv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kv.classNames={fullWidth:Up,zeroRight:Wp};var eH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tH(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=eH();return t&&e.setAttribute("nonce",t),e}function rH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var aH=function(){var e=0,t=null;return{add:function(r){e==0&&(t=tH())&&(rH(t,r),nH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iH=function(){var e=aH();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},x$=function(){var e=iH(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},oH={left:0,top:0,right:0,gap:0},kx=function(e){return parseInt(e||"",10)||0},sH=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[kx(r),kx(n),kx(a)]},lH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oH;var t=sH(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},cH=x$(),lc="data-scroll-locked",uH=function(e,t,r,n){var a=e.left,i=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),`
364  .`.concat(G7,` {
365   overflow: hidden `).concat(n,`;
366   padding-right: `).concat(l,"px ").concat(n,`;
367  }
368  body[`).concat(lc,`] {
369    overflow: hidden `).concat(n,`;
370    overscroll-behavior: contain;
371    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
372    padding-left: `.concat(a,`px;
373    padding-top: `).concat(i,`px;
374    padding-right: `).concat(s,`px;
375    margin-left:0;
376    margin-top:0;
377    margin-right: `).concat(l,"px ").concat(n,`;
378    `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
379  }
380  
381  .`).concat(Wp,` {
382    right: `).concat(l,"px ").concat(n,`;
383  }
384  
385  .`).concat(Up,` {
386    margin-right: `).concat(l,"px ").concat(n,`;
387  }
388  
389  .`).concat(Wp," .").concat(Wp,` {
390    right: 0 `).concat(n,`;
391  }
392  
393  .`).concat(Up," .").concat(Up,` {
394    margin-right: 0 `).concat(n,`;
395  }
396  
397  body[`).concat(lc,`] {
398    `).concat(H7,": ").concat(l,`px;
399  }
400`)},oA=function(){var e=parseInt(document.body.getAttribute(lc)||"0",10);return isFinite(e)?e:0},dH=function(){w.useEffect(function(){return document.body.setAttribute(lc,(
vendor: 6,577 bytes, lines 400-403
400oA()+1).toString()),function(){var e=oA()-1;e<=0?document.body.removeAttribute(lc):document.body.setAttribute(lc,e.toString())}},[])},fH=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;dH();var i=w.useMemo(function(){return lH(a)},[a]);return w.createElement(cH,{styles:uH(i,!t,a,r?"":"!important")})},kb=!1;if(typeof window<"u")try{var sp=Object.defineProperty({},"passive",{get:function(){return kb=!0,!0}});window.addEventListener("test",sp,sp),window.removeEventListener("test",sp,sp)}catch{kb=!1}var Al=kb?{passive:!1}:!1,hH=function(e){return e.tagName==="TEXTAREA"},b$=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!hH(e)&&r[t]==="visible")},pH=function(e){return b$(e,"overflowY")},mH=function(e){return b$(e,"overflowX")},sA=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=w$(e,n);if(a){var i=j$(e,n),s=i[1],l=i[2];if(s>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},gH=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},vH=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},w$=function(e,t){return e==="v"?pH(t):mH(t)},j$=function(e,t){return e==="v"?gH(t):vH(t)},yH=function(e,t){return e==="h"&&t==="rtl"?-1:1},xH=function(e,t,r,n,a){var i=yH(e,window.getComputedStyle(t).direction),s=i*n,l=r.target,c=t.contains(l),u=!1,f=s>0,d=0,h=0;do{if(!l)break;var m=j$(e,l),p=m[0],g=m[1],v=m[2],y=g-v-i*p;(p||y)&&w$(e,l)&&(d+=y,h+=p);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&(Math.abs(d)<1||!a)||!f&&(Math.abs(h)<1||!a))&&(u=!0),u},lp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lA=function(e){return[e.deltaX,e.deltaY]},cA=function(e){return e&&"current"in e?e.current:e},bH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wH=function(e){return`
401  .block-interactivity-`.concat(e,` {pointer-events: none;}
402  .allow-interactivity-`).concat(e,` {pointer-events: all;}
403`)},jH=0,kl=[];function SH(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),a=w.useState(jH++)[0],i=w.useState(x$)[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=U7([e.lockRef.current],(e.shards||[]).map(cA),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=w.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=lp(g),x=r.current,b="deltaX"in g?g.deltaX:x[0]-y[0],S="deltaY"in g?g.deltaY:x[1]-y[1],j,C=g.target,N=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in g&&N==="h"&&C.type==="range")return!1;var P=sA(N,C);if(!P)return!0;if(P?j=N:(j=N==="v"?"h":"v",P=sA(N,C)),!P)return!1;if(!n.current&&"changedTouches"in g&&(b||S)&&(n.current=j),!j)return!0;var A=n.current||j;return xH(A,v,g,A==="h"?b:S,!0)},[]),c=w.useCallback(function(g){var v=g;if(!(!kl.length||kl[kl.length-1]!==i)){var y="deltaY"in v?lA(v):lp(v),x=t.current.filter(function(j){return j.name===v.type&&(j.target===v.target||v.target===j.shadowParent)&&bH(j.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var b=(s.current.shards||[]).map(cA).filter(Boolean).filter(function(j){return j.contains(v.target)}),S=b.length>0?l(v,b[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=w.useCallback(function(g,v,y,x){var b={name:g,delta:v,target:y,should:x,shadowParent:CH(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),f=w.useCallback(function(g){r.current=lp(g),n.current=void 0},[]),d=w.useCallback(function(g){u(g.type,lA(g),g.target,l(g,e.lockRef.current))},[]),h=w.useCallback(function(g){u(g.type,lp(g),g.target,l(g,e.lockRef.current))},[]);w.useEffect(function(){return kl.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Al),document.addEventListener("touchmove",c,Al),document.addEventListener("touchstart",f,Al),function(){kl=kl.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,Al),document.removeEventListener("touchmove",c,Al),document.removeEventListener("touchstart",f,Al)}},[]);var m=e.removeScrollBar,p=e.inert;return w.createElement(w.Fragment,null,p?w.createElement(i,{styles:wH(a)}):null,m?w.createElement(fH,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function CH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const NH=J7(y$,SH);var Ov=w.forwardRef(function(e,t){return w.createElement(kv,Qa({},e,{ref:t,sideCar:NH}))});Ov.classNames=kv.classNames;var PH=[" ","Enter","ArrowUp","ArrowDown"],AH=[" ","Enter"],tl="Select",[Ev,_v,kH]=yu(tl),[ku,fPe]=fr(tl,[kH,Nu]),Tv=Nu(),[OH,as]=ku(tl),[EH,_H]=ku(tl),S$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:h,required:m,form:p}=e,g=Tv(t),[v,y]=w.useState(null),[x,b]=w.useState(null),[S,j]=w.useState(!1),C=rs(u),[N,P]=wr({prop:n,defaultProp:a??!1,onChange:i,caller:tl}),[A,O]=wr({prop:s,defaultProp:l,onChange:c,caller:tl}),M=w.useRef(null),k=v?p||!!v.closest("form"):!0,[E,$]=w.useState(new Set),T=Array.from(E).map(R=>R.props.value).join(";");return o.jsx(Gj,{...g,children:o.jsxs(OH,{required:m,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:kn(),value:A,onValueChange:O,open:N,onOpenChange:P,dir:C,triggerPointerDownPosRef:M,disabled:h,children:[o.jsx(Ev.Provider,{scope:t,children:o.jsx(EH,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(R=>{$(B=>new Set(B).add(R))},[]),onNativeOptionRemove:w.useCallback(R=>{$(B=>{const F=new Set(B);return F.delete(R),F})},[]),children:r})}),k?o.jsxs(q$,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:A,onChange:R=>O(R.target.value),disabled:h,form:p,children:[A===void 0?o.jsx("option",{value:""}):null,Array.from(E)]},T):null]})})};S$.displayName=tl;var C$="SelectTrigger",N$=w.forwardRef((e,t)=>
vendor: 16,736 bytes, line 403
403{const{__scopeSelect:r,disabled:n=!1,...a}=e,i=Tv(r),s=as(C$,r),l=s.disabled||n,c=et(t,s.onTriggerChange),u=_v(r),f=w.useRef("touch"),[d,h,m]=Y$(g=>{const v=u().filter(b=>!b.disabled),y=v.find(b=>b.value===s.value),x=X$(v,g,y);x!==void 0&&s.onValueChange(x.value)}),p=g=>{l||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return o.jsx(Hj,{asChild:!0,...i,children:o.jsx($e.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":K$(s.value)?"":void 0,...a,ref:c,onClick:je(a.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&p(g)}),onPointerDown:je(a.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(p(g),g.preventDefault())}),onKeyDown:je(a.onKeyDown,g=>{const v=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&PH.includes(g.key)&&(p(),g.preventDefault())})})})});N$.displayName=C$;var P$="SelectValue",A$=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:s="",...l}=e,c=as(P$,r),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,d=et(t,c.onValueNodeChange);return br(()=>{u(f)},[u,f]),o.jsx($e.span,{...l,ref:d,style:{pointerEvents:"none"},children:K$(c.value)?o.jsx(o.Fragment,{children:s}):i})});A$.displayName=P$;var TH="SelectIcon",k$=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...a}=e;return o.jsx($e.span,{"aria-hidden":!0,...a,ref:t,children:n||"▼"})});k$.displayName=TH;var MH="SelectPortal",O$=e=>o.jsx(mh,{asChild:!0,...e});O$.displayName=MH;var rl="SelectContent",E$=w.forwardRef((e,t)=>{const r=as(rl,e.__scopeSelect),[n,a]=w.useState();if(br(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?hl.createPortal(o.jsx(_$,{scope:e.__scopeSelect,children:o.jsx(Ev.Slot,{scope:e.__scopeSelect,children:o.jsx("div",{children:e.children})})}),i):null}return o.jsx(T$,{...e,ref:t})});E$.displayName=rl;var ma=10,[_$,is]=ku(rl),RH="SelectContentImpl",$H=Js("SelectContent.RemoveScroll"),T$=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:v,...y}=e,x=as(rl,r),[b,S]=w.useState(null),[j,C]=w.useState(null),N=et(t,H=>S(H)),[P,A]=w.useState(null),[O,M]=w.useState(null),k=_v(r),[E,$]=w.useState(!1),T=w.useRef(!1);w.useEffect(()=>{if(b)return iS(b)},[b]),aS();const R=w.useCallback(H=>{const[me,...q]=k().map(L=>L.ref.current),[ue]=q.slice(-1),I=document.activeElement;for(const L of H)if(L===I||(L==null||L.scrollIntoView({block:"nearest"}),L===me&&j&&(j.scrollTop=0),L===ue&&j&&(j.scrollTop=j.scrollHeight),L==null||L.focus(),document.activeElement!==I))return},[k,j]),B=w.useCallback(()=>R([P,b]),[R,P,b]);w.useEffect(()=>{E&&B()},[E,B]);const{onOpenChange:F,triggerPointerDownPosRef:D}=x;w.useEffect(()=>{if(b){let H={x:0,y:0};const me=ue=>{var I,L;H={x:Math.abs(Math.round(ue.pageX)-(((I=D.current)==null?void 0:I.x)??0)),y:Math.abs(Math.round(ue.pageY)-(((L=D.current)==null?void 0:L.y)??0))}},q=ue=>{H.x<=10&&H.y<=10?ue.preventDefault():b.contains(ue.target)||F(!1),document.removeEventListener("pointermove",me),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",q,{capture:!0})}}},[b,F,D]),w.useEffect(()=>{const H=()=>F(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[F]);const[G,K]=Y$(H=>{const me=k().filter(I=>!I.disabled),q=me.find(I=>I.ref.current===document.activeElement),ue=X$(me,H,q);ue&&setTimeout(()=>ue.ref.current.focus())}),z=w.useCallback((H,me,q)=>{const ue=!T.current&&!q;(x.value!==void 0&&x.value===me||ue)&&(A(H),ue&&(T.current=!0))},[x.value]),U=w.useCallback(()=>b==null?void 0:b.focus(),[b]),ee=w.useCallback((H,me,q)=>{const ue=!T.current&&!q;(x.value!==void 0&&x.value===me||ue)&&M(H)},[x.value]),Y=n==="popper"?Ob:M$,W=Y===Ob?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:v}:{};return o.jsx(_$,{scope:r,content:b,viewport:j,onViewportChange:C,itemRefCallback:z,selectedItem:P,onItemLeave:U,itemTextRefCallback:ee,focusSelectedItem:B,selectedItemText:O,position:n,isPositioned:E,searchRef:G,children:o.jsx(Ov,{as:$H,allowPinchZoom:!0,children:o.jsx(Av,{asChild:!0,trapped:x.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:je(a,H=>{var me;(me=x.trigger)==null||me.focus({preventScroll:!0}),H.preventDefault()}),children:o.jsx(xu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:o.jsx(Y,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:H=>H.preventDefault(),...y,...W,onPlaced:()=>$(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:je(y.onKeyDown,H=>{const me=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!me&&H.key.length===1&&K(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let ue=k().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(H.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const I=H.target,L=ue.indexOf(I);ue=ue.slice(L+1)}setTimeout(()=>R(ue)),H.preventDefault()}})})})})})})});T$.displayName=RH;var IH="SelectItemAlignedPosition",M$=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...a}=e,i=as(rl,r),s=is(rl,r),[l,c]=w.useState(null),[u,f]=w.useState(null),d=et(t,N=>f(N)),h=_v(r),m=w.useRef(!1),p=w.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=s,b=w.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&v&&y){const N=i.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(i.dir!=="rtl"){const I=O.left-P.left,L=A.left-I,Q=N.left-L,le=N.width+Q,V=Math.max(le,P.width),oe=window.innerWidth-ma,ae=Pm(L,[ma,Math.max(ma,oe-V)]);l.style.minWidth=le+"px",l.style.left=ae+"px"}else{const I=P.right-O.right,L=window.innerWidth-A.right-I,Q=window.innerWidth-N.right-L,le=N.width+Q,V=Math.max(le,P.width),oe=window.innerWidth-ma,ae=Pm(L,[ma,Math.max(ma,oe-V)]);l.style.minWidth=le+"px",l.style.right=ae+"px"}const M=h(),k=window.innerHeight-ma*2,E=g.scrollHeight,$=window.getComputedStyle(u),T=parseInt($.borderTopWidth,10),R=parseInt($.paddingTop,10),B=parseInt($.borderBottomWidth,10),F=parseInt($.paddingBottom,10),D=T+R+E+F+B,G=Math.min(v.offsetHeight*5,D),K=window.getComputedStyle(g),z=parseInt(K.paddingTop,10),U=parseInt(K.paddingBottom,10),ee=N.top+N.height/2-ma,Y=k-ee,W=v.offsetHeight/2,H=v.offsetTop+W,me=T+R+H,q=D-me;if(me<=ee){const I=M.length>0&&v===M[M.length-1].ref.current;l.style.bottom="0px";const L=u.clientHeight-g.offsetTop-g.offsetHeight,Q=Math.max(Y,W+(I?U:0)+L+B),le=me+Q;l.style.height=le+"px"}else{const I=M.length>0&&v===M[0].ref.current;l.style.top="0px";const Q=Math.max(ee,T+g.offsetTop+(I?z:0)+W)+q;l.style.height=Q+"px",g.scrollTop=me-ee+g.offsetTop}l.style.margin=`${ma}px 0`,l.style.minHeight=G+"px",l.style.maxHeight=k+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,i.trigger,i.valueNode,l,u,g,v,y,i.dir,n]);br(()=>b(),[b]);const[S,j]=w.useState();br(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const C=w.useCallback(N=>{N&&p.current===!0&&(b(),x==null||x(),p.current=!1)},[b,x]);return o.jsx(FH,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:o.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:o.jsx($e.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});M$.displayName=IH;var DH="SelectPopperPosition",Ob=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=ma,...i}=e,s=Tv(r);return o.jsx(qj,{...s,...i,ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ob.displayName=DH;var[FH,oS]=ku(rl,{}),Eb="SelectViewport",R$=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...a}=e,i=is(Eb,r),s=oS(Eb,r),l=et(t,i.onViewportChange),c=w.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),o.jsx(Ev.Slot,{scope:r,children:o.jsx($e.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:je(a.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&d){const m=Math.abs(c.current-f.scrollTop);if(m>0){const p=window.innerHeight-ma*2,g=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(g,v);if(y<p){const x=y+m,b=Math.min(p,x),S=x-b;d.style.height=b+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});R$.displayName=Eb;var $$="SelectGroup",[LH,BH]=ku($$),zH=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=kn();return o.jsx(LH,{scope:r,id:a,children:o.jsx($e.div,{role:"group","aria-labelledby":a,...n,ref:t})})});zH.displayName=$$;var I$="SelectLabel",D$=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=BH(I$,r);return o.jsx($e.div,{id:a.id,...n,ref:t})});D$.displayName=I$;var Am="SelectItem",[VH,F$]=ku(Am),L$=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...s}=e,l=as(Am,r),c=is(Am,r),u=l.value===n,[f,d]=w.useState(i??""),[h,m]=w.useState(!1),p=et(t,x=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,x,n,a)}),g=kn(),v=w.useRef("touch"),y=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.jsx(VH,{scope:r,value:n,disabled:a,textId:g,isSelected:u,onItemTextChange:w.useCallback(x=>{d(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:o.jsx(Ev.ItemSlot,{scope:r,value:n,disabled:a,textValue:f,children:o.jsx($e.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:p,onFocus:je(s.onFocus,()=>m(!0)),onBlur:je(s.onBlur,()=>m(!1)),onClick:je(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:je(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:je(s.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:je(s.onPointerMove,x=>{var b;v.current=x.pointerType,a?(b=c.onItemLeave)==null||b.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:je(s.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:je(s.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(AH.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});L$.displayName=Am;var wd="SelectItemText",B$=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,...i}=e,s=as(wd,r),l=is(wd,r),c=F$(wd,r),u=_H(wd,r),[f,d]=w.useState(null),h=et(t,y=>d(y),c.onItemTextChange,y=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,y,c.value,c.disabled)}),m=f==null?void 0:f.textContent,p=w.useMemo(()=>o.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return br(()=>(g(p),()=>v(p)),[g,v,p]),o.jsxs(o.Fragment,{children:[o.jsx($e.span,{id:c.textId,...i,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?hl.createPortal(i.children,s.valueNode):null]})});B$.displayName=wd;var z$="SelectItemIndicator",V$=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return F$(z$,r).isSelected?o.jsx($e.span,{"aria-hidden":!0,...n,ref:t}):null});V$.displayName=z$;var _b="SelectScrollUpButton",W$=w.forwardRef((e,t)=>{const r=is(_b,e.__scopeSelect),n=oS(_b,e.__scopeSelect),[a,i]=w.useState(!1),s=et(t,n.onScrollButtonChange);return br(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?o.jsx(G$,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});W$.displayName=_b;var Tb="SelectScrollDownButton",U$=w.forwardRef((e,t)=>{const r=is(Tb,e.__scopeSelect),n=oS(Tb,e.__scopeSelect),[a,i]=w.useState(!1),s=et(t,n.onScrollButtonChange);return br(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;i(f)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?o.jsx(G$,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});U$.displayName=Tb;var G$=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=e,i=is("SelectScrollButton",r),s=w.useRef(null),l=_v(r),c=w.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return w.useEffect(()=>()=>c(),[c]),br(()=>{var f;const u=l().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),o.jsx($e.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:je(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:je(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:je(a.onPointerLeave,()=>{c()})})}),WH="SelectSeparator",H$=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return o.jsx($e.div,{"aria-hidden":!0,...n,ref:t})});H$.displayName=WH;var Mb="SelectArrow",UH=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=Tv(r),i=as(Mb,r),s=is(Mb,r);return i.open&&s.position==="popper"?o.jsx(Kj,{...a,...n,ref:t}):null});UH.displayName=Mb;var GH="SelectBubbleInput",q$=w.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const a=w.useRef(null),i=et(n,a),s=wh(t);return w.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&f){const d=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[s,t]),o.jsx($e.select,{...r,style:{...mM,...r.style},ref:i,defaultValue:t})});q$.displayName=GH;function K$(e){return e===""||e===void 0}function Y$(e){const t=hn(e),r=w.useRef(""),n=w.useRef(0),a=w.useCallback(s=>{const l=r.current+s;t(l),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function X$(e,t,r){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=HH(e,Math.max(i,0));a.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function HH(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var qH=S$,Z$=N$,KH=A$,YH=k$,XH=O$,Q$=E$,ZH=R$,J$=D$,eI=L$,QH=B$,JH=V$,tI=W$,rI=U$,nI=H$;const Ca=qH,Na=KH,Gn=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(Z$,{ref:n,className:Oe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
403ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,o.jsx(YH,{asChild:!0,children:o.jsx(vh,{className:"h-4 w-4 opacity-50"})})]}));Gn.displayName=Z$.displayName;const aI=w.forwardRef(({className:e,...t},r)=>o.jsx(tI,{ref:r,className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(LM,{className:"h-4 w-4"})}));aI.displayName=tI.displayName;const iI=w.forwardRef(({className:e,...t},r)=>o.jsx(rI,{ref:r,className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(vh,{className:"h-4 w-4"})}));iI.displayName=rI.displayName;const Hn=w.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>o.jsx(XH,{children:o.jsxs(Q$,{ref:a,className:Oe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[o.jsx(aI,{}),o.jsx(ZH,{className:Oe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(iI,{})]})}));Hn.displayName=Q$.displayName;const eq=w.forwardRef(({className:e,...t},r)=>o.jsx(J$,{ref:r,className:Oe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));eq.displayName=J$.displayName;const rr=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(eI,{ref:n,className:Oe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(JH,{children:o.jsx(_j,{className:"h-4 w-4"})})}),o.jsx(QH,{children:t})]}));rr.displayName=eI.displayName;const tq=w.forwardRef(({className:e,...t},r)=>o.jsx(nI,{ref:r,className:Oe("-mx-1 my-1 h-px bg-muted",e),...t}));tq.displayName=nI.displayName;var rq="Label",oI=w.forwardRef((e,t)=>o.jsx($e.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));oI.displayName=rq;var sI=oI;const nq=bu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),qe=w.forwardRef(({className:e,...t},r)=>o.jsx(sI,{ref:r,className:Oe(nq(),e),...t}));qe.displayName=sI.displayName;const sS=bu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ce=w.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},i)=>{const s=n?I6:"button";return o.jsx(s,{className:Oe(sS({variant:t,size:r,className:e})),ref:i,...a})});Ce.displayName="Button";const ut=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:Oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
403ut.displayName="Card";const ft=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:Oe("flex flex-col space-y-1.5 p-6",e),...t}));ft.displayName="CardHeader";const ht=w.forwardRef(({className:e,...t},r)=>o.jsx("h3",{ref:r,className:Oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));ht.displayName="CardTitle";const Dt=w.forwardRef(({className:e,...t},r)=>o.jsx("p",{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));Dt.displayName="CardDescription";const pt=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:Oe("p-6 pt-0",e),...t}));pt.displayName="CardContent";const aq=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:Oe("flex items-center p-6 pt-0",e),...t}));aq.displayName="CardFooter";var iq="Separator",uA="horizontal",oq=["horizontal","vertical"],lI=w.forwardRef((e,t)=>{const{decorative:r,orientation:n=uA,...a}=e,i=sq(n)?n:uA,l=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return o.jsx($e.div,{"data-orientation":i,...l,...a,ref:t})});lI.displayName=iq;function sq(e){return oq.includes(e)}var cI=lI;const Xt=w.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>o.jsx(cI,{ref:a,decorative:r,orientation:t,className:Oe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Xt.displayName=cI.displayName;var Mv="Checkbox",[lq,hPe]=fr(Mv),[cq,lS]=lq(Mv);function uq(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:i,form:s,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[h,m]=wr({prop:r,defaultProp:a??!1,onChange:c,caller:Mv}),[p,g]=w.useState(null),[v,y]=w.useState(null),x=w.useRef(!1),b=p?!!s||!!p.closest("form"):!0,S={checked:h,disabled:i,setChecked:m,control:p,setControl:g,name:l,form:s,value:f,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:zo(a)?!1:a,isFormControl:b,bubbleInput:v,setBubbleInput:y};return o.jsx(cq,{scope:t,...S,children:dq(d)?d(S):n})}var uI="CheckboxTrigger",dI=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:i,value:s,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:p}=lS(uI,e),g=et(a,f),v=w.useRef(c);return w.useEffect(()=>{const y=i==null?void 0:i.form;if(y){const x=()=>d(v.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[i,d]),o.jsx($e.button,{type:"button",role:"checkbox","aria-checked":zo(c)?"mixed":c,"aria-required":u,"data-state":gI(c),"data-disabled":l?"":void 0,disabled:l,value:s,...n,ref:g,onKeyDown:je(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:je(r,y=>{d(x=>zo(x)?!0:!x),p&&m&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});dI.displayName=uI;var cS=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:i,required:s,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return o.jsx(uq,{__scopeCheckbox:r,checked:a,defaultChecked:i,disabled:l,required:s,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:h})=>o.jsxs(o.Fragment,{children:[o.jsx(dI,{...d,ref:t,__scopeCheckbox:r}),h&&o.jsx(mI,{__scopeCheckbox:r})]})})});cS.displayName=Mv;var fI="CheckboxIndicator",hI=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,i=lS(fI,r);return o.jsx(pn,{present:n||zo(i.checked)||i.checked===!0,children:o.jsx($e.span,{"data-state":gI(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});hI.displayName=fI;var pI="CheckboxBubbleInput",mI=w.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:s,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:h,setBubbleInput:m}=lS(pI,e),p=et(r,m),g=wh(i),v=xh(n);w.useEffect(()=>{const x=h;if(!x)return;const b=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(b,"checked").set,C=!a.current;if(g!==i&&j){const N=new Event("click",{bubbles:C});x.indeterminate=zo(i),j.call(x,zo(i)?!1:i),x.dispatchEvent(N)}},[h,g,i,a]);const y=w.useRef(zo(i)?!1:i);return o.jsx($e.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:l,disabled:c,name:u,value:f,form:d,...t,tabIndex:-1,ref:p,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});mI.displayName=pI;function dq(e){return typeof e=="function"}function zo(e){return e==="indeterminate"}function gI(e){return zo(e)?"indeterminate":e?"checked":"unchecked"}const Ra=w.forwardRef(({className:e,...t},r)=>o.jsx(cS,{ref:r,className:Oe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:o.jsx(hI,{className:Oe("flex items-center justify-center text-current"),children:o.jsx(_j,{className:"h-4 w-4"})})}));Ra.displayName=cS.displayName;const fq=bu("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ml=w.forwardRef(({className:e,variant:t,...r},n)=>o.jsx("div",{ref:n,role:"alert",className:Oe(fq({variant:t}),e),...r}));ml.displayName="Alert";const gl=w.forwardRef(({className:e,...t},r)=>o.jsx("h5",{ref:r,className:Oe("mb-1 font-medium leading-none tracking-tight",e),...t}));gl.displayName="AlertTitle";const vl=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:Oe("text-sm [&_p]:leading-relaxed",e),...t}));vl.displayName="AlertDescription";const Pe=(e,t=0)=>typeof e=="number"&&Number.isFinite(e)?e:t,hq=(e,t,r)=>{const n=Pe(e),a=Pe(t),i=Pe(r);return a<=i?null:n*(1+i/100)/(a/100-i/100)},uS=(e,t)=>typeof t=="number"&&Number.isFinite(t)?null:`${e} is missing or not a finite number.`,pq=({onValueChange:e,currency:t,state:r,onStateChange:n})=>{const a=R=>{n({...r,...R})},{equityInvestment:i,grantFunding:s,grossProfit:l,employees:c,inflationRate:u,totalLiabilities:f,bookAssets:d,bookLiabilities:h,fairValueAdjustment:m,liquidationAssets:p,liquidationDiscount:g,useCostToReplicate:v,useAdjustedBookValue:y,useLiquidationValue:x}=r,b=c.reduce((R,B)=>R+Pe(B.cost),0),S=Pe(i)+Pe(s)+Pe(l)+b,j=S*(Pe(u)/100),C=S+j,N=C-Pe(f),P=Pe(d)-Pe(h)+Pe(m),A=Pe(p)*(1-Pe(g)/100),O=[];v&&O.push(N),y&&O.push(P),x&&O.push(A);const M=O.length>0?O.reduce((R,B)=>R+B,0)/O.length:0,k=w.useMemo(()=>{const R=[];return[["Equity Investment",i],["Grant Funding",s],["Gross Profit (last 3y)",l],["Inflation Rate",u],["Total Liabilities",f],["Book Assets",d],["Book Liabilities",h],["Fair Value Adjustment",m],["Liquidation Assets",p],["Liquidation Discount",g]].forEac
403h(([B,F])=>{const D=uS(B,F);D&&R.push(D)}),!v&&!y&&!x&&R.push("Select at least one asset-based method to compute a valuation."),c.forEach((B,F)=>{Number.isFinite(B.cost)||R.push(`Employee row ${F+1} ("${B.name||"unnamed"}") has a non-finite cost.`)}),R},[i,s,l,u,f,d,h,m,p,g,v,y,x,c]),E=()=>{a({employees:[...c,{name:"",cost:0}]})},$=(R,B,F)=>{const D=[...c];D[R]={...D[R],[B]:F},a({employees:D})},T=R=>{a({employees:c.filter((B,F)=>F!==R)})};return w.useEffect(()=>{e(M)},[M,e]),o.jsx(nn,{children:o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsx(ht,{children:"Asset-Based Valuation"}),o.jsx(Dt,{children:"Calculate company value based on tangible and intangible assets"}),o.jsxs("div",{className:"flex flex-wrap gap-6 pt-4 border-t mt-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"costToReplicate",checked:v,onCheckedChange:R=>a({useCostToReplicate:R})}),o.jsx("label",{htmlFor:"costToReplicate",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"Cost to Replicate"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"adjustedBookValue",checked:y,onCheckedChange:R=>a({useAdjustedBookValue:R})}),o.jsx("label",{htmlFor:"adjustedBookValue",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"Adjusted Book Value"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"liquidationValue",checked:x,onCheckedChange:R=>a({useLiquidationValue:R})}),o.jsx("label",{htmlFor:"liquidationValue",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"Liquidation Value"})]})]})]}),o.jsxs(pt,{className:"space-y-8",children:[k.length>0&&o.jsxs(ml,{variant:"destructive",children:[o.jsx(wu,{className:"h-4 w-4"}),o.jsx(gl,{children:"Asset-Based inputs need attention"}),o.jsx(vl,{children:o.jsxs("ul",{className:"list-disc pl-5 space-y-1 text-sm mt-2",children:[k.slice(0,8).map((R,B)=>o.jsx("li",{children:R},B)),k.length>8&&o.jsxs("li",{children:["…and ",k.length-8," more."]})]})})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"1. Cost to Replicate Breakdown"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Total cost to recreate the business from scratch, including all investments, funding, and unpaid labor"})})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Detailed breakdown of replacement costs"}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h4",{className:"font-semibold text-foreground",children:"Investment & Funding"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"equityInvestment",className:"flex-shrink-0 min-w-[200px]",children:"Equity Investment Received:"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Total equity capital raised from investors"})})]})]}),o.jsx(Qe,{id:"equityInvestment",type:"text",value:i?ne(i,t):"",onChange:R=>a({equityInvestment:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t),className:"max-w-[200px]"})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"grantFunding",className:"flex-shrink-0 min-w-[200px]",children:"Grant Funding Received/Unlocked:"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Non-dilutive funding from government or institutional grants"})})]})]}),o.jsx(Qe,{id:"grantFunding",type:"text",value:s?ne(s,t):"",onCh
403ange:R=>a({grantFunding:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t),className:"max-w-[200px]"})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"grossProfit",className:"flex-shrink-0 min-w-[200px]",children:"Total Gross Profit (Last 3 Years):"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Cumulative gross profit generated over the past three years"})})]})]}),o.jsx(Qe,{id:"grossProfit",type:"text",value:l?ne(l,t):"",onChange:R=>a({grossProfit:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t),className:"max-w-[200px]"})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("h4",{className:"font-semibold text-foreground",children:"Unpaid/Underpaid Employee Costs"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Market-rate salaries for founders and early employees who worked for reduced or no compensation"})})]})]}),o.jsx(Ce,{onClick:E,size:"sm",variant:"outline",children:"Add Employee"})]}),o.jsxs("div",{className:"space-y-3",children:[c.map((R,B)=>o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(Qe,{type:"text",value:R.name,onChange:F=>$(B,"name",F.target.value),placeholder:"Employee Name & Role",className:"flex-1"}),o.jsx(Qe,{type:"text",value:R.cost?ne(R.cost,t):"",onChange:F=>$(B,"cost",Number(F.target.value.replace(/[^0-9]/g,""))),placeholder:ne(0,t),className:"max-w-[200px]"}),o.jsx(Ce,{onClick:()=>T(B),size:"sm",variant:"ghost",className:"flex-shrink-0",children:"Remove"})]},B)),o.jsxs("div",{className:"flex justify-between items-center pt-2 border-t",children:[o.jsx("span",{className:"font-medium",children:"Total Unpaid Employee Costs:"}),o.jsx("span",{className:"font-semibold",children:ne(b,t)})]})]})]}),o.jsxs("div",{className:"space-y-3 bg-muted/50 p-4 rounded-lg",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Subtotal (before inflation adjustment):"}),o.jsx("span",{className:"font-semibold",children:ne(S,t)})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"inflationRate",className:"flex-shrink-0",children:"Inflation Adjustment:"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Percentage increase to account for inflation and market changes since costs were incurred"})})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"relative",children:[o.jsx(Qe,{id:"inflationRate",type:"number",value:u,onChange:R=>a({inflationRate:Number(R.target.value)}),placeholder:"25",className:"w-20 text-center pr-6"}),o.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none text-sm",children:"%"})]}),o.jsx("span",{className:"font-semibold min-w-[120px] text-right",children:ne(j,t)})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"font-medium",children:"Total Replication Cost:"}),o.jsx("span",{className:"font-bold text-lg",children:ne(C,t)})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"totalLiabilities",className:"flex-shrink-0",children:"Less: Total Liabilities:"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Outstanding debts and obligations that reduce the net replication value"})})]})]}),o.jsx(Qe,{id:"totalLiabilities",type:"text",value:f?ne(f,t):"",onCh
403ange:R=>a({totalLiabilities:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t),className:"max-w-[200px]"})]}),o.jsx(Xt,{className:"my-2"}),o.jsxs("div",{className:"flex justify-between items-center bg-primary/5 p-3 rounded-lg",children:[o.jsx("span",{className:"font-bold text-lg",children:"Net Cost to Replicate:"}),o.jsx("span",{className:"font-bold text-primary text-2xl",children:ne(N,t)})]})]}),o.jsxs("div",{className:"bg-background/50 border border-border p-4 rounded-lg",children:[o.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Key Assumptions"}),o.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1 list-disc list-inside",children:[o.jsx("li",{children:"Current assets assumed at replacement cost"}),o.jsx("li",{children:"Includes additional funding and investment values"}),o.jsx("li",{children:"Employee costs calculated based on time period"})]})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"2. Adjusted Book Value"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Company value based on balance sheet assets minus liabilities, adjusted to fair market value"})})]})]}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"bookAssets",children:"Total Assets"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Book value of all company assets from the balance sheet"})})]})]}),o.jsx(Qe,{id:"bookAssets",type:"text",value:d?ne(d,t):"",onChange:R=>a({bookAssets:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"bookLiabilities",children:"Total Liabilities"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Book value of all company debts and obligations"})})]})]}),o.jsx(Qe,{id:"bookLiabilities",type:"text",value:h?ne(h,t):"",onChange:R=>a({bookLiabilities:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"fairValueAdjustment",children:"Fair Value Adjustment"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Adjustment to reflect current market value vs. historical book value"})})]})]}),o.jsx(Qe,{id:"fairValueAdjustment",type:"text",value:m?ne(m,t):"",onChange:R=>a({fairValueAdjustment:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t)})]})]}),o.jsxs("div",{className:"bg-secondary/10 p-4 rounded-lg",children:[o.jsx("p",{className:"text-sm font-medium",children:"Adjusted Book Value:"}),o.jsx("p",{className:"text-2xl font-bold text-secondary",children:ne(P,t)})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"3. Liquidation Value"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Estimated value if the company were to be dissolved and assets sold immediately"})})]})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"liquidationAssets",children:"Liquidation Asset Value"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Estimated sale value of all assets in a quick liquidation scenario"})})]})]}),o.jsx(Qe,{id:"liquidationAssets",type:"text",value:p?ne(p,t):"",onCh
403ange:R=>a({liquidationAssets:Number(R.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(0,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"liquidationDiscount",children:"Liquidation Discount (%)"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Percentage reduction from book value due to forced sale conditions (typically 20-50%)"})})]})]}),o.jsxs("div",{className:"relative",children:[o.jsx(Qe,{id:"liquidationDiscount",type:"number",value:g,onChange:R=>a({liquidationDiscount:Number(R.target.value)}),placeholder:"30",className:"text-center pr-6"}),o.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none",children:"%"})]})]})]}),o.jsxs("div",{className:"bg-accent/10 p-4 rounded-lg",children:[o.jsx("p",{className:"text-sm font-medium",children:"Liquidation Value:"}),o.jsx("p",{className:"text-2xl font-bold text-accent-foreground",children:ne(A,t)})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"bg-gradient-to-br from-primary/10 to-secondary/10 p-6 rounded-lg space-y-4",children:[o.jsx("h3",{className:"text-xl font-bold",children:"Asset-Based Valuation Summary"}),o.jsxs("div",{className:"space-y-2",children:[v&&o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Cost to Replicate:"}),o.jsx("span",{className:"font-semibold",children:ne(N,t)})]}),y&&o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Adjusted Book Value:"}),o.jsx("span",{className:"font-semibold",children:ne(P,t)})]}),x&&o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Liquidation Value:"}),o.jsx("span",{className:"font-semibold",children:ne(A,t)})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"font-bold text-lg",children:"Average Asset-Based Valuation:"}),o.jsx("span",{className:"font-bold text-primary text-2xl",children:ne(M,t)})]})]})]})]})]})})})};var vI=["PageUp","PageDown"],yI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],xI={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ou="Slider",[Rb,mq,gq]=yu(Ou),[bI,pPe]=fr(Ou,[gq]),[vq,Rv]=bI(Ou),wI=w.forwardRef((e,t)=>{const{name:r,min:n=0,max:a=100,step:i=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[n],value:f,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:m=!1,form:p,...g}=e,v=w.useRef(new Set),y=w.useRef(0),b=s==="horizontal"?yq:xq,[S=[],j]=wr({prop:f,defaultProp:u,onChange:M=>{var E;(E=[...v.current][y.current])==null||E.focus(),d(M)}}),C=w.useRef(S);function N(M){const k=Cq(S,M);O(M,k)}function P(M){O(M,y.current)}function A(){const M=C.current[y.current];S[y.current]!==M&&h(S)}function O(M,k,{commit:E}={commit:!1}){const $=kq(i),T=Oq(Math.round((M-n)/i)*i+n,$),R=Pm(T,[n,a]);j((B=[])=>{const F=jq(B,R,k);if(Aq(F,c*i)){y.current=F.indexOf(R);const D=String(F)!==String(B);return D&&E&&h(F),D?F:B}else return B})}return o.jsx(vq,{scope:e.__scopeSlider,name:r,disabled:l,min:n,max:a,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:s,form:p,children:o.jsx(Rb.Provider,{scope:e.__scopeSlider,children:o.jsx(Rb.Slot,{scope:e.__scopeSlider,children:o.jsx(b,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:je(g.onPointerDown,()=>{l||(C.current=S)}),min:n,max:a,inverted:m,onSlideStart:l?void 0:N,onSlideMove:l?void 0:P,onSlideEnd:l?void 0:A,onHomeKeyDown:()=>!l&&O(n,0,{commit:!0}),onEndKeyDown:()=>!l&&O(a,S.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:k})=>{if(!l){const T=vI.includes(M.key)||M.shiftKey&&yI.includes(M.key)?10:1,R=y.current,B=S[R],F=i*T*k;O(B+F,R,{commit:!0})}}})})})})});wI.displayName=Ou;var[jI,SI]=bI(Ou,{startEdge:"left",endEdge:"right",size:"width",direction:1}),yq=w.forwardRef((e,t)=>
403{const{min:r,max:n,dir:a,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...f}=e,[d,h]=w.useState(null),m=et(t,b=>h(b)),p=w.useRef(void 0),g=rs(a),v=g==="ltr",y=v&&!i||!v&&i;function x(b){const S=p.current||d.getBoundingClientRect(),j=[0,S.width],N=dS(j,y?[r,n]:[n,r]);return p.current=S,N(b-S.left)}return o.jsx(jI,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:o.jsx(CI,{dir:g,"data-orientation":"horizontal",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=x(b.clientX);s==null||s(S)},onSlideMove:b=>{const S=x(b.clientX);l==null||l(S)},onSlideEnd:()=>{p.current=void 0,c==null||c()},onStepKeyDown:b=>{const j=xI[y?"from-left":"from-right"].includes(b.key);u==null||u({event:b,direction:j?-1:1})}})})}),xq=w.forwardRef((e,t)=>{const{min:r,max:n,inverted:a,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,f=w.useRef(null),d=et(t,f),h=w.useRef(void 0),m=!a;function p(g){const v=h.current||f.current.getBoundingClientRect(),y=[0,v.height],b=dS(y,m?[n,r]:[r,n]);return h.current=v,b(g-v.top)}return o.jsx(jI,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:o.jsx(CI,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const v=p(g.clientY);i==null||i(v)},onSlideMove:g=>{const v=p(g.clientY);s==null||s(v)},onSlideEnd:()=>{h.current=void 0,l==null||l()},onStepKeyDown:g=>{const y=xI[m?"from-bottom":"from-top"].includes(g.key);c==null||c({event:g,direction:y?-1:1})}})})}),CI=w.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...u}=e,f=Rv(Ou,r);return o.jsx($e.span,{...u,ref:t,onKeyDown:je(e.onKeyDown,d=>{d.key==="Home"?(s(d),d.preventDefault()):d.key==="End"?(l(d),d.preventDefault()):vI.concat(yI).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:je(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),f.thumbs.has(h)?h.focus():n(d)}),onPointerMove:je(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&a(d)}),onPointerUp:je(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),NI="SliderTrack",PI=w.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,a=Rv(NI,r);return o.jsx($e.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...n,ref:t})});PI.displayName=NI;var $b="SliderRange",AI=w.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,a=Rv($b,r),i=SI($b,r),s=w.useRef(null),l=et(t,s),c=a.values.length,u=a.values.map(h=>EI(h,a.min,a.max)),f=c>1?Math.min(...u):0,d=100-Math.max(...u);return o.jsx($e.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...n,ref:l,style:{...e.style,[i.startEdge]:f+"%",[i.endEdge]:d+"%"}})});AI.displayName=$b;var Ib="SliderThumb",kI=w.forwardRef((e,t)=>{const r=mq(e.__scopeSlider),[n,a]=w.useState(null),i=et(t,l=>a(l)),s=w.useMemo(()=>n?r().findIndex(l=>l.ref.current===n):-1,[r,n]);return o.jsx(bq,{...e,ref:i,index:s})}),bq=w.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:a,...i}=e,s=Rv(Ib,r),l=SI(Ib,r),[c,u]=w.useState(null),f=et(t,x=>u(x)),d=c?s.form||!!c.closest("form"):!0,h=xh(c),m=s.values[n],p=m===void 0?0:EI(m,s.min,s.max),g=Sq(n,s.values.length),v=h==null?void 0:h[l.size],y=v?Nq(v,p,l.direction):0;return w.useEffect(()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}},[c,s.thumbs]),o.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${p}% + ${y}px)`},children:[o.jsx(Rb.ItemSlot,{scope:e.__scopeSlider,children:o.jsx($e.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":m,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...i,ref:f,style:m===void 0?{display:"none"}:e.style,onFocus:je(e.onFocus,()=>{s.valueIndexToChangeRef.current=n})})}),d&&o.jsx(OI,{name:a??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:m},n)]})});kI.displayName=Ib;var wq="RadioBubbleInput",OI=w.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const a=w.useRef(null),i=et(a,n),s=wh(t);return w.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&f){const d=new Event("input",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[s,t]),o.jsx($e.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});OI.displayName=wq;function jq(e=[],t,r){const n=[...e];return n[r]=t,n.sort((a,i)=>a-i)}function EI(e,t,r){const i=100/(r-t)*(e-t);return Pm(i,[0,100])}function Sq(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Cq(e,t){if(e.length===1)return 0;const r=e.map(a=>Math.abs(a-t)),n=Math.min(...r);return r.indexOf(n)}function Nq(e,t,r){const n=e/2,i=dS([0,50],[0,n]);return(n-i(t)*r)*r}function Pq(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function Aq(e,t){if(t>0){const r=Pq(e);return Math.min(...r)>=t}return!0}function dS(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function kq(e){return(String(e).split(".")[1]||"").length}function Oq(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var _I=wI,Eq=PI,_q=AI,Tq=kI;const ei=w.forwardRef(({className:e,...t},r)=>o.jsxs(_I,{ref:r,className:Oe("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(Eq,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:o.jsx(_q,{className:"absolute h-full bg-primary"})}),o.jsx(Tq,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));ei.displayName=_I.displayName;const xi=({label:e,tooltip:t})=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{children:e}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:t})})]})]}),Mq=({onValueChange:e,currency:t,state:r,onStateChange:n})=>{const a=W=>{n({...r,...W})}
403,{soundIdea:i,prototype:s,qualityTeam:l,strategicRelationships:c,productRollout:u,averagePreMoneyValuation:f,teamScore:d,opportunityScore:h,productScore:m,competitiveScore:p,marketingScore:g,needForCapital:v,riskAdjustmentPerPoint:y,riskManagement:x,riskStage:b,riskLegislation:S,riskManufacturing:j,riskSales:C,riskFunding:N,riskCompetition:P,riskTechnology:A,riskLitigation:O,riskInternational:M,riskReputation:k,riskPotentialLucrative:E,useBerkus:$,useScorecard:T,useRiskFactor:R}=r,B=Pe(i)+Pe(s)+Pe(l)+Pe(c)+Pe(u),F=Pe(d)/100*.3+Pe(h)/100*.25+Pe(m)/100*.15+Pe(p)/100*.1+Pe(g)/100*.1+Pe(v)/100*.1,D=Pe(f)*F,G=Pe(x)+Pe(b)+Pe(S)+Pe(j)+Pe(C)+Pe(N)+Pe(P)+Pe(A)+Pe(O)+Pe(M)+Pe(k)+Pe(E),K=G*Pe(y),z=Math.max(0,Pe(f)+K),U=[];$&&U.push(B),T&&U.push(D),R&&U.push(z);const ee=U.length>0?U.reduce((W,H)=>W+H,0)/U.length:0,Y=w.useMemo(()=>{const W=[];if(!$&&!T&&!R&&W.push("Select at least one method (Berkus, Scorecard, or Risk Factor)."),T||R){const H=uS("Average Pre-Money Valuation",f);H&&W.push(H)}return W},[$,T,R,f]);return w.useEffect(()=>{e(ee)},[ee,e]),o.jsx(nn,{children:o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsx(ht,{children:"Pricing-Based Valuation"}),o.jsx(Dt,{children:"Three methods for valuing early-stage companies without revenue"}),o.jsxs("div",{className:"flex flex-wrap gap-6 pt-4 border-t mt-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"berkusMethod",checked:$,onCheckedChange:W=>a({useBerkus:W})}),o.jsx("label",{htmlFor:"berkusMethod",className:"text-sm font-medium leading-none cursor-pointer",children:"Berkus Method"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"scorecardMethod",checked:T,onCheckedChange:W=>a({useScorecard:W})}),o.jsx("label",{htmlFor:"scorecardMethod",className:"text-sm font-medium leading-none cursor-pointer",children:"Scorecard Method"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"riskFactorMethod",checked:R,onCheckedChange:W=>a({useRiskFactor:W})}),o.jsx("label",{htmlFor:"riskFactorMethod",className:"text-sm font-medium leading-none cursor-pointer",children:"Risk Factor Summation"})]})]})]}),o.jsxs(pt,{className:"space-y-8",children:[Y.length>0&&o.jsxs(ml,{variant:"destructive",children:[o.jsx(wu,{className:"h-4 w-4"}),o.jsx(gl,{children:"Pricing-Based inputs need attention"}),o.jsx(vl,{children:o.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm mt-2",children:Y.map((W,H)=>o.jsx("li",{children:W},H))})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"1. Berkus Method"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsxs(Ee,{className:"max-w-md",children:[o.jsx("p",{className:"font-semibold mb-2",children:"Berkus Method Overview"}),o.jsx("p",{children:"Created by Dave Berkus, this method assigns monetary value (up to £500,000 each) to five key success factors for pre-revenue startups. It provides a quick, qualitative assessment based on risk reduction rather than future projections. Maximum total valuation is £2.5 million. Best suited for very early-stage companies with strong fundamentals but no revenue."})]})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Each factor worth up £250,000"}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Sound Idea (Business Concept)",tooltip:"Value the strength and viability of the core business idea. A compelling value proposition and clear market need can be worth up to £500,000."}),o.jsx(Qe,{type:"text",value:i?ne(i,t):"",onChange:W=>a({soundIdea:Math.min(5e5,Number(W.target.value.replace(/[^0-9]/g,"")))}),placeholder:ne(0,t)+" - "+ne(5e5,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Prototype (Reduces Technology Risk)",tooltip:"Having a working prototype or MVP significantly reduces technology risk. Demonstrates technical feasibility and can be worth up to £500,000."}
403),o.jsx(Qe,{type:"text",value:s?ne(s,t):"",onChange:W=>a({prototype:Math.min(5e5,Number(W.target.value.replace(/[^0-9]/g,"")))}),placeholder:ne(0,t)+" - "+ne(5e5,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Quality Management Team",tooltip:"Experienced, skilled team with relevant domain expertise and track record. Strong teams significantly increase success probability, worth up to £500,000."}),o.jsx(Qe,{type:"text",value:l?ne(l,t):"",onChange:W=>a({qualityTeam:Math.min(5e5,Number(W.target.value.replace(/[^0-9]/g,"")))}),placeholder:ne(0,t)+" - "+ne(5e5,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Strategic Relationships",tooltip:"Partnerships, distribution channels, key customers, or advisors that provide competitive advantages and market access, worth up to £500,000."}),o.jsx(Qe,{type:"text",value:c?ne(c,t):"",onChange:W=>a({strategicRelationships:Math.min(5e5,Number(W.target.value.replace(/[^0-9]/g,"")))}),placeholder:ne(0,t)+" - "+ne(5e5,t)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Product Rollout/Sales",tooltip:"Evidence of market traction through beta users, early customers, or pilot programs. Validates market demand and can be worth up to £500,000."}),o.jsx(Qe,{type:"text",value:u?ne(u,t):"",onChange:W=>a({productRollout:Math.min(5e5,Number(W.target.value.replace(/[^0-9]/g,"")))}),placeholder:ne(0,t)+" - "+ne(5e5,t)})]})]}),o.jsxs("div",{className:"bg-primary/5 p-4 rounded-lg",children:[o.jsx("p",{className:"text-sm font-medium",children:"Berkus Method Valuation:"}),o.jsx("p",{className:"text-2xl font-bold text-primary",children:ne(B,t)})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"2. Scorecard Method"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsxs(Ee,{className:"max-w-md",children:[o.jsx("p",{className:"font-semibold mb-2",children:"Scorecard Method Overview"}),o.jsx("p",{children:"Developed by Bill Payne, this method compares your startup to average pre-money valuations in your region/industry, then adjusts based on six weighted factors. Each factor can range from 0-150% (100% = average). The weights are: Team (30%), Opportunity Size (25%), Product/Tech (15%), Competition (10%), Marketing/Sales (10%), and Need for Capital (10%). Provides a relative valuation based on comparable companies."})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Average Pre-Money Valuation in Region/Industry",tooltip:"Research comparable companies in your industry and region to establish a baseline valuation. This serves as the starting point for comparison."}),o.jsx(Qe,{type:"text",value:f?ne(f,t):"",onChange:W=>a({averagePreMoneyValuation:Number(W.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(5e5,t)})]}),o.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:[{label:"Team (30%)",key:"teamScore",value:d,tooltip:"Evaluate founder and management team experience, skills, and track record. The most important factor in startup success."},{label:"Size of Opportunity (25%)",key:"opportunityScore",value:h,tooltip:"Assess the total addressable market (TAM) and growth potential. Larger markets with high growth rates score higher."},{label:"Product/Technology (15%)",key:"productScore",value:m,tooltip:"Rate the innovation, IP protection, and technical feasibility. Strong technology with barriers to entry scores higher."},{label:"Competitive Environment (10%)",key:"competitiveScore",value:p,tooltip:"Analyze competitive landscape and barriers to entry. Less competition and strong differentiation score higher."},{label:"Marketing/Sales (10%)",key:"marketingScore",value:g,tooltip:"Evaluate go-to-market strategy, customer acquisition channels, and sales execution capability."},{label:"Need for Capital (10%)",key:"needForCapital",value:v,tooltip:"Assess funding requirements and capital efficiency. Lower capital needs with proven unit economics score higher."}].map(({label:W,key:H,value:me,tooltip:q})=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx(xi,{label:W,tooltip:q}),o.jsxs("span",{className:"text-sm font-medium",children:[me,"%"]})]}),o.jsx(ei,{value:[me],onValueChange:ue=>a({[H]:ue[0]}),max:150})]},H))}),o.jsxs("div",{className:"bg-secondary/10 p-4 rounded-lg",children:[o.jsx("p",{className:"text-sm font-medium",children:"Scorecard Method Valuation:"}),o.jsx("p",{className:"text-2xl font-bold text-secondary",children:ne(D,t)}
403)]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"3. Risk Factor Summation"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsxs(Ee,{className:"max-w-md",children:[o.jsx("p",{className:"font-semibold mb-2",children:"Risk Factor Summation Overview"}),o.jsx("p",{children:"This method starts with an average pre-money valuation for comparable companies, then adjusts based on 12 specific risk factors. Each risk factor is scored from -2 (very negative) to +2 (very positive), with a monetary adjustment applied per point. The sum of all adjustments is added to (or subtracted from) the base valuation. Provides detailed risk assessment and is particularly useful for investors evaluating multiple opportunities."})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(xi,{label:"Adjustment Amount Per Risk Point",tooltip:"Set the monetary value for each risk point. Each factor can range from -2 (very negative) to +2 (very positive), with this amount applied per point."}),o.jsx(Qe,{type:"text",value:y?ne(y,t):"",onChange:W=>a({riskAdjustmentPerPoint:Number(W.target.value.replace(/[^0-9]/g,""))}),placeholder:ne(1e5,t)})]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Rate each risk: +2 (very positive) to -2 (very negative). Each point applies the adjustment amount above"}),o.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:[{label:"Management Risk",key:"riskManagement",value:x,tooltip:"Assess management team's experience and capability to execute the business plan."},{label:"Stage of Business",key:"riskStage",value:b,tooltip:"Earlier stages are riskier. Rate based on development stage from concept to revenue generation."},{label:"Legislation/Political Risk",key:"riskLegislation",value:S,tooltip:"Consider regulatory environment and political factors that could impact the business."},{label:"Manufacturing Risk",key:"riskManufacturing",value:j,tooltip:"Evaluate supply chain reliability and manufacturing/delivery complexity."},{label:"Sales/Marketing Risk",key:"riskSales",value:C,tooltip:"Assess the difficulty and cost of customer acquisition and market penetration."},{label:"Funding/Capital Risk",key:"riskFunding",value:N,tooltip:"Evaluate the company's ability to secure additional funding when needed."},{label:"Competition Risk",key:"riskCompetition",value:P,tooltip:"Consider the competitive landscape and barriers to entry."},{label:"Technology Risk",key:"riskTechnology",value:A,tooltip:"Assess technical feasibility and risk of technological obsolescence."},{label:"Litigation Risk",key:"riskLitigation",value:O,tooltip:"Consider potential legal challenges, IP disputes, or regulatory actions."},{label:"International Risk",key:"riskInternational",value:M,tooltip:"Evaluate risks from international operations, currency, and geopolitical factors."},{label:"Reputation Risk",key:"riskReputation",value:k,tooltip:"Consider brand perception and potential reputational vulnerabilities."},{label:"Potentially Lucrative Exit",key:"riskPotentialLucrative",value:E,tooltip:"Assess the likelihood and potential magnitude of a lucrative exit event."}].map(({label:W,key:H,value:me,tooltip:q})=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx(xi,{label:W,tooltip:q}),o.jsx("span",{className:"text-sm font-medium",children:me>0?`+${me}`:me})]}),o.jsx(ei,{value:[me+2],onValueChange:ue=>a({[H]:ue[0]-2}),max:4,step:1})]},H))}),o.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{children:"Total Risk Score:"}),o.jsx("span",{className:"font-semibold",children:G>0?`+${G}`:G})]}),o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{children:"Risk Adjustment:"}),o.jsx("span",{className:"font-semibold",children:ne(K,t)})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"font-medium",children:"Risk Factor Summation Valuation:"}),o.jsx("span",{className:"font-bold text-lg text-primary",children:ne(z,t)})]})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"bg-gradient-to-br from-primary/10 to-secondary/10 p-6 rounded-lg space-y-4",children:[o.jsx("h3",{className:"text-xl font-bold",children:"Pricing-Based Valuation Summary"}),o.jsxs("div",{className:"space-y-2",children:[$&&o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Berkus Method:"}),o.jsx("span",{className:"font-semibold",children:ne(B,t)})]}),T&&o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Scorecard Method:"}),o.jsx("span",{className:"font-semibold",children:ne(D,t)}
403)]}),R&&o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Risk Factor Summation:"}),o.jsx("span",{className:"font-semibold",children:ne(z,t)})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"font-bold text-lg",children:"Average Pricing-Based Valuation:"}),o.jsx("span",{className:"font-bold text-primary text-2xl",children:ne(ee,t)})]})]})]})]})]})})})},Gr=w.forwardRef(({className:e,value:t,onChange:r,rules:n,suffix:a,...i},s)=>{const l=typeof t=="string"?parseFloat(t):t;let c=null;n&&!isNaN(l)&&(n.min!==void 0&&l<n.min?c=`Minimum value is ${n.min}`:n.max!==void 0&&l>n.max&&(c=`Maximum value is ${n.max}`),!c&&n.validate&&(c=n.validate(l)));const u=c!==null;return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"relative",children:[o.jsx(Qe,{ref:s,value:t,onChange:r,className:Oe(a&&"pr-6",u&&"border-destructive focus-visible:ring-destructive",e),...i}),a&&o.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none text-sm",children:a})]}),u&&o.jsx("p",{className:"text-[11px] text-destructive font-medium",children:c}),!u&&(n==null?void 0:n.hint)&&o.jsx("p",{className:"text-[11px] text-muted-foreground",children:n.hint})]})});Gr.displayName="ValidatedInput";var fS="Radio",[Rq,TI]=fr(fS),[$q,Iq]=Rq(fS),MI=w.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:i,disabled:s,value:l="on",onCheck:c,form:u,...f}=e,[d,h]=w.useState(null),m=et(t,v=>h(v)),p=w.useRef(!1),g=d?u||!!d.closest("form"):!0;return o.jsxs($q,{scope:r,checked:a,disabled:s,children:[o.jsx($e.button,{type:"button",role:"radio","aria-checked":a,"data-state":DI(a),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:m,onClick:je(e.onClick,v=>{a||c==null||c(),g&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})}),g&&o.jsx(II,{control:d,bubbles:!p.current,name:n,value:l,checked:a,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});MI.displayName=fS;var RI="RadioIndicator",$I=w.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,i=Iq(RI,r);return o.jsx(pn,{present:n||i.checked,children:o.jsx($e.span,{"data-state":DI(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t})})});$I.displayName=RI;var Dq="RadioBubbleInput",II=w.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{const s=w.useRef(null),l=et(s,i),c=wh(r),u=xh(t);return w.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==r&&m){const p=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(p)}},[c,r,n]),o.jsx($e.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});II.displayName=Dq;function DI(e){return e?"checked":"unchecked"}var Fq=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],$v="RadioGroup",[Lq,mPe]=fr($v,[ns,TI]),FI=ns(),LI=TI(),[Bq,zq]=Lq($v),BI=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:i,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...h}=e,m=FI(r),p=rs(u),[g,v]=wr({prop:i,defaultProp:a??null,onChange:d,caller:$v});return o.jsx(Bq,{scope:r,name:n,required:s,disabled:l,value:g,onValueChange:v,children:o.jsx(Cv,{asChild:!0,...m,orientation:c,dir:p,loop:f,children:o.jsx($e.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:p,...h,ref:t})})})});BI.displayName=$v;var zI="RadioGroupItem",VI=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,i=zq(zI,r),s=i.disabled||n,l=FI(r),c=LI(r),u=w.useRef(null),f=et(t,u),d=i.value===a.value,h=w.useRef(!1);return w.useEffect(()=>{const m=g=>{Fq.includes(g.key)&&(h.current=!0)},p=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",p)}},[]),o.jsx(Nv,{asChild:!0,...l,focusable:!s,active:d,children:o.jsx(MI,{disabled:s,required:i.required,
403checked:d,...c,...a,name:i.name,ref:f,onCheck:()=>i.onValueChange(a.value),onKeyDown:je(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:je(a.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});VI.displayName=zI;var Vq="RadioGroupIndicator",WI=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=LI(r);return o.jsx($I,{...a,...n,ref:t})});WI.displayName=Vq;var UI=BI,GI=VI,Wq=WI;const HI=w.forwardRef(({className:e,...t},r)=>o.jsx(UI,{className:Oe("grid gap-2",e),...t,ref:r}));HI.displayName=UI.displayName;const qI=w.forwardRef(({className:e,...t},r)=>o.jsx(GI,{ref:r,className:Oe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:o.jsx(Wq,{className:"flex items-center justify-center",children:o.jsx(BM,{className:"h-2.5 w-2.5 fill-current text-current"})})}));qI.displayName=GI.displayName;const dA=[{key:"cashflow-positive",label:"MVP + Revenue + Cashflow positive",baseIRR:20,baseWACC:10},{key:"revenue",label:"MVP + Revenue, cashflow negative",baseIRR:30,baseWACC:12},{key:"mvp",label:"MVP only, no revenue",baseIRR:40,baseWACC:14},{key:"idea",label:"Idea stage, no MVP",baseIRR:50,baseWACC:16}],fA=[{label:"< 25%",test:e=>e<25,irrAdj:-10,waccAdj:-1},{label:"25–50%",test:e=>e>=25&&e<50,irrAdj:0,waccAdj:0},{label:"50–100%",test:e=>e>=50&&e<100,irrAdj:10,waccAdj:1},{label:"100–200%",test:e=>e>=100&&e<200,irrAdj:20,waccAdj:2},{label:"> 200%",test:e=>e>=200,irrAdj:30,waccAdj:3}],hA=10,pA=9,KI=({projections:e,numYears:t,onApplyWACC:r,onApplyIRR:n})=>{const[a,i]=w.useState("revenue"),[s,l]=w.useState(""),c=w.useMemo(()=>{var y,x;const p=Math.min(t,e.length);if(p<2)return 0;const g=((y=e[0])==null?void 0:y.revenue)??0,v=((x=e[p-1])==null?void 0:x.revenue)??0;return g<=0||v<=0?0:(Math.pow(v/g,1/(p-1))-1)*100},[e,t]),u=s===""?c:Number(s),f=fA.find(p=>p.test(u))??fA[1],d=dA.find(p=>p.key===a),h=Math.max(hA,d.baseIRR+f.irrAdj),m=Math.max(pA,d.baseWACC+f.waccAdj);return o.jsx(nn,{children:o.jsxs(ut,{className:"border-primary/30 bg-primary/[0.03]",children:[o.jsxs(ft,{className:"pb-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(pv,{className:"h-4 w-4 text-primary"}),o.jsx(ht,{className:"text-base",children:"Discount Rate Advisor (Angel Framework)"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-sm",children:o.jsx("p",{children:"Suggests a target IRR (for VC Method) and WACC (for DCF) based on the company's stage and projected 5-year CAGR. Floor: 10% IRR / 9% WACC."})})]})]}),o.jsx(Dt,{children:"Stage + projected CAGR → suggested IRR and WACC"})]}),o.jsxs(pt,{className:"space-y-4",children:[o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{className:"text-sm",children:"Company stage"}),o.jsx(HI,{value:a,onValueChange:p=>i(p),className:"space-y-1.5",children:dA.map(p=>o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(qI,{value:p.key,id:`stage-${p.key}`,className:"mt-0.5"}),o.jsxs(qe,{htmlFor:`stage-${p.key}`,className:"text-xs font-normal cursor-pointer leading-tight",children:[p.label,o.jsxs("span",{className:"text-muted-foreground ml-1",children:["(base ",p.baseIRR,"% IRR / ",p.baseWACC,"% WACC)"]})]})]},p.key))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"cagrInput",className:"text-sm",children:"5-year projected CAGR"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsxs("p",{className:"max-w-xs",children:["Auto-calculated from Year 1 → Year ",Math.min(t,e.length)," revenue. Override if you want to stress-test a different growth assumption."]})})]})]}),o.jsx(Gr,{id:"cagrInput",type:"number",step:"0.1",value:s===""?c.toFixed(1):s,onChange:p=>l(p.target.value===""?"":Number(p.target.value)),className:"text-center",suffix:"%",rules:{min:-100,max:1e3,hint:`Auto: ${c.toFixed(1)}% from projections`}}),o.jsxs("div",{className:"text-xs text-muted-foreground",children:["Band: ",o.jsx("span",{className:"font-medium text-foreground",children:f.label})," → IRR ",f.irrAdj>
403=0?"+":"",f.irrAdj,"%, WACC ",f.waccAdj>=0?"+":"",f.waccAdj,"%"]})]})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-3 pt-2 border-t",children:[o.jsxs("div",{className:"flex items-center justify-between bg-background rounded-md border p-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Suggested Target IRR"}),o.jsxs("p",{className:"text-2xl font-bold text-primary",children:[h.toFixed(0),"%"]}),o.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[d.baseIRR,"% base ",f.irrAdj>=0?"+":"−"," ",Math.abs(f.irrAdj),"% CAGR adj",h===hA?" (floored)":""]})]}),n&&o.jsx(Ce,{size:"sm",variant:"outline",onClick:()=>n(h),children:"Apply to IRR"})]}),o.jsxs("div",{className:"flex items-center justify-between bg-background rounded-md border p-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Suggested WACC"}),o.jsxs("p",{className:"text-2xl font-bold text-primary",children:[m.toFixed(0),"%"]}),o.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[d.baseWACC,"% base ",f.waccAdj>=0?"+":"−"," ",Math.abs(f.waccAdj),"% CAGR adj",m===pA?" (floored)":""]})]}),r&&o.jsx(Ce,{size:"sm",variant:"outline",onClick:()=>r(m),children:"Apply to WACC"})]})]})]})]})})},Uq=({onValueChange:e,onExitValueChange:t,currency:r,projections:n,numYears:a,investmentAmount:i,preMoneyValuation:s,futureRounds:l,state:c,onStateChange:u})=>{const f=U=>{u({...c,...U})},{revenueMultiple:d,ebitdaMultiple:h,exitYear:m,targetReturn:p,useRevenueMultiple:g,useEbitdaMultiple:v}=c,y=Math.min(Math.max(Pe(m,1)-1,0),n.length-1),x=n[y],b=Pe(x==null?void 0:x.revenue),S=(x==null?void 0:x.grossProfitOverride)!=null?Pe(x.grossProfitOverride):b*Pe(x==null?void 0:x.grossMargin)/100,j=(x==null?void 0:x.sgaOverride)!=null?Pe(x.sgaOverride):b*Pe(x==null?void 0:x.sgaPercent)/100,C=(x==null?void 0:x.rdOverride)!=null?Pe(x.rdOverride):b*Pe(x==null?void 0:x.rdPercent)/100,N=S-j-C,P=(x==null?void 0:x.ebitdaOverride)!=null?Pe(x.ebitdaOverride):N,O=(()=>{const U=Pe(s)+Pe(i);if(U<=0)return 0;let ee=Pe(i)/U*100;return l.filter(W=>Pe(W.investmentAmount)>0&&Pe(W.preMoneyValuation)>0).forEach(W=>{const H=Pe(W.preMoneyValuation)+Pe(W.investmentAmount),me=Pe(W.investmentAmount)/H*100;ee=ee*(1-me/100)}),ee})(),M=b*Pe(d),k=P*Pe(h),E=[];g&&E.push(M),v&&E.push(k);const $=E.length>0?E.reduce((U,ee)=>U+ee,0)/E.length:0,T=$*(O/100),R=Math.pow(1+Pe(p)/100,Pe(m,1)),B=R>0?T/R:0,F=Pe(s)+Pe(i),D=F>0?Pe(i)/F*100:0,G=D>0?B/D*100:0,K=Math.max(0,G-Pe(i)),z=w.useMemo(()=>{const U=[];return[["Exit Year",m],["Target Return (IRR)",p],["Revenue Multiple",d],["EBITDA Multiple",h],["Investment Amount",i]].forEac
403h(([ee,Y])=>{const W=uS(ee,Y);W&&U.push(W)}),!g&&!v&&U.push("Select at least one valuation method (Revenue or EBITDA multiple)."),Number.isFinite(m)&&(m<1||m>a)&&U.push(`Exit Year (${m}) is outside the projection range 1–${a}.`),x||U.push(`Projection data for Year ${m} is missing.`),U},[m,p,d,h,i,g,v,a,x]);return w.useEffect(()=>{e(K),t($)},[K,$,e,t]),o.jsx(nn,{children:o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ht,{children:"Market-Based Valuation (Venture Capital Method)"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-5 w-5 text-muted-foreground cursor-help"})}),o.jsxs(Ee,{className:"max-w-md",children:[o.jsx("p",{className:"font-semibold mb-2",children:"Venture Capital Method Overview"}),o.jsx("p",{children:"The VC Method works backwards from a projected exit value to determine current valuation. It calculates what investors need to pay today to achieve their target return (IRR) at exit. The process: (1) Project future revenue/EBITDA at exit, (2) Apply market multiples to estimate exit value, (3) Discount back to present value using target IRR, (4) Adjust for future dilution from subsequent funding rounds. This method is widely used by VCs because it directly ties valuation to expected returns and accounts for the full capital structure."})]})]})]}),o.jsx(Dt,{children:"Calculate valuation based on expected exit value and required returns"}),o.jsxs("div",{className:"flex flex-wrap gap-6 pt-4 border-t mt-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"revenueMultiple",checked:g,onCheckedChange:U=>f({useRevenueMultiple:U})}),o.jsx("label",{htmlFor:"revenueMultiple",className:"text-sm font-medium leading-none cursor-pointer",children:"Revenue Multiple"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"ebitdaMultiple",checked:v,onCheckedChange:U=>f({useEbitdaMultiple:U})}),o.jsx("label",{htmlFor:"ebitdaMultiple",className:"text-sm font-medium leading-none cursor-pointer",children:"EBITDA Multiple"})]})]})]}),o.jsxs(pt,{className:"space-y-6",children:[z.length>0&&o.jsxs(ml,{variant:"destructive",children:[o.jsx(wu,{className:"h-4 w-4"}),o.jsx(gl,{children:"Market-Based inputs need attention"}),o.jsx(vl,{children:o.jsxs("ul",{className:"list-disc pl-5 space-y-1 text-sm mt-2",children:[z.slice(0,8).map((U,ee)=>o.jsx("li",{children:U},ee)),z.length>8&&o.jsxs("li",{children:["…and ",z.length-8," more."]})]})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"Exit Scenario"}),o.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"exitYear",children:"Select Exit Year"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The year when you expect to exit the investment (typically through acquisition or IPO)"})})]})]}),o.jsx(Gr,{id:"exitYear",type:"number",min:"1",max:a,value:m,onChange:U=>f({exitYear:Number(U.target.value)}),placeholder:"5",rules:{min:1,max:a,hint:`Between 1 and ${a}`}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"revenueMultipleInput",children:"Revenue Multiple"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The multiple of revenue used to estimate exit value. Varies by industry (e.g., SaaS companies: 5-15x)"})})]})]}),o.jsx(Gr,{id:"revenueMultipleInput",type:"number",step:"0.1",value:d,onChange:U=>f({revenueMultiple:Number(U.target.value)}),placeholder:"3",rules:{min:0,max:50,hint:"SaaS: 5–15×, traditional: 1–3×"}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"ebitdaMultipleInput",children:"EBITDA Multiple"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The multiple of EBITDA (Earnings Before Interest, Taxes, Depreciation, and Amortization) used to estimate exit value"})})]})]}),o.jsx(Gr,{id:"ebitdaMultipleInput",type:"number",step:"0.1",value:h,onChange:U=>f({ebitdaMultiple:Number(U.target.value)}),placeholder:"10",rules:{min:0,max:50,hint:"Typical: 5–15× depending on industry"}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(qe,{htmlFor:"targetReturn",children:"Target Annual Return (IRR %)"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The Internal Rate of Return (IRR) expected by investors, typically 30-60% for early-stage ventures"})})]})]}),o.jsx(Gr,{id:"targetReturn",type:"number",value:p,onChange:U=>f({targetReturn:Number(U.target.value)}),placeholder:"40",className:"text-center",suffix:"%",rules:{min:0,max:200,hint:"Early-stage VC: 30–60% IRR"}})]})]}),o.jsx(KI,{projections:n,numYears:a,onApplyIRR:U=>f({targetReturn:U})}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"bg-secondary/10 p-4 rounded-lg",children:[o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Year ",m," Revenue (from projections)"]}),o.jsx("p",{className:"text-lg font-semibold",children:ne(b,r)}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Revenue-based value: ",ne(M,r)]})]}),o.jsxs("div",{className:"bg-secondary/10 p-4 rounded-lg",children:[o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Year ",m," EBITDA (from projections)"]}),o.jsx("p",{className:"text-lg font-semibold",children:ne(P,r)}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["EBITDA-based value: ",ne(k,r)]})]})]}),o.jsxs("div",{className:"bg-primary/5 p-4 rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[o.jsxs("p",{className:"text-sm font-medium",children:["Expected Exit Value ",E.length>1?"(Average)":"",":"]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:E.length>1?"Average of the selected valuation methods at exit":"Valuation based on the selected method at exit"})})]})]}),E.length>0?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-2xl font-bold text-primary",children:ne($,r)}),E.length>1&&o.jsxs("div",{className:"text-xs text-muted-foreground mt-2 space-y-1",children:[g&&o.jsxs("p",{children:["Revenue-based: ",ne(M,r)]}),v&&o.jsxs("p",{children:["EBITDA-based: ",ne(k,r)]})]})]}):o.jsx("p",{className:"text-sm text-muted-foreground",children:"Please select at least one valuation method above"})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"bg-gradient-to-br from-primary/10 to-secondary/10 p-6 rounded-lg space-y-4",children:[o.jsx("h3",{className:"text-xl font-bold",children:"Valuation Summary"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"bg-background/50 p-4 rounded-lg",children:[o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Exit Value (Year ",m,")"]}),o.jsx("p",{className:"text-xl font-semibold",children:ne($,r)})]}),o.jsxs("div",{className:"bg-background/50 p-4 rounded-lg border-l-4 border-warning",children:[o.jsx("p",{className:"text-sm font-semibold text-foreground mb-3",children:"Dilution Impact Analysis"}),o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Initial Ownership:"}),o.jsxs("span",{className:"font-medium",children:[D.toFixed(2),"%"]})]}),l.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Ownership After Dilution:"}),o.jsxs("span",{className:"font-medium",children:[O.toFixed(2),"%"]})]}),o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Total Dilution:"}),o.jsxs("span",{className:"font-medium text-warning",children:["-",(D-O).toFixed(2),"%"]})]}),o.jsx(Xt,{className:"my-2"})]}),o.jsxs("div",{className:"flex justify-between",children:[o.jsx("span",{className:"text-muted-foreground",children:"Investor Exit Value:"}),o.jsx("span",{className:"font-semibold",children:ne(T,r)})]}),o.jsx("div",{className:"flex justify-between text-xs",children:o.jsxs("span",{className:"text-muted-foreground",children:["(",O.toFixed(2),"% of ",ne($,r),")"]})})]})]}),o.jsxs("div",{className:"bg-background/50 p-4 rounded-lg",children:[o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Post-Money Valuation (Discounted at ",p,"% IRR)"]}),o.jsx("p",{className:"text-xl font-semibold text-secondary",children:ne(G,r)}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Discounted from exit value of ",ne($,r)," over ",m," years"]})]}),o.jsxs("div",{className:"bg-background/50 p-4 rounded-lg",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Less: Investment Amount"}),o.jsxs("p",{className:"text-xl font-semibold",children:["-",ne(i,r)]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"bg-primary/10 p-4 rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[o.jsx("p",{className:"text-sm font-medium",children:"Pre-Money Valuation:"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The maximum price an investor should pay today to achieve their target return, given the expected exit value and dilution"})})]})]}),o.jsx("p",{className:"text-2xl font-bold text-primary",children:ne(K,r)})]})]})]})]})]})})})},Gq=({onValueChange:e,numYears:t,projections:r,currency:n,state:a,onStateChange:i})=>{const s=A=>{i({...a,...A})},{discountRate:l,terminalGrowthRate:c,defaultRisk:u,totalDebt:f,cashAndEquivalents:d}=a,h=A=>{const O=A.grossProfitOverride!=null?A.grossProfitOverride:A.revenue*(A.grossMargin/100),M=A.sgaOverride!=null?A.sgaOverride:A.revenue*(A.sgaPercent/100),k=A.rdOverride!=null?A.rdOverride:A.revenue*(A.rdPercent/100),E=A.ebitdaOverride!=null?A.ebitdaOverride:O-M-k,$=A.depreciationOverride!=null?A.depreciationOverride:A.revenue*(A.depreciationPercent/100),T=A.amortizationOverride!=null?A.amortizationOverride:A.revenue*(A.amortizationPercent/100),R=A.ebitOverride!=null?A.ebitOverride:E-$-T,B=A.revenue*(A.workingCapitalPercent/100),F=A.revenue*(A.capexPercent/100),D=A.taxRate;return{ebitda:E,depreciation:$,amortization:T,ebit:R,workingCapital:B,capex:F,revenue:A.revenue,taxRate:D}},m=r.slice(0,t).map(A=>h(A)),p=A=>{if(!A)return console.warn("[DCF] calculateFCF received undefined yearly data — returning 0. Projections may be shorter than numYears."),0;const O=Number.isFinite(A.ebit)?A.ebit:0,M=Number.isFinite(A.taxR
403ate)?A.taxRate:0,k=Number.isFinite(A.depreciation)?A.depreciation:0,E=Number.isFinite(A.amortization)?A.amortization:0,$=Number.isFinite(A.capex)?A.capex:0,T=Number.isFinite(A.workingCapital)?A.workingCapital:0;return(!Number.isFinite(A.ebit)||!Number.isFinite(A.taxRate)||!Number.isFinite(A.depreciation)||!Number.isFinite(A.amortization)||!Number.isFinite(A.capex)||!Number.isFinite(A.workingCapital))&&console.warn("[DCF] calculateFCF received partially missing fields — substituting 0 for missing values.",A),O-O*(M/100)+k+E-$-T},g=w.useMemo(()=>{const A=[];[["Discount Rate (WACC)",l],["Terminal Growth Rate",c],["Default Risk",u],["Total Debt",f],["Cash & Equivalents",d]].forEach(([k,E])=>{(E==null||!Number.isFinite(E))&&A.push(`${k} is missing or not a finite number.`)}),Number.isFinite(l)&&Number.isFinite(c)&&l<=c&&A.push("Discount Rate must be greater than Terminal Growth Rate (otherwise terminal value is undefined)."),r.length<t&&A.push(`Projections cover only ${r.length} year(s) but ${t} are required.`);const M=["revenue","grossMargin","sgaPercent","rdPercent","depreciationPercent","amortizationPercent","workingCapitalPercent","capexPercent","taxRate"];return r.slice(0,t).forEach((k,E)=>{if(!k){A.push(`Year ${E+1}: projection data is missing.`);return}const $=M.filter(T=>!Number.isFinite(k[T]));$.length&&A.push(`Year ${E+1}: missing or non-finite ${$.join(", ")}.`)}),m.forEach((k,E)=>{k&&["ebit","depreciation","amortization","capex","workingCapital","taxRate"].forEach($=>{Number.isFinite(k[$])||A.push(`Year ${E+1}: derived ${$} is non-finite.`)})}),A},[l,c,u,f,d,r,t,m]),v=m.map((A,O)=>{const M=p(A),k=M/Math.pow(1+l/100,O+1);return{fcf:M,pv:k,year:O+1}}),y=v.reduce((A,O)=>A+O.pv,0),S=p(m[t-1])*(1+c/100)/(l/100-c/100)/Math.pow(1+l/100,t),j=y+S,C=j*(1-u/100),N=f-d,P=C-N;return w.useEffect(()=>{e(P)},[P,e]),o.jsx(nn,{children:o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ht,{children:"Intrinsic Based Valuation (Unlevered DCF Model)"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-5 w-5 text-muted-foreground cursor-help"})}),o.jsxs(Ee,{className:"max-w-md",children:[o.jsx("p",{className:"font-semibold mb-2",children:"Unlevered DCF (Discounted Cash Flow) Overview"}),o.jsx("p",{children:'The DCF method determines intrinsic value b
403y forecasting future free cash flows and discounting them to present value using WACC (Weighted Average Cost of Capital). This "unlevered" approach values the entire firm independent of capital structure. Process: (1) Project Free Cash Flow to Firm (FCFF) for each year, (2) Calculate terminal value for cash flows beyond projection period, (3) Discount all cash flows to present value, (4) Subtract net debt to arrive at equity value. Most theoretically sound method but sensitive to assumptions.'})]})]})]}),o.jsx(Dt,{children:"Intrinsic value based on Free Cash Flow to Firm (FCFF) - independent of capital structure"})]}),o.jsxs(pt,{className:"space-y-6",children:[g.length>0&&o.jsxs(ml,{variant:"destructive",children:[o.jsx(wu,{className:"h-4 w-4"}),o.jsx(gl,{children:"DCF inputs need attention"}),o.jsxs(vl,{children:[o.jsx("p",{className:"mb-2",children:"The following issues were detected. Calculations will continue with 0 substituted for missing values, but results may be unreliable:"}),o.jsxs("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:[g.slice(0,10).map((A,O)=>o.jsx("li",{children:A},O)),g.length>10&&o.jsxs("li",{children:["…and ",g.length-10," more."]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"Model Parameters"}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"discountRate",children:"Discount Rate (WACC) %"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Weighted Average Cost of Capital (WACC) - the blended cost of debt and equity capital. Typical range: 8-15% for startups, 6-10% for established companies."})})]})]}),o.jsx(Gr,{id:"discountRate",type:"number",step:"0.1",value:l,onChange:A=>s({discountRate:Number(A.target.value)}),className:"text-center",suffix:"%",rules:{min:0,max:100,hint:"Typical: 12–20% startups, 6–10% established"}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"terminalGrowthRate",children:"Terminal Growth Rate %"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Long-term perpetual growth rate after the projection period. Should be conservative (typically 2-3%) and not exceed GDP growth rate."})})]})]}),o.jsx(Gr,{id:"terminalGrowthRate",type:"number",step:"0.1",value:c,onChange:A=>s({terminalGrowthRate:Number(A.target.value)}),className:"text-center",suffix:"%",rules:{min:0,max:10,hint:"Typical: 2–3%, should not exceed GDP growth"}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"defaultRisk",children:"Default Risk %"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Probability of business failure adjustment. Higher for early-stage companies (60-80%), lower for established firms (10-30%)."})})]})]}),o.jsx(Gr,{id:"defaultRisk",type:"number",step:"1",value:u,onChange:A=>s({defaultRisk:Number(A.target.value)}),className:"text-center",suffix:"%",rules:{min:0,max:100,hint:"Early-stage: 60–80%, established: 10–30%"}})]})]}),o.jsx(KI,{projections:r,numYears:t,onApplyWACC:A=>s({discountRate:A})}),o.jsxs("div",{className:"flex items-center gap-2 mt-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"Net Debt Calculation"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Net Debt = Total Debt - Cash. Used to bridge from Enterprise Value to Equity Value. Enterprise Value represents all stakeholders; subtract net debt to get value for equity holders."})})]})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"totalDebt",children:"Total Debt"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"All interest-bearing liabilities including short-term and long-term debt, bonds, and credit facilities."})})]})]}),o.jsx(Gr,{id:"totalDebt",type:"number",step:"1000",value:f,onChange:A=>s({totalDebt:Number(A.target.value)}),className:"text-right",rules:{min:0}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"cashAndEquivalents",children:"Cash & Equivalents"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Liquid assets including cash, bank deposits, and marketable securities that can be quickly converted to cash."})})]})]}),o.jsx(Gr,{id:"cashAndEquivalents",type:"number",step:"1000",value:d,onChange:A=>s({cashAndEquivalents:Number(A.target.value)}),className:"text-right",rules:{min:0}})]})]}),o.jsx("div",{className:"bg-muted/50 p-4 rounded-lg",children:o.jsxs("p",{className:"text-sm text-muted-foreground",children:[o.jsx("strong",{children:"Note:"})," This is an ",o.jsx("strong",{children:"Unlevered DCF"})," model that calculates Free Cash Flow to Firm (FCFF). It values the enterprise independent of capital structure by using NOPAT (excluding interest effects) and discounting at WACC. Metrics like EBITDA, C
403apEx, Working Capital changes, and Tax Rates are automatically calculated from the Projections tab. The Default Risk percentage adjusts the final enterprise value to account for the probability of business failure."]})})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"Calculated Cash Flows (from Projections)"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Free Cash Flow to Firm (FCFF) = NOPAT + D&A - CapEx - Δ Working Capital. This represents cash available to all capital providers (debt and equity)."})})]})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full border-collapse",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b",children:[o.jsx("th",{className:"text-left p-2 font-medium",children:"Metric"}),Array.from({length:t},(A,O)=>o.jsxs("th",{className:"text-center p-2 font-medium",children:["Year ",O+1]},O))]})}),o.jsxs("tbody",{children:[o.jsxs("tr",{className:"border-b bg-muted/30",children:[o.jsx("td",{className:"p-2 font-medium",children:"Revenue"}),m.map((A,O)=>o.jsx("td",{className:"p-2 text-center font-semibold",children:ne(A.revenue,n)},O))]}),o.jsxs("tr",{className:"border-b bg-muted/30",children:[o.jsx("td",{className:"p-2 font-medium",children:"EBITDA"}),m.map((A,O)=>o.jsx("td",{className:"p-2 text-center font-semibold",children:ne(A.ebitda,n)},O))]}),o.jsxs("tr",{className:"border-b bg-muted/30",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-muted-foreground",children:"− Depreciation"}),m.map((A,O)=>o.jsxs("td",{className:"p-2 text-center text-muted-foreground",children:["(",ne(A.depreciation,n),")"]},O))]}),o.jsxs("tr",{className:"border-b bg-muted/30",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-muted-foreground",children:"− Amortization"}),m.map((A,O)=>o.jsxs("td",{className:"p-2 text-center text-muted-foreground",children:["(",ne(A.amortization,n),")"]},O))]}),o.jsxs("tr",{className:"border-b bg-muted/30",children:[o.jsx("td",{className:"p-2 font-semibold",children:"EBIT"}),m.map((A,O)=>o.jsx("td",{className:"p-2 text-center font-semibold",children:ne(A.ebit,n)},O))]}),o.jsxs("tr",{className:"border-b bg-muted/30",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-muted-foreground",children:"− Tax"}),m.map((A,O)=>o.jsxs("td",{className:"p-2 text-center text-muted-foreground",children:["(",ne(A.ebit*(A.taxRate/100),n),")"]},O))]}),o.jsxs("tr",{className:"border-b bg-accent/20",children:[o.jsxs("td",{className:"p-2 font-semibold flex items-center gap-2",children:["NOPAT",o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3 w-3 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:"Net Operating Profit After Tax - operating profit without financing effects"})})]})]}),m.map((A,O)=>{const M=A.ebit*(A.taxRate/100),k=A.ebit-M;return o.jsx("td",{className:"p-2 text-center font-semibold",children:ne(k,n)},O)})]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-success",children:"+ Depreciation"}),m.map((A,O)=>o.jsx("td",{className:"p-2 text-center text-success",children:ne(A.depreciation,n)},O))]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-success",children:"+ Amortization"}),m.map((A,O)=>o.jsx("td",{className:"p-2 text-center text-success",children:ne(A.amortization,n)},O))]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-destructive",children:"− CapEx"}),m.map((A,O)=>o.jsxs("td",{className:"p-2 text-center text-destructive",children:["(",ne(A.capex,n),")"]},O))]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-2 font-medium pl-6 text-destructive",children:"− Δ Working Capital"}),m.map((A,O)=>o.jsxs("td",{className:"p-2 text-center text-destructive",children:["(",ne(A.workingCapital,n),")"]},O))]}),o.jsxs("tr",{className:"border-b bg-primary/10",children:[o.jsx("td",{className:"p-2 font-bold",children:"FCFF"}),v.map((A,O)=>o.jsx("td",{className:"p-2 text-center font-bold",children:ne(A.fcf,n)},O))]}),o.jsxs("tr",{className:"bg-primary/5",children:[o.jsx("td",{className:"p-2 font-semibold",children:"Present Value"}),v.map((A,O)=>o.jsx("td",{className:"p-2 text-center font-semibold text-primary",children:ne(A.pv,n)},O))]})]})]})})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"bg-gradient-to-br from-primary/10 to-secondary/10 p-6 rounded-lg space-y-4",children:[o.jsx("h3",{className:"text-xl font-bold",children:"DCF Valuation Summary"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"PV of Projected Cash Flows:"}),o.jsx("span",{className:"font-semibold",children:ne(y,n)})]}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Terminal Value (PV):"}),o.jsx("span",{className:"font-semibold",children:ne(S,n)})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"font-medium",children:"Enterprise Value:"}),o.jsx("span",{className:"font-bold text-lg",children:ne(j,n)})]}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("span",{children:["Default Risk Adjustment (",u,"%):"]}),o.jsxs("span",{className:"font-semibold text-destructive",children:["-",ne(j-C,n)]})]}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"font-medium",children:"Adjusted Enterprise Value:"}),o.jsx("span",{className:"font-bold text-lg",children:ne(C,n)})]}),o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{children:"Less: Net Debt:"}),o.jsx("span",{className:"font-semibold",children:ne(N,n)})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"flex justify-between items-center bg-primary/10 p-3 rounded-lg",children:[o.jsx("span",{className:"font-bold text-lg",children:"Equity Value (DCF):"}),o.jsx("span",{className:"font-bold text-primary text-2xl",children:ne(P,n)})]})]})]})]})]})})})};var Hq=Array.isArray,mn=Hq,qq=typeof $h=="object"&&$h&&$h.Object===Object&&$h,YI=qq,Kq=YI,Yq=typeof self=="object"&&self&&self.Object===Object&&self,Xq=Kq||Yq||Function("return this")(),mi=Xq,Zq=mi,Qq=Zq.Symbol,jh=Qq,mA=jh,XI=Object.prototype,Jq=XI.hasOwnProperty,eK=XI.toString,od=mA?mA.toStringTag:void 0;function tK(e){var t=Jq.call(e,od),r=e[od];try{e[od]=void 0;var n=!0}catch{}var a=eK.call(e);return n&&(t?e[od]=r:delete e[od]),a}var rK=tK,nK=Object.prototype,aK=nK.toString;function iK(e){return aK.call(e)}var oK=iK,gA=jh,sK=rK,lK=oK,cK="[object Null]",uK="[object Undef
403ined]",vA=gA?gA.toStringTag:void 0;function dK(e){return e==null?e===void 0?uK:cK:vA&&vA in Object(e)?sK(e):lK(e)}var Ji=dK;function fK(e){return e!=null&&typeof e=="object"}var eo=fK,hK=Ji,pK=eo,mK="[object Symbol]";function gK(e){return typeof e=="symbol"||pK(e)&&hK(e)==mK}var Eu=gK,vK=mn,yK=Eu,xK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bK=/^\w*$/;function wK(e,t){if(vK(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||yK(e)?!0:bK.test(e)||!xK.test(e)||t!=null&&e in Object(t)}var hS=wK;function jK(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var os=jK;const _u=vt(os);var SK=Ji,CK=os,NK="[object AsyncFunction]",PK="[object Function]",AK="[object GeneratorFunction]",kK="[object Proxy]";function OK(e){if(!CK(e))return!1;var t=SK(e);return t==PK||t==AK||t==NK||t==kK}var pS=OK;const Je=vt(pS);var EK=mi,_K=EK["__core-js_shared__"],TK=_K,Ox=TK,yA=function(){var e=/[^.]+$/.exec(Ox&&Ox.keys&&Ox.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function MK(e){return!!yA&&yA in e}var RK=MK,$K=Function.prototype,IK=$K.toString;function DK(e){if(e!=null){try{return IK.call(e)}catch{}try{return e+""}catch{}}return""}var ZI=DK,FK=pS,LK=RK,BK=os,zK=ZI,VK=/[\\^$.*+?()[\]{}|]/g,WK=/^\[object .+?Constructor\]$/,UK=Function.prototype,GK=Object.prototype,HK=UK.toString,qK=GK.hasOwnProperty,KK=RegExp("^"+HK.call(qK).replace(VK,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function YK(e){if(!BK(e)||LK(e))return!1;var t=FK(e)?KK:WK;return t.test(zK(e))}var XK=YK;function ZK(e,t){return e==null?void 0:e[t]}var QK=ZK,JK=XK,eY=QK;function tY(e,t){var r=eY(e,t);return JK(r)?r:void 0}var yl=tY,rY=yl,nY=rY(Object,"create"),Iv=nY,xA=Iv;function aY(){this.__data__=xA?xA(null):{},this.size=0}var iY=aY;function oY(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sY=oY,lY=Iv,cY="__lodash_hash_undefined__",uY=Object.prototype,dY=uY.hasOwnProperty;function fY(e){var t=this.__data__;if(lY){var r=t[e];return r===cY?void 0:r}return dY.call(t,e)?t[e]:void 0}var hY=fY,pY=Iv,mY=Object.prototype,gY=mY.hasOwnProperty;function vY(e){var t=this.__data__;return pY?t[e]!==void 0:gY.call(t,e)}var yY=vY,xY=Iv,bY="__lodash_hash_undefined__";function wY(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xY&&t===void 0?bY:t,this}var jY=wY,SY=iY,CY=sY,NY=hY,PY=yY,AY=jY;function Tu(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])}}Tu.prototype.clear=SY;Tu.prototype.delete=CY;Tu.prototype.get=NY;Tu.prototype.has=PY;Tu.prototype.set=AY;var kY=Tu;function OY(){this.__data__=[],this.size=0}var EY=OY;function _Y(e,t){return e===t||e!==e&&t!==t}var mS=_Y,TY=mS;function MY(e,t){for(var r=e.length;r--;)if(TY(e[r][0],t))return r;return-1}var Dv=MY,RY=Dv,$Y=Array.prototype,IY=$Y.splice;function DY(e){var t=this.__data__,r=RY(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():IY.call(t,r,1),--this.size,!0}var FY=DY,LY=Dv;function BY(e){var t=this.__data__,r=LY(t,e);return r<0?void 0:t[r][1]}var zY=BY,VY=Dv;function WY(e){return VY(this.__data__,e)>-1}var UY=WY,GY=Dv;function HY(e,t){var r=this.__data__,n=GY(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var qY=HY,KY=EY,YY=FY,XY=zY,ZY=UY,QY=qY;function Mu(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])}}Mu.prototype.clear=KY;Mu.prototype.delete=YY;Mu.prototype.get=XY;Mu.prototype.has=ZY;Mu.prototype.set=QY;var Fv=Mu,JY=yl,eX=mi,tX=JY(eX,"Map"),gS=tX,bA=kY,rX=Fv,nX=gS;function aX(){this.size=0,this.__data__={hash:new bA,map:new(nX||rX),string:new bA}}var iX=aX;function oX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var sX=oX,lX=sX;function cX(e,t){var r=e.__data__;return lX(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Lv=cX,uX=Lv;function dX(e){var t=uX(this,e).delete(e);return this.size-=t?1:0,t}var fX=dX,hX=Lv;function pX(e){return hX(this,e).get(e)}var mX=pX,gX=Lv;function vX(e){return gX(this,e).has(e)}var yX=vX,xX=Lv;function bX(e,t){var r=xX(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var wX=bX,jX=iX,SX=fX,CX=mX,NX=yX,PX=wX;function Ru(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])}}Ru.prototype.clear=jX;Ru.prototype.delete=SX;Ru.prototype.get=CX;Ru.prototype.has=NX;Ru.prototype.set=PX;var vS=Ru,QI=vS,AX="Expected a function";function yS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(AX);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(yS.Cache||QI),r}yS.Cache=QI;var JI=yS;const kX=vt(JI);var OX=JI,EX=500;function _X(e){var t=OX(e,function(n){return r.size===EX&&r.clear(),n}
403),r=t.cache;return t}var TX=_X,MX=TX,RX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$X=/\\(\\)?/g,IX=MX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(RX,function(r,n,a,i){t.push(a?i.replace($X,"$1"):n||r)}),t}),DX=IX;function FX(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var xS=FX,wA=jh,LX=xS,BX=mn,zX=Eu,VX=1/0,jA=wA?wA.prototype:void 0,SA=jA?jA.toString:void 0;function eD(e){if(typeof e=="string")return e;if(BX(e))return LX(e,eD)+"";if(zX(e))return SA?SA.call(e):"";var t=e+"";return t=="0"&&1/e==-VX?"-0":t}var WX=eD,UX=WX;function GX(e){return e==null?"":UX(e)}var tD=GX,HX=mn,qX=hS,KX=DX,YX=tD;function XX(e,t){return HX(e)?e:qX(e,t)?[e]:KX(YX(e))}var rD=XX,ZX=Eu,QX=1/0;function JX(e){if(typeof e=="string"||ZX(e))return e;var t=e+"";return t=="0"&&1/e==-QX?"-0":t}var Bv=JX,eZ=rD,tZ=Bv;function rZ(e,t){t=eZ(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[tZ(t[r++])];return r&&r==n?e:void 0}var bS=rZ,nZ=bS;function aZ(e,t,r){var n=e==null?void 0:nZ(e,t);return n===void 0?r:n}var nD=aZ;const Xn=vt(nD);function iZ(e){return e==null}var oZ=iZ;const st=vt(oZ);var sZ=Ji,lZ=mn,cZ=eo,uZ="[object String]";function dZ(e){return typeof e=="string"||!lZ(e)&&cZ(e)&&sZ(e)==uZ}var fZ=dZ;const nl=vt(fZ);var aD={exports:{}},At={};/**
404 * @license React
405 * react-is.production.min.js
406 *
407 * Copyright (c) Facebook, Inc. and its affiliates.
408 *
409 * This source code is licensed under the MIT license found in the
410 * LICENSE file in the root directory of this source tree.
411 */var wS=Symbol.for("react.element"),jS=Symbol.for("react.portal"),zv=Symbol.for("react.fragment"),Vv=Symbol.for("react.strict_mode"),Wv=Symbol.for("react.profiler"),Uv=Symbol.for("react.provider"),Gv=Symbol.for("react.context"),hZ=Symbol.for("react.server_context"),Hv=Symbol.for("react.forward_ref"),qv=Symbol.for("react.suspense"),Kv=Symbol.for("react.suspense_list"),Yv=Symbol.for("react.memo"),Xv=Symbol.for("react.lazy"),pZ=Symbol.for("react.offscreen"),iD;iD=Symbol.for("react.module.reference");function aa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case wS:switch(e=e.type,e){case zv:case Wv:case Vv:case qv:case Kv:return e;default:switch(e=e&&e.$$typeof,e){case hZ:case Gv:case Hv:case Xv:case Yv:case Uv:return e;default:return t}}case jS:return t}}}At.ContextConsumer=Gv;At.ContextProvider=Uv;At.Element=wS;At.ForwardRef=Hv;At.Fragment=zv;At.Lazy=Xv;At.Memo=Yv;At.Portal=jS;At.Profiler=Wv;At.StrictMode=Vv;At.Suspense=qv;At.SuspenseList=Kv;At.isAsyncMode=function(){return!1};At.isConcurrentMode=function(){return!1};At.isContextConsumer=function(e){return aa(e)===Gv};At.isContextProvider=function(e){return aa(e)===Uv};At.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===wS};At.isForwardRef=function(e){return aa(e)===Hv};At.isFragment=function(e){return aa(e)===zv};At.isLazy=function(e){return aa(e)===Xv};At.isMemo=function(e){return aa(e)===Yv};At.isPortal=function(e){return aa(e)===jS};At.isProfiler=function(e){return aa(e)===Wv};At.isStrictMode=function(e){return aa(e)===Vv};At.isSuspense=function(e){return aa(e)===qv};At.isSuspenseList=function(e){return aa(e)===Kv};At.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zv||e===Wv||e===Vv||e===qv||e===Kv||e===pZ||typeof e=="object"&&e!==null&&(e.$$typeof===Xv||e.$$typeof===Yv||e.$$typeof===Uv||e.$$typeof===Gv||e.$$typeof===Hv||e.$$typeof===iD||e.getModuleId!==void 0)};At.typeOf=aa;aD.exports=At;var mZ=aD.exports,gZ=Ji,vZ=eo,yZ="[object Number]";function xZ(e){return typeof e=="number"||vZ(e)&&gZ(e)==yZ}var oD=xZ;const bZ=vt(oD);var wZ=oD;function jZ(e){return wZ(e)&&e!=+e}var SZ=jZ;const $u=vt(SZ);var Ea=function(t){return t===0?0:t>0?1:-1},ks=function(t){return nl(t)&&t.indexOf("%")===t.length-1},Ne=function(t){return bZ(t)&&!$u(t)},CZ=function(t){return st(t)},dr=function(t){return Ne(t)||nl(t)},NZ=0,Iu=function(t){var r=++NZ;return"".concat(t||"").concat(r)},_a=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&!nl(t))return n;var i;if(ks(t)){var s=t.indexOf("%");i=r*parseFloat(t.slice(0,s))/100}
vendor: 5,299 bytes, line 411
411else i=+t;return $u(i)&&(i=n),a&&i>r&&(i=r),i},xo=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},PZ=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Zt=function(t,r){return Ne(t)&&Ne(r)?function(n){return t+n*(r-t)}:function(){return r}};function km(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Xn(n,t))===r})}var AZ=function(t,r){return Ne(t)&&Ne(r)?t-r:nl(t)&&nl(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function cc(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 Db(e){"@babel/helpers - typeof";return Db=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},Db(e)}var kZ=["viewBox","children"],OZ=["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"],CA=["points","pathLength"],Ex={svg:kZ,polygon:CA,polyline:CA},SS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
411ocus","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"],Om=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(w.isValidElement(t)&&(n=t.props),!_u(n))return null;var a={};return Object.keys(n).forEach(function(i){SS.includes(i)&&(a[i]=r||function(s){return n[i](n,s)})}),a},EZ=function(t,r,n){return function(a){return t(r,n,a),null}},$c=function(t,r,n){if(!_u(t)||Db(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var s=t[i];SS.includes(i)&&typeof s=="function"&&(a||(a={}),a[i]=EZ(s,r,n))}),a},_Z=["children"],TZ=["children"];function NA(e,t){if(e==null)return{};var r=MZ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MZ(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 Fb(e){"@babel/helpers - typeof";return Fb=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},Fb(e)}var PA={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"}
vendor: 4,229 bytes, line 411
411,Di=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},AA=null,_x=null,CS=function e(t){if(t===AA&&Array.isArray(_x))return _x;var r=[];return w.Children.forEach(t,function(n){st(n)||(mZ.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),_x=r,AA=t,r};function Zn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Di(a)}):n=[Di(t)],CS(e).forEach(function(a){var i=Xn(a,"type.displayName")||Xn(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function jn(e,t){var r=Zn(e,t);return r&&r[0]}var kA=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Ne(n)||n<=0||!Ne(a)||a<=0)},RZ=["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"],$Z=function(t){return t&&t.type&&nl(t.type)&&RZ.indexOf(t.type)>=0},sD=function(t){return t&&Fb(t)==="object"&&"clipDot"in t},IZ=function(t,r,n,a){var i,s=(i=Ex==null?void 0:Ex[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!Je(t)&&(a&&s.includes(r)||OZ.includes(r))||n&&SS.includes(r)},He=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(w.isValidElement(t)&&(a=t.props),!_u(a))return null;var i={};return Object.keys(a).forEach(function(s){var l;IZ((l=a)===null||l===void 0?void 0:l[s],s,r,n)&&(i[s]=a[s])}),i},Lb=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 OA(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],s=r[a];if(Array.isArray(i)||Array.isArray(s)){if(!e(i,s))return!1}else if(!OA(i,s))return!1}return!0},OA=function(t,r){if(st(t)&&st(r))return!0;if(!st(t)&&!st(r)){var n=t.props||{},a=n.children,i=NA(n,_Z),s=r.props||{},l=s.children,c=NA(s,TZ);return a&&l?cc(i,c)&&Lb(a,l):!a&&!l?cc(i,c):!1}return!1},EA=function(t,r){var n=[],a={};return CS(t).forEach(function(i,s){if($Z(i))n.push(i);else if(i){var l=Di(i.type),c=r[l]||{},u=c.handler,f=c.once;if(u&&(!f||!a[l])){var d=u(i,l,s);n.push(d),a[l]=!0}}}),n},DZ=function(t){var r=t&&t.type;return r&&PA[r]?PA[r]:null},FZ=function(t,r){return CS(r).indexOf(t)},LZ=["children","width","height","viewBox","className","style","title","desc"];function Bb(){return Bb=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},Bb.apply(this,arguments)}function BZ(e,t){if(e==null)return{};var r=zZ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zZ(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 zb(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,s=e.style,l=e.title,c=e.desc,u=BZ(e,LZ),f=a||{width:r,height:n,x:0,y:0},d=at("recharts-surface",i);return _.createElement("svg",Bb({},He(u,!0,"svg"),{className:d,width:r,height:n,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,l),_.createElement("desc",null,c),t)}var VZ=["children","className"];function Vb(){return Vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
411for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vb.apply(this,arguments)}function WZ(e,t){if(e==null)return{};var r=UZ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UZ(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 mt=_.forwardRef(function(e,t){var r=e.children,n=e.className,a=WZ(e,VZ),i=at("recharts-layer",n);return _.createElement("g",Vb({className:i},He(a,!0),{ref:t}),r)}),Fi=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]};function GZ(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var HZ=GZ,qZ=HZ;function KZ(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:qZ(e,t,r)}var YZ=KZ,XZ="\\ud800-\\udfff",ZZ="\\u0300-\\u036f",QZ="\\ufe20-\\ufe2f",JZ="\\u20d0-\\u20ff",eQ=ZZ+QZ+JZ,tQ="\\ufe0e\\ufe0f",rQ="\\u200d",nQ=RegExp("["+rQ+XZ+eQ+tQ+"]");function aQ(e){return nQ.test(e)}var lD=aQ;function iQ(e){return e.split("")}var oQ=iQ,cD="\\ud800-\\udfff",sQ="\\u0300-\\u036f",lQ="\\ufe20-\\ufe2f",cQ="\\u20d0-\\u20ff",uQ=sQ+lQ+cQ,dQ="\\ufe0e\\ufe0f",fQ="["+cD+"]",Wb="["+uQ+"]",Ub="\\ud83c[\\udffb-\\udfff]",hQ="(?:"+Wb+"|"+Ub+")",uD="[^"+cD+"]",dD="(?:\\ud83c[\\udde6-\\uddff]){2}",fD="[\\ud800-\\udbff][\\udc00-\\udfff]",pQ="\\u200d",hD=hQ+"?",pD="["+dQ+"]?",mQ="(?:"+pQ+"(?:"+[uD,dD,fD].join("|")+")"+pD+hD+")*",gQ=pD+hD+mQ,vQ="(?:"+[uD+Wb+"?",Wb,dD,fD,fQ].join("|")+")",yQ=RegExp(Ub+"(?="+Ub+")|"+vQ+gQ,"g");function xQ(e){return e.match(yQ)||[]}var bQ=xQ,wQ=oQ,jQ=lD,SQ=bQ;function CQ(e){return jQ(e)?SQ(e):wQ(e)}var NQ=CQ,PQ=YZ,AQ=lD,kQ=NQ,OQ=tD;function EQ(e){return function(t){t=OQ(t);var r=AQ(t)?kQ(t):void 0,n=r?r[0]:t.charAt(0),a=r?PQ(r,1).join(""):t.slice(1);return n[e]()+a}}var _Q=EQ,TQ=_Q,MQ=TQ("toUpperCase"),RQ=MQ;const Zv=vt(RQ);function _t(e){return function(){return e}}const mD=Math.cos,Em=Math.sin,za=Math.sqrt,_m=Math.PI,Qv=2*_m,Gb=Math.PI,Hb=2*Gb,bs=1e-6,$Q=Hb-bs;function gD(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function IQ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gD;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class DQ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gD:IQ(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,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,l=this._y1,c=n-t,u=a-r,f=s-t,d=l-r,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>bs)if(!(Math.abs(d*c-u*f)>bs)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-s,p=a-l,g=c*c+u*u,v=m*m+p*p,y=Math.sqrt(g),x=Math.sqrt(h),b=i*Math.tan((Gb-Math.acos((g+h-v)/(2*y*x)))/2),S=b/x,j=b/y;Math.abs(S-1)>bs&&this._append`L${t+S*f},${r+S*d}`,this._append`A${i},${i},0,0,${+(d*m>f*p)},${this._x1=t+j*c},${this._y1=r+j*u}`}}arc(t,r,n,a,i,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),c=n*Math.sin(a),u=t+l,f=r+c,d=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>bs||Math.abs(this._y1-f)>bs)&&this._append`L${u},${f}`,n&&(h<0&&(h=h%Hb+Hb),h>$Q?this._append`A${n},${n},0,1,${d},${t-l},${r-c}A${n},${n},0,1,${d},${this._x1=u},${this._y1=f}`:h>bs&&this._append`A${n},${n},0,${+(h>=Gb)},${d},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function NS(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 DQ(t)}function PS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vD(e){this._context=e}vD.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 Jv(e){return new vD(e)}function yD(e){return e[0]}function xD(e){return e[1]}
vendor: 10,966 bytes, line 411
411function bD(e,t){var r=_t(!0),n=null,a=Jv,i=null,s=NS(l);e=typeof e=="function"?e:e===void 0?yD:_t(e),t=typeof t=="function"?t:t===void 0?xD:_t(t);function l(c){var u,f=(c=PS(c)).length,d,h=!1,m;for(n==null&&(i=a(m=s())),u=0;u<=f;++u)!(u<f&&r(d=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(d,u,c),+t(d,u,c));if(m)return i=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:_t(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:_t(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:_t(!!c),l):r},l.curve=function(c){return arguments.length?(a=c,n!=null&&(i=a(n)),l):a},l.context=function(c){return arguments.length?(c==null?n=i=null:i=a(n=c),l):n},l}function cp(e,t,r){var n=null,a=_t(!0),i=null,s=Jv,l=null,c=NS(u);e=typeof e=="function"?e:e===void 0?yD:_t(+e),t=typeof t=="function"?t:_t(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?xD:_t(+r);function u(d){var h,m,p,g=(d=PS(d)).length,v,y=!1,x,b=new Array(g),S=new Array(g);for(i==null&&(l=s(x=c())),h=0;h<=g;++h){if(!(h<g&&a(v=d[h],h,d))===y)if(y=!y)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=h-1;p>=m;--p)l.point(b[p],S[p]);l.lineEnd(),l.areaEnd()}y&&(b[h]=+e(v,h,d),S[h]=+t(v,h,d),l.point(n?+n(v,h,d):b[h],r?+r(v,h,d):S[h]))}if(x)return l=null,x+""||null}function f(){return bD().defined(a).curve(s).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),n=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),u):e},u.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_t(+d),u):n},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),r=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),u):t},u.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_t(+d),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:_t(!!d),u):a},u.curve=function(d){return arguments.length?(s=d,i!=null&&(l=s(i)),u):s},u.context=function(d){return arguments.length?(d==null?i=l=null:l=s(i=d),u):i},u}class wD{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 FQ(e){return new wD(e,!0)}function LQ(e){return new wD(e,!1)}const AS={draw(e,t){const r=za(t/_m);e.moveTo(r,0),e.arc(0,0,r,0,Qv)}},BQ={draw(e,t){const r=za(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()}},jD=za(1/3),zQ=jD*2,VQ={draw(e,t){const r=za(t/zQ),n=r*jD;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},WQ={draw(e,t){const r=za(t),n=-r/2;e.rect(n,n,r,r)}},UQ=.8908130915292852,SD=Em(_m/10)/Em(7*_m/10),GQ=Em(Qv/10)*SD,HQ=-mD(Qv/10)*SD,qQ={draw(e,t){const r=za(t*UQ),n=GQ*r,a=HQ*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const s=Qv*i/5,l=mD(s),c=Em(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},Tx=za(3),KQ={draw(e,t){const r=-za(t/(Tx*3));e.moveTo(0,r*2),e.lineTo(-Tx*r,-r),e.lineTo(Tx*r,-r),e.closePath()}},Mn=-.5,Rn=za(3)/2,qb=1/za(12),YQ=(qb/2+1)*3,XQ={draw(e,t){const r=za(t/YQ),n=r/2,a=r*qb,i=n,s=r*qb+r,l=-i,c=s;e.moveTo(n,a),e.lineTo(i,s),e.lineTo(l,c),e.lineTo(Mn*n-Rn*a,Rn*n+Mn*a),e.lineTo(Mn*i-Rn*s,Rn*i+Mn*s),e.lineTo(Mn*l-Rn*c,Rn*l+Mn*c),e.lineTo(Mn*n+Rn*a,Mn*a-Rn*n),e.lineTo(Mn*i+Rn*s,Mn*s-Rn*i),e.lineTo(Mn*l+Rn*c,Mn*c-Rn*l),e.closePath()}};function ZQ(e,t){let r=null,n=NS(a);e=typeof e=="function"?e:_t(e||AS),t=typeof t=="function"?t:_t(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:_t(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:_t(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Tm(){}function Mm(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 CD(e){this._context=e}CD.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:Mm(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:Mm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QQ(e){return new CD(e)}function ND(e){this._context=e}ND.prototype={areaStart:Tm,areaEnd:Tm,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:Mm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JQ(e){return new ND(e)}function PD(e){this._context=e}PD.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:Mm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eJ(e){return new PD(e)}function AD(e){this._context=e}AD.prototype={areaStart:Tm,areaEnd:Tm,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 tJ(e){return new AD(e)}function _A(e){return e<0?-1:1}function TA(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),s=(r-e._y1)/(a||n<0&&-0),l=(i*a+s*n)/(n+a);return(_A(i)+_A(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function MA(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Mx(e,t,r){var n=e._x0,a=e._y0,i=e._x1,s=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,s-l*r,i,s)}function Rm(e){this._context=e}Rm.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:Mx(this,this._t0,MA(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,Mx(this,MA(this,r=TA(this,e,t)),r);break;default:Mx(this,this._t0,r=TA(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kD(e){this._context=new OD(e)}(kD.prototype=Object.create(Rm.prototype)).point=function(e,t){Rm.prototype.point.call(this,t,e)};function OD(e){this._context=e}OD.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,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function rJ(e){return new Rm(e)}function nJ(e){return new kD(e)}function ED(e){this._context=e}ED.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=RA(e),a=RA(t),i=0,s=1;s<r;++i,++s)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],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 RA(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,s[t]-=n*s[t-1];for(a[r-1]=s[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function aJ(e){return new ED(e)}function ey(e,t){this._context=e,this._t=t}ey.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;
vendor: 9,131 bytes, lines 411-414
411default:{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 iJ(e){return new ey(e,.5)}function oJ(e){return new ey(e,0)}function sJ(e){return new ey(e,1)}function Ic(e,t){if((s=e.length)>1)for(var r=1,n,a,i=e[t[0]],s,l=i.length;r<s;++r)for(a=i,i=e[t[r]],n=0;n<l;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Kb(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function lJ(e,t){return e[t]}function cJ(e){const t=[];return t.key=e,t}function uJ(){var e=_t([]),t=Kb,r=Ic,n=lJ;function a(i){var s=Array.from(e.apply(this,arguments),cJ),l,c=s.length,u=-1,f;for(const d of i)for(l=0,++u;l<c;++l)(s[l][u]=[0,+n(d,s[l].key,u,i)]).data=d;for(l=0,f=PS(t(s));l<c;++l)s[f[l]].index=l;return r(s,f),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:_t(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:_t(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Kb:typeof i=="function"?i:_t(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Ic,a):r},a}function dJ(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,s;a<i;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}Ic(e,t)}}function fJ(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var s=0,l=0;s<a;++s)l+=e[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}Ic(e,t)}}function hJ(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,s;n<i;++n){for(var l=0,c=0,u=0;l<s;++l){for(var f=e[t[l]],d=f[n][1]||0,h=f[n-1][1]||0,m=(d-h)/2,p=0;p<l;++p){var g=e[t[p]],v=g[n][1]||0,y=g[n-1][1]||0;m+=v-y}c+=d,u+=m*d}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,Ic(e,t)}}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 pJ=["type","size","sizeType"];function Yb(){return Yb=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},Yb.apply(this,arguments)}function $A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function IA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$A(Object(r),!0).forEach(function(n){mJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mJ(e,t,r){return t=gJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gJ(e){var t=vJ(e,"string");return mf(t)=="symbol"?t:t+""}function vJ(e,t){if(mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yJ(e,t){if(e==null)return{};var r=xJ(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xJ(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 _D={symbolCircle:AS,symbolCross:BQ,symbolDiamond:VQ,symbolSquare:WQ,symbolStar:qQ,symbolTriangle:KQ,symbolWye:XQ},bJ=Math.PI/180,wJ=function(t){var r="symbol".concat(Zv(t));return _D[r]||AS},jJ=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 a=18*bJ;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},SJ=function(t,r){_D["symbol".concat(Zv(t))]=r},kS=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,s=t.sizeType,l=s===void 0?"area":s,c=yJ(t,pJ),u=IA(IA({},c),{},{type:n,size:i,sizeType:l}),f=function(){var v=wJ(n),y=ZQ().type(v).size(jJ(i,l,n));return y()},d=u.className,h=u.cx,m=u.cy,p=He(u,!0);return h===+h&&m===+m&&i===+i?_.createElement("path",Yb({},p,{className:at("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};kS.registerSymbol=SJ;function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function Xb(){return Xb=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},Xb.apply(this,arguments)}function DA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function CJ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DA(Object(r),!0).forEach(function(n){gf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PJ(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 AJ(e,t,r){return t&&PJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kJ(e,t,r){return t=$m(t),OJ(e,TD()?Reflect.construct(t,r||[],$m(e).constructor):t.apply(e,r))}function OJ(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 EJ(e)}function EJ(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 $m(e){return $m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$m(e)}function _J(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&&Zb(e,t)}function Zb(e,t){return Zb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zb(e,t)}function gf(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=TJ(e,"string");return Dc(t)=="symbol"?t:t+""}function TJ(e,t){if(Dc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $n=32,OS=function(e){function t(){return NJ(this,t),kJ(this,t,arguments)}return _J(t,e),AJ(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=$n/2,s=$n/6,l=$n/3,c=n.inactive?a:n.color;if(n.type==="plainline")return _.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:$n,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return _.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
412            A`).concat(s,",").concat(s,",0,1,1,").concat(2*l,",").concat(i,`
413            H`).concat($n,"M").concat(2*l,",").concat(i,`
414            A`).concat(s,",").concat(s,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return _.createElement("path",{stroke:"none",fill:c,d:"M0,".concat($n/8,"h").concat($n,"v").concat($n*3/4,"h").concat(-$n,"z"),className:"recharts-legend-icon"});if(_.isValidElement(n.legendIcon)){var u=CJ({},n);return delete u.legendIcon,_.cloneElement(n.legendIcon,u)}return _.createElement(kS,{fill:c,cx:i,cy:i,size:$n,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,s=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,f={x:0,y:0,width:$n,height:$n}
414,d={display:l==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,p){var g=m.formatter||c,v=at(gf(gf({"recharts-legend-item":!0},"legend-item-".concat(p),!0),"inactive",m.inactive));if(m.type==="none")return null;var y=Je(m.value)?null:m.value;Fi(!Je(m.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=m.inactive?u:m.color;return _.createElement("li",Xb({className:v,style:d,key:"legend-item-".concat(p)},$c(n.props,m,p)),_.createElement(zb,{width:s,height:s,viewBox:f,style:h},n.renderIcon(m)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(y,m,p):y))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,s=n.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(w.PureComponent);gf(OS,"displayName","Legend");gf(OS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var MJ=Fv;function RJ(){this.__data__=new MJ,this.size=0}var $J=RJ;function IJ(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var DJ=IJ;function FJ(e){return this.__data__.get(e)}var LJ=FJ;function BJ(e){return this.__data__.has(e)}var zJ=BJ,VJ=Fv,WJ=gS,UJ=vS,GJ=200;function HJ(e,t){var r=this.__data__;if(r instanceof VJ){var n=r.__data__;if(!WJ||n.length<GJ-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new UJ(n)}return r.set(e,t),this.size=r.size,this}var qJ=HJ,KJ=Fv,YJ=$J,XJ=DJ,ZJ=LJ,QJ=zJ,JJ=qJ;function Du(e){var t=this.__data__=new KJ(e);this.size=t.size}Du.prototype.clear=YJ;Du.prototype.delete=XJ;Du.prototype.get=ZJ;Du.prototype.has=QJ;Du.prototype.set=JJ;var RD=Du,eee="__lodash_hash_undefined__";function tee(e){return this.__data__.set(e,eee),this}var ree=tee;function nee(e){return this.__data__.has(e)}var aee=nee,iee=vS,oee=ree,see=aee;function Im(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new iee;++t<r;)this.add(e[t])}Im.prototype.add=Im.prototype.push=oee;Im.prototype.has=see;var $D=Im;function lee(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 ID=lee;function cee(e,t){return e.has(t)}var DD=cee,uee=$D,dee=ID,fee=DD,hee=1,pee=2;function mee(e,t,r,n,a,i){var s=r&hee,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,m=r&pee?new uee:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var p=e[d],g=t[d];if(n)var v=s?n(g,p,d,t,e,i):n(p,g,d,e,t,i);if(v!==void 0){if(v)continue;h=!1;break}if(m){if(!dee(t,function(y,x){if(!fee(m,x)&&(p===y||a(p,y,r,n,i)))return m.push(x)})){h=!1;break}}else if(!(p===g||a(p,g,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var FD=mee,gee=mi,vee=gee.Uint8Array,yee=vee;function xee(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var bee=xee;function wee(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ES=wee,FA=jh,LA=yee,jee=mS,See=FD,Cee=bee,Nee=ES,Pee=1,Aee=2,kee="[object Boolean]",Oee="[object Date]",Eee="[object Error]",_ee="[object Map]",Tee="[object Number]",Mee="[object RegExp]",Ree="[object Set]",$ee="[object String]",Iee="[object Symbol]",Dee="[object ArrayBuffer]",Fee="[object DataView]",BA=FA?FA.prototype:void 0,Rx=BA?BA.valueOf:void 0;function Lee(e,t,r,n,a,i,s){switch(r){case Fee:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Dee:return!(e.byteLength!=t.byteLength||!i(new LA(e),new LA(t)));case kee:case Oee:case Tee:return jee(+e,+t);case Eee:return e.name==t.name&&e.message==t.message;case Mee:case $ee:return e==t+"";case _ee:var l=Cee;case Ree:var c=n&Pee;if(l||(l=Nee),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Aee,s.set(e,t);var f=See(l(e),l(t),n,a,i,s);return s.delete(e),f;case Iee:if(Rx)return Rx.call(e)==Rx.call(t)}return!1}var Bee=Lee;function zee(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var LD=zee,Vee=LD,Wee=mn;function Uee(e,t,r){var n=t(e);return Wee(e)?n:Vee(n,r(e))}var Gee=Uee;function Hee(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}var qee=Hee;function Kee(){return[]}var Yee=Kee,Xee=qee,Zee=Yee,Qee=Object.prototype,Jee=Qee.propertyIsEnumerable,zA=Object.getOwnPropertySymbols,ete=zA?function(e){return e==null?[]:(e=Object(e),Xee(zA(e),function(t){return Jee.call(e,t)}))}:Zee,tte=ete;function rte(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var nte=rte,ate=Ji,ite=eo,ote="[object Arguments]";function ste(e){return ite(e)&&ate(e)==ote}var lte=ste,VA=lte,cte=eo,BD=Object.prototype,ute=BD.hasOwnProperty,dte=BD.propertyIsEnumerable,fte=VA(function(){return arguments}())?VA:function(e){return cte(e)&&ute.call(e,"callee")&&!dte.call(e,"callee")},_S=fte,Dm={exports:{}};function hte(){return!1}var pte=hte;Dm.exports;(function(e,t){var r=mi,n=pte,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(Dm,Dm.exports);var zD=Dm.exports,mte=9007199254740991,gte=/^(?:0|[1-9]\d*)$/;function vte(e,t){var r=typeof e;return t=t??mte,!!t&&(r=="number"||r!="symbol"&&gte.test(e))&&e>-1&&e%1==0&&e<t}var TS=vte,yte=9007199254740991;function xte(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yte}var MS=xte,bte=Ji,wte=MS,jte=eo,Ste="[object Arguments]",Cte="[object Array]",Nte="[object Boolean]",Pte="[object Date]",Ate="[object Error]",kte="[object Function]",Ote="[object Map]",Ete="[object Number]",_te="[object Object]",Tte="[object RegExp]",Mte="[object Set]",Rte="[object String]",$te="[object WeakMap]",Ite="[object ArrayBuffer]",Dte="[object DataView]",Fte="[object Float32Array]",Lte="[object Float64Array
414]",Bte="[object Int8Array]",zte="[object Int16Array]",Vte="[object Int32Array]",Wte="[object Uint8Array]",Ute="[object Uint8ClampedArray]",Gte="[object Uint16Array]",Hte="[object Uint32Array]",$t={};$t[Fte]=$t[Lte]=$t[Bte]=$t[zte]=$t[Vte]=$t[Wte]=$t[Ute]=$t[Gte]=$t[Hte]=!0;$t[Ste]=$t[Cte]=$t[Ite]=$t[Nte]=$t[Dte]=$t[Pte]=$t[Ate]=$t[kte]=$t[Ote]=$t[Ete]=$t[_te]=$t[Tte]=$t[Mte]=$t[Rte]=$t[$te]=!1;function qte(e){return jte(e)&&wte(e.length)&&!!$t[bte(e)]}var Kte=qte;function Yte(e){return function(t){return e(t)}}var VD=Yte,Fm={exports:{}};Fm.exports;(function(e,t){var r=YI,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(Fm,Fm.exports);var Xte=Fm.exports,Zte=Kte,Qte=VD,WA=Xte,UA=WA&&WA.isTypedArray,Jte=UA?Qte(UA):Zte,WD=Jte,ere=nte,tre=_S,rre=mn,nre=zD,are=TS,ire=WD,ore=Object.prototype,sre=ore.hasOwnProperty;function lre(e,t){var r=rre(e),n=!r&&tre(e),a=!r&&!n&&nre(e),i=!r&&!n&&!a&&ire(e),s=r||n||a||i,l=s?ere(e.length,String):[],c=l.length;for(var u in e)(t||sre.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||are(u,c)))&&l.push(u);return l}var cre=lre,ure=Object.prototype;function dre(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ure;return e===r}var fre=dre;function hre(e,t){return function(r){return e(t(r))}}var UD=hre,pre=UD,mre=pre(Object.keys,Object),gre=mre,vre=fre,yre=gre,xre=Object.prototype,bre=xre.hasOwnProperty;function wre(e){if(!vre(e))return yre(e);var t=[];for(var r in Object(e))bre.call(e,r)&&r!="constructor"&&t.push(r);return t}var jre=wre,Sre=pS,Cre=MS;
vendor: 6,244 bytes, line 414
414function Nre(e){return e!=null&&Cre(e.length)&&!Sre(e)}var Sh=Nre,Pre=cre,Are=jre,kre=Sh;function Ore(e){return kre(e)?Pre(e):Are(e)}var ty=Ore,Ere=Gee,_re=tte,Tre=ty;function Mre(e){return Ere(e,Tre,_re)}var Rre=Mre,GA=Rre,$re=1,Ire=Object.prototype,Dre=Ire.hasOwnProperty;function Fre(e,t,r,n,a,i){var s=r&$re,l=GA(e),c=l.length,u=GA(t),f=u.length;if(c!=f&&!s)return!1;for(var d=c;d--;){var h=l[d];if(!(s?h in t:Dre.call(t,h)))return!1}var m=i.get(e),p=i.get(t);if(m&&p)return m==t&&p==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=s;++d<c;){h=l[d];var y=e[h],x=t[h];if(n)var b=s?n(x,y,h,t,e,i):n(y,x,h,e,t,i);if(!(b===void 0?y===x||a(y,x,r,n,i):b)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var S=e.constructor,j=t.constructor;S!=j&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof j=="function"&&j instanceof j)&&(g=!1)}return i.delete(e),i.delete(t),g}var Lre=Fre,Bre=yl,zre=mi,Vre=Bre(zre,"DataView"),Wre=Vre,Ure=yl,Gre=mi,Hre=Ure(Gre,"Promise"),qre=Hre,Kre=yl,Yre=mi,Xre=Kre(Yre,"Set"),GD=Xre,Zre=yl,Qre=mi,Jre=Zre(Qre,"WeakMap"),ene=Jre,Qb=Wre,Jb=gS,ew=qre,tw=GD,rw=ene,HD=Ji,Fu=ZI,HA="[object Map]",tne="[object Object]",qA="[object Promise]",KA="[object Set]",YA="[object WeakMap]",XA="[object DataView]",rne=Fu(Qb),nne=Fu(Jb),ane=Fu(ew),ine=Fu(tw),one=Fu(rw),ws=HD;(Qb&&ws(new Qb(new ArrayBuffer(1)))!=XA||Jb&&ws(new Jb)!=HA||ew&&ws(ew.resolve())!=qA||tw&&ws(new tw)!=KA||rw&&ws(new rw)!=YA)&&(ws=function(e){var t=HD(e),r=t==tne?e.constructor:void 0,n=r?Fu(r):"";if(n)switch(n){case rne:return XA;case nne:return HA;case ane:return qA;case ine:return KA;case one:return YA}return t});var sne=ws,$x=RD,lne=FD,cne=Bee,une=Lre,ZA=sne,QA=mn,JA=zD,dne=WD,fne=1,ek="[object Arguments]",tk="[object Array]",up="[object Object]",hne=Object.prototype,rk=hne.hasOwnProperty;function pne(e,t,r,n,a,i){var s=QA(e),l=QA(t),c=s?tk:ZA(e),u=l?tk:ZA(t);c=c==ek?up:c,u=u==ek?up:u;var f=c==up,d=u==up,h=c==u;if(h&&JA(e)){if(!JA(t))return!1;s=!0,f=!1}if(h&&!f)return i||(i=new $x),s||dne(e)?lne(e,t,r,n,a,i):cne(e,t,c,r,n,a,i);if(!(r&fne)){var m=f&&rk.call(e,"__wrapped__"),p=d&&rk.call(t,"__wrapped__");if(m||p){var g=m?e.value():e,v=p?t.value():t;return i||(i=new $x),a(g,v,r,n,i)}}return h?(i||(i=new $x),une(e,t,r,n,a,i)):!1}var mne=pne,gne=mne,nk=eo;function qD(e,t,r,n,a){return e===t?!0:e==null||t==null||!nk(e)&&!nk(t)?e!==e&&t!==t:gne(e,t,r,n,qD,a)}var RS=qD,vne=RD,yne=RS,xne=1,bne=2;function wne(e,t,r,n){var a=r.length,i=a,s=!n;if(e==null)return!i;for(e=Object(e);a--;){var l=r[a];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){l=r[a];var c=l[0],u=e[c],f=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var d=new vne;if(n)var h=n(u,f,c,e,t,d);if(!(h===void 0?yne(f,u,xne|bne,n,d):h))return!1}}return!0}var jne=wne,Sne=os;function Cne(e){return e===e&&!Sne(e)}var KD=Cne,Nne=KD,Pne=ty;function Ane(e){for(var t=Pne(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Nne(a)]}return t}var kne=Ane;function One(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var YD=One,Ene=jne,_ne=kne,Tne=YD;function Mne(e){var t=_ne(e);return t.length==1&&t[0][2]?Tne(t[0][0],t[0][1]):function(r){return r===e||Ene(r,e,t)}}var Rne=Mne;function $ne(e,t){return e!=null&&t in Object(e)}var Ine=$ne,Dne=rD,Fne=_S,Lne=mn,Bne=TS,zne=MS,Vne=Bv;function Wne(e,t,r){t=Dne(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var s=Vne(t[n]);if(!(i=e!=null&&r(e,s)))break;e=e[s]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&zne(a)&&Bne(s,a)&&(Lne(e)||Fne(e)))}var Une=Wne,Gne=Ine,Hne=Une;function qne(e,t){return e!=null&&Hne(e,t,Gne)}var Kne=qne,Yne=RS,Xne=nD,Zne=Kne,Qne=hS,Jne=KD,eae=YD,tae=Bv,rae=1,nae=2;function aae(e,t){return Qne(e)&&Jne(t)?eae(tae(e),t):function(r){var n=Xne(r,e);return n===void 0&&n===t?Zne(r,e):Yne(t,n,rae|nae)}}var iae=aae;function oae(e){return e}var Lu=oae;function sae(e){return function(t){return t==null?void 0:t[e]}}var lae=sae,cae=bS;function uae(e){return function(t){return cae(t,e)}}var dae=uae,fae=lae,hae=dae,pae=hS,mae=Bv;function gae(e){return pae(e)?fae(mae(e)):hae(e)}var vae=gae,yae=Rne,xae=iae,bae=Lu,wae=mn,jae=vae;function Sae(e){return typeof e=="function"?e:e==null?bae:typeof e=="object"?wae(e)?xae(e[0],e[1]):yae(e):jae(e)}var gi=Sae;function Cae(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var XD=Cae;function Nae(e){return e!==e}var Pae=Nae;function Aae(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var kae=Aae,Oae=XD,Eae=Pae,_ae=kae;function Tae(e,t,r){return t===t?_ae(e,t,r):Oae(e,Eae,r)}var Mae=Tae,Rae=Mae;function $ae(e,t){var r=e==null?0:e.length;return!!r&&Rae(e,t,0)>-1}var Iae=$ae;function Dae(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var Fae=Dae;function Lae(){}var Bae=Lae,Ix=GD,zae=Bae,Vae=ES,Wae=1/0,Uae=Ix&&1/Vae(new Ix([,-0]))[1]==Wae?function(e){return new Ix(e)}:zae,Gae=Uae,Hae=$D,qae=Iae,Kae=Fae,Yae=DD,Xae=Gae,Zae=ES,Qae=200;function Jae(e,t,r){var n=-1,a=qae,i=e.length,s=!0,l=[],c=l;if(r)s=!1,a=Kae;else if(i>=Qae){var u=t?null:Xae(e);if(u)return Zae(u);s=!1,a=Yae,c=new Hae}else c=t?[]:l;e:for(;++n<i;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,s&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),l.push(f)}else a(c,d,r)||(c!==l&&c.push(d),l.push(f))}return l}var eie=Jae,tie=gi,rie=eie;function nie(e,t){return e&&e.length?rie(e,tie(t)):[]}var aie=nie;const ak=vt(aie);function ZD(e,t,r){return t===!0?ak(e,r):Je(t)?ak(e,t):e}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)}var iie=["ref"];function ik(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?ik(Object(r),!0).forEach(function(n){ry(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ik(Object(r)).forEac
vendor: 4,282 bytes, line 414
414h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ok(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,JD(n.key),n)}}function sie(e,t,r){return t&&ok(e.prototype,t),r&&ok(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lie(e,t,r){return t=Lm(t),cie(e,QD()?Reflect.construct(t,r||[],Lm(e).constructor):t.apply(e,r))}function cie(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 uie(e)}function uie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QD=function(){return!!e})()}function Lm(e){return Lm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lm(e)}function die(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,a){return n.__proto__=a,n},nw(e,t)}function ry(e,t,r){return t=JD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JD(e){var t=fie(e,"string");return Fc(t)=="symbol"?t:t+""}function fie(e,t){if(Fc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hie(e,t){if(e==null)return{};var r=pie(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pie(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 mie(e){return e.value}function gie(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var r=hie(t,iie);return _.createElement(OS,r)}var sk=1,oi=function(e){function t(){var r;oie(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=lie(this,t,[].concat(a)),ry(r,"lastBoundingBox",{width:-1,height:-1}),r}return die(t,e),sie(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,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>sk||Math.abs(a.height-this.lastBoundingBox.height)>sk)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(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 a=this.props,i=a.layout,s=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,f=a.chartHeight,d,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var p=this.getBBoxSnapsh
414ot();h={top:((f||0)-p.height)/2}}else h=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return bi(bi({},d),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,s=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,d=bi(bi({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return _.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){n.wrapperNode=m}},gie(i,bi(bi({},this.props),{},{payload:ZD(f,u,mie)})))}}],[{key:"getWithHeight",value:function(n,a){var i=bi(bi({},this.defaultProps),n.props),s=i.layout;return s==="vertical"&&Ne(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||a}:null}}])}(w.PureComponent);ry(oi,"displayName","Legend");ry(oi,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var lk=jh,vie=_S,yie=mn,ck=lk?lk.isConcatSpreadable:void 0;function xie(e){return yie(e)||vie(e)||!!(ck&&e&&e[ck])}var bie=xie,wie=LD,jie=bie;function e5(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=jie),a||(a=[]);++i<s;){var l=e[i];t>0&&r(l)?t>1?e5(l,t-1,r,n,a):wie(a,l):n||(a[a.length]=l)}return a}var t5=e5;function Sie(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),l=s.length;l--;){var c=s[e?l:++a];if(r(i[c],c,i)===!1)break}return t}}var Cie=Sie,Nie=Cie,Pie=Nie(),Aie=Pie,kie=Aie,Oie=ty;function Eie(e,t){return e&&kie(e,t,Oie)}var r5=Eie,_ie=Sh;function Tie(e,t){return function(r,n){if(r==null)return r;if(!_ie(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}var Mie=Tie,Rie=r5,$ie=Mie,Iie=$ie(Rie),$S=Iie,Die=$S,Fie=Sh;function Lie(e,t){var r=-1,n=Fie(e)?Array(e.length):[];return Die(e,function(a,i,s){n[++r]=t(a,i,s)}),n}var n5=Lie;function Bie(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var zie=Bie,uk=Eu;function Vie(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=uk(e),s=t!==void 0,l=t===null,c=t===t,u=uk(t);if(!l&&!u&&!i&&e>t||i&&s&&c&&!l&&!u||n&&s&&c||!r&&c||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||l&&r&&a||!s&&a||!c)return-1}return 0}var Wie=Vie,Uie=Wie;function Gie(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,s=a.length,l=r.length;++n<s;){var c=Uie(a[n],i[n]);if(c){if(n>=l)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}var Hie=Gie,Dx=xS,qie=bS,Kie=gi,Yie=n5,Xie=zie,Zie=VD,Qie=Hie,Jie=Lu,eoe=mn;function toe(e,t,r){t.length?t=Dx(t,function(i){return eoe(i)?function(s){return qie(s,i.length===1?i[0]:i)}:i}):t=[Jie];var n=-1;t=Dx(t,Zie(Kie));var a=Yie(e,function(i,s,l){var c=Dx(t,function(u){return u(i)});return{criteria:c,index:++n,value:i}});return Xie(a,function(i,s){return Qie(i,s,r)})}var roe=toe;function noe(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 aoe=noe,ioe=aoe,dk=Math.max;function ooe(e,t,r){return t=dk(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=dk(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(s),ioe(e,this,l)}}var soe=ooe;function loe(e){return function(){return e}}var coe=loe,uoe=yl,doe=function(){try{var e=uoe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),a5=doe,foe=coe,fk=a5,hoe=Lu,poe=fk?function(e,t){return fk(e,"toString",{configurable:!0,enumerable:!1,value:foe(t),writable:!0})}:hoe,moe=poe,goe=800,voe=16,yoe=Date.now;function xoe(e){var t=0,r=0;return function(){var n=yoe(),a=voe-(n-r);if(r=n,a>0){if(++t>=goe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var boe=xoe,woe=moe,joe=boe,Soe=joe(woe),Coe=Soe,Noe=Lu,Poe=soe,Aoe=Coe;function koe(e,t){return Aoe(Poe(e,t,Noe),e+"")}var Ooe=koe,Eoe=mS,_oe=Sh,Toe=TS,Moe=os;function Roe(e,t,r){if(!Moe(r))return!1;var n=typeof t;return(n=="number"?_oe(r)&&Toe(t,r.length):n=="string"&&t in r)?Eoe(r[t],e):!1}var ny=Roe,$oe=t5,Ioe=roe,Doe=Ooe,hk=ny,Foe=Doe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&hk(e,t[0],t[1])?t=[]:r>2&&hk(t[0],t[1],t[2])&&(t=[t[0]]),Ioe(e,$oe(t,1),[])}),Loe=Foe;const IS=vt(Loe);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 aw(){return aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 29,151 bytes, lines 414-421
414for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},aw.apply(this,arguments)}function Boe(e,t){return Uoe(e)||Woe(e,t)||Voe(e,t)||zoe()}function zoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
415In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Voe(e,t){if(e){if(typeof e=="string")return pk(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 pk(e,t)}}function pk(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 Woe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Uoe(e){if(Array.isArray(e))return e}function mk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mk(Object(r),!0).forEach(function(n){Goe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Goe(e,t,r){return t=Hoe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hoe(e){var t=qoe(e,"string");return vf(t)=="symbol"?t:t+""}function qoe(e,t){if(vf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Koe(e){return Array.isArray(e)&&dr(e[0])&&dr(e[1])?e.join(" ~ "):e}var Yoe=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,s=t.itemStyle,l=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,m=t.wrapperClassName,p=t.labelClassName,g=t.label,v=t.labelFormatter,y=t.accessibilityLayer,x=y===void 0?!1:y,b=function(){if(f&&f.length){var k={padding:0,margin:0},E=(h?IS(f,h):f).map(function($,T){if($.type==="none")return null;var R=Fx({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},l),B=$.formatter||d||Koe,F=$.value,D=$.name,G=F,K=D;if(B&&G!=null&&K!=null){var z=B(F,D,$,T,f);if(Array.isArray(z)){var U=Boe(z,2);G=U[0],K=U[1]}else G=z}return _.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(T),style:R},dr(K)?_.createElement("span",{className:"recharts-tooltip-item-name"},K):null,dr(K)?_.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,_.createElement("span",{className:"recharts-tooltip-item-value"},G),_.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return _.createElement("ul",{className:"recharts-tooltip-item-list",style:k},E)}return null},S=Fx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),j=Fx({margin:0},u),C=!st(g),N=C?g:"",P=at("recharts-default-tooltip",m),A=at("recharts-tooltip-label",p);C&&v&&f!==void 0&&f!==null&&(N=v(g,f));var O=x?{role:"status","aria-live":"assertive"}:{};return _.createElement("div",aw({className:P,style:S},O),_.createElement("p",{className:A,style:j},_.isValidElement(N)?N:"".concat(N)),b())};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 dp(e,t,r){return t=Xoe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xoe(e){var t=Zoe(e,"string");return yf(t)=="symbol"?t:t+""}function Zoe(e,t){if(yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sd="recharts-tooltip-wrapper",Qoe={visibility:"hidden"};function Joe(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return at(sd,dp(dp(dp(dp({},"".concat(sd,"-right"),Ne(r)&&t&&Ne(t.x)&&r>=t.x),"".concat(sd,"-left"),Ne(r)&&t&&Ne(t.x)&&r<t.x),"".concat(sd,"-bottom"),Ne(n)&&t&&Ne(t.y)&&n>=t.y),"".concat(sd,"-top"),Ne(n)&&t&&Ne(t.y)&&n<t.y))}function gk(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Ne(i[n]))return i[n];var f=r[n]-l-a,d=r[n]+a;if(t[n])return s[n]?f:d;if(s[n]){var h=f,m=c[n];return h<m?Math.max(d,c[n]):Math.max(f,c[n])}var p=d+l,g=c[n]+u;return p>g?Math.max(f,c[n]):Math.max(d,c[n])}function ese(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 tse(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,f,d;return s.height>0&&s.width>0&&r?(f=gk({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),d=gk({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=ese({translateX:f,translateY:d,useTranslate3d:l})):u=Qoe,{cssProperties:u,cssClasses:Joe({translateX:f,translateY:d,coordinate:r})}}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 vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yk(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){ow(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 rse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nse(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,o5(n.key),n)}}function ase(e,t,r){return t&&nse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ise(e,t,r){return t=Bm(t),ose(e,i5()?Reflect.construct(t,r||[],Bm(e).constructor):t.apply(e,r))}function ose(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 sse(e)}function sse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i5=function(){return!!e})()}function Bm(e){return Bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bm(e)}function lse(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&&iw(e,t)}function iw(e,t){return iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},iw(e,t)}function ow(e,t,r){return t=o5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o5(e){var t=cse(e,"string");return Lc(t)=="symbol"?t:t+""}function cse(e,t){if(Lc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xk=1,use=function(e){function t(){var r;rse(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=ise(this,t,[].concat(a)),ow(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),ow(r,"handleKeyDown",function(s){if(s.key==="Escape"){var l,c,u,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return lse(t,e),ase(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>xk||Math.abs(n.height-this.state.lastBoundingBox.height)>xk)&&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,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,m=a.offset,p=a.position,g=a.reverseDirection,v=a.useTranslate3d,y=a.viewBox,x=a.wrapperStyle,b=tse({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:m,position:p,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),S=b.cssClasses,j=b.cssProperties,C=yk(yk({transition:h&&i?"transform ".concat(l,"ms ").concat(c):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return _.createElement("div",{tabIndex:-1,className:S,style:C,ref:function(P){n.wrapperNode=P}},u)}}])}(w.PureComponent),dse=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},$a={isSsr:dse(),get:function(t){return $a[t]},set:function(t,r){if(typeof t=="string")$a[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(a){$a[a]=t[a]})}}};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 bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wk(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){DS(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 fse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hse(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,l5(n.key),n)}}function pse(e,t,r){return t&&hse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mse(e,t,r){return t=zm(t),gse(e,s5()?Reflect.construct(t,r||[],zm(e).constructor):t.apply(e,r))}function gse(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 vse(e)}function vse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s5=function(){return!!e})()}function zm(e){return zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zm(e)}function yse(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,a){return n.__proto__=a,n},sw(e,t)}function DS(e,t,r){return t=l5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=xse(e,"string");return Bc(t)=="symbol"?t:t+""}function xse(e,t){if(Bc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bse(e){return e.dataKey}function wse(e,t){return _.isValidElement(e)?_.cloneElement(e,t):typeof e=="function"?_.createElement(e,t):_.createElement(Yoe,t)}var Vr=function(e){function t(){return fse(this,t),mse(this,t,arguments)}return yse(t,e),pse(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,f=a.coordinate,d=a.filterNull,h=a.isAnimationActive,m=a.offset,p=a.payload,g=a.payloadUniqBy,v=a.position,y=a.reverseDirection,x=a.useTranslate3d,b=a.viewBox,S=a.wrapperStyle,j=p??[];d&&j.length&&(j=ZD(p.filter(function(N){return N.value!=null&&(N.hide!==!0||n.props.includeHidden)}),g,bse));var C=j.length>0;return _.createElement(use,{allowEscapeViewBox:s,animationDuration:l,animationEasing:c,isAnimationActive:h,active:i,coordinate:f,hasPayload:C,offset:m,position:v,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:S},wse(u,wk(wk({},this.props),{},{payload:j})))}}])}(w.PureComponent);DS(Vr,"displayName","Tooltip");DS(Vr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!$a.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 jse=mi,Sse=function(){return jse.Date.now()},Cse=Sse,Nse=/\s/;function Pse(e){for(var t=e.length;t--&&Nse.test(e.charAt(t)););return t}var Ase=Pse,kse=Ase,Ose=/^\s+/;function Ese(e){return e&&e.slice(0,kse(e)+1).replace(Ose,"")}var _se=Ese,Tse=_se,jk=os,Mse=Eu,Sk=NaN,Rse=/^[-+]0x[0-9a-f]+$/i,$se=/^0b[01]+$/i,Ise=/^0o[0-7]+$/i,Dse=parseInt;function Fse(e){if(typeof e=="number")return e;if(Mse(e))return Sk;if(jk(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jk(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Tse(e);var r=$se.test(e);return r||Ise.test(e)?Dse(e.slice(2),r?2:8):Rse.test(e)?Sk:+e}var c5=Fse,Lse=os,Lx=Cse,Ck=c5,Bse="Expected a function",zse=Math.max,Vse=Math.min;function Wse(e,t,r){var n,a,i,s,l,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Bse);t=Ck(t)||0,Lse(r)&&(f=!!r.leading,d="maxWait"in r,i=d?zse(Ck(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function m(C){var N=n,P=a;return n=a=void 0,u=C,s=e.apply(P,N),s}function p(C){return u=C,l=setTimeout(y,t),f?m(C):s}function g(C){var N=C-c,P=C-u,A=t-N;return d?Vse(A,i-P):A}function v(C){var N=C-c,P=C-u;return c===void 0||N>=t||N<0||d&&P>=i}function y(){var C=Lx();if(v(C))return x(C);l=setTimeout(y,g(C))}function x(C){return l=void 0,h&&n?m(C):(n=a=void 0,s)}function b(){l!==void 0&&clearTimeout(l),u=0,n=c=a=l=void 0}function S(){return l===void 0?s:x(Lx())}function j(){var C=Lx(),N=v(C);if(n=arguments,a=this,c=C,N){if(l===void 0)return p(c);if(d)return clearTimeout(l),l=setTimeout(y,t),m(c)}return l===void 0&&(l=setTimeout(y,t)),s}return j.cancel=b,j.flush=S,j}var Use=Wse,Gse=Use,Hse=os,qse="Expected a function";function Kse(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(qse);return Hse(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Gse(e,t,{leading:n,maxWait:t,trailing:a})}var Yse=Kse;const u5=vt(Yse);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 Nk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nk(Object(r),!0).forEach(function(n){Xse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xse(e,t,r){return t=Zse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zse(e){var t=Qse(e,"string");return xf(t)=="symbol"?t:t+""}function Qse(e,t){if(xf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jse(e,t){return nle(e)||rle(e,t)||tle(e,t)||ele()}function ele(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
416In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tle(e,t){if(e){if(typeof e=="string")return Pk(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 Pk(e,t)}}function Pk(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 rle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function nle(e){if(Array.isArray(e))return e}var Ko=w.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,s=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,m=e.children,p=e.debounce,g=p===void 0?0:p,v=e.id,y=e.className,x=e.onResize,b=e.style,S=b===void 0?{}:b,j=w.useRef(null),C=w.useRef();C.current=x,w.useImperativeHandle(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var N=w.useState({containerWidth:a.width,containerHeight:a.height}),P=Jse(N,2),A=P[0],O=P[1],M=w.useCallback(function(E,$){O(function(T){var R=Math.round(E),B=Math.round($);return T.containerWidth===R&&T.containerHeight===B?T:{containerWidth:R,containerHeight:B}})},[]);w.useEffect(function(){var E=function(D){var G,K=D[0].contentRect,z=K.width,U=K.height;M(z,U),(G=C.current)===null||G===void 0||G.call(C,z,U)};g>0&&(E=u5(E,g,{trailing:!0,leading:!1}));var $=new ResizeObserver(E),T=j.current.getBoundingClientRect(),R=T.width,B=T.height;return M(R,B),$.observe(j.current),function(){$.disconnect()}},[M,g]);var k=w.useMemo(function(){var E=A.containerWidth,$=A.containerHeight;if(E<0||$<0)return null;Fi(ks(s)||ks(c),`The width(%s) and height(%s) are both fixed numbers,
417       maybe you don't need to use a ResponsiveContainer.`,s,c),Fi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var T=ks(s)?E:s,R=ks(c)?$:c;r&&r>0&&(T?R=T/r:R&&(T=R*r),h&&R>h&&(R=h)),Fi(T>0||R>0,`The width(%s) and height(%s) of chart should be greater than 0,
418       please check the style of container, or the props width(%s) and height(%s),
419       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
420       height and width.`,T,R,s,c,f,d,r);var B=!Array.isArray(m)&&Di(m.type).endsWith("Chart");return _.Children.map(m,function(F){return _.isValidElement(F)?w.cloneElement(F,fp({width:T,height:R},B?{style:fp({height:"100%",width:"100%",maxHeight:R,maxWidth:T},F.props.style)}:{})):F})},[r,m,c,h,d,f,A,s]);return _.createElement("div",{id:v?"".concat(v):void 0,className:at("recharts-responsive-container",y),style:fp(fp({},S),{},{width:s,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:j},k)}),ay=function(t){return null};ay.displayName="Cell";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 Ak(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lw(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){ale(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 ale(e,t,r){return t=ile(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ile(e){var t=ole(e,"string");return bf(t)=="symbol"?t:t+""}function ole(e,t){if(bf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ol={widthCache:{},cacheCount:0},sle=2e3,lle={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},kk="recharts_measurement_span";function cle(e){var t=lw({},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||$a.isSsr)return{width:0,height:0};var n=cle(r),a=JSON.stringify({text:t,copyStyle:n});if(Ol.widthCache[a])return Ol.widthCache[a];try{var i=document.getElementById(kk);i||(i=document.createElement("span"),i.setAttribute("id",kk),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=lw(lw({},lle),n);Object.assign(i.style,s),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Ol.widthCache[a]=c,++Ol.cacheCount>sle&&(Ol.cacheCount=0,Ol.widthCache={}),c}catch{return{width:0,height:0}}},ule=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Vm(e,t){return ple(e)||hle(e,t)||fle(e,t)||dle()}function dle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
421In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fle(e,t){if(e){if(typeof e=="string")return Ok(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 Ok(e,t)}}function Ok(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 hle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function ple(e){if(Array.isArray(e))return e}function mle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ek(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,vle(n.key),n)}}function gle(e,t,r){return t&&Ek(e.prototype,t),r&&Ek(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vle(e){var t=yle(e,"string");return wf(t)=="symbol"?t:t+""}function yle(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 String(e)}var _k=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Tk=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xle=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ble=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,d5={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},wle=Object.keys(d5),Kl="NaN";function jle(e,t){return e*d5[t]}var hp=function(){function e(t,r){mle(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!xle.test(r)&&(this.num=NaN,this.unit=""),wle.includes(r)&&(this.num=jle(t,r),this.unit="px")}return gle(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,a=(n=ble.exec(r))!==null&&n!==void 0?n:[],i=Vm(a,3),s=i[1],l=i[2];return new e(parseFloat(s),l??"")}}])}();function f5(e){if(e.includes(Kl))return Kl;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=_k.exec(t))!==null&&r!==void 0?r:[],a=Vm(n,4),i=a[1],s=a[2],l=a[3],c=hp.parse(i??""),u=hp.parse(l??""),f=s==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return Kl;t=t.replace(_k,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=Tk.exec(t))!==null&&d!==void 0?d:[],m=Vm(h,4),p=m[1],g=m[2],v=m[3],y=hp.parse(p??""),x=hp.parse(v??""),b=g==="+"?y.add(x):y.subtract(x);if(b.isNaN())return Kl;t=t.replace(Tk,b.toString())}return t}var Mk=/\(([^()]*)\)/;function Sle(e){for(var t=e;t.includes("(");){var r=Mk.exec(t),n=Vm(r,2),a=n[1];t=t.replace(Mk,f5(a))}return t}function Cle(e){var t=e.replace(/\s+/g,"");return t=Sle(t),t=f5(t),t}function Nle(e){try{return Cle(e)}catch{return Kl}}function Bx(e){var t=Nle(e.slice(5,-1));return t===Kl?"":t}var Ple=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Ale=["dx","dy","angle","className","breakAll"];function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
421for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cw.apply(this,arguments)}function Rk(e,t){if(e==null)return{};var r=kle(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kle(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 $k(e,t){return Tle(e)||_le(e,t)||Ele(e,t)||Ole()}function Ole(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
422In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ele(e,t){if(e){if(typeof e=="string")return Ik(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 Ik(e,t)}}function Ik(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 _le(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Tle(e){if(Array.isArray(e))return e}var h5=/[ \f\n\r\t\v\u2028\u2029]+/,p5=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];st(r)||(n?i=r.toString().split(""):i=r.toString().split(h5));var s=i.map(function(c){return{word:c,width:$d(c,a).width}}),l=n?0:$d(" ",a).width;return{wordsWithComputedWidth:s,spaceWidth:l}}catch{return null}},Mle=function(t,r,n,a,i){var s=t.maxLines,l=t.children,c=t.style,u=t.breakAll,f=Ne(s),d=l,h=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return T.reduce(function(R,B){var F=B.word,D=B.width,G=R[R.length-1];if(G&&(a==null||i||G.width+D+n<Number(a)))G.words.push(F),G.width+=D+n;else{var K={words:[F],width:D};R.push(K)}return R},[])},m=h(r),p=function(T){return T.reduce(function(R,B){return R.width>B.width?R:B})};if(!f)return m;for(var g="…",v=function(T){var R=d.slice(0,T),B=p5({breakAll:u,style:c,children:R+g}).wordsWithComputedWidth,F=h(B),D=F.length>s||p(F).width>Number(a);return[D,F]},y=0,x=d.length-1,b=0,S;y<=x&&b<=d.length-1;){var j=Math.floor((y+x)/2),C=j-1,N=v(C),P=$k(N,2),A=P[0],O=P[1],M=v(j),k=$k(M,1),E=k[0];if(!A&&!E&&(y=j+1),A&&E&&(x=j-1),!A&&E){S=O;break}b++}return S||m},Dk=function(t){var r=st(t)?[]:t.toString().split(h5);return[{words:r}]},Rle=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,l=t.maxLines;if((r||n)&&!$a.isSsr){var c,u,f=p5({breakAll:s,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return Dk(a);return Mle({breakAll:s,children:a,maxLines:l,style:i},c,u,r,n)}return Dk(a)},Fk="#808080",zc=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.lineHeight,l=s===void 0?"1em":s,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,m=h===void 0?"start":h,p=t.verticalAnchor,g=p===void 0?"end":p,v=t.fill,y=v===void 0?Fk:v,x=Rk(t,Ple),b=w.useMemo(function(){return Rle({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),S=x.dx,j=x.dy,C=x.angle,N=x.className,P=x.breakAll,A=Rk(x,Ale);if(!dr(n)||!dr(i))return null;var O=n+(Ne(S)?S:0),M=i+(Ne(j)?j:0),k;switch(g){case"start":k=Bx("calc(".concat(u,")"));break;case"middle":k=Bx("calc(".concat((b.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:k=Bx("calc(".concat(b.length-1," * -").concat(l,")"));break}var E=[];if(d){var $=b[0].width,T=x.width;E.push("scale(".concat((Ne(T)?T/$:1)/$,")"))}return C&&E.push("rotate(".concat(C,", ").concat(O,", ").concat(M,")")),E.length&&(A.transform=E.join(" ")),_.createElement("text",cw({},He(A,!0),{x:O,y:M,className:at("recharts-text",N),textAnchor:m,fill:y.includes("url")?Fk:y}),b.map(function(R,B){var F=R.words.join(P?"":" ");return _.createElement("tspan",{x:O,dy:B===0?k:l,key:"".concat(F,"-").concat(B)},F)}))};function Vo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $le(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function FS(e){let t,r,n;e.length!==2?(t=Vo,r=(l,c)=>Vo(e(l),c),n=(l,c)=>e(l)-c):(t=e===Vo||e===$le?e:Ile,r=e,n=e);function a(l,c,u=0,f=l.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function i(l,c,u=0,f=l.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){const d=a(l,c,u,f-1);return d>u&&n(l[d-1],c)>-n(l[d],c)?d-1:d}return{left:a,center:s,right:i}}function Ile(){return 0}function m5(e){return e===null?NaN:+e}function*Dle(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Fle=FS(Vo),Ch=Fle.right;FS(m5).center;class Lk extends Map{constructor(t,r=zle){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Bk(this,t))}has(t){return super.has(Bk(this,t))}set(t,r){return super.set(Lle(this,t),r)}delete(t){return super.delete(Ble(this,t))}}function Bk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Lle({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Ble({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function zle(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Vle(e=Vo){if(e===Vo)return g5;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 g5(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Wle=Math.sqrt(50),Ule=Math.sqrt(10),Gle=Math.sqrt(2);function Wm(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=Wle?10:i>=Ule?5:i>=Gle?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/s,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*s,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=r&&r<2?Wm(e,t,r*2):[l,c,u]}function uw(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,s]=n?Wm(t,e,r):Wm(e,t,r);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(n)if(s<0)for(let u=0;u<l;++u)c[u]=(i-u)/-s;else for(let u=0;u<l;++u)c[u]=(i-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(a+u)/-s;else for(let u=0;u<l;++u)c[u]=(a+u)*s;return c}function dw(e,t,r){return t=+t,e=+e,r=+r,Wm(e,t,r)[2]}function fw(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?dw(t,e,r):dw(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function zk(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Vk(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function v5(e,t,r=0,n=1/0,a){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(a=a===void 0?g5:Vle(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),m=Math.max(r,Math.floor(t-u*d/c+h)),p=Math.min(n,Math.floor(t+(c-u)*d/c+h));v5(e,t,m,p,a)}const i=e[t];let s=r,l=n;for(ld(e,r,t),a(e[n],i)>0&&ld(e,r,n);s<l;){for(ld(e,s,l),++s,--l;a(e[s],i)<0;)++s;for(;a(e[l],i)>0;)--l}a(e[r],i)===0?ld(e,r,l):(++l,ld(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function ld(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Hle(e,t,r){if(e=Float64Array.from(Dle(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Vk(e);if(t>=1)return zk(e);var n,a=(n-1)*t,i=Math.floor(a),s=zk(v5(e,i).subarray(0,i+1)),l=Vk(e.subarray(i+1));return s+(l-s)*(a-i)}}function qle(e,t,r=m5){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,a=(n-1)*t,i=Math.floor(a),s=+r(e[i],i,e),l=+r(e[i+1],i+1,e);return s+(l-s)*(a-i)}}function Kle(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function ia(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function to(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}
vendor: 5,650 bytes, line 422
422const hw=Symbol("implicit");function LS(){var e=new Lk,t=[],r=[],n=hw;function a(i){let s=e.get(i);if(s===void 0){if(n!==hw)return n;e.set(i,s=t.push(i)-1)}return r[s%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Lk;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return LS(t,r).unknown(n)},ia.apply(a,arguments),a}function jf(){var e=LS().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,s,l=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,m=a<n,p=m?a:n,g=m?n:a;i=(g-p)/Math.max(1,h-c+u*2),l&&(i=Math.floor(i)),p+=(g-p-i*(h-c))*f,s=i*(1-c),l&&(p=Math.round(p),s=Math.round(s));var v=Kle(h).map(function(y){return p+i*y});return r(m?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,l=!0,d()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(l=!!h,d()):l},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return jf(t(),[n,a]).round(l).paddingInner(c).paddingOuter(u).align(f)},ia.apply(d(),arguments)}function y5(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return y5(t())},e}function Id(){return y5(jf.apply(null,arguments).paddingInner(1))}function BS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function x5(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Nh(){}var Sf=.7,Um=1/Sf,uc="\\s*([+-]?\\d+)\\s*",Cf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yle=/^#([0-9a-f]{3,8})$/,Xle=new RegExp(`^rgb\\(${uc},${uc},${uc}\\)$`),Zle=new RegExp(`^rgb\\(${si},${si},${si}\\)$`),Qle=new RegExp(`^rgba\\(${uc},${uc},${uc},${Cf}\\)$`),Jle=new RegExp(`^rgba\\(${si},${si},${si},${Cf}\\)$`),ece=new RegExp(`^hsl\\(${Cf},${si},${si}\\)$`),tce=new RegExp(`^hsla\\(${Cf},${si},${si},${Cf}\\)$`),Wk={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};BS(Nh,Nf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uk,formatHex:Uk,formatHex8:rce,formatHsl:nce,formatRgb:Gk,toString:Gk});function Uk(){return this.rgb().formatHex()}function rce(){return this.rgb().formatHex8()}function nce(){return b5(this).formatHsl()}function Gk(){return this.rgb().formatRgb()}function Nf(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Yle.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Hk(t):r===3?new cn(t>>
vendor: 3,905 bytes, line 422
4228&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?pp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?pp(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=Xle.exec(e))?new cn(t[1],t[2],t[3],1):(t=Zle.exec(e))?new cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Qle.exec(e))?pp(t[1],t[2],t[3],t[4]):(t=Jle.exec(e))?pp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ece.exec(e))?Yk(t[1],t[2]/100,t[3]/100,1):(t=tce.exec(e))?Yk(t[1],t[2]/100,t[3]/100,t[4]):Wk.hasOwnProperty(e)?Hk(Wk[e]):e==="transparent"?new cn(NaN,NaN,NaN,0):null}function Hk(e){return new cn(e>>16&255,e>>8&255,e&255,1)}function pp(e,t,r,n){return n<=0&&(e=t=r=NaN),new cn(e,t,r,n)}function ace(e){return e instanceof Nh||(e=Nf(e)),e?(e=e.rgb(),new cn(e.r,e.g,e.b,e.opacity)):new cn}function pw(e,t,r,n){return arguments.length===1?ace(e):new cn(e,t,r,n??1)}function cn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}BS(cn,pw,x5(Nh,{brighter(e){return e=e==null?Um:Math.pow(Um,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Sf:Math.pow(Sf,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cn(Vs(this.r),Vs(this.g),Vs(this.b),Gm(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:qk,formatHex:qk,formatHex8:ice,formatRgb:Kk,toString:Kk}));function qk(){return`#${Os(this.r)}${Os(this.g)}${Os(this.b)}`}function ice(){return`#${Os(this.r)}${Os(this.g)}${Os(this.b)}${Os((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kk(){const e=Gm(this.opacity);return`${e===1?"rgb(":"rgba("}${Vs(this.r)}, ${Vs(this.g)}, ${Vs(this.b)}${e===1?")":`, ${e})`}`}function Gm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Os(e){return e=Vs(e),(e<16?"0":"")+e.toString(16)}function Yk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Pa(e,t,r,n)}function b5(e){if(e instanceof Pa)return new Pa(e.h,e.s,e.l,e.opacity);if(e instanceof Nh||(e=Nf(e)),!e)return new Pa;if(e instanceof Pa)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),s=NaN,l=i-a,c=(i+a)/2;return l?(t===i?s=(r-n)/l+(r<n)*6:r===i?s=(n-t)/l+2:s=(t-r)/l+4,l/=c<.5?i+a:2-i-a,s*=60):l=c>0&&c<1?0:s,new Pa(s,l,c,e.opacity)}function oce(e,t,r,n){return arguments.length===1?b5(e):new Pa(e,t,r,n??1)}function Pa(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}BS(Pa,oce,x5(Nh,{brighter(e){return e=e==null?Um:Math.pow(Um,e),new Pa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Sf:Math.pow(Sf,e),new Pa(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,a=2*r-n;return new cn(zx(e>=240?e-240:e+120,a,n),zx(e,a,n),zx(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Pa(Xk(this.h),mp(this.s),mp(this.l),Gm(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=Gm(this.opacity);return`${e===1?"hsl(":"hsla("}${Xk(this.h)}, ${mp(this.s)*100}%, ${mp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Xk(e){return e=(e||0)%360,e<0?e+360:e}function mp(e){return Math.max(0,Math.min(1,e||0))}function zx(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 zS=e=>()=>e;function sce(e,t){return function(r){return e+r*t}}function lce(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 cce(e){return(e=+e)==1?w5:function(t,r){return r-t?lce(t,r,e):zS(isNaN(t)?r:t)}}function w5(e,t){var r=t-e;return r?sce(e,r):zS(isNaN(e)?t:e)}const Zk=function e(t){var r=cce(t);function n(a,i){var s=r((a=pw(a)).r,(i=pw(i)).r),l=r(a.g,i.g),c=r(a.b,i.b),u=w5(a.opacity,i.opacity);
vendor: 5,672 bytes, line 422
422return function(f){return a.r=s(f),a.g=l(f),a.b=c(f),a.opacity=u(f),a+""}}return n.gamma=e,n}(1);function uce(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function dce(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fce(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s<n;++s)a[s]=Bu(e[s],t[s]);for(;s<r;++s)i[s]=t[s];return function(l){for(s=0;s<n;++s)i[s]=a[s](l);return i}}function hce(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Hm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function pce(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Bu(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var mw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vx=new RegExp(mw.source,"g");function mce(e){return function(){return e}}function gce(e){return function(t){return e(t)+""}}function vce(e,t){var r=mw.lastIndex=Vx.lastIndex=0,n,a,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=mw.exec(e))&&(a=Vx.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),l[s]?l[s]+=i:l[++s]=i),(n=n[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,c.push({i:s,x:Hm(n,a)})),r=Vx.lastIndex;return r<t.length&&(i=t.slice(r),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?gce(c[0].x):mce(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Bu(e,t){var r=typeof t,n;return t==null||r==="boolean"?zS(t):(r==="number"?Hm:r==="string"?(n=Nf(t))?(t=n,Zk):vce:t instanceof Nf?Zk:t instanceof Date?hce:dce(t)?uce:Array.isArray(t)?fce:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?pce:Hm)(e,t)}function VS(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function yce(e,t){t===void 0&&(t=e,e=Bu);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return i[l](s-l)}}function xce(e){return function(){return e}}function qm(e){return+e}var Qk=[0,1];function Qr(e){return e}function gw(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:xce(isNaN(t)?NaN:.5)}function bce(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function wce(e,t,r){var n=e[0],a=e[1],i=t[0],s=t[1];return a<n?(n=gw(a,n),i=r(s,i)):(n=gw(n,a),i=r(i,s)),function(l){return i(n(l))}}function jce(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=gw(e[s],e[s+1]),i[s]=r(t[s],t[s+1]);return function(l){var c=Ch(e,l,1,n)-1;return i[c](a[c](l))}}function Ph(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function iy(){var e=Qk,t=Qk,r=Bu,n,a,i,s=Qr,l,c,u;function f(){var h=Math.min(e.length,t.length);return s!==Qr&&(s=bce(e[0],e[h-1])),l=h>2?jce:wce,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?i:(c||(c=l(e.map(n),t,r)))(n(s(h)))}return d.invert=function(h){return s(a((u||(u=l(t,e.map(n),Hm)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,qm),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=VS,f()},d.clamp=function(h){return arguments.length?(s=h?!0:Qr,f()):s!==Qr},d.interpolate=function(h){return arguments.length?(r=h,f()):r},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,m){return n=h,a=m,f()}}function WS(){return iy()(Qr,Qr)}function Sce(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Km(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 Vc(e){return e=Km(Math.abs(e)),e?e[1]:NaN}function Cce(e,t){return function(r,n){for(var a=r.length,i=[],s=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),i.push(r.substring(a-=l,a+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function Nce(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Pce=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pf(e){if(!(t=Pce.exec(e)))throw new Error("invalid format: "+e);var t;return new US({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]})}Pf.prototype=US.prototype;function US(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+""}US.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 Ace(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var j5;function kce(e,t){var r=Km(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(j5=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>
vendor: 5,906 bytes, line 422
4220?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Km(e,Math.max(0,t+i-1))[0]}function Jk(e,t){var r=Km(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const eO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Sce,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)=>Jk(e*100,t),r:Jk,s:kce,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tO(e){return e}var rO=Array.prototype.map,nO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Oce(e){var t=e.grouping===void 0||e.thousands===void 0?tO:Cce(rO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?tO:Nce(rO.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Pf(d);var h=d.fill,m=d.align,p=d.sign,g=d.symbol,v=d.zero,y=d.width,x=d.comma,b=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):eO[j]||(b===void 0&&(b=12),S=!0,j="g"),(v||h==="0"&&m==="=")&&(v=!0,h="0",m="=");var C=g==="$"?r:g==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",N=g==="$"?n:/[%p]/.test(j)?s:"",P=eO[j],A=/[defgprs%]/.test(j);b=b===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function O(M){var k=C,E=N,$,T,R;if(j==="c")E=P(M)+E,M="";else{M=+M;var B=M<0||1/M<0;if(M=isNaN(M)?c:P(Math.abs(M),b),S&&(M=Ace(M)),B&&+M==0&&p!=="+"&&(B=!1),k=(B?p==="("?p:l:p==="-"||p==="("?"":p)+k,E=(j==="s"?nO[8+j5/3]:"")+E+(B&&p==="("?")":""),A){for($=-1,T=M.length;++$<T;)if(R=M.charCodeAt($),48>R||R>57){E=(R===46?a+M.slice($+1):M.slice($))+E,M=M.slice(0,$);break}}}x&&!v&&(M=t(M,1/0));var F=k.length+M.length+E.length,D=F<y?new Array(y-F+1).join(h):"";switch(x&&v&&(M=t(D+M,D.length?y-E.length:1/0),D=""),m){case"<":M=k+M+E+D;break;case"=":M=k+D+M+E;break;case"^":M=D.slice(0,F=D.length>>1)+k+M+E+D.slice(F);break;default:M=D+k+M+E;break}return i(M)}return O.toString=function(){return d+""},O}function f(d,h){var m=u((d=Pf(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(Vc(h)/3)))*3,g=Math.pow(10,-p),v=nO[8+p/3];return function(y){return m(g*y)+v}}return{format:u,formatPrefix:f}}var gp,GS,S5;Ece({thousands:",",grouping:[3],currency:["$",""]});function Ece(e){return gp=Oce(e),GS=gp.format,S5=gp.formatPrefix,gp}function _ce(e){return Math.max(0,-Vc(Math.abs(e)))}function Tce(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vc(t)/3)))*3-Vc(Math.abs(e)))}function Mce(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vc(t)-Vc(e))+1}function C5(e,t,r,n){var a=fw(e,t,r),i;switch(n=Pf(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=Tce(a,s))&&(n.precision=i),S5(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=Mce(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=_ce(a))&&(n.precision=i-(n.type==="%")*2);break}}return GS(n)}function ss(e){var t=e.domain;return e.ticks=function(r){var n=t();return uw(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return C5(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,s=n[a],l=n[i],c,u,f=10;for(l<s&&(u=s,s=l,l=u,u=a,a=i,i=u);f-- >0;){if(u=dw(s,l,r),u===c)return n[a]=s,n[i]=l,t(n);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function Ym(){var e=WS();return e.copy=function(){return Ph(e,Ym())},ia.apply(e,arguments),ss(e)}function N5(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,qm),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return N5(e).unknown(t)},e=arguments.length?Array.from(e,qm):[0,1],ss(r)}function P5(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],s;return i<a&&(s=r,r=n,n=s,s=a,a=i,i=s),e[r]=t.floor(a),e[n]=t.ceil(i),e}function aO(e){return Math.log(e)}function iO(e){return Math.exp(e)}function Rce(e){return-Math.log(-e)}function $ce(e){return-Math.exp(-e)}function Ice(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Dce(e){return e===10?Ice:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Fce(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 oO(e){return(t,r)=>-e(-t,r)}function HS(e){const t=e(aO,iO),r=t.domain;let n=10,a,i;function s(){return a=Fce(n),i=Dce(n),r()[0]<0?(a=oO(a),i=oO(i),e(Rce,$ce)):e(aO,iO),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const c=r();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=a(u),m=a(f),p,g;const v=l==null?10:+l;let y=[];if(!(n%1)&&m-h<v){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(p=1;p<n;++p)if(g=h<0?p/i(-h):p*i(h),!(g<u)){if(g>f)break;y.push(g)}}else for(;h<=m;++h)for(p=n-1;p>=1;--p)if(g=h>0?p/i(-h):p*i(h),!(g<u)){if(g>f)break;y.push(g)}y.length*2<v&&(y=uw(u,f,v))}else y=uw(h,m,Math.min(m-h,v)).map(i);return d?y.reverse():y},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Pf(c)).precision==null&&(c.trim=!0),c=GS(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*n<n-.5&&(d*=n),d<=u?c(f):""}},t.nice=()=>r(P5(r(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function A5(){const e=HS(iy()).domain([1,10]);return e.copy=()=>Ph(e,A5()).base(e.base()),ia.apply(e,arguments),e}
422function sO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function lO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function qS(e){var t=1,r=e(sO(t),lO(t));return r.constant=function(n){return arguments.length?e(sO(t=+n),lO(t)):t},ss(r)}function k5(){var e=qS(iy());return e.copy=function(){return Ph(e,k5()).constant(e.constant())},ia.apply(e,arguments)}function cO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Lce(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bce(e){return e<0?-e*e:e*e}function KS(e){var t=e(Qr,Qr),r=1;function n(){return r===1?e(Qr,Qr):r===.5?e(Lce,Bce):e(cO(r),cO(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ss(t)}function YS(){var e=KS(iy());return e.copy=function(){return Ph(e,YS()).exponent(e.exponent())},ia.apply(e,arguments),e}function zce(){return YS.apply(null,arguments).exponent(.5)}function uO(e){return Math.sign(e)*e*e}function Vce(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function O5(){var e=WS(),t=[0,1],r=!1,n;function a(i){var s=Vce(e(i));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(i){return e.invert(uO(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,qm)).map(uO)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return O5(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ia.apply(a,arguments),ss(a)}function E5(){var e=[],t=[],r=[],n;function a(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s<l;)r[s-1]=qle(e,s/l);return i}function i(s){return s==null||isNaN(s=+s)?n:t[Ch(r,s)]}return i.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Vo),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return E5().domain(e).range(t).unknown(n)},ia.apply(i,arguments)}function _5(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[Ch(n,c,0,r)]:i}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,l()):a.slice()},s.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return _5().domain([e,t]).range(a).unknown(i)},ia.apply(ss(s),arguments)}function T5(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Ch(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return T5().domain(e).range(t).unknown(r)},ia.apply(a,arguments)}const Wx=new Date,Ux=new Date;function hr(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),l=a.ceil(i);return i-s<l-i?s:l},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<s)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<s);return c},a.filter=i=>hr(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!i(s););else for(;--l>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(Wx.setTime(+i),Ux.setTime(+s),e(Wx),e(Ux),Math.floor(r(Wx,Ux))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Xm=hr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Xm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?hr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Xm);Xm.range;const Ti=1e3,Kn=Ti*60,Mi=Kn*60,Hi=Mi*24,XS=Hi*7,dO=Hi*30,Gx=Hi*365,Es=hr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ti)},(e,t)=>(t-e)/Ti,e=>e.getUTCSeconds());Es.range;const ZS=hr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ti)},(e,t)=>{e.setTime(+e+t*Kn)},(e,t)=>(t-e)/Kn,e=>e.getMinutes());ZS.range;const QS=hr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Kn)},(e,t)=>(t-e)/Kn,e=>e.getUTCMinutes());QS.range;const JS=hr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ti-e.getMinutes()*Kn)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getHours());JS.range;const eC=hr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getUTCHours());eC.range;const Ah=hr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kn)/Hi,e=>e.getDate()-1);Ah.range;const oy=hr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hi,e=>e.getUTCDate()-1);oy.range;const M5=hr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hi,e=>
vendor: 4,175 bytes, line 422
422Math.floor(e/Hi));M5.range;function xl(e){return hr(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())*Kn)/XS)}const sy=xl(0),Zm=xl(1),Wce=xl(2),Uce=xl(3),Wc=xl(4),Gce=xl(5),Hce=xl(6);sy.range;Zm.range;Wce.range;Uce.range;Wc.range;Gce.range;Hce.range;function bl(e){return hr(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)/XS)}const ly=bl(0),Qm=bl(1),qce=bl(2),Kce=bl(3),Uc=bl(4),Yce=bl(5),Xce=bl(6);ly.range;Qm.range;qce.range;Kce.range;Uc.range;Yce.range;Xce.range;const tC=hr(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());tC.range;const rC=hr(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());rC.range;const qi=hr(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());qi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hr(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)});qi.range;const Ki=hr(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());Ki.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hr(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)});Ki.range;function R5(e,t,r,n,a,i){const s=[[Es,1,Ti],[Es,5,5*Ti],[Es,15,15*Ti],[Es,30,30*Ti],[i,1,Kn],[i,5,5*Kn],[i,15,15*Kn],[i,30,30*Kn],[a,1,Mi],[a,3,3*Mi],[a,6,6*Mi],[a,12,12*Mi],[n,1,Hi],[n,2,2*Hi],[r,1,XS],[t,1,dO],[t,3,3*dO],[e,1,Gx]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),p=m?m.range(u,+f+1):[];return h?p.reverse():p}function c(u,f,d){const h=Math.abs(f-u)/d,m=FS(([,,v])=>v).right(s,h);if(m===s.length)return e.every(fw(u/Gx,f/Gx,d));if(m===0)return Xm.every(Math.max(fw(u,f,d),1));const[p,g]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return p.every(g)}return[l,c]}const[Zce,Qce]=R5(Ki,rC,ly,M5,eC,QS),[Jce,eue]=R5(qi,tC,sy,Ah,JS,ZS);function Hx(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 qx(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 cd(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function tue(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,u=ud(a),f=dd(a),d=ud(i),h=dd(i),m=ud(s),p=dd(s),g=ud(l),v=dd(l),y=ud(c),x=dd(c),b={a:B,A:F,b:D,B:G,c:null,d:vO,e:vO,f:Cue,g:Rue,G:Iue,H:wue,I:jue,j:Sue,L:$5,m:Nue,M:Pue,p:K,q:z,Q:bO,s:wO,S:Aue,u:kue,U:Oue,V:Eue,w:_ue,W:Tue,x:null,X:null,y:Mue,Y:$ue,Z:Due,"%":xO},S={a:U,A:ee,b:Y,B:W,c:null,d:yO,e:yO,f:zue,g:Zue,G:Jue,H:Fue,I:Lue,j:Bue,L:D5,m:Vue,M:Wue,p:H,q:me,Q:bO,s:wO,S:Uue,u:Gue,U:Hue,V:que,w:Kue,W:Yue,x:null,X:null,y:Xue,Y:Que,Z:ede,"%":xO},j={a:O,A:M,b:k,B:E,c:$,d:mO,e:mO,f:vue,g:pO,G:hO,H:gO,I:gO,j:hue,L:gue,m:fue,M:pue,p:A,q:due,Q:xue,s:bue,S:mue,u:oue,U:sue,V:lue,w:iue,W:cue,x:T,X:R,y:pO,Y:hO,Z:uue,"%":yue};b.x=C(r,b),b.X=C(n,b),b.c=C(t,b),S.x=C(r,S),S.X=C(n,S),S.c=C(t,S);function C(q,ue){return function(I){var L=[],Q=-1,le=0,V=q.length,oe,ae,ye;for(I instanceof Date||(I=new Date(+I));++Q<V;)q.charCodeAt(Q)===37&&(L.push(q.slice(le,Q)),(ae=fO[oe=q.charAt(++Q)])!=null?oe=q.charAt(++Q):ae=oe==="e"?" ":"0",(ye=ue[oe])&&(oe=ye(I,ae)),L.push(oe),le=Q+1);return L.push(q.slice(le,Q)),L.join("")}}function N(q,ue){return function(I){var L=cd(1900,void 0,1),Q=P(L,q,I+="",0),le,V;if(Q!=I.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));
vendor: 7,127 bytes, line 422
422if(ue&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(le=qx(cd(L.y,0,1)),V=le.getUTCDay(),le=V>4||V===0?Qm.ceil(le):Qm(le),le=oy.offset(le,(L.V-1)*7),L.y=le.getUTCFullYear(),L.m=le.getUTCMonth(),L.d=le.getUTCDate()+(L.w+6)%7):(le=Hx(cd(L.y,0,1)),V=le.getDay(),le=V>4||V===0?Zm.ceil(le):Zm(le),le=Ah.offset(le,(L.V-1)*7),L.y=le.getFullYear(),L.m=le.getMonth(),L.d=le.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),V="Z"in L?qx(cd(L.y,0,1)).getUTCDay():Hx(cd(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(V+5)%7:L.w+L.U*7-(V+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,qx(L)):Hx(L)}}function P(q,ue,I,L){for(var Q=0,le=ue.length,V=I.length,oe,ae;Q<le;){if(L>=V)return-1;if(oe=ue.charCodeAt(Q++),oe===37){if(oe=ue.charAt(Q++),ae=j[oe in fO?ue.charAt(Q++):oe],!ae||(L=ae(q,I,L))<0)return-1}else if(oe!=I.charCodeAt(L++))return-1}return L}function A(q,ue,I){var L=u.exec(ue.slice(I));return L?(q.p=f.get(L[0].toLowerCase()),I+L[0].length):-1}function O(q,ue,I){var L=m.exec(ue.slice(I));return L?(q.w=p.get(L[0].toLowerCase()),I+L[0].length):-1}function M(q,ue,I){var L=d.exec(ue.slice(I));return L?(q.w=h.get(L[0].toLowerCase()),I+L[0].length):-1}function k(q,ue,I){var L=y.exec(ue.slice(I));return L?(q.m=x.get(L[0].toLowerCase()),I+L[0].length):-1}function E(q,ue,I){var L=g.exec(ue.slice(I));return L?(q.m=v.get(L[0].toLowerCase()),I+L[0].length):-1}function $(q,ue,I){return P(q,t,ue,I)}function T(q,ue,I){return P(q,r,ue,I)}function R(q,ue,I){return P(q,n,ue,I)}function B(q){return s[q.getDay()]}function F(q){return i[q.getDay()]}function D(q){return c[q.getMonth()]}function G(q){return l[q.getMonth()]}function K(q){return a[+(q.getHours()>=12)]}function z(q){return 1+~~(q.getMonth()/3)}function U(q){return s[q.getUTCDay()]}function ee(q){return i[q.getUTCDay()]}function Y(q){return c[q.getUTCMonth()]}function W(q){return l[q.getUTCMonth()]}function H(q){return a[+(q.getUTCHours()>=12)]}function me(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var ue=C(q+="",b);return ue.toString=function(){return q},ue},parse:function(q){var ue=N(q+="",!1);return ue.toString=function(){return q},ue},utcFormat:function(q){var ue=C(q+="",S);return ue.toString=function(){return q},ue},utcParse:function(q){var ue=N(q+="",!0);return ue.toString=function(){return q},ue}}}var fO={"-":"",_:" ",0:"0"},jr=/^\s*\d+/,rue=/^%/,nue=/[\\^$*+?|[\]().{}]/g;function jt(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function aue(e){return e.replace(nue,"\\$&")}function ud(e){return new RegExp("^(?:"+e.map(aue).join("|")+")","i")}function dd(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function iue(e,t,r){var n=jr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function oue(e,t,r){var n=jr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function sue(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function lue(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function cue(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function hO(e,t,r){var n=jr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function pO(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function uue(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 due(e,t,r){var n=jr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function fue(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function mO(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function hue(e,t,r){var n=jr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function gO(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function pue(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function mue(e,t,r){var n=jr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function gue(e,t,r){var n=jr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function vue(e,t,r){var n=jr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function yue(e,t,r){var n=rue.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function xue(e,t,r){var n=jr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function bue(e,t,r){var n=jr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function vO(e,t){return jt(e.getDate(),t,2)}function wue(e,t){return jt(e.getHours(),t,2)}function jue(e,t){return jt(e.getHours()%12||12,t,2)}function Sue(e,t){return jt(1+Ah.count(qi(e),e),t,3)}function $5(e,t){return jt(e.getMilliseconds(),t,3)}function Cue(e,t){return $5(e,t)+"000"}function Nue(e,t){return jt(e.getMonth()+1,t,2)}function Pue(e,t){return jt(e.getMinutes(),t,2)}function Aue(e,t){return jt(e.getSeconds(),t,2)}function kue(e){var t=e.getDay();return t===0?7:t}function Oue(e,t){return jt(sy.count(qi(e)-1,e),t,2)}function I5(e){var t=e.getDay();return t>=4||t===0?Wc(e):Wc.ceil(e)}function Eue(e,t){return e=I5(e),jt(Wc.count(qi(e),e)+(qi(e).getDay()===4),t,2)}function _ue(e){return e.getDay()}function Tue(e,t){return jt(Zm.count(qi(e)-1,e),t,2)}function Mue(e,t){return jt(e.getFullYear()%100,t,2)}function Rue(e,t){return e=I5(e),jt(e.getFullYear()%100,t,2)}function $ue(e,t){return jt(e.getFullYear()%1e4,t,4)}function Iue(e,t){var r=e.getDay();return e=r>=4||r===0?Wc(e):Wc.ceil(e),jt(e.getFullYear()%1e4,t,4)}function Due(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+jt(t/60|0,"0",2)+jt(t%60,"0",2)}function yO(e,t){return jt(e.getUTCDate(),t,2)}function Fue(e,t){return jt(e.getUTCHours(),t,2)}function Lue(e,t){return jt(e.getUTCHours()%12||12,t,2)}function Bue(e,t){return jt(1+oy.count(Ki(e),e),t,3)}function D5(e,t){return jt(e.getUTCMilliseconds(),t,3)}function zue(e,t){return D5(e,t)+"000"}function Vue(e,t){return jt(e.getUTCMonth()+1,t,2)}function Wue(e,t){return jt(e.getUTCMinutes(),t,2)}function Uue(e,t){return jt(e.getUTCSeconds(),t,2)}function Gue(e){var t=e.getUTCDay();return t===0?7:t}function Hue(e,t){return jt(ly.count(Ki(e)-1,e),t,2)}function F5(e){var t=e.getUTCDay();return t>=4||t===0?Uc(e):Uc.ceil(e)}function que(e,t){return e=F5(e),jt(Uc.count(Ki(e),e)+(Ki(e).getUTCDay()===4),t,2)}function Kue(e){return e.getUTCDay()}function Yue(e,t){return jt(Qm.count(Ki(e)-1,e),t,2)}function Xue(e,t){return jt(e.getUTCFullYear()%100,t,2)}function Zue(e,t){return e=F5(e),jt(e.getUTCFullYear()%100,t,2)}function Que(e,t){return jt(e.getUTCFullYear()%1e4,t,4)}function Jue(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Uc(e):Uc.ceil(e),jt(e.getUTCFullYear()%1e4,t,4)}function ede(){return"+0000"}function xO(){return"%"}function bO(e){return+e}function wO(e){return Math.floor(+e/1e3)}var El,L5,B5;tde({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
422ay","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 tde(e){return El=tue(e),L5=El.format,El.parse,B5=El.utcFormat,El.utcParse,El}function rde(e){return new Date(e)}function nde(e){return e instanceof Date?+e:+new Date(+e)}function nC(e,t,r,n,a,i,s,l,c,u){var f=WS(),d=f.invert,h=f.domain,m=u(".%L"),p=u(":%S"),g=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),x=u("%b %d"),b=u("%B"),S=u("%Y");function j(C){return(c(C)<C?m:l(C)<C?p:s(C)<C?g:i(C)<C?v:n(C)<C?a(C)<C?y:x:r(C)<C?b:S)(C)}return f.invert=function(C){return new Date(d(C))},f.domain=function(C){return arguments.length?h(Array.from(C,nde)):h().map(rde)},f.ticks=function(C){var N=h();return e(N[0],N[N.length-1],C??10)},f.tickFormat=function(C,N){return N==null?j:u(N)},f.nice=function(C){var N=h();return(!C||typeof C.range!="function")&&(C=t(N[0],N[N.length-1],C??10)),C?h(P5(N,C)):f},f.copy=function(){return Ph(f,nC(e,t,r,n,a,i,s,l,c,u))},f}function ade(){return ia.apply(nC(Jce,eue,qi,tC,sy,Ah,JS,ZS,Es,L5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ide(){return ia.apply(nC(Zce,Qce,Ki,rC,ly,oy,eC,QS,Es,B5).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cy(){var e=0,t=1,r,n,a,i,s=Qr,l=!1,c;function u(d){return d==null||isNaN(d=+d)?c:s(a===0?.5:(d=(i(d)-r)*a,l?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(d){return arguments.length?(l=!!d,u):l},u.interpolator=function(d){return arguments.length?(s=d,u):s};function f(d){return function(h){var m,p;return arguments.length?([m,p]=h,s=d(m,p),u):[s(0),s(1)]}}return u.range=f(Bu),u.rangeRound=f(VS),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return i=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),u}}function ls(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function z5(){var e=ss(cy()(Qr));return e.copy=function(){return ls(e,z5())},to.apply(e,arguments)}function V5(){var e=HS(cy()).domain([1,10]);return e.copy=function(){return ls(e,V5()).base(e.base())},to.apply(e,arguments)}function W5(){var e=qS(cy());return e.copy=function(){return ls(e,W5()).constant(e.constant())},to.apply(e,arguments)}function aC(){var e=KS(cy());return e.copy=function(){return ls(e,aC()).exponent(e.exponent())},to.apply(e,arguments)}function ode(){return aC.apply(null,arguments).exponent(.5)}function U5(){var e=[],t=Qr;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ch(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Vo),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>Hle(e,i/n))},r.copy=function(){return U5(t).domain(e)},to.apply(r,arguments)}function uy(){var e=0,t=.5,r=1,n=1,a,i,s,l,c,u=Qr,f,d=!1,h;function m(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(n*g<n*i?l:c),u(d?Math.max(0,Math.min(1,g)):g))}m.domain=function(g){return arguments.length?([e,t,r]=g,a=f(e=+e),i=f(t=+t),s=f(r=+r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,m):[e,t,r]},m.clamp=function(g){return arguments.length?(d=!!g,m):d},m.interpolator=function(g){return arguments.length?(u=g,m):u};function p(g){return function(v){var y,x,b;return arguments.length?([y,x,b]=v,u=yce(g,[y,x,b]),m):[u(0),u(.5),u(1)]}}return m.range=p(Bu),m.rangeRound=p(VS),m.unknown=function(g){return arguments.length?(h=g,m):h},function(g){return f=g,a=g(e),i=g(t),s=g(r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,m}}function G5(){var e=ss(uy()(Qr));return e.copy=function(){return ls(e,G5())},to.apply(e,arguments)}function H5(){var e=HS(uy()).domain([.1,1,10]);return e.copy=function(){return ls(e,H5()).base(e.base())},to.apply(e,arguments)}function q5(){var e=qS(uy());return e.copy=function(){return ls(e,q5()).constant(e.constant())},to.apply(e,arguments)}function iC(){var e=KS(uy());return e.copy=function(){return ls(e,iC()).exponent(e.exponent())},to.apply(e,arguments)}function sde(){return iC.apply(null,arguments).exponent(.5)}const jO=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:jf,scaleDiverging:G5,scaleDivergingLog:H5,scaleDivergingPow:iC,scaleDivergingSqrt:sde,scaleDivergingSymlog:q5,scaleIdentity:N5,scaleImplicit:hw,scaleLinear:Ym,scaleLog:A5,scaleOrdinal:LS,scalePoint:Id,scalePow:YS,scaleQuantile:E5,scaleQuantize:_5,scaleRadial:O5,scaleSequential:z5,scaleSequentialLog:V5,scaleSequentialPow:aC,scaleSequentialQuantile:U5,scaleSequentialSqrt:ode,scaleSequentialSymlog:W5,scaleSqrt:zce,scaleSymlog:k5,scaleThreshold:T5,scaleTime:ade,scaleUtc:ide,tickFormat:C5},Symbol.toStringTag,{value:"Module"}));var lde=Eu;function cde(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],s=t(i);if(s!=null&&(l===void 0?s===s&&!lde(s):r(s,l)))var l=s,c=i}return c}var dy=cde;function ude(e,t){return e>t}var K5=ude,dde=dy,fde=K5,hde=Lu;function pde(e){return e&&e.length?dde(e,hde,fde):void 0}var mde=pde;const Eo=vt(mde);function gde(e,t){return e<t}
vendor: 62,685 bytes, lines 422-449
422var Y5=gde,vde=dy,yde=Y5,xde=Lu;function bde(e){return e&&e.length?vde(e,xde,yde):void 0}var wde=bde;const fy=vt(wde);var jde=xS,Sde=gi,Cde=n5,Nde=mn;function Pde(e,t){var r=Nde(e)?jde:Cde;return r(e,Sde(t))}var Ade=Pde,kde=t5,Ode=Ade;function Ede(e,t){return kde(Ode(e,t),1)}var _de=Ede;const Tde=vt(_de);var Mde=RS;function Rde(e,t){return Mde(e,t)}var $de=Rde;const al=vt($de);var zu=1e9,Ide={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},sC,zt=!0,ta="[DecimalError] ",Ws=ta+"Invalid argument: ",oC=ta+"Exponent out of range: ",Vu=Math.floor,js=Math.pow,Dde=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Nn,vr=1e7,It=7,X5=9007199254740991,Jm=Vu(X5/It),ze={};ze.absoluteValue=ze.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ze.comparedTo=ze.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};ze.decimalPlaces=ze.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*It;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ze.dividedBy=ze.div=function(e){return Li(this,new this.constructor(e))};ze.dividedToIntegerBy=ze.idiv=function(e){var t=this,r=t.constructor;return Et(Li(t,new r(e),0,1),r.precision)};ze.equals=ze.eq=function(e){return!this.cmp(e)};ze.exponent=function(){return ar(this)};ze.greaterThan=ze.gt=function(e){return this.cmp(e)>0};ze.greaterThanOrEqualTo=ze.gte=function(e){return this.cmp(e)>=0};ze.isInteger=ze.isint=function(){return this.e>this.d.length-2};ze.isNegative=ze.isneg=function(){return this.s<0};ze.isPositive=ze.ispos=function(){return this.s>0};ze.isZero=function(){return this.s===0};ze.lessThan=ze.lt=function(e){return this.cmp(e)<0};ze.lessThanOrEqualTo=ze.lte=function(e){return this.cmp(e)<1};ze.logarithm=ze.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Nn))throw Error(ta+"NaN");if(r.s<1)throw Error(ta+(r.s?"NaN":"-Infinity"));return r.eq(Nn)?new n(0):(zt=!1,t=Li(Af(r,i),Af(e,i),i),zt=!0,Et(t,a))};ze.minus=ze.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?J5(t,e):Z5(t,(e.s=-e.s,e))};ze.modulo=ze.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(ta+"NaN");return r.s?(zt=!1,t=Li(r,e,0,1).times(e),zt=!0,r.minus(t)):Et(new n(r),a)};ze.naturalExponential=ze.exp=function(){return Q5(this)};ze.naturalLogarithm=ze.ln=function(){return Af(this)};ze.negated=ze.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ze.plus=ze.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Z5(t,e):J5(t,(e.s=-e.s,e))};ze.precision=ze.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=ar(a)+1,n=a.d.length-1,r=n*It+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ze.squareRoot=ze.sqrt=function(){var e,t,r,n,a,i,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(ta+"NaN")}for(e=ar(l),zt=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=ti(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Vu((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=s=r+3;;)if(i=n,n=i.plus(Li(l,i,s+2)).times(.5),ti(i.d).slice(0,s)===(t=ti(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Et(i,r+1,0),i.times(i).eq(l)){n=i;break}}else if(t!="9999")break;s+=4}return zt=!0,Et(n,r)};ze.times=ze.mul=function(e){var t,r,n,a,i,s,l,c,u,f=this,d=f.constructor,h=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,r=f.e+e.e,c=h.length,u=m.length,c<u&&(i=h,h=m,m=i,s=c,c=u,u=s),i=[],s=c+u,n=s;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=c+n;a>n;)l=i[a]+m[n]*h[a-n-1]+t,i[a--]=l%vr|0,t=l/vr|0;i[a]=(i[a]+t)%vr|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,zt?Et(e,d.precision):e};ze.toDecimalPlaces=ze.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(fi(e,0,zu),t===void 0?t=n.rounding:fi(t,0,8),Et(r,e+ar(r)+1,t))};ze.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=il(n,!0):(fi(e,0,zu),t===void 0?t=a.rounding:fi(t,0,8),n=Et(new a(n),e+1,t),r=il(n,!0,e+1)),r};ze.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?il(a):(fi(e,0,zu),t===void 0?t=i.rounding:fi(t,0,8),n=Et(new i(a),e+ar(a)+1,t),r=il(n.abs(),!1,e+ar(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};ze.toInteger=ze.toint=function(){var e=this,t=e.constructor;return Et(new t(e),ar(e)+1,t.rounding)};ze.toNumber=function(){return+this};ze.toPower=ze.pow=function(e){var t,r,n,a,i,s,l=this,c=l.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(Nn);if(l=new c(l),!l.s){if(e.s<1)throw Error(ta+"Infinity");return l}if(l.eq(Nn))return l;if(n=c.precision,e.eq(Nn))return Et(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,i=l.s,s){if((r=f<0?-f:f)<=X5){for(a=new c(Nn),t=Math.ceil(n/It+4),zt=!1;r%2&&(a=a.times(l),CO(a.d,t)),r=Vu(r/2),r!==0;)l=l.times(l),CO(l.d,t);return zt=!0,e.s<0?new c(Nn).div(a):Et(a,n)}}else if(i<0)throw Error(ta+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,zt=!1,a=e.times(Af(l,n+u)),zt=!0,a=Q5(a),a.s=i,a};ze.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=ar(a),n=il(a,r<=i.toExpNeg||r>=i.toExpPos)):(fi(e,1,zu),t===void 0?t=i.rounding:fi(t,0,8),a=Et(new i(a),e,t),r=ar(a),n=il(a,e<=r||r<=i.toExpNeg,e)),n};ze.toSignificantDigits=ze.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(fi(e,1,zu),t===void 0?t=n.rounding:fi(t,0,8)),Et(new n(r),e,t)};ze.toString=ze.valueOf=ze.val=ze.toJSON=ze[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ar(e),r=e.constructor;return il(e,t<=r.toExpNeg||t>=r.toExpPos)};function Z5(e,t){var r,n,a,i,s,l,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),zt?Et(t,d):t;if(c=e.d,u=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(n=c,i=-i,l=u.length):(n=u,a=s,l=c.length),s=Math.ceil(d/It),l=s>l?s+1:l+1,i>l&&(i=l,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,n=u,u=c,c=n),r=0;i;)r=(c[--i]=c[i]+u[i]+r)/vr|0,c[i]%=vr;for(r&&(c.unshift(r),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,zt?Et(t,d):t}function fi(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ws+e)}function ti(e){var t,r,n,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)n=e[t]+"",r=It-n.length,r&&(i+=mo(r)),i+=n;s=e[t],n=s+"",r=It-n.length,r&&(i+=mo(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var Li=function(){function e(n,a){var i,s=0,l=n.length;for(n=n.slice();l--;)i=n[l]*a+s,n[l]=i%vr|0,s=i/vr|0;return s&&n.unshift(s),n}function t(n,a,i,s){var l,c;if(i!=s)c=i>s?1:-1;else for(l=c=0;l<i;l++)if(n[l]!=a[l]){c=n[l]>a[l]?1:-1;break}return c}function r(n,a,i){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*vr+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s){var l,c,u,f,d,h,m,p,g,v,y,x,b,S,j,C,N,P,A=n.constructor,O=n.s==a.s?1:-1,M=n.d,k=a.d;if(!n.s)return new A(n);if(!a.s)throw Error(ta+"Division by zero");for(c=n.e-a.e,N=k.length,j=M.length,m=new A(O),p=m.d=[],u=0;k[u]==(M[u]||0);)++u;if(k[u]>(M[u]||0)&&--c,i==null?x=i=A.precision:s?x=i+(ar(n)-ar(a))+1:x=i,x<0)return new A(0);if(x=x/It+2|0,u=0,N==1)for(f=0,k=k[0],x++;(u<j||f)&&x--;u++)b=f*vr+(M[u]||0),p[u]=b/k|0,f=b%k|0;else{for(f=vr/(k[0]+1)|0,f>1&&(k=e(k,f),M=e(M,f),N=k.length,j=M.length),S=N,g=M.slice(0,N),v=g.length;v<N;)g[v++]=0;P=k.slice(),P.unshift(0),C=k[0],k[1]>=vr/2&&++C;do f=0,l=t(k,g,N,v),l<0?(y=g[0],N!=v&&(y=y*vr+(g[1]||0)),f=y/C|0,f>1?(f>=vr&&(f=vr-1),d=e(k,f),h=d.length,v=g.length,l=t(d,g,h,v),l==1&&(f--,r(d,N<h?P:k,h))):(f==0&&(l=f=1),d=k.slice()),h=d.length,h<v&&d.unshift(0),r(g,d,v),l==-1&&(v=g.length,l=t(k,g,N,v),l<1&&(f++,r(g,N<v?P:k,v))),v=g.length):l===0&&(f++,g=[0]),p[u++]=f,l&&g[0]?g[v++]=M[S]||0:(g=[M[S]],v=1);while((S++<j||g[0]!==void 0)&&x--)}return p[0]||p.shift(),m.e=c,Et(m,s?i+ar(m)+1:i)}}();function Q5(e,t){var r,n,a,i,s,l,c=0,u=0,f=e.constructor,d=f.precision;if(ar(e)>16)throw Error(oC+ar(e));if(!e.s)return new f(Nn);for(t==null?(zt=!1,l=d):l=t,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(js(2,u))/Math.LN10*2+5|0,l+=n,r=a=i=new f(Nn),f.precision=l;;){if(a=Et(a.times(e),l),r=r.times(++c),s=i.plus(Li(a,r,l)),ti(s.d).slice(0,l)===ti(i.d).slice(0,l)){for(;u--;)i=Et(i.times(i),l);return f.precision=d,t==null?(zt=!0,Et(i,d)):i}i=s}}function ar(e){for(var t=e.e*It,r=e.d[0];r>=10;r/=10)t++;return t}function Kx(e,t,r){if(t>e.LN10.sd())throw zt=!0,r&&(e.precision=r),Error(ta+"LN10 precision limit exceeded");return Et(new e(e.LN10),t)}function mo(e){for(var t="";e--;)t+="0";return t}function Af(e,t){var r,n,a,i,s,l,c,u,f,d=1,h=10,m=e,p=m.d,g=m.constructor,v=g.precision;if(m.s<1)throw Error(ta+(m.s?"NaN":"-Infinity"));if(m.eq(Nn))return new g(0);if(t==null?(zt=!1,u=v):u=t,m.eq(10))return t==null&&(zt=!0),Kx(g,u);if(u+=h,g.precision=u,r=ti(p),n=r.charAt(0),i=ar(m),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(e),r=ti(m.d),n=r.charAt(0),d++;i=ar(m),n>1?(m=new g("0."+r),i++):m=new g(n+"."+r.slice(1))}else return c=Kx(g,u+2,v).times(i+""),m=Af(new g(n+"."+r.slice(1)),u-h).plus(c),g.precision=v,t==null?(zt=!0,Et(m,v)):m;for(l=s=m=Li(m.minus(Nn),m.plus(Nn),u),f=Et(m.times(m),u),a=3;;){if(s=Et(s.times(f),u),c=l.plus(Li(s,new g(a),u)),ti(c.d).slice(0,u)===ti(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(Kx(g,u+2,v).times(i+""))),l=Li(l,new g(d),u),g.precision=v,t==null?(zt=!0,Et(l,v)):l;l=c,a+=2}}function SO(e,t){var r,n,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Vu(r/It),e.d=[],n=(r+1)%It,r<0&&(n+=It),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=It;n<a;)e.d.push(+t.slice(n,n+=It));t=t.slice(n),n=It-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),zt&&(e.e>Jm||e.e<-Jm))throw Error(oC+r)}else e.s=0,e.e=0,e.d=[0];return e}function Et(e,t,r){var n,a,i,s,l,c,u,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(n=t-s,n<0)n+=It,a=t,u=d[f=0];else{if(f=Math.ceil((n+1)/It),i=d.length,f>=i)return e;for(u=i=d[f],s=1;i>=10;i/=10)s++;n%=It,a=n-It+s}if(r!==void 0&&(i=js(10,s-a-1),l=u/i%10|0,c=t<0||d[f+1]!==void 0||u%i,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?a>0?u/js(10,s-a):0:d[f-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return c?(i=ar(e),d.length=1,t=t-i-1,d[0]=js(10,(It-t%It)%It),e.e=Vu(-t/It)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=f,i=1,f--):(d.length=f+1,i=js(10,It-n),d[f]=a>0?(u/js(10,s-a)%js(10,a)|0)*i:0),c)for(;;)if(f==0){(d[0]+=i)==vr&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=vr)break;d[f--]=0,i=1}for(n=d.length;d[--n]===0;)d.pop();if(zt&&(e.e>Jm||e.e<-Jm))throw Error(oC+ar(e));return e}function J5(e,t){var r,n,a,i,s,l,c,u,f,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),zt?Et(t,m):t;if(c=e.d,d=t.d,n=t.e,u=e.e,c=c.slice(),s=u-n,s){for(f=s<0,f?(r=c,s=-s,l=d.length):(r=d,n=u,l=c.length),a=Math.max(Math.ceil(m/It),l)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=c.length,l=d.length,f=a<l,f&&(l=a),a=0;a<l;a++)if(c[a]!=d[a]){f=c[a]<d[a];break}s=0}for(f&&(r=c,c=d,d=r,t.s=-t.s),l=c.length,a=d.length-l;a>0;--a)c[l++]=0;for(a=d.length;a>s;){if(c[--a]<d[a]){for(i=a;i&&c[--i]===0;)c[i]=vr-1;--c[i],c[a]+=vr}c[a]-=d[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,zt?Et(t,m):t):new h(0)}function il(e,t,r){var n,a=ar(e),i=ti(e.d),s=i.length;return t?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+mo(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mo(-a-1)+i,r&&(n=r-s)>0&&(i+=mo(n))):a>=s?(i+=mo(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+mo(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=mo(n))),e.s<0?"-"+i:i}function CO(e,t){if(e.length>t)return e.length=t,!0}function e3(e){var t,r,n;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Ws+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return SO(s,i.toString())}else if(typeof i!="string")throw Error(Ws+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,Dde.test(i))SO(s,i);else throw Error(Ws+i)}if(a.prototype=ze,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e3,a.config=a.set=Fde,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 a.config(e),a}function Fde(e){if(!e||typeof e!="object")throw Error(ta+"Object expected");var t,r,n,a=["precision",1,zu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Vu(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Ws+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ws+r+": "+n);return this}var sC=e3(Ide);Nn=new sC(1);const kt=sC;function Lde(e){return Wde(e)||Vde(e)||zde(e)||Bde()}function Bde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
423In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zde(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 Vde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Wde(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}var Ude=function(t){return t},t3={"@@functional/placeholder":!0},r3=function(t){return t===t3},NO=function(t){return function r(){return arguments.length===0||arguments.length===1&&r3(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Gde=function e(t,r){return t===1?r:NO(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var s=a.filter(function(l){return l!==t3}).length;return s>=t?r.apply(void 0,a):e(t-s,NO(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=a.map(function(d){return r3(d)?c.shift():d});return r.apply(void 0,Lde(f).concat(c))}))})},hy=function(t){return Gde(t.length,t)},yw=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},Hde=hy(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),qde=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return Ude;var a=r.reverse(),i=a[0],s=a.slice(1);return function(){return s.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},xw=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},n3=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r&&i.every(function(l,c){return l===r[c]})||(r=i,n=t.apply(void 0,i)),n}};function Kde(e){var t;return e===0?t=1:t=Math.floor(new kt(e).abs().log(10).toNumber())+1,t}function Yde(e,t,r){for(var n=new kt(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var Xde=hy(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),Zde=hy(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Qde=hy(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const py={rangeStep:Yde,getDigitCount:Kde,interpolateNumber:Xde,uninterpolateNumber:Zde,uninterpolateTruncation:Qde};function bw(e){return tfe(e)||efe(e)||a3(e)||Jde()}function Jde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
424In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function efe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tfe(e){if(Array.isArray(e))return ww(e)}function kf(e,t){return afe(e)||nfe(e,t)||a3(e,t)||rfe()}function rfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
425In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a3(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 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 nfe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var s=e[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){a=!0,i=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw i}}return r}}function afe(e){if(Array.isArray(e))return e}function i3(e){var t=kf(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function o3(e,t,r){if(e.lte(0))return new kt(0);var n=py.getDigitCount(e.toNumber()),a=new kt(10).pow(n),i=e.div(a),s=n!==1?.05:.1,l=new kt(Math.ceil(i.div(s).toNumber())).add(r).mul(s),c=l.mul(a);return t?c:new kt(Math.ceil(c))}function ife(e,t,r){var n=1,a=new kt(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new kt(10).pow(py.getDigitCount(e)-1),a=new kt(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new kt(Math.floor(e)))}else e===0?a=new kt(Math.floor((t-1)/2)):r||(a=new kt(Math.floor(e)));var s=Math.floor((t-1)/2),l=qde(Hde(function(c){return a.add(new kt(c-s).mul(n)).toNumber()}),yw);return l(0,t)}function s3(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new kt(0),tickMin:new kt(0),tickMax:new kt(0)};var i=o3(new kt(t).sub(e).div(r-1),n,a),s;e<=0&&t>=0?s=new kt(0):(s=new kt(e).add(t).div(2),s=s.sub(new kt(s).mod(i)));var l=Math.ceil(s.sub(e).div(i).toNumber()),c=Math.ceil(new kt(t).sub(s).div(i).toNumber()),u=l+c+1;return u>r?s3(e,t,r,n,a+1):(u<r&&(c=t>0?c+(r-u):c,l=t>0?l:l+(r-u)),{step:i,tickMin:s.sub(new kt(l).mul(i)),tickMax:s.add(new kt(c).mul(i))})}function ofe(e){var t=kf(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(a,2),l=i3([r,n]),c=kf(l,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(bw(yw(0,a-1).map(function(){return 1/0}))):[].concat(bw(yw(0,a-1).map(function(){return-1/0})),[f]);return r>n?xw(d):d}if(u===f)return ife(u,a,i);var h=s3(u,f,s,i),m=h.step,p=h.tickMin,g=h.tickMax,v=py.rangeStep(p,g.add(new kt(.1).mul(m)),m);return r>n?xw(v):v}function sfe(e,t){var r=kf(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=i3([n,a]),l=kf(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[n,a];if(c===u)return[c];var f=Math.max(t,2),d=o3(new kt(u).sub(c).div(f-1),i,0),h=[].concat(bw(py.rangeStep(new kt(c),new kt(u).sub(new kt(.99).mul(d)),d)),[u]);return n>a?xw(h):h}var lfe=n3(ofe),cfe=n3(sfe),ufe="Invariant failed";function ol(e,t){throw new Error(ufe)}var dfe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 eg(){return eg=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},eg.apply(this,arguments)}function ffe(e,t){return gfe(e)||mfe(e,t)||pfe(e,t)||hfe()}function hfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
426In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pfe(e,t){if(e){if(typeof e=="string")return PO(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 PO(e,t)}}function PO(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 mfe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function gfe(e){if(Array.isArray(e))return e}function vfe(e,t){if(e==null)return{};var r=yfe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yfe(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 xfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bfe(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,u3(n.key),n)}}function wfe(e,t,r){return t&&bfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jfe(e,t,r){return t=tg(t),Sfe(e,l3()?Reflect.construct(t,r||[],tg(e).constructor):t.apply(e,r))}function Sfe(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 Cfe(e)}function Cfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l3=function(){return!!e})()}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tg(e)}function Nfe(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,a){return n.__proto__=a,n},jw(e,t)}function c3(e,t,r){return t=u3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u3(e){var t=Pfe(e,"string");return Gc(t)=="symbol"?t:t+""}function Pfe(e,t){if(Gc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kh=function(e){function t(){return xfe(this,t),jfe(this,t,arguments)}return Nfe(t,e),wfe(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,s=n.width,l=n.dataKey,c=n.data,u=n.dataPointFormatter,f=n.xAxis,d=n.yAxis,h=vfe(n,dfe),m=He(h,!1);this.props.direction==="x"&&f.type!=="number"&&ol();var p=c.map(function(g){var v=u(g,l),y=v.x,x=v.y,b=v.value,S=v.errorVal;if(!S)return null;var j=[],C,N;if(Array.isArray(S)){var P=ffe(S,2);C=P[0],N=P[1]}else C=N=S;if(i==="vertical"){var A=f.scale,O=x+a,M=O+s,k=O-s,E=A(b-C),$=A(b+N);j.push({x1:$,y1:M,x2:$,y2:k}),j.push({x1:E,y1:O,x2:$,y2:O}),j.push({x1:E,y1:M,x2:E,y2:k})}else if(i==="horizontal"){var T=d.scale,R=y+a,B=R-s,F=R+s,D=T(b-C),G=T(b+N);j.push({x1:B,y1:G,x2:F,y2:G}),j.push({x1:R,y1:D,x2:R,y2:G}),j.push({x1:B,y1:D,x2:F,y2:D})}return _.createElement(mt,eg({className:"recharts-errorBar",key:"bar-".concat(j.map(function(K){return"".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))},m),j.map(function(K){return _.createElement("line",eg({},K,{key:"line-".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))}))});return _.createElement(mt,{className:"recharts-errorBars"},p)}}])}(_.Component);c3(kh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});c3(kh,"displayName","ErrorBar");function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}function AO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?AO(Object(r),!0).forEach(function(n){Afe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Afe(e,t,r){return t=kfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kfe(e){var t=Ofe(e,"string");return Of(t)=="symbol"?t:t+""}function Ofe(e,t){if(Of(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Of(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d3=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,s=jn(r,oi);if(!s)return null;var l=oi.defaultProps,c=l!==void 0?hs(hs({},l),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:i==="children"?u=(n||[]).reduce(function(f,d){var h=d.item,m=d.props,p=m.sectors||m.data||[];return f.concat(p.map(function(g){return{type:s.props.iconType||h.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):u=(n||[]).map(function(f){var d=f.item,h=d.type.defaultProps,m=h!==void 0?hs(hs({},h),d.props):{},p=m.dataKey,g=m.name,v=m.legendType,y=m.hide;return{inactive:y,dataKey:p,type:c.iconType||v||"square",color:lC(d),value:g||p,payload:m}}),hs(hs(hs({},c),oi.getWithHeight(s,a)),{},{payload:u,item:s})};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 kO(e){return Mfe(e)||Tfe(e)||_fe(e)||Efe()}function Efe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
427In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _fe(e,t){if(e){if(typeof e=="string")return Sw(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 Sw(e,t)}}function Tfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mfe(e){if(Array.isArray(e))return Sw(e)}function Sw(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 OO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OO(Object(r),!0).forEach(function(n){dc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dc(e,t,r){return t=Rfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rfe(e){var t=$fe(e,"string");return Ef(t)=="symbol"?t:t+""}function $fe(e,t){if(Ef(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ef(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _r(e,t,r){return st(e)||st(t)?r:dr(t)?Xn(e,t,r):Je(t)?t(e):r}function Dd(e,t,r,n){var a=Tde(e,function(l){return _r(l,t)});if(r==="number"){var i=a.filter(function(l){return Ne(l)||parseFloat(l)});return i.length?[fy(i),Eo(i)]:[1/0,-1/0]}var s=n?a.filter(function(l){return!st(l)}):a;return s.map(function(l){return dr(l)||l instanceof Date?l:""})}var Ife=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var f=u>0?a[u-1].coordinate:a[l-1].coordinate,d=a[u].coordinate,h=u>=l-1?a[0].coordinate:a[u+1].coordinate,m=void 0;if(Ea(d-f)!==Ea(h-d)){var p=[];if(Ea(h-d)===Ea(c[1]-c[0])){m=h;var g=d+c[1]-c[0];p[0]=Math.min(g,(g+f)/2),p[1]=Math.max(g,(g+f)/2)}else{m=f;var v=h+c[1]-c[0];p[0]=Math.min(d,(v+d)/2),p[1]=Math.max(d,(v+d)/2)}var y=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>y[0]&&t<=y[1]||t>=p[0]&&t<=p[1]){s=a[u].index;break}}else{var x=Math.min(f,h),b=Math.max(f,h);if(t>(x+d)/2&&t<=(b+d)/2){s=a[u].index;break}}}else for(var S=0;S<l;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<l-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===l-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){s=n[S].index;break}return s},lC=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Kt(Kt({},t.type.defaultProps),t.props):t.props,s=i.stroke,l=i.fill,c;switch(a){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:l;break;default:c=l;break}return c},Dfe=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var s={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var f=i[l[c]].stackGroups,d=Object.keys(f),h=0,m=d.length;h<m;h++){var p=f[d[h]],g=p.items,v=p.cateAxisId,y=g.filter(function(N){return Di(N.type).indexOf("Bar")>=0});if(y&&y.length){var x=y[0].type.defaultProps,b=x!==void 0?Kt(Kt({},x),y[0].props):y[0].props,S=b.barSize,j=b[v];s[j]||(s[j]=[]);var C=st(S)?r:S;s[j].push({item:y[0],stackList:y.slice(1),barSize:st(C)?void 0:_a(C,n,0)})}}return s},Ffe=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,l=t.maxBarSize,c=s.length;if(c<1)return null;var u=_a(r,a,0,!0),f,d=[];if(s[0].barSize===+s[0].barSize){var h=!1,m=a/c,p=s.reduce(function(S,j){return S+j.barSize||0},0);p+=(c-1)*u,p>=a&&(p-=(c-1)*u,u=0),p>=a&&m>0&&(h=!0,m*=.9,p=c*m);var g=(a-p)/2>>0,v={offset:g-u,size:0};f=s.reduce(function(S,j){var C={item:j.item,position:{offset:v.offset+v.size+u,size:h?m:j.barSize}},N=[].concat(kO(S),[C]);return v=N[N.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(P){N.push({item:P,position:v})}),N},d)}else{var y=_a(n,a,0,!0);a-2*y-(c-1)*u<=0&&(u=0);var x=(a-2*y-(c-1)*u)/c;x>1&&(x>>=0);var b=l===+l?Math.min(x,l):x;f=s.reduce(function(S,j,C){var N=[].concat(kO(S),[{item:j.item,position:{offset:y+(x+u)*C+(x-b)/2,size:b}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(P){N.push({item:P,position:N[N.length-1].position})}),N},d)}return f},Lfe=function(t,r,n,a){var i=n.children,s=n.width,l=n.margin,c=s-(l.left||0)-(l.right||0),u=d3({children:i,legendWidth:c});if(u){var f=a||{},d=f.width,h=f.height,m=u.align,p=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&p==="middle")&&m!=="center"&&Ne(t[m]))return Kt(Kt({},t),{},dc({},m,t[m]+(d||0)));if((g==="horizontal"||g==="vertical"&&m==="center")&&p!=="middle"&&Ne(t[p]))return Kt(Kt({},t),{},dc({},p,t[p]+(h||0)))}return t},Bfe=function(t,r,n){return st(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},f3=function(t,r,n,a,i){var s=r.props.children,l=Zn(s,kh).filter(function(u){return Bfe(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=_r(f,n);if(st(d))return u;var h=Array.isArray(d)?[fy(d),Eo(d)]:[d,d],m=c.reduce(function(p,g){var v=_r(f,g,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,p[0]),Math.max(x,p[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},zfe=function(t,r,n,a,i){var s=r.map(function(l){return f3(t,l,n,i,a)}).filter(function(l){return!st(l)});return s&&s.length?s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},h3=function(t,r,n,a,i){var s=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&f3(t,c,u,a)||Dd(t,u,n,i)});if(n==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return s.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)l[u[f]]||(l[u[f]]=!0,c.push(u[f]));return c},[])},p3=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},m3=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var i,s,l=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===n&&(s=!0),c.coordinate});return i||l.push(r),s||l.push(n),l},Ri=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,s=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&s==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Ea(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:a(h)+u,value:d,offset:u}});return f.filter(function(d){return!$u(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:a(d)+u,value:d,index:h,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+u,value:d,offset:u}}):a.domain().map(function(d,h){return{coordinate:a(d)+u,value:i?i[d]:d,index:h,offset:u}})},Yx=new WeakMap,vp=function(t,r){if(typeof r!="function")return t;Yx.has(t)||Yx.set(t,new WeakMap);var n=Yx.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},g3=function(t,r,n){var a=t.scale,i=t.type,s=t.layout,l=t.axisType;if(a==="auto")return s==="radial"&&l==="radiusAxis"?{scale:jf(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:Ym(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Id(),realScaleType:"point"}:i==="category"?{scale:jf(),realScaleType:"band"}:{scale:Ym(),realScaleType:"linear"};if(nl(a)){var c="scale".concat(Zv(a));return{scale:(jO[c]||Id)(),realScaleType:jO[c]?c:"point"}}return Je(a)?{scale:a}:{scale:Id(),realScaleType:"point"}},EO=1e-4,v3=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-EO,s=Math.max(a[0],a[1])+EO,l=t(r[0]),c=t(r[n-1]);(l<i||l>s||c<i||c>s)&&t.domain([r[0],r[n-1]])}},Vfe=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},Wfe=function(t,r){if(!r||r.length!==2||!Ne(r[0])||!Ne(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!Ne(t[0])||t[0]<n)&&(i[0]=n),(!Ne(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},Ufe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0,l=0;l<r;++l){var c=$u(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=i,t[l][n][1]=i+c,i=t[l][n][1]):(t[l][n][0]=s,t[l][n][1]=s+c,s=t[l][n][1])}},Gfe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0;s<r;++s){var l=$u(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},Hfe={sign:Ufe,expand:dJ,none:Ic,silhouette:fJ,wiggle:hJ,positive:Gfe},qfe=function(t,r,n){var a=r.map(function(l){return l.props.dataKey}),i=Hfe[n],s=uJ().keys(a).value(function(l,c){return+_r(l,c,0)}).order(Kb).offset(i);return s(t)},Kfe=function(t,r,n,a,i,s){if(!t)return null;var l=s?r.reverse():r,c={},u=l.reduce(function(d,h){var m,p=(m=h.type)!==null&&m!==void 0&&m.defaultProps?Kt(Kt({},h.type.defaultProps),h.props):h.props,g=p.stackId,v=p.hide;if(v)return d;var y=p[n],x=d[y]||{hasStack:!1,stackGroups:{}};if(dr(g)){var b=x.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};b.items.push(h),x.hasStack=!0,x.stackGroups[g]=b}else x.stackGroups[Iu("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return Kt(Kt({},d),{},dc({},y,x))},c),f={};return Object.keys(u).reduce(function(d,h){var m=u[h];if(m.hasStack){var p={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(g,v){var y=m.stackGroups[v];return Kt(Kt({},g),{},dc({},v,{numericAxisId:n,cateAxisId:a,items:y.items,stackedData:qfe(t,y.items,i)}))},p)}return Kt(Kt({},d),{},dc({},h,m))},f)},y3=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,s=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=lfe(u,i,l);return t.domain([fy(f),Eo(f)]),{niceTicks:f}}if(i&&a==="number"){var d=t.domain(),h=cfe(d,i,l);return{niceTicks:h}}return null};function rg(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!st(a[t.dataKey])){var l=km(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=_r(a,st(s)?t.dataKey:s);return st(c)?null:t.scale(c)}var _O=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,s=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+a:null;var c=_r(s,r.dataKey,r.domain[l]);return st(c)?null:r.scale(c)-i/2+a},Yfe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},Xfe=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Kt(Kt({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(dr(i)){var s=r[i];if(s){var l=s.items.indexOf(t);return l>=0?s.stackedData[l]:null}}return null},Zfe=function(t){return t.reduce(function(r,n){return[fy(n.concat([r[0]]).filter(Ne)),Eo(n.concat([r[1]]).filter(Ne))]},[1/0,-1/0])},x3=function(t,r,n){return Object.keys(t).reduce(function(a,i){var s=t[i],l=s.stackedData,c=l.reduce(function(u,f){var d=Zfe(f.slice(r,n+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},TO=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,MO=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Cw=function(t,r,n){if(Je(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Ne(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(TO.test(t[0])){var i=+TO.exec(t[0])[1];a[0]=r[0]-i}else Je(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Ne(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(MO.test(t[1])){var s=+MO.exec(t[1])[1];a[1]=r[1]+s}else Je(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},ng=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=IS(r,function(d){return d.coordinate}),s=1/0,l=1,c=i.length;l<c;l++){var u=i[l],f=i[l-1];s=Math.min((u.coordinate||0)-(f.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},RO=function(t,r,n){return!t||!t.length||al(t,Xn(n,"type.defaultProps.domain"))?r:t},b3=function(t,r){var n=t.type.defaultProps?Kt(Kt({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,s=n.unit,l=n.formatter,c=n.tooltipType,u=n.chartType,f=n.hide;return Kt(Kt({},He(t,!1)),{},{dataKey:a,unit:s,formatter:l,name:i||a,color:lC(t),value:_r(r,a),type:c,payload:r,chartType:u,hide:f})};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 $O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$O(Object(r),!0).forEach(function(n){w3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$O(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w3(e,t,r){return t=Qfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qfe(e){var t=Jfe(e,"string");return _f(t)=="symbol"?t:t+""}function Jfe(e,t){if(_f(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ehe(e,t){return ahe(e)||nhe(e,t)||rhe(e,t)||the()}function the(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
428In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rhe(e,t){if(e){if(typeof e=="string")return IO(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 IO(e,t)}}function IO(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 nhe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function ahe(e){if(Array.isArray(e))return e}var ag=Math.PI/180,ihe=function(t){return t*180/Math.PI},Ot=function(t,r,n,a){return{x:t+Math.cos(-ag*a)*n,y:r+Math.sin(-ag*a)*n}},ohe=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},she=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.startAngle,u=t.endAngle,f=_a(t.cx,s,s/2),d=_a(t.cy,l,l/2),h=ohe(s,l,n),m=_a(t.innerRadius,h,0),p=_a(t.outerRadius,h,h*.8),g=Object.keys(r);return g.reduce(function(v,y){var x=r[y],b=x.domain,S=x.reversed,j;if(st(x.range))a==="angleAxis"?j=[c,u]:a==="radiusAxis"&&(j=[m,p]),S&&(j=[j[1],j[0]]);else{j=x.range;var C=j,N=ehe(C,2);c=N[0],u=N[1]}var P=g3(x,i),A=P.realScaleType,O=P.scale;O.domain(b).range(j),v3(O);var M=y3(O,Pi(Pi({},x),{},{realScaleType:A})),k=Pi(Pi(Pi({},x),M),{},{range:j,radius:p,realScaleType:A,scale:O,cx:f,cy:d,innerRadius:m,outerRadius:p,startAngle:c,endAngle:u});return Pi(Pi({},v),{},w3({},y,k))},{})},lhe=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-s,2))},che=function(t,r){var n=t.x,a=t.y,i=r.cx,s=r.cy,l=lhe({x:n,y:a},{x:i,y:s});if(l<=0)return{radius:l};var c=(n-i)/l,u=Math.acos(c);return a>s&&(u=2*Math.PI-u),{radius:l,angle:ihe(u),angleInRadian:u}},uhe=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),s=Math.min(a,i);return{startAngle:r-s*360,endAngle:n-s*360}},dhe=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),s=Math.floor(a/360),l=Math.min(i,s);return t+l*360},DO=function(t,r){var n=t.x,a=t.y,i=che({x:n,y:a},r),s=i.radius,l=i.angle,c=r.innerRadius,u=r.outerRadius;if(s<c||s>u)return!1;if(s===0)return!0;var f=uhe(r),d=f.startAngle,h=f.endAngle,m=l,p;if(d<=h){for(;m>h;)m-=360;for(;m<d;)m+=360;p=m>=d&&m<=h}else{for(;m>d;)m-=360;for(;m<h;)m+=360;p=m>=h&&m<=d}return p?Pi(Pi({},r),{},{radius:s,angle:dhe(m,r)}):null},j3=function(t){return!w.isValidElement(t)&&!Je(t)&&typeof t!="boolean"?t.className:""};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)}var fhe=["offset"];function hhe(e){return vhe(e)||ghe(e)||mhe(e)||phe()}function phe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
429In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mhe(e,t){if(e){if(typeof e=="string")return Nw(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 Nw(e,t)}}function ghe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vhe(e){if(Array.isArray(e))return Nw(e)}function Nw(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 yhe(e,t){if(e==null)return{};var r=xhe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xhe(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 FO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FO(Object(r),!0).forEach(function(n){bhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bhe(e,t,r){return t=whe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function whe(e){var t=jhe(e,"string");return Tf(t)=="symbol"?t:t+""}function jhe(e,t){if(Tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mf(){return Mf=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},Mf.apply(this,arguments)}var She=function(t){var r=t.value,n=t.formatter,a=st(t.children)?r:t.children;return Je(n)?n(a):a},Che=function(t,r){var n=Ea(r-t),a=Math.min(Math.abs(r-t),360);return n*a},Nhe=function(t,r,n){var a=t.position,i=t.viewBox,s=t.offset,l=t.className,c=i,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,m=c.startAngle,p=c.endAngle,g=c.clockWise,v=(d+h)/2,y=Che(m,p),x=y>=0?1:-1,b,S;a==="insideStart"?(b=m+x*s,S=g):a==="insideEnd"?(b=p-x*s,S=!g):a==="end"&&(b=p+x*s,S=g),S=y<=0?S:!S;var j=Ot(u,f,v,b),C=Ot(u,f,v,b+(S?1:-1)*359),N="M".concat(j.x,",").concat(j.y,`
430    A`).concat(v,",").concat(v,",0,1,").concat(S?0:1,`,
431    `).concat(C.x,",").concat(C.y),P=st(t.id)?Iu("recharts-radial-line-"):t.id;return _.createElement("text",Mf({},n,{dominantBaseline:"central",className:at("recharts-radial-bar-label",l)}),_.createElement("defs",null,_.createElement("path",{id:P,d:N})),_.createElement("textPath",{xlinkHref:"#".concat(P)},r))},Phe=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,s=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,f=i.startAngle,d=i.endAngle,h=(f+d)/2;if(a==="outside"){var m=Ot(s,l,u+n,h),p=m.x,g=m.y;return{x:p,y:g,textAnchor:p>=s?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,y=Ot(s,l,v,h),x=y.x,b=y.y;return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Ahe=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,s=r,l=s.x,c=s.y,u=s.width,f=s.height,d=f>=0?1:-1,h=d*a,m=d>0?"end":"start",p=d>0?"start":"end",g=u>=0?1:-1,v=g*a,y=g>0?"end":"start",x=g>0?"start":"end";if(i==="top"){var b={x:l+u/2,y:c-d*a,textAnchor:"middle",verticalAnchor:m};return sr(sr({},b),n?{height:Math.max(c-n.y,0),width:u}:{})}if(i==="bottom"){var S={x:l+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:p};return sr(sr({},S),n?{height:Math.max(n.y+n.height-(c+f),0),width:u}:{})}if(i==="left"){var j={x:l-v,y:c+f/2,textAnchor:y,verticalAnchor:"middle"};return sr(sr({},j),n?{width:Math.max(j.x-n.x,0),height:f}:{})}if(i==="right"){var C={x:l+u+v,y:c+f/2,textAnchor:x,verticalAnchor:"middle"};return sr(sr({},C),n?{width:Math.max(n.x+n.width-C.x,0),height:f}:{})}var N=n?{width:u,height:f}:{};return i==="insideLeft"?sr({x:l+v,y:c+f/2,textAnchor:x,verticalAnchor:"middle"},N):i==="insideRight"?sr({x:l+u-v,y:c+f/2,textAnchor:y,verticalAnchor:"middle"},N):i==="insideTop"?sr({x:l+u/2,y:c+h,textAnchor:"middle",verticalAnchor:p},N):i==="insideBottom"?sr({x:l+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:m},N):i==="insideTopLeft"?sr({x:l+v,y:c+h,textAnchor:x,verticalAnchor:p},N):i==="insideTopRight"?sr({x:l+u-v,y:c+h,textAnchor:y,verticalAnchor:p},N):i==="insideBottomLeft"?sr({x:l+v,y:c+f-h,textAnchor:x,verticalAnchor:m},N):i==="insideBottomRight"?sr({x:l+u-v,y:c+f-h,textAnchor:y,verticalAnchor:m},N):_u(i)&&(Ne(i.x)||ks(i.x))&&(Ne(i.y)||ks(i.y))?sr({x:l+_a(i.x,u),y:c+_a(i.y,f),textAnchor:"end",verticalAnchor:"end"},N):sr({x:l+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},N)},khe=function(t){return"cx"in t&&Ne(t.cx)};function Ar(e){var t=e.offset,r=t===void 0?5:t,n=yhe(e,fhe),a=sr({offset:r},n),i=a.viewBox,s=a.position,l=a.value,c=a.children,u=a.content,f=a.className,d=f===void 0?"":f,h=a.textBreakAll;if(!i||st(l)&&st(c)&&!w.isValidElement(u)&&!Je(u))return null;if(w.isValidElement(u))return w.cloneElement(u,a);var m;if(Je(u)){if(m=w.createElement(u,a),w.isValidElement(m))return m}else m=She(a);var p=khe(i),g=He(a,!0);if(p&&(s==="insideStart"||s==="insideEnd"||s==="end"))return Nhe(a,m,g);var v=p?Phe(a):Ahe(a);return _.createElement(zc,Mf({className:at("recharts-label",d)},g,v,{breakAll:h}),m)}Ar.displayName="Label";var S3=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,s=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,m=t.top,p=t.left,g=t.width,v=t.height,y=t.clockWise,x=t.labelViewBox;if(x)return x;if(Ne(g)&&Ne(v)){if(Ne(d)&&Ne(h))return{x:d,y:h,width:g,height:v};if(Ne(m)&&Ne(p))return{x:m,y:p,width:g,height:v}}return Ne(d)&&Ne(h)?{x:d,y:h,width:0,height:0}:Ne(r)&&Ne(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:s||a||0,innerRadius:u||0,outerRadius:f||c||l||0,clockWise:y}:t.viewBox?t.viewBox:{}},Ohe=function(t,r){return t?t===!0?_.createElement(Ar,{key:"label-implicit",viewBox:r}):dr(t)?_.createElement(Ar,{key:"label-implicit",viewBox:r,value:t}):w.isValidElement(t)?t.type===Ar?w.cloneElement(t,{key:"label-implicit",viewBox:r}):_.createElement(Ar,{key:"label-implicit",content:t,viewBox:r}):Je(t)?_.createElement(Ar,{key:"label-implicit",content:t,viewBox:r}):_u(t)?_.createElement(Ar,Mf({viewBox:r},t,{key:"label-implicit"})):null:null},Ehe=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 a=t.children,i=S3(t),s=Zn(a,Ar).map(function(c,u){return w.cloneElement(c,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return s;var l=Ohe(t.label,r||i);return[l].concat(hhe(s))};Ar.parseViewBox=S3;Ar.renderCallByParent=Ehe;function _he(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var The=_he;const C3=vt(The);function Rf(e){"@babel/helpers - typeof";return Rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rf(e)}var Mhe=["valueAccessor"],Rhe=["data","dataKey","clockWise","id","textBreakAll"];function $he(e){return Lhe(e)||Fhe(e)||Dhe(e)||Ihe()}function Ihe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
432In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dhe(e,t){if(e){if(typeof e=="string")return Pw(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 Pw(e,t)}}function Fhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lhe(e){if(Array.isArray(e))return Pw(e)}function Pw(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 ig(){return ig=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},ig.apply(this,arguments)}function LO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function BO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LO(Object(r),!0).forEach(function(n){Bhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bhe(e,t,r){return t=zhe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zhe(e){var t=Vhe(e,"string");return Rf(t)=="symbol"?t:t+""}function Vhe(e,t){if(Rf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zO(e,t){if(e==null)return{};var r=Whe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Whe(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 Uhe=function(t){return Array.isArray(t.value)?C3(t.value):t.value};function li(e){var t=e.valueAccessor,r=t===void 0?Uhe:t,n=zO(e,Mhe),a=n.data,i=n.dataKey,s=n.clockWise,l=n.id,c=n.textBreakAll,u=zO(n,Rhe);return!a||!a.length?null:_.createElement(mt,{className:"recharts-label-list"},a.map(function(f,d){var h=st(i)?r(f,d):_r(f&&f.payload,i),m=st(l)?{}:{id:"".concat(l,"-").concat(d)};return _.createElement(Ar,ig({},He(f,!0),u,m,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:Ar.parseViewBox(st(s)?f:BO(BO({},f),{},{clockWise:s})),key:"label-".concat(d),index:d}))}))}li.displayName="LabelList";function Ghe(e,t){return e?e===!0?_.createElement(li,{key:"labelList-implicit",data:t}):_.isValidElement(e)||Je(e)?_.createElement(li,{key:"labelList-implicit",data:t,content:e}):_u(e)?_.createElement(li,ig({data:t},e,{key:"labelList-implicit"})):null:null}function Hhe(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,a=Zn(n,li).map(function(s,l){return w.cloneElement(s,{data:t,key:"labelList-".concat(l)})});if(!r)return a;var i=Ghe(e.label,t);return[i].concat($he(a))}li.renderCallByParent=Hhe;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 Aw(){return Aw=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},Aw.apply(this,arguments)}function VO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function WO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VO(Object(r),!0).forEach(function(n){qhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qhe(e,t,r){return t=Khe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Khe(e){var t=Yhe(e,"string");return $f(t)=="symbol"?t:t+""}function Yhe(e,t){if($f(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xhe=function(t,r){var n=Ea(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},yp=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,s=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(l?1:-1)+a,d=Math.asin(c/f)/ag,h=u?i:i+s*d,m=Ot(r,n,f,h),p=Ot(r,n,a,h),g=u?i-s*d:i,v=Ot(r,n,f*Math.cos(d*ag),g);return{center:m,circleTangency:p,lineTangency:v,theta:d}},N3=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.startAngle,l=t.endAngle,c=Xhe(s,l),u=s+c,f=Ot(r,n,i,s),d=Ot(r,n,i,u),h="M ".concat(f.x,",").concat(f.y,`
433    A `).concat(i,",").concat(i,`,0,
434    `).concat(+(Math.abs(c)>180),",").concat(+(s>u),`,
435    `).concat(d.x,",").concat(d.y,`
436  `);if(a>0){var m=Ot(r,n,a,s),p=Ot(r,n,a,u);h+="L ".concat(p.x,",").concat(p.y,`
437            A `).concat(a,",").concat(a,`,0,
438            `).concat(+(Math.abs(c)>180),",").concat(+(s<=u),`,
439            `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},Zhe=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Ea(f-u),h=yp({cx:r,cy:n,radius:i,angle:u,sign:d,cornerRadius:s,cornerIsExternal:c}),m=h.circleTangency,p=h.lineTangency,g=h.theta,v=yp({cx:r,cy:n,radius:i,angle:f,sign:-d,cornerRadius:s,cornerIsExternal:c}),y=v.circleTangency,x=v.lineTangency,b=v.theta,S=c?Math.abs(u-f):Math.abs(u-f)-g-b;if(S<0)return l?"M ".concat(p.x,",").concat(p.y,`
440        a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
441        a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
442      `):N3({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:f});var j="M ".concat(p.x,",").concat(p.y,`
443    A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,`
444    A`).concat(i,",").concat(i,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
445    A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,`
446  `);if(a>0){var C=yp({cx:r,cy:n,radius:a,angle:u,sign:d,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),N=C.circleTangency,P=C.lineTangency,A=C.theta,O=yp({cx:r,cy:n,radius:a,angle:f,sign:-d,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),M=O.circleTangency,k=O.lineTangency,E=O.theta,$=c?Math.abs(u-f):Math.abs(u-f)-A-E;if($<0&&s===0)return"".concat(j,"L").concat(r,",").concat(n,"Z");j+="L".concat(k.x,",").concat(k.y,`
447      A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,`
448      A`).concat(a,",").concat(a,",0,").concat(+($>180),",").concat(+(d>0),",").concat(N.x,",").concat(N.y,`
449      A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,"Z")}else j+="L".concat(r,",").concat(n,"Z");return j},Qhe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},P3=function(t){var r=WO(WO({},Qhe),t),n=r.cx,a=r.cy,i=r.innerRadius,s=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,d=r.endAngle,h=r.className;if(s<i||f===d)return null;var m=at("recharts-sector",h),p=s-i,g=_a(l,p,0,!0),v;return g>0&&Math.abs(f-d)<360?v=Zhe({cx:n,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(g,p/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):v=N3({cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:f,endAngle:d}),_.createElement("path",Aw({},He(r,!0),{className:m,d:v,role:"img"}))};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)}function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
449for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kw.apply(this,arguments)}function UO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function GO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(r),!0).forEach(function(n){Jhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jhe(e,t,r){return t=epe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function epe(e){var t=tpe(e,"string");return If(t)=="symbol"?t:t+""}function tpe(e,t){if(If(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(If(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HO={curveBasisClosed:JQ,curveBasisOpen:eJ,curveBasis:QQ,curveBumpX:FQ,curveBumpY:LQ,curveLinearClosed:tJ,curveLinear:Jv,curveMonotoneX:rJ,curveMonotoneY:nJ,curveNatural:aJ,curveStep:iJ,curveStepAfter:sJ,curveStepBefore:oJ},xp=function(t){return t.x===+t.x&&t.y===+t.y},fd=function(t){return t.x},hd=function(t){return t.y},rpe=function(t,r){if(Je(t))return t;var n="curve".concat(Zv(t));return(n==="curveMonotone"||n==="curveBump")&&r?HO["".concat(n).concat(r==="vertical"?"Y":"X")]:HO[n]||Jv},npe=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,s=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=rpe(n,l),d=u?i.filter(function(g){return xp(g)}):i,h;if(Array.isArray(s)){var m=u?s.filter(function(g){return xp(g)}):s,p=d.map(function(g,v){return GO(GO({},g),{},{base:m[v]})});return l==="vertical"?h=cp().y(hd).x1(fd).x0(function(g){return g.base.x}):h=cp().x(fd).y1(hd).y0(function(g){return g.base.y}),h.defined(xp).curve(f),h(p)}return l==="vertical"&&Ne(s)?h=cp().y(hd).x1(fd).x0(s):Ne(s)?h=cp().x(fd).y1(hd).y0(s):h=bD().x(fd).y(hd),h.defined(xp).curve(f),h(d)},fc=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var s=n&&n.length?npe(t):a;return w.createElement("path",kw({},He(t,!1),Om(t),{className:at("recharts-curve",r),d:s,ref:i}))},A3={exports:{}},ape="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ipe=ape,ope=ipe;function k3(){}function O3(){}O3.resetWarningCache=k3;var spe=function(){function e(n,a,i,s,l,c){if(c!==ope){var u=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 u.name="Invariant Violation",u}}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:O3,resetWarningCache:k3};return r.PropTypes=r,r};A3.exports=spe();var lpe=A3.exports;const Ct=vt(lpe);var cpe=Object.getOwnPropertyNames,upe=Object.getOwnPropertySymbols,dpe=Object.prototype.hasOwnProperty;function qO(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function bp(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,s=i.get(r),l=i.get(n);if(s&&l)return s===n&&l===r;i.set(r,n),i.set(n,r);var c=e(r,n,a);return i.delete(r),i.delete(n),c}}function KO(e){return cpe(e).concat(upe(e))}var fpe=Object.hasOwn||function(e,t){return dpe.call(e,t)};function wl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var hpe="__v",ppe="__o",mpe="_owner",YO=Object.getOwnPropertyDescriptor,XO=Object.keys;function gpe(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 vpe(e,t){return wl(e.getTime(),t.getTime())}function ype(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function xpe(e,t){return e===t}function ZO(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),s,l,c=0;(s=i.next())&&!s.done;){for(var u=t.entries(),f=!1,d=0;(l=u.next())&&!l.done;){if(a[d]){d++;continue}var h=s.value,m=l.value;if(r.equals(h[0],m[0],c,d,e,t,r)&&r.equals(h[1],m[1],h[0],m[0],e,t,r)){f=a[d]=!0;break}d++}if(!f)return!1;c++}return!0}var bpe=wl;function wpe(e,t,r){var n=XO(e),a=n.length;if(XO(t).length!==a)return!1;for(;a-- >0;)if(!E3(e,t,r,n[a]))return!1;return!0}function pd(e,t,r){var n=KO(e),a=n.length;if(KO(t).length!==a)return!1;for(var i,s,l;a-- >0;
449)if(i=n[a],!E3(e,t,r,i)||(s=YO(e,i),l=YO(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function jpe(e,t){return wl(e.valueOf(),t.valueOf())}function Spe(e,t){return e.source===t.source&&e.flags===t.flags}function QO(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),s,l;(s=i.next())&&!s.done;){for(var c=t.values(),u=!1,f=0;(l=c.next())&&!l.done;){if(!a[f]&&r.equals(s.value,l.value,s.value,l.value,e,t,r)){u=a[f]=!0;break}f++}if(!u)return!1}return!0}function Cpe(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 Npe(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 E3(e,t,r,n){return(n===mpe||n===ppe||n===hpe)&&(e.$$typeof||t.$$typeof)?!0:fpe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Ppe="[object Arguments]",Ape="[object Boolean]",kpe="[object Date]",Ope="[object Error]",Epe="[object Map]",_pe="[object Number]",Tpe="[object Object]",Mpe="[object RegExp]",Rpe="[object Set]",$pe="[object String]",Ipe="[object URL]",Dpe=Array.isArray,JO=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,eE=Object.assign,Fpe=Object.prototype.toString.call.bind(Object.prototype.toString);function Lpe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,d=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(p,g,v){if(p===g)return!0;if(p==null||g==null)return!1;var y=typeof p;if(y!==typeof g)return!1;if(y!=="object")return y==="number"?s(p,g,v):y==="function"?a(p,g,v):!1;var x=p.constructor;if(x!==g.constructor)return!1;if(x===Object)return l(p,g,v);if(Dpe(p))return t(p,g,v);if(JO!=null&&JO(p))return d(p,g,v);if(x===Date)return r(p,g,v);if(x===RegExp)return u(p,g,v);if(x===Map)return i(p,g,v);if(x===Set)return f(p,g,v);var b=Fpe(p);return b===kpe?r(p,g,v):b===Mpe?u(p,g,v):b===Epe?i(p,g,v):b===Rpe?f(p,g,v):b===Tpe?typeof p.then!="function"&&typeof g.then!="function"&&l(p,g,v):b===Ipe?h(p,g,v):b===Ope?n(p,g,v):b===Ppe?l(p,g,v):b===Ape||b===_pe||b===$pe?c(p,g,v):!1}}function Bpe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?pd:gpe,areDatesEqual:vpe,areErrorsEqual:ype,areFunctionsEqual:xpe,areMapsEqual:n?qO(ZO,pd):ZO,areNumbersEqual:bpe,areObjectsEqual:n?pd:wpe,arePrimitiveWrappersEqual:jpe,areRegExpsEqual:Spe,areSetsEqual:n?qO(QO,pd):QO,areTypedArraysEqual:n?pd:Cpe,areUrlsEqual:Npe};if(r&&(a=eE({},a,r(a))),t){var i=bp(a.areArraysEqual),s=bp(a.areMapsEqual),l=bp(a.areObjectsEqual),c=bp(a.areSetsEqual);a=eE({},a,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:l,areSetsEqual:c})}return a}function zpe(e){return function(t,r,n,a,i,s,l){return e(t,r,l)}}function Vpe(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(c,u){var f=n(),d=f.cache,h=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return r(c,u,{cache:h,equals:a,meta:m,strict:i})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var s={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,u){return r(c,u,s)}}var Wpe=cs();cs({strict:!0});cs({circular:!0});cs({circular:!0,strict:!0});cs({createInternalComparator:function(){return wl}});cs({strict:!0,createInternalComparator:function(){return wl}});cs({circular:!0,createInternalComparator:function(){return wl}});cs({circular:!0,createInternalComparator:function(){return wl},strict:!0});function cs(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,s=i===void 0?!1:i,l=Bpe(e),c=Lpe(l),u=n?n(c):zpe(c);return Vpe({circular:r,comparator:c,createState:a,equals:u,strict:s})}function Upe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function tE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):Upe(a)};requestAnimationFrame(n)}function Ow(e){"@babel/helpers - typeof";return Ow=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},Ow(e)}function Gpe(e){return Ype(e)||Kpe(e)||qpe(e)||Hpe()}
vendor: 75,037 bytes, lines 449-468
449function Hpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
450In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qpe(e,t){if(e){if(typeof e=="string")return rE(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 rE(e,t)}}function rE(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 Kpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ype(e){if(Array.isArray(e))return e}function Xpe(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var s=i,l=Gpe(s),c=l[0],u=l.slice(1);if(typeof c=="number"){tE(a.bind(null,u),c);return}a(c),tE(a.bind(null,u));return}Ow(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function nE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function aE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nE(Object(r),!0).forEach(function(n){_3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _3(e,t,r){return t=Zpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zpe(e){var t=Qpe(e,"string");return Df(t)==="symbol"?t:String(t)}function Qpe(e,t){if(Df(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Df(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jpe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},eme=function(t){return t},tme=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Fd=function(t,r){return Object.keys(r).reduce(function(n,a){return aE(aE({},n),{},_3({},a,t(a,r[a])))},{})},iE=function(t,r,n){return t.map(function(a){return"".concat(tme(a)," ").concat(r,"ms ").concat(n)}).join(",")};function rme(e,t){return ime(e)||ame(e,t)||T3(e,t)||nme()}function nme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
451In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ame(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function ime(e){if(Array.isArray(e))return e}function ome(e){return cme(e)||lme(e)||T3(e)||sme()}function sme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
452In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T3(e,t){if(e){if(typeof e=="string")return Ew(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 Ew(e,t)}}function lme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cme(e){if(Array.isArray(e))return Ew(e)}function Ew(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 og=1e-4,M3=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},R3=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},oE=function(t,r){return function(n){var a=M3(t,r);return R3(a,n)}},ume=function(t,r){return function(n){var a=M3(t,r),i=[].concat(ome(a.map(function(s,l){return s*l}).slice(1)),[0]);return R3(i,n)}},sE=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],s=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,s=1,l=1;break;case"ease":a=.25,i=.1,s=.25,l=1;break;case"ease-in":a=.42,i=0,s=1,l=1;break;case"ease-out":a=.42,i=0,s=.58,l=1;break;case"ease-in-out":a=0,i=0,s=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),f=rme(u,4);a=f[0],i=f[1],s=f[2],l=f[3]}}}var d=oE(a,s),h=oE(i,l),m=ume(a,s),p=function(y){return y>1?1:y<0?0:y},g=function(y){for(var x=y>1?1:y,b=x,S=0;S<8;++S){var j=d(b)-x,C=m(b);if(Math.abs(j-x)<og||C<og)return h(b);b=p(b-j/C)}return h(b)};return g.isStepper=!1,g},dme=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,s=t.dt,l=s===void 0?17:s,c=function(f,d,h){var m=-(f-d)*n,p=h*i,g=h+(m-p)*l/1e3,v=h*l/1e3+f;return Math.abs(v-d)<og&&Math.abs(g)<og?[d,0]:[v,g]};return c.isStepper=!0,c.dt=l,c},fme=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return sE(a);case"spring":return dme();default:if(a.split("(")[0]==="cubic-bezier")return sE(a)}return typeof a=="function"?a: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 lE(e){return mme(e)||pme(e)||$3(e)||hme()}function hme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
453In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mme(e){if(Array.isArray(e))return Tw(e)}function cE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cE(Object(r),!0).forEach(function(n){_w(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _w(e,t,r){return t=gme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gme(e){var t=vme(e,"string");return Ff(t)==="symbol"?t:String(t)}function vme(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||"default");if(Ff(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yme(e,t){return wme(e)||bme(e,t)||$3(e,t)||xme()}function xme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
454In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $3(e,t){if(e){if(typeof e=="string")return Tw(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 Tw(e,t)}}function Tw(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 bme(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function wme(e){if(Array.isArray(e))return e}var sg=function(t,r,n){return t+(r-t)*n},Mw=function(t){var r=t.from,n=t.to;return r!==n},jme=function e(t,r,n){var a=Fd(function(i,s){if(Mw(s)){var l=t(s.from,s.to,s.velocity),c=yme(l,2),u=c[0],f=c[1];return Nr(Nr({},s),{},{from:u,velocity:f})}return s},r);return n<1?Fd(function(i,s){return Mw(s)?Nr(Nr({},s),{},{velocity:sg(s.velocity,a[i].velocity,n),from:sg(s.from,a[i].from,n)}):s},r):e(t,a,n-1)};const Sme=function(e,t,r,n,a){var i=Jpe(e,t),s=i.reduce(function(v,y){return Nr(Nr({},v),{},_w({},y,[e[y],t[y]]))},{}),l=i.reduce(function(v,y){return Nr(Nr({},v),{},_w({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return Fd(function(y,x){return x.from},l)},m=function(){return!Object.values(l).filter(Mw).length},p=function(y){u||(u=y);var x=y-u,b=x/r.dt;l=jme(r,l,b),a(Nr(Nr(Nr({},e),t),h())),u=y,m()||(c=requestAnimationFrame(d))},g=function(y){f||(f=y);var x=(y-f)/n,b=Fd(function(j,C){return sg.apply(void 0,lE(C).concat([r(x)]))},s);if(a(Nr(Nr(Nr({},e),t),b)),x<1)c=requestAnimationFrame(d);else{var S=Fd(function(j,C){return sg.apply(void 0,lE(C).concat([r(1)]))},s);a(Nr(Nr(Nr({},e),t),S))}};return d=r.isStepper?p:g,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};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)}var Cme=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Nme(e,t){if(e==null)return{};var r=Pme(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pme(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Xx(e){return Eme(e)||Ome(e)||kme(e)||Ame()}function Ame(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
455In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kme(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 Ome(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Eme(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}function uE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uE(Object(r),!0).forEach(function(n){jd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jd(e,t,r){return t=I3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tme(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,I3(n.key),n)}}function Mme(e,t,r){return t&&Tme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function I3(e){var t=Rme(e,"string");return Hc(t)==="symbol"?t:String(t)}function Rme(e,t){if(Hc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $me(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$w(e,t)}function $w(e,t){return $w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$w(e,t)}function Ime(e){var t=Dme();return function(){var n=lg(e),a;if(t){var i=lg(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return Iw(this,a)}}function Iw(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 Dw(e)}function Dw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dme(){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 lg(e){return lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lg(e)}var La=function(e){$me(r,e);var t=Ime(r);function r(n,a){var i;_me(this,r),i=t.call(this,n,a);var s=i.props,l=s.isActive,c=s.attributeName,u=s.from,f=s.to,d=s.steps,h=s.children,m=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Dw(i)),i.changeStyle=i.changeStyle.bind(Dw(i)),!l||m<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:f}),Iw(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof h=="function")return i.state={style:u},Iw(i);i.state={style:c?jd({},c,u):u}}else i.state={style:{}};return i}return Mme(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,s=a.canBegin;this.mounted=!0,!(!i||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,s=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,f=i.to,d=i.from,h=this.state.style;if(l){if(!s){var m={style:c?jd({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(m);return}if(!(Wpe(a.to,f)&&a.canBegin&&a.isActive)){var p=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=p||u?d:a.to;if(this.state&&h){var v={style:c?jd({},c,g):g};(c&&h[c]!==g||!c&&h!==g)&&this.setState(v)}this.runAnimation(fa(fa({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,s=a.from,l=a.to,c=a.duration,u=a.easing,f=a.begin,d=a.onAnimationEnd,h=a.onAnimationStart,m=Sme(s,l,fme(u),c,this.changeStyle),p=function(){i.stopJSAnimation=m()};this.manager.start([h,f,p,c,d])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,l=a.begin,c=a.onAnimationStart,u=s[0],f=u.style,d=u.duration,h=d===void 0?0:d,m=function(g,v,y){if(y===0)return g;var x=v.duration,b=v.easing,S=b===void 0?"ease":b,j=v.style,C=v.properties,N=v.onAnimationEnd,P=y>0?s[y-1]:v,A=C||Object.keys(j);if(typeof S=="function"||S==="spring")return[].concat(Xx(g),[i.runJSAnimation.bind(i,{from:P.style,to:j,duration:x,easing:S}),x]);var O=iE(A,x,S),M=fa(fa(fa({},P.style),j),{},{transition:O});return[].concat(Xx(g),[M,x,N]).filter(eme)};return this.manager.start([c].concat(Xx(s.reduce(m,[f,Math.max(h,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=Xpe());var i=a.begin,s=a.duration,l=a.attributeName,c=a.to,u=a.easing,f=a.onAnimationStart,d=a.onAnimationEnd,h=a.steps,m=a.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var g=l?jd({},l,c):c,v=iE(Object.keys(g),s,u);p.start([f,i,fa(fa({},g),{},{transition:v}),s,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var s=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=Nme(a,Cme),u=w.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!l||u===0||s<=0)return i;var d=function(m){var p=m.props,g=p.style,v=g===void 0?{}:g,y=p.className,x=w.cloneElement(m,fa(fa({},c),{},{style:fa(fa({},v),f),className:y}));return x};return u===1?d(w.Children.only(i)):_.createElement("div",null,w.Children.map(i,function(h){return d(h)}))}}]),r}(w.PureComponent);La.displayName="Animate";La.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};La.propTypes={from:Ct.oneOfType([Ct.object,Ct.string]),to:Ct.oneOfType([Ct.object,Ct.string]),attributeName:Ct.string,duration:Ct.number,begin:Ct.number,easing:Ct.oneOfType([Ct.string,Ct.func]),steps:Ct.arrayOf(Ct.shape({duration:Ct.number.isRequired,style:Ct.object.isRequired,easing:Ct.oneOfType([Ct.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ct.func]),properties:Ct.arrayOf("string"),onAnimationEnd:Ct.func})),children:Ct.oneOfType([Ct.node,Ct.func]),isActive:Ct.bool,canBegin:Ct.bool,onAnimationEnd:Ct.func,shouldReAnimate:Ct.bool,onAnimationStart:Ct.func,onAnimationReStart:Ct.func};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 cg(){return cg=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},cg.apply(this,arguments)}function Fme(e,t){return Vme(e)||zme(e,t)||Bme(e,t)||Lme()}function Lme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
456In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bme(e,t){if(e){if(typeof e=="string")return dE(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 dE(e,t)}}function dE(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 zme(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Vme(e){if(Array.isArray(e))return e}function fE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fE(Object(r),!0).forEach(function(n){Wme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wme(e,t,r){return t=Ume(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ume(e){var t=Gme(e,"string");return Lf(t)=="symbol"?t:t+""}function Gme(e,t){if(Lf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pE=function(t,r,n,a,i){var s=Math.min(Math.abs(n)/2,Math.abs(a)/2),l=a>=0?1:-1,c=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,f;if(s>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,m=4;h<m;h++)d[h]=i[h]>s?s:i[h];f="M".concat(t,",").concat(r+l*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(r)),f+="L ".concat(t+n-c*d[1],",").concat(r),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
457        `).concat(t+n,",").concat(r+l*d[1])),f+="L ".concat(t+n,",").concat(r+a-l*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
458        `).concat(t+n-c*d[2],",").concat(r+a)),f+="L ".concat(t+c*d[3],",").concat(r+a),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
459        `).concat(t,",").concat(r+a-l*d[3])),f+="Z"}else if(s>0&&i===+i&&i>0){var p=Math.min(s,i);f="M ".concat(t,",").concat(r+l*p,`
460            A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+c*p,",").concat(r,`
461            L `).concat(t+n-c*p,",").concat(r,`
462            A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+n,",").concat(r+l*p,`
463            L `).concat(t+n,",").concat(r+a-l*p,`
464            A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+n-c*p,",").concat(r+a,`
465            L `).concat(t+c*p,",").concat(r+a,`
466            A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t,",").concat(r+a-l*p," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},Hme=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,s=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),f=Math.max(i,i+l),d=Math.min(s,s+c),h=Math.max(s,s+c);return n>=u&&n<=f&&a>=d&&a<=h}return!1},qme={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cC=function(t){var r=hE(hE({},qme),t),n=w.useRef(),a=w.useState(-1),i=Fme(a,2),s=i[0],l=i[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&l(S)}catch{}},[]);var c=r.x,u=r.y,f=r.width,d=r.height,h=r.radius,m=r.className,p=r.animationEasing,g=r.animationDuration,v=r.animationBegin,y=r.isAnimationActive,x=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var b=at("recharts-rectangle",m);return x?_.createElement(La,{canBegin:s>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:g,animationEasing:p,isActive:x},function(S){var j=S.width,C=S.height,N=S.x,P=S.y;return _.createElement(La,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:y,easing:p},_.createElement("path",cg({},He(r,!0),{className:b,d:pE(N,P,j,C,h),ref:n})))}):_.createElement("path",cg({},He(r,!0),{className:b,d:pE(c,u,f,d,h)}))},Kme=["points","className","baseLinePoints","connectNulls"];function Yl(){return Yl=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},Yl.apply(this,arguments)}function Yme(e,t){if(e==null)return{};var r=Xme(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xme(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 mE(e){return ege(e)||Jme(e)||Qme(e)||Zme()}function Zme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
467In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qme(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 Jme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ege(e){if(Array.isArray(e))return Fw(e)}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}var gE=function(t){return t&&t.x===+t.x&&t.y===+t.y},tge=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){gE(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),gE(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Ld=function(t,r){var n=tge(t);r&&(n=[n.reduce(function(i,s){return[].concat(mE(i),mE(s))},[])]);var a=n.map(function(i){return i.reduce(function(s,l,c){return"".concat(s).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(a,"Z"):a},rge=function(t,r,n){var a=Ld(t,n);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Ld(r.reverse(),n).slice(1))},D3=function(t){var r=t.points,n=t.className,a=t.baseLinePoints,i=t.connectNulls,s=Yme(t,Kme);if(!r||!r.length)return null;var l=at("recharts-polygon",n);if(a&&a.length){var c=s.stroke&&s.stroke!=="none",u=rge(r,a,i);return _.createElement("g",{className:l},_.createElement("path",Yl({},He(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),c?_.createElement("path",Yl({},He(s,!0),{fill:"none",d:Ld(r,i)})):null,c?_.createElement("path",Yl({},He(s,!0),{fill:"none",d:Ld(a,i)})):null)}var f=Ld(r,i);return _.createElement("path",Yl({},He(s,!0),{fill:f.slice(-1)==="Z"?s.fill:"none",className:l,d:f}))};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)}var Wu=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,s=at("recharts-dot",i);return r===+r&&n===+n&&a===+a?w.createElement("circle",Lw({},He(t,!1),Om(t),{className:s,cx:r,cy:n,r:a})):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)}var nge=["x","y","top","left","width","height","className"];function Bw(){return Bw=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},Bw.apply(this,arguments)}function vE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function age(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vE(Object(r),!0).forEach(function(n){ige(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ige(e,t,r){return t=oge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oge(e){var t=sge(e,"string");return Bf(t)=="symbol"?t:t+""}function sge(e,t){if(Bf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lge(e,t){if(e==null)return{};var r=cge(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cge(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 uge=function(t,r,n,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(r,"h").concat(n)},dge=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.top,l=s===void 0?0:s,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,m=h===void 0?0:h,p=t.className,g=lge(t,nge),v=age({x:n,y:i,top:l,left:u,width:d,height:m},g);return!Ne(n)||!Ne(i)||!Ne(d)||!Ne(m)||!Ne(l)||!Ne(u)?null:_.createElement("path",Bw({},He(v,!0),{className:at("recharts-cross",p),d:uge(n,i,d,m,l,u)}))},fge=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];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 hge(e,t){if(e==null)return{};var r=pge(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pge(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 Yi(){return Yi=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},Yi.apply(this,arguments)}function yE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yE(Object(r),!0).forEach(function(n){mge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mge(e,t,r){return t=gge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gge(e){var t=vge(e,"string");return zf(t)=="symbol"?t:t+""}function vge(e,t){if(zf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yge=function(t,r,n,a){var i="";return a.forEach(function(s,l){var c=Ot(r,n,t,s);l?i+="L ".concat(c.x,",").concat(c.y):i+="M ".concat(c.x,",").concat(c.y)}),i+="Z",i},xge=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.polarAngles,l=t.radialLines;if(!s||!s.length||!l)return null;var c=Vf({stroke:"#ccc"},He(t,!1));return _.createElement("g",{className:"recharts-polar-grid-angle"},s.map(function(u){var f=Ot(r,n,a,u),d=Ot(r,n,i,u);return _.createElement("line",Yi({},c,{key:"line-".concat(u),x1:f.x,y1:f.y,x2:d.x,y2:d.y}))}))},bge=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.index,s=Vf(Vf({stroke:"#ccc"},He(t,!1)),{},{fill:"none"});return _.createElement("circle",Yi({},s,{className:at("recharts-polar-grid-concentric-circle",t.className),key:"circle-".concat(i),cx:r,cy:n,r:a}))},wge=function(t){var r=t.radius,n=t.index,a=Vf(Vf({stroke:"#ccc"},He(t,!1)),{},{fill:"none"});return _.createElement("path",Yi({},a,{className:at("recharts-polar-grid-concentric-polygon",t.className),key:"path-".concat(n),d:yge(r,t.cx,t.cy,t.polarAngles)}))},jge=function(t){var r=t.polarRadius,n=t.gridType;return!r||!r.length?null:_.createElement("g",{className:"recharts-polar-grid-concentric"},r.map(function(a,i){var s=i;return n==="circle"?_.createElement(bge,Yi({key:s},t,{radius:a,index:i})):_.createElement(wge,Yi({key:s},t,{radius:a,index:i}))}))},F3=function(t){var r=t.cx,n=r===void 0?0:r,a=t.cy,i=a===void 0?0:a,s=t.innerRadius,l=s===void 0?0:s,c=t.outerRadius,u=c===void 0?0:c,f=t.gridType,d=f===void 0?"polygon":f,h=t.radialLines,m=h===void 0?!0:h,p=hge(t,fge);return u<=0?null:_.createElement("g",{className:"recharts-polar-grid"},_.createElement(xge,Yi({cx:n,cy:i,innerRadius:l,outerRadius:u,gridType:d,radialLines:m},p)),_.createElement(jge,Yi({cx:n,cy:i,innerRadius:l,outerRadius:u,gridType:d,radialLines:m},p)))};F3.displayName="PolarGrid";var Sge=dy,Cge=K5,Nge=gi;function Pge(e,t){return e&&e.length?Sge(e,Nge(t),Cge):void 0}var Age=Pge;const kge=vt(Age);var Oge=dy,Ege=gi,_ge=Y5;function Tge(e,t){return e&&e.length?Oge(e,Ege(t),_ge):void 0}var Mge=Tge;const Rge=vt(Mge);var $ge=["cx","cy","angle","ticks","axisLine"],Ige=["ticks","tick","angle","tickFormatter","stroke"];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 Bd(){return Bd=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},Bd.apply(this,arguments)}function xE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ps(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xE(Object(r),!0).forEach(function(n){my(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bE(e,t){if(e==null)return{};var r=Dge(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Dge(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 Fge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wE(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,B3(n.key),n)}}function Lge(e,t,r){return t&&wE(e.prototype,t),r&&wE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bge(e,t,r){return t=ug(t),zge(e,L3()?Reflect.construct(t,r||[],ug(e).constructor):t.apply(e,r))}function zge(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 Vge(e)}function Vge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L3=function(){return!!e})()}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ug(e)}function Wge(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&&zw(e,t)}function zw(e,t){return zw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zw(e,t)}function my(e,t,r){return t=B3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B3(e){var t=Uge(e,"string");return qc(t)=="symbol"?t:t+""}function Uge(e,t){if(qc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oh=function(e){function t(){return Fge(this,t),Bge(this,t,arguments)}return Wge(t,e),Lge(t,[{key:"getTickValueCoord",value:function(n){var a=n.coordinate,i=this.props,s=i.angle,l=i.cx,c=i.cy;return Ot(l,c,a,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,a;switch(n){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=kge(l,function(f){return f.coordinate||0}),u=Rge(l,function(f){return f.coordinate||0});return{cx:a,cy:i,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=n.axisLine,u=bE(n,$ge),f=l.reduce(function(p,g){return[Math.min(p[0],g.coordinate),Math.max(p[1],g.coordinate)]},[1/0,-1/0]),d=Ot(a,i,f[0],s),h=Ot(a,i,f[1],s),m=ps(ps(ps({},He(u,!1)),{},{fill:"none"},He(c,!1)),{},{x1:d.x,y1:d.y,x2:h.x,y2:h.y});return _.createElement("line",Bd({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,f=bE(a,Ige),d=this.getTickTextAnchor(),h=He(f,!1),m=He(s,!1),p=i.map(function(g,v){var y=n.getTickValueCoord(g),x=ps(ps(ps(ps({textAnchor:d,transform:"rotate(".concat(90-l,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:u},m),{},{index:v},y),{},{payload:g});return _.createElement(mt,Bd({className:at("recharts-polar-radius-axis-tick",j3(s)),key:"tick-".concat(g.coordinate)},$c(n.props,g,v)),t.renderTickItem(s,x,c?c(g.value,v):g.value))});return _.createElement(mt,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.axisLine,s=n.tick;return!a||!a.length?null:_.createElement(mt,{className:at("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),s&&this.renderTicks(),Ar.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,a,i){var s;return _.isValidElement(n)?s=_.cloneElement(n,a):Je(n)?s=n(a):s=_.createElement(zc,Bd({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),s}}])}(w.PureComponent);my(Oh,"displayName","PolarRadiusAxis");my(Oh,"axisType","radiusAxis");my(Oh,"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 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 Cs(){return Cs=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},Cs.apply(this,arguments)}function jE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ms(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jE(Object(r),!0).forEach(function(n){gy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SE(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,V3(n.key),n)}}function Hge(e,t,r){return t&&SE(e.prototype,t),r&&SE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qge(e,t,r){return t=dg(t),Kge(e,z3()?Reflect.construct(t,r||[],dg(e).constructor):t.apply(e,r))}function Kge(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 Yge(e)}function Yge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z3=function(){return!!e})()}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dg(e)}function Xge(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&&Vw(e,t)}function Vw(e,t){return Vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vw(e,t)}function gy(e,t,r){return t=V3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V3(e){var t=Zge(e,"string");return Kc(t)=="symbol"?t:t+""}function Zge(e,t){if(Kc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qge=Math.PI/180,CE=1e-5,Eh=function(e){function t(){return Gge(this,t),qge(this,t,arguments)}return Xge(t,e),Hge(t,[{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.cx,s=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,f=u||8,d=Ot(i,s,l,n.coordinate),h=Ot(i,s,l+(c==="inner"?-1:1)*f,n.coordinate);return{x1:d.x,y1:d.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var a=this.props.orientation,i=Math.cos(-n.coordinate*Qge),s;return i>CE?s=a==="outer"?"start":"end":i<-CE?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.radius,l=n.axisLine,c=n.axisLineType,u=ms(ms({},He(this.props,!1)),{},{fill:"none"},He(l,!1));if(c==="circle")return _.createElement(Wu,Cs({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:s}));var f=this.props.ticks,d=f.map(function(h){return Ot(a,i,s,h.coordinate)});return _.createElement(D3,Cs({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,f=He(this.props,!1),d=He(s,!1),h=ms(ms({},f),{},{fill:"none"},He(l,!1)),m=i.map(function(p,g){var v=n.getTickLineCoord(p),y=n.getTickTextAnchor(p),x=ms(ms(ms({textAnchor:y},f),{},{stroke:"none",fill:u},d),{},{index:g,payload:p,x:v.x2,y:v.y2});return _.createElement(mt,Cs({className:at("recharts-polar-angle-axis-tick",j3(s)),key:"tick-".concat(p.coordinate)},$c(n.props,p,g)),l&&_.createElement("line",Cs({className:"recharts-polar-angle-axis-tick-line"},h,v)),s&&t.renderTickItem(s,x,c?c(p.value,g):p.value))});return _.createElement(mt,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.radius,s=n.axisLine;return i<=0||!a||!a.length?null:_.createElement(mt,{className:at("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,a,i){var s;return _.isValidElement(n)?s=_.cloneElement(n,a):Je(n)?s=n(a):s=_.createElement(zc,Cs({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),s}}])}(w.PureComponent);gy(Eh,"displayName","PolarAngleAxis");gy(Eh,"axisType","angleAxis");gy(Eh,"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 Jge=UD,eve=Jge(Object.getPrototypeOf,Object),tve=eve,rve=Ji,nve=tve,ave=eo,ive="[object Object]",ove=Function.prototype,sve=Object.prototype,W3=ove.toString,lve=sve.hasOwnProperty,cve=W3.call(Object);function uve(e){if(!ave(e)||rve(e)!=ive)return!1;var t=nve(e);if(t===null)return!0;var r=lve.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&W3.call(r)==cve}var dve=uve;const fve=vt(dve);var hve=Ji,pve=eo,mve="[object Boolean]";function gve(e){return e===!0||e===!1||pve(e)&&hve(e)==mve}var vve=gve;const yve=vt(vve);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 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 xve(e,t){return Sve(e)||jve(e,t)||wve(e,t)||bve()}function bve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
468In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wve(e,t){if(e){if(typeof e=="string")return NE(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 NE(e,t)}}function NE(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 jve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Sve(e){if(Array.isArray(e))return e}function PE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(r),!0).forEach(function(n){Cve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cve(e,t,r){return t=Nve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nve(e){var t=Pve(e,"string");return Wf(t)=="symbol"?t:t+""}function Pve(e,t){if(Wf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kE=function(t,r,n,a,i){var s=n-a,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-s/2,",").concat(r+i),l+="L ".concat(t+n-s/2-a,",").concat(r+i),l+="L ".concat(t,",").concat(r," Z"),l},Ave={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},kve=function(t){var r=AE(AE({},Ave),t),n=w.useRef(),a=w.useState(-1),i=xve(a,2),s=i[0],l=i[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&l(b)}catch{}},[]);var c=r.x,u=r.y,f=r.upperWidth,d=r.lowerWidth,h=r.height,m=r.className,p=r.animationEasing,g=r.animationDuration,v=r.animationBegin,y=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var x=at("recharts-trapezoid",m);return y?_.createElement(La,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:g,animationEasing:p,isActive:y},function(b){var S=b.upperWidth,j=b.lowerWidth,C=b.height,N=b.x,P=b.y;return _.createElement(La,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:p},_.createElement("path",fg({},He(r,!0),{className:x,d:kE(N,P,S,j,C),ref:n})))}):_.createElement("g",null,_.createElement("path",fg({},He(r,!0),{className:x,d:kE(c,u,f,d,h)})))},Ove=["option","shapeType","propTransformer","activeClassName","isActive"];function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function Eve(e,t){if(e==null)return{};var r=_ve(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _ve(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 OE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OE(Object(r),!0).forEach(function(n){Tve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tve(e,t,r){return t=Mve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mve(e){var t=Rve(e,"string");return Uf(t)=="symbol"?t:t+""}function Rve(e,t){if(Uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $ve(e,t){return hg(hg({},t),e)}function Ive(e,t){return e==="symbols"}function EE(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return _.createElement(cC,r);case"trapezoid":return _.createElement(kve,r);case"sector":return _.createElement(P3,r);case"symbols":if(Ive(t))return _.createElement(kS,r);break;default:return null}}function Dve(e){return w.isValidElement(e)?e.props:e}function Fve(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?$ve:n,i=e.activeClassName,s=i===void 0?"recharts-active-shape":i,l=e.isActive,c=Eve(e,Ove),u;if(w.isValidElement(t))u=w.cloneElement(t,hg(hg({},c),Dve(t)));else if(Je(t))u=t(c);else if(fve(t)&&!yve(t)){var f=a(t,c);u=_.createElement(EE,{shapeType:r,elementProps:f})}else{var d=c;u=_.createElement(EE,{shapeType:r,elementProps:d})}return l?_.createElement(mt,{className:s},u):u}function vy(e,t){return t!=null&&"trapezoids"in e.props}function yy(e,t){return t!=null&&"sectors"in e.props}function Gf(e,t){return t!=null&&"points"in e.props}function Lve(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function Bve(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function zve(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function Vve(e,t){var r;return vy(e,t)?r=Lve:yy(e,t)?r=Bve:Gf(e,t)&&(r=zve),r}function Wve(e,t){var r;return vy(e,t)?r="trapezoids":yy(e,t)?r="sectors":Gf(e,t)&&(r="points"),r}function Uve(e,t){if(vy(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(yy(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 Gf(e,t)?t.payload:{}}function Gve(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=Wve(r,t),i=Uve(r,t),s=n.filter(function(c,u){var f=al(i,c),d=r.props[a].filter(function(p){var g=Vve(r,t);return g(p,t)}),h=r.props[a].indexOf(d[d.length-1]),m=u===h;return f&&m}),l=n.indexOf(s[s.length-1]);return l}function Hve(e){return e&&e.length?e[0]:void 0}var qve=Hve,Kve=qve;const Yve=vt(Kve);var Xve=["key"];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 Zve(e,t){if(e==null)return{};var r=Qve(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qve(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 _E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?_E(Object(r),!0).forEach(function(n){Oi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TE(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,G3(n.key),n)}}function eye(e,t,r){return t&&TE(e.prototype,t),r&&TE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tye(e,t,r){return t=mg(t),rye(e,U3()?Reflect.construct(t,r||[],mg(e).constructor):t.apply(e,r))}function rye(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 nye(e)}function nye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U3=function(){return!!e})()}function mg(e){return mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mg(e)}function aye(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&&Ww(e,t)}function Ww(e,t){return Ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ww(e,t)}function Oi(e,t,r){return t=G3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G3(e){var t=iye(e,"string");return Yc(t)=="symbol"?t:t+""}function iye(e,t){if(Yc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _h=function(e){function t(){var r;Jve(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=tye(this,t,[].concat(a)),Oi(r,"state",{isAnimationFinished:!1}),Oi(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Je(s)&&s()}),Oi(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Je(s)&&s()}),Oi(r,"handleMouseEnter",function(s){var l=r.props.onMouseEnter;l&&l(r.props,s)}),Oi(r,"handleMouseLeave",function(s){var l=r.props.onMouseLeave;l&&l(r.props,s)}),r}return aye(t,e),eye(t,[{key:"renderDots",value:function(n){var a=this.props,i=a.dot,s=a.dataKey,l=He(this.props,!1),c=He(i,!0),u=n.map(function(f,d){var h=Yr(Yr(Yr({key:"dot-".concat(d),r:3},l),c),{},{dataKey:s,cx:f.x,cy:f.y,index:d,payload:f});return t.renderDotItem(i,h)});return _.createElement(mt,{className:"recharts-radar-dots"},u)}},{key:"renderPolygonStatically",value:function(n){var a=this.props,i=a.shape,s=a.dot,l=a.isRange,c=a.baseLinePoints,u=a.connectNulls,f;return _.isValidElement(i)?f=_.cloneElement(i,Yr(Yr({},this.props),{},{points:n})):Je(i)?f=i(Yr(Yr({},this.props),{},{points:n})):f=_.createElement(D3,pg({},He(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:n,baseLinePoints:l?c:null,connectNulls:u})),_.createElement(mt,{className:"recharts-radar-polygon"},f,s?this.renderDots(n):null)}},{key:"renderPolygonWithAnimation",value:function(){var n=this,a=this.props,i=a.points,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state.prevPoints;return _.createElement(La,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"radar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,p=d&&d.length/i.length,g=i.map(function(v,y){var x=d&&d[Math.floor(y*p)];if(x){var b=Zt(x.x,v.x),S=Zt(x.y,v.y);return Yr(Yr({},v),{},{x:b(m),y:S(m)})}var j=Zt(v.cx,v.x),C=Zt(v.cy,v.y);return Yr(Yr({},v),{},{x:j(m),y:C(m)})});return n.renderPolygonStatically(g)})}},{key:"renderPolygon",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,s=n.isRange,l=this.state.prevPoints;return i&&a&&a.length&&!s&&(!l||!al(l,a))?this.renderPolygonWithAnimation():this.renderPolygonStatically(a)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.className,s=n.points,l=n.isAnimationActive;if(a||!s||!s.length)return null;var c=this.state.isAnimationFinished,u=at("recharts-radar",i);return _.createElement(mt,{className:u},this.renderPolygon(),(!l||c)&&li.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"renderDotItem",value:function(n,a){var i;if(_.isValidElement(n))i=_.cloneElement(n,a);else if(Je(n))i=n(a);else{var s=a.key,l=Zve(a,Xve);i=_.createElement(Wu,pg({},l,{key:s,className:at("recharts-radar-dot",typeof n!="boolean"?n.className:"")}))}return i}}])}(w.PureComponent);Oi(_h,"displayName","Radar");Oi(_h,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!$a.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Oi(_h,"getComposedData",function(e){var t=e.radiusAxis,r=e.angleAxis,n=e.displayedData,a=e.dataKey,i=e.bandSize,s=r.cx,l=r.cy,c=!1,u=[],f=r.type!=="number"?i??0:0;n.forEach(function(h,m){var p=_r(h,r.dataKey,m),g=_r(h,a),v=r.scale(p)+f,y=Array.isArray(g)?C3(g):g,x=st(y)?void 0:t.scale(y);Array.isArray(g)&&g.length>=2&&(c=!0),u.push(Yr(Yr({},Ot(s,l,x,v)),{},{name:p,value:g,cx:s,cy:l,radius:x,angle:v,payload:h}))});var d=[];return c&&u.forEach(function(h){if(Array.isArray(h.value)){var m=Yve(h.value),p=st(m)?void 0:t.scale(m);d.push(Yr(Yr({},h),{},{radius:p},Ot(s,l,p,h.angle)))}else d.push(h)}),{points:u,isRange:c,baseLinePoints:d}});var oye=Math.ceil,sye=Math.max;function lye(e,t,r,n){for(var a=-1,i=sye(oye((t-e)/(r||1)),0),s=Array(i);i--;)s[n?i:++a]=e,e+=r;return s}var cye=lye,uye=c5,ME=1/0,dye=17976931348623157e292;function fye(e){if(!e)return e===0?e:0;if(e=uye(e),e===ME||e===-ME){var t=e<0?-1:1;return t*dye}return e===e?e:0}var H3=fye,hye=cye,pye=ny,Zx=H3;function mye(e){return function(t,r,n){return n&&typeof n!="number"&&pye(t,r,n)&&(r=n=void 0),t=Zx(t),r===void 0?(r=t,t=0):r=Zx(r),n=n===void 0?t<r?1:-1:Zx(n),hye(t,r,n,e)}}var gye=mye,vye=gye,yye=vye(),xye=yye;const gg=vt(xye);function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function RE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $E(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RE(Object(r),!0).forEach(function(n){q3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q3(e,t,r){return t=bye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bye(e){var t=wye(e,"string");return Hf(t)=="symbol"?t:t+""}function wye(e,t){if(Hf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jye=["Webkit","Moz","O","ms"],Sye=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=jye.reduce(function(i,s){return $E($E({},i),{},q3({},s+n,r))},{});return a[t]=r,a};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 vg(){return vg=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},vg.apply(this,arguments)}function IE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IE(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DE(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,Y3(n.key),n)}}function Nye(e,t,r){return t&&DE(e.prototype,t),r&&DE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pye(e,t,r){return t=yg(t),Aye(e,K3()?Reflect.construct(t,r||[],yg(e).constructor):t.apply(e,r))}function Aye(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 kye(e)}function kye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K3=function(){return!!e})()}function yg(e){return yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yg(e)}function Oye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uw(e,t)}function Uw(e,t){return Uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Uw(e,t)}function bn(e,t,r){return t=Y3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y3(e){var t=Eye(e,"string");return Xc(t)=="symbol"?t:t+""}function Eye(e,t){if(Xc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _ye=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,s=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=Id().domain(gg(0,c)).range([i,i+s-l]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:f}},FE=function(t){return t.changedTouches&&!!t.changedTouches.length},Zc=function(e){function t(r){var n;return Cye(this,t),n=Pye(this,t,[r]),bn(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),bn(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),bn(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,s=a.onDragEnd,l=a.startIndex;s==null||s({endIndex:i,startIndex:l})}),n.detachDragEndListener()}),bn(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),bn(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),bn(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),bn(n,"handleSlideDragStart",function(a){var i=FE(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Oye(t,e),Nye(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,s=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,f=u.length-1,d=Math.min(a,i),h=Math.max(a,i),m=t.getIndexInRange(s,d),p=t.getIndexInRange(s,h);return{startIndex:m-m%c,endIndex:p===f?f:p-p%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,s=a.tickFormatter,l=a.dataKey,c=_r(i[n],l,n);return Je(s)?s(c,n):c}},{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 a=this.state,i=a.slideMoveStartX,s=a.startX,l=a.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,m=c.endIndex,p=c.onChange,g=n.pageX-i;g>0?g=Math.min(g,u+f-d-l,u+f-d-s):g<0&&(g=Math.max(g,u-s,u-l));var v=this.getIndex({startX:s+g,endX:l+g});(v.startIndex!==h||v.endIndex!==m)&&p&&p(v),this.setState({startX:s+g,endX:l+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=FE(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,s=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[s],f=this.props,d=f.x,h=f.width,m=f.travellerWidth,p=f.onChange,g=f.gap,v=f.data,y={startX:this.state.startX,endX:this.state.endX},x=n.pageX-i;x>0?x=Math.min(x,d+h-m-u):x<0&&(x=Math.max(x,d-u)),y[s]=u+x;var b=this.getIndex(y),S=b.startIndex,j=b.endIndex,C=function(){var P=v.length-1;return s==="startX"&&(l>c?S%g===0:j%g===0)||l<c&&j===P||s==="endX"&&(l>c?j%g===0:S%g===0)||l>c&&j===P};this.setState(bn(bn({},s,u+x),"brushMoveStartX",n.pageX),function(){p&&C()&&p(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,s=this.state,l=s.scaleValues,c=s.startX,u=s.endX,f=this.state[a],d=l.indexOf(f);if(d!==-1){var h=d+n;if(!(h===-1||h>=l.length)){var m=l[h];a==="startX"&&m>=u||a==="endX"&&m<=c||this.setState(bn({},a,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.fill,u=n.stroke;return _.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:s,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.data,u=n.children,f=n.padding,d=w.Children.only(u);return d?_.cloneElement(d,{x:a,y:i,width:s,height:l,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,s,l=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,m=c.ariaLabel,p=c.data,g=c.startIndex,v=c.endIndex,y=Math.max(n,this.props.x),x=Qx(Qx({},He(this.props,!1)),{},{x:y,y:u,width:f,height:d}),b=m||"Min value: ".concat((i=p[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=p[v])===null||s===void 0?void 0:s.name);return _.createElement(mt,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),l.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(n,a){var i=this.props,s=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,f=Math.min(n,a)+u,d=Math.max(Math.abs(a-n)-u,0);return _.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:s,width:d,height:l})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,s=n.y,l=n.height,c=n.travellerWidth,u=n.stroke,f=this.state,d=f.startX,h=f.endX,m=5,p={pointerEvents:"none",fill:u};return _.createElement(mt,{className:"recharts-brush-texts"},_.createElement(zc,vg({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-m,y:s+l/2},p),this.getTextOfTick(a)),_.createElement(zc,vg({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+m,y:s+l/2},p),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,s=n.children,l=n.x,c=n.y,u=n.width,f=n.height,d=n.alwaysShowText,h=this.state,m=h.startX,p=h.endX,g=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!a||!a.length||!Ne(l)||!Ne(c)||!Ne(u)||!Ne(f)||u<=0||f<=0)return null;var b=at("recharts-brush",i),S=_.Children.count(s)===1,j=Sye("userSelect","none");return _.createElement(mt,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(m,p),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(p,"endX"),(g||v||y||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,s=n.width,l=n.height,c=n.stroke,u=Math.floor(i+l/2)-1;return _.createElement(_.Fragment,null,_.createElement("rect",{x:a,y:i,width:s,height:l,fill:c,stroke:"none"}),_.createElement("line",{x1:a+1,y1:u,x2:a+s-1,y2:u,fill:"none",stroke:"#fff"}),_.createElement("line",{x1:a+1,y1:u+2,x2:a+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return _.isValidElement(n)?i=_.cloneElement(n,a):Je(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,s=n.width,l=n.x,c=n.travellerWidth,u=n.updateId,f=n.startIndex,d=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return Qx({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s},i&&i.length?_ye({data:i,width:s,x:l,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+s-c]
468);var h=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,s=0,l=i-1;l-s>1;){var c=Math.floor((s+l)/2);n[c]>a?l=c:s=c}return a>=n[l]?l:s}}])}(w.PureComponent);bn(Zc,"displayName","Brush");bn(Zc,"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 Tye=$S;function Mye(e,t){var r;return Tye(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var Rye=Mye,$ye=ID,Iye=gi,Dye=Rye,Fye=mn,Lye=ny;function Bye(e,t,r){var n=Fye(e)?$ye:Dye;return r&&Lye(e,t,r)&&(t=void 0),n(e,Iye(t))}var zye=Bye;const Vye=vt(zye);var ci=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},LE=a5;function Wye(e,t,r){t=="__proto__"&&LE?LE(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Uye=Wye,Gye=Uye,Hye=r5,qye=gi;function Kye(e,t){var r={};return t=qye(t),Hye(e,function(n,a,i){Gye(r,a,t(n,a,i))}),r}var Yye=Kye;const Xye=vt(Yye);function Zye(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 Qye=Zye,Jye=$S;function exe(e,t){var r=!0;return Jye(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var txe=exe,rxe=Qye,nxe=txe,axe=gi,ixe=mn,oxe=ny;function sxe(e,t,r){var n=ixe(e)?rxe:nxe;return r&&oxe(e,t,r)&&(t=void 0),n(e,axe(t))}var lxe=sxe;const X3=vt(lxe);var cxe=["x","y"];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 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 BE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function md(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BE(Object(r),!0).forEach(function(n){uxe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uxe(e,t,r){return t=dxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dxe(e){var t=fxe(e,"string");return qf(t)=="symbol"?t:t+""}function fxe(e,t){if(qf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hxe(e,t){if(e==null)return{};var r=pxe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pxe(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 mxe(e,t){var r=e.x,n=e.y,a=hxe(e,cxe),i="".concat(r),s=parseInt(i,10),l="".concat(n),c=parseInt(l,10),u="".concat(t.height||a.height),f=parseInt(u,10),d="".concat(t.width||a.width),h=parseInt(d,10);return md(md(md(md(md({},t),a),s?{x:s}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function zE(e){return _.createElement(Fve,Gw({shapeType:"rectangle",propTransformer:mxe,activeClassName:"recharts-active-bar"},e))}var gxe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=Ne(n)||CZ(n);return i?t(n,a):(i||ol(),r)}},vxe=["value","background"],Z3;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 yxe(e,t){if(e==null)return{};var r=xxe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xxe(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 xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 117,314 bytes, lines 468-473
468for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xg.apply(this,arguments)}function VE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(r),!0).forEach(function(n){_o(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WE(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,J3(n.key),n)}}function wxe(e,t,r){return t&&WE(e.prototype,t),r&&WE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jxe(e,t,r){return t=bg(t),Sxe(e,Q3()?Reflect.construct(t,r||[],bg(e).constructor):t.apply(e,r))}function Sxe(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 Cxe(e)}function Cxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q3=function(){return!!e})()}function bg(e){return bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bg(e)}function Nxe(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&&Hw(e,t)}function Hw(e,t){return Hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Hw(e,t)}function _o(e,t,r){return t=J3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J3(e){var t=Pxe(e,"string");return Qc(t)=="symbol"?t:t+""}function Pxe(e,t){if(Qc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ba=function(e){function t(){var r;bxe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=jxe(this,t,[].concat(a)),_o(r,"state",{isAnimationFinished:!1}),_o(r,"id",Iu("recharts-bar-")),_o(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),_o(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return Nxe(t,e),wxe(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,f=He(this.props,!1);return n&&n.map(function(d,h){var m=h===c,p=m?u:s,g=tr(tr(tr({},f),d),{},{isActive:m,option:p,index:h,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return _.createElement(mt,xg({className:"recharts-bar-rectangle"},$c(a.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),_.createElement(zE,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,f=a.animationEasing,d=a.animationId,h=this.state.prevData;return _.createElement(La,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var p=m.t,g=i.map(function(v,y){var x=h&&h[y];if(x){var b=Zt(x.x,v.x),S=Zt(x.y,v.y),j=Zt(x.width,v.width),C=Zt(x.height,v.height);return tr(tr({},v),{},{x:b(p),y:S(p),width:j(p),height:C(p)})}if(s==="horizontal"){var N=Zt(0,v.height),P=N(p);return tr(tr({},v),{},{y:v.y+v.height-P,height:P})}var A=Zt(0,v.width),O=A(p);return tr(tr({},v),{},{width:O})});return _.createElement(mt,null,n.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!al(s,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,s=a.dataKey,l=a.activeIndex,c=He(this.props.background,!1);return i.map(function(u,f){u.value;var d=u.background,h=yxe(u,vxe);if(!d)return null;var m=tr(tr(tr(tr(tr({},h),{},{fill:"#eee"},d),c),$c(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:f,className:"recharts-bar-background-rectangle"});return _.createElement(zE,xg({key:"background-bar-".concat(f),option:n.props.background,isActive:f===l},m))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=Zn(f,kh);if(!d)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,m=function(v,y){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:_r(v,y)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return _.createElement(mt,p,d.map(function(g){return _.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,l=n.xAxis,c=n.yAxis,u=n.left,f=n.top,d=n.width,h=n.height,m=n.isAnimationActive,p=n.background,g=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,y=at("recharts-bar",s),x=l&&l.allowDataOverflow,b=c&&c.allowDataOverflow,S=x||b,j=st(g)?this.id:g;return _.createElement(mt,{className:y},x||b?_.createElement("defs",null,_.createElement("clipPath",{id:"clipPath-".concat(j)},_.createElement("rect",{x:x?u:u-d/2,y:b?f:f-h/2,width:x?d:d*2,height:b?h:h*2}))):null,_.createElement(mt,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(j,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,j),(!m||v)&&li.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(w.PureComponent);Z3=Ba;_o(Ba,"displayName","Bar");_o(Ba,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!$a.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});_o(Ba,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,s=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=Vfe(n,r);if(!m)return null;var p=t.layout,g=r.type.defaultProps,v=g!==void 0?tr(tr({},g),r.props):r.props,y=v.dataKey,x=v.children,b=v.minPointSize,S=p==="horizontal"?s:i,j=u?S.scale.domain():null,C=Yfe({numericAxis:S}),N=Zn(x,ay),P=d.map(function(A,O){var M,k,E,$,T,R;u?M=Wfe(u[f+O],j):(M=_r(A,y),Array.isArray(M)||(M=[C,M]));var B=gxe(b,Z3.defaultProps.minPointSize)(M[1],O);if(p==="horizontal"){var F,D=[s.scale(M[0]),s.scale(M[1])],G=D[0],K=D[1];k=_O({axis:i,ticks:l,bandSize:a,offset:m.offset,entry:A,index:O}),E=(F=K??G)!==null&&F!==void 0?F:void 0,$=m.size;var z=G-K;if(T=Number.isNaN(z)?0:z,R={x:k,y:s.y,width:$,height:s.height},Math.abs(B)>0&&Math.abs(T)<Math.abs(B)){var U=Ea(T||B)*(Math.abs(B)-Math.abs(T));E-=U,T+=U}}else{var ee=[i.scale(M[0]),i.scale(M[1])],Y=ee[0],W=ee[1];if(k=Y,E=_O({axis:s,ticks:c,bandSize:a,offset:m.offset,entry:A,index:O}),$=W-Y,T=m.size,R={x:i.x,y:E,width:i.width,height:T},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var H=Ea($||B)*(Math.abs(B)-Math.abs($));$+=H}}return tr(tr(tr({},A),{},{x:k,y:E,width:$,height:T,value:u?M:M[1],payload:A,background:R},N&&N[O]&&N[O].props),{},{tooltipPayload:[b3(r,A)],tooltipPosition:{x:k+$/2,y:E+T/2}})});return tr({data:P,layout:p},h)});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 Axe(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,eF(n.key),n)}}function kxe(e,t,r){return t&&UE(e.prototype,t),r&&UE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function GE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GE(Object(r),!0).forEach(function(n){xy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xy(e,t,r){return t=eF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eF(e){var t=Oxe(e,"string");return Kf(t)=="symbol"?t:t+""}function Oxe(e,t){if(Kf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uC=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.layout,u=t.children,f=Object.keys(r),d={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},h=!!jn(u,Ba);return f.reduce(function(m,p){var g=r[p],v=g.orientation,y=g.domain,x=g.padding,b=x===void 0?{}:x,S=g.mirror,j=g.reversed,C="".concat(v).concat(S?"Mirror":""),N,P,A,O,M;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var k=y[1]-y[0],E=1/0,$=g.categoricalDomain.sort(AZ);if($.forEach(function(ee,Y){Y>0&&(E=Math.min((ee||0)-($[Y-1]||0),E))}),Number.isFinite(E)){var T=E/k,R=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(N=T*R/2),g.padding==="no-gap"){var B=_a(t.barCategoryGap,T*R),F=T*R/2;N=F-B-(F-B)/R*B}}}a==="xAxis"?P=[n.left+(b.left||0)+(N||0),n.left+n.width-(b.right||0)-(N||0)]:a==="yAxis"?P=c==="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)]:P=g.range,j&&(P=[P[1],P[0]]);var D=g3(g,i,h),G=D.scale,K=D.realScaleType;G.domain(y).range(P),v3(G);var z=y3(G,wa(wa({},g),{},{realScaleType:K}));a==="xAxis"?(M=v==="top"&&!S||v==="bottom"&&S,A=n.left,O=d[C]-M*g.height):a==="yAxis"&&(M=v==="left"&&!S||v==="right"&&S,A=d[C]-M*g.width,O=n.top);var U=wa(wa(wa({},g),z),{},{realScaleType:K,x:A,y:O,scale:G,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return U.bandSize=ng(U,z),!g.hide&&a==="xAxis"?d[C]+=(M?-1:1)*U.height:g.hide||(d[C]+=(M?-1:1)*U.width),wa(wa({},m),{},xy({},p,U))},{})},tF=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return{x:Math.min(n,i),y:Math.min(a,s),width:Math.abs(i-n),height:Math.abs(s-a)}},Exe=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return tF({x:r,y:n},{x:a,y:i})},rF=function(){function e(t){Axe(this,e),this.scale=t}return kxe(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]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();xy(rF,"EPS",1e-4);var dC=function(t){var r=Object.keys(t).reduce(function(n,a){return wa(wa({},n),{},xy({},a,rF.create(t[a])))},{});return wa(wa({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,l=i.position;return Xye(a,function(c,u){return r[u].apply(c,{bandAware:s,position:l})})},isInRange:function(a){return X3(a,function(i,s){return r[s].isInRange(i)})}})};function _xe(e){return(e%180+180)%180}var Txe=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=_xe(a),s=i*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},Mxe=gi,Rxe=Sh,$xe=ty;function Ixe(e){return function(t,r,n){var a=Object(t);if(!Rxe(t)){var i=Mxe(r);t=$xe(t),r=function(l){return i(a[l],l,a)}}var s=e(t,r,n);return s>-1?a[i?t[s]:s]:void 0}}var Dxe=Ixe,Fxe=H3;function Lxe(e){var t=Fxe(e),r=t%1;return t===t?r?t-r:t:0}var Bxe=Lxe,zxe=XD,Vxe=gi,Wxe=Bxe,Uxe=Math.max;function Gxe(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Wxe(r);return a<0&&(a=Uxe(n+a,0)),zxe(e,Vxe(t),a)}var Hxe=Gxe,qxe=Dxe,Kxe=Hxe,Yxe=qxe(Kxe),Xxe=Yxe;const Zxe=vt(Xxe);var Qxe=kX(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("")}),fC=w.createContext(void 0),hC=w.createContext(void 0),nF=w.createContext(void 0),aF=w.createContext({}),iF=w.createContext(void 0),oF=w.createContext(0),sF=w.createContext(0),HE=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,s=t.clipPathId,l=t.children,c=t.width,u=t.height,f=Qxe(i);return _.createElement(fC.Provider,{value:n},_.createElement(hC.Provider,{value:a},_.createElement(aF.Provider,{value:i},_.createElement(nF.Provider,{value:f},_.createElement(iF.Provider,{value:s},_.createElement(oF.Provider,{value:u},_.createElement(sF.Provider,{value:c},l)))))))},Jxe=function(){return w.useContext(iF)},lF=function(t){var r=w.useContext(fC);r==null&&ol();var n=r[t];return n==null&&ol(),n},e0e=function(){var t=w.useContext(fC);return xo(t)},t0e=function(){var t=w.useContext(hC),r=Zxe(t,function(n){return X3(n.domain,Number.isFinite)});return r||xo(t)},cF=function(t){var r=w.useContext(hC);r==null&&ol();var n=r[t];return n==null&&ol(),n},r0e=function(){var t=w.useContext(nF);return t},n0e=function(){return w.useContext(aF)},pC=function(){return w.useContext(sF)},mC=function(){return w.useContext(oF)};function Jc(e){"@babel/helpers - typeof";return Jc=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},Jc(e)}function a0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i0e(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,dF(n.key),n)}}function o0e(e,t,r){return t&&i0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function s0e(e,t,r){return t=wg(t),l0e(e,uF()?Reflect.construct(t,r||[],wg(e).constructor):t.apply(e,r))}function l0e(e,t){if(t&&(Jc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c0e(e)}function c0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uF=function(){return!!e})()}function wg(e){return wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wg(e)}function u0e(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&&qw(e,t)}function qw(e,t){return qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qw(e,t)}function qE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function KE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qE(Object(r),!0).forEach(function(n){gC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gC(e,t,r){return t=dF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dF(e){var t=d0e(e,"string");return Jc(t)=="symbol"?t:t+""}function d0e(e,t){if(Jc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f0e(e,t){return g0e(e)||m0e(e,t)||p0e(e,t)||h0e()}function h0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
469In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p0e(e,t){if(e){if(typeof e=="string")return YE(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 YE(e,t)}}function YE(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 m0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function g0e(e){if(Array.isArray(e))return e}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)}var v0e=function(t,r){var n;return _.isValidElement(t)?n=_.cloneElement(t,r):Je(t)?n=t(r):n=_.createElement("line",Kw({},r,{className:"recharts-reference-line-line"})),n},y0e=function(t,r,n,a,i,s,l,c,u){var f=i.x,d=i.y,h=i.width,m=i.height;if(n){var p=u.y,g=t.y.apply(p,{position:s});if(ci(u,"discard")&&!t.y.isInRange(g))return null;var v=[{x:f+h,y:g},{x:f,y:g}];return c==="left"?v.reverse():v}if(r){var y=u.x,x=t.x.apply(y,{position:s});if(ci(u,"discard")&&!t.x.isInRange(x))return null;var b=[{x,y:d+m},{x,y:d}];return l==="top"?b.reverse():b}if(a){var S=u.segment,j=S.map(function(C){return t.apply(C,{position:s})});return ci(u,"discard")&&Vye(j,function(C){return!t.isInRange(C)})?null:j}return null};function x0e(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,s=e.shape,l=e.className,c=e.alwaysShow,u=Jxe(),f=lF(a),d=cF(i),h=r0e();if(!u||!h)return null;Fi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=dC({x:f.scale,y:d.scale}),p=dr(t),g=dr(r),v=n&&n.length===2,y=y0e(m,p,g,v,h,e.position,f.orientation,d.orientation,e);if(!y)return null;var x=f0e(y,2),b=x[0],S=b.x,j=b.y,C=x[1],N=C.x,P=C.y,A=ci(e,"hidden")?"url(#".concat(u,")"):void 0,O=KE(KE({clipPath:A},He(e,!0)),{},{x1:S,y1:j,x2:N,y2:P});return _.createElement(mt,{className:at("recharts-reference-line",l)},v0e(s,O),Ar.renderCallByParent(e,Exe({x1:S,y1:j,x2:N,y2:P})))}var hc=function(e){function t(){return a0e(this,t),s0e(this,t,arguments)}return u0e(t,e),o0e(t,[{key:"render",value:function(){return _.createElement(x0e,this.props)}}])}(_.Component);gC(hc,"displayName","ReferenceLine");gC(hc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Yw(){return Yw=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},Yw.apply(this,arguments)}function eu(e){"@babel/helpers - typeof";return eu=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},eu(e)}function XE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ZE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XE(Object(r),!0).forEach(function(n){by(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w0e(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,hF(n.key),n)}}function j0e(e,t,r){return t&&w0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function S0e(e,t,r){return t=jg(t),C0e(e,fF()?Reflect.construct(t,r||[],jg(e).constructor):t.apply(e,r))}function C0e(e,t){if(t&&(eu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N0e(e)}function N0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fF=function(){return!!e})()}function jg(e){return jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jg(e)}function P0e(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&&Xw(e,t)}function Xw(e,t){return Xw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xw(e,t)}function by(e,t,r){return t=hF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hF(e){var t=A0e(e,"string");return eu(t)=="symbol"?t:t+""}function A0e(e,t){if(eu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k0e=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,s=dC({x:a.scale,y:i.scale}),l=s.apply({x:r,y:n},{bandAware:!0});return ci(t,"discard")&&!s.isInRange(l)?null:l},wy=function(e){function t(){return b0e(this,t),S0e(this,t,arguments)}return P0e(t,e),j0e(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,s=n.r,l=n.alwaysShow,c=n.clipPathId,u=dr(a),f=dr(i);if(Fi(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=k0e(this.props);if(!d)return null;var h=d.x,m=d.y,p=this.props,g=p.shape,v=p.className,y=ci(this.props,"hidden")?"url(#".concat(c,")"):void 0,x=ZE(ZE({clipPath:y},He(this.props,!0)),{},{cx:h,cy:m});return _.createElement(mt,{className:at("recharts-reference-dot",v)},t.renderDot(g,x),Ar.renderCallByParent(this.props,{x:h-s,y:m-s,width:2*s,height:2*s}))}}])}(_.Component);by(wy,"displayName","ReferenceDot");by(wy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});by(wy,"renderDot",function(e,t){var r;return _.isValidElement(e)?r=_.cloneElement(e,t):Je(e)?r=e(t):r=_.createElement(Wu,Yw({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Zw(){return Zw=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},Zw.apply(this,arguments)}function tu(e){"@babel/helpers - typeof";return tu=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},tu(e)}function QE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function JE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QE(Object(r),!0).forEach(function(n){jy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E0e(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,mF(n.key),n)}}function _0e(e,t,r){return t&&E0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T0e(e,t,r){return t=Sg(t),M0e(e,pF()?Reflect.construct(t,r||[],Sg(e).constructor):t.apply(e,r))}function M0e(e,t){if(t&&(tu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R0e(e)}function R0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pF=function(){return!!e})()}function Sg(e){return Sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sg(e)}function $0e(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&&Qw(e,t)}function Qw(e,t){return Qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Qw(e,t)}function jy(e,t,r){return t=mF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mF(e){var t=I0e(e,"string");return tu(t)=="symbol"?t:t+""}function I0e(e,t){if(tu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D0e=function(t,r,n,a,i){var s=i.x1,l=i.x2,c=i.y1,u=i.y2,f=i.xAxis,d=i.yAxis;if(!f||!d)return null;var h=dC({x:f.scale,y:d.scale}),m={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},p={x:r?h.x.apply(l,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return ci(i,"discard")&&(!h.isInRange(m)||!h.isInRange(p))?null:tF(m,p)},Sy=function(e){function t(){return O0e(this,t),T0e(this,t,arguments)}return $0e(t,e),_0e(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,s=n.y1,l=n.y2,c=n.className,u=n.alwaysShow,f=n.clipPathId;Fi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=dr(a),h=dr(i),m=dr(s),p=dr(l),g=this.props.shape;if(!d&&!h&&!m&&!p&&!g)return null;var v=D0e(d,h,m,p,this.props);if(!v&&!g)return null;var y=ci(this.props,"hidden")?"url(#".concat(f,")"):void 0;return _.createElement(mt,{className:at("recharts-reference-area",c)},t.renderRect(g,JE(JE({clipPath:y},He(this.props,!0)),v)),Ar.renderCallByParent(this.props,v))}}])}(_.Component);jy(Sy,"displayName","ReferenceArea");jy(Sy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});jy(Sy,"renderRect",function(e,t){var r;return _.isValidElement(e)?r=_.cloneElement(e,t):Je(e)?r=e(t):r=_.createElement(cC,Zw({},t,{className:"recharts-reference-area-rect"})),r});function gF(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function F0e(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Txe(n,r)}function L0e(e,t,r){var n=r==="width",a=e.x,i=e.y,s=e.width,l=e.height;return t===1?{start:n?a:i,end:n?a+s:i+l}:{start:n?a+s:i+l,end:n?a:i}}function Cg(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function B0e(e,t){return gF(e,t+1)}function z0e(e,t,r,n,a){for(var i=(n||[]).slice(),s=t.start,l=t.end,c=0,u=1,f=s,d=function(){var p=n==null?void 0:n[c];if(p===void 0)return{v:gF(n,u)};var g=c,v,y=function(){return v===void 0&&(v=r(p,g)),v},x=p.coordinate,b=c===0||Cg(e,x,y,f,l);b||(c=0,f=s,u+=1),b&&(f=x+e*(y()/2+a),c+=u)},h;u<=i.length;)if(h=d(),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 e_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e_(Object(r),!0).forEach(function(n){V0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V0e(e,t,r){return t=W0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W0e(e){var t=U0e(e,"string");return Yf(t)=="symbol"?t:t+""}function U0e(e,t){if(Yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G0e(e,t,r,n,a){for(var i=(n||[]).slice(),s=i.length,l=t.start,c=t.end,u=function(h){var m=i[h],p,g=function(){return p===void 0&&(p=r(m,h)),p};if(h===s-1){var v=e*(m.coordinate+e*g()/2-c);i[h]=m=zr(zr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else i[h]=m=zr(zr({},m),{},{tickCoord:m.coordinate});var y=Cg(e,m.tickCoord,g,l,c);y&&(c=m.tickCoord-e*(g()/2+a),i[h]=zr(zr({},m),{},{isShow:!0}))},f=s-1;f>=0;f--)u(f);return i}function H0e(e,t,r,n,a,i){var s=(n||[]).slice(),l=s.length,c=t.start,u=t.end;if(i){var f=n[l-1],d=r(f,l-1),h=e*(f.coordinate+e*d/2-u);s[l-1]=f=zr(zr({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var m=Cg(e,f.tickCoord,function(){return d},c,u);m&&(u=f.tickCoord-e*(d/2+a),s[l-1]=zr(zr({},f),{},{isShow:!0}))}for(var p=i?l-1:l,g=function(x){var b=s[x],S,j=function(){return S===void 0&&(S=r(b,x)),S};if(x===0){var C=e*(b.coordinate-e*j()/2-c);s[x]=b=zr(zr({},b),{},{tickCoord:C<0?b.coordinate-C*e:b.coordinate})}else s[x]=b=zr(zr({},b),{},{tickCoord:b.coordinate});var N=Cg(e,b.tickCoord,j,c,u);N&&(c=b.tickCoord+e*(j()/2+a),s[x]=zr(zr({},b),{},{isShow:!0}))},v=0;v<p;v++)g(v);return s}function vC(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,s=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!a||!a.length||!n)return[];if(Ne(c)||$a.isSsr)return B0e(a,typeof c=="number"&&Ne(c)?c:0);var h=[],m=l==="top"||l==="bottom"?"width":"height",p=f&&m==="width"?$d(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(b,S){var j=Je(u)?u(b.value,S):b.value;return m==="width"?F0e($d(j,{fontSize:t,letterSpacing:r}),p,d):$d(j,{fontSize:t,letterSpacing:r})[m]},v=a.length>=2?Ea(a[1].coordinate-a[0].coordinate):1,y=L0e(i,v,m);return c==="equidistantPreserveStart"?z0e(v,y,g,a,s):(c==="preserveStart"||c==="preserveStartEnd"?h=H0e(v,y,g,a,s,c==="preserveStartEnd"):h=G0e(v,y,g,a,s),h.filter(function(x){return x.isShow}))}var q0e=["viewBox"],K0e=["viewBox"],Y0e=["ticks"];function ru(e){"@babel/helpers - typeof";return ru=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},ru(e)}function Xl(){return Xl=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},Xl.apply(this,arguments)}function t_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t_(Object(r),!0).forEach(function(n){yC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jx(e,t){if(e==null)return{};var r=X0e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X0e(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 Z0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r_(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,yF(n.key),n)}}function Q0e(e,t,r){return t&&r_(e.prototype,t),r&&r_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function J0e(e,t,r){return t=Ng(t),ebe(e,vF()?Reflect.construct(t,r||[],Ng(e).constructor):t.apply(e,r))}function ebe(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tbe(e)}function tbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vF=function(){return!!e})()}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ng(e)}function rbe(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,a){return n.__proto__=a,n},Jw(e,t)}function yC(e,t,r){return t=yF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yF(e){var t=nbe(e,"string");return ru(t)=="symbol"?t:t+""}function nbe(e,t){if(ru(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ru(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uu=function(e){function t(r){var n;return Z0e(this,t),n=J0e(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return rbe(t,e),Q0e(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,s=Jx(n,q0e),l=this.props,c=l.viewBox,u=Jx(l,K0e);return!cc(i,c)||!cc(s,u)||!cc(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,s=a.y,l=a.width,c=a.height,u=a.orientation,f=a.tickSize,d=a.mirror,h=a.tickMargin,m,p,g,v,y,x,b=d?-1:1,S=n.tickSize||f,j=Ne(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":m=p=n.coordinate,v=s+ +!d*c,g=v-b*S,x=g-b*h,y=j;break;case"left":g=v=n.coordinate,p=i+ +!d*l,m=p-b*S,y=m-b*h,x=j;break;case"right":g=v=n.coordinate,p=i+ +d*l,m=p+b*S,y=m+b*h,x=j;break;default:m=p=n.coordinate,v=s+ +d*c,g=v+b*S,x=g+b*h,y=j;break}return{line:{x1:m,y1:g,x2:p,y2:v},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s;switch(a){case"left":s=i?"start":"end";break;case"right":s=i?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=i?"start":"end";break;default:s=i?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.orientation,u=n.mirror,f=n.axisLine,d=ir(ir(ir({},He(this.props,!1)),He(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=ir(ir({},d),{},{x1:a,y1:i+h*l,x2:a+s,y2:i+h*l})}else{var m=+(c==="left"&&!u||c==="right"&&u);d=ir(ir({},d),{},{x1:a+m*s,y1:i,x2:a+m*s,y2:i+l})}return _.createElement("line",Xl({},d,{className:at("recharts-cartesian-axis-line",Xn(f,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var s=this,l=this.props,c=l.tickLine,u=l.stroke,f=l.tick,d=l.tickFormatter,h=l.unit,m=vC(ir(ir({},this.props),{},{ticks:n}),a,i),p=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),v=He(this.props,!1),y=He(f,!1),x=ir(ir({},v),{},{fill:"none"},He(c,!1)),b=m.map(function(S,j){var C=s.getTickLineCoord(S),N=C.line,P=C.tick,A=ir(ir(ir(ir({textAnchor:p,verticalAnchor:g},v),{},{stroke:"none",fill:u},y),P),{},{index:j,payload:S,visibleTicksCount:m.length,tickFormatter:d});return _.createElement(mt,Xl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},$c(s.props,S,j)),c&&_.createElement("line",Xl({},x,N,{className:at("recharts-cartesian-axis-tick-line",Xn(c,"className"))})),f&&t.renderTickItem(f,A,"".concat(Je(d)?d(S.value,j):S.value).concat(h||"")))});return _.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,s=a.width,l=a.height,c=a.ticksGenerator,u=a.className,f=a.hide;if(f)return null;var d=this.props,h=d.ticks,m=Jx(d,Y0e),p=h;return Je(c)&&(p=h&&h.length>0?c(this.props):c(m)),s<=0||l<=0||!p||!p.length?null:_.createElement(mt,{className:at("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),Ar.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var s,l=at(a.className,"recharts-cartesian-axis-tick-value");return _.isValidElement(n)?s=_.cloneElement(n,ir(ir({},a),{},{className:l})):Je(n)?s=n(ir(ir({},a),{},{className:l})):s=_.createElement(zc,Xl({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])}(w.Component);yC(Uu,"displayName","CartesianAxis");yC(Uu,"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 abe=["x1","y1","x2","y2","key"],ibe=["offset"];function sl(e){"@babel/helpers - typeof";return sl=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},sl(e)}function n_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n_(Object(r),!0).forEach(function(n){obe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function obe(e,t,r){return t=sbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sbe(e){var t=lbe(e,"string");return sl(t)=="symbol"?t:t+""}function lbe(e,t){if(sl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _s(){return _s=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},_s.apply(this,arguments)}function a_(e,t){if(e==null)return{};var r=cbe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cbe(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 ube=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,s=t.width,l=t.height,c=t.ry;return _.createElement("rect",{x:a,y:i,ry:c,width:s,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function xF(e,t){var r;if(_.isValidElement(e))r=_.cloneElement(e,t);else if(Je(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,s=t.y2,l=t.key,c=a_(t,abe),u=He(c,!1);u.offset;var f=a_(u,ibe);r=_.createElement("line",_s({},f,{x1:n,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function dbe(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,c){var u=Ur(Ur({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return xF(a,u)});return _.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function fbe(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,c){var u=Ur(Ur({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return xF(a,u)});return _.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function hbe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,s=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=l.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var p=!f[m+1],g=p?a+s-h:f[m+1]-h;if(g<=0)return null;var v=m%t.length;return _.createElement("rect",{key:"react-".concat(m),y:h,x:n,height:g,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function pbe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,s=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var p=!f[m+1],g=p?i+l-h:f[m+1]-h;if(g<=0)return null;var v=m%n.length;return _.createElement("rect",{key:"react-".concat(m),x:h,y:s,width:g,height:c,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var mbe=function(t,r){var n=t.xAxis,a=t.width,i=t.height,s=t.offset;return m3(vC(Ur(Ur(Ur({},Uu.defaultProps),n),{},{ticks:Ri(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,r)},gbe=function(t,r){var n=t.yAxis,a=t.width,i=t.height,s=t.offset;return m3(vC(Ur(Ur(Ur({},Uu.defaultProps),n),{},{ticks:Ri(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,r)},_l={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Yo(e){var t,r,n,a,i,s,l=pC(),c=mC(),u=n0e(),f=Ur(Ur({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:_l.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:_l.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:_l.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:_l.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:_l.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:_l.verticalFill,x:Ne(e.x)?e.x:u.left,y:Ne(e.y)?e.y:u.top,width:Ne(e.width)?e.width:u.width,height:Ne(e.height)?e.height:u.height}),d=f.x,h=f.y,m=f.width,p=f.height,g=f.syncWithTicks,v=f.horizontalValues,y=f.verticalValues,x=e0e(),b=t0e();if(!Ne(m)||m<=0||!Ne(p)||p<=0||!Ne(d)||d!==+d||!Ne(h)||h!==+h)return null;var S=f.verticalCoordinatesGenerator||mbe,j=f.horizontalCoordinatesGenerator||gbe,C=f.horizontalPoints,N=f.verticalPoints;if((!C||!C.length)&&Je(j)){var P=v&&v.length,A=j({yAxis:b?Ur(Ur({},b),{},{ticks:P?v:b.ticks}):void 0,width:l,height:c,offset:u},P?!0:g);Fi(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(sl(A),"]")),Array.isArray(A)&&(C=A)}if((!N||!N.length)&&Je(S)){var O=y&&y.length,M=S({xAxis:x?Ur(Ur({},x),{},{ticks:O?y:x.ticks}):void 0,width:l,height:c,offset:u},O?!0:g);Fi(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(sl(M),"]")),Array.isArray(M)&&(N=M)}return _.createElement("g",{className:"recharts-cartesian-grid"},_.createElement(ube,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),_.createElement(dbe,_s({},f,{offset:u,horizontalPoints:C,xAxis:x,yAxis:b})),_.createElement(fbe,_s({},f,{offset:u,verticalPoints:N,xAxis:x,yAxis:b})),_.createElement(hbe,_s({},f,{horizontalPoints:C})),_.createElement(pbe,_s({},f,{verticalPoints:N})))}Yo.displayName="CartesianGrid";var vbe=["type","layout","connectNulls","ref"],ybe=["key"];function nu(e){"@babel/helpers - typeof";return nu=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},nu(e)}function i_(e,t){if(e==null)return{};var r=xbe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(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 zd(){return zd=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},zd.apply(this,arguments)}function o_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o_(Object(r),!0).forEach(function(n){ja(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tl(e){return Sbe(e)||jbe(e)||wbe(e)||bbe()}function bbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
470In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wbe(e,t){if(e){if(typeof e=="string")return e1(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 e1(e,t)}}function jbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sbe(e){if(Array.isArray(e))return e1(e)}function e1(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 Cbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s_(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,wF(n.key),n)}}function Nbe(e,t,r){return t&&s_(e.prototype,t),r&&s_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pbe(e,t,r){return t=Pg(t),Abe(e,bF()?Reflect.construct(t,r||[],Pg(e).constructor):t.apply(e,r))}function Abe(e,t){if(t&&(nu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kbe(e)}function kbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bF=function(){return!!e})()}function Pg(e){return Pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pg(e)}function Obe(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&&t1(e,t)}function t1(e,t){return t1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},t1(e,t)}function ja(e,t,r){return t=wF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wF(e){var t=Ebe(e,"string");return nu(t)=="symbol"?t:t+""}function Ebe(e,t){if(nu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gu=function(e){function t(){var r;Cbe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Pbe(this,t,[].concat(a)),ja(r,"state",{isAnimationFinished:!0,totalLength:0}),ja(r,"generateSimpleStrokeDasharray",function(s,l){return"".concat(l,"px ").concat(s-l,"px")}),ja(r,"getStrokeDasharray",function(s,l,c){var u=c.reduce(function(y,x){return y+x});if(!u)return r.generateSimpleStrokeDasharray(l,s);for(var f=Math.floor(s/u),d=s%u,h=l-s,m=[],p=0,g=0;p<c.length;g+=c[p],++p)if(g+c[p]>d){m=[].concat(Tl(c.slice(0,p)),[d-g]);break}var v=m.length%2===0?[0,h]:[h];return[].concat(Tl(t.repeat(c,f)),Tl(m),v).map(function(y){return"".concat(y,"px")}).join(", ")}),ja(r,"id",Iu("recharts-line-")),ja(r,"pathRef",function(s){r.mainCurve=s}),ja(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),ja(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Obe(t,e),Nbe(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,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.points,l=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=Zn(f,kh);if(!d)return null;var h=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:_r(g.payload,v)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return _.createElement(mt,m,d.map(function(p){return _.cloneElement(p,{key:"bar-".concat(p.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,f=l.dataKey,d=He(this.props,!1),h=He(c,!0),m=u.map(function(g,v){var y=yn(yn(yn({key:"dot-".concat(v),r:3},d),h),{},{index:v,cx:g.x,cy:g.y,value:g.value,dataKey:f,payload:g.payload,points:u});return t.renderDotItem(c,y)}),p={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return _.createElement(mt,zd({className:"recharts-line-dots",key:"dots"},p),m)}},{key:"renderCurveStatically",value:function(n,a,i,s){var l=this.props,c=l.type,u=l.layout,f=l.connectNulls;l.ref;var d=i_(l,vbe),h=yn(yn(yn({},He(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},s),{},{type:c,layout:u,connectNulls:f});return _.createElement(fc,zd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.strokeDasharray,u=s.isAnimationActive,f=s.animationBegin,d=s.animationDuration,h=s.animationEasing,m=s.animationId,p=s.animateNewValues,g=s.width,v=s.height,y=this.state,x=y.prevPoints,b=y.totalLength;return _.createElement(La,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var j=S.t;if(x){var C=x.length/l.length,N=l.map(function(k,E){var $=Math.floor(E*C);if(x[$]){var T=x[$],R=Zt(T.x,k.x),B=Zt(T.y,k.y);return yn(yn({},k),{},{x:R(j),y:B(j)})}if(p){var F=Zt(g*2,k.x),D=Zt(v/2,k.y);return yn(yn({},k),{},{x:F(j),y:D(j)})}return yn(yn({},k),{},{x:k.x,y:k.y})});return i.renderCurveStatically(N,n,a)}var P=Zt(0,b),A=P(j),O;if(c){var M="".concat(c).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});O=i.getStrokeDasharray(A,b,M)}else O=i.generateSimpleStrokeDasharray(b,A);return i.renderCurveStatically(l,n,a,{strokeDasharray:O})})}},{key:"renderCurve",value:function(n,a){var i=this.props,s=i.points,l=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.totalLength;return l&&s&&s.length&&(!u&&f>0||!al(u,s))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,c=a.className,u=a.xAxis,f=a.yAxis,d=a.top,h=a.left,m=a.width,p=a.height,g=a.isAnimationActive,v=a.id;if(i||!l||!l.length)return null;var y=this.state.isAnimationFinished,x=l.length===1,b=at("recharts-line",c),S=u&&u.allowDataOverflow,j=f&&f.allowDataOverflow,C=S||j,N=st(v)?this.id:v,P=(n=He(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=P.r,O=A===void 0?3:A,M=P.strokeWidth,k=M===void 0?2:M,E=sD(s)?s:{},$=E.clipDot,T=$===void 0?!0:$,R=O*2+k;return _.createElement(mt,{className:b},S||j?_.createElement("defs",null,_.createElement("clipPath",{id:"clipPath-".concat(N)},_.createElement("rect",{x:S?h:h-m/2,y:j?d:d-p/2,width:S?m:m*2,height:j?p:p*2})),!T&&_.createElement("clipPath",{id:"clipPath-dots-".concat(N)},_.createElement("rect",{x:h-R/2,y:d-R/2,width:m+R,height:p+R}))):null,!x&&this.renderCurve(C,N),this.renderErrorBar(C,N),(x||s)&&this.renderDots(C,T,N),(!g||y)&&li.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Tl(n),[0]):n,s=[],l=0;l<a;++l)s=[].concat(Tl(s),Tl(i));return s}},{key:"renderDotItem",value:function(n,a){var i;if(_.isValidElement(n))i=_.cloneElement(n,a);else if(Je(n))i=n(a);else{var s=a.key,l=i_(a,ybe),c=at("recharts-line-dot",typeof n!="boolean"?n.className:"");i=_.createElement(Wu,zd({key:s},l,{className:c}))}return i}}])}(w.PureComponent);ja(Gu,"displayName","Line");ja(Gu,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!$a.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});ja(Gu,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,f=t.layout,d=c.map(function(h,m){var p=_r(h,s);return f==="horizontal"?{x:rg({axis:r,ticks:a,bandSize:l,entry:h,index:m}),y:st(p)?null:n.scale(p),value:p,payload:h}:{x:st(p)?null:r.scale(p),y:rg({axis:n,ticks:i,bandSize:l,entry:h,index:m}),value:p,payload:h}});return yn({points:d,layout:f},u)});var _be=["layout","type","stroke","connectNulls","isRange","ref"],Tbe=["key"],jF;function au(e){"@babel/helpers - typeof";return au=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},au(e)}function SF(e,t){if(e==null)return{};var r=Mbe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mbe(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 Ts(){return Ts=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},Ts.apply(this,arguments)}function l_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l_(Object(r),!0).forEach(function(n){ri(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c_(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,NF(n.key),n)}}function $be(e,t,r){return t&&c_(e.prototype,t),r&&c_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ibe(e,t,r){return t=Ag(t),Dbe(e,CF()?Reflect.construct(t,r||[],Ag(e).constructor):t.apply(e,r))}function Dbe(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fbe(e)}function Fbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CF=function(){return!!e})()}function Ag(e){return Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ag(e)}function Lbe(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&&r1(e,t)}function r1(e,t){return r1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},r1(e,t)}function ri(e,t,r){return t=NF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NF(e){var t=Bbe(e,"string");return au(t)=="symbol"?t:t+""}function Bbe(e,t){if(au(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cn=function(e){function t(){var r;Rbe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Ibe(this,t,[].concat(a)),ri(r,"state",{isAnimationFinished:!0}),ri(r,"id",Iu("recharts-area-")),ri(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Je(s)&&s()}),ri(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Je(s)&&s()}),r}return Lbe(t,e),$be(t,[{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(s&&!l)return null;var c=this.props,u=c.dot,f=c.points,d=c.dataKey,h=He(this.props,!1),m=He(u,!0),p=f.map(function(v,y){var x=fo(fo(fo({key:"dot-".concat(y),r:3},h),m),{},{index:y,cx:v.x,cy:v.y,dataKey:d,value:v.value,payload:v.payload,points:f});return t.renderDotItem(u,x)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return _.createElement(mt,Ts({className:"recharts-area-dots"},g),p)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].x,u=s[s.length-1].x,f=n*Math.abs(c-u),d=Eo(s.map(function(h){return h.y||0}));return Ne(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(Eo(i.map(function(h){return h.y||0})),d)),Ne(d)?_.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].y,u=s[s.length-1].y,f=n*Math.abs(c-u),d=Eo(s.map(function(h){return h.x||0}));return Ne(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(Eo(i.map(function(h){return h.x||0})),d)),Ne(d)?_.createElement("rect",{x:0,y:c<u?c:c-f,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,s){var l=this.props,c=l.layout,u=l.type,f=l.stroke,d=l.connectNulls,h=l.isRange;l.ref;var m=SF(l,_be);return _.createElement(mt,{clipPath:i?"url(#clipPath-".concat(s,")"):null},_.createElement(fc,Ts({},He(m,!0),{points:n,connectNulls:d,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&_.createElement(fc,Ts({},He(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:n})),f!=="none"&&h&&_.createElement(fc,Ts({},He(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.baseLine,u=s.isAnimationActive,f=s.animationBegin,d=s.animationDuration,h=s.animationEasing,m=s.animationId,p=this.state,g=p.prevPoints,v=p.prevBaseLine;return _.createElement(La,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var x=y.t;if(g){var b=g.length/l.length,S=l.map(function(P,A){var O=Math.floor(A*b);if(g[O]){var M=g[O],k=Zt(M.x,P.x),E=Zt(M.y,P.y);return fo(fo({},P),{},{x:k(x),y:E(x)})}return P}),j;if(Ne(c)&&typeof c=="number"){var C=Zt(v,c);j=C(x)}else if(st(c)||$u(c)){var N=Zt(v,0);j=N(x)}else j=c.map(function(P,A){var O=Math.floor(A*b);if(v[O]){var M=v[O],k=Zt(M.x,P.x),E=Zt(M.y,P.y);return fo(fo({},P),{},{x:k(x),y:E(x)})}return P});return i.renderAreaStatically(S,j,n,a)}return _.createElement(mt,null,_.createElement("defs",null,_.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(x))),_.createElement(mt,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(l,c,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,s=i.points,l=i.baseLine,c=i.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,h=u.totalLength;return c&&s&&s.length&&(!f&&h>0||!al(f,s)||!al(d,l))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(s,l,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,c=a.className,u=a.top,f=a.left,d=a.xAxis,h=a.yAxis,m=a.width,p=a.height,g=a.isAnimationActive,v=a.id;if(i||!l||!l.length)return null;var y=this.state.isAnimationFinished,x=l.length===1,b=at("recharts-area",c),S=d&&d.allowDataOverflow,j=h&&h.allowDataOverflow,C=S||j,N=st(v)?this.id:v,P=(n=He(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=P.r,O=A===void 0?3:A,M=P.strokeWidth,k=M===void 0?2:M,E=sD(s)?s:{},$=E.clipDot,T=$===void 0?!0:$,R=O*2+k;return _.createElement(mt,{className:b},S||j?_.createElement("defs",null,_.createElement("clipPath",{id:"clipPath-".concat(N)},_.createElement("rect",{x:S?f:f-m/2,y:j?u:u-p/2,width:S?m:m*2,height:j?p:p*2})),!T&&_.createElement("clipPath",{id:"clipPath-dots-".concat(N)},_.createElement("rect",{x:f-R/2,y:u-R/2,width:m+R,height:p+R}))):null,x?null:this.renderArea(C,N),(s||x)&&this.renderDots(C,T,N),(!g||y)&&li.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(w.PureComponent);jF=Cn;ri(Cn,"displayName","Area");ri(Cn,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!$a.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ri(Cn,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,s=t.props.baseValue,l=s??i;if(Ne(l)&&typeof l=="number")return l;var c=a==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return l==="dataMin"?d:l==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});ri(Cn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=t.layout,p=u&&u.length,g=jF.getBaseValue(t,r,n,a),v=m==="horizontal",y=!1,x=d.map(function(S,j){var C;p?C=u[f+j]:(C=_r(S,c),Array.isArray(C)?y=!0:C=[g,C]);var N=C[1]==null||p&&_r(S,c)==null;return v?{x:rg({axis:n,ticks:i,bandSize:l,entry:S,index:j}),y:N?null:a.scale(C[1]),value:C,payload:S}:{x:N?null:n.scale(C[1]),y:rg({axis:a,ticks:s,bandSize:l,entry:S,index:j}),value:C,payload:S}}),b;return p||y?b=x.map(function(S){var j=Array.isArray(S.value)?S.value[0]:null;return v?{x:S.x,y:j!=null&&S.y!=null?a.scale(j):null}:{x:j!=null?n.scale(j):null,y:S.y}}):b=v?a.scale(g):n.scale(g),fo({points:x,baseLine:b,layout:m,isRange:y},h)});ri(Cn,"renderDotItem",function(e,t){var r;if(_.isValidElement(e))r=_.cloneElement(e,t);else if(Je(e))r=e(t);else{var n=at("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=SF(t,Tbe);r=_.createElement(Wu,Ts({},i,{key:a,className:n}))}return r});function iu(e){"@babel/helpers - typeof";return iu=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},iu(e)}function zbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vbe(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,kF(n.key),n)}}function Wbe(e,t,r){return t&&Vbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ube(e,t,r){return t=kg(t),Gbe(e,PF()?Reflect.construct(t,r||[],kg(e).constructor):t.apply(e,r))}function Gbe(e,t){if(t&&(iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hbe(e)}function Hbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PF=function(){return!!e})()}function kg(e){return kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kg(e)}function qbe(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&&n1(e,t)}function n1(e,t){return n1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},n1(e,t)}function AF(e,t,r){return t=kF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kF(e){var t=Kbe(e,"string");return iu(t)=="symbol"?t:t+""}function Kbe(e,t){if(iu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(iu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a1(){return a1=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},a1.apply(this,arguments)}function Ybe(e){var t=e.xAxisId,r=pC(),n=mC(),a=lF(t);return a==null?null:w.createElement(Uu,a1({},a,{className:at("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Ri(s,!0)}}))}var ra=function(e){function t(){return zbe(this,t),Ube(this,t,arguments)}return qbe(t,e),Wbe(t,[{key:"render",value:function(){return w.createElement(Ybe,this.props)}}])}(w.Component);AF(ra,"displayName","XAxis");AF(ra,"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 ou(e){"@babel/helpers - typeof";return ou=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},ou(e)}function Xbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zbe(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,_F(n.key),n)}}function Qbe(e,t,r){return t&&Zbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jbe(e,t,r){return t=Og(t),ewe(e,OF()?Reflect.construct(t,r||[],Og(e).constructor):t.apply(e,r))}function ewe(e,t){if(t&&(ou(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 OF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OF=function(){return!!e})()}function Og(e){return Og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Og(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&&i1(e,t)}function i1(e,t){return i1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},i1(e,t)}function EF(e,t,r){return t=_F(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _F(e){var t=nwe(e,"string");return ou(t)=="symbol"?t:t+""}function nwe(e,t){if(ou(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ou(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o1(){return o1=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},o1.apply(this,arguments)}var awe=function(t){var r=t.yAxisId,n=pC(),a=mC(),i=cF(r);return i==null?null:w.createElement(Uu,o1({},i,{className:at("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(l){return Ri(l,!0)}}))},na=function(e){function t(){return Xbe(this,t),Jbe(this,t,arguments)}return rwe(t,e),Qbe(t,[{key:"render",value:function(){return w.createElement(awe,this.props)}}])}(w.Component);EF(na,"displayName","YAxis");EF(na,"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 u_(e){return lwe(e)||swe(e)||owe(e)||iwe()}function iwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
471In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function owe(e,t){if(e){if(typeof e=="string")return s1(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 s1(e,t)}}function swe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lwe(e){if(Array.isArray(e))return s1(e)}function s1(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 l1=function(t,r,n,a,i){var s=Zn(t,hc),l=Zn(t,wy),c=[].concat(u_(s),u_(l)),u=Zn(t,Sy),f="".concat(a,"Id"),d=a[0],h=r;if(c.length&&(h=c.reduce(function(g,v){if(v.props[f]===n&&ci(v.props,"extendDomain")&&Ne(v.props[d])){var y=v.props[d];return[Math.min(g[0],y),Math.max(g[1],y)]}return g},h)),u.length){var m="".concat(d,"1"),p="".concat(d,"2");h=u.reduce(function(g,v){if(v.props[f]===n&&ci(v.props,"extendDomain")&&Ne(v.props[m])&&Ne(v.props[p])){var y=v.props[m],x=v.props[p];return[Math.min(g[0],y,x),Math.max(g[1],y,x)]}return g},h)}return i&&i.length&&(h=i.reduce(function(g,v){return Ne(v)?[Math.min(g[0],v),Math.max(g[1],v)]:g},h)),h},TF={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function i(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new a(f,d||c,h),p=r?r+u:u;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],m]:c._events[p].push(m):(c._events[p]=m,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=r?r+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,m=d.length,p=new Array(m);h<m;h++)p[h]=d[h].fn;return p},l.prototype.listenerCount=function(u){var f=r?r+u:u,d=this._events[f];return d?d.fn?1:d.length:0},l.prototype.emit=function(u,f,d,h,m,p){var g=r?r+u:u;if(!this._events[g])return!1;var v=this._events[g],y=arguments.length,x,b;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,f),!0;case 3:return v.fn.call(v.context,f,d),!0;case 4:return v.fn.call(v.context,f,d,h),!0;case 5:return v.fn.call(v.context,f,d,h,m),!0;case 6:return v.fn.call(v.context,f,d,h,m,p),!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,j;for(b=0;b<S;b++)switch(v[b].once&&this.removeListener(u,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,f);break;case 3:v[b].fn.call(v[b].context,f,d);break;case 4:v[b].fn.call(v[b].context,f,d,h);break;default:if(!x)for(j=1,x=new Array(y-1);j<y;j++)x[j-1]=arguments[j];v[b].fn.apply(v[b].context,x)}}return!0},l.prototype.on=function(u,f,d){return i(this,u,f,d,!1)},l.prototype.once=function(u,f,d){return i(this,u,f,d,!0)},l.prototype.removeListener=function(u,f,d,h){var m=r?r+u:u;if(!this._events[m])return this;if(!f)return s(this,m),this;var p=this._events[m];if(p.fn)p.fn===f&&(!h||p.once)&&(!d||p.context===d)&&s(this,m);else{for(var g=0,v=[],y=p.length;g<y;g++)(p[g].fn!==f||h&&!p[g].once||d&&p[g].context!==d)&&v.push(p[g]);v.length?this._events[m]=v.length===1?v[0]:v:s(this,m)}return this},l.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&s(this,f)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(TF);var cwe=TF.exports;const uwe=vt(cwe);var e0=new uwe,t0="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 dwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fwe(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,MF(n.key),n)}}function hwe(e,t,r){return t&&fwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r0(e,t,r){return t=MF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MF(e){var t=pwe(e,"string");return Xf(t)=="symbol"?t:t+""}function pwe(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 mwe=function(){function e(){dwe(this,e),r0(this,"activeIndex",0),r0(this,"coordinateList",[]),r0(this,"layout","horizontal")}return hwe(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,s=r.container,l=s===void 0?null:s,c=r.layout,u=c===void 0?null:c,f=r.offset,d=f===void 0?null:f,h=r.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=m??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 a=this.container.getBoundingClientRect(),i=a.x,s=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=i+c+u,h=s+this.offset.top+l/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function gwe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&Ne(n)&&Ne(a))return!0}return!1}function vwe(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function RF(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,s=Ot(t,r,n,a),l=Ot(t,r,n,i);return{points:[s,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function ywe(e,t,r){var n,a,i,s;if(e==="horizontal")n=t.x,i=n,a=r.top,s=r.top+r.height;else if(e==="vertical")a=t.y,s=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=Ot(l,c,u,d),m=Ot(l,c,f,d);n=h.x,a=h.y,i=m.x,s=m.y}else return RF(t);return[{x:n,y:a},{x:i,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 d_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d_(Object(r),!0).forEach(function(n){xwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xwe(e,t,r){return t=bwe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bwe(e){var t=wwe(e,"string");return Zf(t)=="symbol"?t:t+""}function wwe(e,t){if(Zf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jwe(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,m=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!m||!i||!s||h!=="ScatterChart"&&a!=="axis")return null;var p,g=fc;if(h==="ScatterChart")p=s,g=dge;else if(h==="BarChart")p=vwe(d,s,c,f),g=cC;else if(d==="radial"){var v=RF(s),y=v.cx,x=v.cy,b=v.radius,S=v.startAngle,j=v.endAngle;p={cx:y,cy:x,startAngle:S,endAngle:j,innerRadius:b,outerRadius:b},g=P3}else p={points:ywe(d,s,c)},g=fc;var C=wp(wp(wp(wp({stroke:"#ccc",pointerEvents:"none"},c),p),He(m,!1)),{},{payload:l,payloadIndex:u,className:at("recharts-tooltip-cursor",m.className)});return w.isValidElement(m)?w.cloneElement(m,C):w.createElement(g,C)}var Swe=["item"],Cwe=["children","className","width","height","style","compact","title","desc"];function su(e){"@babel/helpers - typeof";return su=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},su(e)}function Zl(){return Zl=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},Zl.apply(this,arguments)}function f_(e,t){return Awe(e)||Pwe(e,t)||IF(e,t)||Nwe()}function Nwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
472In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Awe(e){if(Array.isArray(e))return e}function h_(e,t){if(e==null)return{};var r=kwe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kwe(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 Owe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ewe(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,DF(n.key),n)}}function _we(e,t,r){return t&&Ewe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Twe(e,t,r){return t=Eg(t),Mwe(e,$F()?Reflect.construct(t,r||[],Eg(e).constructor):t.apply(e,r))}function Mwe(e,t){if(t&&(su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rwe(e)}function Rwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($F=function(){return!!e})()}function Eg(e){return Eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Eg(e)}function $we(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&&c1(e,t)}function c1(e,t){return c1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},c1(e,t)}function lu(e){return Fwe(e)||Dwe(e)||IF(e)||Iwe()}function Iwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
473In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IF(e,t){if(e){if(typeof e=="string")return u1(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 u1(e,t)}}function Dwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fwe(e){if(Array.isArray(e))return u1(e)}function u1(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 p_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p_(Object(r),!0).forEach(function(n){Xe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xe(e,t,r){return t=DF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DF(e){var t=Lwe(e,"string");return su(t)=="symbol"?t:t+""}function Lwe(e,t){if(su(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(su(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bwe={xAxis:["bottom","top"],yAxis:["left","right"]},zwe={width:"100%",height:"100%"},FF={x:0,y:0};function jp(e){return e}var Vwe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},Wwe=function(t,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var s=i.coordinate,l=a.radius;return pe(pe(pe({},a),Ot(a.cx,a.cy,l,s)),{},{angle:s,radius:l})}var c=i.coordinate,u=a.angle;return pe(pe(pe({},a),Ot(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return FF},Cy=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,s=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(lu(l),lu(u)):l},[]);return s.length>0?s:t&&t.length&&Ne(a)&&Ne(i)?t.slice(a,i+1):[]};function LF(e){return e==="number"?[0,"auto"]:void 0}var d1=function(t,r,n,a){var i=t.graphicalItems,s=t.tooltipAxis,l=Cy(r,t);return n<0||!i||!i.length||n>=l.length?null:i.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var m=d===void 0?l:d;h=km(m,s.dataKey,a)}else h=d&&d[n]||l[n];return h?[].concat(lu(c),[b3(u,h)]):c},[])},m_=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},s=Vwe(i,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=Ife(s,l,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=d1(t,r,f,d),m=Wwe(n,l,f,i);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},Uwe=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,m=p3(f,i);return n.reduce(function(p,g){var v,y=g.type.defaultProps!==void 0?pe(pe({},g.type.defaultProps),g.props):g.props,x=y.type,b=y.dataKey,S=y.allowDataOverflow,j=y.allowDuplicatedCategory,C=y.scale,N=y.ticks,P=y.includeHidden,A=y[s];if(p[A])return p;var O=Cy(t.data,{graphicalItems:a.filter(function(z){var U,ee=s in z.props?z.props[s]:(U=z.type.defaultProps)===null||U===void 0?void 0:U[s];return ee===A}),dataStartIndex:c,dataEndIndex:u}),M=O.length,k,E,$;gwe(y.domain,S,x)&&(k=Cw(y.domain,null,S),m&&(x==="number"||C!=="auto")&&($=Dd(O,b,"category")));var T=LF(x);if(!k||k.length===0){var R,B=(R=y.domain)!==null&&R!==void 0?R:T;if(b){if(k=Dd(O,b,x),x==="category"&&m){var F=PZ(k);j&&F?(E=k,k=gg(0,M)):j||(k=RO(B,k,g).reduce(function(z,U){return z.indexOf(U)>=0?z:[].concat(lu(z),[U])},[]))}else if(x==="category")j?k=k.filter(function(z){return z!==""&&!st(z)}):k=RO(B,k,g).reduce(function(z,U){return z.indexOf(U)>=0||U===""||st(U)?z:[].concat(lu(z),[U])},[]);else if(x==="number"){var D=zfe(O,a.filter(function(z){var U,ee,Y=s in z.props?z.props[s]:(U=z.type.defaultProps)===null||U===void 0?void 0:U[s],W="hide"in z.props?z.props.hide:(ee=z.type.defaultProps)===null||ee===void 0?void 0:ee.hide;return Y===A&&(P||!W)}),b,i,f);D&&(k=D)}m&&(x==="number"||C!=="auto")&&($=Dd(O,b,"category"))}else m?k=gg(0,M):l&&l[A]&&l[A].hasStack&&x==="number"?k=h==="expand"?[0,1]:x3(l[A].stackGroups,c,u):k=h3(O,a.filter(function(z){var U=s in z.props?z.props[s]:z.type.defaultProps[s],ee="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return U===A&&(P||!ee)}),x,f,!0);if(x==="number")k=l1(d,k,A,i,N),B&&(k=Cw(B,k,S));else if(x==="category"&&B){var G=B,K=k.every(function(z){return G.indexOf(z)>=0});K&&(k=G)}}return pe(pe({},p),{},Xe({},A,pe(pe({},y),{},{axisType:i,domain:k,categoricalDomain:$,duplicateDomain:E,originalDomain:(v=y.domain)!==null&&v!==void 0?v:T,isCategorical:m,layout:f})))},{})},Gwe=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=Cy(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),m=h.length,p=p3(f,i),g=-1;return n.reduce(function(v,y){var x=y.type.defaultProps!==void 0?pe(pe({},y.type.defaultProps),y.props):y.props,b=x[s],S=LF("number");if(!v[b]){g++;var j;return p?j=gg(0,m):l&&l[b]&&l[b].hasStack?(j=x3(l[b].stackGroups,c,u),j=l1(d,j,b,i)):(j=Cw(S,h3(h,n.filter(function(C){var N,P,A=s in C.props?C.props[s]:(N=C.type.defaultProps)===null||N===void 0?void 0:N[s],O="hide"in C.props?C.props.hide:(P=C.type.defaultProps)===null||P===void 0?void 0:P.hide;return A===b&&!O}),"number",f),a.defaultProps.allowDataOverflow),j=l1(d,j,b,i)),pe(pe({},v),{},Xe({},b,pe(pe({axisType:i},a.defaultProps),{},{hide:!0,orientation:Xn(Bwe,"".concat(i,".").concat(g%2),null),domain:j,originalDomain:S,isCategorical:p,layout:f})))}return v},{})},Hwe=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,s=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.children,d="".concat(a,"Id"),h=Zn(f,i),m={};return h&&h.length?m=Uwe(t,{axes:h,graphicalItems:s,axisType:a,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(m=Gwe(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),m},qwe=function(t){var r=xo(t),n=Ri(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:IS(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ng(r,n)}},g_=function(t){var r=t.children,n=t.defaultShowTooltip,a=jn(r,Zc),i=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(s=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},Kwe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Di(r&&r.type);return n&&n.indexOf("Bar")>=0})},v_=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"}},Ywe=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=n.width,f=n.height,d=n.children,h=n.margin||{},m=jn(d,Zc),p=jn(d,oi),g=Object.keys(c).reduce(function(j,C){var N=c[C],P=N.orientation;return!N.mirror&&!N.hide?pe(pe({},j),{},Xe({},P,j[P]+N.width)):j},{left:h.left||0,right:h.right||0}),v=Object.keys(s).reduce(function(j,C){var N=s[C],P=N.orientation;return!N.mirror&&!N.hide?pe(pe({},j),{},Xe({},P,Xn(j,"".concat(P))+N.height)):j},{top:h.top||0,bottom:h.bottom||0}),y=pe(pe({},v),g),x=y.bottom;m&&(y.bottom+=m.props.height||Zc.defaultProps.height),p&&r&&(y=Lfe(y,a,n,r));var b=u-y.left-y.right,S=f-y.top-y.bottom;return pe(pe({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(S,0)})},Xwe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Ny=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(y,x){var b=x.graphicalItems,S=x.stackGroups,j=x.offset,C=x.updateId,N=x.dataStartIndex,P=x.dataEndIndex,A=y.barSize,O=y.layout,M=y.barGap,k=y.barCategoryGap,E=y.maxBarSize,$=v_(O),T=$.numericAxisName,R=$.cateAxisName,B=Kwe(b),F=[];return b.forEach(function(D,G){var K=Cy(y.data,{graphicalItems:[D],dataStartIndex:N,dataEndIndex:P}),z=D.type.defaultProps!==void 0?pe(pe({},D.type.defaultProps),D.props):D.props,U=z.dataKey,ee=z.maxBarSize,Y=z["".concat(T,"Id")],W=z["".concat(R,"Id")],H={},me=c.reduce(function(de,be){var ie=x["".concat(be.axisType,"Map")],Z=z["".concat(be.axisType,"Id")];ie&&ie[Z]||be.axisType==="zAxis"||ol();var fe=ie[Z];return pe(pe({},de),{},Xe(Xe({},be.axisType,fe),"".concat(be.axisType,"Ticks"),Ri(fe)))},H),q=me[R],ue=me["".concat(R,"Ticks")],I=S&&S[Y]&&S[Y].hasStack&&Xfe(D,S[Y].stackGroups),L=Di(D.type).indexOf("Bar")>=0,Q=ng(q,ue),le=[],V=B&&Dfe({barSize:A,stackGroups:S,totalSize:Xwe(me,R)});if(L){var oe,ae,ye=st(ee)?E:ee,X=(oe=(ae=ng(q,ue,!0))!==null&&ae!==void 0?ae:ye)!==null&&oe!==void 0?oe:0;le=Ffe({barGap:M,barCategoryGap:k,bandSize:X!==Q?X:Q,sizeList:V[W],maxBarSize:ye}),X!==Q&&(le=le.map(function(de){return pe(pe({},de),{},{position:pe(pe({},de.position),{},{offset:de.position.offset-X/2})})}))}var ge=D&&D.type&&D.type.getComposedData;ge&&F.push({props:pe(pe({},ge(pe(pe({},me),{},{displayedData:K,props:y,dataKey:U,item:D,bandSize:Q,barPosition:le,offset:j,stackedData:I,layout:O,dataStartIndex:N,dataEndIndex:P}))),{},Xe(Xe(Xe({key:D.key||"item-".concat(G)},T,me[T]),R,me[R]),"animationId",C)),childIndex:FZ(D,y.children),item:D})}),F},m=function(y,x){var b=y.props,S=y.dataStartIndex,j=y.dataEndIndex,C=y.updateId;if(!kA({props:b}))return null;var N=b.children,P=b.layout,A=b.stackOffset,O=b.data,M=b.reverseStackOrder,k=v_(P),E=k.numericAxisName,$=k.cateAxisName,T=Zn(N,n),R=Kfe(O,T,"".concat(E,"Id"),"".concat($,"Id"),A,M),B=c.reduce(function(z,U){var ee="".concat(U.axisType,"Map");return pe(pe({},z),{},Xe({},ee,Hwe(b,pe(pe({},U),{},{graphicalItems:T,stackGroups:U.axisType===E&&R,dataStartIndex:S,dataEndIndex:j}))))},{}),F=Ywe(pe(pe({},B),{},{props:b,graphicalItems:T}),x==null?void 0:x.legendBBox);Object.keys(B).forEach(function(z){B[z]=f(b,B[z],F,z.replace("Map",""),r)});var D=B["".concat($,"Map")],G=qwe(D),K=h(b,pe(pe({},B),{},{dataStartIndex:S,dataEndIndex:j,updateId:C,graphicalItems:T,stackGroups:R,offset:F}));return pe(pe({formattedGraphicalItems:K,graphicalItems:T,offset:F,stackGroups:R},G),B)},p=function(v){function y(x){var b,S,j;return Owe(this,y),j=Twe(this,y,[x]),Xe(j,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Xe(j,"accessibilityManager",new mwe),Xe(j,"handleLegendBBoxUpdate",function(C){if(C){var N=j.state,P=N.dataStartIndex,A=N.dataEndIndex,O=N.updateId;j.setState(pe({legendBBox:C},m({props:j.props,dataStartIndex:P,dataEndIndex:A,updateId:O},pe(pe({},j.state),{},{legendBBox:C}))))}}),Xe(j,"handleReceiveSyncEvent",function(C,N,P){if(j.props.syncId===C){if(P===j.eventEmitterSymbol&&typeof j.props.syncMethod!="function")return;j.applySyncEvent(N)}}),Xe(j,"handleBrushChange",function(C){var N=C.startIndex,P=C.endIndex;if(N!==j.state.dataStartIndex||P!==j.state.dataEndIndex){var A=j.state.updateId;j.setState(function(){return pe({dataStartIndex:N,dataEndIndex:P},m({props:j.props,dataStartIndex:N,dataEndIndex:P,updateId:A},j.state))}),j.triggerSyncEvent({dataStartIndex:N,dataEndIndex:P})}}),Xe(j,"handleMouseEnter",function(C){var N=j.getMouseInfo(C);if(N){var P=pe(pe({},N),{},{isTooltipActive:!0});j.setState(P),j.triggerSyncEvent(P);var A=j.props.onMouseEnter;Je(A)&&A(P,C)}}),Xe(j,"triggeredAfterMouseMove",function(C){var N=j.getMouseInfo(C),P=N?pe(pe({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};j.setState(P),j.triggerSyncEvent(P);var A=j.props.onMouseMove;Je(A)&&A(P,C)}),Xe(j,"handleItemMouseEnter",function(C){j.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Xe(j,"handleItemMouseLeave",function(){j.setState(function(){return{isTooltipActive:!1}})}),Xe(j,"handleMouseMove",function(C){C.persist(),j.throttleTriggeredAfterMouseMove(C)}),Xe(j,"handleMouseLeave",function(C){j.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};j.setState(N),j.triggerSyncEvent(N);var P=j.props.onMouseLeave;Je(P)&&P(N,C)}),Xe(j,"handleOuterEvent",function(C){var N=DZ(C),P=Xn(j.props,"".concat(N));if(N&&Je(P)){var A,O;/.*touch.*/i.test(N)?O=j.getMouseInfo(C.changedTouches[0]):O=j.getMouseInfo(C),P((A=O)!==null&&A!==void 0?A:{},C)}}),Xe(j,"handleClick",function(C){var N=j.getMouseInfo(C);if(N){var P=pe(pe({},N),{},{isTooltipActive:!0});j.setState(P),j.triggerSyncEvent(P);var A=j.props.onClick;Je(A)&&A(P,C)}}),Xe(j,"handleMouseDown",function(C){var N=j.props.onMouseDown;if(Je(N)){var P=j.getMouseInfo(C);N(P,C)}}),Xe(j,"handleMouseUp",function(C){var N=j.props.onMouseUp;if(Je(N)){var P=j.getMouseInfo(C);N(P,C)}}),Xe(j,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&j.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Xe(j,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&j.handleMouseDown(C.changedTouches[0])}),Xe(j,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&j.handleMouseUp(C.changedTouches[0])}),Xe(j,"handleDoubleClick",function(C){var N=j.props.onDoubleClick;if(Je(N)){var P=j.getMouseInfo(C);N(P,C)}}),Xe(j,"handleContextMenu",function(C){var N=j.props.onContextMenu;if(Je(N)){var P=j.getMouseInfo(C);N(P,C)}}),Xe(j,"triggerSyncEvent",function(C){j.props.syncId!==void 0&&e0.emit(t0,j.props.syncId,C,j.eventEmitterSymbol)}),Xe(j,"applySyncEvent",function(C){var N=j.props,P=N.layout,A=N.syncMethod,O=j.state.updateId,M=C.dataStartIndex,k=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)j.setState(pe({dataStartIndex:M,dataEndIndex:k},m({props:j.props,dataStartIndex:M,dataEndIndex:k,updateId:O},j.state)));else if(C.activeTooltipIndex!==void 0){var E=C.chartX,$=C.chartY,T=C.activeTooltipIndex,R=j.state,B=R.offset,F=R.tooltipTicks;if(!B)return;if(typeof A=="function")T=A(F,C);else if(A==="value"){T=-1;for(var D=0;D<F.length;D++)if(F[D].value===C.activeLabel){T=D;break}}var G=pe(pe({},B),{},{x:B.left,y:B.top}),K=Math.min(E,G.x+G.width),z=Math.min($,G.y+G.height),U=F[T]&&F[T].value,ee=d1(j.state,j.props.data,T),Y=F[T]?{x:P==="horizontal"?F[T].coordinate:K,y:P==="horizontal"?z:F[T].coordinate}:FF;j.setState(pe(pe({},C),{},{activeLabel:U,activeCoordinate:Y,activePayload:ee,activeTooltipIndex:T}))}else j.setState(C)}),Xe(j,"renderCursor",function(C){var N,P=j.state,A=P.isTooltipActive,O=P.activeCoordinate,M=P.activePayload,k=P.offset,E=P.activeTooltipIndex,$=P.tooltipAxisBandSize,T=j.getTooltipEventType(),R=(N=C.props.active)!==null&&N!==void 0?N:A,B=j.props.layout,F=C.key||"_recharts-cursor";return _.createElement(jwe,{key:F,activeCoordinate:O,activePayload:M,activeTooltipIndex:E,chartName:r,element:C,isActive:R,layout:B,offset:k,tooltipAxisBandSize:$,tooltipEventType:T})}),Xe(j,"renderPolarAxis",function(C,N,P){var A=Xn(C,"type.axisType"),O=Xn(j.state,"".concat(A,"Map")),M=C.type.defaultProps,k=M!==void 0?pe(pe({},M),C.props):C.props,E=O&&O[k["".concat(A,"Id")]];return w.cloneElement(C,pe(pe({},E),{},{className:at(A,E.className),key:C.key||"".concat(N,"-").concat(P),ticks:Ri(E,!0)}))}),Xe(j,"renderPolarGrid",function(C){var N=C.props,P=N.radialLines,A=N.polarAngles,O=N.polarRadius,M=j.state,k=M.radiusAxisMap,E=M.angleAxisMap,$=xo(k),T=xo(E),R=T.cx,B=T.cy,F=T.innerRadius,D=T.outerRadius;return w.cloneElement(C,{polarAngles:Array.isArray(A)?A:Ri(T,!0).map(function(G){return G.coordinate}),polarRadius:Array.isArray(O)?O:Ri($,!0).map(function(G){return G.coordinate}),cx:R,cy:B,innerRadius:F,outerRadius:D,key:C.key||"polar-grid",radialLines:P})}),Xe(j,"renderLegend",function(){var C=j.state.formattedGraphicalItems,N=j.props,P=N.children,A=N.width,O=N.height,M=j.props.margin||{},k=A-(M.left||0)-(M.right||0),E=d3({children:P,formattedGraphicalItems:C,legendWidth:k,legendContent:u});if(!E)return null;var $=E.item,T=h_(E,Swe);return w.cloneElement($,pe(pe({},T),{},{chartWidth:A,chartHeight:O,margin:M,onBBoxUpdate:j.handleLegendBBoxUpdate}))}),Xe(j,"renderTooltip",function(){var C,N=j.props,P=N.children,A=N.accessibilityLayer,O=jn(P,Vr);if(!O)return null;var M=j.state,k=M.isTooltipActive,E=M.activeCoordinate,$=M.activePayload,T=M.activeLabel,R=M.offset,B=(C=O.props.active)!==null&&C!==void 0?C:k;return w.cloneElement(O,{viewBox:pe(pe({},R),{},{x:R.left,y:R.top}),active:B,label:T,payload:B?$:[],coordinate:E,accessibilityLayer:A})}),Xe(j,"renderBrush",function(C){var N=j.props,P=N.margin,A=N.data,O=j.state,M=O.offset,k=O.dataStartIndex,E=O.dataEndIndex,$=O.updateId;return w.cloneElement(C,{key:C.key||"_recharts-brush",onChange:vp(j.handleBrushChange,C.props.onChange),data:A,x:Ne(C.props.x)?C.props.x:M.left,y:Ne(C.props.y)?C.props.y:M.top+M.height+M.brushBottom-(P.bottom||0),width:Ne(C.props.width)?C.props.width:M.width,startIndex:k,endIndex:E,updateId:"brush-".concat($)})}),Xe(j,"renderReferenceElement",function(C,N,P){if(!C)return null;var A=j,O=A.clipPathId,M=j.state,k=M.xAxisMap,E=M.yAxisMap,$=M.offset,T=C.type.defaultProps||{},R=C.props,B=R.xAxisId,F=B===void 0?T.xAxisId:B,D=R.yAxisId,G=D===void 0?T.yAxisId:D;return w.cloneElement(C,{key:C.key||"".concat(N,"-").concat(P),xAxis:k[F],yAxis:E[G],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:O})}),Xe(j,"renderActivePoints",function(C){var N=C.item,P=C.activePoint,A=C.basePoint,O=C.childIndex,M=C.isRange,k=[],E=N.props.key,$=N.item.type.defaultProps!==void 0?pe(pe({},N.item.type.defaultProps),N.item.props):N.item.props,T=$.activeDot,R=$.dataKey,B=pe(pe({index:O,dataKey:R,cx:P.x,cy:P.y,r:4,fill:lC(N.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},He(T,!1)),Om(T));return k.push(y.renderActiveDot(T,B,"".concat(E,"-activePoint-").concat(O))),A?k.push(y.renderActiveDot(T,pe(pe({},B),{},{cx:A.x,cy:A.y}),"".concat(E,"-basePoint-").concat(O))):M&&k.push(null),k}),Xe(j,"renderGraphicChild",function(C,N,P){var A=j.filterFormatItem(C,N,P);if(!A)return null;var O=j.getTooltipEventType(),M=j.state,k=M.isTooltipActive,E=M.tooltipAxis,$=M.activeTooltipIndex,T=M.activeLabel,R=j.props.children,B=jn(R,Vr),F=A.props,D=F.points,G=F.isRange,K=F.baseLine,z=A.item.type.defaultProps!==void 0?pe(pe({},A.item.type.defaultProps),A.item.props):A.item.props,U=z.activeDot,ee=z.hide,Y=z.activeBar,W=z.activeShape,H=!!(!ee&&k&&B&&(U||Y||W)),me={};O!=="axis"&&B&&B.props.trigger==="click"?me={onClick:vp(j.handleItemMouseEnter,C.props.onClick)}:O!=="axis"&&(me={onMouseLeave:vp(j.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:vp(j.handleItemMouseEnter,C.props.onMouseEnter)});var q=w.cloneElement(C,pe(pe({},A.props),me));function ue(be){return typeof E.dataKey=="function"?E.dataKey(be.payload):null}if(H)if($>=0){var I,L;if(E.dataKey&&!E.allowDuplicatedCategory){var Q=typeof E.dataKey=="function"?ue:"payload.".concat(E.dataKey.toString());I=km(D,Q,T),L=G&&K&&km(K,Q,T)}else I=D==null?void 0:D[$],L=G&&K&&K[$];if(W||Y){var le=C.props.activeIndex!==void 0?C.props.activeIndex:$;return[w.cloneElement(C,pe(pe(pe({},A.props),me),{},{activeIndex:le})),null,null]}if(!st(I))return[q].concat(lu(j.renderActivePoints({item:A,activePoint:I,basePoint:L,childIndex:$,isRange:G})))}else{var V,oe=(V=j.getItemByXY(j.state.activeCoordinate))!==null&&V!==void 0?V:{graphicalItem:q},ae=oe.graphicalItem,ye=ae.item,X=ye===void 0?C:ye,ge=ae.childIndex,de=pe(pe(pe({},A.props),me),{},{activeIndex:ge});return[w.cloneElement(X,de),null,null]}return G?[q,null,null]:[q,null]}),Xe(j,"renderCustomized",function(C,N,P){return w.cloneElement(C,pe(pe({key:"recharts-customized-".concat(P)},j.props),j.state))}),Xe(j,"renderMap",{CartesianGrid:{handler:jp,once:!0},ReferenceArea:{handler:j.renderReferenceElement},ReferenceLine:{handler:jp},ReferenceDot:{handler:j.renderReferenceElement},XAxis:{handler:jp},YAxis:{handler:jp},Brush:{handler:j.renderBrush,once:!0},Bar:{handler:j.renderGraphicChild},Line:{handler:j.renderGraphicChild},Area:{handler:j.renderGraphicChild},Radar:{handler:j.renderGraphicChild},RadialBar:{handler:j.renderGraphicChild},Scatter:{handler:j.renderGraphicChild},Pie:{handler:j.renderGraphicChild},Funnel:{handler:j.renderGraphicChild},Tooltip:{handler:j.renderCursor,once:!0},PolarGrid:{handler:j.renderPolarGrid,once:!0},PolarAngleAxis:{handler:j.renderPolarAxis},PolarRadiusAxis:{handler:j.renderPolarAxis},Customized:{handler:j.renderCustomized}}),j.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:Iu("recharts"),"-clip"),j.throttleTriggeredAfterMouseMove=u5(j.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),j.state={},j}return $we(y,v),_we(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,j=b.data,C=b.height,N=b.layout,P=jn(S,Vr);if(P){var A=P.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,M=d1(this.state,j,A,O),k=this.state.tooltipTicks[A].coordinate,E=(this.state.offset.top+C)/2,$=N==="horizontal",T=$?{x:k,y:E}:{y:k,x:E},R=this.state.formattedGraphicalItems.find(function(F){var D=F.item;return D.type.name==="Scatter"});R&&(T=pe(pe({},T),R.props.points[A].tooltipPosition),M=R.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:O,activePayload:M,activeCoordinate:T};this.setState(B),this.renderCursor(P),this.accessibilityManager.setIndex(A)}}}},{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,C;this.accessibilityManager.setDetails({offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(b){Lb([jn(b.children,Vr)],[jn(this.props.children,Vr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=jn(this.props.children,Vr);if(b&&typeof b.props.shared=="boolean"){var S=b.props.shared?"axis":"item";return l.indexOf(S)>=0?S:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var S=this.container,j=S.getBoundingClientRect(),C=ule(j),N={chartX:Math.round(b.pageX-C.left),chartY:Math.round(b.pageY-C.top)},P=j.width/S.offsetWidth||1,A=this.inRange(N.chartX,N.chartY,P);if(!A)return null;var O=this.state,M=O.xAxisMap,k=O.yAxisMap,E=this.getTooltipEventType(),$=m_(this.state,this.props.data,this.props.layout,A);if(E!=="axis"&&M&&k){var T=xo(M).scale,R=xo(k).scale,B=T&&T.invert?T.invert(N.chartX):null,F=R&&R.invert?R.invert(N.chartY):null;return pe(pe({},N),{},{xValue:B,yValue:F},$)}return $?pe(pe({},N),$):null}},{key:"inRange",value:function(b,S){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,N=b/j,P=S/j;if(C==="horizontal"||C==="vertical"){var A=this.state.offset,O=N>=A.left&&N<=A.left+A.width&&P>=A.top&&P<=A.top+A.height;return O?{x:N,y:P}:null}var M=this.state,k=M.angleAxisMap,E=M.radiusAxisMap;if(k&&E){var $=xo(k);return DO({x:N,y:P},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,S=this.getTooltipEventType(),j=jn(b,Vr),C={};j&&S==="axis"&&(j.props.trigger==="click"?C={onClick:this.handleClick}:C={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=Om(this.props,this.handleOuterEvent);return pe(pe({},N),C)}},{key:"addListener",value:function(){e0.on(t0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){e0.removeListener(t0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,S,j){for(var C=this.state.formattedGraphicalItems,N=0,P=C.length;N<P;N++){var A=C[N];if(A.item===b||A.props.key===b.key||S===Di(A.item.type)&&j===A.childIndex)return A}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,S=this.state.offset,j=S.left,C=S.top,N=S.height,P=S.width;return _.createElement("defs",null,_.createElement("clipPath",{id:b},_.createElement("rect",{x:j,y:C,height:N,width:P})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(S,j){var C=f_(j,2),N=C[0],P=C[1];return pe(pe({},S),{},Xe({},N,P.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(S,j){var C=f_(j,2),N=C[0],P=C[1];return pe(pe({},S),{},Xe({},N,P.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,j=S.formattedGraphicalItems,C=S.activeItem;if(j&&j.length)for(var N=0,P=j.length;N<P;N++){var A=j[N],O=A.props,M=A.item,k=M.type.defaultProps!==void 0?pe(pe({},M.type.defaultProps),M.props):M.props,E=Di(M.type);if(E==="Bar"){var $=(O.data||[]).find(function(F){return Hme(b,F)});if($)return{graphicalItem:A,payload:$}}else if(E==="RadialBar"){var T=(O.data||[]).find(function(F){return DO(b,F)});if(T)return{graphicalItem:A,payload:T}}else if(vy(A,C)||yy(A,C)||Gf(A,C)){var R=Gve({graphicalItem:A,activeTooltipItem:C,itemData:k.data}),B=k.activeIndex===void 0?R:k.activeIndex;return{graphicalItem:pe(pe({},A),{},{childIndex:B}),payload:Gf(A,C)?k.data[R]:A.props.data[R]}}}return null}},{key:"render",value:function(){var b=this;if(!kA(this))return null;var S=this.props,j=S.children,C=S.className,N=S.width,P=S.height,A=S.style,O=S.compact,M=S.title,k=S.desc,E=h_(S,Cwe),$=He(E,!1);if(O)return _.createElement(HE,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_.createElement(zb,Zl({},$,{width:N,height:P,title:M,desc:k}),this.renderClipPath(),EA(j,this.renderMap)));if(this.props.accessibilityLayer){var T,R;$.tabIndex=(T=this.props.tabIndex)!==null&&T!==void 0?T:0,$.role=(R=this.props.role)!==null&&R!==void 0?R:"application",$.onKeyDown=function(F){b.accessibilityManager.keyboardEvent(F)},$.onFocus=function(){b.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return _.createElement(HE,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_.createElement("div",Zl({className:at("recharts-wrapper",C),style:pe({position:"relative",curs
473or:"default",width:N,height:P},A)},B,{ref:function(D){b.container=D}}),_.createElement(zb,Zl({},$,{width:N,height:P,title:M,desc:k,style:zwe}),this.renderClipPath(),EA(j,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);Xe(p,"displayName",r),Xe(p,"defaultProps",pe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Xe(p,"getDerivedStateFromProps",function(v,y){var x=v.dataKey,b=v.data,S=v.children,j=v.width,C=v.height,N=v.layout,P=v.stackOffset,A=v.margin,O=y.dataStartIndex,M=y.dataEndIndex;if(y.updateId===void 0){var k=g_(v);return pe(pe(pe({},k),{},{updateId:0},m(pe(pe({props:v},k),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:b,prevWidth:j,prevHeight:C,prevLayout:N,prevStackOffset:P,prevMargin:A,prevChildren:S})}if(x!==y.prevDataKey||b!==y.prevData||j!==y.prevWidth||C!==y.prevHeight||N!==y.prevLayout||P!==y.prevStackOffset||!cc(A,y.prevMargin)){var E=g_(v),$={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},T=pe(pe({},m_(y,b,N)),{},{updateId:y.updateId+1}),R=pe(pe(pe({},E),$),T);return pe(pe(pe({},R),m(pe({props:v},R),y)),{},{prevDataKey:x,prevData:b,prevWidth:j,prevHeight:C,prevLayout:N,prevStackOffset:P,prevMargin:A,prevChildren:S})}if(!Lb(S,y.prevChildren)){var B,F,D,G,K=jn(S,Zc),z=K&&(B=(F=K.props)===null||F===void 0?void 0:F.startIndex)!==null&&B!==void 0?B:O,U=K&&(D=(G=K.props)===null||G===void 0?void 0:G.endIndex)!==null&&D!==void 0?D:M,ee=z!==O||U!==M,Y=!st(b),W=Y&&!ee?y.updateId:y.updateId+1;return pe(pe({updateId:W},m(pe(pe({props:v},y),{},{updateId:W,dataStartIndex:z,dataEndIndex:U}),y)),{},{prevChildren:S,dataStartIndex:z,dataEndIndex:U})}return null}),Xe(p,"renderActiveDot",function(v,y,x){var b;return w.isValidElement(v)?b=w.cloneElement(v,y):Je(v)?b=v(y):b=_.createElement(Wu,y),_.createElement(mt,{className:"recharts-active-dot",key:x},b)});var g=w.forwardRef(function(y,x){return _.createElement(p,Zl({},y,{ref:x}))});return g.displayName=p.displayName,g},BF=Ny({chartName:"LineChart",GraphicalChild:Gu,axisComponents:[{axisType:"xAxis",AxisComp:ra},{axisType:"yAxis",AxisComp:na}],formatAxisMap:uC}),Py=Ny({chartName:"BarChart",GraphicalChild:Ba,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ra},{axisType:"yAxis",AxisComp:na}],formatAxisMap:uC}),Zwe=Ny({chartName:"RadarChart",GraphicalChild:_h,axisComponents:[{axisType:"angleAxis",AxisComp:Eh},{axisType:"radiusAxis",AxisComp:Oh}],formatAxisMap:she,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Qwe=Ny({chartName:"AreaChart",GraphicalChild:Cn,axisComponents:[{axisType:"xAxis",AxisComp:ra},{axisType:"yAxis",AxisComp:na}],formatAxisMap:uC});const Jwe=({valuations:e,currency:t,investmentAmount:r,preMoneyValuation:n,state:a,onStateChange:i})=>{const s=N=>{i({...a,...N})},{assetWeight:l,preRevenueWeight:c,marketWeight:u,dcfWeight:f}=a,d=Pe(l)+Pe(c)+Pe(u)+Pe(f),h=d===100,m=Pe(e.assetBased),p=Pe(e.preRevenue),g=Pe(e.marketBased),v=Pe(e.dcf),y=h?(m*Pe(l)+p*Pe(c)+g*Pe(u)+v*Pe(f))/100:0,x=Pe(n)+Pe(r),b=w.useMemo(()=>{const N=[];return h||N.push(`Weights sum to ${d}% — must equal 100%.`),["assetBased","preRevenue","marketBased","dcf"].forEach(P=>{const A=e[P];typeof A!="number"||!Number.isFinite(A)?N.push(`${P} valuation is missing or non-finite — check that tab's inputs.`):A<=0&&N.push(`${P} valuation is 0 or negative — check that tab's inputs.`)}),N},[h,d,e]),S=[{name:"Asset-Based",value:e.assetBased,fill:"hsl(var(--primary))"},{name:"Pricing-Based",value:e.preRevenue,fill:"hsl(var(--secondary))"},{name:"Market-Based",value:e.marketBased,fill:"hsl(142, 76%, 36%)"},{name:"Intrinsic Based",value:e.dcf,fill:"hsl(38, 92%, 50%)"},{name:"Weighted Average",value:h?y:0,fill:"hsl(217, 91%, 60%)"},{name:"Post-Money",value:x,fill:"hsl(280, 70%, 50%)"}],j=({active:N,payload:P})=>N&&P&&P.length?o.jsxs("div",{className:"bg-background border border-border p-3 rounded-lg shadow-lg",children:[o.jsx("p",{className:"font-semibold",children:P[0].payload.name}),o.jsx("p",{className:"text-primary font-bold",children:ne(P[0].value,t)})]}):null,C=(N,P)=>{s({[N]:P})};return o.jsx(nn,{children:o.jsxs("div",{className:"space-y-6",children:[b.length>0&&o.jsxs(ml,{variant:"destructive",children:[o.jsx(wu,{className:"h-4 w-4"}),o.jsx(gl,{children:"Summary inputs need attention"}),o.jsx(vl,{children:o.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm mt-2",children:b.map((N,P)=>o.jsx("li",{children:N},P))})})]}),o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ht,{children:"Valuation Methods Comparison"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-5 w-5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-2xl",children:o.jsxs("div",{className:"space-y-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Asset-Based Valuation"}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Pros:"})," Tangible, easy to understand, good for asset-heavy businesses"]}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Cons:"})," Ignores future potential, undervalues IP and intangibles, backward-looking"]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Pricing-Based Valuation (Pre-Revenue)"}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Pros:"})," Suitable for very early-stage, considers qualitative factors, quick asse
473ssment"]}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Cons:"})," Highly subjective, no market validation, wide valuation ranges"]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Market-Based Valuation (VC Method)"}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Pros:"})," Aligns with investor thinking, accounts for dilution, market-validated multiples"]}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Cons:"})," Requires comparable data, sensitive to exit assumptions, may not reflect intrinsic value"]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Intrinsic Based Valuation (DCF)"}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Pros:"})," Most theoretically sound, reflects fundamentals, comprehensive analysis"]}),o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Cons:"})," Highly sensitive to assumptions, complex, requires detailed projections"]})]})]})})]})]}),o.jsx(Dt,{children:"Visual comparison of all valuation methods, average, and post-money valuation"})]}),o.jsxs(pt,{children:[o.jsx(Ko,{width:"100%",height:400,children:o.jsxs(Py,{data:S,margin:{top:20,right:30,left:20,bottom:80},children:[o.jsx(Yo,{strokeDasharray:"3 3",opacity:.3}),o.jsx(ra,{dataKey:"name",angle:-45,textAnchor:"end",height:100,tick:{fontSize:12}}),o.jsx(na,{tickFormatter:N=>N>=1e6?`${(N/1e6).toFixed(1)}M`:N>=1e3?`${(N/1e3).toFixed(0)}K`:N.toString(),tick:{fontSize:12}}),o.jsx(Vr,{content:o.jsx(j,{})}),o.jsx(Ba,{dataKey:"value",radius:[8,8,0,0],children:S.map((N,P)=>o.jsx(ay,{fill:N.fill},`cell-${P}`))})]})}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mt-6",children:S.map((N,P)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded",style:{backgroundColor:N.fill}}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:N.name}),o.jsx("p",{className:"text-sm font-semibold",children:ne(N.value,t)})]})]},P))})]})]}),o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsx(ht,{className:"text-center",children:"Weighted Average Valuation"}),o.jsx(Dt,{className:"text-center",children:"Combine multiple valuation methods with custom weights"})]}),o.jsxs(pt,{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary text-center",children:"Individual Valuations"}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[o.jsx("p",{className:"text-muted-foreground text-center text-xl",children:"Asset-Based Valuation"}),o.jsx("p",{className:"text-2xl font-bold text-primary text-center",children:ne(e.assetBased,t)})]}),o.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[o.jsx("p",{className:"text-muted-foreground text-center text-xl",children:"Pricing-Based Valuation"}),o.jsx("p",{className:"text-2xl font-bold text-secondary text-center",children:ne(e.preRevenue,t)})]}),o.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[o.jsx("p",{className:"text-muted-foreground text-center text-xl",children:"Market-Based Valuation"}),o.jsx("p",{className:"text-2xl font-bold text-success text-center",children:ne(e.marketBased,t)})]}),o.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[o.jsx("p",{className:"text-muted-foreground text-center text-xl",children:"Intrinsic Based Valuation"}),o.jsx("p",{className:"text-2xl font-bold text-warning text-center",children:ne(e.dcf,t)})]})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-primary",children:"Valuation Weights"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-2xl",children:o.jsxs("div",{className:"space-y-4 text-sm",children:[o.jsx("p",{className:"font-semibold text-base mb-2",children:"Suggested Weightings by Company Stage"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Pre-Seed / Concept Stage (Pre-Revenue)"}),o.jsx("p",{className:"text-xs",children:"Asset-Based: 20% | Pricing-Based: 50% | Market-Based: 20% | DCF: 10%"}),o.jsx("p",{className:"text-xs italic mt-1",children:"Focus on qualitative factors and asset value; limited projections available"})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Seed Stage (Early Traction)"}),o.jsx("p",{className:"text-xs",children:"Asset-Based: 15% | Pricing-Based: 35% | Market-Based: 35% | DCF: 15%"}),o.jsx("p",{className:"text-xs italic mt-1",children:"Balance between qualitative assessment and market comparables; early financial projections"})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Series A (Revenue Growth)"}),o.jsx("p",{className:"text-xs",children:"Asset-Based: 10% | Pricing-Based: 20% | Market-Based: 40% | DCF: 30%"}),o.jsx("p",{className:"text-xs italic mt-1",children:"Market multiples become more relevant; financial projections gaining credibility"})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Series B+ (Scaling)"}),o.jsx("p",{className:"text-xs",children:"Asset-Based: 5% | Pricing-Based: 10% | Market-Based: 35% | DCF: 50%"}),o.jsx("p",{className:"text-xs italic mt-1",children:"Strong emphasis on intrinsic value from proven business model and reliable financials"})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold mb-1",children:"Mature / Profitable"}),o.jsx("p",{className:"text-xs",children:"Asset-Based: 10% | Pricing-Based: 5% | Market-Based: 30% | DCF: 55%"}),o.jsx("p",{className:"text-xs italic mt-1",children:"DCF dominates with predictable cash flows; market comparables validate assumptions"})]}),o.jsx("div",{className:"pt-2 border-t",children:o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Note:"}
473)," These are guidelines. Adjust based on your industry, available data quality, and specific circumstances."]})})]})})]})]}),o.jsxs("div",{className:`text-sm font-medium ${h?"text-success":"text-destructive"}`,children:["Total: ",d,"% ",h?"✓":"(must equal 100%)"]})]}),o.jsxs("div",{className:"grid gap-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx(qe,{children:"Asset-Based Weight"}),o.jsxs("span",{className:"text-sm font-medium",children:[l,"%"]})]}),o.jsx(ei,{value:[l],onValueChange:N=>C("assetWeight",N[0]),max:100,step:5})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx(qe,{children:"Pricing-Based Weight"}),o.jsxs("span",{className:"text-sm font-medium",children:[c,"%"]})]}),o.jsx(ei,{value:[c],onValueChange:N=>C("preRevenueWeight",N[0]),max:100,step:5})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx(qe,{children:"Market-Based Weight"}),o.jsxs("span",{className:"text-sm font-medium",children:[u,"%"]})]}),o.jsx(ei,{value:[u],onValueChange:N=>C("marketWeight",N[0]),max:100,step:5})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx(qe,{children:"Intrinsic Based Weight"}),o.jsxs("span",{className:"text-sm font-medium",children:[f,"%"]})]}),o.jsx(ei,{value:[f],onValueChange:N=>C("dcfWeight",N[0]),max:100,step:5})]})]})]}),o.jsx(Xt,{}),o.jsxs("div",{className:"bg-primary border-2 border-primary/20 shadow-xl p-8 rounded-lg space-y-4 animate-fade-in flex flex-col items-center",children:[o.jsx("h3",{className:"text-2xl font-bold text-primary-foreground text-center",children:"Final Weighted Average Valuation"}),h?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-6xl font-extrabold text-primary-foreground drop-shadow-lg text-center",children:ne(y,t)}),o.jsxs("div",{className:"bg-background border border-border shadow-md p-6 rounded-lg mt-6 w-full max-w-3xl",children:[o.jsx("p",{className:"text-base font-semibold text-foreground mb-3 text-center",children:"Calculation Breakdown:"}),o.jsxs("div",{className:"text-sm text-muted-foreground space-y-2 text-center",children:[o.jsxs("p",{className:"flex justify-center gap-2",children:[o.jsxs("span",{children:["Asset-Based: ",ne(e.assetBased,t)," × ",l,"%"]}),o.jsxs("span",{className:"font-semibold text-foreground",children:["= ",ne(e.assetBased*l/100,t)]})]}),o.jsxs("p",{className:"flex justify-center gap-2",children:[o.jsxs("span",{children:["Pricing-Based: ",ne(e.preRevenue,t)," × ",c,"%"]}),o.jsxs("span",{className:"font-semibold text-foreground",children:["= ",ne(e.preRevenue*c/100,t)]})]}),o.jsxs("p",{className:"flex justify-center gap-2",children:[o.jsxs("span",{children:["Market-Based: ",ne(e.marketBased,t)," × ",u,"%"]}),o.jsxs("span",{className:"font-semibold text-foreground",children:["= ",ne(e.marketBased*u/100,t)]})]}),o.jsxs("p",{className:"flex justify-center gap-2",children:[o.jsxs("span",{children:["Intrinsic Based: ",ne(e.dcf,t)," × ",f,"%"]}),o.jsxs("span",{className:"font-semibold text-foreground",children:["= ",ne(e.dcf*f/100,t)]})]})]})]})]}):o.jsx("p",{className:"text-xl text-primary-foreground/90 font-medium text-center",children:"Please adjust weights to total 100%"})]})]})]})]})})};var zF="Toggle",xC=w.forwardRef((e,t)=>
473{const{pressed:r,defaultPressed:n,onPressedChange:a,...i}=e,[s,l]=wr({prop:r,onChange:a,defaultProp:n??!1,caller:zF});return o.jsx($e.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:je(e.onClick,()=>{e.disabled||l(!s)})})});xC.displayName=zF;var VF=xC,us="ToggleGroup",[WF,gPe]=fr(us,[ns]),UF=ns(),bC=_.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const a=n;return o.jsx(e1e,{...a,ref:t})}if(r==="multiple"){const a=n;return o.jsx(t1e,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${us}\``)});bC.displayName=us;var[GF,HF]=WF(us),e1e=_.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[s,l]=wr({prop:r,defaultProp:n??"",onChange:a,caller:us});return o.jsx(GF,{scope:e.__scopeToggleGroup,type:"single",value:_.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:_.useCallback(()=>l(""),[l]),children:o.jsx(qF,{...i,ref:t})})}),t1e=_.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[s,l]=wr({prop:r,defaultProp:n??[],onChange:a,caller:us}),c=_.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=_.useCallback(f=>l((d=[])=>d.filter(h=>h!==f)),[l]);return o.jsx(GF,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:o.jsx(qF,{...i,ref:t})})});bC.displayName=us;var[r1e,n1e]=WF(us),qF=_.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...c}=e,u=UF(r),f=rs(s),d={role:"group",dir:f,...c};return o.jsx(r1e,{scope:r,rovingFocus:a,disabled:n,children:a?o.jsx(Cv,{asChild:!0,...u,orientation:i,dir:f,loop:l,children:o.jsx($e.div,{...d,ref:t})}):o.jsx($e.div,{...d,ref:t})})}),_g="ToggleGroupItem",KF=_.forwardRef((e,t)=>{const r=HF(_g,e.__scopeToggleGroup),n=n1e(_g,e.__scopeToggleGroup),a=UF(e.__scopeToggleGroup),i=r.value.includes(e.value),s=n.disabled||e.disabled,l={...e,pressed:i,disabled:s},c=_.useRef(null);return n.rovingFocus?o.jsx(Nv,{asChild:!0,...a,focusable:!s,active:i,ref:c,children:o.jsx(y_,{...l,ref:t})}):o.jsx(y_,{...l,ref:t})});KF.displayName=_g;var y_=_.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...a}=e,i=HF(_g,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return o.jsx(xC,{...l,...a,ref:t,onPressedChange:c=>{c?i.onItemActivate(n):i.onItemDeactivate(n)}})}),YF=bC,XF=KF;const ZF=bu("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),a1e=w.forwardRef(({className:e,variant:t,size:r,...n},a)=>o.jsx(VF,{ref:a,className:Oe(ZF({variant:t,size:r,className:e})),...n}));a1e.displayName=VF.displayName;const QF=w.createContext({size:"default",variant:"default"}),JF=w.forwardRef(({className:e,variant:t,size:r,children:n,...a},i)=>o.jsx(YF,{ref:i,className:Oe("flex items-center justify-center gap-1",e),...a,children:o.jsx(QF.Provider,{value:{variant:t,size:r},children:n})}));JF.displayName=YF.displayName;const Gp=w.forwardRef(({className:e,children:t,variant:r,size:n,...a},i)=>{const s=w.useContext(QF);return o.jsx(XF,{ref:i,className:Oe(ZF({variant:s.variant||r,size:s.size||n}),e),...a,children:t})});Gp.displayName=XF.displayName;const Aa=[{id:"saas",name:"SaaS / Cloud Software",category:"Technology",revenueMultiple:{low:4,median:8,high:15},ebitdaMultiple:{low:15,median:25,high:40},grossMargin:{low:65,median:75,high:85},sgaPercent:{low:20,median:35,high:50},rdPercent:{low:15,median:25,high:35},revenueGrowth:{low:15,median:30,high:60},wacc:{low:10,median:14,high:18},depreciationPercent:{low:2,median:4,high:7},amortizationPercent:{low:1,median:3,high:6},capexPercent:{low:2,median:4,high:7},workingCapitalPercent:{low:-5,median:-2,high:3}},{id:"biotech",name:"Biotech / Life Sciences",category:"Healthcare",revenueMultiple:{low:3,median:6,high:12},ebitdaMultiple:{low:10,median:18,high:30},grossMargin:{low:60,median:70,high:85},sgaPercent:{low:15,median:25,high:40},rdPercent:{low:25,median:40,high:60},revenueGrowth:{low:10,median:25,high:50},wacc:{low:12,median:16,high:22},depreciationPercent:{low:3,median:5,high:9},amortizationPercent:{low:1,median:3,high:6},capexPercent:{low:4,median:7,high:12},workingCapitalPercent:{low:5,median:12,high:20}},{id:"ecommerce",name:"E-Commerce / Online Retail",category:"Consumer",revenueMultiple:{low:1,median:2.5,high:5},ebitdaMultiple:{low:8,median:14,high:22},grossMargin:{low:25,median:40,high:55},sgaPercent:{low:15,median:25,high:35},rdPercent:{low:3,median:8,high:15},revenueGrowth:{low:10,median:20,high:40},wacc:{low:9,median:12,high:16},depreciationPercent:{low:1.5,median:3,high:5},amortizationPercent:{low:.5,median:1,high:3},capexPercent:{low:2,median:3.5,high:6},workingCapitalPercent:{low:-3,median:2,high:8}},{id:"fintech",name:"Fintech / Financial Services",category:"Financial",revenueMultiple:{low:3,median:7,high:14},ebitdaMultiple:{low:12,median:20,high:35},grossMargin:{low:50,median:65,high:80},sgaPercent:{low:20,median:30,high:45},rdPercent:{low:10,median:20,high:30},revenueGrowth:{low:15,median:30,high:55},wacc:{low:10,median:14,high:18},depreciationPercent:{low:1,median:2.5,high:5},amortizationPercent:{low:1,median:3,high:6},capexPercent:{low:1.5,median:3,high:6},workingCapitalPercent:{low:-2,median:2,high:6}},{id:"medtech",name:"MedTech / Medical Devices",category:"Healthcare",revenueMultiple:{low:2,median:5,high:10},ebitdaMultiple:{low:10,median:16,high:25}
473,grossMargin:{low:50,median:62,high:75},sgaPercent:{low:18,median:28,high:38},rdPercent:{low:10,median:18,high:28},revenueGrowth:{low:8,median:18,high:35},wacc:{low:10,median:13,high:17},depreciationPercent:{low:2.5,median:4,high:7},amortizationPercent:{low:1,median:2.5,high:5},capexPercent:{low:3,median:5,high:8},workingCapitalPercent:{low:10,median:18,high:28}},{id:"cleantech",name:"CleanTech / Renewable Energy",category:"Energy",revenueMultiple:{low:2,median:4,high:8},ebitdaMultiple:{low:8,median:14,high:22},grossMargin:{low:30,median:45,high:60},sgaPercent:{low:12,median:22,high:32},rdPercent:{low:8,median:15,high:25},revenueGrowth:{low:12,median:25,high:45},wacc:{low:9,median:12,high:16},depreciationPercent:{low:6,median:10,high:18},amortizationPercent:{low:1,median:2,high:5},capexPercent:{low:8,median:15,high:25},workingCapitalPercent:{low:5,median:10,high:18}},{id:"marketplace",name:"Marketplace / Platform",category:"Technology",revenueMultiple:{low:3,median:6,high:12},ebitdaMultiple:{low:15,median:22,high:35},grossMargin:{low:55,median:68,high:80},sgaPercent:{low:25,median:38,high:50},rdPercent:{low:10,median:18,high:28},revenueGrowth:{low:15,median:30,high:55},wacc:{low:10,median:14,high:18},depreciationPercent:{low:1.5,median:3,high:6},amortizationPercent:{low:1,median:2.5,high:5},capexPercent:{low:1.5,median:3,high:6},workingCapitalPercent:{low:-6,median:-3,high:2}},{id:"manufacturing",name:"Manufacturing / Industrial",category:"Industrial",revenueMultiple:{low:.5,median:1.5,high:3},ebitdaMultiple:{low:5,median:8,high:12},grossMargin:{low:20,median:35,high:48},sgaPercent:{low:10,median:18,high:28},rdPercent:{low:2,median:5,high:10},revenueGrowth:{low:3,median:8,high:15},wacc:{low:7,median:10,high:14},depreciationPercent:{low:3,median:5,high:8},amortizationPercent:{low:.5,median:1.5,high:3},capexPercent:{low:3,median:5,high:9},workingCapitalPercent:{low:10,median:18,high:28}},{id:"professional-services",name:"Professional Services / Consulting",category:"Services",revenueMultiple:{low:1,median:2,high:4},ebitdaMultiple:{low:6,median:10,high:16},grossMargin:{low:40,median:55,high:70},sgaPercent:{low:20,median:30,high:42},rdPercent:{low:1,median:3,high:8},revenueGrowth:{low:5,median:12,high:25},wacc:{low:8,median:11,high:15},depreciationPercent:{low:.5,median:1.5,high:3},amortizationPercent:{low:.5,median:1,high:2.5},capexPercent:{low:.5,median:1.5,high:3},workingCapitalPercent:{low:5,median:12,high:20}},{id:"food-beverage",name:"Food & Beverage",category:"Consumer",revenueMultiple:{low:1,median:2,high:4},ebitdaMultiple:{low:6,median:10,high:16},grossMargin:{low:30,median:42,high:55},sgaPercent:{low:15,median:25,high:35},rdPercent:{low:1,median:3,high:6},revenueGrowth:{low:5,median:12,high:25},wacc:{low:8,median:11,high:14},depreciationPercent:{low:2,median:4,high:6},amortizationPercent:{low:.5,median:1.5,high:3},capexPercent:{low:3,median:5,high:8},workingCapitalPercent:{low:5,median:10,high:18}}],In=({label:e,tooltip:t})=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{children:e}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:o.jsx("p",{children:t})})]})]}),i1e=({numYears:e,setNumYears:t,projections:r,setProjections:n,currency:a,historicData:i=[],displayFormat:s,onDisplayFormatChange:l})=>{const{toast:c}=cM(),u=k=>ne(k,a,s),f=(k,E=!1)=>{if(k==null)return 0;const $=String(k).trim().toLowerCase();if($===""||$==="-")return 0;const T=$.replace(/[^0-9.\-km]/g,""),R=/k$/.test(T),B=/m$/.test(T),F=T.replace(/[km]/g,"");let D=parseFloat(F);if(isNaN(D))return 0;E||(D=Math.abs(D));let G=1;return B?G=1e6:R?G=1e3:s==="millions"?G=1e6:s==="thousands"&&(G=1e3),Math.round(D*G)},[d,h]=w.useState({}),[m,p]=w.useState("saas"),g=i.length>0?(()=>{const k=i.reduce(($,T)=>{const R=T.revenue||1;return{grossMargin:$.grossMargin+(T.revenue-T.cogs)/R*100,sgaPercent:$.sgaPercent+T.sgaExpense/R*100,rdPercent:$.rdPercent+T.rdExpense/R*100,depreciationPercent:$.depreciationPercent+T.depreciation/R*100,amortizationPercent:$.amortizationPercent+T.amortization/R*100,interestExpensePercent:$.interestExpensePercent+T.interestExpense/R*100,taxRate:$.taxRate+T.taxExpense/Math.max(T.revenue-T.cogs-T.sgaExpense-T.rdExpense-T.depreciation-T.amortization-T.interestExpense,1)*100,capexPercent:$.capexPercent+T.netCapex/R*100,workingCapitalPercent:$.workingCapitalPercent+(T.currentAssets-T.currentLiabilities-T.cash)/R*100}},{grossMargin:0,sgaPercent:0,rdPercent:0,depreciationPercent:0,amortizationPercent:0,interestExpensePercent:0,taxRate:0,capexPercent:0,workingCapitalPercent:0}),E=i.length;return Object.fromEntries(Object.entries(k).map(([$,T])=>[$,T/E]))})():null,v=Aa.find(k=>k.id===m),y=(k,E)=>`${k}_${E}`,x=(k,E)=>{var $,T;return d[y(k,E)]||(($=r[E])==null?void 0:$[k])!=null&&((T=r[E])==null?void 0:T[k])!==void 0},b=(k,E,$)=>{const T=y(k,E);if(x(k,E)){const B=[...r];B[E]={...B[E],[k]:null},n(B),h(F=>({...F,[T]:!1}))}else{const B=[...r];B[E]={...B[E],[k]:Math.round($)},n(B),h(F=>({...F,[T]:!0}))}},S=k=>{const E=Math.max(3,Math.min(15,k));if(t(E),E>r.length){const $={revenue:0,grossMargin:0,sgaPercent:0,rdPercent:0,depreciationPercent:0,amortizationPercent:0,interestIncomePercent:0,interestExpensePercent:0,workingCapitalPercent:0,capexPercent:0,taxRate:0,dividendPercent:0},T=[...r];for(;T.length<E;)T.push({...$});n(T)}(k<3||k>15)&&c({title:"Invalid range",description:"Number of years must be between 3 and 15",variant:"destructive"})};w.useEffect(()=>{if(r.length<e){const k={revenue:0,grossMargin:0,sgaPercent:0,rdPercent:0,depreciationPercent:0,amortizationPercent:0,interestIncomePercent:0,interestExpensePercent:0,workingCapitalPercent:0,capexPercent:0,taxRate:0,dividendPercent:0},E=[...r];for(;E.length<e;)E.push({...k});n(E)}},[e,r,n]);const j=Math.min(e,r.length),C=(k,E,$)=>{const T=[...r];T[k]={...T[k],[E]:$},n(T)},N=k=>{const E=r[k],$=E.revenue*(E.grossMargin/100),T=E.grossProfitOverride!=null?E.grossProfitOverride:$,R=E.revenue*(E.sgaPercent/100),B=E.sgaOverride!=null?E.sgaOverride:R,F=E.revenue*(E.rdPercent/100),D=E.rdOverride!=null?E.rdOverride:F,G=T-B-D,K=E.ebitdaOverride!=null?E.ebitdaOverride:G,z=E.revenue*(E.depreciationPercent/100),U=E.depreciationOverride!=null?E.depreciationOverride:z,ee=E.revenue*(E.amortizationPercent/100),Y=E.amortizationOverride!=null?E.amortizationOverride:ee,W=K-U-Y,H=E.ebitOverride!=null?E.ebitOverride:W,me=E.revenue*(E.interestIncomePercent/100),q=E.interestIncomeOverride!=null?E.interestIncomeOverride:me,ue=E.revenue*(E.interestExpensePercent/100),I=E.interestExpenseOverride!=null?E.interestExpenseOverride:ue,L=H+q-I,Q=E.ebtOverride!=null?E.ebtOverride:L,le=E.revenue*(E.workingCapitalPercent/100),V=E.revenue*(E.capexPercent/100),oe=Q>0?Q*(E.taxRate/100):0,ae=E.taxesOverride!=null?E.taxesOverride:oe,ye=Q-ae,X=E.netIncomeOverride!=null?E.netIncomeOverride:ye,ge=X+U+Y-V-le,de=ge>0?ge*(E.dividendPercent/100):0;return{grossProfit:T,calculatedGrossProfit:$,grossMarginPercent:E.revenue?T/E.revenue*100:0,sga:B,calculatedSga:R,rd:D,calculatedRd:F,ebitda:K,calculatedEbitda:G,ebitdaMargin:E.revenue?K/E.revenue*100:0,depreciation:U,calculatedDepreciation:z,amortization:Y,calculatedAmortization:ee,ebit:H,calculatedEbit:W,interestIncome:q,calculatedInterestIncome:me,interestExpense:I,calculatedInterestExpense:ue,ebt:Q,calculatedEbt:L,workingCapital:le,capex:V,taxes:ae,calculatedTaxes:oe,netIncome:X,calculatedNetIncome:ye,netMarginPercent:E.revenue?X/E.revenue*100:0,dividend:de,fcf:ge,fcfMargin:E.revenue?ge/E.revenue*100:0}},P=k=>k<0?"text-destructive":"",A=(k,E,$,T,R,B=!1)=>o.jsxs("tr",{className:`border-b ${B?"bg-primary/5":"bg-secondary/5"}`,children:[o.jsx("td",{className:`p-3 ${B?"font-bold":"font-medium"}`,children:o.jsx(In,{label:k,tooltip:E})}),Array.from({length:j},(F,D)=>{const G=N(D),K=x($,D),z=R(G),U=T(G);return o.jsx("td",{className:"p-2",children:o.jsxs("div",{className:"flex items-center gap-1",children:[K?o.jsx(Qe,{type:"text",value:u(r[D][$]??0),onChange:ee=>C(D,$,f(ee.target.value,!0)),className:`w-full text-center ${B?"font-bold":"font-semibold"} border-accent`}):o.jsx("span",{className:`flex-1 text-center ${B?"font-bold":"font-semibold"} ${z<0?"text-destructive":B?"text-primary":""}`,children:u(z)}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx("button",{type:"button",onClick:()=>b($,D,U),className:`shrink-0 p-1 rounded hover:bg-muted transition-colors ${K?"text-accent-foreground":"text-muted-foreground"}`,children:K?o.jsx(WM,{className:"h-3.5 w-3.5"}):o.jsx(ql,{className:"h-3.5 w-3.5"})})}),o.jsx(Ee,{children:K?"Click to revert to calculated value":"Click to enter a manual value"})]})]})},D)})]}),O={grossMargin:{key:"grossMargin",unit:"%"},sgaPercent:{key:"sgaPercent",unit:"%"},rdPercent:{key:"rdPercent",unit:"%"}},M=(k,E,$,T)=>{const R=g?g[$]:void 0,B=O[$],F=v&&B?v[B.key]:void 0;return o.jsx(o.Fragment,{children:o.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[o.jsx("td",{className:"p-3 font-medium",children:o.jsxs("div",{children:[o.jsx(In,{label:k,tooltip:E}),(R!==void 0||F)&&o.jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[R!==void 0&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:[o.jsx(Tc,{className:"h-2.5 w-2.5"}),"Historic: ",R.toFixed(1),"%"]}),F&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:[o.jsx(_c,{className:"h-2.5 w-2.5"}),"Benchmark: ",F.low,"–",F.median,"–",F.high,"%"]})]})]})}),Array.from({length:j},(D,G)=>{const K=T?x(T,G):!1;return o.jsx("td",{className:"p-2",children:o.jsx(Gr,{type:"number",step:"0.1",value:r[G][$]||"",onChange:z=>C(G,$,Number(z.target.value)),className:`w-full text-center ${K?"o
473pacity-50":""}`,disabled:K,suffix:"%",rules:{}})},G)})]})})};return o.jsx(nn,{children:o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsx(ht,{children:"Financial Projections"}),o.jsx(Dt,{children:"Enter projected financials for 3-15 years to support DCF and market-based valuations"})]}),o.jsxs(pt,{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{htmlFor:"projectionYears",children:"Number of Projection Years (3-15)"}),o.jsx(Qe,{id:"projectionYears",type:"number",min:3,max:15,value:e,onChange:k=>S(Number(k.target.value)),className:"max-w-xs"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx(qe,{className:"text-xs text-muted-foreground",children:"Display"}),o.jsxs(JF,{type:"single",value:s,onValueChange:k=>{k&&l(k)},variant:"outline",size:"sm",children:[o.jsx(Gp,{value:"normal",className:"text-xs px-3",children:"Normal"}),o.jsx(Gp,{value:"thousands",className:"text-xs px-3",children:"000s"}),o.jsx(Gp,{value:"millions",className:"text-xs px-3",children:"Millions"})]})]})]}),o.jsxs("div",{className:"bg-muted/50 p-3 rounded-lg flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx(ql,{className:"h-4 w-4 shrink-0"}),o.jsxs("span",{children:["Click the ",o.jsx(ql,{className:"h-3 w-3 inline"})," icon next to any calculated metric to manually override its value."]})]}),o.jsx("p",{className:"text-xs text-muted-foreground md:hidden",children:"← Scroll horizontally to see all years →"}),o.jsx("div",{className:"overflow-x-auto -mx-2 px-2",children:o.jsxs("table",{className:"w-full border-collapse min-w-[600px] responsive-table",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b-2 border-primary/20",children:[o.jsx("th",{className:"text-left p-3 font-semibold bg-primary/5 sticky left-0 z-10 bg-card",children:"Metric"}),Array.from({length:j},(k,E)=>o.jsxs("th",{className:"text-center p-3 font-semibold bg-primary/5",children:["Year ",E+1]},E))]})}),o.jsxs("tbody",{children:[o.jsx("tr",{className:"bg-accent/10",children:o.jsx("td",{colSpan:j+1,className:"p-3 font-bold text-accent-foreground",children:"PROFIT & LOSS STATEMENT"})}),o.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[o.jsx("td",{className:"p-3 font-medium",children:o.jsx(In,{label:"Revenue",tooltip:"Year 1: enter manually. Subsequent years auto-calculate from the growth rate, or enter manually to override."})}),(()=>{const k=[];for(let E=0;E<j;E++)if(r[E].revenue)k[E]=r[E].revenue;else if(E>0&&k[E-1]>0){const $=r[E].revenueGrowth??0;k[E]=Math.round(k[E-1]*(1+$/100))}else k[E]=0;return Array.from({length:j},(E,$)=>{const T=k[$];return o.jsx("td",{className:"p-2",children:o.jsx(Gr,{type:"text",value:T?u(T):"",onChange:R=>C($,"revenue",f(R.target.value,!1)),className:"w-full",rules:{}})},$)})})()]}),o.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[o.jsx("td",{className:"p-3 font-medium",children:o.jsx(In,{label:"Revenue Growth %",tooltip:"Set a growth rate per year. Revenue for that year will auto-calculate from the previous year's revenue. Leave at 0 to enter revenue manually."})}),o.jsx("td",{className:"p-2 text-center text-xs text-muted-foreground",children:"Base year"}),Array.from({length:j-1},(k,E)=>{const $=E+1;return o.jsx("td",{className:"p-2",children:o.jsx(Gr,{type:"number",step:"0.1",value:r[$].revenueGrowth??"",onChange:T=>{const R=Number(T.target.value),B=[...r];B[$]={...B[$],revenueGrowth:R};const F=[];for(let G=0;G<$;G++)if(B[G].revenue)F[G]=B[G].revenue;else if(G>0&&F[G-1]>0){const K=B[G].revenueGrowth??0;F[G]=Math.round(F[G-1]*(1+K/100))}else F[G]=0;const D=F[$-1]||B[$-1].revenue||0;if(D>0){B[$]={...B[$],revenue:Math.round(D*(1+R/100))};for(let G=$+1;G<j;G++){const K=B[G].revenueGrowth??0,z=B[G-1].revenue||0;z>0&&K!==0&&(B[G]={...B[G],revenue:Math.round(z*(1+K/100))})}}n(B)},className:"w-full text-center",suffix:"%"})},$)})]}),A("Gross Profit","Revenue × Gross Margin. Click the lock icon to enter a manual value.","grossProfitOverride",k=>k.calculatedGrossProfit,k=>k.grossProfit),o.jsxs("tr",{className:"border-b bg-primary/5",children:[o.jsx("td",{className:"p-3 font-medium text-muted-foreground",children:o.jsx(In,{label:"Gross Margin %",tooltip:"Gross Profit as a percentage of revenue."})}),Array.from({length:j},(k,E)=>o.jsxs("td",{className:"p-3 text-center font-semibold",children:[N(E).grossMarginPercent.toFixed(1),"%"]},E))]}),A("SG&A Expense","Selling, General & Administrative expenses. Click the lock icon to enter a manual value.","sgaOverride",k=>k.calculatedSga,k=>k.sga),A("R&D Expense","Research & Development expenses. Click the lock icon to enter a manual value.","rdOverride",k=>k.calculatedRd,k=>k.rd),A("EBITDA","Earnings Before Interest, Taxes, Depreciation, and Amortization. Click the lock icon to enter a manual value.","ebitdaOverride",k=>k.calculatedEbitda,k=>k.ebitda,!0),o.jsxs("tr",{className:"border-b bg-primary/5",children:[o.jsx("td",{className:"p-3 font-medium text-muted-foreground",children:o.jsx(In,{label:"EBITDA Margin",tooltip:"EBITDA as a percentage of revenue."})}),Array.from({length:j},(k,E)=>o.jsxs("td",{className:"p-3 text-center font-semibold",children:[N(E).ebitdaMargin.toFixed(1),"%"]},E))]}),A("Depreciation","Allocation of tangible asset costs. Click the lock icon to enter a manual value.","depreciationOverride",k=>k.calculatedDepreciation,k=>k.depreciation),A("Amortization","Allocation of intangible asset costs. Click the lock icon to enter a manual value.","amortizationOverride",k=>k.calculatedAmortization,k=>k.amortization),A("EBIT","Earnings Before Interest and Taxes. Click the lock icon to enter a manual value.","ebitOverride",k=>k.calculatedEbit,k=>k.ebit,!0),A("Interest Income","Income from interest-bearing investments. Click the lock icon to enter a manual value.","interestIncomeOverride",k=>k.calculatedInterestIncome,k=>k.interestIncome),A("Interest Expense","Cost of borrowed funds. Click the lock icon to enter a manual value.","interestExpenseOverride",k=>k.calculatedInterestExpense,k=>k.interestExpense),A("EBT (Pre-Tax Income)","Earnings Before Taxes. Click the lock icon to enter a manual value.","ebtOverride",k=>k.calculatedEbt,k=>k.ebt,!0),A("Taxes","Tax liability based on pre-tax profit. Click the lock icon to enter a manual value.","taxesOverride",k=>k.calculatedTaxes,k=>k.taxes),A("Net Income","Bottom-line profit after all expenses. Click the lock icon to enter a manual value.","netIncomeOverride",k=>k.calculatedNetIncome,k=>k.netIncome,!0),o.jsxs("tr",{className:"border-b bg-primary/5",children:[o.jsx("td",{className:"p-3 font-medium text-muted-foreground",children:o.jsx(In,{label:"Net Margin %",tooltip:"Net Income as a percentage of revenue."})}),Array.from({length:j},(k,E)=>o.jsxs("td",{className:"p-3 text-center font-semibold",children:[N(E).netMarginPercent.toFixed(1),"%"]},E))]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-3 font-medium",children:o.jsx(In,{label:"Δ Working Capital (% of sales)",tooltip:"
473Change in working capital as a percentage of sales."})}),Array.from({length:j},(k,E)=>o.jsx("td",{className:`p-3 text-center font-semibold ${P(N(E).workingCapital)}`,children:u(N(E).workingCapital)},E))]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-3 font-medium",children:o.jsx(In,{label:"CapEx (% of sales)",tooltip:"Capital expenditures as a percentage of sales."})}),Array.from({length:j},(k,E)=>o.jsx("td",{className:`p-3 text-center font-semibold ${P(N(E).capex)}`,children:u(N(E).capex)},E))]}),o.jsxs("tr",{className:"border-b bg-primary/5",children:[o.jsx("td",{className:"p-3 font-bold",children:o.jsx(In,{label:"Free Cash Flow",tooltip:"Net Income + Depreciation + Amortization - CapEx - Δ Working Capital."})}),Array.from({length:j},(k,E)=>o.jsx("td",{className:`p-3 text-center font-bold ${N(E).fcf<0?"text-destructive":"text-primary"}`,children:u(N(E).fcf)},E))]}),o.jsxs("tr",{className:"border-b bg-primary/5",children:[o.jsx("td",{className:"p-3 font-medium text-muted-foreground",children:o.jsx(In,{label:"FCF Margin",tooltip:"Free Cash Flow as a percentage of revenue."})}),Array.from({length:j},(k,E)=>o.jsxs("td",{className:`p-3 text-center font-semibold ${P(N(E).fcfMargin)}`,children:[N(E).fcfMargin.toFixed(1),"%"]},E))]}),o.jsxs("tr",{className:"border-b bg-secondary/5",children:[o.jsx("td",{className:"p-3 font-medium",children:o.jsx(In,{label:"Dividend Paid",tooltip:"Free Cash Flow × Dividend Payout %."})}),Array.from({length:j},(k,E)=>o.jsx("td",{className:`p-3 text-center font-semibold ${P(N(E).dividend)}`,children:u(N(E).dividend)},E))]}),o.jsx("tr",{className:"bg-accent/10",children:o.jsx("td",{colSpan:j+1,className:"p-3 font-bold text-accent-foreground pt-8",children:o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[o.jsx("span",{children:"ASSUMPTIONS & INPUTS"}),o.jsxs("div",{className:"flex items-center gap-2 font-normal text-sm",children:[g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[o.jsx(Tc,{className:"h-3.5 w-3.5"})," Historic avg shown"]}),o.jsxs(Ca,{value:m,onValueChange:p,children:[o.jsxs(Gn,{className:"h-7 w-44 text-xs",children:[o.jsx(_c,{className:"h-3 w-3 mr-1"}),o.jsx(Na,{})]}),o.jsx(Hn,{children:Aa.map(k=>o.jsx(rr,{value:k.id,className:"text-xs",children:k.name},k.id))})]})]})]})})}),M("Gross Margin (%)","Percentage of revenue remaining after COGS.","grossMargin","grossProfitOverride"),M("SG&A (% of sales)","Selling, General & Administrative expenses as % of revenue.","sgaPercent","sgaOverride"),M("R&D (% of sales)","Research & Development expenses as % of revenue.","rdPercent","rdOverride"),M("Depreciation (% of sales)","Depreciation of tangible assets as % of revenue.","depreciationPercent","depreciationOverride"),M("Amortization (% of sales)","Amortization of intangible assets as % of revenue.","amortizationPercent","amortizationOverride"),M("Interest Income (% of sales)","Interest income as % of revenue.","interestIncomePercent","interestIncomeOverride"),M("Interest Expense (% of sales)","Interest expense as % of revenue.","interestExpensePercent","interestExpenseOverride"),M("Tax Rate (%)","Corporate tax rate applied to EBT.","taxRate","taxesOverride"),M("Δ Working Capital (% of sales)","Change in working capital as % of revenue.","workingCapitalPercent"),M("CapEx (% of sales)","Capital Expenditures as % of revenue.","capexPercent"),M("Dividend Payout (% of FCF)","Percentage of FCF distributed as dividends.","dividendPercent")]})]})}),o.jsx("div",{className:"bg-muted/50 p-4 rounded-lg",children:o.jsxs("p",{className:"text-sm text-muted-foreground",children:[o.jsx("strong",{children:"Note:"})," These projections can be used in the DCF and Market-Based valuation tabs. Click the ",o.jsx(ql,{className:"h-3 w-3 inline"})," icon next to any calculated metric to manually override its value."]})})]})]})})})},o1e=({currency:e,investmentAmount:t,preMoneyValuation:r,isInitialPreferred:n,initialLiquidationMultiple:a,futureRounds:i,onInvestmentAmountChange:s,onPreMoneyValuationChange:l,onIsInitialPreferredChange:c,onInitialLiquidationMultipleChange:u,onFutureRoundsChange:f})=>{const d=r+t,h=()=>{const g={id:Date.now().toString(),year:i.length>0?Math.max(...i.map(v=>v.year))+1:2,investmentAmount:0,preMoneyValuation:0,isPreferred:!1,liquidationMultiple:1};f([...i,g])},m=g=>{f(i.filter(v=>v.id!==g))},p=(g,v,y)=>{f(i.map(x=>x.id===g?{...x,[v]:y}:x))};return o.jsx(nn,{children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsx(ht,{children:"Investment Terms"}),o.jsx(Dt,{children:"Define the investment amount and pre-money valuation"})]}),o.jsx(pt,{className:"space-y-6",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(qe,{htmlFor:"investmentAmount",children:["Investment Amount (",e,")"]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The total amount of money being invested into the company in this round."})})]})]}),o.jsx(Gr,{id:"investmentAmount",type:"text",value:t?ne(t,e):"",onCh
473ange:g=>s(Number(g.target.value.replace(/[^0-9]/g,""))),rules:{min:0,hint:"Amount being invested this round"}})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(qe,{htmlFor:"preMoneyValuation",children:["Pre-Money Valuation (",e,")"]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The company's valuation before the new investment is added. This determines the ownership percentage investors will receive."})})]})]}),o.jsx(Gr,{id:"preMoneyValuation",type:"text",value:r?ne(r,e):"",onChange:g=>l(Number(g.target.value.replace(/[^0-9]/g,""))),rules:{min:0,hint:"Company value before this investment"}})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg mt-4",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Post-Money Valuation"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The company's valuation after the investment (Pre-Money + Investment Amount). Used to calculate ownership percentages."})})]})]}),o.jsx("div",{className:"text-2xl font-bold",children:ne(d,e)})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4 pt-4 border-t",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:"initial-preferred",checked:n,onCheckedChange:g=>c(g)}),o.jsxs(qe,{htmlFor:"initial-preferred",className:"cursor-pointer font-normal flex items-center gap-2",children:["Preferred Stock",o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Preferred stock gives investors priority over common stockholders in liquidation events and often includes additional rights."})})]})]})]}),n&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:"initial-multiple",children:"Liquidation Preference Multiple"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Determines how much investors get paid first in a liquidation. For example, a 2x multiple means investors get back 2x their investment before others."})})]})]}),o.jsx(Qe,{id:"initial-multiple",type:"number",step:"0.1",min:"1",value:a,onChange:g=>u(Number(g.target.value))})]})]})]}),o.jsxs("div",{className:"space-y-4 pt-6 border-t",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Future Investment Rounds"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Define expected future financing rounds"})]}),o.jsxs(Ce,{onClick:h,size:"sm",variant:"outline",children:[o.jsx(Ss,{className:"h-4 w-4 mr-1"}),"Add Round"]})]}),i.length===0?o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'No future rounds defined. Click "Add Round" to add one.'}):o.jsx("div",{className:"space-y-4",children:i.map((g,v)=>o.jsxs("div",{className:"p-4 border rounded-lg space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h4",{className:"font-semibold",children:["Round ",v+1]}),o.jsx(Ce,{onClick:()=>m(g.id),size:"sm",variant:"ghost",className:"text-destructive hover:text-destructive",children:o.jsx(Oa,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{htmlFor:`year-${g.id}`,children:"Year of Investment"}),o.jsx(Qe,{id:`year-${g.id}`,type:"number",min:"1",value:g.year,onChange:y=>p(g.id,"year",Number(y.target.value))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(qe,{htmlFor:`investment-${g.id}`,children:["Investment Amount (",e,")"]}),o.jsx(Qe,{id:`investment-${g.id}`,type:"text",value:g.investmentAmount?ne(g.investmentAmount,e):"",onCh
473ange:y=>p(g.id,"investmentAmount",Number(y.target.value.replace(/[^0-9]/g,"")))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(qe,{htmlFor:`premoney-${g.id}`,children:["Pre-Money Valuation (",e,")"]}),o.jsx(Qe,{id:`premoney-${g.id}`,type:"text",value:g.preMoneyValuation?ne(g.preMoneyValuation,e):"",onChange:y=>p(g.id,"preMoneyValuation",Number(y.target.value.replace(/[^0-9]/g,"")))})]})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-4 pt-4 border-t",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Ra,{id:`preferred-${g.id}`,checked:g.isPreferred,onCheckedChange:y=>p(g.id,"isPreferred",y)}),o.jsxs(qe,{htmlFor:`preferred-${g.id}`,className:"cursor-pointer font-normal flex items-center gap-2",children:["Preferred Stock",o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Preferred stock gives investors priority over common stockholders in liquidation events and often includes additional rights."})})]})]})]}),g.isPreferred&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{htmlFor:`multiple-${g.id}`,children:"Liquidation Preference Multiple"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Determines how much investors get paid first in a liquidation. For example, a 2x multiple means investors get back 2x their investment before others."})})]})]}),o.jsx(Qe,{id:`multiple-${g.id}`,type:"number",step:"0.1",min:"1",value:g.liquidationMultiple,onChange:y=>p(g.id,"liquidationMultiple",Number(y.target.value))})]})]})]},g.id))})]})]})})]})})},pr=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:r,className:Oe("w-full caption-bottom text-sm",e),...t})}));pr.displayName="Table";const mr=w.forwardRef(({className:e,...t},r)=>o.jsx("thead",{ref:r,className:Oe("[&_tr]:border-b",e),...t}));mr.displayName="TableHeader";const gr=w.forwardRef(({className:e,...t},r)=>o.jsx("tbody",{ref:r,className:Oe("[&_tr:last-child]:border-0",e),...t}));gr.displayName="TableBody";const s1e=w.forwardRef(({className:e,...t},r)=>o.jsx("tfoot",{ref:r,className:Oe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));s1e.displayName="TableFooter";const De=w.forwardRef(({className:e,...t},r)=>o.jsx("tr",{ref:r,className:Oe("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));De.displayName="TableRow";const Ue=w.forwardRef(({className:e,...t},r)=>o.jsx("th",{ref:r,className:Oe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ue.displayName="TableHead";const se=w.forwardRef(({className:e,...t},r)=>o.jsx("td",{ref:r,className:Oe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));se.displayName="TableCell";const l1e=w.forwardRef(({className:e,...t},r)=>o.jsx("caption",{ref:r,className:Oe("mt-4 text-sm text-muted-foreground",e),...t}));l1e.displayName="TableCaption";const c1e=({currency:e,exitValue:t,investmentAmount:r,preMoneyValuation:n,isInitialPreferred:a,initialLiquidationMultiple:i,futureRounds:s,projections:l,numYears:c})=>{var D,G,K;const u=c,f=n+r,d=r/f*100,m=(()=>{const z=[];let U=d;for(let ee=1;ee<=u;ee++){const Y=s.find(W=>W.year===ee);if(Y){const W=Y.preMoneyValuation+Y.investmentAmount,H=Y.preMoneyValuation/W;U=U*H}z.push(U)}return z})(),p=m[m.length-1]||d,g=()=>{if(l.length<2||u<2)return 0;const z=l[0].revenue,U=l[Math.min(u-1,l.length-1)].revenue;return z<=0||U<=0?0:(Math.pow(U/z,1/(u-1))-1)*100},y=(()=>{const z=[];let U=100-d;for(let ee=1;ee<=u;ee++){const Y=s.find(W=>W.year===ee);if(Y){const W=Y.preMoneyValuation+Y.investmentAmount,H=Y.preMoneyValuation/W;U=U*H}z.push(U)}return z})(),x=z=>{const U=a?r*i:0;let ee=U;if(s.forEach(Y=>{Y.isPreferred&&(ee+=Y.investmentAmount*Y.liquidationMultiple)}),z<ee){const Y=z/ee;return{investorPreference:U*Y,remainingValue:0}}return{investorPreference:U,remainingValue:z-ee}},b=()=>{const z=[],U=[];let ee=d;for(let Y=1;Y<=u;Y++){const W=s.find(H=>H.year===Y);
473if(W){const H=W.preMoneyValuation+W.investmentAmount,me=W.preMoneyValuation/H;ee=ee*me}U.push(ee)}return z.push({roundIndex:-1,roundName:"Initial Round",ownershipByYear:U}),s.forEach((Y,W)=>{const H=[];let me=0;for(let q=1;q<=u;q++)if(q<Y.year)H.push(0);else if(q===Y.year){const ue=Y.preMoneyValuation+Y.investmentAmount;me=Y.investmentAmount/ue*100,H.push(me)}else{const ue=s.find(I=>I.year===q);if(ue){const I=ue.preMoneyValuation+ue.investmentAmount,L=ue.preMoneyValuation/I;me=me*L}H.push(me)}z.push({roundIndex:W,roundName:`Round ${W+1} (Yr ${Y.year})`,ownershipByYear:H})}),z},S=()=>{const z=b(),U=[];U.push({year:0,founderOwnership:100-d,founderCashFlow:0,roundCashFlows:[{roundName:"Initial Round",ownership:d,cashFlow:-r},...s.map((ee,Y)=>({roundName:`Round ${Y+1} (Yr ${ee.year})`,ownership:0,cashFlow:0}))]});for(let ee=0;ee<Math.min(u,l.length);ee++){const Y=l[ee],W=Y.revenue,H=Y.grossProfitOverride!=null?Y.grossProfitOverride:W*(Y.grossMargin/100),me=Y.sgaOverride!=null?Y.sgaOverride:W*(Y.sgaPercent/100),q=Y.rdOverride!=null?Y.rdOverride:W*(Y.rdPercent/100),ue=Y.ebitdaOverride!=null?Y.ebitdaOverride:H-me-q,I=Y.depreciationOverride!=null?Y.depreciationOverride:W*(Y.depreciationPercent/100),L=Y.amortizationOverride!=null?Y.amortizationOverride:W*(Y.amortizationPercent/100),Q=Y.ebitOverride!=null?Y.ebitOverride:ue-I-L,le=Y.interestIncomeOverride!=null?Y.interestIncomeOverride:W*(Y.interestIncomePercent/100),V=Y.interestExpenseOverride!=null?Y.interestExpenseOverride:W*(Y.interestExpensePercent/100),oe=Y.ebtOverride!=null?Y.ebtOverride:Q+le-V,ae=Y.taxesOverride!=null?Y.taxesOverride:oe>0?oe*(Y.taxRate/100):0,ye=Y.netIncomeOverride!=null?Y.netIncomeOverride:oe-ae,X=W*(Y.workingCapitalPercent/100),ge=W*(Y.capexPercent/100),de=ye+I+L-ge-X,be=y[ee]||100-d,ie=de>0?de*(Y.dividendPercent/100)*(be/100):0,Z=ee===u-1,fe=z.map(J=>{const te=J.ownershipByYear[ee]||0;let ce=0,re=!0;if(J.roundIndex>=0){const he=s[J.roundIndex];he.year===ee+1&&(ce=-he.investmentAmount,re=!1)}const Ie=re&&de>0?de*(Y.dividendPercent/100)*(te/100):0;console.log(`Year ${ee+1}, ${J.roundName}
473:`,{netIncome:ye,fcf:de,dividendPercent:Y.dividendPercent,ownershipThisYear:te,dividendPayment:Ie,investmentThisYear:ce,shouldReceiveDividends:re});let Fe=0;if(Z&&te>0){const he=x(t);if(J.roundIndex===-1)Fe=he.investorPreference+he.remainingValue*(te/100);else{const ke=s[J.roundIndex],We=ke.isPreferred?ke.investmentAmount*ke.liquidationMultiple:0;if(t<j()){const Ae=j();Fe=We/Ae*t}else Fe=We+he.remainingValue*(te/100)}}return{roundName:J.roundName,ownership:te,cashFlow:ce+Ie+Fe}});let xe=0;Z&&(xe=x(t).remainingValue*(be/100)),U.push({year:ee+1,founderOwnership:be,founderCashFlow:ie+xe,roundCashFlows:fe})}return U},j=()=>{let z=a?r*i:0;return s.forEach(U=>{U.isPreferred&&(z+=U.investmentAmount*U.liquidationMultiple)}),z},C=()=>{var U;const z=[];return(U=P[0])==null||U.roundCashFlows.forEach((ee,Y)=>{const W=[];P.forEach(ue=>{W.push(ue.roundCashFlows[Y].cashFlow)});let H=.1;const me=1e3,q=1e-4;for(let ue=0;ue<me;ue++){let I=0,L=0;for(let le=0;le<W.length;le++)I+=W[le]/Math.pow(1+H,le),L+=-le*W[le]/Math.pow(1+H,le+1);if(Math.abs(L)<1e-6)break;const Q=H-I/L;if(Math.abs(Q-H)<q){z.push(Q*100);break}H=Q,ue===me-1&&z.push(0)}}),z},N=t*(p/100),P=S(),A=C(),M=P.map(z=>z.roundCashFlows[0]).reduce((z,U)=>z+U.cashFlow,0),k=P.reduce((z,U)=>z+U.founderCashFlow,0),E=M,$=r>0?E/r:0,R=(()=>{if(r===0)return 0;const z=[];P.forEach(W=>{W.year,z.push(W.roundCashFlows[0].cashFlow)});let U=.1;const ee=1e3,Y=1e-4;for(let W=0;W<ee;W++){let H=0,me=0;for(let ue=0;ue<z.length;ue++)H+=z[ue]/Math.pow(1+U,ue),me+=-ue*z[ue]/Math.pow(1+U,ue+1);const q=U-H/me;if(Math.abs(q-U)<Y)return q*100;U=q}return U*100})(),B=g(),F=((D=l[Math.min(u-1,l.length-1)])==null?void 0:D.revenue)>0?t/l[Math.min(u-1,l.length-1)].revenue:0;return o.jsx(nn,{children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsx(ht,{children:"Investor Returns Analysis"}),o.jsx(Dt,{children:"Calculate investor returns including IRR, multiples, and ownership with liquidation preference waterfalls"})]}),o.jsxs(pt,{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Investment Returns"}),o.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[o.jsxs("div",{className:"p-4 bg-primary/10 rounded-lg border border-primary/20",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Money Multiple"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Total cash returned divided by initial investment. A 3x multiple means you get back $3 for every $1 invested."})})]})]}),o.jsxs("div",{className:"text-3xl font-bold text-primary",children:[$.toFixed(1),"x"]})]}),o.jsxs("div",{className:"p-4 bg-primary/10 rounded-lg border border-primary/20",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"IRR"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Internal Rate of Return - the annualized return rate considering timing of all cash flows. A higher IRR indicates better time-adjusted returns."})})]})]}),o.jsxs("div",{className:"text-3xl font-bold text-primary",children:[R.toFixed(1),"%"]})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Exit Ownership"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Percentage of company owned by initial investors at exit, after accounting for dilution from future funding rounds."})})]})]}),o.jsxs("div",{className:"text-2xl font-bold",children:[p.toFixed(1),"%"]}),o.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Initial: ",d.toFixed(1),"%"]})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Exit Value of Investment"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"The value of the initial investment at exit, calculated using ownership percentage and liquidation preferences."})})]})]}),o.jsx("div",{className:"text-2xl font-bold",children:ne(N,e)})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Total Returns"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Combined total of exit proceeds and all dividend payments received throughout the investment period."})})]})]}),o.jsx("div",{className:"text-2xl font-bold",children:ne(E,e)}),o.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Exit + Dividends"})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Revenue CAGR"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Compound Annual Growth Rate of revenue - the smoothed annual growth rate from initial to exit year."})})]})]}),o.jsxs("div",{className:"text-2xl font-bold",children:[B.toFixed(1),"%"]})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx("span",{children:"Implied Exit Multiple"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Exit valuation divided by exit year revenue. Common benchmarks: S
473aaS 5-10x, E-commerce 1-3x."})})]})]}),o.jsxs("div",{className:"text-2xl font-bold",children:[F.toFixed(1),"x"]}),o.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"revenue"})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Yearly Cash Flow & Ownership"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Shows ownership dilution over time and cash flows including dividend payments and exit proceeds for each investor round and founders."})})]})]}),o.jsx("div",{className:"border rounded-lg overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"font-semibold sticky left-0 bg-background z-10",children:"Year"}),(G=P[0])==null?void 0:G.roundCashFlows.map(z=>o.jsxs(o.Fragment,{children:[o.jsxs(Ue,{className:"font-semibold text-right whitespace-nowrap",children:[z.roundName,o.jsx("br",{}),"Ownership %"]},`${z.roundName}-own`),o.jsxs(Ue,{className:"font-semibold text-right whitespace-nowrap",children:[z.roundName,o.jsx("br",{}),"Cash Flow"]},`${z.roundName}-cf`)]})),o.jsxs(Ue,{className:"font-semibold text-right whitespace-nowrap",children:["Founder",o.jsx("br",{}),"Ownership %"]}),o.jsxs(Ue,{className:"font-semibold text-right whitespace-nowrap",children:["Founder",o.jsx("br",{}),"Cash Flow"]})]})}),o.jsxs(gr,{children:[P.map(z=>{const U=z.year>0&&z.year===u;return o.jsxs(De,{className:z.year===0?"bg-muted/30":"",children:[o.jsxs(se,{className:"font-medium sticky left-0 bg-background z-10",children:[z.year===0?"Year 0 (Investment)":`Year ${z.year}`,U&&" (Exit)"]}),z.roundCashFlows.map((ee,Y)=>o.jsxs(o.Fragment,{children:[o.jsxs(se,{className:"text-right",children:[ee.ownership.toFixed(2),"%"]},`${z.year}-${Y}-own`),o.jsx(se,{className:"text-right",children:z.year===0&&Y===0?o.jsx("span",{className:"text-destructive",children:ne(ee.cashFlow,e)}):ee.cashFlow===0?"-":o.jsx("span",{className:ee.cashFlow>0?"text-primary":"",children:ne(ee.cashFlow,e)})},`${z.year}-${Y}-cf`)]})),o.jsxs(se,{className:"text-right",children:[z.founderOwnership.toFixed(2),"%"]}),o.jsx(se,{className:"text-right",children:z.year===0?"-":o.jsx("span",{className:z.founderCashFlow>0?"text-primary":"",children:ne(z.founderCashFlow,e)})})]},z.year)}),o.jsxs(De,{className:"bg-muted/50 font-semibold",children:[o.jsx(se,{className:"sticky left-0 bg-muted/50 z-10",children:"Totals"}),(K=P[0])==null?void 0:K.roundCashFlows.map((z,U)=>{const ee=P.filter(Y=>Y.year>=0).reduce((Y,W)=>Y+W.roundCashFlows[U].cashFlow,0);return o.jsxs(o.Fragment,{children:[o.jsx(se,{className:"text-right",children:"-"},`total-${U}-own`),o.jsx(se,{className:"text-right",children:o.jsx("span",{className:ee>=0?"text-primary":"text-destructive",children:ne(ee,e)})},`total-${U}-cf`)]})}),o.jsx(se,{className:"text-right",children:"-"}),o.jsx(se,{className:"text-right",children:ne(k,e)})]}),o.jsxs(De,{className:"bg-primary/5 font-semibold border-t-2",children:[o.jsx(se,{className:"sticky left-0 bg-primary/5 z-10",children:"IRR"}),A.map((z,U)=>o.jsxs(o.Fragment,{children:[o.jsx(se,{className:"text-right",children:"-"},`irr-${U}-own`),o.jsx(se,{className:"text-right",children:o.jsxs("span",{className:"text-primary font-bold",children:[z.toFixed(1),"%"]})},`irr-${U}-val`)]})),o.jsx(se,{className:"text-right",children:"-"}),o.jsx(se,{className:"text-right",children:"-"})]})]})]})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Value Distribution Analysis"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{className:"max-w-xs",children:"Compares the total value distribution between founders and all investors at exit, showing the balance of returns."})})]})]}),o.jsx(ut,{className:"border-2",children:o.jsx(pt,{className:"pt-6",children:o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsx("div",{className:"space-y-4",children:o.jsxs("div",{className:"p-4 bg-primary/10 rounded-lg border border-primary/20",children:[o.jsx("div",{className:"text-sm font-medium mb-2",children:"Total Founder Value"}),o.jsx("div",{className:"text-3xl font-bold text-primary",children:ne(k,e)}),o.jsx("div",{className:"text-xs text-muted-foreground mt-2",children:"Exit + Dividends"})]})}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"p-4 bg-secondary/10 rounded-lg border border-secondary/20",children:[o.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"All Investors Total Returns"}),o.jsx("div",{className:"text-3xl font-bold text-secondary",children:ne(t-k,e)}),o.jsxs("div",{className:"text-xs text-muted-foreground mt-2",children:["Total Exit Value: ",ne(t,e)]})]}),o.jsxs("div",{className:"p-4 bg-primary/10 rounded-lg border border-primary/20",children:[o.jsx("div",{className:"text-sm font-medium mb-2",children:"Value Ratio"}),o.jsxs("div",{className:"text-3xl font-bold text-primary",children:[t-k>0?(k/(t-k)).toFixed(2):0,"x"]}),o.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Founder total value / Investor total returns"})]})]})]})})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Valuation Details"}),o.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Post-Money Valuation"}),o.jsx("div",{className:"text-xl font-bold",children:ne(f,e)})]}),o.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Projected Exit Value"}),o.jsx("div",{className:"text-xl font-bold",children:ne(t,e)})]})]})]})]})]})})};var Ay="Dialog",[e4,t4]=fr(Ay),[u1e,Va]=e4(Ay),r4=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=w.useRef(null),c=w.useRef(null),[u,f]=wr({prop:n,defaultProp:a??!1,onChange:i,caller:Ay});return o.jsx(u1e,{scope:t,triggerRef:l,contentRef:c,contentId:kn(),titleId:kn(),descriptionId:kn(),open:u,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(d=>!d),[f]),modal:s,children:r})};r4.displayName=Ay;var n4="DialogTrigger",a4=w.forwardRef((e,t)=>
vendor: 5,543 bytes, lines 473-477
473{const{__scopeDialog:r,...n}=e,a=Va(n4,r),i=et(t,a.triggerRef);return o.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":SC(a.open),...n,ref:i,onClick:je(e.onClick,a.onOpenToggle)})});a4.displayName=n4;var wC="DialogPortal",[d1e,i4]=e4(wC,{forceMount:void 0}),o4=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=Va(wC,t);return o.jsx(d1e,{scope:t,forceMount:r,children:w.Children.map(n,s=>o.jsx(pn,{present:r||i.open,children:o.jsx(mh,{asChild:!0,container:a,children:s})}))})};o4.displayName=wC;var Tg="DialogOverlay",s4=w.forwardRef((e,t)=>{const r=i4(Tg,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Va(Tg,e.__scopeDialog);return i.modal?o.jsx(pn,{present:n||i.open,children:o.jsx(h1e,{...a,ref:t})}):null});s4.displayName=Tg;var f1e=Js("DialogOverlay.RemoveScroll"),h1e=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Va(Tg,r);return o.jsx(Ov,{as:f1e,allowPinchZoom:!0,shards:[a.contentRef],children:o.jsx($e.div,{"data-state":SC(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ll="DialogContent",l4=w.forwardRef((e,t)=>{const r=i4(ll,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Va(ll,e.__scopeDialog);return o.jsx(pn,{present:n||i.open,children:i.modal?o.jsx(p1e,{...a,ref:t}):o.jsx(m1e,{...a,ref:t})})});l4.displayName=ll;var p1e=w.forwardRef((e,t)=>{const r=Va(ll,e.__scopeDialog),n=w.useRef(null),a=et(t,r.contentRef,n);return w.useEffect(()=>{const i=n.current;if(i)return iS(i)},[]),o.jsx(c4,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:je(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:je(e.onFocusOutside,i=>i.preventDefault())})}),m1e=w.forwardRef((e,t)=>{const r=Va(ll,e.__scopeDialog),n=w.useRef(!1),a=w.useRef(!1);return o.jsx(c4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),c4=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,l=Va(ll,r),c=w.useRef(null),u=et(t,c);return aS(),o.jsxs(o.Fragment,{children:[o.jsx(Av,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:o.jsx(xu,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":SC(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(v1e,{titleId:l.titleId}),o.jsx(x1e,{contentRef:c,descriptionId:l.descriptionId})]})]})}),jC="DialogTitle",u4=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Va(jC,r);return o.jsx($e.h2,{id:a.titleId,...n,ref:t})});u4.displayName=jC;var d4="DialogDescription",f4=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Va(d4,r);return o.jsx($e.p,{id:a.descriptionId,...n,ref:t})});f4.displayName=d4;var h4="DialogClose",p4=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Va(h4,r);return o.jsx($e.button,{type:"button",...n,ref:t,onClick:je(e.onClick,()=>a.onOpenChange(!1))})});p4.displayName=h4;function SC(e){return e?"open":"closed"}var m4="DialogTitleWarning",[g1e,g4]=R6(m4,{contentName:ll,titleName:jC,docsSlug:"dialog"}),v1e=({titleId:e})=>{const t=g4(m4),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
474
475If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
476
477For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},y1e="DialogDescriptionWarning",x1e=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${g4(y1e).contentName}}.`;return w.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},v4=r4,y4=a4,x4=o4,CC=s4,NC=l4,PC=u4,AC=f4,kC=p4;const pc=v4,Vd=y4,b1e=x4,b4=w.forwardRef(({className:e,...t},r)=>o.jsx(CC,{ref:r,className:Oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));b4.displayName=CC.displayName;const Us=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(b1e,{children:[o.jsx(b4,{}),o.jsxs(NC,{ref:n,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
477nded-lg",e),...r,children:[t,o.jsxs(kC,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[o.jsx(Rj,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Us.displayName=NC.displayName;const Gs=({className:e,...t})=>o.jsx("div",{className:Oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Gs.displayName="DialogHeader";const Hs=w.forwardRef(({className:e,...t},r)=>o.jsx(PC,{ref:r,className:Oe("text-lg font-semibold leading-none tracking-tight",e),...t}));Hs.displayName=PC.displayName;const qs=w.forwardRef(({className:e,...t},r)=>o.jsx(AC,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));qs.displayName=AC.displayName;var w4="AlertDialog",[w1e,vPe]=fr(w4,[t4]),ro=t4(),j4=e=>{const{__scopeAlertDialog:t,...r}=e,n=ro(t);return o.jsx(v4,{...n,...r,modal:!0})};j4.displayName=w4;var j1e="AlertDialogTrigger",S4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ro(r);return o.jsx(y4,{...a,...n,ref:t})});S4.displayName=j1e;var S1e="AlertDialogPortal",C4=e=>{const{__scopeAlertDialog:t,...r}=e,n=ro(t);return o.jsx(x4,{...n,...r})};C4.displayName=S1e;var C1e="AlertDialogOverlay",N4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ro(r);return o.jsx(CC,{...a,...n,ref:t})});N4.displayName=C1e;var mc="AlertDialogContent",[N1e,P1e]=w1e(mc),A1e=dM("AlertDialogContent"),P4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...a}=e,i=ro(r),s=w.useRef(null),l=et(t,s),c=w.useRef(null);return o.jsx(g1e,{contentName:mc,titleName:A4,docsSlug:"alert-dialog",children:o.jsx(N1e,{scope:r,cancelRef:c,children:o.jsxs(NC,{role:"alertdialog",...i,...a,ref:l,onOpenAutoFocus:je(a.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[o.jsx(A1e,{children:n}),o.jsx(O1e,{contentRef:s})]})})})});P4.displayName=mc;var A4="AlertDialogTitle",k4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ro(r);return o.jsx(PC,{...a,...n,ref:t})});k4.displayName=A4;var O4="AlertDialogDescription",E4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ro(r);return o.jsx(AC,{...a,...n,ref:t})});E4.displayName=O4;var k1e="AlertDialogAction",_4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=ro(r);return o.jsx(kC,{...a,...n,ref:t})});_4.displayName=k1e;var T4="AlertDialogCancel",M4=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=P1e(T4,r),i=ro(r),s=et(t,a);return o.jsx(kC,{...i,...n,ref:s})});M4.displayName=T4;var O1e=({contentRef:e})=>{const t=`\`${mc}\` requires a description for the component to be accessible for screen reader users.
478
479You can add a description to the \`${mc}\` by passing a \`${O4}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
480
481Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${mc}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
482
483For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},E1e=j4,_1e=S4,T1e=C4,R4=N4,$4=P4,I4=_4,D4=M4,F4=k4,L4=E4;const Mg=E1e,Rg=_1e,M1e=T1e,B4=w.forwardRef(({className:e,...t},r)=>o.jsx(R4,{className:Oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));B4.displayName=R4.displayName;const Qf=w.forwardRef(({className:e,...t},r)=>o.jsxs(M1e,{children:[o.jsx(B4,{}),o.jsx($4,{ref:r,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
483nded-lg",e),...t})]}));Qf.displayName=$4.displayName;const Jf=({className:e,...t})=>o.jsx("div",{className:Oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jf.displayName="AlertDialogHeader";const eh=({className:e,...t})=>o.jsx("div",{className:Oe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});eh.displayName="AlertDialogFooter";const th=w.forwardRef(({className:e,...t},r)=>o.jsx(F4,{ref:r,className:Oe("text-lg font-semibold",e),...t}));th.displayName=F4.displayName;const rh=w.forwardRef(({className:e,...t},r)=>o.jsx(L4,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));rh.displayName=L4.displayName;const nh=w.forwardRef(({className:e,...t},r)=>o.jsx(I4,{ref:r,className:Oe(sS(),e),...t}));nh.displayName=I4.displayName;const ah=w.forwardRef(({className:e,...t},r)=>o.jsx(D4,{ref:r,className:Oe(sS({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ah.displayName=D4.displayName;const z4=["grossProfitOverride","sgaOverride","rdOverride","ebitdaOverride","depreciationOverride","amortizationOverride","ebitOverride","interestIncomeOverride","interestExpenseOverride","ebtOverride","taxesOverride","netIncomeOverride"],R1e=[["# BUSINESS VALUATION TOOL - CSV IMPORT TEMPLATE"],["# Instructions: Fill in the Value column. Do not change the Key column."],["# Lines starting with # are comments and will be ignored."],[""],["# === GENERAL SETTINGS ==="],["Key","Value"],["companyName","My Company"],["currency","GBP"],["numYears","5"],[""],["# === INVESTMENT TERMS ==="],["investmentAmount","100000"],["preMoneyValuation","500000"],["isInitialPreferred","false"],["initialLiquidationMultiple","1"],[""],["# === ASSET-BASED VALUATION ==="],["equityInvestment","250000"],["grantFunding","100000"],["grossProfit","80000"],["inflationRate","25"],["totalLiabilities","20000"],["bookAssets","300000"],["bookLiabilities","50000"],["fairValueAdjustment","25000"],["liquidationAssets","250000"],["liquidationDiscount","30"],["useCostToReplicate","true"],["useAdjustedBookValue","true"],["useLiquidationValue","true"],[""],["# === EMPLOYEES (one per row: name, cost) ==="],["employee","Jane Doe (CEO)","100000"],["employee","John Doe (CTO)","55000"],[""],["# === PRICING-BASED (PRE-REVENUE) VALUATION ==="],["soundIdea","100000"],["prototype","100000"],["qualityTeam","100000"],["strategicRelationships","100000"],["productRollout","100000"],["averagePreMoneyValuation","500000"],["teamScore","100"],["opportunityScore","100"],["productScore","100"],["competitiveScore","100"],["marketingScore","100"],["needForCapital","100"],["riskAdjustmentPerPoint","100000"],["riskManagement","0"],["riskStage","0"],["riskLegislation","0"],["riskManufacturing","0"],["riskSales","0"],["riskFunding","0"],["riskCompetition","0"],["riskTechnology","0"],["riskLitigation","0"],["riskInternational","0"],["riskReputation","0"],["riskPotentialLucrative","0"],["useBerkus","true"],["useScorecard","true"],["useRiskFactor","true"],[""],["# === INTRINSIC-BASED (DCF) VALUATION ==="],["discountRate","15"],["terminalGrowthRate","3"],["defaultRisk","75"],["totalDebt","0"],["cashAndEquivalents","0"],[""],["# === MARKET-BASED VALUATION ==="],["revenueMultiple","1"],["ebitdaMultiple","8"],["targetOwnership","20"],["exitYear","5"],["targetReturn","40"],["useRevenueMultiple","true"],["useEbitdaMultiple","true"],[""],["# === WEIGHTED AVERAGE ==="],["assetWeight","25"],["preRevenueWeight","25"],["marketWeight","25"],["dcfWeight","25"],[""],["# === FINANCIAL PROJECTIONS (one row per year) ==="],["# Leave override columns empty to use calculated values or enter a number to override"],["# projection","revenue","grossMargin","sgaPercent","rdPercent","depreciationPercent","amortizationPercent","interestIncomePercent","interestExpensePercent","workingCapitalPercent","capexPercent","taxRate","dividendPercent",...z4],["projection","1000000","65","35","15","5","2","0","3","8","7","25","25","","","","","","","","","","","",""],["projection","1500000","67","33","14","5","2","0","2.5","7","6","25","25","","","","","","","","","","","",""],["projection","2200000","68","31","13","4.5","2","0","2","7","6","25","25","","","","","","","","","","","",""],["projection","3000000","70","30","12","4","1.5","0","1.5","6","5","25","25","","","","","","","","","","","",""],["projection","4000000","71","28","11","4","1.5","0","1","6","5","25","25","","","","","","","","","","","",""],["projection","5200000","72","27","10","3.5","1","0","0.5","5","4","25","25","","","","","","","","","","","",""],["projection","6500000","73","26","10","3","1","0","0.5","5","4","25","25","","","","","","","","","","","",""],[""],["# === FUTURE INVESTMENT ROUNDS (one row per round) ==="],["# round","year","investmentAmount","preMoneyValuation","isPreferred","liquidationMultiple"],["round","2","250000","1500000","false","1"],["round","3","500000","3000000","false","1"]];function V4(e){return e.includes(",")||e.includes('"')||e.includes(`
484`)?`"${e.replace(/"/g,'""')}"`:e}function $1e(){return R1e.map(e=>e.map(t=>V4(String(t))).join(",")).join(`
485`)}function I1e(e){const t=[];let r="",n=!1;for(let a=0;a<e.length;a++){const i=e[a];n?i==='"'&&e[a+1]==='"'?(r+='"',a++):i==='"'?n=!1:r+=i:i==='"'?n=!0:i===","?(t.push(r.trim()),r=""):r+=i}return t.push(r.trim()),t}function Ga(e){return e.toLowerCase()==="true"}function Re(e){const t=parseFloat(e);return isNaN(t)?0:t}function Dn(e){if(!e||e.trim()==="")return null;const t=parseFloat(e);return isNaN(t)?null:t}function D1e(e){const t=e.split(/\r?\n/),r={},n=[],a=[],i=[];for(const d of t){const h=d.trim();if(!h||h.startsWith("#"))continue;const m=I1e(h);!m[0]||m[0]==="Key"||(m[0]==="employee"?n.push({name:m[1]||"",cost:Re(m[2])}):m[0]==="projection"?a.push({revenue:Re(m[1]),grossMargin:Re(m[2]),sgaPercent:Re(m[3]),rdPercent:Re(m[4]),depreciationPercent:Re(m[5]),amortizationPercent:Re(m[6]),interestIncomePercent:Re(m[7]),interestExpensePercent:Re(m[8]),workingCapitalPercent:Re(m[9]),capexPercent:Re(m[10]),taxRate:Re(m[11]),dividendPercent:Re(m[12]),grossProfitOverride:Dn(m[13]),sgaOverride:Dn(m[14]),rdOverride:Dn(m[15]),ebitdaOverride:Dn(m[16]),depreciationOverride:Dn(m[17]),amortizationOverride:Dn(m[18]),ebitOverride:Dn(m[19]),interestIncomeOverride:Dn(m[20]),interestExpenseOverride:Dn(m[21]),ebtOverride:Dn(m[22]),taxesOverride:Dn(m[23]),netIncomeOverride:Dn(m[24])}):m[0]==="round"?i.push({id:Date.now().toString()+Math.random().toString(36).slice(2),year:Re(m[1]),investmentAmount:Re(m[2]),preMoneyValuation:Re(m[3]),isPreferred:Ga(m[4]||"false"),liquidationMultiple:Re(m[5]||"1")}):r[m[0]]=m[1]||"")}const s={equityInvestment:Re(r.equityInvestment),grantFunding:Re(r.grantFunding),grossProfit:Re(r.grossProfit),employees:n,inflationRate:Re(r.inflationRate),totalLiabilities:Re(r.totalLiabilities),bookAssets:Re(r.bookAssets),bookLiabilities:Re(r.bookLiabilities),fairValueAdjustment:Re(r.fairValueAdjustment),liquidationAssets:Re(r.liquidationAssets),liquidationDiscount:Re(r.liquidationDiscount),useCostToReplicate:Ga(r.useCostToReplicate??"true"),useAdjustedBookValue:Ga(r.useAdjustedBookValue??"true"),useLiquidationValue:Ga(r.useLiquidationValue??"true")},l={soundIdea:Re(r.soundIdea),prototype:Re(r.prototype),qualityTeam:Re(r.qualityTeam),strategicRelationships:Re(r.strategicRelationships),productRollout:Re(r.productRollout),averagePreMoneyValuation:Re(r.averagePreMoneyValuation),teamScore:Re(r.teamScore),opportunityScore:Re(r.o
485pportunityScore),productScore:Re(r.productScore),competitiveScore:Re(r.competitiveScore),marketingScore:Re(r.marketingScore),needForCapital:Re(r.needForCapital),riskAdjustmentPerPoint:Re(r.riskAdjustmentPerPoint),riskManagement:Re(r.riskManagement),riskStage:Re(r.riskStage),riskLegislation:Re(r.riskLegislation),riskManufacturing:Re(r.riskManufacturing),riskSales:Re(r.riskSales),riskFunding:Re(r.riskFunding),riskCompetition:Re(r.riskCompetition),riskTechnology:Re(r.riskTechnology),riskLitigation:Re(r.riskLitigation),riskInternational:Re(r.riskInternational),riskReputation:Re(r.riskReputation),riskPotentialLucrative:Re(r.riskPotentialLucrative),useBerkus:Ga(r.useBerkus??"true"),useScorecard:Ga(r.useScorecard??"true"),useRiskFactor:Ga(r.useRiskFactor??"true")},c={discountRate:Re(r.discountRate),terminalGrowthRate:Re(r.terminalGrowthRate),defaultRisk:Re(r.defaultRisk),totalDebt:Re(r.totalDebt),cashAndEquivalents:Re(r.cashAndEquivalents)},u={revenueMultiple:Re(r.revenueMultiple),ebitdaMultiple:Re(r.ebitdaMultiple),targetOwnership:Re(r.targetOwnership),exitYear:Re(r.exitYear),targetReturn:Re(r.targetReturn),useRevenueMultiple:Ga(r.useRevenueMultiple??"true"),useEbitdaMultiple:Ga(r.useEbitdaMultiple??"true")},f={assetWeight:Re(r.assetWeight||"25"),preRevenueWeight:Re(r.preRevenueWeight||"25"),marketWeight:Re(r.marketWeight||"25"),dcfWeight:Re(r.dcfWeight||"25")};return{id:Date.now().toString(),name:r.companyName||"CSV Import",date:new Date().toISOString(),companyName:r.companyName||"",currency:r.currency||"GBP",numYears:r.numYears?Re(r.numYears):a.length>0?a.length:5,valuations:{assetBased:0,preRevenue:0,marketBased:0,marketBasedExitValue:0,dcf:0},investmentAmount:Re(r.investmentAmount),preMoneyValuation:Re(r.preMoneyValuation),isInitialPreferred:Ga(r.isInitialPreferred??"false"),initialLiquidationMultiple:Re(r.initialLiquidationMultiple||"1"),futureRounds:i,projections:a,assetBasedState:s,preRevenueState:l,dcfState:c,marketBasedState:u,weightedAverageState:f}}function Fn(e){return e!=null?String(e):""}const F1e=e=>{const{onLoad:t}=e,r=w.useRef(null),n=()=>{const s=$1e(),l=new Blob([s],{type:"text/csv"}),c=URL.createObjectURL(l),u=document.createElement("a");u.href=c,u.download="valuation_template.csv",u.click(),URL.revokeObjectURL(c),rt.success("CSV template downloaded — fill in your values and import it back")},a=s=>{var u;const l=(u=s.target.files)==null?void 0:u[0];if(!l)return;const c=new FileReader;c.onload=f=>{var d;try{const h=(d=f.target)==null?void 0:d.result,m=D1e(h);t(m),rt.success("CSV data imported and applied successfully")}catch{rt.error("Failed to parse CSV file. Please check the format matches the template.")}},c.readAsText(l),s.target.value=""},i=()=>{const{companyName:s,currency:l,numYears:c,investmentAmount:u,preMoneyValuation:f,isInitialPreferred:d,initialLiquidationMultiple:h,futureRounds:m,projections:p,assetBasedState:g,preRevenueState:v,dcfState:y,marketBasedState:x,weightedAverageState:b}=e,j=[["# BUSINESS VALUATION TOOL - EXPORTED DATA"],["# Exported on "+new Date().toLocaleString()],[""],["# === GENERAL SETTINGS ==="],["Key","Value"],["companyName",s],["currency",l],["numYears",String(c)],[""],["# === INVESTMENT TERMS ==="],["investmentAmount",String(u)],["preMoneyValuation",String(f)],["isInitialPreferred",String(d)],["initialLiquidationMultiple",String(h)],[""],["# === ASSET-BASED VALUATION ==="],["equityInvestment",String(g.equityInvestment)],["grantFunding",String(g.grantFunding)],["grossProfit",String(g.grossProfit)],["inflationRate",String(g.inflationRate)],["totalLiabilities",String(g.totalLiabilities)],["bookAssets",String(g.bookAssets)],["bookLiabilities",String(g.bookLiabilities)],["fairValueAdjustment",String(g.fairValueAdjustment)],["liquidationAssets",String(g.liquidationAssets)],["liquidationDiscount",String(g.liquidationDiscount)],["useCostToReplicate",String(g.useCostToReplicate)],["useAdjustedBookValue",String(g.useAdjustedBookValue)],["useLiquidationValue",String(g.useLiquidationValue)],[""],["# === EMPLOYEES ==="],...g.employees.map(A=>["employee",A.name,String(A.cost)]),[""],["# === PRICING-BASED (PRE-REVENUE) VALUATION ==="],["soundIdea",String(v.soundIdea)],["prototype",String(v.prototype)],["qualityTeam",String(v.qualityTeam)],["strategicRelationships",String(v.strategicRelationships)],["productRollout",String(v.productRollout)],["averagePreMoneyValuation",String(v.averagePreMoneyValuation)],["teamScore",String(v.teamScore)],["opportunityScore",String(v.opportunityScore)],["productScore",String(v.productScore)],["competitiveScore",String(v.competitiveScore)],["marketingScore",String(v.marketingScore)],["needForCapital",String(v.needForCapital)],["riskAdjustmentPerPoint",String(v.riskAdjustmentPerPoint)],["riskManagement",String(v.riskManagement)],["riskStage",String(v.riskStage)],["riskLegislation",String(v.riskLegislation)],["riskManufacturing",String(v.riskManufacturing)],["riskSales",String(v.riskSales)],["riskFunding",String(v.riskFunding)],["riskCompetition",String(v.riskCompetition)],["riskTechnology",String(v.riskTechnology)],["riskLitigation",String(v.riskLitigation)],["riskInternational",String(v.riskInternational)],["riskReputation",String(v.riskReputation)],["riskPotentialLucrative",String(v.riskPotentialLucrative)],["useBerkus",String(v.useBerkus)],["useScorecard",String(v.useScorecard)],["useRiskFactor",String(v.useRiskFactor)],[""],["# === INTRINSIC-BASED (DCF) VALUATION ==="],["discountRate",String(y.discountRate)],["terminalGrowthRate",String(y.terminalGrowthRate)],["defaultRisk",String(y.defaultRisk)],["totalDebt",String(y.totalDebt)],["cashAndEquivalents",String(y.cashAndEquivalents)],[""],["# === MARKET-BASED VALUATION ==="],["revenueMultiple",String(x.revenueMultiple)],["ebitdaMultiple",String(x.ebitdaMultiple)],["targetOwnership",String(x.targetOwnership)],["exitYear",String(x.exitYear)],["targetReturn",String(x.targetReturn)],["useRevenueMultiple",String(x.useRevenueMultiple)],["useEbitdaMultiple",String(x.useEbitdaMultiple)],[""],["# === WEIGHTED AVERAGE ==="],["assetWeight",String(b.assetWeight)],["preRevenueWeight",String(b.preRevenueWeight)],["marketWeight",String(b.marketWeight)],["dcfWeight",String(b.dcfWeight)],[""],["# === FINANCIAL PROJECTIONS ==="],["# projection","revenue","grossMargin","sgaPercent","rdPercent","depreciationPercent","amortizationPercent","interestIncomePercent","interestExpensePercent","workingCapitalPercent","capexPercent","taxRate","dividendPercent",...z4],...p.map(A=>
485["projection",String(A.revenue),String(A.grossMargin),String(A.sgaPercent),String(A.rdPercent),String(A.depreciationPercent),String(A.amortizationPercent),String(A.interestIncomePercent),String(A.interestExpensePercent),String(A.workingCapitalPercent),String(A.capexPercent),String(A.taxRate),String(A.dividendPercent),Fn(A.grossProfitOverride),Fn(A.sgaOverride),Fn(A.rdOverride),Fn(A.ebitdaOverride),Fn(A.depreciationOverride),Fn(A.amortizationOverride),Fn(A.ebitOverride),Fn(A.interestIncomeOverride),Fn(A.interestExpenseOverride),Fn(A.ebtOverride),Fn(A.taxesOverride),Fn(A.netIncomeOverride)]),[""],["# === FUTURE INVESTMENT ROUNDS ==="],["# round","year","investmentAmount","preMoneyValuation","isPreferred","liquidationMultiple"],...m.map(A=>["round",String(A.year),String(A.investmentAmount),String(A.preMoneyValuation),String(A.isPreferred),String(A.liquidationMultiple)])].map(A=>A.map(O=>V4(String(O))).join(",")).join(`
486`),C=new Blob([j],{type:"text/csv"}),N=URL.createObjectURL(C),P=document.createElement("a");P.href=N,P.download="valuation_export.csv",P.click(),URL.revokeObjectURL(N),rt.success("Current data exported as CSV")};return o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"file",ref:r,accept:".csv",className:"hidden",onChange:a}),o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:n,title:"Download a blank CSV template to fill in offline",children:[o.jsx(Un,{className:"h-4 w-4 mr-1"}),"Template"]}),o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:()=>{var s;return(s=r.current)==null?void 0:s.click()},title:"Import valuation data from a CSV file",children:[o.jsx(Tj,{className:"h-4 w-4 mr-1"}),"Import"]}),o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:i,title:"Export your current data as a CSV file",children:[o.jsx(zM,{className:"h-4 w-4 mr-1"}),"Export"]})]})};var wt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function r(a){throw new Error}e.assertNever=r,e.arrayToEnum=a=>{const i={};for(const s of a)i[s]=s;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),s={};for(const l of i)s[l]=a[l];return e.objectValues(s)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.push(s);return i},e.find=(a,i)=>{for(const s of a)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(wt||(wt={}));var x_;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(x_||(x_={}));const Ve=wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),go=e=>{switch(typeof e){case"undefined":return Ve.undefined;case"string":return Ve.string;case"number":return Number.isNaN(e)?Ve.nan:Ve.number;case"boolean":return Ve.boolean;case"function":return Ve.function;case"bigint":return Ve.bigint;case"symbol":return Ve.symbol;case"object":return Array.isArray(e)?Ve.array:e===null?Ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ve.promise:typeof Map<"u"&&e instanceof Map?Ve.map:typeof Set<"u"&&e instanceof Set?Ve.set:typeof Date<"u"&&e instanceof Date?Ve.date:Ve.object;default:return Ve.unknown}}
vendor: 6,039 bytes, line 486
486,Se=wt.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 Xi 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(i){return i.message},n={_errors:[]},a=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(a);else if(s.code==="invalid_return_type")a(s.returnTypeError);else if(s.code==="invalid_arguments")a(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let l=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(s))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return a(this),n}static assert(t){if(!(t instanceof Xi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];r[i]=r[i]||[],r[i].push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Xi.create=e=>new Xi(e);const f1=(e,t)=>{let r;switch(e.code){case Se.invalid_type:e.received===Ve.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Se.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,wt.jsonStringifyReplacer)}`;break;case Se.unrecognized_keys:r=`Unrecognized key(s) in object: ${wt.joinValues(e.keys,", ")}`;break;case Se.invalid_union:r="Invalid input";break;case Se.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${wt.joinValues(e.options)}`;break;case Se.invalid_enum_value:r=`Invalid enum value. Expected ${wt.joinValues(e.options)}, received '${e.received}'`;break;case Se.invalid_arguments:r="Invalid function arguments";break;case Se.invalid_return_type:r="Invalid function return type";break;case Se.invalid_date:r="Invalid date";break;case Se.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}"`:wt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Se.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 Se.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 Se.custom:r="Invalid input";break;case Se.invalid_intersection_types:r="Intersection results could not be merged";break;case Se.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Se.not_finite:r="Number must be finite";break;default:r=t.defaultError,wt.assertNever(e)}return{message:r}};let L1e=f1;function B1e(){return L1e}const z1e=e=>{const{data:t,path:r,errorMaps:n,issueData:a}=e,i=[...r,...a.path||[]],s={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(s,{data:t,defaultError:l}).message;return{...a,path:i,message:l}};function Me(e,t){const r=B1e(),n=z1e({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===f1?void 0:f1].filter(a=>!!a)});e.common.issues.push(n)}class en{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 a of r){if(a.status==="aborted")return it;a.status==="dirty"&&t.dirty(),n.push(a.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const a of r){const i=await a.key,s=await a.value;n.push({key:i,value:s})}return en.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const a of r){const{key:i,value:s}=a;if(i.status==="aborted"||s.status==="aborted")return it;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||a.alwaysSet)&&(n[i.value]=s.value)}return{status:t.value,value:n}}}const it=Object.freeze({status:"aborted"}),Sd=e=>({status:"dirty",value:e}),oa=e=>
vendor: 16,569 bytes, line 486
486({status:"valid",value:e}),b_=e=>e.status==="aborted",w_=e=>e.status==="dirty",cu=e=>e.status==="valid",$g=e=>typeof Promise<"u"&&e instanceof Promise;var Ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ge||(Ge={}));class hi{constructor(t,r,n,a){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}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 j_=(e,t)=>{if(cu(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 Xi(e.common.issues);return this._error=r,this._error}}};function ct(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=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:a}:{errorMap:(s,l)=>{const{message:c}=e;return s.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:s.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:a}}class gt{get description(){return this._def.description}_getType(t){return go(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:go(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new en,ctx:{common:t.parent.common,data:t.data,parsedType:go(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if($g(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:go(t)},a=this._parseSync({data:t,path:n.path,parent:n});return j_(n,a)}"~validate"(t){var n,a;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:go(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:r});return cu(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(a=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>cu(i)?{value:i.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:go(t)},a=this._parse({data:t,path:n.path,parent:n}),i=await($g(a)?a:Promise.resolve(a));return j_(n,i)}refine(t,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const s=t(a),l=()=>i.addIssue({code:Se.custom,...n(a)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,a)=>t(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(t){return new Zo({schema:this,typeName:nt.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 Wo.create(this,this._def)}nullable(){return pu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ui.create(this)}promise(){return Lg.create(this,this._def)}or(t){return Ig.create([this,t],this._def)}and(t){return Dg.create(this,t,this._def)}transform(t){return new Zo({...ct(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new N1({...ct(this._def),innerType:this,defaultValue:r,typeName:nt.ZodDefault})}brand(){return new uje({typeName:nt.ZodBranded,type:this,...ct(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new P1({...ct(this._def),innerType:this,catchValue:r,typeName:nt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return OC.create(this,t)}readonly(){return k1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const V1e=/^c[^\s-]{8,}$/i,W1e=/^[0-9a-z]+$/,U1e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,G1e=/^[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,H1e=/^[a-z0-9_-]{21}$/i,q1e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,K1e=/^[-+]?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)?)??$/,Y1e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,X1e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let n0;const Z1e=/^(?:(?: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])$/,Q1e=/^(?:(?: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])$/,J1e=/^(([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]))$/,eje=/^(([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])$/,tje=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rje=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,W4="((\\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])))",nje=new RegExp(`^${W4}$`);function U4(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 aje(e){return new RegExp(`^${U4(e)}$`)}function ije(e){let t=`${W4}T${U4(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 oje(e,t){return!!((t==="v4"||!t)&&Z1e.test(e)||(t==="v6"||!t)&&J1e.test(e))}function sje(e,t){if(!q1e.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,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function lje(e,t){return!!((t==="v4"||!t)&&Q1e.test(e)||(t==="v6"||!t)&&eje.test(e))}class $i extends gt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ve.string){const i=this._getOrReturnCtx(t);return Me(i,{code:Se.invalid_type,expected:Ve.string,received:i.parsedType}),it}const n=new en;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,l=t.data.length<i.value;(s||l)&&(a=this._getOrReturnCtx(t,a),s?Me(a,{code:Se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&Me(a,{code:Se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Y1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"email",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")n0||(n0=new RegExp(X1e,"u")),n0.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"emoji",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")G1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"uuid",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")H1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"nanoid",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")V1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"cuid",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")W1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"cuid2",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")U1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"ulid",code:Se.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Me(a,{validation:"url",code:Se.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"regex",code:Se.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?ije(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?nje.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?aje(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?K1e.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"duration",code:Se.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?oje(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"ip",code:Se.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?sje(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"jwt",code:Se.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?lje(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"cidr",code:Se.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?tje.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"base64",code:Se.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?rje.test(t.data)||(a=this._getOrReturnCtx(t,a),Me(a,{validation:"base64url",code:Se.invalid_string,message:i.message}),n.dirty()):wt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(a=>t.test(a),{validation:r,code:Se.invalid_string,...Ge.errToObj(n)})}_addCheck(t){return new $i({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ge.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,...Ge.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,...Ge.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ge.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ge.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ge.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ge.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ge.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ge.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ge.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ge.errToObj(r)})}nonempty(t){return this.min(1,Ge.errToObj(t))}trim(){return new $i({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $i({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $i({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,672 bytes, line 486
486get 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}}$i.create=e=>new $i({checks:[],typeName:nt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});function cje(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n,i=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(t.toFixed(a).replace(".",""));return i%s/10**a}class uu extends gt{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)!==Ve.number){const i=this._getOrReturnCtx(t);return Me(i,{code:Se.invalid_type,expected:Ve.number,received:i.parsedType}),it}let n;const a=new en;for(const i of this._def.checks)i.kind==="int"?wt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?cje(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.not_finite,message:i.message}),a.dirty()):wt.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ge.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ge.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ge.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ge.toString(r))}setLimit(t,r,n,a){return new uu({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ge.toString(a)}]})}_addCheck(t){return new uu({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ge.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ge.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"&&wt.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)}
vendor: 7,695 bytes, line 486
486}uu.create=e=>new uu({checks:[],typeName:nt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class du extends gt{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)!==Ve.bigint)return this._getInvalidInput(t);let n;const a=new en;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Se.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):wt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return Me(r,{code:Se.invalid_type,expected:Ve.bigint,received:r.parsedType}),it}gte(t,r){return this.setLimit("min",t,!0,Ge.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ge.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ge.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ge.toString(r))}setLimit(t,r,n,a){return new du({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ge.toString(a)}]})}_addCheck(t){return new du({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ge.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}}du.create=e=>new du({checks:[],typeName:nt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});class h1 extends gt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ve.boolean){const n=this._getOrReturnCtx(t);return Me(n,{code:Se.invalid_type,expected:Ve.boolean,received:n.parsedType}),it}return oa(t.data)}}h1.create=e=>new h1({typeName:nt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class ih extends gt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ve.date){const i=this._getOrReturnCtx(t);return Me(i,{code:Se.invalid_type,expected:Ve.date,received:i.parsedType}),it}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:Se.invalid_date}),it}const n=new en;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),Me(a,{code:Se.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):wt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ih({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ge.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ge.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}}ih.create=e=>new ih({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:nt.ZodDate,...ct(e)});class p1 extends gt{_parse(t){if(this._getType(t)!==Ve.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:Se.invalid_type,expected:Ve.symbol,received:n.parsedType}),it}return oa(t.data)}}p1.create=e=>new p1({typeName:nt.ZodSymbol,...ct(e)});class m1 extends gt{_parse(t){if(this._getType(t)!==Ve.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Se.invalid_type,expected:Ve.undefined,received:n.parsedType}),it}return oa(t.data)}}m1.create=e=>new m1({typeName:nt.ZodUndefined,...ct(e)});class g1 extends gt{_parse(t){if(this._getType(t)!==Ve.null){const n=this._getOrReturnCtx(t);return Me(n,{code:Se.invalid_type,expected:Ve.null,received:n.parsedType}),it}return oa(t.data)}}g1.create=e=>new g1({typeName:nt.ZodNull,...ct(e)});class v1 extends gt{constructor(){super(...arguments),this._any=!0}_parse(t){return oa(t.data)}}v1.create=e=>new v1({typeName:nt.ZodAny,...ct(e)});class y1 extends gt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return oa(t.data)}}y1.create=e=>new y1({typeName:nt.ZodUnknown,...ct(e)});class Xo extends gt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:Se.invalid_type,expected:Ve.never,received:r.parsedType}),it}}Xo.create=e=>new Xo({typeName:nt.ZodNever,...ct(e)});class x1 extends gt{_parse(t){if(this._getType(t)!==Ve.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Se.invalid_type,expected:Ve.void,received:n.parsedType}),it}return oa(t.data)}}x1.create=e=>new x1({typeName:nt.ZodVoid,...ct(e)});class ui extends gt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),a=this._def;if(r.parsedType!==Ve.array)return Me(r,{code:Se.invalid_type,expected:Ve.array,received:r.parsedType}),it;if(a.exactLength!==null){const s=r.data.length>a.exactLength.value,l=r.data.length<a.exactLength.value;(s||l)&&(Me(r,{code:s?Se.too_big:Se.too_small,minimum:l?a.exactLength.value:void 0,maximum:s?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(Me(r,{code:Se.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(Me(r,{code:Se.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,l)=>a.type._parseAsync(new hi(r,s,r.path,l)))).then(s=>en.mergeArray(n,s));const i=[...r.data].map((s,l)=>a.type._parseSync(new hi(r,s,r.path,l)));return en.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new ui({...this._def,minLength:{value:t,message:Ge.toString(r)}})}max(t,r){return new ui({...this._def,maxLength:{value:t,message:Ge.toString(r)}})}length(t,r){return new ui({...this._def,exactLength:{value:t,message:Ge.toString(r)}})}nonempty(t){return this.min(1,t)}}ui.create=(e,t)=>new ui({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...ct(t)});function Rl(e){if(e instanceof Ht){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Wo.create(Rl(n))}return new Ht({...e._def,shape:()=>t})}else return e instanceof ui?new ui({...e._def,type:Rl(e.element)}):e instanceof Wo?Wo.create(Rl(e.unwrap())):e instanceof pu?pu.create(Rl(e.unwrap())):e instanceof cl?cl.create(e.items.map(t=>Rl(t))):e}class Ht extends gt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;
vendor: 4,259 bytes, line 486
486const t=this._def.shape(),r=wt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Ve.object){const u=this._getOrReturnCtx(t);return Me(u,{code:Se.invalid_type,expected:Ve.object,received:u.parsedType}),it}const{status:n,ctx:a}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),l=[];if(!(this._def.catchall instanceof Xo&&this._def.unknownKeys==="strip"))for(const u in a.data)s.includes(u)||l.push(u);const c=[];for(const u of s){const f=i[u],d=a.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new hi(a,d,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof Xo){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of l)c.push({key:{status:"valid",value:f},value:{status:"valid",value:a.data[f]}});else if(u==="strict")l.length>0&&(Me(a,{code:Se.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of l){const d=a.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new hi(a,d,a.path,f)),alwaysSet:f in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of c){const d=await f.key,h=await f.value;u.push({key:d,value:h,alwaysSet:f.alwaysSet})}return u}).then(u=>en.mergeObjectSync(n,u)):en.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ge.errToObj,new Ht({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,s;const a=((s=(i=this._def).errorMap)==null?void 0:s.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Ge.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Ht({...this._def,unknownKeys:"strip"})}passthrough(){return new Ht({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ht({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ht({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Ht({...this._def,catchall:t})}pick(t){const r={};for(const n of wt.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Ht({...this._def,shape:()=>r})}omit(t){const r={};for(const n of wt.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new Ht({...this._def,shape:()=>r})}deepPartial(){return Rl(this)}partial(t){const r={};for(const n of wt.objectKeys(this.shape)){const a=this.shape[n];t&&!t[n]?r[n]=a:r[n]=a.optional()}return new Ht({...this._def,shape:()=>r})}required(t){const r={};for(const n of wt.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Wo;)i=i._def.innerType;r[n]=i}return new Ht({...this._def,shape:()=>r})}keyof(){return G4(wt.objectKeys(this.shape))}}Ht.create=(e,t)=>new Ht({shape:()=>e,unknownKeys:"strip",catchall:Xo.create(),typeName:nt.ZodObject,...ct(t)});Ht.strictCreate=(e,t)=>new Ht({shape:()=>e,unknownKeys:"strict",catchall:Xo.create(),typeName:nt.ZodObject,...ct(t)});Ht.lazycreate=(e,t)=>new Ht({shape:e,unknownKeys:"strip",catchall:Xo.create(),typeName:nt.ZodObject,...ct(t)});class Ig extends gt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function a(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const s=i.map(l=>new Xi(l.ctx.common.issues));return Me(r,{code:Se.invalid_union,unionErrors:s}),it}if(r.common.async)return Promise.all(n.map(async i=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(a);{let i;const s=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const l=s.map(c=>new Xi(c));return Me(r,{code:Se.invalid_union,unionErrors:l}),it}}get options(){return this._def.options}}Ig.create=(e,t)=>
vendor: 3,370 bytes, line 486
486new Ig({options:e,typeName:nt.ZodUnion,...ct(t)});function b1(e,t){const r=go(e),n=go(t);if(e===t)return{valid:!0,data:e};if(r===Ve.object&&n===Ve.object){const a=wt.objectKeys(t),i=wt.objectKeys(e).filter(l=>a.indexOf(l)!==-1),s={...e,...t};for(const l of i){const c=b1(e[l],t[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}else if(r===Ve.array&&n===Ve.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const s=e[i],l=t[i],c=b1(s,l);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return r===Ve.date&&n===Ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Dg extends gt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=(i,s)=>{if(b_(i)||b_(s))return it;const l=b1(i.value,s.value);return l.valid?((w_(i)||w_(s))&&r.dirty(),{status:r.value,value:l.data}):(Me(n,{code:Se.invalid_intersection_types}),it)};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(([i,s])=>a(i,s)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Dg.create=(e,t,r)=>new Dg({left:e,right:t,typeName:nt.ZodIntersection,...ct(r)});class cl extends gt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ve.array)return Me(n,{code:Se.invalid_type,expected:Ve.array,received:n.parsedType}),it;if(n.data.length<this._def.items.length)return Me(n,{code:Se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),it;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:Se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((s,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new hi(n,s,n.path,l)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>en.mergeArray(r,s)):en.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new cl({...this._def,rest:t})}}cl.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cl({items:e,typeName:nt.ZodTuple,rest:null,...ct(t)})};class Fg extends gt{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!==Ve.object)return Me(n,{code:Se.invalid_type,expected:Ve.object,received:n.parsedType}),it;const a=[],i=this._def.keyType,s=this._def.valueType;for(const l in n.data)a.push({key:i._parse(new hi(n,l,n.path,l)),value:s._parse(new hi(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?en.mergeObjectAsync(r,a):en.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof gt?new Fg({keyType:t,valueType:r,typeName:nt.ZodRecord,...ct(n)}):new Fg({keyType:$i.create(),valueType:t,typeName:nt.ZodRecord,...ct(r)})}}class w1 extends gt{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!==Ve.map)return Me(n,{code:Se.invalid_type,expected:Ve.map,received:n.parsedType}),it;const a=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([l,c],u)=>
vendor: 4,178 bytes, line 486
486({key:a._parse(new hi(n,l,n.path,[u,"key"])),value:i._parse(new hi(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return it;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),l.set(u.value,f.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of s){const u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return it;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),l.set(u.value,f.value)}return{status:r.value,value:l}}}}w1.create=(e,t,r)=>new w1({valueType:t,keyType:e,typeName:nt.ZodMap,...ct(r)});class fu extends gt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ve.set)return Me(n,{code:Se.invalid_type,expected:Ve.set,received:n.parsedType}),it;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(Me(n,{code:Se.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(Me(n,{code:Se.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function s(c){const u=new Set;for(const f of c){if(f.status==="aborted")return it;f.status==="dirty"&&r.dirty(),u.add(f.value)}return{status:r.value,value:u}}const l=[...n.data.values()].map((c,u)=>i._parse(new hi(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>s(c)):s(l)}min(t,r){return new fu({...this._def,minSize:{value:t,message:Ge.toString(r)}})}max(t,r){return new fu({...this._def,maxSize:{value:t,message:Ge.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}fu.create=(e,t)=>new fu({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...ct(t)});class j1 extends gt{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})}}j1.create=(e,t)=>new j1({getter:e,typeName:nt.ZodLazy,...ct(t)});class S1 extends gt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:Se.invalid_literal,expected:this._def.value}),it}return{status:"valid",value:t.data}}get value(){return this._def.value}}S1.create=(e,t)=>new S1({value:e,typeName:nt.ZodLiteral,...ct(t)});function G4(e,t){return new hu({values:e,typeName:nt.ZodEnum,...ct(t)})}class hu extends gt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:wt.joinValues(n),received:r.parsedType,code:Se.invalid_type}),it}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 Me(r,{received:r.data,code:Se.invalid_enum_value,options:n}),it}return oa(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 hu.create(t,{...this._def,...r})}exclude(t,r=this._def){return hu.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}hu.create=G4;class C1 extends gt{_parse(t){const r=wt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ve.string&&n.parsedType!==Ve.number){const a=wt.objectValues(r);return Me(n,{expected:wt.joinValues(a),received:n.parsedType,code:Se.invalid_type}),it}if(this._cache||(this._cache=new Set(wt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=wt.objectValues(r);return Me(n,{received:n.data,code:Se.invalid_enum_value,options:a}),it}return oa(t.data)}get enum(){return this._def.values}}C1.create=(e,t)=>new C1({values:e,typeName:nt.ZodNativeEnum,...ct(t)});class Lg extends gt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.promise&&r.common.async===!1)return Me(r,{code:Se.invalid_type,expected:Ve.promise,received:r.parsedType}),it;
vendor: 4,098 bytes, line 486
486const n=r.parsedType===Ve.promise?r.data:Promise.resolve(r.data);return oa(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Lg.create=(e,t)=>new Lg({type:e,typeName:nt.ZodPromise,...ct(t)});class Zo extends gt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:s=>{Me(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const s=a.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async l=>{if(r.value==="aborted")return it;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?it:c.status==="dirty"||r.value==="dirty"?Sd(c.value):c});{if(r.value==="aborted")return it;const l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?it:l.status==="dirty"||r.value==="dirty"?Sd(l.value):l}}if(a.type==="refinement"){const s=l=>{const c=a.refinement(l,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?it:(l.status==="dirty"&&r.dirty(),s(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?it:(l.status==="dirty"&&r.dirty(),s(l.value).then(()=>({status:r.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!cu(s))return it;const l=a.transform(s.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>cu(s)?Promise.resolve(a.transform(s.value,i)).then(l=>({status:r.value,value:l})):it);wt.assertNever(a)}}Zo.create=(e,t,r)=>new Zo({schema:e,typeName:nt.ZodEffects,effect:t,...ct(r)});Zo.createWithPreprocess=(e,t,r)=>new Zo({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...ct(r)});class Wo extends gt{_parse(t){return this._getType(t)===Ve.undefined?oa(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wo.create=(e,t)=>new Wo({innerType:e,typeName:nt.ZodOptional,...ct(t)});class pu extends gt{_parse(t){return this._getType(t)===Ve.null?oa(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pu.create=(e,t)=>new pu({innerType:e,typeName:nt.ZodNullable,...ct(t)});class N1 extends gt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ve.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}N1.create=(e,t)=>new N1({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class P1 extends gt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return $g(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xi(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Xi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}P1.create=(e,t)=>new P1({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class A1 extends gt{_parse(t){if(this._getType(t)!==Ve.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:Se.invalid_type,expected:Ve.nan,received:n.parsedType}),it}
486return{status:"valid",value:t.data}}}A1.create=e=>new A1({typeName:nt.ZodNaN,...ct(e)});class uje extends gt{_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 OC extends gt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?it:i.status==="dirty"?(r.dirty(),Sd(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?it:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(t,r){return new OC({in:t,out:r,typeName:nt.ZodPipeline})}}class k1 extends gt{_parse(t){const r=this._def.innerType._parse(t),n=a=>(cu(a)&&(a.value=Object.freeze(a.value)),a);return $g(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}k1.create=(e,t)=>new k1({innerType:e,typeName:nt.ZodReadonly,...ct(t)});Ht.lazycreate;var nt;(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"})(nt||(nt={}));const gd=$i.create,dje=uu.create;A1.create;du.create;const fje=h1.create;ih.create;p1.create;m1.create;g1.create;const Sp=v1.create,Hu=y1.create;Xo.create;x1.create;const a0=ui.create,qu=Ht.create;Ht.strictCreate;Ig.create;Dg.create;cl.create;const hje=Fg.create;w1.create;fu.create;j1.create;S1.create;hu.create;C1.create;Lg.create;Zo.create;Wo.create;pu.create;Zo.createWithPreprocess;const EC={equityInvestment:25e4,grantFunding:1e5,grossProfit:8e4,employees:[{name:"Jane Doe (CEO)",cost:1e5},{name:"John Doe (CTO)",cost:55e3}],inflationRate:25,totalLiabilities:2e4,bookAssets:3e5,bookLiabilities:5e4,fairValueAdjustment:25e3,liquidationAssets:25e4,liquidationDiscount:30,useCostToReplicate:!0,useAdjustedBookValue:!0,useLiquidationValue:!0},_C={soundIdea:1e5,prototype:1e5,qualityTeam:1e5,strategicRelationships:1e5,productRollout:1e5,averagePreMoneyValuation:5e5,teamScore:100,opportunityScore:100,productScore:100,competitiveScore:100,marketingScore:100,needForCapital:100,riskAdjustmentPerPoint:1e5,riskManagement:0,riskStage:0,riskLegislation:0,riskManufacturing:0,riskSales:0,riskFunding:0,riskCompetition:0,riskTechnology:0,riskLitigation:0,riskInternational:0,riskReputation:0,riskPotentialLucrative:0,useBerkus:!0,useScorecard:!0,useRiskFactor:!0},TC={discountRate:15,terminalGrowthRate:3,defaultRisk:75,totalDebt:0,cashAndEquivalents:0},MC={revenueMultiple:1,ebitdaMultiple:8,targetOwnership:20,exitYear:5,targetReturn:40,useRevenueMultiple:!0,useEbitdaMultiple:!0},H4={assetWeight:25,preRevenueWeight:25,marketWeight:25,dcfWeight:25},q4=15,or=e=>Array(q4).fill(e),ha=e=>{const t=[...e],r=e[e.length-1]??0;for(;t.length<q4;)t.push(r);return t},pje={segments:[{id:"seg-1",name:"Product A",units:ha([1e3,1500,2200,3e3,4e3,5200,6500]),price:ha([1e3,1e3,1e3,1e3,1e3,1e3,1e3]),directCosts:ha([350,330,320,300,290,280,270]),useDirectCosts:!0}],employees:[{id:"emp-1",type:"CEO",yearlyCost:or(12e4),category:"SG&A",headcount:or(1)},{id:"emp-2",type:"Senior Engineer",yearlyCost:or(1e5),category:"R&D",headcount:or(2)},{id:"emp-3",type:"Sales / Marketing",yearlyCost:or(8e4),category:"SG&A",headcount:or(1)}],overheads:[{id:"oh-1",name:"Office & Rent",amount:or(24e3),category:"SG&A"},{id:"oh-2",name:"Software & Tools",amount:or(12e3),category:"R&D"},{id:"oh-3",name:"Marketing",amount:or(3e4),category:"SG&A"}],flexibleCosts:[{id:"fc-1",name:"Payment processing",percent:or(2),category:"SG&A"},{id:"fc-2",name:"Sales commission",percent:or(5),category:"SG&A"},{id:"fc-3",name:"Variable marketing",percent:or(8),category:"SG&A"},{id:"fc-4",name:"Customer success",percent:or(3),category:"SG&A"}],workingCapitalDays:{arDays:or(45),inventoryDays:or(60),apDays:or(30)},ratios:{grossMargin:ha([65,67,68,70,71,72,73]),sgaPercent:ha([35,33,31,30,28,27,26]),rdPercent:ha([15,14,13,12,11,10,10]),depreciationPercent:ha([5,5,4.5,4,4,3.5,3]),amortizationPercent:ha([2,2,2,1.5,1.5,1,1]),interestIncomePercent:or(0),interestExpensePercent:ha([3,2.5,2,1.5,1,.5,.5]),workingCapitalPercent:ha([8,7,7,6,6,5,5]),capexPercent:ha([7,6,6,5,5,4,4]),taxRate:or(25),dividendPercent:or(25)}},kr=dje().refine(e=>Number.isFinite(e),{message:"must be a finite number"}),mje=qu({}).catchall(Hu()).optional(),gje=qu({}).catchall(Hu()).optional(),vje=qu({discountRate:kr.optional(),terminalGrowthRate:kr.optional(),defaultRisk:kr.optional(),totalDebt:kr.optional(),cashAndEquivalents:kr.optional()}).catchall(Hu()).optional(),yje=qu({revenueMultiple:kr.optional(),ebitdaMultiple:kr.optional(),exitYear:kr.optional(),targetReturn:kr.optional()}).catchall(Hu()).optional(),xje=qu({assetWeight:kr.optional(),preRevenueWeight:kr.optional(),marketWeight:kr.optional(),dcfWeight:kr.optional()}).catchall(Hu()).optional(),K4=qu({id:gd().optional(),name:gd().optional(),date:gd().optional(),companyName:gd().optional(),currency:gd().optional(),valuations:hje(Sp()).optional(),investmentAmount:kr.optional(),preMoneyValuation:kr.optional(),isInitialPreferred:fje().optional(),initialLiquidationMultiple:kr.optional(),futureRounds:a0(Sp()).optional(),numYears:kr.optional(),projections:a0(Sp()).optional(),assetBasedState:mje,preRevenueState:gje,dcfState:vje,marketBasedState:yje,weightedAverageState:xje,historicData:a0(Sp()).optional()}).catchall(Hu()),Y4=e=>{const t=K4.safeParse(e);if(!t.success)return{ok:!1,warnings:[],error:t.error.issues.map(s=>`${s.path.join(".")||"root"}: ${s.message}`).join("; ")};const r=[],n=t.data,a=(s,l,c)=>Array.isArray(l)?l:(r.push(`${s} was missing or not an array — defaulting to ${c.length} entries.`),c),i={id:n.id??Date.now().toString(),name:n.name??"Imported Model",date:n.date??new Date().toISOString(),companyName:n.companyName??"",currency:n.currency??"GBP",valuations:n.valuations??{assetBased:0,preRevenue:0,marketBased:0,dcf:0},investmentAmount:Number.isFinite(n.investmentAmount)?n.investmentAmount:0,preMoneyValuation:Number.isFinite(n.preMoneyValuation)?n.preMoneyValuation:0,isInitialPreferred:!!n.isInitialPreferred,initialLiquidationMultiple:Number.isFinite(n.initialLiquidationMultiple)?n.initialLiquidationMultiple:1,futureRounds:a("futureRounds",n.futureRounds,[]),numYears:Number.isFinite(n.numYears)?n.numYears:7,projections:a("projections",n.projections,[]),assetBasedState:{...EC,...n.assetBasedState??{}},preRevenueState:{..._C,...n.preRevenueState??{}},dcfState:{...TC,...n.dcfState??{}},marketBasedState:{...MC,...n.marketBasedState??{}},weightedAverageState:{...H4,...n.weightedAverageState??{}},historicData:Array.isArray(n.historicData)?n.historicData:[]};return n.dcfState||r.push("dcfState missing — DCF defaults applied."),n.marketBasedState||r.push("marketBasedState missing — Market defaults applied."),n.assetBasedState||r.push("assetBasedState missing — Asset defaults applied."),n.preRevenueState||r.push("preRevenueState missing — Pre-Revenue defaults applied."),n.weightedAverageState||r.push("weightedAverageState missing — weight defaults applied."),{ok:!0,model:i,warnings:r}},bje=Object.freeze(Object.defineProperty({__proto__:null,parseSavedModel:Y4,savedModelSchema:K4},Symbol.toStringTag,{value:"Module"})),wje=({companyName:e,currency:t,valuations:r,investmentAmount:n,preMoneyValuation:a,isInitialPreferred:i,initialLiquidationMultiple:s,futureRounds:l,numYears:c,projections:u,assetBasedState:f,preRevenueState:d,dcfState:h,marketBasedState:m,weightedAverageState:p,historicData:g,onLoad:v,onReset:y,onLoadSample:x})=>{const[b,S]=w.useState(""),[j,C]=w.useState(null),[N,P]=w.useState(()=>{const W=localStorage.getItem("valuationModels");return W?JSON.parse(W):[]}),[A,O]=w.useState(!1),[M,k]=w.useState(!1),[E,$]=w.useState(!1),[T,R]=w.useState(new Set),B=w.useRef(null),F=()=>
486{if(!b.trim()&&!j){rt.error("Please enter a model name or select an existing model");return}if(j){const W=N.find(q=>q.id===j),H={id:j,name:b.trim()||(W==null?void 0:W.name)||"Untitled",date:new Date().toISOString(),companyName:e,currency:t,valuations:r,investmentAmount:n,preMoneyValuation:a,isInitialPreferred:i,initialLiquidationMultiple:s,futureRounds:l,numYears:c,projections:u,assetBasedState:f,preRevenueState:d,dcfState:h,marketBasedState:m,weightedAverageState:p,historicData:g},me=N.map(q=>q.id===j?H:q);localStorage.setItem("valuationModels",JSON.stringify(me)),P(me),S(""),C(null),O(!1),rt.success(`Model "${H.name}" updated successfully`)}else{const W={id:Date.now().toString(),name:b,date:new Date().toISOString(),companyName:e,currency:t,valuations:r,investmentAmount:n,preMoneyValuation:a,isInitialPreferred:i,initialLiquidationMultiple:s,futureRounds:l,numYears:c,projections:u,assetBasedState:f,preRevenueState:d,dcfState:h,marketBasedState:m,weightedAverageState:p,historicData:g},H=[...N,W];localStorage.setItem("valuationModels",JSON.stringify(H)),P(H),S(""),O(!1),rt.success(`Model "${W.name}" saved successfully`)}},D=W=>{v(W),k(!1),rt.success(`Model "${W.name}" loaded successfully`)},G=W=>{const H=N.filter(me=>me.id!==W);localStorage.setItem("valuationModels",JSON.stringify(H)),P(H),rt.success("Model deleted successfully")},K=W=>{const H=new Blob([JSON.stringify(W,null,2)],{type:"application/json"}),me=URL.createObjectURL(H),q=document.createElement("a");q.href=me,q.download=`${W.name.replace(/[^a-z0-9]/gi,"_")}.json`,q.click(),URL.revokeObjectURL(me),rt.success(`Model "${W.name}" exported`)},z=()=>{if(N.length===0){rt.error("No models to export");return}const W=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),H=URL.createObjectURL(W),me=document.createElement("a");me.href=H,me.download="valuation_models.json",me.click(),URL.revokeObjectURL(H),rt.success(`Exported ${N.length} model(s)`)},U=()=>{const W=N.filter(I=>T.has(I.id));if(W.length===0){rt.error("Select at least one model");return}const H=W.length===1?W[0]:W,me=new Blob([JSON.stringify(H,null,2)],{type:"application/json"}),q=URL.createObjectURL(me),ue=document.createElement("a");ue.href=q,ue.download=W.length===1?`${W[0].name.replace(/[^a-z0-9]/gi,"_")}.json`:"valuation_models_selected.json",ue.click(),URL.revokeObjectURL(q),rt.success(`Exported ${W.length} model(s)`),$(!1),R(new Set)},ee=()=>{const W={id:Date.now().toString(),name:(e==null?void 0:e.trim())||"Current Model",date:new Date().toISOString(),companyName:e,currency:t,valuations:r,investmentAmount:n,preMoneyValuation:a,isInitialPreferred:i,initialLiquidationMultiple:s,futureRounds:l,numYears:c,projections:u,assetBasedState:f,preRevenueState:d,dcfState:h,marketBasedState:m,weightedAverageState:p,historicData:g},H=new Blob([JSON.stringify(W,null,2)],{type:"application/json"}),me=URL.createObjectURL(H),q=document.createElement("a");q.href=me,q.download=`${W.name.replace(/[^a-z0-9]/gi,"_")}.json`,q.click(),URL.revokeObjectURL(me),rt.success(`Exported "${W.name}"`)},Y=W=>{var q;const H=(q=W.target.files)==null?void 0:q[0];if(!H)return;const me=new FileReader;me.onload=ue=>{var I;try{const L=JSON.parse((I=ue.target)==null?void 0:I.result),Q=Array.isArray(L)?L:[L],le=[],V=[];
486if(Q.forEach((ae,ye)=>{const X=Y4(ae);if(!X.ok||!X.model){V.push(`Model ${ye+1}: ${X.error??"unknown validation error"}`);return}X.warnings.length>0&&rt.warning(`Model "${X.model.name}" imported with warnings`,{description:X.warnings.slice(0,3).join(" • ")}),le.push({...X.model,id:Date.now().toString()+Math.random().toString(36).slice(2)})}),le.length===0){rt.error("No valid models in file",{description:V[0]});return}const oe=[...N,...le];localStorage.setItem("valuationModels",JSON.stringify(oe)),P(oe),rt.success(`Imported ${le.length} model(s)`),V.length>0&&rt.warning(`${V.length} model(s) skipped`,{description:V[0]})}catch{rt.error("Invalid JSON file")}},me.readAsText(H),W.target.value=""};return o.jsxs("div",{className:"flex items-center justify-center gap-2 flex-wrap",children:[o.jsx("input",{type:"file",ref:B,accept:".json",className:"hidden",onChange:Y}),o.jsxs("div",{className:"flex items-center gap-2 border border-border rounded-lg px-3 py-1.5 bg-background",children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground mr-1",children:"Models"}),o.jsxs(pc,{open:A,onOpenChange:O,children:[o.jsx(Vd,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",title:"Save your current valuation inputs to the browser",children:[o.jsx(vm,{className:"h-4 w-4 mr-1"}),"Save"]})}),o.jsxs(Us,{children:[o.jsxs(Gs,{children:[o.jsx(Hs,{children:"Save Valuation Model"}),o.jsx(qs,{children:"Save your current valuation inputs locally."})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"rounded-md border border-border bg-muted/50 p-3 text-sm text-muted-foreground",children:[o.jsx("p",{className:"font-medium text-foreground mb-1",children:"How it works:"}),o.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[o.jsxs("li",{children:[o.jsx("strong",{children:"Save"})," your model here to store it in your browser."]}),o.jsxs("li",{children:["Use ",o.jsx("strong",{children:"Export"})," to download your saved models as a JSON file."]}),o.jsxs("li",{children:["To restore later, use ",o.jsx("strong",{children:"Import"})," to upload the JSON file, then ",o.jsx("strong",{children:"Load"})," to apply it."]})]})]}),N.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{children:"Overwrite existing model (optional)"}),o.jsx("div",{className:"max-h-32 overflow-y-auto rounded-md border border-border",children:N.map(W=>o.jsxs("button",{type:"button",onClick:()=>{j===W.id?(C(null),S("")):(C(W.id),S(W.name))},className:`w-full text-left px-3 py-2 text-sm hover:bg-muted/50 flex justify-between items-center ${j===W.id?"bg-primary/10 border-l-2 border-primary":""}`,children:[o.jsx("span",{className:"font-medium",children:W.name}),o.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(W.date).toLocaleDateString()})]},W.id))}),j&&o.jsx("p",{className:"text-xs text-muted-foreground",children:"Selected model will be overwritten. Edit the name above if needed."})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{htmlFor:"modelName",children:j?"Model Name (editable)":"New Model Name"}),o.jsx(Qe,{id:"modelName",placeholder:"e.g., Q4 2024 Valuation",value:b,onChange:W=>S(W.target.value),onKeyDown:W=>W.key==="Enter"&&F()})]}),o.jsx(Ce,{onClick:F,className:"w-full",children:j?"Update Model":"Save Model"})]})]})]}),o.jsxs(pc,{open:M,onOpenChange:k,children:[o.jsx(Vd,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",title:"Load a previously saved valuation model",children:[o.jsx(VM,{className:"h-4 w-4 mr-1"}),"Load"]}
486)}),o.jsxs(Us,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Gs,{children:[o.jsx(Hs,{children:"Load Valuation Model"}),o.jsxs(qs,{children:["Select a saved model to load. Use ",o.jsx("strong",{children:"Import"})," first if you have a JSON file."]})]}),o.jsx("div",{className:"space-y-2 py-4",children:N.length===0?o.jsxs("div",{className:"text-center py-8 space-y-2",children:[o.jsx("p",{className:"text-muted-foreground",children:"No saved models found."}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Use ",o.jsx("strong",{children:"Save"})," or ",o.jsx("strong",{children:"Import"})," to get started."]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between mb-2",children:[o.jsxs(Mg,{children:[o.jsx(Rg,{asChild:!0,children:o.jsxs(Ce,{variant:"destructive",size:"sm",children:[o.jsx(Oa,{className:"h-4 w-4 mr-2"}),"Delete All"]})}),o.jsxs(Qf,{children:[o.jsxs(Jf,{children:[o.jsx(th,{children:"Delete All Saved Models?"}),o.jsxs(rh,{children:["This will permanently remove all ",N.length," saved model(s) from your browser. This cannot be undone."]})]}),o.jsxs(eh,{children:[o.jsx(ah,{children:"Cancel"}),o.jsx(nh,{onClick:()=>{localStorage.removeItem("valuationModels"),P([]),rt.success("All saved models deleted")},children:"Delete All"})]})]})]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:z,children:[o.jsx(Un,{className:"h-4 w-4 mr-2"}),"Export All"]})]}),N.map(W=>o.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"font-semibold",children:W.name}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[new Date(W.date).toLocaleDateString()," • ",W.currency]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>K(W),title:"Export as JSON",children:o.jsx(Un,{className:"h-4 w-4"})}),o.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>D(W),children:"Load"}),o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>G(W.id),children:o.jsx(Oa,{className:"h-4 w-4"})})]})]},W.id))]})})]})]}),o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:ee,title:"Download the current (unsaved) model as a JSON file",children:[o.jsx(Un,{className:"h-4 w-4 mr-1"}),"Export Current"]}),o.jsxs(pc,{open:E,onOpenChange:W=>{$(W),W||R(new Set)},children:[o.jsx(Vd,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",title:"Choose which saved models to export as JSON",children:[o.jsx(Un,{className:"h-4 w-4 mr-1"}),"Export Saved…"]})}),o.jsxs(Us,{className:"max-w-lg max-h-[80vh] overflow-y-auto",children:[o.jsxs(Gs,{children:[o.jsx(Hs,{children:"Export Saved Models"}),o.jsx(qs,{children:"Select which saved models to include in the JSON export."})]}),o.jsx("div",{className:"space-y-3 py-2",children:N.length===0?o.jsxs("p",{className:"text-sm text-muted-foreground text-center py-6",children:["No saved models. Use ",o.jsx("strong",{children:"Save"})," first."]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between items-center text-sm",children:[o.jsxs("span",{className:"text-muted-foreground",children:[T.size," of ",N.length," selected"]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>R(new Set(N.map(W=>W.id))),children:"Select all"}),o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>R(new Set),children:"Clear"})]})]}),o.jsx("div",{className:"max-h-72 overflow-y-auto rounded-md border border-border divide-y",children:N.map(W=>{const H=T.has(W.id);return o.jsxs("label",{className:"flex items-center gap-3 px-3 py-2 text-sm hover:bg-muted/50 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:H,onChange:me=>{const q=new Set(T);me.target.checked?q.add(W.id):q.delete(W.id),R(q)}}),o.jsx("span",{className:"flex-1 font-medium",children:W.name}),o.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(W.date).toLocaleDateString()})]},W.id)})}),o.jsxs(Ce,{onClick:U,className:"w-full",disabled:T.size===0,children:[o.jsx(Un,{className:"h-4 w-4 mr-2"}),"Export ",T.size>0?`${T.size} model(s)`:""]})]})})]})]}),o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:z,title:"Download all saved models as a JSON file",children:[o.jsx(Un,{className:"h-4 w-4 mr-1"}),"Export All"]}),o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:()=>{var W;return(W=B.current)==null?void 0:W.click()},title:"Import models from a JSON file",children:[o.jsx(HM,{className:"h-4 w-4 mr-1"}),"Import"]})]}),o.jsxs("div",{className:"flex items-center gap-2 border border-border rounded-lg px-3 py-1.5 bg-background",children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground mr-1",children:"CSV"}),o.jsx(F1e,{onLoad:v,companyName:e,currency:t,numYears:c,investmentAmount:n,preMoneyValuation:a,isInitialPreferred:i,initialLiquidationMultiple:s,futureRounds:l,projections:u,assetBasedState:f,preRevenueState:d,dcfState:h,marketBasedState:m,weightedAverageState:p})]}),o.jsxs("div",{className:"flex items-center gap-2 border border-border rounded-lg px-3 py-1.5 bg-background",children:[o.jsxs(Ce,{variant:"outline",size:"sm",onClick:()=>{x(),rt.success("Sample data loaded")},title:"Load example data to explore the tool",children:[o.jsx(E8,{className:"h-4 w-4 mr-1"}),"Sample Data"]}),o.jsxs(Mg,{children:[o.jsx(Rg,{asChild:!0,children:o.jsxs(Ce,{variant:"destructive",size:"sm",title:"Reset all inputs and start fresh — saved models are not deleted",children:[o.jsx(Mj,{className:"h-4 w-4 mr-2"}),"Clear All Data"]})}),o.jsxs(Qf,{children:[o.jsxs(Jf,{children:[o.jsx(th,{children:"Clear All Data?"}),o.jsxs(rh,{children:["This will reset all inputs and start fresh. Your saved models will ",o.jsx("strong",{children:"not"})," be deleted."]})]}),o.jsxs(eh,{children:[o.jsx(ah,{children:"Cancel"}),o.jsx(nh,{onClick:()=>{y(),rt.success("All data cleared — starting fresh")},children:"Clear All Data"})]})]})]})]})]})};function jje(e,t,r,n,a,i,s){let l=0;for(let N=0;N<=t;N++){const P=e[N];if(!P)continue;const A=P.grossProfitOverride!=null?P.grossProfitOverride:P.revenue*(P.grossMargin/100),O=P.sgaOverride!=null?P.sgaOverride:P.revenue*(P.sgaPercent/100),M=P.rdOverride!=null?P.rdOverride:P.revenue*(P.rdPercent/100),k=P.ebitdaOverride!=null?P.ebitdaOverride:A-O-M,E=P.depreciationOverride!=null?P.depreciationOverride:P.revenue*(P.depreciationPercent/100),$=P.amortizationOverride!=null?P.amortizationOverride:P.revenue*(P.amortizationPercent/100),F=((P.ebitOverride!=null?P.ebitOverride:k-E-$)*(1-P.taxRate/100)+E+$-P.revenue*(P.capexPercent/100)-P.revenue*(P.
486workingCapitalPercent/100))/Math.pow(1+r/100,N+1);l+=F}const c=Math.min(t,e.length-1),u=e[c];if(!u)return 0;const f=u.grossProfitOverride!=null?u.grossProfitOverride:u.revenue*(u.grossMargin/100),d=u.sgaOverride!=null?u.sgaOverride:u.revenue*(u.sgaPercent/100),h=u.rdOverride!=null?u.rdOverride:u.revenue*(u.rdPercent/100),m=u.ebitdaOverride!=null?u.ebitdaOverride:f-d-h,p=u.depreciationOverride!=null?u.depreciationOverride:u.revenue*(u.depreciationPercent/100),g=u.amortizationOverride!=null?u.amortizationOverride:u.revenue*(u.amortizationPercent/100),S=((u.ebitOverride!=null?u.ebitOverride:m-p-g)*(1-u.taxRate/100)+p+g-u.revenue*(u.capexPercent/100)-u.revenue*(u.workingCapitalPercent/100))*(1+n/100)/(r/100-n/100)/Math.pow(1+r/100,t+1);return(l+S)*(1-a/100)-i+s}function Sje(e,t,r,n,a){const{revenueMultiple:i,ebitdaMultiple:s,exitYear:l,targetReturn:c,useRevenueMultiple:u,useEbitdaMultiple:f}=t,d=Math.min(l-1,e.length-1),h=e[d];if(!h)return 0;const m=h.revenue||0,p=h.grossProfitOverride!=null?h.grossProfitOverride:m*(h.grossMargin||0)/100,g=h.sgaOverride!=null?h.sgaOverride:m*(h.sgaPercent||0)/100,v=h.rdOverride!=null?h.rdOverride:m*(h.rdPercent||0)/100,y=p-g-v,x=h.ebitdaOverride!=null?h.ebitdaOverride:y,b=n+r;let S=b>0?r/b*100:0;a.filter($=>$.investmentAmount>0&&$.preMoneyValuation>0).forEach($=>{const T=$.preMoneyValuation+$.investmentAmount;S*=1-$.investmentAmount/T});const j=m*i,C=x*s,N=[];u&&N.push(j),f&&N.push(C);const A=(N.length>0?N.reduce(($,T)=>$+T,0)/N.length:0)*(S/100),O=Math.pow(1+c/100,l),M=A/O,k=b>0?r/b*100:0,E=k>0?M/k*100:0;return Math.max(0,E-r)}function S_({title:e,description:t,tooltipText:r,paramOptions:n,paramLabels:a,valueName:i,data:s,parameter:l,setParameter:c,variation:u,setVariation:f,currency:d}){return o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-2",children:[e,o.jsxs(_e,{children:[o.jsx(Te,{children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground"})}),o.jsx(Ee,{className:"max-w-xs",children:r})]})]})}),o.jsxs(pt,{className:"space-y-4",children:[o.jsx("div",{className:"rounded-md border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground space-y-1",children:o.jsx("p",{children:t})}),o.jsxs("div",{className:"flex flex-wrap gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(qe,{children:"Parameter"}),o.jsxs(Ca,{value:l,onValueChange:c,children:[o.jsx(Gn,{className:"w-48",children:o.jsx(Na,{})}),o.jsx(Hn,{children:n.map(h=>o.jsx(rr,{value:h.value,children:h.label},h.value))})]})]}),o.jsxs("div",{className:"space-y-1 min-w-[200px]",children:[o.jsxs(qe,{children:["Variation: ±",u,"%"]}),o.jsx(ei,{value:[u],onValueChange:([h])=>f(h),min:5,max:50,step:5})]})]}),o.jsx("div",{className:"h-72",children:o.jsx(Ko,{width:"100%",height:"100%",children:o.jsxs(BF,{data:s,children:[o.jsx(Yo,{strokeDasharray:"3 3",className:"stroke-border"}),o.jsx(ra,{dataKey:"label",className:"text-xs"}),o.jsx(na,{tickFormatter:h=>ne(h,d),className:"text-xs",width:100}),o.jsx(Vr,{formatter:h=>ne(h,d),labelFormatter:h=>`${a[l]}: ${h}`}),o.jsx(oi,{}),o.jsx(Gu,{type:"monotone",dataKey:"value",name:i,className:"stroke-primary",strokeWidth:2,dot:{r:4}})]})})}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full text-sm border-collapse",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border",children:[o.jsx("th",{className:"p-2 text-left",children:"Change"}),o.jsx("th",{className:"p-2 text-right",children:a[l]}),o.jsx("th",{className:"p-2 text-right",children:i})]})}),o.jsx("tbody",{children:s.map((h,m)=>o.jsxs("tr",{className:`border-b border-border ${h.label==="+0%"?"bg-primary/5 font-semibold":""}`,children:[o.jsx("td",{className:"p-2",children:h.label}),o.jsx("td",{className:"p-2 text-right",children:h.paramValue}),o.jsx("td",{className:"p-2 text-right",children:ne(h.value,d)})]},m))})]})})]})]})}const Cje=({currency:e,dcfState:t,marketBasedState:r,projections:n,numYears:a,investmentAmount:i,preMoneyValuation:s,futureRounds:l})=>{const[c,u]=w.useState("discountRate"),[f,d]=w.useState(20),[h,m]=w.useState("revenueMultiple"),[p,g]=w.useState(20),v={discountRate:"Discount Rate (WACC)",terminalGrowthRate:"Terminal Growth Rate",defaultRisk:"Default Risk"},y={revenueMultiple:"Revenue Multiple",ebitdaMultiple:"EBITDA Multiple",targetReturn:"Target IRR",exitYear:"Exit Year"},x=(j,C,N,P)=>{const O=[];for(let M=0;M<9;M++){const k=-C+2*C*M/8,E=j*(1+k/100);O.push({label:`${k>0?"+":""}${k.toFixed(0)}%`,paramValue:P(E),value:Math.max(0,N(E))})}return O},b=w.useMemo(()=>{const j=t[c];return x(j,f,C=>{const N={...t,[c]:C};return jje(n,a,N.discountRate,N.terminalGrowthRate,N.defaultRisk,N.totalDebt,N.cashAndEquivalents)},C=>`${C.toFixed(1)}%`)},[c,f,t,n,a]),S=w.useMemo(()=>{const j=r[h],C=h==="revenueMultiple"||h==="ebitdaMultiple",N=h==="exitYear";return x(j,p,P=>{const A={...r,[h]:N?Math.max(1,Math.round(P)):P};return Sje(n,A,i,s,l)},P=>C?`${P.toFixed(1)}x`:N?`${Math.round(P)}`:`${P.toFixed(1)}%`)},[h,p,r,n,i,s,l]);return o.jsx(nn,{children:o.jsxs("div",{className:"space-y-8",children:[o.jsx(S_,{title:"Sensitivity Analysis — Intrinsic Based (DCF) Valuation",tooltipText:"Shows how the DCF equity valuation changes when a key assumption is varied.",description:"This analysis tests how sensitive your Intrinsic Based (Unlevered DCF) equity valuation is to changes in key assumptions. It recalculates the DCF model — including present value of free cash flows, terminal value, default risk adjustment, and net debt — across a range of values for the selected parameter.",paramOptions:[{value:"discountRate",label:"Discount Rate"},{value:"terminalGrowthRate",label:"Terminal Growth"},{value:"defaultRisk",label:"Default Risk"}],paramLabels:v,valueName:"DCF Equity Value",data:b,parameter:c,setParameter:u,variation:f,setVariation:d,currency:e}),o.jsx(S_,{title:"Sensitivity Analysis — Market-Based (VC Method) Valuation",tooltipText:"Shows how the Market-Based (VC Method) pre-money valuation changes when a key assumption is varied.",description:"This analysis tests how sensitive your Market-Based (VC Method) pre-money valuation is to changes in key input
486s. It recalculates the exit value, investor ownership after dilution, and the discounted present value across a range of values for the selected parameter. Use it to see how multiples, target IRR, and exit timing affect your implied valuation.",paramOptions:[{value:"revenueMultiple",label:"Revenue Multiple"},{value:"ebitdaMultiple",label:"EBITDA Multiple"},{value:"targetReturn",label:"Target IRR"},{value:"exitYear",label:"Exit Year"}],paramLabels:y,valueName:"Market-Based Pre-Money",data:S,parameter:h,setParameter:m,variation:p,setVariation:g,currency:e})]})})};function Bg(e){const t=e.grossProfitOverride!=null?e.grossProfitOverride:e.revenue*(e.grossMargin/100),r=e.sgaOverride!=null?e.sgaOverride:e.revenue*(e.sgaPercent/100),n=e.rdOverride!=null?e.rdOverride:e.revenue*(e.rdPercent/100),a=e.ebitdaOverride!=null?e.ebitdaOverride:t-r-n,i=e.depreciationOverride!=null?e.depreciationOverride:e.revenue*(e.depreciationPercent/100),s=e.amortizationOverride!=null?e.amortizationOverride:e.revenue*(e.amortizationPercent/100);return(e.ebitOverride!=null?e.ebitOverride:a-i-s)*(1-e.taxRate/100)+i+s-e.revenue*(e.capexPercent/100)-e.revenue*(e.workingCapitalPercent/100)}function C_(e,t,r,n,a,i,s){let l=0;for(let p=0;p<=t;p++){const g=e[p];if(!g)continue;const v=Bg(g);l+=v/Math.pow(1+r/100,p+1)}const c=Math.min(t,e.length-1),u=e[c];if(!u)return 0;const h=Bg(u)*(1+n/100)/(r/100-n/100)/Math.pow(1+r/100,t+1);return(l+h)*(1-a/100)-i+s}function N_(e,t,r,n,a){const{revenueMultiple:i,ebitdaMultiple:s,exitYear:l,targetReturn:c,useRevenueMultiple:u,useEbitdaMultiple:f}=t,d=Math.min(l-1,e.length-1),h=e[d];if(!h)return 0;const m=h.revenue||0,p=h.grossProfitOverride!=null?h.grossProfitOverride:m*(h.grossMargin||0)/100,g=h.sgaOverride!=null?h.sgaOverride:m*(h.sgaPercent||0)/100,v=h.rdOverride!=null?h.rdOverride:m*(h.rdPercent||0)/100,y=h.ebitdaOverride!=null?h.ebitdaOverride:p-g-v,x=n+r;let b=x>0?r/x*100:0;a.filter(M=>M.investmentAmount>0&&M.preMoneyValuation>0).forEach(M=>{b*=1-M.investmentAmount/(M.preMoneyValuation+M.investmentAmount)});const S=[];u&&S.push(m*i),f&&S.push(y*s);const C=(S.length>0?S.reduce((M,k)=>M+k,0)/S.length:0)*(b/100),N=Math.pow(1+c/100,l),P=C/N,A=x>0?r/x*100:0,O=A>0?P/A*100:0;return Math.max(0,O-r)}function gs(e,t){let r=0,n=0;for(;r===0;)r=Math.random();for(;n===0;)n=Math.random();
486return e+t*Math.sqrt(-2*Math.log(r))*Math.cos(2*Math.PI*n)}function Ha(e,t){if(e.length===0)return 0;const r=t/100*(e.length-1),n=Math.floor(r),a=Math.ceil(r);return n===a?e[n]:e[n]+(e[a]-e[n])*(r-n)}const Nje=({currency:e,dcfState:t,marketBasedState:r,projections:n,numYears:a,investmentAmount:i,preMoneyValuation:s,futureRounds:l})=>{var C,N,P;const[c,u]=w.useState("dcf"),[f,d]=w.useState(5e3),[h,m]=w.useState(20),[p,g]=w.useState(null),[v,y]=w.useState(!1),x=w.useCallback(A=>ne(A,e),[e]),b=w.useCallback(()=>{y(!0),setTimeout(()=>{const A=[],O=h/100,M=Math.min(a+1,n.length),k=Array.from({length:M},()=>[]);for(let U=0;U<f;U++){const ee=gs(1,O),Y=n.map(W=>({...W,revenue:W.revenue*ee}));for(let W=0;W<M;W++)if(Y[W]){const H=Bg(Y[W]);isFinite(H)&&k[W].push(H)}if(c==="dcf"){const W=gs(t.discountRate,t.discountRate*O),H=gs(t.terminalGrowthRate,Math.max(t.terminalGrowthRate*O,.5)),me=Math.max(0,Math.min(100,gs(t.defaultRisk,t.defaultRisk*O||5))),q=C_(Y,a,Math.max(1,W),Math.max(0,H),me,t.totalDebt,t.cashAndEquivalents);isFinite(q)&&A.push(q)}else{const W=gs(r.revenueMultiple,r.revenueMultiple*O),H=gs(r.ebitdaMultiple,r.ebitdaMultiple*O),me=gs(r.targetReturn,r.targetReturn*O),q={...r,revenueMultiple:Math.max(.1,W),ebitdaMultiple:Math.max(.1,H),targetReturn:Math.max(1,me)},ue=N_(Y,q,i,s,l);isFinite(ue)&&ue>0&&A.push(ue)}}const E=k.map((U,ee)=>{const Y=[...U].sort((me,q)=>me-q),W=U.length>0?U.reduce((me,q)=>me+q,0)/U.length:0,H=n[ee]?Bg(n[ee]):0;return{year:ee,label:`Year ${ee}`,p10:Ha(Y,10),p25:Ha(Y,25),median:Ha(Y,50),p75:Ha(Y,75),p90:Ha(Y,90),mean:W,baseFCF:H}}),$=[...A].sort((U,ee)=>U-ee),T=A.reduce((U,ee)=>U+ee,0)/A.length,R=A.reduce((U,ee)=>U+(ee-T)**2,0)/A.length,B=Math.sqrt(R),F=30,D=$[0],K=($[$.length-1]-D)/F||1,z=[];for(let U=0;U<F;U++){const ee=D+U*K,Y=ee+K,W=(ee+Y)/2,H=A.filter(q=>q>=ee&&(U===F-1?q<=Y:q<Y)).length,me=q=>Math.abs(q)>=1e6?`${(q/1e6).toFixed(1)}M`:Math.abs(q)>=1e3?`${(q/1e3).toFixed(0)}K`:q.toFixed(0);z.push({bin:me(W),count:H,midpoint:W})}g({values:A,sorted:$,mean:T,median:Ha($,50),stdDev:B,p10:Ha($,10),p25:Ha($,25),p75:Ha($,75),p90:Ha($,90),histogram:z,fcfSpread:E}),y(!1)},50)},[c,f,h,t,r,n,a,i,s,l]),S=w.useMemo(()=>c==="dcf"?C_(n,a,t.discountRate,t.terminalGrowthRate,t.defaultRisk,t.totalDebt,t.cashAndEquivalents):N_(n,r,i,s,l),[c,t,r,n,a,i,s,l]),j=w.useMemo(()=>p?p.fcfSpread.map(A=>({label:A.label,p10:A.p10,p25_band:A.p25-A.p10,p50_band:A.median-A.p25,p75_band:A.p75-A.median,p90_band:A.p90-A.p75,baseFCF:A.baseFCF})):[],[p]);return o.jsx(nn,{children:o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(_c,{className:"h-5 w-5 text-primary"}),o.jsx(ht,{children:"Monte Carlo Simulation"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-4 w-4 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-sm",children:o.jsx("p",{children:"Runs thousands of valuation calculations with randomly varied assumptions to show the probability distribution of outcomes and per-year FCF spread."})})]})]}),o.jsx(Dt,{children:"Stress-test your valuation by randomising key assumptions across thousands of scenarios"})]}),o.jsxs(pt,{className:"space-y-6",children:[o.jsxs("div",{className:"rounded-md border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground space-y-2",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"What is this?"})," A Monte Carlo simulation randomises your key input assumptions (discount rate, growth rate, revenue, multiples) using a normal distribution centred on your current values. Each run produces a different valuation, and after thousands of runs you can see the full range of plausible outcomes."]}),o.jsxs("p",{children:["The ",o.jsx("strong",{children:"spread"})," control sets how much each parameter can vary (as one standard deviation). A 20% spread means ~68% of sampled values fall within ±20% of your base case."]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{children:"Valuation Model"}),o.jsxs(Ca,{value:c,onValueChange:A=>{u(A),g(null)},children:[o.jsx(Gn,{children:o.jsx(Na,{})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"dcf",children:"Intrinsic Based (DCF)"}),o.jsx(rr,{value:"market",children:"Market-Based (VC Method)"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx(qe,{children:"Iterations"}),o.jsx("span",{className:"text-sm text-muted-foreground tabular-nums",children:f.toLocaleStr
486ing()})]}),o.jsx(ei,{value:[f],onValueChange:A=>d(A[0]),min:1e3,max:1e4,step:1e3})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsx(qe,{children:"Spread (±1σ)"}),o.jsxs("span",{className:"text-sm text-muted-foreground tabular-nums",children:[h,"%"]})]}),o.jsx(ei,{value:[h],onValueChange:A=>m(A[0]),min:5,max:50,step:5})]})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs(Ce,{onClick:b,disabled:v,className:"min-w-[140px]",title:"Run the Monte Carlo simulation with current settings",children:[o.jsx(D8,{className:"h-4 w-4 mr-2"}),v?"Running…":"Run Simulation"]}),o.jsxs("span",{className:"text-sm text-muted-foreground",children:["Base case: ",o.jsx("strong",{children:x(S)})]})]}),p&&o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[{label:"P10 (Bearish)",value:p.p10,desc:"10% of outcomes fall below this"},{label:"P25",value:p.p25,desc:"25th percentile"},{label:"Median (P50)",value:p.median,desc:"The middle outcome"},{label:"P75",value:p.p75,desc:"75th percentile"},{label:"P90 (Bullish)",value:p.p90,desc:"Only 10% of outcomes exceed this"}].map(A=>o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsxs("div",{className:"rounded-lg border border-border bg-muted/50 p-3 text-center cursor-help",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:A.label}),o.jsx("p",{className:"text-sm font-bold tabular-nums mt-0.5",children:x(A.value)})]})}),o.jsx(Ee,{children:o.jsx("p",{children:A.desc})})]},A.label))}),o.jsxs("div",{children:[o.jsxs("h4",{className:"text-sm font-semibold mb-3",children:["Valuation Distribution (",p.values.length.toLocaleString()," valid runs)"]}),o.jsx(Ko,{width:"100%",height:320,children:o.jsxs(Py,{data:p.histogram,margin:{top:10,right:20,left:20,bottom:40},children:[o.jsx(Yo,{strokeDasharray:"3 3",opacity:.3}),o.jsx(ra,{dataKey:"bin",angle:-45,textAnchor:"end",height:60,tick:{fontSize:10},interval:2}),o.jsx(na,{tick:{fontSize:11},label:{value:"Frequency",angle:-90,position:"insideLeft",style:{fontSize:12}}}),o.jsx(Vr,{content:({active:A,payload:O})=>!A||!(O!=null&&O[0])?null:o.jsxs("div",{className:"bg-background border border-border p-3 rounded-lg shadow-lg text-sm",children:[o.jsx("p",{className:"font-semibold",children:x(O[0].payload.midpoint)}),o.jsxs("p",{className:"text-muted-foreground",children:[O[0].value," runs"]})]})}),o.jsx(hc,{x:(C=p.histogram.find(A=>A.midpoint>=p.p10))==null?void 0:C.bin,stroke:"hsl(var(--destructive))",strokeDasharray:"4 4",label:{value:"P10",position:"top",fontSize:10}}),o.jsx(hc,{x:(N=p.histogram.find(A=>A.midpoint>=p.median))==null?void 0:N.bin,stroke:"hsl(var(--primary))",strokeDasharray:"4 4",label:{value:"P50",position:"top",fontSize:10}}),o.jsx(hc,{x:(P=p.histogram.find(A=>A.midpoint>=p.p90))==null?void 0:P.bin,stroke:"hsl(142, 76%, 36%)",strokeDasharray:"4 4",label:{value:"P90",position:"top",fontSize:10}}),o.jsx(Ba,{dataKey:"count",radius:[2,2,0,0],children:p.histogram.map((A,O)=>{const M=A.midpoint>=p.p25&&A.midpoint<=p.p75;return o.jsx(ay,{fill:M?"hsl(var(--primary))":"hsl(var(--muted-foreground) / 0.3)"},O)})})]})}),o.jsx("p",{className:"text-xs text-muted-foreground text-center mt-1",children:"Highlighted bars show the interquartile range (P25–P75). Dashed lines mark P10, median, and P90."})]}),p.fcfSpread.length>0&&o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("h4",{className:"text-sm font-semibold",children:"Free Cash Flow Spread by Year"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-sm",children:o.jsx("p",{children:"Shows how Free Cash Flow varies across each projected year. The shaded bands represent the P10–P90 confidence range from all simulation runs. The line shows your base-case FCF."})})]})]}),o.jsx(Ko,{width:"100%",height:280,children:o.jsxs(Qwe,{data:j,margin:{top:10,right:20,left:20,bottom:10},children:[o.jsx(Yo,{strokeDasharray:"3 3",opacity:.3}),o.jsx(ra,{dataKey:"label",tick:{fontSize:11}}),o.jsx(na,{tick:{fontSize:11}
486,tickFormatter:A=>Math.abs(A)>=1e6?`${(A/1e6).toFixed(1)}M`:Math.abs(A)>=1e3?`${(A/1e3).toFixed(0)}K`:A.toFixed(0),label:{value:"FCF",angle:-90,position:"insideLeft",style:{fontSize:12}}}),o.jsx(Vr,{content:({active:A,payload:O,label:M})=>{if(!A||!(O!=null&&O.length))return null;const k=p.fcfSpread.find(E=>E.label===M);return k?o.jsxs("div",{className:"bg-background border border-border p-3 rounded-lg shadow-lg text-sm space-y-1",children:[o.jsx("p",{className:"font-semibold",children:M}),o.jsxs("p",{className:"text-muted-foreground",children:["Base FCF: ",x(k.baseFCF)]}),o.jsxs("p",{children:["P90: ",x(k.p90)]}),o.jsxs("p",{children:["P75: ",x(k.p75)]}),o.jsxs("p",{className:"font-medium",children:["Median: ",x(k.median)]}),o.jsxs("p",{children:["P25: ",x(k.p25)]}),o.jsxs("p",{children:["P10: ",x(k.p10)]})]}):null}}),o.jsx(Cn,{type:"monotone",dataKey:"p10",stackId:"1",stroke:"none",fill:"transparent"}),o.jsx(Cn,{type:"monotone",dataKey:"p25_band",stackId:"1",stroke:"none",fill:"hsl(var(--destructive) / 0.12)"}),o.jsx(Cn,{type:"monotone",dataKey:"p50_band",stackId:"1",stroke:"none",fill:"hsl(var(--primary) / 0.18)"}),o.jsx(Cn,{type:"monotone",dataKey:"p75_band",stackId:"1",stroke:"none",fill:"hsl(var(--primary) / 0.18)"}),o.jsx(Cn,{type:"monotone",dataKey:"p90_band",stackId:"1",stroke:"none",fill:"hsl(142, 76%, 36%, 0.12)"}),o.jsx(Cn,{type:"monotone",dataKey:"baseFCF",stroke:"hsl(var(--primary))",strokeWidth:2,fill:"none",dot:{r:3,fill:"hsl(var(--primary))"}})]})}),o.jsxs("div",{className:"flex items-center justify-center gap-4 mt-2 text-xs text-muted-foreground",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"inline-block w-3 h-3 rounded-sm",style:{background:"hsl(var(--destructive) / 0.25)"}})," P10–P25"]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"inline-block w-3 h-3 rounded-sm",style:{background:"hsl(var(--primary) / 0.35)"}})," P25–P75"]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"inline-block w-3 h-3 rounded-sm",style:{background:"hsl(142, 76%, 36%, 0.25)"}})," P75–P90"]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"inline-block w-3 h-3 rounded-full",style:{background:"hsl(var(--primary))"}})," Base case"]})]}),o.jsx("div",{className:"mt-4 overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"text-xs",children:"Year"}),o.jsx(Ue,{className:"text-xs text-right",children:"P10"}),o.jsx(Ue,{className:"text-xs text-right",children:"P25"}),o.jsx(Ue,{className:"text-xs text-right font-semibold",children:"Median"}),o.jsx(Ue,{className:"text-xs text-right",children:"P75"}),o.jsx(Ue,{className:"text-xs text-right",children:"P90"}),o.jsx(Ue,{className:"text-xs text-right",children:"Base FCF"})]})}),o.jsx(gr,{children:p.fcfSpread.map(A=>o.jsxs(De,{children:[o.jsx(se,{className:"text-xs font-medium",children:A.label}),o.jsx(se,{className:"text-xs text-right tabular-nums",children:x(A.p10)}),o.jsx(se,{className:"text-xs text-right tabular-nums",children:x(A.p25)}),o.jsx(se,{className:"text-xs text-right tabular-nums font-semibold",children:x(A.median)}),o.jsx(se,{className:"text-xs text-right tabular-nums",children:x(A.p75)}),o.jsx(se,{className:"text-xs text-right tabular-nums",children:x(A.p90)}),o.jsx(se,{className:"text-xs text-right tabular-nums",children:x(A.baseFCF)})]},A.year))})]})})]}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[o.jsxs("div",{className:"rounded-lg border border-border p-3",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Mean"}),o.jsx("p",{className:"text-sm font-bold tabular-nums",children:x(p.mean)})]}),o.jsxs("div",{className:"rounded-lg border border-border p-3",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Standard Deviation"}),o.jsx("p",{className:"text-sm font-bold tabular-nums",children:x(p.stdDev)})]}),o.jsxs("div",{className:"rounded-lg border border-border p-3",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Coefficient of Variation"}),o.jsxs("p",{className:"text-sm font-bold tabular-nums",children:[p.mean>0?(p.stdDev/p.mean*100).toFixed(1):0,"%"]})]}),o.jsxs("div",{className:"rounded-lg border border-border p-3",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Range (P10–P90)"}),o.jsx("p",{className:"text-sm font-bold tabular-nums",children:x(p.p90-p.p10)})]})]}),o.jsx("div",{className:"rounded-md border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground",children:o.jsxs("p",{children:[o.jsx("strong",{children:"How to read this:"})," The histogram shows how many of the ",p.values.length.toLocaleStr
486ing()," simulation runs fell into each valuation range. The FCF spread chart below shows how Free Cash Flow varies year-by-year across all runs — wider bands mean higher uncertainty in that year's cash flows. A tighter distribution (lower coefficient of variation) indicates your valuation is robust to assumption changes."]})})]})]})]})})})},Pje=bu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ul({className:e,variant:t,...r}){return o.jsx("div",{className:Oe(Pje({variant:t}),e),...r})}const P_=["hsl(142, 71%, 45%)","hsl(217, 91%, 60%)","hsl(0, 84%, 60%)","hsl(45, 93%, 47%)","hsl(280, 67%, 55%)","hsl(190, 90%, 40%)"],Aje=["Conservative","Base Case","Optimistic"],X4="valuation-scenarios";function kje(){try{const e=localStorage.getItem(X4);return e?JSON.parse(e):[]}catch{return[]}}function i0(e){localStorage.setItem(X4,JSON.stringify(e))}function wi(e,t){const n={GBP:"£",USD:"$",EUR:"€"}[t]||t;return Math.abs(e)>=1e6?`${n}${(e/1e6).toFixed(2)}M`:Math.abs(e)>=1e3?`${n}${(e/1e3).toFixed(0)}K`:`${n}${e.toLocaleString()}`}function Oje(e,t){return t.assetWeight+t.preRevenueWeight+t.marketWeight+t.dcfWeight!==100?0:(e.assetBased*t.assetWeight+e.preRevenue*t.preRevenueWeight+e.marketBased*t.marketWeight+e.dcf*t.dcfWeight)/100}const Eje=({currency:e,valuations:t,investmentAmount:r,preMoneyValuation:n,weightedAverageState:a})=>{const[i,s]=w.useState(kje),[l,c]=w.useState(""),[u,f]=w.useState(!1),[d,h]=w.useState(new Set),m=n+r,p=Oje(t,a),g=()=>{const P=l.trim();if(!P){rt.error("Enter a scenario name");return}const A=i.length%P_.length,O={id:Date.now().toString(),name:P,date:new Date().toISOString(),color:P_[A],valuations:t,weightedAverage:p,investmentAmount:r,preMoneyValuation:n,postMoneyValuation:m},M=[...i,O];s(M),i0(M),c(""),f(!1),rt.success(`Scenario "${P}" saved`)},v=P=>{const A=i.filter(O=>O.id!==P);s(A),i0(A),h(O=>{const M=new Set(O);return M.delete(P),M}),rt.success("Scenario deleted")},y=()=>{s([]),i0([]),h(new Set),rt.success("All scenarios deleted")},x=P=>{h(A=>{const O=new Set(A);return O.has(P)?O.delete(P):O.add(P),O})},b=i.filter(P=>!d.has(P.id)),S=[{key:"assetBased",label:"Asset-Based"},{key:"preRevenue",label:"Pricing-Based"},{key:"marketBased",label:"Market-Based"},{key:"dcf",label:"DCF"},{key:"weightedAverage",label:"Weighted Avg"}],j=S.map(P=>{const A={method:P.label};return b.forEach(O=>{A[O.name]=P.key==="weightedAverage"?O.weightedAverage:O.valuations[P.key]}),A}),C=Math.max(1,...b.flatMap(P=>[P.valuations.assetBased,P.valuations.preRevenue,P.valuations.marketBased,P.valuations.dcf,P.weightedAverage])),N=S.map(P=>{const A={method:P.label};return b.forEach(O=>{const M=P.key==="weightedAverage"?O.weightedAverage:O.valuations[P.key];A[O.name]=Math.round(M/C*100)}),A});return o.jsxs("div",{className:"space-y-6",children:[o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[o.jsxs("div",{children:[o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(M8,{className:"h-5 w-5"}),"Scenario Comparison"]}),o.jsx(Dt,{children:"Save your current inputs as a named scenario and compare multiple scenarios side-by-side"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(pc,{open:u,onOpenChange:f,children:[o.jsx(Vd,{asChild:!0,children:o.jsxs(Ce,{size:"sm",children:[o.jsx(vm,{className:"h-4 w-4 mr-1"}),"Save Current as Scenario"]})}),o.jsxs(Us,{children:[o.jsxs(Gs,{children:[o.jsx(Hs,{children:"Save Scenario"}),o.jsx(qs,{children:"Capture the current valuation results as a named scenario for comparison."})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(qe,{children:"Scenario Name"}),o.jsx(Qe,{placeholder:'e.g., "Conservative", "Base Case", "Optimistic"',value:l,onCh
486ange:P=>c(P.target.value),onKeyDown:P=>P.key==="Enter"&&g()})]}),o.jsx("div",{className:"flex gap-2 flex-wrap",children:Aje.filter(P=>!i.some(A=>A.name===P)).map(P=>o.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>c(P),children:P},P))}),o.jsxs("div",{className:"rounded-md border border-border bg-muted/50 p-3 text-sm text-muted-foreground",children:[o.jsx("p",{children:o.jsx("strong",{children:"Current snapshot:"})}),o.jsxs("ul",{className:"mt-1 space-y-0.5",children:[o.jsxs("li",{children:["Asset-Based: ",wi(t.assetBased,e)]}),o.jsxs("li",{children:["Pricing-Based: ",wi(t.preRevenue,e)]}),o.jsxs("li",{children:["Market-Based: ",wi(t.marketBased,e)]}),o.jsxs("li",{children:["DCF: ",wi(t.dcf,e)]}),o.jsxs("li",{children:["Weighted Avg: ",wi(p,e)]})]})]}),o.jsx(Ce,{onClick:g,className:"w-full",children:"Save Scenario"})]})]})]}),i.length>0&&o.jsxs(Mg,{children:[o.jsx(Rg,{asChild:!0,children:o.jsxs(Ce,{variant:"destructive",size:"sm",children:[o.jsx(Oa,{className:"h-4 w-4 mr-1"}),"Clear All"]})}),o.jsxs(Qf,{children:[o.jsxs(Jf,{children:[o.jsx(th,{children:"Delete all scenarios?"}),o.jsxs(rh,{children:["This will permanently remove all ",i.length," saved scenario(s)."]})]}),o.jsxs(eh,{children:[o.jsx(ah,{children:"Cancel"}),o.jsx(nh,{onClick:y,children:"Delete All"})]})]})]})]})]})}),i.length>0&&o.jsx(pt,{children:o.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(P=>o.jsxs("div",{className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-sm",children:[o.jsx("div",{className:"h-3 w-3 rounded-full shrink-0",style:{backgroundColor:P.color}}),o.jsx("span",{className:"font-medium",children:P.name}),o.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",new Date(P.date).toLocaleDateString(),")"]}),o.jsx(Ce,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 ml-1",onClick:()=>x(P.id),children:d.has(P.id)?o.jsx(T8,{className:"h-3 w-3"}):o.jsx(fb,{className:"h-3 w-3"})}),o.jsx(Ce,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-destructive hover:text-destructive",onClick:()=>v(P.id),children:o.jsx(Oa,{className:"h-3 w-3"})})]},P.id))})})]}),b.length>=2?o.jsxs(o.Fragment,{children:[o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsx(ht,{className:"text-lg",children:"Valuation Methods Comparison"})}),o.jsx(pt,{children:o.jsx("div",{className:"h-[400px]",children:o.jsx(Ko,{width:"100%",height:"100%",children:o.jsxs(Py,{data:j,margin:{top:20,right:30,left:20,bottom:5},children:[o.jsx(Yo,{strokeDasharray:"3 3",className:"stroke-border/50"}),o.jsx(ra,{dataKey:"method",className:"text-xs"}),o.jsx(na,{tickFormatter:P=>wi(P,e),className:"text-xs"}),o.jsx(Vr,{formatter:P=>wi(P,e)}),o.jsx(oi,{}),b.map(P=>o.jsx(Ba,{dataKey:P.name,fill:P.color,radius:[4,4,0,0]},P.id))]})})})})]}),o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsx(ht,{className:"text-lg",children:"Scenario Profile Comparison"})}),o.jsx(pt,{children:o.jsx("div",{className:"h-[400px]",children:o.jsx(Ko,{width:"100%",height:"100%",children:o.jsxs(Zwe,{data:N,children:[o.jsx(F3,{className:"stroke-border/50"}),o.jsx(Eh,{dataKey:"method",className:"text-xs"}),o.jsx(Oh,{domain:[0,100],tick:!1}),b.map(P=>o.jsx(_h,{name:P.name,dataKey:P.name,stroke:P.color,fill:P.color,fillOpacity:.15},P.id)),o.jsx(oi,{})]})})})})]}),o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsx(ht,{className:"text-lg",children:"Side-by-Side Comparison"})}),o.jsx(pt,{children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"w-[200px]",children:"Metric"}),b.map(P=>o.jsx(Ue,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"h-3 w-3 rounded-full shrink-0",style:{backgroundColor:P.color}}),P.name]})},P.id)),b.length>=2&&o.jsx(Ue,{children:"Δ (Max − Min)"})]})}),o.jsx(gr,{children:[{label:"Asset-Based",key:"assetBased"},{label:"Pricing-Based",key:"preRevenue"},{label:"Market-Based",key:"marketBased"},{label:"DCF",key:"dcf"},{label:"Weighted Average",key:"weightedAverage"},{label:"Pre-Money Valuation",key:"preMoneyValuation"},{label:"Investment Amount",key:"investmentAmount"},{label:"Post-Money Valuation",key:"postMoneyValuation"}].map(P=>{const A=b.map(M=>P.key==="weightedAverage"?M.weightedAverage:M[P.key]??M.valuations[P.key]??0),O=Math.max(...A)-Math.min(...A);return o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:P.label}),b.map((M,k)=>o.jsx(se,{children:wi(A[k],e)},M.id)),b.length>=2&&o.jsx(se,{children:o.jsx(ul,{variant:O>0?"secondary":"outline",children:wi(O,e)})})]},P.key)})})]})})})]})]}):o.jsx(ut,{children:o.jsx(pt,{className:"py-12 text-center text-muted-foreground",children:i.length===0?o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-lg font-medium",children:"No scenarios saved yet"}),o.jsx("p",{children:"Adjust your inputs for different assumptions (e.g., conservative vs. optimistic), then save each as a 
486scenario to compare them here."})]}):b.length<2?o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-lg font-medium",children:"Save at least 2 scenarios to compare"}),o.jsxs("p",{children:["You have ",i.length," scenario(s). ",d.size>0&&`${d.size} hidden.`," Save another with different assumptions to see charts and tables."]})]}):null})})]})},A_=({range:e,unit:t,current:r})=>{const n=r!==void 0&&r>=e.low&&r<=e.high,a=r!==void 0&&r<e.low,i=r!==void 0&&r>e.high;return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5 text-sm tabular-nums",children:[o.jsxs("span",{className:"text-muted-foreground",children:[e.low,t]}),o.jsx("span",{className:"text-muted-foreground",children:"–"}),o.jsxs("span",{className:"font-semibold",children:[e.median,t]}),o.jsx("span",{className:"text-muted-foreground",children:"–"}),o.jsxs("span",{className:"text-muted-foreground",children:[e.high,t]})]}),r!==void 0&&o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"text-xs text-muted-foreground",children:"Your value:"}),o.jsxs(ul,{variant:n?"default":"destructive",className:"text-xs px-1.5 py-0",children:[r,t,a&&" ↓",i&&" ↑"]})]})]})},_je=({currency:e,currentValues:t,onApplyMultiples:r,onApplyMargins:n,onApplyWacc:a})=>{const[i,s]=w.useState(""),[l,c]=w.useState(""),u=Aa.find(v=>v.id===i),f=Aa.find(v=>v.id===l),d=[...new Set(Aa.map(v=>v.category))].sort(),h=()=>{!u||!r||(r(u.revenueMultiple.median,u.ebitdaMultiple.median),rt.success(`Applied ${u.name} median multiples`))},m=()=>{!u||!n||(n(u.grossMargin.median,u.sgaPercent.median,u.rdPercent.median),rt.success(`Applied ${u.name} median margins`))},p=()=>{!u||!a||(a(u.wacc.median),rt.success(`Applied ${u.name} median WACC`))},g=[{label:"Revenue Multiple",tooltip:"Enterprise Value / Revenue",key:"revenueMultiple",unit:"x",currentKey:"revenueMultiple"},{label:"EBITDA Multiple",tooltip:"Enterprise Value / EBITDA",key:"ebitdaMultiple",unit:"x",currentKey:"ebitdaMultiple"},{label:"Gross Margin",tooltip:"Gross profit as % of revenue",key:"grossMargin",unit:"%",currentKey:"grossMargin"},{label:"SG&A %",tooltip:"Selling, general & administrative as % of revenue",key:"sgaPercent",unit:"%",currentKey:"sgaPercent"},{label:"R&D %",tooltip:"Research & development as % of revenue",key:"rdPercent",unit:"%",currentKey:"rdPercent"},{label:"Revenue Growth",tooltip:"Annual revenue growth rate",key:"revenueGrowth",unit:"%"},{label:"WACC",tooltip:"Weighted average cost of capital / discount rate",key:"wacc",unit:"%",currentKey:"wacc"}];return o.jsx("div",{className:"space-y-6",children:o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsx("div",{className:"flex items-center justify-between flex-wrap gap-4",children:o.jsxs("div",{children:[o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(DM,{className:"h-5 w-5"}),"Industry Benchmarks"]}),o.jsx(Dt,{children:"Reference multiples and margins by industry. Select an industry to see typical ranges and compare with your inputs."})]})})}),o.jsxs(pt,{className:"space-y-6",children:[o.jsx("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3 text-sm text-muted-foreground",children:o.jsxs("p",{children:[o.jsx("strong",{className:"text-foreground",children:"Disclaimer:"})," The benchmark ranges shown below are indicative estimates compiled for reference purposes only. They do not constitute financial advice. Actual multiples and margins vary significantly by company stage, geography, sub-sector, and prevailing market conditions. Always verify against current market data from trusted sources such as ",o.jsx("a",{href:"https://pages.stern.nyu.edu/~adamodar/",target:"_blank",rel:"noopener noreferrer",className:"underline text-primary hover:text-primary/80",children:"Damodaran's datasets"}),", PitchBook, or comparable transaction databases before relying on these figures for investment decisions."]})}),o.jsxs("div",{className:"flex flex-wrap gap-4",children:[o.jsxs("div",{className:"space-y-1.5 flex-1 min-w-[200px]",children:[o.jsx("label",{className:"text-sm font-medium",children:"Primary Industry"}),o.jsxs(Ca,{value:i,onValueChange:s,children:[o.jsx(Gn,{children:o.jsx(Na,{placeholder:"Select an industry…"})}),o.jsx(Hn,{children:d.map(v=>o.jsxs("div",{children:[o.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:v}),Aa.filter(y=>y.category===v).map(y=>o.jsx(rr,{value:y.id,children:y.name},y.id))]},v))})]})]}),o.jsxs("div",{className:"space-y-1.5 flex-1 min-w-[200px]",children:[o.jsx("label",{className:"text-sm font-medium",children:"Compare With (optional)"}),o.jsxs(Ca,{value:l,onValueChange:c,children:[o.jsx(Gn,{children:o.jsx(Na,{placeholder:"Select to compare…"})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"none",children:"None"}),Aa.filter(v=>v.id!==i).map(v=>o.jsx(rr,{value:v.id,children:v.name},v.id))]})]})]})]}),u&&o.jsxs(nn,{children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"w-[180px]",children:"Metric"}),o.jsx(Ue,{children:u.name}),f&&o.jsx(Ue,{children:f.name}),t&&o.jsx(Ue,{children:"Your Inputs"})]})}),o.jsx(gr,{children:g.map(v=>{const y=u[v.key],x=f?f[v.key]:void 0,b=v.currentKey?t==null?void 0:t[v.currentKey]:void 0;return o.jsxs(De,{children:[o.jsx(se,{children:o.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[v.label,o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:o.jsx("p",{children:v.tooltip})})]})]})}),o.jsx(se,{children:o.jsx(A_,{range:y,unit:v.unit,current:b})}),f&&x&&o.jsx(se,{children:o.jsx(A_,{range:x,unit:v.unit})}),t&&o.jsx(se,{children:b!==void 0?o.jsxs("span",{className:"font-mono text-sm tabular-nums",children:[b,v.unit]}):o.jsx("span",{className:"text-muted-foreground text-sm",children:"—"})})]},v.key)})})]})}),(r||n||a)&&o.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[o.jsx("span",{className:"text-sm text-muted-foreground self-center mr-1",children:"Apply median values:"}),r&&o.jsxs(Ce,{variant:"outline",size:"sm",onClick:h,children:[o.jsx(ko,{className:"h-3.5 w-3.5 mr-1"}),"Multiples (",u.revenueMultiple.median,"x / ",u.ebitdaMultiple.median,"x)"]}),n&&o.jsxs(Ce,{variant:"outline",size:"sm",onClick:m,children:[o.jsx(ko,{className:"h-3.5 w-3.5 mr-1"}),"Margins (",u.grossMargin.median,"% GM)"]}),a&&o.jsxs(Ce,{variant:"outline",size:"sm",onClick:p,children:[o.jsx(ko,{className:"h-3.5 w-3.5 mr-1"}),"WACC (",u.wacc.median,"%)"]})]})]}),!u&&o.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[o.jsx(_c,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),o.jsx("p",{children:"Select an industry above to see benchmark ranges for multiples, margins, and discount rates."})]})]})]})})};var RC={exports:{}};RC.exports;(function(e){var t=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
486+/=",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function s(c,u){if(!i[c]){i[c]={};for(var f=0;f<c.length;f++)i[c][c.charAt(f)]=f}return i[c][u]}var l={compressToBase64:function(c){if(c==null)return"";var u=l._compress(c,6,function(f){return n.charAt(f)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:l._decompress(c.length,32,function(u){return s(n,c.charAt(u))})},compressToUTF16:function(c){return c==null?"":l._compress(c,15,function(u){return r(u+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:l._decompress(c.length,16384,function(u){return c.charCodeAt(u)-32})},compressToUint8Array:function(c){for(var u=l.compress(c),f=new Uint8Array(u.length*2),d=0,h=u.length;d<h;d++){var m=u.charCodeAt(d);f[d*2]=m>>>8,f[d*2+1]=m%256}return f},decompressFromUint8Array:function(c){if(c==null)return l.decompress(c);for(var u=new Array(c.length/2),f=0,d=u.length;f<d;f++)u[f]=c[f*2]*256+c[f*2+1];var h=[];return u.forEach(function(m){h.push(r(m))}),l.decompress(h.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":l._compress(c,6,function(u){return a.charAt(u)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),l._decompress(c.length,32,function(u){return s(a,c.charAt(u))}))},compress:function(c){return l._compress(c,16,function(u){return r(u)})},_compress:function(c,u,f){if(c==null)return"";var d,h,m={},p={},g="",v="",y="",x=2,b=3,S=2,j=[],C=0,N=0,P;for(P=0;P<c.length;P+=1)if(g=c.charAt(P),Object.prototype.hasOwnProperty.call(m,g)||(m[g]=b++,p[g]=!0),v=y+g,Object.prototype.hasOwnProperty.call(m,v))y=v;else{if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(d=0;d<S;d++)C=C<<1,N==u-1?(N=0,j.push(f(C)),C=0):N++;for(h=y.charCodeAt(0),d=0;d<8;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1}else{for(h=1,d=0;d<S;d++)C=C<<1|h,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=0;for(h=y.charCodeAt(0),d=0;d<16;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1}x--,x==0&&(x=Math.pow(2,S),S++),delete p[y]}else for(h=m[y],d=0;d<S;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1;x--,x==0&&(x=Math.pow(2,S),S++),m[v]=b++,y=String(g)}if(y!==""){if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(d=0;d<S;d++)C=C<<1,N==u-1?(N=0,j.push(f(C)),C=0):N++;for(h=y.charCodeAt(0),d=0;d<8;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1}else{for(h=1,d=0;d<S;d++)C=C<<1|h,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=0;for(h=y.charCodeAt(0),d=0;d<16;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1}x--,x==0&&(x=Math.pow(2,S),S++),delete p[y]}else for(h=m[y],d=0;d<S;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1;x--,x==0&&(x=Math.pow(2,S),S++)}for(h=2,d=0;d<S;d++)C=C<<1|h&1,N==u-1?(N=0,j.push(f(C)),C=0):N++,h=h>>1;for(;;)if(C=C<<1,N==u-1){j.push(f(C));break}else N++;return j.join("")},decompress:function(c){return c==null?"":c==""?null:l._decompress(c.length,32768,function(u){return c.charCodeAt(u)})},_decompress:function(c,u,f){var d=[],h=4,m=4,p=3,g="",v=[],y,x,b,S,j,C,N,P={val:f(0),position:u,index:1};for(y=0;y<3;y+=1)d[y]=y;for(b=0,j=Math.pow(2,2),C=1;C!=j;)S=P.val&P.position,P.position>>=1,P.position==0&&(P.position=u,P.val=f(P.index++)),b|=(S>0?1:0)*C,C<<=1;switch(b){case 0:for(b=0,j=Math.pow(2,8),C=1;C!=j;)S=P.val&P.position,P.position>>=1,P.position==0&&(P.position=u,P.val=f(P.index++)),b|=(S>0?1:0)*C,C<<=1;N=r(b);break;case 1:for(b=0,j=Math.pow(2,16),C=1;C!=j;)S=P.val&P.position,P.position>>=1,P.position==0&&(P.position=u,P.val=f(P.index++)),b|=(S>0?1:0)*C,C<<=1;N=r(b);break;case 2:return""}for(d[3]=N,x=N,v.push(N);;){if(P.index>c)return"";for(b=0,j=Math.pow(2,p),C=1;C!=j;)S=P.val&P.position,P.position>>=1,P.position==0&&(P.position=u,P.val=f(P.index++)),b|=(S>0?1:0)*C,C<<=1;switch(N=b){case 0:for(b=0,j=Math.pow(2,8),C=1;C!=j;)S=P.val&P.position,P.position>>=1,P.position==0&&(P.position=u,P.val=f(P.index++)),b|=(S>0?1:0)*C,C<<=1;d[m++]=r(b),N=m-1,h--;break;case 1:for(b=0,j=Math.pow(2,16),C=1;C!=j;)S=P.val&P.position,P.position>>=1,P.position==0&&(P.position=u,P.val=f(P.index++)),b|=(S>0?1:0)*C,C<<=1;d[m++]=r(b),N=m-1,h--;break;case 2:return v.join("")}if(h==0&&(h=Math.pow(2,p),p++),d[N])g=d[N];else if(N===m)g=x+x.charAt(0);else return null;v.push(g),d[m++]=x+g.charAt(0),h--,x=g,h==0&&(h=Math.pow(2,p),p++)}}};return l}();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(RC);var Tje=RC.exports;const Mje=vt(Tje);function Rje(e){try{const t=Mje.decompressFromEncodedURIComponent(e);return t?JSON.parse(t):null}catch{return null}}var O1=["Enter"," "],$je=["ArrowDown","PageUp","Home"],Z4=["ArrowUp","PageDown","End"],Ije=[...$je,...Z4],Dje={ltr:[...O1,"ArrowRight"],rtl:[...O1,"ArrowLeft"]},Fje={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Th="Menu",[oh,Lje,Bje]=yu(Th),[jl,Q4]=fr(Th,[Bje,Nu,ns]),ky=Nu(),J4=ns(),[zje,Sl]=jl(Th),[Vje,Mh]=jl(Th),eL=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:s=!0}=e,l=ky(t),[c,u]=w.useState(null),f=w.useRef(!1),d=hn(i),h=rs(a);return w.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),o.jsx(Gj,{...l,children:o.jsx(zje,{scope:t,open:r,onOpenChange:d,content:c,onContentChange:u,children:o.jsx(Vje,{scope:t,onClose:w.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:s,children:n})})})};eL.displayName=Th;var Wje="MenuAnchor",$C=w.forwardRef((e,t)=>
vendor: 16,885 bytes, line 486
486{const{__scopeMenu:r,...n}=e,a=ky(r);return o.jsx(Hj,{...a,...n,ref:t})});$C.displayName=Wje;var IC="MenuPortal",[Uje,tL]=jl(IC,{forceMount:void 0}),rL=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=Sl(IC,t);return o.jsx(Uje,{scope:t,forceMount:r,children:o.jsx(pn,{present:r||i.open,children:o.jsx(mh,{asChild:!0,container:a,children:n})})})};rL.displayName=IC;var Qn="MenuContent",[Gje,DC]=jl(Qn),nL=w.forwardRef((e,t)=>{const r=tL(Qn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=Sl(Qn,e.__scopeMenu),s=Mh(Qn,e.__scopeMenu);return o.jsx(oh.Provider,{scope:e.__scopeMenu,children:o.jsx(pn,{present:n||i.open,children:o.jsx(oh.Slot,{scope:e.__scopeMenu,children:s.modal?o.jsx(Hje,{...a,ref:t}):o.jsx(qje,{...a,ref:t})})})})}),Hje=w.forwardRef((e,t)=>{const r=Sl(Qn,e.__scopeMenu),n=w.useRef(null),a=et(t,n);return w.useEffect(()=>{const i=n.current;if(i)return iS(i)},[]),o.jsx(FC,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:je(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),qje=w.forwardRef((e,t)=>{const r=Sl(Qn,e.__scopeMenu);return o.jsx(FC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Kje=Js("MenuContent.ScrollLock"),FC=w.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:p,...g}=e,v=Sl(Qn,r),y=Mh(Qn,r),x=ky(r),b=J4(r),S=Lje(r),[j,C]=w.useState(null),N=w.useRef(null),P=et(t,N,v.onContentChange),A=w.useRef(0),O=w.useRef(""),M=w.useRef(0),k=w.useRef(null),E=w.useRef("right"),$=w.useRef(0),T=p?Ov:w.Fragment,R=p?{as:Kje,allowPinchZoom:!0}:void 0,B=D=>{var H,me;const G=O.current+D,K=S().filter(q=>!q.disabled),z=document.activeElement,U=(H=K.find(q=>q.ref.current===z))==null?void 0:H.textValue,ee=K.map(q=>q.textValue),Y=oSe(ee,G,U),W=(me=K.find(q=>q.textValue===Y))==null?void 0:me.ref.current;(function q(ue){O.current=ue,window.clearTimeout(A.current),ue!==""&&(A.current=window.setTimeout(()=>q(""),1e3))})(G),W&&setTimeout(()=>W.focus())};w.useEffect(()=>()=>window.clearTimeout(A.current),[]),aS();const F=w.useCallback(D=>{var K,z;return E.current===((K=k.current)==null?void 0:K.side)&&lSe(D,(z=k.current)==null?void 0:z.area)},[]);return o.jsx(Gje,{scope:r,searchRef:O,onItemEnter:w.useCallback(D=>{F(D)&&D.preventDefault()},[F]),onItemLeave:w.useCallback(D=>{var G;F(D)||((G=N.current)==null||G.focus(),C(null))},[F]),onTriggerLeave:w.useCallback(D=>{F(D)&&D.preventDefault()},[F]),pointerGraceTimerRef:M,onPointerGraceIntentChange:w.useCallback(D=>{k.current=D},[]),children:o.jsx(T,{...R,children:o.jsx(Av,{asChild:!0,trapped:a,onMountAutoFocus:je(i,D=>{var G;D.preventDefault(),(G=N.current)==null||G.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:o.jsx(xu,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:o.jsx(Cv,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:C,onEntryFocus:je(c,D=>{y.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(qj,{role:"menu","aria-orientation":"vertical","data-state":xL(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:je(g.onKeyDown,D=>{const K=D.target.closest("[data-radix-menu-content]")===D.currentTarget,z=D.ctrlKey||D.altKey||D.metaKey,U=D.key.length===1;K&&(D.key==="Tab"&&D.preventDefault(),!z&&U&&B(D.key));const ee=N.current;if(D.target!==ee||!Ije.includes(D.key))return;D.preventDefault();const W=S().filter(H=>!H.disabled).map(H=>H.ref.current);Z4.includes(D.key)&&W.reverse(),aSe(W)}),onBlur:je(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:je(e.onPointerMove,sh(D=>{const G=D.target,K=$.current!==D.clientX;if(D.currentTarget.contains(G)&&K){const z=D.clientX>$.current?"right":"left";E.current=z,$.current=D.clientX}}))})})})})})})});nL.displayName=Qn;var Yje="MenuGroup",LC=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx($e.div,{role:"group",...n,ref:t})});LC.displayName=Yje;var Xje="MenuLabel",aL=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx($e.div,{...n,ref:t})});aL.displayName=Xje;var zg="MenuItem",k_="menu.itemSelect",Oy=w.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,i=w.useRef(null),s=Mh(zg,e.__scopeMenu),l=DC(zg,e.__scopeMenu),c=et(t,i),u=w.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const h=new CustomEvent(k_,{bubbles:!0,cancelable:!0});d.addEventListener(k_,m=>n==null?void 0:n(m),{once:!0}),Aj(d,h),h.defaultPrevented?u.current=!1:s.onClose()}};return o.jsx(iL,{...a,ref:c,disabled:r,onClick:je(e.onClick,f),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:je(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:je(e.onKeyDown,d=>{const h=l.searchRef.current!=="";r||h&&d.key===" "||O1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Oy.displayName=zg;var iL=w.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,s=DC(zg,r),l=J4(r),c=w.useRef(null),u=et(t,c),[f,d]=w.useState(!1),[h,m]=w.useState("");return w.useEffect(()=>{const p=c.current;p&&m((p.textContent??"").trim())},[i.children]),o.jsx(oh.ItemSlot,{scope:r,disabled:n,textValue:a??h,children:o.jsx(Nv,{asChild:!0,...l,focusable:!n,children:o.jsx($e.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:u,onPointerMove:je(e.onPointerMove,sh(p=>{n?s.onItemLeave(p):(s.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:je(e.onPointerLeave,sh(p=>s.onItemLeave(p))),onFocus:je(e.onFocus,()=>d(!0)),onBlur:je(e.onBlur,()=>d(!1))})})})}),Zje="MenuCheckboxItem",oL=w.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return o.jsx(dL,{scope:e.__scopeMenu,checked:r,children:o.jsx(Oy,{role:"menuitemcheckbox","aria-checked":Vg(r)?"mixed":r,...a,ref:t,"data-state":zC(r),onSelect:je(a.onSelect,()=>n==null?void 0:n(Vg(r)?!0:!r),{checkForDefaultPrevented:!1})})})});oL.displayName=Zje;var sL="MenuRadioGroup",[Qje,Jje]=jl(sL,{value:void 0,onValueChange:()=>{}}),lL=w.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,i=hn(n);return o.jsx(Qje,{scope:e.__scopeMenu,value:r,onValueChange:i,children:o.jsx(LC,{...a,ref:t})})});lL.displayName=sL;var cL="MenuRadioItem",uL=w.forwardRef((e,t)=>{const{value:r,...n}=e,a=Jje(cL,e.__scopeMenu),i=r===a.value;return o.jsx(dL,{scope:e.__scopeMenu,checked:i,children:o.jsx(Oy,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":zC(i),onSelect:je(n.onSelect,()=>{var s;return(s=a.onValueChange)==null?void 0:s.call(a,r)},{checkForDefaultPrevented:!1})})})});uL.displayName=cL;var BC="MenuItemIndicator",[dL,eSe]=jl(BC,{checked:!1}),fL=w.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,i=eSe(BC,r);return o.jsx(pn,{present:n||Vg(i.checked)||i.checked===!0,children:o.jsx($e.span,{...a,ref:t,"data-state":zC(i.checked)})})});fL.displayName=BC;var tSe="MenuSeparator",hL=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx($e.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});hL.displayName=tSe;var rSe="MenuArrow",pL=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=ky(r);return o.jsx(Kj,{...a,...n,ref:t})});pL.displayName=rSe;var nSe="MenuSub",[yPe,mL]=jl(nSe),Cd="MenuSubTrigger",gL=w.forwardRef((e,t)=>{const r=Sl(Cd,e.__scopeMenu),n=Mh(Cd,e.__scopeMenu),a=mL(Cd,e.__scopeMenu),i=DC(Cd,e.__scopeMenu),s=w.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},f=w.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return w.useEffect(()=>f,[f]),w.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),o.jsx($C,{asChild:!0,...u,children:o.jsx(iL,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":xL(r.open),...e,ref:lv(t,a.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:je(e.onPointerMove,sh(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:je(e.onPointerLeave,sh(d=>{var m,p;f();const h=(m=r.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(p=r.content)==null?void 0:p.dataset.side,v=g==="right",y=v?-5:5,x=h[v?"left":"right"],b=h[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x,y:h.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:je(e.onKeyDown,d=>{var m;const h=i.searchRef.current!=="";e.disabled||h&&d.key===" "||Dje[n.dir].includes(d.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),d.preventDefault())})})})});gL.displayName=Cd;var vL="MenuSubContent",yL=w.forwardRef((e,t)=>{const r=tL(Qn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=Sl(Qn,e.__scopeMenu),s=Mh(Qn,e.__scopeMenu),l=mL(vL,e.__scopeMenu),c=w.useRef(null),u=et(t,c);return o.jsx(oh.Provider,{scope:e.__scopeMenu,children:o.jsx(pn,{present:n||i.open,children:o.jsx(oh.Slot,{scope:e.__scopeMenu,children:o.jsx(FC,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;s.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:je(e.onFocusOutside,f=>{f.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:je(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:je(e.onKeyDown,f=>{var m;const d=f.currentTarget.contains(f.target),h=Fje[s.dir].includes(f.key);d&&h&&(i.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});yL.displayName=vL;function xL(e){return e?"open":"closed"}function Vg(e){return e==="indeterminate"}function zC(e){return Vg(e)?"indeterminate":e?"checked":"unchecked"}function aSe(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function iSe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function oSe(e,t,r){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=iSe(e,Math.max(i,0));a.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function sSe(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const l=t[i],c=t[s],u=l.x,f=l.y,d=c.x,h=c.y;f>n!=h>n&&r<(d-u)*(n-f)/(h-f)+u&&(a=!a)}return a}function lSe(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return sSe(r,t)}function sh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cSe=eL,uSe=$C,dSe=rL,fSe=nL,hSe=LC,pSe=aL,mSe=Oy,gSe=oL,vSe=lL,ySe=uL,xSe=fL,bSe=hL,wSe=pL,jSe=gL,SSe=yL,Ey="DropdownMenu",[CSe,xPe]=fr(Ey,[Q4]),an=Q4(),[NSe,bL]=CSe(Ey),wL=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=an(t),u=w.useRef(null),[f,d]=wr({prop:a,defaultProp:i??!1,onChange:s,caller:Ey});return o.jsx(NSe,{scope:t,triggerId:kn(),triggerRef:u,contentId:kn(),open:f,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(h=>!h),[d]),modal:l,children:o.jsx(cSe,{...c,open:f,onOpenChange:d,dir:n,modal:l,children:r})})};wL.displayName=Ey;var jL="DropdownMenuTrigger",SL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=bL(jL,r),s=an(r);return o.jsx(uSe,{asChild:!0,...s,children:o.jsx($e.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:lv(t,i.triggerRef),onPointerDown:je(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:je(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});SL.displayName=jL;var PSe="DropdownMenuPortal",CL=e=>{const{__scopeDropdownMenu:t,...r}=e,n=an(t);return o.jsx(dSe,{...n,...r})};CL.displayName=PSe;var NL="DropdownMenuContent",PL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=bL(NL,r),i=an(r),s=w.useRef(!1);return o.jsx(fSe,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:je(e.onCloseAutoFocus,l=>{var c;s.current||(c=a.triggerRef.current)==null||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:je(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!a.modal||f)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PL.displayName=NL;var ASe="DropdownMenuGroup",kSe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(hSe,{...a,...n,ref:t})});kSe.displayName=ASe;var OSe="DropdownMenuLabel",AL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(pSe,{...a,...n,ref:t})});AL.displayName=OSe;var ESe="DropdownMenuItem",kL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(mSe,{...a,...n,ref:t})});kL.displayName=ESe;var _Se="DropdownMenuCheckboxItem",OL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(gSe,{...a,...n,ref:t})});OL.displayName=_Se;var TSe="DropdownMenuRadioGroup",MSe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(vSe,{...a,...n,ref:t})});MSe.displayName=TSe;var RSe="DropdownMenuRadioItem",EL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(ySe,{...a,...n,ref:t})});EL.displayName=RSe;var $Se="DropdownMenuItemIndicator",_L=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(xSe,{...a,...n,ref:t})});_L.displayName=$Se;var ISe="DropdownMenuSeparator",TL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(bSe,{...a,...n,ref:t})});TL.displayName=ISe;var DSe="DropdownMenuArrow",FSe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(wSe,{...a,...n,ref:t})});FSe.displayName=DSe;var LSe="DropdownMenuSubTrigger",ML=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(jSe,{...a,...n,ref:t})});ML.displayName=LSe;var BSe="DropdownMenuSubContent",RL=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=an(r);return o.jsx(SSe,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});RL.displayName=BSe;var zSe=wL,VSe=SL,WSe=CL,$L=PL,IL=AL,DL=kL,FL=OL,LL=EL,BL=_L,zL=TL,VL=ML,WL=RL;const USe=zSe,GSe=VSe,HSe=w.forwardRef(({className:e,inset:t,children:r,...n},a)=>o.jsxs(VL,{ref:a,className:Oe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...n,children:[r,o.jsx(O8,{className:"ml-auto h-4 w-4"})]}));HSe.displayName=VL.displayName;const qSe=w.forwardRef(({className:e,...t},r)=>o.jsx(WL,{ref:r,className:Oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
486de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));qSe.displayName=WL.displayName;const UL=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(WSe,{children:o.jsx($L,{ref:n,sideOffset:t,className:Oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));UL.displayName=$L.displayName;const xn=w.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(DL,{ref:n,className:Oe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...r}));xn.displayName=DL.displayName;const KSe=w.forwardRef(({className:e,children:t,checked:r,...n},a)=>o.jsxs(FL,{ref:a,className:Oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:r,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(BL,{children:o.jsx(_j,{className:"h-4 w-4"})})}),t]}));KSe.displayName=FL.displayName;const YSe=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(LL,{ref:n,className:Oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(BL,{children:o.jsx(BM,{className:"h-2 w-2 fill-current"})})}),t]}));YSe.displayName=LL.displayName;const XSe=w.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(IL,{ref:n,className:Oe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));XSe.displayName=IL.displayName;const GL=w.forwardRef(({className:e,...t},r)=>o.jsx(zL,{ref:r,className:Oe("-mx-1 my-1 h-px bg-muted",e),...t}));GL.displayName=zL.displayName;const _y="/assets/apollo-logo-DBxKslx9.png",ZSe=`
487  body { font-family: Arial, sans-serif; max-width: 900px; margin: 40px auto; padding: 20px; color: #1a1a2e; }
488  h1 { color: #1e3a8a; border-bottom: 3px solid #1e3a8a; padding-bottom: 12px; }
489  h2 { color: #1e3a8a; margin-top: 28px; border-bottom: 1px solid #cbd5e1; padding-bottom: 8px; }
490  h3 { color: #334155; margin-top: 20px; }
491  table { width: 100%; border-collapse: collapse; margin: 12px 0; break-inside: avoid; page-break-inside: avoid; }
492  th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
493  th { background: #f1f5f9; font-weight: 600; }
494  .right { text-align: right; }
495  .highlight { background: #eff6ff; font-weight: 700; }
496  .meta { color: #6b7280; font-size: 0.85em; margin-bottom: 24px; }
497  .footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid #e5e7eb; color: #9ca3af; font-size: 0.8em; text-align: center; }
498  .note { background: #f8fafc; border-left: 3px solid #1e3a8a; padding: 12px 16px; margin: 16px 0; font-size: 0.9em; color: #475569; break-inside: avoid; page-break-inside: avoid; }
499  .method-guide { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 20px 24px; margin: 32px 0 16px 0; font-size: 0.85em; color: #475569; line-height: 1.7; break-inside: avoid; page-break-inside: avoid; }
500  .method-guide h4 { color: #1e3a8a; margin: 0 0 8px 0; font-size: 1.05em; }
501  .method-guide p { margin: 6px 0; }
502  .method-guide ul { margin: 6px 0 6px 20px; padding: 0; }
503  .method-guide li { margin: 3px 0; }
504  .page-break { page-break-before: always; }
505  .toc { margin: 24px 0; }
506  .toc a { color: #1e3a8a; text-decoration: none; }
507  .toc li { margin: 6px 0; font-size: 1.05em; }
508  @media print { body { margin: 0; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; } .page-break { page-break-before: always; } }
509`;function pa(e,t,r,n,a){const i=new URL(_y,window.location.origin).href,s=new Date,l=s.toLocaleDateString(),c=s.toLocaleTimeString(),u=a&&a!=="normal"?` • Values in ${a==="thousands"?"thousands":"millions"}`:"";return`<!DOCTYPE html><html><head><title>${n?`${n} - `:""}${e}</title><style>${ZSe}</style></head><body>
510<div style="text-align:center;margin-bottom:24px;">
511  <img src="${i}" alt="Apollo Informal Investment" style="height:80px;object-fit:contain;" />
512</div>
513<h1 style="font-size:2em;">${e}</h1>
514${n?`<p style="font-size:1.4em;color:#334155;margin:-4px 0 4px 0;font-weight:600;">${n}</p>`:""}
515<p class="meta">${l} at ${c} • Currency: ${r}${u}</p>
516${t}
517<div class="footer"><p>Generated on ${l} at ${c} • Values are estimates only.</p></div>
518</body></html>`}function Ln(e){const t=window.open("","_blank");t?(t.document.write(e),t.document.close(),t.print(),rt.success("PDF report opened — use print dialog to save as PDF")):rt.error("Popup blocked. Please allow popups for this site.")}const QSe=e=>{const{valuations:t,currency:r,companyName:n,weightedAverageState:a,investmentAmount:i,preMoneyValuation:s,isInitialPreferred:l,initialLiquidationMultiple:c,assetBasedState:u,preRevenueState:f,dcfState:d,marketBasedState:h,futureRounds:m,projections:p,numYears:g,exitValue:v,historicData:y,displayFormat:
518x}=e,b=V=>ne(V,r,x),S=n?` (${n})`:"",j=()=>{const V=p.slice(0,g).map((X,ge)=>{const de=X.grossProfitOverride!=null?X.grossProfitOverride:X.revenue*(X.grossMargin/100),be=X.sgaOverride!=null?X.sgaOverride:X.revenue*(X.sgaPercent/100),ie=X.rdOverride!=null?X.rdOverride:X.revenue*(X.rdPercent/100),Z=X.ebitdaOverride!=null?X.ebitdaOverride:de-be-ie,fe=X.depreciationOverride!=null?X.depreciationOverride:X.revenue*(X.depreciationPercent/100),xe=X.amortizationOverride!=null?X.amortizationOverride:X.revenue*(X.amortizationPercent/100),J=X.ebitOverride!=null?X.ebitOverride:Z-fe-xe,te=X.interestIncomeOverride!=null?X.interestIncomeOverride:X.revenue*((X.interestIncomePercent||0)/100),ce=X.interestExpenseOverride!=null?X.interestExpenseOverride:X.revenue*((X.interestExpensePercent||0)/100),re=X.ebtOverride!=null?X.ebtOverride:J+te-ce,Ie=X.taxesOverride!=null?X.taxesOverride:re>0?re*(X.taxRate/100):0,Fe=X.netIncomeOverride!=null?X.netIncomeOverride:re-Ie,he=X.revenue*(X.workingCapitalPercent/100),ke=X.revenue*(X.capexPercent/100),We=Fe+fe+xe-ke-he,Ae=X.revenue?de/X.revenue*100:0,tt=X.revenue?Z/X.revenue*100:0,St=X.revenue?J/X.revenue*100:0,Tr=X.revenue?Fe/X.revenue*100:0,Mr=X.revenue?We/X.revenue*100:0;return{year:ge+1,revenue:X.revenue,gp:de,sga:be,rd:ie,ebitda:Z,depreciation:fe,amortization:xe,ebit:J,interestIncome:te,interestExpense:ce,ebt:re,taxes:Ie,netIncome:Fe,fcf:We,p:X,grossMarginPct:Ae,ebitdaMarginPct:tt,ebitMarginPct:St,netMarginPct:Tr,fcfMarginPct:Mr}}),oe=V.map(X=>`<tr><td>Year ${X.year}</td><td class="right">${b(X.revenue)}</td><td class="right">${b(X.gp)}</td><td class="right">${b(X.sga)}</td><td class="right">${b(X.rd)}</td><td class="right">${b(X.ebitda)}</td><td class="right">${b(X.ebit)}</td><td class="right">${b(X.netIncome)}</td></tr>`).join(""),ae=V.map(X=>`<tr><td>Year ${X.year}</td><td class="right">${X.grossMarginPct.toFixed(1)}%</td><td class="right">${X.ebitdaMarginPct.toFixed(1)}%</td><td class="right">${X.ebitMarginPct.toFixed(1)}%</td><td class="right">${X.netMarginPct.toFixed(1)}%</td><td class="right">${X.fcfMarginPct.toFixed(1)}%</td></tr>`).join(""),ye=V.map(X=>`<tr><td>Year ${X.year}</td><td class="right">${b(X.netIncome)}</td><td class="right">${b(X.depreciation+X.amortization)}</td><td class="right">(${b(X.p.revenue*(X.p.capexPercent/100))})</td><td class="right">(${b(X.p.revenue*(X.p.workingCapitalPercent/100))})</td><td class="right">${b(X.fcf)}</td></tr>`).join("");return`<h2 id="projections">Financial Projections (${g} Years)${S}</h2>
519<h3>Profit & Loss Summary</h3>
520<table><tr><th>Year</th><th class="right">Revenue</th><th class="right">Gross Profit</th><th class="right">SG&A</th><th class="right">R&D</th><th class="right">EBITDA</th><th class="right">EBIT</th><th class="right">Net Income</th></tr>${oe}</table>
521<h3>Margins & Ratios</h3>
522<table><tr><th>Year</th><th class="right">Gross Margin</th><th class="right">EBITDA Margin</th><th class="right">EBIT Margin</th><th class="right">Net Margin</th><th class="right">FCF Margin</th></tr>${ae}</table>
523<div class="page-break"></div><h3>Free Cash Flow</h3>
524<table><tr><th>Year</th><th class="right">Net Income</th><th class="right">D&A</th><th class="right">CapEx</th><th class="right">Δ WC</th><th class="right">FCF</th></tr>${ye}</table>
525<div class="method-guide">
526<h4>How to Interpret These Projections</h4>
527<p>Financial projections estimate the company's future income statement and free cash flow (FCF) over a defined period. These numbers form the foundation for other valuation methods.</p>
528<ul>
529<li><strong>Revenue</strong> is the total income before any costs are deducted.</li>
530<li><strong>EBITDA</strong> (Earnings Before Interest, Taxes, Depreciation & Amortisation) measures operating profitability, excluding non-cash charges.</li>
531<li><strong>Net Income</strong> is the bottom-line profit after all expenses and taxes.</li>
532<li><strong>Free Cash Flow (FCF)</strong> represents the cash actually available to investors after reinvesting in the business. Higher FCF generally signals a healthier, more valuable company.</li>
533</ul>
534<p>These are forward-looking estimates — actual results will differ. The projections are most useful for comparing scenarios and understanding growth trajectories rather than as precise predictions.</p>
535</div>`},C=()=>{const V=u,oe=V.employees.reduce((Z,fe)=>Z+fe.cost,0),ae=V.equityInvestment+V.grantFunding+V.grossProfit+oe,ye=ae*(V.inflationRate/100),X=ae+ye,ge=X-V.totalLiabilities,de=V.bookAssets-V.bookLiabilities+V.fairValueAdjustment,be=V.liquidationAssets*(1-V.liquidationDiscount/100),ie=[];return V.useCostToReplicate&&ie.push({name:"Cost to Replicate",value:ge}),V.useAdjustedBookValue&&ie.push({name:"Adjusted Book Value",value:de}),V.useLiquidationValue&&ie.push({name:"Liquidation Value",value:be}),`<h2 id="asset">Asset-Based Valuation${S}</h2>
536${V.useCostToReplicate?`<h3>1. Cost to Replicate Breakdown</h3>
537<h4>Investment & Funding</h4>
538<table>
539<tr><td>Equity Investment Received</td><td class="right">${b(V.equityInvestment)}</td></tr>
540<tr><td>Grant Funding Received/Unlocked</td><td class="right">${b(V.grantFunding)}</td></tr>
541<tr><td>Total Gross Profit (Last 3 Years)</td><td class="right">${b(V.grossProfit)}</td></tr>
542</table>
543
544${V.employees.length>0?`<h4>Unpaid/Underpaid Employee Costs</h4>
545<table>
546<tr><th>Employee Name & Role</th><th class="right">Cost</th></tr>
547${V.employees.map(Z=>`<tr><td>${Z.name||"(unnamed)"}</td><td class="right">${b(Z.cost)}</td></tr>`).join("")}
548<tr class="highlight"><td>Total Unpaid Employee Costs</td><td class="right">${b(oe)}</td></tr>
549</table>`:""}
550
551<h4>Calculation</h4>
552<table>
553<tr><td>Subtotal (before inflation)</td><td class="right">${b(ae)}</td></tr>
554<tr><td>Inflation Adjustment (${V.inflationRate}%)</td><td class="right">${b(ye)}</td></tr>
555<tr style="border-top: 2px solid #cbd5e1;"><td><strong>Total Replication Cost</strong></td><td class="right"><strong>${b(X)}</strong></td></tr>
556<tr><td>Less: Total Liabilities</td><td class="right">(${b(V.totalLiabilities)})</td></tr>
557<tr class="highlight" style="border-top: 2px solid #1e3a8a;"><td><strong>Net Cost to Replicate</strong></td><td class="right"><strong>${b(ge)}</strong></td></tr>
558</table>`:""}
559
560${V.useAdjustedBookValue?`<h3>2. Adjusted Book Value</h3>
561<table>
562<tr><td>Total Assets</td><td class="right">${b(V.bookAssets)}</td></tr>
563<tr><td>Less: Total Liabilities</td><td class="right">(${b(V.bookLiabilities)})</td></tr>
564<tr><td>Fair Value Adjustment</td><td class="right">${b(V.fairValueAdjustment)}</td></tr>
565<tr class="highlight"><td><strong>Adjusted Book Value</strong></td><td class="right"><strong>${b(de)}</strong></td></tr>
566</table>`:""}
567
568${V.useLiquidationValue?`<div style="page-break-before: always;"></div><h3>3. Liquidation Value</h3>
569<table>
570<tr><td>Liquidation Asset Value</td><td class="right">${b(V.liquidationAssets)}</td></tr>
571<tr><td>Liquidation Discount</td><td class="right">${V.liquidationDiscount}%</td></tr>
572<tr class="highlight"><td><strong>Liquidation Value</strong></td><td class="right"><strong>${b(be)}</strong></td></tr>
573</table>`:""}
574
575<h3>Final Asset-Based Valuation</h3>
576${ie.length>1?`<table>
577<tr><th>Method</th><th class="right">Value</th></tr>
578${ie.map(Z=>`<tr><td>${Z.name}</td><td class="right">${b(Z.value)}</td></tr>`).join("")}
579<tr class="highlight"><td><strong>Average (${ie.length} methods)</strong></td><td class="right"><strong>${b(t.assetBased)}</strong></td></tr>
580</table>`:`<div class="note"><strong>${b(t.assetBased)}</strong></div>`}
581<div class="method-guide">
582<h4>How This Method Works</h4>
583<p>Asset-based valuation estimates what a company is worth based on its tangible and intangible assets, rather than future earnings. It answers: "What would it cost to re
583create or liquidate this business?"</p>
584<ul>
585<li><strong>Cost to Replicate</strong> tallies all investments, funding, and labour that would be needed to rebuild the company from scratch, adjusted for inflation and net of liabilities.</li>
586<li><strong>Adjusted Book Value</strong> takes the accounting book value and adjusts assets to their current fair market value.</li>
587<li><strong>Liquidation Value</strong> estimates what could be recovered if the company's assets were sold off, applying a discount for the urgency of sale.</li>
588</ul>
589<p><strong>Interpreting the numbers:</strong> A higher asset-based value suggests the company has significant tangible worth. If this value is much lower than other methods, it means the company's value comes mainly from growth potential rather than existing assets. This method is most relevant for asset-heavy businesses or as a valuation floor.</p>
590</div>`},N=()=>{const V=f,oe=V.soundIdea+V.prototype+V.qualityTeam+V.strategicRelationships+V.productRollout,ae=(V.teamScore+V.opportunityScore+V.productScore
590+V.competitiveScore+V.marketingScore+V.needForCapital)/600,ye=V.averagePreMoneyValuation*ae,X=[{name:"Management",val:V.riskManagement},{name:"Stage of Business",val:V.riskStage},{name:"Legislation/Political",val:V.riskLegislation},{name:"Manufacturing",val:V.riskManufacturing},{name:"Sales & Marketing",val:V.riskSales},{name:"Funding/Capital",val:V.riskFunding},{name:"Competition",val:V.riskCompetition},{name:"Technology",val:V.riskTechnology},{name:"Litigation",val:V.riskLitigation},{name:"International",val:V.riskInternational},{name:"Reputation",val:V.riskReputation},{name:"Potential Lucrative Exit",val:V.riskPotentialLucrative}],ge=X.reduce((be,ie)=>be+ie.val,0),de=V.averagePreMoneyValuation+ge*V.riskAdjustmentPerPoint;return`<h2 id="prerevenue">Pricing-Based (Pre-Revenue) Valuation${S}</h2>
591${V.useBerkus?`<h3>Berkus Method</h3>
592<table>
593<tr><th>Factor</th><th class="right">Value</th></tr>
594<tr><td>Sound Idea</td><td class="right">${b(V.soundIdea)}</td></tr>
595<tr><td>Prototype</td><td class="right">${b(V.prototype)}</td></tr>
596<tr><td>Quality Team</td><td class="right">${b(V.qualityTeam)}</td></tr>
597<tr><td>Strategic Relationships</td><td class="right">${b(V.strategicRelationships)}</td></tr>
598<tr><td>Product Rollout</td><td class="right">${b(V.productRollout)}</td></tr>
599<tr class="highlight"><td>Berkus Total</td><td class="right">${b(oe)}</td></tr>
600</table>`:""}
601${V.useScorecard?`<h3>Scorecard Method</h3>
602<table>
603<tr><td>Average Pre-Money Valuation</td><td class="right">${b(V.averagePreMoneyValuation)}</td></tr>
604<tr><td>Team Score</td><td class="right">${V.teamScore}%</td></tr>
605<tr><td>Opportunity Score</td><td class="right">${V.opportunityScore}%</td></tr>
606<tr><td>Product Score</td><td class="right">${V.productScore}%</td></tr>
607<tr><td>Competitive Score</td><td class="right">${V.competitiveScore}%</td></tr>
608<tr><td>Marketing Score</td><td class="right">${V.marketingScore}%</td></tr>
609<tr><td>Need for Capital</td><td class="right">${V.needForCapital}%</td></tr>
610<tr class="highlight"><td>Scorecard Valuation</td><td class="right">${b(ye)}</td></tr>
611</table>`:""}
612${V.useRiskFactor?`<div style="page-break-before: always;"></div><h3>Risk Factor Summation</h3>
613<table>
614<tr><th>Risk Factor</th><th class="right">Score</th></tr>
615${X.map(be=>`<tr><td>${be.name}</td><td class="right">${be.val>0?"+":""}${be.val}</td></tr>`).join("")}
616<tr><td>Risk Adjustment Per Point</td><td class="right">${b(V.riskAdjustmentPerPoint)}</td></tr>
617<tr class="highlight"><td>Risk Factor Valuation</td><td class="right">${b(de)}</td></tr>
618</table>`:""}
619<h3>Final Pre-Revenue Valuation</h3>
620<div class="note"><strong>${b(t.preRevenue)}</strong></div>
621<div class="method-guide">
622<h4>How This Method Works</h4>
623<p>Pre-revenue (pricing-based) valuation is used for early-stage startups that don't yet generate meaningful revenue. It relies on qualitative assessment of the team, product, and market opportunity.</p>
624<ul>
625<li><strong>Berkus Method</strong> assigns a monetary value (up to a cap) to five key risk areas: the idea, prototype, team, relationships, and product rollout. The sum represents the pre-money valuation.</li>
626<li><strong>Scorecard Method</strong> compares the startup against a regional average pre-money valuation, adjusting up or down based on team quality, market opportunity, product stage, and other factors.</li>
627<li><strong>Risk Factor Summation</strong> starts with the average pre-money valuation and adds or subtracts fixed amounts for 12 risk categories (e.g. management, competition, technology).</li>
628</ul>
629<p><strong>Interpreting the numbers:</strong> These methods produce a fair estimate of what an angel investor might pay. Higher values indicate strong fundamentals despite the absence of revenue. If the methods diverge significantly, investigate which factors are driving the difference — this highlights where the startup is strongest or weakest.</p>
630</div>`},P=()=>{const V=h,oe=Math.min(V.exitYear-1,p.length-1),ae=p[oe],ye=(ae==null?void 0:ae.revenue)||0,X=(ae==null?void 0:ae.grossProfitOverride)!=null?ae.grossProfitOverride:ye*(((ae==null?void 0:ae.grossMargin)||0)/100),ge=(ae==null?void 0:ae.sgaOverride)!=null?ae.sgaOverride:ye*(((ae==null?void 0:ae.sgaPercent)||0)/100),de=(ae==null?void 0:ae.rdOverride)!=null?ae.rdOverride:ye*(((ae==null?void 0:ae.rdPercent)||0)/100),be=(ae==null?void 0:ae.ebitdaOverride)!=null?ae.ebitdaOverride:X-ge-de,ie=ye*V.revenueMultiple,Z=be*V.ebitdaMultiple,fe=[];V.useRevenueMultiple&&fe.push(ie),V.useEbitdaMultiple&&fe.push(Z);const xe=fe.length>0?fe.reduce((Ae,tt)=>Ae+tt,0)/fe.length:0,J=m.filter(Ae=>Ae.investmentAmount>0&&Ae.preMoneyValuation>0),te=s+i,ce=te>0?i/te*100:0;let re=ce;J.forEach(Ae=>{const tt=Ae.preMoneyValuation+Ae.investmentAmount,St=Ae.investmentAmount/tt*100;re=re*(1-St/100)});const Ie=xe*(re/100),Fe=Math.pow(1+V.targetReturn/100,V.exitYear),he=Ie/Fe,ke=ce>0?he/ce*100:0,We=Math.max(0,ke-i);return`<h2 id="market">Market-Based Valuation (Venture Capital Method)${S}</h2>
631
632<table>
633<tr><td>Exit Year</td><td class="right">Year ${V.exitYear}</td><td>Revenue Multiple</td><td class="right">${V.revenueMultiple}x</td></tr>
634<tr><td>EBITDA Multiple</td><td class="right">${V.ebitdaMultiple}x</td><td>Target IRR</td><td class="right">${V.targetReturn}%</td></tr>
635</table>
636
637<h3>Exit Financials & Valuation (Year ${V.exitYear})</h3>
638<table>
639<tr><td>Revenue</td><td class="right">${b(ye)}</td><td>EBITDA</td><td class="right">${b(be)}</td></tr>
640${V.useRevenueMultiple?`<tr><td>Revenue-Based Value (${V.revenueMultiple}x)</td><td class="right">${b(ie)}</td>
640`:'<tr><td colspan="2"></td>'}${V.useEbitdaMultiple?`<td>EBITDA-Based Value (${V.ebitdaMultiple}x)</td><td class="right">${b(Z)}</td></tr>`:'<td colspan="2"></td></tr>'}
641<tr class="highlight"><td><strong>Expected Exit Value${fe.length>1?" (Avg)":""}</strong></td><td class="right"><strong>${b(xe)}</strong></td><td colspan="2"></td></tr>
642</table>
643
644<h3>Dilution & Implied Valuation</h3>
645<table>
646<tr><td>Initial Ownership</td><td class="right">${ce.toFixed(2)}%</td>${J.length>0?`<td>After Dilution (${J.length} round${J.length>1?"s":""})</td><td class="right">${re.toFixed(2)}%</td>`:'<td colspan="2"></td>'}</tr>
647${J.length>0?`<tr><td>Total Dilution</td><td class="right">-${(ce-re).toFixed(2)}%</td><td colspan="2"></td></tr>`:""}
648<tr class="highlight"><td><strong>Investor Exit Value</strong></td><td class="right"><strong>${b(Ie)}</strong></td><td colspan="2"><em>${re.toFixed(2)}% of ${b(xe)}</em></td></tr>
649</table>
650
651<table>
652<tr><td>Post-Money Valuation (at ${V.targetReturn}% IRR)</td><td class="right">${b(ke)}</td></tr>
653<tr><td>Less: Investment Amount</td><td class="right">(${b(i)})</td></tr>
654<tr class="highlight" style="border-top: 2px solid #1e3a8a;"><td><strong>Pre-Money Valuation</strong></td><td class="right"><strong>${b(We)}</strong></td></tr>
655</table>
656
657<div class="method-guide" style="page-break-before: always;">
658<h4>How to Interpret the Venture Capital Method</h4>
659<p>The Venture Capital (VC) method estimates what a company is worth today by working backwards from a projected future exit value. It answers the question: <em>"Given the expected exit, what should an investor pay now to achieve their target return?"</em></p>
660<p><strong>Key concepts:</strong></p>
661<ul>
662<li><strong>Exit Value:</strong> The estimated sale price of the company at the chosen exit year, derived from revenue and/or EBITDA multiples applied to projected financials. When both methods are selected, the average is used.</li>
663<li><strong>Revenue &amp; EBITDA Multiples:</strong> These reflect what comparable companies sell for relative to their revenue or earnings. Higher multiples indicate stronger growth expectations or market premiums.</li>
664<li><strong>Target IRR (Internal Rate of Return):</strong> The annual return an investor requires to justify the risk. Early-stage ventures typically demand 30–60% IRR. A higher IRR requirement lowers the price an investor is willing to pay today.</li>
665<li><strong>Dilution:</strong> Future funding rounds reduce the investor's ownership percentage. The model accounts for this by calculating how much of the exit value the investor will actually receive after all subsequent rounds.</li>
666<li><strong>Post-Money Valuation:</strong> The present value of the investor's expected exit proceeds, scaled up to reflect the full company value. This is the maximum the company should be worth immediately after the investment.</li>
667<li><strong>Pre-Money Valuation:</strong> The post-money valuation minus the investment amount. This is the implied value of the company <em>before</em> the investment is made.</li>
668</ul>
669<p><strong>Interpreting the numbers:</strong></p>
670<ul>
671<li>A <strong>higher pre-money valuation</strong> means the projected exit is strong enough to justify a higher entry price for investors.</li>
672<li>If this valuation is <strong>lower than other methods</strong>, it suggests the investor needs a larger ownership stake to meet their return threshold — the exit may not be large enough relative to the risk.</li>
673<li>The <strong>dilution impact</strong> section shows how much ownership erodes through future rounds. Significant dilution can dramatically reduce the investor's share of exit proceeds.</li>
674<li>Compare the <strong>investor exit value</strong> against the initial investment to see the projected return multiple (e.g., 10x means the investor gets back 10 times their investment).</li>
675</ul>
676</div>`},A=()=>{var ce;const V=d,oe=p.slice(0,g).map((re,Ie)=>{const Fe=re.grossProfitOverride!=null?re.grossProfitOverride:re.revenue*(re.grossMargin/100),he=re.sgaOverride!=null?re.sgaOverride:re.revenue*(re.sgaPercent/100),ke=re.rdOverride!=null?re.rdOverride:re.revenue*(re.rdPercent/100),We=re.ebitdaOverride!=null?re.ebitdaOverride:Fe-he-ke,Ae=re.depreciationOverride!=null?re.depreciationOverride:re.revenue*(re.depreciationPercent/100),tt=re.amortizationOverride!=null?re.amortizationOverride:re.revenue*(re.amortizationPercent/100),St=re.ebitOverride!=null?re.ebitOverride:We-Ae-tt,Tr=St*(1-re.taxRate/100),Mr=Ae+tt,Sr=re.revenue*(re.workingCapitalPercent/100),gn=re.revenue*(re.capexPercent/100),Ze
676=Tr+Mr-Sr-gn,qr=1/Math.pow(1+V.discountRate/100,Ie+1),Ye=Ze*qr;return`<tr><td>Year ${Ie+1}</td><td class="right">${b(We)}</td><td class="right">${b(St)}</td><td class="right">${b(Tr)}</td><td class="right">${b(Ze)}</td><td class="right">${qr.toFixed(4)}</td><td class="right">${b(Ye)}</td></tr>`}).join(""),ae=p.slice(0,g).map(re=>{const Ie=re.grossProfitOverride!=null?re.grossProfitOverride:re.revenue*(re.grossMargin/100),Fe=re.sgaOverride!=null?re.sgaOverride:re.revenue*(re.sgaPercent/100),he=re.rdOverride!=null?re.rdOverride:re.revenue*(re.rdPercent/100),ke=re.ebitdaOverride!=null?re.ebitdaOverride:Ie-Fe-he,We=re.depreciationOverride!=null?re.depreciationOverride:re.revenue*(re.depreciationPercent/100),Ae=re.amortizationOverride!=null?re.amortizationOverride:re.revenue*(re.amortizationPercent/100),St=(re.ebitOverride!=null?re.ebitOverride:ke-We-Ae)*(1-re.taxRate/100),Tr=We+Ae,Mr=re.revenue*(re.workingCapitalPercent/100),Sr=re.revenue*(re.capexPercent/100);return{fcf:St+Tr-Mr-Sr}}),ye=ae.reduce((re,Ie,Fe)=>re+Ie.fcf/Math.pow(1+V.discountRate/100,Fe+1),0),X=((ce=ae[ae.length-1])==null?void 0:ce.fcf)||0,ge=hq(X,V.discountRate,V.terminalGrowthRate),de=ge===null,ie=(ge??0)/Math.pow(1+V.discountRate/100,g),Z=ye+ie,fe=Z*(1-V.defaultRisk/100),xe=V.totalDebt-V.cashAndEquivalents,J=fe-xe,te=de?`<p style="color:#b91c1c;font-size:11px;margin-top:6px"><strong>Warning:</strong> Discount rate (${V.discountRate}%) must exceed terminal growth rate (${V.terminalGrowthRate}%). Terminal Value shown as 0.</p>`:"";return`<h2 id="dcf">Intrinsic (DCF) Valuation${S}</h2>
677<h3>Assumptions</h3>
678<table>
679<tr><td>Discount Rate (WACC)</td><td class="right">${V.discountRate}%</td></tr>
680<tr><td>Terminal Growth Rate</td><td class="right">${V.terminalGrowthRate}%</td></tr>
681<tr><td>Default Risk</td><td class="right">${V.defaultRisk}%</td></tr>
682<tr><td>Total Debt</td><td class="right">${b(V.totalDebt)}</td></tr>
683<tr><td>Cash & Equivalents</td><td class="right">${b(V.cashAndEquivalents)}</td></tr>
684</table>
685<h3>Free Cash Flow Projections</h3>
686<table>
687<tr><th>Year</th><th class="right">EBITDA</th><th class="right">EBIT</th><th class="right">NOPAT</th><th class="right">FCF</th><th class="right">Discount Factor</th><th class="right">PV of FCF</th></tr>
688${oe}
689</table>
690<h3>DCF Valuation Summary</h3>
691<table>
692<tr><td>PV of Projected Cash Flows</td><td class="right">${b(ye)}</td></tr>
693<tr><td>Terminal Value (PV)</td><td class="right">${b(ie)}</td></tr>
694<tr style="font-weight:bold;border-top:2px solid #333"><td>Enterprise Value</td><td class="right">${b(Z)}</td></tr>
695<tr><td>Default Risk Adjustment (${V.defaultRisk}%)</td><td class="right" style="color:#c44569">-${b(Z-fe)}</td></tr>
696<tr style="font-weight:bold"><td>Adjusted Enterprise Value</td><td class="right">${b(fe)}</td></tr>
697<tr><td>Less: Net Debt</td><td class="right">${b(xe)}</td></tr>
698<tr style="font-weight:bold;border-top:2px solid #333;font-size:1.1em"><td>Equity Value (DCF)</td><td class="right">${b(J)}</td></tr>
699${te}
700</table>
701<div class="method-guide">
702<h4>How This Method Works</h4>
703<p>Discounted Cash Flow (DCF) calculates a company's intrinsic value based on its ability to generate future cash flows. It is considered one of the most theoretically sound valuation approaches.</p>
704<ul>
705<li><strong>Free Cash Flow (FCF)</strong> for each projected year is calculated from operating profits, adjusted for taxes, depreciation, capital expenditure, and working capital changes.</li>
706<li><strong>Discount Rate (WACC)</strong> reflects the required return for investors given the company's risk profile. Higher risk = higher discount rate = lower present value.</li>
707<li><strong>Terminal Value</strong> captures the company's value beyond the projection period, assuming cash flows grow at a stable rate indefinitely.</li>
708<li>Each year's FCF is discounted back to present value, and the sum (plus terminal value, minus debt, plus cash) gives the enterprise value.</li>
709</ul>
710<p><strong>Interpreting the numbers:</strong> The DCF value represents what the company is theoretically worth today based on its future cash-generating ability. A DCF value significantly above asset-based figures suggests strong growth expectations. This method is highly sensitive to the discount rate and terminal growth rate — small changes in these assumptions can dramatically alter the result, which is why sensitivity analysis is recommended.</p>
711</div>`},O=()=>{const V=s+i,oe=V>0?i/V*100:0,ae=m.map((ye,X)=>{const ge=ye.preMoneyValuation+ye.investmentAmount,de=ge>0?ye.investmentAmount/ge*100:0;return`<tr><td>Round ${X+2} (Year ${ye.year})</td><td class="right">${b(ye.investmentAmount)}</td><td class="right">${b(ye.preMoneyValuation)}</td><td class="right">${b(ge)}</td><td class="right">${de.toFixed(1)}%</td><td>${ye.isPreferred?`Preferred (${ye.liquidationMultiple}x)`:"Common"}</td></tr>`}).join("");return`<h2 id="investment">Investment Analysis${S}</h2>
712<h3>Initial Investment</h3>
713<table>
714<tr><td>Investment Amount</td><td class="right">${b(i)}</td></tr>
715<tr><td>Pre-Money Valuation</td><td class="right">${b(s)}</td></tr>
716<tr><td>Post-Money Valuation</td><td class="right">${b(V)}</td></tr>
717<tr><td>Investor Ownership</td><td class="right">${oe.toFixed(1)}%</td></tr>
718<tr><td>Stock Type</td><td class="right">${l?`Preferred (${c}x)`:"Common"}</td></tr>
719</table>
720${m.length>0?`<h3>Future Rounds</h3>
721<table>
722<tr><th>Round</th><th class="right">Investment</th><th class="right">Pre-Money</th><th class="right">Post-Money</th><th class="right">Ownership</th><th>Type</th></tr>
723${ae}
724</table>`:"<p>
724No future rounds configured.</p>"}
725<div class="method-guide">
726<h4>How to Interpret This Section</h4>
727<p>Investment Analysis maps out the ownership structure and how it changes over time as new funding rounds occur.</p>
728<ul>
729<li><strong>Post-Money Valuation</strong> = Pre-Money Valuation + Investment Amount. It represents the company's implied total value immediately after the investment.</li>
730<li><strong>Investor Ownership</strong> = Investment Amount ÷ Post-Money Valuation. This is the percentage of the company the investor receives.</li>
731<li><strong>Future Rounds</strong> show how subsequent investments dilute earlier investors' ownership. Each new round creates new shares, reducing existing holders' percentage.</li>
732<li><strong>Preferred vs Common stock</strong>: Preferred stockholders receive their investment back first (multiplied by the liquidation multiple) before common stockholders in a liquidation or sale.</li>
733</ul>
734<p>Use this section to understand how much of the company each investor owns and how future fundraising will affect those stakes.</p>
735</div>`},M=()=>{var Z,fe;const V=s+i,oe=V>0?i/V*100:0,ae=i>0?(v*oe/100-i)/i*100:0,ye=i>0?v*oe/100/i:0,ge=(()=>{const xe=[-i];for(let te=0;te<g;te++){const ce=p[te];if(!ce){xe.push(0);continue}const re=ce.revenue||0,Ie=ce.grossProfitOverride!=null?ce.grossProfitOverride:re*(ce.grossMargin/100),Fe=ce.sgaOverride!=null?ce.sgaOverride:re*(ce.sgaPercent/100),he=ce.rdOverride!=null?ce.rdOverride:re*(ce.rdPercent/100),ke=ce.ebitdaOverride!=null?ce.ebitdaOverride:Ie-Fe-he,We=ce.depreciationOverride!=null?ce.depreciationOverride:re*(ce.depreciationPercent/100),Ae=ce.amortizationOverride!=null?ce.amortizationOverride:re*(ce.amortizationPercent/100),tt=ce.ebitOverride!=null?ce.ebitOverride:ke-We-Ae,St=ce.interestIncomeOverride!=null?ce.interestIncomeOverride:re*(ce.interestIncomePercent/100),Tr=ce.interestExpenseOverride!=null?ce.interestExpenseOverride:re*(ce.interestExpensePercent/100),Mr=ce.ebtOverride!=null?ce.ebtOverride:tt+St-Tr,Sr=ce.taxesOverride!=null?ce.taxesOverride:Mr*(ce.taxRate/100),gn=ce.netIncomeOverride!=null?ce.netIncomeOverride:Mr-Sr,Ze=re*(ce.capexPercent/100),qr=re*(ce.workingCapitalPercent/100),Ye=gn+We+Ae-Ze-qr,yt=Ye>0?Ye*(ce.dividendPercent/100)*(oe/100):0;te===g-1?xe.push(yt+v*oe/100):xe.push(yt)}let J=.1;for(let te=0;te<1e3;te++){let ce=0,re=0;for(let Fe=0;Fe<xe.length;Fe++)ce+=xe[Fe]/Math.pow(1+J,Fe),re-=Fe*xe[Fe]/Math.pow(1+J,Fe+1);if(Math.abs(re)<1e-10)break;const Ie=J-ce/re;if(Math.abs(Ie-J)<1e-8){J=Ie;break}J=Ie}return isFinite(J)?J*100:0})(),de=((Z=p[0])==null?void 0:Z.revenue)||0,be=((fe=p[g-1])==null?void 0:fe.revenue)||0,ie=de>0&&be>0&&g>1?(Math.pow(be/de,1/(g-1))-1)*100:0;return`<h2 id="returns">Investor Return Analysis${S}</h2>
736<table>
737<tr><td>Initial Investment</td><td class="right">${b(i)}</td></tr>
738<tr><td>Exit Value (Market-Based)</td><td class="right">${b(v)}</td></tr>
739<tr><td>Investor Ownership (Initial Round)</td><td class="right">${oe.toFixed(1)}%</td></tr>
740<tr><td>Investor Share of Exit</td><td class="right">${b(v*oe/100)}</td></tr>
741<tr><td>Money Multiple</td><td class="right">${ye.toFixed(2)}x</td></tr>
742<tr class="highlight"><td>IRR (Internal Rate of Return)</td><td class="right">${ge.toFixed(1)}%</td></tr>
743<tr><td>Simple ROI</td><td class="right">${ae.toFixed(1)}%</td></tr>
744<tr><td>Revenue CAGR</td><td class="right">${ie.toFixed(1)}%</td></tr>
745</table>
746<div class="note">Note: IRR accounts for the timing of dividend distributions and exit proceeds. The calculation respects any manual overrides applied in Financial Projections.</div>
747<div class="method-guide">
748<h4>How to Interpret These Returns</h4>
749<p>This section shows the financial outcome for the investor based on the modelled exit scenario.</p>
750<ul>
751<li><strong>Money Multiple</strong> shows how many times the initial investment is returned (e.g. 3.0x means the investor gets back 3× their money). Venture investors typically target 3–10x.</li>
752<li><strong>IRR (Internal Rate of Return)</strong> is the annualised return percentage, accounting for the timing of all cash flows (dividends and exit). It allows comparison with other investment opportunities. Early-stage targets are typically 30–60%.</li>
753<li><strong>Simple ROI</strong> is the total percentage gain without considering time. Useful as a quick check but less informative than IRR for multi-year investments.</li>
754<li><strong>Revenue CAGR</strong> (Compound Annual Growth Rate) shows how fast the company's revenue grows on average each year.</li>
755</ul>
756<p>Strong returns depend on a realistic exit value, manageable dilution, and a reasonable time horizon. If returns appear too high, scrutinise the exit assumptions; if too low, the investment may not compensate for the risk involved.</p>
757</div>`},k=()=>{const{assetWeight:V,preRevenueWeight:oe,marketWeight:ae,dcfWeight:ye}=a,X=V+oe+ae+ye,ge=X===100?(t.assetBased*V+t.preRevenue*oe+t.marketBased*ae+t.dcf*ye)/100:0,de=s+i,be=de>0?i/de*100:0,ie=[{name:"Asset-Based",value:t.assetBased,color:"#2563eb"},{name:"Pricing-Based",value:t.preRevenue,color:"#22c55e"},{name:"Market-Based",value:t.marketBased,color:"#f59e0b"},{name:"Intrinsic (DCF)",value:t.dcf,color:"#8b5cf6"},{name:"Weighted Avg",value:ge,color:"#ef4444"}],Z=Math.max(...ie.map(J=>Math.abs(J.value)),1),xe=`<h3>Valuation Methods Comparison</h3>
758<div style="padding:16px 0;">${ie.map(J=>{const te=Math.max(0,Math.abs(J.value)/Z*100);return`<div style="display:flex;align-items:center;margin:8px 0;-webkit-print-color-adjust:exact;print-color-adjust:exact;color-adjust:exact;">
759        <div style="width:120px;font-size:12px;text-align:right;padding-right:10px;flex-shrink:0;">${J.name}</div>
760        <div style="flex:1;background-color:#f1f5f9;border-radius:4px;
760height:28px;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;color-adjust:exact;">
761          <div style="width:${te}%;background-color:${J.color};height:100%;border-radius:4px;min-width:2px;-webkit-print-color-adjust:exact;print-color-adjust:exact;color-adjust:exact;"></div>
762        </div>
763        <div style="width:130px;font-size:12px;text-align:right;padding-left:10px;flex-shrink:0;font-weight:600;">${b(J.value)}</div>
764      </div>`}).join("")}</div>`;return`<h2 id="summary">Valuation Summary${S}</h2>
765${xe}
766<h3>Weighted Average Breakdown</h3>
767<table>
768<tr><th>Method</th><th class="right">Weight</th><th class="right">Valuation</th><th class="right">Contribution</th></tr>
769<tr><td>Asset-Based</td><td class="right">${V}%</td><td class="right">${b(t.assetBased)}</td><td class="right">${b(t.assetBased*V/100)}</td></tr>
770<tr><td>Pricing-Based (Pre-Revenue)</td><td class="right">${oe}%</td><td class="right">${b(t.preRevenue)}</td><td class="right">${b(t.preRevenue*oe/100)}</td></tr>
771<tr><td>Market-Based</td><td class="right">${ae}%</td><td class="right">${b(t.marketBased)}</td><td class="right">${b(t.marketBased*ae/100)}</td></tr>
772<tr><td>Intrinsic (DCF)</td><td class="right">${ye}%</td><td class="right">${b(t.dcf)}</td><td class="right">${b(t.dcf*ye/100)}</td></tr>
773<tr class="highlight"><td>Weighted Average</td><td class="right">${X}%</td><td class="right" colspan="2">${b(ge)}</td></tr>
774</table>
775<h3>Investment Overview</h3>
776<table>
777<tr><td>Investment Amount</td><td class="right">${b(i)}</td></tr>
778<tr><td>Pre-Money Valuation</td><td class="right">${b(s)}</td></tr>
779<tr><td>Post-Money Valuation</td><td class="right">${b(de)}</td></tr>
780<tr><td>Investor Ownership</td><td class="right">${be.toFixed(1)}%</td></tr>
781</table>
782<div class="method-guide">
783<h4>How to Interpret the Summary</h4>
784<p>The summary combines all valuation methods into a single weighted average, giving you a balanced view of the company's estimated worth.</p>
785<ul>
786<li><strong>Weighted Average</strong> lets you assign importance to each method based on the company's stage and characteristics. For example, pre-revenue startups might weight the Pricing-Based method higher, while mature companies lean on DCF.</li>
787<li>If all methods produce similar values, there is stronger confidence in the valuation. Large discrepancies between methods highlight uncertainty and suggest further investigation.</li>
788<li>The <strong>bar chart</strong> provides a visual comparison — look for outliers that might indicate overly optimistic or conservative assumptions in a particular method.</li>
789</ul>
790<p>No single method gives the "correct" answer. The weighted average is a considered estimate that balances multiple perspectives. Use the range between the lowest and highest method as a negotiation corridor.</p>
791</div>
792`},E=()=>{var xe,J;if(!y||y.length===0)return`<h2 id="historics">Historic Financials${S}</h2><p>No historic financial data entered.</p>`;const V=te=>`${te.toFixed(1)}%`,oe=y.map(te=>{const ce=te.revenue||1,re=te.revenue-te.cogs,Ie=re-te.sgaExpense-te.rdExpense,Fe=Ie-te.depreciation-te.amortization,he=Fe-te.interestExpense-te.taxExpense,ke=te.currentAssets-te.currentLiabilities-te.cash,We=Ie-ke-te.netCapex;return{...te,grossProfit:re,ebitda:Ie,ebit:Fe,netProfit:he,workingCapital:ke,fcf:We,grossMargin:re/ce*100,ebitdaMargin:Ie/ce*100,ebitMargin:Fe/ce*100,netMargin:he/ce*100,fcfMargin:We/ce*100,wcSales:ke/ce*100,capexSales:te.netCapex/ce*100}}),ae=((xe=oe[0])==null?void 0:xe.revenue)||0,ye=((J=oe[oe.length-1])==null?void 0:J.revenue)||0,X=oe.length,ge=ae>0&&ye>0&&X>1?(Math.pow(ye/ae,1/(X-1))-1)*100:0,de={gross:oe.reduce((te,ce)=>te+ce.grossMargin,0)/X,ebitda:oe.reduce((te,ce)=>te+ce.ebitdaMargin,0)/X,ebit:oe.reduce((te,ce)=>te+ce.ebitMargin,0)/X,net:oe.reduce((te,ce)=>te+ce.netMargin,0)/X,fcf:oe.reduce((te,ce)=>te+ce.fcfMargin,0)/X,wcSales:oe.reduce((te,ce)=>te+ce.wcSales,0)/X,capexSales:oe.reduce((te,ce)=>te+ce.capexSales,0)/X},be=oe.map(te=>`<th class="right">${te.year}</th>`).join(""),ie=(te,ce,re=!1)=>`<tr${re?' class="highlight"':""}><td>${te}</td>${ce.map(Ie=>`<td class="right">${Ie}</td>`).join("")}</tr>`,Z=[ie("Revenue",[...oe.map(te=>b(te.revenue)),ge>0?`${V(ge)} CAGR`:"-"]),ie("COGS",[...oe.map(te=>`(${b(te.cogs)}
792)`),"-"]),ie("<strong>Gross Profit</strong>",[...oe.map(te=>`${b(te.grossProfit)}`),V(de.gross)],!0),ie("SG&A Expense",[...oe.map(te=>`(${b(te.sgaExpense)})`),"-"]),ie("R&D Expense",[...oe.map(te=>`(${b(te.rdExpense)})`),"-"]),ie("<strong>EBITDA</strong>",[...oe.map(te=>b(te.ebitda)),V(de.ebitda)],!0),ie("Depreciation",[...oe.map(te=>`(${b(te.depreciation)})`),"-"]),ie("Amortization",[...oe.map(te=>`(${b(te.amortization)})`),"-"]),ie("<strong>EBIT</strong>",[...oe.map(te=>b(te.ebit)),V(de.ebit)],!0),ie("Interest Expense",[...oe.map(te=>`(${b(te.interestExpense)})`),"-"]),ie("Tax Expense",[...oe.map(te=>`(${b(te.taxExpense)})`),"-"]),ie("<strong>Net Profit</strong>",[...oe.map(te=>b(te.netProfit)),V(de.net)],!0)],fe=[ie("Current Assets",[...oe.map(te=>b(te.currentAssets)),"-"]),ie("Current Liabilities",[...oe.map(te=>`(${b(te.currentLiabilities)})`),"-"]),ie("Cash",[...oe.map(te=>`(${b(te.cash)})`),"-"]),ie("<strong>Working Capital</strong>",[...oe.map(te=>b(te.workingCapital)),"-"],!0),ie("Net CapEx",[...oe.map(te=>`(${b(te.netCapex)})`),"-"]),ie("<strong>Free Cash Flow</strong>",[...oe.map(te=>b(te.fcf)),V(de.fcf)],!0)];return`<h2 id="historics">Historic Financials${S}</h2>
793<h3>Profit & Loss</h3>
794<table>
795<tr><th>Item</th>${be}<th class="right">Avg / CAGR</th></tr>
796${Z.join(`
797`)}
798</table>
799<h3>Working Capital & Free Cash Flow</h3>
800<table>
801<tr><th>Item</th>${be}<th class="right">Avg Margin</th></tr>
802${fe.join(`
803`)}
804</table>
805<h3>Average Margins Summary</h3>
806<table>
807<tr><th>Metric</th><th class="right">Average</th></tr>
808<tr><td>Gross Margin</td><td class="right">${V(de.gross)}</td></tr>
809<tr><td>EBITDA Margin</td><td class="right">${V(de.ebitda)}</td></tr>
810<tr><td>EBIT Margin</td><td class="right">${V(de.ebit)}</td></tr>
811<tr><td>Net Profit Margin</td><td class="right">${V(de.net)}</td></tr>
812<tr><td>FCF Margin</td><td class="right">${V(de.fcf)}</td></tr>
813<tr><td>WC ex Cash / Sales</td><td class="right">${V(de.wcSales)}</td></tr>
814<tr><td>Net CapEx / Sales</td><td class="right">${V(de.capexSales)}</td></tr>
815${ge>0?`<tr><td>Revenue CAGR</td><td class="right">${V(ge)}</td></tr>`:""}
816</table>
817<div class="method-guide">
818<h4>How to Interpret Historic Financials</h4>
819<p>Historic financials provide a factual baseline for evaluating the company's past performance. They help validate the assumptions used in forward-looking projections.</p>
820<ul>
821<li><strong>Revenue CAGR</strong> shows the compound annual growth rate of top-line revenue over the historic period.</li>
822<li><strong>Margins</strong> (Gross, EBITDA, EBIT, Net, FCF) reveal how efficiently the company converts revenue into profit at each stage of the income statement.</li>
823<li><strong>Working Capital</strong> (Current Assets − Current Liabilities − Cash) indicates how much capital is tied up in day-to-day operations.</li>
824<li><strong>Free Cash Flow</strong> (EBITDA − Working Capital − Net CapEx) shows the cash available after reinvesting in the business.</li>
825</ul>
826<p>Compare historic margins with projected assumptions to assess whether future targets are realistic. Improving margins suggest operational leverage; declining margins may signal competitive pressure or scaling challenges.</p>
827</div>`},$=()=>Ln(pa("Financial Projections Report",j(),r,n,x)),T=()=>Ln(pa("Asset-Based Valuation Report",C(),r,n,x)),R=()=>Ln(pa("Pricing-Based (Pre-Revenue) Valuation Report",N(),r,n,x)),B=()=>Ln(pa("Market-Based Valuation Report",P(),r,n,x)),F=()=>Ln(pa("Intrinsic (DCF) Valuation Report",A(),r,n,x)),D=()=>Ln(pa("Investment Analysis Report",O(),r,n,x)),G=()=>Ln(pa("Investor Return Report",M(),r,n,x)),K=()=>Ln(pa("Valuation Summary Report",k(),r,n,x)),z=()=>Ln(pa("Historic Financials Report",E(),r,n,x)),U=()=>{const V=n||"The company",oe=s+i,ae=oe>0?(i/oe*100).toFixed(1):"0",{assetWeight:ye,preRevenueWeight:X,marketWeight:ge,dcfWeight:de}=a,ie=ye+X+ge+de===100?(t.assetBased*ye+t.preRevenue*X+t.marketBased*ge+t.dcf*de)/100:0,Z=p.slice(0,g).map(Ze=>Ze.revenue||0),fe=Z[0]||0,xe=Z[Z.length-1]||0,J=fe>0&&xe>fe&&g>1?((Math.pow(xe/fe,1/(g-1))-1)*100).toFixed(1):null,te=Ze=>(Ze==null?void 0:Ze.grossProfitOverride)!=null&&(Ze==null?void 0:Ze.revenue)>0?Ze.grossProfitOverride/Ze.revenue*100:(Ze==null?void 0:Ze.grossMargin)||0,ce=Math.round(te(p[0])*10)/10,re=Math.round(te(p[Math.min(g-1,p.length-1)])*10)/10,Ie=re>ce?"improving":re<ce?"declining":"stable",Fe=[t.assetBased,t.preRevenue,t.marketBased,t.dcf].filter(Ze=>Ze>0),he=Math.min(...Fe),ke=Math.max(...Fe),We=he>0?(ke/he).toFixed(1):"N/A",Ae=[{name:"Asset-Based",val:t.assetBased},{name:"Pricing-Based",val:t.preRevenue},{name:"Market-Based (VC Method)",val:t.marketBased},{name:"Intrinsic Based (DCF)",val:t.dcf}].filter(Ze=>Ze.val>0).sort((Ze,qr)=>qr.val-Ze.val),tt=Ae[0],St=Ae[Ae.length-1],Tr=[d.defaultRisk>50&&"elevated default risk assumption in the DCF model",d.discountRate>20&&`a high discount rate of ${d.discountRate}%`,h.targetReturn>30&&`aggressive target return of ${h.targetReturn}%`,m.length>0&&`dilution from ${m.length}
827 planned future round(s)`].filter(Boolean),Mr=[J&&Number(J)>20&&`strong projected revenue growth (${J}% CAGR)`,Ie==="improving"&&`improving gross margins from ${ce}% to ${re}%`,Fe.length>=3&&Number(We)<3&&"convergence across multiple valuation methods",u.bookAssets>0&&"tangible asset base providing downside protection"].filter(Boolean),Sr=[];let gn=`<p>${V} has been valued using ${Fe.length} complementary methodology${Fe.length!==1?"ies":"y"}. `;if(gn+=ie>0?`The weighted average valuation is <strong>${b(ie)}</strong>, based on assigned weights of ${ye}% (Asset-Based), ${X}% (Pricing-Based), ${ge}% (Market-Based), and ${de}% (Intrinsic Based). `:"Weights have not been finalised (must total 100%). ",Fe.length>=2&&(gn+=`Valuations range from ${b(he)} to ${b(ke)}, a spread ratio of ${We}x.`),gn+="</p>",Sr.push(`<h3>Valuation Overview</h3>${gn}`),fe>0&&Sr.push(`<h3>Financial Projections</h3><p>Revenue is projected to grow from ${b(fe)} in Year 1 to ${b(xe)} in Year ${g}${J?`, representing a compound annual growth rate of ${J}%`:""}. Gross margins are ${Ie}, moving from ${ce}% to ${re}% over the projection period. The financial model spans ${g} year${g>1?"s":""} of projections.</p>`),Ae.length>=2){let Ze="<p>";tt&&St&&tt.name!==St.name&&(Ze+=`The ${tt.name} method yields the highest estimate at ${b(tt.val)}, while the ${St.name} method produces the most conservative figure at ${b(St.val)}. `),t.dcf>0&&(Ze+=`The Intrinsic Based (DCF) valuation of ${b(t.dcf)} uses a ${d.discountRate}% discount rate (WACC) and a ${d.terminalGrowthRate}% terminal growth rate, with a ${d.defaultRisk}% default risk adjustment. `),t.marketBased>0&&(Ze+=`The Market-Based (VC Method) targets a ${h.targetReturn}% IRR with a ${h.exitYear}-year exit horizon.`),Ze+="</p>",Sr.push(`<h3>Methodology Insights</h3>${Ze}`)}if(i>0){let Ze=`<p>The proposed investment of ${b(i)} at a pre-money valuation of ${b(s)} implies a post-money valuation of ${b(oe)} and an initial investor ownership of ${ae}%.`;if(m.length>0){const qr=m.reduce((Ye,yt)=>Ye+yt.investmentAmount,0);Ze+=` ${m.length} future funding round${m.length>1?"s are":" is"} planned, raising an additional ${b(qr)} in aggregate.`}Ze+="</p>",Sr.push(`<h3>Investment Structure</h3>${Ze}`)}if(Mr.length>0&&Sr.push(`<h3>Key Drivers</h3><p>Key positive factors supporting the valuation include: ${Mr.join("; ")}. These elements strengthen the investment thesis and provide confidence in the projected outcomes.</p>`),Tr.length>0?Sr.push(`<h3>Risk Considerations</h3><p>Key risk factors to consider include: ${Tr.join("; ")}. Investors should weigh these factors when assessing the appropriate valuation range and investment terms.</p>`):Sr.push("<h3>Risk Considerations</h3><p>The model assumptions appear moderate. As with any early-stage valuation, actual outcomes may deviate significantly from projections. Investors should conduct independent due diligence.</p>"),ie>0&&i>0){const Ze=s>0?((ie/s-1)*100).toFixed(1):null;let qr=`<p>Based on the weighted average valuation of ${b(ie)}, `;Ze&&Math.abs(Number(Ze))>5?qr+=Number(Ze)>0?`the analysis suggests the company may be worth ${Ze}% more than the proposed pre-money valuation of ${b(s)}, potentially indicating favourable terms for the investor. `:`the analysis values the company at ${Math.abs(Number(Ze))}% below the proposed pre-money valuation of ${b(s)}, which may warrant further negotiation. `:qr+=`the proposed pre-money valuation of ${b(s)} appears reasonably aligned with the analytical outputs. `,qr+="</p>",Sr.push(`<h3>Conclusion</h3>${qr}`)}return`<h2 id="executive-summary">Executive Summary${S}</h2>
828${Sr.join(`
829`)}
830<div class="note" style="margin-top:24px;"><strong>Disclaimer:</strong> This executive summary is algorithmically generated from the model's current inputs. It is intended for informational purposes only and does not constitute financial or investment advice. All figures should be independently verified.</div>`},ee=()=>`
831<h2 id="about">About & Disclaimer</h2>
832
833<h3>Apollo Informal Investment</h3>
834<p>Apollo Informal Investment connects entrepreneurs with experienced informal investors, providing guidance and capital to help early-stage businesses grow.</p>
835<p><a href="https://www.apollo-informal-investment.com/" style="color:#1e3a8a;">www.apollo-informal-investment.com</a></p>
836
837<h3 style="margin-top:28px;">Prometheus Advice</h3>
838<p>This tool was created by Prometheus Advice — a strategic consultancy specialising in business growth, investment readiness, and financial modelling for startups and scale-ups.<
838/p>
839<p><a href="https://www.prometheusadvice.com/" style="color:#1e3a8a;">www.prometheusadvice.com</a></p>
840
841<div class="note" style="margin-top:32px;border-left-color:#b91c1c;">
842  <h4 style="color:#b91c1c;margin:0 0 8px 0;">Legal Disclaimer</h4>
843  <p style="margin:0;">This valuation tool is provided for <strong>informational and educational purposes only</strong>. It does not constitute investment advice, financial advice, or any form of professional recommendation. All valuations, projections, and calculations are estimates based on user-supplied inputs and simplified assumptions.</p>
844  <p style="margin:8px 0 0 0;">Use of this tool is entirely <strong>at your own risk</strong>. Neither Apollo Informal Investment, Prometheus Advice, nor any affiliated parties accept any liability for decisions made or actions taken based on the output of this tool. You should always seek independent professional advice before making any investment or financial decisions.</p>
845</div>`,Y=()=>{const V=[{id:"executive-summary",label:"Executive Summary",body:U()},{id:"summary",label:"Valuation Summary",body:k()},...y&&y.length>0?[{id:"historics",label:"Historic Financials",body:E()}]:[],{id:"projections",label:"Financial Projections",body:j()},{id:"asset",label:"Asset-Based Valuation",body:C()},{id:"prerevenue",label:"Pricing-Based (Pre-Revenue)",body:N()},{id:"market",label:"Market-Based Valuation",body:P()},{id:"dcf",label:"Intrinsic (DCF) Valuation",body:A()},{id:"investment",label:"Investment Analysis",body:O()},{id:"returns",label:"Investor Returns",body:M()},{id:"about",label:"About & Disclaimer",body:ee()}],ae=`<div class="toc">
846<h2 style="text-align:center;font-size:1.5em;margin-top:40px;">Table of Contents</h2>
847<ol style="max-width:500px;margin:32px auto;font-size:1.1em;line-height:2.2;">
848${V.map(ye=>`<li><a href="#${ye.id}">${ye.label}</a></li>`).join(`
849`)}
850</ol>
851</div>`+V.map(ye=>`<div class="page-break"></div>${ye.body}`).join(`
852`);return pa("Complete Business Valuation Report",ae,r,n,x)},W=()=>{Ln(Y())},[H,me]=w.useState(!1),[q,ue]=w.useState(""),[I,L]=w.useState(!1),Q=JSON.stringify({valuations:t,currency:r,companyName:n,weightedAverageState:a,investmentAmount:i,preMoneyValuation:s,isInitialPreferred:l,initialLiquidationMultiple:c,assetBasedState:u,preRevenueState:f,dcfState:d,marketBasedState:h,futureRounds:m,projections:p==null?void 0:p.slice(0,g),numYears:g,exitValue:v,historicData:y,displayFormat:x});w.useEffect(()=>{if(!H)return;L(!0);const V=setTimeout(()=>{try{ue(Y())}catch(oe){console.error("Preview regeneration failed",oe)}finally{L(!1)}},600);return()=>clearTimeout(V)},[Q,H]);const le=()=>{Ln(q||Y())};return o.jsxs(o.Fragment,{children:[o.jsxs(USe,{children:[o.jsx(GSe,{asChild:!0,children:o.jsxs(Ce,{variant:"outline",size:"sm",title:"Export your valuation as a PDF report",children:[o.jsx(sf,{className:"h-4 w-4 mr-2"}),"PDF Report",o.jsx(vh,{className:"h-3 w-3 ml-1"})]})}),o.jsxs(UL,{align:"end",children:[o.jsxs(xn,{onClick:()=>me(!0),children:[o.jsx(fb,{className:"h-4 w-4 mr-2"}),"Live Preview (auto-updates)"]}),o.jsxs(xn,{onClick:W,children:[o.jsx(Un,{className:"h-4 w-4 mr-2"}),"Complete Report"]}),o.jsx(GL,{}),o.jsx(xn,{onClick:$,children:"Projections"}),o.jsx(xn,{onClick:T,children:"Asset-Based"}),o.jsx(xn,{onClick:R,children:"Pricing-Based (Pre-Revenue)"}),o.jsx(xn,{onClick:B,children:"Market-Based"}),o.jsx(xn,{onClick:F,children:"Intrinsic (DCF)"}),o.jsx(xn,{onClick:D,children:"Investment"}),o.jsx(xn,{onClick:G,children:"Returns"}),o.jsx(xn,{onClick:K,children:"Summary"}),o.jsx(xn,{onClick:z,children:"Historic Financials"}),o.jsx(xn,{onClick:()=>Ln(pa("Executive Summary",U(),r,n,x)),children:"Executive Summary"})]})]}),o.jsx(pc,{open:H,onOpenChange:me,children:o.jsxs(Us,{className:"max-w-6xl w-[95vw] h-[90vh] flex flex-col p-0 gap-0",children:[o.jsx(Gs,{className:"px-6 pt-6 pb-3 border-b",children:o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs(Hs,{className:"flex items-center gap-2",children:[o.jsx(fb,{className:"h-5 w-5 text-primary"}),"Live PDF Preview",I?o.jsxs(ul,{variant:"secondary",className:"ml-2 gap-1",children:[o.jsx(wP,{className:"h-3 w-3 animate-spin"})," Updating…"]}):o.jsx(ul,{variant:"outline",className:"ml-2",children:"Up to date"})]}),o.jsx(qs,{children:"Reflects your latest inputs automatically. Click Print / Save to export."})]}),o.jsxs(Ce,{size:"sm",onClick:le,disabled:!q,children:[o.jsx(F8,{className:"h-4 w-4 mr-2"}),"Print / Save PDF"]})]})}),o.jsx("div",{className:"flex-1 bg-muted/30 overflow-hidden",children:q?o.jsx("iframe",{title:"Complete Report Preview",srcDoc:q,className:"w-full h-full border-0 bg-background"}):o.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[o.jsx(wP,{className:"h-5 w-5 animate-spin mr-2"})," Generating preview…"]})})]})})]})},JSe=({companyName:e,currency:t,valuations:r,investmentAmount:n,preMoneyValuation:a,futureRounds:i,numYears:s,projections:l,assetBasedState:c,preRevenueState:u,dcfState:f,marketBasedState:d,weightedAverageState:h})=>{const[m,p]=w.useState(!0),g=S=>ne(S,t),v=w.useMemo(()=>{const S=e||"The company",j=a+n,C=j>0?(n/j*100).toFixed(1):"0",{assetWeight:N,preRevenueWeight:P,marketWeight:A,dcfWeight:O}=h,k=N+P+A+O===100?(r.assetBased*N+r.preRevenue*P+r.marketBased*A+r.dcf*O)/100:0,E=l.slice(0,s).map(I=>I.revenue||0),$=E[0]||0,T=E[E.length-1]||0,R=$>0&&T>$&&s>1?((Math.pow(T/$,1/(s-1))-1)*100).toFixed(1):null,B=I=>I.grossProfitOverride!=null&&I.revenue>0?I.grossProfitOverride/I.revenue*100:I.grossMargin||0,F=Math.round(B(l[0]||{})*10)/10,D=Math.round(B(l[Math.min(s-1,l.length-1)]||{})*10)/10,G=D>F?"improving":D<F?"declining":"stable",K=[r.assetBased,r.preRevenue,r.marketBased,r.dcf].filter(I=>I>0),z=Math.min(...K),U=Math.max(...K),ee=z>0?(U/z).toFixed(1):"N/A",Y=[{name:"Asset-Based",val:r.assetBased},{name:"Pricing-Based",val:r.preRevenue},{name:"Market-Based (VC Method)",val:r.marketBased},{name:"Intrinsic Based (DCF)",val:r.dcf}].filter(I=>I.val>0).sort((I,L)=>L.val-I.val),W=Y[0],H=Y[Y.length-1];f.defaultRisk>=50||f.defaultRisk>=25;const me=[f.defaultRisk>50&&"elevated default risk assumption in the DCF model",f.discountRate>20&&`a high discount rate of ${f.discountRate}%`,d.targetReturn>30&&`aggressive target return of ${d.targetReturn}%`,i.length>0&&`dilution from ${i.length}
852 planned future round(s)`].filter(Boolean),q=[R&&Number(R)>20&&`strong projected revenue growth (${R}% CAGR)`,G==="improving"&&`improving gross margins from ${F}% to ${D}%`,K.length>=3&&Number(ee)<3&&"convergence across multiple valuation methods",c.bookAssets>0&&"tangible asset base providing downside protection"].filter(Boolean),ue=[];if(ue.push({title:"Valuation Overview",body:`${S} has been valued using ${K.length} complementary methodology${K.length!==1?"ies":"y"}. `+(k>0?`The weighted average valuation is ${g(k)}, based on assigned weights of ${N}% (Asset-Based), ${P}% (Pricing-Based), ${A}% (Market-Based), and ${O}% (Intrinsic Based). `:"Weights have not been finalised (must total 100%). ")+(K.length>=2?`Valuations range from ${g(z)} to ${g(U)}, a spread ratio of ${ee}x.`:"")}),$>0&&ue.push({title:"Financial Projections",body:`Revenue is projected to grow from ${g($)} in Year 1 to ${g(T)} in Year ${s}`+(R?`, representing a compound annual growth rate of ${R}%. `:". ")+`Gross margins are ${G}, moving from ${F}% to ${D}% over the projection period. The financial model spans ${s} year${s>1?"s":""} of projections.`}),Y.length>=2){let I="";W&&H&&W.name!==H.name&&(I=`The ${W.name} method yields the highest estimate at ${g(W.val)}, while the ${H.name} method produces the most conservative figure at ${g(H.val)}. `),r.dcf>0&&(I+=`The Intrinsic Based (DCF) valuation of ${g(r.dcf)} uses a ${f.discountRate}% discount rate (WACC) and a ${f.terminalGrowthRate}% terminal growth rate, with a ${f.defaultRisk}% default risk adjustment. `),r.marketBased>0&&(I+=`The Market-Based (VC Method) targets a ${d.targetReturn}% IRR with a ${d.exitYear}-year exit horizon.`),ue.push({title:"Methodology Insights",body:I.trim()})}if(n>0){let I=`The proposed investment of ${g(n)} at a pre-money valuation of ${g(a)} implies a post-money valuation of ${g(j)} and an initial investor ownership of ${C}%.`;if(i.length>0){const L=i.reduce((Q,le)=>Q+le.investmentAmount,0);I+=` ${i.length} future funding round${i.length>1?"s are":" is"} planned, raising an additional ${g(L)} in aggregate.`}ue.push({title:"Investment Structure",body:I})}if(q.length>0&&ue.push({title:"Key Drivers",body:`Key positive factors supporting the valuation include: ${q.join("; ")}. These elements strengthen the investment thesis and provide confidence in the projected outcomes.`}),me.length>0?ue.push({title:"Risk Considerations",body:`Key risk factors to consider include: ${me.join("; ")}. Investors should weigh these factors when assessing the appropriate valuation range and investment terms.`}):ue.push({title:"Risk Considerations",body:"The model assumptions appear moderate. As with any early-stage valuation, actual outcomes may deviate significantly from projections. Investors should conduct independent due diligence and consider scenario analysis available under the Advanced tab."}),k>0&&n>0){const I=a>0?((k/a-1)*100).toFixed(1):null;let L=`Based on the weighted average valuation of ${g(k)}, `;I&&Math.abs(Number(I))>5?L+=Number(I)>0?`the analysis suggests the company may be worth ${I}% more than the proposed pre-money valuation of ${g(a)}, potentially indicating favourable terms for the investor. `:`the analysis values the company at ${Math.abs(Number(I))}% below the proposed pre-money valuation of ${g(a)}, which may warrant further negotiation. `:L+=`the proposed pre-money valuation of ${g(a)} appears reasonably aligned with the analytical outputs. `,L+="This summary is generated from the model's current inputs and is intended for reference purposes only — it does not constitute investment advice.",ue.push({title:"Conclusion",body:L})}return ue},[e,t,r,n,a,i,s,l,c,u,f,d,h]),y=v.map(S=>`${S.title}
853${S.body}`).join(`
854
855`),x=async()=>{try{await navigator.clipboard.writeText(y),rt.success("Executive summary copied to clipboard")}catch{const S=document.createElement("textarea");S.value=y,document.body.appendChild(S),S.select(),document.execCommand("copy"),document.body.removeChild(S),rt.success("Executive summary copied to clipboard")}},b=v.length>1;return o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(sf,{className:"h-5 w-5 text-primary"}),o.jsx(ht,{children:"Executive Summary"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[b&&o.jsxs(Ce,{variant:"outline",size:"sm",onClick:x,children:[o.jsx(Si,{className:"h-4 w-4 mr-1"}),"Copy"]}),o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>p(!m),children:m?o.jsx(LM,{className:"h-4 w-4"}):o.jsx(vh,{className:"h-4 w-4"})})]})]}),o.jsx(Dt,{children:"Auto-generated narrative from your valuation model — ready for investor decks and board memos"})]}),m&&o.jsx(pt,{children:b?o.jsxs("div",{className:"space-y-6",children:[v.map((S,j)=>o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("h4",{className:"text-sm font-semibold text-primary tracking-wide uppercase",children:S.title}
855),o.jsx("p",{className:"text-sm leading-relaxed text-foreground/90",children:S.body})]},j)),o.jsxs("div",{className:"rounded-md border border-border bg-muted/50 px-4 py-3 text-xs text-muted-foreground",children:[o.jsx("strong",{children:"Disclaimer:"})," This executive summary is algorithmically generated from the model's current inputs. It is intended for informational purposes only and does not constitute financial or investment advice. All figures should be independently verified."]})]}):o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx(sf,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),o.jsx("p",{className:"font-medium",children:"Not enough data to generate a summary"}),o.jsx("p",{className:"text-sm mt-1",children:"Fill in at least one valuation method and investment details to see the narrative."})]})})]})},VC="valuation-version-history",HL=30;function qL(){try{const e=localStorage.getItem(VC);return e?JSON.parse(e):[]}catch{return[]}}function eCe(e,t,r){try{const n=qL(),a=JSON.stringify(e);if(n.length>0&&JSON.stringify(n[n.length-1].state)===a)return;const i={id:Date.now().toString()+Math.random().toString(36).slice(2,6),timestamp:new Date().toISOString(),companyName:t||"Untitled",currency:r,state:e},s=[...n,i].slice(-HL);localStorage.setItem(VC,JSON.stringify(s))}catch{}}function tCe(){localStorage.removeItem(VC)}function rCe(e){const t=Date.now(),r=new Date(e).getTime(),n=t-r,a=Math.floor(n/6e4);if(a<1)return"Just now";if(a<60)return`${a}m ago`;const i=Math.floor(a/60);if(i<24)return`${i}h ago`;const s=Math.floor(i/24);return s===1?"Yesterday":`${s}d ago`}function O_(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}const nCe=({onRestore:e,currency:t})=>{const[r,n]=w.useState(!1),[a,i]=w.useState([]),s=f=>{f&&i(qL()),n(f)},l=f=>{e(f.state),n(!1),rt.success(`Restored version from ${O_(f.timestamp)}`)},c=()=>{tCe(),i([]),rt.success("Version history cleared")},u=a.reduceRight((f,d)=>{const h=new Date(d.timestamp).toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric"}),m=f.find(p=>p.date===h);return m?m.items.push(d):f.push({date:h,items:[d]}),f},[]);return o.jsxs(pc,{open:r,onOpenChange:s,children:[o.jsx(Vd,{asChild:!0,children:o.jsxs(Ce,{variant:"outline",size:"sm",title:"Browse and restore auto-saved versions of your work",children:[o.jsx(Tc,{className:"h-4 w-4 mr-1"}),"History"]})}),o.jsxs(Us,{className:"max-w-lg max-h-[80vh] flex flex-col",children:[o.jsxs(Gs,{children:[o.jsxs(Hs,{className:"flex items-center gap-2",children:[o.jsx(Tc,{className:"h-5 w-5"}),"Version History"]}),o.jsx(qs,{children:"Auto-saved snapshots of your work. Click restore to return to any previous state."})]}),o.jsx("div",{className:"flex-1 overflow-y-auto min-h-0 -mx-6 px-6",children:a.length===0?o.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[o.jsx(gm,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),o.jsx("p",{className:"font-medium",children:"No versions yet"}),o.jsx("p",{className:"text-sm mt-1",children:"Versions are saved automatically as you make changes."})]}):o.jsx("div",{className:"space-y-6 pb-4",children:u.map(f=>o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2 sticky top-0 bg-background py-1 z-10",children:f.date}),o.jsx("div",{className:"relative border-l-2 border-muted ml-2 space-y-0",children:f.items.map(d=>{const h=(()=>{try{const m=d.state,p=m.weightedAverageState,g=m.valuations;return p.assetWeight+p.preRevenueWeight+p.marketWeight+p.dcfWeight!==100?null:(g.assetBased*p.assetWeight+g.preRevenue*p.preRevenueWeight+g.marketBased*p.marketWeight+g.dcf*p.dcfWeight)/100}catch{return null}})();return o.jsxs("div",{className:"relative pl-6 py-2 group",children:[o.jsx("div",{className:"absolute left-[-5px] top-3.5 h-2 w-2 rounded-full bg-muted-foreground/40 group-hover:bg-primary transition-colors"}),o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:d.companyName}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[o.jsx("span",{children:O_(d.timestamp)}
855),o.jsx("span",{className:"text-muted-foreground/50",children:"·"}),o.jsx("span",{children:rCe(d.timestamp)})]}),h!==null&&h>0&&o.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Weighted avg: ",ne(h,d.currency)]})]}),o.jsxs(Ce,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:()=>l(d),children:[o.jsx(Mj,{className:"h-3.5 w-3.5 mr-1"}),"Restore"]})]})]},d.id)})})]},f.date))})}),a.length>0&&o.jsxs("div",{className:"pt-3 border-t flex items-center justify-between",children:[o.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.length," version",a.length!==1?"s":""," · last ",HL," kept"]}),o.jsxs(Mg,{children:[o.jsx(Rg,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",children:[o.jsx(Oa,{className:"h-3.5 w-3.5 mr-1"}),"Clear All"]})}),o.jsxs(Qf,{children:[o.jsxs(Jf,{children:[o.jsx(th,{children:"Clear Version History?"}),o.jsxs(rh,{children:["This will permanently delete all ",a.length," saved version",a.length!==1?"s":"",". Your current work will not be affected."]})]}),o.jsxs(eh,{children:[o.jsx(ah,{children:"Cancel"}),o.jsx(nh,{onClick:c,children:"Clear All"})]})]})]})]})]})]})},ji=[{title:"Welcome to the Valuation Tool",description:"This tool helps you calculate your company's value using four different methodologies. Let's walk through the key sections so you know where everything is.",icon:o.jsx(pv,{className:"h-6 w-6"})},{title:"Financial Projections",description:"Start by entering your revenue, margins, and expenses for 3–7 years. These numbers feed into every other valuation method. You can override any calculated metric with the lock icon.",icon:o.jsx(ym,{className:"h-6 w-6"}),tabValue:"projections"},{title:"Valuation Methods",description:"Four methods calculate your value from different angles: Asset-Based (what you own), Pricing-Based (early-stage qualitative), Market-Based (comparable multiples), and Intrinsic DCF (future cash flows).",icon:o.jsx(_c,{className:"h-6 w-6"}),tabValue:"asset"},{title:"Investment & Returns",description:"Define your funding rounds and see detailed investor return analysis — IRR, money multiples, dilution, and year-by-year cash flows for each round.",icon:o.jsx(qM,{className:"h-6 w-6"}),tabValue:"investment"},{title:"Summary & Advanced",description:"Combine all methods into a weighted average in the Summary tab. Then use Advanced tools — Sensitivity Analysis, Scenario Comparison, Industry Benchmarks, and Monte Carlo Simulation — to stress-test your numbers.",icon:o.jsx(FM,{className:"h-6 w-6"}),tabValue:"summary"},{title:"You're Ready!",description:"Load Sample Data from the toolbar to explore with realistic numbers, or start entering your own. Use the Tutorial page for detailed guidance on each section. Happy valuing!",icon:o.jsx(hv,{className:"h-6 w-6"})}],E_="valuation-walkthrough-seen",aCe=({onNavigateTab:e})=>{const[t,r]=w.useState(!1),[n,a]=w.useState(0);w.useEffect(()=>{if(!localStorage.getItem(E_)){const d=setTimeout(()=>r(!0),800);return()=>clearTimeout(d)}},[]);const i=()=>{r(!1),localStorage.setItem(E_,"true")},s=()=>{if(n<ji.length-1){const f=n+1;a(f),ji[f].tabValue&&e&&e(ji[f].tabValue)}else i()},l=()=>{if(n>0){const f=n-1;a(f),ji[f].tabValue&&e&&e(ji[f].tabValue)}};if(!t)return null;const c=ji[n],u=n===ji.length-1;return o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-300",children:o.jsxs("div",{className:"relative bg-background border border-border rounded-xl shadow-2xl max-w-md w-full mx-4 overflow-hidden animate-in zoom-in-95 duration-300",children:[o.jsx("div",{className:"h-1 bg-muted",children:o.jsx("div",{className:"h-full bg-primary transition-all duration-500 ease-out",style:{width:`${(n+1)/ji.length*100}%`}})}),o.jsx("button",{onClick:i,className:"absolute top-3 right-3 p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:"Skip walkthrough",children:o.jsx(Rj,{className:"h-4 w-4"})}),o.jsxs("div",{className:"p-6 pt-5 space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex items-center justify-center h-10 w-10 rounded-lg bg-primary/10 text-primary shrink-0",children:c.icon}),o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Step ",n+1," of ",ji.length]}),o.jsx("h3",{className:"text-lg font-semibold text-foreground leading-tight",children:c.title})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:c.description})]}),o.jsxs("div",{className:"flex items-center justify-between px-6 pb-5",children:[o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:l,disabled:n===0,className:"gap-1",children:[o.jsx(dv,{className:"h-3.5 w-3.5"})," Back"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ce,{variant:"ghost",size:"sm",onClick:i,className:"text-muted-foreground",children:"Skip"}),o.jsxs(Ce,{size:"sm",onClick:s,className:"gap-1",children:[u?"Get Started":"Next"," ",!u&&o.jsx(ko,{className:"h-3.5 w-3.5"})]})]})]})]})})},iCe=["year","revenue","cogs","sgaExpense","rdExpense","depreciation","amortization","interestExpense","taxExpense","currentAssets","currentLiabilities","cash","netCapex"],KL=["Year","Revenue","COGS","SG&A Expense","R&D Expense","Depreciation","Amortization","Interest Expense","Tax Expense","Current Assets","Current Liabilities","Cash","Net CapEx"];function YL(e){return e.includes(",")||e.includes('"')||e.includes(`
856`)?`"${e.replace(/"/g,'""')}"`:e}function oCe(e){const t=[];let r="",n=!1;for(let a=0;a<e.length;a++){const i=e[a];n?i==='"'&&e[a+1]==='"'?(r+='"',a++):i==='"'?n=!1:r+=i:i==='"'?n=!0:i===","?(t.push(r.trim()),r=""):r+=i}return t.push(r.trim()),t}function sCe(){return[["# HISTORIC FINANCIALS - CSV TEMPLATE"],["# Fill in one row per year. Do not change the header row."],["# Lines starting with # are ignored."],[""],KL,["2022","1000000","400000","200000","100000","30000","10000","15000","50000","250000","150000","50000","60000"],["2023","1300000","500000","250000","120000","35000","12000","14000","55000","300000","180000","60000","70000"],["2024","1700000","600000","300000","140000","40000","15000","12000","65000","350000","200000","70000","80000"]].map(t=>t.map(r=>YL(String(r))).join(",")).join(`
857`)}function lCe(e){var a;const t=e.split(/\r?\n/),r=[];let n=null;for(const i of t){const s=i.trim();if(!s||s.startsWith("#"))continue;const l=oCe(s);if(!n&&((a=l[0])!=null&&a.toLowerCase().includes("year"))){n={},l.forEach((u,f)=>{const d=u.toLowerCase().replace(/[^a-z]/g,"");d.includes("year")?n.year=f:d==="revenue"?n.revenue=f:d==="cogs"?n.cogs=f:d.includes("sga")||d.includes("sgaexpense")?n.sgaExpense=f:d.includes("rd")||d.includes("rdexpense")?n.rdExpense=f:d==="depreciation"?n.depreciation=f:d==="amortization"?n.amortization=f:d.includes("interestexpense")?n.interestExpense=f:d.includes("taxexpense")?n.taxExpense=f:d.includes("currentassets")?n.currentAssets=f:d.includes("currentliabilities")?n.currentLiabilities=f:d==="cash"?n.cash=f:(d.includes("netcapex")||d.includes("capex"))&&(n.netCapex=f)});continue}const c=u=>{if(u===void 0)return 0;const f=parseFloat(l[u]||"0");return isNaN(f)?0:f};n?r.push({year:l[n.year??0]||"",revenue:c(n.revenue),cogs:c(n.cogs),sgaExpense:c(n.sgaExpense),rdExpense:c(n.rdExpense),depreciation:c(n.depreciation),amortization:c(n.amortization),interestExpense:c(n.interestExpense),taxExpense:c(n.taxExpense),currentAssets:c(n.
857currentAssets),currentLiabilities:c(n.currentLiabilities),cash:c(n.cash),netCapex:c(n.netCapex)}):r.push({year:l[0]||"",revenue:c(1),cogs:c(2),sgaExpense:c(3),rdExpense:c(4),depreciation:c(5),amortization:c(6),interestExpense:c(7),taxExpense:c(8),currentAssets:c(9),currentLiabilities:c(10),cash:c(11),netCapex:c(12)})}return r}const cCe=({data:e,currency:t,onImport:r})=>{const n=w.useRef(null),a=()=>{const l=new Blob([sCe()],{type:"text/csv"}),c=URL.createObjectURL(l),u=document.createElement("a");u.href=c,u.download="historic_financials_template.csv",u.click(),URL.revokeObjectURL(c),rt.success("Historic financials template downloaded")},i=l=>{var f;const c=(f=l.target.files)==null?void 0:f[0];if(!c)return;const u=new FileReader;u.onload=d=>{var h;try{const m=lCe((h=d.target)==null?void 0:h.result);if(m.length===0)throw new Error("No data rows found");r(m),rt.success(`Imported ${m.length} years of historic data`)}catch{rt.error("Failed to parse CSV. Check the format matches the template.")}},u.readAsText(c),l.target.value=""},s=()=>{if(e.length===0){rt.error("No historic data to export");return}const c=[["# HISTORIC FINANCIALS - EXPORTED DATA"],[`# Currency: ${t}`],[`# Exported: ${new Date().toLocaleString()}`],[""],KL,...e.map(h=>iCe.map(m=>String(h[m])))].map(h=>h.map(m=>YL(String(m))).join(",")).join(`
858`),u=new Blob([c],{type:"text/csv"}),f=URL.createObjectURL(u),d=document.createElement("a");
858d.href=f,d.download="historic_financials_export.csv",d.click(),URL.revokeObjectURL(f),rt.success("Historic financials exported as CSV")};return o.jsxs(nn,{children:[o.jsx("input",{type:"file",ref:n,accept:".csv",className:"hidden",onChange:i}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:a,children:[o.jsx(Un,{className:"h-4 w-4 mr-1"}),"Template"]})}),o.jsx(Ee,{children:"Download a blank CSV template for historic financials"})]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:()=>{var l;return(l=n.current)==null?void 0:l.click()},children:[o.jsx(Tj,{className:"h-4 w-4 mr-1"}),"Import"]})}),o.jsx(Ee,{children:"Import historic financial data from a CSV file"})]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsxs(Ce,{variant:"ghost",size:"sm",onClick:s,children:[o.jsx(zM,{className:"h-4 w-4 mr-1"}),"Export"]})}),o.jsx(Ee,{children:"Export your historic data as a CSV file"})]})]})},o0=e=>({year:e,revenue:0,cogs:0,sgaExpense:0,rdExpense:0,depreciation:0,amortization:0,interestExpense:0,taxExpense:0,currentAssets:0,currentLiabilities:0,cash:0,netCapex:0}),XL=e=>e==="USD"?"$":e==="EUR"?"€":"£",Cr=(e,t)=>
858`${e<0?"-":""}${XL(t)}${Math.abs(e).toLocaleString("en",{minimumFractionDigits:0,maximumFractionDigits:0})}`,Jt=e=>`${e.toFixed(1)}%`,ZL=({val:e})=>e>0?o.jsx(ym,{className:"h-3 w-3 text-emerald-500 inline ml-1"}):e<0?o.jsx(z8,{className:"h-3 w-3 text-destructive inline ml-1"}):o.jsx(UM,{className:"h-3 w-3 text-muted-foreground inline ml-1"}),uCe=({growth:e})=>e===null?o.jsx("span",{className:"text-muted-foreground",children:"—"}):o.jsxs(o.Fragment,{children:[o.jsx(ZL,{val:e}),o.jsxs("span",{className:`text-[10px] ml-0.5 ${e>=0?"text-emerald-600":"text-destructive"}`,children:[e>=0?"+":"",e.toFixed(1),"%"]})]}),dCe=e=>{const t=e.replace(/[^0-9.\-]/g,"");return parseFloat(t)||0},__=({value:e,currency:t,onChange:r})=>{const[n,a]=w.useState(!1),[i,s]=w.useState(e.toString()),l=c=>{c.preventDefault();const u=c.clipboardData.getData("text"),f=dCe(u);s(f.toString()),r(f)};return o.jsx(Qe,{type:"text",value:n?i:e===0?"":Cr(e,t),onFocus:()=>{a(!0),s(e===0?"":e.toString())},onBlur:()=>{a(!1),r(parseFloat(i)||0)},onChange:c=>{const u=c.target.value.replace(/[^0-9.\-]/g,"");s(u)},onPaste:l,className:"h-8 text-sm",placeholder:`${XL(t)}0`})},fCe=({currency:e,historicData:t,onHistoricDataChange:r})=>{const[n,a]=w.useState(t.length>0?t:[o0((new Date().getFullYear()-2).toString()),o0((new Date().getFullYear()-1).toString())]);w.useEffect(()=>{t.length>0&&a(t)},[t]);const i=p=>{a(p),r(p)},s=()=>{const p=n.length>0?parseInt(n[n.length-1].year)+1:new Date().getFullYear()-1;i([...n,o0(p.toString())])},l=p=>{i(n.filter((g,v)=>v!==p))},c=(p,g,v)=>{const y=[...n];g==="year"?y[p]={...y[p],year:v}:y[p]={...y[p],[g]:parseFloat(v)||0},i(y)},u=n.map(p=>{const g=p.revenue-p.cogs,v=p.revenue?g/p.revenue*100:0,y=p.sgaExpense+p.rdExpense,x=g-y,b=p.revenue?x/p.revenue*100:0,S=x-p.depreciation-p.amortization,j=p.revenue?S/p.revenue*100:0,C=S-p.interestExpense,N=C-p.taxExpense,P=p.revenue?N/p.revenue*100:0,A=p.revenue?p.sgaExpense/p.revenue*100:0,O=p.revenue?p.rdExpense/p.revenue*100:0,M=p.revenue?y/p.revenue*100:0,k=p.currentAssets-p.currentLiabilities-p.cash,E=x-k-p.netCapex,$=p.revenue?E/p.revenue*100:0;return{grossProfit:g,grossMargin:v,opex:y,ebitda:x,ebitdaMargin:b,ebit:S,ebitMargin:j,ebt:C,netProfit:N,netProfitMargin:P,sgaMargin:A,rdMargin:O,opexMargin:M,workingCapital:k,fcf:E,fcfMargin:$}}),f=u.length>0?{grossProfit:u.reduce((p,g)=>p+g.grossProfit,0)/u.length,grossMargin:u.reduce((p,g)=>p+g.grossMargin,0)/u.length,opex:u.reduce((p,g)=>p+g.opex,0)/u.length,ebitda:u.reduce((p,g)=>p+g.ebitda,0)/u.length,ebitdaMargin:u.reduce((p,g)=>p+g.ebitdaMargin,0)/u.length,ebit:u.reduce((p,g)=>p+g.ebit,0)/u.length,ebitMargin:u.reduce((p,g)=>p+g.ebitMargin,0)/u.length,ebt:u.reduce((p,g)=>p+g.ebt,0)/u.length,netProfit:u.reduce((p,g)=>p+g.netProfit,0)/u.length,netProfitMargin:u.reduce((p,g)=>p+g.netProfitMargin,0)/u.length,sgaMargin:u.reduce((p,g)=>p+g.sgaMargin,0)/u.length,rdMargin:u.reduce((p,g)=>p+g.rdMargin,0)/u.length,opexMargin:u.reduce((p,g)=>p+g.opexMargin,0)/u.length,workingCapital:u.reduce((p,g)=>p+g.workingCapital,0)/u.length,fcf:u.reduce((p,g)=>p+g.fcf,0)/u.length,fcfMargin:u.reduce((p,g)=>p+g.fcfMargin,0)/u.length}:null,d=(p,g)=>{if(p===0)return null;const v=g(u[p-1],n[p-1]),y=g(u[p],n[p]);return v?(y-v)/Math.abs(v)*100:null},h=[{type:"input",label:"Year",field:"year",isYear:!0},{type:"input",label:"Revenue",field:"revenue"},{type:"input",label:"Cost of Goods Sold (COGS)",field:"cogs"},{type:"calculated",label:"Gross Profit",calc:p=>p.revenue-p.cogs,marginLabel:"Gross Margin",marginCalc:p=>p.revenue?(p.revenue-p.cogs)/p.revenue*100:0},{type:"input",label:"SG&A Expense",field:"sgaExpense"},{type:"input",label:"R&D Expense",field:"rdExpense"},{type:"calculated",label:"EBITDA",calc:p=>p.revenue-p.cogs-p.sgaExpense-p.rdExpense,marginLabel:"EBITDA Margin",marginCalc:p=>p.revenue?(p.revenue-p.cogs-p.sgaExpense-p.rdExpense)/p.revenue*100:0},{type:"input",label:"Depreciation",field:"depreciation"},{type:"input",label:"Amortization",field:"amortization"},{type:"calculated",label:"EBIT",calc:p=>p.revenue-p.cogs-p.sgaExpense-p.rdExpense-p.depreciation-p.amortization,marginLabel:"EBIT Margin",marginCalc:p=>p.revenue?(p.revenue-p.cogs-p.sgaExpense-p.rdExpense-p.depreciation-p.amortization)/p.revenue*100:0},{type:"input",label:"Interest Expense",field:"interestExpense"},{type:"input",label:"Tax Expense",field:"taxExpense"},{type:"calculated",label:"Net Profit",calc:p=>p.revenue-p.cogs-p.sgaExpense-p.rdExpense-p.depreciation-p.amortization-p.interestExpense-p.taxExpense,marginLabel:"Net Margin",marginCalc:p=>p.revenue?(p.revenue-p.cogs-p.sgaExpense-p.rdExpense-p.depreciation-p.amortization-p.interestExpense-p.taxExpense)/p.revenue*100:0},{type:"input",label:"Current Assets",field:"currentAssets",groupHeader:"Working Capital"},{type:"input",label:"Current Liabilities",field:"currentLiabilities"},{type:"input",label:"Cash & Equivalents",field:"cash"}],m=[{label:"Gross Profit",getValue:p=>
858Cr(p.grossProfit,e),growthGetter:p=>p.grossProfit},{label:"Gross Margin %",getValue:p=>Jt(p.grossMargin),highlight:!0},{label:"Total OpEx",getValue:p=>Cr(p.opex,e)},{label:"OpEx Margin %",getValue:p=>Jt(p.opexMargin),highlight:!0},{label:"SG&A Margin %",getValue:p=>Jt(p.sgaMargin),highlight:!0},{label:"R&D Margin %",getValue:p=>Jt(p.rdMargin),highlight:!0},{label:"EBITDA",getValue:p=>Cr(p.ebitda,e),growthGetter:p=>p.ebitda},{label:"EBITDA Margin %",getValue:p=>Jt(p.ebitdaMargin),highlight:!0},{label:"EBIT",getValue:p=>Cr(p.ebit,e),growthGetter:p=>p.ebit},{label:"EBIT Margin %",getValue:p=>Jt(p.ebitMargin),highlight:!0},{label:"EBT",getValue:p=>Cr(p.ebt,e),growthGetter:p=>p.ebt},{label:"Net Profit",getValue:p=>Cr(p.netProfit,e),growthGetter:p=>p.netProfit},{label:"Net Profit Margin %",getValue:p=>Jt(p.netProfitMargin),highlight:!0},{label:"Working Capital",getValue:p=>Cr(p.workingCapital,e),growthGetter:p=>p.workingCapital},{label:"Free Cash Flow",getValue:p=>Cr(p.fcf,e),growthGetter:p=>p.fcf},{label:"FCF Margin %",getValue:p=>Jt(p.fcfMargin),highlight:!0}];return o.jsxs(ut,{children:[o.jsxs(ft,{children:[o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(Tc,{className:"h-5 w-5 text-primary"}),"Historic Financials"]}),o.jsx(Dt,{children:"Enter past financial data to establish trends and provide context for your forward-looking projections. All margins and growth rates are calculated automatically."})]}),o.jsxs(pt,{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx(qe,{className:"text-base font-semibold",children:"Financial Inputs"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(cCe,{data:n,currency:e,onImport:p=>i(p)}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:s,children:[o.jsx(Ss,{className:"h-4 w-4 mr-1"})," Add Year"]})]})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"min-w-[200px]",children:"Line Item"}),n.map((p,g)=>o.jsx(Ue,{className:"min-w-[140px]",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{children:p.year||`Year ${g+1}`}),n.length>1&&o.jsx(Ce,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>l(g),children:o.jsx(Oa,{className:"h-3 w-3 text-destructive"})})]})},g)),o.jsx(Ue,{className:"min-w-[140px] font-bold bg-primary/10",children:"Avg / CAGR"})]})}),o.jsxs(gr,{children:[h.map((p,g)=>o.jsxs(o.Fragment,{children:[p.type==="input"&&p.groupHeader&&o.jsx(De,{className:"bg-muted/50",children:o.jsx(se,{colSpan:n.length+1,className:"font-semibold text-xs text-muted-foreground uppercase tracking-wider py-2",children:p.groupHeader})},`group-${p.groupHeader}`),p.type==="calculated"?o.jsxs(De,{className:"bg-primary/5 border-t",children:[o.jsxs(se,{className:"font-semibold text-sm",children:[p.label,p.marginLabel&&o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",p.marginLabel,")"]})]}),n.map((v,y)=>o.jsxs(se,{className:"text-sm font-semibold p-1",children:[Cr(p.calc(v),e),p.marginCalc&&o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(p.marginCalc(v)),")"]})]},y)),o.jsx(se,{className:"text-sm font-semibold bg-primary/10 p-1",children:(()=>{const v=n.reduce((x,b)=>x+p.calc(b),0)/n.length,y=p.marginCalc?n.reduce((x,b)=>x+p.marginCalc(b),0)/n.length:null;return o.jsxs(o.Fragment,{children:[Cr(v,e),y!==null&&o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(y),")"]})]})})()})]},`calc-${p.label}`):o.jsxs(De,{children:[o.jsx(se,{className:"font-medium text-sm",children:p.label}),n.map((v,y)=>o.jsx(se,{className:"p-1",children:p.isYear?o.jsx(Qe,{type:"text",value:v[p.field],onChange:x=>c(y,p.field,x.target.value),className:"h-8 text-sm"}):o.jsx(__,{value:v[p.field],currency:e,onChange:x=>c(y,p.field,x.toString())})},y)),o.jsx(se,{className:"bg-primary/10 p-1",children:p.isYear?"":p.field==="revenue"?(()=>{var S,j;const v=(S=n[0])==null?void 0:S.revenue,y=(j=n[n.length-1])==null?void 0:j.revenue,x=n.length-1;if(!v||!y||x<=0)return"—";const b=(Math.pow(y/v,1/x)-1)*100;return o.jsxs("span",{className:"text-sm font-semibold",children:[Jt(b)," CAGR"]})})():o.jsx("span",{className:"text-sm font-semibold",children:Cr(n.reduce((v,y)=>v+y[p.field],0)/n.length,e)})})]},p.field)]})),o.jsxs(De,{className:"bg-primary/5 border-t",children:[o.jsxs(se,{className:"font-semibold text-sm",children:["Working Capital",o.jsx("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:"(WC ex Cash / Sales)"})]}),n.map((p,g)=>{const v=p.currentAssets-p.currentLiabilities-p.cash,y=p.revenue?v/p.revenue*100:0;return o.jsxs(se,{className:"text-sm font-semibold p-1",children:[Cr(v,e),o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(y),")"]})]},g)}),o.jsx(se,{className:"text-sm font-semibold bg-primary/10 p-1",children:(()=>{const p=n.reduce((v,y)=>v+(y.currentAssets-y.currentLiabilities-y.cash),0)/n.length,g=n.reduce((v,y)=>{const x=y.currentAssets-y.currentLiabilities-y.cash;return v+(y.revenue?x/y.revenue*100:0)}
858,0)/n.length;return o.jsxs(o.Fragment,{children:[Cr(p,e),o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(g),")"]})]})})()})]}),o.jsxs(De,{children:[o.jsxs(se,{className:"font-medium text-sm",children:["Net CapEx",o.jsx("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:"(CapEx / Sales)"})]}),n.map((p,g)=>{const v=p.revenue?p.netCapex/p.revenue*100:0;return o.jsx(se,{className:"p-1",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsx(__,{value:p.netCapex,currency:e,onChange:y=>c(g,"netCapex",y.toString())}),o.jsx("span",{className:"text-xs text-muted-foreground text-center",children:Jt(v)})]})},g)}),o.jsx(se,{className:"text-sm font-semibold bg-primary/10 p-1",children:(()=>{const p=n.reduce((v,y)=>v+y.netCapex,0)/n.length,g=n.reduce((v,y)=>v+(y.revenue?y.netCapex/y.revenue*100:0),0)/n.length;return o.jsxs(o.Fragment,{children:[Cr(p,e),o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(g),")"]})]})})()})]}),o.jsxs(De,{className:"bg-primary/5 border-t",children:[o.jsxs(se,{className:"font-semibold text-sm",children:["Free Cash Flow",o.jsx("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:"(FCF Margin)"})]}),n.map((p,g)=>{const v=p.revenue-p.cogs-p.sgaExpense-p.rdExpense,y=p.currentAssets-p.currentLiabilities-p.cash,x=v-y-p.netCapex,b=p.revenue?x/p.revenue*100:0;return o.jsxs(se,{className:"text-sm font-semibold p-1",children:[Cr(x,e),o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(b),")"]})]},g)}),o.jsx(se,{className:"text-sm font-semibold bg-primary/10 p-1",children:(()=>{const p=n.reduce((v,y)=>{const x=y.revenue-y.cogs-y.sgaExpense-y.rdExpense,b=y.currentAssets-y.currentLiabilities-y.cash;return v+(x-b-y.netCapex)},0)/n.length,g=n.reduce((v,y)=>{const x=y.revenue-y.cogs-y.sgaExpense-y.rdExpense,b=y.currentAssets-y.currentLiabilities-y.cash,S=x-b-y.netCapex;return v+(y.revenue?S/y.revenue*100:0)},0)/n.length;return o.jsxs(o.Fragment,{children:[Cr(p,e),o.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Jt(g),")"]})]})})()})]})]})]})})]}),n.some(p=>p.revenue>0)&&o.jsxs("div",{children:[o.jsx(qe,{className:"text-base font-semibold",children:"Calculated Metrics & Margins"}),o.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Auto-calculated from your inputs above. Margin rows show % of revenue."}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"min-w-[200px]",children:"Metric"}),n.map((p,g)=>o.jsx(Ue,{className:"min-w-[140px]",children:p.year},g)),o.jsx(Ue,{className:"min-w-[140px] font-bold bg-primary/10",children:"Average"})]})}),o.jsxs(gr,{children:[o.jsxs(De,{className:"bg-primary/5",children:[o.jsx(se,{className:"font-medium text-sm",children:"Revenue CAGR"}),n.map((p,g)=>o.jsx(se,{className:"text-sm text-muted-foreground",children:"—"},g)),o.jsx(se,{className:"text-sm font-semibold bg-primary/10",children:(()=>{var y,x;const p=(y=n[0])==null?void 0:y.revenue,g=(x=n[n.length-1])==null?void 0:x.revenue,v=n.length-1;return!p||!g||v<=0?"—":Jt((Math.pow(g/p,1/v)-1)*100)})()})]}),o.jsxs(De,{className:"bg-primary/5",children:[o.jsx(se,{className:"font-medium text-sm",children:"Revenue Growth (YoY)"}),n.map((p,g)=>{const v=d(g,(y,x)=>x.revenue);return o.jsx(se,{className:"text-sm",children:v!==null?o.jsxs(o.Fragment,{children:[Jt(v)," ",o.jsx(ZL,{val:v})]}):o.jsx("span",{className:"text-muted-foreground",children:"—"})},g)}),o.jsx(se,{className:"text-sm font-semibold bg-primary/10",children:(()=>{const p=n.map((g,v)=>d(v,(y,x)=>x.revenue)).filter(g=>g!==null);return p.length>0?Jt(p.reduce((g,v)=>g+v,0)/p.length):"—"})()})]}),m.map(p=>o.jsxs(De,{className:p.highlight?"bg-primary/5":"",children:[o.jsx(se,{className:"font-medium text-sm",children:p.label}),u.map((g,v)=>{const y=p.growthGetter?d(v,p.growthGetter):null;return o.jsxs(se,{className:"text-sm",children:[p.getValue(g),y!==null&&o.jsx(uCe,{growth:y})]},v)}),o.jsx(se,{className:"text-sm font-semibold bg-primary/10",children:f?p.getValue(f):"—"})]},p.label))]})]})})]}),o.jsx("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:o.jsxs("p",{className:"text-xs text-muted-foreground",children:[o.jsx("strong",{children:"Tip:"})," Historic data helps validate your projected growth rates and margins. Compare these trends with your forward projections in the Projections tab to ensure consistency."]})})]})]})},hCe="/assets/prometheus-logo-C5tpKogk.jpg";var Ty="Switch",[pCe,bPe]=fr(Ty),[mCe,gCe]=pCe(Ty),QL=w.forwardRef((e,t)=>
858{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:i,required:s,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[h,m]=w.useState(null),p=et(t,b=>m(b)),g=w.useRef(!1),v=h?f||!!h.closest("form"):!0,[y,x]=wr({prop:a,defaultProp:i??!1,onChange:u,caller:Ty});return o.jsxs(mCe,{scope:r,checked:y,disabled:l,children:[o.jsx($e.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":rB(y),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:p,onClick:je(e.onClick,b=>{x(S=>!S),v&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),v&&o.jsx(tB,{control:h,bubbles:!g.current,name:n,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});QL.displayName=Ty;var JL="SwitchThumb",eB=w.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,a=gCe(JL,r);return o.jsx($e.span,{"data-state":rB(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})});eB.displayName=JL;var vCe="SwitchBubbleInput",tB=w.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{const s=w.useRef(null),l=et(s,i),c=wh(r),u=xh(t);return w.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==r&&m){const p=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(p)}},[c,r,n]),o.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tB.displayName=vCe;function rB(e){return e?"checked":"unchecked"}var nB=QL,yCe=eB;const aB=w.forwardRef(({className:e,...t},r)=>o.jsx(nB,{className:Oe("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:o.jsx(yCe,{className:Oe("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));aB.displayName=nB.displayName;const T_={GBP:"£",USD:"$",EUR:"€",JPY:"¥",CNY:"¥",CHF:"Fr",CAD:"$",AUD:"$",INR:"₹",SEK:"kr",NOK:"kr",DKK:"kr",ZAR:"R",BRL:"R$",MXN:"$",SGD:"$",HKD:"$",NZD:"$",KRW:"₩",PLN:"zł",TRY:"₺"};function xCe(e){const t=(e||"").toUpperCase();if(T_[t])return T_[t];try{const r=new Intl.NumberFormat("en",{style:"currency",currency:t}).formatToParts(0).find(n=>n.type==="currency");return(r==null?void 0:r.value)??t}catch{return t}}function Cp({value:e,onChange:t,currency:r="GBP",className:n,min:a,placeholder:i,title:s,id:l,disabled:c}){const u=xCe(r),[f,d]=w.useState(!1),[h,m]=w.useState(String(e??0));w.useEffect(()=>{f||m(String(e??0))},[e,f]);const p=new Intl.NumberFormat("en-GB",{maximumFractionDigits:2}).format(Number.isFinite(e)?e:0),g=Math.max(20,8+u.length*8);return o.jsxs("div",{className:"relative w-full",children:[o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-2 flex items-center text-xs text-muted-foreground tabular-nums","aria-hidden":!0,children:u}),o.jsx(Qe,{id:l,title:s,placeholder:i,disabled:c,inputMode:"decimal",type:"text",value:f?h:p,onFocus:v=>{d(!0),m(String(e??0)),requestAnimationFrame(()=>v.target.select())},onChange:v=>{const y=v.target.value;m(y);const x=y.replace(/[^0-9.\-]/g,""),b=parseFloat(x);if(Number.isFinite(b)){if(typeof a=="number"&&b<a)return;t(b)}else(y.trim()===""||y.trim()==="-")&&t(0)},onBlur:()=>d(!1),className:Oe("text-right tabular-nums",n),style:{paddingLeft:g}})]})}const bCe=[{metric:"Gross Margin, SG&A, R&D",source:"Margins by Sector (US)",publisher:"NYU Stern — Damodaran Online",url:"https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/margin.html",lastUpdated:"January 2025",notes:"Aggregate operating margins, R&D and SG&A ratios across US industry sectors."},{metric:"Depreciation %, Amortization %, CapEx %",source:"Capital Expenditures by Sector (US)",publisher:"NYU Stern — Damodaran Online",url:"https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/capex.html",lastUpdated:"January 2025",notes:"Capex, D&A and Net Capex as % of sales, by industry. Basis for reinvestment ratios."},{metric:"Working Capital %",source:"Working Capital Requirements by Sector (US)",publisher:"NYU Stern — Damodaran Online",url:"https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/wcdata.html",lastUpdated:"January 2025",notes:"Non-cash working c
858apital as % of revenue. Negative for subscription / deferred-revenue models."},{metric:"Revenue Growth, Historical Fundamentals",source:"Historical Growth Rates by Sector (US)",publisher:"NYU Stern — Damodaran Online",url:"https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/histgr.html",lastUpdated:"January 2025",notes:"Trailing 5-year revenue growth and CAGR benchmarks used to sanity-check projections."},{metric:"WACC, Cost of Equity, Beta",source:"Cost of Capital by Sector (US)",publisher:"NYU Stern — Damodaran Online",url:"https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/wacc.html",lastUpdated:"January 2025",notes:"Sector WACC, unlevered/levered beta, and cost of equity — used in DCF and RateAdvisor."},{metric:"EV/Revenue, EV/EBITDA Multiples",source:"Enterprise Value Multiples by Sector (US)",publisher:"NYU Stern — Damodaran Online",url:"https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/vebitda.html",lastUpdated:"January 2025",notes:"Trading multiples used for Market-Based valuation cross-check."},{metric:"Cross-check (peer averages)",source:"Industry Financial Ratios",publisher:"CSIMarket",url:"https://csimarket.com/Industry/industry_Financial_Strength_Ratios.php",lastUpdated:"Rolling quarterly",notes:"Independent triangulation of margin, capex and working capital ratios against Damodaran medians."}],wCe=()=>o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(fv,{className:"h-5 w-5 text-primary mt-0.5"}),o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Data sources & citations"}),o.jsx(Dt,{children:"Sector medians (Gross Margin, SG&A, R&D, D&A, CapEx, Working Capital, WACC, multiples) are curated from the datasets below and refreshed against the publisher's stated update cadence."})]})]})}),o.jsxs(pt,{children:[o.jsx("div",{className:"space-y-2",children:bCe.map((e,t)=>o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-2 md:gap-4 p-3 rounded-md border bg-muted/30",children:[o.jsxs("div",{className:"flex-shrink-0 md:w-[260px]",children:[o.jsx("div",{className:"text-xs font-semibold",children:e.metric}),o.jsxs(ul,{variant:"outline",className:"mt-1 text-[10px] font-normal",children:["Updated: ",e.lastUpdated]})]}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline break-all",children:[e.source,o.jsx(db,{className:"h-3 w-3 flex-shrink-0"})]}),o.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:e.publisher}),o.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:e.notes})]})]},t))}),o.jsx("p",{className:"mt-4 text-[11px] text-muted-foreground italic",children:"Medians shown in this tool are curated snapshots — always cross-check against the linked source for the latest values before publishing a valuation."})]})]}),jCe=`
859  body { font-family: Arial, sans-serif; max-width: 1000px; margin: 40px auto; padding: 20px; color: #1a1a2e; }
860  h1 { color: #1e3a8a; border-bottom: 3px solid #1e3a8a; padding-bottom: 12px; margin-bottom: 4px; }
861  h2 { color: #1e3a8a; margin-top: 32px; border-bottom: 1px solid #cbd5e1; padding-bottom: 8px; }
862  h3 { color: #334155; margin-top: 20px; }
863  table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.85em; break-inside: avoid; page-break-inside: avoid; }
864  th, td { padding: 6px 10px; text-align: left; border-bottom: 1px solid #e5e7eb; }
865  th { background: #f1f5f9; font-weight: 600; }
866  .right { text-align: right; font-variant-numeric: tabular-nums; }
867  .muted { color: #6b7280; font-size: 0.85em; }
868  .meta { color: #6b7280; font-size: 0.85em; margin-bottom: 24px; }
869  .note { background: #f8fafc; border-left: 3px solid #1e3a8a; padding: 10px 14px; margin: 14px 0; font-size: 0.85em; color: #475569; }
870  .footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid #e5e7eb; color: #9ca3af; font-size: 0.8em; text-align: center; }
871  .badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.7em; background: #eff6ff; color: #1e3a8a; margin-left: 6px; }
872  .badge-auto { background: #fef3c7; color: #92400e; }
873  .page-break { page-break-before: always; }
874  @media print { body { margin: 0; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } .page-break { page-break-before: always; } }
875`,lo=(e,t,r)=>ne(Number.isFinite(e)?e:0,t,r),vs=e=>`${(Number.isFinite(e)?e:0).toFixed(1)}%`,vn=(e,t,r=0)=>Array.isArray(e)?Number.isFinite(e[t])?e[t]:r:typeof e=="number"&&Number.isFinite(e)?e:r;function SCe(e){const t=window.open("","_blank");t&&(t.document.write(e),t.document.close(),t.onload=()=>setTimeout(()=>t.print(),300))}function CCe(e){const{state:t,numYears:r,currency:n,displayFormat:a,companyName:i,sectorId:s,computedProjections:l}=e,c=new URL(_y,window.location.origin).href,u=new Date,f=u.toLocaleDateString(),d=u.toLocaleTimeString(),h=Array.from({length:r},(T,R)=>R+1),m=h.map(T=>`<th class="right">Y${T}</th>`).join(""),p=Aa.find(T=>T.id===s)??Aa[0],g=t.segments.map(T=>{const R=h.map((G,K)=>vn(T.units,K)*vn(T.price,K)),B=R.reduce((G,K)=>G+K,0),F=T.currency&&T.currency!==n?` <span class="badge">${T.currency}</span>`:"",D=T.useDirectCosts?" · direct costs on":"";return`
876        <tr><td colspan="${r+1}"><strong>${T.name}</strong>${F}<span class="muted">${D}</span></td></tr>
877        <tr><td class="muted">Units</td>${h.map((G,K)=>`<td class="right">
877${vn(T.units,K).toLocaleString()}</td>`).join("")}</tr>
878        <tr><td class="muted">Price</td>${h.map((G,K)=>`<td class="right">${lo(vn(T.price,K),T.currency??n,"normal")}</td>`).join("")}</tr>
879        <tr><td>Revenue</td>${R.map(G=>`<td class="right">${lo(G,T.currency??n,a)}</td>`).join("")}</tr>
880        ${T.useDirectCosts?`<tr><td class="muted">Direct costs</td>${h.map((G,K)=>`<td class="right">${lo(vn(T.units,K)*vn(T.directCosts,K),T.currency??n,a)}</td>`).join("")}</tr>`:""}
881        <tr><td class="muted" colspan="${r+1}"><em>Total revenue (${r}y): ${lo(B,T.currency??n,a)}</em></td></tr>
882      `}).join(""),y=(t.employees??[]).map(T=>{const R=T.headcount??1,B=T.yearlyCost,F=h.map((D,G)=>{const K=vn(R,G,1),z=vn(B,G),U=K*z;return`<td class="right">${lo(U,n,a)}<div class="muted">${K.toFixed(0)} × ${lo(z,n,"normal")}</div></td>`}).join("");return`<tr><td><strong>${T.type}</strong><div class="muted">${T.category}${T.headcountGrowth?` · HC +${T.headcountGrowth}% YoY`:""}${T.costGrowth?` · Cost +${T.costGrowth}% YoY`:""}</div></td>${F}</tr>`}).join(""),b=(t.overheads??[]).map(T=>{const R=h.map((B,F)=>`<td class="right">${lo(vn(T.amount,F),n,a)}</td>`).join("");return`<tr><td><strong>${T.name}</strong><div class="muted">${T.category}${T.growth?` · +${T.growth}% YoY`:""}</div></td>${R}</tr>`}).join(""),j=(t.flexibleCosts??[]).map(T=>{const R=h.map((B,F)=>`<td class="right">${vs(vn(T.percent,F))}</td>`).join("");return`<tr><td><strong>${T.name}</strong><div class="muted">${T.category}</div></td>${R}</tr>`}).join(""),C=t.workingCapitalDays,N=C?`
883      <table>
884        <thead><tr><th>Driver</th>${m}</tr></thead>
885        <tbody>
886          <tr><td>AR days</td>${h.map((T,R)=>`<td class="right">${vn(C.arDays,R).toFixed(0)}</td>`).join("")}</tr>
887          <tr><td>Inventory days</td>${h.map((T,R)=>`<td class="right">${vn(C.inventoryDays,R).toFixed(0)}</td>`).join("")}</tr>
888          <tr><td>AP days</td>${h.map((T,R)=>`<td class="right">${vn(C.apDays,R).toFixed(0)}</td>`).join("")}</tr>
889        </tbody>
890      </table>
891      <p class="muted">Formula: NWC = AR + Inventory − AP; Working Capital % = NWC ÷ Revenue.</p>
892    `:'<p class="muted">No working capital drivers set — Working Capital % is entered directly in the ratios table below.</p>',A=[{key:"grossMargin",label:"Gross Margin %"},{key:"sgaPercent",label:"SG&A %",auto:!0},{key:"rdPercent",label:"R&D %",auto:!0},{key:"depreciationPercent",label:"Depreciation %"},{key:"amortizationPercent",label:"Amortization %"},{key:"interestIncomePercent",label:"Interest Income %"},{key:"interestExpensePercent",label:"Interest Expense %"},{key:"workingCapitalPercent",label:"Working Capital %",auto:!0},{key:"capexPercent",label:"CapEx %"},{key:"taxRate",label:"Tax Rate %"},{key:"dividendPercent",label:"Dividend %"}].map(T=>{const R=t.ratios[T.key]??[],B=h.map((D,G)=>`<td class="right">${vs(R[G]??0)}</td>`).join(""),F=T.auto?' <span class="badge badge-auto">auto</span>':"";return`<tr><td>${T.label}${F}</td>${B}</tr>`}).join(""),O=l&&l.length>0?`
893      <h2>Computed Projections</h2>
894      <p class="muted">Preview of the projections that "Apply to Projections" would push into the model.</p>
895      <table>
896        <thead><tr><th>Metric</th>${m}</tr></thead>
897        <tbody>
898          <tr><td>Revenue</td>${h.map((T,R)=>{var B;return`<td class="right">${lo(((B=l[R])==null?void 0:B.revenue)??0,n,a)}</td>`}).join("")}</tr>
899          <tr><td>Gross Margin</td>${h.map((T,R)=>{var B;return`<td class="right">${vs((B=l[R])==null?void 0:B.grossMargin)}</td>`}).join("")}</tr>
900          <tr><td>SG&A %</td>${h.map((T,R)=>{var B;return`<td class="right">${vs((B=l[R])==null?void 0:B.sgaPercent)}</td>`}).join("")}</tr>
901          <tr><td>R&D %</td>${h.map((T,R)=>{var B;return`<td class="right">${vs((B=l[R])==null?void 0:B.rdPercent)}</td>`}).join("")}</tr>
902          <tr><td>Working Capital %</td>${h.map((T,R)=>{var B;return`<td class="right">${vs((B=l[R])==null?void 0:B.workingCapitalPercent)}</td>`}).join("")}</tr>
903          <tr><td>CapEx %</td>${h.map((T,R)=>{var B;return`<td class="right">${vs((B=l[R])==null?void 0:B.capexPercent)}</td>`}).join("")}</tr>
904        </tbody>
905      </table>
906    `:"",M=(T,R)=>`<tr><td>${T}</td><td class="right">${R.low}%</td><td class="right"><strong>${R.median}%</strong></td><td class="right">${R.high}%</td></tr>`,k=p?`
907      <h2>Sector Benchmark Reference — ${p.name}</h2>
908      <p class="muted">Sector medians used to sanity-check the inputs above. Source: NYU Stern / Damodaran industry datasets.</p>
909      <table>
910        <thead><tr><th>
910Ratio</th><th class="right">Low</th><th class="right">Median</th><th class="right">High</th></tr></thead>
911        <tbody>
912          ${M("Gross Margin %",p.grossMargin)}
913          ${M("SG&A %",p.sgaPercent)}
914          ${M("R&D %",p.rdPercent)}
915          ${M("Depreciation %",p.depreciationPercent)}
916          ${M("Amortization %",p.amortizationPercent)}
917          ${M("CapEx %",p.capexPercent)}
918          ${M("Working Capital %",p.workingCapitalPercent)}
919          ${M("Revenue Growth %",p.revenueGrowth)}
920          ${M("WACC %",p.wacc)}
921        </tbody>
922      </table>
923    `:"",E="Assumptions Report",$=a==="thousands"?" • Values in thousands":a==="millions"?" • Values in millions":"";return`<!DOCTYPE html><html><head><title>${i?i+" - ":""}${E}</title><style>${jCe}</style></head><body>
924    <div style="text-align:center;margin-bottom:20px;"><img src="${c}" alt="Apollo" style="height:70px;object-fit:contain;" /></div>
925    <h1>${E}</h1>
926    ${i?`<p style="font-size:1.3em;color:#334155;margin:0 0 4px 0;font-weight:600;">${i}</p>`:""}
927    <p class="meta">${f} at ${d} • Currency: ${n}${$} • Horizon: ${r} years</p>
928
929    <div class="note">
930      This report captures every driver used by the Assumptions Builder: revenue segments (units × price), the people plan, overheads,
931      flexible % of revenue costs, working capital days, and the resulting margin & cost ratios. Ratios flagged
932      <span class="badge badge-auto">auto</span> are computed from the drivers above and override manual entries when drivers exist.
933    </div>
934
935    <h2>Revenue Segments</h2>
936    <table><thead><tr><th>Segment</th>${m}</tr></thead><tbody>${g||`<tr><td colspan="${r+1}" class="muted">No segments configured.</td></tr>`}</tbody></table>
937
938    <h2>People Plan</h2>
939    ${y?`<table><thead><tr><th>Role</th>${m}</tr></thead><tbody>${y}</tbody></table>`:'<p class="muted">No employees configured.</p>'}
940
941    <h2>Overhead Costs</h2>
942    ${b?`<table><thead><tr><th>Item</th>${m}</tr></thead><tbody>${b}</tbody></table>`:'<p class="muted">No overheads configured.</p>'}
943
944    <h2>Flexible Costs (% of Revenue)</h2>
945    ${j?`<table><thead><tr><th>Item</th>${m}</tr></thead><tbody>${j}</tbody></table>`:'<p class="muted">No flexible costs configured.</p>'}
946
947    <h2>Working Capital Drivers</h2>
948    ${N}
949
950    <div class="page-break"></div>
951    <h2>Margins & Cost Ratios</h2>
952    <table><thead><tr><th>Ratio</th>${m}</tr></thead><tbody>${A}</tbody></table>
953
954    ${O}
955
956    ${k}
957
958    <div class="footer">Generated on ${f} at ${d} • Values are estimates only.</div>
959  </body></html>`}const NCe=e=>o.jsxs(Ce,{variant:"outline",size:"sm",onClick:()=>
959SCe(CCe(e)),title:"Open a printable Assumptions report in a new window",children:[o.jsx(sf,{className:"h-4 w-4 mr-2"}),"Export Assumptions PDF"]}),s0=3,l0=15,er=15,PCe=[{key:"grossMargin",label:"Gross Margin %",tip:"Gross profit as % of revenue. Auto-computed for years where any segment uses direct costs."},{key:"sgaPercent",label:"SG&A %",tip:"Selling, general & admin as % of revenue"},{key:"rdPercent",label:"R&D %",tip:"Research & development as % of revenue"},{key:"depreciationPercent",label:"Depreciation %",tip:"Depreciation as % of revenue. Formula: Depreciation = Revenue × Depreciation%. Non-cash charge on tangible assets (PP&E). Reduces EBIT and Taxable Income, but added back in FCF (FCF = EBIT×(1−Tax) + D&A − CapEx − ΔWC). Typically tracks CapEx% at steady state."},{key:"amortizationPercent",label:"Amortization %",tip:"Amortization as % of revenue. Formula: Amortization = Revenue × Amortization%. Non-cash charge on intangibles (goodwill, software, IP). Same treatment as Depreciation in the P&L and FCF bridge. Set to 0 if you have no acquired intangibles."},{key:"interestIncomePercent",label:"Interest Income %",tip:"Interest income as % of revenue. Added below EBIT to arrive at Pre-Tax Income. Does not affect Free Cash Flow to the Firm (FCFF)."},{key:"interestExpensePercent",label:"Interest Expense %",tip:"Interest expense as % of revenue. Subtracted below EBIT to arrive at Pre-Tax Income. Ignored in unlevered FCFF; captured via WACC instead."},{key:"workingCapitalPercent",label:"Working Capital %",tip:"Net Working Capital as % of revenue. Formula: NWC = AR + Inventory − AP; NWC% = NWC ÷ Revenue. ΔWC = NWC(t) − NWC(t−1) is a cash outflow when growing (subtracted in FCF). Auto-computed from AR/Inventory/AP days when the Working Capital drivers are filled in. Negative values (e.g. SaaS with deferred revenue) act as a cash source."},{key:"capexPercent",label:"CapEx %",tip:"Capital Expenditure as % of revenue. Formula: CapEx = Revenue × CapEx%. Cash outflow for PP&E; subtracted in FCF (FCF = EBIT×(1−Tax) + D&A − CapEx − ΔWC). Net CapEx = CapEx − D&A represents true reinvestment; at steady state CapEx ≈ D&A."},{key:"taxRate",label:"Tax Rate %",tip:"Effective corporate tax rate"},{key:"dividendPercent",label:"Dividend %",tip:"Dividend payout as % of FCF"}],Nt=(e,t)=>{const r=e??[],n=[...r],a=r.length>0?r[r.length-1]:0;for(;n.length<t;)n.push(a);return n},ACe=({state:e,onStateChange:t,numYears:r,setNumYears:n,currency:a,displayFormat:i,onApply:s,currentProjections:l,companyName:c})=>{const[u,f]=w.useState(null),d=Array.from({length:r},(I,L)=>L+1),[h,m]=w.useState("saas"),p=Aa.find(I=>I.id===h),g=I=>p?I==="grossMargin"?p.grossMargin:I==="sgaPercent"?p.sgaPercent:I==="rdPercent"?p.rdPercent:I==="depreciationPercent"?p.depreciationPercent:I==="amortizationPercent"?p.amortizationPercent:I==="capexPercent"?p.capexPercent:I==="workingCapitalPercent"?p.workingCapitalPercent:null:null,v=w.useMemo(()=>{var Q,le,V,oe;const I=Math.max(r,er),L=(ae,ye)=>Array.isArray(ae)?Nt(ae,I):Nt([ae??ye],I);return{segments:e.segments.map(ae=>({...ae,units:Nt(ae.units,I),price:Nt(ae.price,I),directCosts:Nt(ae.directCosts,I),useDirectCosts:ae.useDirectCosts??!1})),ratios:Object.keys(e.ratios).reduce((ae,ye)=>(ae[ye]=Nt(e.ratios[ye],I),ae),{}),employees:(e.employees??[]).map(ae=>({...ae,yearlyCost:L(ae.yearlyCost,0),headcount:L(ae.headcount,1)})),overheads:(e.overheads??[]).map(ae=>({...ae,amount:L(ae.amount,0)})),flexibleCosts:(e.flexibleCosts??[]).map(ae=>({...ae,percent:L(ae.percent,0)})),workingCapitalDays:{arDays:Nt((Q=e.workingCapitalDays)==null?void 0:Q.arDays,I),inventoryDays:Nt((le=e.workingCapitalDays)==null?void 0:le.inventoryDays,I),apDays:Nt((V=e.workingCapitalDays)==null?void 0:V.apDays,I),mode:((oe=e.workingCapitalDays)==null?void 0:oe.mode)??"company",segments:Object.fromEntries(e.segments.map(ae=>{var X,ge,de,be,ie;const ye=(ge=(X=e.workingCapitalDays)==null?void 0:X.segments)==null?void 0:ge[ae.id];return[ae.id,{arDays:Nt((ye==null?void 0:ye.arDays)??((de=e.workingCapitalDays)==null?void 0:de.arDays),I),inventoryDays:Nt((ye==null?void 0:ye.inventoryDays)??((be=e.workingCapitalDays)==null?void 0:be.inventoryDays),I),apDays:Nt((ye==null?void 0:ye.apDays)??((ie=e.workingCapitalDays)==null?void 0:ie.apDays),I)}]}))}}},[e,r]),y=w.useMemo(()=>d.map((I,L)=>v.segments.reduce((Q,le)=>Q+(le.units[L]||0)*(le.price[L]||0),0)),[v.segments,r]),x=w.useMemo(()=>d.map((I,L)=>v.segments.some(Q=>Q.useDirectCosts)),[v.segments,r]),b=w.useMemo(()=>d.map((I,L)=>{const Q=y[L];if(!x[L]||Q<=0)return null;const le=v.segments.reduce((V,oe)=>{var ae;return V+(oe.useDirectCosts?(oe.units[L]||0)*(((ae=oe.directCosts)==null?void 0:ae[L])||0):(oe.units[L]||0)*(oe.price[L]||0)*(1-(v.ratios.grossMargin[L]||0)/100))},0);return(Q-le)/Q*100}),[v,y,x,r]),{autoRdByYear:S,autoSgaByYear:j,autoRdPercent:C,autoSgaPercent:N}=w.useMemo(()=>{const I=v.employees??[],L=v.overheads??[],Q=v.flexibleCosts??[],le=(X,ge=0)=>Array.isArray(X)?X:Nt([Number(X??ge)],Math.max(r,er)),V=d.map((X,ge)=>{const de=I.filter(Z=>Z.category==="R&D").reduce((Z,fe)=>Z+(le(fe.headcount,1)[ge]||0)*(le(fe.yearlyCost)[ge]||0),0),be=L.filter(Z=>Z.category==="R&D").reduce((Z,fe)=>Z+(le(fe.amount)[ge]||0),0),ie=Q.filter(Z=>Z.category==="R&D").reduce((Z,fe)=>Z+(y[ge]||0)*((le(fe.percent)[ge]||0)/100),0);return de+be+ie}),oe=d.map((X,ge)=>{const de=I.filter(Z=>Z.category==="SG&A").reduce((Z,fe)=>Z+(le(fe.headcount,1)[ge]||0)*(le(fe.yearlyCost)[ge]||0),0),be=L.filter(Z=>Z.category==="SG&A").reduce((Z,fe)=>Z+(le(fe.amount)[ge]||0),0),ie=Q.filter(Z=>Z.category==="SG&A").reduce((Z,fe)=>Z+(y[ge]||0)*((le(fe.percent)[ge]||0)/100),0);return de+be+ie}),ae=d.map((X,ge)=>y[ge]>0?V[ge]/y[ge]*100:0),ye=d.map((X,ge)=>y[ge]>0?oe[ge]/y[ge]*100:0);return{autoRdByYear:V,autoSgaByYear:oe,autoRdPercent:ae,autoSgaPercent:ye}},[v,y,r]),{arBalanceByYear:P,invBalanceByYear:A,apBalanceByYear:O,nwcByYear:M,autoWcPercent:k,cogsByYear:E,segmentWcByYear:$}=w.useMemo(()=>{const I=v.workingCapitalDays??{arDays:[],inventoryDays:[],apDays:[],mode:"company",segments:{}},L=I.mode??"company",Q=d.map((X,ge)=>{const de=y[ge]||0,be=x[ge]&&b[ge]!=null?b[ge]:v.ratios.grossMargin[ge]??0;return de*(1-be/100)});if(L==="segment"){const X=I.segments??{},ge=v.segments.map(ce=>d.map((re,Ie)=>(ce.units[Ie]||0)*(ce.price[Ie]||0))),de=d.map((ce,re)=>v.ratios.grossMargin[re]??0),be=v.segments.map((ce,re)=>d.map((Ie,Fe)=>{var he;return ce.useDirectCosts?(ce.units[Fe]||0)*(((he=ce.directCosts)==null?void 0:he[Fe])||0):ge[re][Fe]*(1-de[Fe]/100)})),ie=d.map(()=>0),Z=d.map(()=>0),fe=d.map(()=>0),xe={};
959v.segments.forEach((ce,re)=>{const Ie=X[ce.id]??{arDays:[],inventoryDays:[],apDays:[]},Fe=d.map((Ae,tt)=>{var St;return(((St=Ie.arDays)==null?void 0:St[tt])??0)/365*ge[re][tt]}),he=d.map((Ae,tt)=>{var St;return(((St=Ie.inventoryDays)==null?void 0:St[tt])??0)/365*be[re][tt]}),ke=d.map((Ae,tt)=>{var St;return(((St=Ie.apDays)==null?void 0:St[tt])??0)/365*be[re][tt]}),We=d.map((Ae,tt)=>Fe[tt]+he[tt]-ke[tt]);xe[ce.id]={ar:Fe,inv:he,ap:ke,nwc:We},d.forEach((Ae,tt)=>{ie[tt]+=Fe[tt],Z[tt]+=he[tt],fe[tt]+=ke[tt]})});const J=d.map((ce,re)=>ie[re]+Z[re]-fe[re]),te=d.map((ce,re)=>y[re]>0?J[re]/y[re]*100:0);return{arBalanceByYear:ie,invBalanceByYear:Z,apBalanceByYear:fe,nwcByYear:J,autoWcPercent:te,cogsByYear:Q,segmentWcByYear:xe}}const le=d.map((X,ge)=>(I.arDays[ge]??0)/365*(y[ge]||0)),V=d.map((X,ge)=>(I.inventoryDays[ge]??0)/365*Q[ge]),oe=d.map((X,ge)=>(I.apDays[ge]??0)/365*Q[ge]),ae=d.map((X,ge)=>le[ge]+V[ge]-oe[ge]),ye=d.map((X,ge)=>y[ge]>0?ae[ge]/y[ge]*100:0);return{arBalanceByYear:le,invBalanceByYear:V,apBalanceByYear:oe,nwcByYear:ae,autoWcPercent:ye,cogsByYear:Q,segmentWcByYear:{}}},[v,y,b,x,r]),T=I=>t(I),R=(I,L)=>{T({...v,segments:v.segments.map(Q=>Q.id===I?{...Q,...L}:Q)})},B=(I,L,Q,le)=>{T({...v,segments:v.segments.map(V=>{if(V.id!==I)return V;const oe=[...V[L]??[]];return oe[Q]=le,{...V,[L]:oe}})})},F=()=>{const I=`seg-${Date.now()}`;T({...v,segments:[...v.segments,{id:I,name:`Segment ${v.segments.length+1}`,units:Array(er).fill(0),price:Array(er).fill(0),directCosts:Array(er).fill(300),useDirectCosts:!0}]})},D=I=>{v.segments.length<=1||T({...v,segments:v.segments.filter(L=>L.id!==I)})},G=(I,L,Q)=>{const le=[...v.ratios[I]];le[L]=Q,T({...v,ratios:{...v.ratios,[I]:le}})},K=I=>{const L=v.ratios[I][0],Q=v.ratios[I].map(()=>L);T({...v,ratios:{...v.ratios,[I]:Q}})},z=(I,L)=>{const Q=v.segments.find(V=>V.id===I);if(!Q)return;const le=[...Q.units];for(let V=1;V<le.length;V++)le[V]=Math.round((le[V-1]||0)*(1+L/100));R(I,{units:le})},U=()=>{if(r>=l0){rt.error(`Maximum ${l0} years supported`);return}n(r+1)},ee=()=>{if(r<=s0){rt.error(`Minimum ${s0} years required`);return}n(r-1)},Y=w.useMemo(()=>Array(Math.max(r,7)).fill(null).map((I,L)=>{const Q=v.ratios,le=L<r?v.segments.reduce((oe,ae)=>oe+(ae.units[L]||0)*(ae.price[L]||0),0):0,V=x[L]&&b[L]!=null?b[L]:Q.grossMargin[L]??0;return{revenue:le,grossMargin:Number(V.toFixed(2)),sgaPercent:Number((N[L]??0).toFixed(2)),rdPercent:Number((C[L]??0).toFixed(2)),depreciationPercent:Q.depreciationPercent[L]??0,amortizationPercent:Q.amortizationPercent[L]??0,interestIncomePercent:Q.interestIncomePercent[L]??0,interestExpensePercent:Q.interestExpensePercent[L]??0,workingCapitalPercent:Number((k[L]??0).toFixed(2)),capexPercent:Q.capexPercent[L]??0,taxRate:Q.taxRate[L]??0,dividendPercent:Q.dividendPercent[L]??0}}),[v,x,b,N,C,k,r]),W=[{key:"revenue",label:"Revenue"},{key:"grossMargin",label:"Gross Margin"},{key:"sgaPercent",label:"SG&A"},{key:"rdPercent",label:"R&D"},{key:"workingCapitalPercent",label:"Working Capital"},{key:"depreciationPercent",label:"Depreciation"},{key:"amortizationPercent",label:"Amortization"},{key:"interestIncomePercent",label:"Interest Income"},{key:"interestExpensePercent",label:"Interest Expense"},{key:"capexPercent",label:"CapEx"},{key:"taxRate",label:"Tax Rate"},{key:"dividendPercent",label:"Dividend"}],H=w.useMemo(()=>{const I=[],L=new Set,Q=new Set;if(!l)return{changes:I,yearsChanged:L,fieldsChanged:Q};for(let le=0;le<r;le++){const V=l[le]??{},oe=Y[le]??{};for(const{key:ae,label:ye}of W){const X=Number(V[ae]??0),ge=Number(oe[ae]??0),de=ae==="revenue"?.5:.01;Math.abs(X-ge)>de&&(I.push({year:le+1,field:ae,label:ye,from:X,to:ge}),L.add(le+1),Q.add(ye))}}return{changes:I,yearsChanged:L,fieldsChanged:Q}},[Y,l,r]),me=w.useMemo(()=>v.segments.filter(I=>I.currency&&I.currency!==a),[v.segments,a]),q=()=>{l&&f(l.map(I=>({...I}))),s(Y),rt.success("Assumptions applied to Projections")},ue=()=>{u&&(s(u),f(null),rt.success("Reverted to previous projections"))};return o.jsx(nn,{children:o.jsxs("div",{className:"space-y-6",children:[o.jsx(ut,{children:o.jsx(ft,{children:o.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[o.jsxs("div",{children:[o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(jP,{className:"h-5 w-5"}),"Assumptions Builder"]}),o.jsxs(Dt,{children:["Build revenue from units × price by segment (optionally with direct costs to derive gross margin), then set cost ratios per year. Click ",o.jsx("strong",{children:"Apply to Projections"})," to push these values into the Projections tab."]})]}),o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsxs("div",{className:"flex items-center gap-1 rounded-md border px-2 py-1",children:[o.jsx(qe,{className:"text-xs text-muted-foreground mr-1",children:"Years:"}),o.jsx(Ce,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:ee,disabled:r<=s0,children:o.jsx(UM,{className:"h-3.5 w-3.5"})}),o.jsx("span",{className:"font-semibold tabular-nums w-6 text-center",children:r}),o.jsx(Ce,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:U,disabled:r>=l0,children:o.jsx(Ss,{className:"h-3.5 w-3.5"})})]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(ul,{variant:H.changes.length>0?"default":"secondary",className:"cursor-help",children:H.changes.length===0?"N
959o changes vs Projections":`${H.changes.length} change${H.changes.length===1?"":"s"} · ${H.yearsChanged.size} year${H.yearsChanged.size===1?"":"s"}`})}),o.jsx(Ee,{className:"max-w-sm",children:H.changes.length===0?o.jsx("div",{className:"text-xs",children:"Applying will not change the Projections tab."}):o.jsxs("div",{className:"text-xs space-y-1",children:[o.jsx("div",{className:"font-semibold",children:"Will change on Apply:"}),o.jsxs("div",{children:["Years: ",Array.from(H.yearsChanged).sort((I,L)=>I-L).map(I=>`Y${I}`).join(", ")]}),o.jsxs("div",{children:["Fields: ",Array.from(H.fieldsChanged).join(", ")]})]})})]}),o.jsxs(Ce,{onClick:ue,size:"sm",variant:"outline",disabled:!u,title:u?"Restore projections captured just before the last Apply":"No prior Apply to undo",children:[o.jsx(GM,{className:"h-4 w-4 mr-2"}),"Undo last Apply"]}),o.jsx(NCe,{state:v,numYears:r,currency:a,displayFormat:i,companyName:c,sectorId:h,computedProjections:Y}),o.jsxs(Ce,{onClick:q,size:"sm",children:[o.jsx(xP,{className:"h-4 w-4 mr-2"}),"Apply to Projections"]})]})]})})}),me.length>0&&o.jsxs(ml,{variant:"destructive",children:[o.jsx(wu,{className:"h-4 w-4"}),o.jsx(gl,{children:"Mixed currencies detected"}),o.jsxs(vl,{className:"text-xs",children:["Model currency is ",o.jsx("strong",{children:a})," but"," ",me.map(I=>`"${I.name}" (${I.currency})`).join(", ")," ","use a different currency. Revenue is summed as-is with no FX conversion — convert prices to ",a," manually or set the segment currency back to ",a,"."]})]}),o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Revenue Build (Units × Price)"}),o.jsx(Dt,{children:"Add one row per product line or customer segment. Enable Direct Costs to compute gross margin from actual costs instead of a percentage."})]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:F,children:[o.jsx(Ss,{className:"h-4 w-4 mr-1"}),"Add Segment"]})]})}),o.jsxs(pt,{className:"space-y-6",children:[v.segments.map(I=>o.jsxs("div",{className:"rounded-md border p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[o.jsx(Qe,{value:I.name,onChange:L=>R(I.id,{name:L.target.value}),className:"max-w-xs font-medium"}),o.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[o.jsxs("div",{className:"flex items-center gap-2 rounded-md border px-2 py-1",children:[o.jsx(qe,{className:"text-xs whitespace-nowrap",children:"Currency"}),o.jsx(Qe,{value:I.currency??a,onChange:L=>R(I.id,{currency:L.target.value.toUpperCase().slice(0,3)||void 0}),className:"h-8 w-16 uppercase text-xs",title:"Segment reporting currency (ISO code). Warning appears if it differs from the model currency."}),I.currency&&I.currency!==a&&o.jsx(ul,{variant:"destructive",className:"text-[10px] px-1 py-0",children:"FX"})]}),o.jsxs("div",{className:"flex items-center gap-2 rounded-md border px-2 py-1",children:[o.jsx(qe,{htmlFor:`dc-${I.id}`,className:"text-xs cursor-pointer",children:"Direct Costs"}),o.jsx(aB,{id:`dc-${I.id}`,checked:!!I.useDirectCosts,onCheckedChange:L=>R(I.id,{useDirectCosts:L})})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{className:"text-xs whitespace-nowrap",children:"Grow units:"}),o.jsx(Qe,{type:"number",defaultValue:20,className:"w-16 h-8",id:`growth-${I.id}`}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>{const L=document.getElementById(`growth-${I.id}`),Q=L?parseFloat(L.value):20;z(I.id,isNaN(Q)?20:Q)},children:o.jsx(Si,{className:"h-3.5 w-3.5"})})}),o.jsx(Ee,{children:"Compound Y1 units forward using this growth rate"})]})]}),v.segments.length>1&&o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>D(I.id),children:o.jsx(Oa,{className:"h-4 w-4 text-destructive"})})]})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"w-[110px]",children:"Metric"}),d.map(L=>o.jsxs(Ue,{className:"text-right",children:["Y",L]},L))]})}),o.jsxs(gr,{children:[o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"Units"}),d.map((L,Q)=>o.jsx(se,{className:"p-1",children:o.jsx(Qe,{type:"number",value:I.units[Q]??0,onChange:le=>B(I.id,"units",Q,parseFloat(le.target.value)||0),className:"h-8 text-right tabular-nums min-w-[80px]"})},Q))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"Price"}),d.map((L,Q)=>
959o.jsx(se,{className:"p-1",children:o.jsx(Cp,{value:I.price[Q]??0,onChange:le=>B(I.id,"price",Q,le),currency:I.currency??a,className:"h-8 min-w-[110px]"})},Q))]}),o.jsxs(De,{className:"bg-muted/40",children:[o.jsx(se,{className:"font-semibold",children:"Revenue"}),d.map((L,Q)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne((I.units[Q]||0)*(I.price[Q]||0),a,i)},Q))]}),I.useDirectCosts&&o.jsxs(o.Fragment,{children:[o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"Direct Cost / Unit"}),d.map((L,Q)=>{var le;return o.jsx(se,{className:"p-1",children:o.jsx(Cp,{value:((le=I.directCosts)==null?void 0:le[Q])??0,onChange:V=>B(I.id,"directCosts",Q,V),currency:I.currency??a,className:"h-8 min-w-[110px]"})},Q)})]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium text-xs text-muted-foreground",children:"Total Direct Costs"}),d.map((L,Q)=>{var V;const le=(I.units[Q]||0)*(((V=I.directCosts)==null?void 0:V[Q])||0);return o.jsx(se,{className:"text-right font-mono text-xs tabular-nums text-muted-foreground",children:ne(le,a,i)},Q)})]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium text-xs text-muted-foreground",children:"Segment GM %"}),d.map((L,Q)=>{var ae;const le=(I.units[Q]||0)*(I.price[Q]||0),V=(I.units[Q]||0)*(((ae=I.directCosts)==null?void 0:ae[Q])||0),oe=le>0?(le-V)/le*100:0;return o.jsxs(se,{className:"text-right font-mono text-xs tabular-nums text-muted-foreground",children:[oe.toFixed(1),"%"]},Q)})]})]})]})]})}),o.jsx("div",{className:"h-32 -mx-2",children:o.jsx(Ko,{width:"100%",height:"100%",children:o.jsxs(BF,{data:d.map((L,Q)=>({year:`Y${Q+1}`,revenue:(I.units[Q]||0)*(I.price[Q]||0)})),margin:{top:4,right:8,left:0,bottom:0},children:[o.jsx(Yo,{strokeDasharray:"3 3",opacity:.25}),o.jsx(ra,{dataKey:"year",tick:{fontSize:10}}),o.jsx(na,{tick:{fontSize:10},width:48,tickFormatter:L=>ne(L,I.currency??a,i)}),o.jsx(Vr,{formatter:L=>ne(L,I.currency??a,i)}),o.jsx(Gu,{type:"monotone",dataKey:"revenue",stroke:"hsl(var(--primary))",strokeWidth:2,dot:{r:2}})]})})})]},I.id)),o.jsxs("div",{className:"rounded-md border border-primary/40 bg-primary/5 p-4 space-y-3",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold mb-2",children:"Total Revenue (all segments)"}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-2",children:y.map((I,L)=>o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{className:"text-xs text-muted-foreground",children:["Y",L+1]}),o.jsx("div",{className:"font-mono text-sm tabular-nums",children:ne(I,a,i)})]},L))})]}),x.some(Boolean)&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold mb-2",children:"Blended Gross Margin (from Direct Costs)"}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-2",children:d.map((I,L)=>{const Q=b[L];return o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{className:"text-xs text-muted-foreground",children:["Y",L+1]}),o.jsx("div",{className:"font-mono text-sm tabular-nums",children:Q!=null?`${Q.toFixed(1)}%`:"—"})]},L)})})]})]})]})]}),(()=>{const I=v.employees??[],L=J=>Array.isArray(J.headcount)?J.headcount:Nt([Number(J.headcount??1)],r),Q=J=>Array.isArray(J.yearlyCost)?J.yearlyCost:Nt([Number(J.yearlyCost??0)],r),le=(J,te)=>(L(J)[te]||0)*(Q(J)[te]||0),V=J=>d.reduce((te,ce,re)=>te+le(J,re),0),oe=d.map((J,te)=>I.filter(ce=>ce.category==="R&D").reduce((ce,re)=>ce+le(re,te),0)),ae=d.map((J,te)=>I.filter(ce=>ce.category==="SG&A").reduce((ce,re)=>ce+le(re,te),0)),ye=d.map((J,te)=>oe[te]+ae[te]),X=J=>T({...v,employees:J}),ge=(J,te)=>X(I.map(ce=>ce.id===J?{...ce,...te}:ce)),de=(J,te,ce,re)=>{const Ie=I.find(Ae=>Ae.id===J);if(!Ie)return;const Fe=te==="headcount"?L(Ie):Q(Ie),he=Nt(Fe,Math.max(r,er));he[ce]=re;const We=Ie[te==="headcount"?"headcountGrowth":"costGrowth"];if(ce===0&&typeof We=="number"&&We!==0){const Ae=ie(he,We,Math.max(r,er));ge(J,{[te]:Ae});return}ge(J,{[te]:he})},be=(J,te)=>{const ce=I.find(he=>he.id===J);if(!ce)return;const Ie=(te==="headcount"?L(ce):Q(ce))[0]??0,Fe=Nt([Ie],Math.max(r,er)).map(()=>Ie);ge(J,{[te]:Fe})},ie=(J,te,ce)=>{const re=J[0]??0,Ie=(te||0)/100,Fe=[];for(let he=0;he<ce;he++)Fe.push(re*Math.pow(1+Ie,he));return Fe},Z=(J,te,ce)=>{const re=I.find(We=>We.id===J);if(!re)return;const Ie=Math.max(r,er),Fe=te==="headcountGrowth"?"headcount":"yearlyCost",he=Fe==="headcount"?L(re):Q(re),ke=ie(he,ce,Ie);ge(J,{[te]:ce,[Fe]:ke})},fe=()=>{const J=Math.max(r,er);X([...I,{id:`emp-${Date.now()}`,type:"New role",yearlyCost:Nt([6e4],J),category:"SG&A",headcount:Nt([1],J)}])},xe=J=>X(I.filter(te=>te.id!==J));return o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Employees"}),o.jsx(Dt,{children:"List roles with per-year headcount and fully-loaded cost per person. Set a yearly growth % on either row to auto-project Y2→Yn from Y1 (compounded). Categorize as R&D or SG&A to see the yearly split feeding those OpEx lines."})]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:fe,children:[o.jsx(Ss,{className:"h-4 w-4 mr-1"}),"Add Employee"]})]})}),o.jsxs(pt,{className:"space-y-4",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"min-w-[160px]",children:"Role / Type"}),o.jsx(Ue,{className:"w-[130px]",children:"Category"}),o.jsx(Ue,{children:"Field"}),d.map(J=>o.jsxs(Ue,{className:"text-right",children:["Y",J]},J)),o.jsx(Ue,{className:"w-[150px] text-right",children:"Growth / yr"}),o.jsx(Ue,{className:"w-[50px]"})]})}),o.jsxs(gr,{children:[I.length===0&&o.jsx(De,{children:o.jsxs(se,{colSpan:4+d.length+2,className:"text-center text-sm text-muted-foreground py-6",children:["No employees yet. Click ",o.jsx("strong",{children:"Add Employee"})," to start."]})}),I.map(J=>{const te=L(J),ce=Q(J);return o.jsxs(w.Fragment,{children:[o.jsxs(De,{className:"border-b-0",children:[o.jsx(se,{rowSpan:3,className:"p-1 align-top",children:o.jsx(Qe,{value:J.type,onCh
959ange:re=>ge(J.id,{type:re.target.value}),className:"h-8"})}),o.jsx(se,{rowSpan:3,className:"p-1 align-top",children:o.jsxs(Ca,{value:J.category,onValueChange:re=>ge(J.id,{category:re}),children:[o.jsx(Gn,{className:"h-8",children:o.jsx(Na,{})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"R&D",children:"R&D"}),o.jsx(rr,{value:"SG&A",children:"SG&A"})]})]})}),o.jsx(se,{className:"text-xs text-muted-foreground",children:"Headcount"}),d.map((re,Ie)=>o.jsx(se,{className:"p-1",children:o.jsx(Qe,{type:"number",min:0,value:te[Ie]??0,onChange:Fe=>de(J.id,"headcount",Ie,parseFloat(Fe.target.value)||0),className:"h-8 text-right tabular-nums w-[80px]"})},Ie)),o.jsx(se,{className:"p-1",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Qe,{type:"number",value:J.headcountGrowth??0,onChange:re=>Z(J.id,"headcountGrowth",parseFloat(re.target.value)||0),className:"h-8 text-right tabular-nums w-[64px]",title:"Yearly headcount growth % (compounded from Y1)"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"%"}),o.jsx(Ce,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>be(J.id,"headcount"),title:"Copy Y1 to all years",children:o.jsx(Si,{className:"h-3.5 w-3.5"})})]})}),o.jsx(se,{rowSpan:3,className:"p-1 align-top",children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>xe(J.id),children:o.jsx(Oa,{className:"h-4 w-4 text-destructive"})})})]},`${J.id}-hc`),o.jsxs(De,{className:"border-b-0",children:[o.jsx(se,{className:"text-xs text-muted-foreground",children:"Cost / Person"}),d.map((re,Ie)=>o.jsx(se,{className:"p-1",children:o.jsx(Cp,{value:ce[Ie]??0,onChange:Fe=>de(J.id,"yearlyCost",Ie,Fe),currency:a,min:0,className:"h-8 w-[130px]"})},Ie)),o.jsx(se,{className:"p-1",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Qe,{type:"number",value:J.costGrowth??0,onChange:re=>Z(J.id,"costGrowth",parseFloat(re.target.value)||0),className:"h-8 text-right tabular-nums w-[64px]",title:"Yearly cost-per-person growth % (compounded from Y1)"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"%"}),o.jsx(Ce,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>be(J.id,"yearlyCost"),title:"Copy Y1 to all years",children:o.jsx(Si,{className:"h-3.5 w-3.5"})})]})})]},`${J.id}-cost`),o.jsxs(De,{children:[o.jsx(se,{className:"text-xs text-muted-foreground",children:"Total"}),d.map((re,Ie)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(le(J,Ie),a,i)},Ie)),o.jsxs(se,{className:"text-right font-mono tabular-nums text-xs",title:"Sum across all years",children:["Σ ",ne(V(J),a,i)]})]},`${J.id}-total`)]},J.id)})]})]})}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{children:"Category"}),d.map(J=>o.jsxs(Ue,{className:"text-right",children:["Y",J]},J))]})}),o.jsxs(gr,{children:[o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"R&D"}),oe.map((J,te)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(J,a,i)},te))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"SG&A"}),ae.map((J,te)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(J,a,i)},te))]}),o.jsxs(De,{className:"bg-primary/5",children:[o.jsx(se,{className:"font-semibold",children:"Total Personnel"}),ye.map((J,te)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs font-semibold",children:ne(J,a,i)},te))]})]})]})}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold mb-1",children:"R&D vs SG&A composition (Employees + Overheads + Flexible)"}),o.jsx("div",{className:"h-56",children:o.jsx(Ko,{width:"100%",height:"100%",children:o.jsxs(Py,{data:d.map((J,te)=>({year:`Y${te+1}`,"R&D":S[te]??0,"SG&A":j[te]??0})),margin:{top:8,right:12,left:0,bottom:0},children:[o.jsx(Yo,{strokeDasharray:"3 3",opacity:.25}),o.jsx(ra,{dataKey:"year",tick:{fontSize:11}}),o.jsx(na,{tick:{fontSize:11},width:64,tickFormatter:J=>ne(J,a,i)}),o.jsx(Vr,{formatter:J=>ne(J,a,i)}),o.jsx(oi,{wrapperStyle:{fontSize:12}}),o.jsx(Ba,{dataKey:"R&D",stackId:"opex",fill:"hsl(var(--primary))"}),o.jsx(Ba,{dataKey:"SG&A",stackId:"opex",fill:"hsl(var(--muted-foreground))"})]})})})]})]})]})})(),(()=>{const I=v.overheads??[],L=Z=>Array.isArray(Z.amount)?Z.amount:Nt([Number(Z.amount??0)],r),Q=d.map((Z,fe)=>I.filter(xe=>xe.category==="R&D").reduce((xe,J)=>xe+(L(J)[fe]||0),0)),le=d.map((Z,fe)=>I.filter(xe=>xe.category==="SG&A").reduce((xe,J)=>xe+(L(J)[fe]||0),0)),V=d.map((Z,fe)=>Q[fe]+le[fe]),oe=Z=>T({...v,overheads:Z}),ae=(Z,fe)=>oe(I.map(xe=>xe.id===Z?{...xe,...fe}:xe)),ye=(Z,fe,xe)=>
959{const J=Z[0]??0,te=(fe||0)/100,ce=[];for(let re=0;re<xe;re++)ce.push(J*Math.pow(1+te,re));return ce},X=(Z,fe,xe)=>{const J=I.find(ce=>ce.id===Z);if(!J)return;const te=Nt(L(J),Math.max(r,er));if(te[fe]=xe,fe===0&&typeof J.growth=="number"&&J.growth!==0){ae(Z,{amount:ye(te,J.growth,Math.max(r,er))});return}ae(Z,{amount:te})},ge=(Z,fe)=>{const xe=I.find(te=>te.id===Z);if(!xe)return;const J=Math.max(r,er);ae(Z,{growth:fe,amount:ye(L(xe),fe,J)})},de=Z=>{const fe=I.find(te=>te.id===Z);if(!fe)return;const xe=L(fe)[0]??0,J=Math.max(r,er);ae(Z,{amount:Array(J).fill(xe)})},be=()=>{const Z=Math.max(r,er);oe([...I,{id:`oh-${Date.now()}`,name:"New overhead",amount:Nt([12e3],Z),category:"SG&A"}])},ie=Z=>oe(I.filter(fe=>fe.id!==Z));return o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Other Overhead Costs"}),o.jsx(Dt,{children:"Non-personnel operating expenses (rent, software, marketing, professional fees, travel, etc.). Set a yearly growth % to auto-project Y2→Yn from Y1. Categorize each line as R&D or SG&A."})]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:be,children:[o.jsx(Ss,{className:"h-4 w-4 mr-1"}),"Add Overhead"]})]})}),o.jsxs(pt,{className:"space-y-4",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"min-w-[180px]",children:"Item"}),o.jsx(Ue,{className:"w-[130px]",children:"Category"}),d.map(Z=>o.jsxs(Ue,{className:"text-right",children:["Y",Z]},Z)),o.jsx(Ue,{className:"w-[150px] text-right",children:"Growth / yr"}),o.jsx(Ue,{className:"w-[50px]"})]})}),o.jsxs(gr,{children:[I.length===0&&o.jsx(De,{children:o.jsxs(se,{colSpan:3+d.length+2,className:"text-center text-sm text-muted-foreground py-6",children:["No overhead items yet. Click ",o.jsx("strong",{children:"Add Overhead"})," to start."]})}),I.map(Z=>{const fe=L(Z);return o.jsxs(De,{children:[o.jsx(se,{className:"p-1",children:o.jsx(Qe,{value:Z.name,onChange:xe=>ae(Z.id,{name:xe.target.value}),className:"h-8"})}),o.jsx(se,{className:"p-1",children:o.jsxs(Ca,{value:Z.category,onValueChange:xe=>ae(Z.id,{category:xe}),children:[o.jsx(Gn,{className:"h-8",children:o.jsx(Na,{})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"R&D",children:"R&D"}),o.jsx(rr,{value:"SG&A",children:"SG&A"})]})]})}),d.map((xe,J)=>o.jsx(se,{className:"p-1",children:o.jsx(Cp,{value:fe[J]??0,onChange:te=>X(Z.id,J,te),currency:a,min:0,className:"h-8 w-[130px]"})},J)),o.jsx(se,{className:"p-1",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Qe,{type:"number",value:Z.growth??0,onChange:xe=>ge(Z.id,parseFloat(xe.target.value)||0),className:"h-8 text-right tabular-nums w-[64px]",title:"Yearly growth % (compounded from Y1)"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"%"}),o.jsx(Ce,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>de(Z.id),title:"Copy Y1 to all years",children:o.jsx(Si,{className:"h-3.5 w-3.5"})})]})}),o.jsx(se,{className:"p-1",children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>ie(Z.id),children:o.jsx(Oa,{className:"h-4 w-4 text-destructive"})})})]},Z.id)})]})]})}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{children:"Category"}),d.map(Z=>o.jsxs(Ue,{className:"text-right",children:["Y",Z]},Z))]})}),o.jsxs(gr,{children:[o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"R&D"}),Q.map((Z,fe)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(Z,a,i)},fe))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"SG&A"}),le.map((Z,fe)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(Z,a,i)},fe))]}),o.jsxs(De,{className:"bg-primary/5",children:[o.jsx(se,{className:"font-semibold",children:"Total Overheads"}),V.map((Z,fe)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs font-semibold",children:ne(Z,a,i)},fe))]})]})]})})]})]})})(),(()=>{const I=v.flexibleCosts??[],L=ie=>Array.isArray(ie.percent)?ie.percent:Nt([Number(ie.percent??0)],r),Q=(ie,Z)=>(y[Z]||0)*((L(ie)[Z]||0)/100),le=d.map((ie,Z)=>I.filter(fe=>fe.category==="R&D").reduce((fe,xe)=>fe+Q(xe,Z),0)),V=d.map((ie,Z)=>I.filter(fe=>fe.category==="SG&A").reduce((fe,xe)=>fe+Q(xe,Z),0)),oe=d.map((ie,Z)=>le[Z]+V[Z]),ae=ie=>T({...v,flexibleCosts:ie}),ye=(ie,Z)=>ae(I.map(fe=>fe.id===ie?{...fe,...Z}:fe)),X=(ie,Z,fe)=>{const xe=I.find(te=>te.id===ie);if(!xe)return;const J=Nt(L(xe),Math.max(r,er));J[Z]=fe,ye(ie,{percent:J})},ge=ie=>{const Z=I.find(J=>J.id===ie);
959if(!Z)return;const fe=L(Z)[0]??0,xe=Math.max(r,er);ye(ie,{percent:Array(xe).fill(fe)})},de=()=>{const ie=Math.max(r,er);ae([...I,{id:`fc-${Date.now()}`,name:"New variable cost",percent:Nt([2],ie),category:"SG&A"}])},be=ie=>ae(I.filter(Z=>Z.id!==ie));return o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Flexible Costs (% of Revenue)"}),o.jsx(Dt,{children:"Variable costs that scale with revenue — e.g. payment processing, sales commissions, variable marketing, and customer success. Set a % per year; the currency amount is computed from Total Revenue."})]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:de,children:[o.jsx(Ss,{className:"h-4 w-4 mr-1"}),"Add Flexible Cost"]})]})}),o.jsxs(pt,{className:"space-y-4",children:[o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"min-w-[180px]",children:"Item"}),o.jsx(Ue,{className:"w-[130px]",children:"Category"}),o.jsx(Ue,{children:"Field"}),d.map(ie=>o.jsxs(Ue,{className:"text-right",children:["Y",ie]},ie)),o.jsx(Ue,{className:"w-[50px]"}),o.jsx(Ue,{className:"w-[50px]"})]})}),o.jsxs(gr,{children:[I.length===0&&o.jsx(De,{children:o.jsxs(se,{colSpan:4+d.length+2,className:"text-center text-sm text-muted-foreground py-6",children:["No flexible costs yet. Click ",o.jsx("strong",{children:"Add Flexible Cost"})," to start."]})}),I.map(ie=>{const Z=L(ie);return o.jsxs(w.Fragment,{children:[o.jsxs(De,{className:"border-b-0",children:[o.jsx(se,{rowSpan:2,className:"p-1 align-top",children:o.jsx(Qe,{value:ie.name,onChange:fe=>ye(ie.id,{name:fe.target.value}),className:"h-8"})}),o.jsx(se,{rowSpan:2,className:"p-1 align-top",children:o.jsxs(Ca,{value:ie.category,onValueChange:fe=>ye(ie.id,{category:fe}),children:[o.jsx(Gn,{className:"h-8",children:o.jsx(Na,{})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"R&D",children:"R&D"}),o.jsx(rr,{value:"SG&A",children:"SG&A"})]})]})}),o.jsx(se,{className:"text-xs text-muted-foreground",children:"% of Rev"}),d.map((fe,xe)=>o.jsx(se,{className:"p-1",children:o.jsx(Qe,{type:"number",value:Z[xe]??0,onChange:J=>X(ie.id,xe,parseFloat(J.target.value)||0),className:"h-8 text-right tabular-nums w-[70px]"})},xe)),o.jsx(se,{className:"p-1",children:o.jsx(Ce,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>ge(ie.id),title:"Copy Y1 to all years",children:o.jsx(Si,{className:"h-3.5 w-3.5"})})}),o.jsx(se,{rowSpan:2,className:"p-1 align-top",children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>be(ie.id),children:o.jsx(Oa,{className:"h-4 w-4 text-destructive"})})})]}),o.jsxs(De,{children:[o.jsx(se,{className:"text-xs text-muted-foreground",children:"Amount"}),d.map((fe,xe)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs text-muted-foreground",children:ne(Q(ie,xe),a,i)},xe)),o.jsx(se,{})]})]},ie.id)})]})]})}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{children:"Category"}),d.map(ie=>o.jsxs(Ue,{className:"text-right",children:["Y",ie]},ie))]})}),o.jsxs(gr,{children:[o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"R&D"}),le.map((ie,Z)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(ie,a,i)},Z))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"SG&A"}),V.map((ie,Z)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(ie,a,i)},Z))]}),o.jsxs(De,{className:"bg-primary/5",children:[o.jsx(se,{className:"font-semibold",children:"Total Flexible Costs"}),oe.map((ie,Z)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs font-semibold",children:ne(ie,a,i)},Z))]})]})]})})]})]})})(),(()=>{const I=v.workingCapitalDays??{arDays:[],inventoryDays:[],apDays:[],mode:"company",segments:{}},L=I.mode??"company",Q=Math.max(r,er),le=de=>{T({...v,workingCapitalDays:{...I,mode:de}})},V=(de,be,ie)=>{const Z=Nt(I[de],Q);Z[be]=ie,T({...v,workingCapitalDays:{...I,[de]:Z}})},oe=de=>{var ie;const be=((ie=I[de])==null?void 0:ie[0])??0;T({...v,workingCapitalDays:{...I,[de]:Array(Q).fill(be)}})},ae=(de,be,ie,Z)=>{const fe=I.segments??{},xe=fe[de]??{arDays:[],inventoryDays:[],apDays:[]},J=Nt(xe[be],Q);J[ie]=Z,T({...v,workingCapitalDays:{...I,segments:{...fe,[de]:{...xe,[be]:J}}}})},ye=(de,be)=>{var xe;const ie=I.segments??{},Z=ie[de]??{arDays:[],inventoryDays:[],apDays:[]},fe=((xe=Z[be])==null?void 0:xe[0])??0;T({...v,workingCapitalDays:{...I,segments:{...ie,[de]:{...Z,[be]:Array(Q).fill(fe)}}}})},X=()=>{const de={};
959v.segments.forEach(be=>{de[be.id]={arDays:Nt(I.arDays,Q),inventoryDays:Nt(I.inventoryDays,Q),apDays:Nt(I.apDays,Q)}}),T({...v,workingCapitalDays:{...I,segments:de}})},ge=[{key:"arDays",label:"AR Days",tip:"Days Sales Outstanding — average time to collect cash from customers. AR balance = (AR Days / 365) × Annual Sales."},{key:"inventoryDays",label:"Inventory Days",tip:"Days Inventory Outstanding — average time stock sits on shelves. Inventory balance = (Inv Days / 365) × Annual COGS."},{key:"apDays",label:"AP Days",tip:"Days Payable Outstanding — average time to pay suppliers. AP balance = (AP Days / 365) × Annual COGS."}];return o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Working Capital (Days-Based)"}),o.jsx(Dt,{children:"Estimate Net Working Capital from AR, Inventory, and AP days. NWC = (AR days / 365) × Sales + (Inv days / 365) × COGS − (AP days / 365) × COGS. The resulting Working Capital % of Sales feeds the Ratios table automatically."})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qe,{className:"text-xs text-muted-foreground",children:"Mode"}),o.jsxs(Ca,{value:L,onValueChange:de=>le(de),children:[o.jsx(Gn,{className:"h-8 w-[170px]",children:o.jsx(Na,{})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"company",children:"Company-wide"}),o.jsx(rr,{value:"segment",children:"Per segment"})]})]}),L==="segment"&&o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Ce,{variant:"outline",size:"sm",onClick:X,children:"Seed from company"})}),o.jsx(Ee,{children:"Copy the company-wide days into every segment as a starting point"})]})]})]})}),o.jsxs(pt,{className:"space-y-4",children:[L==="company"&&o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"w-[180px]",children:"Driver"}),d.map(de=>o.jsxs(Ue,{className:"text-right",children:["Y",de]},de)),o.jsx(Ue,{className:"w-[50px]"})]})}),o.jsx(gr,{children:ge.map(de=>o.jsxs(De,{children:[o.jsx(se,{children:o.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-sm",children:[de.label,o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:de.tip})]})]})}),d.map((be,ie)=>{var Z;return o.jsx(se,{className:"p-1",children:o.jsx(Qe,{type:"number",value:((Z=I[de.key])==null?void 0:Z[ie])??0,onChange:fe=>V(de.key,ie,parseFloat(fe.target.value)||0),className:"h-8 text-right tabular-nums min-w-[70px]"})},ie)}),o.jsx(se,{children:o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>oe(de.key),children:o.jsx(Si,{className:"h-3.5 w-3.5"})})}),o.jsx(Ee,{children:"Copy Y1 to all years"})]})})]},de.key))})]})}),L==="segment"&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Each segment can have its own AR / Inventory / AP days. Inventory & AP scale with that segment's own COGS (segment direct costs when enabled, otherwise segment revenue × (1 − global GM%))."}),v.segments.map(de=>{var Z;const be=((Z=I.segments)==null?void 0:Z[de.id])??{arDays:[],inventoryDays:[],apDays:[]},ie=$[de.id];return o.jsxs("div",{className:"border rounded-md p-3 space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"text-sm font-semibold",children:de.name}),o.jsx("div",{className:"text-xs text-muted-foreground",children:de.useDirectCosts?"Uses segment direct costs":"Uses global gross margin"})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"w-[170px]",children:"Driver"}),d.map(fe=>o.jsxs(Ue,{className:"text-right",children:["Y",fe]},fe)),o.jsx(Ue,{className:"w-[50px]"})]})}),o.jsxs(gr,{children:[ge.map(fe=>o.jsxs(De,{children:[o.jsx(se,{children:o.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[fe.label,o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{className:"max-w-xs",children:fe.tip})]})]})}),d.map((xe,J)=>{var te;return o.jsx(se,{className:"p-1",children:o.jsx(Qe,{type:"number",value:((te=be[fe.key])==null?void 0:te[J])??0,onChange:ce=>ae(de.id,fe.key,J,parseFloat(ce.target.value)||0),className:"h-8 text-right tabular-nums min-w-[70px]"})},J)}),o.jsx(se,{children:o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>ye(de.id,fe.key),children:o.jsx(Si,{className:"h-3.5 w-3.5"})})}),o.jsx(Ee,{children:"Copy Y1 to all years"})]})})]},fe.key)),ie&&o.jsxs(De,{className:"bg-muted/40",children:[o.jsx(se,{className:"text-xs font-semibold",children:"Segment NWC"}),ie.nwc.map((fe,xe)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(fe,a,i)},xe)),o.jsx(se,{})]})]})]})})]},de.id)})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{children:L==="segment"?"Aggregated balance":"Derived balance"}),d.map(de=>o.jsxs(Ue,{className:"text-right",children:["Y",de]},de))]})}),o.jsxs(gr,{children:[o.jsxs(De,{children:[o.jsx(se,{className:"text-xs text-muted-foreground",children:"COGS (Revenue × (1 − GM%))"}),E.map((de,be)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs text-muted-foreground",children:ne(de,a,i)},be))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"Accounts Receivable"}),P.map((de,be)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(de,a,i)},be))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"Inventory"}),A.map((de,be)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs",children:ne(de,a,i)},be))]}),o.jsxs(De,{children:[o.jsx(se,{className:"font-medium",children:"Accounts Payable"}),O.map((de,be)=>o.jsxs(se,{className:"text-right font-mono tabular-nums text-xs",children:["−",ne(de,a,i)]},be))]}),o.jsxs(De,{className:"bg-primary/5",children:[o.jsx(se,{className:"font-semibold",children:"Net Working Capital"}),M.map((de,be)=>o.jsx(se,{className:"text-right font-mono tabular-nums text-xs font-semibold",children:ne(de,a,i)},be))]}),o.jsxs(De,{className:"bg-primary/10",children:[o.jsx(se,{className:"font-semibold",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:["Working Capital % of Sales",o.jsx("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-primary/20 text-primary",children:"auto"})]})}),k.map((de,be)=>o.jsxs(se,{className:"text-right font-mono tabular-nums text-xs font-semibold",children:[de.toFixed(2),"%"]},be))]})]})]})})]})]})})(),o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx(ht,{className:"text-lg",children:"Margins & Cost Ratios (% of Revenue)"}),o.jsx(Dt,{children:"Set per-year percentages. Gross Margin is auto-derived when any segment uses Direct Costs. Click the copy icon to propagate Y1 to all years. Sector medians shown below each ratio when available."})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center shrink-0",children:[o.jsx(qe,{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Sector benchmark"}),o.jsxs(Ca,{value:h,onValueChange:m,children:[o.jsx(Gn,{className:"h-8 w-[240px]",children:o.jsx(Na,{placeholder:"Select sector"})}),o.jsx(Hn,{children:Aa.map(I=>o.jsx(rr,{value:I.id,children:I.name},I.id))})]}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsxs(Ce,{variant:"outline",size:"sm",className:"h-8",onClick:()=>
959{if(!p)return;const I=Math.max(r,er),L=Q=>Array(I).fill(Q);T({...v,ratios:{...v.ratios,grossMargin:L(p.grossMargin.median),sgaPercent:L(p.sgaPercent.median),rdPercent:L(p.rdPercent.median),depreciationPercent:L(p.depreciationPercent.median),amortizationPercent:L(p.amortizationPercent.median),capexPercent:L(p.capexPercent.median),workingCapitalPercent:L(p.workingCapitalPercent.median)}}),rt.success(`Applied ${p.name} medians to margins, D&A, CapEx and Working Capital`)},children:[o.jsx(jP,{className:"h-3.5 w-3.5 mr-1.5"}),"Apply medians"]})}),o.jsx(Ee,{children:"Fill Gross Margin, SG&A, R&D, Depreciation, Amortization, CapEx and Working Capital across all years with sector medians. SG&A / R&D / Working Capital remain auto-computed if drivers are defined."})]})]})]})}),o.jsx(pt,{children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(pr,{children:[o.jsx(mr,{children:o.jsxs(De,{children:[o.jsx(Ue,{className:"w-[200px]",children:"Ratio"}),d.map(I=>o.jsxs(Ue,{className:"text-right",children:["Y",I]},I)),o.jsx(Ue,{className:"w-[50px]"})]})}),o.jsx(gr,{children:PCe.map(I=>{const L=I.key==="grossMargin",Q=I.key==="sgaPercent"||I.key==="rdPercent"||I.key==="workingCapitalPercent",le=I.key==="sgaPercent"?N:I.key==="rdPercent"?C:I.key==="workingCapitalPercent"?k:null,V=I.key==="sgaPercent"?"Auto-computed from SG&A employees + overheads + flexible costs ÷ revenue":I.key==="rdPercent"?"Auto-computed from R&D employees + overheads + flexible costs ÷ revenue":I.key==="workingCapitalPercent"?"Auto-computed from AR / Inventory / AP days (see Working Capital section)":null,oe=g(I.key);return o.jsxs(De,{children:[o.jsxs(se,{children:[o.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-sm",children:[I.label,Q&&o.jsx("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-primary/10 text-primary",children:"auto"}),o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Be,{className:"h-3.5 w-3.5 text-muted-foreground cursor-help"})}),o.jsx(Ee,{children:V??I.tip})]})]}),oe&&o.jsxs("div",{className:"mt-0.5 text-[10px] text-muted-foreground tabular-nums",children:["Sector: ",oe.low,"–",oe.high,"% · median ",oe.median,"%"]})]}),d.map((ae,ye)=>{const X=L&&x[ye]&&b[ye]!=null;return Q&&le?o.jsx(se,{className:"p-1",children:o.jsx("div",{className:"h-8 flex items-center justify-end px-2 text-xs font-mono tabular-nums text-muted-foreground bg-muted/40 rounded min-w-[70px]",children:(le[ye]??0).toFixed(1)})},ye):o.jsx(se,{className:"p-1",children:X?o.jsx("div",{className:"h-8 flex items-center justify-end px-2 text-xs font-mono tabular-nums text-muted-foreground bg-muted/40 rounded min-w-[70px]",children:b[ye].toFixed(1)}):o.jsx(Qe,{type:"number",step:"0.1",value:v.ratios[I.key][ye]??0,onChange:ge=>G(I.key,ye,parseFloat(ge.target.value)||0),className:"h-8 text-right tabular-nums min-w-[70px]"})},ye)}),o.jsx(se,{children:!Q&&o.jsxs(_e,{children:[o.jsx(Te,{asChild:!0,children:o.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>K(I.key),children:o.jsx(Si,{className:"h-3.5 w-3.5"})})}),o.jsx(Ee,{children:"Copy Y1 to all years"})]})})]},I.key)})})]})})})]}),o.jsx(wCe,{}),o.jsx("div",{className:"flex justify-end",children:o.jsxs(Ce,{onClick:q,children:[o.jsx(xP,{className:"h-4 w-4 mr-2"}),"Apply to Projections"]})})]})})},kCe=[{revenue:1e6,grossMargin:65,sgaPercent:35,rdPercent:15,depreciationPercent:5,amortizationPercent:2,interestIncomePercent:0,interestExpensePercent:3,workingCapitalPercent:8,capexPercent:7,taxRate:25,dividendPercent:25},{revenue:15e5,grossMargin:67,sgaPercent:33,rdPercent:14,depreciationPercent:5,amortizationPercent:2,interestIncomePercent:0,interestExpensePercent:2.5,workingCapitalPercent:7,capexPercent:6,taxRate:25,dividendPercent:25},{revenue:22e5,grossMargin:68,sgaPercent:31,rdPercent:13,depreciationPercent:4.5,amortizationPercent:2,interestIncomePercent:0,interestExpensePercent:2,workingCapitalPercent:7,capexPercent:6,taxRate:25,dividendPercent:25},{revenue:3e6,grossMargin:70,sgaPercent:30,rdPercent:12,depreciationPercent:4,amortizationPercent:1.5,interestIncomePercent:0,interestExpensePercent:1.5,workingCapitalPercent:6,capexPercent:5,taxRate:25,dividendPercent:25},{revenue:4e6,grossMargin:71,sgaPercent:28,rdPercent:11,depreciationPercent:4,amortizationPercent:1.5,interestIncomePercent:0,interestExpensePercent:1,workingCapitalPercent:6,capexPercent:5,taxRate:25,dividendPercent:25},{revenue:52e5,grossMargin:72,sgaPercent:27,rdPercent:10,depreciationPercent:3.5,amortizationPercent:1,interestIncomePercent:0,interestExpensePercent:.5,workingCapitalPercent:5,capexPercent:4,taxRate:25,dividendPercent:25},{revenue:65e5,grossMargin:73,sgaPercent:26,rdPercent:10,depreciationPercent:3,amortizationPercent:1,interestIncomePercent:0,interestExpensePercent:.5,workingCapitalPercent:5,capexPercent:4,taxRate:25,dividendPercent:25}],OCe=[{year:"2022",revenue:5e5,cogs:2e5,sgaExpense:12e4,rdExpense:5e4,depreciation:15e3,amortization:5e3,interestExpense:1e4,taxExpense:12e3,currentAssets:18e4,currentLiabilities:9e4,cash:4e4,netCapex:25e3},{year:"2023",revenue:72e4,cogs:275e3,sgaExpense:155e3,rdExpense:65e3,depreciation:18e3,amortization:6e3,interestExpense:8e3,taxExpense:18e3,currentAssets:23e4,currentLiabilities:11e4,cash:55e3,netCapex:3e4},{year:"2024",revenue:95e4,cogs:34e4,sgaExpense:19e4,rdExpense:8e4,depreciation:22e3,amortization:7e3,interestExpense:6e3,taxExpense:28e3,currentAssets:31e4,currentLiabilities:14e4,cash:75e3,netCapex:35e3}],Dr={companyName:"ACME Inc",currency:"GBP",valuations:{assetBased:0,preRevenue:0,marketBased:0,marketBasedExitValue:0,dcf:0},investmentAmount:1e5,preMoneyValuation:5e5,isInitialPreferred:!1,initialLiquidationMultiple:1,futureRounds:[{id:"1",year:2,investmentAmount:25e4,preMoneyValuation:15e5,isPreferred:!1,liquidationMultiple:1},{id:"2",year:3,investmentAmount:5e5,preMoneyValuation:3e6,isPreferred:!1,liquidationMultiple:1}],numYears:5,projections:kCe,assetBasedState:EC,preRevenueState:_C,dcfState:TC,marketBasedState:MC,weightedAverageState:H4,historicData:[]},ECe={revenue:0,grossMargin:0,sgaPercent:0,rdPercent:0,depreciationPercent:0,amortizationPercent:0,interestIncomePercent:0,interestExpensePercent:0,workingCapitalPercent:0,capexPercent:0,taxRate:0,dividendPercent:0};function _Ce(){try{const e=localStorage.getItem("valuation-autosave");return e?JSON.parse(e):null}catch{return null}}const TCe=()=>{var re,Ie,Fe;const[e]=p7(),{theme:t,toggleTheme:r}=g7(),n=e.get("shared"),i=w.useMemo(()=>
959{if(n){const he=Rje(n);if(he)return he}return null},[n])||_Ce()||Dr,[s,l]=w.useState(e.get("tab")||"projections"),[c,u]=w.useState(i.companyName||""),[f,d]=w.useState(i.currency),[h,m]=w.useState(i.valuations),[p,g]=w.useState(i.investmentAmount),[v,y]=w.useState(i.preMoneyValuation),[x,b]=w.useState(i.isInitialPreferred),[S,j]=w.useState(i.initialLiquidationMultiple),[C,N]=w.useState(i.futureRounds),[P,A]=w.useState(i.numYears),[O,M]=w.useState(i.projections),k=w.useCallback(he=>{const ke=Math.max(3,Math.min(15,he));M(We=>{if(We.length>=ke)return We;const Ae={revenue:0,grossMargin:0,sgaPercent:0,rdPercent:0,depreciationPercent:0,amortizationPercent:0,interestIncomePercent:0,interestExpensePercent:0,workingCapitalPercent:0,capexPercent:0,taxRate:0,dividendPercent:0},tt=[...We];for(;tt.length<ke;)tt.push({...Ae});return tt}),A(ke)},[]);w.useEffect(()=>{if(O.length<P){const he={revenue:0,grossMargin:0,sgaPercent:0,rdPercent:0,depreciationPercent:0,amortizationPercent:0,interestIncomePercent:0,interestExpensePercent:0,workingCapitalPercent:0,capexPercent:0,taxRate:0,dividendPercent:0},ke=[...O];for(;ke.length<P;)ke.push({...he});M(ke)}},[P,O]);const[E,$]=w.useState(i.assetBasedState),[T,R]=w.useState(i.preRevenueState),[B,F]=w.useState(i.dcfState),[D,G]=w.useState(i.marketBasedState),[K,z]=w.useState(i.weightedAverageState),[U,ee]=w.useState(i.historicData||[]),[Y,W]=w.useState(i.displayFormat||"normal"),[H,me]=w.useState(i.assumptionsState||pje),[q,ue]=w.useState([]),[I,L]=w.useState([]);w.useState(!1);const Q=w.useCallback(()=>({companyName:c,currency:f,valuations:h,investmentAmount:p,preMoneyValuation:v,isInitialPreferred:x,initialLiquidationMultiple:S,futureRounds:C,numYears:P,projections:O,assetBasedState:E,preRevenueState:T,dcfState:B,marketBasedState:D,weightedAverageState:K,historicData:U,displayFormat:Y,assumptionsState:H}),[c,f,h,p,v,x,S,C,P,O,E,T,B,D,K,U,Y,H]),le=w.useState(0);w.useEffect(()=>{const he=setInterval(()=>{const ke=Q();localStorage.setItem("valuation-autosave",JSON.stringify(ke)),le[1](We=>{const Ae=We+1;return Ae>=6?(eCe(ke,ke.companyName,ke.currency),0):Ae})},5e3);return()=>clearInterval(he)},[Q]),w.useEffect(()=>{const he=setTimeout(()=>{const ke=Q();ue(We=>{const Ae=We[We.length-1];return Ae&&JSON.stringify(Ae)===JSON.stringify(ke)?We:[...We.slice(-30),ke]}),L([])},1e3);return()=>clearTimeout(he)},[c,f,p,v,P,O,E,T,B,D,K,C,x,S,U]);const V=he=>{u(he.companyName||""),d(he.currency),m(he.valuations),g(he.investmentAmount),y(he.preMoneyValuation),b(he.isInitialPreferred),j(he.initialLiquidationMultiple),N(he.futureRounds),A(he.numYears),M(he.projections),$(he.assetBasedState),R(he.preRevenueState),F(he.dcfState),G(he.marketBasedState),z(he.weightedAverageState),he.historicData!==void 0&&ee(he.historicData),he.displayFormat&&W(he.displayFormat),he.assumptionsState&&me(he.assumptionsState)},oe=()=>{if(q.length<2)return;const he=q[q.length-1],ke=q[q.length-2];ue(We=>We.slice(0,-1)),L(We=>[he,...We]),V(ke)},ae=()=>{if(I.length===0)return;const he=I[0];L(ke=>ke.slice(1)),ue(ke=>[...ke,he]),V(he)},ye=(he,ke)=>{m(We=>({...We,[he]:ke}))},X=()=>{u(""),d("GBP"),m({assetBased:0,preRevenue:0,marketBased:0,marketBasedExitValue:0,dcf:0}),g(0),y(0),b(!1),j(1),N([]),A(5),M(Array(7).fill(null).map(()=>({...ECe}))),$({...EC,equityInvestment:0,grantFunding:0,grossProfit:0,employees:[],inflationRate:0,totalLiabilities:0,bookAssets:0,bookLiabilities:0,fairValueAdjustment:0,liquidationAssets:0,liquidationDiscount:0}),R({..._C,soundIdea:0,prototype:0,qualityTeam:0,strategicRelationships:0,productRollout:0,averagePreMoneyValuation:0,teamScore:0,opportunityScore:0,productScore:0,competitiveScore:0,marketingScore:0,needForCapital:0,riskAdjustmentPerPoint:0}),F({...TC,discountRate:0,terminalGrowthRate:0,defaultRisk:0,totalDebt:0,cashAndEquivalents:0}),G({...MC,revenueMultiple:0,ebitdaMultiple:0,targetOwnership:0,exitYear:0,targetReturn:0}),z({assetWeight:25,preRevenueWeight:25,marketWeight:25,dcfWeight:25}),ee([])},ge=()=>{u(Dr.companyName),d(Dr.currency),m(Dr.valuations),g(Dr.investmentAmount),y(Dr.preMoneyValuation),b(Dr.isInitialPreferred),j(Dr.initialLiquidationMultiple),N(Dr.futureRounds),A(Dr.numYears),M(Dr.projections),$(Dr.assetBasedState),R(Dr.preRevenueState),F(Dr.dcfState),G(Dr.marketBasedState),z(Dr.weightedAverageState),ee(OCe)},de=he=>{x7(async()=>{const{parseSavedModel:ke}=await Promise.resolve().then(()=>bje);return{parseSavedModel:ke}},void 0).then(({parseSavedModel:ke})=>{const We=ke(he),Ae=We.ok&&We.model?We.model:he;u(Ae.companyName||""),d(Ae.currency),m(Ae.valuations),g(Ae.investmentAmount),y(Ae.preMoneyValuation),b(Ae.isInitialPreferred||!1),j(Ae.initialLiquidationMultiple||1),N(Ae.futureRounds),A(Ae.numYears),M(Ae.projections),Ae.assetBasedState&&$(Ae.assetBasedState),Ae.preRevenueState&&R(Ae.preRevenueState),Ae.dcfState&&F(Ae.dcfState),Ae.marketBasedState&&G(Ae.marketBasedState),Ae.weightedAverageState&&z(Ae.weightedAverageState),Ae.historicData&&ee(Ae.historicData)})},be=w.useMemo(()=>{const he=O.slice(0,P).some(Mr=>Mr.revenue>0),ke=E.equityInvestment>0||E.bookAssets>0||E.liquidationAssets>0,We=T.soundIdea>0||T.averagePreMoneyValuation>0,Ae=D.revenueMultiple>0||D.ebitdaMultiple>0,tt=B.discountRate>0,St=p>0||v>0,Tr=K.assetWeight+K.preRevenueWeight+K.marketWeight+K.dcfWeight===100;return{projections:he,asset:ke,prerevenue:We,market:Ae,dcf:tt,investment:St,returns:St,summary:Tr}}
959,[O,P,E,T,D,B,p,v,K]),ie=w.useMemo(()=>{const he=[{key:"projections",label:"Projections",done:be.projections},{key:"asset",label:"Asset-Based",done:be.asset},{key:"prerevenue",label:"Pricing-Based",done:be.prerevenue},{key:"market",label:"Market-Based",done:be.market},{key:"dcf",label:"Intrinsic",done:be.dcf},{key:"investment",label:"Investment",done:be.investment},{key:"summary",label:"Summary",done:be.summary}],ke=he.filter(We=>We.done).length;return{steps:he,completed:ke,total:he.length,percent:Math.round(ke/he.length*100)}},[be]),Z=({value:he,label:ke})=>o.jsxs("span",{className:"flex items-center gap-1",children:[ke,be[he]&&o.jsx(bP,{className:"h-3 w-3 text-success"})]}),{assetWeight:fe,preRevenueWeight:xe,marketWeight:J,dcfWeight:te}=K;return fe+xe+J+te===100&&(h.assetBased*fe+h.preRevenue*xe+h.marketBased*J+h.dcf*te)/100,o.jsxs("div",{className:"min-h-screen bg-muted/30",children:[o.jsx(aCe,{onNavigateTab:l}),o.jsxs("div",{className:"container mx-auto py-8 space-y-8",children:[o.jsxs("div",{className:"text-center space-y-4",children:[o.jsx("div",{className:"flex items-center justify-center gap-3 mb-6",children:o.jsx("img",{src:_y,alt:"Apollo Informal Investment",className:"h-16 object-contain"})}),o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsx(hv,{className:"h-10 w-10 text-primary"}),o.jsx("h1",{className:"text-4xl font-bold text-foreground",children:"Business Valuation Tool"})]}),o.jsx("p",{className:"text-muted-foreground text-lg",children:"Comprehensive valuation analysis using multiple methodologies"}),o.jsxs("div",{className:"flex items-center justify-center gap-2 flex-wrap",children:[o.jsx(lr,{to:"/tutorial",children:o.jsxs(Ce,{variant:"outline",size:"sm",title:"Step-by-step guide on how to use the valuation tool",children:[o.jsx(Be,{className:"h-4 w-4 mr-2"}),"Tutorial"]})}),o.jsx(lr,{to:"/guides",children:o.jsxs(Ce,{variant:"outline",size:"sm",title:"Read valuation methodology guides",children:[o.jsx(fv,{className:"h-4 w-4 mr-2"}),"Guides"]})}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:r,title:t==="light"?"Switch to dark mode":"Switch to light mode",children:[t==="light"?o.jsx(I8,{className:"h-4 w-4 mr-2"}):o.jsx(B8,{className:"h-4 w-4 mr-2"}),t==="light"?"Dark":"Light"]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:oe,disabled:q.length<2,title:"Undo your last change",children:[o.jsx(GM,{className:"h-4 w-4 mr-1"}),"Undo"]}),o.jsxs(Ce,{variant:"outline",size:"sm",onClick:ae,disabled:I.length===0,title:"Redo a previously undone change",children:[o.jsx(L8,{className:"h-4 w-4 mr-1"}),"Redo"]}),o.jsx(nCe,{onRestore:V,currency:f}),o.jsx(QSe,{valuations:h,currency:f,companyName:c,weightedAverageState:K,investmentAmount:p,preMoneyValuation:v,isInitialPreferred:x,initialLiquidationMultiple:S,assetBasedState:E,preRevenueState:T,dcfState:B,marketBasedState:D,futureRounds:C,projections:O,numYears:P,exitValue:h.marketBasedExitValue,historicData:U,displayFormat:Y})]}),o.jsxs("div",{className:"flex items-center justify-center gap-4 flex-wrap max-w-4xl mx-auto",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(qe,{htmlFor:"companyName",className:"whitespace-nowrap",children:"Company:"}),o.jsx(Qe,{id:"companyName",value:c,onChange:he=>u(he.target.value),placeholder:"Enter company name",className:"w-48"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(qe,{htmlFor:"currency",className:"whitespace-nowrap",children:"Currency:"}),o.jsxs(Ca,{value:f,onValueChange:d,children:[o.jsx(Gn,{id:"currency",className:"w-32",children:o.jsx(Na,{})}),o.jsxs(Hn,{children:[o.jsx(rr,{value:"GBP",children:"GBP (£)"}),o.jsx(rr,{value:"USD",children:"USD ($)"}),o.jsx(rr,{value:"EUR",children:"EUR (€)"})]})]})]}),o.jsx(wje,{companyName:c,currency:f,valuations:h,investmentAmount:p,preMoneyValuation:v,isInitialPreferred:x,initialLiquidationMultiple:S,futureRounds:C,numYears:P,projections:O,assetBasedState:E,preRevenueState:T,dcfState:B,marketBasedState:D,weightedAverageState:K,historicData:U,onLoad:de,onReset:X,onLoadSample:ge})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsxs("span",{className:"text-muted-foreground",children:["Completion: ",o.jsxs("strong",{className:"text-foreground",children:[ie.completed,"/",ie.total]})," sections"]}),o.jsxs("span",{className:`font-semibold tabular-nums ${ie.percent===100?"text-emerald-600 dark:text-emerald-400":"text-foreground"}`,children:[ie.percent,"%"]})]}),o.jsx("div",{className:"h-2.5 w-full rounded-full bg-muted overflow-hidden",children:o.jsx("div",{className:`h-full rounded-full transition-all duration-500 ease-out ${ie.percent===100?"bg-emerald-500":"bg-primary"}`,style:{width:`${ie.percent}%`}})}),o.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground",children:ie.steps.map(he=>o.jsxs("button",{onClick:()=>l(he.key==="summary"?"summary":he.key),className:`flex items-center gap-1 hover:text-foreground transition-colors ${he.done?"text-foreground":""}`,children:[he.done?o.jsx(bP,{className:"h-3 w-3 text-emerald-500"}):o.jsx("div",{className:"h-3 w-3 rounded-full border border-muted-foreground
959/40"}),he.label]},he.key))})]}),o.jsxs(JP,{value:s,onValueChange:l,className:"space-y-6",children:[o.jsxs(Ab,{className:"grid w-full grid-cols-4 md:grid-cols-5 lg:grid-cols-10 lg:w-auto lg:inline-grid",children:[o.jsx(Fr,{value:"assumptions",children:"Assumptions"}),o.jsx(Fr,{value:"projections",children:o.jsx(Z,{value:"projections",label:"Projections"})}),o.jsx(Fr,{value:"asset",children:o.jsx(Z,{value:"asset",label:"Asset-Based"})}),o.jsx(Fr,{value:"prerevenue",children:o.jsx(Z,{value:"prerevenue",label:"Pricing-Based"})}),o.jsx(Fr,{value:"market",children:o.jsx(Z,{value:"market",label:"Market-Based"})}),o.jsx(Fr,{value:"dcf",children:o.jsx(Z,{value:"dcf",label:"Intrinsic"})}),o.jsx(Fr,{value:"investment",children:o.jsx(Z,{value:"investment",label:"Investment"})}),o.jsx(Fr,{value:"returns",children:o.jsx(Z,{value:"returns",label:"Returns"})}),o.jsx(Fr,{value:"advanced",children:"Advanced"}),o.jsx(Fr,{value:"summary",children:o.jsx(Z,{value:"summary",label:"Summary"})})]}),o.jsx(Lr,{value:"assumptions",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(ACe,{state:H,onStateChange:me,numYears:P,setNumYears:k,currency:f,displayFormat:Y,currentProjections:O,companyName:c,onApply:he=>{M(he),l("projections")}})}),o.jsx(Lr,{value:"projections",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(i1e,{numYears:P,setNumYears:k,projections:O,setProjections:M,currency:f,historicData:U,displayFormat:Y,onDisplayFormatChange:W})}),o.jsx(Lr,{value:"asset",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(pq,{onValueChange:he=>ye("assetBased",he),currency:f,state:E,onStateChange:$})}),o.jsx(Lr,{value:"prerevenue",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(Mq,{onValueChange:he=>ye("preRevenue",he),currency:f,state:T,onStateChange:R})}),o.jsx(Lr,{value:"market",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(Uq,{onValueChange:he=>ye("marketBased",he),onExitValueChange:he=>ye("marketBasedExitValue",he),currency:f,projections:O,numYears:P,investmentAmount:p,preMoneyValuation:v,futureRounds:C,state:D,onStateChange:G})}),o.jsx(Lr,{value:"dcf",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(Gq,{onValueChange:he=>ye("dcf",he),numYears:P,projections:O,currency:f,state:B,onStateChange:F})}),o.jsx(Lr,{value:"investment",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(o1e,{currency:f,investmentAmount:p,preMoneyValuation:v,isInitialPreferred:x,initialLiquidationMultiple:S,futureRounds:C,onInvestmentAmountChange:g,onPreMoneyValuationChange:y,onIsInitialPreferredChange:b,onInitialLiquidationMultipleChange:j,onFutureRoundsChange:N})}),o.jsx(Lr,{value:"returns",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(c1e,{currency:f,exitValue:h.marketBasedExitValue,investmentAmount:p,preMoneyValuation:v,isInitialPreferred:x,initialLiquidationMultiple:S,futureRounds:C,projections:O,numYears:P})}),o.jsx(Lr,{value:"advanced",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsxs(JP,{defaultValue:"sensitivity",className:"space-y-6",children:[o.jsxs(Ab,{className:"grid w-full grid-cols-5 max-w-2xl",children:[o.jsx(Fr,{value:"sensitivity",children:"Sensitivity"}),o.jsx(Fr,{value:"montecarlo",children:"Monte Carlo"}),o.jsx(Fr,{value:"scenarios",children:"Scenarios"}),o.jsx(Fr,{value:"benchmarks",children:"Benchmarks"}),o.jsx(Fr,{value:"historics",children:"Historics"})]}),o.jsx(Lr,{value:"sensitivity",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(Cje,{valuations:h,currency:f,dcfState:B,marketBasedState:D,projections:O,numYears:P,investmentAmount:p,preMoneyValuation:v,futureRounds:C})}),o.jsx(Lr,{value:"montecarlo",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(Nje,{currency:f,dcfState:B,marketBasedState:D,projections:O,numYears:P,investmentAmount:p,preMoneyValuation:v,futureRounds:C})}),o.jsx(Lr,{value:"scenarios",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(Eje,{currency:f,valuations:h,investmentAmount:p,preMoneyValuation:v,weightedAverageState:K})}),o.jsx(Lr,{value:"benchmarks",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(_je,{currency:f,currentValues:{revenueMultiple:D.revenueMultiple,ebitdaMultiple:D.ebitdaMultiple,grossMargin:(re=O[0])==null?void 0:re.grossMargin,sgaPercent:(Ie=O[0])==null?void 0:Ie.sgaPercent,rdPercent:(Fe=O[0])==null?void 0:Fe.rdPercent,wacc:B.discountRate},onApplyMultiples:(he,ke)=>G(We=>({...We,revenueMultiple:he,ebitdaMultiple:ke})),onApplyMargins:(he,ke,We)=>{M(Ae=>Ae.map((tt,St)=>St===0?{...tt,grossMargin:he,sgaPercent:ke,rdPercent:We}:tt))},onApplyWacc:he=>F(ke=>({...ke,discountRate:he}))})}),o.jsx(Lr,{value:"historics",forceMount:!0,className:"data-[state=inactive]:hidden",children:o.jsx(fCe,{currency:f,historicData:U,on
959HistoricDataChange:ee})})]})}),o.jsxs(Lr,{value:"summary",forceMount:!0,className:"data-[state=inactive]:hidden",children:[o.jsx(Jwe,{valuations:h,currency:f,investmentAmount:p,preMoneyValuation:v,state:K,onStateChange:z}),o.jsx(JSe,{companyName:c,currency:f,valuations:h,investmentAmount:p,preMoneyValuation:v,futureRounds:C,numYears:P,projections:O,assetBasedState:E,preRevenueState:T,dcfState:B,marketBasedState:D,weightedAverageState:K})]})]}),o.jsx("footer",{className:"mt-12 pt-6 border-t border-border",children:o.jsxs("div",{className:"flex items-center justify-center gap-3 text-muted-foreground text-sm",children:[o.jsx("img",{src:hCe,alt:"Prometheus Advisory Services",className:"h-8 object-contain opacity-70"}),o.jsx("span",{children:"Created by Michiel Smith"})]})})]})]})},MCe=()=>o.jsxs(o.Fragment,{children:[o.jsxs(sv,{children:[o.jsx("title",{children:"Apollo — Business Valuation Tool (DCF, VC, Market)"}),o.jsx("meta",{name:"description",content:"Free business valuation tool. Compare DCF, VC method, market multiples, asset-based, and pre-revenue valuations side by side with scenario and sensitivity analysis."}),o.jsx("link",{rel:"canonical",href:"https://simplifiedvaluationtool.lovable.app/"}),o.jsx("meta",{property:"og:title",content:"Apollo — Business Valuation Tool"}),o.jsx("meta",{property:"og:description",content:"Run DCF, VC method, market multiples, and pre-revenue valuations side by side. Free, no signup, instant results."}),o.jsx("meta",{property:"og:url",content:"https://simplifiedvaluationtool.lovable.app/"}),o.jsx("meta",{property:"og:type",content:"website"}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"SoftwareApplication",name:"Apollo",alternateName:"Apollo Valuation Tool",applicationCategory:"FinanceApplication",applicationSubCategory:"Business Valuation",operatingSystem:"Web",url:"https://simplifiedvaluationtool.lovable.app/",description:"Free business valuation tool. Compare DCF, VC method, market multiples, asset-based, and pre-revenue valuations side by side with scenario and sensitivity analysis.",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Discounted Cash Flow (DCF)","VC Method","Market Multiples","Asset-Based Valuation","Pre-Revenue Valuation (Berkus, Scorecard, Risk Factor)","Sensitivity & Scenario Analysis","Monte Carlo Simulation","PDF Reporting"],creator:{"@type":"Organization",name:"Apollo"}})})]}),o.jsx(TCe,{})]}),RCe=[{icon:o.jsx(ym,{className:"h-6 w-6 text-primary"}),title:"1. Financial Projections",tab:"Projections",tabValue:"projections",description:"Start here. Enter your company's projected revenue, margins, and expenses for 3–7 years. These projections feed into the DCF, Market-Based, and Investor Return calculations.",tips:["Set the number of projection years first (3–7).","Enter revenue for each year, then adjust gross margin, SG&A, R&D, and other percentages.","The tool automatically calculates EBITDA, EBIT, net income, and free cash flow from your inputs.","Use the lock/unlock icon on any calculated line item (e.g. Gross Profit, EBITDA, Net Income) to manually override the calculated value. Overrides cascade through all downstream calculations and are respected globally across all valuation methods.","Historic average margins and industry benchmark ranges are shown next to each assumption — use the benchmark selector dropdown to compare against your industry.","Be realistic — overly optimistic projections lead to inflated valuations."]},{icon:o.jsx(_c,{className:"h-6 w-6 text-primary"}),title:"2. Asset-Based Valuation",tab:"Asset-Based",tabValue:"asset",description:"Estimate your company's value based on what it owns and what it would cost to rebuild. Three sub-methods are available.",tips:["Cost to Replicate: Enter equity investment, grant funding, gross profit, employee costs, and inflation rate.","Adjusted Book Value: Enter book assets, liabilities, and fair value adjustments.","Liquidation Value: Enter liquidation assets and discount percentage.","Toggle each method on/off — the tool averages only the selected methods."]},{icon:o.jsx(_8,{className:"h-6 w-6 text-primary"}),title:"3. Pricing-Based (Pre-Revenue) Valuation",tab:"Pricing-Based",tabValue:"prerevenue",description:"For early-stage companies with little or no revenue. Uses three established methods to estimate value based on qualitative factors.",tips:["Berkus Method: Assign a value (e.g. £100,000) to each of five risk-reduction milestones.","Scorecard Method: Rate your team, opportunity, product, competition, and marketing vs. the average pre-money valuation.","Risk Factor Summation: Score 12 risk categories from −2 (high risk) to +2 (very positive), then adjust from a base valuation.","Toggle methods on/off to see how each affects the average."]},{icon:o.jsx(k8,{className:"h-6 w-6 text-primary"}),title:"4. Market-Based Valuation",tab:"Market-Based",tabValue:"market",description:"Values your company by comparing it to similar companies using revenue and EBITDA multiples, then discounts back to a present-day pre-money valuation.",tips:["Set revenue and EBITDA multiples based on comparable companies in your industry.","Choose an exit year and target investor return (IRR).","The tool calculates an exit value, applies dilution from future roun
959ds, and discounts to today's value.","This method uses your Financial Projections and Investment Terms data."]},{icon:o.jsx(hv,{className:"h-6 w-6 text-primary"}),title:"5. Intrinsic-Based (DCF) Valuation",tab:"Intrinsic Based",tabValue:"dcf",description:"Discounted Cash Flow analysis — calculates the present value of your company's projected free cash flows plus a terminal value.",tips:["Set a discount rate (WACC) — typically 15–40% for startups.","Set a terminal growth rate (usually 2–4%).","Adjust the default risk percentage to account for startup failure risk.","Enter any existing debt and cash to convert enterprise value to equity value.","This method relies entirely on your Financial Projections — including any manual overrides you've set."]},{icon:o.jsx(qM,{className:"h-6 w-6 text-primary"}),title:"6. Investment Terms",tab:"Investment Terms",tabValue:"investment",description:"Define the initial investment round and any planned future rounds. This data feeds into dilution calculations and investor return analysis.",tips:["Enter the initial investment amount and pre-money valuation.","Optionally mark the round as preferred stock with a liquidation multiple.","Add future rounds with their expected year, amount, and pre-money valuation.","Future rounds affect ownership dilution shown in Market-Based and Investor Returns tabs."]},{icon:o.jsx(ym,{className:"h-6 w-6 text-primary"}),title:"7. Investor Returns",tab:"Investor Returns",tabValue:"returns",description:"See detailed return analysis for each investor across all roun
959ds, including IRR, money multiple, cash-on-cash returns, and dividend income.",tips:["Returns are calculated based on your exit value from the Market-Based tab.","IRR (Internal Rate of Return) accounts for the timing of dividend distributions and exit proceeds.","The tool shows year-by-year cash flows, ownership percentages, and final exit proceeds per round.","Preferred stock holders receive their liquidation preference before common shareholders.","Revenue CAGR shows your projected revenue growth rate across the investment horizon.","Use this to evaluate whether the deal is attractive to investors."]},{icon:o.jsx(FM,{className:"h-6 w-6 text-primary"}),title:"8. Summary (Weighted Average)",tab:"Summary",tabValue:"summary",description:"Combine all four valuation methods into a single weighted average. Adjust the weights to reflect which methods you trust most.",tips:["Weights must total 100%.","Give more weight to methods most relevant to your stage (e.g. pre-revenue companies should weight Pricing-Based higher).","The summary shows each method's value alongside the blended result.","Use this as your final negotiation reference point."]}],$Ce=[{icon:o.jsx(A8,{className:"h-6 w-6 text-primary"}),title:"Sensitivity Analysis",description:"Stress-test your valuation by varying one key parameter at a time. See how changes in discount rate, growth rate, revenue multiples, or EBITDA multiples affect both DCF and Market-Based valuations.",tips:["Select a parameter to vary and set a ± percentage range.","The tool generates 9 data points across the range and plots them on a line chart.","Use this to identify which assumptions your valuation is most sensitive to.","Both Intrinsic (DCF) and Market-Based models have independent sensitivity panels."]},{icon:o.jsx(R8,{className:"h-6 w-6 text-primary"}),title:"Scenario Comparison",description:"Save multiple valuation snapshots (e.g. Conservative, Base, Optimistic) and compare them side-by-side using bar charts, radar charts, and delta tables.",tips:["Name each scenario and save the current state as a snapshot.","Compare up to five scenarios at once.","The delta table highlights percentage differences between scenarios.","Great for presenting a range of outcomes to investors or board members."]},{icon:o.jsx(DM,{className:"h-6 w-6 text-primary"}),title:"Industry Benchmarks",description:"Compare your inputs against reference ranges for 10 different industries. Quickly spot outliers where your assumptions diverge from sector norms.",tips:["Select your industry to load benchmark data.","Metrics flagged as outliers are highlighted for review.","Benchmarks cover revenue multiples, EBITDA multiples, gross margin, growth rates, and more.","Based on data from Damodaran's publicly available datasets."]},{icon:o.jsx(pv,{className:"h-6 w-6 text-primary"}),title:"Monte Carlo Simulation",description:"Randomise your key assumptions across thousands of simulation runs to see the full probability distribution of valuations and the year-by-year spread of Free Cash Flow.",tips:["Choose between DCF or Market-Based as the underlying model.","Set the number of iterations (1,000–10,000) and the spread (±1 standard deviation as a percentage).","Click 'Run Simulation' to generate the results — the histogram shows valuation frequency, and the area chart shows FCF spread per projected year.","P10 (bearish) and P90 (bullish) give you an 80% confidence interval.","The FCF Spread table breaks down P10, P25, Median, P75, P90, and base-case FCF for every year.","A tighter distribution (low coefficient of variation) means your valuation is robust; a wide spread signals high sensitivity to inputs."]},{icon:o.jsx(Tc,{className:"h-6 w-6 text-primary"}),title:"Historic Financials",description:"Enter multi-year historic performance data to establish a factual baseline. The tool calculates margins, growth rates, and CAGR automatically — and feeds averages into your projections as reference points.",tips:["Add years of historic data including Revenue, COGS, SG&A, R&D, D&A, Interest & Tax expenses, Current Assets, Current Liabilities, Cash, and Net CapEx.","Gross Profit, EBITDA, EBIT, Net Profit, Working Capital, and Free Cash Flow are calculated automatically with their respective margins.","Revenue CAGR and average margins are computed across all entered years.","You can paste numbers directly from Excel — the tool strips currency symbols and formatting automatically.","Historic averages appear as reference badges in the Projections tab, helping you validate forward-looking assumptions.","Use the CSV buttons to download a template, import historic data, or export your entries.","When you load Sample Data, three years of example historic data (2022–2024) are included."]}],ICe=()=>o.jsxs("div",{className:"min-h-screen bg-muted/30",children:[o.jsxs(sv,{children:[o.jsx("title",{children:"Tutorial — Apollo Business Valuation Tool Guide"}),o.jsx("meta",{name:"description",content:"Step-by-step guide to Apollo: projections, DCF, VC method, market multiples, asset-based and pre-revenue valuations, plus PDF export."}),o.jsx("link",{rel:"canonical",href:"https://simplifiedvaluationtool.lovable.app/tutorial"}),o.jsx("meta",{property:"og:title",content:"Tutorial — Apollo Business Valuation Tool"}),o.jsx("meta",{property:"og:description",content:"Step-by-step guide covering inputs, valuation methods, projections, and exporting reports."}),o.jsx("meta",{property:"og:url",content:"https://simplifiedvaluationtool.lovable.app/tutorial"}),o.jsx("meta",{property:"og:type",content:"article"})]}),o.jsxs("div",{className:"container mx-auto py-8 space-y-8 max-w-4xl",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(lr,{to:"/",children:o.jsxs(Ce,{variant:"outline",size:"sm",children:[o.jsx(dv,{className:"h-4 w-4 mr-2"}),"Back to Tool"]})}),o.jsx("img",{src:_y,alt:"Apollo Informal Investment",className:"h-12 object-contain"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h1",{className:"text-4xl font-bold text-foreground",children:"Getting Started Guide"}),o.jsx("p",{className:"text-lg text-muted-foreground",children:"A step-by-step walkthrough of the Business Valuation Tool — from entering your projections to arriving at a final valuation."})]}),o.jsxs(ut,{className:"border-green-500/20 bg-green-500/5",children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(pv,{className:"h-5 w-5 text-green-600"}),"First Time Here? Start in 3 Steps"]})}),o.jsxs(pt,{className:"space-y-4 text-sm text-muted-foreground",children:[o.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[o.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"flex items-center justify-center h-7 w-7 rounded-full bg-primary text-primary-foreground text-xs font-bold",children:"1"}),o.jsx("p",{className:"font-semibold text-foreground",children:"Load Sample Data"})]}),o.jsxs("p",{children:["Click ",o.jsx("strong",{children:"Sample Data"})," in the toolbar to populate the tool with realistic example data. This lets you explore every feature immediately."]})]}),o.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"flex items-center justify-center h-7 w-7 rounded-full bg-primary text-primary-foreground text-xs font-bold",children:"2"}),o.jsx("p",{className:"font-semibold text-foreground",children:"Walk Through the Tabs"})]}),o.jsxs("p",{children:["Work left-to-right through the tabs: ",o.jsx("strong",{children:"Projections → Asset → Pricing → Market → DCF → Investment → Returns → Summary"}),"."]})]}),o.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"flex items-center justify-center h-7 w-7 rounded-full bg-primary text-primary-foreground text-xs font-bold",children:"3"}),o.jsx("p",{className:"font-semibold text-foreground",children:"Review Your Valuation"})]}),o.jsxs("p",{children:["In the ",o.jsx("strong",{children:"Summary"})," tab, adjust weights and export a professional PDF report. Use ",o.jsx("strong",{children:"Advanced"})," tools to stress-test your numbers."]})]})]}),o.jsx("div",{className:"rounded-md border border-border bg-background/50 px-4 py-3",children:o.jsxs("p",{className:"text-xs",children:[o.jsx("strong",{children:"Tip:"})," Hover over any button in the toolbar for a quick description of what it does. Every input field and metric has a tooltip — hover the ",o.jsx(Be,{className:"inline h-3 w-3"})," icon for an explanation."]})})]})]}),o.jsxs(ut,{className:"border-primary/20 bg-primary/5",children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(Be,{className:"h-5 w-5 text-primary"}),"How This Tool Works"]})}),o.jsxs(pt,{className:"space-y-3 text-sm text-muted-foreground",children:[o.jsxs("p",{children:["This tool calculates your company's value using ",o.jsx("strong",{children:"four independent methods"}),": Asset-Based, Pricing-Based (Pre-Revenue), Market-Based, and Intrinsic (DCF). Each method approaches valuation from a different angle."]}),o.jsxs("p",{children:["In the ",o.jsx("strong",{children:"Summary tab"}),", you assign weights to each method and the tool produces a single blended valuation. The recommended workflow is to work through the tabs from left to right."]})]})]}),o.jsxs(ut,{className:"border-amber-500/20 bg-amber-500/5",children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(ql,{className:"h-5 w-5 text-amber-600"}),"Manual Overrides"]})}),o.jsxs(pt,{className:"space-y-3 text-sm text-muted-foreground",children:[o.jsxs("p",{children:["In the ",o.jsx("strong",{children:"Financial Projections"})," tab, every calculated line item (Gross Profit, EBITDA, EBIT, Taxes, Net Income, etc.) has a ",o.jsx("strong",{children:"lock/unlock toggle"}),"."]}),o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(WM,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Unlocked (default)"})," — the value is automatically calculated from your inputs."]})]}),o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(ql,{className:"h-4 w-4 mt-0.5 text-amber-600 shrink-0"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Locked (override)"})," — you enter a specific value that replaces the calculated one. This override cascades through all downstream calculations and is respected across every valuation method, including DCF, Market-Based, and Investor Returns."]})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Core Valuation Tabs"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Work through these tabs from left to right."})]}),o.jsx("div",{className:"space-y-6",children:RCe.map((e,t)=>o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-3 text-xl",children:[e.icon,e.title,o.jsxs(lr,{to:`/?tab=${e.tabValue}`,className:"ml-auto flex items-center gap-1 text-xs font-normal bg-primary/10 text-primary px-2 py-1 rounded hover:bg-primary/20 transition-colors",children:[e.tab," tab ",o.jsx(db,{className:"h-3 w-3"})]})]})}),o.jsxs(pt,{className:"space-y-3",children:[o.jsx("p",{className:"text-muted-foreground",children:e.description}),o.jsx("ul",{className:"space-y-2",children:e.tips.map((r,n)=>o.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[o.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0"}),o.jsx("span",{children:r})]},n))})]})]},t))}),o.jsxs("div",{className:"space-y-2 pt-4",children:[o.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Advanced Analysis"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["These tools live under the ",o.jsx("strong",{children:"Advanced"})," tab and help you stress-test and validate your valuation."]})]}),o.jsx("div",{className:"space-y-6",children:$Ce.map((e,t)=>o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-3 text-xl",children:[e.icon,e.title,o.jsxs(lr,{to:"/?tab=advanced",className:"ml-auto flex items-center gap-1 text-xs font-normal bg-primary/10 text-primary px-2 py-1 rounded hover:bg-primary/20 transition-colors",children:["Advanced tab ",o.jsx(db,{className:"h-3 w-3"})]})]})}),o.jsxs(pt,{className:"space-y-3",children:[o.jsx("p",{className:"text-muted-foreground",children:e.description}),o.jsx("ul",{className:"space-y-2",children:e.tips.map((r,n)=>o.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[o.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0"}),o.jsx("span",{children:r})]},n))})]})]},t))}),o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(sf,{className:"h-5 w-5 text-primary"}),"PDF Reports"]})}),o.jsxs(pt,{className:"space-y-3 text-sm text-muted-foreground",children:[o.jsxs("p",{children:["Export professional PDF reports for any section of your valuation using the ",o.jsx("strong",{children:"Export PDF"})," dropdown in the top toolbar."]}),o.jsxs("ul",{className:"space-y-2",children:[o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0"}),o.jsx("span",{children:"Export individual tabs (Projections, Asset-Based, Pricing-Based, Market-Based, DCF, Investment, Investor Returns, Historic Financials, or Summary)."})]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0"}),o.jsxs("span",{children:["Export a ",o.jsx("strong",{children:"Complete Report"})," combining all sections (including Historic Financials when data is entered) with a table of contents and executive summary."]})]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0"}),o.jsx("span",{children:"All PDF reports respect your manual overrides and show the same values as the on-screen tabs."})]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0"}),o.jsx("span",{children:"Reports open in a new tab using your browser's print dialog — save as PDF or print directly."})]})]})]})]}),o.jsxs(ut,{children:[o.jsx(ft,{children:o.jsxs(ht,{className:"flex items-center gap-2",children:[o.jsx(vm,{className:"h-5 w-5 text-primary"}),"Saving, Loading & CSV Import/Export"]})}),o.jsxs(pt,{className:"space-y-4 text-sm",children:[o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(vm,{className:"h-4 w-4"})," Save Model"]}),o.jsx("p",{className:"text-muted-foreground",children:"Saves your current inputs to the browser's local storage."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(VM,{className:"h-4 w-4"})," Load Model"]}),o.jsx("p",{className:"text-muted-foreground",children:"Loads a previously saved model from local storage."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(Un,{className:"h-4 w-4"})," Export Models"]}),o.jsx("p",{className:"text-muted-foreground",children:"Downloads all saved models as a JSON file for backup."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(HM,{className:"h-4 w-4"})," Import Model"]}),o.jsx("p",{className:"text-muted-foreground",children:"Uploads a JSON file to restore saved models into the browser."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(Un,{className:"h-4 w-4"})," CSV Template"]}),o.jsx("p",{className:"text-muted-foreground",children:"Downloads a blank CSV template you can fill in with your data."})]}),o.jsxs("div",{className:"spac
959e-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(Tj,{className:"h-4 w-4"})," Import CSV"]}),o.jsx("p",{className:"text-muted-foreground",children:"Uploads a filled CSV file and applies all values to the tool."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(Un,{className:"h-4 w-4"})," Export CSV"]}),o.jsx("p",{className:"text-muted-foreground",children:"Downloads your current session data as a CSV file."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"font-medium flex items-center gap-2",children:[o.jsx(Mj,{className:"h-4 w-4"})," Clear All Data"]}),o.jsxs("p",{className:"text-muted-foreground",children:["Resets all inputs to zero. Saved models are ",o.jsx("strong",{children:"not"})," deleted."]})]})]}),o.jsxs("div",{className:"rounded-md border border-border bg-muted/50 p-3 mt-4",children:[o.jsx("p",{className:"font-medium text-foreground mb-1",children:"Recommended workflow for sharing data:"}),o.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-muted-foreground",children:[o.jsxs("li",{children:[o.jsx("strong",{children:"Save"})," your model to store it in the browser."]}),o.jsxs("li",{children:["Use ",o.jsx("strong",{children:"Export Models"})," to download as JSON (or ",o.jsx("strong",{children:"Export CSV"})," for spreadsheet format)."]}),o.jsxs("li",{children:["Share the file, then the recipient uses ",o.jsx("strong",{children:"Import Model"})," (or ",o.jsx("strong",{children:"Import CSV"}),") to load it."]})]})]})]})]}),o.jsx("div",{className:"text-center pt-4",children:o.jsx(lr,{to:"/",children:o.jsxs(Ce,{size:"lg",children:[o.jsx(hv,{className:"h-5 w-5 mr-2"}),"Start Using the Tool"]})})})]})]}),bo=[{slug:"how-to-value-a-pre-revenue-startup",title:"How to Value a Pre-Revenue Startup",description:"A practical guide to valuing pre-revenue startups using Scorecard, Berkus, and Risk Factor Summation methods — with worked examples.",readTime:"8 min read",category:"Pre-Revenue",sections:[{heading:"Why pre-revenue valuation is different",paragraphs:["Pre-revenue startups have no income, often no product, and no historical financials. Traditional DCF and multiples-based methods break down because every input is a guess. Instead, investors rely on qualitative scoring frameworks calibrated against comparable seed-stage deals in their region.","The three most widely used methods — Scorecard, Berkus, and Risk Factor Summation — each anchor on a regional average pre-money valuation and adjust up or down based on team, market, product, and traction signals."]},{heading:"1. The Scorecard Method",paragraphs:["Bill Payne's Scorecard Method compares your startup to the average funded seed deal in your region across seven weighted factors. You score each factor relative to the average (e.g. 125% if your team is stronger than typical), multiply by the factor weight, then apply the combined multiplier to the regional average pre-money."],bullets:["Strength of management team (0–30%)","Size of the opportunity (0–25%)","Product / technology (0–15%)","Competitive environment (0–10%)","Marketing / sales / partnerships (0–10%)","Need for additional investment (0–5%)","Other (0–5%)"]},{heading:"2. The Berkus Method",paragraphs:["Dave Berkus's method assigns up to $500k of value to each of five qualitative milestones, capping pre-money at roughly $2.5M. It is best suited for very early ideas where Scorecard inputs feel speculative."],bullets:["Sound idea (basic value)","Prototype (reduces technology risk)","Quality management team (reduces execution risk)","Strategic relationships (reduces market risk)","Product rollout or sales (reduces production risk)"]},{heading:"3. Risk Factor Summation",paragraphs:["Risk Factor Summation starts from a regional pre-money average and adjusts ±$250k–$500k for each of 12 risk categories (management, stage, legislation, manufacturing, sales, funding, competition, technology, litigation, international, reputation, exit). It forces an explicit, defendable view of each risk dimension."]},{heading:"Putting it together",paragraphs:["No single method is right. Most investors triangulate two or three and take a weighted average. Apollo runs all three side-by-side and shows the combined Pricing-Based valuation alongside Asset-Based, Market (VC), and DCF methods, so you can see how sensitive the answer is to the framework you pick."]}],faqs:[{question:"Which pre-revenue method should I lead with?",answer:"For a team with a prototype and early traction, lead with Scorecard. For a pure idea stage, Berkus gives a more grounded ceiling. Risk Factor Summation works best when you can credibly score all 12 risk dimensions. In Apollo's Pre-Revenue tab you can run all three at once and weight them.",cta:{label:"Open Pre-Revenue V
959aluation",to:"/?tab=pre-revenue"}},{question:"What regional pre-money average should I use?",answer:"Use the median seed pre-money in your region from recent angel-group or accelerator reports. Apollo defaults to widely-cited averages but every input is editable so you can match your local market.",cta:{label:"Adjust regional averages",to:"/?tab=pre-revenue"}},{question:"How do I combine pre-revenue with DCF or VC method results?",answer:"Most investors weight pre-revenue methods heavily for seed and shift weight toward VC method and DCF as revenue becomes predictable. Apollo's Weighted Average view lets you set the weight for each of the four categories.",cta:{label:"Set category weights",to:"/?tab=summary"}}]},{slug:"dcf-vs-vc-method-explained",title:"DCF vs VC Method: Which Should You Use?",description:"Discounted Cash Flow and the Venture Capital Method give very different answers. Here's when to use each, and how to reconcile them.",readTime:"7 min read",category:"Methodology",sections:[{heading:"DCF in one paragraph",paragraphs:["Discounted Cash Flow values a business as the present value of its expected future free cash flows, discounted at the Weighted Average Cost of Capital (WACC). It works best when cash flows are reasonably predictable — typically post-revenue, post-product-market-fit businesses with 3+ years of operating history or strong forward visibility."]},{heading:"VC Method in one paragraph",paragraphs:["The Venture Capital Method works backwards from an exit. You estimate an exit value (usually revenue × exit multiple in year N), discount it to today at a high target IRR (often 30–60%), then subtract the planned investment to get pre-money valuation. It is the standard for early-stage venture pricing because it directly encodes the investor's return requirement."]},{heading:"Where they disagree",paragraphs:["DCF tends to undervalue early-stage businesses because the WACC (often 10–15%) does not compensate for failure risk, and terminal value assumptions dominate. VC Method tends to undervalue mature businesses because a 40% IRR over 5 years implies an exit multiple no stable business can deliver.","Rule of thumb: if the company has < 2 years of revenue, lead with VC Method. If it has predictable cash flows and a credible 5-year plan, lead with DCF. Use the other as a sanity check."]},{heading:"Reconciling the two",paragraphs:["Apollo runs DCF and VC Method side-by-side, plus Market multiples and Asset-Based methods, and produces a weighted average. You set the weights based on which methods you trust most for the stage and sector. Seeing all four anchored to the same projections quickly exposes where your assumptions are doing the heavy lifting."]}],faqs:[{question:"Can I run DCF and VC method on the same projections?",answer:"Yes — and you should. Apollo feeds the same Financial Projections into both. If the two answers diverge widely, that usually means your WACC, exit multiple, or target IRR assumptions need a second look.",cta:{label:"Edit financial projections",to:"/?tab=projections"}},{question:"What target IRR should I use for VC Method?",answer:"30–40% for late seed / Series A, 40–60% for pre-seed and seed. Apollo's VC Method panel lets you set IRR per round and shows the implied post-money instantly.",cta:{label:"Open VC Method",to:"/?tab=market-based"}},{question:"How do I deal with WACC uncertainty in DCF?",answer:"Always run a sensitivity table on WACC vs terminal growth. Apollo's Sensitivity Analysis does this in one click and shows the valuation range.",cta:{label:"Run sensitivity analysis",to:"/?tab=sensitivity"}}]},{slug:"what-is-a-fair-wacc",title:"What Is a Fair WACC for a Private Company?",description:"A guide to picking a defensible Weighted Average Cost of Capital for private-company DCF, including size and illiquidity premiums.",readTime:"6 min read",category:"DCF",sections:[{heading:"WACC fundamentals",paragraphs:["WACC blends the cost of equity and the after-tax cost of debt, weighted by the target capital structure. For a private company the hard part is the cost of equity, because there is no observable beta and no liquid market price."]},{heading:"Build-up method",paragraphs:["Most practitioners use a build-up: risk-free rate + equity risk premium + size premium + company-specific premium + (for SMEs) illiquidity premium. Typical ranges in 2026 for private SMEs land between 12% and 22%, depending on stage, sector volatility, and customer concentration."],bullets:["Risk-free rate: 10-year government bond yield","Equity risk premium: 5–6%","Size premium: 2–6% (smaller = higher)","Company-specific premium: 0–6% for c
959oncentration, key-person risk","Illiquidity discount: 2–5% for private holdings"]},{heading:"Sanity-check with sensitivity",paragraphs:["A 1-point change in WACC can move DCF value by 10–20%. Always run a sensitivity table on WACC vs terminal growth before presenting a single number — Apollo's Sensitivity Analysis does this automatically."]},{heading:"An angel-investor framework for IRR and WACC",paragraphs:["Classic build-up methods work for established private companies, but startups have no observable beta and most academic literature anchors discount rates only on funding stage. For angel investors, a more useful approach blends two dimensions: (1) where the company is on the product/revenue/cashflow maturity curve, and (2) how aggressive its 5-year projected CAGR is. The framework below — published by angel investor Michiel Smith — is the one Apollo recommends as a starting point.","Step 1 — Pick a base IRR and WACC from the company's stage:"],bullets:["MVP + Revenue + Cashflow positive → Base IRR 20%, Base WACC 10%","MVP + Revenue, cashflow negative → Base IRR 30%, Base WACC 12%","MVP only, no revenue → Base IRR 40%, Base WACC 14%","Idea stage, no MVP → Base IRR 50%, Base WACC 16%"]},{heading:"Step 2 — Adjust for projected 5-year CAGR",paragraphs:["The higher the projected growth, the higher the embedded execution risk — and the higher the discount rate needs to be to compensate. Add or subtract the following from the base IRR and base WACC:"],bullets:["5-year CAGR < 25% → IRR −10%, WACC −1%","25–50% → IRR 0%, WACC 0%","50–100% → IRR +10%, WACC +1%","100–200% → IRR +20%, WACC +2%","> 200% → IRR +30%, WACC +3%"]},{heading:"Worked example and floor",paragraphs:["A revenue-generating, cashflow-negative company projected to grow at 60% CAGR gets a target IRR of 30% + 10% = 40% and a WACC of 12% + 1% = 13%. The framework's effective floor is roughly 10% IRR and 9% WACC, in line with long-run public-equity returns (7–8%) plus a small premium for private-company risk and illiquidity.","A few companion assumptions Apollo defaults to in the same spirit: EBITDA and revenue exit multiples in the 5–8× PE-deal range (higher only with comparable evidence), a 50–75% default-risk haircut handled separately from WACC, and a 2.5% terminal growth rate. Together these give angels a defendable, stage-aware way to price both DCF and VC Method without relying on a single rule-of-thumb discount rate."]}],faqs:[{question:"Is the Apollo DCF levered or unlevered?",answer:"Unlevered (FCFF) discounted at WACC. That means WACC should reflect the target capital structure, not today's debt balance.",cta:{label:"Open DCF",to:"/?tab=intrinsic"}},{question:"What if my company has no debt?",answer:"Then your WACC equals your cost of equity. The build-up still applies — just skip the after-tax cost of debt term. Enter 0% debt weight in Apollo's DCF inputs.",cta:{label:"Edit WACC inputs",to:"/?tab=intrinsic"}},{question:"How do I justify the WACC I pick to an investor?",answer:"Show the build-up and a sensitivity table around your chosen value. Apollo includes both in the PDF report automatically.",cta:{label:"Export PDF report",to:"/?tab=summary"}},{question:"How do I pick a discount rate without comparable public data?",answer:"Use a stage + growth framework. Start from a base IRR/WACC tied to whether the company has an MVP, revenue, and positive cashflow (20–50% IRR / 10–16% WACC), then add or subtract for the projected 5-year CAGR (−10% to +30% on IRR, −1% to +3% on WACC). Apply the result as the WACC in DCF and the target IRR in VC Method.",cta:{label:"Set WACC and IRR",to:"/?tab=intrinsic"}}]},{slug:"exit-multiples-by-industry",title:"Exit Multiples by Industry: A 2026 Reference",description:"Typical revenue and EBITDA exit multiples by sector, with guid
959ance on when to apply each.",readTime:"5 min read",category:"Market",sections:[{heading:"Revenue vs EBITDA multiples",paragraphs:["Revenue multiples are the default for high-growth, low-margin businesses (SaaS, marketplaces). EBITDA multiples dominate for profitable, mature businesses (services, manufacturing, healthcare). Using the wrong one inflates or deflates value dramatically."]},{heading:"Indicative ranges (2026)",paragraphs:["These are broad ranges for established private-company deals. Public-comparable multiples are typically higher and should be discounted 25–40% for illiquidity."],bullets:["SaaS (growth > 30%): 6–12× ARR","SaaS (growth < 20%): 3–5× ARR","E-commerce / consumer: 1–3× revenue or 6–10× EBITDA","Professional services: 4–8× EBITDA","Manufacturing: 5–8× EBITDA","Healthcare services: 8–12× EBITDA","Fintech: 4–8× revenue (regulated) / 8–15× (platform)"]},{heading:"How to use these",paragraphs:["Pick the range that matches your sector, then adjust for growth rate, gross margin, and customer concentration. Apollo's Market-Based valuation lets you enter both revenue and EBITDA multiples and weights them against your projections automatically."]}],faqs:[{question:"Should I use revenue or EBITDA multiples?",answer:"Use revenue multiples below ~15% EBITDA margin or when growth is the story. Use EBITDA above ~20% margin and stable growth. Apollo lets you enter both and weight them.",cta:{label:"Open Market-Based",to:"/?tab=market-based"}},{question:"Where do I find comparable multiples for my sector?",answer:"Start with public-comp medians from your sector index, then apply a 25–40% private-company discount. Apollo's Industry Benchmark Panel shows typical ranges by sector.",cta:{label:"View benchmarks",to:"/?tab=market-based"}},{question:"How does the exit multiple feed into VC Method?",answer:"Exit value = Year-N revenue × exit multiple. That value is discounted back at your target IRR to get pre-money. Apollo links these inputs so a change to the multiple flows through automatically.",cta:{label:"Open VC Method",to:"/?tab=market-based"}}]},{slug:"sensitivity-and-scenario-analysis",title:"Sensitivity & Scenario Analysis: Stress-Testing Your Valuation",description:"Why a single valuation number is misleading, and how to present a defensible range using sensitivity tables, scenarios, and Monte Carlo.",readTime:"6 min read",category:"Analysis",sections:[{heading:"One number is never the answer",paragraphs:["Every valuation is a function of a dozen assumptions, each with its own uncertainty. Presenting a single point estimate hides where the risk actually lives. Serious investor decks always show a range and the drivers behind it."]},{heading:"Three layers of stress-testing",paragraphs:["Use these in order of increasing sophistication:"],bullets:["Sensitivity tables — vary one or two inputs (WACC, growth, exit multiple) and show the impact on valuation","Scenario analysis — bundle assumptions into Base / Bull / Bear cases that reflect coherent stories","Monte Carlo simulation — assign probability distributions to key inputs and run thousands of trials to get a probability-weighted range"]},{heading:"What to present",paragraphs:["For most fundraising decks, a Base/Bull/Bear scenario summary plus a 2D sensitivity table on the two most important drivers is enough. Apollo runs all three layers and exports them directly into the PDF report."]}],faqs:[{question:"Which two variables should I sensitize first?",answer:"For DCF: WACC × terminal growth. For VC Method: exit multiple × target IRR. Apollo's Sensitivity Analysis lets you pick any two and renders the grid instantly.",cta:{label:"Run sensitivity analysis",to:"/?tab=sensitivity"}},{question:"How many Monte Carlo trials are enough?",answer:"1,000 trials are enough to stabilise the P10/P50/P90 range for most models. Apollo runs 1,000–10,000 in-browser with no setup.",cta:{label:"Run Monte Carlo",to:"/?tab=monte-carlo"}},{question:"Can I save Bull/Base/Bear scenarios separately?",answer:"Yes — Apollo's Scenario Comparison stores each case and shows the resulting valuation side-by-side. Use Save/Load to keep each as its own model file.",cta:{label:"Open Scenarios",to:"/?tab=scenarios"}}]}],DCe=e=>bo.find(t=>t.slug===e),FCe=()=>o.jsxs(o.Fragment,{children:[o.jsxs(sv,{children:[o.jsx("title",{children:"Valuation Guides — DCF, VC Method, Pre-Revenue | Apollo"}),o.jsx("meta",{name:"description",content:"Free guides to business valuation: how to value a pre-revenue startup, DCF vs VC method, picking a WACC, exit multiples by industry, and stress-testing your model."}),o.jsx("link",{rel:"canonical",href:"https://simplifiedvaluationtool.lovable.app/guides"}),o.jsx("meta",{property:"og:title",content:"Valuation Guides | Apollo"}),o.jsx("meta",{property:"og:description",content:"Practical guides on DCF, VC method, pre-revenue valuation, WACC, and exit multiples."}),o.jsx("meta",{property:"og:url",content:"https://simplifiedvaluationtool.lovable.app/guides"}),o.jsx("meta",{property:"og:type",content:"website"}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"Apollo Valuation Guides",url:"https://simplifiedvaluationtool.lovable.app/guides",hasPart:bo.map(e=>
vendor: 4,149 bytes, line 959
959({"@type":"Article",headline:e.title,description:e.description,url:`https://simplifiedvaluationtool.lovable.app/guides/${e.slug}`}))})})]}),o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx("header",{className:"border-b",children:o.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[o.jsx(lr,{to:"/",children:o.jsxs(Ce,{variant:"ghost",size:"sm",children:[o.jsx(dv,{className:"h-4 w-4 mr-2"}),"Back to tool"]})}),o.jsx(lr,{to:"/tutorial",children:o.jsx(Ce,{variant:"ghost",size:"sm",children:"Tutorial"})})]})}),o.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-5xl",children:[o.jsxs("div",{className:"mb-12 text-center",children:[o.jsxs("div",{className:"inline-flex items-center gap-2 text-sm text-muted-foreground mb-3",children:[o.jsx(fv,{className:"h-4 w-4"})," Apollo Guides"]}),o.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Business Valuation Guides"}),o.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Practical, opinionated guides on the methods used inside Apollo — written for founders raising capital and investors pricing rounds."})]}),o.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:bo.map(e=>o.jsx(lr,{to:`/guides/${e.slug}`,children:o.jsx(ut,{className:"h-full hover:border-primary transition-colors",children:o.jsxs(ft,{children:[o.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mb-2",children:[o.jsx("span",{className:"font-medium text-primary",children:e.category}),o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(gm,{className:"h-3 w-3"}),e.readTime]})]}),o.jsx(ht,{className:"text-xl",children:e.title}),o.jsx(Dt,{children:e.description})]})})},e.slug))}),o.jsx("div",{className:"mt-12 text-center",children:o.jsx(lr,{to:"/",children:o.jsx(Ce,{size:"lg",children:"Open the valuation tool"})})})]})]})]});var My="Collapsible",[LCe,iB]=fr(My),[BCe,WC]=LCe(My),oB=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:s,...l}=e,[c,u]=wr({prop:n,defaultProp:a??!1,onChange:s,caller:My});return o.jsx(BCe,{scope:r,disabled:i,contentId:kn(),open:c,onOpenToggle:w.useCallback(()=>u(f=>!f),[u]),children:o.jsx($e.div,{"data-state":GC(c),"data-disabled":i?"":void 0,...l,ref:t})})});oB.displayName=My;var sB="CollapsibleTrigger",lB=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,a=WC(sB,r);return o.jsx($e.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":GC(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:je(e.onClick,a.onOpenToggle)})});lB.displayName=sB;var UC="CollapsibleContent",cB=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=WC(UC,e.__scopeCollapsible);return o.jsx(pn,{present:r||a.open,children:({present:i})=>o.jsx(zCe,{...n,ref:t,present:i})})});cB.displayName=UC;var zCe=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:a,...i}=e,s=WC(UC,r),[l,c]=w.useState(n),u=w.useRef(null),f=et(t,u),d=w.useRef(0),h=d.current,m=w.useRef(0),p=m.current,g=s.open||l,v=w.useRef(g),y=w.useRef(void 0);return w.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),br(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();d.current=b.height,m.current=b.width,v.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),c(n)}},[s.open,n]),o.jsx($e.div,{"data-state":GC(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...i,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:g&&a})});function GC(e){return e?"open":"closed"}var VCe=oB,WCe=lB,UCe=cB,Wa="Accordion",GCe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[HC,HCe,qCe]=yu(Wa),[Ry,wPe]=fr(Wa,[qCe,iB]),qC=iB(),uB=_.forwardRef((e,t)=>
959{const{type:r,...n}=e,a=n,i=n;return o.jsx(HC.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?o.jsx(ZCe,{...i,ref:t}):o.jsx(XCe,{...a,ref:t})})});uB.displayName=Wa;var[dB,KCe]=Ry(Wa),[fB,YCe]=Ry(Wa,{collapsible:!1}),XCe=_.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:i=!1,...s}=e,[l,c]=wr({prop:r,defaultProp:n??"",onChange:a,caller:Wa});return o.jsx(dB,{scope:e.__scopeAccordion,value:_.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:_.useCallback(()=>i&&c(""),[i,c]),children:o.jsx(fB,{scope:e.__scopeAccordion,collapsible:i,children:o.jsx(hB,{...s,ref:t})})})}),ZCe=_.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[s,l]=wr({prop:r,defaultProp:n??[],onChange:a,caller:Wa}),c=_.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=_.useCallback(f=>l((d=[])=>d.filter(h=>h!==f)),[l]);return o.jsx(dB,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:u,children:o.jsx(fB,{scope:e.__scopeAccordion,collapsible:!0,children:o.jsx(hB,{...i,ref:t})})})}),[QCe,$y]=Ry(Wa),hB=_.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:i="vertical",...s}=e,l=_.useRef(null),c=et(l,t),u=HCe(r),d=rs(a)==="ltr",h=je(e.onKeyDown,m=>{var P;if(!GCe.includes(m.key))return;const p=m.target,g=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),v=g.findIndex(A=>A.ref.current===p),y=g.length;if(v===-1)return;m.preventDefault();let x=v;const b=0,S=y-1,j=()=>{x=v+1,x>S&&(x=b)},C=()=>{x=v-1,x<b&&(x=S)};switch(m.key){case"Home":x=b;break;case"End":x=S;break;case"ArrowRight":i==="horizontal"&&(d?j():C());break;case"ArrowDown":i==="vertical"&&j();break;case"ArrowLeft":i==="horizontal"&&(d?C():j());break;case"ArrowUp":i==="vertical"&&C();break}const N=x%y;(P=g[N].ref.current)==null||P.focus()});return o.jsx(QCe,{scope:r,disabled:n,direction:a,orientation:i,children:o.jsx(HC.Slot,{scope:r,children:o.jsx($e.div,{...s,"data-orientation":i,ref:c,onKeyDown:n?void 0:h})})})}),Wg="AccordionItem",[JCe,KC]=Ry(Wg),pB=_.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...a}=e,i=$y(Wg,r),s=KCe(Wg,r),l=qC(r),c=kn(),u=n&&s.value.includes(n)||!1,f=i.disabled||e.disabled;return o.jsx(JCe,{scope:r,open:u,disabled:f,triggerId:c,children:o.jsx(VCe,{"data-orientation":i.orientation,"data-state":bB(u),...l,...a,ref:t,disabled:f,open:u,onOpenChange:d=>{d?s.onItemOpen(n):s.onItemClose(n)}})})});pB.displayName=Wg;var mB="AccordionHeader",gB=_.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=$y(Wa,r),i=KC(mB,r);return o.jsx($e.h3,{"data-orientation":a.orientation,"data-state":bB(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});gB.displayName=mB;var E1="AccordionTrigger",vB=_.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=$y(Wa,r),i=KC(E1,r),s=YCe(E1,r),l=qC(r);return o.jsx(HC.ItemSlot,{scope:r,children:o.jsx(WCe,{"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...n,ref:t})})});vB.displayName=E1;var yB="AccordionContent",xB=_.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=$y(Wa,r),i=KC(yB,r),s=qC(r);return o.jsx(UCe,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...s,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});xB.displayName=yB;function bB(e){return e?"open":"closed"}var eNe=uB,tNe=pB,rNe=gB,wB=vB,jB=xB;const nNe=eNe,SB=w.forwardRef(({className:e,...t},r)=>o.jsx(tNe,{ref:r,className:Oe("border-b",e),...t}));SB.displayName="AccordionItem";const CB=w.forwardRef(({className:e,children:t,...r},n)=>o.jsx(rNe,{className:"flex",children:o.jsxs(wB,{ref:n,className:Oe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,o.jsx(vh,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));CB.displayName=wB.displayName;const NB=w.forwardRef(({className:e,children:t,...r},n)=>o.jsx(jB,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:o.jsx("div",{className:Oe("pb-4 pt-0",e),children:t})}));NB.displayName=jB.displayName;const aNe=1,iNe="407b17c9-7ecb-4762-b9c1-7849bfeb54d5",oNe="3a615ff1-5620-431c-9c30-47fb8f53ef9a",sNe="/__l5e/assets-v1/407b17c9-7ecb-4762-b9c1-7849bfeb54d5/how-to-value-a-pre-revenue-startup.png",lNe="a/v1/3a615ff1-5620-431c-9c30-47fb8f53ef9a/407b17c9-7ecb-4762-b9c1-7849bfeb54d5/how-to-value-a-pre-revenue-startup.png",cNe="how-to-value-a-pre-revenue-startup.png",uNe=30199,dNe="image/png",fNe="2026-07-22T12:54:44Z",hNe={version:aNe,asset_id:iNe,project_id:oNe,url:sNe,r2_key:lNe,original_filename:cNe,size:uNe,content_type:dNe,created_at:fNe},pNe=1,mNe="3e99164b-9b0c-42ca-b082-7278e624809e",gNe="3a615ff1-5620-431c-9c30-47fb8f53ef9a",vNe="/__l5e/assets-v1/3e99164b-9b0c-42ca-b082-7278e624809e/dcf-vs-vc-method-explained.png",yNe="a/v1/3a615ff1-5620-431c-9c30-47fb8f53ef9a/3e99164b-9b0c-42ca-b082-7278e624809e/dcf-vs-vc-method-explained.png",xNe="dcf-vs-vc-method-explained.png",bNe=37648,wNe="image/png",jNe="2026-07-22T12:54:34Z",SNe={version:pNe,asset_id:mNe,project_id:gNe,url:vNe,r2_key:yNe,original_filename:xNe,size:bNe,content_type:wNe,created_at:jNe},CNe=1,NNe="6a94404f-1f81-46d2-b365-b404f16495fe",PNe="3a615ff1-5620-431c-9c30-47fb8f53ef9a",ANe="/__l5e/assets-v1/6a94404f-1f81-46d2-b365-b404f16495fe/what-is-a-fair-wacc.png",kNe="a/v1/3a615ff1-5620-431c-9c30-47fb8f53ef9a/6a94404f-1f81-46d2-b365-b404f16495fe/what-is-a-fair-wacc.png",ONe="what-is-a-fair-wacc.png",ENe=35288,_Ne="image/png",TNe="2026-07-22T12:54:54Z",MNe={version:CNe,asset_id:NNe,project_id:PNe,url:ANe,r2_key:kNe,original_filename:ONe,size:ENe,content_type:_Ne,created_at:TNe}
959,RNe=1,$Ne="0e942ef3-7fec-4446-87f5-1ae06cc6bf53",INe="3a615ff1-5620-431c-9c30-47fb8f53ef9a",DNe="/__l5e/assets-v1/0e942ef3-7fec-4446-87f5-1ae06cc6bf53/exit-multiples-by-industry.png",FNe="a/v1/3a615ff1-5620-431c-9c30-47fb8f53ef9a/0e942ef3-7fec-4446-87f5-1ae06cc6bf53/exit-multiples-by-industry.png",LNe="exit-multiples-by-industry.png",BNe=37228,zNe="image/png",VNe="2026-07-22T12:54:39Z",WNe={version:RNe,asset_id:$Ne,project_id:INe,url:DNe,r2_key:FNe,original_filename:LNe,size:BNe,content_type:zNe,created_at:VNe},UNe=1,GNe="64884b84-33a2-4d16-9608-af0160aa7b4d",HNe="3a615ff1-5620-431c-9c30-47fb8f53ef9a",qNe="/__l5e/assets-v1/64884b84-33a2-4d16-9608-af0160aa7b4d/sensitivity-and-scenario-analysis.png",KNe="a/v1/3a615ff1-5620-431c-9c30-47fb8f53ef9a/64884b84-33a2-4d16-9608-af0160aa7b4d/sensitivity-and-scenario-analysis.png",YNe="sensitivity-and-scenario-analysis.png",XNe=44168,ZNe="image/png",QNe="2026-07-22T12:54:49Z",JNe={version:UNe,asset_id:GNe,project_id:HNe,url:qNe,r2_key:KNe,original_filename:YNe,size:XNe,content_type:ZNe,created_at:QNe},ePe="https://simplifiedvaluationtool.lovable.app",tPe={"how-to-value-a-pre-revenue-startup":hNe,"dcf-vs-vc-method-explained":SNe,"what-is-a-fair-wacc":MNe,"exit-multiples-by-industry":WNe,"sensitivity-and-scenario-analysis":JNe},rPe=e=>{const t=tPe[e];return t?`${ePe}${t.url}`:void 0},M_=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),nPe=()=>{const{slug:e}=BG(),t=e?DCe(e):void 0;if(!t)return o.jsx(e7,{to:"/guides",replace:!0});const r=`https://simplifiedvaluationtool.lovable.app/guides/${t.slug}`,n=bo.findIndex(l=>l.slug===t.slug),a=bo[(n+1)%bo.length],i=rPe(t.slug),s=[...bo.filter(l=>l.slug!==t.slug&&l.category===t.category),...bo.filter(l=>l.slug!==t.slug&&l.category!==t.category)].slice(0,3);return o.jsxs(o.Fragment,{children:[o.jsxs(sv,{children:[o.jsx("title",{children:`${t.title} | Apollo`}),o.jsx("meta",{name:"description",content:t.description}),o.jsx("link",{rel:"canonical",href:r}),o.jsx("meta",{property:"og:title",content:t.title}),o.jsx("meta",{property:"og:description",content:t.description}),o.jsx("meta",{property:"og:url",content:r}),o.jsx("meta",{property:"og:type",content:"article"}),i&&o.jsx("meta",{property:"og:image",content:i}),i&&o.jsx("meta",{property:"og:image:width",content:"1200"}),i&&o.jsx("meta",{property:"og:image:height",content:"630"}),o.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i&&o.jsx("meta",{name:"twitter:image",content:i}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:t.title,description:t.description,url:r,mainEntityOfPage:r,image:i?[i]:void 0,author:{"@type":"Organization",name:"Apollo",url:"https://simplifiedvaluationtool.lovable.app/"},publisher:{"@type":"Organization",name:"Apollo",logo:{"@type":"ImageObject",url:"https://simplifiedvaluationtool.lovable.app/favicon.ico"}},articleSection:t.category,keywords:t.sections.map(l=>l.heading).join(", "),timeRequired:t.readTime,inLanguage:"en"})}),o.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.faqs.map(l=>({"@type":"Question",name:l.question,acceptedAnswer:{"@type":"Answer",text:l.answer}}))})})]}),o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx("header",{className:"border-b",children:o.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[o.jsx(lr,{to:"/guides",children:o.jsxs(Ce,{variant:"ghost",size:"sm",children:[o.jsx(dv,{className:"h-4 w-4 mr-2"}),"All guides"]})}),o.jsx(lr,{to:"/",children:o.jsx(Ce,{variant:"outline",size:"sm",children:"Open the tool"})})]})}),o.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-3xl",children:[o.jsxs("div",{className:"mb-6 text-sm text-muted-foreground flex items-center gap-3",children:[o.jsx("span",{className:"font-medium text-primary",children:t.category}),o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(gm,{className:"h-3 w-3"}),t.readTime]}),o.jsx("span",{children:"·"}),o.jsxs("span",{children:[t.sections.length," sections"]})]}),o.jsx("h1",{className:"text-4xl font-bold mb-4",children:t.title}),o.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:t.description}),o.jsxs("nav",{"aria-label":"Outline",className:"mb-10 p-5 border rounded-lg bg-muted/30",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[o.jsx($8,{className:"h-4 w-4"})," In this guide"]}),o.jsx("ol",{className:"space-y-1.5 text-sm list-decimal pl-5",children:t.sections.map(l=>o.jsx("li",{children:o.jsx("a",{href:`#${M_(l.heading)}`,className:"text-foreground hover:text-primary hover:underline",children:l.heading})},l.heading))}),o.jsxs("div",{className:"mt-4 pt-3 border-t flex items-center justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Want to apply this to your own numbers?"}),o.jsxs(lr,{to:"/",className:"font-medium text-primary hover:underline inline-flex items-center gap-1",children:["Open Apollo ",o.jsx(ko,{className:"h-3 w-3"})]})]})]}),o.jsx("article",{className:"space-y-10",children:t.sections.map((l,c)=>o.jsxs("section",{id:M_(l.heading),className:"scroll-mt-20",children:[o.jsx("h2",{className:"text-2xl font-semibold mb-3",children:l.heading}),l.paragraphs.map((u,f)=>o.jsx("p",{className:"text-base leading-relaxed mb-3",children:u},f)),l.bullets&&o.jsx("ul",{className:"list-disc pl-6 space-y-1 mt-2",children:l.bullets.map((u,f)=>o.jsx("li",{children:u},f))}),o.jsx("div",{className:"mt-4 text-sm",children:o.jsxs(lr,{to:"/",className:"text-primary hover:underline inline-flex items-center gap-1",children:["Try this in the valuation tool ",o.jsx(ko,{className:"h-3 w-3"})]})})]},c))}),o.jsxs("section",{className:"mt-14","aria-labelledby":"faq-heading",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx(Be,{className:"h-5 w-5 text-primary"}),o.jsx("h2",{id:"faq-heading",className:"text-2xl font-semibold",children:"Frequently asked questions"})]}),o.jsx(nNe,{type:"single",collapsible:!0,className:"w-full",children:t.faqs.map((l,c)=>o.jsxs(SB,{value:`faq-${c}`,children:[o.jsx(CB,{className:"text-left",children:l.question}),o.jsxs(NB,{children:[o.jsx("p",{className:"text-base leading-relaxed mb-3",children:l.answer}),o.jsxs(lr,{to:l.cta.to,className:"text-sm font-medium text-primary hover:underline inline-flex items-center gap-1",children:[l.cta.label," ",o.jsx(ko,{className:"h-3 w-3"})]})]})]},c))})]}),s.length>0&&o.jsxs("section",{className:"mt-14","aria-labelledby":"related-heading",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx(fv,{className:"h-5 w-5 text-primary"}),o.jsx("h2",{id:"related-heading",className:"text-2xl font-semibold",children:"Related guides"})]}),o.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:s.map(l=>o.jsxs(lr,{to:`/guides/${l.slug}`,className:"group block p-5 border rounded-lg hover:border-primary transition-colors bg-card",children:[o.jsx("div",{className:"text-xs font-medium text-primary mb-2",children:l.category}),o.jsx("div",{className:"font-semibold mb-2 group-hover:text-primary",children:l.title}),o.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2 mb-3",children:l.description}),o.jsxs("div",{className:"text-xs text-muted-foreground inline-flex items-center gap-1",children:[o.jsx(gm,{className:"h-3 w-3"})," ",l.readTime]})]},l.slug))})]}),o.jsxs("div",{className:"mt-12 p-6 border rounded-lg bg-muted/30",children:[o.jsx("h3",{className:"font-semibold mb-2",children:"Try it in Apollo"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Run this method on your own numbers — free, no signup. Apollo shows DCF, VC, market, asset-based, and pre-revenue valuations side by side."}),o.jsx(lr,{to:"/",children:o.jsx(Ce,{children:"Open the valuation tool"})})]}),o.jsxs("div",{className:"mt-10 pt-6 border-t flex items-center justify-between",children:[o.jsx(lr,{to:"/guides",className:"text-sm text-muted-foreground hover:text-foreground",children:"← All guides"}),o.jsxs(lr,{to:`/guides/${a.slug}`,className:"text-sm font-medium inline-flex items-center gap-1",children:["Next: ",a.title," ",o.jsx(ko,{className:"h-3 w-3"})]})]})]})]})]})},aPe=()=>{const e=pl();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),o.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),o.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),o.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},iPe=new cG,oPe=()=>o.jsx(dG,{client:iPe,children:o.jsx(m7,{children:o.jsxs(nn,{children:[o.jsx(SW,{}),o.jsx(tU,{}),o.jsx(u7,{children:o.jsxs(r7,{children:[o.jsx(Ml,{path:"/",element:o.jsx(MCe,{})}),o.jsx(Ml,{path:"/tutorial",element:o.jsx(ICe,{})}),o.jsx(Ml,{path:"/guides",element:o.jsx(FCe,{})}),o.jsx(Ml,{path:"/guides/:slug",element:o.jsx(nPe,{})}),o.jsx(Ml,{path:"*",element:o.jsx(aPe,{})})]})})]})})});tM(document.getElementById("root")).render(o.jsx(lM,{children:o.jsx(oPe,{})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.