PageSourceSearch

https://kenya-innovation-ecosystem.base44.app/assets/index-CN6xN1C1.js

js kenya-innovation-ecosystem.base44.app collected 2026-10-03 03:15:15 UTC 1,653,495 bytes, 1,332 lines download raw bytes

vendor: 4,197 bytes, lines 1-9
1var cH=Object.defineProperty;var nO=e=>{throw TypeError(e)};var uH=(e,t,n)=>t in e?cH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var mn=(e,t,n)=>uH(e,typeof t!="symbol"?t+"":t,n),Y_=(e,t,n)=>t.has(e)||nO("Cannot "+n);var le=(e,t,n)=>(Y_(e,t,"read from private field"),n?n.call(e):t.get(e)),ht=(e,t,n)=>t.has(e)?nO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ze=(e,t,n,r)=>(Y_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),It=(e,t,n)=>(Y_(e,t,"access private method"),n);var Oy=(e,t,n,r)=>({set _(i){Ze(e,t,i,n)},get _(){return le(e,t,r)}});function dH(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Ty=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X_={exports:{}},np={},Q_={exports:{}},Ot={};/**
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 rO;function fH(){if(rO)return Ot;rO=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function v(K){return K===null||typeof K!="object"?null:(K=m&&K[m]||K["@@iterator"],typeof K=="function"?K:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function _(K,ne,ve){this.props=K,this.context=ne,this.refs=b,this.updater=ve||x}_.prototype.isReactComponent={},_.prototype.setState=function(K,ne){if(typeof K!="object"&&typeof K!="function"&&K!=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,K,ne,"setState")},_.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function j(){}j.prototype=_.prototype;function C(K,ne,ve){this.props=K,this.context=ne,this.refs=b,this.updater=ve||x}var E=C.prototype=new j;E.constructor=C,w(E,_.prototype),E.isPureReactComponent=!0;var A=Array.isArray,k=Object.prototype.hasOwnProperty,M={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function $(K,ne,ve){var je,Y={},he=null,fe=null;if(ne!=null)for(je in ne.ref!==void 0&&(fe=ne.ref),ne.key!==void 0&&(he=""+ne.key),ne)k.call(ne,je)&&!I.hasOwnProperty(je)&&(Y[je]=ne[je]);var _e=arguments.length-2;if(_e===1)Y.children=ve;else if(1<_e){for(var de=Array(_e),we=0;we<_e;we++)de[we]=arguments[we+2];Y.children=de}if(K&&K.defaultProps)for(je in _e=K.defaultProps,_e)Y[je]===void 0&&(Y[je]=_e[je]);return{$$typeof:e,type:K,key:he,ref:fe,props:Y,_owner:M.current}}function q(K,ne){return{$$typeof:e,type:K.type,key:ne,ref:K.ref,props:K.props,_owner:K._owner}}
vendor: 6,693 bytes, lines 9-25
9function V(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function H(K){var ne={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(ve){return ne[ve]})}var U=/\/+/g;function z(K,ne){return typeof K=="object"&&K!==null&&K.key!=null?H(""+K.key):ne.toString(36)}function Z(K,ne,ve,je,Y){var he=typeof K;(he==="undefined"||he==="boolean")&&(K=null);var fe=!1;if(K===null)fe=!0;else switch(he){case"string":case"number":fe=!0;break;case"object":switch(K.$$typeof){case e:case t:fe=!0}}if(fe)return fe=K,Y=Y(fe),K=je===""?"."+z(fe,0):je,A(Y)?(ve="",K!=null&&(ve=K.replace(U,"$&/")+"/"),Z(Y,ne,ve,"",function(we){return we})):Y!=null&&(V(Y)&&(Y=q(Y,ve+(!Y.key||fe&&fe.key===Y.key?"":(""+Y.key).replace(U,"$&/")+"/")+K)),ne.push(Y)),1;if(fe=0,je=je===""?".":je+":",A(K))for(var _e=0;_e<K.length;_e++){he=K[_e];var de=je+z(he,_e);fe+=Z(he,ne,ve,de,Y)}else if(de=v(K),typeof de=="function")for(K=de.call(K),_e=0;!(he=K.next()).done;)he=he.value,de=je+z(he,_e++),fe+=Z(he,ne,ve,de,Y);else if(he==="object")throw ne=String(K),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.");return fe}function ee(K,ne,ve){if(K==null)return K;var je=[],Y=0;return Z(K,je,"","",function(he){return ne.call(ve,he,Y++)}),je}function G(K){if(K._status===-1){var ne=K._result;ne=ne(),ne.then(function(ve){(K._status===0||K._status===-1)&&(K._status=1,K._result=ve)},function(ve){(K._status===0||K._status===-1)&&(K._status=2,K._result=ve)}),K._status===-1&&(K._status=0,K._result=ne)}if(K._status===1)return K._result.default;throw K._result}var oe={current:null},W={transition:null},ie={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:W,ReactCurrentOwner:M};function ae(){throw Error("act(...) is not supported in production builds of React.")}return Ot.Children={map:ee,forEach:function(K,ne,ve){ee(K,function(){ne.apply(this,arguments)},ve)},count:function(K){var ne=0;return ee(K,function(){ne++}),ne},toArray:function(K){return ee(K,function(ne){return ne})||[]},only:function(K){if(!V(K))throw Error("React.Children.only expected to receive a single React element child.");return K}},Ot.Component=_,Ot.Fragment=n,Ot.Profiler=i,Ot.PureComponent=C,Ot.StrictMode=r,Ot.Suspense=d,Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Ot.act=ae,Ot.cloneElement=function(K,ne,ve){if(K==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+K+".");var je=w({},K.props),Y=K.key,he=K.ref,fe=K._owner;if(ne!=null){if(ne.ref!==void 0&&(he=ne.ref,fe=M.current),ne.key!==void 0&&(Y=""+ne.key),K.type&&K.type.defaultProps)var _e=K.type.defaultProps;for(de in ne)k.call(ne,de)&&!I.hasOwnProperty(de)&&(je[de]=ne[de]===void 0&&_e!==void 0?_e[de]:ne[de])}var de=arguments.length-2;if(de===1)je.children=ve;else if(1<de){_e=Array(de);for(var we=0;we<de;we++)_e[we]=arguments[we+2];je.children=_e}return{$$typeof:e,type:K.type,key:Y,ref:he,props:je,_owner:fe}},Ot.createContext=function(K){return K={$$typeof:o,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},K.Provider={$$typeof:s,_context:K},K.Consumer=K},Ot.createElement=$,Ot.createFactory=function(K){var ne=$.bind(null,K);return ne.type=K,ne},Ot.createRef=function(){return{current:null}},Ot.forwardRef=function(K){return{$$typeof:c,render:K}},Ot.isValidElement=V,Ot.lazy=function(K){return{$$typeof:p,_payload:{_status:-1,_result:K},_init:G}},Ot.memo=function(K,ne){return{$$typeof:h,type:K,compare:ne===void 0?null:ne}},Ot.startTransition=function(K){var ne=W.transition;W.transition={};try{K()}finally{W.transition=ne}},Ot.unstable_act=ae,Ot.useCallback=function(K,ne){return oe.current.useCallback(K,ne)},Ot.useContext=function(K){return oe.current.useContext(K)},Ot.useDebugValue=function(){},Ot.useDeferredValue=function(K){return oe.current.useDeferredValue(K)},Ot.useEffect=function(K,ne){return oe.current.useEffect(K,ne)},Ot.useId=function(){return oe.current.useId()},Ot.useImperativeHandle=function(K,ne,ve){return oe.current.useImperativeHandle(K,ne,ve)},Ot.useInsertionEffect=function(K,ne){return oe.current.useInsertionEffect(K,ne)},Ot.useLayoutEffect=function(K,ne){return oe.current.useLayoutEffect(K,ne)},Ot.useMemo=function(K,ne){return oe.current.useMemo(K,ne)},Ot.useReducer=function(K,ne,ve){return oe.current.useReducer(K,ne,ve)},Ot.useRef=function(K){return oe.current.useRef(K)},Ot.useState=function(K){return oe.current.useState(K)},Ot.useSyncExternalStore=function(K,ne,ve){return oe.current.useSyncExternalStore(K,ne,ve)},Ot.useTransition=function(){return oe.current.useTransition()},Ot.version="18.3.1",Ot}var iO;function o2(){return iO||(iO=1,Q_.exports=fH()),Q_.exports}/**
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 aO;function hH(){if(aO)return np;aO=1;var e=o2(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(c,d,h){var p,m={},v=null,x=null;h!==void 0&&(v=""+h),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(x=d.ref);for(p in d)r.call(d,p)&&!s.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:v,ref:x,props:m,_owner:i.current}}return np.Fragment=n,np.jsx=o,np.jsxs=o,np}var sO;function pH(){return sO||(sO=1,X_.exports=hH()),X_.exports}var a=pH(),P=o2();const J=Kt(P),l2=dH({__proto__:null,default:J},[P]);var My={},J_={exports:{}},si={},ew={exports:{}},tw={};/**
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 */var oO;function mH(){return oO||(oO=1,(function(e){function t(W,ie){var ae=W.length;W.push(ie);e:for(;0<ae;){var K=ae-1>>>1,ne=W[K];if(0<i(ne,ie))W[K]=ie,W[ae]=ne,ae=K;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var ie=W[0],ae=W.pop();if(ae!==ie){W[0]=ae;e:for(var K=0,ne=W.length,ve=ne>>>1;K<ve;){var je=2*(K+1)-1,Y=W[je],he=je+1,fe=W[he];if(0>i(Y,ae))he<ne&&0>i(fe,Y)?(W[K]=fe,W[he]=ae,K=he):(W[K]=Y,W[je]=ae,K=je);else if(he<ne&&0>i(fe,ae))W[K]=fe,W[he]=ae,K=he;else break e}}return ie}function i(W,ie){var ae=W.sortIndex-ie.sortIndex;
vendor: 41,085 bytes, lines 25-37
25return ae!==0?ae:W.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var d=[],h=[],p=1,m=null,v=3,x=!1,w=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(W){for(var ie=n(h);ie!==null;){if(ie.callback===null)r(h);else if(ie.startTime<=W)r(h),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(h)}}function A(W){if(b=!1,E(W),!w)if(n(d)!==null)w=!0,G(k);else{var ie=n(h);ie!==null&&oe(A,ie.startTime-W)}}function k(W,ie){w=!1,b&&(b=!1,j($),$=-1),x=!0;var ae=v;try{for(E(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||W&&!H());){var K=m.callback;if(typeof K=="function"){m.callback=null,v=m.priorityLevel;var ne=K(m.expirationTime<=ie);ie=e.unstable_now(),typeof ne=="function"?m.callback=ne:m===n(d)&&r(d),E(ie)}else r(d);m=n(d)}if(m!==null)var ve=!0;else{var je=n(h);je!==null&&oe(A,je.startTime-ie),ve=!1}return ve}finally{m=null,v=ae,x=!1}}var M=!1,I=null,$=-1,q=5,V=-1;function H(){return!(e.unstable_now()-V<q)}function U(){if(I!==null){var W=e.unstable_now();V=W;var ie=!0;try{ie=I(!0,W)}finally{ie?z():(M=!1,I=null)}}else M=!1}var z;if(typeof C=="function")z=function(){C(U)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ee=Z.port2;Z.port1.onmessage=U,z=function(){ee.postMessage(null)}}else z=function(){_(U,0)};function G(W){I=W,M||(M=!0,z())}function oe(W,ie){$=_(function(){W(e.unstable_now())},ie)}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(W){W.callback=null},e.unstable_continueExecution=function(){w||x||(w=!0,G(k))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(W){switch(v){case 1:case 2:case 3:var ie=3;break;default:ie=v}var ae=v;v=ie;try{return W()}finally{v=ae}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,ie){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var ae=v;v=W;try{return ie()}finally{v=ae}},e.unstable_scheduleCallback=function(W,ie,ae){var K=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?K+ae:K):ae=K,W){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=ae+ne,W={id:p++,callback:ie,priorityLevel:W,startTime:ae,expirationTime:ne,sortIndex:-1},ae>K?(W.sortIndex=ae,t(h,W),n(d)===null&&W===n(h)&&(b?(j($),$=-1):b=!0,oe(A,ae-K))):(W.sortIndex=ne,t(d,W),w||x||(w=!0,G(k))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var ie=v;return function(){var ae=v;v=ie;try{return W.apply(this,arguments)}finally{v=ae}}}})(tw)),tw}var lO;function gH(){return lO||(lO=1,ew.exports=mH()),ew.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 cO;function yH(){if(cO)return si;cO=1;var e=o2(),t=gH();function n(l){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+l,y=1;y<arguments.length;y++)f+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+l+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(l,f){o(l,f),o(l+"Capture",f)}function o(l,f){for(i[l]=f,l=0;l<f.length;l++)r.add(f[l])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},m={};function v(l){return d.call(m,l)?!0:d.call(p,l)?!1:h.test(l)?m[l]=!0:(p[l]=!0,!1)}function x(l,f,y,N){if(y!==null&&y.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":return N?!1:y!==null?!y.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function w(l,f,y,N){if(f===null||typeof f>"u"||x(l,f,y,N))return!0;if(N)return!1;if(y!==null)switch(y.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function b(l,f,y,N,T,R,F){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=N,this.attributeNamespace=T,this.mustUseProperty=y,this.propertyName=l,this.type=f,this.sanitizeURL=R,this.removeEmptyString=F}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){_[l]=new b(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var f=l[0];_[f]=new b(f,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){_[l]=new b(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){_[l]=new b(l,2,!1,l,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(l){_[l]=new b(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){_[l]=new b(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){_[l]=new b(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){_[l]=new b(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){_[l]=new b(l,5,!1,l.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function C(l){return l[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(l){var f=l.replace(j,C);_[f]=new b(f,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var f=l.replace(j,C);_[f]=new b(f,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var f=l.replace(j,C);_[f]=new b(f,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){_[l]=new b(l,1,!1,l.toLowerCase(),null,!1,!1)}),_.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){_[l]=new b(l,1,!1,l.toLowerCase(),null,!0,!0)});function E(l,f,y,N){var T=_.hasOwnProperty(f)?_[f]:null;(T!==null?T.type!==0:N||!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(w(f,y,T,N)&&(y=null),N||T===null?v(f)&&(y===null?l.removeAttribute(f):l.setAttribute(f,""+y)):T.mustUseProperty?l[T.propertyName]=y===null?T.type===3?!1:"":y:(f=T.attributeName,N=T.attributeNamespace,y===null?l.removeAttribute(f):(T=T.type,y=T===3||T===4&&y===!0?"":""+y,N?l.setAttributeNS(N,f,y):l.setAttribute(f,y))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),M=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),H=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),W=Symbol.iterator;function ie(l){return l===null||typeof l!="object"?null:(l=W&&l[W]||l["@@iterator"],typeof l=="function"?l:null)}var ae=Object.assign,K;function ne(l){if(K===void 0)try{throw Error()}catch(y){var f=y.stack.trim().match(/\n( *(at )?)/);K=f&&f[1]||""}return`
34`+K+l}var ve=!1;function je(l,f){if(!l||ve)return"";ve=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(be){var N=be}Reflect.construct(l,[],f)}else{try{f.call()}catch(be){N=be}l.call(f.prototype)}else{try{throw Error()}catch(be){N=be}l()}}catch(be){if(be&&N&&typeof be.stack=="string"){for(var T=be.stack.split(`
35`),R=N.stack.split(`
36`),F=T.length-1,X=R.length-1;1<=F&&0<=X&&T[F]!==R[X];)X--;for(;1<=F&&0<=X;F--,X--)if(T[F]!==R[X]){if(F!==1||X!==1)do if(F--,X--,0>X||T[F]!==R[X]){var se=`
37`+T[F].replace(" at new "," at ");return l.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",l.displayName)),se}while(1<=F&&0<=X);break}}}finally{ve=!1,Error.prepareStackTrace=y}return(l=l?l.displayName||l.name:"")?ne(l):""}function Y(l){switch(l.tag){case 5:return ne(l.type);case 16:return ne("Lazy");case 13:return ne("Suspense");case 19:return ne("SuspenseList");case 0:case 2:case 15:return l=je(l.type,!1),l;case 11:return l=je(l.type.render,!1),l;case 1:return l=je(l.type,!0),l;default:return""}}function he(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case I:return"Fragment";case M:return"Portal";case q:return"Profiler";case $:return"StrictMode";case z:return"Suspense";case Z:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case H:return(l.displayName||"Context")+".Consumer";case V:return(l._context.displayName||"Context")+".Provider";case U:var f=l.render;return l=l.displayName,l||(l=f.displayName||f.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case ee:return f=l.displayName||null,f!==null?f:he(l.type)||"Memo";case G:f=l._payload,l=l._init;try{return he(l(f))}catch{}}return null}function fe(l){var f=l.type;switch(l.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=f.render,l=l.displayName||l.name||"",f.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(f);case 8:return f===$?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function _e(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function de(l){var f=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function we(l){var f=de(l)?"checked":"value",y=Object.getOwnPropertyDescriptor(l.constructor.prototype,f),N=""+l[f];if(!l.hasOwnProperty(f)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var T=y.get,R=y.set;return Object.defineProperty(l,f,{configurable:!0,get:function(){return T.call(this)},set:function(F){N=""+F,R.call(this,F)}}),Object.defineProperty(l,f,{enumerable:y.enumerable}),{getValue:function(){return N},setValue:function(F){N=""+F},stopTracking:function(){l._valueTracker=null,delete l[f]}}}}function ke(l){l._valueTracker||(l._valueTracker=we(l))}function re(l){if(!l)return!1;var f=l._valueTracker;if(!f)return!0;var y=f.getValue(),N="";return l&&(N=de(l)?l.checked?"true":"false":l.value),l=N,l!==y?(f.setValue(l),!0):!1}function Re(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function ge(l,f){var y=f.checked;return ae({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:y??l._wrapperState.initialChecked})}function Be(l,f){var y=f.defaultValue==null?"":f.defaultValue,N=f.checked!=null?f.checked:f.defaultChecked;y=_e(f.value!=null?f.value:y),l._wrapperState={initialChecked:N,initialValue:y,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function Le(l,f){f=f.checked,f!=null&&E(l,"checked",f,!1)}function rt(l,f){Le(l,f);var y=_e(f.value),N=f.type;if(y!=null)N==="number"?(y===0&&l.value===""||l.value!=y)&&(l.value=""+y):l.value!==""+y&&(l.value=""+y);else if(N==="submit"||N==="reset"){l.removeAttribute("value");return}f.hasOwnProperty("value")?_t(l,f.type,y):f.hasOwnProperty("defaultValue")&&_t(l,f.type,_e(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(l.defaultChecked=!!f.defaultChecked)}function Ct(l,f,y){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var N=f.type;if(!(N!=="submit"&&N!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+l._wrapperState.initialValue,y||f===l.value||(l.value=f),l.defaultValue=f}y=l.name,y!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,y!==""&&(l.name=y)}function _t(l,f,y){(f!=="number"||Re(l.ownerDocument)!==l)&&(y==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+y&&(l.defaultValue=""+y))}var Gt=Array.isArray;function qt(l,f,y,N){if(l=l.options,f){f={};for(var T=0;T<y.length;T++)f["$"+y[T]]=!0;for(y=0;y<l.length;y++)T=f.hasOwnProperty("$"+l[y].value),l[y].selected!==T&&(l[y].selected=T),T&&N&&(l[y].defaultSelected=!0)}else{for(y=""+_e(y),f=null,T=0;T<l.length;T++){if(l[T].value===y){l[T].selected=!0,N&&(l[T].defaultSelected=!0);return}f!==null||l[T].disabled||(f=l[T])}f!==null&&(f.selected=!0)}}function dn(l,f){if(f.dangerouslySetInnerHTML!=null)throw Error(n(91));return ae({},f,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function nn(l,f){var y=f.value;if(y==null){if(y=f.children,f=f.defaultValue,y!=null){if(f!=null)throw Error(n(92));if(Gt(y)){if(1<y.length)throw Error(n(93));y=y[0]}f=y}f==null&&(f=""),y=f}l._wrapperState={initialValue:_e(y)}}function qe(l,f){var y=_e(f.value),N=_e(f.defaultValue);y!=null&&(y=""+y,y!==l.value&&(l.value=y),f.defaultValue==null&&l.defaultValue!==y&&(l.defaultValue=y)),N!=null&&(l.defaultValue=""+N)}function Oe(l){var f=l.textContent;f===l._wrapperState.initialValue&&f!==""&&f!==null&&(l.value=f)}function lt(l){switch(l){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 Ge(l,f){return l==null||l==="http://www.w3.org/1999/xhtml"?lt(f):l==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var Ue,Et=(function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,y,N,T){MSApp.execUnsafeLocalFunction(function(){return l(f,y,N,T)})}:l})(function(l,f){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=f;else{for(Ue=Ue||document.createElement("div"),Ue.innerHTML="<svg>"+f.valueOf().toString()+"</svg>",f=Ue.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;f.firstChild;)l.appendChild(f.firstChild)}});function At(l,f){if(f){var y=l.firstChild;if(y&&y===l.lastChild&&y.nodeType===3){y.nodeValue=f;return}}l.textContent=f}var fn={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},Ln=["Webkit","ms","Moz","O"];Object.keys(fn).forEach(function(l){Ln.forEach(function(f){f=f+l.charAt(0).toUpperCase()+l.substring(1),fn[f]=fn[l]})});function ga(l,f,y){return f==null||typeof f=="boolean"||f===""?"":y||typeof f!="number"||f===0||fn.hasOwnProperty(l)&&fn[l]?(""+f).trim():f+"px"}function Xl(l,f){l=l.style;for(var y in f)if(f.hasOwnProperty(y)){var N=y.indexOf("--")===0,T=ga(y,f[y],N);y==="float"&&(y="cssFloat"),N?l.setProperty(y,T):l[y]=T}}var Ql=ae({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 Oo(l,f){if(f){if(Ql[l]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(n(137,l));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(n(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(n(61))}if(f.style!=null&&typeof f.style!="object")throw Error(n(62))}}function rr(l,f){if(l.indexOf("-")===-1)return typeof f.is=="string";switch(l){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 Va=null;function uh(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var $u=null,Os=null,Ts=null;function hg(l){if(l=Hs(l)){if(typeof $u!="function")throw Error(n(280));var f=l.stateNode;f&&(f=dd(f),$u(l.stateNode,l.type,f))}}function pg(l){Os?Ts?Ts.push(l):Ts=[l]:Os=l}function mg(){if(Os){var l=Os,f=Ts;if(Ts=Os=null,hg(l),f)for(l=0;l<f.length;l++)hg(f[l])}}function gg(l,f){return l(f)}function yg(){}var dh=!1;function Fu(l,f,y){if(dh)return l(f,y);dh=!0;try{return gg(l,f,y)}finally{dh=!1,(Os!==null||Ts!==null)&&(yg(),mg())}}function Jl(l,f){var y=l.stateNode;if(y===null)return null;var N=dd(y);if(N===null)return null;y=N[f];e:switch(f){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)||(l=l.type,N=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!N;break e;default:l=!1}if(l)return null;if(y&&typeof y!="function")throw Error(n(231,f,typeof y));return y}var fh=!1;if(c)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){fh=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{fh=!1}function Eb(l,f,y,N,T,R,F,X,se){var be=Array.prototype.slice.call(arguments,3);try{f.apply(y,be)}catch(Me){this.onError(Me)}}var Nr=!1,at=null,tc=!1,Bu=null,vg={onError:function(l){Nr=!0,at=l}};function xg(l,f,y,N,T,R,F,X,se){Nr=!1,at=null,Eb.apply(vg,arguments)}function hh(l,f,y,N,T,R,F,X,se){if(xg.apply(this,arguments),Nr){if(Nr){var be=at;Nr=!1,at=null}else throw Error(n(198));tc||(tc=!0,Bu=be)}}function Ka(l){var f=l,y=l;if(l.alternate)for(;f.return;)f=f.return;else{l=f;do f=l,(f.flags&4098)!==0&&(y=f.return),l=f.return;while(l)}return f.tag===3?y:null}function Ms(l){if(l.tag===13){var f=l.memoizedState;if(f===null&&(l=l.alternate,l!==null&&(f=l.memoizedState)),f!==null)return f.dehydrated}return null}function ph(l){if(Ka(l)!==l)throw Error(n(188))}function Pb(l){var f=l.alternate;if(!f){if(f=Ka(l),f===null)throw Error(n(188));return f!==l?null:l}for(var y=l,N=f;;){var T=y.return;if(T===null)break;var R=T.alternate;if(R===null){if(N=T.return,N!==null){y=N;continue}break}if(T.child===R.child){for(R=T.child;R;){if(R===y)return ph(T),l;if(R===N)return ph(T),f;R=R.sibling}throw Error(n(188))}if(y.return!==N.return)y=T,N=R;else{for(var F=!1,X=T.child;X;){if(X===y){F=!0,y=T,N=R;break}if(X===N){F=!0,N=T,y=R;break}X=X.sibling}if(!F){for(X=R.child;X;){if(X===y){F=!0,y=R,N=T;break}if(X===N){F=!0,N=R,y=T;break}X=X.sibling}if(!F)throw Error(n(189))}}if(y.alternate!==N)throw Error(n(190))}if(y.tag!==3)throw Error(n(188));return y.stateNode.current===y?l:f}function bg(l){return l=Pb(l),l!==null?_g(l):null}function _g(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var f=_g(l);if(f!==null)return f;l=l.sibling}return null}var wg=t.unstable_scheduleCallback,mh=t.unstable_cancelCallback,kb=t.unstable_shouldYield,zu=t.unstable_requestPaint,Sn=t.unstable_now,Ab=t.unstable_getCurrentPriorityLevel,gh=t.unstable_ImmediatePriority,jg=t.unstable_UserBlockingPriority,Uu=t.unstable_NormalPriority,yh=t.unstable_LowPriority,To=t.unstable_IdlePriority,nc=null,gi=null;function rc(l){if(gi&&typeof gi.onCommitFiberRoot=="function")try{gi.onCommitFiberRoot(nc,l,void 0,(l.current.flags&128)===128)}catch{}}var wt=Math.clz32?Math.clz32:Mo,xn=Math.log,qu=Math.LN2;function Mo(l){return l>>>=0,l===0?32:31-(xn(l)/qu|0)|0}var ya=64,Ro=4194304;function bt(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function hn(l,f){var y=l.pendingLanes;if(y===0)return 0;var N=0,T=l.suspendedLanes,R=l.pingedLanes,F=y&268435455;if(F!==0){var X=F&~T;X!==0?N=bt(X):(R&=F,R!==0&&(N=bt(R)))}else F=y&~T,F!==0?N=bt(F):R!==0&&(N=bt(R));if(N===0)return 0;if(f!==0&&f!==N&&(f&T)===0&&(T=N&-N,R=f&-f,T>=R||T===16&&(R&4194240)!==0))return f;if((N&4)!==0&&(N|=y&16),f=l.entangledLanes,f!==0)for(l=l.entanglements,f&=N;0<f;)y=31-wt(f),T=1<<y,N|=l[y],f&=~T;return N}function vh(l,f){switch(l){case 1:case 2:case 4:return f+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 f+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 Hu(l,f){for(var y=l.suspendedLanes,N=l.pingedLanes,T=l.expirationTimes,R=l.pendingLanes;0<R;){var F=31-wt(R),X=1<<F,se=T[F];se===-1?((X&y)===0||(X&N)!==0)&&(T[F]=vh(X,f)):se<=f&&(l.expiredLanes|=X),R&=~X}}function Cr(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function Sg(){var l=ya;return ya<<=1,(ya&4194240)===0&&(ya=64),l}function Io(l){for(var f=[],y=0;31>y;y++)f.push(l);return f}function yi(l,f,y){l.pendingLanes|=f,f!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,f=31-wt(f),l[f]=y}function kn(l,f){var y=l.pendingLanes&~f;l.pendingLanes=f,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=f,l.mutableReadLanes&=f,l.entangledLanes&=f,f=l.entanglements;var N=l.eventTimes;for(l=l.expirationTimes;0<y;){var T=31-wt(y),R=1<<T;f[T]=0,N[T]=-1,l[T]=-1,y&=~R}}function va(l,f){var y=l.entangledLanes|=f;for(l=l.entanglements;y;){var N=31-wt(y),T=1<<N;T&f|l[N]&f&&(l[N]|=f),y&=~T}}var Rt=0;function Lo(l){return l&=-l,1<l?4<l?(l&268435455)!==0?16:536870912:4:1}var Wu,Rs,Vu,Ku,ic,ac=!1,Do=[],vi=null,xa=null,Ui=null,sc=new Map,gt=new Map,Wn=[],rn="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 xh(l,f){switch(l){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":xa=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":sc.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":gt.delete(f.pointerId)}}function Is(l,f,y,N,T,R){return l===null||l.nativeEvent!==R?(l={blockedOn:f,domEventName:y,eventSystemFlags:N,nativeEvent:R,targetContainers:[T]},f!==null&&(f=Hs(f),f!==null&&Rs(f)),l):(l.eventSystemFlags|=N,f=l.targetContainers,T!==null&&f.indexOf(T)===-1&&f.push(T),l)}function bh(l,f,y,N,T){switch(f){case"focusin":return vi=Is(vi,l,f,y,N,T),!0;case"dragenter":return xa=Is(xa,l,f,y,N,T),!0;case"mouseover":return Ui=Is(Ui,l,f,y,N,T),!0;case"pointerover":var R=T.pointerId;return sc.set(R,Is(sc.get(R)||null,l,f,y,N,T)),!0;case"gotpointercapture":return R=T.pointerId,gt.set(R,Is(gt.get(R)||null,l,f,y,N,T)),!0}return!1}function Gu(l){var f=qs(l.target);if(f!==null){var y=Ka(f);if(y!==null){if(f=y.tag,f===13){if(f=Ms(y),f!==null){l.blockedOn=f,ic(l.priority,function(){Vu(y)});return}}else if(f===3&&y.stateNode.current.memoizedState.isDehydrated){l.blockedOn=y.tag===3?y.stateNode.containerInfo:null;return}}}l.blockedOn=null}function qi(l){if(l.blockedOn!==null)return!1;for(var f=l.targetContainers;0<f.length;){var y=Xu(l.domEventName,l.eventSystemFlags,f[0],l.nativeEvent);if(y===null){y=l.nativeEvent;var N=new y.constructor(y.type,y);Va=N,y.target.dispatchEvent(N),Va=null}else return f=Hs(y),f!==null&&Rs(f),l.blockedOn=y,!1;f.shift()}return!0}function Zu(l,f,y){qi(l)&&y.delete(f)}function oc(){ac=!1,vi!==null&&qi(vi)&&(vi=null),xa!==null&&qi(xa)&&(xa=null),Ui!==null&&qi(Ui)&&(Ui=null),sc.forEach(Zu),gt.forEach(Zu)}function Nn(l,f){l.blockedOn===f&&(l.blockedOn=null,ac||(ac=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,oc)))}function xi(l){function f(T){return Nn(T,l)}if(0<Do.length){Nn(Do[0],l);for(var y=1;y<Do.length;y++){var N=Do[y];N.blockedOn===l&&(N.blockedOn=null)}}for(vi!==null&&Nn(vi,l),xa!==null&&Nn(xa,l),Ui!==null&&Nn(Ui,l),sc.forEach(f),gt.forEach(f),y=0;y<Wn.length;y++)N=Wn[y],N.blockedOn===l&&(N.blockedOn=null);for(;0<Wn.length&&(y=Wn[0],y.blockedOn===null);)Gu(y),y.blockedOn===null&&Wn.shift()}var Ls=A.ReactCurrentBatchConfig,lc=!0;function Ob(l,f,y,N){var T=Rt,R=Ls.transition;Ls.transition=null;try{Rt=1,cc(l,f,y,N)}finally{Rt=T,Ls.transition=R}}function Ng(l,f,y,N){var T=Rt,R=Ls.transition;Ls.transition=null;try{Rt=4,cc(l,f,y,N)}finally{Rt=T,Ls.transition=R}}function cc(l,f,y,N){if(lc){var T=Xu(l,f,y,N);if(T===null)u(l,f,N,Yu,y),xh(l,N);else if(bh(T,l,f,y,N))N.stopPropagation();else if(xh(l,N),f&4&&-1<rn.indexOf(l)){for(;T!==null;){var R=Hs(T);if(R!==null&&Wu(R),R=Xu(l,f,y,N),R===null&&u(l,f,N,Yu,y),R===T)break;T=R}T!==null&&N.stopPropagation()}else u(l,f,N,null,y)}}var Yu=null;function Xu(l,f,y,N){if(Yu=null,l=uh(N),l=qs(l),l!==null)if(f=Ka(l),f===null)l=null;else if(y=f.tag,y===13){if(l=Ms(f),l!==null)return l;l=null}else if(y===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;l=null}else f!==l&&(l=null);return Yu=l,null}function Mt(l){switch(l){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(Ab()){case gh:return 1;case jg:return 4;case Uu:case yh:return 16;case To:return 536870912;default:return 16}default:return 16}}var Ga=null,zr=null,Za=null;function _h(){if(Za)return Za;var l,f=zr,y=f.length,N,T="value"in Ga?Ga.value:Ga.textContent,R=T.length;for(l=0;l<y&&f[l]===T[l];l++);var F=y-l;for(N=1;N<=F&&f[y-N]===T[R-N];N++);return Za=T.slice(l,1<N?1-N:void 0)}function Qu(l){var f=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&f===13&&(l=13)):l=f,l===10&&(l=13),32<=l||l===13?l:0}function $o(){return!0}function Cg(){return!1}function Er(l){function f(y,N,T,R,F){this._reactName=y,this._targetInst=T,this.type=N,this.nativeEvent=R,this.target=F,this.currentTarget=null;for(var X in l)l.hasOwnProperty(X)&&(y=l[X],this[X]=y?y(R):R[X]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?$o:Cg,this.isPropagationStopped=Cg,this}return ae(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var y=this.nativeEvent;y&&(y.preventDefault?y.preventDefault():typeof y.returnValue!="unknown"&&(y.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var y=this.nativeEvent;y&&(y.stopPropagation?y.stopPropagation():typeof y.cancelBubble!="unknown"&&(y.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),f}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wh=Er(Fo),Ds=ae({},Fo,{view:0,detail:0}),Tb=Er(Ds),Jr,jh,Bo,bi=ae({},Ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fs,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Bo&&(Bo&&l.type==="mousemove"?(Jr=l.screenX-Bo.screenX,jh=l.screenY-Bo.screenY):jh=Jr=0,Bo=l),Jr)},movementY:function(l){return"movementY"in l?l.movementY:jh}}),Sh=Er(bi),Eg=ae({},bi,{dataTransfer:0}),Nh=Er(Eg),Mb=ae({},Ds,{relatedTarget:0}),Ju=Er(Mb),Pg=ae({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Rb=Er(Pg),Ib=ae({},Fo,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),Ch=Er(Ib),Lb=ae({},Fo,{data:0}),Eh=Er(Lb),kg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ed={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"},$s={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Db(l){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(l):(l=$s[l])?!!f[l]:!1}function Fs(){return Db}var ei=ae({},Ds,{key:function(l){if(l.key){var f=kg[l.key]||l.key;if(f!=="Unidentified")return f}return l.type==="keypress"?(l=Qu(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?ed[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fs,charCode:function(l){return l.type==="keypress"?Qu(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Qu(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),Ag=Er(ei),Og=ae({},bi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tg=Er(Og),Ph=ae({},Ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fs}),kh=Er(Ph),$b=ae({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fb=Er($b),Mg=ae({},bi,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),Bb=Er(Mg),_i=[9,13,27,32],Ya=c&&"CompositionEvent"in window,uc=null;c&&"documentMode"in document&&(uc=document.documentMode);var ba=c&&"TextEvent"in window&&!uc,Rg=c&&(!Ya||uc&&8<uc&&11>=uc),Bs=" ",Ig=!1;function zo(l,f){switch(l){case"keyup":return _i.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ah(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var _a=!1;function zb(l,f){switch(l){case"compositionend":return Ah(f);case"keypress":return f.which!==32?null:(Ig=!0,Bs);case"textInput":return l=f.data,l===Bs&&Ig?null:l;default:return null}}function Xa(l,f){if(_a)return l==="compositionend"||!Ya&&zo(l,f)?(l=_h(),Za=zr=Ga=null,_a=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return Rg&&f.locale!=="ko"?null:f.data;default:return null}}var td={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 Lg(l){var f=l&&l.nodeName&&l.nodeName.toLowerCase();return f==="input"?!!td[l.type]:f==="textarea"}function nd(l,f,y,N){pg(N),f=S(f,"onChange"),0<f.length&&(y=new wh("onChange","change",null,y,N),l.push({event:y,listeners:f}))}var dc=null,Ur=null;function Ub(l){Fh(l,0)}function wa(l){var f=Ws(l);if(re(f))return l}function qb(l,f){if(l==="change")return f}var Hi=!1;if(c){var Uo;if(c){var rd="oninput"in document;if(!rd){var id=document.createElement("div");id.setAttribute("oninput","return;"),rd=typeof id.oninput=="function"}Uo=rd}else Uo=!1;Hi=Uo&&(!document.documentMode||9<document.documentMode)}function fc(){dc&&(dc.detachEvent("onpropertychange",ad),Ur=dc=null)}function ad(l){if(l.propertyName==="value"&&wa(Ur)){var f=[];nd(f,Ur,l,uh(l)),Fu(Ub,f)}}function sd(l,f,y){l==="focusin"?(fc(),dc=f,Ur=y,dc.attachEvent("onpropertychange",ad)):l==="focusout"&&fc()}function qo(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return wa(Ur)}function od(l,f){if(l==="click")return wa(f)}function Oh(l,f){if(l==="input"||l==="change")return wa(f)}function Dg(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var wi=typeof Object.is=="function"?Object.is:Dg;function Qa(l,f){if(wi(l,f))return!0;if(typeof l!="object"||l===null||typeof f!="object"||f===null)return!1;var y=Object.keys(l),N=Object.keys(f);if(y.length!==N.length)return!1;for(N=0;N<y.length;N++){var T=y[N];if(!d.call(f,T)||!wi(l[T],f[T]))return!1}return!0}function $g(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Th(l,f){var y=$g(l);l=0;for(var N;y;){if(y.nodeType===3){if(N=l+y.textContent.length,l<=f&&N>=f)return{node:y,offset:f-l};l=N}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=$g(y)}}function Fg(l,f){return l&&f?l===f?!0:l&&l.nodeType===3?!1:f&&f.nodeType===3?Fg(l,f.parentNode):"contains"in l?l.contains(f):l.compareDocumentPosition?!!(l.compareDocumentPosition(f)&16):!1:!1}function Mh(){for(var l=window,f=Re();f instanceof l.HTMLIFrameElement;){try{var y=typeof f.contentWindow.location.href=="string"}catch{y=!1}if(y)l=f.contentWindow;else break;f=Re(l.document)}return f}function Rh(l){var f=l&&l.nodeName&&l.nodeName.toLowerCase();return f&&(f==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||f==="textarea"||l.contentEditable==="true")}function Wi(l){var f=Mh(),y=l.focusedElem,N=l.selectionRange;if(f!==y&&y&&y.ownerDocument&&Fg(y.ownerDocument.documentElement,y)){if(N!==null&&Rh(y)){if(f=N.start,l=N.end,l===void 0&&(l=f),"selectionStart"in y)y.selectionStart=f,y.selectionEnd=Math.min(l,y.value.length);else if(l=(f=y.ownerDocument||document)&&f.defaultView||window,l.getSelection){l=l.getSelection();var T=y.textContent.length,R=Math.min(N.start,T);N=N.end===void 0?R:Math.min(N.end,T),!l.extend&&R>N&&(T=N,N=R,R=T),T=Th(y,R);var F=Th(y,N);T&&F&&(l.rangeCount!==1||l.anchorNode!==T.node||l.anchorOffset!==T.offset||l.focusNode!==F.node||l.focusOffset!==F.offset)&&(f=f.createRange(),f.setStart(T.node,T.offset),l.removeAllRanges(),R>N?(l.addRange(f),l.extend(F.node,F.offset)):(f.setEnd(F.node,F.offset),l.addRange(f)))}}for(f=[],l=y;l=l.parentNode;)l.nodeType===1&&f.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<f.length;y++)l=f[y],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var ld=c&&"documentMode"in document&&11>=document.documentMode,Ho=null,Wo=null,hc=null,cd=!1;function Bg(l,f,y){var N=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;cd||Ho==null||Ho!==Re(N)||(N=Ho,"selectionStart"in N&&Rh(N)?N={start:N.selectionStart,end:N.selectionEnd}:(N=(N.ownerDocument&&N.ownerDocument.defaultView||window).getSelection(),N={anchorNode:N.anchorNode,anchorOffset:N.anchorOffset,focusNode:N.focusNode,focusOffset:N.focusOffset}),hc&&Qa(hc,N)||(hc=N,N=S(Wo,"onSelect"),0<N.length&&(f=new wh("onSelect","select",null,f,y),l.push({event:f,listeners:N}),f.target=Ho)))}function Ja(l,f){var y={};return y[l.toLowerCase()]=f.toLowerCase(),y["Webkit"+l]="webkit"+f,y["Moz"+l]="moz"+f,y}var Vo={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionend:Ja("Transition","TransitionEnd")},es={},Ih={};c&&(Ih=document.createElement("div").style,"AnimationEvent"in window||(delete Vo.animationend.animation,delete Vo.animationiteration.animation,delete Vo.animationstart.animation),"TransitionEvent"in window||delete Vo.transitionend.transition);function pc(l){if(es[l])return es[l];if(!Vo[l])return l;var f=Vo[l],y;for(y in f)if(f.hasOwnProperty(y)&&y in Ih)return es[l]=f[y];return l}var zg=pc("animationend"),Vi=pc("animationiteration"),Lh=pc("animationstart"),Dh=pc("transitionend"),Ko=new Map,Ug="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 ji(l,f){Ko.set(l,f),s(f,[l])}for(var zs=0;zs<Ug.length;zs++){var ud=Ug[zs],qg=ud.toLowerCase(),Hb=ud[0].toUpperCase()+ud.slice(1);ji(qg,"on"+Hb)}ji(zg,"onAnimationEnd"),ji(Vi,"onAnimationIteration"),ji(Lh,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(Dh,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Go="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(" "),Hg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Go));function $h(l,f,y){var N=l.type||"unknown-event";l.currentTarget=y,hh(N,f,void 0,l),l.currentTarget=null}function Fh(l,f){f=(f&4)!==0;for(var y=0;y<l.length;y++){var N=l[y],T=N.event;N=N.listeners;e:{var R=void 0;if(f)for(var F=N.length-1;0<=F;F--){var X=N[F],se=X.instance,be=X.currentTarget;if(X=X.listener,se!==R&&T.isPropagationStopped())break e;$h(T,X,be),R=se}else for(F=0;F<N.length;F++){if(X=N[F],se=X.instance,be=X.currentTarget,X=X.listener,se!==R&&T.isPropagationStopped())break e;$h(T,X,be),R=se}}}if(tc)throw l=Bu,tc=!1,Bu=null,l}function an(l,f){var y=f[Qo];y===void 0&&(y=f[Qo]=new Set);var N=l+"__bubble";y.has(N)||(Wg(f,l,2,!1),y.add(N))}function Bh(l,f,y){var N=0;f&&(N|=4),Wg(y,l,N,f)}var mc="_reactListening"+Math.random().toString(36).slice(2);function Zo(l){if(!l[mc]){l[mc]=!0,r.forEach(function(y){y!=="selectionchange"&&(Hg.has(y)||Bh(y,!1,l),Bh(y,!0,l))});var f=l.nodeType===9?l:l.ownerDocument;f===null||f[mc]||(f[mc]=!0,Bh("selectionchange",!1,f))}}function Wg(l,f,y,N){switch(Mt(f)){case 1:var T=Ob;break;case 4:T=Ng;break;default:T=cc}y=T.bind(null,f,y,l),T=void 0,!fh||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(T=!0),N?T!==void 0?l.addEventListener(f,y,{capture:!0,passive:T}):l.addEventListener(f,y,!0):T!==void 0?l.addEventListener(f,y,{passive:T}):l.addEventListener(f,y,!1)}function u(l,f,y,N,T){var R=N;if((f&1)===0&&(f&2)===0&&N!==null)e:for(;;){if(N===null)return;var F=N.tag;if(F===3||F===4){var X=N.stateNode.containerInfo;if(X===T||X.nodeType===8&&X.parentNode===T)break;if(F===4)for(F=N.return;F!==null;){var se=F.tag;if((se===3||se===4)&&(se=F.stateNode.containerInfo,se===T||se.nodeType===8&&se.parentNode===T))return;F=F.return}for(;X!==null;){if(F=qs(X),F===null)return;if(se=F.tag,se===5||se===6){N=R=F;continue e}X=X.parentNode}}N=N.return}Fu(function(){var be=R,Me=uh(y),Ie=[];e:{var Te=Ko.get(l);if(Te!==void 0){var Ke=wh,Qe=l;switch(l){case"keypress":if(Qu(y)===0)break e;case"keydown":case"keyup":Ke=Ag;break;case"focusin":Qe="focus",Ke=Ju;break;case"focusout":Qe="blur",Ke=Ju;break;case"beforeblur":case"afterblur":Ke=Ju;break;case"click":if(y.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ke=Sh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ke=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ke=kh;break;case zg:case Vi:case Lh:Ke=Rb;break;case Dh:Ke=Fb;break;case"scroll":Ke=Tb;break;case"wheel":Ke=Bb;break;case"copy":case"cut":case"paste":Ke=Ch;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ke=Tg}var it=(f&4)!==0,Rn=!it&&l==="scroll",me=it?Te!==null?Te+"Capture":null:Te;it=[];for(var ce=be,ye;ce!==null;){ye=ce;var Fe=ye.stateNode;if(ye.tag===5&&Fe!==null&&(ye=Fe,me!==null&&(Fe=Jl(ce,me),Fe!=null&&it.push(g(ce,Fe,ye)))),Rn)break;ce=ce.return}0<it.length&&(Te=new Ke(Te,Qe,null,y,Me),Ie.push({event:Te,listeners:it}))}}if((f&7)===0){e:{if(Te=l==="mouseover"||l==="pointerover",Ke=l==="mouseout"||l==="pointerout",Te&&y!==Va&&(Qe=y.relatedTarget||y.fromElement)&&(qs(Qe)||Qe[Zt]))break e;if((Ke||Te)&&(Te=Me.window===Me?Me:(Te=Me.ownerDocument)?Te.defaultView||Te.parentWindow:window,Ke?(Qe=y.relatedTarget||y.toElement,Ke=be,Qe=Qe?qs(Qe):null,Qe!==null&&(Rn=Ka(Qe),Qe!==Rn||Qe.tag!==5&&Qe.tag!==6)&&(Qe=null)):(Ke=null,Qe=be),Ke!==Qe)){if(it=Sh,Fe="onMouseLeave",me="onMouseEnter",ce="mouse",(l==="pointerout"||l==="pointerover")&&(it=Tg,Fe="onPointerLeave",me="onPointerEnter",ce="pointer"),Rn=Ke==null?Te:Ws(Ke),ye=Qe==null?Te:Ws(Qe),Te=new it(Fe,ce+"leave",Ke,y,Me),Te.target=Rn,Te.relatedTarget=ye,Fe=null,qs(Me)===be&&(it=new it(me,ce+"enter",Qe,y,Me),it.target=ye,it.relatedTarget=Rn,Fe=it),Rn=Fe,Ke&&Qe)t:{for(it=Ke,me=Qe,ce=0,ye=it;ye;ye=O(ye))ce++;for(ye=0,Fe=me;Fe;Fe=O(Fe))ye++;for(;0<ce-ye;)it=O(it),ce--;for(;0<ye-ce;)me=O(me),ye--;for(;ce--;){if(it===me||me!==null&&it===me.alternate)break t;it=O(it),me=O(me)}it=null}else it=null;Ke!==null&&D(Ie,Te,Ke,it,!1),Qe!==null&&Rn!==null&&D(Ie,Rn,Qe,it,!0)}}
vendor: 4,747 bytes, lines 37-38
37e:{if(Te=be?Ws(be):window,Ke=Te.nodeName&&Te.nodeName.toLowerCase(),Ke==="select"||Ke==="input"&&Te.type==="file")var st=qb;else if(Lg(Te))if(Hi)st=Oh;else{st=qo;var dt=sd}else(Ke=Te.nodeName)&&Ke.toLowerCase()==="input"&&(Te.type==="checkbox"||Te.type==="radio")&&(st=od);if(st&&(st=st(l,be))){nd(Ie,st,y,Me);break e}dt&&dt(l,Te,be),l==="focusout"&&(dt=Te._wrapperState)&&dt.controlled&&Te.type==="number"&&_t(Te,"number",Te.value)}switch(dt=be?Ws(be):window,l){case"focusin":(Lg(dt)||dt.contentEditable==="true")&&(Ho=dt,Wo=be,hc=null);break;case"focusout":hc=Wo=Ho=null;break;case"mousedown":cd=!0;break;case"contextmenu":case"mouseup":case"dragend":cd=!1,Bg(Ie,y,Me);break;case"selectionchange":if(ld)break;case"keydown":case"keyup":Bg(Ie,y,Me)}var ft;if(Ya)e:{switch(l){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else _a?zo(l,y)&&(xt="onCompositionEnd"):l==="keydown"&&y.keyCode===229&&(xt="onCompositionStart");xt&&(Rg&&y.locale!=="ko"&&(_a||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&_a&&(ft=_h()):(Ga=Me,zr="value"in Ga?Ga.value:Ga.textContent,_a=!0)),dt=S(be,xt),0<dt.length&&(xt=new Eh(xt,l,null,y,Me),Ie.push({event:xt,listeners:dt}),ft?xt.data=ft:(ft=Ah(y),ft!==null&&(xt.data=ft)))),(ft=ba?zb(l,y):Xa(l,y))&&(be=S(be,"onBeforeInput"),0<be.length&&(Me=new Eh("onBeforeInput","beforeinput",null,y,Me),Ie.push({event:Me,listeners:be}),Me.data=ft))}Fh(Ie,f)})}function g(l,f,y){return{instance:l,listener:f,currentTarget:y}}function S(l,f){for(var y=f+"Capture",N=[];l!==null;){var T=l,R=T.stateNode;T.tag===5&&R!==null&&(T=R,R=Jl(l,y),R!=null&&N.unshift(g(l,R,T)),R=Jl(l,f),R!=null&&N.push(g(l,R,T))),l=l.return}return N}function O(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function D(l,f,y,N,T){for(var R=f._reactName,F=[];y!==null&&y!==N;){var X=y,se=X.alternate,be=X.stateNode;if(se!==null&&se===N)break;X.tag===5&&be!==null&&(X=be,T?(se=Jl(y,R),se!=null&&F.unshift(g(y,se,X))):T||(se=Jl(y,R),se!=null&&F.push(g(y,se,X)))),y=y.return}F.length!==0&&l.push({event:f,listeners:F})}var B=/\r\n?/g,te=/\u0000|\uFFFD/g;function pe(l){return(typeof l=="string"?l:""+l).replace(B,`
38`).replace(te,"")}function xe(l,f,y){if(f=pe(f),pe(l)!==f&&y)throw Error(n(425))}function Ae(){}var Ve=null,ut=null;function Nt(l,f){return l==="textarea"||l==="noscript"||typeof f.children=="string"||typeof f.children=="number"||typeof f.dangerouslySetInnerHTML=="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var Vn=typeof setTimeout=="function"?setTimeout:void 0,Dn=typeof clearTimeout=="function"?clearTimeout:void 0,qr=typeof Promise=="function"?Promise:void 0,Pr=typeof queueMicrotask=="function"?queueMicrotask:typeof qr<"u"?function(l){return qr.resolve(null).then(l).catch(Yo)}:Vn;function Yo(l){setTimeout(function(){throw l})}function zh(l,f){var y=f,N=0;do{var T=y.nextSibling;if(l.removeChild(y),T&&T.nodeType===8)if(y=T.data,y==="/$"){if(N===0){l.removeChild(T),xi(f);return}N--}else y!=="$"&&y!=="$?"&&y!=="$!"||N++;y=T}while(y);xi(f)}function ts(l){for(;l!=null;l=l.nextSibling){var f=l.nodeType;if(f===1||f===3)break;if(f===8){if(f=l.data,f==="$"||f==="$!"||f==="$?")break;if(f==="/$")return null}}return l}function Vg(l){l=l.previousSibling;for(var f=0;l;){if(l.nodeType===8){var y=l.data;if(y==="$"||y==="$!"||y==="$?"){if(f===0)return l;f--}else y==="/$"&&f++}l=l.previousSibling}return null}var Us=Math.random().toString(36).slice(2),Ki="__reactFiber$"+Us,Xo="__reactProps$"+Us,Zt="__reactContainer$"+Us,Qo="__reactEvents$"+Us,Wb="__reactListeners$"+Us,Vb="__reactHandles$"+Us;function qs(l){var f=l[Ki];if(f)return f;for(var y=l.parentNode;y;){if(f=y[Zt]||y[Ki]){if(y=f.alternate,f.child!==null||y!==null&&y.child!==null)for(l=Vg(l);l!==null;){if(y=l[Ki])return y;l=Vg(l)}return f}l=y,y=l.parentNode}return null}function Hs(l){return l=l[Ki]||l[Zt],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function Ws(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(n(33))}function dd(l){return l[Xo]||null}var Kb=[],fd=-1;function Jo(l){return{current:l}}function bn(l){0>fd||(l.current=Kb[fd],Kb[fd]=null,fd--)}function pn(l,f){fd++,Kb[fd]=l.current,l.current=f}var el={},kr=Jo(el),ti=Jo(!1),gc=el;function hd(l,f){var y=l.type.contextTypes;if(!y)return el;var N=l.stateNode;if(N&&N.__reactInternalMemoizedUnmaskedChildContext===f)return N.__reactInternalMemoizedMaskedChildContext;var T={},R;for(R in y)T[R]=f[R];return N&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=f,l.__reactInternalMemoizedMaskedChildContext=T),T}function ni(l){return l=l.childContextTypes,l!=null}function Kg(){bn(ti),bn(kr)}
vendor: 6,874 bytes, line 38
38function Sk(l,f,y){if(kr.current!==el)throw Error(n(168));pn(kr,f),pn(ti,y)}function Nk(l,f,y){var N=l.stateNode;if(f=f.childContextTypes,typeof N.getChildContext!="function")return y;N=N.getChildContext();for(var T in N)if(!(T in f))throw Error(n(108,fe(l)||"Unknown",T));return ae({},y,N)}function Gg(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||el,gc=kr.current,pn(kr,l),pn(ti,ti.current),!0}function Ck(l,f,y){var N=l.stateNode;if(!N)throw Error(n(169));y?(l=Nk(l,f,gc),N.__reactInternalMemoizedMergedChildContext=l,bn(ti),bn(kr),pn(kr,l)):bn(ti),pn(ti,y)}var Vs=null,Zg=!1,Gb=!1;function Ek(l){Vs===null?Vs=[l]:Vs.push(l)}function Pq(l){Zg=!0,Ek(l)}function tl(){if(!Gb&&Vs!==null){Gb=!0;var l=0,f=Rt;try{var y=Vs;for(Rt=1;l<y.length;l++){var N=y[l];do N=N(!0);while(N!==null)}Vs=null,Zg=!1}catch(T){throw Vs!==null&&(Vs=Vs.slice(l+1)),wg(gh,tl),T}finally{Rt=f,Gb=!1}}return null}var pd=[],md=0,Yg=null,Xg=0,Gi=[],Zi=0,yc=null,Ks=1,Gs="";function vc(l,f){pd[md++]=Xg,pd[md++]=Yg,Yg=l,Xg=f}function Pk(l,f,y){Gi[Zi++]=Ks,Gi[Zi++]=Gs,Gi[Zi++]=yc,yc=l;var N=Ks;l=Gs;var T=32-wt(N)-1;N&=~(1<<T),y+=1;var R=32-wt(f)+T;if(30<R){var F=T-T%5;R=(N&(1<<F)-1).toString(32),N>>=F,T-=F,Ks=1<<32-wt(f)+T|y<<T|N,Gs=R+l}else Ks=1<<R|y<<T|N,Gs=l}function Zb(l){l.return!==null&&(vc(l,1),Pk(l,1,0))}function Yb(l){for(;l===Yg;)Yg=pd[--md],pd[md]=null,Xg=pd[--md],pd[md]=null;for(;l===yc;)yc=Gi[--Zi],Gi[Zi]=null,Gs=Gi[--Zi],Gi[Zi]=null,Ks=Gi[--Zi],Gi[Zi]=null}var Si=null,Ni=null,wn=!1,ja=null;function kk(l,f){var y=Ji(5,null,null,0);y.elementType="DELETED",y.stateNode=f,y.return=l,f=l.deletions,f===null?(l.deletions=[y],l.flags|=16):f.push(y)}function Ak(l,f){switch(l.tag){case 5:var y=l.type;return f=f.nodeType!==1||y.toLowerCase()!==f.nodeName.toLowerCase()?null:f,f!==null?(l.stateNode=f,Si=l,Ni=ts(f.firstChild),!0):!1;case 6:return f=l.pendingProps===""||f.nodeType!==3?null:f,f!==null?(l.stateNode=f,Si=l,Ni=null,!0):!1;case 13:return f=f.nodeType!==8?null:f,f!==null?(y=yc!==null?{id:Ks,overflow:Gs}:null,l.memoizedState={dehydrated:f,treeContext:y,retryLane:1073741824},y=Ji(18,null,null,0),y.stateNode=f,y.return=l,l.child=y,Si=l,Ni=null,!0):!1;default:return!1}}function Xb(l){return(l.mode&1)!==0&&(l.flags&128)===0}function Qb(l){if(wn){var f=Ni;if(f){var y=f;if(!Ak(l,f)){if(Xb(l))throw Error(n(418));f=ts(y.nextSibling);var N=Si;f&&Ak(l,f)?kk(N,y):(l.flags=l.flags&-4097|2,wn=!1,Si=l)}}else{if(Xb(l))throw Error(n(418));l.flags=l.flags&-4097|2,wn=!1,Si=l}}}function Ok(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;Si=l}function Qg(l){if(l!==Si)return!1;if(!wn)return Ok(l),wn=!0,!1;var f;if((f=l.tag!==3)&&!(f=l.tag!==5)&&(f=l.type,f=f!=="head"&&f!=="body"&&!Nt(l.type,l.memoizedProps)),f&&(f=Ni)){if(Xb(l))throw Tk(),Error(n(418));for(;f;)kk(l,f),f=ts(f.nextSibling)}if(Ok(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(317));e:{for(l=l.nextSibling,f=0;l;){if(l.nodeType===8){var y=l.data;if(y==="/$"){if(f===0){Ni=ts(l.nextSibling);break e}f--}else y!=="$"&&y!=="$!"&&y!=="$?"||f++}l=l.nextSibling}Ni=null}}else Ni=Si?ts(l.stateNode.nextSibling):null;return!0}function Tk(){for(var l=Ni;l;)l=ts(l.nextSibling)}function gd(){Ni=Si=null,wn=!1}function Jb(l){ja===null?ja=[l]:ja.push(l)}var kq=A.ReactCurrentBatchConfig;function Uh(l,f,y){if(l=y.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(n(309));var N=y.stateNode}if(!N)throw Error(n(147,l));var T=N,R=""+l;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===R?f.ref:(f=function(F){var X=T.refs;F===null?delete X[R]:X[R]=F},f._stringRef=R,f)}if(typeof l!="string")throw Error(n(284));if(!y._owner)throw Error(n(290,l))}return l}function Jg(l,f){throw l=Object.prototype.toString.call(f),Error(n(31,l==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":l))}function Mk(l){var f=l._init;return f(l._payload)}function Rk(l){function f(me,ce){if(l){var ye=me.deletions;ye===null?(me.deletions=[ce],me.flags|=16):ye.push(ce)}}function y(me,ce){if(!l)return null;for(;ce!==null;)f(me,ce),ce=ce.sibling;return null}function N(me,ce){for(me=new Map;ce!==null;)ce.key!==null?me.set(ce.key,ce):me.set(ce.index,ce),ce=ce.sibling;return me}function T(me,ce){return me=cl(me,ce),me.index=0,me.sibling=null,me}function R(me,ce,ye){return me.index=ye,l?(ye=me.alternate,ye!==null?(ye=ye.index,ye<ce?(me.flags|=2,ce):ye):(me.flags|=2,ce)):(me.flags|=1048576,ce)}function F(me){return l&&me.alternate===null&&(me.flags|=2),me}function X(me,ce,ye,Fe){return ce===null||ce.tag!==6?(ce=H_(ye,me.mode,Fe),ce.return=me,ce):(ce=T(ce,ye),ce.return=me,ce)}function se(me,ce,ye,Fe){var st=ye.type;return st===I?Me(me,ce,ye.props.children,Fe,ye.key):ce!==null&&(ce.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===G&&Mk(st)===ce.type)?(Fe=T(ce,ye.props),Fe.ref=Uh(me,ce,ye),Fe.return=me,Fe):(Fe=jy(ye.type,ye.key,ye.props,null,me.mode,Fe),Fe.ref=Uh(me,ce,ye),Fe.return=me,Fe)}function be(me,ce,ye,Fe){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==ye.containerInfo||ce.stateNode.implementation!==ye.implementation?(ce=W_(ye,me.mode,Fe),ce.return=me,ce):(ce=T(ce,ye.children||[]),ce.return=me,ce)}function Me(me,ce,ye,Fe,st){return ce===null||ce.tag!==7?(ce=Cc(ye,me.mode,Fe,st),ce.return=me,ce):(ce=T(ce,ye),ce.return=me,ce)}function Ie(me,ce,ye){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ce=H_(""+ce,me.mode,ye),ce.return=me,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case k:return ye=jy(ce.type,ce.key,ce.props,null,me.mode,ye),ye.ref=Uh(me,null,ce),ye.return=me,ye;case M:return ce=W_(ce,me.mode,ye),ce.return=me,ce;case G:var Fe=ce._init;return Ie(me,Fe(ce._payload),ye)}if(Gt(ce)||ie(ce))return ce=Cc(ce,me.mode,ye,null),ce.return=me,ce;Jg(me,ce)}return null}function Te(me,ce,ye,Fe){var st=ce!==null?ce.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return st!==null?null:X(me,ce,""+ye,Fe);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case k:return ye.key===st?se(me,ce,ye,Fe):null;case M:return ye.key===st?be(me,ce,ye,Fe):null;case G:return st=ye._init,Te(me,ce,st(ye._payload),Fe)}if(Gt(ye)||ie(ye))return st!==null?null:Me(me,ce,ye,Fe,null);Jg(me,ye)}return null}function Ke(me,ce,ye,Fe,st){if(typeof Fe=="string"&&Fe!==""||typeof Fe=="number")return me=me.get(ye)||null,X(ce,me,""+Fe,st);if(typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case k:return me=me.get(Fe.key===null?ye:Fe.key)||null,se(ce,me,Fe,st);case M:return me=me.get(Fe.key===null?ye:Fe.key)||null,be(ce,me,Fe,st);case G:var dt=Fe._init;return Ke(me,ce,ye,dt(Fe._payload),st)}if(Gt(Fe)||ie(Fe))return me=me.get(ye)||null,Me(ce,me,Fe,st,null);Jg(ce,Fe)}return null}function Qe(me,ce,ye,Fe){for(var st=null,dt=null,ft=ce,xt=ce=0,sr=null;ft!==null&&xt<ye.length;xt++){ft.index>
vendor: 8,495 bytes, line 38
38xt?(sr=ft,ft=null):sr=ft.sibling;var Ht=Te(me,ft,ye[xt],Fe);if(Ht===null){ft===null&&(ft=sr);break}l&&ft&&Ht.alternate===null&&f(me,ft),ce=R(Ht,ce,xt),dt===null?st=Ht:dt.sibling=Ht,dt=Ht,ft=sr}if(xt===ye.length)return y(me,ft),wn&&vc(me,xt),st;if(ft===null){for(;xt<ye.length;xt++)ft=Ie(me,ye[xt],Fe),ft!==null&&(ce=R(ft,ce,xt),dt===null?st=ft:dt.sibling=ft,dt=ft);return wn&&vc(me,xt),st}for(ft=N(me,ft);xt<ye.length;xt++)sr=Ke(ft,me,xt,ye[xt],Fe),sr!==null&&(l&&sr.alternate!==null&&ft.delete(sr.key===null?xt:sr.key),ce=R(sr,ce,xt),dt===null?st=sr:dt.sibling=sr,dt=sr);return l&&ft.forEach(function(ul){return f(me,ul)}),wn&&vc(me,xt),st}function it(me,ce,ye,Fe){var st=ie(ye);if(typeof st!="function")throw Error(n(150));if(ye=st.call(ye),ye==null)throw Error(n(151));for(var dt=st=null,ft=ce,xt=ce=0,sr=null,Ht=ye.next();ft!==null&&!Ht.done;xt++,Ht=ye.next()){ft.index>xt?(sr=ft,ft=null):sr=ft.sibling;var ul=Te(me,ft,Ht.value,Fe);if(ul===null){ft===null&&(ft=sr);break}l&&ft&&ul.alternate===null&&f(me,ft),ce=R(ul,ce,xt),dt===null?st=ul:dt.sibling=ul,dt=ul,ft=sr}if(Ht.done)return y(me,ft),wn&&vc(me,xt),st;if(ft===null){for(;!Ht.done;xt++,Ht=ye.next())Ht=Ie(me,Ht.value,Fe),Ht!==null&&(ce=R(Ht,ce,xt),dt===null?st=Ht:dt.sibling=Ht,dt=Ht);return wn&&vc(me,xt),st}for(ft=N(me,ft);!Ht.done;xt++,Ht=ye.next())Ht=Ke(ft,me,xt,Ht.value,Fe),Ht!==null&&(l&&Ht.alternate!==null&&ft.delete(Ht.key===null?xt:Ht.key),ce=R(Ht,ce,xt),dt===null?st=Ht:dt.sibling=Ht,dt=Ht);return l&&ft.forEach(function(lH){return f(me,lH)}),wn&&vc(me,xt),st}function Rn(me,ce,ye,Fe){if(typeof ye=="object"&&ye!==null&&ye.type===I&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case k:e:{for(var st=ye.key,dt=ce;dt!==null;){if(dt.key===st){if(st=ye.type,st===I){if(dt.tag===7){y(me,dt.sibling),ce=T(dt,ye.props.children),ce.return=me,me=ce;break e}}else if(dt.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===G&&Mk(st)===dt.type){y(me,dt.sibling),ce=T(dt,ye.props),ce.ref=Uh(me,dt,ye),ce.return=me,me=ce;break e}y(me,dt);break}else f(me,dt);dt=dt.sibling}ye.type===I?(ce=Cc(ye.props.children,me.mode,Fe,ye.key),ce.return=me,me=ce):(Fe=jy(ye.type,ye.key,ye.props,null,me.mode,Fe),Fe.ref=Uh(me,ce,ye),Fe.return=me,me=Fe)}return F(me);case M:e:{for(dt=ye.key;ce!==null;){if(ce.key===dt)if(ce.tag===4&&ce.stateNode.containerInfo===ye.containerInfo&&ce.stateNode.implementation===ye.implementation){y(me,ce.sibling),ce=T(ce,ye.children||[]),ce.return=me,me=ce;break e}else{y(me,ce);break}else f(me,ce);ce=ce.sibling}ce=W_(ye,me.mode,Fe),ce.return=me,me=ce}return F(me);case G:return dt=ye._init,Rn(me,ce,dt(ye._payload),Fe)}if(Gt(ye))return Qe(me,ce,ye,Fe);if(ie(ye))return it(me,ce,ye,Fe);Jg(me,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ce!==null&&ce.tag===6?(y(me,ce.sibling),ce=T(ce,ye),ce.return=me,me=ce):(y(me,ce),ce=H_(ye,me.mode,Fe),ce.return=me,me=ce),F(me)):y(me,ce)}return Rn}var yd=Rk(!0),Ik=Rk(!1),ey=Jo(null),ty=null,vd=null,e_=null;function t_(){e_=vd=ty=null}function n_(l){var f=ey.current;bn(ey),l._currentValue=f}function r_(l,f,y){for(;l!==null;){var N=l.alternate;if((l.childLanes&f)!==f?(l.childLanes|=f,N!==null&&(N.childLanes|=f)):N!==null&&(N.childLanes&f)!==f&&(N.childLanes|=f),l===y)break;l=l.return}}function xd(l,f){ty=l,e_=vd=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&f)!==0&&(ri=!0),l.firstContext=null)}function Yi(l){var f=l._currentValue;if(e_!==l)if(l={context:l,memoizedValue:f,next:null},vd===null){if(ty===null)throw Error(n(308));vd=l,ty.dependencies={lanes:0,firstContext:l}}else vd=vd.next=l;return f}var xc=null;function i_(l){xc===null?xc=[l]:xc.push(l)}function Lk(l,f,y,N){var T=f.interleaved;return T===null?(y.next=y,i_(f)):(y.next=T.next,T.next=y),f.interleaved=y,Zs(l,N)}function Zs(l,f){l.lanes|=f;var y=l.alternate;for(y!==null&&(y.lanes|=f),y=l,l=l.return;l!==null;)l.childLanes|=f,y=l.alternate,y!==null&&(y.childLanes|=f),y=l,l=l.return;return y.tag===3?y.stateNode:null}var nl=!1;function a_(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dk(l,f){l=l.updateQueue,f.updateQueue===l&&(f.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function Ys(l,f){return{eventTime:l,lane:f,tag:0,payload:null,callback:null,next:null}}function rl(l,f,y){var N=l.updateQueue;if(N===null)return null;if(N=N.shared,(zt&2)!==0){var T=N.pending;return T===null?f.next=f:(f.next=T.next,T.next=f),N.pending=f,Zs(l,y)}return T=N.interleaved,T===null?(f.next=f,i_(N)):(f.next=T.next,T.next=f),N.interleaved=f,Zs(l,y)}function ny(l,f,y){if(f=f.updateQueue,f!==null&&(f=f.shared,(y&4194240)!==0)){var N=f.lanes;N&=l.pendingLanes,y|=N,f.lanes=y,va(l,y)}}function $k(l,f){var y=l.updateQueue,N=l.alternate;if(N!==null&&(N=N.updateQueue,y===N)){var T=null,R=null;if(y=y.firstBaseUpdate,y!==null){do{var F={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};R===null?T=R=F:R=R.next=F,y=y.next}while(y!==null);R===null?T=R=f:R=R.next=f}else T=R=f;y={baseState:N.baseState,firstBaseUpdate:T,lastBaseUpdate:R,shared:N.shared,effects:N.effects},l.updateQueue=y;return}l=y.lastBaseUpdate,l===null?y.firstBaseUpdate=f:l.next=f,y.lastBaseUpdate=f}function ry(l,f,y,N){var T=l.updateQueue;nl=!1;var R=T.firstBaseUpdate,F=T.lastBaseUpdate,X=T.shared.pending;if(X!==null){T.shared.pending=null;var se=X,be=se.next;se.next=null,F===null?R=be:F.next=be,F=se;var Me=l.alternate;Me!==null&&(Me=Me.updateQueue,X=Me.lastBaseUpdate,X!==F&&(X===null?Me.firstBaseUpdate=be:X.next=be,Me.lastBaseUpdate=se))}if(R!==null){var Ie=T.baseState;F=0,Me=be=se=null,X=R;do{var Te=X.lane,Ke=X.eventTime;if((N&Te)===Te){Me!==null&&(Me=Me.next={eventTime:Ke,lane:0,tag:X.tag,payload:X.payload,callback:X.callback,next:null});e:{var Qe=l,it=X;switch(Te=f,Ke=y,it.tag){case 1:if(Qe=it.payload,typeof Qe=="function"){Ie=Qe.call(Ke,Ie,Te);break e}Ie=Qe;break e;case 3:Qe.flags=Qe.flags&-65537|128;case 0:if(Qe=it.payload,Te=typeof Qe=="function"?Qe.call(Ke,Ie,Te):Qe,Te==null)break e;Ie=ae({},Ie,Te);break e;case 2:nl=!0}}X.callback!==null&&X.lane!==0&&(l.flags|=64,Te=T.effects,Te===null?T.effects=[X]:Te.push(X))}else Ke={eventTime:Ke,lane:Te,tag:X.tag,payload:X.payload,callback:X.callback,next:null},Me===null?(be=Me=Ke,se=Ie):Me=Me.next=Ke,F|=Te;if(X=X.next,X===null){if(X=T.shared.pending,X===null)break;Te=X,X=Te.next,Te.next=null,T.lastBaseUpdate=Te,T.shared.pending=null}}while(!0);if(Me===null&&(se=Ie),T.baseState=se,T.firstBaseUpdate=be,T.lastBaseUpdate=Me,f=T.shared.interleaved,f!==null){T=f;do F|=T.lane,T=T.next;while(T!==f)}else R===null&&(T.shared.lanes=0);wc|=F,l.lanes=F,l.memoizedState=Ie}}function Fk(l,f,y){if(l=f.effects,f.effects=null,l!==null)for(f=0;f<l.length;f++){var N=l[f],T=N.callback;if(T!==null){if(N.callback=null,N=y,typeof T!="function")throw Error(n(191,T));T.call(N)}}}var qh={},ns=Jo(qh),Hh=Jo(qh),Wh=Jo(qh);function bc(l){if(l===qh)throw Error(n(174));return l}function s_(l,f){switch(pn(Wh,f),pn(Hh,l),pn(ns,qh),l=f.nodeType,l){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:Ge(null,"");break;default:l=l===8?f.parentNode:f,f=l.namespaceURI||null,l=l.tagName,f=Ge(f,l)}bn(ns),pn(ns,f)}function bd(){bn(ns),bn(Hh),bn(Wh)}function Bk(l){bc(Wh.current);var f=bc(ns.current),y=Ge(f,l.type);f!==y&&(pn(Hh,l),pn(ns,y))}function o_(l){Hh.current===l&&(bn(ns),bn(Hh))}var Cn=Jo(0);function iy(l){for(var f=l;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||y.data==="$?"||y.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var l_=[];function c_(){for(var l=0;l<l_.length;l++)l_[l]._workInProgressVersionPrimary=null;l_.length=0}var ay=A.ReactCurrentDispatcher,u_=A.ReactCurrentBatchConfig,_c=0,En=null,Kn=null,ir=null,sy=!1,Vh=!1,Kh=0,Aq=0;function Ar(){throw Error(n(321))}function d_(l,f){if(f===null)return!1;for(var y=0;y<f.length&&y<l.length;y++)if(!wi(l[y],f[y]))return!1;return!0}function f_(l,f,y,N,T,R){if(_c=R,En=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,ay.current=l===null||l.memoizedState===null?Rq:Iq,l=y(N,T),Vh){R=0;
vendor: 6,648 bytes, line 38
38do{if(Vh=!1,Kh=0,25<=R)throw Error(n(301));R+=1,ir=Kn=null,f.updateQueue=null,ay.current=Lq,l=y(N,T)}while(Vh)}if(ay.current=cy,f=Kn!==null&&Kn.next!==null,_c=0,ir=Kn=En=null,sy=!1,f)throw Error(n(300));return l}function h_(){var l=Kh!==0;return Kh=0,l}function rs(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ir===null?En.memoizedState=ir=l:ir=ir.next=l,ir}function Xi(){if(Kn===null){var l=En.alternate;l=l!==null?l.memoizedState:null}else l=Kn.next;var f=ir===null?En.memoizedState:ir.next;if(f!==null)ir=f,Kn=l;else{if(l===null)throw Error(n(310));Kn=l,l={memoizedState:Kn.memoizedState,baseState:Kn.baseState,baseQueue:Kn.baseQueue,queue:Kn.queue,next:null},ir===null?En.memoizedState=ir=l:ir=ir.next=l}return ir}function Gh(l,f){return typeof f=="function"?f(l):f}function p_(l){var f=Xi(),y=f.queue;if(y===null)throw Error(n(311));y.lastRenderedReducer=l;var N=Kn,T=N.baseQueue,R=y.pending;if(R!==null){if(T!==null){var F=T.next;T.next=R.next,R.next=F}N.baseQueue=T=R,y.pending=null}if(T!==null){R=T.next,N=N.baseState;var X=F=null,se=null,be=R;do{var Me=be.lane;if((_c&Me)===Me)se!==null&&(se=se.next={lane:0,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),N=be.hasEagerState?be.eagerState:l(N,be.action);else{var Ie={lane:Me,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null};se===null?(X=se=Ie,F=N):se=se.next=Ie,En.lanes|=Me,wc|=Me}be=be.next}while(be!==null&&be!==R);se===null?F=N:se.next=X,wi(N,f.memoizedState)||(ri=!0),f.memoizedState=N,f.baseState=F,f.baseQueue=se,y.lastRenderedState=N}if(l=y.interleaved,l!==null){T=l;do R=T.lane,En.lanes|=R,wc|=R,T=T.next;while(T!==l)}else T===null&&(y.lanes=0);return[f.memoizedState,y.dispatch]}function m_(l){var f=Xi(),y=f.queue;if(y===null)throw Error(n(311));y.lastRenderedReducer=l;var N=y.dispatch,T=y.pending,R=f.memoizedState;if(T!==null){y.pending=null;var F=T=T.next;do R=l(R,F.action),F=F.next;while(F!==T);wi(R,f.memoizedState)||(ri=!0),f.memoizedState=R,f.baseQueue===null&&(f.baseState=R),y.lastRenderedState=R}return[R,N]}function zk(){}function Uk(l,f){var y=En,N=Xi(),T=f(),R=!wi(N.memoizedState,T);if(R&&(N.memoizedState=T,ri=!0),N=N.queue,g_(Wk.bind(null,y,N,l),[l]),N.getSnapshot!==f||R||ir!==null&&ir.memoizedState.tag&1){if(y.flags|=2048,Zh(9,Hk.bind(null,y,N,T,f),void 0,null),ar===null)throw Error(n(349));(_c&30)!==0||qk(y,f,T)}return T}function qk(l,f,y){l.flags|=16384,l={getSnapshot:f,value:y},f=En.updateQueue,f===null?(f={lastEffect:null,stores:null},En.updateQueue=f,f.stores=[l]):(y=f.stores,y===null?f.stores=[l]:y.push(l))}function Hk(l,f,y,N){f.value=y,f.getSnapshot=N,Vk(f)&&Kk(l)}function Wk(l,f,y){return y(function(){Vk(f)&&Kk(l)})}function Vk(l){var f=l.getSnapshot;l=l.value;try{var y=f();return!wi(l,y)}catch{return!0}}function Kk(l){var f=Zs(l,1);f!==null&&Ea(f,l,1,-1)}function Gk(l){var f=rs();return typeof l=="function"&&(l=l()),f.memoizedState=f.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gh,lastRenderedState:l},f.queue=l,l=l.dispatch=Mq.bind(null,En,l),[f.memoizedState,l]}function Zh(l,f,y,N){return l={tag:l,create:f,destroy:y,deps:N,next:null},f=En.updateQueue,f===null?(f={lastEffect:null,stores:null},En.updateQueue=f,f.lastEffect=l.next=l):(y=f.lastEffect,y===null?f.lastEffect=l.next=l:(N=y.next,y.next=l,l.next=N,f.lastEffect=l)),l}function Zk(){return Xi().memoizedState}function oy(l,f,y,N){var T=rs();En.flags|=l,T.memoizedState=Zh(1|f,y,void 0,N===void 0?null:N)}function ly(l,f,y,N){var T=Xi();N=N===void 0?null:N;var R=void 0;if(Kn!==null){var F=Kn.memoizedState;if(R=F.destroy,N!==null&&d_(N,F.deps)){T.memoizedState=Zh(f,y,R,N);return}}En.flags|=l,T.memoizedState=Zh(1|f,y,R,N)}function Yk(l,f){return oy(8390656,8,l,f)}function g_(l,f){return ly(2048,8,l,f)}function Xk(l,f){return ly(4,2,l,f)}function Qk(l,f){return ly(4,4,l,f)}function Jk(l,f){if(typeof f=="function")return l=l(),f(l),function(){f(null)};if(f!=null)return l=l(),f.current=l,function(){f.current=null}}function eA(l,f,y){return y=y!=null?y.concat([l]):null,ly(4,4,Jk.bind(null,f,l),y)}function y_(){}function tA(l,f){var y=Xi();f=f===void 0?null:f;var N=y.memoizedState;return N!==null&&f!==null&&d_(f,N[1])?N[0]:(y.memoizedState=[l,f],l)}function nA(l,f){var y=Xi();f=f===void 0?null:f;var N=y.memoizedState;return N!==null&&f!==null&&d_(f,N[1])?N[0]:(l=l(),y.memoizedState=[l,f],l)}function rA(l,f,y){return(_c&21)===0?(l.baseState&&(l.baseState=!1,ri=!0),l.memoizedState=y):(wi(y,f)||(y=Sg(),En.lanes|=y,wc|=y,l.baseState=!0),f)}function Oq(l,f){var y=Rt;Rt=y!==0&&4>y?y:4,l(!0);var N=u_.transition;u_.transition={};try{l(!1),f()}finally{Rt=y,u_.transition=N}}function iA(){return Xi().memoizedState}function Tq(l,f,y){var N=ol(l);if(y={lane:N,action:y,hasEagerState:!1,eagerState:null,next:null},aA(l))sA(f,y);else if(y=Lk(l,f,y,N),y!==null){var T=Wr();Ea(y,l,N,T),oA(y,f,N)}}function Mq(l,f,y){var N=ol(l),T={lane:N,action:y,hasEagerState:!1,eagerState:null,next:null};if(aA(l))sA(f,T);else{var R=l.alternate;if(l.lanes===0&&(R===null||R.lanes===0)&&(R=f.lastRenderedReducer,R!==null))try{var F=f.lastRenderedState,X=R(F,y);if(T.hasEagerState=!0,T.eagerState=X,wi(X,F)){var se=f.interleaved;se===null?(T.next=T,i_(f)):(T.next=se.next,se.next=T),f.interleaved=T;return}}catch{}finally{}y=Lk(l,f,T,N),y!==null&&(T=Wr(),Ea(y,l,N,T),oA(y,f,N))}}function aA(l){var f=l.alternate;return l===En||f!==null&&f===En}function sA(l,f){Vh=sy=!0;var y=l.pending;y===null?f.next=f:(f.next=y.next,y.next=f),l.pending=f}function oA(l,f,y){if((y&4194240)!==0){var N=f.lanes;N&=l.pendingLanes,y|=N,f.lanes=y,va(l,y)}}var cy={readContext:Yi,useCallback:Ar,useContext:Ar,useEffect:Ar,useImperativeHandle:Ar,useInsertionEffect:Ar,useLayoutEffect:Ar,useMemo:Ar,useReducer:Ar,useRef:Ar,useState:Ar,useDebugValue:Ar,useDeferredValue:Ar,useTransition:Ar,useMutableSource:Ar,useSyncExternalStore:Ar,useId:Ar,unstable_isNewReconciler:!1},Rq={readContext:Yi,useCallback:function(l,f){return rs().memoizedState=[l,f===void 0?null:f],l},useContext:Yi,useEffect:Yk,useImperativeHandle:function(l,f,y){return y=y!=null?y.concat([l]):null,oy(4194308,4,Jk.bind(null,f,l),y)},useLayoutEffect:function(l,f){return oy(4194308,4,l,f)},useInsertionEffect:function(l,f){return oy(4,2,l,f)},useMemo:function(l,f){var y=rs();return f=f===void 0?null:f,l=l(),y.memoizedState=[l,f],l},useReducer:function(l,f,y){var N=rs();return f=y!==void 0?y(f):f,N.memoizedState=N.baseState=f,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:f},N.queue=l,l=l.dispatch=Tq.bind(null,En,l),[N.memoizedState,l]}
vendor: 4,714 bytes, lines 38-40
38,useRef:function(l){var f=rs();return l={current:l},f.memoizedState=l},useState:Gk,useDebugValue:y_,useDeferredValue:function(l){return rs().memoizedState=l},useTransition:function(){var l=Gk(!1),f=l[0];return l=Oq.bind(null,l[1]),rs().memoizedState=l,[f,l]},useMutableSource:function(){},useSyncExternalStore:function(l,f,y){var N=En,T=rs();if(wn){if(y===void 0)throw Error(n(407));y=y()}else{if(y=f(),ar===null)throw Error(n(349));(_c&30)!==0||qk(N,f,y)}T.memoizedState=y;var R={value:y,getSnapshot:f};return T.queue=R,Yk(Wk.bind(null,N,R,l),[l]),N.flags|=2048,Zh(9,Hk.bind(null,N,R,y,f),void 0,null),y},useId:function(){var l=rs(),f=ar.identifierPrefix;if(wn){var y=Gs,N=Ks;y=(N&~(1<<32-wt(N)-1)).toString(32)+y,f=":"+f+"R"+y,y=Kh++,0<y&&(f+="H"+y.toString(32)),f+=":"}else y=Aq++,f=":"+f+"r"+y.toString(32)+":";return l.memoizedState=f},unstable_isNewReconciler:!1},Iq={readContext:Yi,useCallback:tA,useContext:Yi,useEffect:g_,useImperativeHandle:eA,useInsertionEffect:Xk,useLayoutEffect:Qk,useMemo:nA,useReducer:p_,useRef:Zk,useState:function(){return p_(Gh)},useDebugValue:y_,useDeferredValue:function(l){var f=Xi();return rA(f,Kn.memoizedState,l)},useTransition:function(){var l=p_(Gh)[0],f=Xi().memoizedState;return[l,f]},useMutableSource:zk,useSyncExternalStore:Uk,useId:iA,unstable_isNewReconciler:!1},Lq={readContext:Yi,useCallback:tA,useContext:Yi,useEffect:g_,useImperativeHandle:eA,useInsertionEffect:Xk,useLayoutEffect:Qk,useMemo:nA,useReducer:m_,useRef:Zk,useState:function(){return m_(Gh)},useDebugValue:y_,useDeferredValue:function(l){var f=Xi();return Kn===null?f.memoizedState=l:rA(f,Kn.memoizedState,l)},useTransition:function(){var l=m_(Gh)[0],f=Xi().memoizedState;return[l,f]},useMutableSource:zk,useSyncExternalStore:Uk,useId:iA,unstable_isNewReconciler:!1};function Sa(l,f){if(l&&l.defaultProps){f=ae({},f),l=l.defaultProps;for(var y in l)f[y]===void 0&&(f[y]=l[y]);return f}return f}function v_(l,f,y,N){f=l.memoizedState,y=y(N,f),y=y==null?f:ae({},f,y),l.memoizedState=y,l.lanes===0&&(l.updateQueue.baseState=y)}var uy={isMounted:function(l){return(l=l._reactInternals)?Ka(l)===l:!1},enqueueSetState:function(l,f,y){l=l._reactInternals;var N=Wr(),T=ol(l),R=Ys(N,T);R.payload=f,y!=null&&(R.callback=y),f=rl(l,R,T),f!==null&&(Ea(f,l,T,N),ny(f,l,T))},enqueueReplaceState:function(l,f,y){l=l._reactInternals;var N=Wr(),T=ol(l),R=Ys(N,T);R.tag=1,R.payload=f,y!=null&&(R.callback=y),f=rl(l,R,T),f!==null&&(Ea(f,l,T,N),ny(f,l,T))},enqueueForceUpdate:function(l,f){l=l._reactInternals;var y=Wr(),N=ol(l),T=Ys(y,N);T.tag=2,f!=null&&(T.callback=f),f=rl(l,T,N),f!==null&&(Ea(f,l,N,y),ny(f,l,N))}};function lA(l,f,y,N,T,R,F){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(N,R,F):f.prototype&&f.prototype.isPureReactComponent?!Qa(y,N)||!Qa(T,R):!0}function cA(l,f,y){var N=!1,T=el,R=f.contextType;return typeof R=="object"&&R!==null?R=Yi(R):(T=ni(f)?gc:kr.current,N=f.contextTypes,R=(N=N!=null)?hd(l,T):el),f=new f(y,R),l.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=uy,l.stateNode=f,f._reactInternals=l,N&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=T,l.__reactInternalMemoizedMaskedChildContext=R),f}function uA(l,f,y,N){l=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(y,N),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(y,N),f.state!==l&&uy.enqueueReplaceState(f,f.state,null)}function x_(l,f,y,N){var T=l.stateNode;T.props=y,T.state=l.memoizedState,T.refs={},a_(l);var R=f.contextType;typeof R=="object"&&R!==null?T.context=Yi(R):(R=ni(f)?gc:kr.current,T.context=hd(l,R)),T.state=l.memoizedState,R=f.getDerivedStateFromProps,typeof R=="function"&&(v_(l,f,R,y),T.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(f=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),f!==T.state&&uy.enqueueReplaceState(T,T.state,null),ry(l,y,T,N),T.state=l.memoizedState),typeof T.componentDidMount=="function"&&(l.flags|=4194308)}function _d(l,f){try{var y="",N=f;do y+=Y(N),N=N.return;while(N);var T=y}catch(R){T=`
39Error generating stack: `+R.message+`
40`+R.stack}return{value:l,source:f,stack:T,digest:null}}function b_(l,f,y){return{value:l,source:null,stack:y??null,digest:f??null}}function __(l,f){try{console.error(f.value)}catch(y){setTimeout(function(){throw y})}}var Dq=typeof WeakMap=="function"?WeakMap:Map;function dA(l,f,y){y=Ys(-1,y),y.tag=3,y.payload={element:null};var N=f.value;
vendor: 16,565 bytes, line 40
40return y.callback=function(){yy||(yy=!0,L_=N),__(l,f)},y}function fA(l,f,y){y=Ys(-1,y),y.tag=3;var N=l.type.getDerivedStateFromError;if(typeof N=="function"){var T=f.value;y.payload=function(){return N(T)},y.callback=function(){__(l,f)}}var R=l.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(y.callback=function(){__(l,f),typeof N!="function"&&(al===null?al=new Set([this]):al.add(this));var F=f.stack;this.componentDidCatch(f.value,{componentStack:F!==null?F:""})}),y}function hA(l,f,y){var N=l.pingCache;if(N===null){N=l.pingCache=new Dq;var T=new Set;N.set(f,T)}else T=N.get(f),T===void 0&&(T=new Set,N.set(f,T));T.has(y)||(T.add(y),l=Xq.bind(null,l,f,y),f.then(l,l))}function pA(l){do{var f;if((f=l.tag===13)&&(f=l.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return l;l=l.return}while(l!==null);return null}function mA(l,f,y,N,T){return(l.mode&1)===0?(l===f?l.flags|=65536:(l.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(f=Ys(-1,1),f.tag=2,rl(y,f,1))),y.lanes|=1),l):(l.flags|=65536,l.lanes=T,l)}var $q=A.ReactCurrentOwner,ri=!1;function Hr(l,f,y,N){f.child=l===null?Ik(f,null,y,N):yd(f,l.child,y,N)}function gA(l,f,y,N,T){y=y.render;var R=f.ref;return xd(f,T),N=f_(l,f,y,N,R,T),y=h_(),l!==null&&!ri?(f.updateQueue=l.updateQueue,f.flags&=-2053,l.lanes&=~T,Xs(l,f,T)):(wn&&y&&Zb(f),f.flags|=1,Hr(l,f,N,T),f.child)}function yA(l,f,y,N,T){if(l===null){var R=y.type;return typeof R=="function"&&!q_(R)&&R.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(f.tag=15,f.type=R,vA(l,f,R,N,T)):(l=jy(y.type,null,N,f,f.mode,T),l.ref=f.ref,l.return=f,f.child=l)}if(R=l.child,(l.lanes&T)===0){var F=R.memoizedProps;if(y=y.compare,y=y!==null?y:Qa,y(F,N)&&l.ref===f.ref)return Xs(l,f,T)}return f.flags|=1,l=cl(R,N),l.ref=f.ref,l.return=f,f.child=l}function vA(l,f,y,N,T){if(l!==null){var R=l.memoizedProps;if(Qa(R,N)&&l.ref===f.ref)if(ri=!1,f.pendingProps=N=R,(l.lanes&T)!==0)(l.flags&131072)!==0&&(ri=!0);else return f.lanes=l.lanes,Xs(l,f,T)}return w_(l,f,y,N,T)}function xA(l,f,y){var N=f.pendingProps,T=N.children,R=l!==null?l.memoizedState:null;if(N.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},pn(jd,Ci),Ci|=y;else{if((y&1073741824)===0)return l=R!==null?R.baseLanes|y:y,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:l,cachePool:null,transitions:null},f.updateQueue=null,pn(jd,Ci),Ci|=l,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},N=R!==null?R.baseLanes:y,pn(jd,Ci),Ci|=N}else R!==null?(N=R.baseLanes|y,f.memoizedState=null):N=y,pn(jd,Ci),Ci|=N;return Hr(l,f,T,y),f.child}function bA(l,f){var y=f.ref;(l===null&&y!==null||l!==null&&l.ref!==y)&&(f.flags|=512,f.flags|=2097152)}function w_(l,f,y,N,T){var R=ni(y)?gc:kr.current;return R=hd(f,R),xd(f,T),y=f_(l,f,y,N,R,T),N=h_(),l!==null&&!ri?(f.updateQueue=l.updateQueue,f.flags&=-2053,l.lanes&=~T,Xs(l,f,T)):(wn&&N&&Zb(f),f.flags|=1,Hr(l,f,y,T),f.child)}function _A(l,f,y,N,T){if(ni(y)){var R=!0;Gg(f)}else R=!1;if(xd(f,T),f.stateNode===null)fy(l,f),cA(f,y,N),x_(f,y,N,T),N=!0;else if(l===null){var F=f.stateNode,X=f.memoizedProps;F.props=X;var se=F.context,be=y.contextType;typeof be=="object"&&be!==null?be=Yi(be):(be=ni(y)?gc:kr.current,be=hd(f,be));var Me=y.getDerivedStateFromProps,Ie=typeof Me=="function"||typeof F.getSnapshotBeforeUpdate=="function";Ie||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(X!==N||se!==be)&&uA(f,F,N,be),nl=!1;var Te=f.memoizedState;F.state=Te,ry(f,N,F,T),se=f.memoizedState,X!==N||Te!==se||ti.current||nl?(typeof Me=="function"&&(v_(f,y,Me,N),se=f.memoizedState),(X=nl||lA(f,y,X,N,Te,se,be))?(Ie||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(f.flags|=4194308)):(typeof F.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=N,f.memoizedState=se),F.props=N,F.state=se,F.context=be,N=X):(typeof F.componentDidMount=="function"&&(f.flags|=4194308),N=!1)}else{F=f.stateNode,Dk(l,f),X=f.memoizedProps,be=f.type===f.elementType?X:Sa(f.type,X),F.props=be,Ie=f.pendingProps,Te=F.context,se=y.contextType,typeof se=="object"&&se!==null?se=Yi(se):(se=ni(y)?gc:kr.current,se=hd(f,se));var Ke=y.getDerivedStateFromProps;(Me=typeof Ke=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(X!==Ie||Te!==se)&&uA(f,F,N,se),nl=!1,Te=f.memoizedState,F.state=Te,ry(f,N,F,T);var Qe=f.memoizedState;X!==Ie||Te!==Qe||ti.current||nl?(typeof Ke=="function"&&(v_(f,y,Ke,N),Qe=f.memoizedState),(be=nl||lA(f,y,be,N,Te,Qe,se)||!1)?(Me||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(N,Qe,se),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(N,Qe,se)),typeof F.componentDidUpdate=="function"&&(f.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof F.componentDidUpdate!="function"||X===l.memoizedProps&&Te===l.memoizedState||(f.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&Te===l.memoizedState||(f.flags|=1024),f.memoizedProps=N,f.memoizedState=Qe),F.props=N,F.state=Qe,F.context=se,N=be):(typeof F.componentDidUpdate!="function"||X===l.memoizedProps&&Te===l.memoizedState||(f.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&Te===l.memoizedState||(f.flags|=1024),N=!1)}return j_(l,f,y,N,R,T)}function j_(l,f,y,N,T,R){bA(l,f);var F=(f.flags&128)!==0;if(!N&&!F)return T&&Ck(f,y,!1),Xs(l,f,R);N=f.stateNode,$q.current=f;var X=F&&typeof y.getDerivedStateFromError!="function"?null:N.render();return f.flags|=1,l!==null&&F?(f.child=yd(f,l.child,null,R),f.child=yd(f,null,X,R)):Hr(l,f,X,R),f.memoizedState=N.state,T&&Ck(f,y,!0),f.child}function wA(l){var f=l.stateNode;f.pendingContext?Sk(l,f.pendingContext,f.pendingContext!==f.context):f.context&&Sk(l,f.context,!1),s_(l,f.containerInfo)}function jA(l,f,y,N,T){return gd(),Jb(T),f.flags|=256,Hr(l,f,y,N),f.child}var S_={dehydrated:null,treeContext:null,retryLane:0};function N_(l){return{baseLanes:l,cachePool:null,transitions:null}}function SA(l,f,y){var N=f.pendingProps,T=Cn.current,R=!1,F=(f.flags&128)!==0,X;if((X=F)||(X=l!==null&&l.memoizedState===null?!1:(T&2)!==0),X?(R=!0,f.flags&=-129):(l===null||l.memoizedState!==null)&&(T|=1),pn(Cn,T&1),l===null)return Qb(f),l=f.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?((f.mode&1)===0?f.lanes=1:l.data==="$!"?f.lanes=8:f.lanes=1073741824,null):(F=N.children,l=N.fallback,R?(N=f.mode,R=f.child,F={mode:"hidden",children:F},(N&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=F):R=Sy(F,N,0,null),l=Cc(l,N,y,null),R.return=f,l.return=f,R.sibling=l,f.child=R,f.child.memoizedState=N_(y),f.memoizedState=S_,l):C_(f,F));if(T=l.memoizedState,T!==null&&(X=T.dehydrated,X!==null))return Fq(l,f,F,N,X,T,y);if(R){R=N.fallback,F=f.mode,T=l.child,X=T.sibling;var se={mode:"hidden",children:N.children};return(F&1)===0&&f.child!==T?(N=f.child,N.childLanes=0,N.pendingProps=se,f.deletions=null):(N=cl(T,se),N.subtreeFlags=T.subtreeFlags&14680064),X!==null?R=cl(X,R):(R=Cc(R,F,y,null),R.flags|=2),R.return=f,N.return=f,N.sibling=R,f.child=N,N=R,R=f.child,F=l.child.memoizedState,F=F===null?N_(y):{baseLanes:F.baseLanes|y,cachePool:null,transitions:F.transitions},R.memoizedState=F,R.childLanes=l.childLanes&~y,f.memoizedState=S_,N}return R=l.child,l=R.sibling,N=cl(R,{mode:"visible",children:N.children}),(f.mode&1)===0&&(N.lanes=y),N.return=f,N.sibling=null,l!==null&&(y=f.deletions,y===null?(f.deletions=[l],f.flags|=16):y.push(l)),f.child=N,f.memoizedState=null,N}function C_(l,f){return f=Sy({mode:"visible",children:f},l.mode,0,null),f.return=l,l.child=f}function dy(l,f,y,N){return N!==null&&Jb(N),yd(f,l.child,null,y),l=C_(f,f.pendingProps.children),l.flags|=2,f.memoizedState=null,l}function Fq(l,f,y,N,T,R,F){if(y)return f.flags&256?(f.flags&=-257,N=b_(Error(n(422))),dy(l,f,F,N)):f.memoizedState!==null?(f.child=l.child,f.flags|=128,null):(R=N.fallback,T=f.mode,N=Sy({mode:"visible",children:N.children},T,0,null),R=Cc(R,T,F,null),R.flags|=2,N.return=f,R.return=f,N.sibling=R,f.child=N,(f.mode&1)!==0&&yd(f,l.child,null,F),f.child.memoizedState=N_(F),f.memoizedState=S_,R);if((f.mode&1)===0)return dy(l,f,F,null);if(T.data==="$!"){if(N=T.nextSibling&&T.nextSibling.dataset,N)var X=N.dgst;return N=X,R=Error(n(419)),N=b_(R,N,void 0),dy(l,f,F,N)}if(X=(F&l.childLanes)!==0,ri||X){if(N=ar,N!==null){switch(F&-F){case 4:T=2;break;case 16:T=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:T=32;break;case 536870912:T=268435456;break;default:T=0}T=(T&(N.suspendedLanes|F))!==0?0:T,T!==0&&T!==R.retryLane&&(R.retryLane=T,Zs(l,T),Ea(N,l,T,-1))}return U_(),N=b_(Error(n(421))),dy(l,f,F,N)}return T.data==="$?"?(f.flags|=128,f.child=l.child,f=Qq.bind(null,l),T._reactRetry=f,null):(l=R.treeContext,Ni=ts(T.nextSibling),Si=f,wn=!0,ja=null,l!==null&&(Gi[Zi++]=Ks,Gi[Zi++]=Gs,Gi[Zi++]=yc,Ks=l.id,Gs=l.overflow,yc=f),f=C_(f,N.children),f.flags|=4096,f)}function NA(l,f,y){l.lanes|=f;var N=l.alternate;N!==null&&(N.lanes|=f),r_(l.return,f,y)}function E_(l,f,y,N,T){var R=l.memoizedState;R===null?l.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:N,tail:y,tailMode:T}:(R.isBackwards=f,R.rendering=null,R.renderingStartTime=0,R.last=N,R.tail=y,R.tailMode=T)}function CA(l,f,y){var N=f.pendingProps,T=N.revealOrder,R=N.tail;if(Hr(l,f,N.children,y),N=Cn.current,(N&2)!==0)N=N&1|2,f.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=f.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&NA(l,y,f);else if(l.tag===19)NA(l,y,f);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===f)break e;for(;l.sibling===null;){if(l.return===null||l.return===f)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}N&=1}if(pn(Cn,N),(f.mode&1)===0)f.memoizedState=null;else switch(T){case"forwards":for(y=f.child,T=null;y!==null;)l=y.alternate,l!==null&&iy(l)===null&&(T=y),y=y.sibling;y=T,y===null?(T=f.child,f.child=null):(T=y.sibling,y.sibling=null),E_(f,!1,T,y,R);break;case"backwards":for(y=null,T=f.child,f.child=null;T!==null;){if(l=T.alternate,l!==null&&iy(l)===null){f.child=T;break}l=T.sibling,T.sibling=y,y=T,T=l}E_(f,!0,y,null,R);break;case"together":E_(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function fy(l,f){(f.mode&1)===0&&l!==null&&(l.alternate=null,f.alternate=null,f.flags|=2)}function Xs(l,f,y){if(l!==null&&(f.dependencies=l.dependencies),wc|=f.lanes,(y&f.childLanes)===0)return null;if(l!==null&&f.child!==l.child)throw Error(n(153));if(f.child!==null){for(l=f.child,y=cl(l,l.pendingProps),f.child=y,y.return=f;l.sibling!==null;)l=l.sibling,y=y.sibling=cl(l,l.pendingProps),y.return=f;y.sibling=null}return f.child}function Bq(l,f,y){switch(f.tag){case 3:wA(f),gd();break;case 5:Bk(f);break;case 1:ni(f.type)&&Gg(f);break;case 4:s_(f,f.stateNode.containerInfo);break;case 10:var N=f.type._context,T=f.memoizedProps.value;pn(ey,N._currentValue),N._currentValue=T;break;case 13:if(N=f.memoizedState,N!==null)return N.dehydrated!==null?(pn(Cn,Cn.current&1),f.flags|=128,null):(y&f.child.childLanes)!==0?SA(l,f,y):(pn(Cn,Cn.current&1),l=Xs(l,f,y),l!==null?l.sibling:null);pn(Cn,Cn.current&1);break;case 19:if(N=(y&f.childLanes)!==0,(l.flags&128)!==0){if(N)return CA(l,f,y);f.flags|=128}if(T=f.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),pn(Cn,Cn.current),N)break;return null;case 22:case 23:return f.lanes=0,xA(l,f,y)}return Xs(l,f,y)}var EA,P_,PA,kA;EA=function(l,f){for(var y=f.child;y!==null;){if(y.tag===5||y.tag===6)l.appendChild(y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===f)break;for(;y.sibling===null;){if(y.return===null||y.return===f)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},P_=function(){},PA=function(l,f,y,N){var T=l.memoizedProps;if(T!==N){l=f.stateNode,bc(ns.current);var R=null;switch(y){case"input":T=ge(l,T),N=ge(l,N),R=[];break;case"select":T=ae({},T,{value:void 0}),N=ae({},N,{value:void 0}),R=[];break;case"textarea":T=dn(l,T),N=dn(l,N),R=[];break;default:typeof T.onClick!="function"&&typeof N.onClick=="function"&&(l.onclick=Ae)}Oo(y,N);var F;y=null;for(be in T)if(!N.hasOwnProperty(be)&&T.hasOwnProperty(be)&&T[be]!=null)if(be==="style"){var X=T[be];for(F in X)X.hasOwnProperty(F)&&(y||(y={}),y[F]="")}else be!=="dangerouslySetInnerHTML"&&be!=="children"&&be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&be!=="autoFocus"&&(i.hasOwnProperty(be)?R||(R=[]):(R=R||[]).push(be,null));for(be in N){var se=N[be];if(X=T!=null?T[be]:void 0,N.hasOwnProperty(be)&&se!==X&&(se!=null||X!=null))if(be==="style")if(X){for(F in X)!X.hasOwnProperty(F)||se&&se.hasOwnProperty(F)||(y||(y={}),y[F]="");for(F in se)se.hasOwnProperty(F)&&X[F]!==se[F]&&(y||(y={}),y[F]=se[F])}else y||(R||(R=[]),R.push(be,y)),y=se;else be==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,X=X?X.__html:void 0,se!=null&&X!==se&&(R=R||[]).push(be,se)):be==="children"?typeof se!="string"&&typeof se!="number"||(R=R||[]).push(be,""+se):be!=="suppressContentEditableWarning"&&be!=="suppressHydrationWarning"&&(i.hasOwnProperty(be)?(se!=null&&be==="onScroll"&&an("scroll",l),R||X===se||(R=[])):(R=R||[]).push(be,se))}y&&(R=R||[]).push("style",y);var be=R;(f.updateQueue=be)&&(f.flags|=4)}},kA=function(l,f,y,N){y!==N&&(f.flags|=4)};function Yh(l,f){if(!wn)switch(l.tailMode){case"hidden":f=l.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?l.tail=null:y.sibling=null;break;case"collapsed":y=l.tail;for(var N=null;y!==null;)y.alternate!==null&&(N=y),y=y.sibling;N===null?f||l.tail===null?l.tail=null:l.tail.sibling=null:N.sibling=null}}function Or(l){var f=l.alternate!==null&&l.alternate.child===l.child,y=0,N=0;if(f)for(var T=l.child;T!==null;)y|=T.lanes|T.childLanes,N|=T.subtreeFlags&14680064,N|=T.flags&14680064,T.return=l,T=T.sibling;else for(T=l.child;T!==null;)y|=T.lanes|T.childLanes,N|=T.subtreeFlags,N|=T.flags,T.return=l,T=T.sibling;return l.subtreeFlags|=N,l.childLanes=y,f}function zq(l,f,y){var N=f.pendingProps;switch(Yb(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Or(f),null;case 1:return ni(f.type)&&Kg(),Or(f),null;case 3:return N=f.stateNode,bd(),bn(ti),bn(kr),c_(),N.pendingContext&&(N.context=N.pendingContext,N.pendingContext=null),(l===null||l.child===null)&&(Qg(f)?f.flags|=4:l===null||l.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,ja!==null&&(F_(ja),ja=null))),P_(l,f),Or(f),null;case 5:o_(f);var T=bc(Wh.current);if(y=f.type,l!==null&&f.stateNode!=null)PA(l,f,y,N,T),l.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!N){if(f.stateNode===null)throw Error(n(166));return Or(f),null}if(l=bc(ns.current),Qg(f)){N=f.stateNode,y=f.type;var R=f.memoizedProps;switch(N[Ki]=f,N[Xo]=R,l=(f.mode&1)!==0,y){case"dialog":an("cancel",N),an("close",N);break;case"iframe":case"object":case"embed":an("load",N);break;case"video":case"audio":for(T=0;T<Go.length;T++)an(Go[T],N);break;case"source":an("error",N);break;case"img":case"image":case"link":an("error",N),an("load",N);break;case"details":an("toggle",N);break;case"input":Be(N,R),an("invalid",N);break;case"select":N._wrapperState={wasMultiple:!!R.multiple},an("invalid",N);break;case"textarea":nn(N,R),an("invalid",N)}Oo(y,R),T=null;for(var F in R)if(R.hasOwnProperty(F)){var X=R[F];F==="children"?typeof X=="string"?N.textContent!==X&&(R.suppressHydrationWarning!==!0&&xe(N.textContent,X,l),T=["children",X]):typeof X=="number"&&N.textContent!==""+X&&(R.suppressHydrationWarning!==!0&&xe(N.textContent,X,l),T=["children",""+X]):i.hasOwnProperty(F)&&X!=null&&F==="onScroll"&&an("scroll",N)}switch(y){case"input":ke(N),Ct(N,R,!0);break;case"textarea":ke(N),Oe(N);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(N.onclick=Ae)}N=T,f.updateQueue=N,N!==null&&(f.flags|=4)}else{F=T.nodeType===9?T:T.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=lt(y)),l==="http://www.w3.org/1999/xhtml"?y==="script"?(l=F.createElement("div"),l.innerHTML="<script><\/script>
40",l=l.removeChild(l.firstChild)):typeof N.is=="string"?l=F.createElement(y,{is:N.is}):(l=F.createElement(y),y==="select"&&(F=l,N.multiple?F.multiple=!0:N.size&&(F.size=N.size))):l=F.createElementNS(l,y),l[Ki]=f,l[Xo]=N,EA(l,f,!1,!1),f.stateNode=l;e:{switch(F=rr(y,N),y){case"dialog":an("cancel",l),an("close",l),T=N;break;case"iframe":case"object":case"embed":an("load",l),T=N;break;case"video":case"audio":for(T=0;T<Go.length;T++)an(Go[T],l);T=N;break;case"source":an("error",l),T=N;break;case"img":case"image":case"link":an("error",l),an("load",l),T=N;break;case"details":an("toggle",l),T=N;break;case"input":Be(l,N),T=ge(l,N),an("invalid",l);break;case"option":T=N;break;case"select":l._wrapperState={wasMultiple:!!N.multiple},T=ae({},N,{value:void 0}),an("invalid",l);break;case"textarea":nn(l,N),T=dn(l,N),an("invalid",l);break;default:T=N}Oo(y,T),X=T;for(R in X)if(X.hasOwnProperty(R)){var se=X[R];R==="style"?Xl(l,se):R==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,se!=null&&Et(l,se)):R==="children"?typeof se=="string"?(y!=="textarea"||se!=="")&&At(l,se):typeof se=="number"&&At(l,""+se):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(i.hasOwnProperty(R)?se!=null&&R==="onScroll"&&an("scroll",l):se!=null&&E(l,R,se,F))}switch(y){case"input":ke(l),Ct(l,N,!1);break;case"textarea":ke(l),Oe(l);break;case"option":N.value!=null&&l.setAttribute("value",""+_e(N.value));break;case"select":l.multiple=!!N.multiple,R=N.value,R!=null?qt(l,!!N.multiple,R,!1):N.defaultValue!=null&&qt(l,!!N.multiple,N.defaultValue,!0);break;default:typeof T.onClick=="function"&&(l.onclick=Ae)}switch(y){case"button":case"input":case"select":case"textarea":N=!!N.autoFocus;break e;case"img":N=!0;break e;default:N=!1}}N&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return Or(f),null;case 6:if(l&&f.stateNode!=null)kA(l,f,l.memoizedProps,N);else{if(typeof N!="string"&&f.stateNode===null)throw Error(n(166));if(y=bc(Wh.current),bc(ns.current),Qg(f)){if(N=f.stateNode,y=f.memoizedProps,N[Ki]=f,(R=N.nodeValue!==y)&&(l=Si,l!==null))switch(l.tag){case 3:xe(N.nodeValue,y,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&xe(N.nodeValue,y,(l.mode&1)!==0)}R&&(f.flags|=4)}else N=(y.nodeType===9?y:y.ownerDocument).createTextNode(N),N[Ki]=f,f.stateNode=N}return Or(f),null;case 13:if(bn(Cn),N=f.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(wn&&Ni!==null&&(f.mode&1)!==0&&(f.flags&128)===0)Tk(),gd(),f.flags|=98560,R=!1;else if(R=Qg(f),N!==null&&N.dehydrated!==null){if(l===null){if(!R)throw Error(n(318));if(R=f.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[Ki]=f}else gd(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Or(f),R=!1}else ja!==null&&(F_(ja),ja=null),R=!0;if(!R)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=y,f):(N=N!==null,N!==(l!==null&&l.memoizedState!==null)&&N&&(f.child.flags|=8192,(f.mode&1)!==0&&(l===null||(Cn.current&1)!==0?Gn===0&&(Gn=3):U_())),f.updateQueue!==null&&(f.flags|=4),Or(f),null);case 4:return bd(),P_(l,f),l===null&&Zo(f.stateNode.containerInfo),Or(f),null;case 10:return n_(f.type._context),Or(f),null;case 17:return ni(f.type)&&Kg(),Or(f),null;case 19:if(bn(Cn),R=f.memoizedState,R===null)return Or(f),null;if(N=(f.flags&128)!==0,F=R.rendering,F===null)if(N)Yh(R,!1);else{if(Gn!==0||l!==null&&(l.flags&128)!==0)for(l=f.child;l!==null;){if(F=iy(l),F!==null){for(f.flags|=128,Yh(R,!1),N=F.updateQueue,N!==null&&(f.updateQueue=N,f.flags|=4),f.subtreeFlags=0,N=y,y=f.child;y!==null;)R=y,l=N,R.flags&=14680066,F=R.alternate,F===null?(R.childLanes=0,R.lanes=l,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=F.childLanes,R.lanes=F.lanes,R.child=F.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=F.memoizedProps,R.memoizedState=F.memoizedState,R.updateQueue=F.updateQueue,R.type=F.type,l=F.dependencies,R.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),y=y.sibling;return pn(Cn,Cn.current&1|2),f.child}l=l.sibling}R.tail!==null&&Sn()>Sd&&(f.flags|=128,N=!0,Yh(R,!1),f.lanes=4194304)}else{if(!N)if(l=iy(F),l!==null){if(f.flags|=128,N=!0,y=l.updateQueue,y!==null&&(f.updateQueue=y,f.flags|=4),Yh(R,!0),R.tail===null&&R.tailMode==="hidden"&&!F.alternate&&!wn)return Or(f),null}else 2*Sn()-R.renderingStartTime>Sd&&y!==1073741824&&(f.flags|=128,N=!0,Yh(R,!1),f.lanes=4194304);R.isBackwards?(F.sibling=f.child,f.child=F):(y=R.last,y!==null?y.sibling=F:f.child=F,R.last=F)}return R.tail!==null?(f=R.tail,R.rendering=f,R.tail=f.sibling,R.renderingStartTime=Sn(),f.sibling=null,y=Cn.current,pn(Cn,N?y&1|2:y&1),f):(Or(f),null);case 22:case 23:return z_(),N=f.memoizedState!==null,l!==null&&l.memoizedState!==null!==N&&(f.flags|=8192),N&&(f.mode&1)!==0?(Ci&1073741824)!==0&&(Or(f),f.subtreeFlags&6&&(f.flags|=8192)):Or(f),null;case 24:return null;case 25:return null}throw Error(n(156,f.tag))}function Uq(l,f){switch(Yb(f),f.tag){case 1:return ni(f.type)&&Kg(),l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;
vendor: 20,223 bytes, line 40
40case 3:return bd(),bn(ti),bn(kr),c_(),l=f.flags,(l&65536)!==0&&(l&128)===0?(f.flags=l&-65537|128,f):null;case 5:return o_(f),null;case 13:if(bn(Cn),l=f.memoizedState,l!==null&&l.dehydrated!==null){if(f.alternate===null)throw Error(n(340));gd()}return l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 19:return bn(Cn),null;case 4:return bd(),null;case 10:return n_(f.type._context),null;case 22:case 23:return z_(),null;case 24:return null;default:return null}}var hy=!1,Tr=!1,qq=typeof WeakSet=="function"?WeakSet:Set,Ye=null;function wd(l,f){var y=l.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(N){An(l,f,N)}else y.current=null}function k_(l,f,y){try{y()}catch(N){An(l,f,N)}}var AA=!1;function Hq(l,f){if(Ve=lc,l=Mh(),Rh(l)){if("selectionStart"in l)var y={start:l.selectionStart,end:l.selectionEnd};else e:{y=(y=l.ownerDocument)&&y.defaultView||window;var N=y.getSelection&&y.getSelection();if(N&&N.rangeCount!==0){y=N.anchorNode;var T=N.anchorOffset,R=N.focusNode;N=N.focusOffset;try{y.nodeType,R.nodeType}catch{y=null;break e}var F=0,X=-1,se=-1,be=0,Me=0,Ie=l,Te=null;t:for(;;){for(var Ke;Ie!==y||T!==0&&Ie.nodeType!==3||(X=F+T),Ie!==R||N!==0&&Ie.nodeType!==3||(se=F+N),Ie.nodeType===3&&(F+=Ie.nodeValue.length),(Ke=Ie.firstChild)!==null;)Te=Ie,Ie=Ke;for(;;){if(Ie===l)break t;if(Te===y&&++be===T&&(X=F),Te===R&&++Me===N&&(se=F),(Ke=Ie.nextSibling)!==null)break;Ie=Te,Te=Ie.parentNode}Ie=Ke}y=X===-1||se===-1?null:{start:X,end:se}}else y=null}y=y||{start:0,end:0}}else y=null;for(ut={focusedElem:l,selectionRange:y},lc=!1,Ye=f;Ye!==null;)if(f=Ye,l=f.child,(f.subtreeFlags&1028)!==0&&l!==null)l.return=f,Ye=l;else for(;Ye!==null;){f=Ye;try{var Qe=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(Qe!==null){var it=Qe.memoizedProps,Rn=Qe.memoizedState,me=f.stateNode,ce=me.getSnapshotBeforeUpdate(f.elementType===f.type?it:Sa(f.type,it),Rn);me.__reactInternalSnapshotBeforeUpdate=ce}break;case 3:var ye=f.stateNode.containerInfo;ye.nodeType===1?ye.textContent="":ye.nodeType===9&&ye.documentElement&&ye.removeChild(ye.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Fe){An(f,f.return,Fe)}if(l=f.sibling,l!==null){l.return=f.return,Ye=l;break}Ye=f.return}return Qe=AA,AA=!1,Qe}function Xh(l,f,y){var N=f.updateQueue;if(N=N!==null?N.lastEffect:null,N!==null){var T=N=N.next;do{if((T.tag&l)===l){var R=T.destroy;T.destroy=void 0,R!==void 0&&k_(f,y,R)}T=T.next}while(T!==N)}}function py(l,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&l)===l){var N=y.create;y.destroy=N()}y=y.next}while(y!==f)}}function A_(l){var f=l.ref;if(f!==null){var y=l.stateNode;switch(l.tag){case 5:l=y;break;default:l=y}typeof f=="function"?f(l):f.current=l}}function OA(l){var f=l.alternate;f!==null&&(l.alternate=null,OA(f)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(f=l.stateNode,f!==null&&(delete f[Ki],delete f[Xo],delete f[Qo],delete f[Wb],delete f[Vb])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function TA(l){return l.tag===5||l.tag===3||l.tag===4}function MA(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||TA(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function O_(l,f,y){var N=l.tag;if(N===5||N===6)l=l.stateNode,f?y.nodeType===8?y.parentNode.insertBefore(l,f):y.insertBefore(l,f):(y.nodeType===8?(f=y.parentNode,f.insertBefore(l,y)):(f=y,f.appendChild(l)),y=y._reactRootContainer,y!=null||f.onclick!==null||(f.onclick=Ae));else if(N!==4&&(l=l.child,l!==null))for(O_(l,f,y),l=l.sibling;l!==null;)O_(l,f,y),l=l.sibling}function T_(l,f,y){var N=l.tag;if(N===5||N===6)l=l.stateNode,f?y.insertBefore(l,f):y.appendChild(l);else if(N!==4&&(l=l.child,l!==null))for(T_(l,f,y),l=l.sibling;l!==null;)T_(l,f,y),l=l.sibling}var gr=null,Na=!1;function il(l,f,y){for(y=y.child;y!==null;)RA(l,f,y),y=y.sibling}function RA(l,f,y){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(nc,y)}catch{}switch(y.tag){case 5:Tr||wd(y,f);case 6:var N=gr,T=Na;gr=null,il(l,f,y),gr=N,Na=T,gr!==null&&(Na?(l=gr,y=y.stateNode,l.nodeType===8?l.parentNode.removeChild(y):l.removeChild(y)):gr.removeChild(y.stateNode));break;case 18:gr!==null&&(Na?(l=gr,y=y.stateNode,l.nodeType===8?zh(l.parentNode,y):l.nodeType===1&&zh(l,y),xi(l)):zh(gr,y.stateNode));break;case 4:N=gr,T=Na,gr=y.stateNode.containerInfo,Na=!0,il(l,f,y),gr=N,Na=T;break;case 0:case 11:case 14:case 15:if(!Tr&&(N=y.updateQueue,N!==null&&(N=N.lastEffect,N!==null))){T=N=N.next;do{var R=T,F=R.destroy;R=R.tag,F!==void 0&&((R&2)!==0||(R&4)!==0)&&k_(y,f,F),T=T.next}while(T!==N)}il(l,f,y);break;case 1:if(!Tr&&(wd(y,f),N=y.stateNode,typeof N.componentWillUnmount=="function"))try{N.props=y.memoizedProps,N.state=y.memoizedState,N.componentWillUnmount()}catch(X){An(y,f,X)}il(l,f,y);break;case 21:il(l,f,y);break;case 22:y.mode&1?(Tr=(N=Tr)||y.memoizedState!==null,il(l,f,y),Tr=N):il(l,f,y);break;default:il(l,f,y)}}function IA(l){var f=l.updateQueue;if(f!==null){l.updateQueue=null;var y=l.stateNode;y===null&&(y=l.stateNode=new qq),f.forEach(function(N){var T=Jq.bind(null,l,N);y.has(N)||(y.add(N),N.then(T,T))})}}function Ca(l,f){var y=f.deletions;if(y!==null)for(var N=0;N<y.length;N++){var T=y[N];try{var R=l,F=f,X=F;e:for(;X!==null;){switch(X.tag){case 5:gr=X.stateNode,Na=!1;break e;case 3:gr=X.stateNode.containerInfo,Na=!0;break e;case 4:gr=X.stateNode.containerInfo,Na=!0;break e}X=X.return}if(gr===null)throw Error(n(160));RA(R,F,T),gr=null,Na=!1;var se=T.alternate;se!==null&&(se.return=null),T.return=null}catch(be){An(T,f,be)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)LA(f,l),f=f.sibling}function LA(l,f){var y=l.alternate,N=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(Ca(f,l),is(l),N&4){try{Xh(3,l,l.return),py(3,l)}catch(it){An(l,l.return,it)}try{Xh(5,l,l.return)}catch(it){An(l,l.return,it)}}break;case 1:Ca(f,l),is(l),N&512&&y!==null&&wd(y,y.return);break;case 5:if(Ca(f,l),is(l),N&512&&y!==null&&wd(y,y.return),l.flags&32){var T=l.stateNode;try{At(T,"")}catch(it){An(l,l.return,it)}}if(N&4&&(T=l.stateNode,T!=null)){var R=l.memoizedProps,F=y!==null?y.memoizedProps:R,X=l.type,se=l.updateQueue;if(l.updateQueue=null,se!==null)try{X==="input"&&R.type==="radio"&&R.name!=null&&Le(T,R),rr(X,F);var be=rr(X,R);for(F=0;F<se.length;F+=2){var Me=se[F],Ie=se[F+1];Me==="style"?Xl(T,Ie):Me==="dangerouslySetInnerHTML"?Et(T,Ie):Me==="children"?At(T,Ie):E(T,Me,Ie,be)}switch(X){case"input":rt(T,R);break;case"textarea":qe(T,R);break;case"select":var Te=T._wrapperState.wasMultiple;T._wrapperState.wasMultiple=!!R.multiple;var Ke=R.value;Ke!=null?qt(T,!!R.multiple,Ke,!1):Te!==!!R.multiple&&(R.defaultValue!=null?qt(T,!!R.multiple,R.defaultValue,!0):qt(T,!!R.multiple,R.multiple?[]:"",!1))}T[Xo]=R}catch(it){An(l,l.return,it)}}break;case 6:if(Ca(f,l),is(l),N&4){if(l.stateNode===null)throw Error(n(162));T=l.stateNode,R=l.memoizedProps;try{T.nodeValue=R}catch(it){An(l,l.return,it)}}break;case 3:if(Ca(f,l),is(l),N&4&&y!==null&&y.memoizedState.isDehydrated)try{xi(f.containerInfo)}catch(it){An(l,l.return,it)}break;case 4:Ca(f,l),is(l);break;case 13:Ca(f,l),is(l),T=l.child,T.flags&8192&&(R=T.memoizedState!==null,T.stateNode.isHidden=R,!R||T.alternate!==null&&T.alternate.memoizedState!==null||(I_=Sn())),N&4&&IA(l);break;case 22:if(Me=y!==null&&y.memoizedState!==null,l.mode&1?(Tr=(be=Tr)||Me,Ca(f,l),Tr=be):Ca(f,l),is(l),N&8192){if(be=l.memoizedState!==null,(l.stateNode.isHidden=be)&&!Me&&(l.mode&1)!==0)for(Ye=l,Me=l.child;Me!==null;){for(Ie=Ye=Me;Ye!==null;){switch(Te=Ye,Ke=Te.child,Te.tag){case 0:case 11:case 14:case 15:Xh(4,Te,Te.return);break;case 1:wd(Te,Te.return);var Qe=Te.stateNode;if(typeof Qe.componentWillUnmount=="function"){N=Te,y=Te.return;try{f=N,Qe.props=f.memoizedProps,Qe.state=f.memoizedState,Qe.componentWillUnmount()}catch(it){An(N,y,it)}}break;case 5:wd(Te,Te.return);break;case 22:if(Te.memoizedState!==null){FA(Ie);continue}}Ke!==null?(Ke.return=Te,Ye=Ke):FA(Ie)}Me=Me.sibling}e:for(Me=null,Ie=l;;){if(Ie.tag===5){if(Me===null){Me=Ie;try{T=Ie.stateNode,be?(R=T.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(X=Ie.stateNode,se=Ie.memoizedProps.style,F=se!=null&&se.hasOwnProperty("display")?se.display:null,X.style.display=ga("display",F))}catch(it){An(l,l.return,it)}}}else if(Ie.tag===6){if(Me===null)try{Ie.stateNode.nodeValue=be?"":Ie.memoizedProps}catch(it){An(l,l.return,it)}}else if((Ie.tag!==22&&Ie.tag!==23||Ie.memoizedState===null||Ie===l)&&Ie.child!==null){Ie.child.return=Ie,Ie=Ie.child;continue}if(Ie===l)break e;for(;Ie.sibling===null;){if(Ie.return===null||Ie.return===l)break e;Me===Ie&&(Me=null),Ie=Ie.return}Me===Ie&&(Me=null),Ie.sibling.return=Ie.return,Ie=Ie.sibling}}break;case 19:Ca(f,l),is(l),N&4&&IA(l);break;case 21:break;default:Ca(f,l),is(l)}}function is(l){var f=l.flags;if(f&2){try{e:{for(var y=l.return;y!==null;){if(TA(y)){var N=y;break e}y=y.return}throw Error(n(160))}switch(N.tag){case 5:var T=N.stateNode;N.flags&32&&(At(T,""),N.flags&=-33);var R=MA(l);T_(l,R,T);break;case 3:case 4:var F=N.stateNode.containerInfo,X=MA(l);O_(l,X,F);break;default:throw Error(n(161))}}catch(se){An(l,l.return,se)}l.flags&=-3}f&4096&&(l.flags&=-4097)}function Wq(l,f,y){Ye=l,DA(l)}function DA(l,f,y){for(var N=(l.mode&1)!==0;Ye!==null;){var T=Ye,R=T.child;if(T.tag===22&&N){var F=T.memoizedState!==null||hy;if(!F){var X=T.alternate,se=X!==null&&X.memoizedState!==null||Tr;X=hy;var be=Tr;if(hy=F,(Tr=se)&&!be)for(Ye=T;Ye!==null;)F=Ye,se=F.child,F.tag===22&&F.memoizedState!==null?BA(T):se!==null?(se.return=F,Ye=se):BA(T);for(;R!==null;)Ye=R,DA(R),R=R.sibling;Ye=T,hy=X,Tr=be}$A(l)}else(T.subtreeFlags&8772)!==0&&R!==null?(R.return=T,Ye=R):$A(l)}}function $A(l){for(;Ye!==null;){var f=Ye;if((f.flags&8772)!==0){var y=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:Tr||py(5,f);break;case 1:var N=f.stateNode;if(f.flags&4&&!Tr)if(y===null)N.componentDidMount();else{var T=f.elementType===f.type?y.memoizedProps:Sa(f.type,y.memoizedProps);N.componentDidUpdate(T,y.memoizedState,N.__reactInternalSnapshotBeforeUpdate)}var R=f.updateQueue;R!==null&&Fk(f,R,N);break;case 3:var F=f.updateQueue;if(F!==null){if(y=null,f.child!==null)switch(f.child.tag){case 5:y=f.child.stateNode;break;case 1:y=f.child.stateNode}Fk(f,F,y)}break;case 5:var X=f.stateNode;if(y===null&&f.flags&4){y=X;var se=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":se.autoFocus&&y.focus();break;case"img":se.src&&(y.src=se.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var be=f.alternate;if(be!==null){var Me=be.memoizedState;if(Me!==null){var Ie=Me.dehydrated;Ie!==null&&xi(Ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Tr||f.flags&512&&A_(f)}catch(Te){An(f,f.return,Te)}}if(f===l){Ye=null;break}if(y=f.sibling,y!==null){y.return=f.return,Ye=y;break}Ye=f.return}}function FA(l){for(;Ye!==null;){var f=Ye;if(f===l){Ye=null;break}var y=f.sibling;if(y!==null){y.return=f.return,Ye=y;break}Ye=f.return}}function BA(l){for(;Ye!==null;){var f=Ye;try{switch(f.tag){case 0:case 11:case 15:var y=f.return;try{py(4,f)}catch(se){An(f,y,se)}break;case 1:var N=f.stateNode;if(typeof N.componentDidMount=="function"){var T=f.return;try{N.componentDidMount()}catch(se){An(f,T,se)}}var R=f.return;try{A_(f)}catch(se){An(f,R,se)}break;case 5:var F=f.return;try{A_(f)}catch(se){An(f,F,se)}}}catch(se){An(f,f.return,se)}if(f===l){Ye=null;break}var X=f.sibling;if(X!==null){X.return=f.return,Ye=X;break}Ye=f.return}}var Vq=Math.ceil,my=A.ReactCurrentDispatcher,M_=A.ReactCurrentOwner,Qi=A.ReactCurrentBatchConfig,zt=0,ar=null,$n=null,yr=0,Ci=0,jd=Jo(0),Gn=0,Qh=null,wc=0,gy=0,R_=0,Jh=null,ii=null,I_=0,Sd=1/0,Qs=null,yy=!1,L_=null,al=null,vy=!1,sl=null,xy=0,ep=0,D_=null,by=-1,_y=0;function Wr(){return(zt&6)!==0?Sn():by!==-1?by:by=Sn()}function ol(l){return(l.mode&1)===0?1:(zt&2)!==0&&yr!==0?yr&-yr:kq.transition!==null?(_y===0&&(_y=Sg()),_y):(l=Rt,l!==0||(l=window.event,l=l===void 0?16:Mt(l.type)),l)}function Ea(l,f,y,N){if(50<ep)throw ep=0,D_=null,Error(n(185));yi(l,y,N),((zt&2)===0||l!==ar)&&(l===ar&&((zt&2)===0&&(gy|=y),Gn===4&&ll(l,yr)),ai(l,N),y===1&&zt===0&&(f.mode&1)===0&&(Sd=Sn()+500,Zg&&tl()))}function ai(l,f){var y=l.callbackNode;Hu(l,f);var N=hn(l,l===ar?yr:0);if(N===0)y!==null&&mh(y),l.callbackNode=null,l.callbackPriority=0;else if(f=N&-N,l.callbackPriority!==f){if(y!=null&&mh(y),f===1)l.tag===0?Pq(UA.bind(null,l)):Ek(UA.bind(null,l)),Pr(function(){(zt&6)===0&&tl()}),y=null;else{switch(Lo(N)){case 1:y=gh;break;case 4:y=jg;break;case 16:y=Uu;break;case 536870912:y=To;break;default:y=Uu}y=YA(y,zA.bind(null,l))}l.callbackPriority=f,l.callbackNode=y}}function zA(l,f){if(by=-1,_y=0,(zt&6)!==0)throw Error(n(327));var y=l.callbackNode;if(Nd()&&l.callbackNode!==y)return null;var N=hn(l,l===ar?yr:0);if(N===0)return null;if((N&30)!==0||(N&l.expiredLanes)!==0||f)f=wy(l,N);else{f=N;var T=zt;zt|=2;var R=HA();(ar!==l||yr!==f)&&(Qs=null,Sd=Sn()+500,Sc(l,f));do try{Zq();break}catch(X){qA(l,X)}while(!0);t_(),my.current=R,zt=T,$n!==null?f=0:(ar=null,yr=0,f=Gn)}if(f!==0){if(f===2&&(T=Cr(l),T!==0&&(N=T,f=$_(l,T))),f===1)throw y=Qh,Sc(l,0),ll(l,N),ai(l,Sn()),y;if(f===6)ll(l,N);else{if(T=l.current.alternate,(N&30)===0&&!Kq(T)&&(f=wy(l,N),f===2&&(R=Cr(l),R!==0&&(N=R,f=$_(l,R))),f===1))throw y=Qh,Sc(l,0),ll(l,N),ai(l,Sn()),y;switch(l.finishedWork=T,l.finishedLanes=N,f){case 0:case 1:throw Error(n(345));case 2:Nc(l,ii,Qs);break;case 3:if(ll(l,N),(N&130023424)===N&&(f=I_+500-Sn(),10<f)){if(hn(l,0)!==0)break;if(T=l.suspendedLanes,(T&N)!==N){Wr(),l.pingedLanes|=l.suspendedLanes&T;break}l.timeoutHandle=Vn(Nc.bind(null,l,ii,Qs),f);break}Nc(l,ii,Qs);break;case 4:if(ll(l,N),(N&4194240)===N)break;for(f=l.eventTimes,T=-1;0<N;){var F=31-wt(N);R=1<<F,F=f[F],F>T&&(T=F),N&=~R}if(N=T,N=Sn()-N,N=(120>N?120:480>N?480:1080>N?1080:1920>N?1920:3e3>N?3e3:4320>N?4320:1960*Vq(N/1960))-N,10<N){l.timeoutHandle=Vn(Nc.bind(null,l,ii,Qs),N);break}Nc(l,ii,Qs);break;case 5:Nc(l,ii,Qs);break;default:throw Error(n(329))}}}return ai(l,Sn()),l.callbackNode===y?zA.bind(null,l):null}function $_(l,f){var y=Jh;return l.current.memoizedState.isDehydrated&&(Sc(l,f).flags|=256),l=wy(l,f),l!==2&&(f=ii,ii=y,f!==null&&F_(f)),l}function F_(l){ii===null?ii=l:ii.push.apply(ii,l)}function Kq(l){for(var f=l;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var N=0;N<y.length;N++){var T=y[N],R=T.getSnapshot;T=T.value;try{if(!wi(R(),T))return!1}catch{return!1}}}if(y=f.child,f.subtreeFlags&16384&&y!==null)y.return=f,f=y;else{if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function ll(l,f){for(f&=~R_,f&=~gy,l.suspendedLanes|=f,l.pingedLanes&=~f,l=l.expirationTimes;0<f;){var y=31-wt(f),N=1<<y;l[y]=-1,f&=~N}}function UA(l){if((zt&6)!==0)throw Error(n(327));Nd();var f=hn(l,0);if((f&1)===0)return ai(l,Sn()),null;var y=wy(l,f);if(l.tag!==0&&y===2){var N=Cr(l);N!==0&&(f=N,y=$_(l,N))}if(y===1)throw y=Qh,Sc(l,0),ll(l,f),ai(l,Sn()),y;if(y===6)throw Error(n(345));return l.finishedWork=l.current.alternate,l.finishedLanes=f,Nc(l,ii,Qs),ai(l,Sn()),null}function B_(l,f){var y=zt;zt|=1;try{return l(f)}finally{zt=y,zt===0&&(Sd=Sn()+500,Zg&&tl())}}function jc(l){sl!==null&&sl.tag===0&&(zt&6)===0&&Nd();var f=zt;zt|=1;var y=Qi.transition,N=Rt;try{if(Qi.transition=null,Rt=1,l)return l()}finally{Rt=N,Qi.transition=y,zt=f,(zt&6)===0&&tl()}}function z_(){Ci=jd.current,bn(jd)}function Sc(l,f){l.finishedWork=null,l.finishedLanes=0;var y=l.timeoutHandle;if(y!==-1&&(l.timeoutHandle=-1,Dn(y)),$n!==null)for(y=$n.return;y!==null;){var N=y;switch(Yb(N),N.tag){case 1:N=N.type.childContextTypes,N!=null&&Kg();break;case 3:bd(),bn(ti),bn(kr),c_();break;case 5:o_(N);break;case 4:bd();break;case 13:bn(Cn);break;case 19:bn(Cn);break;case 10:n_(N.type._context);break;case 22:case 23:z_()}y=y.return}if(ar=l,$n=l=cl(l.current,null),yr=Ci=f,Gn=0,Qh=null,R_=gy=wc=0,ii=Jh=null,xc!==null){for(f=0;f<xc.length;f++)if(y=xc[f],N=y.interleaved,N!==null){y.interleaved=null;var T=N.next,R=y.pending;if(R!==null){var F=R.next;R.next=T,N.next=F}y.pending=N}xc=null}return l}function qA(l,f){do{var y=$n;try{if(t_(),ay.current=cy,sy){for(var N=En.memoizedState;N!==null;){var T=N.queue;T!==null&&(T.pending=null),N=N.next}sy=!1}if(_c=0,ir=Kn=En=null,Vh=!1,Kh=0,M_.current=null,y===null||y.return===null){Gn=1,Qh=f,$n=null;break}e:{var R=l,F=y.return,X=y,se=f;if(f=yr,X.flags|=32768,se!==null&&typeof se=="object"&&typeof se.then=="function"){var be=se,Me=X,Ie=Me.tag;if((Me.mode&1)===0&&(Ie===0||Ie===11||Ie===15)){var Te=Me.alternate;Te?(Me.updateQueue=Te.updateQueue,Me.memoizedState=Te.memoizedState,Me.lanes=Te.lanes):(Me.updateQueue=null,Me.memoizedState=null)}var Ke=pA(F);if(Ke!==null){Ke.flags&=-257,mA(Ke,F,X,R,f),Ke.mode&1&&hA(R,be,f),f=Ke,se=be;var Qe=f.updateQueue;if(Qe===null){var it=new Set;it.add(se),f.updateQueue=it}else Qe.add(se);break e}else{if((f&1)===0){hA(R,be,f),U_();break e}se=Error(n(426))}}else if(wn&&X.mode&1){var Rn=pA(F);if(Rn!==null){(Rn.flags&65536)===0&&(Rn.flags|=256),mA(Rn,F,X,R,f),Jb(_d(se,X));break e}}R=se=_d(se,X),Gn!==4&&(Gn=2),Jh===null?Jh=[R]:Jh.push(R),R=F;do{switch(R.tag){case 3:R.flags|=65536,f&=-f,R.lanes|=f;var me=dA(R,se,f);$k(R,me);break e;case 1:X=se;var ce=R.type,ye=R.stateNode;if((R.flags&128)===0&&(typeof ce.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(al===null||!al.has(ye)))){R.flags|=65536,f&=-f,R.lanes|=f;var Fe=fA(R,X,f);$k(R,Fe);break e}}R=R.return}while(R!==null)}VA(y)}catch(st){f=st,$n===y&&y!==null&&($n=y=y.return);continue}break}while(!0)}function HA(){var l=my.current;return my.current=cy,l===null?cy:l}function U_(){(Gn===0||Gn===3||Gn===2)&&(Gn=4),ar===null||(wc&268435455)===0&&(gy&268435455)===0||ll(ar,yr)}function wy(l,f){var y=zt;zt|=2;var N=HA();(ar!==l||yr!==f)&&(Qs=null,Sc(l,f));do try{Gq();break}catch(T){qA(l,T)}while(!0);if(t_(),zt=y,my.current=N,$n!==null)throw Error(n(261));return ar=null,yr=0,Gn}function Gq(){for(;$n!==null;)WA($n)}function Zq(){for(;$n!==null&&!kb();)WA($n)}function WA(l){var f=ZA(l.alternate,l,Ci);l.memoizedProps=l.pendingProps,f===null?VA(l):$n=f,M_.current=null}function VA(l){var f=l;do{var y=f.alternate;if(l=f.return,(f.flags&32768)===0){if(y=zq(y,f,Ci),y!==null){$n=y;return}}else{if(y=Uq(y,f),y!==null){y.flags&=32767,$n=y;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{Gn=6,$n=null;return}}if(f=f.sibling,f!==null){$n=f;return}$n=f=l}while(f!==null);Gn===0&&(Gn=5)}function Nc(l,f,y){var N=Rt,T=Qi.transition;try{Qi.transition=null,Rt=1,Yq(l,f,y,N)}finally{Qi.transition=T,Rt=N}return null}function Yq(l,f,y,N){do Nd();while(sl!==null);if((zt&6)!==0)throw Error(n(327));y=l.finishedWork;var T=l.finishedLanes;if(y===null)return null;if(l.finishedWork=null,l.finishedLanes=0,y===l.current)throw Error(n(177));l.callbackNode=null,l.callbackPriority=0;var R=y.lanes|y.childLanes;if(kn(l,R),l===ar&&($n=ar=null,yr=0),(y.subtreeFlags&2064)===0&&(y.flags&2064)===0||vy||(vy=!0,YA(Uu,function(){return Nd(),null})),R=(y.flags&15990)!==0,(y.subtreeFlags&15990)!==0||R){R=Qi.transition,Qi.transition=null;var F=Rt;Rt=1;var X=zt;zt|=4,M_.current=null,Hq(l,y),LA(y,l),Wi(ut),lc=!!Ve,ut=Ve=null,l.current=y,Wq(y),zu(),zt=X,Rt=F,Qi.transition=R}else l.current=y;if(vy&&(vy=!1,sl=l,xy=T),R=l.pendingLanes,R===0&&(al=null),rc(y.stateNode),ai(l,Sn()),f!==null)for(N=l.onRecoverableError,y=0;y<f.length;y++)T=f[y],N(T.value,{componentStack:T.stack,digest:T.digest});if(yy)throw yy=!1,l=L_,L_=null,l;return(xy&1)!==0&&l.tag!==0&&Nd(),R=l.pendingLanes,(R&1)!==0?l===D_?ep++:(ep=0,D_=l):ep=0,tl(),null}function Nd(){if(sl!==null){var l=Lo(xy),f=Qi.transition,y=Rt;try{if(Qi.transition=null,Rt=16>l?16:l,sl===null)var N=!1;else{if(l=sl,sl=null,xy=0,(zt&6)!==0)throw Error(n(331));var T=zt;for(zt|=4,Ye=l.current;Ye!==null;){var R=Ye,F=R.child;
vendor: 6,380 bytes, line 40
40if((Ye.flags&16)!==0){var X=R.deletions;if(X!==null){for(var se=0;se<X.length;se++){var be=X[se];for(Ye=be;Ye!==null;){var Me=Ye;switch(Me.tag){case 0:case 11:case 15:Xh(8,Me,R)}var Ie=Me.child;if(Ie!==null)Ie.return=Me,Ye=Ie;else for(;Ye!==null;){Me=Ye;var Te=Me.sibling,Ke=Me.return;if(OA(Me),Me===be){Ye=null;break}if(Te!==null){Te.return=Ke,Ye=Te;break}Ye=Ke}}}var Qe=R.alternate;if(Qe!==null){var it=Qe.child;if(it!==null){Qe.child=null;do{var Rn=it.sibling;it.sibling=null,it=Rn}while(it!==null)}}Ye=R}}if((R.subtreeFlags&2064)!==0&&F!==null)F.return=R,Ye=F;else e:for(;Ye!==null;){if(R=Ye,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:Xh(9,R,R.return)}var me=R.sibling;if(me!==null){me.return=R.return,Ye=me;break e}Ye=R.return}}var ce=l.current;for(Ye=ce;Ye!==null;){F=Ye;var ye=F.child;if((F.subtreeFlags&2064)!==0&&ye!==null)ye.return=F,Ye=ye;else e:for(F=ce;Ye!==null;){if(X=Ye,(X.flags&2048)!==0)try{switch(X.tag){case 0:case 11:case 15:py(9,X)}}catch(st){An(X,X.return,st)}if(X===F){Ye=null;break e}var Fe=X.sibling;if(Fe!==null){Fe.return=X.return,Ye=Fe;break e}Ye=X.return}}if(zt=T,tl(),gi&&typeof gi.onPostCommitFiberRoot=="function")try{gi.onPostCommitFiberRoot(nc,l)}catch{}N=!0}return N}finally{Rt=y,Qi.transition=f}}return!1}function KA(l,f,y){f=_d(y,f),f=dA(l,f,1),l=rl(l,f,1),f=Wr(),l!==null&&(yi(l,1,f),ai(l,f))}function An(l,f,y){if(l.tag===3)KA(l,l,y);else for(;f!==null;){if(f.tag===3){KA(f,l,y);break}else if(f.tag===1){var N=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof N.componentDidCatch=="function"&&(al===null||!al.has(N))){l=_d(y,l),l=fA(f,l,1),f=rl(f,l,1),l=Wr(),f!==null&&(yi(f,1,l),ai(f,l));break}}f=f.return}}function Xq(l,f,y){var N=l.pingCache;N!==null&&N.delete(f),f=Wr(),l.pingedLanes|=l.suspendedLanes&y,ar===l&&(yr&y)===y&&(Gn===4||Gn===3&&(yr&130023424)===yr&&500>Sn()-I_?Sc(l,0):R_|=y),ai(l,f)}function GA(l,f){f===0&&((l.mode&1)===0?f=1:(f=Ro,Ro<<=1,(Ro&130023424)===0&&(Ro=4194304)));var y=Wr();l=Zs(l,f),l!==null&&(yi(l,f,y),ai(l,y))}function Qq(l){var f=l.memoizedState,y=0;f!==null&&(y=f.retryLane),GA(l,y)}function Jq(l,f){var y=0;switch(l.tag){case 13:var N=l.stateNode,T=l.memoizedState;T!==null&&(y=T.retryLane);break;case 19:N=l.stateNode;break;default:throw Error(n(314))}N!==null&&N.delete(f),GA(l,y)}var ZA;ZA=function(l,f,y){if(l!==null)if(l.memoizedProps!==f.pendingProps||ti.current)ri=!0;else{if((l.lanes&y)===0&&(f.flags&128)===0)return ri=!1,Bq(l,f,y);ri=(l.flags&131072)!==0}else ri=!1,wn&&(f.flags&1048576)!==0&&Pk(f,Xg,f.index);switch(f.lanes=0,f.tag){case 2:var N=f.type;fy(l,f),l=f.pendingProps;var T=hd(f,kr.current);xd(f,y),T=f_(null,f,N,l,T,y);var R=h_();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,ni(N)?(R=!0,Gg(f)):R=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,a_(f),T.updater=uy,f.stateNode=T,T._reactInternals=f,x_(f,N,l,y),f=j_(null,f,N,!0,R,y)):(f.tag=0,wn&&R&&Zb(f),Hr(null,f,T,y),f=f.child),f;case 16:N=f.elementType;e:{switch(fy(l,f),l=f.pendingProps,T=N._init,N=T(N._payload),f.type=N,T=f.tag=tH(N),l=Sa(N,l),T){case 0:f=w_(null,f,N,l,y);break e;case 1:f=_A(null,f,N,l,y);break e;case 11:f=gA(null,f,N,l,y);break e;case 14:f=yA(null,f,N,Sa(N.type,l),y);break e}throw Error(n(306,N,""))}return f;case 0:return N=f.type,T=f.pendingProps,T=f.elementType===N?T:Sa(N,T),w_(l,f,N,T,y);case 1:return N=f.type,T=f.pendingProps,T=f.elementType===N?T:Sa(N,T),_A(l,f,N,T,y);case 3:e:{if(wA(f),l===null)throw Error(n(387));N=f.pendingProps,R=f.memoizedState,T=R.element,Dk(l,f),ry(f,N,null,y);var F=f.memoizedState;if(N=F.element,R.isDehydrated)if(R={element:N,isDehydrated:!1,cache:F.cache,pendingSuspenseBoundaries:F.pendingSuspenseBoundaries,transitions:F.transitions},f.updateQueue.baseState=R,f.memoizedState=R,f.flags&256){T=_d(Error(n(423)),f),f=jA(l,f,N,y,T);break e}else if(N!==T){T=_d(Error(n(424)),f),f=jA(l,f,N,y,T);break e}else for(Ni=ts(f.stateNode.containerInfo.firstChild),Si=f,wn=!0,ja=null,y=Ik(f,null,N,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(gd(),N===T){f=Xs(l,f,y);break e}Hr(l,f,N,y)}f=f.child}return f;case 5:return Bk(f),l===null&&Qb(f),N=f.type,T=f.pendingProps,R=l!==null?l.memoizedProps:null,F=T.children,Nt(N,T)?F=null:R!==null&&Nt(N,R)&&(f.flags|=32),bA(l,f),Hr(l,f,F,y),f.child;case 6:return l===null&&Qb(f),null;case 13:return SA(l,f,y);case 4:return s_(f,f.stateNode.containerInfo),N=f.pendingProps,l===null?f.child=yd(f,null,N,y):Hr(l,f,N,y),f.child;case 11:return N=f.type,T=f.pendingProps,T=f.elementType===N?T:Sa(N,T),gA(l,f,N,T,y);case 7:return Hr(l,f,f.pendingProps,y),f.child;case 8:return Hr(l,f,f.pendingProps.children,y),f.child;case 12:return Hr(l,f,f.pendingProps.children,y),f.child;case 10:e:{if(N=f.type._context,T=f.pendingProps,R=f.memoizedProps,F=T.value,pn(ey,N._currentValue),N._currentValue=F,R!==null)if(wi(R.value,F)){if(R.children===T.children&&!ti.current){f=Xs(l,f,y);break e}}else for(R=f.child,R!==null&&(R.return=f);R!==null;){var X=R.dependencies;if(X!==null){F=R.child;for(var se=X.firstContext;se!==null;){if(se.context===N){if(R.tag===1){se=Ys(-1,y&-y),se.tag=2;var be=R.updateQueue;if(be!==null){be=be.shared;var Me=be.pending;Me===null?se.next=se:(se.next=Me.next,Me.next=se),be.pending=se}}R.lanes|=y,se=R.alternate,se!==null&&(se.lanes|=y),r_(R.return,y,f),X.lanes|=y;break}se=se.next}}else if(R.tag===10)F=R.type===f.type?null:R.child;else if(R.tag===18){if(F=R.return,F===null)throw Error(n(341));F.lanes|=y,X=F.alternate,X!==null&&(X.lanes|=y),r_(F,y,f),F=R.sibling}else F=R.child;if(F!==null)F.return=R;else for(F=R;F!==null;){if(F===f){F=null;break}if(R=F.sibling,R!==null){R.return=F.return,F=R;break}F=F.return}R=F}Hr(l,f,T.children,y),f=f.child}return f;case 9:return T=f.type,N=f.pendingProps.children,xd(f,y),T=Yi(T),N=N(T),f.flags|=1,Hr(l,f,N,y),f.child;case 14:return N=f.type,T=Sa(N,f.pendingProps),T=Sa(N.type,T),yA(l,f,N,T,y);case 15:return vA(l,f,f.type,f.pendingProps,y);case 17:return N=f.type,T=f.pendingProps,T=f.elementType===N?T:Sa(N,T),fy(l,f),f.tag=1,ni(N)?(l=!0,Gg(f)):l=!1,xd(f,y),cA(f,N,T),x_(f,N,T,y),j_(null,f,N,!0,l,y);case 19:return CA(l,f,y);case 22:return xA(l,f,y)}throw Error(n(156,f.tag))};function YA(l,f){return wg(l,f)}function eH(l,f,y,N){this.tag=l,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,188 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,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 Ji(l,f,y,N){return new eH(l,f,y,N)}function q_(l){return l=l.prototype,!(!l||!l.isReactComponent)}function tH(l){if(typeof l=="function")return q_(l)?1:0;if(l!=null){if(l=l.$$typeof,l===U)return 11;if(l===ee)return 14}return 2}function cl(l,f){var y=l.alternate;return y===null?(y=Ji(l.tag,f,l.key,l.mode),y.elementType=l.elementType,y.type=l.type,y.stateNode=l.stateNode,y.alternate=l,l.alternate=y):(y.pendingProps=f,y.type=l.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=l.flags&14680064,y.childLanes=l.childLanes,y.lanes=l.lanes,y.child=l.child,y.memoizedProps=l.memoizedProps,y.memoizedState=l.memoizedState,y.updateQueue=l.updateQueue,f=l.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=l.sibling,y.index=l.index,y.ref=l.ref,y}function jy(l,f,y,N,T,R){var F=2;if(N=l,typeof l=="function")q_(l)&&(F=1);else if(typeof l=="string")F=5;else e:switch(l){case I:return Cc(y.children,T,R,f);case $:F=8,T|=8;break;case q:return l=Ji(12,y,f,T|2),l.elementType=q,l.lanes=R,l;case z:return l=Ji(13,y,f,T),l.elementType=z,l.lanes=R,l;case Z:return l=Ji(19,y,f,T),l.elementType=Z,l.lanes=R,l;case oe:return Sy(y,T,R,f);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case V:F=10;break e;case H:F=9;break e;case U:F=11;break e;case ee:F=14;break e;case G:F=16,N=null;break e}throw Error(n(130,l==null?l:typeof l,""))}return f=Ji(F,y,f,T),f.elementType=l,f.type=N,f.lanes=R,f}function Cc(l,f,y,N){return l=Ji(7,l,N,f),l.lanes=y,l}function Sy(l,f,y,N){return l=Ji(22,l,N,f),l.elementType=oe,l.lanes=y,l.stateNode={isHidden:!1},l}function H_(l,f,y){return l=Ji(6,l,null,f),l.lanes=y,l}function W_(l,f,y){return f=Ji(4,l.children!==null?l.children:[],l.key,f),f.lanes=y,f.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},f}function nH(l,f,y,N,T){this.tag=f,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Io(0),this.expirationTimes=Io(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Io(0),this.identifierPrefix=N,this.onRecoverableError=T,this.mutableSourceEagerHydrationData=null}function V_(l,f,y,N,T,R,F,X,se){return l=new nH(l,f,y,X,se),f===1?(f=1,R===!0&&(f|=8)):f=0,R=Ji(3,null,null,f),l.current=R,R.stateNode=l,R.memoizedState={element:N,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},a_(R),l}function rH(l,f,y){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:N==null?null:""+N,children:l,containerInfo:f,implementation:y}}function XA(l){if(!l)return el;l=l._reactInternals;e:{if(Ka(l)!==l||l.tag!==1)throw Error(n(170));var f=l;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(ni(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(n(171))}if(l.tag===1){var y=l.type;if(ni(y))return Nk(l,y,f)}return f}function QA(l,f,y,N,T,R,F,X,se){return l=V_(y,N,!0,l,T,R,F,X,se),l.context=XA(null),y=l.current,N=Wr(),T=ol(y),R=Ys(N,T),R.callback=f??null,rl(y,R,T),l.current.lanes=T,yi(l,T,N),ai(l,N),l}function Ny(l,f,y,N){var T=f.current,R=Wr(),F=ol(T);return y=XA(y),f.context===null?f.context=y:f.pendingContext=y,f=Ys(R,F),f.payload={element:l},N=N===void 0?null:N,N!==null&&(f.callback=N),l=rl(T,f,F),l!==null&&(Ea(l,T,F,R),ny(l,T,F)),F}function Cy(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function JA(l,f){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var y=l.retryLane;l.retryLane=y!==0&&y<f?y:f}}function K_(l,f){JA(l,f),(l=l.alternate)&&JA(l,f)}function iH(){return null}var eO=typeof reportError=="function"?reportError:function(l){console.error(l)};function G_(l){this._internalRoot=l}Ey.prototype.render=G_.prototype.render=function(l){var f=this._internalRoot;if(f===null)throw Error(n(409));Ny(l,f,null,null)},Ey.prototype.unmount=G_.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var f=l.containerInfo;jc(function(){Ny(null,l,null,null)}),f[Zt]=null}};function Ey(l){this._internalRoot=l}Ey.prototype.unstable_scheduleHydration=function(l){if(l){var f=Ku();l={blockedOn:null,target:l,priority:f};for(var y=0;y<Wn.length&&f!==0&&f<Wn[y].priority;y++);Wn.splice(y,0,l),y===0&&Gu(l)}};function Z_(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function Py(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function tO(){}function aH(l,f,y,N,T){if(T){if(typeof N=="function"){var R=N;N=function(){var be=Cy(F);R.call(be)}}var F=QA(f,N,l,0,null,!1,!1,"",tO);
vendor: 5,507 bytes, line 40
40return l._reactRootContainer=F,l[Zt]=F.current,Zo(l.nodeType===8?l.parentNode:l),jc(),F}for(;T=l.lastChild;)l.removeChild(T);if(typeof N=="function"){var X=N;N=function(){var be=Cy(se);X.call(be)}}var se=V_(l,0,!1,null,null,!1,!1,"",tO);return l._reactRootContainer=se,l[Zt]=se.current,Zo(l.nodeType===8?l.parentNode:l),jc(function(){Ny(f,se,y,N)}),se}function ky(l,f,y,N,T){var R=y._reactRootContainer;if(R){var F=R;if(typeof T=="function"){var X=T;T=function(){var se=Cy(F);X.call(se)}}Ny(f,F,l,T)}else F=aH(y,f,l,T,N);return Cy(F)}Wu=function(l){switch(l.tag){case 3:var f=l.stateNode;if(f.current.memoizedState.isDehydrated){var y=bt(f.pendingLanes);y!==0&&(va(f,y|1),ai(f,Sn()),(zt&6)===0&&(Sd=Sn()+500,tl()))}break;case 13:jc(function(){var N=Zs(l,1);if(N!==null){var T=Wr();Ea(N,l,1,T)}}),K_(l,1)}},Rs=function(l){if(l.tag===13){var f=Zs(l,134217728);if(f!==null){var y=Wr();Ea(f,l,134217728,y)}K_(l,134217728)}},Vu=function(l){if(l.tag===13){var f=ol(l),y=Zs(l,f);if(y!==null){var N=Wr();Ea(y,l,f,N)}K_(l,f)}},Ku=function(){return Rt},ic=function(l,f){var y=Rt;try{return Rt=l,f()}finally{Rt=y}},$u=function(l,f,y){switch(f){case"input":if(rt(l,y),f=y.name,y.type==="radio"&&f!=null){for(y=l;y.parentNode;)y=y.parentNode;for(y=y.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]'),f=0;f<y.length;f++){var N=y[f];if(N!==l&&N.form===l.form){var T=dd(N);if(!T)throw Error(n(90));re(N),rt(N,T)}}}break;case"textarea":qe(l,y);break;case"select":f=y.value,f!=null&&qt(l,!!y.multiple,f,!1)}},gg=B_,yg=jc;var sH={usingClientEntryPoint:!1,Events:[Hs,Ws,dd,pg,mg,B_]},tp={findFiberByHostInstance:qs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},oH={bundleType:tp.bundleType,version:tp.version,rendererPackageName:tp.rendererPackageName,rendererConfig:tp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=bg(l),l===null?null:l.stateNode},findFiberByHostInstance:tp.findFiberByHostInstance||iH,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 Ay=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ay.isDisabled&&Ay.supportsFiber)try{nc=Ay.inject(oH),gi=Ay}catch{}}return si.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sH,si.createPortal=function(l,f){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Z_(f))throw Error(n(200));return rH(l,f,null,y)},si.createRoot=function(l,f){if(!Z_(l))throw Error(n(299));var y=!1,N="",T=eO;return f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(N=f.identifierPrefix),f.onRecoverableError!==void 0&&(T=f.onRecoverableError)),f=V_(l,1,!1,null,null,y,!1,N,T),l[Zt]=f.current,Zo(l.nodeType===8?l.parentNode:l),new G_(f)},si.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var f=l._reactInternals;if(f===void 0)throw typeof l.render=="function"?Error(n(188)):(l=Object.keys(l).join(","),Error(n(268,l)));return l=bg(f),l=l===null?null:l.stateNode,l},si.flushSync=function(l){return jc(l)},si.hydrate=function(l,f,y){if(!Py(f))throw Error(n(200));return ky(null,l,f,!0,y)},si.hydrateRoot=function(l,f,y){if(!Z_(l))throw Error(n(405));var N=y!=null&&y.hydratedSources||null,T=!1,R="",F=eO;if(y!=null&&(y.unstable_strictMode===!0&&(T=!0),y.identifierPrefix!==void 0&&(R=y.identifierPrefix),y.onRecoverableError!==void 0&&(F=y.onRecoverableError)),f=QA(f,null,l,1,y??null,T,!1,R,F),l[Zt]=f.current,Zo(l),N)for(l=0;l<N.length;l++)y=N[l],T=y._getVersion,T=T(y._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[y,T]:f.mutableSourceEagerHydrationData.push(y,T);return new Ey(f)},si.render=function(l,f,y){if(!Py(f))throw Error(n(200));return ky(null,l,f,!1,y)},si.unmountComponentAtNode=function(l){if(!Py(l))throw Error(n(40));return l._reactRootContainer?(jc(function(){ky(null,null,l,!1,function(){l._reactRootContainer=null,l[Zt]=null})}),!0):!1},si.unstable_batchedUpdates=B_,si.unstable_renderSubtreeIntoContainer=function(l,f,y,N){if(!Py(y))throw Error(n(200));if(l==null||l._reactInternals===void 0)throw Error(n(38));return ky(l,f,y,!1,N)},si.version="18.3.1-next-f1338f8080-20240426",si}var uO;function z3(){if(uO)return J_.exports;uO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),J_.exports=yH(),J_.exports}var dO;function vH(){if(dO)return My;dO=1;var e=z3();return My.createRoot=e.createRoot,My.hydrateRoot=e.hydrateRoot,My}var xH=vH();const bH=Kt(xH),_H=20,wH=1e6,so={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let nw=0;function jH(){return nw=(nw+1)%Number.MAX_VALUE,nw.toString()}const rw=new Map,fO=e=>{if(rw.has(e))return;const t=setTimeout(()=>{rw.delete(e),Ap({type:so.REMOVE_TOAST,toastId:e})},wH);rw.set(e,t)},SH=(e,t)=>{switch(t.type){case so.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,_H)};case so.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case so.DISMISS_TOAST:{const{toastId:n}=t;
40return n?fO(n):e.toasts.forEach(r=>{fO(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case so.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},uv=[];let dv={toasts:[]};function Ap(e){dv=SH(dv,e),uv.forEach(t=>{t(dv)})}function NH({...e}){const t=jH(),n=i=>Ap({type:so.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>Ap({type:so.DISMISS_TOAST,toastId:t});return Ap({type:so.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function zf(){const[e,t]=P.useState(dv);return P.useEffect(()=>(uv.push(t),()=>{const n=uv.indexOf(t);n>-1&&uv.splice(n,1)}),[e]),{...e,toast:NH,dismiss:n=>Ap({type:so.DISMISS_TOAST,toastId:n})}}function U3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=U3(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=U3(e))&&(r&&(r+=" "),r+=t);return r}const hO=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pO=jt,zm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pO(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(h=>{const p=n==null?void 0:n[h],m=s==null?void 0:s[h];if(p===null)return null;const v=hO(p)||hO(m);return i[h][v]}),c=n&&Object.entries(n).reduce((h,p)=>{let[m,v]=p;return v===void 0||(h[m]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:v,...x}=p;return Object.entries(x).every(w=>{let[b,_]=w;return Array.isArray(_)?_.includes({...s,...c}[b]):{...s,...c}[b]===_})?[...h,m,v]:h},[]);return pO(e,o,d,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.475.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 CH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),q3=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.475.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 EH={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.475.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 PH=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...c},d)=>P.createElement("svg",{ref:d,...EH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:q3("lucide",i),...c},[...o.map(([h,p])=>P.createElement(h,p)),...Array.isArray(s)?s:[s]]));/**
56 * @license lucide-react v0.475.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 Pe=(e,t)=>{const n=P.forwardRef(({className:r,...i},s)=>P.createElement(PH,{ref:s,iconNode:t,className:q3(`lucide-${CH(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.475.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 kH=[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]],AH=Pe("Accessibility",kH);/**
66 * @license lucide-react v0.475.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 OH=[["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
70-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Jx=Pe("Activity",OH);/**
71 * @license lucide-react v0.475.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 TH=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],e0=Pe("ArrowLeft",TH);/**
76 * @license lucide-react v0.475.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 MH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Lr=Pe("ArrowRight",MH);/**
81 * @license lucide-react v0.475.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 RH=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],Bp=Pe("Award",RH);/**
86 * @license lucide-react v0.475.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 IH=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],H3=Pe("Banknote",IH);/**
91 * @license lucide-react v0.475.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 LH=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],DH=Pe("Bell",LH);/**
96 * @license lucide-react v0.475.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 $H=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Oi=Pe("Bot",$H);/**
101 * @license lucide-react v0.475.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 FH=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],W3=Pe("Brain",FH);/**
106 * @license lucide-react v0.475.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 BH=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ri=Pe("Briefcase",BH);/**
111 * @license lucide-react v0.475.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 zH=[["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"}]],er=Pe("Building2",zH);/**
116 * @license lucide-react v0.475.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 UH=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],ho=Pe("Calendar",UH);/**
121 * @license lucide-react v0.475.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 qH=[["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"}]],c2=Pe("ChartColumn",qH);/**
126 * @license lucide-react v0.475.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 HH=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],V3=Pe("ChartLine",HH);/**
131 * @license lucide-react v0.475.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 WH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Su=Pe("Check",WH);/**
136 * @license lucide-react v0.475.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 VH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kv=Pe("ChevronDown",VH);/**
141 * @license lucide-react v0.475.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 KH=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],K3=Pe("ChevronLeft",KH);/**
146 * @license lucide-react v0.475.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 GH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],t0=Pe("ChevronRight",GH);/**
151 * @license lucide-react v0.475.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 ZH=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],YH=Pe("ChevronUp",ZH);/**
156 * @license lucide-react v0.475.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 XH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],$i=Pe("CircleAlert",XH);/**
161 * @license lucide-react v0.475.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 QH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Un=Pe("CircleCheck",QH);/**
166 * @license lucide-react v0.475.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 JH=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],eW=Pe("CircleDashed",JH);/**
171 * @license lucide-react v0.475.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 tW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],nu=Pe("CircleX",tW);/**
176 * @license lucide-react v0.475.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 nW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rW=Pe("Circle",nW);/**
181 * @license lucide-react v0.475.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 iW=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],aW=Pe("ClipboardCheck",iW);/**
186 * @license lucide-react v0.475.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 sW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Bn=Pe("Clock",sW);/**
191 * @license lucide-react v0.475.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 oW=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],G3=Pe("CodeXml",oW);/**
196 * @license lucide-react v0.475.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 lW=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cW=Pe("Compass",lW);/**
201 * @license lucide-react v0.475.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 uW=[["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"}]],n0=Pe("Copy",uW);/**
206 * @license lucide-react v0.475.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 dW=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}
210],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],lf=Pe("Cpu",dW);/**
211 * @license lucide-react v0.475.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 fW=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],zN=Pe("CreditCard",fW);/**
216 * @license lucide-react v0.475.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 hW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]],iw=Pe("Crosshair",hW);/**
221 * @license lucide-react v0.475.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 pW=[["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"}]],aw=Pe("Database",pW);/**
226 * @license lucide-react v0.475.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 mW=[["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"}]],zl=Pe("DollarSign",mW);/**
231 * @license lucide-react v0.475.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 gW=[["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"}]],Fr=Pe("Download",gW);/**
236 * @license lucide-react v0.475.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 yW=[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]],vW=Pe("Droplets",yW);/**
241 * @license lucide-react v0.475.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 xW=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ca=Pe("Earth",xW);/**
246 * @license lucide-react v0.475.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 bW=[["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"}]],fa=Pe("ExternalLink",bW);/**
251 * @license lucide-react v0.475.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 _W=[["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"}]],wW=Pe("EyeOff",_W);/**
256 * @license lucide-react v0.475.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 jW=[["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"}]],Av=Pe("Eye",jW);/**
261 * @license lucide-react v0.475.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 SW=[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]],Z3=Pe("Factory",SW);/**
266 * @license lucide-react v0.475.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 NW=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",ke
270y:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],CW=Pe("FileQuestion",NW);/**
271 * @license lucide-react v0.475.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 EW=[["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"}]],ur=Pe("FileText",EW);/**
276 * @license lucide-react v0.475.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 PW=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],r0=Pe("Filter",PW);/**
281 * @license lucide-react v0.475.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 kW=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],AW=Pe("Fingerprint",kW);/**
286 * @license lucide-react v0.475.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 OW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],TW=Pe("Frown",OW);/**
291 * @license lucide-react v0.475.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 MW=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],RW=Pe("GitMerge",MW);/**
296 * @license lucide-react v0.475.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 IW=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ou=Pe("Globe",IW);/**
301 * @license lucide-react v0.475.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 LW=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],u2=Pe("GraduationCap",LW);/**
306 * @license lucide-react v0.475.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 DW=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],d2=Pe("Grid3x3",DW);/**
311 * @license lucide-react v0.475.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 $W=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],f2=Pe("Handshake",$W);/**
316 * @license lucide-react v0.475.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 FW=[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]],BW=Pe("HardHat",FW);/**
321 * @license lucide-react v0.475.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 zW=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]],UN=Pe("HeartPulse",zW);/**
326 * @license lucide-react v0.475.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 UW=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],qW=Pe("Inbox",UW);/**
331 * @license lucide-react v0.475.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 HW=[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]],Ti=Pe("Landmark",HW);/**
336 * @license lucide-react v0.475.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const WW=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],qN=Pe("Layers",WW);/**
341 * @license lucide-react v0.475.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const VW=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Y3=Pe("LayoutDashboard",VW);/**
346 * @license lucide-react v0.475.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const KW=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],X3=Pe("Leaf",KW);/**
351 * @license lucide-react v0.475.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const GW=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],sa=Pe("Lightbulb",GW);/**
356 * @license lucide-react v0.475.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const ZW=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Q3=Pe("Link2",ZW);/**
361 * @license lucide-react v0.475.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const YW=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],zp=Pe("Linkedin",YW);/**
366 * @license lucide-react v0.475.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const XW=[["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"}]],h2=Pe("List",XW);/**
371 * @license lucide-react v0.475.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const QW=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ln=Pe("LoaderCircle",QW);/**
376 * @license lucide-react v0.475.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const JW=[["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"}]],Tl=Pe("Lock",JW);/**
381 * @license lucide-react v0.475.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const eV=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],tV=Pe("LogOut",eV);/**
386 * @license lucide-react v0.475.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const nV=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Nu=Pe("Mail",nV);/**
391 * @license lucide-react v0.475.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const rV=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Cu=Pe("MapPin",rV);/**
396 * @license lucide-react v0.475.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const iV=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],aV=Pe("Maximize2",iV);/**
401 * @license lucide-react v0.475.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const sV=[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]],oV=Pe("Medal",sV);/**
406 * @license lucide-react v0.475.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const lV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"8",x2:"16",y1:"15",y2:"15",key:"1xb1d9"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}
410]],J3=Pe("Meh",lV);/**
411 * @license lucide-react v0.475.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const cV=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],uV=Pe("Menu",cV);/**
416 * @license lucide-react v0.475.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const dV=[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]],fV=Pe("Merge",dV);/**
421 * @license lucide-react v0.475.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const hV=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],pV=Pe("MessageCircle",hV);/**
426 * @license lucide-react v0.475.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const mV=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],cf=Pe("MessageSquarePlus",mV);/**
431 * @license lucide-react v0.475.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const gV=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],yV=Pe("MessageSquare",gV);/**
436 * @license lucide-react v0.475.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const vV=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ov=Pe("Minus",vV);/**
441 * @license lucide-react v0.475.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const xV=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],mO=Pe("Network",xV);/**
446 * @license lucide-react v0.475.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const bV=[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]],gO=Pe("Newspaper",bV);/**
451 * @license lucide-react v0.475.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const _V=[["circle",{cx:"11",cy:"4",r:"2",key:"vol9p0"}],["circle",{cx:"18",cy:"8",r:"2",key:"17gozi"}],["circle",{cx:"20",cy:"16",r:"2",key:"1v9bxh"}],["path",{d:"M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z",key:"1ydw1z"}]],wV=Pe("PawPrint",_V);/**
456 * @license lucide-react v0.475.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const jV=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],SV=Pe("Pen",jV);/**
461 * @license lucide-react v0.475.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const NV=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],p2=Pe("Phone",NV);/**
466 * @license lucide-react v0.475.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const CV=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],EV=Pe("Play",CV);/**
471 * @license lucide-react v0.475.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const PV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Um=Pe("Plus",PV);/**
476 * @license lucide-react v0.475.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const kV=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],AV=Pe("Quote",kV);/**
481 * @license lucide-react v0.475.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const OV=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}
485],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],TV=Pe("Radar",OV);/**
486 * @license lucide-react v0.475.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const MV=[["path",{d:"M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5",key:"x6z5xu"}],["path",{d:"M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12",key:"1x4zh5"}],["path",{d:"m14 16-3 3 3 3",key:"f6jyew"}],["path",{d:"M8.293 13.596 7.196 9.5 3.1 10.598",key:"wf1obh"}],["path",{d:"m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843",key:"9tzpgr"}],["path",{d:"m13.378 9.633 4.096 1.098 1.097-4.096",key:"1oe83g"}]],RV=Pe("Recycle",MV);/**
491 * @license lucide-react v0.475.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const IV=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Tv=Pe("RefreshCw",IV);/**
496 * @license lucide-react v0.475.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const LV=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Up=Pe("Rocket",LV);/**
501 * @license lucide-react v0.475.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const DV=[["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"}]],yO=Pe("Save",DV);/**
506 * @license lucide-react v0.475.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const $V=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],Mv=Pe("Scale",$V);/**
511 * @license lucide-react v0.475.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const FV=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],hr=Pe("Search",FV);/**
516 * @license lucide-react v0.475.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const BV=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],HN=Pe("Send",BV);/**
521 * @license lucide-react v0.475.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const zV=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],e$=Pe("Settings",zV);/**
526 * @license lucide-react v0.475.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const UV=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
530y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],i0=Pe("ShieldAlert",UV);/**
531 * @license lucide-react v0.475.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const qV=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ha=Pe("ShieldCheck",qV);/**
536 * @license lucide-react v0.475.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const HV=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],pi=Pe("Shield",HV);/**
541 * @license lucide-react v0.475.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const WV=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6",key:"pcx96s"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z",key:"1b4s83"}],["path",{d:"M21 12h1",key:"jtio3y"}],["path",{d:"M18.5 4.5 18 5",key:"g5sp9y"}],["path",{d:"M2 12h1",key:"1uaihz"}],["path",{d:"M12 2v1",key:"11qlp1"}],["path",{d:"m4.929 4.929.707.707",key:"1i51kw"}],["path",{d:"M12 12v6",key:"3ahymv"}]],VV=Pe("Siren",WV);/**
546 * @license lucide-react v0.475.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const KV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],GV=Pe("Smile",KV);/**
551 * @license lucide-react v0.475.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const ZV=[["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"}]],qm=Pe("Sparkles",ZV);/**
556 * @license lucide-react v0.475.0 - ISC
557 *
558 * This source code is licensed under the ISC license.
559 * See the LICENSE file in the root directory of this source tree.
560 */const YV=[["path",{d:"M7 20h10",key:"e6iznv"}],["path",{d:"M10 20c5.5-2.5.8-6.4 3-10",key:"161w41"}],["path",{d:"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",key:"9gtqwd"}],["path",{d:"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",key:"bkxnd2"}]],XV=Pe("Sprout",YV);/**
561 * @license lucide-react v0.475.0 - ISC
562 *
563 * This source code is licensed under the ISC license.
564 * See the LICENSE file in the root directory of this source tree.
565 */const QV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Rv=Pe("Target",QV);/**
566 * @license lucide-react v0.475.0 - ISC
567 *
568 * This source code is licensed under the ISC license.
569 * See the LICENSE file in the root directory of this source tree.
570 */const JV=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],eK=Pe("ThumbsDown",JV);/**
571 * @license lucide-react v0.475.0 - ISC
572 *
573 * This source code is licensed under the ISC license.
574 * See the LICENSE file in the root directory of this source tree.
575 */const tK=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],t$=Pe("ThumbsUp",tK);/**
576 * @license lucide-react v0.475.0 - ISC
577 *
578 * This source code is licensed under the ISC license.
579 * See the LICENSE file in the root directory of this source tree.
580 */const nK=[["path",{d:"m10 11 11 .9a1 1 0 0 1 .8 1.1l-.665 4.158a1 1 0 0 1-.988.842H20",key:"she1j9"}],["path",{d:"M16 18h-5",key:"bq60fd"}],["path",{d:"M18 5a1 1 0 0 0-1 1v5.573",key:"1kv8ia"}],["path",{d:"M3 4h8.129a1 1 0 0 1 .99.863L13 11.246",key:"1q1ert"}],["path",{d:"M4 11V4",key:"9ft8pt"}],["path",{d:"M7 15h.01",key:"k5ht0j"}
580],["path",{d:"M8 10.1V4",key:"1jgyzo"}],["circle",{cx:"18",cy:"18",r:"2",key:"1emm8v"}],["circle",{cx:"7",cy:"15",r:"5",key:"ddtuc"}]],n$=Pe("Tractor",nK);/**
581 * @license lucide-react v0.475.0 - ISC
582 *
583 * This source code is licensed under the ISC license.
584 * See the LICENSE file in the root directory of this source tree.
585 */const rK=[["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"}]],Hm=Pe("TrendingDown",rK);/**
586 * @license lucide-react v0.475.0 - ISC
587 *
588 * This source code is licensed under the ISC license.
589 * See the LICENSE file in the root directory of this source tree.
590 */const iK=[["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"}]],pr=Pe("TrendingUp",iK);/**
591 * @license lucide-react v0.475.0 - ISC
592 *
593 * This source code is licensed under the ISC license.
594 * See the LICENSE file in the root directory of this source tree.
595 */const aK=[["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"}]],po=Pe("TriangleAlert",aK);/**
596 * @license lucide-react v0.475.0 - ISC
597 *
598 * This source code is licensed under the ISC license.
599 * See the LICENSE file in the root directory of this source tree.
600 */const sK=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],r$=Pe("Trophy",sK);/**
601 * @license lucide-react v0.475.0 - ISC
602 *
603 * This source code is licensed under the ISC license.
604 * See the LICENSE file in the root directory of this source tree.
605 */const oK=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],lK=Pe("Truck",oK);/**
606 * @license lucide-react v0.475.0 - ISC
607 *
608 * This source code is licensed under the ISC license.
609 * See the LICENSE file in the root directory of this source tree.
610 */const cK=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],uK=Pe("Twitter",cK);/**
611 * @license lucide-react v0.475.0 - ISC
612 *
613 * This source code is licensed under the ISC license.
614 * See the LICENSE file in the root directory of this source tree.
615 */const dK=[["path",{d:"M22 12a10.06 10.06 1 0 0-20 0Z",key:"1teyop"}],["path",{d:"M12 12v8a2 2 0 0 0 4 0",key:"ulpmoc"}],["path",{d:"M12 2v1",key:"11qlp1"}]],fK=Pe("Umbrella",dK);/**
616 * @license lucide-react v0.475.0 - ISC
617 *
618 * This source code is licensed under the ISC license.
619 * See the LICENSE file in the root directory of this source tree.
620 */const hK=[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]],i$=Pe("UserCheck",hK);/**
621 * @license lucide-react v0.475.0 - ISC
622 *
623 * This source code is licensed under the ISC license.
624 * See the LICENSE file in the root directory of this source tree.
625 */const pK=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],mK=Pe("UserPlus",pK);/**
626 * @license lucide-react v0.475.0 - ISC
627 *
628 * This source code is licensed under the ISC license.
629 * See the LICENSE file in the root directory of this source tree.
630 */const gK=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],yK=Pe("User",gK);/**
631 * @license lucide-react v0.475.0 - ISC
632 *
633 * This source code is licensed under the ISC license.
634 * See the LICENSE file in the root directory of this source tree.
635 */const vK=[["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"}]],tr=Pe("Users",vK);/**
636 * @license lucide-react v0.475.0 - ISC
637 *
638 * This source code is licensed under the ISC license.
639 * See the LICENSE file in the root directory of this source tree.
640 */const xK=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],bK=Pe("Wallet",xK);/**
641 * @license lucide-react v0.475.0 - ISC
642 *
643 * This source code is licensed under the ISC license.
644 * See the LICENSE file in the root directory of this source tree.
645 */const _K=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,074 bytes, lines 645-650
645],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xo=Pe("X",_K);/**
646 * @license lucide-react v0.475.0 - ISC
647 *
648 * This source code is licensed under the ISC license.
649 * See the LICENSE file in the root directory of this source tree.
650 */const wK=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],jK=Pe("Zap",wK),m2="-",SK=e=>{const t=CK(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const c=o.split(m2);return c[0]===""&&c.length!==1&&c.shift(),a$(c,t)||NK(o)},getConflictingClassGroupIds:(o,c)=>{const d=n[o]||[];return c&&r[o]?[...d,...r[o]]:d}}},a$=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?a$(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(m2);return(o=t.validators.find(({validator:c})=>c(s)))==null?void 0:o.classGroupId},vO=/^\[(.+)\]$/,NK=e=>{if(vO.test(e)){const t=vO.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},CK=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)WN(n[i],r,i,t);return r},WN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:xO(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(EK(i)){WN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{WN(o,xO(t,s),n,r)})})},xO=(e,t)=>{let n=e;return t.split(m2).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},EK=e=>e.isThemeGetter,PK=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},VN="!",KN=":",kK=KN.length,AK=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let o=0,c=0,d=0,h;for(let w=0;w<i.length;w++){let b=i[w];if(o===0&&c===0){if(b===KN){s.push(i.slice(d,w)),d=w+kK;continue}if(b==="/"){h=w;continue}}b==="["?o++:b==="]"?o--:b==="("?c++:b===")"&&c--}const p=s.length===0?i:i.substring(d),m=OK(p),v=m!==p,x=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:x}};if(t){const i=t+KN,s=r;r=o=>o.startsWith(i)?s(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},OK=e=>e.endsWith(VN)?e.substring(0,e.length-1):e.startsWith(VN)?e.substring(1):e,TK=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(o=>{o[0]==="["||t[o]?(i.push(...s.sort(),o),s=[]):s.push(o)}),i.push(...s.sort()),i}},MK=e=>({cache:PK(e.cacheSize),parseClassName:AK(e),sortModifiers:TK(e),...SK(e)}),RK=/\s+/,IK=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],c=e.trim().split(RK);let d="";for(let h=c.length-1;h>=0;h-=1){const p=c[h],{isExternal:m,modifiers:v,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:b}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let _=!!b,j=r(_?w.substring(0,b):w);if(!j){if(!_){d=p+(d.length>0?" "+d:d);continue}if(j=r(w),!j){d=p+(d.length>0?" "+d:d);continue}_=!1}const C=s(v).join(":"),E=x?C+VN:C,A=E+j;if(o.includes(A))continue;o.push(A);const k=i(j,_);for(let M=0;M<k.length;++M){const I=k[M];o.push(E+I)}d=p+(d.length>0?" "+d:d)}return d};function LK(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=s$(t))&&(r&&(r+=" "),r+=n);return r}const s$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=s$(e[r]))&&(n&&(n+=" "),n+=t);return n};function DK(e,...t){let n,r,i,s=o;function o(d){const h=t.reduce((p,m)=>m(p),e());return n=MK(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const p=IK(d,n);return i(d,p),p}return function(){return s(LK.apply(null,arguments))}}const Zn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},o$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,l$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$K=/^\d+\/\d+$/,FK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BK=/\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$/,zK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cd=e=>$K.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),dl=e=>!!e&&Number.isInteger(Number(e)),sw=e=>e.endsWith("%")&&kt(e.slice(0,-1)),Js=e=>FK.test(e),HK=()=>!0,WK=e=>BK.test(e)&&!zK.test(e),c$=()=>!1,VK=e=>UK.test(e),KK=e=>qK.test(e),GK=e=>!Je(e)&&!et(e),ZK=e=>Uf(e,f$,c$),Je=e=>o$.test(e),Ec=e=>Uf(e,h$,WK),ow=e=>Uf(e,eG,kt),bO=e=>Uf(e,u$,c$),YK=e=>
vendor: 4,101 bytes, line 650
650Uf(e,d$,KK),Ry=e=>Uf(e,p$,VK),et=e=>l$.test(e),rp=e=>qf(e,h$),XK=e=>qf(e,tG),_O=e=>qf(e,u$),QK=e=>qf(e,f$),JK=e=>qf(e,d$),Iy=e=>qf(e,p$,!0),Uf=(e,t,n)=>{const r=o$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},qf=(e,t,n=!1)=>{const r=l$.exec(e);return r?r[1]?t(r[1]):n:!1},u$=e=>e==="position"||e==="percentage",d$=e=>e==="image"||e==="url",f$=e=>e==="length"||e==="size"||e==="bg-size",h$=e=>e==="length",eG=e=>e==="number",tG=e=>e==="family-name",p$=e=>e==="shadow",nG=()=>{const e=Zn("color"),t=Zn("font"),n=Zn("text"),r=Zn("font-weight"),i=Zn("tracking"),s=Zn("leading"),o=Zn("breakpoint"),c=Zn("container"),d=Zn("spacing"),h=Zn("radius"),p=Zn("shadow"),m=Zn("inset-shadow"),v=Zn("text-shadow"),x=Zn("drop-shadow"),w=Zn("blur"),b=Zn("perspective"),_=Zn("aspect"),j=Zn("ease"),C=Zn("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...A(),et,Je],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],$=()=>[et,Je,d],q=()=>[Cd,"full","auto",...$()],V=()=>[dl,"none","subgrid",et,Je],H=()=>["auto",{span:["full",dl,et,Je]},dl,et,Je],U=()=>[dl,"auto",et,Je],z=()=>["auto","min","max","fr",et,Je],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...$()],oe=()=>[Cd,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],W=()=>[e,et,Je],ie=()=>[...A(),_O,bO,{position:[et,Je]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",QK,ZK,{size:[et,Je]}],ne=()=>[sw,rp,Ec],ve=()=>["","none","full",h,et,Je],je=()=>["",kt,rp,Ec],Y=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[kt,sw,_O,bO],_e=()=>["","none",w,et,Je],de=()=>["none",kt,et,Je],we=()=>["none",kt,et,Je],ke=()=>[kt,et,Je],re=()=>[Cd,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Js],breakpoint:[Js],color:[HK],container:[Js],"drop-shadow":[Js],ease:["in","out","in-out"],font:[GK],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Js],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Js],shadow:[Js],spacing:["px",kt],text:[Js],"text-shadow":[Js],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Cd,Je,et,_]}],container:["container"],columns:[{columns:[kt,Je,et,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{start:q()}],end:[{end:q()}],top:[{top:q()}
vendor: 11,627 bytes, line 650
650],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[dl,"auto",et,Je]}],basis:[{basis:[Cd,"full","auto",c,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,Cd,"auto","initial","none",Je]}],grow:[{grow:["",kt,et,Je]}],shrink:[{shrink:["",kt,et,Je]}],order:[{order:[dl,"first","last","none",et,Je]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[c,"screen",...oe()]}],"min-w":[{"min-w":[c,"screen","none",...oe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[o]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",n,rp,Ec]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,et,ow]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sw,Je]}],"font-family":[{font:[XK,Je,t]}],"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:[i,et,Je]}],"line-clamp":[{"line-clamp":[kt,"none",et,ow]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",et,Je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",et,Je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",et,Ec]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[kt,"auto",et,Je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et,Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et,Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dl,et,Je],radial:["",et,Je],conic:[dl,et,Je]},JK,YK]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:ve()}],"rounded-s":[{"rounded-s":ve()}],"rounded-e":[{"rounded-e":ve()}],"rounded-t":[{"rounded-t":ve()}],"rounded-r":[{"rounded-r":ve()}],"rounded-b":[{"rounded-b":ve()}],"rounded-l":[{"rounded-l":ve()}],"rounded-ss":[{"rounded-ss":ve()}],"rounded-se":[{"rounded-se":ve()}],"rounded-ee":[{"rounded-ee":ve()}],"rounded-es":[{"rounded-es":ve()}],"rounded-tl":[{"rounded-tl":ve()}],"rounded-tr":[{"rounded-tr":ve()}],"rounded-br":[{"rounded-br":ve()}],"rounded-bl":[{"rounded-bl":ve()}],"border-w":[{border:je()}],"border-w-x":[{"border-x":je()}],"border-w-y":[{"border-y":je()}],"border-w-s":[{"border-s":je()}],"border-w-e":[{"border-e":je()}],"border-w-t":[{"border-t":je()}],"border-w-r":[{"border-r":je()}],"border-w-b":[{"border-b":je()}],"border-w-l":[{"border-l":je()}],"divide-x":[{"divide-x":je()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":je()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,et,Je]}],"outline-w":[{outline:["",kt,rp,Ec]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",p,Iy,Ry]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",m,Iy,Ry]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[kt,Ec]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":je()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Iy,Ry]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[kt,et,Je]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[et,Je]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",et,Je]}],filter:[{filter:["","none",et,Je]}],blur:[{blur:_e()}],brightness:[{brightness:[kt,et,Je]}],contrast:[{contrast:[kt,et,Je]}],"drop-shadow":[{"drop-shadow":["","none",x,Iy,Ry]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",kt,et,Je]}],"hue-rotate":[{"hue-rotate":[kt,et,Je]}],invert:[{invert:["",kt,et,Je]}],saturate:[{saturate:[kt,et,Je]}],sepia:[{sepia:["",kt,et,Je]}],"backdrop-filter":[{"backdrop-filter":["","none",et,Je]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[kt,et,Je]}],"backdrop-contrast":[{"backdrop-contrast":[kt,et,Je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,et,Je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,et,Je]}],"backdrop-invert":[{"backdrop-invert":["",kt,et,Je]}],"backdrop-opacity":[{"backdrop-opacity":[kt,et,Je]}],"backdrop-saturate":[{"backdrop-saturate":[kt,et,Je]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,et,Je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",et,Je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",et,Je]}],ease:[{ease:["linear","initial",j,et,Je]}],delay:[{delay:[kt,et,Je]}],animate:[{animate:["none",C,et,Je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,et,Je]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[et,Je,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}
vendor: 6,657 bytes, line 650
650],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et,Je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et,Je]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[kt,rp,Ec,ow]}],stroke:[{stroke:["none",...W()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},rG=DK(nG);function ze(...e){return rG(jt(e))}const m$=P.forwardRef(({...e},t)=>a.jsx("div",{ref:t,className:"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}));m$.displayName="ToastProvider";const g$=P.forwardRef(({...e},t)=>a.jsx("div",{ref:t,className:"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}));g$.displayName="ToastViewport";const iG=zm("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"}}),y$=P.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,className:ze(iG({variant:t}),e),...n}));y$.displayName="Toast";const aG=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));aG.displayName="ToastAction";const v$=P.forwardRef(({className:e,...t},n)=>a.jsx("button",{ref:n,className:ze("absolute right-2 top-2 rounded-md p-1 text-foreground
650/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(xo,{className:"h-4 w-4"})}));v$.displayName="ToastClose";const x$=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("text-sm font-semibold",e),...t}));x$.displayName="ToastTitle";const b$=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("text-sm opacity-90",e),...t}));b$.displayName="ToastDescription";function sG(){const{toasts:e}=zf();return a.jsxs(m$,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return a.jsxs(y$,{...s,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(x$,{children:n}),r&&a.jsx(b$,{children:r})]}),i,a.jsx(v$,{})]},t)}),a.jsx(g$,{})]})}var Wm=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(){}},oG={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xl,s2,A3,lG=(A3=class{constructor(){ht(this,xl,oG);ht(this,s2,!1)}setTimeoutProvider(e){Ze(this,xl,e)}setTimeout(e,t){return le(this,xl).setTimeout(e,t)}clearTimeout(e){le(this,xl).clearTimeout(e)}setInterval(e,t){return le(this,xl).setInterval(e,t)}clearInterval(e){le(this,xl).clearInterval(e)}},xl=new WeakMap,s2=new WeakMap,A3),Bc=new lG;function cG(e){setTimeout(e,0)}var lu=typeof window>"u"||"Deno"in globalThis;function ci(){}function uG(e,t){return typeof e=="function"?e(t):e}function GN(e){return typeof e=="number"&&e>=0&&e!==1/0}function _$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ml(e,t){return typeof e=="function"?e(t):e}function ia(e,t){return typeof e=="function"?e(t):e}function wO(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:c}=e;if(o){if(r){if(t.queryHash!==g2(o,t.options))return!1}else if(!Hp(t.queryKey,o))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||s&&!s(t))}function jO(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(qp(t.options.mutationKey)!==qp(s))return!1}else if(!Hp(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function g2(e,t){return((t==null?void 0:t.queryKeyHashFn)||qp)(e)}function qp(e){return JSON.stringify(e,(t,n)=>YN(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Hp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Hp(e[n],t[n])):!1}var dG=Object.prototype.hasOwnProperty;function w$(e,t){if(e===t)return e;const n=SO(e)&&SO(t);if(!n&&!(YN(e)&&YN(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,c=n?new Array(o):{};let d=0;for(let h=0;h<o;h++){const p=n?h:s[h],m=e[p],v=t[p];if(m===v){c[p]=m,(n?h<i:dG.call(e,p))&&d++;continue}if(m===null||v===null||typeof m!="object"||typeof v!="object"){c[p]=v;continue}const x=w$(m,v);c[p]=x,x===m&&d++}return i===o&&d===i?e:c}function ZN(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function SO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function YN(e){if(!NO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!NO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function NO(e){return Object.prototype.toString.call(e)==="[object Object]"}function fG(e){return new Promise(t=>{Bc.setTimeout(t,e)})}function XN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?w$(e,t):t}function hG(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function pG(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var y2=Symbol();function j$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===y2?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mG(e,t){return typeof e=="function"?e(...t):!!e}var Kc,bl,Zd,O3,gG=(O3=class extends Wm{constructor(){super();ht(this,Kc);ht(this,bl);ht(this,Zd);Ze(this,Zd,t=>{if(!lu&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){le(this,bl)||this.setEventListener(le(this,Zd))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,bl))==null||t.call(this),Ze(this,bl,void 0))}setEventListener(t){var n;Ze(this,Zd,t),(n=le(this,bl))==null||n.call(this),Ze(this,bl,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){le(this,Kc)!==t&&(Ze(this,Kc,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 2,461 bytes, line 650
650this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof le(this,Kc)=="boolean"?le(this,Kc):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Kc=new WeakMap,bl=new WeakMap,Zd=new WeakMap,O3),v2=new gG;function QN(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var yG=cG;function vG(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=yG;const s=c=>{t?e.push(c):i(()=>{n(c)})},o=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||o()}return d},batchCalls:c=>(...d)=>{s(()=>{c(...d)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var _r=vG(),Yd,_l,Xd,T3,xG=(T3=class extends Wm{constructor(){super();ht(this,Yd,!0);ht(this,_l);ht(this,Xd);Ze(this,Xd,t=>{if(!lu&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){le(this,_l)||this.setEventListener(le(this,Xd))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,_l))==null||t.call(this),Ze(this,_l,void 0))}setEventListener(t){var n;Ze(this,Xd,t),(n=le(this,_l))==null||n.call(this),Ze(this,_l,t(this.setOnline.bind(this)))}setOnline(t){le(this,Yd)!==t&&(Ze(this,Yd,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return le(this,Yd)}},Yd=new WeakMap,_l=new WeakMap,Xd=new WeakMap,T3),Iv=new xG;function bG(e){return Math.min(1e3*2**e,3e4)}function S$(e){return(e??"online")==="online"?Iv.isOnline():!0}var JN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function N$(e){let t=!1,n=0,r;const i=QN(),s=()=>i.status!=="pending",o=b=>{var _;if(!s()){const j=new JN(b);v(j),(_=e.onCancel)==null||_.call(e,j)}},c=()=>{t=!0},d=()=>{t=!1},h=()=>v2.isFocused()&&(e.networkMode==="always"||Iv.isOnline())&&e.canRun(),p=()=>S$(e.networkMode)&&e.canRun(),m=b=>{s()||(r==null||r(),i.resolve(b))},v=b=>{s()||(r==null||r(),i.reject(b))},x=()=>new Promise(b=>{var _;r=j=>{(s()||h())&&b(j)},(_=e.onPause)==null||_.call(e)}).then(()=>{var b;r=void 0,s()||(b=e.onContinue)==null||b.call(e)}),w=()=>
vendor: 4,398 bytes, line 650
650{if(s())return;let b;const _=n===0?e.initialPromise:void 0;try{b=_??e.fn()}catch(j){b=Promise.reject(j)}Promise.resolve(b).then(m).catch(j=>{var M;if(s())return;const C=e.retry??(lu?0:3),E=e.retryDelay??bG,A=typeof E=="function"?E(n,j):E,k=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,j);if(t||!k){v(j);return}n++,(M=e.onFail)==null||M.call(e,n,j),fG(A).then(()=>h()?void 0:x()).then(()=>{t?v(j):w()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?w():x().then(w),i)}}var Gc,M3,C$=(M3=class{constructor(){ht(this,Gc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GN(this.gcTime)&&Ze(this,Gc,Bc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lu?1/0:300*1e3))}clearGcTimeout(){le(this,Gc)&&(Bc.clearTimeout(le(this,Gc)),Ze(this,Gc,void 0))}},Gc=new WeakMap,M3),Zc,Qd,ra,Yc,or,Lm,Xc,Aa,to,R3,_G=(R3=class extends C${constructor(t){super();ht(this,Aa);ht(this,Zc);ht(this,Qd);ht(this,ra);ht(this,Yc);ht(this,or);ht(this,Lm);ht(this,Xc);Ze(this,Xc,!1),Ze(this,Lm,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ze(this,Yc,t.client),Ze(this,ra,le(this,Yc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ze(this,Zc,CO(this.options)),this.state=t.state??le(this,Zc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=le(this,or))==null?void 0:t.promise}setOptions(t){if(this.options={...le(this,Lm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=CO(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),Ze(this,Zc,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,ra).remove(this)}setData(t,n){const r=XN(this.state.data,t,this.options);return It(this,Aa,to).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){It(this,Aa,to).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=le(this,or))==null?void 0:r.promise;return(i=le(this,or))==null||i.cancel(t),n?n.then(ci).catch(ci):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(le(this,Zc))}isActive(){return this.observers.some(t=>ia(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y2||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ml(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:!_$(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=le(this,or))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=le(this,or))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),le(this,ra).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(le(this,or)&&(le(this,Xc)?le(this,or).cancel({revert:!0}):le(this,or).cancelRetry()),this.scheduleGc()),le(this,ra).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||It(this,Aa,to).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,p,m,v,x,w,b,_,j,C,E;if(this.state.fetchStatus!=="idle"&&((d=le(this,or))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(le(this,or))return le(this,or).continueRetry(),le(this,or).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(k=>k.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Ze(this,Xc,!0),r.signal)}
650)},s=()=>{const A=j$(this.options,n),M=(()=>{const I={client:le(this,Yc),queryKey:this.queryKey,meta:this.meta};return i(I),I})();return Ze(this,Xc,!1),this.options.persister?this.options.persister(A,M,this):A(M)},c=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:le(this,Yc),state:this.state,fetchFn:s};return i(A),A})();(h=this.options.behavior)==null||h.onFetch(c,this),Ze(this,Qd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&It(this,Aa,to).call(this,{type:"fetch",meta:(m=c.fetchOptions)==null?void 0:m.meta}),Ze(this,or,N$({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof JN&&A.revert&&this.setState({...le(this,Qd),fetchStatus:"idle"}),r.abort()},onFail:(A,k)=>{It(this,Aa,to).call(this,{type:"failed",failureCount:A,error:k})},onPause:()=>{It(this,Aa,to).call(this,{type:"pause"})},onContinue:()=>{It(this,Aa,to).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await le(this,or).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(v=le(this,ra).config).onSuccess)==null||x.call(v,A,this),(b=(w=le(this,ra).config).onSettled)==null||b.call(w,A,this.state.error,this),A}catch(A){if(A instanceof JN){if(A.silent)return le(this,or).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw It(this,Aa,to).call(this,{type:"error",error:A}),(j=(_=le(this,ra).config).onError)==null||j.call(_,A,this),(E=(C=le(this,ra).config).onSettled)==null||E.call(C,this.state.data,A,this),A}finally{this.scheduleGc()}}},Zc=new WeakMap,Qd=new WeakMap,ra=new WeakMap,Yc=new WeakMap,or=new WeakMap,Lm=new WeakMap,Xc=new WeakMap,Aa=new WeakSet,to=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...E$(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ze(this,Qd,t.manual?i:void 0),i;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),_r.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),le(this,ra).notify({query:this,type:"updated",action:t})})},R3);function E$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:S$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function CO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var li,Lt,Dm,Kr,Qc,Jd,io,wl,$m,ef,tf,Jc,eu,jl,nf,en,bp,eC,tC,nC,rC,iC,aC,sC,P$,I3,wG=(I3=class extends Wm{constructor(t,n){super();ht(this,en);ht(this,li);ht(this,Lt);ht(this,Dm);ht(this,Kr);ht(this,Qc);ht(this,Jd);ht(this,io);ht(this,wl);ht(this,$m);ht(this,ef);ht(this,tf);ht(this,Jc);ht(this,eu);ht(this,jl);ht(this,nf,new Set);this.options=n,Ze(this,li,t),Ze(this,wl,null),Ze(this,io,QN()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,Lt).addObserver(this),EO(le(this,Lt),this.options)?It(this,en,bp).call(this):this.updateResult(),It(this,en,rC).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oC(le(this,Lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oC(le(this,Lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,It(this,en,iC).call(this),It(this,en,aC).call(this),le(this,Lt).removeObserver(this)}setOptions(t){const n=this.options,r=le(this,Lt);if(this.options=le(this,li).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ia(this.options.enabled,le(this,Lt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");It(this,en,sC).call(this),le(this,Lt).setOptions(this.options),n._defaulted&&!ZN(this.options,n)&&le(this,li).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,Lt),observer:this});const i=this.hasListeners();i&&PO(le(this,Lt),r,this.options,n)&&It(this,en,bp).call(this),this.updateResult(),i&&(le(this,Lt)!==r||ia(this.options.enabled,le(this,Lt))!==ia(n.enabled,le(this,Lt))||Ml(this.options.staleTime,le(this,Lt))!==Ml(n.staleTime,le(this,Lt)))&&It(this,en,eC).call(this);
vendor: 10,266 bytes, line 650
650const s=It(this,en,tC).call(this);i&&(le(this,Lt)!==r||ia(this.options.enabled,le(this,Lt))!==ia(n.enabled,le(this,Lt))||s!==le(this,jl))&&It(this,en,nC).call(this,s)}getOptimisticResult(t){const n=le(this,li).getQueryCache().build(le(this,li),t),r=this.createResult(n,t);return SG(this,r)&&(Ze(this,Kr,r),Ze(this,Jd,this.options),Ze(this,Qc,le(this,Lt).state)),r}getCurrentResult(){return le(this,Kr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&le(this,io).status==="pending"&&le(this,io).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){le(this,nf).add(t)}getCurrentQuery(){return le(this,Lt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=le(this,li).defaultQueryOptions(t),r=le(this,li).getQueryCache().build(le(this,li),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return It(this,en,bp).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,Kr)))}createResult(t,n){var q;const r=le(this,Lt),i=this.options,s=le(this,Kr),o=le(this,Qc),c=le(this,Jd),h=t!==r?t.state:le(this,Dm),{state:p}=t;let m={...p},v=!1,x;if(n._optimisticResults){const V=this.hasListeners(),H=!V&&EO(t,n),U=V&&PO(t,r,n,i);(H||U)&&(m={...m,...E$(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:b,status:_}=m;x=m.data;let j=!1;if(n.placeholderData!==void 0&&x===void 0&&_==="pending"){let V;s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(V=s.data,j=!0):V=typeof n.placeholderData=="function"?n.placeholderData((q=le(this,tf))==null?void 0:q.state.data,le(this,tf)):n.placeholderData,V!==void 0&&(_="success",x=XN(s==null?void 0:s.data,V,n),v=!0)}if(n.select&&x!==void 0&&!j)if(s&&x===(o==null?void 0:o.data)&&n.select===le(this,$m))x=le(this,ef);else try{Ze(this,$m,n.select),x=n.select(x),x=XN(s==null?void 0:s.data,x,n),Ze(this,ef,x),Ze(this,wl,null)}catch(V){Ze(this,wl,V)}le(this,wl)&&(w=le(this,wl),x=le(this,ef),b=Date.now(),_="error");const C=m.fetchStatus==="fetching",E=_==="pending",A=_==="error",k=E&&C,M=x!==void 0,$={status:_,fetchStatus:m.fetchStatus,isPending:E,isSuccess:_==="success",isError:A,isInitialLoading:k,isLoading:k,data:x,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!E,isLoadingError:A&&!M,isPaused:m.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&M,isStale:x2(t,n),refetch:this.refetch,promise:le(this,io),isEnabled:ia(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const V=z=>{$.status==="error"?z.reject($.error):$.data!==void 0&&z.resolve($.data)},H=()=>{const z=Ze(this,io,$.promise=QN());V(z)},U=le(this,io);switch(U.status){case"pending":t.queryHash===r.queryHash&&V(U);break;case"fulfilled":($.status==="error"||$.data!==U.value)&&H();break;case"rejected":($.status!=="error"||$.error!==U.reason)&&H();break}}return $}updateResult(){const t=le(this,Kr),n=this.createResult(le(this,Lt),this.options);if(Ze(this,Qc,le(this,Lt).state),Ze(this,Jd,this.options),le(this,Qc).data!==void 0&&Ze(this,tf,le(this,Lt)),ZN(n,t))return;Ze(this,Kr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!le(this,nf).size)return!0;const o=new Set(s??le(this,nf));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,Kr)).some(c=>{const d=c;return le(this,Kr)[d]!==t[d]&&o.has(d)})};It(this,en,P$).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&It(this,en,rC).call(this)}},li=new WeakMap,Lt=new WeakMap,Dm=new WeakMap,Kr=new WeakMap,Qc=new WeakMap,Jd=new WeakMap,io=new WeakMap,wl=new WeakMap,$m=new WeakMap,ef=new WeakMap,tf=new WeakMap,Jc=new WeakMap,eu=new WeakMap,jl=new WeakMap,nf=new WeakMap,en=new WeakSet,bp=function(t){It(this,en,sC).call(this);let n=le(this,Lt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ci)),n},eC=function(){It(this,en,iC).call(this);const t=Ml(this.options.staleTime,le(this,Lt));if(lu||le(this,Kr).isStale||!GN(t))return;const r=_$(le(this,Kr).dataUpdatedAt,t)+1;Ze(this,Jc,Bc.setTimeout(()=>{le(this,Kr).isStale||this.updateResult()},r))},tC=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,Lt)):this.options.refetchInterval)??!1},nC=function(t){It(this,en,aC).call(this),Ze(this,jl,t),!(lu||ia(this.options.enabled,le(this,Lt))===!1||!GN(le(this,jl))||le(this,jl)===0)&&Ze(this,eu,Bc.setInterval(()=>{(this.options.refetchIntervalInBackground||v2.isFocused())&&It(this,en,bp).call(this)},le(this,jl)))},rC=function(){It(this,en,eC).call(this),It(this,en,nC).call(this,It(this,en,tC).call(this))},iC=function(){le(this,Jc)&&(Bc.clearTimeout(le(this,Jc)),Ze(this,Jc,void 0))},aC=function(){le(this,eu)&&(Bc.clearInterval(le(this,eu)),Ze(this,eu,void 0))},sC=function(){const t=le(this,li).getQueryCache().build(le(this,li),this.options);if(t===le(this,Lt))return;const n=le(this,Lt);Ze(this,Lt,t),Ze(this,Dm,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},P$=function(t){_r.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(le(this,Kr))}),le(this,li).getQueryCache().notify({query:le(this,Lt),type:"observerResultsUpdated"})})},I3);function jG(e,t){return ia(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function EO(e,t){return jG(e,t)||e.state.data!==void 0&&oC(e,t,t.refetchOnMount)}function oC(e,t,n){if(ia(t.enabled,e)!==!1&&Ml(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&x2(e,t)}return!1}function PO(e,t,n,r){return(e!==t||ia(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&x2(e,n)}function x2(e,t){return ia(t.enabled,e)!==!1&&e.isStaleByTime(Ml(t.staleTime,e))}function SG(e,t){return!ZN(e.getCurrentResult(),t)}function kO(e){return{onFetch:(t,n)=>{var p,m,v,x,w;const r=t.options,i=(v=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:v.direction,s=((x=t.state.data)==null?void 0:x.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},d=0;const h=async()=>{let b=!1;const _=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},j=j$(t.options,t.fetchOptions),C=async(E,A,k)=>{if(b)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const I=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:A,direction:k?"backward":"forward",meta:t.options.meta};return _(H),H})(),$=await j(I),{maxPages:q}=t.options,V=k?pG:hG;return{pages:V(E.pages,$,q),pageParams:V(E.pageParams,A,q)}};if(i&&s.length){const E=i==="backward",A=E?NG:AO,k={pages:s,pageParams:o},M=A(r,k);c=await C(k,M,E)}else{const E=e??s.length;do{const A=d===0?o[0]??r.initialPageParam:AO(r,c);if(d>0&&A==null)break;c=await C(c,A),d++}while(d<E)}return c};t.options.persister?t.fetchFn=()=>{var b,_;return(_=(b=t.options).persister)==null?void 0:_.call(b,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function AO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function NG(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Fm,as,Gr,tu,ss,hl,L3,CG=(L3=class extends C${constructor(t){super();ht(this,ss);ht(this,Fm);ht(this,as);ht(this,Gr);ht(this,tu);Ze(this,Fm,t.client),this.mutationId=t.mutationId,Ze(this,Gr,t.mutationCache),Ze(this,as,[]),this.state=t.state||EG(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){le(this,as).includes(t)||(le(this,as).push(t),this.clearGcTimeout(),le(this,Gr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ze(this,as,le(this,as).filter(n=>n!==t)),this.scheduleGc(),le(this,Gr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){le(this,as).length||(this.state.status==="pending"?this.scheduleGc():le(this,Gr).remove(this))}continue(){var t;return((t=le(this,tu))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,c,d,h,p,m,v,x,w,b,_,j,C,E,A,k,M,I,$,q;const n=()=>{It(this,ss,hl).call(this,{type:"continue"})},r={client:le(this,Fm),meta:this.options.meta,mutationKey:this.options.mutationKey};Ze(this,tu,N$({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(V,H)=>{It(this,ss,hl).call(this,{type:"failed",failureCount:V,error:H})},onPause:()=>{It(this,ss,hl).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,Gr).canRun(this)}));const i=this.state.status==="pending",s=!le(this,tu).canStart();try{if(i)n();else{It(this,ss,hl).call(this,{type:"pending",variables:t,isPaused:s}),await((c=(o=le(this,Gr).config).onMutate)==null?void 0:c.call(o,t,this,r));const H=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,r));H!==this.state.context&&It(this,ss,hl).call(this,{type:"pending",context:H,variables:t,isPaused:s})}const V=await le(this,tu).start();return await((m=(p=le(this,Gr).config).onSuccess)==null?void 0:m.call(p,V,t,this.state.context,this,r)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,V,t,this.state.context,r)),await((b=(w=le(this,Gr).config).onSettled)==null?void 0:b.call(w,V,null,this.state.variables,this.state.context,this,r)),await((j=(_=this.options).onSettled)==null?void 0:j.call(_,V,null,t,this.state.context,r)),It(this,ss,hl).call(this,{type:"success",data:V}),V}catch(V){try{throw await((E=(C=le(this,Gr).config).onError)==null?void 0:E.
650call(C,V,t,this.state.context,this,r)),await((k=(A=this.options).onError)==null?void 0:k.call(A,V,t,this.state.context,r)),await((I=(M=le(this,Gr).config).onSettled)==null?void 0:I.call(M,void 0,V,this.state.variables,this.state.context,this,r)),await((q=($=this.options).onSettled)==null?void 0:q.call($,void 0,V,t,this.state.context,r)),V}finally{It(this,ss,hl).call(this,{type:"error",error:V})}}finally{le(this,Gr).runNext(this)}}},Fm=new WeakMap,as=new WeakMap,Gr=new WeakMap,tu=new WeakMap,ss=new WeakSet,hl=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_r.batch(()=>{le(this,as).forEach(r=>{r.onMutationUpdate(t)}),le(this,Gr).notify({mutation:this,type:"updated",action:t})})},L3);function EG(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ao,Oa,Bm,D3,PG=(D3=class extends Wm{constructor(t={}){super();ht(this,ao);ht(this,Oa);ht(this,Bm);this.config=t,Ze(this,ao,new Set),Ze(this,Oa,new Map),Ze(this,Bm,0)}build(t,n,r){const i=new CG({client:t,mutationCache:this,mutationId:++Oy(this,Bm)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){le(this,ao).add(t);const n=Ly(t);if(typeof n=="string"){const r=le(this,Oa).get(n);r?r.push(t):le(this,Oa).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(le(this,ao).delete(t)){const n=Ly(t);if(typeof n=="string"){const r=le(this,Oa).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&le(this,Oa).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ly(t);if(typeof n=="string"){const r=le(this,Oa).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Ly(t);if(typeof n=="string"){const i=(r=le(this,Oa).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_r.batch(()=>{le(this,ao).forEach(t=>{this.notify({type:"removed",mutation:t})}),le(this,ao).clear(),le(this,Oa).clear()})}getAll(){return Array.from(le(this,ao))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jO(n,r))}findAll(t={}){return this.getAll().filter(n=>jO(t,n))}notify(t){_r.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _r.batch(()=>Promise.all(t.map(n=>n.continue().catch(ci))))}},ao=new WeakMap,Oa=new WeakMap,Bm=new WeakMap,D3);function Ly(e){var t;return(t=e.options.scope)==null?void 0:t.id}var os,$3,kG=($3=class extends Wm{constructor(t={}){super();ht(this,os);this.config=t,Ze(this,os,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??g2(i,n);let o=this.get(s);return o||(o=new _G({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){le(this,os).has(t.queryHash)||(le(this,os).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=le(this,os).get(t.queryHash);n&&(t.destroy(),n===t&&le(this,os).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_r.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return le(this,os).get(t)}getAll(){return[...le(this,os).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>wO(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>wO(t,r)):n}notify(t){_r.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_r.batch(()=>
vendor: 5,232 bytes, line 650
650{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_r.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},os=new WeakMap,$3),On,Sl,Nl,rf,af,Cl,sf,of,F3,AG=(F3=class{constructor(e={}){ht(this,On);ht(this,Sl);ht(this,Nl);ht(this,rf);ht(this,af);ht(this,Cl);ht(this,sf);ht(this,of);Ze(this,On,e.queryCache||new kG),Ze(this,Sl,e.mutationCache||new PG),Ze(this,Nl,e.defaultOptions||{}),Ze(this,rf,new Map),Ze(this,af,new Map),Ze(this,Cl,0)}mount(){Oy(this,Cl)._++,le(this,Cl)===1&&(Ze(this,sf,v2.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,On).onFocus())})),Ze(this,of,Iv.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,On).onOnline())})))}unmount(){var e,t;Oy(this,Cl)._--,le(this,Cl)===0&&((e=le(this,sf))==null||e.call(this),Ze(this,sf,void 0),(t=le(this,of))==null||t.call(this),Ze(this,of,void 0))}isFetching(e){return le(this,On).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Sl).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=le(this,On).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=le(this,On).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ml(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return le(this,On).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=le(this,On).get(r.queryHash),s=i==null?void 0:i.state.data,o=uG(t,s);if(o!==void 0)return le(this,On).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return _r.batch(()=>le(this,On).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=le(this,On).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=le(this,On);_r.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=le(this,On);return _r.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=_r.batch(()=>le(this,On).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ci).catch(ci)}invalidateQueries(e,t={}){return _r.batch(()=>(le(this,On).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=_r.batch(()=>le(this,On).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(ci)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ci)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=le(this,On).build(this,t);return n.isStaleByTime(Ml(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ci).catch(ci)}fetchInfiniteQuery(e){return e.behavior=kO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ci).catch(ci)}ensureInfiniteQueryData(e){return e.behavior=kO(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Iv.isOnline()?le(this,Sl).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,On)}getMutationCache(){return le(this,Sl)}getDefaultOptions(){return le(this,Nl)}setDefaultOptions(e){Ze(this,Nl,e)}setQueryDefaults(e,t){le(this,rf).set(qp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...le(this,rf).values()],n={};return t.forEach(r=>{Hp(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){le(this,af).set(qp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...le(this,af).values()],n={};return t.forEach(r=>{Hp(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...le(this,Nl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=g2(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===y2&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,Nl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,On).clear(),le(this,Sl).clear()}},On=new WeakMap,Sl=new WeakMap,Nl=new WeakMap,rf=new WeakMap,af=new WeakMap,Cl=new WeakMap,sf=new WeakMap,of=new WeakMap,F3),k$=P.createContext(void 0),OG=e=>{const t=P.useContext(k$);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},TG=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(k$.Provider,{value:e,children:t})),A$=P.createContext(!1),MG=()=>P.useContext(A$);A$.Provider;function RG(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
650var IG=P.createContext(RG()),LG=()=>P.useContext(IG),DG=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$G=e=>{P.useEffect(()=>{e.clearReset()},[e])},FG=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||mG(n,[e.error,r])),BG=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zG=(e,t)=>e.isLoading&&e.isFetching&&!t,UG=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,OO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qG(e,t,n){var m,v,x,w,b;const r=MG(),i=LG(),s=OG(),o=s.defaultQueryOptions(e);(v=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||v.call(m,o),o._optimisticResults=r?"isRestoring":"optimistic",BG(o),DG(o,i),$G(i);const c=!s.getQueryCache().get(o.queryHash),[d]=P.useState(()=>new t(s,o)),h=d.getOptimisticResult(o),p=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(_=>{const j=p?d.subscribe(_r.batchCalls(_)):ci;return d.updateResult(),j},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setOptions(o)},[o,d]),UG(o,h))throw OO(o,d,i);if(FG({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw h.error;if((w=(x=s.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||w.call(x,o,h),o.experimental_prefetchInRender&&!lu&&zG(h,r)){const _=c?OO(o,d,i):(b=s.getQueryCache().get(o.queryHash))==null?void 0:b.promise;_==null||_.catch(ci).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?h:d.trackResult(h)}function HG(e,t){return qG(e,wG)}const WG=new AG({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Vm=z3();const VG=Kt(Vm);/**
651 * @remix-run/router v1.23.0
652 *
653 * Copyright (c) Remix Software Inc.
654 *
655 * This source code is licensed under the MIT license found in the
656 * LICENSE.md file in the root directory of this source tree.
657 *
658 * @license MIT
659 */function Wp(){return Wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wp.apply(this,arguments)}var El;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(El||(El={}));const TO="popstate";function KG(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:c}=r.location;return lC("",{pathname:s,search:o,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Lv(i)}return ZG(t,n,null,e)}function qn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function O$(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function GG(){return Math.random().toString(36).substr(2,8)}function MO(e,t){return{usr:e.state,key:e.key,idx:t}}function lC(e,t,n,r){return n===void 0&&(n=null),Wp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hf(t):t,{state:n,key:t&&t.key||r||GG()})}function Lv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Hf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ZG(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,c=El.Pop,d=null,h=p();h==null&&(h=0,o.replaceState(Wp({},o.state,{idx:h}),""));function p(){return(o.state||{idx:null}).idx}function m(){c=El.Pop;let _=p(),j=_==null?null:_-h;h=_,d&&d({action:c,location:b.location,delta:j})}function v(_,j){c=El.Push;let C=lC(b.location,_,j);h=p()+1;let E=MO(C,h),A=b.createHref(C);try{o.pushState(E,"",A)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(A)}s&&d&&d({action:c,location:b.location,delta:1})}function x(_,j){c=El.Replace;let C=lC(b.location,_,j);h=p();let E=MO(C,h),A=b.createHref(C);o.replaceState(E,"",A),s&&d&&d({action:c,location:b.location,delta:0})}function w(_){let j=i.location.origin!=="null"?i.location.origin:i.location.href,C=typeof _=="string"?_:Lv(_);return C=C.replace(/ $/,"%20"),qn(j,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,j)}let b={get action(){return c},get location(){return e(i,o)},listen(_){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(TO,m),d=_,()=>{i.removeEventListener(TO,m),d=null}},createHref(_){return t(i,_)},createURL:w,encodeLocation(_){let j=w(_);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:v,replace:x,go(_){return o.go(_)}};return b}var RO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(RO||(RO={}));function YG(e,t,n){return n===void 0&&(n="/"),XG(e,t,n)}
vendor: 9,036 bytes, lines 659-668
659function XG(e,t,n,r){let i=typeof t=="string"?Hf(t):t,s=b2(i.pathname||"/",n);if(s==null)return null;let o=T$(e);QG(o);let c=null;for(let d=0;c==null&&d<o.length;++d){let h=uZ(s);c=oZ(o[d],h)}return c}function T$(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,c)=>{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};d.relativePath.startsWith("/")&&(qn(d.relativePath.startsWith(r),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(r.length));let h=Rl([r,d.relativePath]),p=n.concat(d);s.children&&s.children.length>0&&(qn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),T$(s.children,t,p,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:aZ(h,s.index),routesMeta:p})};return e.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,o);else for(let d of M$(s.path))i(s,o,d)}),t}function M$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=M$(r.join("/")),c=[];return c.push(...o.map(d=>d===""?s:[s,d].join("/"))),i&&c.push(...o),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function QG(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sZ(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const JG=/^:[\w-]+$/,eZ=3,tZ=2,nZ=1,rZ=10,iZ=-2,IO=e=>e==="*";function aZ(e,t){let n=e.split("/"),r=n.length;return n.some(IO)&&(r+=iZ),t&&(r+=tZ),n.filter(i=>!IO(i)).reduce((i,s)=>i+(JG.test(s)?eZ:s===""?nZ:rZ),r)}function sZ(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function oZ(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let c=0;c<r.length;++c){let d=r[c],h=c===r.length-1,p=s==="/"?t:t.slice(s.length)||"/",m=lZ({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},p),v=d.route;if(!m)return null;Object.assign(i,m.params),o.push({params:i,pathname:Rl([s,m.pathname]),pathnameBase:pZ(Rl([s,m.pathnameBase])),route:v}),m.pathnameBase!=="/"&&(s=Rl([s,m.pathnameBase]))}return o}function lZ(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=cZ(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,p,m)=>{let{paramName:v,isOptional:x}=p;if(v==="*"){let b=c[m]||"";o=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const w=c[m];return x&&!w?h[v]=void 0:h[v]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:o,pattern:e}}function cZ(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),O$(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function uZ(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return O$(!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 b2(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function dZ(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hf(e):e;return{pathname:n?n.startsWith("/")?n:fZ(n,t):t,search:mZ(r),hash:gZ(i)}}function fZ(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function lw(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hZ(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function R$(e,t){let n=hZ(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function I$(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Hf(e):(i=Wp({},e),qn(!i.pathname||!i.pathname.includes("?"),lw("?","pathname","search",i)),qn(!i.pathname||!i.pathname.includes("#"),lw("#","pathname","hash",i)),qn(!i.search||!i.search.includes("#"),lw("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,c;if(o==null)c=n;else{let m=t.length-1;if(!r&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),m-=1;i.pathname=v.join("/")}c=m>=0?t[m]:"/"}let d=dZ(i,c),h=o&&o!=="/"&&o.endsWith("/"),p=(s||o===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||p)&&(d.pathname+="/"),d}const Rl=e=>e.join("/").replace(/\/\/+/g,"/"),pZ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mZ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gZ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yZ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const L$=["post","put","patch","delete"];new Set(L$);const vZ=["get",...L$];new Set(vZ);/**
660 * React Router v6.30.1
661 *
662 * Copyright (c) Remix Software Inc.
663 *
664 * This source code is licensed under the MIT license found in the
665 * LICENSE.md file in the root directory of this source tree.
666 *
667 * @license MIT
668 */function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vp.apply(this,arguments)}const _2=P.createContext(null),xZ=P.createContext(null),Eu=P.createContext(null),a0=P.createContext(null),Ul=P.createContext({outlet:null,matches:[],isDataRoute:!1}),D$=P.createContext(null);function bZ(e,t){let{relative:n}=t===void 0?{}:t;Km()||qn(!1);let{basename:r,navigator:i}=P.useContext(Eu),{hash:s,pathname:o,search:c}=B$(e,{relative:n}),d=o;return r!=="/"&&(d=o==="/"?r:Rl([r,o])),i.createHref({pathname:d,search:c,hash:s})}function Km(){return P.useContext(a0)!=null}function Wf(){return Km()||qn(!1),P.useContext(a0).location}function $$(e){P.useContext(Eu).static||P.useLayoutEffect(e)}function F$(){let{isDataRoute:e}=P.useContext(Ul);return e?RZ():_Z()}function _Z(){Km()||qn(!1);let e=P.useContext(_2),{basename:t,future:n,navigator:r}=P.useContext(Eu),{matches:i}=P.useContext(Ul),{pathname:s}=Wf(),o=JSON.stringify(R$(i,n.v7_relativeSplatPath)),c=P.useRef(!1);return $$(()=>{c.current=!0}),P.useCallback(function(h,p){if(p===void 0&&(p={}),!c.current)return;if(typeof h=="number"){r.go(h);return}let m=I$(h,JSON.parse(o),s,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Rl([t,m.pathname])),(p.replace?r.replace:r.push)(m,p.state,p)},[t,r,o,s,e])}function wZ(){let{matches:e}=P.useContext(Ul),t=e[e.length-1];return t?t.params:{}}function B$(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(Eu),{matches:i}=P.useContext(Ul),{pathname:s}=Wf(),o=JSON.stringify(R$(i,r.v7_relativeSplatPath));return P.useMemo(()=>I$(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function jZ(e,t){return SZ(e,t)}function SZ(e,t,n,r){Km()||qn(!1);let{navigator:i}=P.useContext(Eu),{matches:s}=P.useContext(Ul),o=s[s.length-1],c=o?o.params:{};o&&o.pathname;let d=o?o.pathnameBase:"/";o&&o.route;let h=Wf(),p;if(t){var m;let _=typeof t=="string"?Hf(t):t;d==="/"||(m=_.pathname)!=null&&m.startsWith(d)||qn(!1),p=_}else p=h;let v=p.pathname||"/",x=v;if(d!=="/"){let _=d.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=YG(e,{pathname:x}),b=kZ(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Rl([d,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?d:Rl([d,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,n,r);return t&&b?P.createElement(a0.Provider,{value:{location:Vp({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:El.Pop}},b):b}function NZ(){let e=MZ(),t=yZ(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application 
668Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:i},n):null,null)}const CZ=P.createElement(NZ,null);class EZ extends P.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?P.createElement(Ul.Provider,{value:this.props.routeContext},P.createElement(D$.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function PZ(e){let{routeContext:t,match:n,children:r}=e,i=P.useContext(_2);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(Ul.Provider,{value:t},r)}function kZ(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,c=(i=n)==null?void 0:i.errors;if(c!=null){let p=o.findIndex(m=>m.route.id&&(c==null?void 0:c[m.route.id])!==void 0);p>=0||qn(!1),o=o.slice(0,Math.min(o.length,p+1))}let d=!1,h=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<o.length;p++){let m=o[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=p),m.route.id){let{loaderData:v,errors:x}=n,w=m.route.loader&&v[m.route.id]===void 0&&(!x||x[m.route.id]===void 0);if(m.route.lazy||w){d=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((p,m,v)=>{let x,w=!1,b=null,_=null;n&&(x=c&&m.route.id?c[m.route.id]:void 0,b=m.route.errorElement||CZ,d&&(h<0&&v===0?(IZ("route-fallback"),w=!0,_=null):h===v&&(w=!0,_=m.route.hydrateFallbackElement||null)));let j=t.concat(o.slice(0,v+1)),C=()=>{let E;return x?E=b:w?E=_:m.route.Component?E=P.createElement(m.route.Component,null):m.route.element?E=m.route.element:E=p,P.createElement(PZ,{match:m,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:E})};return n&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?P.createElement(EZ,{location:n.location,revalidation:n.revalidation,component:b,error:x,children:C(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):C()},null)}var z$=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(z$||{}),U$=(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})(U$||{});function AZ(e){let t=P.useContext(_2);return t||qn(!1),t}function OZ(e){let t=P.useContext(xZ);return t||qn(!1),t}function TZ(e){let t=P.useContext(Ul);return t||qn(!1),t}function q$(e){let t=TZ(),n=t.matches[t.matches.length-1];return n.route.id||qn(!1),n.route.id}function MZ(){var e;let t=P.useContext(D$),n=OZ(),r=q$();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function RZ(){let{router:e}=AZ(z$.UseNavigateStable),t=q$(U$.UseNavigateStable),n=P.useRef(!1);return $$(()=>{n.current=!0}),P.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Vp({fromRouteId:t},s)))},[e,t])}const LO={};function IZ(e,t,n){LO[e]||(LO[e]=!0)}function LZ(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vr(e){qn(!1)}function DZ(e){let{basename:t="/",children:n=null,location:r,navigationType:i=El.Pop,navigator:s,static:o=!1,future:c}=e;Km()&&qn(!1);let d=t.replace(/^\/*/,"/"),h=P.useMemo(()=>({basename:d,navigator:s,static:o,future:Vp({v7_relativeSplatPath:!1},c)}),[d,c,s,o]);typeof r=="string"&&(r=Hf(r));let{pathname:p="/",search:m="",hash:v="",state:x=null,key:w="default"}=r,b=P.useMemo(()=>{let _=b2(p,d);return _==null?null:{location:{pathname:_,search:m,hash:v,state:x,key:w},navigationType:i}},[d,p,m,v,x,w,i]);return b==null?null:P.createElement(Eu.Provider,{value:h},P.createElement(a0.Provider,{children:n,value:b}))}function $Z(e){let{children:t,location:n}=e;return jZ(cC(t),n)}new Promise(()=>{});function cC(e,t){t===void 0&&(t=[]);let n=[];
668return P.Children.forEach(e,(r,i)=>{if(!P.isValidElement(r))return;let s=[...t,i];if(r.type===P.Fragment){n.push.apply(n,cC(r.props.children,s));return}r.type!==vr&&qn(!1),!r.props.index||!r.props.children||qn(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=cC(r.props.children,s)),n.push(o)}),n}/**
669 * React Router DOM v6.30.1
670 *
671 * Copyright (c) Remix Software Inc.
672 *
673 * This source code is licensed under the MIT license found in the
674 * LICENSE.md file in the root directory of this source tree.
675 *
676 * @license MIT
677 */function uC(){return uC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uC.apply(this,arguments)}function FZ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function BZ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zZ(e,t){return e.button===0&&(!t||t==="_self")&&!BZ(e)}const UZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],qZ="6";try{window.__reactRouterVersion=qZ}catch{}const HZ="startTransition",DO=l2[HZ];function WZ(e){let{basename:t,children:n,future:r,window:i}=e,s=P.useRef();s.current==null&&(s.current=KG({window:i,v5Compat:!0}));let o=s.current,[c,d]=P.useState({action:o.action,location:o.location}),{v7_startTransition:h}=r||{},p=P.useCallback(m=>{h&&DO?DO(()=>d(m)):d(m)},[d,h]);return P.useLayoutEffect(()=>o.listen(p),[o,p]),P.useEffect(()=>LZ(r),[r]),P.createElement(DZ,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:o,future:r})}const VZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",KZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yt=P.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:c,target:d,to:h,preventScrollReset:p,viewTransition:m}=t,v=FZ(t,UZ),{basename:x}=P.useContext(Eu),w,b=!1;if(typeof h=="string"&&KZ.test(h)&&(w=h,VZ))try{let E=new URL(window.location.href),A=h.startsWith("//")?new URL(E.protocol+h):new URL(h),k=b2(A.pathname,x);A.origin===E.origin&&k!=null?h=k+A.search+A.hash:b=!0}catch{}let _=bZ(h,{relative:i}),j=GZ(h,{replace:o,state:c,target:d,preventScrollReset:p,relative:i,viewTransition:m});function C(E){r&&r(E),E.defaultPrevented||j(E)}return P.createElement("a",uC({},v,{href:w||_,onClick:b||s?r:C,ref:n,target:d}))});var $O;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($O||($O={}));var FO;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(FO||(FO={}));function GZ(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:c}=t===void 0?{}:t,d=F$(),h=Wf(),p=B$(e,{relative:o});return P.useCallback(m=>{if(zZ(m,n)){m.preventDefault();let v=r!==void 0?r:Lv(h)===Lv(p);d(e,{replace:v,state:i,preventScrollReset:s,relative:o,viewTransition:c})}},[h,d,p,r,i,n,e,s,o,c])}function H$(e,t){return function(){return e.apply(t,arguments)}}const{toString:ZZ}=Object.prototype,{getPrototypeOf:uf}=Object,{iterator:Gm,toStringTag:W$}=Symbol,Dv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kp=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Dv(n,t))return!0;n=uf(n)}return!1},YZ=(e,t)=>e!=null&&Kp(e,t)?e[t]:void 0,w2=(e=>t=>{const n=ZZ.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ua=e=>(e=e.toLowerCase(),t=>w2(t)===e),s0=e=>t=>typeof t===e,{isArray:cu}=Array,df=s0("undefined");function Vf(e){return e!==null&&!df(e)&&e.constructor!==null&&!df(e.constructor)&&hi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const V$=Ua("ArrayBuffer");function XZ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&V$(e.buffer),t}const QZ=s0("string"),hi=s0("function"),K$=s0("number"),Kf=e=>e!==null&&typeof e=="object",JZ=e=>e===!0||e===!1,fv=e=>{if(!Kf(e))return!1;const t=uf(e);return(t===null||t===Object.prototype||uf(t)===null)&&!Kp(e,W$)&&!Kp(e,Gm)},eY=e=>{if(!Kf(e)||Vf(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},tY=Ua("Date"),nY=Ua("File"),rY=e=>!!(e&&typeof e.uri<"u"),iY=e=>e&&typeof e.getParts<"u",aY=Ua("Blob"),sY=Ua("FileList"),oY=e=>Kf(e)&&hi(e.pipe);function lY(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const BO=lY(),zO=typeof BO.FormData<"u"?BO.FormData:void 0,cY=e=>{if(!e)return!1;if(zO&&e instanceof zO)return!0;const t=uf(e);if(!t||t===Object.prototype||!hi(e.append))return!1;const n=w2(e);return n==="formdata"||n==="object"&&hi(e.toString)&&e.toString()==="[object FormData]"},uY=Ua("URLSearchParams"),[dY,fY,hY,pY]=["ReadableStream","Request","Response","Headers"].map(Ua),mY=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),cu(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Vf(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let c;for(r=0;r<o;r++)c=s[r],t.call(null,e[c],c,e)}}function G$(e,t){if(Vf(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const zc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Z$=e=>!df(e)&&e!==zc;function dC(...e){const{caseless:t,skipUndefined:n}=Z$(this)&&this||{},r={},i=(s,o)=>
vendor: 8,139 bytes, lines 677-679
677{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const c=t&&typeof o=="string"&&G$(r,o)||o,d=Dv(r,c)?r[c]:void 0;fv(d)&&fv(s)?r[c]=dC(d,s):fv(s)?r[c]=dC({},s):cu(s)?r[c]=s.slice():(!n||!df(s))&&(r[c]=s)};for(let s=0,o=e.length;s<o;s++){const c=e[s];if(!c||Vf(c)||(Zm(c,i),typeof c!="object"||cu(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let h=0;h<d.length;h++){const p=d[h];EY.call(c,p)&&i(c[p],p)}}return r}const gY=(e,t,n,{allOwnKeys:r}={})=>(Zm(t,(i,s)=>{n&&hi(i)?Object.defineProperty(e,s,{__proto__:null,value:H$(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),yY=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vY=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},xY=(e,t,n,r)=>{let i,s,o;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&uf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bY=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},_Y=e=>{if(!e)return null;if(cu(e))return e;let t=e.length;if(!K$(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wY=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uf(Uint8Array)),jY=(e,t)=>{const r=(e&&e[Gm]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},SY=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},NY=Ua("HTMLFormElement"),CY=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:EY}=Object.prototype,PY=Ua("RegExp"),Y$=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zm(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},kY=e=>{Y$(e,(t,n)=>{if(hi(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(hi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},AY=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return cu(e)?r(e):r(String(e).split(t)),n},OY=()=>{},TY=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function MY(e){return!!(e&&hi(e.append)&&e[W$]==="FormData"&&e[Gm])}const RY=e=>{const t=new WeakSet,n=r=>{if(Kf(r)){if(t.has(r))return;if(Vf(r))return r;if(!("toJSON"in r)){t.add(r);const i=cu(r)?[]:{};return Zm(r,(s,o)=>{const c=n(s);!df(c)&&(i[o]=c)}),t.delete(r),i}}return r};return n(e)},IY=Ua("AsyncFunction"),LY=e=>e&&(Kf(e)||hi(e))&&hi(e.then)&&hi(e.catch),X$=((e,t)=>e?setImmediate:t?((n,r)=>(zc.addEventListener("message",({source:i,data:s})=>{i===zc&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),zc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",hi(zc.postMessage)),DY=typeof queueMicrotask<"u"?queueMicrotask.bind(zc):typeof process<"u"&&process.nextTick||X$,Q$=e=>e!=null&&hi(e[Gm]),$Y=e=>e!=null&&Kp(e,Gm)&&Q$(e),ue={isArray:cu,isArrayBuffer:V$,isBuffer:Vf,isFormData:cY,isArrayBufferView:XZ,isString:QZ,isNumber:K$,isBoolean:JZ,isObject:Kf,isPlainObject:fv,isEmptyObject:eY,isReadableStream:dY,isRequest:fY,isResponse:hY,isHeaders:pY,isUndefined:df,isDate:tY,isFile:nY,isReactNativeBlob:rY,isReactNative:iY,isBlob:aY,isRegExp:PY,isFunction:hi,isStream:oY,isURLSearchParams:uY,isTypedArray:wY,isFileList:sY,forEach:Zm,merge:dC,extend:gY,trim:mY,stripBOM:yY,inherits:vY,toFlatObject:xY,kindOf:w2,kindOfTest:Ua,endsWith:bY,toArray:_Y,forEachEntry:jY,matchAll:SY,isHTMLForm:NY,hasOwnProperty:Dv,hasOwnProp:Dv,hasOwnInPrototypeChain:Kp,getSafeProp:YZ,reduceDescriptors:Y$,freezeMethods:kY,toObjectSet:AY,toCamelCase:CY,noop:OY,toFiniteNumber:TY,findKey:G$,global:zc,isContextDefined:Z$,isSpecCompliantForm:MY,toJSONObject:RY,isAsyncFn:IY,isThenable:LY,setImmediate:X$,asap:DY,isIterable:Q$,isSafeIterable:$Y},FY=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BY=e=>{const t={};let n,r,i;return e&&e.split(`
678`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&FY[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function zY(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const UY=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),qY=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function j2(e,t){return ue.isArray(e)?e.map(n=>j2(n,t)):zY(String(e).replace(t,""))}const HY=e=>j2(e,UY),WY=e=>j2(e,qY);function J$(e){const t=Object.create(null);return ue.forEach(e.toJSON(),(n,r)=>{t[r]=WY(n)}),t}const UO=Symbol("internals");function ip(e){return e&&String(e).trim().toLowerCase()}function hv(e){return e===!1||e==null?e:ue.isArray(e)?e.map(hv):HY(String(e))}function VY(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const KY=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function cw(e,t,n,r,i){if(ue.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ue.isString(t)){if(ue.isString(r))return t.indexOf(r)!==-1;if(ue.isRegExp(r))return r.test(t)}}function GY(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ZY(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let $r=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(c,d,h){const p=ip(d);if(!p)return;const m=ue.findKey(i,p);(!m||i[m]===void 0||h===!0||h===void 0&&i[m]!==!1)&&(i[m||d]=hv(c))}const o=(c,d)=>ue.forEach(c,(h,p)=>s(h,p,d));if(ue.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ue.isString(t)&&(t=t.trim())&&!KY(t))o(BY(t),n);else if(ue.isObject(t)&&ue.isSafeIterable(t)){let c=Object.create(null),d,h;for(const p of t){if(!ue.isArray(p))throw new TypeError("Object iterator must return a key-value pair");h=p[0],ue.hasOwnProp(c,h)?(d=c[h],c[h]=ue.isArray(d)?[...d,p[1]]:[d,p[1]]):c[h]=p[1]}o(c,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ip(t),t){const r=ue.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return VY(i);if(ue.isFunction(n))return n.call(this,i,r);if(ue.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ip(t),t){const r=ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||cw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=ip(o),o){const c=ue.findKey(r,o);c&&(!n||cw(r,r[c],c,n))&&(delete r[c],i=!0)}}return ue.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||cw(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return ue.forEach(this,(i,s)=>{const o=ue.findKey(r,s);if(o){n[o]=hv(i),delete n[s];return}const c=t?GY(s):String(s).trim();c!==s&&delete n[s],n[c]=hv(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ue.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
679`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);
vendor: 5,118 bytes, line 679
679return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[UO]=this[UO]={accessors:{}}).accessors,i=this.prototype;function s(o){const c=ip(o);r[c]||(ZY(i,o),r[c]=!0)}return ue.isArray(t)?t.forEach(s):s(t),this}};$r.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors($r.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ue.freezeMethods($r);const YY="[REDACTED ****]";function XY(e){if(ue.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ue.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function QY(e,t){const n=new Set(t.map(s=>String(s).toLowerCase())),r=[],i=s=>{if(s===null||typeof s!="object"||ue.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof $r&&(s=s.toJSON()),r.push(s);let o;if(ue.isArray(s))o=[],s.forEach((c,d)=>{const h=i(c);ue.isUndefined(h)||(o[d]=h)});else{if(!ue.isPlainObject(s)&&XY(s))return r.pop(),s;o=Object.create(null);for(const[c,d]of Object.entries(s)){const h=n.has(c.toLowerCase())?YY:i(d);ue.isUndefined(h)||(o[c]=h)}}return r.pop(),o};return i(e)}let We=class e6 extends Error{static from(t,n,r,i,s,o){const c=new e6(t.message,n||t.code,r,i,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(t,n,r,i,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,n=t&&ue.hasOwnProp(t,"redact")?t.redact:void 0,r=ue.isArray(n)&&n.length>0?QY(t,n):ue.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};We.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";We.ERR_BAD_OPTION="ERR_BAD_OPTION";We.ECONNABORTED="ECONNABORTED";We.ETIMEDOUT="ETIMEDOUT";We.ECONNREFUSED="ECONNREFUSED";We.ERR_NETWORK="ERR_NETWORK";We.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";We.ERR_DEPRECATED="ERR_DEPRECATED";We.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";We.ERR_BAD_REQUEST="ERR_BAD_REQUEST";We.ERR_CANCELED="ERR_CANCELED";We.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";We.ERR_INVALID_URL="ERR_INVALID_URL";We.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const JY=null,t6=100;function fC(e){return ue.isPlainObject(e)||ue.isArray(e)}function n6(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function uw(e,t,n){return e?e.concat(t).map(function(i,s){return i=n6(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function eX(e){return ue.isArray(e)&&!e.some(fC)}const tX=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function o0(e,t,n){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,E){return!ue.isUndefined(E[C])});const r=n.metaTokens,i=n.visitor||w,s=n.dots,o=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,d=n.maxDepth===void 0?t6:n.maxDepth,h=c&&ue.isSpecCompliantForm(t),p=[];if(!ue.isFunction(i))throw new TypeError("visitor must be a function");function m(j){if(j===null)return"";if(ue.isDate(j))return j.toISOString();if(ue.isBoolean(j))return j.toString();if(!h&&ue.isBlob(j))throw new We("Blob is not supported. Use a Buffer instead.");if(ue.isArrayBuffer(j)||ue.isTypedArray(j)){if(h&&typeof c=="function")return new c([j]);if(typeof Buffer<"u")return Buffer.from(j);throw new We("Blob is not supported. Use a Buffer instead.",We.ERR_NOT_SUPPORT)}return j}function v(j){if(j>d)throw new We("Object is too deeply nested ("+j+" levels). Max depth: "+d,We.ERR_FORM_DATA_DEPTH_EXCEEDED)}function x(j,C){if(d===1/0)return JSON.stringify(j);const E=[];return JSON.stringify(j,function(k,M){if(!ue.isObject(M))return M;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(M),v(C+E.length-1),M})}function w(j,C,E){let A=j;if(ue.isReactNative(t)&&ue.isReactNativeBlob(j))return t.append(uw(E,C,s),m(j)),!1;if(j&&!E&&typeof j=="object"){if(ue.endsWith(C,"{}"))C=r?C:C.slice(0,-2),j=x(j,1);else if(ue.isArray(j)&&eX(j)||(ue.isFileList(j)||ue.endsWith(C,"[]"))&&(A=ue.toArray(j)))return C=n6(C),A.forEach(function(M,I){!(ue.isUndefined(M)||M===null)&&t.append(o===!0?uw([C],I,s):o===null?C:C+"[]",m(M))}),!1}return fC(j)?!0:(t.append(uw(E,C,s),m(j)),!1)}const b=Object.assign(tX,{defaultVisitor:w,convertValue:m,isVisitable:fC});function _(j,C,E=0){if(!ue.isUndefined(j)){if(v(E),p.indexOf(j)!==-1)throw new Error("Circular reference detected in "+C.join("."));p.push(j),ue.forEach(j,function(k,M){(!(ue.isUndefined(k)||k===null)&&i.call(t,k,ue.isString(M)?M.trim():M,C,b))===!0&&_(k,C?C.concat(M):[M],E+1)}),p.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return _(e),t}
vendor: 3,980 bytes, line 679
679function qO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function S2(e,t){this._pairs=[],e&&o0(e,this,t)}const r6=S2.prototype;r6.append=function(t,n){this._pairs.push([t,n])};r6.toString=function(t){const n=t?r=>t.call(this,r,qO):qO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function nX(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function i6(e,t,n){if(!t)return e;e=e||"";const r=ue.isFunction(n)?{serialize:n}:n,i=ue.getSafeProp(r,"encode")||nX,s=ue.getSafeProp(r,"serialize");let o;if(s?o=s(t,r):o=ue.isURLSearchParams(t)?t.toString():new S2(t,r).toString(i),o){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class HO{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const N2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},rX=typeof URLSearchParams<"u"?URLSearchParams:S2,iX=typeof FormData<"u"?FormData:null,aX=typeof Blob<"u"?Blob:null,sX={isBrowser:!0,classes:{URLSearchParams:rX,FormData:iX,Blob:aX},protocols:["http","https","file","blob","url","data"]},C2=typeof window<"u"&&typeof document<"u",hC=typeof navigator=="object"&&navigator||void 0,oX=C2&&(!hC||["ReactNative","NativeScript","NS"].indexOf(hC.product)<0),lX=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cX=C2&&window.location.href||"http://localhost",uX=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:C2,hasStandardBrowserEnv:oX,hasStandardBrowserWebWorkerEnv:lX,navigator:hC,origin:cX},Symbol.toStringTag,{value:"Module"})),wr={...uX,...sX};function dX(e,t){return o0(e,new wr.classes.URLSearchParams,{visitor:function(n,r,i,s){return wr.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const WO=t6;function a6(e){if(e>WO)throw new We("FormData field is too deeply nested ("+e+" levels). Max depth: "+WO,We.ERR_FORM_DATA_DEPTH_EXCEEDED)}function fX(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)a6(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function hX(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function s6(e){function t(n,r,i,s){a6(s);let o=n[s++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),d=s>=n.length;return o=!o&&ue.isArray(i)?i.length:o,d?(ue.hasOwnProp(i,o)?i[o]=ue.isArray(i[o])?i[o].concat(r):[i[o],r]:i[o]=r,!c):((!ue.hasOwnProp(i,o)||!ue.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&ue.isArray(i[o])&&(i[o]=hX(i[o])),!c)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};return ue.forEachEntry(e,(r,i)=>{t(fX(r),i,n,0)}),n}return null}const Ed=(e,t)=>e!=null&&ue.hasOwnProp(e,t)?e[t]:void 0;function pX(e,t,n){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ym={transitional:N2,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ue.isObject(t);if(s&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return i?JSON.stringify(s6(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;
vendor: 20,790 bytes, lines 679-681
679if(s){const d=Ed(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return dX(t,d).toString();if((c=ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=Ed(this,"env"),p=h&&h.FormData;return o0(c?{"files[]":t}:t,p&&new p,d)}}return s||i?(n.setContentType("application/json",!1),pX(t)):t}],transformResponse:[function(t){const n=Ed(this,"transitional")||Ym.transitional,r=n&&n.forcedJSONParsing,i=Ed(this,"responseType"),s=i==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(r&&!i||s)){const c=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,Ed(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?We.from(d,We.ERR_BAD_RESPONSE,this,null,Ed(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch","query"],e=>{Ym.headers[e]={}});function dw(e,t){const n=this||Ym,r=t||n,i=$r.from(r.headers);let s=r.data;return ue.forEach(e,function(c){s=c.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function o6(e){return!!(e&&e.__CANCEL__)}let Xm=class extends We{constructor(t,n,r){super(t??"canceled",We.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function l6(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new We("Request failed with status code "+n.status,n.status>=400&&n.status<500?We.ERR_BAD_REQUEST:We.ERR_BAD_RESPONSE,n.config,n.request,n))}function mX(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function gX(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[s];o||(o=h),n[i]=d,r[i]=h;let m=s,v=0;for(;m!==i;)v+=n[m++],m=m%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),h-o<t)return;const x=p&&h-p;return x?Math.round(v*1e3/x):void 0}}function yX(e,t){let n=0,r=1e3/t,i,s;const o=(h,p=Date.now())=>{n=p,i=null,s&&(clearTimeout(s),s=null),e(...h)};return[(...h)=>{const p=Date.now(),m=p-n;m>=r?o(h,p):(i=h,s||(s=setTimeout(()=>{s=null,o(i)},r-m)))},()=>i&&o(i)]}const $v=(e,t,n=3)=>{let r=0;const i=gX(50,250);return yX(s=>{if(!s||typeof s.loaded!="number")return;const o=s.loaded,c=s.lengthComputable?s.total:void 0,d=c!=null?Math.min(o,c):o,h=Math.max(0,d-r),p=i(h);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},VO=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},KO=e=>(...t)=>ue.asap(()=>e(...t)),vX=wr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wr.origin),wr.navigator&&/(msie|trident)/i.test(wr.navigator.userAgent)):()=>!0,xX=wr.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];ue.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),ue.isString(r)&&c.push(`path=${r}`),ue.isString(i)&&c.push(`domain=${i}`),s===!0&&c.push("secure"),ue.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function bX(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _X(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const wX=/^https?:(?!\/\/)/i,jX=/[\t\n\r]/g;function SX(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function NX(e){return SX(e).replace(jX,"")}function GO(e,t){if(typeof e=="string"&&wX.test(NX(e)))throw new We('Invalid URL: missing "//" after protocol',We.ERR_INVALID_URL,t)}function c6(e,t,n,r){GO(t,r);let i=!bX(t);return e&&(i||n===!1)?(GO(e,r),_X(e,t)):t}const ZO=e=>e instanceof $r?{...e}:e;function uu(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,v,x){return ue.isPlainObject(p)&&ue.isPlainObject(m)?ue.merge.call({caseless:x},p,m):ue.isPlainObject(m)?ue.merge({},m):ue.isArray(m)?m.slice():m}function i(p,m,v,x){if(ue.isUndefined(m)){if(!ue.isUndefined(p))return r(void 0,p,v,x)}else return r(p,m,v,x)}function s(p,m){if(!ue.isUndefined(m))return r(void 0,m)}function o(p,m){if(ue.isUndefined(m)){if(!ue.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=ue.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ue.isUndefined(m))if(ue.isPlainObject(m)){if(ue.hasOwnProp(m,p))return m[p]}else return;const v=ue.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ue.isPlainObject(v)&&ue.hasOwnProp(v,p))return v[p]}function d(p,m,v){if(ue.hasOwnProp(t,v))return r(p,m);if(ue.hasOwnProp(e,v))return r(void 0,p)}const h={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:d,headers:(p,m,v)=>i(ZO(p),ZO(m),v,!0)};return ue.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const v=ue.hasOwnProp(h,m)?h[m]:i,x=ue.hasOwnProp(e,m)?e[m]:void 0,w=ue.hasOwnProp(t,m)?t[m]:void 0,b=v(x,w,m);ue.isUndefined(b)&&v!==d||(n[m]=b)}),ue.hasOwnProp(t,"validateStatus")&&ue.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(ue.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const CX=["content-type","content-length"];function EX(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{CX.includes(r.toLowerCase())&&e.set(r,i)})}const PX=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function u6(e){const t=uu({},e),n=v=>ue.hasOwnProp(t,v)?t[v]:void 0,r=n("data");let i=n("withXSRFToken");const s=n("xsrfHeaderName"),o=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=$r.from(c),t.url=i6(c6(h,m,p,t),n("params"),n("paramsSerializer")),d){const v=ue.getSafeProp(d,"username")||"",x=ue.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(v+":"+(x?PX(x):"")))}catch(w){throw We.from(w,We.ERR_BAD_OPTION_VALUE,e)}}if(ue.isFormData(r)&&(wr.hasStandardBrowserEnv||wr.hasStandardBrowserWebWorkerEnv||ue.isReactNative(r)?c.setContentType(void 0):ue.isFunction(r.getHeaders)&&EX(c,r.getHeaders(),n("formDataHeaderPolicy"))),wr.hasStandardBrowserEnv&&(ue.isFunction(i)&&(i=i(t)),i===!0||i==null&&vX(t.url))){const x=s&&o&&xX.read(o);x&&c.set(s,x)}return t}const kX=typeof XMLHttpRequest<"u",AX=kX&&function(e){return new Promise(function(n,r){const i=u6(e);let s=i.data;const o=$r.from(i.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=i,p,m,v,x,w;function b(){x&&x(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let _=new XMLHttpRequest;_.open(i.method.toUpperCase(),i.url,!0),_.timeout=i.timeout;function j(){if(!_)return;const E=$r.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),k={data:!c||c==="text"||c==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:e,request:_};l6(function(I){n(I),b()},function(I){r(I),b()},k),_=null}"onloadend"in _?_.onloadend=j:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(j)},_.onabort=function(){_&&(r(new We("Request aborted",We.ECONNABORTED,e,_)),b(),_=null)},_.onerror=function(A){const k=A&&A.message?A.message:"Network Error",M=new We(k,We.ERR_NETWORK,e,_);M.event=A||null,r(M),b(),_=null},_.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||N2;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),r(new We(A,k.clarifyTimeoutError?We.ETIMEDOUT:We.ECONNABORTED,e,_)),b(),_=null},s===void 0&&o.setContentType(null),"setRequestHeader"in _&&ue.forEach(J$(o),function(A,k){_.setRequestHeader(k,A)}),ue.isUndefined(i.withCredentials)||(_.withCredentials=!!i.withCredentials),c&&c!=="json"&&(_.responseType=i.responseType),h&&([v,w]=$v(h,!0),_.addEventListener("progress",v)),d&&_.upload&&([m,x]=$v(d),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",x)),(i.cancelToken||i.signal)&&(p=E=>{_&&(r(!E||E.type?new Xm(null,e,_):E),_.abort(),b(),_=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const C=mX(i.url);if(C&&!wr.protocols.includes(C)){r(new We("Unsupported protocol "+C+":",We.ERR_BAD_REQUEST,e)),b();return}_.send(s||null)})},OX=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(d){if(!r){r=!0,o();const h=d instanceof Error?d:this.reason;n.abort(h instanceof We?h:new Xm(h instanceof Error?h.message:h))}};let s=t&&setTimeout(()=>{s=null,i(new We(`timeout of ${t}ms exceeded`,We.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>ue.asap(o),c},TX=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},MX=async function*(e,t){for await(const n of RX(e))yield*TX(n,t)},RX=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},YO=(e,t,n,r)=>{const i=MX(e,t);let s=0,o,c=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:h,value:p}=await i.next();if(h){c(),d.close();return}let m=p.byteLength;if(n){let v=s+=m;n(v)}d.enqueue(new Uint8Array(p))}catch(h){throw c(h),h}},cancel(d){return c(d),i.return()}},{highWaterMark:2})},Fv=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,IX=(e,t,n)=>t+2<n&&Fv(e.charCodeAt(t+1))&&Fv(e.charCodeAt(t+2));function LX(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let o=r.length;const c=r.length;for(let x=0;x<c;x++)if(r.charCodeAt(x)===37&&x+2<c){const w=r.charCodeAt(x+1),b=r.charCodeAt(x+2);Fv(w)&&Fv(b)&&(o-=2,x+=2)}let d=0,h=c-1;const p=x=>x>=2&&r.charCodeAt(x-2)===37&&r.charCodeAt(x-1)===51&&(r.charCodeAt(x)===68||r.charCodeAt(x)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const v=Math.floor(o/4)*3-(d||0);return v>0?v:0}let s=0;for(let o=0,c=r.length;o<c;o++){const d=r.charCodeAt(o);if(d===37&&IX(r,o,c))s+=1,o+=2;else if(d<128)s+=1;else if(d<2048)s+=2;else if(d>=55296&&d<=56319&&o+1<c){const h=r.charCodeAt(o+1);h>=56320&&h<=57343?(s+=4,o++):s+=3}else s+=3}return s}const E2="1.18.1",XO=64*1024,{isFunction:Dy}=ue,DX=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),QO=e=>{if(!ue.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},JO=(e,...t)=>{try{return!!e(...t)}catch{return!1}},$X=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},FX=e=>{const t=ue.global!==void 0&&ue.global!==null?ue.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ue.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:s,Response:o}=e,c=i?Dy(i):typeof fetch=="function",d=Dy(s),h=Dy(o);if(!c)return!1;const p=c&&Dy(n),m=c&&(typeof r=="function"?(j=>C=>j.encode(C))(new r):async j=>new Uint8Array(await new s(j).arrayBuffer())),v=d&&p&&JO(()=>{let j=!1;const C=new s(wr.origin,{body:new n,method:"POST",get duplex(){return j=!0,"half"}}),E=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),j&&!E}),x=h&&p&&JO(()=>ue.isReadableStream(new o("").body)),w={stream:x&&(j=>j.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!w[j]&&(w[j]=(C,E)=>{let A=C&&C[j];if(A)return A.call(C);throw new We(`Response type '${j}' is not supported`,We.ERR_NOT_SUPPORT,E)})});const b=async j=>{if(j==null)return 0;if(ue.isBlob(j))return j.size;if(ue.isSpecCompliantForm(j))return(await new s(wr.origin,{method:"POST",body:j}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(j)||ue.isArrayBuffer(j))return j.byteLength;if(ue.isURLSearchParams(j)&&(j=j+""),ue.isString(j))return(await m(j)).byteLength},_=async(j,C)=>{const E=ue.toFiniteNumber(j.getContentLength());return E??b(C)};return async j=>{let{url:C,method:E,data:A,signal:k,cancelToken:M,timeout:I,onDownloadProgress:$,onUploadProgress:q,responseType:V,headers:H,withCredentials:U="same-origin",fetchOptions:z,maxContentLength:Z,maxBodyLength:ee}=u6(j);const G=ue.isNumber(Z)&&Z>-1,oe=ue.isNumber(ee)&&ee>-1,W=he=>ue.hasOwnProp(j,he)?j[he]:void 0;let ie=i||fetch;V=V?(V+"").toLowerCase():"text";let ae=OX([k,M&&M.toAbortSignal()],I),K=null;const ne=ae&&ae.unsubscribe&&(()=>{ae.unsubscribe()});let ve,je=null;const Y=()=>new We("Request body larger than maxBodyLength limit",We.ERR_BAD_REQUEST,j,K);try{let he;const fe=W("auth");if(fe){const Le=ue.getSafeProp(fe,"username")||"",rt=ue.getSafeProp(fe,"password")||"";he={username:Le,password:rt}}if($X(C)){const Le=new URL(C,wr.origin);if(!he&&(Le.username||Le.password)){const rt=QO(Le.username),Ct=QO(Le.password);he={username:rt,password:Ct}}(Le.username||Le.password)&&(Le.username="",Le.password="",C=Le.href)}if(he&&(H.delete("authorization"),H.set("Authorization","Basic "+btoa(DX((he.username||"")+":"+(he.password||""))))),G&&typeof C=="string"&&C.startsWith("data:")&&LX(C)>Z)throw new We("maxContentLength size of "+Z+" exceeded",We.ERR_BAD_RESPONSE,j,K);if(oe&&E!=="get"&&E!=="head"){const Le=await b(A);if(typeof Le=="number"&&isFinite(Le)&&(ve=Le,Le>ee))throw Y()}const _e=oe&&(ue.isReadableStream(A)||ue.isStream(A)),de=(Le,rt,Ct)=>YO(Le,XO,_t=>{if(oe&&_t>ee)throw je=Y();rt&&rt(_t)},Ct);if(v&&E!=="get"&&E!=="head"&&(q||_e)){if(ve=ve??await _(H,A),ve!==0||_e){let Le=new s(C,{method:"POST",body:A,duplex:"half"}),rt;if(ue.isFormData(A)&&(rt=Le.headers.get("content-type"))&&H.setContentType(rt),Le.body){const[Ct,_t]=q&&VO(ve,$v(KO(q)))||[];A=de(Le.body,Ct,_t)}}}else if(_e&&!d&&p&&E!=="get"&&E!=="head")A=de(A);else if(_e&&d&&!v&&E!=="get"&&E!=="head")throw new We("Stream request bodies are not supported by the current fetch implementation",We.ERR_NOT_SUPPORT,j,K);ue.isString(U)||(U=U?"include":"omit");const we=d&&"credentials"in s.prototype;if(ue.isFormData(A)){const Le=H.getContentType();Le&&/^multipart\/form-data/i.test(Le)&&!/boundary=/i.test(Le)&&H.delete("content-type")}H.set("User-Agent","axios/"+E2,!1);const ke={...z,signal:ae,method:E.toUpperCase(),headers:J$(H.normalize()),body:A,duplex:"half",credentials:we?U:void 0};K=d&&new s(C,ke);let re=await(d?ie(K,z):ie(C,ke));const Re=$r.from(re.headers);if(G){const Le=ue.toFiniteNumber(Re.getContentLength());if(Le!=null&&Le>Z)throw new We("maxContentLength size of "+Z+" exceeded",We.ERR_BAD_RESPONSE,j,K)}const ge=x&&(V==="stream"||V==="response");if(x&&re.body&&($||G||ge&&ne)){const Le={};["status","statusText","headers"].forEach(dn=>{Le[dn]=re[dn]});const rt=ue.toFiniteNumber(Re.getContentLength()),[Ct,_t]=$&&VO(rt,$v(KO($),!0))||[];let Gt=0;const qt=dn=>{if(G&&(Gt=dn,Gt>Z))throw new We("maxContentLength size of "+Z+" exceeded",We.ERR_BAD_RESPONSE,j,K);Ct&&Ct(dn)};re=new o(YO(re.body,XO,qt,()=>{_t&&_t(),ne&&ne()}),Le)}V=V||"text";let Be=await w[ue.findKey(w,V)||"text"](re,j);if(G&&!x&&!ge){let Le;if(Be!=null&&(typeof Be.byteLength=="number"?Le=Be.byteLength:typeof Be.size=="number"?Le=Be.size:typeof Be=="string"&&(Le=typeof r=="function"?new r().encode(Be).byteLength:Be.length)),typeof Le=="number"&&Le>Z)throw new We("maxContentLength size of "+Z+" exceeded",We.ERR_BAD_RESPONSE,j,K)}return!ge&&ne&&ne(),await new Promise((Le,rt)=>{l6(Le,rt,{data:Be,headers:$r.from(re.headers),status:re.status,statusText:re.statusText,config:j,request:K})})}catch(he){if(ne&&ne(),ae&&ae.aborted&&ae.reason instanceof We){const fe=ae.reason;throw fe.config=j,K&&(fe.request=K),he!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:he,writable:!0,enumerable:!1,configurable:!0}),fe}if(je)throw K&&!je.request&&(je.request=K),je;if(he instanceof We)throw K&&!he.request&&(he.request=K),he;if(he&&he.name==="TypeError"&&/Load failed|fetch/i.test(he.message)){const fe=new We("Network Error",We.ERR_NETWORK,j,K,he&&he.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:he.cause||he,writable:!0,enumerable:!1,configurable:!0}),fe}throw We.from(he,he&&he.code,j,K,he&&he.response)}}},BX=new Map,d6=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,c=o,d,h,p=BX;for(;c--;)d=s[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:FX(t)),p=h;return h};d6();const P2={http:JY,xhr:AX,fetch:{get:d6}};ue.forEach(P2,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const eT=e=>`- ${e}`,zX=e=>ue.isFunction(e)||e===null||e===!1;function UX(e,t){e=ue.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let c;if(i=r,!zX(r)&&(i=P2[(c=String(r)).toLowerCase()],i===void 0))throw new We(`Unknown adapter '${c}'`);if(i&&(ue.isFunction(i)||(i=i.get(t))))break;s[c||"#"+o]=i}if(!i){const o=Object.entries(s).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
680`+o.map(eT).join(`
681`):" "+eT(o[0]):"as no adapter specified";throw new We("There is no suitable adapter to dispatch the request "+c,We.ERR_NOT_SUPPORT)}return i}const f6={getAdapter:UX,adapters:P2};function fw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xm(null,e)}function tT(e){return fw(e),e.headers=$r.from(e.headers),e.data=dw.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),f6.getAdapter(e.adapter||Ym.adapter,e)(e).then(function(r){fw(e),e.response=r;try{r.data=dw.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=$r.from(r.headers),r},function(r){if(!o6(r)&&(fw(e),r&&r.response)){e.response=r.response;try{r.response.data=dw.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=$r.from(r.response.headers)}return Promise.reject(r)})}const l0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{l0[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const nT={};l0.transitional=function(t,n,r){function i(s,o){return"[Axios v"+E2+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,c)=>{if(t===!1)throw new We(i(o," has been removed"+(n?" in "+n:"")),We.ERR_DEPRECATED);return n&&!nT[o]&&(nT[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,c):!0}};l0.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function qX(e,t,n){if(typeof e!="object"||e===null)throw new We("options must be an object",We.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(o){const c=e[s],d=c===void 0||o(c,s,e);if(d!==!0)throw new We("option "+s+" must be "+d,We.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new We("Unknown option "+s,We.ERR_BAD_OPTION)}}const pv={assertOptions:qX,validators:l0},Mr=pv.validators;let ru=class{constructor(t){this.defaults=t||{},this.interceptors={request:new HO,response:new HO}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=(()=>
vendor: 3,925 bytes, lines 681-685
681{if(!i.stack)return"";const o=i.stack.indexOf(`
682`);return o===-1?"":i.stack.slice(o+1)})();try{if(!r.stack)r.stack=s;else if(s){const o=s.indexOf(`
683`),c=o===-1?-1:s.indexOf(`
684`,o+1),d=c===-1?"":s.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
685`+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=uu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&pv.assertOptions(r,{silentJSONParsing:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean),legacyInterceptorReqResOrdering:Mr.transitional(Mr.boolean),advertiseZstdAcceptEncoding:Mr.transitional(Mr.boolean),validateStatusUndefinedResolves:Mr.transitional(Mr.boolean)},!1),i!=null&&(ue.isFunction(i)?n.paramsSerializer={serialize:i}:pv.assertOptions(i,{encode:Mr.function,serialize:Mr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),pv.assertOptions(n,{baseUrl:Mr.spelling("baseURL"),withXsrfToken:Mr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&ue.merge(s.common,s[n.method]);s&&ue.forEach(["delete","get","head","post","put","patch","query","common"],w=>{delete s[w]}),n.headers=$r.concat(o,s);const c=[];let d=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;d=d&&b.synchronous;const _=n.transitional||N2;_&&_.legacyInterceptorReqResOrdering?c.unshift(b.fulfilled,b.rejected):c.push(b.fulfilled,b.rejected)});const h=[];this.interceptors.response.forEach(function(b){h.push(b.fulfilled,b.rejected)});let p,m=0,v;if(!d){const w=[tT.bind(this),void 0];for(w.unshift(...c),w.push(...h),v=w.length,p=Promise.resolve(n);m<v;)p=p.then(w[m++],w[m++]);return p}v=c.length;let x=n;for(;m<v;){const w=c[m++],b=c[m++];try{x=w(x)}catch(_){b.call(this,_);break}}try{p=tT.call(this,x)}catch(w){return Promise.reject(w)}for(m=0,v=h.length;m<v;)p=p.then(h[m++],h[m++]);return p}getUri(t){t=uu(this.defaults,t);const n=c6(t.baseURL,t.url,t.allowAbsoluteUrls,t);return i6(n,t.params,t.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(t){ru.prototype[t]=function(n,r){return this.request(uu(r||{},{method:t,url:n,data:r&&ue.hasOwnProp(r,"data")?r.data:void 0}))}});ue.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,o,c){return this.request(uu(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}ru.prototype[t]=n(),t!=="query"&&(ru.prototype[t+"Form"]=n(!0))});let HX=class h6{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(c=>{r.subscribe(c),s=c}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,c){r.reason||(r.reason=new Xm(s,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new h6(function(i){t=i}),cancel:t}}};function WX(e){return function(n){return e.apply(null,n)}}function VX(e){return ue.isObject(e)&&e.isAxiosError===!0}const pC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
685alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};
685Object.entries(pC).forEach(([e,t])=>{pC[t]=e});function p6(e){const t=new ru(e),n=H$(ru.prototype.request,t);return ue.extend(n,ru.prototype,t,{allOwnKeys:!0}),ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return p6(uu(e,i))},n}const In=p6(Ym);In.Axios=ru;In.CanceledError=Xm;In.CancelToken=HX;In.isCancel=o6;In.VERSION=E2;In.toFormData=o0;In.AxiosError=We;In.Cancel=In.CanceledError;In.all=function(t){return Promise.all(t)};In.spread=WX;In.isAxiosError=VX;In.mergeConfig=uu;In.AxiosHeaders=$r;In.formToJSON=e=>s6(ue.isHTMLForm(e)?new FormData(e):e);In.getAdapter=f6.getAdapter;In.HttpStatusCode=pC;In.default=In;const{Axios:xEe,AxiosError:bEe,CanceledError:_Ee,isCancel:wEe,CancelToken:jEe,VERSION:SEe,all:NEe,Cancel:CEe,isAxiosError:EEe,spread:PEe,toFormData:kEe,AxiosHeaders:AEe,HttpStatusCode:OEe,formToJSON:TEe,getAdapter:MEe,mergeConfig:REe,create:IEe}=In,m6=typeof window>"u",rT=!m6&&window.self!==window.top,KX=!m6&&typeof document>"u",g6=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),xr=[];for(let e=0;e<256;++e)xr.push((e+256).toString(16).slice(1));function GX(e,t=0){return(xr[e[t+0]]+xr[e[t+1]]+xr[e[t+2]]+xr[e[t+3]]+"-"+xr[e[t+4]]+xr[e[t+5]]+"-"+xr[e[t+6]]+xr[e[t+7]]+"-"+xr[e[t+8]]+xr[e[t+9]]+"-"+xr[e[t+10]]+xr[e[t+11]]+xr[e[t+12]]+xr[e[t+13]]+xr[e[t+14]]+xr[e[t+15]]).toLowerCase()}let hw;const ZX=new Uint8Array(16);function YX(){if(!hw){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hw=crypto.getRandomValues.bind(crypto)}return hw(ZX)}const XX=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iT={randomUUID:XX};function QX(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??YX();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,GX(r)}function JX(e,t,n){return iT.randomUUID&&!e?iT.randomUUID():QX(e)}const ap=typeof window<"u"?window:{base44SharedInstances:{}};function eQ(e,t){return ap.base44SharedInstances||(ap.base44SharedInstances={}),ap.base44SharedInstances[e]||(ap.base44SharedInstances[e]={instance:t()}),ap.base44SharedInstances[e].instance}const tQ="__user_heartbeat_event__",nQ="__initialization_event__",rQ="__session_duration_event__",aT="analytics-enable",sT="base44_analytics_session_id",iQ={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},aQ="analytics",Jt=eQ(aQ,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...iQ,...hQ()}})),sQ=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r,enabled:i})=>{var s;const{maxQueueSize:o,throttleTime:c,batchSize:d}=Jt.config;if(!i||!(!((s=Jt.config)===null||s===void 0)&&s.enabled)||KX)return{track:()=>{},cleanup:()=>{}};let h;const p=`${t}/api/apps/${n}/analytics/track/batch`,m=async A=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:A}})},v=A=>{try{const k=JSON.stringify({events:A}),M=new Blob([k],{type:"application/json"});return typeof navigator>"u"||k.length>6e4||!navigator.sendBeacon(p,M)}catch{return!1}},x=async(A,k={})=>{if(A.length===0)return;const M=await fQ(r),I=A.map(dQ(M));try{(!k.isBeacon||!v(I))&&await m(I)}catch{}},w=()=>{lT(x,{throttleTime:c,batchSize:d})},b=A=>{if(Jt.requestsQueue.length>=o)return;const k=uQ();Jt.requestsQueue.push({...A,...k}),w()},_=()=>{lT(x,{throttleTime:c,batchSize:d}),h=cT(b),lQ()},j=()=>{oT(),h==null||h(),cQ(b);const A=Jt.requestsQueue.splice(0);x(A,{isBeacon:!0})},C=()=>{typeof window>"u"||(document.visibilityState==="hidden"?j():document.visibilityState==="visible"&&_())},E=()=>{oT(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",C)};return w(),h=cT(b),oQ(b),typeof window<"u"&&window.addEventListener("visibilitychange",C),{track:b,cleanup:E}};function oT(){Jt.isProcessing=!1}async function lT(e,t){if(Jt.isProcessing)return;Jt.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;Jt.isProcessing&&Jt.requestsQueue.length>0;){const i=Jt.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(s=>setTimeout(s,n))}Jt.isProcessing=!1}function cT(e){var t;if(typeof window>"u"||Jt.isHeartBeatProcessing||((t=Jt.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Jt.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:tQ})},Jt.config.heartBeatInterval);return()=>{clearInterval(n),Jt.isHeartBeatProcessing=!1}}function oQ(e){typeof window>"u"||Jt.wasInitializationTracked||(Jt.wasInitializationTracked=!0,e({eventName:nQ,properties:{referrer:document==null?void 0:document.referrer}}))}function lQ(){typeof window>"u"||Jt.sessionStartTime!==null||(Jt.sessionStartTime=new Date().toISOString())}function cQ(e){if(typeof window>"u"||Jt.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Jt.sessionStartTime).getTime();Jt.sessionStartTime=null,e({eventName:rQ,properties:{sessionDuration:t}})}function uQ(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function dQ(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let _p=null;function uT(){Jt.sessionContext=null,_p=null}async function fQ(e){if(!Jt.sessionContext){if(!e.hasToken())return{user_id:null,
685session_id:Bv()};if(!_p){const r=Bv();_p=e.me().then(i=>({user_id:i.id,session_id:r})).catch(()=>({user_id:null,session_id:r}))}const t=_p,n=await t;return _p===t&&(Jt.sessionContext=n),n}return Jt.sessionContext}function hQ(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(aT);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(aT);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function dT(){var e;return(e=Jt.fallbackSessionId)!==null&&e!==void 0?e:Jt.fallbackSessionId=g6()}function Bv(){if(typeof window>"u")return dT();try{const e=localStorage.getItem(sT);if(!e){const t=g6();return localStorage.setItem(sT,t),t}return e}catch{return dT()}}class pQ extends Error{constructor(t,n,r,i,s){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Ld({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const s=In.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(s.defaults.headers.common.Authorization=`Bearer ${n}`),s.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",Bv()));const c=JX();if(o.requestId=c,rT)try{window.parent.postMessage({type:"api-request-start",requestId:c,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),r&&s.interceptors.response.use(o=>{var c;const d=(c=o.config)===null||c===void 0?void 0:c.requestId;try{rT&&d&&window.parent.postMessage({type:"api-request-end",requestId:d,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var c,d,h,p,m,v,x,w,b,_,j,C,E,A,k;const M=((d=(c=o.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message)||((p=(h=o.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.detail)||o.message,I=new pQ(M,(m=o.response)===null||m===void 0?void 0:m.status,(C=(w=(x=(v=o.response)===null||v===void 0?void 0:v.data)===null||x===void 0?void 0:x.code)!==null&&w!==void 0?w:(j=(_=(b=o.response)===null||b===void 0?void 0:b.headers)===null||_===void 0?void 0:_.get)===null||j===void 0?void 0:j.call(_,"x-base44-connector-error"))!==null&&C!==void 0?C:(A=(E=o.response)===null||E===void 0?void 0:E.headers)===null||A===void 0?void 0:A["x-base44-connector-error"],(k=o.response)===null||k===void 0?void 0:k.data,o);return i==null||i(I),Promise.reject(I)}),s}function fT(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return gQ(t,n,s,r)}})}function mQ(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function gQ(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(s,o,c,d){const h={};return s&&(h.sort=s),o&&(h.limit=o),c&&(h.skip=c),d&&(h.fields=Array.isArray(d)?d.join(","):d),e.get(i,{params:h})},async filter(s,o,c,d,h){const p={q:JSON.stringify(s)};return o&&(p.sort=o),c&&(p.limit=c),d&&(p.skip=d),h&&(p.fields=Array.isArray(h)?h.join(","):h),e.get(i,{params:p})},async get(s){return e.get(`${i}/${s}`)},async create(s){return e.post(i,s)},async update(s,o){return e.put(`${i}/${s}`,o)},async delete(s){return e.delete(`${i}/${s}`)},async deleteMany(s){return e.delete(i,{data:s})},async bulkCreate(s){return e.post(`${i}/bulk`,s)},async updateMany(s,o){return e.patch(`${i}/update-many`,{query:s,data:o})},async bulkUpdate(s){return e.put(`${i}/bulk`,s)},async importEntities(s){const o=new FormData;return o.append("file",s,s.name),e.post(`${i}/import`,o,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(s){const o=`entities:${t}:${n}`;return r().subscribeToRoom(o,{update_model:h=>{var p;const m=mQ(h.data);if(m){m.type!=="delete"&&(!((p=m.data)===null||p===void 0)&&p._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${m.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${m.id}")\` to fetch the full record.`);try{s(m)}catch(v){console.error("[Base44 SDK] Subscription callback error:",v)}}}})}}}function yQ(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:s,queryParams:o,...c}=i??{},d={...c,...s&&{path_params:s},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,d)}}}function hT(e,t){const n=yQ(e,t);return new Proxy({}
685,{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async c=>{if(typeof c=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${c}`);let d,h;return c instanceof FormData||c&&Object.values(c).some(p=>p instanceof File)?(d=new FormData,Object.keys(c).forEach(p=>{c[p]instanceof File?d.append(p,c[p],c[p].name):typeof c[p]=="object"&&c[p]!==null?d.append(p,JSON.stringify(c[p])):d.append(p,c[p])}),h="multipart/form-data"):(d=c,h="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,d||c,{headers:{"Content-Type":h}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,d||c,{headers:{"Content-Type":h}})}}})}})}function vQ(){return typeof window>"u"?!1:window!==window.parent}function xQ(e,t,n){const s=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),c=window.open(e,"base44_auth",`width=500,height=600,left=${s},top=${o},resizable=yes,scrollbars=yes`);if(!c)return;const d=()=>{window.removeEventListener("message",h),clearInterval(p),c.closed||c.close()},h=m=>{var v;if(m.origin!==n||m.source!==c||!(!((v=m.data)===null||v===void 0)&&v.access_token))return;d();const x=new URL(t),{access_token:w,is_new_user:b}=m.data;x.searchParams.set("access_token",w),b!=null&&x.searchParams.set("is_new_user",String(b)),window.location.href=x.toString()},p=setInterval(()=>{c.closed&&d()},500);window.addEventListener("message",h)}function bQ(e,t,n,r){let i=null;const s=()=>{i=null};let o=!!r.token;return{hasToken(){return o},async me(){const c=i??e.get(`/apps/${n}/entities/User/me`).finally(()=>{i===c&&(i=null)});return i=c,c},async updateMe(c){return e.put(`/apps/${n}/entities/User/me`,c)},redirectToLogin(c){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const d=c?new URL(c,window.location.origin).toString():window.location.href,h=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(d)}`;window.location.href=h},loginWithProvider(c,d="/"){const h=new URL(d,window.location.origin).toString(),p=`app_id=${n}&from_url=${encodeURIComponent(h)}`;let m;c==="sso"?m=`/apps/${n}/auth/sso/login`:m=`/apps/auth${c==="google"?"":`/${c}`}/login`;const v=`${r.appBaseUrl}/api${m}?${p}`;if(vQ()){const x=`${v}&popup_origin=${encodeURIComponent(window.location.origin)}`;return xQ(x,h,window.location.origin)}window.location.href=v},logout(c){if(delete e.defaults.headers.common.Authorization,s(),uT(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(p){console.error("Failed to remove token from localStorage:",p)}const d=c||window.location.href,h=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(d)}`;window.location.href=h}},setToken(c,d=!0){if(c&&(s(),uT(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${c}`,t.defaults.headers.common.Authorization=`Bearer ${c}`,d&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",c),window.localStorage.setItem("token",c)}catch(h){console.error("Failed to save token to localStorage:",h)}},async loginViaEmailPassword(c,d,h){var p;try{const m=await e.post(`/apps/${n}/auth/login`,{email:c,password:d,...h&&{turnstile_token:h}}),{access_token:v,user:x}=m;return v&&this.setToken(v),{access_token:v,user:x}}catch(m){throw((p=m.response)===null||p===void 0?void 0:p.status)===401&&await this.logout(),m}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(c,d){return e.post(`/apps/${n}/users/invite-user`,{user_email:c,role:d})},register(c){return e.post(`/apps/${n}/auth/register`,c)},verifyOtp({email:c,otpCode:d}){return e.post(`/apps/${n}/auth/verify-otp`,{email:c,otp_code:d})},resendOtp(c){return e.post(`/apps/${n}/auth/resend-otp`,{email:c})},resetPasswordRequest(c){return e.post(`/apps/${n}/auth/reset-password-request`,{email:c})},resetPassword({resetToken:c,newPassword:d}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:c,new_password:d})},changePassword({userId:c,currentPassword:d,newPassword:h}){return e.post(`/apps/${n}/auth/change-password`,{user_id:c,current_password:d,new_password:h})}}}function _Q(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)},async getIdToken(n){const r=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(r)}}}const wQ=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);
685function jQ(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const s=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:s.access_token,connectionConfig:(r=s.connection_config)!==null&&r!==void 0?r:null}},async getWorkspaceConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const s=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:s.access_token,connectionConfig:(r=s.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const s=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:s.access_token,connectionConfig:(r=s.connection_config)!==null&&r!==void 0?r:null}},async callApi(n,r){return y6(n,"Integration type"),SQ(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,r)}}}function y6(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function SQ(e,t,n){var r,i,s,o,c,d,h,p,m;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");y6(n.path,"Request path");const v=(r=n.method)!==null&&r!==void 0?r:"GET";if(!wQ.has(v))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const w=await e.post(t,{method:v,...n.host==null?{}:{host:n.host},path:n.path,query:(i=n.query)!==null&&i!==void 0?i:{},headers:(s=n.headers)!==null&&s!==void 0?s:{},body:(o=n.body)!==null&&o!==void 0?o:null});return{success:w.success,phase:w.phase,status:(c=w.status_code)!==null&&c!==void 0?c:null,data:w.data,dataBase64:(d=w.data_base64)!==null&&d!==void 0?d:null,contentType:(h=w.content_type)!==null&&h!==void 0?h:null,headers:(p=w.headers)!==null&&p!==void 0?p:{},creditsCharged:(m=w.credits_charged)!==null&&m!==void 0?m:0}}function NQ(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function Pl(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let s=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(s=o.get(n),s){if(r&&CQ(s,{storageKey:t}),i){o.delete(n);const c=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,c)}return s}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return s=window.localStorage.getItem(t),s}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function CQ(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function EQ({axios:e,serviceRoleAxios:t,appId:n,serverUrl:r,functionsVersion:i,platformHeaders:s}){const o=new Headers(s),c=d=>{const h=d.defaults.headers.common.Authorization;return typeof h=="string"&&h.startsWith("Bearer ")?h:null};return async function(h,p={}
685){PQ(h);const{fetch:m=fetch,...v}=p,x=new Headers(p.headers),w=(b,_)=>{_&&!x.has(b)&&x.set(b,_)};return w("Authorization",c(e)),w("Base44-Service-Authorization",c(t)),w("Base44-App-Id",n),w("Base44-Api-Url",r),w("Base44-Functions-Version",i),w("Base44-State",o.get("Base44-State")),w("X-Data-Env",o.get("X-Data-Env")),m(h,{...v,headers:x})}}function PQ(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it — pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function pT(e,t,n){const r=(s,o)=>s?`${String(s).replace(/\/$/,"")}${o}`:o,i=s=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const c=n.getAuthHeaders();Object.entries(c).forEach(([d,h])=>{h!=null&&o.set(d,String(h))})}return s&&new Headers(s).forEach((c,d)=>{o.set(d,c)}),o};return{async invoke(s,o){if(typeof o=="string")throw new Error(`Function ${s} must receive an object with named parameters, received: ${o}`);let c,d;return o instanceof FormData||o&&Object.values(o).some(h=>h instanceof File)?(c=new FormData,Object.keys(o).forEach(h=>{o[h]instanceof File?c.append(h,o[h],o[h].name):typeof o[h]=="object"&&o[h]!==null?c.append(h,JSON.stringify(o[h])):c.append(h,o[h])}),d="multipart/form-data"):(c=o,d="application/json"),e.post(`/apps/${t}/functions/${s}`,c||o,{headers:{"Content-Type":d}})},async fetch(s,o={}){const d=`/functions${s.startsWith("/")?s:`/${s}`}`,h=i(o.headers),p={...o,headers:h};return await fetch(r(n==null?void 0:n.baseURL,d),p)}}}function mT({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const s=`/apps/${n}/agents`,o={},c=()=>e.get(`${s}/conversations`),d=b=>e.get(`${s}/conversations/${b}`);return{getConversations:c,getConversation:d,listConversations:b=>e.get(`${s}/conversations`,{params:b}),createConversation:b=>e.post(`${s}/conversations`,b),addMessage:async(b,_)=>e.post(`${s}/conversations/v2/${b.id}/messages`,_),subscribeToConversation:(b,_)=>{const j=`/agent-conversations/${b}`,C=t(),E=d(b).then(A=>(o[b]=A,A));return C.subscribeToRoom(j,{connect:()=>{},update_model:async({data:A})=>{const k=JSON.parse(A);if(k._message){await E;const M=k._message,I=o[b];if(I){const $=I.messages||[],q=$.findIndex(H=>H.id===M.id),V=q!==-1?$.map((H,U)=>U===q?M:H):[...$,M];o[b]={...I,messages:V},_==null||_(o[b])}}}})},getWhatsAppConnectURL:b=>{const _=`${r}/api/apps/${n}/agents/${encodeURIComponent(b)}/whatsapp`,j=i??Pl();return j?`${_}?token=${j}`:_},getTelegramConnectURL:b=>{const _=`${r}/api/apps/${n}/agents/${encodeURIComponent(b)}/telegram`,j=i??Pl();return j?`${_}?token=${j}`:_}}}function gT({serverUrl:e,token:t,appId:n}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(i=t??Pl())!==null&&i!==void 0?i:""}}}}function yT(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function kQ(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function AQ(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const vs=Object.create(null);vs.open="0";vs.close="1";vs.ping="2";vs.pong="3";vs.message="4";vs.upgrade="5";vs.noop="6";const mv=Object.create(null);Object.keys(vs).forEach(e=>{mv[vs[e]]=e});const mC={type:"error",data:"parser error"},v6=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",x6=typeof ArrayBuffer=="function",b6=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,k2=({type:e,data:t},n,r)=>
vendor: 5,631 bytes, line 685
685v6&&t instanceof Blob?n?r(t):vT(t,r):x6&&(t instanceof ArrayBuffer||b6(t))?n?r(t):vT(new Blob([t]),r):r(vs[e]+(t||"")),vT=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function xT(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pw;function OQ(e,t){if(v6&&e.data instanceof Blob)return e.data.arrayBuffer().then(xT).then(t);if(x6&&(e.data instanceof ArrayBuffer||b6(e.data)))return t(xT(e.data));k2(e,!1,n=>{pw||(pw=new TextEncoder),t(pw.encode(n))})}const bT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wp=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<bT.length;e++)wp[bT.charCodeAt(e)]=e;const TQ=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(r=0;r<n;r+=4)s=wp[e.charCodeAt(r)],o=wp[e.charCodeAt(r+1)],c=wp[e.charCodeAt(r+2)],d=wp[e.charCodeAt(r+3)],p[i++]=s<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|d&63;return h},MQ=typeof ArrayBuffer=="function",A2=(e,t)=>{if(typeof e!="string")return{type:"message",data:_6(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:RQ(e.substring(1),t)}:mv[n]?e.length>1?{type:mv[n],data:e.substring(1)}:{type:mv[n]}:mC},RQ=(e,t)=>{if(MQ){const n=TQ(e);return _6(n,t)}else return{base64:!0,data:e}},_6=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},w6="�",IQ=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{k2(s,!1,c=>{r[o]=c,++i===n&&t(r.join(w6))})})},LQ=(e,t)=>{const n=e.split(w6),r=[];for(let i=0;i<n.length;i++){const s=A2(n[i],t);if(r.push(s),s.type==="error")break}return r};function DQ(){return new TransformStream({transform(e,t){OQ(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mw;function $y(e){return e.reduce((t,n)=>t+n.length,0)}function Fy(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function $Q(e,t){mw||(mw=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,c){for(n.push(o);;){if(r===0){if($y(n)<1)break;const d=Fy(n,1);s=(d[0]&128)===128,i=d[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if($y(n)<2)break;const d=Fy(n,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if($y(n)<8)break;const d=Fy(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(mC);break}i=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if($y(n)<i)break;const d=Fy(n,i);c.enqueue(A2(s?d:mw.decode(d),t)),r=0}if(i===0||i>e){c.enqueue(mC);break}}}})}const j6=4;function zn(e){if(e)return FQ(e)}function FQ(e){for(var t in zn.prototype)e[t]=zn.prototype[t];return e}zn.prototype.on=zn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};zn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};zn.prototype.off=zn.prototype.removeListener=zn.prototype.removeAllListeners=zn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};zn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};zn.prototype.emitReserved=zn.prototype.emit;zn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};zn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const c0=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),aa=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),BQ="arraybuffer";function S6(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const zQ=aa.setTimeout,UQ=aa.clearTimeout;function u0(e,t){t.useNativeTimers?(e.setTimeoutFn=zQ.bind(aa),e.clearTimeoutFn=UQ.bind(aa)):(e.setTimeoutFn=aa.setTimeout.bind(aa),e.clearTimeoutFn=aa.clearTimeout.bind(aa))}const qQ=1.33;function HQ(e){return typeof e=="string"?WQ(e):Math.ceil((e.byteLength||e.size)*qQ)}function WQ(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function N6(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function VQ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function KQ(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");
vendor: 4,410 bytes, line 685
685t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class GQ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class O2 extends zn{constructor(t){super(),this.writable=!1,u0(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new GQ(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=A2(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=VQ(t);return n.length?"?"+n:""}}class ZQ extends O2{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};LQ(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,IQ(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=N6()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let C6=!1;try{C6=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const YQ=C6;function XQ(){}class QQ extends ZQ{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ps extends zn{constructor(t,n,r){super(),this.createRequest=t,u0(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=S6(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}
vendor: 12,175 bytes, line 685
685typeof document<"u"&&(this._index=ps.requestsCount++,ps.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=XQ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ps.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}ps.requestsCount=0;ps.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",_T);else if(typeof addEventListener=="function"){const e="onpagehide"in aa?"pagehide":"unload";addEventListener(e,_T,!1)}}function _T(){for(let e in ps.requests)ps.requests.hasOwnProperty(e)&&ps.requests[e].abort()}const JQ=(function(){const e=E6({xdomain:!1});return e&&e.responseType!==null})();class eJ extends QQ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=JQ&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ps(E6,this.uri(),t)}}function E6(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||YQ))return new XMLHttpRequest}catch{}if(!t)try{return new aa[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const P6=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class tJ extends O2{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=P6?{}:S6(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;k2(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&c0(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=N6()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gw=aa.WebSocket||aa.MozWebSocket;class nJ extends tJ{createSocket(t,n,r){return P6?new gw(t,n,r):n?new gw(t,n):new gw(t)}doWrite(t,n){this.ws.send(n)}}class rJ extends O2{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=$Q(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=DQ();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),s())}).catch(c=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&c0(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const iJ={websocket:nJ,webtransport:rJ,polling:eJ},aJ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sJ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gC(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=aJ.exec(e||""),s={},o=14;for(;o--;)s[sJ[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=oJ(s,s.path),s.queryKey=lJ(s,s.query),s}function oJ(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function lJ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const yC=typeof addEventListener=="function"&&typeof removeEventListener=="function",gv=[];yC&&addEventListener("offline",()=>{gv.forEach(e=>e())},!1);class Il extends zn{constructor(t,n){if(super(),this.binaryType=BQ,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=gC(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=gC(n.host).host);u0(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=KQ(this.opts.query)),yC&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},gv.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=j6,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Il.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Il.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=HQ(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,c0(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Il.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),yC&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=gv.indexOf(this._offlineEventListener);r!==-1&&gv.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Il.protocol=j6;class cJ extends Il{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Il.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Il.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}
vendor: 11,023 bytes, line 685
685]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=n.name,this.emitReserved("upgradeError",v)}}))};function s(){r||(r=!0,p(),n.close(),n=null)}const o=m=>{const v=new Error("probe error: "+m);v.transport=n.name,s(),this.emitReserved("upgradeError",v)};function c(){o("transport closed")}function d(){o("socket closed")}function h(m){n&&m.name!==n.name&&s()}const p=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",i),n.once("error",o),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let uJ=class extends cJ{constructor(t,n={}){const r=typeof t=="object",i=r?{...t}:{...n};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>iJ[s]).filter(s=>!!s)),super(r?i:t,i)}};function dJ(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=gC(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const fJ=typeof ArrayBuffer=="function",hJ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,k6=Object.prototype.toString,pJ=typeof Blob=="function"||typeof Blob<"u"&&k6.call(Blob)==="[object BlobConstructor]",mJ=typeof File=="function"||typeof File<"u"&&k6.call(File)==="[object FileConstructor]";function T2(e){return fJ&&(e instanceof ArrayBuffer||hJ(e))||pJ&&e instanceof Blob||mJ&&e instanceof File}function yv(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(yv(e[n]))return!0;return!1}if(T2(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return yv(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&yv(e[n]))return!0;return!1}function gJ(e){const t=[],n=e.data,r=e;return r.data=vv(n,t),r.attachments=t.length,{packet:r,buffers:t}}function vv(e,t,n){if(!e)return e;if(T2(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let i=0;i<e.length;i++)r[i]=vv(e[i],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return vv(e.toJSON(),t,!0);const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=vv(e[i],t));return r}return e}function yJ(e,t){return e.data=vC(e.data,t),delete e.attachments,e}function vC(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=vC(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vC(e[n],t));return e}const A6=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],vJ=5;var Pt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Pt||(Pt={}));class xJ{constructor(t){this.replacer=t}encode(t){return(t.type===Pt.EVENT||t.type===Pt.ACK)&&yv(t)?this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Pt.BINARY_EVENT||t.type===Pt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=gJ(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class M2 extends zn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Pt.BINARY_EVENT;r||n.type===Pt.BINARY_ACK?(n.type=r?Pt.EVENT:Pt.ACK,this.reconstructor=new bJ(n)):super.emitReserved("decoded",n)}else if(T2(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Pt.BINARY_EVENT||r.type===Pt.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(o);if(!O6(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(M2.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Pt.CONNECT:return zv(n);case Pt.DISCONNECT:return n===void 0;case Pt.CONNECT_ERROR:return typeof n=="string"||zv(n);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&A6.indexOf(n[0])===-1);case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class bJ{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=yJ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function _J(e){return typeof e=="string"}const O6=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function wJ(e){return e===void 0||O6(e)}function zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function jJ(e,t){switch(e){case Pt.CONNECT:return t===void 0||zv(t);case Pt.DISCONNECT:return t===void 0;case Pt.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&A6.indexOf(t[0])===-1);case Pt.ACK:return Array.isArray(t);case Pt.CONNECT_ERROR:return typeof t=="string"||zv(t);default:return!1}}function SJ(e){return _J(e.nsp)&&wJ(e.id)&&jJ(e.type,e.data)}const NJ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:M2,Encoder:xJ,get PacketType(){return Pt},isPacketValid:SJ,protocol:vJ},Symbol.toStringTag,{value:"Module"}));function Ta(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const CJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class T6 extends zn{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ta(t,"open",this.onopen.bind(this)),Ta(t,"packet",this.onpacket.bind(this)),Ta(t,"error",this.onerror.bind(this)),Ta(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(CJ.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:Pt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),o.id=p}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(s),n.apply(this,c)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,c)=>o?i(o):r(c);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,087 bytes, line 685
685_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Pt.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Gf(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Gf.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Gf.prototype.reset=function(){this.attempts=0};Gf.prototype.setMin=function(e){this.ms=e};Gf.prototype.setMax=function(e){this.max=e};Gf.prototype.setJitter=function(e){this.jitter=e};class xC extends zn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,u0(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Gf({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||NJ;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new uJ(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Ta(n,"open",function(){r.onopen(),t&&t()}),s=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},o=Ta(n,"error",s);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ta(t,"ping",this.onping.bind(this)),Ta(t,"data",this.ondata.bind(this)),Ta(t,"error",this.onerror.bind(this)),Ta(t,"close",this.onclose.bind(this)),Ta(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){c0(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new T6(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
685cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const sp={};function xv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=dJ(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=sp[i]&&s in sp[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let d;return c?d=new xC(r,t):(sp[i]||(sp[i]=new xC(r,t)),d=sp[i]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(xv,{Manager:xC,Socket:T6,io:xv,connect:xv});const EJ=250;function wT(e,t){var n;const r=(n=e.token)!==null&&n!==void 0?n:Pl(),i={app_id:e.appId,token:r};r||(i.anonymous_id=Bv());const s=xv(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return s.on("connect",async()=>{var o;return console.log("connect",s.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),s.on("update_model",async o=>{var c;return(c=t.update_model)===null||c===void 0?void 0:c.call(t,o)}),s.on("error",async o=>{var c;return(c=t.error)===null||c===void 0?void 0:c.call(t,o)}),s.on("connect_error",async o=>{var c;return console.error("connect_error",o),(c=t.error)===null||c===void 0?void 0:c.call(t,o)}),s}function PJ({config:e}){let t={...e};const n={},r={},i={connect:async()=>{const j=[];Object.keys(n).forEach(C=>{const E=v(C);E.length!==0&&(h(C),E.forEach(({connect:A})=>{const k=async()=>A==null?void 0:A();j.push(k())}))}),await Promise.all(j)},update_model:async j=>{const E=v(j.room).map(A=>{var k;return(k=A.update_model)===null||k===void 0?void 0:k.call(A,j)});await Promise.all(E)},error:async j=>{console.error("error",j);const C=Object.values(n).flat().map(E=>{var A;return(A=E.error)===null||A===void 0?void 0:A.call(E,j)});await Promise.all(C)}};let s=wT(e,i);function o(){c()}function c(){w(),s&&s.disconnect()}function d(j){o(),t={...t,...j},s=wT(t,i)}function h(j){s.emit("join",j)}function p(j){s.emit("leave",j)}async function m(j,C){var E;const A=JSON.stringify(C);return(E=i.update_model)===null||E===void 0?void 0:E.call(i,{room:j,data:A})}function v(j){var C;return(C=n[j])!==null&&C!==void 0?C:[]}function x(j){const C=r[j];C&&(clearTimeout(C),delete r[j])}function w(){Object.keys(r).forEach(j=>{var C,E;clearTimeout(r[j]),delete r[j],((E=(C=n[j])===null||C===void 0?void 0:C.length)!==null&&E!==void 0?E:0)===0&&delete n[j]})}function b(j){x(j),r[j]=setTimeout(()=>{var C,E;delete r[j],!(((E=(C=n[j])===null||C===void 0?void 0:C.length)!==null&&E!==void 0?E:0)>0)&&(p(j),delete n[j])},EJ)}return{socket:s,subscribeToRoom:(j,C)=>{n[j]?x(j):(h(j),n[j]=[]),n[j].push(C);let E=!1;return()=>{var A,k;E||(E=!0,n[j]=(k=(A=n[j])===null||A===void 0?void 0:A.filter(M=>M!==C))!==null&&k!==void 0?k:[],n[j].length===0&&b(j))}},updateConfig:d,updateModel:m,disconnect:c}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
686  PartySocket requires a global 'EventTarget' class to be available!
687  You can polyfill this global by adding this to your code before any partysocket imports: 
688  
689  \`\`\`
690  import 'partysocket/event-target-polyfill';
691  \`\`\`
692  Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
693`);
vendor: 5,074 bytes, line 693
693var M6=class extends Event{constructor(t,n){super("error",n);mn(this,"message");mn(this,"error");this.message=t.message,this.error=t}},R6=class extends Event{constructor(t=1e3,n="",r){super("close",r);mn(this,"code");mn(this,"reason");mn(this,"wasClean",!0);this.code=t,this.reason=n}},yw={Event,ErrorEvent:M6,CloseEvent:R6};function kJ(e,t){if(!e)throw new Error(t)}function AJ(e){return new e.constructor(e.type,e)}function OJ(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new R6(e.code||1999,e.reason||"unknown reason",e):"error"in e?new M6(e.error,e):new Event(e.type,e)}var B3,TJ=typeof process<"u"&&typeof((B3=process.versions)==null?void 0:B3.node)<"u"&&typeof document>"u",By=TJ?OJ:AJ,Pc={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},jT=!1,MJ=class Mc extends EventTarget{constructor(n,r,i={}){super();mn(this,"_ws");mn(this,"_retryCount",-1);mn(this,"_uptimeTimeout");mn(this,"_connectTimeout");mn(this,"_shouldReconnect",!0);mn(this,"_connectLock",!1);mn(this,"_binaryType","blob");mn(this,"_closeCalled",!1);mn(this,"_messageQueue",[]);mn(this,"_url");mn(this,"_protocols");mn(this,"_options");mn(this,"onclose",null);mn(this,"onerror",null);mn(this,"onmessage",null);mn(this,"onopen",null);mn(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:r=Pc.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),r),kJ(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var s;return(s=this._ws)==null?void 0:s.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(By(n))});mn(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(By(n))});mn(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(By(n)),this._connect()});mn(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(By(n))});this._url=n,this._protocols=r,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Mc.CONNECTING}get OPEN(){return Mc.OPEN}get CLOSING(){return Mc.CLOSING}get CLOSED(){return Mc.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,i)=>(typeof i=="string"?r+=i.length:i instanceof Blob?r+=i.size:r+=i.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Mc.CLOSED:Mc.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,r){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,r)}reconnect(n,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,r),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:r=Pc.maxEnqueuedMessages}=this._options;this._messageQueue.length<r&&(this._debug("enqueue",n),this._messageQueue.push(n))}}_debug(...n){this._options.debug&&console.log.apply(console,["RWS>",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=Pc.reconnectionDelayGrowFactor,minReconnectionDelay:r=Pc.minReconnectionDelay,maxReconnectionDelay:i=Pc.maxReconnectionDelay}=this._options;let s=0;return this._retryCount>0&&(s=r*Math.pow(n,this._retryCount-1),s>i&&(s=i)),this._debug("next delay",s),s}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const r=n();if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(r.then)return r}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const r=n();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
693const{maxRetries:n=Pc.maxRetries,connectionTimeout:r=Pc.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,s])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!jT&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. 
694
695For example, if you're using node.js, run \`npm install ws\`, and then in your code:
696
697import PartySocket from 'partysocket';
698import WS from 'ws';
699
700const partysocket = new PartySocket({
701  host: "127.0.0.1:1999",
702  room: "test-room",
703  WebSocket: WS
704});
705
706`),jT=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:s}),this._ws=s?new o(i,s):new o(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),r)}).catch(i=>{this._connectLock=!1,this._handleError(new yw.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new yw.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,r){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,r),this._handleClose(new yw.CloseEvent(n,r,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*!
707 * Reconnecting WebSocket
708 * by Pedro Ladaria <[email protected]>
709 * https://github.com/pladaria/reconnecting-websocket
710 * License MIT
711 */const RJ=1e3,IJ=3e3,LJ=new Set([405,409,422,503]),DJ=new Set([400,403,404]);function $J(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function FJ(e){return e instanceof Error?e:new Error(String(e))}class BJ{constructor(t,n,r,i,s){var o;this.onClose=s,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=i==null?void 0:i.id)!==null&&o!==void 0?o:crypto.randomUUID();let c=r.transport==="proxy";const d=async()=>{var v;if(this.closed)throw new Error("Actor connection is closed");if(!c)try{const{websocket_url:x,token:w}=await r.mintConnectionToken(t,n,this.id),b=x.includes("?")?"&":"?";return`${x}${b}token=${encodeURIComponent(w)}`}catch(x){const w=$J(x);if(!(r.transport!=="direct"&&w!==void 0&&LJ.has(w))){w!==void 0&&DJ.has(w)&&this.close();try{(v=r.onMintError)===null||v===void 0||v.call(r,FJ(x))}catch{}throw x}c=!0}return UJ(r.host,t,n,this.id,r.appId,r.getAuthToken(),r.functionsVersion)},h=new MJ(d);this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",v=>{m();let x;try{x=JSON.parse(v.data)}catch{return}if((x&&typeof x=="object"?x.type:void 0)!=="__pong")for(const b of this.listeners)b(x)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>IJ){m(),h.readyState===h.OPEN&&h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},RJ)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function zJ(e,t,n,r){let i=null;return{connect(s){if(i)return i;const o=new BJ(e,t,n,s,()=>{r.delete(o),i===o&&(i=null)});return i=o,r.add(o),o}}}function UJ(e,t,n,r,i,s,o){let c=e.replace(/^(http|https|ws|wss):\/\//,"");c.endsWith("/")&&(c=c.slice(0,-1));const d=c.startsWith("localhost:")||c.startsWith("127.0.0.1:")||c.startsWith("192.168.")||c.startsWith("10.")||c.startsWith("172.")&&c.split(".")[1]>="16"&&c.split(".")[1]<="31"||c.startsWith("[::ffff:7f00:1]:"),h=new URLSearchParams([["_pk",r],["app_id",i],["handler",t]]);return s&&h.append("token",s),o&&h.append("fv",o),`${d?"ws":"wss"}://${c}/parties/${t}/${n}?${h}`}function qJ(e,t){return e&&!e.startsWith("/")?e:t??e}function HJ(e){const t=new Set;return{module:new Proxy({}
711,{get(r,i){if(!(typeof i!="string"||i==="then"))return s=>zJ(i,s,e,t)}}),closeAll:()=>{for(const r of[...t])r.close()}}}function WJ(e){var t,n,r,i;const{serverUrl:s="https://base44.app",appId:o,analytics:c,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:v,functionsVersion:x,headers:w}=e,b=typeof m=="string"?m:"",_={serverUrl:s,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:d};let j=null;const C=()=>(j||(j=PJ({config:_})),j),E={...w,"X-App-Id":String(o)},A=x?{...E,"Base44-Functions-Version":x}:E,k=Ld({baseURL:`${s}/api`,headers:E,token:d,onError:v==null?void 0:v.onError}),M=Ld({baseURL:`${s}/api`,headers:A,token:d,interceptResponses:!1,onError:v==null?void 0:v.onError}),I={...E,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=Ld({baseURL:`${s}/api`,headers:I,token:h,onError:v==null?void 0:v.onError}),q=Ld({baseURL:`${s}/api`,headers:A,token:h,interceptResponses:!1}),V=Ld({baseURL:`${s}/api`,headers:E}),H=bQ(k,M,o,{appBaseUrl:b,token:d});if(typeof window<"u"){const G=d||Pl();G&&H.setToken(G)}const U=HJ({appId:o,host:qJ(s,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:x,getAuthToken:()=>d||Pl(),mintConnectionToken:async(G,oe,W)=>{const ie=d||Pl();return await V.post(`/apps/${o}/actors/${encodeURIComponent(G)}/connection-token`,{room:oe,connection_id:W},{headers:{...ie?{Authorization:`Bearer ${ie}`}:{},...x?{"Base44-Functions-Version":x}:{}}})},transport:v==null?void 0:v.actorsTransport,onMintError:v==null?void 0:v.onError}),z={entities:fT({axios:k,appId:o,getSocket:C}),integrations:hT(k,o),connectors:NQ(k,o),auth:H,functions:pT(M,o,{getAuthHeaders:()=>{const G={},oe=d||Pl();return oe&&(G.Authorization=`Bearer ${oe}`),G},baseURL:(n=M.defaults)===null||n===void 0?void 0:n.baseURL}),agents:mT({axios:k,getSocket:C,appId:o,serverUrl:s,token:d}),aiGateway:gT({serverUrl:s,token:d,appId:o}),appLogs:yT(k,o),app:kQ(k,o),users:AQ(k,o),analytics:sQ({axiosClient:k,serverUrl:s,appId:o,userAuthModule:H,enabled:(r=c==null?void 0:c.enabled)!==null&&r!==void 0?r:!0}),actors:U.module,cleanup:()=>{z.analytics.cleanup(),U.closeAll(),j&&j.disconnect()}},Z={entities:fT({axios:$,appId:o,getSocket:C}),integrations:hT($,o),sso:_Q($,o),connectors:jQ($,o),functions:pT(q,o,{getAuthHeaders:()=>{const G={};return h&&(G.Authorization=`Bearer ${h}`),G},baseURL:(i=q.defaults)===null||i===void 0?void 0:i.baseURL}),agents:mT({axios:$,getSocket:C,appId:o,serverUrl:s,token:d}),aiGateway:gT({serverUrl:s,token:h,appId:o}),appLogs:yT($,o),cleanup:()=>{j&&j.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await z.auth.isAuthenticated()||z.auth.redirectToLogin(window.location.href)}catch(G){console.error("Authentication check failed:",G),z.auth.redirectToLogin(window.location.href)}},0),{...z,fetchWithAuth:EQ({axios:k,serviceRoleAxios:$,appId:String(o),serverUrl:s,functionsVersion:x,platformHeaders:w}),setToken(G){z.auth.setToken(G),j&&j.updateConfig({token:G}),_.token=G},getConfig(){return{serverUrl:s,appId:o,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Z}}}const I6=typeof window>"u",VJ=I6?{localStorage:new Map}:window,Op=VJ.localStorage,KJ=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Pd=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(I6)return t;const r=`base44_${KJ(e)}`,i=new URLSearchParams(window.location.search),s=i.get(e);if(n){i.delete(e);const c=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,c)}if(s)return Op.setItem(r,s),s;if(t)return Op.setItem(r,t),t;const o=Op.getItem(r);return o||null},GJ=()=>(Pd("clear_access_token")==="true"&&(Op.removeItem("base44_access_token"),Op.removeItem("token")),{appId:Pd("app_id",{defaultValue:"6984885939cff3c6798f183e"}),token:Pd("access_token",{removeFromUrl:!0}),fromUrl:Pd("from_url",{defaultValue:window.location.href}),functionsVersion:Pd("functions_version",{defaultValue:"prod"}),appBaseUrl:Pd("app_base_url",{defaultValue:void 0})}),jp={...GJ()},{appId:ZJ,token:YJ,functionsVersion:XJ,appBaseUrl:QJ}=jp,Q=WJ({appId:ZJ,token:YJ,functionsVersion:XJ,serverUrl:"",requiresAuth:!1,appBaseUrl:QJ}),L6=P.createContext(),JJ=({children:e})=>{const[t,n]=P.useState(null),[r,i]=P.useState(!1),[s,o]=P.useState(!0),[c,d]=P.useState(!0),[h,p]=P.useState(null),[m,v]=P.useState(null);P.useEffect(()=>{x()},[]);const x=async()=>{var j,C;try{d(!0),p(null);const E=Ld({baseURL:"/api/apps/public",headers:{"X-App-Id":jp.appId},token:jp.token,interceptResponses:!0});try{const A=await E.get(`/prod/public-settings/by-id/${jp.appId}`);v(A),jp.token?await w():(o(!1),i(!1)),d(!1)}catch(A){if(console.error("App state check failed:",A),A.status===403&&((C=(j=A.data)==null?void 0:j.extra_data)!=null&&C.reason)){const k=A.data.extra_data.reason;p(k==="auth_required"?{type:"auth_required",message:"Authentication required"}:k==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:k,message:A.message})}else p({type:"unknown",message:A.message||"Failed to load app"});d(!1),o(!1)}}catch(E){console.error("Unexpected error:",E),p({type:"unknown",message:E.message||"An unexpected error occurred"}),d(!1),o(!1)}},w=async()=>{try{o(!0);const j=await Q.auth.me();n(j),i(!0),o(!1)}catch(j){console.error("User auth check failed:",j),o(!1),i(!1),(j.status===401||j.status===403)&&p({type:"auth_required",message:"Authentication required"})}},b=(j=!0)=>{n(null),i(!1),j?Q.auth.logout(window.location.href):Q.auth.logout()},_=()=>{Q.auth.redirectToLogin(window.location.href)};return a.jsx(L6.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:s,isLoadingPublicSettings:c,authError:h,appPublicSettings:m,logout:b,navigateToLogin:_,checkAppState:x},children:e})},D6=()=>{const e=P.useContext(L6);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},Ee=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("rounded-xl border bg-card text-card-foreground shadow",e),...t}));
vendor: 7,613 bytes, line 711
711Ee.displayName="Card";const tt=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("flex flex-col space-y-1.5 p-6",e),...t}));tt.displayName="CardHeader";const nt=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("font-semibold leading-none tracking-tight",e),...t}));nt.displayName="CardTitle";const di=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("text-sm text-muted-foreground",e),...t}));di.displayName="CardDescription";const $e=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("p-6 pt-0",e),...t}));$e.displayName="CardContent";const eee=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ze("flex items-center p-6 pt-0",e),...t}));eee.displayName="CardFooter";function ST(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function d0(...e){return t=>{let n=!1;const r=e.map(i=>{const s=ST(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():ST(e[i],null)}}}}function Bt(...e){return P.useCallback(d0(...e),e)}function du(e){const t=nee(e),n=P.forwardRef((r,i)=>{const{children:s,...o}=r,c=P.Children.toArray(s),d=c.find(iee);if(d){const h=d.props.children,p=c.map(m=>m===d?P.Children.count(h)>1?P.Children.only(null):P.isValidElement(h)?h.props.children:null:m);return a.jsx(t,{...o,ref:i,children:P.isValidElement(h)?P.cloneElement(h,void 0,p):null})}return a.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var tee=du("Slot");function nee(e){const t=P.forwardRef((n,r)=>{const{children:i,...s}=n;if(P.isValidElement(i)){const o=see(i),c=aee(s,i.props);return i.type!==P.Fragment&&(c.ref=r?d0(r,o):o),P.cloneElement(i,c)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $6=Symbol("radix.slottable");function ree(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$6,t}function iee(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$6}function aee(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const d=s(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function see(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const oee=zm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ne=P.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?tee:"button";return a.jsx(o,{className:ze(oee({variant:t,size:n,className:e})),ref:s,...i})});Ne.displayName="Button";const Wt=P.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:ze("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors 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-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Wt.displayName="Input";function He(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function lee(e,t){const n=P.createContext(t),r=s=>{const{children:o,...c}=s,d=P.useMemo(()=>c,Object.values(c));return a.jsx(n.Provider,{value:d,children:o})};r.displayName=e+"Provider";function i(s){const o=P.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Bi(e,t=[]){let n=[];function r(s,o){const c=P.createContext(o),d=n.length;n=[...n,o];const h=m=>{var j;const{scope:v,children:x,...w}=m,b=((j=v==null?void 0:v[e])==null?void 0:j[d])||c,_=P.useMemo(()=>w,Object.values(w));return a.jsx(b.Provider,{value:_,children:x})};h.displayName=s+"Provider";function p(m,v){var b;const x=((b=v==null?void 0:v[e])==null?void 0:b[d])||c,w=P.useContext(x);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[h,p]}const i=()=>{const s=n.map(o=>P.createContext(o));return function(c){const d=(c==null?void 0:c[e])||s;return P.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,cee(i,...t)]}function cee(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((c,{useScope:d,scopeName:h})=>{const m=d(s)[`__scope${h}`];return{...c,...m}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Br=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},uee=l2[" useInsertionEffect ".trim().toString()]||Br;function xs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,o]=dee({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const p=P.useRef(e!==void 0);P.useEffect(()=>{const m=p.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const h=P.useCallback(p=>{var m;if(c){const v=fee(p)?p(e):p;v!==e&&((m=o.current)==null||m.call(o,v))}else s(p)},[c,e,s,o]);return[d,h]}function dee({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),i=P.useRef(n),s=P.useRef(t);return uee(()=>{s.current=t},[t]),P.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function fee(e){return typeof e=="function"}function R2(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function I2(e){const[t,n]=P.useState(void 0);return Br(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,c;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;o=h.inlineSize,c=h.blockSize}else o=e.offsetWidth,c=e.offsetHeight;n({width:o,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var hee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=hee.reduce((e,t)=>
vendor: 4,348 bytes, line 711
711{const n=du(`Primitive.${t}`),r=P.forwardRef((i,s)=>{const{asChild:o,...c}=i,d=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function F6(e,t){e&&Vm.flushSync(()=>e.dispatchEvent(t))}var f0="Switch",[pee]=Bi(f0),[mee,gee]=pee(f0),B6=P.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:s,required:o,disabled:c,value:d="on",onCheckedChange:h,form:p,...m}=e,[v,x]=P.useState(null),w=Bt(t,E=>x(E)),b=P.useRef(!1),_=v?p||!!v.closest("form"):!0,[j,C]=xs({prop:i,defaultProp:s??!1,onChange:h,caller:f0});return a.jsxs(mee,{scope:n,checked:j,disabled:c,children:[a.jsx(vt.button,{type:"button",role:"switch","aria-checked":j,"aria-required":o,"data-state":H6(j),"data-disabled":c?"":void 0,disabled:c,value:d,...m,ref:w,onClick:He(e.onClick,E=>{C(A=>!A),_&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})}),_&&a.jsx(q6,{control:v,bubbles:!b.current,name:r,value:d,checked:j,required:o,disabled:c,form:p,style:{transform:"translateX(-100%)"}})]})});B6.displayName=f0;var z6="SwitchThumb",U6=P.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=gee(z6,n);return a.jsx(vt.span,{"data-state":H6(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});U6.displayName=z6;var yee="SwitchBubbleInput",q6=P.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},s)=>{const o=P.useRef(null),c=Bt(o,s),d=R2(n),h=I2(t);return P.useEffect(()=>{const p=o.current;if(!p)return;const m=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(m,"checked").set;if(d!==n&&x){const w=new Event("click",{bubbles:r});x.call(p,n),p.dispatchEvent(w)}},[d,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});q6.displayName=yee;function H6(e){return e?"checked":"unchecked"}var W6=B6,vee=U6;const $c=P.forwardRef(({className:e,...t},n)=>a.jsx(W6,{className:ze("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(vee,{className:ze("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));$c.displayName=W6.displayName;function L2(e){const t=e+"CollectionProvider",[n,r]=Bi(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=b=>{const{scope:_,children:j}=b,C=J.useRef(null),E=J.useRef(new Map).current;return a.jsx(i,{scope:_,itemMap:E,collectionRef:C,children:j})};o.displayName=t;const c=e+"CollectionSlot",d=du(c),h=J.forwardRef((b,_)=>{const{scope:j,children:C}=b,E=s(c,j),A=Bt(_,E.collectionRef);return a.jsx(d,{ref:A,children:C})});h.displayName=c;const p=e+"CollectionItemSlot",m="data-radix-collection-item",v=du(p),x=J.forwardRef((b,_)=>{const{scope:j,children:C,...E}=b,A=J.useRef(null),k=Bt(_,A),M=s(p,j);return J.useEffect(()=>(M.itemMap.set(A,{ref:A,...E}),()=>void M.itemMap.delete(A))),a.jsx(v,{[m]:"",ref:k,children:C})});x.displayName=p;function w(b){const _=s(e+"CollectionConsumer",b);return J.useCallback(()=>{const C=_.collectionRef.current;if(!C)return[];const E=Array.from(C.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:o,Slot:h,ItemSlot:x},w,r]}var xee=l2[" useId ".trim().toString()]||(()=>{}),bee=0;function Ia(e){const[t,n]=P.useState(xee());return Br(()=>{n(r=>r??String(bee++))},[e]),t?`radix-${t}`:""}function bs(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var _ee=P.createContext(void 0);function h0(e){const t=P.useContext(_ee);return e||t||"ltr"}var vw="rovingFocusGroup.onEntryFocus",wee={bubbles:!1,cancelable:!0},Qm="RovingFocusGroup",[bC,V6,jee]=L2(Qm),[See,p0]=Bi(Qm,[jee]),[Nee,Cee]=See(Qm),K6=P.forwardRef((e,t)=>
vendor: 5,346 bytes, line 711
711a.jsx(bC.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(bC.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Eee,{...e,ref:t})})}));K6.displayName=Qm;var Eee=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=e,v=P.useRef(null),x=Bt(t,v),w=h0(s),[b,_]=xs({prop:o,defaultProp:c??null,onChange:d,caller:Qm}),[j,C]=P.useState(!1),E=bs(h),A=V6(n),k=P.useRef(!1),[M,I]=P.useState(0);return P.useEffect(()=>{const $=v.current;if($)return $.addEventListener(vw,E),()=>$.removeEventListener(vw,E)},[E]),a.jsx(Nee,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:b,onItemFocus:P.useCallback($=>_($),[_]),onItemShiftTab:P.useCallback(()=>C(!0),[]),onFocusableItemAdd:P.useCallback(()=>I($=>$+1),[]),onFocusableItemRemove:P.useCallback(()=>I($=>$-1),[]),children:a.jsx(vt.div,{tabIndex:j||M===0?-1:0,"data-orientation":r,...m,ref:x,style:{outline:"none",...e.style},onMouseDown:He(e.onMouseDown,()=>{k.current=!0}),onFocus:He(e.onFocus,$=>{const q=!k.current;if($.target===$.currentTarget&&q&&!j){const V=new CustomEvent(vw,wee);if($.currentTarget.dispatchEvent(V),!V.defaultPrevented){const H=A().filter(G=>G.focusable),U=H.find(G=>G.active),z=H.find(G=>G.id===b),ee=[U,z,...H].filter(Boolean).map(G=>G.ref.current);Y6(ee,p)}}k.current=!1}),onBlur:He(e.onBlur,()=>C(!1))})})}),G6="RovingFocusGroupItem",Z6=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...c}=e,d=Ia(),h=s||d,p=Cee(G6,n),m=p.currentTabStopId===h,v=V6(n),{onFocusableItemAdd:x,onFocusableItemRemove:w,currentTabStopId:b}=p;return P.useEffect(()=>{if(r)return x(),()=>w()},[r,x,w]),a.jsx(bC.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:a.jsx(vt.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:He(e.onMouseDown,_=>{r?p.onItemFocus(h):_.preventDefault()}),onFocus:He(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:He(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){p.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const j=Aee(_,p.orientation,p.dir);if(j!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let E=v().filter(A=>A.focusable).map(A=>A.ref.current);if(j==="last")E.reverse();else if(j==="prev"||j==="next"){j==="prev"&&E.reverse();const A=E.indexOf(_.currentTarget);E=p.loop?Oee(E,A+1):E.slice(A+1)}setTimeout(()=>Y6(E))}}),children:typeof o=="function"?o({isCurrentTabStop:m,hasTabStop:b!=null}):o})})});Z6.displayName=G6;var Pee={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kee(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Aee(e,t,n){const r=kee(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Pee[r]}function Y6(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Oee(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var X6=K6,Q6=Z6;function Tee(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var zi=e=>{const{present:t,children:n}=e,r=Mee(t),i=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),s=Bt(r.ref,Ree(i));return typeof n=="function"||r.isPresent?P.cloneElement(i,{ref:s}):null};zi.displayName="Presence";function Mee(e){const[t,n]=P.useState(),r=P.useRef(null),i=P.useRef(e),s=P.useRef("none"),o=e?"mounted":"unmounted",[c,d]=Tee(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const h=zy(r.current);s.current=c==="mounted"?h:"none"},[c]),Br(()=>{const h=r.current,p=i.current;if(p!==e){const v=s.current,x=zy(h);e?d("MOUNT"):x==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Br(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=x=>{const b=zy(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&b&&(d("ANIMATION_END"),!i.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},v=x=>{x.target===t&&(s.current=zy(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:P.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function zy(e){return(e==null?void 0:e.animationName)||"none"}function Ree(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var m0="Tabs",[Iee]=Bi(m0,[p0]),J6=p0(),[Lee,D2]=Iee(m0),eF=P.forwardRef((e,t)=>
711{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:c,activationMode:d="automatic",...h}=e,p=h0(c),[m,v]=xs({prop:r,onChange:i,defaultProp:s??"",caller:m0});return a.jsx(Lee,{scope:n,baseId:Ia(),value:m,onValueChange:v,orientation:o,dir:p,activationMode:d,children:a.jsx(vt.div,{dir:p,"data-orientation":o,...h,ref:t})})});eF.displayName=m0;var tF="TabsList",nF=P.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=D2(tF,n),o=J6(n);return a.jsx(X6,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:a.jsx(vt.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});nF.displayName=tF;var rF="TabsTrigger",iF=P.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,o=D2(rF,n),c=J6(n),d=oF(o.baseId,r),h=lF(o.baseId,r),p=r===o.value;return a.jsx(Q6,{asChild:!0,...c,focusable:!i,active:p,children:a.jsx(vt.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...s,ref:t,onMouseDown:He(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?o.onValueChange(r):m.preventDefault()}),onKeyDown:He(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&o.onValueChange(r)}),onFocus:He(e.onFocus,()=>{const m=o.activationMode!=="manual";!p&&!i&&m&&o.onValueChange(r)})})})});iF.displayName=rF;var aF="TabsContent",sF=P.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...o}=e,c=D2(aF,n),d=oF(c.baseId,r),h=lF(c.baseId,r),p=r===c.value,m=P.useRef(p);return P.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),a.jsx(zi,{present:i||p,children:({present:v})=>a.jsx(vt.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!v,id:h,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:v&&s})})});sF.displayName=aF;function oF(e,t){return`${e}-trigger-${t}`}function lF(e,t){return`${e}-content-${t}`}var Dee=eF,cF=nF,uF=iF,dF=sF;const Ns=Dee,qa=P.forwardRef(({className:e,...t},n)=>a.jsx(cF,{ref:n,className:ze("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));qa.displayName=cF.displayName;const Ut=P.forwardRef(({className:e,...t},n)=>a.jsx(uF,{ref:n,className:ze("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Ut.displayName=uF.displayName;const cn=P.forwardRef(({className:e,...t},n)=>a.jsx(dF,{ref:n,className:ze("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));cn.displayName=dF.displayName;const $ee=zm("inline-flex items-center rounded-md 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 shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ce({className:e,variant:t,...n}){return a.jsx("div",{className:ze($ee({variant:t}),e),...n})}function Mn({message:e="Loading..."}){return a.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[a.jsx(ln,{className:"h-8 w-8 text-emerald-600 animate-spin mb-4"}),a.jsx("p",{className:"text-slate-500",children:e})]})}const NT=499,CT="month";function Fee(){const e=typeof window<"u"?window.location.origin:"",[t,n]=P.useState(720),[r,i]=P.useState(!1),[s,o]=P.useState(!1),[c,d]=P.useState(!1),[h,p]=P.useState(!1),[m,v]=P.useState(!1),[x,w]=P.useState(!1);P.useEffect(()=>{p(window.self!==window.top),new URLSearchParams(window.location.search).get("embed_paid")==="1"&&d(!0),Q.auth.isAuthenticated().then(v).finally(()=>w(!0))},[]);const b=`${e}/Embed`,_=P.useMemo(()=>`<iframe
712  src="${b}"
713  title="Kenya Innovation Ecosystem — Live Intelligence Dashboard"
714  width="100%"
715  height="${t}"
716  style="border:0;border-radius:12px;"
717  loading="lazy"
718  allowfullscreen
719></iframe>`,[b,t]),j=async()=>{try{await navigator.clipboard.writeText(_),i(!0),setTimeout(()=>i(!1),2e3)}catch(E){console.error("Copy failed:",E)}},C=async()=>{var E,A;if(h){alert("Checkout works only from the published app. Please open the app directly in a new tab to purchase the embed license.");return}o(!0);try{const k=await Q.functions.invoke("createEmbedCheckout",{success_path:"/AdminSettings"});(E=k.data)!=null&&E.url?window.location.href=k.data.url:alert(((A
719=k.data)==null?void 0:A.error)||"Unable to start checkout.")}catch(k){alert("Unable to start checkout. Please try again."),console.error(k)}finally{o(!1)}};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsxs(nt,{className:"text-lg flex items-center gap-2",children:[a.jsx(G3,{className:"h-5 w-5 text-emerald-600"}),"Embeddable Dashboard for Clients"]}),a.jsx(di,{children:"Generate a read-only embed code to license to paying clients. You stay in full control of the content."})]}),a.jsx($e,{className:"space-y-4",children:a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[a.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-emerald-50 border border-emerald-100",children:[a.jsx(Tl,{className:"h-5 w-5 text-emerald-600 mt-0.5 shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-900",children:"Read-only"}),a.jsx("p",{className:"text-xs text-slate-500",children:"No editing, no agent control, no admin access for the client."})]})]}),a.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-blue-50 border border-blue-100",children:[a.jsx(ha,{className:"h-5 w-5 text-blue-600 mt-0.5 shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-900",children:"You control content"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Data, agents & layout are managed only from your admin console."})]})]}),a.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-amber-50 border border-amber-100",children:[a.jsx(zN,{className:"h-5 w-5 text-amber-600 mt-0.5 shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-900",children:"Paid access"}),a.jsxs("p",{className:"text-xs text-slate-500",children:["$",NT,"/",CT," via Stripe. Code unlocks after checkout."]})]})]})]})})]}),c?a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsxs(nt,{className:"text-lg flex items-center gap-2",children:[a.jsx(ha,{className:"h-5 w-5 text-emerald-600"}),"License active — embed code unlocked"]}),a.jsx(di,{children:"Share this snippet with your client. They paste it into their site — no login or admin rights required."})]}),a.jsxs($e,{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"Embed URL"}),a.jsx(Wt,{value:b,readOnly:!0,className:"bg-slate-50 font-mono text-sm"})]}),a.jsxs("div",{className:"w-full sm:w-32",children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1.5 block",children:"Height (px)"}),a.jsx(Wt,{type:"number",value:t,onChange:E=>n(Math.max(400,parseInt(E.target.value)||720))})]})]}),a.jsxs("div",{className:"relative",children:[a.jsx("pre",{className:"bg-slate-900 text-slate-100 rounded-xl p-4 text-xs sm:text-sm overflow-x-auto font-mono leading-relaxed",children:_}),a.jsxs(Ne,{size:"sm",onClick:j,className:"absolute top-3 right-3 gap-1.5",variant:"secondary",children:[r?a.jsx(Su,{className:"h-3.5 w-3.5 text-emerald-400"}):a.jsx(n0,{className:"h-3.5 w-3.5"}),r?"Copied":"Copy"]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",children:a.jsxs(Ne,{variant:"outline",className:"gap-2",children:[a.jsx(fa,{className:"h-4 w-4"}),"Preview embed view"]})}),a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700 border-0",children:"Licensed"}),a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700 border-0",children:"Read-only"}),a.jsx(Ce,{className:"bg-slate-100 text-slate-600 border-0",children:"Admin-controlled"})]}),a.jsx("p",{className:"text-xs text-slate-500",children:"The embed loads the standalone dashboard (no navigation, no editing tools). Any change you make to the data or agents in your admin console is reflected automatically on every embedded client site."})]})]}):a.jsxs(Ee,{className:"border-amber-200 bg-amber-50/50",children:[a.jsxs(tt,{children:[a.jsxs(nt,{className:"text-lg flex items-center gap-2",children:[a.jsx(Tl,{className:"h-5 w-5 text-amber-600"}),"Embed code is locked"]}),a.jsx(di,{children:"Purchase a license to unlock the copy-ready embed snippet for your client's site."})]}),a.jsxs($e,{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 p-4 rounded-xl bg-white border border-slate-200",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["$",NT,a.jsxs("span",{className:"text-base font-normal text-slate-500",children:["/",CT]})]}),a.jsx("p",{className:"text-sm text-slate-500",children:"Embeddable dashboard license — read-only, admin-controlled"})]}),m?a.jsxs(Ne,{onClick:C,disabled:s,className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[s?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(zN,{className:"h-4 w-4"}),s?"Starting checkout...":"Purchase license"]}):x?a.jsxs(Ne,{onClick:()=>Q.auth.redirectToLogin("/AdminSettings"),className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(Tl,{className:"h-4 w-4"}),"Sign in to purchase"]}):null]}),h&&a.jsxs("div",{className:"flex items-start gap-2 text-sm text-amber-700 bg-amber-100 rounded-lg p-3",children:[a.jsx(po,{className:"h-4 w-4 mt-0.5 shrink-0"}),"Checkout works only from the published app. Open the app directly in a new tab to purchase."]}),a.jsx("p",{className:"text-xs text-slate-500",children:"Test mode active — use card 4242 4242 4242 4242. After a successful checkout you'll return here and the embed code unlocks automatically."})]})]})]})}function Jm({children:e,redirectTo:t}){const[n,r]=P.useState(null),[i,s]=P.useState(!0);return P.useEffect(()=>{Q.auth.me().then(o=>
719r(o)).catch(()=>r(null)).finally(()=>s(!1))},[]),i?a.jsx("div",{className:"flex items-center justify-center py-20",children:a.jsx(ln,{className:"h-6 w-6 text-slate-400 animate-spin"})}):!n||n.role!=="admin"?a.jsxs("div",{className:"max-w-md mx-auto py-20 px-4 text-center",children:[a.jsx(pi,{className:"h-12 w-12 text-slate-300 mx-auto mb-4"}),a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Admin Access Required"}),a.jsx("p",{className:"text-slate-500 mb-6",children:"This area is restricted to administrators."}),a.jsx(Ne,{onClick:()=>Q.auth.redirectToLogin(t),children:"Sign in as admin"})]}):e}const gl={public_tier_a_only:!0,require_actor_confirmation:!0,auto_report_generation:!0,stale_threshold_days:90,notify_on_new_entity:!0,notify_on_funding:!0},xw=e=>({publicTierAOnly:e.public_tier_a_only??gl.public_tier_a_only,requireActorConfirmation:e.require_actor_confirmation??gl.require_actor_confirmation,autoReportGeneration:e.auto_report_generation??gl.auto_report_generation,staleThresholdDays:e.stale_threshold_days??gl.stale_threshold_days,notifyOnNewEntity:e.notify_on_new_entity??gl.notify_on_new_entity,notifyOnFunding:e.notify_on_funding??gl.notify_on_funding}),Bee=e=>({public_tier_a_only:e.publicTierAOnly,require_actor_confirmation:e.requireActorConfirmation,auto_report_generation:e.autoReportGeneration,stale_threshold_days:e.staleThresholdDays,notify_on_new_entity:e.notifyOnNewEntity,notify_on_funding:e.notifyOnFunding});function zee(){return a.jsx(Jm,{redirectTo:"/AdminSettings",children:a.jsx(Uee,{})})}function Uee(){const{toast:e}=zf(),[t,n]=P.useState([]),[r,i]=P.useState(!0),[s,o]=P.useState(!1),[c,d]=P.useState(null),[h,p]=P.useState(xw(gl));P.useEffect(()=>{m()},[]);const m=async()=>{try{const x=await Q.entities.User.list();n(x);const w=await Q.entities.AppSetting.filter({settings_key:"platform"});if(w.length>0)d(w[0]),p(xw(w[0]));else{const b=await Q.entities.AppSetting.create({settings_key:"platform",...gl});d(b),p(xw(b))}}catch(x){console.error("Error loading data:",x)}finally{i(!1)}},v=async()=>{if(c!=null&&c.id){o(!0);try{const x=await Q.entities.AppSetting.update(c.id,Bee(h));d(x),e({title:"Settings saved",description:"Platform settings have been persisted."})}catch(x){console.error("Error saving settings:",x),e({title:"Save failed",description:(x==null?void 0:x.message)||"Could not save settings.",variant:"destructive"})}finally{o(!1)}}};return r?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading settings..."})}):a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsx("div",{className:"flex items-center justify-between mb-6",children:a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Admin Settings"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Configure platform settings and manage users"})]})}),a.jsxs(Ns,{defaultValue:"general",children:[a.jsxs(qa,{className:"mb-6",children:[a.jsxs(Ut,{value:"general",className:"gap-2",children:[a.jsx(e$,{className:"h-4 w-4"}),"General"]}),a.jsxs(Ut,{value:"users",className:"gap-2",children:[a.jsx(tr,{className:"h-4 w-4"}),"Users"]}),a.jsxs(Ut,{value:"notifications",className:"gap-2",children:[a.jsx(DH,{className:"h-4 w-4"}),"Notifications"]}),a.jsxs(Ut,{value:"embed",className:"gap-2",children:[a.jsx(G3,{className:"h-4 w-4"}),"Embed Distribution"]})]}),a.jsxs(cn,{value:"general",className:"space-y-6",children:[a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsx(nt,{className:"text-lg",children:"Data Visibility"}),a.jsx(di,{children:"Control what data is visible to the public"})]}),a.jsxs($e,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"Show only Tier A data publicly"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Only Intelligence Officer-validated entities visible to public users"})]}
719),a.jsx($c,{checked:h.publicTierAOnly,onCheckedChange:x=>p({...h,publicTierAOnly:x})})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"Require actor confirmation"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Entities must be confirmed by actors before Tier B"})]}),a.jsx($c,{checked:h.requireActorConfirmation,onCheckedChange:x=>p({...h,requireActorConfirmation:x})})]})]})]}),a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsx(nt,{className:"text-lg",children:"Data Quality"}),a.jsx(di,{children:"Configure data quality thresholds"})]}),a.jsx($e,{className:"space-y-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"Stale data threshold (days)"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Mark entities as stale after this many days without updates"})]}),a.jsx(Wt,{type:"number",value:h.staleThresholdDays,onChange:x=>p({...h,staleThresholdDays:parseInt(x.target.value)}),className:"w-24"})]})})]}),a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsx(nt,{className:"text-lg",children:"Automation"}),a.jsx(di,{children:"Configure automated processes"})]}),a.jsx($e,{className:"space-y-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"Auto-generate reports"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Automatically generate daily, weekly, and monthly reports"})]}
719),a.jsx($c,{checked:h.autoReportGeneration,onCheckedChange:x=>p({...h,autoReportGeneration:x})})]})})]}),a.jsx("div",{className:"flex justify-end",children:a.jsxs(Ne,{onClick:v,disabled:s,className:"bg-emerald-600 hover:bg-emerald-700",children:[s?a.jsx(ln,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(yO,{className:"h-4 w-4 mr-2"}),"Save Settings"]})})]}),a.jsx(cn,{value:"embed",children:a.jsx(Fee,{})}),a.jsx(cn,{value:"users",children:a.jsxs(Ee,{children:[a.jsxs(tt,{className:"flex flex-row items-center justify-between",children:[a.jsxs("div",{children:[a.jsx(nt,{className:"text-lg",children:"User Management"}),a.jsx(di,{children:"Manage user roles and permissions"})]}),a.jsxs(Ne,{className:"bg-emerald-600 hover:bg-emerald-700 gap-2",children:[a.jsx(Um,{className:"h-4 w-4"}),"Invite User"]})]}),a.jsx($e,{children:a.jsx("div",{className:"divide-y",children:t.map(x=>{var w,b;return a.jsxs("div",{className:"py-4 flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-emerald-400 to-teal-500 flex items-center justify-center",children:a.jsx("span",{className:"text-white font-medium",children:((w=x.full_name)==null?void 0:w[0])||((b=x.email)==null?void 0:b[0])||"?"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:x.full_name||"No name"}),a.jsx("p",{className:"text-sm text-slate-500",children:x.email})]})]}),a.jsx("div",{className:"flex items-center gap-3",children:a.jsx(Ce,{variant:x.role==="admin"?"default":"secondary",children:x.role||"user"})})]},x.id)})})})]})}),a.jsxs(cn,{value:"notifications",children:[a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsx(nt,{className:"text-lg",children:"Notification Preferences"}),a.jsx(di,{children:"Configure when to send notifications"})]}),a.jsxs($e,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"New entity notifications"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Notify analysts when new entities are discovered"})]}
vendor: 10,823 bytes, line 719
719),a.jsx($c,{checked:h.notifyOnNewEntity,onCheckedChange:x=>p({...h,notifyOnNewEntity:x})})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"Funding event notifications"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Notify when funding events are detected"})]}),a.jsx($c,{checked:h.notifyOnFunding,onCheckedChange:x=>p({...h,notifyOnFunding:x})})]})]})]}),a.jsx("div",{className:"flex justify-end mt-6",children:a.jsxs(Ne,{onClick:v,disabled:s,className:"bg-emerald-600 hover:bg-emerald-700",children:[s?a.jsx(ln,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(yO,{className:"h-4 w-4 mr-2"}),"Save Settings"]})})]})]})]})}const bo=P.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:ze("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));bo.displayName="Textarea";function fr({icon:e,title:t,description:n,action:r,actionLabel:i,className:s}){return a.jsxs("div",{className:ze("flex flex-col items-center justify-center py-12 text-center",s),children:[e&&a.jsx("div",{className:"w-16 h-16 rounded-2xl bg-slate-100 flex items-center justify-center mb-4",children:a.jsx(e,{className:"h-8 w-8 text-slate-400"})}),a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-1",children:t}),n&&a.jsx("p",{className:"text-slate-500 max-w-sm mb-4",children:n}),r&&i&&a.jsx(Ne,{onClick:r,children:i})]})}function qee(e,t=globalThis==null?void 0:globalThis.document){const n=bs(e);P.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Hee="DismissableLayer",_C="dismissableLayer.update",Wee="dismissableLayer.pointerDownOutside",Vee="dismissableLayer.focusOutside",ET,fF=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zf=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:c,...d}=e,h=P.useContext(fF),[p,m]=P.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=P.useState({}),w=Bt(t,I=>m(I)),b=Array.from(h.layers),[_]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),j=b.indexOf(_),C=p?b.indexOf(p):-1,E=h.layersWithOutsidePointerEventsDisabled.size>0,A=C>=j,k=Zee(I=>{const $=I.target,q=[...h.branches].some(V=>V.contains($));!A||q||(i==null||i(I),o==null||o(I),I.defaultPrevented||c==null||c())},v),M=Yee(I=>{const $=I.target;[...h.branches].some(V=>V.contains($))||(s==null||s(I),o==null||o(I),I.defaultPrevented||c==null||c())},v);return qee(I=>{C===h.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},v),P.useEffect(()=>{if(p)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ET=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),PT(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ET)}},[p,v,n,h]),P.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),PT())},[p,h]),P.useEffect(()=>{const I=()=>x({});return document.addEventListener(_C,I),()=>document.removeEventListener(_C,I)},[]),a.jsx(vt.div,{...d,ref:w,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,M.onFocusCapture),onBlurCapture:He(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,k.onPointerDownCapture)})});Zf.displayName=Hee;var Kee="DismissableLayerBranch",Gee=P.forwardRef((e,t)=>{const n=P.useContext(fF),r=P.useRef(null),i=Bt(t,r);return P.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(vt.div,{...e,ref:i})});Gee.displayName=Kee;function Zee(e,t=globalThis==null?void 0:globalThis.document){const n=bs(e),r=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let d=function(){hF(Wee,n,h,{discrete:!0})};const h={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yee(e,t=globalThis==null?void 0:globalThis.document){const n=bs(e),r=P.useRef(!1);return P.useEffect(()=>{const i=s=>{s.target&&!r.current&&hF(Vee,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function PT(){const e=new CustomEvent(_C);document.dispatchEvent(e)}function hF(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?F6(i,s):i.dispatchEvent(s)}var bw="focusScope.autoFocusOnMount",_w="focusScope.autoFocusOnUnmount",kT={bubbles:!1,cancelable:!0},Xee="FocusScope",g0=P.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[c,d]=P.useState(null),h=bs(i),p=bs(s),m=P.useRef(null),v=Bt(t,b=>d(b)),x=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(r){let b=function(E){if(x.paused||!c)return;const A=E.target;c.contains(A)?m.current=A:pl(m.current,{select:!0})},_=function(E){if(x.paused||!c)return;const A=E.relatedTarget;A!==null&&(c.contains(A)||pl(m.current,{select:!0}))},j=function(E){if(document.activeElement===document.body)for(const k of E)k.removedNodes.length>0&&pl(c)};document.addEventListener("focusin",b),document.addEventListener("focusout",_);const C=new MutationObserver(j);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",_),C.disconnect()}}},[r,c,x.paused]),P.useEffect(()=>{if(c){OT.add(x);const b=document.activeElement;if(!c.contains(b)){const j=new CustomEvent(bw,kT);c.addEventListener(bw,h),c.dispatchEvent(j),j.defaultPrevented||(Qee(rte(pF(c)),{select:!0}),document.activeElement===b&&pl(c))}return()=>{c.removeEventListener(bw,h),setTimeout(()=>{const j=new CustomEvent(_w,kT);c.addEventListener(_w,p),c.dispatchEvent(j),j.defaultPrevented||pl(b??document.body,{select:!0}),c.removeEventListener(_w,p),OT.remove(x)},0)}}},[c,h,p,x]);const w=P.useCallback(b=>{if(!n&&!r||x.paused)return;const _=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,j=document.activeElement;if(_&&j){const C=b.currentTarget,[E,A]=Jee(C);E&&A?!b.shiftKey&&j===A?(b.preventDefault(),n&&pl(E,{select:!0})):b.shiftKey&&j===E&&(b.preventDefault(),n&&pl(A,{select:!0})):j===C&&b.preventDefault()}},[n,r,x.paused]);return a.jsx(vt.div,{tabIndex:-1,...o,ref:v,onKeyDown:w})});g0.displayName=Xee;function Qee(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pl(r,{select:t}),document.activeElement!==n)return}function Jee(e){const t=pF(e),n=AT(t,e),r=AT(t.reverse(),e);return[n,r]}function pF(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function AT(e,t){for(const n of e)if(!ete(n,{upTo:t}))return n}function ete(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 tte(e){return e instanceof HTMLInputElement&&"select"in e}function pl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tte(e)&&t&&e.select()}}var OT=nte();function nte(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=TT(e,t),e.unshift(t)},remove(t){var n;e=TT(e,t),(n=e[0])==null||n.resume()}}}function TT(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rte(e){return e.filter(t=>t.tagName!=="A")}var ite="Portal",eg=P.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[i,s]=P.useState(!1);Br(()=>s(!0),[]);const o=n||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return o?VG.createPortal(a.jsx(vt.div,{...r,ref:t}),o):null});eg.displayName=ite;var ww=0;function $2(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??MT()),document.body.insertAdjacentElement("beforeend",e[1]??MT()),ww++,()=>{ww===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ww--}},[])}function MT(){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 ls=function(){return ls=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ls.apply(this,arguments)};function mF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ate(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var bv="right-scroll-bar-position",_v="width-before-scroll-bar",ste="with-scroll-bars-hidden",ote="--removed-body-scroll-bar-size";function jw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lte(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var cte=typeof window<"u"?P.useLayoutEffect:P.useEffect,RT=new WeakMap;function ute(e,t){var n=lte(null,function(r){return e.forEach(function(i){return jw(i,r)})});return cte(function(){var r=RT.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;
vendor: 4,224 bytes, lines 719-734
719i.forEach(function(c){s.has(c)||jw(c,null)}),s.forEach(function(c){i.has(c)||jw(c,o)})}RT.set(n,e)},[e]),n}function dte(e){return e}function fte(e,t){t===void 0&&(t=dte);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var o=t(s,r);return n.push(o),function(){n=n.filter(function(c){return c!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var c=n;n=[],c.forEach(s),o=n}var d=function(){var p=o;o=[],p.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(p){o.push(p),h()},filter:function(p){return o=o.filter(p),n}}}};return i}function hte(e){e===void 0&&(e={});var t=fte(null);return t.options=ls({async:!0,ssr:!1},e),t}var gF=function(e){var t=e.sideCar,n=mF(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return P.createElement(r,ls({},n))};gF.isSideCarExport=!0;function pte(e,t){return e.useMedium(t),gF}var yF=hte(),Sw=function(){},y0=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:Sw,onWheelCapture:Sw,onTouchMoveCapture:Sw}),i=r[0],s=r[1],o=e.forwardProps,c=e.children,d=e.className,h=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noRelative,w=e.noIsolation,b=e.inert,_=e.allowPinchZoom,j=e.as,C=j===void 0?"div":j,E=e.gapMode,A=mF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=v,M=ute([n,t]),I=ls(ls({},A),i);return P.createElement(P.Fragment,null,p&&P.createElement(k,{sideCar:yF,removeScrollBar:h,shards:m,noRelative:x,noIsolation:w,inert:b,setCallbacks:s,allowPinchZoom:!!_,lockRef:n,gapMode:E}),o?P.cloneElement(P.Children.only(c),ls(ls({},I),{ref:M})):P.createElement(C,ls({},I,{className:d,ref:M}),c))});y0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};y0.classNames={fullWidth:_v,zeroRight:bv};var mte=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gte(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mte();return t&&e.setAttribute("nonce",t),e}function yte(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vte(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xte=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gte())&&(yte(t,n),vte(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bte=function(){var e=xte();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vF=function(){var e=bte(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},_te={left:0,top:0,right:0,gap:0},Nw=function(e){return parseInt(e||"",10)||0},wte=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Nw(n),Nw(r),Nw(i)]},jte=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _te;var t=wte(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ste=vF(),qd="data-scroll-locked",Nte=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,c=e.gap;return n===void 0&&(n="margin"),`
720  .`.concat(ste,` {
721   overflow: hidden `).concat(r,`;
722   padding-right: `).concat(c,"px ").concat(r,`;
723  }
724  body[`).concat(qd,`] {
725    overflow: hidden `).concat(r,`;
726    overscroll-behavior: contain;
727    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
728    padding-left: `.concat(i,`px;
729    padding-top: `).concat(s,`px;
730    padding-right: `).concat(o,`px;
731    margin-left:0;
732    margin-top:0;
733    margin-right: `).concat(c,"px ").concat(r,`;
734    `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";
734")].filter(Boolean).join(""),`
735  }
736  
737  .`).concat(bv,` {
738    right: `).concat(c,"px ").concat(r,`;
739  }
740  
741  .`).concat(_v,` {
742    margin-right: `).concat(c,"px ").concat(r,`;
743  }
744  
745  .`).concat(bv," .").concat(bv,` {
746    right: 0 `).concat(r,`;
747  }
748  
749  .`).concat(_v," .").concat(_v,` {
750    margin-right: 0 `).concat(r,`;
751  }
752  
753  body[`).concat(qd,`] {
754    `).concat(ote,": ").concat(c,`px;
755  }
756`)},IT=function(){var e=parseInt(document.body.getAttribute(qd)||"0",10);return isFinite(e)?e:0},Cte=function(){P.useEffect(function(){return document.body.setAttribute(qd,(IT()+1).toString()),function(){var e=IT()-1;e<=0?document.body.removeAttribute(qd):document.body.setAttribute(qd,e.toString())}},[])},Ete=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Cte();var s=P.useMemo(function(){return jte(i)},[i]);return P.createElement(Ste,{styles:Nte(s,!t,i,n?"":"!important")})},wC=!1;if(typeof window<"u")try{var Uy=Object.defineProperty({},"passive",{get:function(){return wC=!0,!0}});window.addEventListener("test",Uy,Uy),window.removeEventListener("test",Uy,Uy)}catch{wC=!1}var kd=wC?{passive:!1}:!1,Pte=function(e){return e.tagName==="TEXTAREA"},xF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Pte(e)&&n[t]==="visible")},kte=function(e){return xF(e,"overflowY")},Ate=function(e){return xF(e,"overflowX")},LT=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=bF(e,r);if(i){var s=_F(e,r),o=s[1],c=s[2];if(o>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ote=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tte=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bF=function(e,t){return e==="v"?kte(t):Ate(t)},_F=function(e,t){return e==="v"?Ote(t):Tte(t)},Mte=function(e,t){return e==="h"&&t==="rtl"?-1:1},Rte=function(e,t,n,r,i){var s=Mte(e,window.getComputedStyle(t).direction),o=s*r,c=n.target,d=t.contains(c),h=!1,p=o>0,m=0,v=0;do{if(!c)break;var x=_F(e,c),w=x[0],b=x[1],_=x[2],j=b-_-s*w;(w||j)&&bF(e,c)&&(m+=j,v+=w);var C=c.parentNode;c=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(v)<1)&&(h=!0),h},qy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DT=function(e){return[e.deltaX,e.deltaY]},$T=function(e){return e&&"current"in e?e.current:e},Ite=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lte=function(e){return`
757  .block-interactivity-`.concat(e,` {pointer-events: none;}
758  .allow-interactivity-`).concat(e,` {pointer-events: all;}
759`)},Dte=0,Ad=[];function $te(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),i=P.useState(Dte++)[0],s=P.useState(vF)[0],o=P.useRef(e);P.useEffect(function(){o.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=ate([e.lockRef.current],(e.shards||[]).map($T),!0).filter(Boolean);return b.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=P.useCallback(function(b,_){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!o.current.allowPinchZoom;var j=qy(b),C=n.current,E="deltaX"in b?b.deltaX:C[0]-j[0],A="deltaY"in b?b.deltaY:C[1]-j[1],k,M=b.target,I=Math.abs(E)>Math.abs(A)?"h":"v";if("touches"in b&&I==="h"&&M.type==="range")return!1;var $=LT(I,M);if(!$)return!0;if($?k=I:(k=I==="v"?"h":"v",$=LT(I,M)),!$)return!1;if(!r.current&&"changedTouches"in b&&(E||A)&&(r.current=k),!k)return!0;var q=r.current||k;return Rte(q,_,b,q==="h"?E:A)},[]),d=P.useCallback(function(b){var _=b;if(!(!Ad.length||Ad[Ad.length-1]!==s)){var j="deltaY"in _?DT(_):qy(_),C=t.current.filter(function(k){return k.name===_.type&&(k.target===_.target||_.target===k.shadowParent)&&Ite(k.delta,j)})[0];if(C&&C.should){_.cancelable&&_.preventDefault();return}
vendor: 4,099 bytes, line 759
759if(!C){var E=(o.current.shards||[]).map($T).filter(Boolean).filter(function(k){return k.contains(_.target)}),A=E.length>0?c(_,E[0]):!o.current.noIsolation;A&&_.cancelable&&_.preventDefault()}}},[]),h=P.useCallback(function(b,_,j,C){var E={name:b,delta:_,target:j,should:C,shadowParent:Fte(j)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(A){return A!==E})},1)},[]),p=P.useCallback(function(b){n.current=qy(b),r.current=void 0},[]),m=P.useCallback(function(b){h(b.type,DT(b),b.target,c(b,e.lockRef.current))},[]),v=P.useCallback(function(b){h(b.type,qy(b),b.target,c(b,e.lockRef.current))},[]);P.useEffect(function(){return Ad.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,kd),document.addEventListener("touchmove",d,kd),document.addEventListener("touchstart",p,kd),function(){Ad=Ad.filter(function(b){return b!==s}),document.removeEventListener("wheel",d,kd),document.removeEventListener("touchmove",d,kd),document.removeEventListener("touchstart",p,kd)}},[]);var x=e.removeScrollBar,w=e.inert;return P.createElement(P.Fragment,null,w?P.createElement(s,{styles:Lte(i)}):null,x?P.createElement(Ete,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fte(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bte=pte(yF,$te);var v0=P.forwardRef(function(e,t){return P.createElement(y0,ls({},e,{ref:t,sideCar:Bte}))});v0.classNames=y0.classNames;var zte=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Od=new WeakMap,Hy=new WeakMap,Wy={},Cw=0,wF=function(e){return e&&(e.host||wF(e.parentNode))},Ute=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wF(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},qte=function(e,t,n,r){var i=Ute(t,Array.isArray(e)?e:[e]);Wy[n]||(Wy[n]=new WeakMap);var s=Wy[n],o=[],c=new Set,d=new Set(i),h=function(m){!m||c.has(m)||(c.add(m),h(m.parentNode))};i.forEach(h);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(c.has(v))p(v);else try{var x=v.getAttribute(r),w=x!==null&&x!=="false",b=(Od.get(v)||0)+1,_=(s.get(v)||0)+1;Od.set(v,b),s.set(v,_),o.push(v),b===1&&w&&Hy.set(v,!0),_===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}catch(j){console.error("aria-hidden: cannot operate on ",v,j)}})};return p(t),c.clear(),Cw++,function(){o.forEach(function(m){var v=Od.get(m)-1,x=s.get(m)-1;Od.set(m,v),s.set(m,x),v||(Hy.has(m)||m.removeAttribute(r),Hy.delete(m)),x||m.removeAttribute(n)}),Cw--,Cw||(Od=new WeakMap,Od=new WeakMap,Hy=new WeakMap,Wy={})}},F2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=zte(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),qte(r,i,n,"aria-hidden")):function(){return null}},x0="Dialog",[jF]=Bi(x0),[Hte,Ha]=jF(x0),SF=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,c=P.useRef(null),d=P.useRef(null),[h,p]=xs({prop:r,defaultProp:i??!1,onChange:s,caller:x0});return a.jsx(Hte,{scope:t,triggerRef:c,contentRef:d,contentId:Ia(),titleId:Ia(),descriptionId:Ia(),open:h,onOpenChange:p,onOpenToggle:P.useCallback(()=>p(m=>!m),[p]),modal:o,children:n})};SF.displayName=x0;var NF="DialogTrigger",CF=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ha(NF,n),s=Bt(t,i.triggerRef);return a.jsx(vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":U2(i.open),...r,ref:s,onClick:He(e.onClick,i.onOpenToggle)})});CF.displayName=NF;var B2="DialogPortal",[Wte,EF]=jF(B2,{forceMount:void 0}),PF=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Ha(B2,t);return a.jsx(Wte,{scope:t,forceMount:n,children:P.Children.map(r,o=>a.jsx(zi,{present:n||s.open,children:a.jsx(eg,{asChild:!0,container:i,children:o})}))})};PF.displayName=B2;var Uv="DialogOverlay",kF=P.forwardRef((e,t)=>
vendor: 4,918 bytes, lines 759-763
759{const n=EF(Uv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Ha(Uv,e.__scopeDialog);return s.modal?a.jsx(zi,{present:r||s.open,children:a.jsx(Kte,{...i,ref:t})}):null});kF.displayName=Uv;var Vte=du("DialogOverlay.RemoveScroll"),Kte=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ha(Uv,n);return a.jsx(v0,{as:Vte,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(vt.div,{"data-state":U2(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fu="DialogContent",AF=P.forwardRef((e,t)=>{const n=EF(fu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Ha(fu,e.__scopeDialog);return a.jsx(zi,{present:r||s.open,children:s.modal?a.jsx(Gte,{...i,ref:t}):a.jsx(Zte,{...i,ref:t})})});AF.displayName=fu;var Gte=P.forwardRef((e,t)=>{const n=Ha(fu,e.__scopeDialog),r=P.useRef(null),i=Bt(t,n.contentRef,r);return P.useEffect(()=>{const s=r.current;if(s)return F2(s)},[]),a.jsx(OF,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:He(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:He(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0;(o.button===2||c)&&s.preventDefault()}),onFocusOutside:He(e.onFocusOutside,s=>s.preventDefault())})}),Zte=P.forwardRef((e,t)=>{const n=Ha(fu,e.__scopeDialog),r=P.useRef(!1),i=P.useRef(!1);return a.jsx(OF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,c;(o=e.onCloseAutoFocus)==null||o.call(e,s),s.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((h=n.triggerRef.current)==null?void 0:h.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),OF=P.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=e,c=Ha(fu,n),d=P.useRef(null),h=Bt(t,d);return $2(),a.jsxs(a.Fragment,{children:[a.jsx(g0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:a.jsx(Zf,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":U2(c.open),...o,ref:h,onDismiss:()=>c.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(Yte,{titleId:c.titleId}),a.jsx(Qte,{contentRef:d,descriptionId:c.descriptionId})]})]})}),z2="DialogTitle",TF=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ha(z2,n);return a.jsx(vt.h2,{id:i.titleId,...r,ref:t})});TF.displayName=z2;var MF="DialogDescription",RF=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ha(MF,n);return a.jsx(vt.p,{id:i.descriptionId,...r,ref:t})});RF.displayName=MF;var IF="DialogClose",LF=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ha(IF,n);return a.jsx(vt.button,{type:"button",...r,ref:t,onClick:He(e.onClick,()=>i.onOpenChange(!1))})});LF.displayName=IF;function U2(e){return e?"open":"closed"}var DF="DialogTitleWarning",[DEe,$F]=lee(DF,{contentName:fu,titleName:z2,docsSlug:"dialog"}),Yte=({titleId:e})=>{const t=$F(DF),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
760
761If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
762
763For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Xte="DialogDescriptionWarning",Qte=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$F(Xte).contentName}}.`;return P.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},FF=SF,Jte=CF,BF=PF,b0=kF,_0=AF,w0=TF,j0=RF,zF=LF;const Yf=FF,UF=Jte,ene=BF,qF=P.forwardRef(({className:e,...t},n)=>a.jsx(b0,{ref:n,className:ze("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}));qF.displayName=b0.displayName;const Pu=P.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ene,{children:[a.jsx(qF,{}),a.jsxs(_0,{ref:r,className:ze("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
763nded-lg",e),...n,children:[t,a.jsxs(zF,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(xo,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pu.displayName=_0.displayName;const ku=({className:e,...t})=>a.jsx("div",{className:ze("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ku.displayName="DialogHeader";const tg=({className:e,...t})=>a.jsx("div",{className:ze("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});tg.displayName="DialogFooter";const Au=P.forwardRef(({className:e,...t},n)=>a.jsx(w0,{ref:n,className:ze("text-lg font-semibold leading-none tracking-tight",e),...t}));Au.displayName=w0.displayName;const Xf=P.forwardRef(({className:e,...t},n)=>a.jsx(j0,{ref:n,className:ze("text-sm text-muted-foreground",e),...t}));Xf.displayName=j0.displayName;function tne({open:e,onOpenChange:t,runData:n,onRefresh:r}){const[i,s]=P.useState(null),[o,c]=P.useState(null),{items:d=[],approved:h=[],rejected:p=[],pending:m=[]}=n||{},v=async(j,C)=>{s(j.name);try{const E={...j,verification_status:"UNVERIFIED",reliability_tier:"C",last_seen_at:new Date().toISOString(),is_active:!0};if(delete E.rejection_reason,delete E.source_url,delete E.confidence,await Q.entities[C].create(E),j.source_url){const A=await Q.entities[C].filter({name:j.name});A.length>0&&await Q.entities.Claim.create({entity_id:A[0].id,entity_type:C,field_name:"manual_add",field_value:JSON.stringify(j),source_url:j.source_url,status:"PENDING_ALPHA",confidence:"Low",extracted_at:new Date().toISOString()})}r&&r()}catch(E){console.error("Error adding entity:",E)}finally{s(null)}},x=async(j,C)=>{c(j.name);try{const E=await Q.integrations.Core.InvokeLLM({prompt:`
764          Verify this ${C} information more thoroughly:
765          Name: ${j.name}
766          Description: ${j.description||"N/A"}
767          Source: ${j.source_url||"Unknown"}
768          
769          Previous rejection reason: ${j.rejection_reason||"Unknown"}
770          
771          Search for more information about this entity and verify:
772          1. Does this entity actually exist?
773          2. Is the information accurate?
774          3. What is your confidence level?
775        `,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{exists:{type:"boolean"},is_valid:{type:"boolean"},confidence:{type:"string",enum:["High","Medium","Low"]},additional_info:{type:"object"},recommendation:{type:"string"}}}});if(E.is_valid&&E.confidence!=="Low"){const A={...j,...E.additional_info};await v(A,C)}else alert(`Re-validation result: ${E.recommendation}
776Confidence: ${E.confidence}`)}catch(E){console.error("Error revalidating:",E)}finally{c(null)}},w=j=>j==="Startup"?er:j==="Investor"?Ri:tr,b=j=>j!=null&&j.includes("duplicate")?"bg-amber-100 text-amber-700":j!=null&&j.includes("incomplete")||j!=null&&j.includes("missing")?"bg-blue-100 text-blue-700":j!=null&&j.includes("unreliable")||j!=null&&j.includes("confidence")?"bg-red-100 text-red-700":"bg-slate-100 text-slate-700",_=(j,C,E)=>{const A=w(E),k=i===j.name,M=o===j.name;return a.jsxs("div",{className:"border rounded-lg p-4 hover:shadow-sm transition-shadow",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[a.jsx("div",{className:`p-2 rounded-lg ${C==="approved"?"bg-emerald-100":C==="rejected"?"bg-red-50":"bg-amber-50"}`,children:a.jsx(A,{className:`h-5 w-5 ${C==="approved"?"text-emerald-600":C==="rejected"?"text-red-500":"text-amber-600"}`})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-medium text-slate-900 truncate",children:j.name}),j.description&&a.jsx("p",{className:"text-sm text-slate-500 line-clamp-2 mt-0.5",children:j.description}),a.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[j.sector&&a.jsx(Ce,{variant:"outline",className:"text-xs",children:j.sector}),j.investor_type&&a.jsx(Ce,{variant:"outline",className:"text-xs",children:j.investor_type}),j.eso_type&&a.jsx(Ce,{variant:"outline",className:"text-xs",children:j.eso_type}),j.city&&a.jsx(Ce,{variant:"secondary",className:"text-xs",children:j.city})]})]})]}),a.jsxs("div",{className:"flex flex-col items-end gap-2",children:[C==="approved"&&a.jsxs(Ce,{className:"bg-emerald-100 text-emerald-700 gap-1",children:[a.jsx(Un,{className:"h-3 w-3"}),"Added"]}),C==="rejected"&&a.jsxs(a.Fragment,{children:[a.jsxs(Ce,{className:b(j.rejection_reason),children:[a.jsx(nu,{className:"h-3 w-3 mr-1"}),"Rejected"]}),j.rejection_reason&&a.jsx("span",{className:"text-xs text-slate-500 text-right max-w-[150px]",children:j.rejection_reason})]}),C==="pending"&&a.jsxs(Ce,{className:"bg-amber-100 text-amber-700 gap-1",children:[a.jsx($i,{className:"h-3 w-3"}),"Pending"]})]})]}),j.source_url&&a.jsxs("a",{href:j.source_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:underline mt-2",children:[a.jsx(fa,{className:"h-3 w-3"}),"View Source"]}),C==="rejected"&&a.jsxs("div",{className:"flex gap-2 mt-3 pt-3 border-t",children:[a.jsxs(Ne,{size:"sm",variant:"outline",onClick:()=>x(j,E),disabled:M,className:"gap-1 flex-1",children:[M?a.jsx(ln,{className:"h-3 w-3 animate-spin"}):a.jsx(Tv,{className:"h-3 w-3"}),"Re-validate"]}),a.jsxs(Ne,{size:"sm",onClick:()=>v(j,E),disabled:k,className:"gap-1 flex-1 bg-emerald-600 hover:bg-emerald-700",children:[k?a.jsx(ln,{className:"h-3 w-3 animate-spin"}):a.jsx(Um,{className:"h-3 w-3"}),"Add Manually"]})]})]},j.name)};return a.jsx(Yf,{open:e,onOpenChange:t,children:a.jsxs(Pu,{className:"max-w-3xl max-h-[80vh] overflow-hidden flex flex-col",children:[a.jsxs(ku,{children:[a.jsx(Au,{children:"Scan Results"}),a.jsx(Xf,{children:"Review all items found during the scan"})]}),a.jsxs("div",{className:"flex gap-3 mb-4",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-emerald-50 rounded-lg",children:[a.jsx(Un,{className:"h-4 w-4 text-emerald-600"}),a.jsxs("span",{className:"text-sm font-medium text-emerald-700",children:[h.length," Approved"]})]}),a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-red-50 rounded-lg",children:[a.jsx(nu,{className:"h-4 w-4 text-red-500"}),a.jsxs("span",{className:"text-sm font-medium text-red-700",children:[p.length," Rejected"]})]}),a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-amber-50 rounded-lg",children:[a.jsx($i,{className:"h-4 w-4 text-amber-600"}),a.jsxs("span",{className:"text-sm font-medium text-amber-700",children:[m.length," Pending"]})]})]}),a.jsxs(Ns,{defaultValue:"rejected",className:"flex-1 overflow-hidden flex flex-col",children:[a.jsxs(qa,{children:[a.jsxs(Ut,{value:"rejected",className:"gap-1",children:[a.jsx(nu,{className:"h-4 w-4"}),"Rejected (",p.length,")"]}),a.jsxs(Ut,{value:"approved",className:"gap-1",children:[a.jsx(Un,{className:"h-4 w-4"}),"Approved (",h.length,")"]}),a.jsxs(Ut,{value:"all",className:"gap-1",children:["All (",d.length,")"]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto mt-4",children:[a.jsx(cn,{value:"rejected",className:"m-0",children:p.length===0?a.jsx("div",{className:"text-center py-8 text-slate-500",children:"No rejected items"}):a.jsx("div",{className:"space-y-3",children:p.map(j=>_(j,"rejected",j.entity_type||"Startup"))})}),a.jsx(cn,{value:"approved",className:"m-0",children:h.length===0?a.jsx("div",{className:"text-center py-8 text-slate-500",children:"No approved items"}):a.jsx("div",{className:"space-y-3",children:h.map(j=>_(j,"approved",j.entity_type||"Startup"))})}),a.jsx(cn,{value:"all",className:"m-0",children:d.length===0?a.jsx("div",{className:"text-center py-8 text-slate-500",children:"No items found"}):a.jsx("div",{className:"space-y-3",children:d.map(j=>_(j,j.status||"pending",j.entity_type||"Startup"))})})]})]})]})})}function on(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function _o(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function nne(e,t){const n=on(e);return isNaN(t)?_o(e,NaN):(t&&n.setDate(n.getDate()+t),n)}const HF=6048e5,rne=864e5,WF=6e4,VF=36e5,Vy=43200,FT=1440;let ine={};function ng(){return ine}function Gp(e,t){var c,d,h,p;const n=ng(),r=(t==null?void 0:t.weekStartsOn)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,i=on(e),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function qv(e){return Gp(e,{weekStartsOn:1}
776)}function KF(e){const t=on(e),n=t.getFullYear(),r=_o(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=qv(r),s=_o(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const o=qv(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function BT(e){const t=on(e);return t.setHours(0,0,0,0),t}function Hv(e){const t=on(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ane(e,t){const n=BT(e),r=BT(t),i=+n-Hv(n),s=+r-Hv(r);return Math.round((i-s)/rne)}function sne(e){const t=KF(e),n=_o(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),qv(n)}function wv(e,t){const n=on(e),r=on(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function one(e){return _o(e,Date.now())}function lne(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function cne(e){if(!lne(e)&&typeof e!="number")return!1;const t=on(e);return!isNaN(Number(t))}function une(e,t){const n=on(e),r=on(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function dne(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function fne(e,t){return+on(e)-+on(t)}function hne(e){const t=on(e);return t.setHours(23,59,59,999),t}function pne(e){const t=on(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function mne(e){const t=on(e);return+hne(t)==+pne(t)}function gne(e,t){const n=on(e),r=on(t),i=wv(n,r),s=Math.abs(une(n,r));let o;if(s<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let c=wv(n,r)===-i;mne(on(e))&&s===1&&wv(e,r)===1&&(c=!1),o=i*(s-Number(c))}return o===0?0:o}function yne(e,t,n){const r=fne(e,t)/1e3;return dne(n==null?void 0:n.roundingMethod)(r)}function vne(e){const t=on(e),n=_o(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const xne={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bne=(e,t,n)=>{let r;const i=xne[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ew(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const _ne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sne={date:Ew({formats:_ne,defaultWidth:"full"}),time:Ew({formats:wne,defaultWidth:"full"}),dateTime:Ew({formats:jne,defaultWidth:"full"})},Nne={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cne=(e,t,n,r)=>Nne[e];function op(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):o;i=e.formattingValues[c]||e.formattingValues[o]}else{const o=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const Ene={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kne={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ane={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
776ay","Saturday"]},One={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Tne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Mne=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rne={ordinalNumber:Mne,era:op({values:Ene,defaultWidth:"wide"}),quarter:op({values:Pne,defaultWidth:"wide",argumentCallback:e=>e-1}),month:op({values:kne,defaultWidth:"wide"}),day:op({values:Ane,defaultWidth:"wide"}),dayPeriod:op({values:One,defaultWidth:"wide",formattingValues:Tne,defaultFormattingWidth:"wide"})};function lp(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?Lne(c,m=>m.test(o)):Ine(c,m=>m.test(o));let h;h=e.valueCallback?e.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const p=t.slice(o.length);return{value:h,rest:p}}}function Ine(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Lne(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Dne(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const c=t.slice(i.length);return{value:o,rest:c}}}const $ne=/^(\d+)(th|st|nd|rd)?/i,Fne=/\d+/i,Bne={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zne={any:[/^b/i,/^(a|c)/i]},Une={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qne={any:[/1/i,/2/i,/3/i,/4/i]},Hne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Wne={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vne={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Kne={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gne={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zne={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Yne={ordinalNumber:Dne({matchPattern:$ne,parsePattern:Fne,valueCallback:e=>parseInt(e,10)}),era:lp({matchPatterns:Bne,defaultMatchWidth:"wide",parsePatterns:zne,defaultParseWidth:"any"}),quarter:lp({matchPatterns:Une,defaultMatchWidth:"wide",parsePatterns:qne,defaultParseWidth:"any",valueCallback:e=>e+1}),month:lp({matchPatterns:Hne,defaultMatchWidth:"wide",parsePatterns:Wne,defaultParseWidth:"any"}),day:lp({matchPatterns:Vne,defaultMatchWidth:"wide",parsePatterns:Kne,defaultParseWidth:"any"}),dayPeriod:lp({matchPatterns:Gne,defaultMatchWidth:"any",parsePatterns:Zne,defaultParseWidth:"any"})},GF={code:"en-US",formatDistance:bne,formatLong:Sne,formatRelative:Cne,localize:Rne,match:Yne,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xne(e){const t=on(e);return ane(t,vne(t))+1}function Qne(e){const t=on(e),n=+qv(t)-+sne(t);return Math.round(n/HF)+1}function ZF(e,t){var p,m,v,x;const n=on(e),r=n.getFullYear(),i=ng(),s=(t==null?void 0:t.firstWeekContainsDate)??((m=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??i.firstWeekContainsDate??((x=(v=i.locale)==null?void 0:v.options)==null?void 0:x.firstWeekContainsDate)??1,o=_o(e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const c=Gp(o,t),d=_o(e,0);d.setFullYear(r,0,s),d.setHours(0,0,0,0);const h=Gp(d,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function Jne(e,t){var c,d,h,p;const n=ng(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=ZF(e,t),s=_o(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Gp(s,t)}function ere(e,t){const n=on(e),r=+Gp(n,t)-+Jne(n,t);return Math.round(r/HF)+1}function tn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fl={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return tn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):tn(n+1,2)},d(e,t){return tn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return tn(e.getHours()%12||12,t.length)},H(e,t){return tn(e.getHours(),t.length)},m(e,t){return tn(e.getMinutes(),t.length)},s(e,t){return tn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return tn(i,t.length)}},Td={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return fl.y(e,t)},Y:function(e,t,n,r){const i=ZF(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return tn(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):tn(s,t.length)},R:function(e,t){const n=KF(e);return tn(n,t.length)},u:function(e,t){const n=e.getFullYear();return tn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return tn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return tn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fl.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return tn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=ere(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):tn(i,t.length)},I:function(e,t,n){const r=Qne(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):tn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fl.d(e,t)},D:function(e,t,n){const r=Xne(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):tn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return tn(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return tn(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return tn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Td.noon:r===0?i=Td.midnight:i=r/12>
vendor: 4,426 bytes, line 776
776=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Td.evening:r>=12?i=Td.afternoon:r>=4?i=Td.morning:i=Td.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fl.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fl.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):tn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):tn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fl.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fl.s(e,t)},S:function(e,t){return fl.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return qT(r);case"XXXX":case"XX":return Rc(r);case"XXXXX":case"XXX":default:return Rc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return qT(r);case"xxxx":case"xx":return Rc(r);case"xxxxx":case"xxx":default:return Rc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+UT(r,":");case"OOOO":default:return"GMT"+Rc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+UT(r,":");case"zzzz":default:return"GMT"+Rc(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return tn(r,t.length)},T:function(e,t,n){const r=e.getTime();return tn(r,t.length)}};function UT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+tn(s,2)}function qT(e,t){return e%60===0?(e>0?"-":"+")+tn(Math.abs(e)/60,2):Rc(e,t)}function Rc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=tn(Math.trunc(r/60),2),s=tn(r%60,2);return n+i+t+s}const HT=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},YF=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},tre=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return HT(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",HT(r,t)).replace("{{time}}",YF(i,t))},nre={p:YF,P:tre},rre=/^D+$/,ire=/^Y+$/,are=["D","DD","YY","YYYY"];function sre(e){return rre.test(e)}function ore(e){return ire.test(e)}function lre(e,t,n){const r=cre(e,t,n);if(console.warn(r),are.includes(e))throw new RangeError(r)}function cre(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ure=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dre=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fre=/^'([^]*?)'?$/,hre=/''/g,pre=/[a-zA-Z]/;function Tt(e,t,n){var p,m,v,x;const r=ng(),i=r.locale??GF,s=r.firstWeekContainsDate??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,o=r.weekStartsOn??((x=(v=r.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,c=on(e);if(!cne(c))throw new RangeError("Invalid time value");let d=t.match(dre).map(w=>{const b=w[0];if(b==="p"||b==="P"){const _=nre[b];return _(w,i.formatLong)}return w}).join("").match(ure).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const b=w[0];if(b==="'")return{isToken:!1,value:mre(w)};if(zT[b])return{isToken:!0,value:w};
776if(b.match(pre))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(d=i.localize.preprocessor(c,d));const h={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return d.map(w=>{if(!w.isToken)return w.value;const b=w.value;(ore(b)||sre(b))&&lre(b,t,String(e));const _=zT[b[0]];return _(c,b,i.localize,h)}).join("")}function mre(e){const t=e.match(fre);return t?t[1].replace(hre,"'"):e}function gre(e,t,n){const r=ng(),i=(n==null?void 0:n.locale)??r.locale??GF,s=2520,o=wv(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let d,h;o>0?(d=on(t),h=on(e)):(d=on(e),h=on(t));const p=yne(h,d),m=(Hv(h)-Hv(d))/1e3,v=Math.round((p-m)/60);let x;if(v<2)return n!=null&&n.includeSeconds?p<5?i.formatDistance("lessThanXSeconds",5,c):p<10?i.formatDistance("lessThanXSeconds",10,c):p<20?i.formatDistance("lessThanXSeconds",20,c):p<40?i.formatDistance("halfAMinute",0,c):p<60?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",1,c):v===0?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",v,c);if(v<45)return i.formatDistance("xMinutes",v,c);if(v<90)return i.formatDistance("aboutXHours",1,c);if(v<FT){const w=Math.round(v/60);return i.formatDistance("aboutXHours",w,c)}else{if(v<s)return i.formatDistance("xDays",1,c);if(v<Vy){const w=Math.round(v/FT);return i.formatDistance("xDays",w,c)}else if(v<Vy*2)return x=Math.round(v/Vy),i.formatDistance("aboutXMonths",x,c)}if(x=gne(h,d),x<12){const w=Math.round(v/Vy);return i.formatDistance("xMonths",w,c)}else{const w=x%12,b=Math.trunc(x/12);return w<3?i.formatDistance("aboutXYears",b,c):w<9?i.formatDistance("overXYears",b,c):i.formatDistance("almostXYears",b+1,c)}}function jC(e,t){return gre(e,one(e),t)}function yre(e,t){return nne(e,-t)}function vre(e,t){const r=wre(e);let i;if(r.date){const d=jre(r.date,2);i=Sre(d.restDateString,d.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const s=i.getTime();let o=0,c;if(r.time&&(o=Nre(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(c=Cre(r.timezone),isNaN(c))return new Date(NaN)}else{const d=new Date(s+o),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}return new Date(s+o+c)}const Ky={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},xre=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,bre=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wre(e){const t={},n=e.split(Ky.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ky.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ky.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Ky.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function jre(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:s===null?i:s*100,restDateString:e.slice((r[1]||r[2]).length)}}function Sre(e,t){if(t===null)return new Date(NaN);const n=e.match(xre);if(!n)return new Date(NaN);const r=!!n[4],i=cp(n[1]),s=cp(n[2])-1,o=cp(n[3]),c=cp(n[4]),d=cp(n[5])-1;if(r)return Ore(t,c,d)?Ere(t,c,d):new Date(NaN);{const h=new Date(0);return!kre(t,s,o)||!Are(t,i)?new Date(NaN):(h.setUTCFullYear(t,s,Math.max(i,o)),h)}}function cp(e){return e?parseInt(e):1}function Nre(e){const t=e.match(bre);if(!t)return NaN;const n=Pw(t[1]),r=Pw(t[2]),i=Pw(t[3]);return Tre(n,r,i)?n*VF+r*WF+i*1e3:NaN}function Pw(e){return e&&parseFloat(e.replace(",","."))||0}function Cre(e){if(e==="Z")return 0;const t=e.match(_re);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Mre(r,i)?n*(r*VF+i*WF):NaN}function Ere(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,s=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+s),r}const Pre=[31,null,31,30,31,30,31,31,30,31,30,31];function XF(e){return e%400===0||e%4===0&&e%100!==0}function kre(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Pre[t]||(XF(e)?29:28))}function Are(e,t){return t>=1&&t<=(XF(e)?366:365)}function Ore(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Tre(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Mre(e,t){return t>=0&&t<=59}function WT(e,[t,n]){return Math.min(n,Math.max(t,e))}const Rre=["top","right","bottom","left"],$l=Math.min,ki=Math.max,Wv=Math.round,Gy=Math.floor,ms=e=>({x:e,y:e}
vendor: 47,141 bytes, line 776
776),Ire={left:"right",right:"left",bottom:"top",top:"bottom"},Lre={start:"end",end:"start"};function SC(e,t,n){return ki(e,$l(t,n))}function wo(e,t){return typeof e=="function"?e(t):e}function jo(e){return e.split("-")[0]}function Qf(e){return e.split("-")[1]}function q2(e){return e==="x"?"y":"x"}function H2(e){return e==="y"?"height":"width"}const Dre=new Set(["top","bottom"]);function cs(e){return Dre.has(jo(e))?"y":"x"}function W2(e){return q2(cs(e))}function $re(e,t,n){n===void 0&&(n=!1);const r=Qf(e),i=W2(e),s=H2(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Vv(o)),[o,Vv(o)]}function Fre(e){const t=Vv(e);return[NC(e),t,NC(t)]}function NC(e){return e.replace(/start|end/g,t=>Lre[t])}const VT=["left","right"],KT=["right","left"],Bre=["top","bottom"],zre=["bottom","top"];function Ure(e,t,n){switch(e){case"top":case"bottom":return n?t?KT:VT:t?VT:KT;case"left":case"right":return t?Bre:zre;default:return[]}}function qre(e,t,n,r){const i=Qf(e);let s=Ure(jo(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(NC)))),s}function Vv(e){return e.replace(/left|right|bottom|top/g,t=>Ire[t])}function Hre(e){return{top:0,right:0,bottom:0,left:0,...e}}function QF(e){return typeof e!="number"?Hre(e):{top:e,right:e,bottom:e,left:e}}function Kv(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function GT(e,t,n){let{reference:r,floating:i}=e;const s=cs(t),o=W2(t),c=H2(o),d=jo(t),h=s==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,v=r[c]/2-i[c]/2;let x;switch(d){case"top":x={x:p,y:r.y-i.height};break;case"bottom":x={x:p,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-i.width,y:m};break;default:x={x:r.x,y:r.y}}switch(Qf(t)){case"start":x[o]-=v*(n&&h?-1:1);break;case"end":x[o]+=v*(n&&h?-1:1);break}return x}const Wre=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,c=s.filter(Boolean),d=await(o.isRTL==null?void 0:o.isRTL(t));let h=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=GT(h,r,d),v=r,x={},w=0;for(let b=0;b<c.length;b++){const{name:_,fn:j}=c[b],{x:C,y:E,data:A,reset:k}=await j({x:p,y:m,initialPlacement:r,placement:v,strategy:i,middlewareData:x,rects:h,platform:o,elements:{reference:e,floating:t}});p=C??p,m=E??m,x={...x,[_]:{...x[_],...A}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(h=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:p,y:m}=GT(h,v,d)),b=-1)}return{x:p,y:m,placement:v,strategy:i,middlewareData:x}};async function Zp(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:v=!1,padding:x=0}=wo(t,e),w=QF(x),_=c[v?m==="floating"?"reference":"floating":m],j=Kv(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(_)))==null||n?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),A=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},k=Kv(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:E,strategy:d}):C);return{top:(j.top-k.top+w.top)/A.y,bottom:(k.bottom-j.bottom+w.bottom)/A.y,left:(j.left-k.left+w.left)/A.x,right:(k.right-j.right+w.right)/A.x}}const Vre=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=wo(e,t)||{};if(h==null)return{};const m=QF(p),v={x:n,y:r},x=W2(i),w=H2(x),b=await o.getDimensions(h),_=x==="y",j=_?"top":"left",C=_?"bottom":"right",E=_?"clientHeight":"clientWidth",A=s.reference[w]+s.reference[x]-v[x]-s.floating[w],k=v[x]-s.reference[x],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(h));let I=M?M[E]:0;(!I||!await(o.isElement==null?void 0:o.isElement(M)))&&(I=c.floating[E]||s.floating[w]);const $=A/2-k/2,q=I/2-b[w]/2-1,V=$l(m[j],q),H=$l(m[C],q),U=V,z=I-b[w]-H,Z=I/2-b[w]/2+$,ee=SC(U,Z,z),G=!d.arrow&&Qf(i)!=null&&Z!==ee&&s.reference[w]/2-(Z<U?V:H)-b[w]/2<0,oe=G?Z<U?Z-U:Z-z:0;return{[x]:v[x]+oe,data:{[x]:ee,centerOffset:Z-ee-oe,...G&&{alignmentOffset:oe}},reset:G}}}),Kre=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,..._}=wo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const j=jo(i),C=cs(c),E=jo(c)===c,A=await(d.isRTL==null?void 0:d.isRTL(h.floating)),k=v||(E||!b?[Vv(c)]:Fre(c)),M=w!=="none";!v&&M&&k.push(...qre(c,b,w,A));const I=[c,...k],$=await Zp(t,_),q=[];let V=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&q.push($[j]),m){const Z=$re(i,o,A);q.push($[Z[0]],$[Z[1]])}if(V=[...V,{placement:i,overflows:q}],!q.every(Z=>Z<=0)){var H,U;const Z=(((H=s.flip)==null?void 0:H.index)||0)+1,ee=I[Z];if(ee&&(!(m==="alignment"?C!==cs(ee):!1)||V.every(W=>cs(W.placement)===C?W.overflows[0]>0:!0)))return{data:{index:Z,overflows:V},reset:{placement:ee}};let G=(U=V.filter(oe=>oe.overflows[0]<=0).sort((oe,W)=>oe.overflows[1]-W.overflows[1])[0])==null?void 0:U.placement;if(!G)switch(x){case"bestFit":{var z;const oe=(z=V.filter(W=>{if(M){const ie=cs(W.placement);return ie===C||ie==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ie=>ie>0).reduce((ie,ae)=>ie+ae,0)]).sort((W,ie)=>W[1]-ie[1])[0])==null?void 0:z[0];oe&&(G=oe);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function ZT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function YT(e){return Rre.some(t=>e[t]>=0)}const Gre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=wo(e,t);switch(r){case"referenceHidden":{const s=await Zp(t,{...i,elementContext:"reference"}),o=ZT(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:YT(o)}}}case"escaped":{const s=await Zp(t,{...i,altBoundary:!0}),o=ZT(s,n.floating);return{data:{escapedOffsets:o,escaped:YT(o)}}}default:return{}}}}},JF=new Set(["left","top"]);async function Zre(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=jo(n),c=Qf(n),d=cs(n)==="y",h=JF.has(o)?-1:1,p=s&&d?-1:1,m=wo(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof w=="number"&&(x=c==="end"?w*-1:w),d?{x:x*p,y:v*h}:{x:v*h,y:x*p}}const Yre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:c}=t,d=await Zre(t,e);return o===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:o}}}}},Xre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:c={fn:_=>{let{x:j,y:C}=_;return{x:j,y:C}}},...d}=wo(e,t),h={x:n,y:r},p=await Zp(t,d),m=cs(jo(i)),v=q2(m);let x=h[v],w=h[m];if(s){const _=v==="y"?"top":"left",j=v==="y"?"bottom":"right",C=x+p[_],E=x-p[j];x=SC(C,x,E)}if(o){const _=m==="y"?"top":"left",j=m==="y"?"bottom":"right",C=w+p[_],E=w-p[j];w=SC(C,w,E)}const b=c.fn({...t,[v]:x,[m]:w});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[v]:s,[m]:o}}}}}},Qre=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=wo(e,t),p={x:n,y:r},m=cs(i),v=q2(m);let x=p[v],w=p[m];const b=wo(c,t),_=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const E=v==="y"?"height":"width",A=s.reference[v]-s.floating[E]+_.mainAxis,k=s.reference[v]+s.reference[E]-_.mainAxis;x<A?x=A:x>k&&(x=k)}if(h){var j,C;const E=v==="y"?"width":"height",A=JF.has(jo(i)),k=s.reference[m]-s.floating[E]+(A&&((j=o.offset)==null?void 0:j[m])||0)+(A?0:_.crossAxis),M=s.reference[m]+s.reference[E]+(A?0:((C=o.offset)==null?void 0:C[m])||0)-(A?_.crossAxis:0);w<k?w=k:w>M&&(w=M)}return{[v]:x,[m]:w}}}},Jre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:c}=t,{apply:d=()=>{},...h}=wo(e,t),p=await Zp(t,h),m=jo(i),v=Qf(i),x=cs(i)==="y",{width:w,height:b}=s.floating;let _,j;m==="top"||m==="bottom"?(_=m,j=v===(await(o.isRTL==null?void 0:o.isRTL(c.floating))?"start":"end")?"left":"right"):(j=m,_=v==="end"?"top":"bottom");const C=b-p.top-p.bottom,E=w-p.left-p.right,A=$l(b-p[_],C),k=$l(w-p[j],E),M=!t.middlewareData.shift;let I=A,$=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=C),M&&!v){const V=ki(p.left,0),H=ki(p.right,0),U=ki(p.top,0),z=ki(p.bottom,0);x?$=w-2*(V!==0||H!==0?V+H:ki(p.left,p.right)):I=b-2*(U!==0||z!==0?U+z:ki(p.top,p.bottom))}await d({...t,availableWidth:$,availableHeight:I});const q=await o.getDimensions(c.floating);return w!==q.width||b!==q.height?{reset:{rects:!0}}:{}}}};function S0(){return typeof window<"u"}function Jf(e){return eB(e)?(e.nodeName||"").toLowerCase():"#document"}function Ii(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cs(e){var t;return(t=(eB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function eB(e){return S0()?e instanceof Node||e instanceof Ii(e).Node:!1}function Da(e){return S0()?e instanceof Element||e instanceof Ii(e).Element:!1}function _s(e){return S0()?e instanceof HTMLElement||e instanceof Ii(e).HTMLElement:!1}function XT(e){return!S0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ii(e).ShadowRoot}const eie=new Set(["inline","contents"]);function rg(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=$a(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!eie.has(i)}const tie=new Set(["table","td","th"]);function nie(e){return tie.has(Jf(e))}const rie=[":popover-open",":modal"];function N0(e){return rie.some(t=>{try{return e.matches(t)}catch{return!1}})}const iie=["transform","translate","scale","rotate","perspective"],aie=["transform","translate","scale","rotate","perspective","filter"],sie=["paint","layout","strict","content"];function V2(e){const t=K2(),n=Da(e)?$a(e):e;return iie.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||aie.some(r=>(n.willChange||"").includes(r))||sie.some(r=>(n.contain||"").includes(r))}function oie(e){let t=Fl(e);for(;_s(t)&&!ff(t);){if(V2(t))return t;if(N0(t))return null;t=Fl(t)}return null}function K2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lie=new Set(["html","body","#document"]);function ff(e){return lie.has(Jf(e))}function $a(e){return Ii(e).getComputedStyle(e)}function C0(e){return Da(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fl(e){if(Jf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||XT(e)&&e.host||Cs(e);return XT(t)?t.host:t}function tB(e){const t=Fl(e);return ff(t)?e.ownerDocument?e.ownerDocument.body:e.body:_s(t)&&rg(t)?t:tB(t)}function Yp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=tB(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Ii(i);if(s){const c=CC(o);return t.concat(o,o.visualViewport||[],rg(i)?i:[],c&&n?Yp(c):[])}return t.concat(i,Yp(i,[],n))}function CC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nB(e){const t=$a(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=_s(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,c=Wv(n)!==s||Wv(r)!==o;return c&&(n=s,r=o),{width:n,height:r,$:c}}function G2(e){return Da(e)?e:e.contextElement}function Hd(e){const t=G2(e);if(!_s(t))return ms(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=nB(t);let o=(s?Wv(n.width):n.width)/r,c=(s?Wv(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!c||!Number.isFinite(c))&&(c=1),{x:o,y:c}}const cie=ms(0);function rB(e){const t=Ii(e);return!K2()||!t.visualViewport?cie:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uie(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ii(e)?!1:t}function hu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=G2(e);let o=ms(1);t&&(r?Da(r)&&(o=Hd(r)):o=Hd(e));const c=uie(s,n,r)?rB(s):ms(0);let d=(i.left+c.x)/o.x,h=(i.top+c.y)/o.y,p=i.width/o.x,m=i.height/o.y;if(s){const v=Ii(s),x=r&&Da(r)?Ii(r):r;let w=v,b=CC(w);for(;b&&r&&x!==w;){const _=Hd(b),j=b.getBoundingClientRect(),C=$a(b),E=j.left+(b.clientLeft+parseFloat(C.paddingLeft))*_.x,A=j.top+(b.clientTop+parseFloat(C.paddingTop))*_.y;d*=_.x,h*=_.y,p*=_.x,m*=_.y,d+=E,h+=A,w=Ii(b),b=CC(w)}}return Kv({width:p,height:m,x:d,y:h})}function E0(e,t){const n=C0(e).scrollLeft;return t?t.left+n:hu(Cs(e)).left+n}function iB(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-E0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function die(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Cs(r),c=t?N0(t.floating):!1;if(r===o||c&&s)return n;let d={scrollLeft:0,scrollTop:0},h=ms(1);const p=ms(0),m=_s(r);if((m||!m&&!s)&&((Jf(r)!=="body"||rg(o))&&(d=C0(r)),_s(r))){const x=hu(r);h=Hd(r),p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}const v=o&&!m&&!s?iB(o,d):ms(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+v.x,y:n.y*h.y-d.scrollTop*h.y+p.y+v.y}}function fie(e){return Array.from(e.getClientRects())}function hie(e){const t=Cs(e),n=C0(e),r=e.ownerDocument.body,i=ki(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ki(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+E0(e);const c=-n.scrollTop;return $a(r).direction==="rtl"&&(o+=ki(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:c}}const QT=25;function pie(e,t){const n=Ii(e),r=Cs(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,c=0,d=0;if(i){s=i.width,o=i.height;const p=K2();(!p||p&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const h=E0(r);if(h<=0){const p=r.ownerDocument,m=p.body,v=getComputedStyle(m),x=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(r.clientWidth-m.clientWidth-x);w<=QT&&(s-=w)}else h<=QT&&(s+=h);return{width:s,height:o,x:c,y:d}}const mie=new Set(["absolute","fixed"]);function gie(e,t){const n=hu(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=_s(e)?Hd(e):ms(1),o=e.clientWidth*s.x,c=e.clientHeight*s.y,d=i*s.x,h=r*s.y;return{width:o,height:c,x:d,y:h}}function JT(e,t,n){let r;if(t==="viewport")r=pie(e,n);else if(t==="document")r=hie(Cs(e));else if(Da(t))r=gie(t,n);else{const i=rB(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Kv(r)}function aB(e,t){const n=Fl(e);return n===t||!Da(n)||ff(n)?!1:$a(n).position==="fixed"||aB(n,t)}function yie(e,t){const n=t.get(e);if(n)return n;let r=Yp(e,[],!1).filter(c=>Da(c)&&Jf(c)!=="body"),i=null;const s=$a(e).position==="fixed";let o=s?Fl(e):e;for(;Da(o)&&!ff(o);){const c=$a(o),d=V2(o);!d&&c.position==="fixed"&&(i=null),(s?!d&&!i:!d&&c.position==="static"&&!!i&&mie.has(i.position)||rg(o)&&!d&&aB(e,o))?r=r.filter(p=>p!==o):i=c,o=Fl(o)}return t.set(e,r),r}function vie(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?N0(t)?[]:yie(t,this._c):[].concat(n),r],c=o[0],d=o.reduce((h,p)=>{const m=JT(t,p,i);return h.top=ki(m.top,h.top),h.right=$l(m.right,h.right),h.bottom=$l(m.bottom,h.bottom),h.left=ki(m.left,h.left),h},JT(t,c,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function xie(e){const{width:t,height:n}=nB(e);return{width:t,height:n}}function bie(e,t,n){const r=_s(t),i=Cs(t),s=n==="fixed",o=hu(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=ms(0);function h(){d.x=E0(i)}if(r||!r&&!s)if((Jf(t)!=="body"||rg(i))&&(c=C0(t)),r){const x=hu(t,!0,s,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else i&&h();s&&!r&&i&&h();const p=i&&!r&&!s?iB(i,c):ms(0),m=o.left+c.scrollLeft-d.x-p.x,v=o.top+c.scrollTop-d.y-p.y;return{x:m,y:v,width:o.width,height:o.height}}function kw(e){return $a(e).position==="static"}function eM(e,t){if(!_s(e)||$a(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Cs(e)===n&&(n=n.ownerDocument.body),n}function sB(e,t){const n=Ii(e);if(N0(e))return n;if(!_s(e)){let i=Fl(e);for(;i&&!ff(i);){if(Da(i)&&!kw(i))return i;i=Fl(i)}return n}let r=eM(e,t);for(;r&&nie(r)&&kw(r);)r=eM(r,t);return r&&ff(r)&&kw(r)&&!V2(r)?n:r||oie(e)||n}const _ie=async function(e){const t=this.getOffsetParent||sB,n=this.getDimensions,r=await n(e.floating);return{reference:bie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wie(e){return $a(e).direction==="rtl"}const jie={convertOffsetParentRelativeRectToViewportRelativeRect:die,getDocumentElement:Cs,getClippingRect:vie,getOffsetParent:sB,getElementRects:_ie,getClientRects:fie,getDimensions:xie,getScale:Hd,isElement:Da,isRTL:wie};function oB(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sie(e,t){let n=null,r;const i=Cs(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function o(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:p,top:m,width:v,height:x}=h;if(c||t(),!v||!x)return;const w=Gy(m),b=Gy(i.clientWidth-(p+v)),_=Gy(i.clientHeight-(m+x)),j=Gy(p),E={rootMargin:-w+"px "+-b+"px "+-_+"px "+-j+"px",threshold:ki(0,$l(1,d))||1};let A=!0;function k(M){const I=M[0].intersectionRatio;if(I!==d){if(!A)return o();I?o(!1,I):r=setTimeout(()=>{o(!1,1e-7)},1e3)}I===1&&!oB(h,e.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(k,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,E)}n.observe(e)}return o(!0),s}function Nie(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=G2(e),p=i||s?[...h?Yp(h):[],...Yp(t)]:[];p.forEach(j=>{i&&j.addEventListener("scroll",n,{passive:!0}),s&&j.addEventListener("resize",n)});const m=h&&c?Sie(h,n):null;let v=-1,x=null;o&&(x=new ResizeObserver(j=>{let[C]=j;C&&C.target===h&&x&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=x)==null||E.observe(t)})),n()}),h&&!d&&x.observe(h),x.observe(t));let w,b=d?hu(e):null;d&&_();function _(){const j=hu(e);b&&!oB(b,j)&&n(),b=j,w=requestAnimationFrame(_)}return n(),()=>{var j;p.forEach(C=>{i&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m==null||m(),(j=x)==null||j.disconnect(),x=null,d&&cancelAnimationFrame(w)}}const Cie=Yre,Eie=Xre,Pie=Kre,kie=Jre,Aie=Gre,tM=Vre,Oie=Qre,Tie=(e,t,n)=>{const r=new Map,i={platform:jie,...n},s={...i.platform,_c:r};return Wre(e,t,{...i,platform:s})};var Mie=typeof document<"u",Rie=function(){},jv=Mie?P.useLayoutEffect:Rie;function Gv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Gv(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Gv(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function lB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nM(e,t){const n=lB(e);return Math.round(t*n)/n}function Aw(e){const t=P.useRef(e);return jv(()=>{t.current=e}),t}function Iie(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=P.useState(r);Gv(v,r)||x(r);const[w,b]=P.useState(null),[_,j]=P.useState(null),C=P.useCallback(W=>{W!==M.current&&(M.current=W,b(W))},[]),E=P.useCallback(W=>{W!==I.current&&(I.current=W,j(W))},[]),A=s||w,k=o||_,M=P.useRef(null),I=P.useRef(null),$=P.useRef(p),q=d!=null,V=Aw(d),H=Aw(i),U=Aw(h),z=P.useCallback(()=>{if(!M.current||!I.current)return;const W={placement:t,strategy:n,middleware:v};H.current&&(W.platform=H.current),Tie(M.current,I.current,W).then(ie=>{const ae={...ie,isPositioned:U.current!==!1};Z.current&&!Gv($.current,ae)&&($.current=ae,Vm.flushSync(()=>{m(ae)}))})},[v,t,n,H,U]);jv(()=>{h===!1&&$.current.isPositioned&&($.current.isPositioned=!1,m(W=>({...W,isPositioned:!1})))},[h]);const Z=P.useRef(!1);jv(()=>(Z.current=!0,()=>{Z.current=!1}),[]),jv(()=>{if(A&&(M.current=A),k&&(I.current=k),A&&k){if(V.current)return V.current(A,k,z);z()}},[A,k,z,V,q]);const ee=P.useMemo(()=>({reference:M,floating:I,setReference:C,setFloating:E}),[C,E]),G=P.useMemo(()=>({reference:A,floating:k}),[A,k]),oe=P.useMemo(()=>{const W={position:n,left:0,top:0};if(!G.floating)return W;const ie=nM(G.floating,p.x),ae=nM(G.floating,p.y);return c?{...W,transform:"translate("+ie+"px, "+ae+"px)",...lB(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:ae}},[n,c,G.floating,p.x,p.y]);return P.useMemo(()=>({...p,update:z,refs:ee,elements:G,floatingStyles:oe}),[p,z,ee,G,oe])}const Lie=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tM({element:r.current,padding:i}).fn(n):{}:r?tM({element:r,padding:i}).fn(n):{}}}},Die=(e,t)=>({...Cie(e),options:[e,t]}),$ie=(e,t)=>({...Eie(e),options:[e,t]}),Fie=(e,t)=>({...Oie(e),options:[e,t]}),Bie=(e,t)=>({...Pie(e),options:[e,t]}),zie=(e,t)=>({...kie(e),options:[e,t]}),Uie=(e,t)=>({...Aie(e),options:[e,t]}),qie=(e,t)=>({...Lie(e),options:[e,t]});var Hie="Arrow",cB=P.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return a.jsx(vt.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});cB.displayName=Hie;var Wie=cB,Z2="Popper",[uB,ql]=Bi(Z2),[Vie,dB]=uB(Z2),fB=e=>{const{__scopePopper:t,children:n}=e,[r,i]=P.useState(null);return a.jsx(Vie,{scope:t,anchor:r,onAnchorChange:i,children:n})};fB.displayName=Z2;var hB="PopperAnchor",pB=P.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=dB(hB,n),o=P.useRef(null),c=Bt(t,o),d=P.useRef(null);return P.useEffect(()=>{const h=d.current;d.current=(r==null?void 0:r.current)||o.current,h!==d.current&&s.onAnchorChange(d.current)}),r?null:a.jsx(vt.div,{...i,ref:c})});pB.displayName=hB;var Y2="PopperContent",[Kie,Gie]=uB(Y2),mB=P.forwardRef((e,t)=>{var fe,_e,de,we,ke,re;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:w,...b}=e,_=dB(Y2,n),[j,C]=P.useState(null),E=Bt(t,Re=>C(Re)),[A,k]=P.useState(null),M=I2(A),I=(M==null?void 0:M.width)??0,$=(M==null?void 0:M.height)??0,q=r+(s!=="center"?"-"+s:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},H=Array.isArray(h)?h:[h],U=H.length>0,z={padding:V,boundary:H.filter(Yie),altBoundary:U},{refs:Z,floatingStyles:ee,placement:G,isPositioned:oe,middlewareData:W}=Iie({strategy:"fixed",placement:q,whileElementsMounted:(...Re)=>Nie(...Re,{animationFrame:x==="always"}),elements:{reference:_.anchor},middleware:[Die({mainAxis:i+$,alignmentAxis:o}),d&&$ie({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Fie():void 0,...z}),d&&Bie({...z}),zie({...z,apply:({elements:Re,rects:ge,availableWidth:Be,availableHeight:Le})=>{const{width:rt,height:Ct}=ge.reference,_t=Re.floating.style;_t.setProperty("--radix-popper-available-width",`${Be}px`),_t.setProperty("--radix-popper-available-height",`${Le}px`),_t.setProperty("--radix-popper-anchor-width",`${rt}px`),_t.setProperty("--radix-popper-anchor-height",`${Ct}px`)}}),A&&qie({element:A,padding:c}),Xie({arrowWidth:I,arrowHeight:$}),v&&Uie({strategy:"referenceHidden",...z})]}),[ie,ae]=vB(G),K=bs(w);Br(()=>{oe&&(K==null||K())},[oe,K]);const ne=(fe=W.arrow)==null?void 0:fe.x,ve=(_e=W.arrow)==null?void 0:_e.y,je=((de=W.arrow)==null?void 0:de.centerOffset)!==0,[Y,he]=P.useState();return Br(()=>{j&&he(window.getComputedStyle(j).zIndex)},[j]),a.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:oe?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(we=W.transformOrigin)==null?void 0:we.x,(ke=W.transformOrigin)==null?void 0:ke.y].join(" "),...((re=W.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Kie,{scope:n,placedSide:ie,onArrowChange:k,arrowX:ne,arrowY:ve,shouldHideArrow:je,children:a.jsx(vt.div,{"data-side":ie,"data-align":ae,...b,ref:E,style:{...b.style,animation:oe?void 0:"none"}})})})});mB.displayName=Y2;var gB="PopperArrow",Zie={top:"bottom",right:"left",bottom:"top",left:"right"},yB=P.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=Gie(gB,r),o=Zie[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(Wie,{...i,ref:n,style:{...i.style,display:"block"}})})});yB.displayName=gB;function Yie(e){return e!==null}var Xie=e=>({name:"transformOrigin",options:e,fn(t){var _,j,C;const{placement:n,rects:r,middlewareData:i}=t,o=((_=i.arrow)==null?void 0:_.centerOffset)!==0,c=o?0:e.arrowWidth,d=o?0:e.arrowHeight,[h,p]=vB(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((j=i.arrow)==null?void 0:j.x)??0)+c/2,x=(((C=i.arrow)==null?void 0:C.y)??0)+d/2;let w="",b="";return h==="bottom"?(w=o?m:`${v}px`,b=`${-d}px`):h==="top"?(w=o?m:`${v}px`,b=`${r.floating.height+d}px`):h==="right"?(w=`${-d}px`,b=o?m:`${x}px`):h==="left"&&(w=`${r.floating.width+d}px`,b=o?m:`${x}px`),{data:{x:w,y:b}}}});function vB(e){const[t,n="center"]=e.split("-");return[t,n]}var P0=fB,k0=pB,A0=mB,O0=yB,xB=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"}),Qie="VisuallyHidden",bB=P.forwardRef((e,t)=>a.jsx(vt.span,{...e,ref:t,style:{...xB,...e.style}}));bB.displayName=Qie;var Jie=bB,eae=[" ","Enter","ArrowUp","ArrowDown"],tae=[" ","Enter"],pu="Select",[T0,M0,nae]=L2(pu),[eh]=Bi(pu,[nae,ql]),R0=ql(),[rae,Hl]=eh(pu),[iae,aae]=eh(pu),_B=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:v,required:x,form:w}=e,b=R0(t),[_,j]=P.useState(null),[C,E]=P.useState(null),[A,k]=P.useState(!1),M=h0(h),[I,$]=xs({prop:r,defaultProp:i??!1,onChange:s,caller:pu}),[q,V]=xs({prop:o,defaultProp:c,onChange:d,caller:pu}),H=P.useRef(null),U=_?w||!!_.closest("form"):!0,[z,Z]=P.useState(new Set),ee=Array.from(z).map(G=>G.props.value).join(";");return a.jsx(P0,{...b,children:a.jsxs(rae,{required:x,scope:t,trigger:_,onTriggerChange:j,valueNode:C,onValueNodeChange:E,valueNodeHasChildren:A,onValueNodeHasChildrenChange:k,contentId:Ia(),value:q,onValueChange:V,open:I,onOpenChange:$,dir:M,triggerPointerDownPosRef:H,disabled:v,children:[a.jsx(T0.Provider,{scope:t,children:a.jsx(iae,{scope:e.__scopeSelect,onNativeOptionAdd:P.useCallback(G=>{Z(oe=>new Set(oe).add(G))},[]),onNativeOptionRemove:P.useCallback(G=>{Z(oe=>{const W=new Set(oe);return W.delete(G),W})},[]),children:n})}),U?a.jsxs(WB,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:q,onChange:G=>V(G.target.value),disabled:v,form:w,children:[q===void 0?a.jsx("option",{value:""}):null,Array.from(z)]},ee):null]})})};_B.displayName=pu;var wB="SelectTrigger",jB=P.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=R0(n),o=Hl(wB,n),c=o.disabled||r,d=Bt(t,o.onTriggerChange),h=M0(n),p=P.useRef("touch"),[m,v,x]=KB(b=>{const _=h().filter(E=>!E.disabled),j=_.find(E=>E.value===o.value),C=GB(_,b,j);C!==void 0&&o.onValueChange(C.value)}),w=b=>{c||(o.onOpenChange(!0),x()),b&&(o.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return a.jsx(k0,{asChild:!0,...s,children:a.jsx(vt.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":VB(o.value)?"":void 0,...i,ref:d,onClick:He(i.onClick,b=>{b.currentTarget.focus(),p.current!=="mouse"&&w(b)}),onPointerDown:He(i.onPointerDown,b=>{p.current=b.pointerType;const _=b.target;_.hasPointerCapture(b.pointerId)&&_.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(w(b),b.preventDefault())}),onKeyDown:He(i.onKeyDown,b=>{const _=m.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&v(b.key),!(_&&b.key===" ")&&eae.includes(b.key)&&(w(),b.preventDefault())})})})});jB.displayName=wB;var SB="SelectValue",NB=P.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...c}=e,d=Hl(SB,n),{onValueNodeHasChildrenChange:h}=d,p=s!==void 0,m=Bt(t,d.onValueNodeChange);return Br(()=>{h(p)},[h,p]),a.jsx(vt.span,{...c,ref:m,style:{pointerEvents:"none"},children:VB(d.value)?a.jsx(a.Fragment,{children:o}):s})});NB.displayName=SB;var sae="SelectIcon",CB=P.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return a.jsx(vt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});CB.displayName=sae;var oae="SelectPortal",EB=e=>a.jsx(eg,{asChild:!0,...e});EB.displayName=oae;var mu="SelectContent",PB=P.forwardRef((e,t)=>{const n=Hl(mu,e.__scopeSelect),[r,i]=P.useState();if(Br(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Vm.createPortal(a.jsx(kB,{scope:e.__scopeSelect,children:a.jsx(T0.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(AB,{...e,ref:t})});PB.displayName=mu;var ka=10,[kB,Wl]=eh(mu),lae="SelectContentImpl",cae=du("SelectContent.RemoveScroll"),AB=P.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:w,hideWhenDetached:b,avoidCollisions:_,...j}=e,C=Hl(mu,n),[E,A]=P.useState(null),[k,M]=P.useState(null),I=Bt(t,fe=>A(fe)),[$,q]=P.useState(null),[V,H]=P.useState(null),U=M0(n),[z,Z]=P.useState(!1),ee=P.useRef(!1);P.useEffect(()=>{if(E)return F2(E)},[E]),$2();const G=P.useCallback(fe=>{const[_e,...de]=U().map(re=>re.ref.current),[we]=de.slice(-1),ke=document.activeElement;for(const re of fe)if(re===ke||(re==null||re.scrollIntoView({block:"nearest"}),re===_e&&k&&(k.scrollTop=0),re===we&&k&&(k.scrollTop=k.scrollHeight),re==null||re.focus(),document.activeElement!==ke))return},[U,k]),oe=P.useCallback(()=>G([$,E]),[G,$,E]);P.useEffect(()=>{z&&oe()},[z,oe]);const{onOpenChange:W,triggerPointerDownPosRef:ie}=C;P.useEffect(()=>{if(E){let fe={x:0,y:0};const _e=we=>{var ke,re;fe={x:Math.abs(Math.round(we.pageX)-(((ke=ie.current)==null?void 0:ke.x)??0)),y:Math.abs(Math.round(we.pageY)-(((re=ie.current)==null?void 0:re.y)??0))}},de=we=>{fe.x<=10&&fe.y<=10?we.preventDefault():E.contains(we.target)||W(!1),document.removeEventListener("pointermove",_e),ie.current=null};return ie.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",de,{capture:!0})}}},[E,W,ie]),P.useEffect(()=>{const fe=()=>W(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[W]);const[ae,K]=KB(fe=>{const _e=U().filter(ke=>!ke.disabled),de=_e.find(ke=>ke.ref.current===document.activeElement),we=GB(_e,fe,de);we&&setTimeout(()=>we.ref.current.focus())}),ne=P.useCallback((fe,_e,de)=>{const we=!ee.current&&!de;(C.value!==void 0&&C.value===_e||we)&&(q(fe),we&&(ee.current=!0))},[C.value]),ve=P.useCallback(()=>E==null?void 0:E.focus(),[E]),je=P.useCallback((fe,_e,de)=>{const we=!ee.current&&!de;(C.value!==void 0&&C.value===_e||we)&&H(fe)},[C.value]),Y=r==="popper"?EC:OB,he=Y===EC?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:w,hideWhenDetached:b,avoidCollisions:_}:{};return a.jsx(kB,{scope:n,content:E,viewport:k,onViewportChange:M,itemRefCallback:ne,selectedItem:$,onItemLeave:ve,itemTextRefCallback:je,focusSelectedItem:oe,selectedItemText:V,position:r,isPositioned:z,searchRef:ae,children:a.jsx(v0,{as:cae,allowPinchZoom:!0,children:a.jsx(g0,{asChild:!0,trapped:C.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:He(i,fe=>{var _e;(_e=C.trigger)==null||_e.focus({preventScroll:!0}),fe.preventDefault()}),children:a.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:a.jsx(Y,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:fe=>fe.preventDefault(),...j,...he,onPlaced:()=>Z(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:He(j.onKeyDown,fe=>{const _e=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!_e&&fe.key.length===1&&K(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let we=U().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const ke=fe.target,re=we.indexOf(ke);we=we.slice(re+1)}setTimeout(()=>G(we)),fe.preventDefault()}})})})})})})});AB.displayName=lae;var uae="SelectItemAlignedPosition",OB=P.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=Hl(mu,n),o=Wl(mu,n),[c,d]=P.useState(null),[h,p]=P.useState(null),m=Bt(t,I=>p(I)),v=M0(n),x=P.useRef(!1),w=P.useRef(!0),{viewport:b,selectedItem:_,selectedItemText:j,focusSelectedItem:C}=o,E=P.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&h&&b&&_&&j){const I=s.trigger.getBoundingClientRect(),$=h.getBoundingClientRect(),q=s.valueNode.getBoundingClientRect(),V=j.getBoundingClientRect();if(s.dir!=="rtl"){const ke=V.left-$.left,re=q.left-ke,Re=I.left-re,ge=I.width+Re,Be=Math.max(ge,$.width),Le=window.innerWidth-ka,rt=WT(re,[ka,Math.max(ka,Le-Be)]);c.style.minWidth=ge+"px",c.style.left=rt+"px"}else{const ke=$.right-V.right,re=window.innerWidth-q.right-ke,Re=window.innerWidth-I.right-re,ge=I.width+Re,Be=Math.max(ge,$.width),Le=window.innerWidth-ka,rt=WT(re,[ka,Math.max(ka,Le-Be)]);c.style.minWidth=ge+"px",c.style.right=rt+"px"}const H=v(),U=window.innerHeight-ka*2,z=b.scrollHeight,Z=window.getComputedStyle(h),ee=parseInt(Z.borderTopWidth,10),G=parseInt(Z.paddingTop,10),oe=parseInt(Z.borderBottomWidth,10),W=parseInt(Z.paddingBottom,10),ie=ee+G+z+W+oe,ae=Math.min(_.offsetHeight*5,ie),K=window.getComputedStyle(b),ne=parseInt(K.paddingTop,10),ve=parseInt(K.paddingBottom,10),je=I.top+I.height/2-ka,Y=U-je,he=_.offsetHeight/2,fe=_.offsetTop+he,_e=ee+G+fe,de=ie-_e;if(_e<=je){const ke=H.length>0&&_===H[H.length-1].ref.current;c.style.bottom="0px";const re=h.clientHeight-b.offsetTop-b.offsetHeight,Re=Math.max(Y,he+(ke?ve:0)+re+oe),ge=_e+Re;c.style.height=ge+"px"}else{const ke=H.length>0&&_===H[0].ref.current;c.style.top="0px";const Re=Math.max(je,ee+b.offsetTop+(ke?ne:0)+he)+de;c.style.height=Re+"px",b.scrollTop=_e-je+b.offsetTop}c.style.margin=`${ka}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[v,s.trigger,s.valueNode,c,h,b,_,j,s.dir,r]);Br(()=>E(),[E]);const[A,k]=P.useState();Br(()=>{h&&k(window.getComputedStyle(h).zIndex)},[h]);const M=P.useCallback(I=>{I&&w.current===!0&&(E(),C==null||C(),w.current=!1)},[E,C]);return a.jsx(fae,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:M,children:a.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:a.jsx(vt.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});OB.displayName=uae;var dae="SelectPopperPosition",EC=P.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ka,...s}=e,o=R0(n);return a.jsx(A0,{...o,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});EC.displayName=dae;var[fae,X2]=eh(mu,{}),PC="SelectViewport",TB=P.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Wl(PC,n),o=X2(PC,n),c=Bt(t,s.onViewportChange),d=P.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(T0.Slot,{scope:n,children:a.jsx(vt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:He(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:v}=o;if(v!=null&&v.current&&m){const x=Math.abs(d.current-p.scrollTop);if(x>0){const w=window.innerHeight-ka*2,b=parseFloat(m.style.minHeight),_=parseFloat(m.style.height),j=Math.max(b,_);if(j<w){const C=j+x,E=Math.min(w,C),A=C-E;m.style.height=E+"px",m.style.bottom==="0px"&&(p.scrollTop=A>0?A:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});TB.displayName=PC;var MB="SelectGroup",[hae,pae]=eh(MB),mae=P.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ia();return a.jsx(hae,{scope:n,id:i,children:a.jsx(vt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});mae.displayName=MB;var RB="SelectLabel",IB=P.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=pae(RB,n);return a.jsx(vt.div,{id:i.id,...r,ref:t})});IB.displayName=RB;var Zv="SelectItem",[gae,LB]=eh(Zv),DB=P.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=e,c=Hl(Zv,n),d=Wl(Zv,n),h=c.value===r,[p,m]=P.useState(s??""),[v,x]=P.useState(!1),w=Bt(t,C=>{var E;return(E=d.itemRefCallback)==null?void 0:E.call(d,C,r,i)}),b=Ia(),_=P.useRef("touch"),j=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(gae,{scope:n,value:r,disabled:i,textId:b,isSelected:h,onItemTextChange:P.useCallback(C=>{m(E=>E||((C==null?void 0:C.textContent)??"").trim())},[]),children:a.jsx(T0.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:a.jsx(vt.div,{role:"option","aria-labelledby":b,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:w,onFocus:He(o.onFocus,()=>x(!0)),onBlur:He(o.onBlur,()=>x(!1)),onClick:He(o.onClick,()=>{_.current!=="mouse"&&j()}),onPointerUp:He(o.onPointerUp,()=>{_.current==="mouse"&&j()}),onPointerDown:He(o.onPointerDown,C=>{_.current=C.pointerType}),onPointerMove:He(o.onPointerMove,C=>{var E;_.current=C.pointerType,i?(E=d.onItemLeave)==null||E.call(d):_.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(o.onPointerLeave,C=>{var E;C.currentTarget===document.activeElement&&((E=d.onItemLeave)==null||E.call(d))}),onKeyDown:He(o.onKeyDown,C=>{var A;((A=d.searchRef)==null?void 0:A.current)!==""&&C.key===" "||(tae.includes(C.key)&&j(),C.key===" "&&C.preventDefault())})})})})});DB.displayName=Zv;var Sp="SelectItemText",$B=P.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,o=Hl(Sp,n),c=Wl(Sp,n),d=LB(Sp,n),h=aae(Sp,n),[p,m]=P.useState(null),v=Bt(t,j=>m(j),d.onItemTextChange,j=>{var C;return(C=c.itemTextRefCallback)==null?void 0:C.call(c,j,d.value,d.disabled)}),x=p==null?void 0:p.textContent,w=P.useMemo(()=>a.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:b,onNativeOptionRemove:_}=h;return Br(()=>(b(w),()=>_(w)),[b,_,w]),a.jsxs(a.Fragment,{children:[a.jsx(vt.span,{id:d.textId,...s,ref:v}),d.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Vm.createPortal(s.children,o.valueNode):null]})});$B.displayName=Sp;var FB="SelectItemIndicator",BB=P.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return LB(FB,n).isSelected?a.jsx(vt.span,{"aria-hidden":!0,...r,ref:t}):null});BB.displayName=FB;var kC="SelectScrollUpButton",zB=P.forwardRef((e,t)=>{const n=Wl(kC,e.__scopeSelect),r=X2(kC,e.__scopeSelect),[i,s]=P.useState(!1),o=Bt(t,r.onScrollButtonChange);return Br(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;s(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?a.jsx(qB,{...e,ref:o,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});zB.displayName=kC;var AC="SelectScrollDownButton",UB=P.forwardRef((e,t)=>{const n=Wl(AC,e.__scopeSelect),r=X2(AC,e.__scopeSelect),[i,s]=P.useState(!1),o=Bt(t,r.onScrollButtonChange);return Br(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;s(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?a.jsx(qB,{...e,ref:o,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});UB.displayName=AC;var qB=P.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Wl("SelectScrollButton",n),o=P.useRef(null),c=M0(n),d=P.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return P.useEffect(()=>()=>d(),[d]),Br(()=>{var p;const h=c().find(m=>m.ref.current===document.activeElement);(p=h==null?void 0:h.ref.current)==null||p.scrollIntoView({block:"nearest"})},[c]),a.jsx(vt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:He(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:He(i.onPointerMove,()=>{var h;(h=s.onItemLeave)==null||h.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:He(i.onPointerLeave,()=>{d()})})}),yae="SelectSeparator",HB=P.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(vt.div,{"aria-hidden":!0,...r,ref:t})});HB.displayName=yae;var OC="SelectArrow",vae=P.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=R0(n),s=Hl(OC,n),o=Wl(OC,n);return s.open&&o.position==="popper"?a.jsx(O0,{...i,...r,ref:t}):null});vae.displayName=OC;var xae="SelectBubbleInput",WB=P.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=P.useRef(null),s=Bt(r,i),o=R2(t);return P.useEffect(()=>{const c=i.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(o!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[o,t]),a.jsx(vt.select,{...n,style:{...xB,...n.style},ref:s,defaultValue:t})});WB.displayName=xae;function VB(e){return e===""||e===void 0}function KB(e){const t=bs(e),n=P.useRef(""),r=P.useRef(0),i=P.useCallback(o=>{const c=n.current+o;t(c),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),s=P.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function GB(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let o=bae(e,Math.max(s,0));i.length===1&&(o=o.filter(h=>h!==n));const d=o.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function bae(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _ae=_B,ZB=jB,wae=NB,jae=CB,Sae=EB,YB=PB,Nae=TB,XB=IB,QB=DB,Cae=$B,Eae=BB,JB=zB,e8=UB,t8=HB;const oo=_ae,lo=wae,us=P.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ZB,{ref:r,className:ze("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(jae,{asChild:!0,children:a.jsx(kv,{className:"h-4 w-4 opacity-50"})})]}));us.displayName=ZB.displayName;const n8=P.forwardRef(({className:e,...t},n)=>a.jsx(JB,{ref:n,className:ze("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(YH,{className:"h-4 w-4"})}));n8.displayName=JB.displayName;const r8=P.forwardRef(({className:e,...t},n)=>a.jsx(e8,{ref:n,className:ze("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(kv,{className:"h-4 w-4"})}));r8.displayName=e8.displayName;const ds=P.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>a.jsx(Sae,{children:a.jsxs(YB,{ref:i,className:ze("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]:sli
776de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(n8,{}),a.jsx(Nae,{className:ze("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(r8,{})]})}));ds.displayName=YB.displayName;const Pae=P.forwardRef(({className:e,...t},n)=>a.jsx(XB,{ref:n,className:ze("px-2 py-1.5 text-sm font-semibold",e),...t}));Pae.displayName=XB.displayName;const Pn=P.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(QB,{ref:r,className:ze("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Eae,{children:a.jsx(Su,{className:"h-4 w-4"})})}),a.jsx(Cae,{children:t})]}));Pn.displayName=QB.displayName;const kae=P.forwardRef(({className:e,...t},n)=>a.jsx(t8,{ref:n,className:ze("-mx-1 my-1 h-px bg-muted",e),...t}));kae.displayName=t8.displayName;const rM=4e3,iM=12,aM=60,jr=e=>{const t=(e==null?void 0:e.config)||{};return{knownNames:Array.isArray(t.knownNames)?t.knownNames:[],queryStats:typeof t.queryStats=="object"&&t.queryStats?t.queryStats:{},reliableSources:Array.isArray(t.reliableSources)?t.reliableSources:[],runHistory:Array.isArray(t.runHistory)?t.runHistory:[],totalRuns:typeof t.totalRuns=="number"?t.totalRuns:0}},Es=(e,t)=>{const n=e.knownNames.slice(0,40),r=Object.entries(e.queryStats||{}),i=r.map(([m,v])=>({seg:m,found:v.found||0,approved:v.approved||0,yieldScore:(v.approved||0)*2+(v.found||0)})).sort((m,v)=>v.yieldScore-m.yieldScore).slice(0,4),s=r.map(([m,v])=>({seg:m,runs:v.runs||0})).sort((m,v)=>m.runs-v.runs).slice(0,3).map(m=>m.seg),o=[...new Set((e.reliableSources||[]).map(m=>{try{return new URL(m).hostname.replace(/^www\./,"")}catch{return null}}).filter(Boolean))].slice(0,12),c=e.runHistory||[],d=c.slice(0,Math.min(5,c.length)),h=d.length?d.reduce((m,v)=>m+(v.approved||0),0)/d.length:0;let p="";return n.length&&(p+=`
777Already-known ${t} names in our database (DO NOT return these as new): ${n.join(", ")}${e.knownNames.length>n.length?` ... and ${e.knownNames.length-n.length} more.`:""}
778`),i.length&&(p+=`Query segments that previously yielded the most approved discoveries: ${i.map(m=>m.seg).join(", ")}. Prioritize fresh angles within or adjacent to these.
779`),s.length&&(p+=`Underexplored segments worth exploring for new discoveries: ${s.join(", ")}. Do NOT exclude these based on low past yield.
780`),o.length&&(p+=`Source domains that previously produced approved results (advisory prioritization only, NOT automatically trustworthy): ${o.join(", ")}. Prioritize these for initial search, but ALWAYS explore additional sources. A source being listed here does NOT make it automatically truthful.
781`),d.length>0&&(p+=`Recent performance: averaging ${h.toFixed(1)} approved items per run over last ${d.length} runs.
782`),p+="Goal: discover NEW entities not in the known list. Favor credible, specific, recent (2024-2026) findings. Never restrict search only to previously reliable sources - always explore new outlets and angles.",p},Aae=e=>{const t=e.runHistory||[];if(t.length<3)return null;const n=t.slice(0,Math.min(5,t.length)),r=n.filter(p=>(p.found||0)===0).length,i=n.reduce((p,m)=>p+(m.found||0),0),s=n.reduce((p,m)=>p+(m.approved||0),0),o=i>0?s/i:0,c=n.reduce((p,m)=>p+(m.newEntities||0),0),d=n.length?s/n.length:0,h=[];return r>=3&&h.push({pattern:"repeated_zero_yield",recommendation:"consider lower cadence",detail:`${r} of last ${n.length} runs produced zero results`}),i>10&&o<.2&&h.push({pattern:"low_approval_rate",recommendation:"source quality is weak",detail:`${i} found but only ${s} approved (${Math.round(o*100)}% approval)`}),d>=3&&o>.5&&h.push({pattern:"strong_sustained_yield",recommendation:"consider higher cadence",detail:`averaging ${d.toFixed(1)} approved items per run at ${Math.round(o*100)}% approval`}),i>10&&c<i*.1&&h.push({pattern:"repeated_duplication",recommendation:"expand search segments",detail
782:`low new-entity rate: ${c} new out of ${i} found`}),h.length===0?null:{generated_at:new Date().toISOString(),recommendations:h,note:"Advisory only. Does not change schedule_cron, thresholds, or any verification rules."}},Sr=async(e,t,n,r)=>{var o;const i={knownNames:[...t.knownNames],queryStats:{...t.queryStats||{}},reliableSources:[...t.reliableSources],runHistory:[{at:new Date().toISOString(),found:n.found,approved:n.approved,newEntities:n.newEntities},...t.runHistory||[]].slice(0,20),totalRuns:(t.totalRuns||0)+1};for(const c of n.approvedItems||[]){const d=(o=c.name)==null?void 0:o.toLowerCase().trim();d&&!i.knownNames.includes(d)&&i.knownNames.push(d)}i.knownNames.length>rM&&(i.knownNames=i.knownNames.slice(-rM));for(const[c,d]of Object.entries(r||{})){const h=i.queryStats[c]||{runs:0,found:0,approved:0};i.queryStats[c]={runs:h.runs+(d.runs||1),found:h.found+(d.found||0),approved:h.approved+(d.approved||0)}}const s=Object.entries(i.queryStats);s.length>iM&&(i.queryStats=Object.fromEntries(s.sort((c,d)=>(d[1].found||0)-(c[1].found||0)).slice(0,iM)));for(const c of n.approvedItems||[]){const d=c.source_url;d&&!i.reliableSources.includes(d)&&i.reliableSources.push(d)}i.reliableSources.length>aM&&(i.reliableSources=i.reliableSources.slice(-aM)),i.recommendation=Aae(i);try{await Q.entities.Agent.update(e.id,{config:i})}catch(c){console.error("Failed to persist agent learning:",c)}return i},Oae=e=>{var h;const t=e.runHistory||[];if(t.length===0)return{runs:e.totalRuns||0,avgNew:0,avgApproved:0,trend:null,knownCount:0,topSegments:[]};const n=t.slice(0,Math.min(5,t.length)),r=t.slice(Math.min(5,t.length),Math.min(10,t.length)),i=p=>p.length?p.reduce((m,v)=>m+(v.newEntities||0),0)/p.length:0,s=p=>p.length?p.reduce((m,v)=>m+(v.approved||0),0)/p.length:0,o=i(n),c=i(r);let d=null;return r.length>0&&(o>c*1.1?d="up":o<c*.9?d="down":d="flat"),{runs:e.totalRuns||0,avgNew:o,avgApproved:s(n),knownCount:((h=e.knownNames)==null?void 0:h.length)||0,topSegments:Object.entries(e.queryStats||{}).sort((p,m)=>(m[1].found||0)-(p[1].found||0)).slice(0,3).map(([p,m])=>({segment:p,found:m.found||0,approved:m.approved||0})),trend:d}};function i8(e){if(!e)return!1;if(e.source_url&&/^https?:\/\//i.test(e.source_url))return!0;if(e.details&&e.details.website){const t=e.details.website;if(t&&t!=="N/A"&&/^[a-z0-9.-]+\.[a-z]{2,}(\/.*)?$/i.test(t))return!0}return!1}function Q2(e){return(e||[]).filter(i8)}function ws(e){if(!e||!/^https?:\/\//i.test(e))return!1;try{return new URL(e).pathname.replace(/\/+$/,"").length>0}catch{return!1}}function Tae(e){return((e==null?void 0:e.source_urls)||[]).some(ws)}const Mae=["ACTOR_CONFIRMED","KENIA_VALIDATED"],a8=["A","B"];function Dr(e,t=!1){return t?!0:!(!e||!e.verification_status||!Mae.includes(e.verification_status)||!e.reliability_tier||!a8.includes(e.reliability_tier))}const Rae=["APPROVED_ACTOR","APPROVED_KENIA"];function Yv(e,t=!1){return t?!0:!(!e||!e.status||!Rae.includes(e.status)||!e.reliability_tier||!a8.includes(e.reliability_tier)||e.source_url&&!i8(e))}function So(e,t="create",n={}){const{requireConfidence:r=!1,confidenceThreshold:i=40,requireEvidenceSnippet:s=!1,allowedValues:o=null,valueField:c=null,requireFields:d=[]}=n;if(!e)return{allowed:!1,reason:"No item provided",evidenceStatus:"missing"};const h=e.name||e.company_name;if(!h||!String(h).trim())return{allowed:!1,reason:"Missing entity identifier/name",evidenceStatus:"missing"};const p=e.source_url;if(!p||!String(p).trim())return{allowed:!1,reason:"Missing source_url",evidenceStatus:"missing"};if(!ws(p))return{allowed:!1,reason:"source_url is not a real document URL (bare domain or invalid)",evidenceStatus:"missing"};if(r){const m=e.confidence_score;if(m==null||typeof m!="number"||isNaN(m))return{allowed:!1,reason:"Missing explicit confidence_score (required)",evidenceStatus:"insufficient"};if(m<i)return{allowed:!1,reason:`confidence_score ${m} below threshold ${i}`,evidenceStatus:"insufficient"}}if(s){const m=e.evidence_snippet;if(!m||!String(m).trim())return{allowed:!1,reason:"Missing evidence_snippet (required for UPDATE)",evidenceStatus:"insufficient"}}if(o&&c){const m=e[c];if(!m||!o.includes(m))return{allowed:!1,reason:`Invalid or missing ${c}`,evidenceStatus:"insufficient"}}for(const m of d){const v=e[m];if(v==null||typeof v=="string"&&!v.trim())return{allowed:!1,reason:`Missing required field: ${m}`,evidenceStatus:"insufficient"}}return{allowed:!0,reason:"ok",evidenceStatus:"sufficient"}}function Tp(e){if(!e||typeof e!="string")return null;const t=e.trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){const r=new Date(t+"T00:00:00Z");if(!isNaN(r.getTime()))return t}const n=new Date(t);return isNaN(n.getTime())?null:n.toISOString().split("T")[0]}function s8(e){return typeof e=="number"&&isFinite(e)&&e>0}const Iae=new Set(["the","a","an","and","or","of","in","on","at","to","for","with","by","is","are","
782was","were","be","been","ke","kenya","nairobi","says","said","reports","report","new","amid","after","over","into","from","as","its","has","have","will","may","could","would","should","this","that","it"]);function o8(e){if(!e)return null;try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.replace(/^www\./,"")||null}catch{return null}}const Lae=e=>(e||"").toLowerCase().trim().replace(/[^a-z0-9]/g,"");function l8(e){return`${e.title||""} ${e.related_entity_name||""}`.toLowerCase().split(/[^a-z0-9]+/).filter(i=>i&&i.length>2&&!Iae.has(i)).map(Lae).filter(Boolean).sort().slice(0,6).join("|")}function Dae(e){return e>=4?"gold":e===3?"bronze":e===2?"silver":"single"}function $ae(e){const t=new Map;for(const r of e){const i=l8(r);i&&(t.has(i)||t.set(i,[]),t.get(i).push(r))}const n=[];for(const[r,i]of t.entries())i.length>=2&&n.push({fingerprint:r,records:i});return n}function sM(e){const t=e.records,n=new Map,r=[];for(const d of t){const h=d.source_url||d.details&&d.details.website||null,p=o8(h);p&&!n.has(p)&&(n.set(p,d),r.push({publisher:p,url:h||null,agent_name:d.agent_name||null,date:d.insight_date||null}))}const i=n.size,s=t.filter(d=>d.source_url&&/^https?:\/\//i.test(d.source_url)),c=(s.length?s:t).slice().sort((d,h)=>{const p=d.insight_date?new Date(d.insight_date).getTime():1/0,m=h.insight_date?new Date(h.insight_date).getTime():1/0;return p-m})[0];return{canonicalId:c.id,canonical:c,independentCount:i,tier:Dae(i),sources:r,duplicates:t.filter(d=>d.id!==c.id)}}const oM={gold:{label:"Gold",color:"amber",description:"Corroborated by 4+ independent sources"},bronze:{label:"Bronze",color:"orange",description:"Corroborated by 3 independent sources"},silver:{label:"Silver",color:"slate",description:"Corroborated by 2 independent sources"},single:{label:"Single source",color:"zinc",description:"Reported by one source - not yet cross-referenced"}},TC=()=>new Date().toISOString().split("T")[0],c8=e=>{if(!e||typeof e!="string")return TC();const t=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t)){const r=new Date(t+"T00:00:00Z");if(!isNaN(r.getTime()))return t}const n=new Date(t);return isNaN(n.getTime())?TC():n.toISOString().split("T")[0]},J2=async e=>{try{await Q.entities.EcosystemInsight.create(e)}catch(t){console.error(`EcosystemInsight create failed [${e.category}]: "${e.title}"`,(t==null?void 0:t.body)||(t==null?void 0:t.message)||t)}},u8=e=>{const t=(e.source_list||[]).filter(r=>r.url);return t.length?`
783
784PRIORITY SOURCES TO CONSULT (cite only real article/filing URLs from these or equivalent verified outlets; never invent a URL):
785${[...t].sort((r,i)=>(r.priority||9)-(i.priority||9)).map(r=>`- ${r.name}: ${r.url}`).join(`
786`)}`:""},Fae=async e=>{const t=jr(e),n=Es(t,"companies"),r=await Q.integrations.Core.InvokeLLM({prompt:`Search for recent (2024-2026) listed-company disclosures and capital-markets events on African securities exchanges, with primary focus on the Nairobi Securities Exchange (NSE Kenya) and the Capital Markets Authority (CMA Kenya).
787Find real, documented disclosures ONLY. For each, provide: company_name, exchange (e.g. NSE, JSE, NGX, EGX), disclosure_type (one of: profit_warning, earnings, rights_issue, ipo, listing, dividend, board_change, share_buyback, suspension, delisting, bond_issue), a concise title, a 1-2 sentence summary, the source URL (a real filing/article URL), the event_date (YYYY-MM-DD if known), and amount_usd if a figure is disclosed.
788Only return disclosures you can tie to a real, reachable source URL. Do NOT return bare exchange homepages or invented URLs.
789
790ALSO provide for EACH disclosure:
791- evidence_snippet: a SHORT direct quote from the source that directly supports the capital raise, IPO, rights issue, debt issuance, disclosed amount, or disclosed date. If no direct evidence exists in the source, set evidence_snippet to null. Do NOT fabricate evidence.
792- confidence_score: a number 0-100 reflecting the strength of the evidence found. No default - if you cannot assess confidence, set to 0.${u8(e)}${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{disclosures:{type:"array",items:{type:"object",properties:{company_name:{type:"string"},exchange:{type:"string"},disclosure_type:{type:"string"},title:{type:"string"},summary:{type:"string"},source_url:{type:"string"},event_date:{type:"string"},amount_usd:{type:"number"},evidence_snippet:{type:"string"},confidence_score:{type:"number"}}}}}}}),i=(r.disclosures||[]).filter(v=>v.company_name&&v.source_url&&ws(v.source_url)),s=[],o=[],c=await Q.entities.Startup.list().catch(()=>
792[]),d=new Map(c.map(v=>[v.name.toLowerCase().trim(),v])),h=["profit_warning","earnings","rights_issue","ipo","listing","dividend","board_change","share_buyback","suspension","delisting","bond_issue"];for(const v of i){const x=d.get(v.company_name.toLowerCase().trim()),w=["ipo","rights_issue","listing","bond_issue"].includes(v.disclosure_type),b=So(v,"create",{requireConfidence:!0,confidenceThreshold:40,requireEvidenceSnippet:!0,requireFields:["summary"]}),_=s8(v.amount_usd)&&!!Tp(v.event_date),j=!!v.disclosure_type&&h.includes(v.disclosure_type),C=b.allowed&&w&&_&&j;if(C)try{await Q.entities.EcosystemEvent.create({title:`${v.company_name} ${v.disclosure_type.replace("_"," ")}${v.exchange?" on "+v.exchange:""}`,event_type:"Funding",event_date:Tp(v.event_date),summary:v.summary,amount_usd:v.amount_usd,source_url:v.source_url,evidence_snippet:v.evidence_snippet,confidence:v.confidence_score>=70?"High":"Medium",status:"PENDING_ALPHA",agent_id:e.id,sector:(x==null?void 0:x.sector)||null})}catch(E){console.error("Capital markets EcosystemEvent create failed:",E)}else if(w){const E=b.allowed?_?j?"Unknown gate failure":`Invalid disclosure_type: ${v.disclosure_type}`:"Missing or invalid amount_usd or event_date":b.reason;console.warn(`CapitalMarkets: blocked EcosystemEvent for "${v.company_name}" - ${E}`)}if(x&&w&&C)try{await Q.entities.Startup.update(x.id,{last_funding_amount_usd:v.amount_usd,last_funding_date:Tp(v.event_date),last_funding_round:v.disclosure_type,last_seen_at:new Date().toISOString()})}catch(E){console.error("Startup capital-markets update failed:",E)}else x&&w&&console.warn(`CapitalMarkets: blocked Startup funding update for "${v.company_name}" - insufficient evidence/amount/date`);b.allowed?await J2({agent_name:e.name,agent_id:e.id,category:"capital_markets",title:v.title||`${v.company_name} ${v.disclosure_type.replace("_"," ")}`,summary:v.summary,details:{...v,matched_in_db:!!x},source_url:v.source_url,related_entity_type:"Startup",related_entity_name:v.company_name,insight_date:c8(v.event_date),priority:w?"high":"medium"}):console.warn(`CapitalMarkets: blocked Insight for "${v.company_name}" - ${b.reason}`),s.push({name:v.company_name,description:v.summary,source_url:v.source_url,entity_type:"EcosystemInsight",status:"approved",amount_usd:v.amount_usd||null})}for(const v of r.disclosures||[])v.company_name&&(!v.source_url||!ws(v.source_url))&&o.push({name:v.company_name,description:v.summary||"",entity_type:"EcosystemInsight",status:"rejected",rejection_reason:"No real source URL - held by verification gate"});const p={found:(r.disclosures||[]).length,approved:s.length,newEntities:0,approvedItems:s},m={capital_markets:{runs:1,found:(r.disclosures||[]).length,approved:s.length}};return await Sr(e,t,p,m),{items:[...s,...o],approved:s,rejected:o,pending:[],itemsApproved:s.length,newEntities:0,approvedItems:s}},Bae=async e=>{const t=jr(e),n=Es(t,"topics"),r=await Q.integrations.Core.InvokeLLM({prompt:`Scan major economic and financial media for Kenya and Africa (2024-2026) for macro-economic and capital-markets stories OTHER agents miss: fiscal/monetary policy (Treasury, CBK rate decisions, budgets), banking & financial sector, capital-markets moves (NSE indices, bond yields, FX), trade & current account, inflation & GDP, sector deep-dives, debt management, donor/DFI macro commitments.
793For each story provide: headline, topic (fiscal/monetary/banking/markets/trade/inflation/gdp/debt/sector/donor), a 1-2 sentence summary, the direct article URL, published_date, and key_figure (the headline number or stat, with unit) if any.
794Return ONLY real, reachable article URLs from the vetted outlets below (or equivalent credible financial media). Never return a homepage or an invented URL.${u8(e)}${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{stories:{type:"array",items:{type:"object",properties:{headline:{type:"string"},topic:{type:"string"},summary:{type:"string"},source_url:{type:"string"},published_date:{type:"string"},key_figure:{type:"string"}}}}}}}),i=(r.stories||[]).filter(h=>h.headline&&h.source_url&&ws(h.source_url)),s=[],o=[];for(const h of i)await J2({agent_name:e.name,agent_id:e.id,category:"macro_economic",title:h.headline,summary:h.summary,details:{topic:h.topic,key_figure:h.key_figure||null},source_url:h.source_url,insight_date:c8(h.published_date),priority:"medium"}),s.push({name:h.headline,description:h.summary,source_url:h.source_url,entity_type:"EcosystemInsight",status:"approved"});for(const h of r.stories||[])h.headline&&(!h.source_url||!ws(h.source_url))&&o.push({name:h.headline,description:h.summary||"",entity_type:"EcosystemInsight",status:"rejected",rejection_reason:"No real source URL - held by verification gate"});const c={found:(r.stories||[]).length,approved:s.length,newEntities:0,approvedItems:s},d={macro_economic:{runs:1,found:(r.stories||[]).length,approved:s.length}};return await Sr(e,t,c,d),{items:[...s,...o],approved:s,rejected:o,pending:[],itemsApproved:s.length,newEntities:0,approvedItems:s}},zae=async e=>{const t=jr(e),r=(await Q.entities.EcosystemInsight.list("-insight_date",500).catch(()=>[])).filter(j=>!j.is_merged_duplicate),i=$ae(r),s=new Map;for(const j of i){const{independentCount:C,tier:E,sources:A,duplicates:k,
794canonicalId:M}=sM(j),I=`cluster:${j.fingerprint}`;s.set(M,{corroboration_count:C,corroboration_tier:E,corroboration_sources:A,canonical_cluster_id:I,is_merged_duplicate:!1});for(const $ of k)s.set($.id,{corroboration_count:C,corroboration_tier:E,corroboration_sources:A,canonical_cluster_id:I,is_merged_duplicate:!0})}const o=new Set(s.keys());let c=0;for(const j of r){if(o.has(j.id)||!j.source_url||!/^https?:\/\//i.test(j.source_url))continue;const C=o8(j.source_url);s.set(j.id,{corroboration_count:1,corroboration_tier:"single",corroboration_sources:C?[{publisher:C,url:j.source_url,agent_name:j.agent_name||null,date:j.insight_date||null}]:[],canonical_cluster_id:`cluster:${l8(j)}`,is_merged_duplicate:!1}),c++}const d=[];let h=0,p=0,m=0,v=0;for(const j of i){const{canonical:C,independentCount:E,tier:A,duplicates:k}=sM(j);A==="gold"?h++:A==="bronze"?p++:A==="silver"&&m++,v+=k.length,d.push({name:C.title,description:`Corroborated by ${E} independent sources (${A})`,source_url:C.source_url,entity_type:"EcosystemInsight",status:"approved"})}const x=[];for(const[j,C]of s.entries())x.push({id:j,...C});let w=0;if(x.length)try{const j=await Q.entities.EcosystemInsight.bulkUpdate(x);w=j&&j.updated_count||x.length}catch(j){console.error("Corroboration bulkUpdate failed, falling back to per-record:",j);for(const C of x)try{await Q.entities.EcosystemInsight.update(C.id,C),w++}catch(E){console.error("Corroboration update failed for",C.id,(E==null?void 0:E.body)||(E==null?void 0:E.message))}}await J2({agent_name:e.name,agent_id:e.id,category:"general",title:`Cross-reference pass: ${i.length} corroborated clusters (${h} gold, ${p} bronze, ${m} silver)`,summary:`Resolved ${i.length} multi-source facts + ${c} single-source facts across ${r.length} insights. ${v} duplicate reports merged into canonical records. ${h} gold (4+ sources), ${p} bronze (3), ${m} silver (2), ${c} single. ${w} records updated with corroboration medals.`,details:{clusters:i.length,singletons:c,candidates:r.length,goldCount:h,bronzeCount:p,silverCount:m,duplicatesHidden:v,persisted:w},insight_date:TC(),priority:"low"});
794const b={found:i.length,approved:d.length,newEntities:0,approvedItems:d},_={cross_reference:{runs:1,found:i.length,approved:d.length,duplicatesHidden:v,singletons:c}};return await Sr(e,t,b,_),{items:d,approved:d,rejected:[],pending:[],itemsApproved:d.length,newEntities:0,approvedItems:d}},Mi=()=>new Date().toISOString().split("T")[0],lM=e=>{if(!e||typeof e!="string")return null;const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString().split("T")[0]},MC=e=>!(!e||!e.source_url||!ws(e.source_url)||!e.summary||!String(e.summary).trim()||e.confidence_score==null||typeof e.confidence_score!="number"||isNaN(e.confidence_score)||e.confidence_score<40||!e.evidence_snippet||!String(e.evidence_snippet).trim()),Fa=async e=>{try{await Q.entities.EcosystemInsight.create(e)}catch(t){console.error("EcosystemInsight create failed:",t)}},Uae=async e=>{const t=jr(e),n=Es(t,"companies"),i=(await Q.integrations.Core.InvokeLLM({prompt:`Search for Kenya startup exits, shutdowns, mergers and acquisitions in 2024-2026.
795Find companies that shut down, were acquired, merged, or did IPOs.
796For each, provide: company name, exit type (acquired/shut_down/merged/ipo),
797the acquirer or reason, the date, a brief summary, the source URL, and deal amount if known.
798ALSO provide for EACH result:
799- evidence_snippet: a SHORT direct quote from the source that directly supports the exit/acquisition/merger/shutdown claim. If no direct evidence exists in the source, set evidence_snippet to null. Do NOT fabricate evidence.
800- confidence_score: a number 0-100 reflecting the strength of the evidence found. No default - if you cannot assess confidence, set to 0.
801Focus on real, documented events only.${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{exits:{type:"array",items:{type:"object",properties:{company_name:{type:"string"},exit_type:{type:"string",enum:["acquired","shut_down","merged","ipo"]},counterparty:{type:"string"},exit_date:{type:"string"},summary:{type:"string"},source_url:{type:"string"},amount_usd:{type:"number"},evidence_snippet:{type:"string"},confidence_score:{type:"number"}}}}}}})).exits||[],s=[],o=await Q.entities.Startup.list(),c=new Map(o.map(p=>[p.name.toLowerCase().trim(),p]));for(const p of i){if(!p.company_name||!p.exit_type)continue;const m=c.get(p.company_name.toLowerCase().trim());if(p.exit_type==="acquired"||p.exit_type==="merged")if(MC(p))try{await Q.entities.EcosystemEvent.create({title:`${p.company_name} ${p.exit_type==="acquired"?"acquired":"merged"}${p.counterparty?" by "+p.counterparty:""}`,event_type:"Acquisition",event_date:lM(p.exit_date),summary:p.summary,amount_usd:p.amount_usd||null,source_url:p.source_url,confidence:p.confidence_score>=70?"High":"Medium",status:"PENDING_ALPHA",agent_id:e.id,sector:(m==null?void 0:m.sector)||null})}catch(v){console.error("EcosystemEvent create failed:",v)}else console.warn(`ExitsTracker: blocked EcosystemEvent for "${p.company_name}" - insufficient source/evidence`);if(m){const v=So(p,"update",{requireConfidence:!0,confidenceThreshold:40,requireEvidenceSnippet:!0,requireFields:["exit_type"]});if(v.allowed)try{await Q.entities.Startup.update(m.id,{exit_status:p.exit_type,acquired_by:p.counterparty||null,exit_date:lM(p.exit_date),exit_details:p.summary,is_active:p.exit_type!=="shut_down",last_seen_at:new Date().toISOString()})}catch(x){console.error("Startup exit update failed:",x)}else console.warn(`ExitsTracker: blocked Startup update for "${p.company_name}" - ${v.reason}`)}MC(p)?await Fa({agent_name:e.name,agent_id:e.id,category:"exits_ma",title:`${p.company_name} — ${p.exit_type.replace("_"," ")}`,summary:p.summary,details:{...p,matched_in_db:!!m},source_url:p.source_url,related_entity_type:"Startup",related_entity_name:p.company_name,insight_date:Mi(),priority:p.exit_type==="shut_down"?"high":"medium"}):console.warn(`ExitsTracker: blocked Insight for "${p.company_name}" - insufficient source/evidence`),s.push({name:p.company_name,description:p.summary,source_url:p.source_url,entity_type:"EcosystemEvent",status:"approved"})}const d={found:i.length,approved:s.length,newEntities:0,approvedItems:s},h={exits_ma:{runs:1,found:i.length,approved:s.length}};return await Sr(e,t,d,h),{items:s,approved:s,rejected:[],pending:[],itemsApproved:s.length,newEntities:0}},qae=async e=>{const t=jr(e),[n,r]=await Promise.all([Q.entities.Startup.filter({verification_status:"UNVERIFIED"},"-created_date",20).catch(()=>[]),Q.entities.GovProgram.filter({verification_status:"UNVERIFIED"},"-created_date",10).catch(()=>[])]),i=[...n.map(h=>({...h,_type:"Startup"})),...r.map(h=>({...h,_type:"GovProgram"}))].slice(0,15),s=[],o=[];for(const h of i){let p;try{p=await Q.integrations.Core.InvokeLLM({prompt:`Cross-reference this ${h._type} with Kenyan official registries:
802Name: ${h.name}
803Website: ${h.website||"N/A"}
804Description: ${h.description||"N/A"}
805
806Check whether this entity appears in:
807- BRS (Business Registration Service) / eCitizen company registry
808- KRA (Kenya Revenue Authority) PIN registry
809- KIPI (Kenya Industrial Property Institute) for IP/trademarks
810- For government bodies: official government portals
811
812Determine if the entity is verifiable in official records. Provide the evidence URL.
813
814ALSO provide:
815- evidence_snippet: a SHORT direct quote from the registry/source that directly supports the match to this entity. If no direct evidence exists, set evidence_snippet to null. Do NOT fabricate evidence.
816- confidence_score: a number 0-100 reflecting the strength of the registry match. No default - if you cannot assess confidence, set to 0.`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{is_verified:{type:"boolean"},confidence:{type:"string",enum:["High","Medium","Low"]},registry_matches:{type:"array",items:{type:"string"}},evidence_url:{type:"string"},rationale:{type:"string"},evidence_snippet:{type:"string"},confidence_score:{type:"number"}}}})}catch(b){console.error("Registry verify LLM error:",b);continue}const m=So({...p,name:h.name,source_url:p.evidence_url},"update",{requireConfidence:!0,confidenceThreshold:60,requireEvidenceSnippet:!0,requireFields:["rationale"]}),v=Array.isArray(p.registry_matches)&&p.registry_matches.length>0,x=p.is_verified===!0;if(m.allowed&&v&&x){try{await Q.entities[h._type].update(h.id,{verification_status:"AI_CAPTURED",last_verified_at:new Date().toISOString()})}catch(b){console.error("Entity verification update failed:",b)}await Fa({agent_name:e.name,agent_id:e.id,category:"registry_verification",title:`${h.name} — registry verified`,summary:p.rationale,details:{registry_matches:p.registry_matches,confidence:p.confidence,confidence_score:p.confidence_score,evidence_snippet:p.evidence_snippet},source_url:p.evidence_url,related_entity_type:h._type,related_entity_name:h.name,insight_date:Mi(),priority:"medium"}),s.push({name:h.name,description:p.rationale,source_url:p.evidence_url,entity_type:h._type,status:"approved"})}else{const b=m.allowed?v?x?"Unknown gate failure":"is_verified is false":"Empty registry_matches":m.reason;console.warn(`RegistryVerifier: blocked update for "${h.name}" - ${b}`),o.push({name:h.name,description:p.rationale,entity_type:h._type,status:"rejected",rejection_reason:b})}}const c={found:i.length,approved:s.length,newEntities:0,approvedItems:s},d={registry_verification:{runs:1,found:i.length,approved:s.length}};return await Sr(e,t,c,d),{items:[...s,...o],approved:s,rejected:o,pending:[],itemsApproved:s.length,newEntities:0}},Hae=async e=>{const t=jr(e),n=Es(t,"companies"),i=(await Q.integrations.Core.InvokeLLM({prompt:`Search for Kenya tech talent and employment trends in 2024-2026.
817Find major hiring announcements, layoffs, skills shortages, employee movements, and salary trends
818in Kenya's tech/startup sector. For each finding provide: company or sector, trend type
819(hiring/layoff/skills_gap/movement/salary), a summary, the source URL, and affected headcount if known.
820ALSO provide for EACH result:
821- evidence_snippet: a SHORT direct quote from the source that directly supports the hiring/layoff/expansion/contraction claim. If no direct evidence exists in the source, set evidence_snippet to null. Do NOT fabricate evidence.
822- confidence_score: a number 0-100 reflecting the strength of the evidence found. No default - if you cannot assess confidence, set to 0.
823Focus on real, documented events only.${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{trends:{type:"array",items:{type:"object",properties:{company_name:{type:"string"},trend_type:{type:"string",enum:["hiring","layoff","skills_gap","movement","salary"]},summary:{type:"string"},source_url:{type:"string"},affected_count:{type:"number"},evidence_snippet:{type:"string"},confidence_score:{type:"number"}}}}}}})).trends||[],s=[],o=await Q.entities.Startup.list(),c=new Map(o.map(p=>[p.name.toLowerCase().trim(),p]));for(const p of i){if(!p.summary)continue;const m=p.company_name?c.get(p.company_name.toLowerCase().trim()):null;if(m){const x=So(p,"update",{requireConfidence:!0,confidenceThreshold:40,requireEvidenceSnippet:!0,allowedValues:["hiring","layoff","skills_gap","movement","salary"],valueField:"trend_type"});if(x.allowed){const w=p.trend_type==="hiring"?"growing":p.trend_type==="layoff"?"shrinking":(p.trend_type==="skills_gap","stable");try{await Q.entities.Startup.update(m.id,{hiring_trend:w,last_employee_count_update:new Date().toISOString()})}catch(b){console.error("Startup hiring_trend update failed:",b)}}else console.warn(`TalentTracker: blocked Startup update for "${p.company_name}" - ${x.reason}`)}MC(p)?await Fa({agent_name:e.name,agent_id:e.id,category:"talent",title:p.company_name?`${p.company_name} — ${p.trend_type.replace("_"," ")}`:`Trend — ${p.trend_type.replace("_"," ")}`,summary:p.summary,details:{...p,matched_in_db:!!m},source_url:p.source_url,related_entity_type:"Startup",related_entity_name:p.company_name,insight_date:Mi(),priority:p.trend_type==="layoff"?"high":"medium"}):console.warn(`TalentTracker: blocked Insight for "${p.company_name||p.trend_type}" - insufficient source/evidence`),s.push({name:p.company_name||p.trend_type,description:p.summary,source_url:p.source_url,entity_type:"Insight",status:"approved"})}const d={found:i.length,approved:s.length,newEntities:0,approvedItems:s},h={talent:{runs:1,found:i.length,approved:s.length}};return await Sr(e,t,d,h),{items:s,approved:s,rejected:[],pending:[],itemsApproved:s.length,newEntities:0}},Wae=async e=>{const t=jr(e),n=Es(t,"indicators"),i=(await Q.integrations.Core.InvokeLLM({prompt:`Search for Kenya macro-economic indicators as of 2024-2026:
8241. KES/USD exchange rate (current)
8252. Inflation rate (latest CPI)
8263. Central Bank of Kenya (CBK) base interest rate / Central Bank Rate (CBR)
8274. Any major macro-economic policy changes affecting the startup ecosystem
828For each, provide the indicator name, current value, date, a summary, source URL, and the impact on the startup ecosystem.${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{indicators:{type:"array",items:{type:"object",properties:{indicator:{type:"string"},value:{type:"string"},date:{type:"string"},summary:{type:"string"},source_url:{type:"string"},impact:{type:"string"}}}}}}})).indicators||[],s=[];for(const d of i)d.indicator&&(await Fa({agent_name:e.name,agent_id:e.id,category:"macro_economic",title:`${d.indicator}: ${d.value}`,summary:d.summary,details:{indicator:d.indicator,value:d.value,date:d.date,impact:d.impact},source_url:d.source_url,insight_date:Mi(),priority:"medium"}),s.push({name:d.indicator,description:`${d.value} — ${d.summary}`,source_url:d.source_url,entity_type:"Insight",status:"approved"}));const o={found:i.length,approved:s.length,newEntities:0,approvedItems:s},c={macro_economic:{runs:1,found:i.length,approved:s.length}};return await Sr(e,t,o,c),{items:s,approved:s,rejected:[],pending:[],itemsApproved:s.length,newEntities:0}},Vae=async e=>{const t=jr(e),n=Es(t,"mentions"),i=(await Q.integrations.Core.InvokeLLM({prompt:`Search the web for press coverage, news articles, blog posts, reports, directory listings and s
828ocial media mentions about the "Kenya Innovation Ecosystem" platform: an independent private OSINT intelligence platform tracking Kenyan startups, investors, ESOs, universities and government innovation. The platform is built by Haim Etkin (Strategic OSINT & Intelligence Integration).
829
830Search queries to run:
831- "Kenya Innovation Ecosystem" dashboard / platform / tracker
832- "Kenya Innovation Ecosystem" OSINT
833- "Strategic OSINT & Intelligence Integration" Kenya
834- "Haim Etkin" Kenya innovation / OSINT
835
836CRITICAL - EXCLUDE SELF-REFERENCES: Only return mentions published by THIRD-PARTY external sources. Do NOT include any page hosted on our own domains: base44.app, kenya-innovation-ecosystem.base44.app, or any *.base44.app subdomain. These are the platform's own pages, not press coverage. Also exclude pages where the publisher/author is "Haim Etkin" or "Strategic OSINT & Intelligence Integration" (self-published content). We are looking for independent journalists, bloggers, analysts, researchers, or organizations writing ABOUT us, not our own pages.
837
838For each genuine external mention found, provide: title, url, publisher/source name, author if available, published_date (YYYY-MM-DD if known), a short snippet describing what they wrote about the platform, mention_type (news/blog/social/report/directory/other), sentiment (positive/neutral/negative), confidence (High/Medium/Low) about whether it genuinely refers to THIS platform, and is_relevant (true/false).
839
840Only include real, verifiable mentions with a real working URL. Do not invent or guess. If you cannot find any real external coverage, return an empty mentions array.${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{mentions:{type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"},publisher:{type:"string"},author:{type:"string"},published_date:{type:"string"},snippet:{type:"string"},mention_type:{type:"string",enum:["news","blog","social","report","directory","other"]},sentiment:{type:"string",enum:["positive","neutral","negative"]},confidence:{type:"string",enum:["High","Medium","Low"]},is_relevant:{type:"boolean"}}}}}}})).mentions||[],s=[],o=[];let c=0;const d=await Q.entities.CoverageMention.list().catch(()=>[]),h=new Set(d.map(v=>(v.url||"").toLowerCase().trim()));for(const v of i){if(!v.title||!v.url)continue;const x=v.url.toLowerCase().trim();if(h.has(x)){o.push({...v,rejection_reason:"Already tracked",status:"rejected"});continue}if(v.is_relevant===!1){o.push({...v,rejection_reason:"Not relevant to this platform",status:"rejected"});continue}const w=/(^|\.)base44\.app\//.test(x)||x.includes("base44.app/"),b=(v.author||"").toLowerCase().includes("haim etkin")||(v.publisher||"").toLowerCase().includes("strategic osint");if(w||b){o.push({...v,rejection_reason:"Self-reference (own domain/author)",status:"rejected"});continue}try{await Q.entities.CoverageMention.create({title:v.title,url:v.url,publisher:v.publisher||null,author:v.author||null,published_date:v.published_date||null,snippet:v.snippet||null,mention_type:v.mention_type||"news",sentiment:v.sentiment||"neutral",confidence:v.confidence||"Medium",is_relevant:!0,is_read:!1,agent_id:e.id,found_at:new Date().toISOString()}),h.add(x),c++,s.push({name:v.title,description:v.snippet,source_url:v.url,entity_type:"CoverageMention",status:"approved"})}catch(_){console.error("CoverageMention create failed:",_)}}const p={found:i.length,approved:s.length,newEntities:c,approvedItems:s},m={coverage:{runs:1,found:i.length,approved:s.length}};if(await Sr(e,t,p,m),s.length>0)try{const v=s.map((x,w)=>`${w+1}. ${x.name}
841   ${x.source_url}
842   ${x.description||""}`).join(`
843
844`);await Q.integrations.Core.SendEmail({to:"[email protected]",subject:`[Coverage Alert] ${s.length} new media mention${s.length>1?"s":""} found`,body:`The Coverage & Media Monitor agent found ${s.length} new external mention${s.length>1?"s":""} of Kenya Innovation Ecosystem:
845
846${v}
847
848Review them in the Coverage dashboard.`})}catch(v){console.error("Coverage email notification failed:",v)}return{items:[...s,...o],approved:s,rejected:o,pending:[],itemsApproved:s.length,newEntities:c}},Dt=e=>async t=>{const{category:n,focusPrompt:r,sector:i,tags:s,programOrgType:o="Ministry",programFocus:c=s}=e,d=jr(t),h=Es(d,"entities"),m=(await Q.integrations.Core.InvokeLLM({prompt:`Search for Kenya ${r} innovation in 2024-2026.
849Find:
8501. Startups and tech companies in this domain (products, platforms, research spinoffs).
8512. Government programs and agency initiatives in this domain (ministries, authorities, parastatals).
8523. Donor, grant and funding programs supporting this domain.
8534. Events, partnerships, tenders and contracts in this domain.
854For each, provide: name, finding_type (startup / program / event), description, the org or ministry involved, sector, city, website, event_date, amount_usd if known, source_url, and confidence_score 0-100.
855
856CRITICAL - SOURCE URL IS MANDATORY: Every finding MUST include a real, complete, working source_url taken directly from the web search results above. This must be a full http(s) URL (e.g. https://www.kws.go.ke/...). NEVER return "N/A", null, empty string, or a bare domain for source_url. If you cannot find a real source URL for a finding, DROP that finding entirely rather than returning it with a fake or "N/A" source. The website field must also be a full http(s) URL or omitted entirely - never "N/A".
857
858Focus on real, documented entities and events only. Only return findings you can back with a real source URL.
859
860ALSO provide for EACH finding:
861- evidence_snippet: a SHORT direct quote from the cited source that directly supports this finding. If no direct evidence exists in the source, set evidence_snippet to null. Do NOT fabricate evidence.${h}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{findings:{type:"array",items:{type:"object",properties:{name:{type:"string"},finding_type:{type:"string",enum:["startup","program","event"]},description:{type:"string"},org_or_ministry:{type:"string"},sector:{type:"string"},city:{type:"string"},website:{type:"string"},event_date:{type:"string"},amount_usd:{type:"number"},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"}}}}}}})).findings||[],v=[],x=[];let w=0;const[b,_]=await Promise.all([Q.entities.Startup.list().catch(()=>[]),Q.entities.GovProgram.list().catch(()=>[])]),j=new Set(b.map(k=>k.name.toLowerCase().trim())),C=new Set(_.map(k=>k.name.toLowerCase().trim()));for(const k of m){if(!k.name||!k.finding_type)continue;const M=k.name.toLowerCase().trim(),I=So(k,"create",{requireConfidence:!0,confidenceThreshold:40,requireFields:["description"]}),$=So(k,"create",{requireConfidence:!0,confidenceThreshold:40,requireEvidenceSnippet:!0,requireFields:["description"]}),q=!!Tp(k.event_date),H=!(k.amount_usd!==void 0&&k.amount_usd!==null)||s8(k.amount_usd);let U=!1;if(k.finding_type==="startup"){if(j.has(M)){x.push({...k,rejection_reason:"Duplicate startup",status:"rejected"});continue}if(!I.allowed){x.push({...k,rejection_reason:I.reason,status:"rejected"});continue}try{await Q.entities.Startup.create({name:k.name,description:k.description,sector:k.sector||i,tags:s,website:k.website||null,city:k.city||null,country:"Kenya",verification_status:"AI_CAPTURED",reliability_tier:"C",reliability_score:k.confidence_score,last_seen_at:new Date().toISOString(),is_active:!0}),j.add(M),w++,U=!0}catch(z){console.error("Domain startup create failed:",z)}}else if(k.finding_type==="program"){if(C.has(M)){x.push({...k,rejection_reason:"Duplicate program",status:"rejected"});continue}if(!I.allowed){x.push({...k,rejection_reason:I.reason,status:"rejected"});continue}try{await Q.entities.GovProgram.create({name:k.name,description:k.description,org_type:o,innovation_focus:c,ai_initiatives:k.description,tags:s,website:k.website||null,country:"Kenya",verification_status:"AI_CAPTURED",reliability_tier:"C",reliability_score:k.confidence_score,last_seen_at:new Date().toISOString(),is_active:!0}
861),C.add(M),w++,U=!0}catch(z){console.error("Domain program create failed:",z)}}else if(k.finding_type==="event")if($.allowed&&q&&H)try{await Q.entities.EcosystemEvent.create({title:k.name,event_type:"Partnership",event_date:Tp(k.event_date),summary:k.description,amount_usd:k.amount_usd!==void 0&&k.amount_usd!==null?k.amount_usd:null,source_url:k.source_url,evidence_snippet:k.evidence_snippet,confidence:k.confidence_score>=70?"High":"Medium",status:"PENDING_ALPHA",agent_id:t.id,sector:i}),U=!0}catch(z){console.error("Domain event create failed:",z)}else{const z=$.allowed?q?H?"Unknown gate failure":"Invalid amount_usd":"Missing or invalid event_date":$.reason;console.warn(`DomainCollector: blocked EcosystemEvent for "${k.name}" - ${z}`),x.push({...k,rejection_reason:z,status:"rejected"})}$.allowed?(await Fa({agent_name:t.name,agent_id:t.id,category:n,title:k.name,summary:k.description,details:{...k},source_url:k.source_url,related_entity_type:k.finding_type==="startup"?"Startup":k.finding_type==="program"?"GovProgram":"EcosystemEvent",related_entity_name:k.name,insight_date:Mi(),priority:k.finding_type==="event"?"medium":"high"}),U=!0):k.finding_type!=="event"&&console.warn(`DomainCollector: blocked Insight for "${k.name}" - ${$.reason}`),U&&v.push({name:k.name,description:k.description,source_url:k.source_url,entity_type:k.finding_type==="startup"?"Startup":k.finding_type==="program"?"GovProgram":"EcosystemEvent",status:"approved"})}const E={found:m.length,approved:v.length,newEntities:w,approvedItems:v},A={[e.category]:{runs:1,found:m.length,approved:v.length}};return await Sr(t,d,E,A),{items:[...v,...x],approved:v,rejected:x,pending:[],itemsApproved:v.length,newEntities:w,approvedItems:v}},$t={defense:{category:"defense_security",focusPrompt:"defense and security (dual-use tech, drones, cybersecurity, surveillance, AI for defense, aerospace, military R&D, defense procurement and partnerships)",sector:"AI/ML",tags:["defense","security","dual-use"],programFocus:["defense","security","AI"]},agriculture:{category:"agriculture_food",focusPrompt:"agriculture and food security (agritech, precision farming, irrigation, agro-processing, livestock, input supply, market access, food tech)",sector:"Agritech",tags:["agriculture","food-security"],programFocus:["agriculture","food-security","agritech"]},water:{category:"water_sanitation",focusPrompt:"water and sanitation (watertech, water access, purification, irrigation, WASH, sanitation services, water resource management)",sector:"Cleantech",tags:["water","sanitation"],programFocus:["water","sanitation","WASH"]},climate:{category:"climate_green",focusPrompt:"climate and green innovation (renewable energy, climate adaptation, carbon, conservation, green finance, cleantech, sustainability)",sector:"Cleantech",tags:["climate","green","cleantech"],programFocus:["climate","green","cleantech"]},cybersecurity:{category:"defense_security",focusPrompt:"cybersecurity innovation in Kenya (cybersecurity startups, SOC services, threat intelligence, endpoint security, national CERT and cyber policy, cyber defense partnerships)",sector:"SaaS",tags:["defense","security","cybersecurity"],programFocus:["cybersecurity","defense","AI"]},drones_uav:{category:"defense_security",focusPrompt:"drones and UAV innovation in Kenya (drone startups, agricultural drones, surveillance UAVs, drone regulations, military drone programs, counter-drone tech)",sector:"Hardware",tags:["defense","security","drones","uav"],programFocus:["drones","uav","defense"]},defense_procurement:{category:"defense_security",focusPrompt:"defense procurement, tenders and partnerships in Kenya (MOD Kenya procurement, defense contracts, military modernization, bilateral defense partnerships, defense attaché programs)",sector:"AI/ML",tags:["defense","procurement","partnerships"],programFocus:["defense","procurement","partnerships"]},agritech_precision:{category:"agriculture_food",focusPrompt:"agritech and precision farming in Kenya (precision agriculture startups, farm management software, IoT sensors, agritech platforms, digital extension services, input financing)",sector:"Agritech",tags:["agriculture","agritech","precision-farming"],programFocus:["agriculture","agritech","digital"]},food_security:{category:"agriculture_food",focusPrompt:"food security and agro-processing in Kenya (food tech, post-harvest, cold chain, agro-processing startups, food distribution, food security policy and donor programs)",sector:"Agritech",tags:["agriculture","food-security","agro-processing"],programFocus:["food-security","agro-processing","agriculture"]},water_access:{category:"water_sanitation",focusPrompt:"water access and purification innovation in Kenya (watertech startups, rural water supply, water purification, borehole tech, irrigation systems, water utilities and WRMA programs)",sector:"Cleantech",tags:["water","access","purification"],programFocus:["water","access","purification"]},wash_sanitation:{category:"water_sanitation",focusPrompt:"WASH and sanitation services in Kenya (sanitation startups, toilet tech, waste management, WASH programs, county sanitation initiatives, donor WASH funding)",sector:"Cleantech",tags:["water","sanitation","WASH"],programFocus:["sanitation","WASH","water"]},renewable_energy:{category:"climate_green",focusPrompt:"renewable energy innovation in Kenya (solar, wind, mini-grid, off-grid, energy storage startups, renewable energy policy and feed-in tariffs, EPRA programs)",sector:"Cleantech",tags:["climate","green","renew
861able-energy"],programFocus:["renewable-energy","climate","green"]},climate_adaptation:{category:"climate_green",focusPrompt:"climate adaptation and conservation in Kenya (climate-smart agriculture, drought resilience, conservation tech, carbon credits, REDD+, climate finance and NEMA programs)",sector:"Cleantech",tags:["climate","adaptation","conservation"],programFocus:["climate-adaptation","conservation","climate"]},education:{category:"education",focusPrompt:"education and EdTech innovation in Kenya (EdTech startups, e-learning platforms, digital learning, teacher tools, assessment, STEM programs, coding bootcamps, skills training, TVET modernization, KICD and Kenya Education Cloud, DigiSchool, donor education programs)",sector:"Edtech",tags:["education","edtech","digital-learning"],programFocus:["education","edtech","digital-learning"]},fintech:{category:"fintech",focusPrompt:"fintech innovation in Kenya (digital payments, mobile money, lending, BNPL, insurtech, wealth management, crypto, B2B fintech infrastructure, CBK licenses, regulatory sandbox, National Payments Strategy, bank-fintech and telco partnerships, M-Pesa ecosystem, fintech funding and M&A)",sector:"Fintech",tags:["fintech","payments","digital-finance"],programFocus:["fintech","payments","digital-finance"]},health:{category:"health",focusPrompt:"health and healthtech innovation in Kenya (telemedicine, mHealth, digital health, AI diagnostics, health financing, insurtech for health, maternal and child health tech, pharmacy and drug supply chain, last-mile health delivery, EMR/EHR systems, community health worker tools, Ministry of Health digital health strategy, NHIF/SHIF reforms, donor health programs, health startup funding and partnerships)",sector:"Healthtech",tags:["health","healthtech","digital-health"],programFocus:["health","healthtech","digital-health"]},telemedicine:{category:"health",focusPrompt:"telemedicine and virtual care innovation in Kenya (telemedicine startups, remote consultation platforms, e-health apps, tele-radiology, tele-psychiatry, doctor-on-demand, Ministry of Health telehealth guidelines, NHIF virtual care coverage)",sector:"Healthtech",tags:["health","telemedicine","virtual-care"],programFocus:["telemedicine","digital-health","health"]},health_diagnostics:{category:"health",focusPrompt:"AI diagnostics and medical devices innovation in Kenya (AI diagnostic startups, point-of-care diagnostics, lab tech, medical imaging AI, pathology, genomics, biomedical engineering, KEMRI programs, medical device regulation by PPB and Pharmacy and Poisons Board)",sector:"Healthtech",tags:["health","diagnostics","AI","medical-devices"],programFocus:["diagnostics","AI","health"]},health_financing:{category:"health",focusPrompt:"health financing and insurtech in Kenya (health insurance startups, micro-health insurance, NHIF/SHIF reforms, health savings, pay-as-you-go health, embedded health finance, donor health financing programs, World Bank and USAID health grants)",sector:"Healthtech",tags:["health","financing","insurtech"],programFocus:["health-financing","insurtech","health"]},age_tech:{category:"age_tech",focusPrompt:"age tech and eldercare innovation in Kenya (AgeTech startups, eldercare platforms, fall detection, remote monitoring for seniors, digital companionship, silver economy, accessible UX for older adults, caregiver support tools, pension and retirement tech, Ministry of Labour and Social Protection elder programs, county social welfare digitization, donor eldercare programs)",sector:"Healthtech",tags:["age-tech","eldercare","silver-economy"],programFocus:["age-tech","eldercare","social-protection"]},eldercare_caregiving:{category:"age_tech",focusPrompt:"eldercare and caregiving innovation in Kenya (eldercare startups, home-care platforms, caregiver matching, fall detection devices, remote patient monitoring for seniors, nursing home and assisted living tech, community health worker elder tools)",sector:"Healthtech",tags:["age-tech","eldercare","caregiving"],programFocus:["eldercare","caregiving","age-tech"]},cognitive_health:{category:"age_tech",focusPrompt:"cognitive health and dementia innovation in Kenya (dementia care startups, cognitive assessment tools, brain health apps, Alzheimer and dementia support, memory tech, mental health for seniors, neurology digital tools)",sector:"Healthtech",tags:["age-tech","cognitive-health","dementia"],programFocus:["cognitive-health","dementia","age-tech"]},digital_inclusion_accessibility:{category:"age_tech",focusPrompt:"digital inclusion and accessibility for older adults in Kenya (accessible UX startups, digital literacy for seniors, voice and assistive tech, accessible fintech and mobile money for seniors, inclusive design, senior-friendly devices, government digital inclusion programs)",sector:"Healthtech",tags:["age-tech","digital-inclusion","accessibility"],programFocus:["digital-inclusion","accessibility","age-tech"]},silver_economy_fintech:{category:"age_tech",focusPrompt:"silver ec
861onomy fintech and pension innovation in Kenya (pension tech, retirement planning, senior financial inclusion, micro-pension, insurance for older adults, NSSF reforms and digitization, social protection payments, silver economy marketplaces)",sector:"Fintech",tags:["age-tech","silver-economy","fintech","pension"],programFocus:["silver-economy","pension","fintech"]},insurtech:{category:"insurtech",focusPrompt:"insurance and insurtech innovation in Kenya (digital insurance platforms, mobile insurance, micro-insurance, embedded insurance, claims automation, underwriting AI, telematics, fraud detection, Insurance Regulatory Authority IRA Kenya licenses and regulations, insurtech funding and partnerships)",sector:"Fintech",tags:["insurtech","insurance","digital-insurance"],programFocus:["insurtech","insurance","digital-finance"]},micro_insurance:{category:"insurtech",focusPrompt:"micro-insurance and inclusive insurance innovation in Kenya (micro-insurance startups, index-based insurance, weather-index insurance, livestock insurance, low-income insurance products, mobile micro-insurance, PAYGO insurance, inclusive insurance regulation by IRA, donor micro-insurance programs)",sector:"Fintech",tags:["insurtech","micro-insurance","inclusive-insurance"],programFocus:["micro-insurance","inclusion","insurtech"]},health_life_insurance:{category:"insurtech",focusPrompt:"health and life insurance innovation in Kenya (health insurance startups, life insurance digital platforms, NHIF/SHIF reforms, funeral insurance, group life and corporate health cover, medical claims automation, insurance-broker platforms, Association of Kenya Insurers AKI programs)",sector:"Fintech",tags:["insurtech","health-insurance","life-insurance"],programFocus:["health-insurance","life-insurance","insurtech"]},insurtech_infrastructure:{category:"insurtech",focusPrompt:"insurtech infrastructure and embedded insurance in Kenya (insurance APIs, embedded insurance in e-commerce, ride-hail and loans, claims automation, underwriting AI, IoT telematics for auto insurance, fraud detection, insurtech-as-a-service, reinsurer partnerships, Lloyd and Munich Re Kenya activities)",sector:"SaaS",tags:["insurtech","infrastructure","embedded-insurance"],programFocus:["insurtech-infrastructure","embedded-insurance","AI"]},agricultural_insurance:{category:"insurtech",focusPrompt:"agricultural and parametric insurance innovation in Kenya (crop insurance, livestock insurance, parametric and weather-index insurance, ACRE Africa, Kilimo Salama, agricultural insurance schemes, livestock insurance funds, donor agricultural insurance programs, county crop insurance initiatives, Ministry of Agriculture insurance partnerships)",sector:"Agritech",tags:["insurtech","agricultural-insurance","parametric"],programFocus:["agricultural-insurance","parametric","insurtech"]},tourism:{category:"tourism",focusPrompt:"tourism and travel tech innovation in Kenya (travel booking platforms, safari and wildlife tech, hospitality tech and PMS, digital nomad and remote-work platforms, eco-tourism and community conservancy tech, tour operator software, mobility and transport for tourism, experiences and cultural platforms, tourism payments and fintech, MICE and event tech, Kenya Tourism Board digital initiatives, e-visa and ETA systems, Magical Kenya digital campaigns, county tourism digitization, donor and DFID/World Bank tourism development programs, hotel and short-let tech)",sector:"Other",tags:["tourism","travel-tech","hospitality"],programFocus:["tourism","travel-tech","digital-services"]},law_enforcement:{category:"defense_security",focusPrompt:"law enforcement and police tech innovation in Kenya (smart policing platforms, facial recognition and biometric ID, forensic and crime-lab tech, surveillance and CCTV analytics, body-worn cameras, digital evidence management, predictive policing AI, border control and immigration tech, e-police and eCitizen police services, National Police Service digital initiatives, DCI criminal records digitization, traffic enforcement and ALPR tech, community policing apps, prison and correctional facility tech, Interpol and regional police cooperation tech, private security and alarm tech)",sector:"SaaS",tags:["defense","security","law-enforcement","police"],programFocus:["law-enforcement","police","security"]},military_systems:{category:"defense_security",focusPrompt:"military systems and defense/offense technology innovation in Kenya (defense R&D, weapons and weapons-systems tech, armored vehicles and platforms, radars and sensors, electronic warfare, C2 and battlefield management systems, missile and counter-missile te
861ch, military AI and autonomous systems, KDF modernization programs, MOD Kenya defense industry and manufacturing, defense assembly and maintenance, military logistics and supply-chain tech, soldier systems and wearables, base and perimeter security tech, defense exports and imports, bilateral defense R&D partnerships)",sector:"Hardware",tags:["defense","security","military","weapons-systems"],programFocus:["military","defense-systems","weapons"]},sustainability:{category:"sustainability",focusPrompt:"sustainability, ESG and circular economy innovation in Kenya (ESG reporting and carbon-accounting startups, circular economy and waste-to-value ventures, sustainable supply chain tech, corporate sustainability platforms, SDG-aligned tech, green building certification tech, sustainability data and disclosure tools, plastic-alternatives and packaging tech, water and energy efficiency tech, sustainable finance and green bonds, NEMA compliance tech, Kenya SDG programs, donor sustainability and climate finance programs, corporate ESG partnerships)",sector:"Cleantech",tags:["sustainability","esg","circular-economy"],programFocus:["sustainability","esg","circular-economy"]}
861,infrastructure:{category:"infrastructure",focusPrompt:"construction, development and infrastructure innovation in Kenya (PropTech and real-estate tech, construction tech and ConTech, smart-city platforms, roads and transport infrastructure tech, BRT and mobility tech, water and power infrastructure tech, building materials innovation, prefabrication and modular construction, site monitoring and drones in construction, project-management and procurement tech for infrastructure, PPP infrastructure programs, Kenya Urban Roads Authority and Kenya National Highways Authority digital initiatives, AfDB and World Bank infrastructure financing, Konza Technopolis and smart-city programs, county infrastructure digitization)",sector:"Other",tags:["infrastructure","construction","prop-tech"],programFocus:["infrastructure","construction","smart-cities"]},wildlife_conservation:{category:"wildlife_conservation",focusPrompt:"wildlife and conservation technology innovation in Kenya (anti-poaching tech, wildlife tracking and telemetry, GPS collaring, camera-trap AI, biodiversity monitoring platforms, conservation drones, community conservancy tech, human-wildlife conflict mitigation tech, ranger digital tools, park management software, Kenya Wildlife Service digital initiatives, community wildlife conservancies and NRT tech, ecotourism and conservation finance, carbon and biodiversity credit platforms, REDD+ and conservation tech, donor wildlife and biodiversity programs, endangered species monitoring)",sector:"Other",tags:["wildlife","conservation","biodiversity"],programFocus:["wildlife","conservation","biodiversity"]}},Kae=Dt($t.defense),Gae=Dt($t.agriculture),Zae=Dt($t.water),Yae=Dt($t.climate),Xae=Dt($t.cybersecurity),Qae=Dt($t.drones_uav),Jae=Dt($t.defense_procurement),ese=Dt($t.agritech_precision),tse=Dt($t.food_security),nse=Dt($t.water_access),rse=Dt($t.wash_sanitation),ise=Dt($t.renewable_energy),ase=Dt($t.climate_adaptation),sse=Dt($t.education),ose=Dt($t.fintech),lse=Dt($t.health),cse=Dt($t.telemedicine),use=Dt($t.health_diagnostics),dse=Dt($t.health_financing),fse=Dt($t.age_tech),hse=Dt($t.eldercare_caregiving),pse=Dt($t.cognitive_health),mse=Dt($t.digital_inclusion_accessibility),gse=Dt($t.silver_economy_fintech),yse=Dt($t.insurtech),vse=Dt($t.micro_insurance),xse=Dt($t.health_life_insurance),bse=Dt($t.insurtech_infrastructure),_se=Dt($t.agricultural_insurance),wse=Dt($t.tourism),jse=Dt($t.law_enforcement),Sse=Dt($t.military_systems),Nse=Dt($t.sustainability),Cse=Dt($t.infrastructure),Ese=Dt($t.wildlife_conservation),Pse=e=>(e||"").toLowerCase().trim().replace(/[^a-z0-9]/g,""),kse=async e=>{const t=await Q.entities.Startup.list().catch(()=>[]),n=[],r={Idea:1e5,"Pre-seed":15e5,Seed:8e6,"Series A":3e7,"Series B":8e7,"Series C+":25e7,Growth:4e8,Mature:1e9,"Late Stage":5e8};for(const s of t){const o=s.total_funding_usd;if(o==null)continue;const c=r[s.stage]||3e8;o>c&&n.push({entity:s,field:"total_funding_usd",value:o,reason:`Funding $${o.toLocaleString()} exceeds sane max for stage "${s.stage}" ($${c.toLocaleString()})`}),o>=1e9&&s.reliability_tier!=="A"&&n.push({entity:s,field:"total_funding_usd",value:o,reason:`Billion-dollar funding on non-verified (Tier ${s.reliability_tier}) entity - likely global figure misattributed to Kenya entity`})}const i=[];for(const s of n)try{await Q.entities.DataQualityIssue.create({issue_type:"suspicious_metric",severity:"high",status:"open",entity_ids:[s.entity.id],entity_type:"Startup",entity_names:[s.entity.name],description:`${s.entity.name}: ${s.reason}`,details:{field:s.field,value:s.value,stage:s.entity.stage,reliability_tier:s.entity.reliability_tier},detected_at:new Date().toISOString(),detected_by:e.name}),i.push({name:s.entity.name,description:s.reason,entity_type:"DataQualityIssue",status:"approved"})}catch(o){console.error("DQ issue create failed:",o)}return await Fa({agent_name:e.name,agent_id:e.id,category:"general",title:`Sanity check: ${n.length} anomalies flagged`,summary:n.length?n.map(s=>s.reason).join("; "):"No statistical anomalies detected in startup funding data.",details:{flagged_count:n.length,entities:n.map(s=>s.entity.name)},insight_date:Mi(),priority:n.length>0?"high":"low"}),{items:i,approved:i,rejected:[],pending:[],itemsApproved:i.length,newEntities:0}},Ase=async e=>{const[t,n,r]=await Promise.all([Q.entities.Startup.list().catch(()=>[]),Q.entities.Investor.list().catch(()=>[]),Q.entities.ESO.list().catch(()=>[])]),i=c=>{const d=[],h=[];
861for(const p of c){const m=Pse(p.name);if(!m)continue;let v=null;for(const x of h){if(x.norm===m){v=x;break}if(p.website&&x.website&&p.website===x.website&&m.length>4&&x.norm.length>4){const w=Math.min(m.length,x.norm.length);if(m.slice(0,w)===x.norm.slice(0,w)||m.includes(x.norm)||x.norm.includes(m)){v=x;break}}}v?d.push({duplicate:p,canonical:v.entity}):h.push({norm:m,website:p.website,entity:p})}return d},s=[...i(t).map(c=>({...c,type:"Startup"})),...i(n).map(c=>({...c,type:"Investor"})),...i(r).map(c=>({...c,type:"ESO"}))],o=[];for(const c of s)try{await Q.entities.DataQualityIssue.create({issue_type:"duplicate",severity:"medium",status:"open",entity_ids:[c.canonical.id,c.duplicate.id],entity_type:c.type,entity_names:[c.canonical.name,c.duplicate.name],description:`Potential duplicate: "${c.duplicate.name}" may duplicate "${c.canonical.name}"`,details:{canonical_id:c.canonical.id,duplicate_id:c.duplicate.id,canonical_website:c.canonical.website,duplicate_website:c.duplicate.website},detected_at:new Date().toISOString(),detected_by:e.name}),await Q.entities[c.type].update(c.duplicate.id,{canonical_entity_id:c.canonical.id}),o.push({name:c.duplicate.name,description:`Duplicate of ${c.canonical.name}`,entity_type:"DataQualityIssue",status:"approved"})}catch(d){console.error("Dedup issue create failed:",d)}return await Fa({agent_name:e.name,agent_id:e.id,category:"general",title:`Dedup: ${s.length} potential duplicates found`,summary:s.length?s.map(c=>`"${c.duplicate.name}" ~ "${c.canonical.name}"`).join("; "):"No duplicate entities detected.",details:{duplicate_count:s.length},insight_date:Mi(),priority:s.length>5?"high":"medium"}),{items:o,approved:o,rejected:[],pending:[],itemsApproved:o.length,newEntities:0}},Ose=async e=>{const[t,n]=await Promise.all([Q.entities.AgentRun.list("-started_at",150).catch(()=>[]),Q.entities.Agent.list().catch(()=>[])]),r={};for(const o of t){const c=o.agent_name;c&&(r[c]||(r[c]=[]),r[c].push(o))}const i=[];for(const[o,c]of Object.entries(r)){const d=c.slice(0,3);if(d.length<2)continue;const h=d.reduce((v,x)=>v+(x.items_found||0),0),p=d.reduce((v,x)=>v+(x.items_approved||0),0);h>=15&&p===0&&i.push({agent_name:o,reason:`Stuck: ${h} found but 0 approved across last ${d.length} runs`,severity:"high"});const m=d.filter(v=>v.status==="failed");m.length>=2&&i.push({agent_name:o,reason:`Repeated failures: ${m.length} of last ${d.length} runs failed`,severity:"high"})}const s=[];for(const o of i)await Fa({agent_name:e.name,agent_id:e.id,category:"general",title:`Agent health alert: ${o.agent_name}`,summary:o.reason,details:{alert_agent:o.agent_name,severity:o.severity},insight_date:Mi(),priority:o.severity}),s.push({name:o.agent_name,description:o.reason,entity_type:"EcosystemInsight",status:"approved"});return i.length===0&&await Fa({agent_name:e.name,agent_id:e.id,category:"general",title:"Agent health: all agents operating normally",summary:`Reviewed ${Object.keys(r).length} agents across ${t.length} recent runs. No stuck or failing agents detected.`,details:{agents_reviewed:Object.keys(r).length,runs_reviewed:t.length},insight_date:Mi(),priority:"low"}),{items:s,approved:s,rejected:[],pending:[],itemsApproved:s.length,newEntities:0}},Tse=async e=>{const t=jr(e),n=Es(t,"benchmarks"),r=await Q.integrations.Core.InvokeLLM({prompt:`Compile an Africa-wide innovation benchmark comparing Kenya against the other leading African startup ecosystems. Compare Kenya with ALL of: Nigeria, Egypt, South Africa, Tanzania, Rwanda, Ghana, Uganda, Ethiopia, Morocco, Tunisia, Senegal, Namibia - AND include ANY other notable African innovation hub you find real data for (e.g. Cote d'Ivoire, Kenya, DRC, Mozambique, Zambia, Botswana, Cameroon, Burkina Faso, Mali, Angola, Sudan, Madagascar). Do not cap the list at 13 - every country you can produce real figures for should be included.
862
863CRITICAL - SOURCE URLS MUST BE REAL DOCUMENT URLS: The source_urls array must contain full http(s) URLs pointing to ACTUAL reports, articles, or datasets you used (e.g. https://disruptafrica.com/wp-content/uploads/.../The-African-Tech-Startups-Funding-Report.pdf, https://africathebigdeal.com/insights/...). NEVER return bare domain roots such as "https://substack.com", "https://disruptafrica.com", or "https://tracxn.com" - those are homepages, not sources. If you cannot cite a real document URL, return an empty source_urls array; the benchmark will be held for review rather than published with fake or homepage-only sources.
864
865For EACH country (including Kenya), provide the most current, verifiable figures via web search (2024-2026 data preferred):
866- name: country name
867- startup_count: approximate number of active tech/startup companies
868- total_funding_usd: total disclosed startup funding for the most recent full year (USD)
869- unicorn_count: number of unicorns ($1B+ valuation) headquartered in the country
870- deals_count: number of disclosed funding deals in the most recent full year
871- active_investors_count: approximate number of active VC/angel/impact investors
872- top_sectors: the 3-5 dominant startup sectors (Fintech, Agritech, Healthtech, etc.)
873- flagship_companies: 2-4 best-known startups from that country
874- growth_trend: up / stable / down vs prior year
875- notes: a one-line competitive-context note
876- dimensions: for EACH of these development/investment topics, assess the country's activity level and disclosed funding where available. Use level: high / medium / low / emerging / none, funding_usd (best estimate, 0 if none), and a short note. Topics: fintech, infrastructure (construction/transport/real-estate), energy (power/renewables), health (healthtech/health systems), education (edtech/skills), agriculture (agritech/food), ict_digital (ICT/digital economy), manufacturing (industry/industrial tech), tourism (tourism/hospitality tech), climate_sustainability (climate/green/ESG), wildlife_conservation (wildlife/conservation/biodiversity tech).
877
878Then provide:
879- kenya_rank: Kenya's rank among these countries by total_funding_usd (1 = highest)
880- continental_summary: 2-4 sentences on Kenya's competitive continental position vs its peers, citing the data above.
881- source_urls: the actual URLs you relied on.
882
883Use real, documented figures from sources like Africa: The Big Deal, Partech, Disrupt Africa, Briter, Norrsken, GSMA, World Bank, AfDB. Do not invent numbers - if a figure is uncertain, give your best estimate and note it.${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{kenya_rank:{type:"number"},countries:{type:"array",items:{type:"object",properties:{name:{type:"string"},startup_count:{type:"number"},total_funding_usd:{type:"number"},unicorn_count:{type:"number"},deals_count:{type:"number"},active_investors_count:{type:"number"},top_sectors:{type:"array",items:{type:"string"}},flagship_companies:{type:"array",items:{type:"string"}},growth_trend:{type:"string",enum:["up","stable","down","unknown"]},notes:{type:"string"},dimensions:{type:"object",properties:{fintech:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},infrastructure:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},energy:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},health:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},education:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},agriculture:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},ict_digital:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},manufacturing:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},tourism:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},climate_sustainability:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}},wildlife_conservation:{type:"object",properties:{level:{type:"string"},funding_usd:{type:"number"},note:{type:"string"}}}}}}}},continental_summary:{type:"string"},source_urls:{type:"array",items:{type:"string"}}}}}),i=(r.countries||[]).filter(v=>v&&v.name),s=(r.source_urls||[]).filter(ws),o=[],c=[];if(s.length===0){c.push({name:`Regional Benchmark ${Mi()}
883`,description:r.continental_summary||"Benchmark rejected: no real source URLs provided.",entity_type:"RegionalBenchmark",status:"rejected",rejection_reason:"No real source URLs - LLM returned only bare domain roots or none; benchmark held by verification gate"}),await Fa({agent_name:e.name,agent_id:e.id,category:"macro_economic",title:"Africa Benchmark REJECTED - no verifiable sources",summary:`The benchmark was NOT published because the LLM returned only bare domain roots instead of real report/article URLs. source_urls received: ${JSON.stringify(r.source_urls||[])}`,details:{raw_source_urls:r.source_urls||[],countries_returned:i.length,kenya_rank_claimed:r.kenya_rank},source_url:null,insight_date:Mi(),priority:"high"});const v={found:i.length,approved:0,approvedItems:[]},x={benchmark:{runs:1,found:i.length,approved:0,rejected:1}};return await Sr(e,t,v,x),{items:[...o,...c],approved:o,rejected:c,pending:[],itemsApproved:0,newEntities:0,approvedItems:o}}let d="";try{const v=await Q.entities.EcosystemInsight.filter({category:"capital_markets"},"-insight_date",200).catch(()=>[]),x=new Set(["ipo","rights_issue","listing","bond_issue"]),w=[[/NSE|KENYA/i,"Kenya"],[/JSE/i,"South Africa"],[/NGX/i,"Nigeria"],[/EGX/i,"Egypt"],[/RSE|BRVM/i,"Rwanda"],[/DSE/i,"Tanzania"],[/GSE/i,"Ghana"],[/USE/i,"Uganda"],[/ECX|ESX/i,"Ethiopia"]],b={};let _=0;for(const j of v){const C=j.details||{};if(!x.has(C.disclosure_type))continue;const E=Number(C.amount_usd)||0;if(!E)continue;const A=(w.find(([k])=>k.test(C.exchange||""))||[])[1];A&&(b[A]=(b[A]||0)+E,_++)}if(_>0){const j=[];for(const C of i){const E=b[C.name];if(!E)continue;if(j.push(C.name),C.dimensions&&C.dimensions.fintech){(C.dimensions.fintech.funding_usd||0)<E&&(C.dimensions.fintech.funding_usd=E);const k=`Verified exchange capital raises: $${(E/1e6).toFixed(0)}M`;C.dimensions.fintech.note=C.dimensions.fintech.note?`${C.dimensions.fintech.note}; ${k}`:k}const A=`[Fintech dimension calibrated to $${(E/1e6).toFixed(0)}M verified exchange filings]`;C.notes=C.notes?`${C.notes} ${A}`:A}d=`Fintech dimension calibrated against ${_} verified exchange capital-raise disclosures (${j.join(", ")}).`}}catch(v){console.error("Capital-markets calibration failed:",v)}try{const v=await Q.entities.RegionalBenchmark.create({benchmark_date:Mi(),period_label:`${new Date().getFullYear()} H${new Date().getMonth()<6?1:2}`,kenya_rank:r.kenya_rank||null,countries:i,development_topics:["fintech","infrastructure","energy","health","education","agriculture","ict_digital","manufacturing","tourism","climate_sustainability","wildlife_conservation"],continental_summary:[r.continental_summary,d].filter(Boolean).join(" "),source_urls:s,generated_by:e.name,agent_id:e.id});o.push({name:`Regional Benchmark ${v.benchmark_date}`,description:r.continental_summary,source_url:s[0],entity_type:"RegionalBenchmark",status:"approved"})}catch(v){console.error("RegionalBenchmark create failed:",v)}const h=[...i].sort((v,x)=>(x.total_funding_usd||0)-(v.total_funding_usd||0)).slice(0,5).map(v=>v.name).join(", ");await Fa({agent_name:e.name,agent_id:e.id,category:"macro_economic",title:`Africa Benchmark: Kenya ranks #${r.kenya_rank||"?"} by startup funding`,summary:r.continental_summary||`Compared Kenya against ${i.length} African ecosystems. Top 5 by funding: ${h}.`,details:{kenya_rank:r.kenya_rank,countries_compared:i.length,top_5:h},insight_date:Mi(),priority:"high"});const p={found:i.length,approved:o.length,approvedItems:o},m={benchmark:{runs:1,found:i.length,approved:o.length}};return await Sr(e,t,p,m),{items:o,approved:o,rejected:[],pending:[],itemsApproved:o.length,newEntities:o.length}},Mse=async e=>{const t=jr(e),n=Es(t,"entities"),r=await Q.integrations.Core.InvokeLLM({prompt:`Search for inclusion-focused Kenyan innovation and entrepreneurship that standard tech media usually misses. The goal is to surface UNDERREPRESENTED founders and regions the mainstream startup press does not cover.
884
885Deliberately search LOW-VISIBILITY source types:
886- County government innovation weeks, County Integrated Development Plan (CIDP) innovation projects, county youth/women enterprise funds
887- Women enterprise programs: AWEP, Women in Tech Kenya, AkiraChix, Akili Dada, Women Enterprise Fund (WEF), AfDB AFAWA, IFC SheWorks, Groove Women
888- Youth programs: Youth Enterprise Development Fund, Presidential Digital Talent Programme, Ajira, GenU Kenya, KICC cohorts
889- Disability-led ventures: inABLE, Deaf Wired, DAISY Consortium Kenya, disability-inclusive incubators, assistive tech
890- Rural and peri-urban hubs OUTSIDE Nairobi: Mombasa, Kisumu, Eldoret, Kakamega, Nakuru, Nyeri, Meru, Garissa, Kisii physical incubators, cooperative tech, SACCO digital tools
891- Livelihood/agri programs reaching rural women: Farm to Market Alliance, AGRA, One Acre Fund digitization, cooperatives, SACCO tech
892
893For each venture/company you find, provide: name, description, sector, city, county (CRITICAL - we want counties outside Nairobi), website, inclusion_tags (any of: female_founded, youth_led, disability_led, rural), source_url, confidence_score 0-100.
894
895ALSO provide a gap_report listing: underserved_counties (Kenyan counties where you found little or no innovation data), underserved_segments (inclusion segments with near-zero online visibility), and notes on why coverage is thin.
896
897Focus on real, documented ventures only. Do not invent.
898
899ALSO provide for EACH finding:
900- evidence_snippet: a SHORT direct quote from the source that directly supports the inclusion classification (women-led, youth-led, disability inclusion, rural/underserved county, or any other inclusion tag applied). If no direct evidence exists, set evidence_snippet to null. Do NOT fabricate evidence. ${n}`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{findings:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},sector:{type:"string"},city:{type:"string"},county:{type:"string"},website:{type:"string"},inclusion_tags:{type:"array",items:{type:"string",enum:["female_founded","youth_led","disability_led","rural"]}},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"}}}},gap_report:{type:"object",properties:{underserved_counties:{type:"array",items:{type:"string"}},underserved_segments:{type:"array",items:{type:"string"}},notes:{type:"string"}}}}}}),i=r.findings||[];r.gap_report;const s=[],o=[];let c=0,d=0;const h=await Q.entities.Startup.list().catch(()=>[]),p=new Map(h.map(b=>[b.name.toLowerCase().trim(),b])),m=["female_founded","youth_led","disability_led","rural"];for(const b of i){if(!b.name)continue;const _=b.name.toLowerCase().trim(),j=(b.inclusion_tags||[]).filter(k=>m.includes(k)),C=So(b,"create",{requireConfidence:!0,confidenceThreshold:40}),E=So(b,"update",{requireConfidence:!0,confidenceThreshold:40,requireEvidenceSnippet:!0}),A=p.get(_);if(A){if(!E.allowed){console.warn(`InclusionMonitor: blocked update for "${b.name}" - ${E.reason}`),o.push({name:b.name,description:b.description,source_url:b.source_url,entity_type:"Startup",status:"rejected",rejection_reason:E.reason});continue}const k=A.tags||[],M=Array.from(new Set([...k,...j])),I={};if(M.length>k.length&&(I.tags=M),!A.county&&b.county&&(I.county=b.county),Object.keys(I).length>0)try{await Q.entities.Startup.update(A.id,I),d++}catch($){console.error("Inclusion re-tag failed:",$)}s.push({name:b.name,description:b.description,source_url:b.source_url,entity_type:"Startup",status:"approved"});continue}if(!C.allowed){o.push({name:b.name,description:b.description,source_url:b.source_url,entity_type:"Startup",status:"rejected",rejection_reason:C.reason});continue}try{await Q.entities.Startup.create({name:b.name,description:b.description,sector:b.sector||"Other",tags:[...j,"inclusion"],website:b.website||null,city:b.city||null,county:b.county||null,country:"Kenya",verification_status:"AI_CAPTURED",reliability_tier:"C",reliability_score:b.confidence_score,last_seen_at:new Date().toISOString(),is_active:!0}),p.set(_,{name:b.name}),c++,s.push({name:b.name,description:b.description,source_url:b.source_url,entity_type:"Startup",status:"approved"})}catch(k){console.error("Inclusion startup create failed:",k)}}const v={};for(const b of i)for(const _ of b.inclusion_tags||[])v[_]=(v[_]||0)+1;const x={found:i.length,approved:s.length,newEntities:c,approvedItems:s},w={inclusion:{runs:1,found:i.length,approved:s.length,retagged:d}};return await Sr(e,t,x,w),{items:[...s,...o],approved:s,rejected:o,pending:[],itemsApproved:s.length,newEntities:c,approvedItems:s}},Rse={"Exits, Shutdowns & M&A Tracker":Uae,"Official Registry Verifier":qae,"Talent & Tech Employment Tracker":Hae,"Macro-Economic Context Tracker":Wae,"Defense & Security Innovation Collector":Kae,"Agriculture & Food Security Collector":Gae,"Water & Sanitation Collector":Zae,"Climate & Green Innovation Collector":Yae,"Cybersecurity Innovation Collector":Xae,"Drones & UAV Innovation Collector":Qae,"Defense Procurement & Partnerships Collector":Jae,"Agritech & Precision Farming Collector":ese,"Food Security & Agro-processing Collector":tse,"Water Access & Purification Collector":nse,"WASH & Sanitation Collector":rse,"Renewable Energy Innovation Collector":ise,"Climate Adaptation & Conservation Collector":ase,"Education & EdTech Innovation Collector":sse,"Fintech Innovation Collector":ose,"Health & Healthtech Innovation Collector":lse,"Telemedicine & Virtual Care Collector":cse,"Health Diagnostics & Medical Devices Collector":use,"Health Financing & Insurtech Collector":dse,"AgeTech & Eldercare Innovation Collector":fse,"Eldercare & Caregiving Collector":hse,"Cognitive Health & Dementia Collector":pse,"Digital Inclusion & Accessibility Collector":mse,"Silver Economy Fintech & Pension Collector":gse,"Insurtech & Digital Insurance Innovation Collector":yse,"Micro-insurance & Inclusive Insurance Collector":vse,"Health & Life Insurance Collector":xse,"Insurtech Infrastru
900cture & Embedded Insurance Collector":bse,"Agricultural & Parametric Insurance Collector":_se,"Tourism & Travel Tech Collector":wse,"Law Enforcement & Police Tech Collector":jse,"Military Systems & Defense Tech Collector":Sse,"Sustainability & ESG Innovation Collector":Nse,"Construction & Infrastructure Innovation Collector":Cse,"Wildlife & Conservation Tech Collector":Ese,"Coverage & Media Monitor":Vae,"Regional Benchmarking Agent":Tse,"Women & Inclusion Monitor":Mse,"Listed Companies & Capital Markets Collector":Fae,"Economic Press Monitor":Bae,"Cross-Reference & Corroboration Engine":zae,"Sanity Check Agent":kse,"Dedup & Entity Resolution Agent":Ase,"Agent Health Meta-Auditor":Ose},d8=e=>Rse[e.name]||null,Ise=new Set(["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid","msclkid","mc_eid","mc_cid","_ga","_gl","igshid","ref","ref_src","ref_url","spm","scm","pvid","share","si"]),Lse=new Set(["facebook.com","m.facebook.com","web.facebook.com","twitter.com","x.com","t.co","instagram.com","youtube.com","youtu.be","tiktok.com","pinterest.com","snapchat.com","reddit.com","whatsapp.com","telegram.me"]),Dse=new Set(["linkedin.com","www.linkedin.com"]);function f8(e){if(!e||typeof e!="string")return null;const t=e.trim();if(!t||!/^https?:\/\//i.test(t))return null;let n;try{n=new URL(t)}catch{return null}n.hostname=n.hostname.toLowerCase(),n.hash="";const r=n.searchParams;for(const s of[...r.keys()])Ise.has(s.toLowerCase())&&r.delete(s);let i=n.toString();return n.pathname==="/"&&!n.search&&(i=i.replace(/\/$/,"")),i}function $se(e){if(!e)return null;try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}}function Fse(e){if(!e)return"other";let t;try{t=new URL(e)}catch{return"other"}const n=t.hostname.toLowerCase().replace(/^www\./,"");if(n.endsWith(".go.ke")||n==="go.ke")return"gov_site";if(Dse.has(n)||n.endsWith(".linkedin.com"))return"linkedin";if(Lse.has(n))return"social_media";const r=t.pathname.toLowerCase();return/\/(press[-_]?release|newsroom|pr\/|news-releases?)\b/.test(r)?"press_release":"other"}async function Bse({url:e,agentId:t}){const n=f8(e);if(!n)return null;try{const s=await Q.entities.Source.filter({url:n});if(s&&s.length>0)return s[0]}catch(s){console.error("Source lookup failed:",s)}const r=$se(n),i=Fse(n);try{return await Q.entities.Source.create({url:n,publisher:r||null,source_type:i,retrieved_at:new Date().toISOString(),agent_id:t||null,is_archived:!1})}catch(s){return console.error("Source creation failed:",s),null}}function zse(e){if(!e||typeof e!="string")return null;try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return null}}function Use(e){return!(!e||!e.entity_id||!e.entity_type||!e.field_name||e.field_name==="discovered"||!e.field_value||!String(e.field_value).trim()||!e.source_id||!e.source_url||!e.evidence_snippet||!String(e.evidence_snippet).trim()||e.is_current===!1)}function qse(e,t){return`conflict:${e}:${t}`}async function Hse(e,t){if(!e||!t||t==="discovered")return{updated:0};let n=[];try{n=await Q.entities.Claim.filter({entity_id:e,field_name:t})}catch(d){return console.error(`Corroboration: failed to load claims for ${e}.${t}:`,d),{updated:0}}const r=n.filter(Use);if(r.length===0)return{updated:0};const i=new Map;for(const d of r){const h=String(d.field_value).trim();i.has(h)||i.set(h,{claims:[],domains:new Set});const p=i.get(h);p.claims.push(d);const m=zse(d.source_url);m&&p.domains.add(m)}const s=new Date().toISOString(),o=[];if(i.size===1){const d=[...i.values()][0],h=d.domains.size,p=h>=2?"CORROBORATED":"SINGLE_SOURCE",m=h>=2?s:null;for(const v of d.claims)o.push({id:v.id,independent_sources_count:h,corroboration_status:p,corroborated_at:m,conflict_group_id:null})}else{const d=qse(e,t);for(const h of i.values()){const p=h.domains.size;for(const m of h.claims)o.push({id:m.id,independent_sources_count:p,corroboration_status:"CONFLICTED",corroborated_at:s,conflict_group_id:d})}}let c=0;if(o.length>0)try{await Q.entities.Claim.bulkUpdate(o),c=o.length}catch(d){console.error(`Corroboration: bulkUpdate failed for ${e}.${t}:`,d);for(const h of o)try{await Q.entities.Claim.update(h.id,{independent_sources_count:h.independent_sources_count,corroboration_status:h.corroboration_status,corroborated_at:h.corroborated_at,conflict_group_id:h.conflict_group_id}),c++}catch(p){console.error(`Corroboration: update failed for claim ${h.id}:`,p)}}return{updated:c}}
900const Ic={Startup:["name","website","city","county","founded_year","total_funding_usd"],Investor:["name","website","headquarters_country","kenya_office"],ESO:["name","website","city","county","founded_year"],GovProgram:["name","website","portal_url","city","county","parent_ministry","linkedin_url","has_online_portal"],University:["name","website","city","county","established_year","enrollment_size","tech_transfer_office"],Donor:["name","website","city","country","headquarters_country","kenya_office","ticket_size_min_usd","ticket_size_max_usd"]},Wse=new Set(["website","portal_url","linkedin_url"]),Vse=new Set([]);Ic.Startup.length,Ic.Investor.length,Ic.ESO.length,Ic.GovProgram.length,Ic.University.length,Ic.Donor.length;function Kse(e){if(!e||typeof e!="string")return null;const t=e.trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){const r=new Date(t+"T00:00:00Z");if(!isNaN(r.getTime()))return t}const n=new Date(t);return isNaN(n.getTime())?null:n.toISOString().split("T")[0]}function Gse(e,t){if(t==null)return null;if(typeof t=="boolean")return t;if(typeof t=="number")return isFinite(t)?t:null;if(typeof t=="string"){const n=t.trim();return n?Wse.has(e)?f8(n):Vse.has(e)?Kse(n):n:null}return null}function Zse(e,t){const n=new Map;if(!Array.isArray(e)||!t)return n;for(const r of e){if(!r||!r.field_name)continue;const i=String(r.field_name);if(!t.includes(i))continue;const s=r.evidence_snippet?String(r.evidence_snippet).trim():"";s&&(n.has(i)||n.set(i,s))}return n}async function Yse({item:e,entityType:t,entityId:n,agentId:r,sourceRecord:i,confidence:s}){const o=Ic[t];if(!o||!i)return{claimsCreated:0,skipped:["no allowlist or no source"]};const c=Zse(e.field_evidence,o),d=s>=70?"High":"Medium",h=new Date().toISOString();let p=0;const m=new Set;let v=[];try{v=await Q.entities.Claim.filter({entity_id:n,source_id:i.id})}catch(w){console.error("Claim dedup load failed:",w)}const x=new Set(v.map(w=>`${w.field_name}|||${w.field_value}`));for(const w of o){const b=e[w],_=Gse(w,b),j=c.get(w);if(!j||_==null)continue;const C=String(_);if(!C.trim())continue;const E=`${w}|||${C}`;if(!x.has(E))try{await Q.entities.Claim.create({entity_id:n,entity_type:t,field_name:w,field_value:C,source_id:i.id,source_url:i.url,evidence_snippet:j,agent_id:r,status:"PENDING_ALPHA",confidence:d,reliability_tier:"C",is_current:!0,extracted_at:h}),p++,x.add(E),m.add(w)}catch(A){console.error(`Field-level Claim creation failed for ${t}.${w}:`,A)}}for(const w of m)try{await Hse(n,w)}catch(b){console.error(`Corroboration failed for ${t}.${w}:`,b)}return{claimsCreated:p,skipped:[]}}function Xse({agent:e}){var o;const t=jr(e),n=Oae(t);if(n.runs===0)return a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-400 mb-4 bg-slate-50 rounded-lg px-3 py-2",children:[a.jsx(qm,{className:"h-3.5 w-3.5"}),a.jsx("span",{children:"First run pending - no learning history yet"})]});const r=n.trend==="up"?pr:n.trend==="down"?Hm:Ov,i=n.trend==="up"?"text-emerald-600":n.trend==="down"?"text-red-600":"text-slate-400",s=n.trend==="up"?"improving":n.trend==="down"?"declining":"stable";return a.jsxs("div",{className:"mb-4 rounded-lg border border-emerald-100 bg-emerald-50/50 px-3 py-2.5",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[a.jsx(W3,{className:"h-3.5 w-3.5 text-emerald-600"}),a.jsx("span",{className:"text-xs font-semibold text-emerald-800",children:"Agent Intelligence"}),a.jsxs("span",{className:"text-xs text-slate-500",children:["· ",n.runs," run",n.runs===1?"":"s"]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-slate-500",children:"Known entities"}),a.jsx("p",{className:"font-semibold text-slate-900",children:n.knownCount})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-slate-500",children:"Avg new / run"}),a.jsx("p",{className:"font-semibold text-slate-900",children:n.avgNew.toFixed(1)})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-slate-500",children:"Trend"}),a.jsxs("p",{className:`font-semibold flex items-center gap-1 ${i}`,children:[a.jsx(r,{className:"h-3 w-3"}),s]})]})]}),((o=n.topSegments)==null?void 0:o.length)>0&&a.jsxs("div",{className:"mt-2 pt-2 border-t border-emerald-100",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Top-yield segments:"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:n.topSegments.map(c=>a.jsxs("span",{className:"text-xs px-1.5 py-0.5 bg-white rounded text-slate-600 border border-emerald-100",children:[c.segment," (",c.found,")"]},c.segment))})]})]})}const Qse={approved:"bg-emerald-100 text-emerald-700",enriched:"bg-blue-100 text-blue-700",rejected:"bg-red-100 text-red-700",pending:"bg-amber-100 text-amber-700"},Jse={Startup:sa,GovProgram:sa,Investor:sa,ESO:sa,EcosystemEvent:ho,Insight:sa},eoe=async e=>{const t=e.confidence_score||50,n=e.entity_type==="Startup"||e.finding_type==="startup",r=e.entity_type==="GovProgram"||e.finding_type==="program",i=e.entity_type==="EcosystemEvent"||e.finding_type==="event";if(n)return await Q.entities.Startup.create({name:e.name,description:e.description,sector:e.sector||"Other",website:e.website||null,city:e.city||null,country:"Kenya",verification_status:"AI_CAPTURED",reliability_tier:"C",reliability_score:t,last_seen_at:new Date().toISOString(),is_active:!0,tags:["manually-approved"]});if(r)return await Q.entities.GovProgram.create({name:e.name,description:e.description,org_type:e.org_type||"Agency",innovation_focus:[],ai_initiatives:e.description,website:e.website||null,country:"Kenya",verification_status:"AI_CAPTURED",reliability_tier:"C",reliability_score:t,last_seen_at:new Date().toISOString(),is_active:!0,tags:["manually-approved"]});if(i)return await Q.entities.EcosystemEvent.create({title:e.name,event_type:"Partnership",event_date:e.event_date||new Date().toISOString().split("T")[0],summary:e.description,amount_usd:e.amount_usd||null,source_url:e.source_url,confidence:t>=70?"High":"Medium",status:"PENDING_ALPHA",sector:e.sector||null,tags:["manually-approved"]});throw new Error("Unrecognized finding type - cannot approve manually")};function toe({open:e,onOpenChange:t,agent:n}){const{toast:r}=zf(),[i,s]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState([]),[p,m]=P.useState(""),[v,x]=P.useState(null);P.useEffect(()=>{if(!e||!n)return;let C=!1;return(async()=>{s(!0),c(null),h([]),m("");try{let E=null;try{E=(await Q.entities.AgentRun.filter({agent_id:n.id},"-started_at",5))[0]||null}catch(k){console.error("Failed to load runs for agent findings:",k)}if(C)return;c(E);let A=[];
900if(E!=null&&E.log)try{const k=JSON.parse(E.log);A=[...k.approved||[],...k.rejected||[],...k.pending||[]]}catch(k){console.error("Parse run log failed:",k)}if(C)return;if(A.length>0)h(A),m("log");else{const[k,M]=await Promise.all([Q.entities.EcosystemInsight.filter({agent_name:n.name},"-insight_date",50).catch(()=>[]),Q.entities.EcosystemEvent.filter({agent_id:n.id},"-created_date",50).catch(()=>[])]);if(C)return;const I=(k||[]).map(V=>({name:V.title,description:V.summary,source_url:V.source_url,entity_type:V.related_entity_type||"Insight",status:"approved",confidence_score:null,_kind:"insight",_date:V.insight_date||V.created_date})),$=(M||[]).map(V=>{var H;return{name:V.title,description:V.summary,source_url:V.source_url,entity_type:"EcosystemEvent",status:(H=V.status)!=null&&H.startsWith("APPROVED")?"approved":"pending",confidence_score:null,_kind:"event",_date:V.event_date||V.created_date}}),q=[...I,...$].sort((V,H)=>new Date(H._date||0)-new Date(V._date||0));h(q),m(q.length>0?"insights":"none")}}finally{C||s(!1)}})(),()=>{C=!0}},[e,n]);const w=async(C,E)=>{x(E);try{await eoe(C),h(A=>A.map((k,M)=>M===E?{...k,status:"approved",rejection_reason:null}:k)),r({title:"Approved manually",description:`${C.name} was created and is now tracked.`})}catch(A){console.error("Manual approve failed:",A),r({variant:"destructive",title:"Ap
900proval failed",description:A.message||"Could not create the entity."})}finally{x(null)}},b=(o==null?void 0:o.items_found)??d.length,_=(o==null?void 0:o.items_approved)??d.filter(C=>C.status==="approved"||C.status==="enriched").length,j=d.filter(C=>C.status==="rejected").length;return a.jsx(Yf,{open:e,onOpenChange:t,children:a.jsxs(Pu,{className:"max-w-3xl max-h-[85vh] overflow-y-auto",children:[a.jsxs(ku,{children:[a.jsxs(Au,{className:"flex items-center gap-2",children:[a.jsx(hr,{className:"h-5 w-5 text-emerald-600"}),"Findings: ",n==null?void 0:n.name]}),a.jsx(Xf,{children:"What this agent found on its latest run - including rejected items, so you can review and manually approve."})]}),i?a.jsx("div",{className:"flex items-center justify-center py-12",children:a.jsx(ln,{className:"h-6 w-6 animate-spin text-slate-400"})}):d.length===0?a.jsx(fr,{icon:hr,title:"No findings recorded",description:"Run this agent to see what it discovers. Findings appear here with names, descriptions, and sources."}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[a.jsxs(Ce,{className:"bg-emerald-100 text-emerald-700",children:[b," found"]}),a.jsxs(Ce,{className:"bg-blue-100 text-blue-700",children:[_," approved"]}),j>0&&a.jsxs(Ce,{className:"bg-red-100 text-red-700",children:[j," rejected"]}),(o==null?void 0:o.started_at)&&a.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[a.jsx(Bn,{className:"h-3 w-3"}),Tt(new Date(o.started_at),"MMM d, h:mm a")]}),p==="insights"&&a.jsx(Ce,{variant:"outline",className:"text-amber-700 border-amber-300",children:"Reconstructed from insights/events (run log unavailable)"}),p==="log"&&j>0&&a.jsx(Ce,{variant:"outline",className:"text-slate-600 border-slate-300",children:"Full run log - rejected items included"})]}),p==="insights"&&a.jsxs("div",{className:"mb-3 p-2.5 rounded-lg bg-amber-50 border border-amber-200 text-xs text-amber-800 flex items-start gap-2",children:[a.jsx($i,{className:"h-4 w-4 shrink-0 mt-0.5"}),a.jsx("span",{children:"The run log for this agent was not saved, so only approved items (persisted as insights/events) are shown here. Rejected items from this run were not stored. Re-run the agent to capture the full list including rejected findings."})]}),a.jsx("div",{className:"space-y-2",children:d.map((C,E)=>{const A=Jse[C.entity_type]||sa,k=C.status==="rejected";return a.jsxs("div",{className:`flex items-start gap-3 p-3 rounded-lg border bg-white hover:bg-slate-50 ${k?"border-red-200 bg-red-50/30":"border-slate-200"}`,children:[a.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${k?"bg-red-100":"bg-slate-100"}`,children:a.jsx(A,{className:`h-4 w-4 ${k?"text-red-600":"text-slate-600"}`})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("p",{className:"font-medium text-slate-900 text-sm truncate",children:C.name}),a.jsx(Ce,{className:`text-xs ${Qse[C.status]||"bg-slate-100 text-slate-700"}`,children:C.status}),C.entity_type&&a.jsx(Ce,{variant:"outline",className:"text-xs",children:C.entity_type}),C.confidence_score!=null&&a.jsxs("span",{className:"text-xs text-slate-400",children:["conf: ",C.confidence_score]})]}),C.description&&a.jsx("p",{className:"text-sm text-slate-600 mt-1 line-clamp-2",children:C.description}),C.rejection_reason&&a.jsxs("p",{className:"text-xs text-red-600 mt-1 flex items-start gap-1",children:[a.jsx(nu,{className:"h-3.5 w-3.5 shrink-0 mt-0.5"}),a.jsxs("span",{children:["Rejected: ",C.rejection_reason]})]}),C.source_url&&/^https?:\/\//i.test(C.source_url)?a.jsxs("a",{href:C.source_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-emerald-600 hover:text-emerald-700 mt-1",children:[a.jsx(fa,{className:"h-3 w-3"}),"Source"]}):a.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-red-600 mt-1",children:[a.jsx($i,{className:"h-3 w-3"}),"No source - needs verification"]})]}),k&&a.jsxs(Ne,{size:"sm",variant:"outline",className:"gap-1 border-emerald-300 text-emerald-700 hover:bg-emerald-50 shrink-0",disabled:v===E,onClick:()=>w(C,E),children:[v===E?a.jsx(ln,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(t$,{className:"h-3.5 w-3.5"}),"Approve manually"]}),C.status==="approved"&&C._kind==null&&p==="log"&&a.jsx(Un,{className:"h-5 w-5 text-emerald-500 shrink-0"})]},E)})})]})]})})}function noe(){const[e,t]=P.useState([]),[n,r]=P.useState([]),[i,s]=P.useState(!0),[o,c]=P.useState(null),[d,h]=P.useState(!1),[p,m]=P.useState(null),[v,x]=P.useState(!1),[w,b]=P.useState({current:0,total:0,name:""}),[_,j]=P.useState(!1),[C,E]=P.useState(null),[A,k]=P.useState(null),[M,I]=P.useState(!1),[$,q]=P.useState(null),[V,H]=P.useState(!0);if(P.useEffect(()=>{Q.auth.me().then(Y=>q(Y)).catch(()=>q(null)).finally(()=>H(!1)),U()},[]),V)return a.jsx(Mn,{message:"Checking access..."});if(!$||$.role!=="admin")return a.jsxs("div",{className:"max-w-md mx-auto py-20 px-4 text-center",children:[a.jsx(Oi,{className:"h-12 w-12 text-slate-300 mx-auto mb-4"}),a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Admin Access Required"}),a.jsx("p",{className:"text-slate-500 mb-6",children:"The Agent Console is restricted to administrators. Agent execution is managed internally via scheduled workflows."}),a.jsx(Ne,{onClick:()=>Q.auth.redirectToLogin("/AgentConsole"),children:"Sign in as admin"})]});async function U(){try{const[Y,he]=await Promise.all([Q.entities.Agent.list(),Q.entities.AgentRun.list("-started_at",50)]),fe=Y.filter(_e=>_e.last_run_status==="running");if(fe.length>0)try{await Q.entities.Agent.bulkUpdate(fe.map(_e=>({id:_e.id,last_run_status:"failed",error_log:"Run interrupted (page reload) - auto-reset"}))),fe.forEach(_e=>{_e.last_run_status="failed"})}catch(_e){console.error("Stuck-agent reset failed:",_e)}t(Y),r(he)}catch(Y){console.error("Error loading agents:",Y)}finally{s(!1)}}const z=async Y=>{try{await Q.entities.Agent.update(Y.id,{enabled:!Y.enabled}),U()}catch(he){console.error("Error toggling agent:",he)}},Z=async()=>{const Y=e.filter(he=>he.enabled);if(Y.length!==0){x(!0),b({current:0,total:Y.length,name:""});for(let he=0;he<Y.length;he++){const fe=Y[he];b({current:he,total:Y.length,name:fe.name}),m(fe.id);try{await ee(fe,{silent:!0})}catch(_e){console.error(`Error running agent ${fe.name}:`,_e)}}b({current:Y.length,total:Y.length,name:"Quality Gate"}),await G(),x(!1),m(null),b({current:Y.length,total:Y.length,name:""}),U()}},ee=async(Y,he={})=>{const{silent:fe=!1}=he;m(Y.id);const _e=await Q.entities.AgentRun.create({agent_id:Y.id,agent_name:Y.name,started_at:new Date().toISOString(),status:"running"});await Q.entities.Agent.update(Y.id,{last_run_at:new Date().toISOString(),last_run_status:"running"});try{let de={items:[],approved:[],rejected:[],pending:[],itemsApproved:0};const we=d8(Y);we?de=await we(Y):Y.agent_type==="Collector"?de=await oe(Y):Y.agent_type==="Validator"?de=await ie(Y):Y.agent_type==="QualityControl"?de=await ae(Y):Y.agent_type==="Insight"&&(de=await K(Y));const ke=re=>({name:re.name,description:re.description,source_url:re.source_url,entity_type:re.entity_type,status:re.status,rejection_reason:re.rejection_reason||null,confidence_score:re.confidence_score??null,finding_type:re.finding_type||null,sector:re.sector||null,website:re.website||null,city:re.city||null,org_type:re.org_type||re.org_or_ministry||null,event_date:re.event_date||null,amount_usd:re.amount_usd??null});await Q.entities.AgentRun.update(_e.id,{ended_at:new Date().toISOString(),status:"success",items_found:de.items.length,items_approved:de.itemsApproved,items_rejected:(de.rejected||[]).length,new_entities:de.newEntities||0,log:JSON.stringify({approved:(de.approved||[]).map(ke),rejected:(de.rejected||[]).map(ke),pending:(de.pending||[]).map(ke)})}),await Q.entities.Agent.update(Y.id,{last_run_status:"success",last_run_items_found:de.items.length,last_run_items_approved:de.itemsApproved}),!fe&&(Y.agent_type==="Collector"||Y.agent_type==="Insight")&&de.itemsApproved>0&&G(),fe||(E({agentName:Y.name,items:de.items,approved:de.approved||[],rejected:de.rejected||[],pending:de.pending||[]}),j(!0));try{const re=await Q.entities.Agent.get(Y.id);t(Re=>Re.map(ge=>ge.id===Y.id?re:ge))}catch{}}catch(de){console.error("Error running agent:",de),await Q.entities.AgentRun.update(_e.id,{ended_at:new Date().toISOString(),status:"failed",errors:[{error:de.message,timestamp:new Date().toISOString()}]}),await Q.entities.Agent.update(Y.id,{last_run_status:"failed",error_log:de.message})}finally{fe||m(null),U()}},G=async()=>{try{const Y=await Q.entities.Agent.list(),he=Y.filter(we=>we.agent_type==="Validator"&&we.enabled),fe=["Sanity Check Agent","Dedup & Entity Resolution Agent","Agent Health Meta-Auditor","Cross-Reference & Corroboration Engine"],_e=Y.filter(we=>fe.includes(we.name)&&we.enabled),de=[...he,..._e];for(const we of de)try{await ee(we,{silent:!0})}catch(ke){console.error(`Quality gate agent "${we.name}" failed:`,ke)}}catch(Y){console.error("Quality gate failed:",Y)}},oe=async Y=>{const he=Y.target_entity_types||["Startup"];let fe=[],_e=[],de=[],we=0;const ke=jr(Y),re={},Re={Startup:["Fintech","Agritech","Healthtech","Edtech","Cleantech","Logistics","E-commerce","SaaS"],Investor:["Kenya-based venture capital funds","International VC funds investing in Kenya","Angel networks and angel investors in Kenya","Impact investors and DFIs in East Africa"],ESO:["Incubators and accelerators in Nairobi","Innovation hubs and tech hubs across Kenya","University entrepreneurship programs in Kenya","Corporate and government innovation programs"],GovProgram:["Kenya government ministries with digital transformation and AI initiatives","Kenya state departments and authorities for public service digitization (eCitizen, Huduma)","Kenya regulators enabling innovation and emerging tech (CAK, CMA, KRA)","County government innovation and smart-city programs in Kenya"],University:["Kenyan public universities with innovation hubs and incubation programs","Kenyan private universities with tech and entrepreneurship programs","Kenyan research institutions and tech transfer offices","Kenyan universities with research commercialization and spinoffs"],Donor:["DFIs and development finance institutions active in Kenya (2024-2026)","Bilateral and multilateral donors funding innovation in Kenya","Foundations and grant-making bodies supporting Kenyan startups and programs","New donor programs, grants and blended-finance facilities launched in Kenya recently"]},ge={Startup:{type:"object",properties:{startups:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},sector:{type:"string"},sub_sector:{type:"string"},founded_year:{type:"number"},city:{type:"string"},county:{type:"string"},website:{type:"string"},total_funding_usd:{type:"number"},stage:{type:"string"},founders:{type:"array",items:{type:"object",properties:{name:{type:"string"},role:{type:"string"}}}},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"},field_evidence:{type:"array",items:{type:"object",properties:{field_name:{type:"string"},evidence_snippet:{type:"string"}}}}}}}}},Investor:{type:"object",properties:{investors:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},investor_type:{type:"string"},headquarters_country:{type:"string"},kenya_office:{type:"boolean"},website:{type:"string"},investment_stages:{type:"array",items:{type:"string"}},investment_sectors:{type:"array",items:{type:"string"}},portfolio_companies:{type:"array",items:{type:"string"}},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"},field_evidence:{type:"array",items:{type:"object",properties:{field_name:{type:"string"},evidence_snippet:{type:"string"}}}}}}}}},ESO:{type:"object",properties:{esos:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},eso_type:{type:"string"},city:{type:"string"},county:{type:"string"},website:{type:"string"},founded_year:{type:"number"},focus_sectors:{type:"array",items:{type:"string"}},focus_stages:{type:"array",items:{type:"string"}},services_offered:{type:"array",items:{type:"string"}},notable_alumni:{type:"array",items:{type:"string"}},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"},field_evidence:{type:"array",items:{type:"object",properties:{field_name:{type:"string"},evidence_snippet:{type:"string"}}}}}}}}},GovProgram:{type:"object",properties:{govPrograms:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},org_type:{type:"string"},parent_ministry:{type:"string"},innovation_focus:{type:"array",items:{type:"string"}},ai_initiatives:{type:"string"},internal_efficiency_initiatives:{type:"string"},external_services_initiatives:{type:"string"},digital_services:{type:"array",items:{type:"string"}},has_online_portal:{type:"boolean"},portal_url:{type:"string"},public_accessibility_level:{type:"string"},website:{type:"string"},linkedin_url:{type:"string"},county:{type:"string"},city:{type:"string"},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"},field_evidence:{type:"array",items:{type:"object",properties:{field_name:{type:"string"},evidence_snippet:{type:"string"}}}}}}}}},University:{type:"object",properties:{universities:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},university_type:{type:"string"},established_year:{type:"number"},city:{type:"string"},county:{type:"string"},website:{type:"string"},enrollment_size:{type:"number"},tech_transfer_office:{type:"boolean"},research_focus_areas:{type:"array",items:{type:"string"}},innovation_programs:{type:"array",items:{type:"string"}},spinoff_companies:{type:"array",items:{type:"string"}},partnerships:{type:"array",items:{type:"string"}},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"},field_evidence:{type:"array",items:{type:"object",properties:{field_name:{type:"string"},evidence_snippet:{type:"string"}}}}}}}}},Donor:{type:"object",properties:{donors:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},donor_type:{type:"string"},headquarters_country:{type:"string"},kenya_office:{type:"boolean"},focus_areas:{type:"array",items:{type:"string"}},funding_instruments:{type:"array",items:{type:"string"}},focus_sectors:{type:"array",items:{type:"string"}},ticket_size_min_usd:{type:"number"},ticket_size_max_usd:{type:"number"},programs_funded:{type:"array",items:{type:"string"}},website:{type:"string"},city:{type:"string"},country:{type:"string"},source_url:{type:"string"},confidence_score:{type:"number"},evidence_snippet:{type:"string"},field_evidence:{type:"array",items:{type:"object",properties:{field_name:{type:"string"},evidence_snippet:{type:"string"}}}}}}}}}},Be={Startup:"startups",Investor:"investors",ESO:"esos",GovProgram:"govPrograms",University:"universities",Donor:"donors"};for(const Le of he){const rt=Re[Le]||["general"],Ct=ge[Le],_t=Be[Le],Gt=Y.prompt_template||`
901        Search for ${Le}s active in Kenya's innovation ecosystem, focusing on the LAST 90 DAYS of activity.
902        Prioritize NEW entities not yet widely listed, and RECENT developments (new funding, new programs, new entrants, leadership changes).
903        Find real, currently active entities with recent activity — avoid repeating the same well-known entities already in public directories.
904        Return structured data with all available information.
905        Include the source URL where you found each piece of information.
906        Rate your confidence for each entity from 0-100.
907        For each entity, also provide evidence_snippet: a SHORT direct quote or excerpt from the cited source that supports the discovery. If no direct supporting excerpt is available, return null or an empty string. Do NOT fabricate evidence.
908        For each entity, also provide field_evidence: an array of objects, each with { field_name, evidence_snippet }, where field_name is a specific field name from the entity data (e.g. "n
908ame", "founded_year", "website", "city", "county", "total_funding_usd", "headquarters_country", "kenya_office", "portal_url", "parent_ministry", "linkedin_url", "has_online_portal", "established_year", "enrollment_size", "tech_transfer_office", "country", "ticket_size_min_usd", "ticket_size_max_usd"), and evidence_snippet is a SHORT direct quote from the cited source that directly supports that specific field's value. Only include entries for fields where the source directly states or implies that value. Do NOT reuse a generic snippet for unrelated fields. If no direct evidence exists for a field, omit that field from field_evidence. Do NOT fabricate evidence.
909      `,qt=Es(ke,Le),dn=await Promise.all(rt.map(Ue=>Q.integrations.Core.InvokeLLM({prompt:`${Gt}
910
911Focus area: ${Ue} in Kenya 2024-2026. Find 8-12 real, currently active entities in this segment.${qt}`,add_context_from_internet:!0,response_json_schema:Ct}))),nn=[];dn.forEach((Ue,Et)=>{const At=(Ue[_t]||[]).map(fn=>({...fn,_segment:rt[Et]}));nn.push(...At),re[rt[Et]]={runs:1,found:At.length,approved:0}});const qe=await Q.entities[Le].list(),Oe=new Map;qe.forEach(Ue=>Oe.set(Ue.name.toLowerCase().trim(),Ue));const lt=new Set;let Ge=0;for(const Ue of nn){if(!Ue.name)continue;const Et=Ue.name.toLowerCase().trim(),At={...Ue,entity_type:Le},fn=Ue.confidence_score,Ln=Ue._segment,ga=Oe.get(Et);if(ga||lt.has(Et)){if(ga)try{Ue.source_url&&ws(Ue.source_url)&&await Q.entities[Le].update(ga.id,{last_seen_at:new Date().toISOString()}),Ue.source_url&&await Q.entities.EcosystemEvent.create({title:`${Ue.name} - recent activity`,event_type:"Partnership",event_date:new Date().toISOString().split("T")[0],summary:Ue.description||`New activity detected for ${Ue.name}`,source_url:Ue.source_url,entities_involved:[{entity_id:ga.id,entity_type:Le,entity_name:ga.name,role:"subject"}],confidence:fn>=70?"High":"Medium",status:"PENDING_ALPHA",agent_id:Y.id}),Ge++,_e.push({...At,status:"enriched"}),fe.push({...At,status:"enriched"}),Ln&&re[Ln]&&(re[Ln].approved=(re[Ln].approved||0)+1)}catch(rr){console.error("Enrichment failed:",rr)}continue}if(!(Ue.name&&(Ue.description||Ue.website||Ue.sector||Ue.investor_type||Ue.eso_type||Ue.donor_type))){de.push({...At,rejection_reason:"Incomplete data - missing description, website, and sector",status:"rejected"}),fe.push({...At,status:"rejected"});continue}const Ql=So(Ue,"create",{requireConfidence:!0,confidenceThreshold:40});if(!Ql.allowed){de.push({...At,rejection_reason:Ql.reason,status:"rejected"}),fe.push({...At,status:"rejected"});continue}const Oo={...Ue,verification_status:"AI_CAPTURED",reliability_tier:"C",reliability_score:fn,last_seen_at:new Date().toISOString(),is_active:!0};delete Oo.confidence_score;try{const rr=await Q.entities[Le].create(Oo);if(we++,lt.add(Et),Oe.set(Et,rr),Ln&&re[Ln]&&(re[Ln].approved=(re[Ln].approved||0)+1),Ue.source_url)try{const Va=await Bse({url:Ue.source_url,agentId:Y.id});Va?await Yse({item:Ue,entityType:Le,entityId:rr.id,agentId:Y.id,sourceRecord:Va,confidence:fn}):console.warn(`P2D2B: Claim creation skipped for "${Ue.name}" - Source could not be resolved (URL: ${Ue.source_url})`)}catch(Va){console.error(`P2D2B: Provenance wiring failed for "${Ue.name}":`,Va)}_e.push({...At,status:"approved"}),fe.push({...At,status:"approved"})}catch(rr){console.error(`Create ${Le} failed for "${Ue.name}":`,rr),de.push({...At,rejection_reason:`Create failed: ${rr.message||rr}`,status:"rejected"}),fe.push({...At,status:"rejected"})}}}return await Sr(Y,ke,{found:fe.length,approved:_e.length,newEntities:we,approvedItems:_e},re),{items:fe,approved:_e,rejected:de,pending:[],itemsApproved:_e.length,newEntities:we}},W=async Y=>{const he=jr(Y),fe=await Q.entities.PublicSubmission.filter({status:"pending"},"-created_date",30);let _e=[],de=[],we=[];for(const re of fe){let Re;try{Re=await Q.integrations.Core.InvokeLLM({prompt:`Verify this community submission to the Kenya Innovation Ecosystem portal.
912
913Submitter role: ${re.submitter_role}
914Category: ${re.category}
915Entity type: ${re.entity_type}
916Entity name: ${re.entity_name}
917Title: ${re.title}
918Description: ${re.description}
919Source URL: ${re.source_url||"Not provided"}
920
921Assess whether this submission describes a real, credible entity/initiative. Search the web to corroborate.
922Flag: fabricated/spam, unverifiable, or credible. Provide rationale and any issues.`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{is_valid:{type:"boolean"},confidence:{type:"string",enum:["High","Medium","Low"]},rationale:{type:"string"},issues:{type:"array",items:{type:"string"}}}}})}catch(Be){console.error("Validation LLM error:",Be),Re={is_valid:!1,confidence:"Low",rationale:"Validation failed: "+Be.message,issues:["llm_error"]}}
922const ge={name:re.title,description:re.description,source_url:re.source_url,entity_type:"PublicSubmission",status:Re.is_valid?"approved":"rejected",rejection_reason:Re.is_valid?"":Re.rationale};if(Re.is_valid&&Re.confidence!=="Low"){try{await Q.entities.VerificationRequest.create({entity_id:re.id,entity_type:re.entity_type||"Other",entity_name:re.entity_name||re.title,request_type:"ALPHA_REVIEW",status:"pending",priority:re.priority||"medium",summary:`${re.title}: ${re.description}`,ai_recommendation:"needs_review",ai_rationale:Re.rationale,ai_confidence:Re.confidence==="High"?90:Re.confidence==="Medium"?60:30,issues_flagged:(Re.issues||[]).map(Be=>({type:"submission",description:Be,severity:"medium"}))})}catch(Be){console.error("Error creating verification request:",Be)}await Q.entities.PublicSubmission.update(re.id,{status:"reviewing",ai_validation:Re}),_e.push(ge)}else await Q.entities.PublicSubmission.update(re.id,{status:"rejected",ai_validation:Re}),de.push(ge)}const ke=[..._e,...de,...we];return await Sr(Y,he,{found:fe.length,approved:_e.length,newEntities:0,approvedItems:_e},{public_submissions:{runs:1,found:fe.length,approved:_e.length}}),{items:ke,approved:_e,rejected:de,pending:we,itemsApproved:_e.length}},ie=async Y=>{var re,Re;const he=jr(Y);if((Y.target_entity_types||[]).includes("PublicSubmission"))return await W(Y);const fe=await Q.entities.Claim.filter({status:"PENDING_ALPHA"},"-created_date",20);let _e=[],de=[],we=[];for(const ge of fe){const Be=await Q.integrations.Core.InvokeLLM({prompt:`
923          Review this claim about a ${ge.entity_type}:
924          Field: ${ge.field_name}
925          Value: ${ge.field_value}
926          Source: ${ge.source_url||"Unknown"}
927          
928          Verify if this information appears credible and consistent.
929          Check if the source seems reliable.
930          
931          Respond with your assessment.
932        `,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{is_valid:{type:"boolean"},confidence:{type:"string",enum:["High","Medium","Low"]},rationale:{type:"string"},issues:{type:"array",items:{type:"string"}}}}}),Le={name:`Claim: ${ge.field_name}`,description:(re=ge.field_value)==null?void 0:re.substring(0,200),source_url:ge.source_url,entity_type:ge.entity_type};Be.is_valid&&Be.confidence!=="Low"?(await Q.entities.Claim.update(ge.id,{status:"APPROVED_ALPHA",confidence:Be.confidence,review_notes:Be.rationale}),_e.push({...Le,status:"approved"})):Be.is_valid?(await Q.entities.Claim.update(ge.id,{status:"PENDING_ACTOR",confidence:Be.confidence,review_notes:Be.rationale}),we.push({...Le,status:"pending"})):(await Q.entities.Claim.update(ge.id,{status:"REJECTED",confidence:Be.confidence,review_notes:Be.rationale}),de.push({...Le,status:"rejected",rejection_reason:Be.rationale||((Re=Be.issues)==null?void 0:Re.join(", "))||"Failed validation"}))}const ke=[..._e,...de,...we];return await Sr(Y,he,{found:fe.length,approved:_e.length,newEntities:0,approvedItems:_e},{claims_validation:{runs:1,found:fe.length,approved:_e.length}}),{items:ke,approved:_e,rejected:de,pending:we,itemsApproved:_e.length}},ae=async Y=>{const he=jr(Y);let fe=[],_e=[];const de=new Date;de.setMonth(de.getMonth()-3);const we=await Q.entities.Startup.filter({});for(const Re of we)(!Re.last_seen_at||new Date(Re.last_seen_at)<de)&&(await Q.entities.DataQualityIssue.create({issue_type:"stale",severity:"medium",entity_type:"Startup",entity_ids:[Re.id],entity_names:[Re.name],description:`Startup "${Re.name}" has not been updated in over 3 months`,detected_at:new Date().toISOString(),detected_by:Y.name}),_e.push({name:Re.name,description:Re.description,entity_type:"Startup",status:"rejected",rejection_reason:"Stale data - not updated in over 3 months"}));const ke=await Q.entities.Startup.filter({});for(const Re of ke){const ge=[];Re.sector||ge.push("sector"),Re.website||ge.push("website"),Re.description||ge.push("description"),ge.length>=2&&(await Q.entities.DataQualityIssue.create({issue_type:"missing_fields",severity:ge.length>=3?"high":"medium",entity_type:"Startup",entity_ids:[Re.id],entity_names:[Re.name],description:`Startup "${Re.name}" is missing: ${ge.join(", ")}`,details:{missing_fields:ge},detected_at:new Date().toISOString(),detected_by:Y.name}),_e.push({name:Re.name,description:Re.description,entity_type:"Startup",status:"rejected",rejection_reason:`Missing fields: ${ge.join(", ")}`}))}const re=[...fe,..._e];return await Sr(Y,he,{found:re.length,approved:0,newEntities:0,approvedItems:[]},{data_quality:{runs:1,found:re.length,approved:0}}),{items:re,approved:fe,rejected:_e,pending:[],itemsApproved:0}},K=async Y=>{var Re;const he=jr(Y),[fe,_e,de]=await Promise.all([Q.entities.Startup.list(),Q.entities.Investor.list(),Q.entities.ESO.list()]),we=Y.prompt_template&&Y.prompt_template.trim().length>20?`${Y.prompt_template}
933
934Context: ${fe.length} startups, ${_e.length} investors, ${de.length} support organizations. Recent startups: ${fe.slice(0,10).map(ge=>ge.name).join(", ")}
934. Search for recent Kenya startup ecosystem news 2025-2026 to supplement.`:`
935        Analyze Kenya's startup ecosystem based on this data:
936        - ${fe.length} startups
937        - ${_e.length} investors  
938        - ${de.length} support organizations
939        
940        Recent startups: ${fe.slice(0,10).map(ge=>ge.name).join(", ")}
941        
942        Generate insights about:
943        1. Trending sectors
944        2. Funding patterns
945        3. Geographic distribution
946        4. Key ecosystem developments
947        
948        Search for recent news about Kenya startup ecosystem 2025 2026 to supplement.
949      `,ke=await Q.integrations.Core.InvokeLLM({prompt:we,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{highlights:{type:"array",items:{type:"string"}},trending_sectors:{type:"array",items:{type:"string"}},key_developments:{type:"array",items:{type:"string"}},recommendations:{type:"array",items:{type:"string"}}}}});await Q.entities.Report.create({title:`Ecosystem Insights - ${new Date().toLocaleDateString()}`,report_type:"custom",period_start:new Date().toISOString().split("T")[0],period_end:new Date().toISOString().split("T")[0],generated_at:new Date().toISOString(),status:"ready",highlights:ke.highlights||[],executive_summary:((Re=ke.key_developments)==null?void 0:Re.join(`
950`))||"No insights generated"});const re=(ke.highlights||[]).map(ge=>({name:ge.substring(0,50)+"...",description:ge,entity_type:"Insight",status:"approved"}));return await Sr(Y,he,{found:re.length,approved:re.length,newEntities:0,approvedItems:re},{insights:{runs:1,found:re.length,approved:re.length}}),{items:re,approved:re,rejected:[],pending:[],itemsApproved:re.length}},ne=async()=>{try{o.id?await Q.entities.Agent.update(o.id,o):await Q.entities.Agent.create(o),h(!1),c(null),U()}catch(Y){console.error("Error saving agent:",Y)}},ve=Y=>Y==="success"?a.jsx(Un,{className:"h-4 w-4 text-emerald-600"}):Y==="failed"?a.jsx(nu,{className:"h-4 w-4 text-red-600"}):Y==="partial"?a.jsx($i,{className:"h-4 w-4 text-amber-600"}):Y==="running"?a.jsx(ln,{className:"h-4 w-4 text-blue-600 animate-spin"}):a.jsx(Bn,{className:"h-4 w-4 text-slate-400"}),je=Y=>{const he={Collector:"bg-blue-100 text-blue-700",Validator:"bg-emerald-100 text-emerald-700",QualityControl:"bg-amber-100 text-amber-700",Insight:"bg-purple-100 text-purple-700"};return he[Y]||he.Collector};return i?a.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading agents..."})}):a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Agent Console"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Configure and manage data collection agents"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(Ne,{className:"gap-2",variant:"outline",disabled:v||e.filter(Y=>Y.enabled).length===0,onClick:Z,children:[v?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(Tv,{className:"h-4 w-4"}),v?`Running ${w.current}/${w.total}...`:"Run All Agents"]}),a.jsxs(Ne,{className:"bg-emerald-600 hover:bg-emerald-700 gap-2",onClick:()=>{c({name:"",agent_type:"Collector",role:"",objective:"",prompt_template:"",enabled:!0}),h(!0)},children:[a.jsx(Um,{className:"h-4 w-4"}),"New Agent"]})]})]}),a.jsxs("div",{className:"flex items-center justify-between gap-3 bg-blue-50 border border-blue-200 rounded-xl px-4 py-3 mb-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-100 flex items-center justify-center shrink-0",children:a.jsx(Tv,{className:"h-4 w-4 text-blue-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-slate-800",children:"Weekly automated scan configured"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Enabled collector agents are scheduled weekly. Execution requires a scheduled workflow (Dashboard → Workflows, Builder+) and active integration credits."})]})]}),a.jsxs(Ce,{className:"bg-blue-100 text-blue-700 border-0 shrink-0",children:[e.filter(Y=>Y.enabled&&Y.schedule_cron).length," / ",e.filter(Y=>Y.enabled).length," scheduled"]})]}),a.jsxs(Ns,{defaultValue:"agents",children:[a.jsxs(qa,{className:"mb-6",children:[a.jsxs(Ut,{value:"agents",className:"gap-2",children:[a.jsx(Oi,{className:"h-4 w-4"}),"Agents (",e.length,")"]}),a.jsxs(Ut,{value:"runs",className:"gap-2",children:[a.jsx(Bn,{className:"h-4 w-4"}),"Run History"]})]}),a.jsx(cn,{value:"agents",children:e.length===0?a.jsx(fr,{icon:Oi,title:"No agents configured",description:"Create your first agent to start collecting data"}):a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:e.map(Y=>{var he;return a.jsx(Ee,{className:"hover:shadow-md transition-shadow",children:a.jsxs($e,{className:"p-5",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`w-10 h-10 rounded-xl ${je(Y.agent_type)} flex items-center justify-center`,children:a.jsx(Oi,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900",children:Y.name}),a.jsx("p",{className:"text-sm text-slate-500",children:Y.role})]})]}
950),a.jsx($c,{checked:Y.enabled,onCheckedChange:()=>z(Y)})]}),a.jsx("p",{className:"text-sm text-slate-600 mb-4 line-clamp-2",children:Y.objective}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsx(Ce,{className:je(Y.agent_type),children:Y.agent_type}),(he=Y.target_entity_types)==null?void 0:he.map(fe=>a.jsx(Ce,{variant:"outline",children:fe},fe)),Y.schedule_description&&a.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[a.jsx(Bn,{className:"h-3 w-3"}),Y.schedule_description]})]}),Y.last_run_at&&a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500 mb-3",children:[ve(Y.last_run_status),a.jsxs("span",{children:["Last run: ",Tt(new Date(Y.last_run_at),"MMM d, h:mm a")]}),Y.last_run_items_found!==void 0&&a.jsxs("button",{onClick:()=>{k(Y),I(!0)},className:"inline-flex items-center gap-1 text-emerald-600 hover:text-emerald-700 hover:underline font-medium",title:"View what was found",children:["• ",Y.last_run_items_found," found, ",Y.last_run_items_approved," approved"]})]}),a.jsx(Xse,{agent:Y}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(Ne,{variant:"outline",size:"sm",onClick:()=>{c(Y),h(!0)},className:"gap-1",children:[a.jsx(SV,{className:"h-4 w-4"}),"Edit"]}),a.jsxs(Ne,{size:"sm",disabled:!Y.enabled||p===Y.id||v,onClick:()=>ee(Y),className:"gap-1 bg-emerald-600 hover:bg-emerald-700",children:[p===Y.id?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(EV,{className:"h-4 w-4"}),"Run Now"]})]})]})},Y.id)})})}),a.jsx(cn,{value:"runs",children:a.jsx(Ee,{children:a.jsx($e,{className:"p-0",children:n.length===0?a.jsx("div",{className:"p-8",children:a.jsx(fr,{icon:Bn,title:"No run history",description:"Agent runs will appear here"})}):a.jsx("div",{className:"divide-y",children:n.map(Y=>a.jsxs("div",{className:"p-4 flex items-center justify-between hover:bg-slate-50 cursor-pointer",onClick:()=>{const he=e.find(fe=>fe.id===Y.agent_id)||{id:Y.agent_id,name:Y.agent_name};k(he),I(!0)},children:[a.jsxs("div",{className:"flex items-center gap-4",children:[ve(Y.status),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:Y.agent_name}),a.jsx("p",{className:"text-sm text-slate-500",children:Y.started_at&&Tt(new Date(Y.started_at),"MMM d, yyyy h:mm a")})]})]}),a.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[Y.items_found!==void 0&&a.jsxs("span",{className:"text-slate-500",children:[Y.items_found," found • ",Y.items_approved||0," approved"]}),a.jsx(Ce,{variant:"secondary",children:Y.status})]})]},Y.id))})})})})]}),a.jsx(Yf,{open:d,onOpenChange:h,children:a.jsxs(Pu,{className:"max-w-2xl",children:[a.jsxs(ku,{children:[a.jsx(Au,{children:o!=null&&o.id?"Edit Agent":"Create New Agent"}),a.jsx(Xf,{children:"Configure the agent's behavior and data collection settings"})]}),o&&a.jsxs("div",{className:"space-y-4 py-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Name"}),a.jsx(Wt,{value:o.name,onChange:Y=>c({...o,name:Y.target.value}),placeholder:"Startup Collector"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Type"}),a.jsxs(oo,{value:o.agent_type,onValueChange:Y=>c({...o,agent_type:Y}),children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsxs(ds,{children:[a.jsx(Pn,{value:"Collector",children:"Collector"}),a.jsx(Pn,{value:"Validator",children:"Validator"}),a.jsx(Pn,{value:"QualityControl",children:"Quality Control"}),a.jsx(Pn,{value:"Insight",children:"Insight"})]})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Role"}),a.jsx(Wt,{value:o.role,onChange:Y=>c({...o,role:Y.target.value}),placeholder:"Collects startup data from news and official sources"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Objective"}),a.jsx(bo,{value:o.objective,onChange:Y=>c({...o,objective:Y.target.value}),placeholder:"Continuously monitor and extract startup information...",rows:2})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Prompt Template"}),a.jsx(bo,{value:o.prompt_template,onChange:Y=>c({...o,prompt_template:Y.target.value}),placeholder:"Extract the following information from the source...",rows:4,className:"font-mono text-sm"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Schedule"}),a.jsx(Wt,{value:o.schedule_cron||"",onChange:Y=>c({...o,schedule_cron:Y.target.value}),placeholder:"0 */6 * * *"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Schedule Description"}),a.jsx(Wt,{value:o.schedule_description||"",onChange:Y=>c({...o,schedule_description:Y.target.value}),placeholder:"Every 6 hours"})]})]})]}),a.jsxs(tg,{children:[a.jsx(Ne,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),a.jsx(Ne,{onClick:ne,className:"bg-emerald-600 hover:bg-emerald-700",children:"Save Agent"})]})]})}),a.jsx(tne,{open:_,onOpenChange:j,runData:C,onRefresh:U}),a.jsx(toe,{open:M,onOpenChange:I,agent:A})]})}function roe(){return a.jsx(Jm,{redirectTo:"/DataQuality",children:a.jsx(ioe,{})})}function ioe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState("all");P.useEffect(()=>{o()},[]);const o=async()=>{try{const x=await Q.entities.DataQualityIssue.filter({status:"open"},"-created_date",100);t(x)}catch(x){console.error("Error loading issues:",x)}finally{r(!1)}},c=async x=>{try{await Q.entities.DataQualityIssue.update(x.id,{status:"resolved",resolved_at:new Date().toISOString()}),o()}catch(w){console.error("Error resolving issue:",w)}},d=async x=>{try{await Q.entities.DataQualityIssue.update(x.id,{status:"dismissed",resolved_at:new Date().toISOString()}),o()}catch(w){console.error("Error dismissing issue:",w)}},h={duplicate:{icon:n0,color:"bg-purple-100 text-purple-600",label:"Duplicate"},conflict:{icon:$i,color:"bg-red-100 text-red-600",label:"Conflict"}
950,stale:{icon:Bn,color:"bg-amber-100 text-amber-600",label:"Stale"},missing_fields:{icon:CW,color:"bg-blue-100 text-blue-600",label:"Missing Fields"},suspicious_metric:{icon:po,color:"bg-orange-100 text-orange-600",label:"Suspicious"},thin_source:{icon:Q3,color:"bg-slate-100 text-slate-600",label:"Thin Source"}},p={critical:"bg-red-100 text-red-700 border-red-200",high:"bg-orange-100 text-orange-700 border-orange-200",medium:"bg-amber-100 text-amber-700 border-amber-200",low:"bg-green-100 text-green-700 border-green-200"},m=i==="all"?e:e.filter(x=>x.issue_type===i),v=e.reduce((x,w)=>(x[w.issue_type]=(x[w.issue_type]||0)+1,x),{});return n?a.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading data quality issues..."})}):a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsx("div",{className:"flex items-center justify-between mb-6",children:a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Data Quality Dashboard"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Monitor and resolve data quality issues"})]})}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:Object.entries(h).map(([x,w])=>{const b=w.icon,_=v[x]||0;return a.jsx(Ee,{className:`cursor-pointer transition-all ${i===x?"ring-2 ring-emerald-500":""}`,onClick:()=>s(x),children:a.jsxs($e,{className:"p-4 flex items-center gap-3",children:[a.jsx("div",{className:`w-10 h-10 rounded-lg ${w.color} flex items-center justify-center`,children:a.jsx(b,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xl font-bold text-slate-900",children:_}),a.jsx("p",{className:"text-xs text-slate-500",children:w.label})]})]})},x)})}),a.jsxs(Ns,{value:i,onValueChange:s,children:[a.jsxs(qa,{className:"mb-6",children:[a.jsxs(Ut,{value:"all",children:["All Issues",a.jsx(Ce,{variant:"secondary",className:"ml-2",children:e.length})]}),a.jsx(Ut,{value:"duplicate",children:"Duplicates"}),a.jsx(Ut,{value:"conflict",children:"Conflicts"}),a.jsx(Ut,{value:"stale",children:"Stale"}),a.jsx(Ut,{value:"missing_fields",children:"Missing Fields"})]}),a.jsx(cn,{value:i,children:m.length===0?a.jsx(fr,{icon:Un,title:"No issues found",description:"All data quality checks passed"}):a.jsx("div",{className:"space-y-3",children:m.map(x=>{var _;const w=h[x.issue_type]||h.duplicate,b=w.icon;return a.jsx(Ee,{children:a.jsx($e,{className:"p-4",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:`w-10 h-10 rounded-lg ${w.color} flex items-center justify-center flex-shrink-0`,children:a.jsx(b,{className:"h-5 w-5"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900",children:x.description}),((_=x.entity_names)==null?void 0:_.length)>0&&a.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:["Entities: ",x.entity_names.join(", ")]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ce,{variant:"outline",className:p[x.severity],children:x.severity}),a.jsx(Ce,{variant:"secondary",children:x.entity_type})]})]}),x.details&&a.jsx("div",{className:"mt-3 p-3 bg-slate-50 rounded-lg text-sm text-slate-600",children:a.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:JSON.stringify(x.details,null,2)})}),a.jsxs("div",{className:"flex items-center justify-between mt-4",children:[a.jsxs("span",{className:"text-xs text-slate-400",children:["Detected ",x.detected_at?Tt(new Date(x.detected_at),"MMM d, yyyy"):"recently",x.detected_by&&` by ${x.detected_by}`]}),a.jsxs("div",{className:"flex items-center gap-2",children:[x.issue_type==="duplicate"&&a.jsxs(Ne,{size:"sm",variant:"outline",className:"gap-1",children:[a.jsx(fV,{className:"h-4 w-4"}),"Merge"]}),a.jsxs(Ne,{size:"sm",variant:"outline",onClick:()=>d(x),children:[a.jsx(nu,{className:"h-4 w-4 mr-1"}),"Dismiss"]}),a.jsxs(Ne,{size:"sm",className:"bg-emerald-600 hover:bg-emerald-700",onClick:()=>c(x),children:[a.jsx(Un,{className:"h-4 w-4 mr-1"}),"Resolve"]})]})]})]})]})})},x.id)})})})]})]})}function ot(e){return"/"+e.replace(/ /g,"-")}var[I0]=Bi("Tooltip",[ql]),L0=ql(),h8="TooltipProvider",aoe=700,RC="tooltip.open",[soe,eP]=I0(h8),p8=e=>{const{__scopeTooltip:t,delayDuration:n=aoe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,o=P.useRef(!0),c=P.useRef(!1),d=P.useRef(0);return P.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),a.jsx(soe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:P.useCallback(()=>{window.clearTimeout(d.current),o.current=!1},[]),onClose:P.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>
vendor: 5,307 bytes, line 950
950o.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:P.useCallback(h=>{c.current=h},[]),disableHoverableContent:i,children:s})};p8.displayName=h8;var Xp="Tooltip",[ooe,ig]=I0(Xp),m8=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:o,delayDuration:c}=e,d=eP(Xp,e.__scopeTooltip),h=L0(t),[p,m]=P.useState(null),v=Ia(),x=P.useRef(0),w=o??d.disableHoverableContent,b=c??d.delayDuration,_=P.useRef(!1),[j,C]=xs({prop:r,defaultProp:i??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(RC))):d.onClose(),s==null||s(I)},caller:Xp}),E=P.useMemo(()=>j?_.current?"delayed-open":"instant-open":"closed",[j]),A=P.useCallback(()=>{window.clearTimeout(x.current),x.current=0,_.current=!1,C(!0)},[C]),k=P.useCallback(()=>{window.clearTimeout(x.current),x.current=0,C(!1)},[C]),M=P.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{_.current=!0,C(!0),x.current=0},b)},[b,C]);return P.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),a.jsx(P0,{...h,children:a.jsx(ooe,{scope:t,contentId:v,open:j,stateAttribute:E,trigger:p,onTriggerChange:m,onTriggerEnter:P.useCallback(()=>{d.isOpenDelayedRef.current?M():A()},[d.isOpenDelayedRef,M,A]),onTriggerLeave:P.useCallback(()=>{w?k():(window.clearTimeout(x.current),x.current=0)},[k,w]),onOpen:A,onClose:k,disableHoverableContent:w,children:n})})};m8.displayName=Xp;var IC="TooltipTrigger",g8=P.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ig(IC,n),s=eP(IC,n),o=L0(n),c=P.useRef(null),d=Bt(t,c,i.onTriggerChange),h=P.useRef(!1),p=P.useRef(!1),m=P.useCallback(()=>h.current=!1,[]);return P.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),a.jsx(k0,{asChild:!0,...o,children:a.jsx(vt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:d,onPointerMove:He(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:He(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:He(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:He(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:He(e.onBlur,i.onClose),onClick:He(e.onClick,i.onClose)})})});g8.displayName=IC;var tP="TooltipPortal",[loe,coe]=I0(tP,{forceMount:void 0}),y8=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,s=ig(tP,t);return a.jsx(loe,{scope:t,forceMount:n,children:a.jsx(zi,{present:n||s.open,children:a.jsx(eg,{asChild:!0,container:i,children:r})})})};y8.displayName=tP;var hf="TooltipContent",v8=P.forwardRef((e,t)=>{const n=coe(hf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=ig(hf,e.__scopeTooltip);return a.jsx(zi,{present:r||o.open,children:o.disableHoverableContent?a.jsx(x8,{side:i,...s,ref:t}):a.jsx(uoe,{side:i,...s,ref:t})})}),uoe=P.forwardRef((e,t)=>{const n=ig(hf,e.__scopeTooltip),r=eP(hf,e.__scopeTooltip),i=P.useRef(null),s=Bt(t,i),[o,c]=P.useState(null),{trigger:d,onClose:h}=n,p=i.current,{onPointerInTransitChange:m}=r,v=P.useCallback(()=>{c(null),m(!1)},[m]),x=P.useCallback((w,b)=>{const _=w.currentTarget,j={x:w.clientX,y:w.clientY},C=moe(j,_.getBoundingClientRect()),E=goe(j,C),A=yoe(b.getBoundingClientRect()),k=xoe([...E,...A]);c(k),m(!0)},[m]);return P.useEffect(()=>()=>v(),[v]),P.useEffect(()=>{if(d&&p){const w=_=>x(_,p),b=_=>x(_,d);return d.addEventListener("pointerleave",w),p.addEventListener("pointerleave",b),()=>{d.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",b)}}},[d,p,x,v]),P.useEffect(()=>{if(o){const w=b=>{const _=b.target,j={x:b.clientX,y:b.clientY},C=(d==null?void 0:d.contains(_))||(p==null?void 0:p.contains(_)),E=!voe(j,o);C?v():E&&(v(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,p,o,h,v]),a.jsx(x8,{...e,ref:s})}),[doe,foe]=I0(Xp,{isInside:!1}),hoe=ree("TooltipContent"),x8=P.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...c}=e,d=ig(hf,n),h=L0(n),{onClose:p}=d;return P.useEffect(()=>(document.addEventListener(RC,p),()=>document.removeEventListener(RC,p)),[p]),P.useEffect(()=>{if(d.trigger){const m=v=>{const x=v.target;x!=null&&x.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),a.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:a.jsxs(A0,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(hoe,{children:r}),a.jsx(doe,{scope:n,isInside:!0,children:a.jsx(Jie,{id:d.contentId,role:"tooltip",children:i||r})})]})})});v8.displayName=hf;var b8="TooltipArrow",poe=P.forwardRef((e,t)=>
950{const{__scopeTooltip:n,...r}=e,i=L0(n);return foe(b8,n).isInside?null:a.jsx(O0,{...i,...r,ref:t})});poe.displayName=b8;function moe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function goe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function yoe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function voe(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const c=t[s],d=t[o],h=c.x,p=c.y,m=d.x,v=d.y;p>r!=v>r&&n<(m-h)*(r-p)/(v-p)+h&&(i=!i)}return i}function xoe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),boe(t)}function boe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var _oe=p8,woe=m8,joe=g8,Soe=y8,_8=v8;const Noe=_oe,Coe=woe,Eoe=joe,w8=P.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(Soe,{children:a.jsx(_8,{ref:r,sideOffset:t,className:ze("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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),...n})}));w8.displayName=_8.displayName;const cM={A:{label:"Intelligence Officer Validated",icon:ha,className:"bg-emerald-100 text-emerald-700 border-emerald-200",description:"Verified by an Intelligence Officer - highest trust level"},B:{label:"Actor Confirmed",icon:pi,className:"bg-blue-100 text-blue-700 border-blue-200",description:"Confirmed by the organization/actor"},C:{label:"OSINT Captured",icon:i0,className:"bg-amber-100 text-amber-700 border-amber-200",description:"Collected from open sources - pending verification"}};function Li({tier:e,score:t,showScore:n=!1,size:r="default"}){const i=cM[e]||cM.C,s=i.icon;return a.jsx(Noe,{children:a.jsxs(Coe,{children:[a.jsx(Eoe,{asChild:!0,children:a.jsxs(Ce,{variant:"outline",className:ze(i.className,r==="sm"&&"text-xs px-1.5 py-0",r==="lg"&&"text-sm px-3 py-1"),children:[a.jsx(s,{className:ze("mr-1",r==="sm"&&"h-3 w-3",r==="default"&&"h-3.5 w-3.5",r==="lg"&&"h-4 w-4")}),"Tier ",e,n&&t!==void 0&&a.jsxs("span",{className:"ml-1 opacity-70",children:["(",t,")"]})]})}),a.jsxs(w8,{children:[a.jsx("p",{className:"font-medium",children:i.label}),a.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:i.description})]})]})})}const Poe={UNVERIFIED:{label:"Unverified",className:"bg-slate-100 text-slate-600"},AI_CAPTURED:{label:"AI Captured",className:"bg-purple-100 text-purple-700"},ACTOR_CONFIRMED:{label:"Actor Confirmed",className:"bg-blue-100 text-blue-700"},KENIA_VALIDATED:{label:"Intelligence Officer Validated",className:"bg-emerald-100 text-emerald-700"},PENDING_ALPHA:{label:"Pending Review",className:"bg-amber-100 text-amber-700"},REJECTED:{label:"Rejected",className:"bg-red-100 text-red-700"},APPROVED_ALPHA:{label:"Alpha Approved",className:"bg-teal-100 text-teal-700"},PENDING_ACTOR:{label:"Pending Actor",className:"bg-orange-100 text-orange-700"},APPROVED_ACTOR:{label:"Actor Approved",className:"bg-blue-100 text-blue-700"},PENDING_KENIA:{label:"Pending IO Review",className:"bg-indigo-100 text-indigo-700"},APPROVED_KENIA:{label:"IO Approved",className:"bg-emerald-100 text-emerald-700"}};function gu({status:e,size:t="default"}){const n=Poe[e]||{label:e,className:"bg-slate-100 text-slate-600"};return a.jsx(Ce,{variant:"secondary",className:ze(n.className,t==="sm"&&"text-xs px-1.5 py-0"),children:n.label})}function D0(){const[e,t]=P.useState(!1),[n,r]=P.useState(!0);return P.useEffect(()=>{let s=!0;return Q.auth.isAuthenticated().then(o=>{s&&(t(!!o),r(!1))}).catch(()=>{s&&(t(!1),r(!1))}),()=>{s=!1}},[]),{isSignedIn:e,loading:n,signIn:()=>Q.auth.redirectToLogin(window.location.pathname+window.location.search)}}function Qp({icon:e,value:t,label:n="Sign in to view"}){const{isSignedIn:r,loading:i,signIn:s}=D0();return i?null:r?a.jsxs("div",{className:"flex items-center gap-3",children:[e&&a.jsx(e,{className:"h-5 w-5 text-slate-400"}),a.jsx("span",{children:t})]}):a.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-3 text-slate-400 hover:text-emerald-600 transition-colors",children:[e&&a.jsx(e,{className:"h-5 w-5"}),a.jsxs("span",{className:"flex items-center gap-1 text-sm",children:[a.jsx(Tl,{className:"h-3.5 w-3.5"}),n]})]})}function koe(){var m,v,x,w,b,_,j,C,E,A;const[e,t]=P.useState(null),[n,r]=P.useState([]),[i,s]=P.useState(!0),[o,c]=P.useState(!1),h=new URLSearchParams(window.location.search).get("id");P.useEffect(()=>{Q.auth.me().then(k=>c((k==null?void 0:k.role)==="admin")).catch(()=>c(!1)),h&&p()}
950,[h]);const p=async()=>{try{const[k,M]=await Promise.all([Q.entities.ESO.filter({id:h}),Q.entities.Claim.filter({entity_id:h,entity_type:"ESO"})]);k.length>0&&t(k[0]),r(M)}catch(k){console.error("Error loading ESO:",k)}finally{s(!1)}};return i?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading ESO details..."})}):!e||!Dr(e,o)?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx("p",{className:"text-center text-slate-500",children:"ESO not found"})}):a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs(yt,{to:ot("ESOs"),className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[a.jsx(e0,{className:"h-4 w-4"}),"Back to ESOs"]}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 mb-8",children:[a.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.logo_url?a.jsx("img",{src:e.logo_url,alt:e.name,className:"w-20 h-20 rounded-2xl object-cover"}):a.jsx("div",{className:"w-20 h-20 rounded-2xl bg-gradient-to-br from-purple-400 to-pink-500 flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-2xl",children:((m=e.name)==null?void 0:m[0])||"?"})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:e.name}),a.jsx(Li,{tier:e.reliability_tier||"C",showScore:!0,score:e.reliability_score})]}),a.jsx("p",{className:"text-slate-600 mt-2",children:e.description}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-4",children:[e.eso_type&&a.jsx(Ce,{className:"bg-purple-100 text-purple-700",children:e.eso_type}),a.jsx(gu,{status:e.verification_status,size:"sm"})]})]})]}),a.jsxs("div",{className:"flex gap-4",children:[e.total_startups_supported&&a.jsxs(Ee,{className:"px-4 py-3 bg-purple-50 border-purple-100",children:[a.jsx("p",{className:"text-xs text-purple-600 font-medium",children:"Startups Supported"}),a.jsx("p",{className:"text-xl font-bold text-purple-700",children:e.total_startups_supported})]}),e.active_portfolio_count&&a.jsxs(Ee,{className:"px-4 py-3 bg-pink-50 border-pink-100",children:[a.jsx("p",{className:"text-xs text-pink-600 font-medium",children:"Active Portfolio"}),a.jsx("p",{className:"text-xl font-bold text-pink-700",children:e.active_portfolio_count})]})]})]}),a.jsxs(Ns,{defaultValue:"overview",className:"space-y-6",children:[a.jsxs(qa,{children:[a.jsx(Ut,{value:"overview",children:"Overview"}),a.jsx(Ut,{value:"programs",children:"Programs"}),a.jsxs(Ut,{value:"sources",children:["Sources (",n.length,")"]})]}),a.jsx(cn,{value:"overview",className:"space-y-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Organization Details"})}),a.jsxs($e,{className:"space-y-4",children:[e.founded_year&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(ho,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Founded"}),a.jsx("p",{className:"font-medium",children:e.founded_year})]})]}),(e.county||e.city)&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Cu,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Location"}),a.jsx("p",{className:"font-medium",children:[e.city,e.county,e.country].filter(Boolean).join(", ")})]})]}),((v=e.focus_sectors)==null?void 0:v.length)>0&&a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Rv,{className:"h-5 w-5 text-slate-400 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Focus Sectors"}),a.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.focus_sectors.map(k=>a.jsx(Ce,{variant:"secondary",className:"text-xs",children:k},k))})]})]}),((x=e.focus_stages)==null?void 0:x.length)>0&&a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Up,{className:"h-5 w-5 text-slate-400 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Focus Stages"}),a.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.focus_stages.map(k=>a.jsx(Ce,{variant:"outline",className:"text-xs",children:k},k))})]})]})]})]}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Contact & Links"})}),a.jsxs($e,{className:"space-y-4",children:[e.website&&a.jsxs("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(ou,{className:"h-5 w-5"}),e.website]}),e.linkedin_url&&a.jsxs("a",{href:e.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(zp,{className:"h-5 w-5"}),"LinkedIn"]}),e.contact_email&&a.jsx(Qp,{icon:Nu,value:e.contact_email,label:"Sign in to view email"}),e.contact_phone&&a.jsx(Qp,{icon:p2,value:e.contact_phone,label:"Sign in to view phone"})]})]}),((w=e.services_offered)==null?void 0:w.length)>0&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Services Offered"})}),a.jsx($e,{children:a.jsx("div",{className:"flex flex-wrap gap-2",children:e.services_offered.map(k=>a.jsx(Ce,{variant:"secondary",children:k},k))})})]}),(((b=e.partners)==null?void 0:b.length)>0||((_=e.funding_partners)==null?void 0:_.length)>0)&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Partners & Funders"})}),a.jsxs($e,{className:"space-y-4",children:[((j=e.partners)==null?void 0:j.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500 mb-2",children:"Partners"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.partners.map((k,M)=>a.jsx(Ce,{variant:"outline",children:k},M))})]}),((C=e.funding_partners)==null?void 0:C.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500 mb-2",children:"Funding Partners"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.funding_partners.map((k,M)=>a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700",children:k},M))})]})]})]}),((E=e.notable_alumni)==null?void 0:E.length)>0&&a.jsxs(Ee,{className:"lg:col-span-2",children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Notable Alumni"})}),a.jsx($e,{children:a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:e.notable_alumni.map((k,M)=>a.jsx("div",{className:"p-3 rounded-lg bg-slate-50 text-center",children:a.jsx("p",{className:"font-medium text-slate-900",children:k})},M))})})]})]})}),a.jsx(cn,{value:"programs",children:a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Programs & Cohorts"})}),a.jsx($e,{children:((A=e.programs)==null?void 0:A.length)>0?a.jsx("div",{className:"space-y-4",children:e.programs.map((k,M)=>a.jsx("div",{className:"p-4 rounded-lg border",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-medium text-slate-900",children:k.name}),a.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-sm text-slate-500",children:[k.duration_months&&a.jsxs("span",{children:[k.duration_months," months"]}),k.cohort_size&&a.jsxs("span",{children:[k.cohort_size," startups/cohort"]}),k.funding_provided_usd&&a.jsxs("span",{className:"text-emerald-600 font-medium",children:["$",(k.funding_provided_usd/1e3).toFixed(0),"K funding"]}),k.equity_taken>0&&a.jsxs("span",{children:[k.equity_taken,"% equity"]})]})]}),a.jsx(Ce,{variant:k.is_active?"default":"secondary",children:k.is_active?"Active":"Inactive"})]})},M))}):a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No programs listed"})})]})}),a.jsx(cn,{value:"sources",children:a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Data Sources & Claims"})}),a.jsx($e,{children:n.length>0?a.jsx("div",{className:"space-y-3",children:n.map(k=>a.jsx("div",{className:"p-4 rounded-lg border",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-slate-700",children:[a.jsxs("span",{className:"text-slate-500",children:[k.field_name,":"]})," ",k.field_value]}),k.evidence_snippet&&a.jsxs("p",{className:"text-xs text-slate-500 mt-1 italic",children:['"',k.evidence_snippet,'"']})]}),a.jsx(gu,{status:k.status,size:"sm"})]})},k.id))}):a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No source claims recorded"})})]})})]}),a.jsx(Ee,{className:"mt-8 p-4 bg-slate-50 border-slate-200",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Bn,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("span",{className:"text-slate-500",children:"Last verified: "}),a.jsx("span",{className:"font-medium",children:e.last_verified_at?Tt(new Date(e.last_verified_at),"MMM d, yyyy"):"Never"})]})]}),a.jsxs(Ne,{variant:"outline",className:"gap-2",children:[a.jsx(ur,{className:"h-4 w-4"}),"Suggest an Edit"]})]})})]})}function $0({filters:e,onFilterChange:t,onClear:n,searchPlaceholder:r="Search...",filterOptions:i=[]}){const s=Object.values(e).filter(o=>o&&o!=="all").length;return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-md",children:[a.jsx(hr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),a.jsx(Wt,{placeholder:r,value:e.search||"",onChange:o=>t("search",o.target.value),className:"pl-9"})]}),i.map(o=>a.jsxs(oo,{value:e[o.key]||"all",onValueChange:c=>t(o.key,c),children:[a.jsx(us,{className:"w-[160px]",children:a.jsx(lo,{placeholder:o.label})}),a.jsxs(ds,{children:[a.jsxs(Pn,{value:"all",children:["All ",o.label]}),o.options.map(c=>a.jsx(Pn,{value:c.value,children:c.label},c.value))]})]},o.key)),s>0&&a.jsxs(Ne,{variant:"ghost",onClick:n,className:"text-slate-500 hover:text-slate-700",children:[a.jsx(xo,{className:"h-4 w-4 mr-1"}),"Clear (",s,")"]})]}),s>0&&a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx(r0,{className:"h-4 w-4 text-slate-400"}),Object.entries(e).map(([o,c])=>{var p;if(!c||c==="all"||o==="search")return null;const d=i.find(m=>m.key===o),h=((p=d==null?void 0:d.options.find(m=>m.value===c))==null?void 0:p.label)||c;return a.jsxs(Ce,{variant:"secondary",className:"bg-emerald-50 text-emerald-700 hover:bg-emerald-100 cursor-pointer",onClick:()=>t(o,"all"),children:[d==null?void 0:d.label,": ",h,a.jsx(xo,{className:"h-3 w-3 ml-1"})]},o)})]})]})}function ro({entity:e,entityType:t,detailPage:n}){const r=s=>(s==null?void 0:s.split(" ").map(o=>o[0]).join("").slice(0,2).toUpperCase())||"?",i=s=>{const o={Startup:"from-emerald-400 to-teal-500",Investor:"from-blue-400 to-indigo-500",ESO:"from-purple-400 to-pink-500"};return o[s]||o.Startup};return a.jsx(yt,{to:`${ot(n)}?id=${e.id}`,children:a.jsx(Ee,{className:"p-5 bg-white border-0 shadow-sm hover:shadow-lg transition-all duration-200 cursor-pointer group",children:a.jsxs("div",{className:"flex items-start gap-4",children:[e.logo_url?a.jsx("img",{src:e.logo_url,alt:e.name,className:"w-14 h-14 roun
950ded-xl object-cover"}):a.jsx("div",{className:ze("w-14 h-14 rounded-xl bg-gradient-to-br flex items-center justify-center",i(t)),children:a.jsx("span",{className:"text-white font-bold text-lg",children:r(e.name)})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("h3",{className:"font-semibold text-slate-900 group-hover:text-emerald-600 transition-colors truncate",children:e.name}),a.jsx(Li,{tier:e.reliability_tier||"C",size:"sm"})]}),a.jsx("p",{className:"text-sm text-slate-500 mt-1 line-clamp-2",children:e.description||"No description available"}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-3 text-xs text-slate-500",children:[e.sector&&a.jsx(Ce,{variant:"secondary",className:"bg-slate-100 text-slate-600 font-normal",children:e.sector}),e.investor_type&&a.jsx(Ce,{variant:"secondary",className:"bg-slate-100 text-slate-600 font-normal",children:e.investor_type}),e.eso_type&&a.jsx(Ce,{variant:"secondary",className:"bg-slate-100 text-slate-600 font-normal",children:e.eso_type}),(e.county||e.city)&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Cu,{className:"h-3 w-3"}),e.city||e.county]}),e.stage&&a.jsx(Ce,{variant:"outline",className:"font-normal",children:e.stage}),e.total_funding_usd&&a.jsxs("span",{className:"font-medium text-emerald-600",children:["$",(e.total_funding_usd/1e6).toFixed(1),"M raised"]})]})]})]})})})}const j8=P.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{ref:n,className:ze("w-full caption-bottom text-sm",e),...t})}));j8.displayName="Table";const S8=P.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:ze("[&_tr]:border-b",e),...t}));S8.displayName="TableHeader";const N8=P.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:ze("[&_tr:last-child]:border-0",e),...t}));N8.displayName="TableBody";const Aoe=P.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:ze("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Aoe.displayName="TableFooter";const Sv=P.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:ze("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Sv.displayName="TableRow";const C8=P.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:ze("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));C8.displayName="TableHead";const LC=P.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:ze("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));LC.displayName="TableCell";const Ooe=P.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:ze("mt-4 text-sm text-muted-foreground",e),...t}));Ooe.displayName="TableCaption";function nP({columns:e,data:t,searchable:n=!0,searchPlaceholder:r="Search...",pageSize:i=10,onExport:s,emptyMessage:o="No data available"}){const[c,d]=P.useState(""),[h,p]=P.useState(0),m=n&&c?t.filter(w=>e.some(b=>{const _=b.accessor?w[b.accessor]:"";return String(_).toLowerCase().includes(c.toLowerCase())})):t,v=Math.ceil(m.length/i),x=m.slice(h*i,(h+1)*i);return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between gap-4",children:[n&&a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(hr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),a.jsx(Wt,{placeholder:r,value:c,onChange:w=>{d(w.target.value),p(0)},className:"pl-9"})]}),s&&a.jsxs(Ne,{variant:"outline",onClick:s,className:"gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Export CSV"]})]}),a.jsx("div",{className:"border rounded-lg overflow-hidden",children:a.jsxs(j8,{children:[a.jsx(S8,{children:a.jsx(Sv,{className:"bg-slate-50",children:e.map((w,b)=>a.jsx(C8,{className:w.className,children:w.header},b))})}),a.jsx(N8,{children:x.length>0?x.map((w,b)=>a.jsx(Sv,{className:"hover:bg-slate-50",children:e.map((_,j)=>a.jsx(LC,{className:_.cellClassName,children:_.cell?_.cell(w):w[_.accessor]},j))},b)):a.jsx(Sv,{children:a.jsx(LC,{colSpan:e.length,className:"h-32 text-center text-slate-500",children:o})})})]})}),v>1&&a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("p",{className:"text-sm text-slate-500",children:["Showing ",h*i+1," to ",Math.min((h+1)*i,m.length)," of ",m.length]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ne,{variant:"outline",size:"sm",onClick:()=>p(w=>Math.max(0,w-1)),disabled:h===0,children:a.jsx(K3,{className:"h-4 w-4"})}),a.jsxs("span",{className:"text-sm text-slate-600",children:["Page ",h+1," of ",v]}),a.jsx(Ne,{variant:"outline",size:"sm",onClick:()=>p(w=>Math.min(v-1,w+1)),disabled:h>=v-1,children:a.jsx(t0,{className:"h-4 w-4"})})]})]})]})}function uM(e){if(e==null)return"";const t=String(e);return t.includes(",")||t.includes('"')||t.includes(`
951`)||t.includes("\r")?`"${t.replace(/"/g,'""')}"`:t}function rP(e,t){const n=[e.map(uM).join(",")];for(const r of t)n.push(r.map(uM).join(","));return n.join(`
952`)}function iP(e,t){const n=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}const Toe=["Incubator","Accelerator","Hub","Co-working Space","Innovation Lab","University Program","Corporate Program","Government Program","Other"],Moe=[{value:"A",label:"Tier A - IO Validated"}
952,{value:"B",label:"Tier B - Actor Confirmed"},{value:"C",label:"Tier C - OSINT Captured"}],Roe=["Nairobi","Mombasa","Kisumu","Nakuru","Eldoret","Kiambu","Machakos"];function Ioe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState("grid"),{isSignedIn:o,signIn:c}=D0(),[d,h]=P.useState({search:"",eso_type:"all",tier:"all",county:"all"}),[p,m]=P.useState(!1);P.useEffect(()=>{Q.auth.me().then(C=>m((C==null?void 0:C.role)==="admin")).catch(()=>m(!1)),v()},[]);const v=async()=>{try{const C=await Q.entities.ESO.list("-reliability_score",100);t(C)}catch(C){console.error("Error loading ESOs:",C)}finally{r(!1)}},x=(C,E)=>{h(A=>({...A,[C]:E}))},w=()=>{h({search:"",eso_type:"all",tier:"all",county:"all"})},b=e.filter(C=>{var E,A;if(!Dr(C,p))return!1;if(d.search){const k=d.search.toLowerCase();if(!(((E=C.name)==null?void 0:E.toLowerCase().includes(k))||((A=C.description)==null?void 0:A.toLowerCase().includes(k))))return!1}return!(d.eso_type!=="all"&&C.eso_type!==d.eso_type||d.tier!=="all"&&C.reliability_tier!==d.tier||d.county!=="all"&&C.county!==d.county)}),_=()=>{const C=["Name","Type","County","Startups Supported","Tier","Website"],E=b.map(A=>[A.name,A.eso_type,A.county,A.total_startups_supported||"",A.reliability_tier,A.website]);iP(rP(C,E),"kenya-esos.csv")},j=[{header:"Organization",accessor:"name",cell:C=>{var E;return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-purple-400 to-pink-500 flex items-center justify-center text-white font-medium",children:((E=C.name)==null?void 0:E[0])||"?"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:C.name}),a.jsx("p",{className:"text-xs text-slate-500",children:C.eso_type})]})]})}},{header:"Type",accessor:"eso_type",cell:C=>C.eso_type&&a.jsx(Ce,{variant:"outline",children:C.eso_type})},{header:"Location",accessor:"county",cell:C=>C.county||C.city||"-"},{header:"Startups Supported",accessor:"total_startups_supported",cell:C=>C.total_startups_supported||"-"},{header:"Tier",accessor:"reliability_tier",cell:C=>a.jsx(Li,{tier:C.reliability_tier||"C",size:"sm"})}];return a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Ecosystem Support Organizations"}),a.jsxs("p",{className:"text-slate-500 mt-1",children:[b.length," hubs, incubators, and accelerators in Kenya"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"flex items-center border rounded-lg p-1 bg-slate-100",children:[a.jsx(Ne,{variant:i==="grid"?"secondary":"ghost",size:"sm",onClick:()=>s("grid"),className:"px-3",children:a.jsx(d2,{className:"h-4 w-4"})}),a.jsx(Ne,{variant:i==="list"?"secondary":"ghost",size:"sm",onClick:()=>s("list"),className:"px-3",children:a.jsx(h2,{className:"h-4 w-4"})})]}),o?a.jsxs(Ne,{variant:"outline",onClick:_,className:"gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Export"]}):a.jsxs(Ne,{variant:"outline",onClick:c,className:"gap-2 border-emerald-200 text-emerald-700 hover:bg-emerald-50",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Sign in to Export"]})]})]}),a.jsx("div",{className:"mb-6",children:a.jsx($0,{filters:d,onFilterChange:x,onClear:w,searchPlaceholder:"Search ESOs...",filterOptions:[{key:"eso_type",label:"Type",options:Toe.map(C=>({value:C,label:C}))},{key:"tier",label:"Tier",options:Moe},{key:"county",label:"County",options:Roe.map(C=>({value:C,label:C}))}]})}),n?a.jsx(Mn,{message:"Loading ESOs..."}):b.length===0?a.jsx(fr,{icon:tr,title:"No ESOs found",description:"Try adjusting your filters or search query",action:w,actionLabel:"Clear Filters"}):i==="grid"?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:b.map(C=>a.jsx(ro,{entity:C,entityType:"ESO",detailPage:"ESODetail"},C.id))}):a.jsx(nP,{columns:j,data:b,searchable:!1,pageSize:15})]})}const Loe=["Funding","Partnership","Program Launch","Cohort Launch","Policy Initiative","Award","Acquisition","Expansion","Leadership Change","Product Launch"],Doe=[{value:"A",label:"Tier A - IO Validated"}
952,{value:"B",label:"Tier B - Actor Confirmed"},{value:"C",label:"Tier C - OSINT Captured"}],$oe={Funding:zl,Partnership:f2,"Program Launch":Up,"Cohort Launch":tr,Award:Bp,Acquisition:er,Expansion:pr},Foe={Funding:"bg-green-100 text-green-600 border-green-200",Partnership:"bg-blue-100 text-blue-600 border-blue-200","Program Launch":"bg-purple-100 text-purple-600 border-purple-200","Cohort Launch":"bg-indigo-100 text-indigo-600 border-indigo-200",Award:"bg-amber-100 text-amber-600 border-amber-200",Acquisition:"bg-pink-100 text-pink-600 border-pink-200",Expansion:"bg-teal-100 text-teal-600 border-teal-200"};function Boe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState(!1),[o,c]=P.useState({search:"",event_type:"all",tier:"all"});P.useEffect(()=>{Q.auth.me().then(x=>s((x==null?void 0:x.role)==="admin")).catch(()=>s(!1)),d()},[]);const d=async()=>{try{const x=await Q.entities.EcosystemEvent.list("-event_date",100);t(x)}catch(x){console.error("Error loading events:",x)}finally{r(!1)}},h=(x,w)=>{c(b=>({...b,[x]:w}))},p=()=>{c({search:"",event_type:"all",tier:"all"})},m=e.filter(x=>{var w,b;if(!Yv(x,i))return!1;if(o.search){const _=o.search.toLowerCase();if(!(((w=x.title)==null?void 0:w.toLowerCase().includes(_))||((b=x.summary)==null?void 0:b.toLowerCase().includes(_))))return!1}return!(o.event_type!=="all"&&x.event_type!==o.event_type||o.tier!=="all"&&x.reliability_tier!==o.tier)}),v=()=>{const x=["Date","Type","Title","Summary","Amount (USD)","Tier"],w=m.map(E=>[E.event_date,E.event_type,E.title,E.summary,E.amount_usd||"",E.reliability_tier]),b=[x,...w].map(E=>E.join(",")).join(`
953`),_=new Blob([b],{type:"text/csv"}),j=URL.createObjectURL(_),C=document.createElement("a");C.href=j,C.download="kenya-ecosystem-events.csv",C.click()};return a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Ecosystem Events"}),a.jsxs("p",{className:"text-slate-500 mt-1",children:[m.length," tracked events in Kenya's innovation ecosystem"]})]}),a.jsxs(Ne,{variant:"outline",onClick:v,className:"gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Export"]})]}),a.jsx("div",{className:"mb-6",children:a.jsx($0,{filters:o,onFilterChange:h,onClear:p,searchPlaceholder:"Search events...",filterOptions:[{key:"event_type",label:"Type",options:Loe.map(x=>({value:x,label:x}))},{key:"tier",label:"Tier",options:Doe}]})}),n?a.jsx(Mn,{message:"Loading events..."}):m.length===0?a.jsx(fr,{icon:ho,title:"No events found",description:"Try adjusting your filters or search query",action:p,actionLabel:"Clear Filters"}):a.jsx("div",{className:"space-y-4",children:m.map(x=>{const w=$oe[x.event_type]||pr,b=Foe[x.event_type]||"bg-slate-100 text-slate-600 border-slate-200";return a.jsx(Ee,{className:"p-5 hover:shadow-md transition-shadow",children:a.jsxs("div",{className:"flex gap-4",children:[a.jsx("div",{className:`w-12 h-12 rounded-xl border ${b} flex items-center justify-center flex-shrink-0`,children:a.jsx(w,{className:"h-6 w-6"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900 line-clamp-1",children:x.title}),a.jsx("p",{className:"text-sm text-slate-500 mt-1 line-clamp-2",children:x.summary})]}),a.jsx(Li,{tier:x.reliability_tier||"C"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[a.jsx(Ce,{variant:"outline",children:x.event_type}),x.event_date&&(()=>{const _=new Date(x.event_date);return isNaN(_.getTime())?a.jsxs("span",{className:"text-sm text-slate-500 flex items-center gap-1",children:[a.jsx(ho,{className:"h-3.5 w-3.5"}),x.event_date]}):a.jsxs("span",{className:"text-sm text-slate-500 flex items-center gap-1",children:[a.jsx(ho,{className:"h-3.5 w-3.5"}),Tt(_,"MMM d, yyyy")]})})(),x.amount_usd&&a.jsxs("span",{className:"text-sm font-medium text-emerald-600",children:["$",(x.amount_usd/1e6).toFixed(1),"M"]}),x.sector&&a.jsx(Ce,{variant:"secondary",className:"bg-slate-100",children:x.sector}),x.source_url&&a.jsx("a",{href:x.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline",children:"View Source"})]})]})]})},x.id)})})]})}function kl({title:e,value:t,change:n,changeLabel:r,icon:i,iconColor:s="bg-emerald-500",format:o="number"}){const c=p=>o==="currency"?p>=1e9?`$${(p/1e9).toFixed(1)}B`:p>=1e6?`$${(p/1e6).toFixed(1)}M`:p>=1e3?`$${(p/1e3).toFixed(0)}K`:`$${p}`:o==="number"?p>=1e6?`${(p/1e6).toFixed(1)}M`:p>=1e3?`${(p/1e3).toFixed(1)}
953K`:(p==null?void 0:p.toLocaleString())||"0":p,d=n>0?pr:n<0?Hm:Ov,h=n>0?"text-green-600":n<0?"text-red-600":"text-slate-400";return a.jsx(Ee,{className:"p-6 bg-white border-0 shadow-sm hover:shadow-md transition-shadow",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-500 mb-1",children:e}),a.jsx("p",{className:"text-3xl font-bold text-slate-900 tracking-tight",children:c(t)}),(n!==void 0||r)&&a.jsxs("div",{className:ze("flex items-center gap-1 mt-2 text-sm",h),children:[a.jsx(d,{className:"h-4 w-4"}),a.jsx("span",{className:"font-medium",children:n!==void 0&&`${n>0?"+":""}${n}%`}),r&&a.jsx("span",{className:"text-slate-500",children:r})]})]}),i&&a.jsx("div",{className:ze("p-3 rounded-xl",s),children:a.jsx(i,{className:"h-6 w-6 text-white"})})]})})}var Ow,dM;function mi(){if(dM)return Ow;dM=1;var e=Array.isArray;return Ow=e,Ow}var Tw,fM;function E8(){if(fM)return Tw;fM=1;var e=typeof Ty=="object"&&Ty&&Ty.Object===Object&&Ty;return Tw=e,Tw}var Mw,hM;function Ps(){if(hM)return Mw;hM=1;var e=E8(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Mw=n,Mw}var Rw,pM;function ag(){if(pM)return Rw;pM=1;var e=Ps(),t=e.Symbol;return Rw=t,Rw}var Iw,mM;function zoe(){if(mM)return Iw;mM=1;var e=ag(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(o){var c=n.call(o,i),d=o[i];try{o[i]=void 0;var h=!0}catch{}var p=r.call(o);return h&&(c?o[i]=d:delete o[i]),p}return Iw=s,Iw}var Lw,gM;function Uoe(){if(gM)return Lw;gM=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Lw=n,Lw}var Dw,yM;function Po(){if(yM)return Dw;yM=1;var e=ag(),t=zoe(),n=Uoe(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function o(c){return c==null?c===void 0?i:r:s&&s in Object(c)?t(c):n(c)}return Dw=o,Dw}var $w,vM;function ko(){if(vM)return $w;vM=1;function e(t){return t!=null&&typeof t=="object"}return $w=e,$w}var Fw,xM;function th(){if(xM)return Fw;xM=1;var e=Po(),t=ko(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Fw=r,Fw}var Bw,bM;function aP(){if(bM)return Bw;bM=1;var e=mi(),t=th(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,o){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||o!=null&&s in Object(o)}return Bw=i,Bw}var zw,_M;
vendor: 4,110 bytes, line 953
953function Vl(){if(_M)return zw;_M=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return zw=e,zw}var Uw,wM;function sP(){if(wM)return Uw;wM=1;var e=Po(),t=Vl(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function o(c){if(!t(c))return!1;var d=e(c);return d==r||d==i||d==n||d==s}return Uw=o,Uw}var qw,jM;function qoe(){if(jM)return qw;jM=1;var e=Ps(),t=e["__core-js_shared__"];return qw=t,qw}var Hw,SM;function Hoe(){if(SM)return Hw;SM=1;var e=qoe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Hw=n,Hw}var Ww,NM;function P8(){if(NM)return Ww;NM=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ww=n,Ww}var Vw,CM;function Woe(){if(CM)return Vw;CM=1;var e=sP(),t=Hoe(),n=Vl(),r=P8(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,c=Object.prototype,d=o.toString,h=c.hasOwnProperty,p=RegExp("^"+d.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(v){if(!n(v)||t(v))return!1;var x=e(v)?p:s;return x.test(r(v))}return Vw=m,Vw}var Kw,EM;function Voe(){if(EM)return Kw;EM=1;function e(t,n){return t==null?void 0:t[n]}return Kw=e,Kw}var Gw,PM;function Ou(){if(PM)return Gw;PM=1;var e=Woe(),t=Voe();function n(r,i){var s=t(r,i);return e(s)?s:void 0}return Gw=n,Gw}var Zw,kM;function F0(){if(kM)return Zw;kM=1;var e=Ou(),t=e(Object,"create");return Zw=t,Zw}var Yw,AM;function Koe(){if(AM)return Yw;AM=1;var e=F0();function t(){this.__data__=e?e(null):{},this.size=0}return Yw=t,Yw}var Xw,OM;function Goe(){if(OM)return Xw;OM=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Xw=e,Xw}var Qw,TM;function Zoe(){if(TM)return Qw;TM=1;var e=F0(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;if(e){var c=o[s];return c===t?void 0:c}return r.call(o,s)?o[s]:void 0}return Qw=i,Qw}var Jw,MM;function Yoe(){if(MM)return Jw;MM=1;var e=F0(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var s=this.__data__;return e?s[i]!==void 0:n.call(s,i)}return Jw=r,Jw}var e1,RM;function Xoe(){if(RM)return e1;RM=1;var e=F0(),t="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&i===void 0?t:i,this}return e1=n,e1}var t1,IM;function Qoe(){if(IM)return t1;IM=1;var e=Koe(),t=Goe(),n=Zoe(),r=Yoe(),i=Xoe();function s(o){var c=-1,d=o==null?0:o.length;for(this.clear();++c<d;){var h=o[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,t1=s,t1}var n1,LM;function Joe(){if(LM)return n1;LM=1;function e(){this.__data__=[],this.size=0}return n1=e,n1}var r1,DM;function oP(){if(DM)return r1;DM=1;function e(t,n){return t===n||t!==t&&n!==n}return r1=e,r1}var i1,$M;function B0(){if($M)return i1;$M=1;var e=oP();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return i1=t,i1}var a1,FM;function ele(){if(FM)return a1;FM=1;var e=B0(),t=Array.prototype,n=t.splice;function r(i){var s=this.__data__,o=e(s,i);if(o<0)return!1;var c=s.length-1;return o==c?s.pop():n.call(s,o,1),--this.size,!0}return a1=r,a1}var s1,BM;function tle(){if(BM)return s1;BM=1;var e=B0();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return s1=t,s1}var o1,zM;function nle(){if(zM)return o1;zM=1;var e=B0();function t(n){return e(this.__data__,n)>-1}return o1=t,o1}var l1,UM;function rle(){if(UM)return l1;UM=1;var e=B0();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return l1=t,l1}var c1,qM;function z0(){if(qM)return c1;qM=1;var e=Joe(),t=ele(),n=tle(),r=nle(),i=rle();function s(o){var c=-1,d=o==null?0:o.length;for(this.clear();++c<d;){var h=o[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,c1=s,c1}var u1,HM;
vendor: 12,237 bytes, lines 953-961
953function lP(){if(HM)return u1;HM=1;var e=Ou(),t=Ps(),n=e(t,"Map");return u1=n,u1}var d1,WM;function ile(){if(WM)return d1;WM=1;var e=Qoe(),t=z0(),n=lP();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return d1=r,d1}var f1,VM;function ale(){if(VM)return f1;VM=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return f1=e,f1}var h1,KM;function U0(){if(KM)return h1;KM=1;var e=ale();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return h1=t,h1}var p1,GM;function sle(){if(GM)return p1;GM=1;var e=U0();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return p1=t,p1}var m1,ZM;function ole(){if(ZM)return m1;ZM=1;var e=U0();function t(n){return e(this,n).get(n)}return m1=t,m1}var g1,YM;function lle(){if(YM)return g1;YM=1;var e=U0();function t(n){return e(this,n).has(n)}return g1=t,g1}var y1,XM;function cle(){if(XM)return y1;XM=1;var e=U0();function t(n,r){var i=e(this,n),s=i.size;return i.set(n,r),this.size+=i.size==s?0:1,this}return y1=t,y1}var v1,QM;function cP(){if(QM)return v1;QM=1;var e=ile(),t=sle(),n=ole(),r=lle(),i=cle();function s(o){var c=-1,d=o==null?0:o.length;for(this.clear();++c<d;){var h=o[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,v1=s,v1}var x1,JM;function k8(){if(JM)return x1;JM=1;var e=cP(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var o=arguments,c=i?i.apply(this,o):o[0],d=s.cache;if(d.has(c))return d.get(c);var h=r.apply(this,o);return s.cache=d.set(c,h)||d,h};return s.cache=new(n.Cache||e),s}return n.Cache=e,x1=n,x1}var b1,eR;function ule(){if(eR)return b1;eR=1;var e=k8(),t=500;function n(r){var i=e(r,function(o){return s.size===t&&s.clear(),o}),s=i.cache;return i}return b1=n,b1}var _1,tR;function dle(){if(tR)return _1;tR=1;var e=ule(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(o,c,d,h){s.push(d?h.replace(n,"$1"):c||o)}),s});return _1=r,_1}var w1,nR;function uP(){if(nR)return w1;nR=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=Array(i);++r<i;)s[r]=n(t[r],r,t);return s}return w1=e,w1}var j1,rR;function fle(){if(rR)return j1;rR=1;var e=ag(),t=uP(),n=mi(),r=th(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function o(c){if(typeof c=="string")return c;if(n(c))return t(c,o)+"";if(r(c))return s?s.call(c):"";var d=c+"";return d=="0"&&1/c==-1/0?"-0":d}return j1=o,j1}var S1,iR;function A8(){if(iR)return S1;iR=1;var e=fle();function t(n){return n==null?"":e(n)}return S1=t,S1}var N1,aR;function O8(){if(aR)return N1;aR=1;var e=mi(),t=aP(),n=dle(),r=A8();function i(s,o){return e(s)?s:t(s,o)?[s]:n(r(s))}return N1=i,N1}var C1,sR;function q0(){if(sR)return C1;sR=1;var e=th();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return C1=t,C1}var E1,oR;function dP(){if(oR)return E1;oR=1;var e=O8(),t=q0();function n(r,i){i=e(i,r);for(var s=0,o=i.length;r!=null&&s<o;)r=r[t(i[s++])];return s&&s==o?r:void 0}return E1=n,E1}var P1,lR;function T8(){if(lR)return P1;lR=1;var e=dP();function t(n,r,i){var s=n==null?void 0:e(n,r);return s===void 0?i:s}return P1=t,P1}var hle=T8();const Di=Kt(hle);var k1,cR;function ple(){if(cR)return k1;cR=1;function e(t){return t==null}return k1=e,k1}var mle=ple();const St=Kt(mle);var A1,uR;function gle(){if(uR)return A1;uR=1;var e=Po(),t=mi(),n=ko(),r="[object String]";function i(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==r}return A1=i,A1}var yle=gle();const yu=Kt(yle);var vle=sP();const mt=Kt(vle);var xle=Vl();const nh=Kt(xle);var O1={exports:{}},Yt={};/**
954 * @license React
955 * react-is.production.min.js
956 *
957 * Copyright (c) Facebook, Inc. and its affiliates.
958 *
959 * This source code is licensed under the MIT license found in the
960 * LICENSE file in the root directory of this source tree.
961 */var dR;function ble(){if(dR)return Yt;dR=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function b(_){if(typeof _=="object"&&_!==null){var j=_.$$typeof;switch(j){case e:switch(_=_.type,_){case n:case i:case r:case h:case p:return _;default:switch(_=_&&_.$$typeof,_){case c:case o:case d:case v:case m:case s:return _;default:return j}}case t:return j}}}return Yt.ContextConsumer=o,Yt.ContextProvider=s,Yt.Element=e,Yt.ForwardRef=d,Yt.Fragment=n,Yt.Lazy=v,Yt.Memo=m,Yt.Portal=t,Yt.Profiler=i,Yt.StrictMode=r,Yt.Suspense=h,Yt.SuspenseList=p,Yt.isAsyncMode=function(){return!1},Yt.isConcurrentMode=function(){return!1},Yt.isContextConsumer=function(_){return b(_)===o},Yt.isContextProvider=function(_){return b(_)===s},Yt.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},Yt.isForwardRef=function(_){return b(_)===d},Yt.isFragment=function(_){return b(_)===n},Yt.isLazy=function(_){return b(_)===v},Yt.isMemo=function(_){return b(_)===m},Yt.isPortal=function(_){return b(_)===t},Yt.isProfiler=function(_){return b(_)===i},Yt.isStrictMode=function(_){return b(_)===r},Yt.isSuspense=function(_){return b(_)===h},Yt.isSuspenseList=function(_){return b(_)===p},Yt.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===i||_===r||_===h||_===p||_===x||typeof _=="object"&&_!==null&&(_.$$typeof===v||_.$$typeof===m||_.$$typeof===s||_.$$typeof===o||_.$$typeof===d||_.$$typeof===w||_.getModuleId!==void 0)},Yt.typeOf=b,Yt}var fR;function _le(){return fR||(fR=1,O1.exports=ble()),O1.exports}var wle=_le(),T1,hR;function M8(){if(hR)return T1;hR=1;var e=Po(),t=ko(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return T1=r,T1}var M1,pR;function jle(){if(pR)return M1;pR=1;var e=M8();function t(n){return e(n)&&n!=+n}return M1=t,M1}var Sle=jle();const rh=Kt(Sle);var Nle=M8();const Cle=Kt(Nle);var Zr=function(t){return t===0?0:t>0?1:-1},Uc=function(t){return yu(t)&&t.indexOf("%")===t.length-1},De=function(t){return Cle(t)&&!rh(t)},Ele=function(t){return St(t)},Jn=function(t){return De(t)||yu(t)},Ple=0,ih=function(t){var n=++Ple;return"".concat(t||"").concat(n)},Yr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!De(t)&&!yu(t))return r;var s;if(Uc(t)){var o=t.indexOf("%");s=n*parseFloat(t.slice(0,o))/100}else s=+t;return rh(s)&&(s=r),i&&s>n&&(s=n),s},vl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},kle=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},ui=function(t,n){return De(t)&&De(n)?function(r){return t+r*(n-t)}:function(){return n}};function Xv(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Di(r,t))===n})}var Ale=function(t,n){return De(t)&&De(n)?t-n:yu(t)&&yu(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Wd(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function DC(e){"@babel/helpers - typeof";return DC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},DC(e)}var Ole=["viewBox","children"],Tle=["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"],mR=["points","pathLength"],R1={svg:Ole,polygon:mR,polyline:mR},fP=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
961ocus","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"],Qv=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(P.isValidElement(t)&&(r=t.props),!nh(r))return null;var i={};return Object.keys(r).forEach(function(s){fP.includes(s)&&(i[s]=n||function(o){return r[s](r,o)})}),i},Mle=function(t,n,r){return function(i){return t(n,r,i),null}},vu=function(t,n,r){if(!nh(t)||DC(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var o=t[s];fP.includes(s)&&typeof o=="function"&&(i||(i={}),i[s]=Mle(o,n,r))}),i},Rle=["children"],Ile=["children"];function gR(e,t){if(e==null)return{};var n=Lle(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $C(e){"@babel/helpers - typeof";return $C=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},$C(e)}var yR={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: 6,609 bytes, line 961
961,mo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},vR=null,I1=null,hP=function e(t){if(t===vR&&Array.isArray(I1))return I1;var n=[];return P.Children.forEach(t,function(r){St(r)||(wle.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),I1=n,vR=t,n};function ua(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return mo(i)}):r=[mo(t)],hP(e).forEach(function(i){var s=Di(i,"type.displayName")||Di(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function Pi(e,t){var n=ua(e,t);return n&&n[0]}var xR=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!De(r)||r<=0||!De(i)||i<=0)},Dle=["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"],$le=function(t){return t&&t.type&&yu(t.type)&&Dle.indexOf(t.type)>=0},Fle=function(t){return t&&$C(t)==="object"&&"clipDot"in t},Ble=function(t,n,r,i){var s,o=(s=R1==null?void 0:R1[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!mt(t)&&(i&&o.includes(n)||Tle.includes(n))||r&&fP.includes(n)},ct=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(P.isValidElement(t)&&(i=t.props),!nh(i))return null;var s={};return Object.keys(i).forEach(function(o){var c;Ble((c=i)===null||c===void 0?void 0:c[o],o,n,r)&&(s[o]=i[o])}),s},FC=function e(t,n){if(t===n)return!0;var r=P.Children.count(t);if(r!==P.Children.count(n))return!1;if(r===0)return!0;if(r===1)return bR(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var s=t[i],o=n[i];if(Array.isArray(s)||Array.isArray(o)){if(!e(s,o))return!1}else if(!bR(s,o))return!1}return!0},bR=function(t,n){if(St(t)&&St(n))return!0;if(!St(t)&&!St(n)){var r=t.props||{},i=r.children,s=gR(r,Rle),o=n.props||{},c=o.children,d=gR(o,Ile);return i&&c?Wd(s,d)&&FC(i,c):!i&&!c?Wd(s,d):!1}return!1},_R=function(t,n){var r=[],i={};return hP(t).forEach(function(s,o){if($le(s))r.push(s);else if(s){var c=mo(s.type),d=n[c]||{},h=d.handler,p=d.once;if(h&&(!p||!i[c])){var m=h(s,c,o);r.push(m),i[c]=!0}}}),r},zle=function(t){var n=t&&t.type;return n&&yR[n]?yR[n]:null},Ule=function(t,n){return hP(n).indexOf(t)},qle=["children","width","height","viewBox","className","style","title","desc"];function BC(){return BC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BC.apply(this,arguments)}function Hle(e,t){if(e==null)return{};var n=Wle(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zC(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,o=e.style,c=e.title,d=e.desc,h=Hle(e,qle),p=i||{width:n,height:r,x:0,y:0},m=jt("recharts-surface",s);return J.createElement("svg",BC({},ct(h,!0,"svg"),{className:m,width:n,height:r,style:o,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),J.createElement("title",null,c),J.createElement("desc",null,d),t)}var Vle=["children","className"];function UC(){return UC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UC.apply(this,arguments)}function Kle(e,t){if(e==null)return{};var n=Gle(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ft=J.forwardRef(function(e,t){var n=e.children,r=e.className,i=Kle(e,Vle),s=jt("recharts-layer",r);return J.createElement("g",UC({className:s},ct(i,!0),{ref:t}),n)}),La=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s]},L1,wR;function Zle(){if(wR)return L1;wR=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(s);++i<s;)o[i]=t[i+n];return o}return L1=e,L1}var D1,jR;function Yle(){if(jR)return D1;jR=1;var e=Zle();function t(n,r,i){var s=n.length;return i=i===void 0?s:i,!r&&i>=s?n:e(n,r,i)}return D1=t,D1}var $1,SR;function R8(){if(SR)return $1;SR=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",o="\\u200d",c=RegExp("["+o+e+i+s+"]");function d(h){return c.test(h)}return $1=d,$1}var F1,NR;function Xle(){if(NR)return F1;NR=1;function e(t){return t.split("")}return F1=e,F1}var B1,CR;function Qle(){if(CR)return B1;CR=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",o="["+e+"]",c="["+i+"]",d="\\ud83c[\\udffb-\\udfff]",h="(?:"+c+"|"+d+")",p="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",w=h+"?",b="["+s+"]?",_="(?:"+x+"(?:"+[p,m,v].join("|")+")"+b+w+")*",j=b+w+_,C="(?:"+[p+c+"?",c,m,v,o].join("|")+")",E=RegExp(d+"(?="+d+")|"+C+j,"g");function A(k){return k.match(E)||[]}return B1=A,B1}var z1,ER;function Jle(){if(ER)return z1;ER=1;var e=Xle(),t=R8(),n=Qle();function r(i){return t(i)?n(i):e(i)}return z1=r,z1}var U1,PR;function ece(){if(PR)return U1;PR=1;var e=Yle(),t=R8(),n=Jle(),r=A8();function i(s){return function(o){o=r(o);var c=t(o)?n(o):void 0,d=c?c[0]:o.charAt(0),h=c?e(c,1).join(""):o.slice(1);return d[s]()+h}}return U1=i,U1}var q1,kR;
vendor: 4,138 bytes, line 961
961function tce(){if(kR)return q1;kR=1;var e=ece(),t=e("toUpperCase");return q1=t,q1}var nce=tce();const H0=Kt(nce);function yn(e){return function(){return e}}const I8=Math.cos,Jv=Math.sin,Wa=Math.sqrt,ex=Math.PI,W0=2*ex,qC=Math.PI,HC=2*qC,Lc=1e-6,rce=HC-Lc;function L8(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ice(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return L8;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class ace{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?L8:ice(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,c=this._y1,d=r-t,h=i-n,p=o-t,m=c-n,v=p*p+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(v>Lc)if(!(Math.abs(m*d-h*p)>Lc)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-o,w=i-c,b=d*d+h*h,_=x*x+w*w,j=Math.sqrt(b),C=Math.sqrt(v),E=s*Math.tan((qC-Math.acos((b+v-_)/(2*j*C)))/2),A=E/C,k=E/j;Math.abs(A-1)>Lc&&this._append`L${t+A*p},${n+A*m}`,this._append`A${s},${s},0,0,${+(m*x>p*w)},${this._x1=t+k*d},${this._y1=n+k*h}`}}arc(t,n,r,i,s,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),d=r*Math.sin(i),h=t+c,p=n+d,m=1^o,v=o?i-s:s-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Lc||Math.abs(this._y1-p)>Lc)&&this._append`L${h},${p}`,r&&(v<0&&(v=v%HC+HC),v>rce?this._append`A${r},${r},0,1,${m},${t-c},${n-d}A${r},${r},0,1,${m},${this._x1=h},${this._y1=p}`:v>Lc&&this._append`A${r},${r},0,${+(v>=qC)},${m},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function pP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new ace(t)}function mP(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function D8(e){this._context=e}D8.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 V0(e){return new D8(e)}function $8(e){return e[0]}function F8(e){return e[1]}function B8(e,t){var n=yn(!0),r=null,i=V0,s=null,o=pP(c);e=typeof e=="function"?e:e===void 0?$8:yn(e),t=typeof t=="function"?t:t===void 0?F8:yn(t);function c(d){var h,p=(d=mP(d)).length,m,v=!1,x;for(r==null&&(s=i(x=o())),h=0;h<=p;++h)!(h<p&&n(m=d[h],h,d))===v&&((v=!v)?s.lineStart():s.lineEnd()),v&&s.point(+e(m,h,d),+t(m,h,d));if(x)return s=null,x+""||null}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:yn(+d),c):e},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:yn(+d),c):t},c.defined=function(d){return arguments.length?(n=typeof d=="function"?d:yn(!!d),c):n},c.curve=function(d){return arguments.length?(i=d,r!=null&&(s=i(r)),c):i},c.context=function(d){return arguments.length?(d==null?r=s=null:s=i(r=d),c):r},c}function Zy(e,t,n){var r=null,i=yn(!0),s=null,o=V0,c=null,d=pP(h);e=typeof e=="function"?e:e===void 0?$8:yn(+e),t=typeof t=="function"?t:yn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?F8:yn(+n);function h(m){var v,x,w,b=(m=mP(m)).length,_,j=!1,C,E=new Array(b),A=new Array(b);
961for(s==null&&(c=o(C=d())),v=0;v<=b;++v){if(!(v<b&&i(_=m[v],v,m))===j)if(j=!j)x=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),w=v-1;w>=x;--w)c.point(E[w],A[w]);c.lineEnd(),c.areaEnd()}j&&(E[v]=+e(_,v,m),A[v]=+t(_,v,m),c.point(r?+r(_,v,m):E[v],n?+n(_,v,m):A[v]))}if(C)return c=null,C+""||null}function p(){return B8().defined(i).curve(o).context(s)}return h.x=function(m){return arguments.length?(e=typeof m=="function"?m:yn(+m),r=null,h):e},h.x0=function(m){return arguments.length?(e=typeof m=="function"?m:yn(+m),h):e},h.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:yn(+m),h):r},h.y=function(m){return arguments.length?(t=typeof m=="function"?m:yn(+m),n=null,h):t},h.y0=function(m){return arguments.length?(t=typeof m=="function"?m:yn(+m),h):t},h.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:yn(+m),h):n},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(n)},h.lineX1=function(){return p().x(r).y(t)},h.defined=function(m){return arguments.length?(i=typeof m=="function"?m:yn(!!m),h):i},h.curve=function(m){return arguments.length?(o=m,s!=null&&(c=o(s)),h):o},h.context=function(m){return arguments.length?(m==null?s=c=null:c=o(s=m),h):s},h}class z8{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function sce(e){return new z8(e,!0)}function oce(e){return new z8(e,!1)}const gP={draw(e,t){const n=Wa(t/ex);e.moveTo(n,0),e.arc(0,0,n,0,W0)}},lce={draw(e,t){const n=Wa(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},U8=Wa(1/3),cce=U8*2,uce={draw(e,t){const n=Wa(t/cce),r=n*U8;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},dce={draw(e,t){const n=Wa(t),r=-n/2;e.rect(r,r,n,n)}},fce=.8908130915292852,q8=Jv(ex/10)/Jv(7*ex/10),hce=Jv(W0/10)*q8,pce=-I8(W0/10)*q8,mce={draw(e,t){const n=Wa(t*fce),r=hce*n,i=pce*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const o=W0*s/5,c=I8(o),d=Jv(o);e.lineTo(d*n,-c*n),e.lineTo(c*r-d*i,d*r+c*i)}e.closePath()}},H1=Wa(3),gce={draw(e,t){const n=-Wa(t/(H1*3));e.moveTo(0,n*2),e.lineTo(-H1*n,-n),e.lineTo(H1*n,-n),e.closePath()}},ea=-.5,ta=Wa(3)/2,WC=1/Wa(12),yce=(WC/2+1)*3,vce={draw(e,t){const n=Wa(t/yce),r=n/2,i=n*WC,s=r,o=n*WC+n,c=-s,d=o;e.moveTo(r,i),e.lineTo(s,o),e.lineTo(c,d),e.lineTo(ea*r-ta*i,ta*r+ea*i),e.lineTo(ea*s-ta*o,ta*s+ea*o),e.lineTo(ea*c-ta*d,ta*c+ea*d),e.lineTo(ea*r+ta*i,ea*i-ta*r),e.lineTo(ea*s+ta*o,ea*o-ta*s),e.lineTo(ea*c+ta*d,ea*d-ta*c),e.closePath()}};function xce(e,t){let n=null,r=pP(i);e=typeof e=="function"?e:yn(e||gP),t=typeof t=="function"?t:yn(t===void 0?64:+t);function i(){let s;if(n||(n=s=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:yn(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:yn(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function tx(){}function nx(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function H8(e){this._context=e}H8.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:nx(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:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bce(e){return new H8(e)}function W8(e){this._context=e}W8.prototype={areaStart:tx,areaEnd:tx,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:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _ce(e){return new W8(e)}function V8(e){this._context=e}V8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wce(e){return new V8(e)}function K8(e){this._context=e}K8.prototype={areaStart:tx,areaEnd:tx,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 jce(e){return new K8(e)}function AR(e){return e<0?-1:1}function OR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),c=(s*i+o*r)/(r+i);return(AR(s)+AR(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(c))||0}function TR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}
961function W1(e,t,n){var r=e._x0,i=e._y0,s=e._x1,o=e._y1,c=(s-r)/3;e._context.bezierCurveTo(r+c,i+c*t,s-c,o-c*n,s,o)}function rx(e){this._context=e}rx.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:W1(this,this._t0,TR(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,W1(this,TR(this,n=OR(this,e,t)),n);break;default:W1(this,this._t0,n=OR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function G8(e){this._context=new Z8(e)}(G8.prototype=Object.create(rx.prototype)).point=function(e,t){rx.prototype.point.call(this,t,e)};function Z8(e){this._context=e}Z8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function Sce(e){return new rx(e)}function Nce(e){return new G8(e)}function Y8(e){this._context=e}Y8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=MR(e),i=MR(t),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function MR(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),o=new Array(n);for(i[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function Cce(e){return new Y8(e)}function K0(e,t){this._context=e,this._t=t}K0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Ece(e){return new K0(e,.5)}function Pce(e){return new K0(e,0)}function kce(e){return new K0(e,1)}function pf(e,t){if((o=e.length)>1)for(var n=1,r,i,s=e[t[0]],o,c=s.length;n<o;++n)for(i=s,s=e[t[n]],r=0;r<c;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function VC(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Ace(e,t){return e[t]}function Oce(e){const t=[];return t.key=e,t}function Tce(){var e=yn([]),t=VC,n=pf,r=Ace;function i(s){var o=Array.from(e.apply(this,arguments),Oce),c,d=o.length,h=-1,p;for(const m of s)for(c=0,++h;c<d;++c)(o[c][h]=[0,+r(m,o[c].key,h,s)]).data=m;for(c=0,p=mP(t(o));c<d;++c)o[p[c]].index=c;return n(o,p),o}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:yn(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:yn(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?VC:typeof s=="function"?s:yn(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??pf,i):n},i}function Mce(e,t){if((r=e.length)>0){for(var n,r,i=0,s=e[0].length,o;i<s;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}pf(e,t)}}function Rce(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n<s;++n){for(var o=0,c=0;o<i;++o)c+=e[o][n][1]||0;r[n][1]+=r[n][0]=-c/2}
vendor: 9,446 bytes, lines 961-964
961pf(e,t)}}function Ice(e,t){if(!(!((o=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,o;r<s;++r){for(var c=0,d=0,h=0;c<o;++c){for(var p=e[t[c]],m=p[r][1]||0,v=p[r-1][1]||0,x=(m-v)/2,w=0;w<c;++w){var b=e[t[w]],_=b[r][1]||0,j=b[r-1][1]||0;x+=_-j}d+=m,h+=x*m}i[r-1][1]+=i[r-1][0]=n,d&&(n-=h/d)}i[r-1][1]+=i[r-1][0]=n,pf(e,t)}}function Jp(e){"@babel/helpers - typeof";return Jp=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},Jp(e)}var Lce=["type","size","sizeType"];function KC(){return KC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KC.apply(this,arguments)}function RR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RR(Object(n),!0).forEach(function(r){Dce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dce(e,t,n){return t=$ce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ce(e){var t=Fce(e,"string");return Jp(t)=="symbol"?t:t+""}function Fce(e,t){if(Jp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bce(e,t){if(e==null)return{};var n=zce(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var X8={symbolCircle:gP,symbolCross:lce,symbolDiamond:uce,symbolSquare:dce,symbolStar:mce,symbolTriangle:gce,symbolWye:vce},Uce=Math.PI/180,qce=function(t){var n="symbol".concat(H0(t));return X8[n]||gP},Hce=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Uce;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Wce=function(t,n){X8["symbol".concat(H0(t))]=n},yP=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,o=t.sizeType,c=o===void 0?"area":o,d=Bce(t,Lce),h=IR(IR({},d),{},{type:r,size:s,sizeType:c}),p=function(){var _=qce(r),j=xce().type(_).size(Hce(s,c,r));return j()},m=h.className,v=h.cx,x=h.cy,w=ct(h,!0);return v===+v&&x===+x&&s===+s?J.createElement("path",KC({},w,{className:jt("recharts-symbols",m),transform:"translate(".concat(v,", ").concat(x,")"),d:p()})):null};yP.registerSymbol=Wce;function mf(e){"@babel/helpers - typeof";return mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(e)}function GC(){return GC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GC.apply(this,arguments)}function LR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LR(Object(n),!0).forEach(function(r){em(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J8(r.key),r)}}function Zce(e,t,n){return t&&Gce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yce(e,t,n){return t=ix(t),Xce(e,Q8()?Reflect.construct(t,n||[],ix(e).constructor):t.apply(e,n))}function Xce(e,t){if(t&&(mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qce(e)}function Qce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q8=function(){return!!e})()}function ix(e){return ix=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ix(e)}function Jce(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&&ZC(e,t)}function ZC(e,t){return ZC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZC(e,t)}function em(e,t,n){return t=J8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J8(e){var t=eue(e,"string");return mf(t)=="symbol"?t:t+""}function eue(e,t){if(mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var na=32,vP=(function(e){function t(){return Kce(this,t),Yce(this,t,arguments)}return Jce(t,e),Zce(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,s=na/2,o=na/6,c=na/3,d=r.inactive?i:r.color;if(r.type==="plainline")return J.createElement("line",{strokeWidth:4,fill:"none",stroke:d,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:s,x2:na,y2:s,className:"recharts-legend-icon"});if(r.type==="line")return J.createElement("path",{strokeWidth:4,fill:"none",stroke:d,d:"M0,".concat(s,"h").concat(c,`
962            A`).concat(o,",").concat(o,",0,1,1,").concat(2*c,",").concat(s,`
963            H`).concat(na,"M").concat(2*c,",").concat(s,`
964            A`).concat(o,",").concat(o,",0,1,1,").concat(c,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return J.createElement("path",{stroke:"none",fill:d,d:"M0,".concat(na/8,"h").concat(na,"v").concat(na*3/4,"h").concat(-na,"z"),className:"recharts-legend-icon"});if(J.isValidElement(r.legendIcon)){var h=Vce({},r);return delete h.legendIcon,J.cloneElement(r.legendIcon,h)}return J.createElement(yP,{fill:d,cx:s,cy:s,size:na,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,o=i.iconSize,c=i.layout,d=i.formatter,h=i.inactiveColor,p={x:0,y:0,width:na,height:na},m={display:c==="horizontal"?"inline-block":"block",marginRight:10},v={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(x,w){var b=x.formatter||d,_=jt(em(em({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",x.inactive));if(x.type==="none")return null;var j=mt(x.value)?null:x.value;La(!mt(x.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var C=x.inactive?h:x.color;return J.createElement("li",GC({className:_,style:m,key:"legend-item-".concat(w)},vu(r.props,x,w)),J.createElement(zC,{width:o,height:o,viewBox:p,style:v},r.renderIcon(x)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},b?b(j,x,w):j))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,o=r.align;if(!i||!i.length)return null;var c={padding:0,margin:0,textAlign:s==="horizontal"?o:"left"};return J.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(P.PureComponent);em(vP,"displayName","Legend");em(vP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var V1,DR;function tue(){if(DR)return V1;DR=1;var e=z0();function t(){this.__data__=new e,this.size=0}return V1=t,V1}var K1,$R;function nue(){if($R)return K1;$R=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return K1=e,K1}var G1,FR;function rue(){if(FR)return G1;FR=1;function e(t){return this.__data__.get(t)}return G1=e,G1}var Z1,BR;function iue(){if(BR)return Z1;BR=1;function e(t){return this.__data__.has(t)}return Z1=e,Z1}var Y1,zR;function aue(){if(zR)return Y1;zR=1;var e=z0(),t=lP(),n=cP(),r=200;function i(s,o){var c=this.__data__;if(c instanceof e){var d=c.__data__;
vendor: 11,642 bytes, line 964
964if(!t||d.length<r-1)return d.push([s,o]),this.size=++c.size,this;c=this.__data__=new n(d)}return c.set(s,o),this.size=c.size,this}return Y1=i,Y1}var X1,UR;function ez(){if(UR)return X1;UR=1;var e=z0(),t=tue(),n=nue(),r=rue(),i=iue(),s=aue();function o(c){var d=this.__data__=new e(c);this.size=d.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,X1=o,X1}var Q1,qR;function sue(){if(qR)return Q1;qR=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Q1=t,Q1}var J1,HR;function oue(){if(HR)return J1;HR=1;function e(t){return this.__data__.has(t)}return J1=e,J1}var ej,WR;function tz(){if(WR)return ej;WR=1;var e=cP(),t=sue(),n=oue();function r(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new e;++s<o;)this.add(i[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,ej=r,ej}var tj,VR;function nz(){if(VR)return tj;VR=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return tj=e,tj}var nj,KR;function rz(){if(KR)return nj;KR=1;function e(t,n){return t.has(n)}return nj=e,nj}var rj,GR;function iz(){if(GR)return rj;GR=1;var e=tz(),t=nz(),n=rz(),r=1,i=2;function s(o,c,d,h,p,m){var v=d&r,x=o.length,w=c.length;if(x!=w&&!(v&&w>x))return!1;var b=m.get(o),_=m.get(c);if(b&&_)return b==c&&_==o;var j=-1,C=!0,E=d&i?new e:void 0;for(m.set(o,c),m.set(c,o);++j<x;){var A=o[j],k=c[j];if(h)var M=v?h(k,A,j,c,o,m):h(A,k,j,o,c,m);if(M!==void 0){if(M)continue;C=!1;break}if(E){if(!t(c,function(I,$){if(!n(E,$)&&(A===I||p(A,I,d,h,m)))return E.push($)})){C=!1;break}}else if(!(A===k||p(A,k,d,h,m))){C=!1;break}}return m.delete(o),m.delete(c),C}return rj=s,rj}var ij,ZR;function lue(){if(ZR)return ij;ZR=1;var e=Ps(),t=e.Uint8Array;return ij=t,ij}var aj,YR;function cue(){if(YR)return aj;YR=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,s){r[++n]=[s,i]}),r}return aj=e,aj}var sj,XR;function xP(){if(XR)return sj;XR=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return sj=e,sj}var oj,QR;function uue(){if(QR)return oj;QR=1;var e=ag(),t=lue(),n=oP(),r=iz(),i=cue(),s=xP(),o=1,c=2,d="[object Boolean]",h="[object Date]",p="[object Error]",m="[object Map]",v="[object Number]",x="[object RegExp]",w="[object Set]",b="[object String]",_="[object Symbol]",j="[object ArrayBuffer]",C="[object DataView]",E=e?e.prototype:void 0,A=E?E.valueOf:void 0;function k(M,I,$,q,V,H,U){switch($){case C:if(M.byteLength!=I.byteLength||M.byteOffset!=I.byteOffset)return!1;M=M.buffer,I=I.buffer;case j:return!(M.byteLength!=I.byteLength||!H(new t(M),new t(I)));case d:case h:case v:return n(+M,+I);case p:return M.name==I.name&&M.message==I.message;case x:case b:return M==I+"";case m:var z=i;case w:var Z=q&o;if(z||(z=s),M.size!=I.size&&!Z)return!1;var ee=U.get(M);if(ee)return ee==I;q|=c,U.set(M,I);var G=r(z(M),z(I),q,V,H,U);return U.delete(M),G;case _:if(A)return A.call(M)==A.call(I)}return!1}return oj=k,oj}var lj,JR;function az(){if(JR)return lj;JR=1;function e(t,n){for(var r=-1,i=n.length,s=t.length;++r<i;)t[s+r]=n[r];return t}return lj=e,lj}var cj,eI;function due(){if(eI)return cj;eI=1;var e=az(),t=mi();function n(r,i,s){var o=i(r);return t(r)?o:e(o,s(r))}return cj=n,cj}var uj,tI;function fue(){if(tI)return uj;tI=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=0,o=[];++r<i;){var c=t[r];n(c,r,t)&&(o[s++]=c)}return o}return uj=e,uj}var dj,nI;function hue(){if(nI)return dj;nI=1;function e(){return[]}return dj=e,dj}var fj,rI;function pue(){if(rI)return fj;rI=1;var e=fue(),t=hue(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(c){return r.call(o,c)}))}:t;return fj=s,fj}var hj,iI;function mue(){if(iI)return hj;iI=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return hj=e,hj}var pj,aI;function gue(){if(aI)return pj;aI=1;var e=Po(),t=ko(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return pj=r,pj}var mj,sI;function bP(){if(sI)return mj;sI=1;var e=gue(),t=ko(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return mj=s,mj}var Np={exports:{}},gj,oI;function yue(){if(oI)return gj;oI=1;function e(){return!1}return gj=e,gj}Np.exports;var lI;function sz(){return lI||(lI=1,(function(e,t){var n=Ps(),r=yue(),i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===i,c=o?n.Buffer:void 0,d=c?c.isBuffer:void 0,h=d||r;e.exports=h})(Np,Np.exports)),Np.exports}var yj,cI;function _P(){if(cI)return yj;cI=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var s=typeof r;return i=i??e,!!i&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return yj=n,yj}var vj,uI;function wP(){if(uI)return vj;uI=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return vj=t,vj}var xj,dI;function vue(){if(dI)return xj;dI=1;var e=Po(),t=wP(),n=ko(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",o="[object Date]",c="[object Error]",d="[object Function]",h="[object Map]",p="[object Number]",m="[object Object]",v="[object RegExp]",x="[object Set]",w="[object String]",b="[object WeakMap]",_="[object ArrayBuffer]",j="[object DataView]",C="[object Float32Array]",E="[object Float64Array]",A="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",I="[object Uint8Array]",$="[object Uint8ClampedArray]",q="[object Uint16Array]",V="[object Uint32Array]",H={};H[C]=H[E]=H[A]=H[k]=H[M]=H[I]=H[$]=H[q]=H[V]=!0,H[r]=H[i]=H[_]=H[s]=H[j]=H[o]=H[c]=H[d]=H[h]=H[p]=H[m]=H[v]=H[x]=H[w]=H[b]=!1;function U(z){return n(z)&&t(z.length)&&!!H[e(z)]}return xj=U,xj}var bj,fI;function oz(){if(fI)return bj;fI=1;function e(t){return function(n){return t(n)}}return bj=e,bj}var Cp={exports:{}};Cp.exports;var hI;function xue(){return hI||(hI=1,(function(e,t){var n=E8(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,o=s&&n.process,c=(function(){try{var d=i&&i.require&&i.require("util").types;return d||o&&o.binding&&o.binding("util")}catch{}})();e.exports=c})(Cp,Cp.exports)),Cp.exports}var _j,pI;function lz(){if(pI)return _j;pI=1;var e=vue(),t=oz(),n=xue(),r=n&&n.isTypedArray,i=r?t(r):e;return _j=i,_j}var wj,mI;function bue(){if(mI)return wj;mI=1;var e=mue(),t=bP(),n=mi(),r=sz(),i=_P(),s=lz(),o=Object.prototype,c=o.hasOwnProperty;function d(h,p){var m=n(h),v=!m&&t(h),x=!m&&!v&&r(h),w=!m&&!v&&!x&&s(h),b=m||v||x||w,_=b?e(h.length,String):[],j=_.length;for(var C in h)(p||c.call(h,C))&&!(b&&(C=="length"||x&&(C=="offset"||C=="parent")||w&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||i(C,j)))&&_.push(C);return _}return wj=d,wj}var jj,gI;function _ue(){if(gI)return jj;gI=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return jj=t,jj}var Sj,yI;function cz(){if(yI)return Sj;yI=1;function e(t,n){return function(r){return t(n(r))}}return Sj=e,Sj}var Nj,vI;function wue(){if(vI)return Nj;vI=1;var e=cz(),t=e(Object.keys,Object);return Nj=t,Nj}var Cj,xI;function jue(){if(xI)return Cj;xI=1;var e=_ue(),t=wue(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var o=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&o.push(c);return o}return Cj=i,Cj}var Ej,bI;function sg(){if(bI)return Ej;bI=1;var e=sP(),t=wP();function n(r){return r!=null&&t(r.length)&&!e(r)}return Ej=n,Ej}var Pj,_I;function G0(){if(_I)return Pj;_I=1;var e=bue(),t=jue(),n=sg();function r(i){return n(i)?e(i):t(i)}return Pj=r,Pj}var kj,wI;function Sue(){if(wI)return kj;wI=1;var e=due(),t=pue(),n=G0();function r(i){return e(i,n,t)}return kj=r,kj}var Aj,jI;function Nue(){if(jI)return Aj;jI=1;var e=Sue(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,o,c,d,h,p){var m=c&t,v=e(s),x=v.length,w=e(o),b=w.length;if(x!=b&&!m)return!1;for(var _=x;_--;){var j=v[_];if(!(m?j in o:r.call(o,j)))return!1}var C=p.get(s),E=p.get(o);if(C&&E)return C==o&&E==s;var A=!0;p.set(s,o),p.set(o,s);for(var k=m;++_<x;){j=v[_];var M=s[j],I=o[j];if(d)var $=m?d(I,M,j,o,s,p):d(M,I,j,s,o,p);if(!($===void 0?M===I||h(M,I,c,d,p):$)){A=!1;break}k||(k=j=="constructor")}if(A&&!k){var q=s.constructor,V=o.constructor;q!=V&&"constructor"in s&&"constructor"in o&&!(typeof q=="function"&&q instanceof q&&typeof V=="function"&&V instanceof V)&&(A=!1)}return p.delete(s),p.delete(o),A}return Aj=i,Aj}var Oj,SI;function Cue(){if(SI)return Oj;SI=1;var e=Ou(),t=Ps(),n=e(t,"DataView");return Oj=n,Oj}var Tj,NI;function Eue(){if(NI)return Tj;NI=1;var e=Ou(),t=Ps(),n=e(t,"Promise");return Tj=n,Tj}var Mj,CI;function uz(){if(CI)return Mj;CI=1;var e=Ou(),t=Ps(),n=e(t,"Set");return Mj=n,Mj}var Rj,EI;function Pue(){if(EI)return Rj;EI=1;var e=Ou(),t=Ps(),n=e(t,"WeakMap");return Rj=n,Rj}var Ij,PI;function kue(){if(PI)return Ij;PI=1;var e=Cue(),t=lP(),n=Eue(),r=uz(),i=Pue(),s=Po(),o=P8(),c="[object Map]",d="[object Object]",h="[object Promise]",p="[object Set]",m="[object WeakMap]",v="[object DataView]",x=o(e),w=o(t),b=o(n),_=o(r),j=o(i),C=s;return(e&&C(new e(new ArrayBuffer(1)))!=v||t&&C(new t)!=c||n&&C(n.resolve())!=h||r&&C(new r)!=p||i&&C(new i)!=m)&&(C=function(E){var A=s(E),k=A==d?E.constructor:void 0,M=k?o(k):"";if(M)switch(M){case x:return v;case w:return c;case b:return h;case _:return p;case j:return m}return A}),Ij=C,Ij}var Lj,kI;function Aue(){if(kI)return Lj;kI=1;var e=ez(),t=iz(),n=uue(),r=Nue(),i=kue(),s=mi(),o=sz(),c=lz(),d=1,h="[object Arguments]",p="[object Array]",m="[object Object]",v=Object.prototype,x=v.hasOwnProperty;function w(b,_,j,C,E,A){var k=s(b),M=s(_),I=k?p:i(b),$=M?p:i(_);I=I==h?m:I,$=$==h?m:$;var q=I==m,V=$==m,H=I==$;if(H&&o(b)){if(!o(_))return!1;k=!0,q=!1}if(H&&!q)return A||(A=new e),k||c(b)?t(b,_,j,C,E,A):n(b,_,I,j,C,E,A);if(!(j&d)){var U=q&&x.call(b,"__wrapped__"),z=V&&x.call(_,"__wrapped__");if(U||z){var Z=U?b.value():b,ee=z?_.value():_;return A||(A=new e),E(Z,ee,j,C,A)}}return H?(A||(A=new e),r(b,_,j,C,E,A)):!1}return Lj=w,Lj}var Dj,AI;function jP(){if(AI)return Dj;AI=1;var e=Aue(),t=ko();function n(r,i,s,o,c){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,s,o,n,c)}return Dj=n,Dj}var $j,OI;function Oue(){if(OI)return $j;OI=1;var e=ez(),t=jP(),n=1,r=2;function i(s,o,c,d){var h=c.length,p=h,m=!d;if(s==null)return!p;for(s=Object(s);h--;){var v=c[h];if(m&&v[2]?v[1]!==s[v[0]]:!(v[0]in s))return!1}for(;++h<p;){v=c[h];var x=v[0],w=s[x],b=v[1];if(m&&v[2]){if(w===void 0&&!(x in s))return!1}else{var _=new e;if(d)var j=d(w,b,x,s,o,_);if(!(j===void 0?t(b,w,n|r,d,_):j))return!1}}return!0}return $j=i,$j}var Fj,TI;function dz(){if(TI)return Fj;TI=1;var e=Vl();function t(n){return n===n&&!e(n)}return Fj=t,Fj}var Bj,MI;function Tue(){if(MI)return Bj;MI=1;var e=dz(),t=G0();function n(r){for(var i=t(r),s=i.length;s--;){var o=i[s],c=r[o];i[s]=[o,c,e(c)]}return i}return Bj=n,Bj}var zj,RI;function fz(){if(RI)return zj;RI=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return zj=e,zj}var Uj,II;function Mue(){if(II)return Uj;II=1;var e=Oue(),t=Tue(),n=fz();function r(i){var s=t(i);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(o){return o===i||e(o,i,s)}}return Uj=r,Uj}var qj,LI;function Rue(){if(LI)return qj;LI=1;function e(t,n){return t!=null&&n in Object(t)}return qj=e,qj}var Hj,DI;function Iue(){if(DI)return Hj;DI=1;var e=O8(),t=bP(),n=mi(),r=_P(),i=wP(),s=q0();function o(c,d,h){d=e(d,c);for(var p=-1,m=d.length,v=!1;++p<m;){var x=s(d[p]);if(!(v=c!=null&&h(c,x)))break;c=c[x]}return v||++p!=m?v:(m=c==null?0:c.length,!!m&&i(m)&&r(x,m)&&(n(c)||t(c))
vendor: 45,058 bytes, lines 964-972
964)}return Hj=o,Hj}var Wj,$I;function Lue(){if($I)return Wj;$I=1;var e=Rue(),t=Iue();function n(r,i){return r!=null&&t(r,i,e)}return Wj=n,Wj}var Vj,FI;function Due(){if(FI)return Vj;FI=1;var e=jP(),t=T8(),n=Lue(),r=aP(),i=dz(),s=fz(),o=q0(),c=1,d=2;function h(p,m){return r(p)&&i(m)?s(o(p),m):function(v){var x=t(v,p);return x===void 0&&x===m?n(v,p):e(m,x,c|d)}}return Vj=h,Vj}var Kj,BI;function ah(){if(BI)return Kj;BI=1;function e(t){return t}return Kj=e,Kj}var Gj,zI;function $ue(){if(zI)return Gj;zI=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Gj=e,Gj}var Zj,UI;function Fue(){if(UI)return Zj;UI=1;var e=dP();function t(n){return function(r){return e(r,n)}}return Zj=t,Zj}var Yj,qI;function Bue(){if(qI)return Yj;qI=1;var e=$ue(),t=Fue(),n=aP(),r=q0();function i(s){return n(s)?e(r(s)):t(s)}return Yj=i,Yj}var Xj,HI;function ks(){if(HI)return Xj;HI=1;var e=Mue(),t=Due(),n=ah(),r=mi(),i=Bue();function s(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return Xj=s,Xj}var Qj,WI;function hz(){if(WI)return Qj;WI=1;function e(t,n,r,i){for(var s=t.length,o=r+(i?1:-1);i?o--:++o<s;)if(n(t[o],o,t))return o;return-1}return Qj=e,Qj}var Jj,VI;function zue(){if(VI)return Jj;VI=1;function e(t){return t!==t}return Jj=e,Jj}var eS,KI;function Uue(){if(KI)return eS;KI=1;function e(t,n,r){for(var i=r-1,s=t.length;++i<s;)if(t[i]===n)return i;return-1}return eS=e,eS}var tS,GI;function que(){if(GI)return tS;GI=1;var e=hz(),t=zue(),n=Uue();function r(i,s,o){return s===s?n(i,s,o):e(i,t,o)}return tS=r,tS}var nS,ZI;function Hue(){if(ZI)return nS;ZI=1;var e=que();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return nS=t,nS}var rS,YI;function Wue(){if(YI)return rS;YI=1;function e(t,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;)if(r(n,t[i]))return!0;return!1}return rS=e,rS}var iS,XI;function Vue(){if(XI)return iS;XI=1;function e(){}return iS=e,iS}var aS,QI;function Kue(){if(QI)return aS;QI=1;var e=uz(),t=Vue(),n=xP(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(s){return new e(s)}:t;return aS=i,aS}var sS,JI;function Gue(){if(JI)return sS;JI=1;var e=tz(),t=Hue(),n=Wue(),r=rz(),i=Kue(),s=xP(),o=200;function c(d,h,p){var m=-1,v=t,x=d.length,w=!0,b=[],_=b;if(p)w=!1,v=n;else if(x>=o){var j=h?null:i(d);if(j)return s(j);w=!1,v=r,_=new e}else _=h?[]:b;e:for(;++m<x;){var C=d[m],E=h?h(C):C;if(C=p||C!==0?C:0,w&&E===E){for(var A=_.length;A--;)if(_[A]===E)continue e;h&&_.push(E),b.push(C)}else v(_,E,p)||(_!==b&&_.push(E),b.push(C))}return b}return sS=c,sS}var oS,eL;function Zue(){if(eL)return oS;eL=1;var e=ks(),t=Gue();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return oS=n,oS}var Yue=Zue();const tL=Kt(Yue);function pz(e,t,n){return t===!0?tL(e,n):mt(t)?tL(e,t):e}function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gf(e)}var Xue=["ref"];function nL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nL(Object(n),!0).forEach(function(r){Z0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Que(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gz(r.key),r)}}function Jue(e,t,n){return t&&rL(e.prototype,t),n&&rL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ede(e,t,n){return t=ax(t),tde(e,mz()?Reflect.construct(t,n||[],ax(e).constructor):t.apply(e,n))}function tde(e,t){if(t&&(gf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nde(e)}function nde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mz=function(){return!!e})()}function ax(e){return ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ax(e)}function rde(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&&YC(e,t)}function YC(e,t){return YC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YC(e,t)}function Z0(e,t,n){return t=gz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gz(e){var t=ide(e,"string");return gf(t)=="symbol"?t:t+""}function ide(e,t){if(gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ade(e,t){if(e==null)return{};var n=sde(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ode(e){return e.value}function lde(e,t){if(J.isValidElement(e))return J.cloneElement(e,t);if(typeof e=="function")return J.createElement(e,t);t.ref;var n=ade(t,Xue);return J.createElement(vP,n)}var iL=1,iu=(function(e){function t(){var n;Que(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=ede(this,t,[].concat(i)),Z0(n,"lastBoundingBox",{width:-1,height:-1}),n}return rde(t,e),Jue(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>iL||Math.abs(i.height-this.lastBoundingBox.height)>iL)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?eo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,o=i.align,c=i.verticalAlign,d=i.margin,h=i.chartWidth,p=i.chartHeight,m,v;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&s==="vertical"){var x=this.getBBoxSnapshot();m={left:((h||0)-x.width)/2}}else m=o==="right"?{right:d&&d.right||0}:{left:d&&d.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var w=this.getBBoxSnapshot();v={top:((p||0)-w.height)/2}}else v=c==="bottom"?{bottom:d&&d.bottom||0}:{top:d&&d.top||0};return eo(eo({},m),v)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,o=i.width,c=i.height,d=i.wrapperStyle,h=i.payloadUniqBy,p=i.payload,m=eo(eo({position:"absolute",width:o||"auto",height:c||"auto"},this.getDefaultPosition(d)),d);return J.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:function(x){r.wrapperNode=x}},lde(s,eo(eo({},this.props),{},{payload:pz(p,h,ode)})))}}],[{key:"getWithHeight",value:function(r,i){var s=eo(eo({},this.defaultProps),r.props),o=s.layout;return o==="vertical"&&De(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(P.PureComponent);Z0(iu,"displayName","Legend");Z0(iu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var lS,aL;function cde(){if(aL)return lS;aL=1;var e=ag(),t=bP(),n=mi(),r=e?e.isConcatSpreadable:void 0;function i(s){return n(s)||t(s)||!!(r&&s&&s[r])}return lS=i,lS}var cS,sL;function yz(){if(sL)return cS;sL=1;var e=az(),t=cde();function n(r,i,s,o,c){var d=-1,h=r.length;for(s||(s=t),c||(c=[]);++d<h;){var p=r[d];i>0&&s(p)?i>1?n(p,i-1,s,o,c):e(c,p):o||(c[c.length]=p)}return c}return cS=n,cS}var uS,oL;function ude(){if(oL)return uS;oL=1;function e(t){return function(n,r,i){for(var s=-1,o=Object(n),c=i(n),d=c.length;d--;){var h=c[t?d:++s];if(r(o[h],h,o)===!1)break}return n}}return uS=e,uS}var dS,lL;function dde(){if(lL)return dS;lL=1;var e=ude(),t=e();return dS=t,dS}var fS,cL;function vz(){if(cL)return fS;cL=1;var e=dde(),t=G0();function n(r,i){return r&&e(r,i,t)}return fS=n,fS}var hS,uL;function fde(){if(uL)return hS;uL=1;var e=sg();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var o=i.length,c=r?o:-1,d=Object(i);(r?c--:++c<o)&&s(d[c],c,d)!==!1;);return i}}return hS=t,hS}var pS,dL;function SP(){if(dL)return pS;dL=1;var e=vz(),t=fde(),n=t(e);return pS=n,pS}var mS,fL;function xz(){if(fL)return mS;fL=1;var e=SP(),t=sg();function n(r,i){var s=-1,o=t(r)?Array(r.length):[];return e(r,function(c,d,h){o[++s]=i(c,d,h)}),o}return mS=n,mS}var gS,hL;function hde(){if(hL)return gS;hL=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return gS=e,gS}var yS,pL;function pde(){if(pL)return yS;pL=1;var e=th();function t(n,r){if(n!==r){var i=n!==void 0,s=n===null,o=n===n,c=e(n),d=r!==void 0,h=r===null,p=r===r,m=e(r);if(!h&&!m&&!c&&n>r||c&&d&&p&&!h&&!m||s&&d&&p||!i&&p||!o)return 1;if(!s&&!c&&!m&&n<r||m&&i&&o&&!s&&!c||h&&i&&o||!d&&o||!p)return-1}return 0}return yS=t,yS}var vS,mL;function mde(){if(mL)return vS;mL=1;var e=pde();function t(n,r,i){for(var s=-1,o=n.criteria,c=r.criteria,d=o.length,h=i.length;++s<d;){var p=e(o[s],c[s]);if(p){if(s>=h)return p;var m=i[s];return p*(m=="desc"?-1:1)}}return n.index-r.index}return vS=t,vS}var xS,gL;function gde(){if(gL)return xS;gL=1;var e=uP(),t=dP(),n=ks(),r=xz(),i=hde(),s=oz(),o=mde(),c=ah(),d=mi();function h(p,m,v){m.length?m=e(m,function(b){return d(b)?function(_){return t(_,b.length===1?b[0]:b)}:b}):m=[c];var x=-1;m=e(m,s(n));var w=r(p,function(b,_,j){var C=e(m,function(E){return E(b)});return{criteria:C,index:++x,value:b}});return i(w,function(b,_){return o(b,_,v)})}return xS=h,xS}var bS,yL;function yde(){if(yL)return bS;yL=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return bS=e,bS}var _S,vL;function vde(){if(vL)return _S;vL=1;var e=yde(),t=Math.max;function n(r,i,s){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,c=-1,d=t(o.length-i,0),h=Array(d);++c<d;)h[c]=o[i+c];c=-1;for(var p=Array(i+1);++c<i;)p[c]=o[c];return p[i]=s(h),e(r,this,p)}}return _S=n,_S}var wS,xL;function xde(){if(xL)return wS;xL=1;function e(t){return function(){return t}}return wS=e,wS}var jS,bL;function bz(){if(bL)return jS;bL=1;var e=Ou(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return jS=t,jS}var SS,_L;function bde(){if(_L)return SS;_L=1;var e=xde(),t=bz(),n=ah(),r=t?function(i,s){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return SS=r,SS}var NS,wL;function _de(){if(wL)return NS;wL=1;var e=800,t=16,n=Date.now;function r(i){var s=0,o=0;return function(){var c=n(),d=t-(c-o);if(o=c,d>0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return NS=r,NS}var CS,jL;function wde(){if(jL)return CS;jL=1;var e=bde(),t=_de(),n=t(e);return CS=n,CS}var ES,SL;function jde(){if(SL)return ES;SL=1;var e=ah(),t=vde(),n=wde();function r(i,s){return n(t(i,s,e),i+"")}return ES=r,ES}var PS,NL;function Y0(){if(NL)return PS;NL=1;var e=oP(),t=sg(),n=_P(),r=Vl();function i(s,o,c){if(!r(c))return!1;var d=typeof o;return(d=="number"?t(c)&&n(o,c.length):d=="string"&&o in c)?e(c[o],s):!1}return PS=i,PS}var kS,CL;function Sde(){if(CL)return kS;CL=1;var e=yz(),t=gde(),n=jde(),r=Y0(),i=n(function(s,o){if(s==null)return[];var c=o.length;return c>1&&r(s,o[0],o[1])?o=[]:c>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(s,e(o,1),[])});return kS=i,kS}var Nde=Sde();const NP=Kt(Nde);function tm(e){"@babel/helpers - typeof";return tm=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},tm(e)}function XC(){return XC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XC.apply(this,arguments)}function Cde(e,t){return Ade(e)||kde(e,t)||Pde(e,t)||Ede()}function Ede(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
965In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pde(e,t){if(e){if(typeof e=="string")return EL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EL(e,t)}}function EL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function Ade(e){if(Array.isArray(e))return e}function PL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function AS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PL(Object(n),!0).forEach(function(r){Ode(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ode(e,t,n){return t=Tde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tde(e){var t=Mde(e,"string");return tm(t)=="symbol"?t:t+""}function Mde(e,t){if(tm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rde(e){return Array.isArray(e)&&Jn(e[0])&&Jn(e[1])?e.join(" ~ "):e}var Ide=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,s=i===void 0?{}:i,o=t.itemStyle,c=o===void 0?{}:o,d=t.labelStyle,h=d===void 0?{}:d,p=t.payload,m=t.formatter,v=t.itemSorter,x=t.wrapperClassName,w=t.labelClassName,b=t.label,_=t.labelFormatter,j=t.accessibilityLayer,C=j===void 0?!1:j,E=function(){if(p&&p.length){var U={padding:0,margin:0},z=(v?NP(p,v):p).map(function(Z,ee){if(Z.type==="none")return null;var G=AS({display:"block",paddingTop:4,paddingBottom:4,color:Z.color||"#000"},c),oe=Z.formatter||m||Rde,W=Z.value,ie=Z.name,ae=W,K=ie;if(oe&&ae!=null&&K!=null){var ne=oe(W,ie,Z,ee,p);if(Array.isArray(ne)){var ve=Cde(ne,2);ae=ve[0],K=ve[1]}else ae=ne}return J.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(ee),style:G},Jn(K)?J.createElement("span",{className:"recharts-tooltip-item-name"},K):null,Jn(K)?J.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,J.createElement("span",{className:"recharts-tooltip-item-value"},ae),J.createElement("span",{className:"recharts-tooltip-item-unit"},Z.unit||""))});return J.createElement("ul",{className:"recharts-tooltip-item-list",style:U},z)}return null},A=AS({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),k=AS({margin:0},h),M=!St(b),I=M?b:"",$=jt("recharts-default-tooltip",x),q=jt("recharts-tooltip-label",w);M&&_&&p!==void 0&&p!==null&&(I=_(b,p));var V=C?{role:"status","aria-live":"assertive"}:{};return J.createElement("div",XC({className:$,style:A},V),J.createElement("p",{className:q,style:k},J.isValidElement(I)?I:"".concat(I)),E())};function nm(e){"@babel/helpers - typeof";return nm=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},nm(e)}function Yy(e,t,n){return t=Lde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lde(e){var t=Dde(e,"string");return nm(t)=="symbol"?t:t+""}function Dde(e,t){if(nm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var up="recharts-tooltip-wrapper",$de={visibility:"hidden"};function Fde(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return jt(up,Yy(Yy(Yy(Yy({},"".concat(up,"-right"),De(n)&&t&&De(t.x)&&n>=t.x),"".concat(up,"-left"),De(n)&&t&&De(t.x)&&n<t.x),"".concat(up,"-bottom"),De(r)&&t&&De(t.y)&&r>=t.y),"".concat(up,"-top"),De(r)&&t&&De(t.y)&&r<t.y))}function kL(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,s=e.position,o=e.reverseDirection,c=e.tooltipDimension,d=e.viewBox,h=e.viewBoxDimension;if(s&&De(s[r]))return s[r];var p=n[r]-c-i,m=n[r]+i;if(t[r])return o[r]?p:m;if(o[r]){var v=p,x=d[r];return v<x?Math.max(m,d[r]):Math.max(p,d[r])}var w=m+c,b=d[r]+h;return w>b?Math.max(p,d[r]):Math.max(m,d[r])}function Bde(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function zde(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,o=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox,h,p,m;return o.height>0&&o.width>0&&n?(p=kL({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:o.width,viewBox:d,viewBoxDimension:d.width}),m=kL({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:o.height,viewBox:d,viewBoxDimension:d.height}),h=Bde({translateX:p,translateY:m,useTranslate3d:c})):h=$de,{cssProperties:h,cssClasses:Fde({translateX:p,translateY:m,coordinate:n})}}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 AL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function OL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AL(Object(n),!0).forEach(function(r){JC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ude(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wz(r.key),r)}}function Hde(e,t,n){return t&&qde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wde(e,t,n){return t=sx(t),Vde(e,_z()?Reflect.construct(t,n||[],sx(e).constructor):t.apply(e,n))}function Vde(e,t){if(t&&(yf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kde(e)}function Kde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_z=function(){return!!e})()}function sx(e){return sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sx(e)}function Gde(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&&QC(e,t)}function QC(e,t){return QC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},QC(e,t)}function JC(e,t,n){return t=wz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wz(e){var t=Zde(e,"string");return yf(t)=="symbol"?t:t+""}function Zde(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TL=1,Yde=(function(e){function t(){var n;Ude(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Wde(this,t,[].concat(i)),JC(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),JC(n,"handleKeyDown",function(o){if(o.key==="Escape"){var c,d,h,p;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(c=(d=n.props.coordinate)===null||d===void 0?void 0:d.x)!==null&&c!==void 0?c:0,y:(h=(p=n.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&h!==void 0?h:0}})}}),n}return Gde(t,e),Hde(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>TL||Math.abs(r.height-this.state.lastBoundingBox.height)>TL)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,o=i.allowEscapeViewBox,c=i.animationDuration,d=i.animationEasing,h=i.children,p=i.coordinate,m=i.hasPayload,v=i.isAnimationActive,x=i.offset,w=i.position,b=i.reverseDirection,_=i.useTranslate3d,j=i.viewBox,C=i.wrapperStyle,E=zde({allowEscapeViewBox:o,coordinate:p,offsetTopLeft:x,position:w,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:_,viewBox:j}),A=E.cssClasses,k=E.cssProperties,M=OL(OL({transition:v&&s?"transform ".concat(c,"ms ").concat(d):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&m?"visible":"hidden",position:"absolute",top:0,left:0},C);return J.createElement("div",{tabIndex:-1,className:A,style:M,ref:function($){r.wrapperNode=$}},h)}}])})(P.PureComponent),Xde=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Tu={isSsr:Xde()};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 ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ML(Object(n),!0).forEach(function(r){CP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ML(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sz(r.key),r)}}function efe(e,t,n){return t&&Jde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tfe(e,t,n){return t=ox(t),nfe(e,jz()?Reflect.construct(t,n||[],ox(e).constructor):t.apply(e,n))}function nfe(e,t){if(t&&(vf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rfe(e)}function rfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jz=function(){return!!e})()}function ox(e){return ox=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ox(e)}function ife(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&&eE(e,t)}function eE(e,t){return eE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eE(e,t)}function CP(e,t,n){return t=Sz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sz(e){var t=afe(e,"string");return vf(t)=="symbol"?t:t+""}function afe(e,t){if(vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function sfe(e){return e.dataKey}function ofe(e,t){return J.isValidElement(e)?J.cloneElement(e,t):typeof e=="function"?J.createElement(e,t):J.createElement(Ide,t)}var cr=(function(e){function t(){return Qde(this,t),tfe(this,t,arguments)}return ife(t,e),efe(t,[{key:"render",value:function(){var r=this,i=this.props,s=i.active,o=i.allowEscapeViewBox,c=i.animationDuration,d=i.animationEasing,h=i.content,p=i.coordinate,m=i.filterNull,v=i.isAnimationActive,x=i.offset,w=i.payload,b=i.payloadUniqBy,_=i.position,j=i.reverseDirection,C=i.useTranslate3d,E=i.viewBox,A=i.wrapperStyle,k=w??[];m&&k.length&&(k=pz(w.filter(function(I){return I.value!=null&&(I.hide!==!0||r.props.includeHidden)}),b,sfe));var M=k.length>0;return J.createElement(Yde,{allowEscapeViewBox:o,animationDuration:c,animationEasing:d,isAnimationActive:v,active:s,coordinate:p,hasPayload:M,offset:x,position:_,reverseDirection:j,useTranslate3d:C,viewBox:E,wrapperStyle:A},ofe(h,RL(RL({},this.props),{},{payload:k})))}}])})(P.PureComponent);CP(cr,"displayName","Tooltip");CP(cr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Tu.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 OS,IL;function lfe(){if(IL)return OS;IL=1;var e=Ps(),t=function(){return e.Date.now()};return OS=t,OS}var TS,LL;function cfe(){if(LL)return TS;LL=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return TS=t,TS}var MS,DL;function ufe(){if(DL)return MS;DL=1;var e=cfe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return MS=n,MS}var RS,$L;function Nz(){if($L)return RS;$L=1;var e=ufe(),t=Vl(),n=th(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,c=parseInt;function d(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=t(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=e(h);var m=s.test(h);return m||o.test(h)?c(h.slice(2),m?2:8):i.test(h)?r:+h}return RS=d,RS}var IS,FL;function dfe(){if(FL)return IS;FL=1;var e=Vl(),t=lfe(),n=Nz(),r="Expected a function",i=Math.max,s=Math.min;function o(c,d,h){var p,m,v,x,w,b,_=0,j=!1,C=!1,E=!0;if(typeof c!="function")throw new TypeError(r);d=n(d)||0,e(h)&&(j=!!h.leading,C="maxWait"in h,v=C?i(n(h.maxWait)||0,d):v,E="trailing"in h?!!h.trailing:E);function A(z){var Z=p,ee=m;return p=m=void 0,_=z,x=c.apply(ee,Z),x}function k(z){return _=z,w=setTimeout($,d),j?A(z):x}function M(z){var Z=z-b,ee=z-_,G=d-Z;return C?s(G,v-ee):G}function I(z){var Z=z-b,ee=z-_;return b===void 0||Z>=d||Z<0||C&&ee>=v}function $(){var z=t();if(I(z))return q(z);w=setTimeout($,M(z))}function q(z){return w=void 0,E&&p?A(z):(p=m=void 0,x)}function V(){w!==void 0&&clearTimeout(w),_=0,p=b=m=w=void 0}function H(){return w===void 0?x:q(t())}function U(){var z=t(),Z=I(z);if(p=arguments,m=this,b=z,Z){if(w===void 0)return k(b);if(C)return clearTimeout(w),w=setTimeout($,d),A(b)}return w===void 0&&(w=setTimeout($,d)),x}return U.cancel=V,U.flush=H,U}return IS=o,IS}var LS,BL;function ffe(){if(BL)return LS;BL=1;var e=dfe(),t=Vl(),n="Expected a function";function r(i,s,o){var c=!0,d=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(c="leading"in o?!!o.leading:c,d="trailing"in o?!!o.trailing:d),e(i,s,{leading:c,maxWait:s,trailing:d})}return LS=r,LS}var hfe=ffe();const Cz=Kt(hfe);function rm(e){"@babel/helpers - typeof";return rm=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},rm(e)}function zL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zL(Object(n),!0).forEach(function(r){pfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pfe(e,t,n){return t=mfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mfe(e){var t=gfe(e,"string");return rm(t)=="symbol"?t:t+""}function gfe(e,t){if(rm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yfe(e,t){return _fe(e)||bfe(e,t)||xfe(e,t)||vfe()}function vfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
966In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xfe(e,t){if(e){if(typeof e=="string")return UL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UL(e,t)}}function UL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function _fe(e){if(Array.isArray(e))return e}var go=P.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,s=e.width,o=s===void 0?"100%":s,c=e.height,d=c===void 0?"100%":c,h=e.minWidth,p=h===void 0?0:h,m=e.minHeight,v=e.maxHeight,x=e.children,w=e.debounce,b=w===void 0?0:w,_=e.id,j=e.className,C=e.onResize,E=e.style,A=E===void 0?{}:E,k=P.useRef(null),M=P.useRef();M.current=C,P.useImperativeHandle(t,function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})});var I=P.useState({containerWidth:i.width,containerHeight:i.height}),$=yfe(I,2),q=$[0],V=$[1],H=P.useCallback(function(z,Z){V(function(ee){var G=Math.round(z),oe=Math.round(Z);return ee.containerWidth===G&&ee.containerHeight===oe?ee:{containerWidth:G,containerHeight:oe}})},[]);P.useEffect(function(){var z=function(ie){var ae,K=ie[0].contentRect,ne=K.width,ve=K.height;H(ne,ve),(ae=M.current)===null||ae===void 0||ae.call(M,ne,ve)};b>0&&(z=Cz(z,b,{trailing:!0,leading:!1}));var Z=new ResizeObserver(z),ee=k.current.getBoundingClientRect(),G=ee.width,oe=ee.height;return H(G,oe),Z.observe(k.current),function(){Z.disconnect()}},[H,b]);var U=P.useMemo(function(){var z=q.containerWidth,Z=q.containerHeight;if(z<0||Z<0)return null;La(Uc(o)||Uc(d),`The width(%s) and height(%s) are both fixed numbers,
967       maybe you don't need to use a ResponsiveContainer.`,o,d),La(!n||n>0,"The aspect(%s) must be greater than zero.",n);var ee=Uc(o)?z:o,G=Uc(d)?Z:d;n&&n>0&&(ee?G=ee/n:G&&(ee=G*n),v&&G>v&&(G=v)),La(ee>0||G>0,`The width(%s) and height(%s) of chart should be greater than 0,
968       please check the style of container, or the props width(%s) and height(%s),
969       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
970       height and width.`,ee,G,o,d,p,m,n);var oe=!Array.isArray(x)&&mo(x.type).endsWith("Chart");return J.Children.map(x,function(W){return J.isValidElement(W)?P.cloneElement(W,Xy({width:ee,height:G},oe?{style:Xy({height:"100%",width:"100%",maxHeight:G,maxWidth:ee},W.props.style)}:{})):W})},[n,x,d,v,m,p,q,o]);return J.createElement("div",{id:_?"".concat(_):void 0,className:jt("recharts-responsive-container",j),style:Xy(Xy({},A),{},{width:o,height:d,minWidth:p,minHeight:m,maxHeight:v}),ref:k},U)}),xu=function(t){return null};xu.displayName="Cell";function im(e){"@babel/helpers - typeof";return im=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},im(e)}function qL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qL(Object(n),!0).forEach(function(r){wfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wfe(e,t,n){return t=jfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jfe(e){var t=Sfe(e,"string");return im(t)=="symbol"?t:t+""}function Sfe(e,t){if(im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Md={widthCache:{},cacheCount:0},Nfe=2e3,Cfe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},HL="recharts_measurement_span";function Efe(e){var t=tE({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Mp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Tu.isSsr)return{width:0,height:0};var r=Efe(n),i=JSON.stringify({text:t,copyStyle:r});if(Md.widthCache[i])return Md.widthCache[i];try{var s=document.getElementById(HL);s||(s=document.createElement("span"),s.setAttribute("id",HL),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var o=tE(tE({},Cfe),r);Object.assign(s.style,o),s.textContent="".concat(t);var c=s.getBoundingClientRect(),d={width:c.width,height:c.height};return Md.widthCache[i]=d,++Md.cacheCount>Nfe&&(Md.cacheCount=0,Md.widthCache={}),d}catch{return{width:0,height:0}}},Pfe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function am(e){"@babel/helpers - typeof";return am=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},am(e)}function lx(e,t){return Tfe(e)||Ofe(e,t)||Afe(e,t)||kfe()}function kfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
971In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Afe(e,t){if(e){if(typeof e=="string")return WL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WL(e,t)}}function WL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ofe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function Tfe(e){if(Array.isArray(e))return e}function Mfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ife(r.key),r)}}function Rfe(e,t,n){return t&&VL(e.prototype,t),n&&VL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ife(e){var t=Lfe(e,"string");return am(t)=="symbol"?t:t+""}function Lfe(e,t){if(am(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,GL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Dfe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,$fe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ez={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Ffe=Object.keys(Ez),Dd="NaN";function Bfe(e,t){return e*Ez[t]}var Qy=(function(){function e(t,n){Mfe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Dfe.test(n)&&(this.num=NaN,this.unit=""),Ffe.includes(n)&&(this.num=Bfe(t,n),this.unit="px")}return Rfe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=$fe.exec(n))!==null&&r!==void 0?r:[],s=lx(i,3),o=s[1],c=s[2];return new e(parseFloat(o),c??"")}}])})();function Pz(e){if(e.includes(Dd))return Dd;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=KL.exec(t))!==null&&n!==void 0?n:[],i=lx(r,4),s=i[1],o=i[2],c=i[3],d=Qy.parse(s??""),h=Qy.parse(c??""),p=o==="*"?d.multiply(h):d.divide(h);if(p.isNaN())return Dd;t=t.replace(KL,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var m,v=(m=GL.exec(t))!==null&&m!==void 0?m:[],x=lx(v,4),w=x[1],b=x[2],_=x[3],j=Qy.parse(w??""),C=Qy.parse(_??""),E=b==="+"?j.add(C):j.subtract(C);if(E.isNaN())return Dd;t=t.replace(GL,E.toString())}return t}var ZL=/\(([^()]*)\)/;function zfe(e){for(var t=e;t.includes("(");){var n=ZL.exec(t),r=lx(n,2),i=r[1];t=t.replace(ZL,Pz(i))}return t}function Ufe(e){var t=e.replace(/\s+/g,"");return t=zfe(t),t=Pz(t),t}function qfe(e){try{return Ufe(e)}catch{return Dd}}function DS(e){var t=qfe(e.slice(5,-1));return t===Dd?"":t}var Hfe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Wfe=["dx","dy","angle","className","breakAll"];function nE(){return nE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nE.apply(this,arguments)}function YL(e,t){if(e==null)return{};var n=Vfe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function XL(e,t){return Yfe(e)||Zfe(e,t)||Gfe(e,t)||Kfe()}function Kfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
972In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gfe(e,t){if(e){if(typeof e=="string")return QL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QL(e,t)}}function QL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function Yfe(e){if(Array.isArray(e))return e}var kz=/[ \f\n\r\t\v\u2028\u2029]+/,Az=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var s=[];St(n)||(r?s=n.toString().split(""):s=n.toString().split(kz));var o=s.map(function(d){return{word:d,width:Mp(d,i).width}}),c=r?0:Mp(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}},Xfe=function(t,n,r,i,s){var o=t.maxLines,c=t.children,d=t.style,h=t.breakAll,p=De(o),m=c,v=function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ee.reduce(function(G,oe){var W=oe.word,ie=oe.width,ae=G[G.length-1];if(ae&&(i==null||s||ae.width+ie+r<Number(i)))ae.words.push(W),ae.width+=ie+r;else{var K={words:[W],width:ie};G.push(K)}return G},[])},x=v(n),w=function(ee){return ee.reduce(function(G,oe){return G.width>oe.width?G:oe})};if(!p)return x;for(var b="…",_=function(ee){var G=m.slice(0,ee),oe=Az({breakAll:h,style:d,children:G+b}).wordsWithComputedWidth,W=v(oe),ie=W.length>
972o||w(W).width>Number(i);return[ie,W]},j=0,C=m.length-1,E=0,A;j<=C&&E<=m.length-1;){var k=Math.floor((j+C)/2),M=k-1,I=_(M),$=XL(I,2),q=$[0],V=$[1],H=_(k),U=XL(H,1),z=U[0];if(!q&&!z&&(j=k+1),q&&z&&(C=k-1),!q&&z){A=V;break}E++}return A||x},JL=function(t){var n=St(t)?[]:t.toString().split(kz);return[{words:n}]},Qfe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,o=t.breakAll,c=t.maxLines;if((n||r)&&!Tu.isSsr){var d,h,p=Az({breakAll:o,children:i,style:s});if(p){var m=p.wordsWithComputedWidth,v=p.spaceWidth;d=m,h=v}else return JL(i);return Xfe({breakAll:o,children:i,maxLines:c,style:s},d,h,n,r)}return JL(i)},eD="#808080",bu=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,o=t.lineHeight,c=o===void 0?"1em":o,d=t.capHeight,h=d===void 0?"0.71em":d,p=t.scaleToFit,m=p===void 0?!1:p,v=t.textAnchor,x=v===void 0?"start":v,w=t.verticalAnchor,b=w===void 0?"end":w,_=t.fill,j=_===void 0?eD:_,C=YL(t,Hfe),E=P.useMemo(function(){return Qfe({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:m,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,m,C.style,C.width]),A=C.dx,k=C.dy,M=C.angle,I=C.className,$=C.breakAll,q=YL(C,Wfe);if(!Jn(r)||!Jn(s))return null;var V=r+(De(A)?A:0),H=s+(De(k)?k:0),U;switch(b){case"start":U=DS("calc(".concat(h,")"));break;case"middle":U=DS("calc(".concat((E.length-1)/2," * -").concat(c," + (").concat(h," / 2))"));break;default:U=DS("calc(".concat(E.length-1," * -").concat(c,")"));break}var z=[];if(m){var Z=E[0].width,ee=C.width;z.push("scale(".concat((De(ee)?ee/Z:1)/Z,")"))}return M&&z.push("rotate(".concat(M,", ").concat(V,", ").concat(H,")")),z.length&&(q.transform=z.join(" ")),J.createElement("text",nE({},ct(q,!0),{x:V,y:H,className:jt("recharts-text",I),textAnchor:x,fill:j.includes("url")?eD:j}),E.map(function(G,oe){var W=G.words.join($?"":" ");return J.createElement("tspan",{x:V,dy:oe===0?U:c,key:"".concat(W,"-").concat(oe)},W)}))};function Ll(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Jfe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function EP(e){let t,n,r;e.length!==2?(t=Ll,n=(c,d)=>Ll(e(c),d),r=(c,d)=>e(c)-d):(t=e===Ll||e===Jfe?e:ehe,n=e,r=e);function i(c,d,h=0,p=c.length){if(h<p){if(t(d,d)!==0)return p;do{const m=h+p>>>1;n(c[m],d)<0?h=m+1:p=m}while(h<p)}return h}function s(c,d,h=0,p=c.length){if(h<p){if(t(d,d)!==0)return p;do{const m=h+p>>>1;n(c[m],d)<=0?h=m+1:p=m}while(h<p)}return h}function o(c,d,h=0,p=c.length){const m=i(c,d,h,p-1);return m>h&&r(c[m-1],d)>-r(c[m],d)?m-1:m}return{left:i,center:o,right:s}}function ehe(){return 0}function Oz(e){return e===null?NaN:+e}function*the(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const nhe=EP(Ll),og=nhe.right;EP(Oz).center;class tD extends Map{constructor(t,n=ahe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(nD(this,t))}has(t){return super.has(nD(this,t))}set(t,n){return super.set(rhe(this,t),n)}delete(t){return super.delete(ihe(this,t))}}function nD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function rhe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ihe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ahe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function she(e=Ll){if(e===Ll)return Tz;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Tz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const ohe=Math.sqrt(50),lhe=Math.sqrt(10),che=Math.sqrt(2);function cx(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=ohe?10:s>=lhe?5:s>=che?2:1;let c,d,h;return i<0?(h=Math.pow(10,-i)/o,c=Math.round(e*h),d=Math.round(t*h),c/h<e&&++c,d/h>t&&--d,h=-h):(h=Math.pow(10,i)*o,c=Math.round(e/h),d=Math.round(t/h),c*h<e&&++c,d*h>t&&--d),d<c&&.5<=n&&n<2?cx(e,t,n*2):[c,d,h]}function rE(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];
972const r=t<e,[i,s,o]=r?cx(t,e,n):cx(e,t,n);if(!(s>=i))return[];const c=s-i+1,d=new Array(c);if(r)if(o<0)for(let h=0;h<c;++h)d[h]=(s-h)/-o;else for(let h=0;h<c;++h)d[h]=(s-h)*o;else if(o<0)for(let h=0;h<c;++h)d[h]=(i+h)/-o;else for(let h=0;h<c;++h)d[h]=(i+h)*o;return d}function iE(e,t,n){return t=+t,e=+e,n=+n,cx(e,t,n)[2]}function aE(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?iE(t,e,n):iE(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function rD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function iD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Mz(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Tz:she(i);r>n;){if(r-n>600){const d=r-n+1,h=t-n+1,p=Math.log(d),m=.5*Math.exp(2*p/3),v=.5*Math.sqrt(p*m*(d-m)/d)*(h-d/2<0?-1:1),x=Math.max(n,Math.floor(t-h*m/d+v)),w=Math.min(r,Math.floor(t+(d-h)*m/d+v));Mz(e,t,x,w,i)}const s=e[t];let o=n,c=r;for(dp(e,n,t),i(e[r],s)>0&&dp(e,n,r);o<c;){for(dp(e,o,c),++o,--c;i(e[o],s)<0;)++o;for(;i(e[c],s)>0;)--c}i(e[n],s)===0?dp(e,n,c):(++c,dp(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function dp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function uhe(e,t,n){if(e=Float64Array.from(the(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return iD(e);if(t>=1)return rD(e);var r,i=(r-1)*t,s=Math.floor(i),o=rD(Mz(e,s).subarray(0,s+1)),c=iD(e.subarray(s+1));return o+(c-o)*(i-s)}}function dhe(e,t,n=Oz){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,s=Math.floor(i),o=+n(e[s],s,e),c=+n(e[s+1],s+1,e);return o+(c-o)*(i-s)}}function fhe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function ma(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ao(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const sE=Symbol("implicit");function PP(){var e=new tD,t=[],n=[],r=sE;function i(s){let o=e.get(s);if(o===void 0){if(r!==sE)return r;e.set(s,o=t.push(s)-1)}return n[o%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new tD;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return PP(t,n).unknown(r)},ma.apply(i,arguments),i}function sm(){var e=PP().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,o,c=!1,d=0,h=0,p=.5;delete e.unknown;
vendor: 6,060 bytes, line 972
972function m(){var v=t().length,x=i<r,w=x?i:r,b=x?r:i;s=(b-w)/Math.max(1,v-d+h*2),c&&(s=Math.floor(s)),w+=(b-w-s*(v-d))*p,o=s*(1-d),c&&(w=Math.round(w),o=Math.round(o));var _=fhe(v).map(function(j){return w+s*j});return n(x?_.reverse():_)}return e.domain=function(v){return arguments.length?(t(v),m()):t()},e.range=function(v){return arguments.length?([r,i]=v,r=+r,i=+i,m()):[r,i]},e.rangeRound=function(v){return[r,i]=v,r=+r,i=+i,c=!0,m()},e.bandwidth=function(){return o},e.step=function(){return s},e.round=function(v){return arguments.length?(c=!!v,m()):c},e.padding=function(v){return arguments.length?(d=Math.min(1,h=+v),m()):d},e.paddingInner=function(v){return arguments.length?(d=Math.min(1,v),m()):d},e.paddingOuter=function(v){return arguments.length?(h=+v,m()):h},e.align=function(v){return arguments.length?(p=Math.max(0,Math.min(1,v)),m()):p},e.copy=function(){return sm(t(),[r,i]).round(c).paddingInner(d).paddingOuter(h).align(p)},ma.apply(m(),arguments)}function Rz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Rz(t())},e}function Rp(){return Rz(sm.apply(null,arguments).paddingInner(1))}function kP(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Iz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function lg(){}var om=.7,ux=1/om,Vd="\\s*([+-]?\\d+)\\s*",lm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hhe=/^#([0-9a-f]{3,8})$/,phe=new RegExp(`^rgb\\(${Vd},${Vd},${Vd}\\)$`),mhe=new RegExp(`^rgb\\(${gs},${gs},${gs}\\)$`),ghe=new RegExp(`^rgba\\(${Vd},${Vd},${Vd},${lm}\\)$`),yhe=new RegExp(`^rgba\\(${gs},${gs},${gs},${lm}\\)$`),vhe=new RegExp(`^hsl\\(${lm},${gs},${gs}\\)$`),xhe=new RegExp(`^hsla\\(${lm},${gs},${gs},${lm}\\)$`),aD={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};kP(lg,cm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sD,formatHex:sD,formatHex8:bhe,formatHsl:_he,formatRgb:oD,toString:oD});function sD(){return this.rgb().formatHex()}function bhe(){return this.rgb().formatHex8()}function _he(){return Lz(this).formatHsl()}function oD(){return this.rgb().formatRgb()}function cm(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=hhe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?lD(t):n===3?new fi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Jy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Jy(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=phe.exec(e))?new fi(t[1],t[2],t[3],1):(t=mhe.exec(e))?new fi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ghe.exec(e))?Jy(t[1],t[2],t[3],t[4]):(t=yhe.exec(e))?Jy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vhe.exec(e))?dD(t[1],t[2]/100,t[3]/100,1):(t=xhe.exec(e))?dD(t[1],t[2]/100,t[3]/100,t[4]):aD.hasOwnProperty(e)?lD(aD[e]):e==="transparent"?new fi(NaN,NaN,NaN,0):null}function lD(e){return new fi(e>>16&255,e>>8&255,e&255,1)}function Jy(e,t,n,r){return r<=0&&(e=t=n=NaN),new fi(e,t,n,r)}function whe(e){return e instanceof lg||(e=cm(e)),e?(e=e.rgb(),new fi(e.r,e.g,e.b,e.opacity)):new fi}function oE(e,t,n,r){return arguments.length===1?whe(e):new fi(e,t,n,r??1)}function fi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}kP(fi,oE,Iz(lg,{brighter(e){return e=e==null?ux:Math.pow(ux,e),new fi(this.r*e,this.g*e,this.b*e,this.opacity)}
vendor: 6,544 bytes, line 972
972,darker(e){return e=e==null?om:Math.pow(om,e),new fi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fi(au(this.r),au(this.g),au(this.b),dx(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:cD,formatHex:cD,formatHex8:jhe,formatRgb:uD,toString:uD}));function cD(){return`#${qc(this.r)}${qc(this.g)}${qc(this.b)}`}function jhe(){return`#${qc(this.r)}${qc(this.g)}${qc(this.b)}${qc((isNaN(this.opacity)?1:this.opacity)*255)}`}function uD(){const e=dx(this.opacity);return`${e===1?"rgb(":"rgba("}${au(this.r)}, ${au(this.g)}, ${au(this.b)}${e===1?")":`, ${e})`}`}function dx(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function au(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qc(e){return e=au(e),(e<16?"0":"")+e.toString(16)}function dD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ra(e,t,n,r)}function Lz(e){if(e instanceof Ra)return new Ra(e.h,e.s,e.l,e.opacity);if(e instanceof lg||(e=cm(e)),!e)return new Ra;if(e instanceof Ra)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,c=s-i,d=(s+i)/2;return c?(t===s?o=(n-r)/c+(n<r)*6:n===s?o=(r-t)/c+2:o=(t-n)/c+4,c/=d<.5?s+i:2-s-i,o*=60):c=d>0&&d<1?0:o,new Ra(o,c,d,e.opacity)}function She(e,t,n,r){return arguments.length===1?Lz(e):new Ra(e,t,n,r??1)}function Ra(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}kP(Ra,She,Iz(lg,{brighter(e){return e=e==null?ux:Math.pow(ux,e),new Ra(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?om:Math.pow(om,e),new Ra(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new fi($S(e>=240?e-240:e+120,i,r),$S(e,i,r),$S(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ra(fD(this.h),ev(this.s),ev(this.l),dx(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=dx(this.opacity);return`${e===1?"hsl(":"hsla("}${fD(this.h)}, ${ev(this.s)*100}%, ${ev(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fD(e){return e=(e||0)%360,e<0?e+360:e}function ev(e){return Math.max(0,Math.min(1,e||0))}function $S(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const AP=e=>()=>e;function Nhe(e,t){return function(n){return e+n*t}}function Che(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ehe(e){return(e=+e)==1?Dz:function(t,n){return n-t?Che(t,n,e):AP(isNaN(t)?n:t)}}function Dz(e,t){var n=t-e;return n?Nhe(e,n):AP(isNaN(e)?t:e)}const hD=(function e(t){var n=Ehe(t);function r(i,s){var o=n((i=oE(i)).r,(s=oE(s)).r),c=n(i.g,s.g),d=n(i.b,s.b),h=Dz(i.opacity,s.opacity);return function(p){return i.r=o(p),i.g=c(p),i.b=d(p),i.opacity=h(p),i+""}}return r.gamma=e,r})(1);function Phe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function khe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ahe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=sh(e[o],t[o]);for(;o<n;++o)s[o]=t[o];return function(c){for(o=0;o<r;++o)s[o]=i[o](c);return s}}function Ohe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fx(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function The(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=sh(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var lE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,FS=new RegExp(lE.source,"g");function Mhe(e){return function(){return e}}function Rhe(e){return function(t){return e(t)+""}}function Ihe(e,t){var n=lE.lastIndex=FS.lastIndex=0,r,i,s,o=-1,c=[],d=[];for(e=e+"",t=t+"";(r=lE.exec(e))&&(i=FS.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),c[o]?c[o]+=s:c[++o]=s),(r=r[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,d.push({i:o,x:fx(r,i)})),n=FS.lastIndex;return n<t.length&&(s=t.slice(n),c[o]?c[o]+=s:c[++o]=s),c.length<2?d[0]?Rhe(d[0].x):Mhe(t):(t=d.length,function(h){for(var p=0,m;p<t;++p)c[(m=d[p]).i]=m.x(h);return c.join("")})}function sh(e,t){var n=typeof t,r;return t==null||n==="boolean"?AP(t):(n==="number"?fx:n==="string"?(r=cm(t))?(t=r,hD):Ihe:t instanceof cm?hD:t instanceof Date?Ohe:khe(t)?Phe:Array.isArray(t)?Ahe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?The:fx)(e,t)}function OP(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Lhe(e,t){t===void 0&&(t=e,e=sh);for(var n=0,r=t.length-1,i=t[0],s=new Array(r<0?0:r);n<r;)s[n]=e(i,i=t[++n]);return function(o){var c=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return s[c](o-c)}}function Dhe(e){return function(){return e}}function hx(e){return+e}var pD=[0,1];function Xr(e){return e}function cE(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Dhe(isNaN(t)?NaN:.5)}function $he(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Fhe(e,t,n){var r=e[0],i=e[1],s=t[0],o=t[1];return i<r?(r=cE(i,r),s=n(o,s)):(r=cE(r,i),s=n(s,o)),function(c){return s(r(c))}}function Bhe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=cE(e[o],e[o+1]),s[o]=n(t[o],t[o+1]);return function(c){var d=og(e,c,1,r)-1;return s[d](i[d](c))}}function cg(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function X0(){var e=pD,t=pD,n=sh,r,i,s,o=Xr,c,d,h;function p(){var v=Math.min(e.length,t.length);return o!==Xr&&(o=$he(e[0],e[v-1])),c=v>2?Bhe:Fhe,d=h=null,m}function m(v){return v==null||isNaN(v=+v)?s:(d||(d=c(e.map(r),t,n)))(r(o(v)))}return m.invert=function(v){return o(i((h||(h=c(t,e.map(r),fx)))(v)))},m.domain=function(v){return arguments.length?(e=Array.from(v,hx),p()):e.slice()},m.range=function(v){return arguments.length?(t=Array.from(v),p()):t.slice()},m.rangeRound=function(v){return t=Array.from(v),n=OP,p()},m.clamp=function(v){return arguments.length?(o=v?!0:Xr,p()):o!==Xr},m.interpolate=function(v){return arguments.length?(n=v,p()):n},m.unknown=function(v){return arguments.length?(s=v,m):s},function(v,x){return r=v,i=x,p()}}function TP(){return X0()(Xr,Xr)}
vendor: 4,474 bytes, line 972
972function zhe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function px(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xf(e){return e=px(Math.abs(e)),e?e[1]:NaN}function Uhe(e,t){return function(n,r){for(var i=n.length,s=[],o=0,c=e[0],d=0;i>0&&c>0&&(d+c+1>r&&(c=Math.max(1,r-d)),s.push(n.substring(i-=c,i+c)),!((d+=c+1)>r));)c=e[o=(o+1)%e.length];return s.reverse().join(t)}}function qhe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Hhe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function um(e){if(!(t=Hhe.exec(e)))throw new Error("invalid format: "+e);var t;return new MP({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]})}um.prototype=MP.prototype;function MP(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+""}MP.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 Whe(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var $z;function Vhe(e,t){var n=px(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-($z=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+px(e,Math.max(0,t+s-1))[0]}function mD(e,t){var n=px(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:zhe,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)=>mD(e*100,t),r:mD,s:Vhe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function yD(e){return e}var vD=Array.prototype.map,xD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Khe(e){var t=e.grouping===void 0||e.thousands===void 0?yD:Uhe(vD.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?yD:qhe(vD.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function h(m){m=um(m);var v=m.fill,x=m.align,w=m.sign,b=m.symbol,_=m.zero,j=m.width,C=m.comma,E=m.precision,A=m.trim,k=m.type;k==="n"?(C=!0,k="g"):gD[k]||(E===void 0&&(E=12),A=!0,k="g"),(_||v==="0"&&x==="=")&&(_=!0,v="0",x="=");var M=b==="$"?n:b==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",I=b==="$"?r:/[%p]/.test(k)?o:"",$=gD[k],q=/[defgprs%]/.test(k);E=E===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function V(H){var U=M,z=I,Z,ee,G;if(k==="c")z=$(H)+z,H="";else{H=+H;var oe=H<0||1/H<0;if(H=isNaN(H)?d:$(Math.abs(H),E),A&&(H=Whe(H)),oe&&+H==0&&w!=="+"&&(oe=!1),U=(oe?w==="("?w:c:w==="-"||w==="("?"":w)+U,z=(k==="s"?xD[8+$z/3]:"")+z+(oe&&w==="("?")":""),q){for(Z=-1,ee=H.length;++Z<ee;)if(G=H.charCodeAt(Z),48>G||G>57){z=(G===46?i+H.slice(Z+1):H.slice(Z))+z,H=H.slice(0,Z);break}}}C&&!_&&(H=t(H,1/0));var W=U.length+H.length+z.length,ie=W<j?new Array(j-W+1).join(v):"";switch(C&&_&&(H=t(ie+H,ie.length?j-z.length:1/0),ie=""),x){case"<":H=U+H+z+ie;break;case"=":H=U+ie+H+z;break;case"^":H=ie.slice(0,W=ie.length>>1)+U+H+z+ie.slice(W);break;default:H=ie+U+H+z;break}return s(H)}return V.toString=function(){return m+""},V}function p(m,v){var x=h((m=um(m),m.type="f",m)),w=Math.max(-8,Math.min(8,Math.floor(xf(v)/3)))*3,b=Math.pow(10,-w),_=xD[8+w/3];return function(j){return x(b*j)+_}}return{format:h,formatPrefix:p}}var tv,RP,Fz;
972Ghe({thousands:",",grouping:[3],currency:["$",""]});function Ghe(e){return tv=Khe(e),RP=tv.format,Fz=tv.formatPrefix,tv}function Zhe(e){return Math.max(0,-xf(Math.abs(e)))}function Yhe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xf(t)/3)))*3-xf(Math.abs(e)))}function Xhe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xf(t)-xf(e))+1}function Bz(e,t,n,r){var i=aE(e,t,n),s;switch(r=um(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Yhe(i,o))&&(r.precision=s),Fz(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Xhe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Zhe(i))&&(r.precision=s-(r.type==="%")*2);break}}return RP(r)}function Kl(e){var t=e.domain;return e.ticks=function(n){var r=t();return rE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Bz(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,o=r[i],c=r[s],d,h,p=10;for(c<o&&(h=o,o=c,c=h,h=i,i=s,s=h);p-- >0;){if(h=iE(o,c,n),h===d)return r[i]=o,r[s]=c,t(r);if(h>0)o=Math.floor(o/h)*h,c=Math.ceil(c/h)*h;else if(h<0)o=Math.ceil(o*h)/h,c=Math.floor(c*h)/h;else break;d=h}return e},e}function mx(){var e=TP();return e.copy=function(){return cg(e,mx())},ma.apply(e,arguments),Kl(e)}function zz(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,hx),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return zz(e).unknown(t)},e=arguments.length?Array.from(e,hx):[0,1],Kl(n)}function Uz(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),e[n]=t.floor(i),e[r]=t.ceil(s),e}function bD(e){return Math.log(e)}function _D(e){return Math.exp(e)}function Qhe(e){return-Math.log(-e)}function Jhe(e){return-Math.exp(-e)}function epe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function tpe(e){return e===10?epe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function npe(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 wD(e){return(t,n)=>-e(-t,n)}function IP(e){const t=e(bD,_D),n=t.domain;let r=10,i,s;function o(){return i=npe(r),s=tpe(r),n()[0]<0?(i=wD(i),s=wD(s),e(Qhe,Jhe)):e(bD,_D),t}return t.base=function(c){return arguments.length?(r=+c,o()):r},t.domain=function(c){return arguments.length?(n(c),o()):n()},t.ticks=c=>{const d=n();let h=d[0],p=d[d.length-1];const m=p<h;m&&([h,p]=[p,h]);let v=i(h),x=i(p),w,b;const _=c==null?10:+c;let j=[];if(!(r%1)&&x-v<_){if(v=Math.floor(v),x=Math.ceil(x),h>0){for(;v<=x;++v)for(w=1;w<r;++w)if(b=v<0?w/s(-v):w*s(v),!(b<h)){if(b>p)break;j.push(b)}}else for(;v<=x;++v)for(w=r-1;w>=1;--w)if(b=v>0?w/s(-v):w*s(v),!(b<h)){if(b>p)break;j.push(b)}j.length*2<_&&(j=rE(h,p,_))}else j=rE(v,x,Math.min(x-v,_)).map(s);return m?j.reverse():j},t.tickFormat=(c,d)=>{if(c==null&&(c=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=um(d)).precision==null&&(d.trim=!0),d=RP(d)),c===1/0)return d;const h=Math.max(1,r*c/t.ticks().length);return p=>{let m=p/s(Math.round(i(p)));return m*r<r-.5&&(m*=r),m<=h?d(p):""}},t.nice=()=>n(Uz(n(),{floor:c=>s(Math.floor(i(c))),ceil:c=>s(Math.ceil(i(c)))})),t}function qz(){const e=IP(X0()).domain([1,10]);return e.copy=()=>cg(e,qz()).base(e.base()),ma.apply(e,arguments),e}function jD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function SD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function LP(e){var t=1,n=e(jD(t),SD(t));return n.constant=function(r){return arguments.length?e(jD(t=+r),SD(t)):t},Kl(n)}function Hz(){var e=LP(X0());return e.copy=function(){return cg(e,Hz()).constant(e.constant())},ma.apply(e,arguments)}function ND(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rpe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ipe(e){return e<0?-e*e:e*e}function DP(e){var t=e(Xr,Xr),n=1;function r(){return n===1?e(Xr,Xr):n===.5?e(rpe,ipe):e(ND(n),ND(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Kl(t)}function $P(){var e=DP(X0());return e.copy=function(){return cg(e,$P()).exponent(e.exponent())},ma.apply(e,arguments),e}function ape(){return $P.apply(null,arguments).exponent(.5)}function CD(e){return Math.sign(e)*e*e}function spe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Wz(){var e=TP(),t=[0,1],n=!1,r;function i(s){var o=spe(e(s));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(s){return e.invert(CD(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,hx)).map(CD)),i):t.slice()}
972,i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(n=!!s,i):n},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return Wz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ma.apply(i,arguments),Kl(i)}function Vz(){var e=[],t=[],n=[],r;function i(){var o=0,c=Math.max(1,t.length);for(n=new Array(c-1);++o<c;)n[o-1]=dhe(e,o/c);return s}function s(o){return o==null||isNaN(o=+o)?r:t[og(n,o)]}return s.invertExtent=function(o){var c=t.indexOf(o);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},s.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let c of o)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Ll),i()},s.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return Vz().domain(e).range(t).unknown(r)},ma.apply(s,arguments)}function Kz(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function o(d){return d!=null&&d<=d?i[og(r,d,0,n)]:s}function c(){var d=-1;for(r=new Array(n);++d<n;)r[d]=((d+1)*t-(d-n)*e)/(n+1);return o}return o.domain=function(d){return arguments.length?([e,t]=d,e=+e,t=+t,c()):[e,t]},o.range=function(d){return arguments.length?(n=(i=Array.from(d)).length-1,c()):i.slice()},o.invertExtent=function(d){var h=i.indexOf(d);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},o.unknown=function(d){return arguments.length&&(s=d),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Kz().domain([e,t]).range(i).unknown(s)},ma.apply(Kl(o),arguments)}function Gz(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[og(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Gz().domain(e).range(t).unknown(n)},ma.apply(i,arguments)}const BS=new Date,zS=new Date;function nr(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const o=i(s),c=i.ceil(s);return s-o<c-s?o:c},i.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,c)=>{const d=[];if(s=i.ceil(s),c=c==null?1:Math.floor(c),!(s<o)||!(c>0))return d;let h;do d.push(h=new Date(+s)),t(s,c),e(s);while(h<s&&s<o);return d},i.filter=s=>nr(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,c)=>{if(o>=o)if(c<0)for(;++c<=0;)for(;t(o,-1),!s(o););else for(;--c>=0;)for(;t(o,1),!s(o););}),n&&(i.count=(s,o)=>(BS.setTime(+s),zS.setTime(+o),e(BS),e(zS),Math.floor(n(BS,zS))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const gx=nr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?nr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):gx);gx.range;const co=1e3,la=co*60,uo=la*60,No=uo*24,FP=No*7,ED=No*30,US=No*365,Hc=nr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*co)},(e,t)=>(t-e)/co,e=>e.getUTCSeconds());Hc.range;const BP=nr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*co)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getMinutes());BP.range;const zP=nr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCMinutes());zP.range;const UP=nr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*co-e.getMinutes()*la)},(e,t)=>{e.setTime(+e+t*uo)},(e,t)=>(t-e)/uo,e=>e.getHours());UP.range;const qP=nr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*uo)},(e,t)=>(t-e)/uo,e=>e.getUTCHours());qP.range;const ug=nr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*la)/No,e=>e.getDate()-1);ug.range;const Q0=nr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/No,e=>e.getUTCDate()-1);Q0.range;const Zz=nr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/No,e=>
vendor: 7,428 bytes, line 972
972Math.floor(e/No));Zz.range;function Mu(e){return nr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*la)/FP)}const J0=Mu(0),yx=Mu(1),ope=Mu(2),lpe=Mu(3),bf=Mu(4),cpe=Mu(5),upe=Mu(6);J0.range;yx.range;ope.range;lpe.range;bf.range;cpe.range;upe.range;function Ru(e){return nr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/FP)}const eb=Ru(0),vx=Ru(1),dpe=Ru(2),fpe=Ru(3),_f=Ru(4),hpe=Ru(5),ppe=Ru(6);eb.range;vx.range;dpe.range;fpe.range;_f.range;hpe.range;ppe.range;const HP=nr(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());HP.range;const WP=nr(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());WP.range;const Co=nr(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());Co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Co.range;const Eo=nr(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());Eo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Eo.range;function Yz(e,t,n,r,i,s){const o=[[Hc,1,co],[Hc,5,5*co],[Hc,15,15*co],[Hc,30,30*co],[s,1,la],[s,5,5*la],[s,15,15*la],[s,30,30*la],[i,1,uo],[i,3,3*uo],[i,6,6*uo],[i,12,12*uo],[r,1,No],[r,2,2*No],[n,1,FP],[t,1,ED],[t,3,3*ED],[e,1,US]];function c(h,p,m){const v=p<h;v&&([h,p]=[p,h]);const x=m&&typeof m.range=="function"?m:d(h,p,m),w=x?x.range(h,+p+1):[];return v?w.reverse():w}function d(h,p,m){const v=Math.abs(p-h)/m,x=EP(([,,_])=>_).right(o,v);if(x===o.length)return e.every(aE(h/US,p/US,m));if(x===0)return gx.every(Math.max(aE(h,p,m),1));const[w,b]=o[v/o[x-1][2]<o[x][2]/v?x-1:x];return w.every(b)}return[c,d]}const[mpe,gpe]=Yz(Eo,WP,eb,Zz,qP,zP),[ype,vpe]=Yz(Co,HP,J0,ug,UP,BP);function qS(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 HS(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 fp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function xpe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,o=e.shortDays,c=e.months,d=e.shortMonths,h=hp(i),p=pp(i),m=hp(s),v=pp(s),x=hp(o),w=pp(o),b=hp(c),_=pp(c),j=hp(d),C=pp(d),E={a:oe,A:W,b:ie,B:ae,c:null,d:MD,e:MD,f:Upe,g:Qpe,G:eme,H:Fpe,I:Bpe,j:zpe,L:Xz,m:qpe,M:Hpe,p:K,q:ne,Q:LD,s:DD,S:Wpe,u:Vpe,U:Kpe,V:Gpe,w:Zpe,W:Ype,x:null,X:null,y:Xpe,Y:Jpe,Z:tme,"%":ID},A={a:ve,A:je,b:Y,B:he,c:null,d:RD,e:RD,f:ame,g:mme,G:yme,H:nme,I:rme,j:ime,L:Jz,m:sme,M:ome,p:fe,q:_e,Q:LD,s:DD,S:lme,u:cme,U:ume,V:dme,w:fme,W:hme,x:null,X:null,y:pme,Y:gme,Z:vme,"%":ID},k={a:V,A:H,b:U,B:z,c:Z,d:OD,e:OD,f:Ipe,g:AD,G:kD,H:TD,I:TD,j:Ope,L:Rpe,m:Ape,M:Tpe,p:q,q:kpe,Q:Dpe,s:$pe,S:Mpe,u:Spe,U:Npe,V:Cpe,w:jpe,W:Epe,x:ee,X:G,y:AD,Y:kD,Z:Ppe,"%":Lpe};E.x=M(n,E),E.X=M(r,E),E.c=M(t,E),A.x=M(n,A),A.X=M(r,A),A.c=M(t,A);function M(de,we){return function(ke){var re=[],Re=-1,ge=0,Be=de.length,Le,rt,Ct;for(ke instanceof Date||(ke=new Date(+ke));++Re<Be;)de.charCodeAt(Re)===37&&(re.push(de.slice(ge,Re)),(rt=PD[Le=de.charAt(++Re)])!=null?Le=de.charAt(++Re):rt=Le==="e"?" ":"0",(Ct=we[Le])&&(Le=Ct(ke,rt)),re.push(Le),ge=Re+1);return re.push(de.slice(ge,Re)),re.join("")}}function I(de,we){return function(ke){var re=fp(1900,void 0,1),Re=$(re,de,ke+="",0),ge,Be;if(Re!=ke.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(we&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(ge=HS(fp(re.y,0,1)),Be=ge.getUTCDay(),ge=Be>4||Be===0?vx.ceil(ge):vx(ge),ge=Q0.offset(ge,(re.V-1)*7),re.y=ge.getUTCFullYear(),re.m=ge.getUTCMonth(),re.d=ge.getUTCDate()+(re.w+6)%7):(ge=qS(fp(re.y,0,1)),Be=ge.getDay(),ge=Be>4||Be===0?yx.ceil(ge):yx(ge),ge=ug.offset(ge,(re.V-1)*7),re.y=ge.getFullYear(),re.m=ge.getMonth(),re.d=ge.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Be="Z"in re?HS(fp(re.y,0,1)).getUTCDay():qS(fp(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Be+5)%7:re.w+re.U*7-(Be+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,HS(re)):qS(re)}}function $(de,we,ke,re){for(var Re=0,ge=we.length,Be=ke.length,Le,rt;Re<ge;){if(re>=Be)return-1;if(Le=we.charCodeAt(Re++),Le===37){if(Le=we.charAt(Re++),rt=k[Le in PD?we.charAt(Re++):Le],!rt||(re=rt(de,ke,re))<0)return-1}else if(Le!=ke.charCodeAt(re++))return-1}return re}function q(de,we,ke){var re=h.exec(we.slice(ke));return re?(de.p=p.get(re[0].toLowerCase()),ke+re[0].length):-1}function V(de,we,ke){var re=x.exec(we.slice(ke));return re?(de.w=w.get(re[0].toLowerCase()),ke+re[0].length):-1}function H(de,we,ke){var re=m.exec(we.slice(ke));return re?(de.w=v.get(re[0].toLowerCase()),ke+re[0].length):-1}function U(de,we,ke){var re=j.exec(we.slice(ke));return re?(de.m=C.get(re[0].toLowerCase()),ke+re[0].length):-1}function z(de,we,ke){var re=b.exec(we.slice(ke));return re?(de.m=_.get(re[0].toLowerCase()),ke+re[0].length):-1}function Z(de,we,ke){return $(de,t,we,ke)}function ee(de,we,ke){return $(de,n,we,ke)}function G(de,we,ke){return $(de,r,we,ke)}function oe(de){return o[de.getDay()]}function W(de){return s[de.getDay()]}function ie(de){return d[de.getMonth()]}function ae(de){return c[de.getMonth()]}function K(de){return i[+(de.getHours()>=12)]}function ne(de){return 1+~~(de.getMonth()/3)}function ve(de){return o[de.getUTCDay()]}function je(de){return s[de.getUTCDay()]}function Y(de){return d[de.getUTCMonth()]}function he(de){return c[de.getUTCMonth()]}function fe(de){return i[+(de.getUTCHours()>=12)]}function _e(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var we=M(de+="",E);return we.toString=function(){return de},we},parse:function(de){var we=I(de+="",!1);return we.toString=function(){return de},we},utcFormat:function(de){var we=M(de+="",A);return we.toString=function(){return de},we},utcParse:function(de){var we=I(de+="",!0);return we.toString=function(){return de},we}}}var PD={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,bpe=/^%/,_pe=/[\\^$*+?|[\]().{}]/g;function Vt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function wpe(e){return e.replace(_pe,"\\$&")}function hp(e){return new RegExp("^(?:"+e.map(wpe).join("|")+")","i")}function pp(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function jpe(e,t,n){var r=mr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Spe(e,t,n){var r=mr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Npe(e,t,n){var r=mr.exec(t.slice(n,n+2));
vendor: 4,106 bytes, line 972
972return r?(e.U=+r[0],n+r[0].length):-1}function Cpe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Epe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kD(e,t,n){var r=mr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function AD(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ppe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function kpe(e,t,n){var r=mr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ape(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function OD(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ope(e,t,n){var r=mr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function TD(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Tpe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Mpe(e,t,n){var r=mr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Rpe(e,t,n){var r=mr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ipe(e,t,n){var r=mr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Lpe(e,t,n){var r=bpe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Dpe(e,t,n){var r=mr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function $pe(e,t,n){var r=mr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function MD(e,t){return Vt(e.getDate(),t,2)}function Fpe(e,t){return Vt(e.getHours(),t,2)}function Bpe(e,t){return Vt(e.getHours()%12||12,t,2)}function zpe(e,t){return Vt(1+ug.count(Co(e),e),t,3)}function Xz(e,t){return Vt(e.getMilliseconds(),t,3)}function Upe(e,t){return Xz(e,t)+"000"}function qpe(e,t){return Vt(e.getMonth()+1,t,2)}function Hpe(e,t){return Vt(e.getMinutes(),t,2)}function Wpe(e,t){return Vt(e.getSeconds(),t,2)}function Vpe(e){var t=e.getDay();return t===0?7:t}function Kpe(e,t){return Vt(J0.count(Co(e)-1,e),t,2)}function Qz(e){var t=e.getDay();return t>=4||t===0?bf(e):bf.ceil(e)}function Gpe(e,t){return e=Qz(e),Vt(bf.count(Co(e),e)+(Co(e).getDay()===4),t,2)}function Zpe(e){return e.getDay()}function Ype(e,t){return Vt(yx.count(Co(e)-1,e),t,2)}function Xpe(e,t){return Vt(e.getFullYear()%100,t,2)}function Qpe(e,t){return e=Qz(e),Vt(e.getFullYear()%100,t,2)}function Jpe(e,t){return Vt(e.getFullYear()%1e4,t,4)}function eme(e,t){var n=e.getDay();return e=n>=4||n===0?bf(e):bf.ceil(e),Vt(e.getFullYear()%1e4,t,4)}function tme(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Vt(t/60|0,"0",2)+Vt(t%60,"0",2)}function RD(e,t){return Vt(e.getUTCDate(),t,2)}function nme(e,t){return Vt(e.getUTCHours(),t,2)}function rme(e,t){return Vt(e.getUTCHours()%12||12,t,2)}function ime(e,t){return Vt(1+Q0.count(Eo(e),e),t,3)}function Jz(e,t){return Vt(e.getUTCMilliseconds(),t,3)}function ame(e,t){return Jz(e,t)+"000"}function sme(e,t){return Vt(e.getUTCMonth()+1,t,2)}function ome(e,t){return Vt(e.getUTCMinutes(),t,2)}function lme(e,t){return Vt(e.getUTCSeconds(),t,2)}function cme(e){var t=e.getUTCDay();return t===0?7:t}function ume(e,t){return Vt(eb.count(Eo(e)-1,e),t,2)}function eU(e){var t=e.getUTCDay();return t>=4||t===0?_f(e):_f.ceil(e)}function dme(e,t){return e=eU(e),Vt(_f.count(Eo(e),e)+(Eo(e).getUTCDay()===4),t,2)}function fme(e){return e.getUTCDay()}function hme(e,t){return Vt(vx.count(Eo(e)-1,e),t,2)}function pme(e,t){return Vt(e.getUTCFullYear()%100,t,2)}function mme(e,t){return e=eU(e),Vt(e.getUTCFullYear()%100,t,2)}function gme(e,t){return Vt(e.getUTCFullYear()%1e4,t,4)}function yme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?_f(e):_f.ceil(e),Vt(e.getUTCFullYear()%1e4,t,4)}function vme(){return"+0000"}function ID(){return"%"}function LD(e){return+e}function DD(e){return Math.floor(+e/1e3)}var Rd,tU,nU;xme({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
972ay","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 xme(e){return Rd=xpe(e),tU=Rd.format,Rd.parse,nU=Rd.utcFormat,Rd.utcParse,Rd}function bme(e){return new Date(e)}function _me(e){return e instanceof Date?+e:+new Date(+e)}function VP(e,t,n,r,i,s,o,c,d,h){var p=TP(),m=p.invert,v=p.domain,x=h(".%L"),w=h(":%S"),b=h("%I:%M"),_=h("%I %p"),j=h("%a %d"),C=h("%b %d"),E=h("%B"),A=h("%Y");function k(M){return(d(M)<M?x:c(M)<M?w:o(M)<M?b:s(M)<M?_:r(M)<M?i(M)<M?j:C:n(M)<M?E:A)(M)}return p.invert=function(M){return new Date(m(M))},p.domain=function(M){return arguments.length?v(Array.from(M,_me)):v().map(bme)},p.ticks=function(M){var I=v();return e(I[0],I[I.length-1],M??10)},p.tickFormat=function(M,I){return I==null?k:h(I)},p.nice=function(M){var I=v();return(!M||typeof M.range!="function")&&(M=t(I[0],I[I.length-1],M??10)),M?v(Uz(I,M)):p},p.copy=function(){return cg(p,VP(e,t,n,r,i,s,o,c,d,h))},p}function wme(){return ma.apply(VP(ype,vpe,Co,HP,J0,ug,UP,BP,Hc,tU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function jme(){return ma.apply(VP(mpe,gpe,Eo,WP,eb,Q0,qP,zP,Hc,nU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tb(){var e=0,t=1,n,r,i,s,o=Xr,c=!1,d;function h(m){return m==null||isNaN(m=+m)?d:o(i===0?.5:(m=(s(m)-n)*i,c?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t]=m,n=s(e=+e),r=s(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(m){return arguments.length?(c=!!m,h):c},h.interpolator=function(m){return arguments.length?(o=m,h):o};function p(m){return function(v){var x,w;return arguments.length?([x,w]=v,o=m(x,w),h):[o(0),o(1)]}}return h.range=p(sh),h.rangeRound=p(OP),h.unknown=function(m){return arguments.length?(d=m,h):d},function(m){return s=m,n=m(e),r=m(t),i=n===r?0:1/(r-n),h}}function Gl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function rU(){var e=Kl(tb()(Xr));return e.copy=function(){return Gl(e,rU())},Ao.apply(e,arguments)}function iU(){var e=IP(tb()).domain([1,10]);return e.copy=function(){return Gl(e,iU()).base(e.base())},Ao.apply(e,arguments)}function aU(){var e=LP(tb());return e.copy=function(){return Gl(e,aU()).constant(e.constant())},Ao.apply(e,arguments)}function KP(){var e=DP(tb());return e.copy=function(){return Gl(e,KP()).exponent(e.exponent())},Ao.apply(e,arguments)}function Sme(){return KP.apply(null,arguments).exponent(.5)}function sU(){var e=[],t=Xr;function n(r){if(r!=null&&!isNaN(r=+r))return t((og(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ll),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,s)=>uhe(e,s/r))},n.copy=function(){return sU(t).domain(e)},Ao.apply(n,arguments)}function nb(){var e=0,t=.5,n=1,r=1,i,s,o,c,d,h=Xr,p,m=!1,v;function x(b){return isNaN(b=+b)?v:(b=.5+((b=+p(b))-s)*(r*b<r*s?c:d),h(m?Math.max(0,Math.min(1,b)):b))}x.domain=function(b){return arguments.length?([e,t,n]=b,i=p(e=+e),s=p(t=+t),o=p(n=+n),c=i===s?0:.5/(s-i),d=s===o?0:.5/(o-s),r=s<i?-1:1,x):[e,t,n]},x.clamp=function(b){return arguments.length?(m=!!b,x):m},x.interpolator=function(b){return arguments.length?(h=b,x):h};function w(b){return function(_){var j,C,E;return arguments.length?([j,C,E]=_,h=Lhe(b,[j,C,E]),x):[h(0),h(.5),h(1)]}}return x.range=w(sh),x.rangeRound=w(OP),x.unknown=function(b){return arguments.length?(v=b,x):v},function(b){return p=b,i=b(e),s=b(t),o=b(n),c=i===s?0:.5/(s-i),d=s===o?0:.5/(o-s),r=s<i?-1:1,x}}function oU(){var e=Kl(nb()(Xr));return e.copy=function(){return Gl(e,oU())},Ao.apply(e,arguments)}function lU(){var e=IP(nb()).domain([.1,1,10]);return e.copy=function(){return Gl(e,lU()).base(e.base())},Ao.apply(e,arguments)}function cU(){var e=LP(nb());
vendor: 69,083 bytes, lines 972-999
972return e.copy=function(){return Gl(e,cU()).constant(e.constant())},Ao.apply(e,arguments)}function GP(){var e=DP(nb());return e.copy=function(){return Gl(e,GP()).exponent(e.exponent())},Ao.apply(e,arguments)}function Nme(){return GP.apply(null,arguments).exponent(.5)}const $D=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:sm,scaleDiverging:oU,scaleDivergingLog:lU,scaleDivergingPow:GP,scaleDivergingSqrt:Nme,scaleDivergingSymlog:cU,scaleIdentity:zz,scaleImplicit:sE,scaleLinear:mx,scaleLog:qz,scaleOrdinal:PP,scalePoint:Rp,scalePow:$P,scaleQuantile:Vz,scaleQuantize:Kz,scaleRadial:Wz,scaleSequential:rU,scaleSequentialLog:iU,scaleSequentialPow:KP,scaleSequentialQuantile:sU,scaleSequentialSqrt:Sme,scaleSequentialSymlog:aU,scaleSqrt:ape,scaleSymlog:Hz,scaleThreshold:Gz,scaleTime:wme,scaleUtc:jme,tickFormat:Bz},Symbol.toStringTag,{value:"Module"}));var WS,FD;function rb(){if(FD)return WS;FD=1;var e=th();function t(n,r,i){for(var s=-1,o=n.length;++s<o;){var c=n[s],d=r(c);if(d!=null&&(h===void 0?d===d&&!e(d):i(d,h)))var h=d,p=c}return p}return WS=t,WS}var VS,BD;function uU(){if(BD)return VS;BD=1;function e(t,n){return t>n}return VS=e,VS}var KS,zD;function Cme(){if(zD)return KS;zD=1;var e=rb(),t=uU(),n=ah();function r(i){return i&&i.length?e(i,n,t):void 0}return KS=r,KS}var Eme=Cme();const Al=Kt(Eme);var GS,UD;function dU(){if(UD)return GS;UD=1;function e(t,n){return t<n}return GS=e,GS}var ZS,qD;function Pme(){if(qD)return ZS;qD=1;var e=rb(),t=dU(),n=ah();function r(i){return i&&i.length?e(i,n,t):void 0}return ZS=r,ZS}var kme=Pme();const ib=Kt(kme);var YS,HD;function Ame(){if(HD)return YS;HD=1;var e=uP(),t=ks(),n=xz(),r=mi();function i(s,o){var c=r(s)?e:n;return c(s,t(o,3))}return YS=i,YS}var XS,WD;function Ome(){if(WD)return XS;WD=1;var e=yz(),t=Ame();function n(r,i){return e(t(r,i),1)}return XS=n,XS}var Tme=Ome();const Mme=Kt(Tme);var QS,VD;function Rme(){if(VD)return QS;VD=1;var e=jP();function t(n,r){return e(n,r)}return QS=t,QS}var Ime=Rme();const wf=Kt(Ime);var oh=1e9,Lme={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},YP,jn=!0,pa="[DecimalError] ",su=pa+"Invalid argument: ",ZP=pa+"Exponent out of range: ",lh=Math.floor,Dc=Math.pow,Dme=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ai,lr=1e7,_n=7,fU=9007199254740991,xx=lh(fU/_n),Xe={};Xe.absoluteValue=Xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Xe.comparedTo=Xe.cmp=function(e){var t,n,r,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(r=s.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1};Xe.decimalPlaces=Xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*_n;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Xe.dividedBy=Xe.div=function(e){return yo(this,new this.constructor(e))};Xe.dividedToIntegerBy=Xe.idiv=function(e){var t=this,n=t.constructor;return un(yo(t,new n(e),0,1),n.precision)};Xe.equals=Xe.eq=function(e){return!this.cmp(e)};Xe.exponent=function(){return Hn(this)};Xe.greaterThan=Xe.gt=function(e){return this.cmp(e)>0};Xe.greaterThanOrEqualTo=Xe.gte=function(e){return this.cmp(e)>=0};Xe.isInteger=Xe.isint=function(){return this.e>this.d.length-2};Xe.isNegative=Xe.isneg=function(){return this.s<0};Xe.isPositive=Xe.ispos=function(){return this.s>0};Xe.isZero=function(){return this.s===0};Xe.lessThan=Xe.lt=function(e){return this.cmp(e)<0};Xe.lessThanOrEqualTo=Xe.lte=function(e){return this.cmp(e)<1};Xe.logarithm=Xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,s=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ai))throw Error(pa+"NaN");if(n.s<1)throw Error(pa+(n.s?"NaN":"-Infinity"));return n.eq(Ai)?new r(0):(jn=!1,t=yo(dm(n,s),dm(e,s),s),jn=!0,un(t,i))};Xe.minus=Xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mU(t,e):hU(t,(e.s=-e.s,e))};Xe.modulo=Xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(pa+"NaN");return n.s?(jn=!1,t=yo(n,e,0,1).times(e),jn=!0,n.minus(t)):un(new r(n),i)};Xe.naturalExponential=Xe.exp=function(){return pU(this)};Xe.naturalLogarithm=Xe.ln=function(){return dm(this)};Xe.negated=Xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Xe.plus=Xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hU(t,e):mU(t,(e.s=-e.s,e))};Xe.precision=Xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(su+e);if(t=Hn(i)+1,r=i.d.length-1,n=r*_n+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Xe.squareRoot=Xe.sqrt=function(){var e,t,n,r,i,s,o,c=this,d=c.constructor;if(c.s<1){if(!c.s)return new d(0);throw Error(pa+"NaN")}for(e=Hn(c),jn=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=fs(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=lh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new d(t)):r=new d(i.toString()),n=d.precision,i=o=n+3;;)if(s=r,r=s.plus(yo(c,s,o+2)).times(.5),fs(s.d).slice(0,o)===(t=fs(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(un(s,n+1,0),s.times(s).eq(c)){r=s;break}}else if(t!="9999")break;o+=4}return jn=!0,un(r,n)};Xe.times=Xe.mul=function(e){var t,n,r,i,s,o,c,d,h,p=this,m=p.constructor,v=p.d,x=(e=new m(e)).d;if(!p.s||!e.s)return new m(0);for(e.s*=p.s,n=p.e+e.e,d=v.length,h=x.length,d<h&&(s=v,v=x,x=s,o=d,d=h,h=o),s=[],o=d+h,r=o;r--;)s.push(0);for(r=h;--r>=0;){for(t=0,i=d+r;i>r;)c=s[i]+x[r]*v[i-r-1]+t,s[i--]=c%lr|0,t=c/lr|0;s[i]=(s[i]+t)%lr|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,jn?un(e,m.precision):e};Xe.toDecimalPlaces=Xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(js(e,0,oh),t===void 0?t=r.rounding:js(t,0,8),un(n,e+Hn(n)+1,t))};Xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=_u(r,!0):(js(e,0,oh),t===void 0?t=i.rounding:js(t,0,8),r=un(new i(r),e+1,t),n=_u(r,!0,e+1)),n};Xe.toFixed=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?_u(i):(js(e,0,oh),t===void 0?t=s.rounding:js(t,0,8),r=un(new s(i),e+Hn(i)+1,t),n=_u(r.abs(),!1,e+Hn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Xe.toInteger=Xe.toint=function(){var e=this,t=e.constructor;return un(new t(e),Hn(e)+1,t.rounding)};Xe.toNumber=function(){return+this};Xe.toPower=Xe.pow=function(e){var t,n,r,i,s,o,c=this,d=c.constructor,h=12,p=+(e=new d(e));if(!e.s)return new d(Ai);if(c=new d(c),!c.s){if(e.s<1)throw Error(pa+"Infinity");return c}if(c.eq(Ai))return c;if(r=d.precision,e.eq(Ai))return un(c,r);if(t=e.e,n=e.d.length-1,o=t>=n,s=c.s,o){if((n=p<0?-p:p)<=fU){for(i=new d(Ai),t=Math.ceil(r/_n+4),jn=!1;n%2&&(i=i.times(c),GD(i.d,t)),n=lh(n/2),n!==0;)c=c.times(c),GD(c.d,t);return jn=!0,e.s<0?new d(Ai).div(i):un(i,r)}}else if(s<0)throw Error(pa+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,jn=!1,i=e.times(dm(c,r+h)),jn=!0,i=pU(i),i.s=s,i};Xe.toPrecision=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?(n=Hn(i),r=_u(i,n<=s.toExpNeg||n>=s.toExpPos)):(js(e,1,oh),t===void 0?t=s.rounding:js(t,0,8),i=un(new s(i),e,t),n=Hn(i),r=_u(i,e<=n||n<=s.toExpNeg,e)),r};Xe.toSignificantDigits=Xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(js(e,1,oh),t===void 0?t=r.rounding:js(t,0,8)),un(new r(n),e,t)};Xe.toString=Xe.valueOf=Xe.val=Xe.toJSON=Xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Hn(e),n=e.constructor;return _u(e,t<=n.toExpNeg||t>=n.toExpPos)};function hU(e,t){var n,r,i,s,o,c,d,h,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),jn?un(t,m):t;if(d=e.d,h=t.d,o=e.e,i=t.e,d=d.slice(),s=o-i,s){for(s<0?(r=d,s=-s,c=h.length):(r=h,i=o,c=d.length),o=Math.ceil(m/_n),c=o>c?o+1:c+1,s>c&&(s=c,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(c=d.length,s=h.length,c-s<0&&(s=c,r=h,h=d,d=r),n=0;s;)n=(d[--s]=d[s]+h[s]+n)/lr|0,d[s]%=lr;for(n&&(d.unshift(n),++i),c=d.length;d[--c]==0;)d.pop();return t.d=d,t.e=i,jn?un(t,m):t}function js(e,t,n){if(e!==~~e||e<t||e>n)throw Error(su+e)}function fs(e){var t,n,r,i=e.length-1,s="",o=e[0];if(i>0){for(s+=o,t=1;t<i;t++)r=e[t]+"",n=_n-r.length,n&&(s+=yl(n)),s+=r;o=e[t],r=o+"",n=_n-r.length,n&&(s+=yl(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}var yo=(function(){function e(r,i){var s,o=0,c=r.length;for(r=r.slice();c--;)s=r[c]*i+o,r[c]=s%lr|0,o=s/lr|0;return o&&r.unshift(o),r}function t(r,i,s,o){var c,d;if(s!=o)d=s>o?1:-1;else for(c=d=0;c<s;c++)if(r[c]!=i[c]){d=r[c]>i[c]?1:-1;break}return d}function n(r,i,s){for(var o=0;s--;)r[s]-=o,o=r[s]<i[s]?1:0,r[s]=o*lr+r[s]-i[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,s,o){var c,d,h,p,m,v,x,w,b,_,j,C,E,A,k,M,I,$,q=r.constructor,V=r.s==i.s?1:-1,H=r.d,U=i.d;if(!r.s)return new q(r);if(!i.s)throw Error(pa+"Division by zero");for(d=r.e-i.e,I=U.length,k=H.length,x=new q(V),w=x.d=[],h=0;U[h]==(H[h]||0);)++h;if(U[h]>(H[h]||0)&&--d,s==null?C=s=q.precision:o?C=s+(Hn(r)-Hn(i))+1:C=s,C<0)return new q(0);if(C=C/_n+2|0,h=0,I==1)for(p=0,U=U[0],C++;(h<k||p)&&C--;h++)E=p*lr+(H[h]||0),w[h]=E/U|0,p=E%U|0;else{for(p=lr/(U[0]+1)|0,p>1&&(U=e(U,p),H=e(H,p),I=U.length,k=H.length),A=I,b=H.slice(0,I),_=b.length;_<I;)b[_++]=0;$=U.slice(),$.unshift(0),M=U[0],U[1]>=lr/2&&++M;do p=0,c=t(U,b,I,_),c<0?(j=b[0],I!=_&&(j=j*lr+(b[1]||0)),p=j/M|0,p>1?(p>=lr&&(p=lr-1),m=e(U,p),v=m.length,_=b.length,c=t(m,b,v,_),c==1&&(p--,n(m,I<v?$:U,v))):(p==0&&(c=p=1),m=U.slice()),v=m.length,v<_&&m.unshift(0),n(b,m,_),c==-1&&(_=b.length,c=t(U,b,I,_),c<1&&(p++,n(b,I<_?$:U,_))),_=b.length):c===0&&(p++,b=[0]),w[h++]=p,c&&b[0]?b[_++]=H[A]||0:(b=[H[A]],_=1);while((A++<k||b[0]!==void 0)&&C--)}return w[0]||w.shift(),x.e=d,un(x,o?s+Hn(x)+1:s)}})();function pU(e,t){var n,r,i,s,o,c,d=0,h=0,p=e.constructor,m=p.precision;if(Hn(e)>16)throw Error(ZP+Hn(e));if(!e.s)return new p(Ai);for(jn=!1,c=m,o=new p(.03125);e.abs().gte(.1);)e=e.times(o),h+=5;for(r=Math.log(Dc(2,h))/Math.LN10*2+5|0,c+=r,n=i=s=new p(Ai),p.precision=c;;){if(i=un(i.times(e),c),n=n.times(++d),o=s.plus(yo(i,n,c)),fs(o.d).slice(0,c)===fs(s.d).slice(0,c)){for(;h--;)s=un(s.times(s),c);return p.precision=m,t==null?(jn=!0,un(s,m)):s}s=o}}function Hn(e){for(var t=e.e*_n,n=e.d[0];n>=10;n/=10)t++;return t}function JS(e,t,n){if(t>e.LN10.sd())throw jn=!0,n&&(e.precision=n),Error(pa+"LN10 precision limit exceeded");return un(new e(e.LN10),t)}function yl(e){for(var t="";e--;)t+="0";return t}function dm(e,t){var n,r,i,s,o,c,d,h,p,m=1,v=10,x=e,w=x.d,b=x.constructor,_=b.precision;if(x.s<1)throw Error(pa+(x.s?"NaN":"-Infinity"));if(x.eq(Ai))return new b(0);if(t==null?(jn=!1,h=_):h=t,x.eq(10))return t==null&&(jn=!0),JS(b,h);if(h+=v,b.precision=h,n=fs(w),r=n.charAt(0),s=Hn(x),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=fs(x.d),r=n.charAt(0),m++;s=Hn(x),r>1?(x=new b("0."+n),s++):x=new b(r+"."+n.slice(1))}else return d=JS(b,h+2,_).times(s+""),x=dm(new b(r+"."+n.slice(1)),h-v).plus(d),b.precision=_,t==null?(jn=!0,un(x,_)):x;for(c=o=x=yo(x.minus(Ai),x.plus(Ai),h),p=un(x.times(x),h),i=3;;){if(o=un(o.times(p),h),d=c.plus(yo(o,new b(i),h)),fs(d.d).slice(0,h)===fs(c.d).slice(0,h))return c=c.times(2),s!==0&&(c=c.plus(JS(b,h+2,_).times(s+""))),c=yo(c,new b(m),h),b.precision=_,t==null?(jn=!0,un(c,_)):c;c=d,i+=2}}function KD(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=lh(n/_n),e.d=[],r=(n+1)%_n,n<0&&(r+=_n),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=_n;r<i;)e.d.push(+t.slice(r,r+=_n));t=t.slice(r),r=_n-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),jn&&(e.e>xx||e.e<-xx))throw Error(ZP+n)}else e.s=0,e.e=0,e.d=[0];return e}function un(e,t,n){var r,i,s,o,c,d,h,p,m=e.d;for(o=1,s=m[0];s>=10;s/=10)o++;if(r=t-o,r<0)r+=_n,i=t,h=m[p=0];else{if(p=Math.ceil((r+1)/_n),s=m.length,p>=s)return e;for(h=s=m[p],o=1;s>=10;s/=10)o++;r%=_n,i=r-_n+o}if(n!==void 0&&(s=Dc(10,o-i-1),c=h/s%10|0,d=t<0||m[p+1]!==void 0||h%s,d=n<4?(c||d)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||d||n==6&&(r>0?i>0?h/Dc(10,o-i):0:m[p-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return d?(s=Hn(e),m.length=1,t=t-s-1,m[0]=Dc(10,(_n-t%_n)%_n),e.e=lh(-t/_n)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=p,s=1,p--):(m.length=p+1,s=Dc(10,_n-r),m[p]=i>0?(h/Dc(10,o-i)%Dc(10,i)|0)*s:0),d)for(;;)if(p==0){(m[0]+=s)==lr&&(m[0]=1,++e.e);break}else{if(m[p]+=s,m[p]!=lr)break;m[p--]=0,s=1}for(r=m.length;m[--r]===0;)m.pop();if(jn&&(e.e>xx||e.e<-xx))throw Error(ZP+Hn(e));return e}function mU(e,t){var n,r,i,s,o,c,d,h,p,m,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),jn?un(t,x):t;if(d=e.d,m=t.d,r=t.e,h=e.e,d=d.slice(),o=h-r,o){for(p=o<0,p?(n=d,o=-o,c=m.length):(n=m,r=h,c=d.length),i=Math.max(Math.ceil(x/_n),c)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=d.length,c=m.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(d[i]!=m[i]){p=d[i]<m[i];break}o=0}for(p&&(n=d,d=m,m=n,t.s=-t.s),c=d.length,i=m.length-c;i>0;--i)d[c++]=0;for(i=m.length;i>o;){if(d[--i]<m[i]){for(s=i;s&&d[--s]===0;)d[s]=lr-1;--d[s],d[i]+=lr}d[i]-=m[i]}for(;d[--c]===0;)d.pop();for(;d[0]===0;d.shift())--r;return d[0]?(t.d=d,t.e=r,jn?un(t,x):t):new v(0)}function _u(e,t,n){var r,i=Hn(e),s=fs(e.d),o=s.length;return t?(n&&(r=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+yl(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+yl(-i-1)+s,n&&(r=n-o)>0&&(s+=yl(r))):i>=o?(s+=yl(i+1-o),n&&(r=n-i-1)>0&&(s=s+"."+yl(r))):((r=i+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(s+="."),s+=yl(r))),e.s<0?"-"+s:s}function GD(e,t){if(e.length>t)return e.length=t,!0}function gU(e){var t,n,r;function i(s){var o=this;if(!(o instanceof i))return new i(s);if(o.constructor=i,s instanceof i){o.s=s.s,o.e=s.e,o.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(su+s);if(s>0)o.s=1;else if(s<0)s=-s,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(s===~~s&&s<1e7){o.e=0,o.d=[s];return}return KD(o,s.toString())}else if(typeof s!="string")throw Error(su+s);if(s.charCodeAt(0)===45?(s=s.slice(1),o.s=-1):o.s=1,Dme.test(s))KD(o,s);else throw Error(su+s)}if(i.prototype=Xe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=gU,i.config=i.set=$me,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function $me(e){if(!e||typeof e!="object")throw Error(pa+"Object expected");var t,n,r,i=["precision",1,oh,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(lh(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(su+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(su+n+": "+r);return this}var YP=gU(Lme);Ai=new YP(1);const sn=YP;function Fme(e){return qme(e)||Ume(e)||zme(e)||Bme()}function Bme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
973In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zme(e,t){if(e){if(typeof e=="string")return uE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uE(e,t)}}function Ume(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function qme(e){if(Array.isArray(e))return uE(e)}function uE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Hme=function(t){return t},yU={},vU=function(t){return t===yU},ZD=function(t){return function n(){return arguments.length===0||arguments.length===1&&vU(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Wme=function e(t,n){return t===1?n:ZD(function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=i.filter(function(c){return c!==yU}).length;return o>=t?n.apply(void 0,i):e(t-o,ZD(function(){for(var c=arguments.length,d=new Array(c),h=0;h<c;h++)d[h]=arguments[h];var p=i.map(function(m){return vU(m)?d.shift():m});return n.apply(void 0,Fme(p).concat(d))}))})},ab=function(t){return Wme(t.length,t)},dE=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Vme=ab(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Kme=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Hme;var i=n.reverse(),s=i[0],o=i.slice(1);return function(){return o.reduce(function(c,d){return d(c)},s.apply(void 0,arguments))}},fE=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},xU=function(t){var n=null,r=null;return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return n&&s.every(function(c,d){return c===n[d]})||(n=s,r=t.apply(void 0,s)),r}};function Gme(e){var t;return e===0?t=1:t=Math.floor(new sn(e).abs().log(10).toNumber())+1,t}function Zme(e,t,n){for(var r=new sn(e),i=0,s=[];r.lt(t)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}var Yme=ab(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Xme=ab(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Qme=ab(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const sb={rangeStep:Zme,getDigitCount:Gme,interpolateNumber:Yme,uninterpolateNumber:Xme,uninterpolateTruncation:Qme};function hE(e){return tge(e)||ege(e)||bU(e)||Jme()}function Jme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
974In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ege(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tge(e){if(Array.isArray(e))return pE(e)}function fm(e,t){return ige(e)||rge(e,t)||bU(e,t)||nge()}function nge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
975In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bU(e,t){if(e){if(typeof e=="string")return pE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pE(e,t)}}function pE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rge(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,s=void 0;try{for(var o=e[Symbol.iterator](),c;!(r=(c=o.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(d){i=!0,s=d}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw s}}return n}}function ige(e){if(Array.isArray(e))return e}function _U(e){var t=fm(e,2),n=t[0],r=t[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function wU(e,t,n){if(e.lte(0))return new sn(0);var r=sb.getDigitCount(e.toNumber()),i=new sn(10).pow(r),s=e.div(i),o=r!==1?.05:.1,c=new sn(Math.ceil(s.div(o).toNumber())).add(n).mul(o),d=c.mul(i);return t?d:new sn(Math.ceil(d))}function age(e,t,n){var r=1,i=new sn(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new sn(10).pow(sb.getDigitCount(e)-1),i=new sn(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new sn(Math.floor(e)))}else e===0?i=new sn(Math.floor((t-1)/2)):n||(i=new sn(Math.floor(e)));var o=Math.floor((t-1)/2),c=Kme(Vme(function(d){return i.add(new sn(d-o).mul(r)).toNumber()}),dE);return c(0,t)}function jU(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new sn(0),tickMin:new sn(0),tickMax:new sn(0)};var s=wU(new sn(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new sn(0):(o=new sn(e).add(t).div(2),o=o.sub(new sn(o).mod(s)));var c=Math.ceil(o.sub(e).div(s).toNumber()),d=Math.ceil(new sn(t).sub(o).div(s).toNumber()),h=c+d+1;return h>n?jU(e,t,n,r,i+1):(h<n&&(d=t>0?d+(n-h):d,c=t>0?c:c+(n-h)),{step:s,tickMin:o.sub(new sn(c).mul(s)),tickMax:o.add(new sn(d).mul(s))})}function sge(e){var t=fm(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),c=_U([n,r]),d=fm(c,2),h=d[0],p=d[1];if(h===-1/0||p===1/0){var m=p===1/0?[h].concat(hE(dE(0,i-1).map(function(){return 1/0}))):[].concat(hE(dE(0,i-1).map(function(){return-1/0})),[p]);return n>r?fE(m):m}if(h===p)return age(h,i,s);var v=jU(h,p,o,s),x=v.step,w=v.tickMin,b=v.tickMax,_=sb.rangeStep(w,b.add(new sn(.1).mul(x)),x);return n>r?fE(_):_}function oge(e,t){var n=fm(e,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=_U([r,i]),c=fm(o,2),d=c[0],h=c[1];if(d===-1/0||h===1/0)return[r,i];if(d===h)return[d];var p=Math.max(t,2),m=wU(new sn(h).sub(d).div(p-1),s,0),v=[].concat(hE(sb.rangeStep(new sn(d),new sn(h).sub(new sn(.99).mul(m)),m)),[h]);return r>i?fE(v):v}var lge=xU(sge),cge=xU(oge),uge="Invariant failed";function wu(e,t){throw new Error(uge)}var dge=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function jf(e){"@babel/helpers - typeof";return jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jf(e)}function bx(){return bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bx.apply(this,arguments)}function fge(e,t){return gge(e)||mge(e,t)||pge(e,t)||hge()}function hge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
976In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pge(e,t){if(e){if(typeof e=="string")return YD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YD(e,t)}}function YD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function gge(e){if(Array.isArray(e))return e}function yge(e,t){if(e==null)return{};var n=vge(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CU(r.key),r)}}function _ge(e,t,n){return t&&bge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wge(e,t,n){return t=_x(t),jge(e,SU()?Reflect.construct(t,n||[],_x(e).constructor):t.apply(e,n))}function jge(e,t){if(t&&(jf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sge(e)}function Sge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SU=function(){return!!e})()}function _x(e){return _x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_x(e)}function Nge(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&&mE(e,t)}function mE(e,t){return mE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mE(e,t)}function NU(e,t,n){return t=CU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CU(e){var t=Cge(e,"string");return jf(t)=="symbol"?t:t+""}function Cge(e,t){if(jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ob=(function(e){function t(){return xge(this,t),wge(this,t,arguments)}return Nge(t,e),_ge(t,[{key:"render",value:function(){var r=this.props,i=r.offset,s=r.layout,o=r.width,c=r.dataKey,d=r.data,h=r.dataPointFormatter,p=r.xAxis,m=r.yAxis,v=yge(r,dge),x=ct(v,!1);this.props.direction==="x"&&p.type!=="number"&&wu();var w=d.map(function(b){var _=h(b,c),j=_.x,C=_.y,E=_.value,A=_.errorVal;if(!A)return null;var k=[],M,I;if(Array.isArray(A)){var $=fge(A,2);M=$[0],I=$[1]}else M=I=A;if(s==="vertical"){var q=p.scale,V=C+i,H=V+o,U=V-o,z=q(E-M),Z=q(E+I);k.push({x1:Z,y1:H,x2:Z,y2:U}),k.push({x1:z,y1:V,x2:Z,y2:V}),k.push({x1:z,y1:H,x2:z,y2:U})}else if(s==="horizontal"){var ee=m.scale,G=j+i,oe=G-o,W=G+o,ie=ee(E-M),ae=ee(E+I);k.push({x1:oe,y1:ae,x2:W,y2:ae}),k.push({x1:G,y1:ie,x2:G,y2:ae}),k.push({x1:oe,y1:ie,x2:W,y2:ie})}return J.createElement(Ft,bx({className:"recharts-errorBar",key:"bar-".concat(k.map(function(K){return"".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))},x),k.map(function(K){return J.createElement("line",bx({},K,{key:"line-".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))}))});return J.createElement(Ft,{className:"recharts-errorBars"},w)}}])})(J.Component);NU(ob,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});NU(ob,"displayName","ErrorBar");function hm(e){"@babel/helpers - typeof";return hm=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},hm(e)}function XD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XD(Object(n),!0).forEach(function(r){Ege(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ege(e,t,n){return t=Pge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pge(e){var t=kge(e,"string");return hm(t)=="symbol"?t:t+""}function kge(e,t){if(hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EU=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,o=Pi(n,iu);if(!o)return null;var c=iu.defaultProps,d=c!==void 0?kc(kc({},c),o.props):{},h;return o.props&&o.props.payload?h=o.props&&o.props.payload:s==="children"?h=(r||[]).reduce(function(p,m){var v=m.item,x=m.props,w=x.sectors||x.data||[];return p.concat(w.map(function(b){return{type:o.props.iconType||v.props.legendType,value:b.name,color:b.fill,payload:b}}))},[]):h=(r||[]).map(function(p){var m=p.item,v=m.type.defaultProps,x=v!==void 0?kc(kc({},v),m.props):{},w=x.dataKey,b=x.name,_=x.legendType,j=x.hide;return{inactive:j,dataKey:w,type:d.iconType||_||"square",color:XP(m),value:b||w,payload:x}}),kc(kc(kc({},d),iu.getWithHeight(o,i)),{},{payload:h,item:o})};function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}function QD(e){return Mge(e)||Tge(e)||Oge(e)||Age()}function Age(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
977In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oge(e,t){if(e){if(typeof e=="string")return gE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gE(e,t)}}function Tge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mge(e){if(Array.isArray(e))return gE(e)}function gE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JD(Object(n),!0).forEach(function(r){Kd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kd(e,t,n){return t=Rge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rge(e){var t=Ige(e,"string");return pm(t)=="symbol"?t:t+""}function Ige(e,t){if(pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qn(e,t,n){return St(e)||St(t)?n:Jn(t)?Di(e,t,n):mt(t)?t(e):n}function Ip(e,t,n,r){var i=Mme(e,function(c){return Qn(c,t)});if(n==="number"){var s=i.filter(function(c){return De(c)||parseFloat(c)});return s.length?[ib(s),Al(s)]:[1/0,-1/0]}var o=r?i.filter(function(c){return!St(c)}):i;return o.map(function(c){return Jn(c)||c instanceof Date?c:""})}var Lge=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,o=-1,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var d=s.range,h=0;h<c;h++){var p=h>0?i[h-1].coordinate:i[c-1].coordinate,m=i[h].coordinate,v=h>=c-1?i[0].coordinate:i[h+1].coordinate,x=void 0;if(Zr(m-p)!==Zr(v-m)){var w=[];if(Zr(v-m)===Zr(d[1]-d[0])){x=v;var b=m+d[1]-d[0];w[0]=Math.min(b,(b+p)/2),w[1]=Math.max(b,(b+p)/2)}else{x=p;var _=v+d[1]-d[0];w[0]=Math.min(m,(_+m)/2),w[1]=Math.max(m,(_+m)/2)}var j=[Math.min(m,(x+m)/2),Math.max(m,(x+m)/2)];if(t>j[0]&&t<=j[1]||t>=w[0]&&t<=w[1]){o=i[h].index;break}}else{var C=Math.min(p,v),E=Math.max(p,v);if(t>(C+m)/2&&t<=(E+m)/2){o=i[h].index;break}}}else for(var A=0;A<c;A++)if(A===0&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A>0&&A<c-1&&t>(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===c-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){o=r[A].index;break}return o},XP=function(t){var n,r=t,i=r.type.displayName,s=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Tn(Tn({},t.type.defaultProps),t.props):t.props,o=s.stroke,c=s.fill,d;switch(i){case"Line":d=o;break;case"Area":case"Radar":d=o&&o!=="none"?o:c;break;default:d=c;break}return d},Dge=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var o={},c=Object.keys(s),d=0,h=c.length;d<h;d++)for(var p=s[c[d]].stackGroups,m=Object.keys(p),v=0,x=m.length;v<x;v++){var w=p[m[v]],b=w.items,_=w.cateAxisId,j=b.filter(function(I){return mo(I.type).indexOf("Bar")>=0});if(j&&j.length){var C=j[0].type.defaultProps,E=C!==void 0?Tn(Tn({},C),j[0].props):j[0].props,A=E.barSize,k=E[_];o[k]||(o[k]=[]);var M=St(A)?n:A;o[k].push({item:j[0],stackList:j.slice(1),barSize:St(M)?void 0:Yr(M,r,0)})}}return o},$ge=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,s=t.sizeList,o=s===void 0?[]:s,c=t.maxBarSize,d=o.length;if(d<1)return null;var h=Yr(n,i,0,!0),p,m=[];if(o[0].barSize===+o[0].barSize){var v=!1,x=i/d,w=o.reduce(function(A,k){return A+k.barSize||0},0);w+=(d-1)*h,w>=i&&(w-=(d-1)*h,h=0),w>=i&&x>0&&(v=!0,x*=.9,w=d*x);var b=(i-w)/2>>0,_={offset:b-h,size:0};p=o.reduce(function(A,k){var M={item:k.item,position:{offset:_.offset+_.size+h,size:v?x:k.barSize}},I=[].concat(QD(A),[M]);return _=I[I.length-1].position,k.stackList&&k.stackList.length&&k.stackList.forEach(function($){I.push({item:$,position:_})}),I},m)}else{var j=Yr(r,i,0,!0);i-2*j-(d-1)*h<=0&&(h=0);var C=(i-2*j-(d-1)*h)/d;C>1&&(C>>=0);var E=c===+c?Math.min(C,c):C;p=o.reduce(function(A,k,M){var I=[].concat(QD(A),[{item:k.item,position:{offset:j+(C+h)*M+(C-E)/2,size:E}}]);return k.stackList&&k.stackList.length&&k.stackList.forEach(function($){I.push({item:$,position:I[I.length-1].position})}),I},m)}return p},Fge=function(t,n,r,i){var s=r.children,o=r.width,c=r.margin,d=o-(c.left||0)-(c.right||0),h=EU({children:s,legendWidth:d});if(h){var p=i||{},m=p.width,v=p.height,x=h.align,w=h.verticalAlign,b=h.layout;if((b==="vertical"||b==="horizontal"&&w==="middle")&&x!=="center"&&De(t[x]))return Tn(Tn({},t),{},Kd({},x,t[x]+(m||0)));if((b==="horizontal"||b==="vertical"&&x==="center")&&w!=="middle"&&De(t[w]))return Tn(Tn({},t),{},Kd({},w,t[w]+(v||0)))}return t},Bge=function(t,n,r){return St(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},PU=function(t,n,r,i,s){var o=n.props.children,c=ua(o,ob).filter(function(h){return Bge(i,s,h.props.direction)});if(c&&c.length){var d=c.map(function(h){return h.props.dataKey});return t.reduce(function(h,p){var m=Qn(p,r);if(St(m))return h;var v=Array.isArray(m)?[ib(m),Al(m)]:[m,m],x=d.reduce(function(w,b){var _=Qn(p,b,0),j=v[0]-Math.abs(Array.isArray(_)?_[0]:_),C=v[1]+Math.abs(Array.isArray(_)?_[1]:_);return[Math.min(j,w[0]),Math.max(C,w[1])]},[1/0,-1/0]);return[Math.min(x[0],h[0]),Math.max(x[1],h[1])]},[1/0,-1/0])}return null},zge=function(t,n,r,i,s){var o=n.map(function(c){return PU(t,c,r,s,i)}).filter(function(c){return!St(c)});return o&&o.length?o.reduce(function(c,d){return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]):null},kU=function(t,n,r,i,s){var o=n.map(function(d){var h=d.props.dataKey;return r==="number"&&h&&PU(t,d,h,i)||Ip(t,h,r,s)});if(r==="number")return o.reduce(function(d,h){return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);var c={};return o.reduce(function(d,h){for(var p=0,m=h.length;p<m;p++)c[h[p]]||(c[h[p]]=!0,d.push(h[p]));return d},[])},AU=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},OU=function(t,n,r,i){if(i)return t.map(function(d){return d.coordinate});var s,o,c=t.map(function(d){return d.coordinate===n&&(s=!0),d.coordinate===r&&(o=!0),d.coordinate});return s||c.push(n),o||c.push(r),c},fo=function(t,n,r){if(!t)return null;var i=t.scale,s=t.duplicateDomain,o=t.type,c=t.range,d=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/d:0;if(h=t.axisType==="angleAxis"&&(c==null?void 0:c.length)>=2?Zr(c[0]-c[1])*2*h:h,n&&(t.ticks||t.niceTicks)){var p=(t.ticks||t.niceTicks).map(function(m){var v=s?s.indexOf(m):m;return{coordinate:i(v)+h,value:m,offset:h}});return p.filter(function(m){return!rh(m.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(m,v){return{coordinate:i(m)+h,value:m,index:v,offset:h}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(m){return{coordinate:i(m)+h,value:m,offset:h}}):i.domain().map(function(m,v){return{coordinate:i(m)+h,value:s?s[m]:m,index:v,offset:h}})},eN=new WeakMap,nv=function(t,n){if(typeof n!="function")return t;eN.has(t)||eN.set(t,new WeakMap);var r=eN.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},TU=function(t,n,r){var i=t.scale,s=t.type,o=t.layout,c=t.axisType;if(i==="auto")return o==="radial"&&c==="radiusAxis"?{scale:sm(),realScaleType:"band"}:o==="radial"&&c==="angleAxis"?{scale:mx(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Rp(),realScaleType:"point"}:s==="category"?{scale:sm(),realScaleType:"band"}:{scale:mx(),realScaleType:"linear"};if(yu(i)){var d="scale".concat(H0(i));return{scale:($D[d]||Rp)(),realScaleType:$D[d]?d:"point"}}return mt(i)?{scale:i}:{scale:Rp(),realScaleType:"point"}},e4=1e-4,MU=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),s=Math.min(i[0],i[1])-e4,o=Math.max(i[0],i[1])+e4,c=t(n[0]),d=t(n[r-1]);(c<s||c>o||d<s||d>o)&&t.domain([n[0],n[r-1]])}},Uge=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},qge=function(t,n){if(!n||n.length!==2||!De(n[0])||!De(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),s=[t[0],t[1]];return(!De(t[0])||t[0]<r)&&(s[0]=r),(!De(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<r&&(s[1]=r),s},Hge=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,o=0,c=0;c<n;++c){var d=rh(t[c][r][1])?t[c][r][0]:t[c][r][1];d>=0?(t[c][r][0]=s,t[c][r][1]=s+d,s=t[c][r][1]):(t[c][r][0]=o,t[c][r][1]=o+d,o=t[c][r][1])}},Wge=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,o=0;o<n;++o){var c=rh(t[o][r][1])?t[o][r][0]:t[o][r][1];c>=0?(t[o][r][0]=s,t[o][r][1]=s+c,s=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},Vge={sign:Hge,expand:Mce,none:pf,silhouette:Rce,wiggle:Ice,positive:Wge},Kge=function(t,n,r){var i=n.map(function(c){return c.props.dataKey}),s=Vge[r],o=Tce().keys(i).value(function(c,d){return+Qn(c,d,0)}).order(VC).offset(s);return o(t)},Gge=function(t,n,r,i,s,o){if(!t)return null;var c=o?n.reverse():n,d={},h=c.reduce(function(m,v){var x,w=(x=v.type)!==null&&x!==void 0&&x.defaultProps?Tn(Tn({},v.type.defaultProps),v.props):v.props,b=w.stackId,_=w.hide;if(_)return m;var j=w[r],C=m[j]||{hasStack:!1,stackGroups:{}};if(Jn(b)){var E=C.stackGroups[b]||{numericAxisId:r,cateAxisId:i,items:[]};E.items.push(v),C.hasStack=!0,C.stackGroups[b]=E}else C.stackGroups[ih("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[v]};return Tn(Tn({},m),{},Kd({},j,C))},d),p={};return Object.keys(h).reduce(function(m,v){var x=h[v];if(x.hasStack){var w={};x.stackGroups=Object.keys(x.stackGroups).reduce(function(b,_){var j=x.stackGroups[_];return Tn(Tn({},b),{},Kd({},_,{numericAxisId:r,cateAxisId:i,items:j.items,stackedData:Kge(t,j.items,s)}))},w)}return Tn(Tn({},m),{},Kd({},v,x))},p)},RU=function(t,n){var r=n.realScaleType,i=n.type,s=n.tickCount,o=n.originalDomain,c=n.allowDecimals,d=r||n.scale;if(d!=="auto"&&d!=="linear")return null;if(s&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var h=t.domain();if(!h.length)return null;var p=lge(h,s,c);return t.domain([ib(p),Al(p)]),{niceTicks:p}}if(s&&i==="number"){var m=t.domain(),v=cge(m,s,c);return{niceTicks:v}}return null};function t4(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,s=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!St(i[t.dataKey])){var c=Xv(n,"value",i[t.dataKey]);if(c)return c.coordinate+r/2}return n[s]?n[s].coordinate+r/2:null}var d=Qn(i,St(o)?t.dataKey:o);return St(d)?null:t.scale(d)}var n4=function(t){var n=t.axis,r=t.ticks,i=t.offset,s=t.bandSize,o=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+i:null;var d=Qn(o,n.dataKey,n.domain[c]);return St(d)?null:n.scale(d)-s/2+i},Zge=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]);return i<=0&&s>=0?0:s<0?s:i}return r[0]},Yge=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Tn(Tn({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(Jn(s)){var o=n[s];if(o){var c=o.items.indexOf(t);return c>=0?o.stackedData[c]:null}}return null},Xge=function(t){return t.reduce(function(n,r){return[ib(r.concat([n[0]]).filter(De)),Al(r.concat([n[1]]).filter(De))]},[1/0,-1/0])},IU=function(t,n,r){return Object.keys(t).reduce(function(i,s){var o=t[s],c=o.stackedData,d=c.reduce(function(h,p){var m=Xge(p.slice(n,r+1));return[Math.min(h[0],m[0]),Math.max(h[1],m[1])]},[1/0,-1/0]);return[Math.min(d[0],i[0]),Math.max(d[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},r4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,i4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yE=function(t,n,r){if(mt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(De(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(r4.test(t[0])){var s=+r4.exec(t[0])[1];i[0]=n[0]-s}else mt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(De(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(i4.test(t[1])){var o=+i4.exec(t[1])[1];i[1]=n[1]+o}else mt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},wx=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var s=NP(n,function(m){return m.coordinate}),o=1/0,c=1,d=s.length;c<d;c++){var h=s[c],p=s[c-1];o=Math.min((h.coordinate||0)-(p.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},a4=function(t,n,r){return!t||!t.length||wf(t,Di(r,"type.defaultProps.domain"))?n:t},LU=function(t,n){var r=t.type.defaultProps?Tn(Tn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,s=r.name,o=r.unit,c=r.formatter,d=r.tooltipType,h=r.chartType,p=r.hide;return Tn(Tn({},ct(t,!1)),{},{dataKey:i,unit:o,formatter:c,name:s||i,color:XP(t),value:Qn(n,i),type:d,payload:n,chartType:h,hide:p})};function mm(e){"@babel/helpers - typeof";return mm=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},mm(e)}function s4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function no(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s4(Object(n),!0).forEach(function(r){DU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DU(e,t,n){return t=Qge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qge(e){var t=Jge(e,"string");return mm(t)=="symbol"?t:t+""}function Jge(e,t){if(mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eye(e,t){return iye(e)||rye(e,t)||nye(e,t)||tye()}function tye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
978In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nye(e,t){if(e){if(typeof e=="string")return o4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o4(e,t)}}function o4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function iye(e){if(Array.isArray(e))return e}var jx=Math.PI/180,aye=function(t){return t*180/Math.PI},vn=function(t,n,r,i){return{x:t+Math.cos(-jx*i)*r,y:n+Math.sin(-jx*i)*r}},$U=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},sye=function(t,n,r,i,s){var o=t.width,c=t.height,d=t.startAngle,h=t.endAngle,p=Yr(t.cx,o,o/2),m=Yr(t.cy,c,c/2),v=$U(o,c,r),x=Yr(t.innerRadius,v,0),w=Yr(t.outerRadius,v,v*.8),b=Object.keys(n);return b.reduce(function(_,j){var C=n[j],E=C.domain,A=C.reversed,k;if(St(C.range))i==="angleAxis"?k=[d,h]:i==="radiusAxis"&&(k=[x,w]),A&&(k=[k[1],k[0]]);else{k=C.range;var M=k,I=eye(M,2);d=I[0],h=I[1]}var $=TU(C,s),q=$.realScaleType,V=$.scale;V.domain(E).range(k),MU(V);var H=RU(V,no(no({},C),{},{realScaleType:q})),U=no(no(no({},C),H),{},{range:k,radius:w,realScaleType:q,scale:V,cx:p,cy:m,innerRadius:x,outerRadius:w,startAngle:d,endAngle:h});return no(no({},_),{},DU({},j,U))},{})},oye=function(t,n){var r=t.x,i=t.y,s=n.x,o=n.y;return Math.sqrt(Math.pow(r-s,2)+Math.pow(i-o,2))},lye=function(t,n){var r=t.x,i=t.y,s=n.cx,o=n.cy,c=oye({x:r,y:i},{x:s,y:o});if(c<=0)return{radius:c};var d=(r-s)/c,h=Math.acos(d);return i>o&&(h=2*Math.PI-h),{radius:c,angle:aye(h),angleInRadian:h}},cye=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),o=Math.min(i,s);return{startAngle:n-o*360,endAngle:r-o*360}},uye=function(t,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),o=Math.floor(i/360),c=Math.min(s,o);return t+c*360},l4=function(t,n){var r=t.x,i=t.y,s=lye({x:r,y:i},n),o=s.radius,c=s.angle,d=n.innerRadius,h=n.outerRadius;if(o<d||o>h)return!1;if(o===0)return!0;var p=cye(n),m=p.startAngle,v=p.endAngle,x=c,w;if(m<=v){for(;x>v;)x-=360;for(;x<m;)x+=360;w=x>=m&&x<=v}else{for(;x>m;)x-=360;for(;x<v;)x+=360;w=x>=v&&x<=m}return w?no(no({},n),{},{radius:o,angle:uye(x,n)}):null},FU=function(t){return!P.isValidElement(t)&&!mt(t)&&typeof t!="boolean"?t.className:""};function gm(e){"@babel/helpers - typeof";return gm=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},gm(e)}var dye=["offset"];function fye(e){return gye(e)||mye(e)||pye(e)||hye()}function hye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
979In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pye(e,t){if(e){if(typeof e=="string")return vE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vE(e,t)}}function mye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gye(e){if(Array.isArray(e))return vE(e)}function vE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yye(e,t){if(e==null)return{};var n=vye(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function c4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c4(Object(n),!0).forEach(function(r){xye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xye(e,t,n){return t=bye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bye(e){var t=_ye(e,"string");return gm(t)=="symbol"?t:t+""}function _ye(e,t){if(gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ym(){return ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ym.apply(this,arguments)}var wye=function(t){var n=t.value,r=t.formatter,i=St(t.children)?n:t.children;return mt(r)?r(i):i},jye=function(t,n){var r=Zr(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Sye=function(t,n,r){var i=t.position,s=t.viewBox,o=t.offset,c=t.className,d=s,h=d.cx,p=d.cy,m=d.innerRadius,v=d.outerRadius,x=d.startAngle,w=d.endAngle,b=d.clockWise,_=(m+v)/2,j=jye(x,w),C=j>=0?1:-1,E,A;i==="insideStart"?(E=x+C*o,A=b):i==="insideEnd"?(E=w-C*o,A=!b):i==="end"&&(E=w+C*o,A=b),A=j<=0?A:!A;var k=vn(h,p,_,E),M=vn(h,p,_,E+(A?1:-1)*359),I="M".concat(k.x,",").concat(k.y,`
980    A`).concat(_,",").concat(_,",0,1,").concat(A?0:1,`,
981    `).concat(M.x,",").concat(M.y),$=St(t.id)?ih("recharts-radial-line-"):t.id;return J.createElement("text",ym({},r,{dominantBaseline:"central",className:jt("recharts-radial-bar-label",c)}),J.createElement("defs",null,J.createElement("path",{id:$,d:I})),J.createElement("textPath",{xlinkHref:"#".concat($)},n))},Nye=function(t){var n=t.viewBox,r=t.offset,i=t.position,s=n,o=s.cx,c=s.cy,d=s.innerRadius,h=s.outerRadius,p=s.startAngle,m=s.endAngle,v=(p+m)/2;if(i==="outside"){var x=vn(o,c,h+r,v),w=x.x,b=x.y;return{x:w,y:b,textAnchor:w>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:c,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:c,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:c,textAnchor:"middle",verticalAnchor:"end"};var _=(d+h)/2,j=vn(o,c,_,v),C=j.x,E=j.y;return{x:C,y:E,textAnchor:"middle",verticalAnchor:"middle"}},Cye=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,s=t.position,o=n,c=o.x,d=o.y,h=o.width,p=o.height,m=p>=0?1:-1,v=m*i,x=m>0?"end":"start",w=m>0?"start":"end",b=h>=0?1:-1,_=b*i,j=b>0?"end":"start",C=b>0?"start":"end";if(s==="top"){var E={x:c+h/2,y:d-m*i,textAnchor:"middle",verticalAnchor:x};return Xn(Xn({},E),r?{height:Math.max(d-r.y,0),width:h}:{})}if(s==="bottom"){var A={x:c+h/2,y:d+p+v,textAnchor:"middle",verticalAnchor:w};return Xn(Xn({},A),r?{height:Math.max(r.y+r.height-(d+p),0),width:h}:{})}if(s==="left"){var k={x:c-_,y:d+p/2,textAnchor:j,verticalAnchor:"middle"};return Xn(Xn({},k),r?{width:Math.max(k.x-r.x,0),height:p}:{})}if(s==="right"){var M={x:c+h+_,y:d+p/2,textAnchor:C,verticalAnchor:"middle"};return Xn(Xn({},M),r?{width:Math.max(r.x+r.width-M.x,0),height:p}:{})}var I=r?{width:h,height:p}:{};return s==="insideLeft"?Xn({x:c+_,y:d+p/2,textAnchor:C,verticalAnchor:"middle"},I):s==="insideRight"?Xn({x:c+h-_,y:d+p/2,textAnchor:j,verticalAnchor:"middle"},I):s==="insideTop"?Xn({x:c+h/2,y:d+v,textAnchor:"middle",verticalAnchor:w},I):s==="insideBottom"?Xn({x:c+h/2,y:d+p-v,textAnchor:"middle",verticalAnchor:x},I):s==="insideTopLeft"?Xn({x:c+_,y:d+v,textAnchor:C,verticalAnchor:w},I):s==="insideTopRight"?Xn({x:c+h-_,y:d+v,textAnchor:j,verticalAnchor:w},I):s==="insideBottomLeft"?Xn({x:c+_,y:d+p-v,textAnchor:C,verticalAnchor:x},I):s==="insideBottomRight"?Xn({x:c+h-_,y:d+p-v,textAnchor:j,verticalAnchor:x},I):nh(s)&&(De(s.x)||Uc(s.x))&&(De(s.y)||Uc(s.y))?Xn({x:c+Yr(s.x,h),y:d+Yr(s.y,p),textAnchor:"end",verticalAnchor:"end"},I):Xn({x:c+h/2,y:d+p/2,textAnchor:"middle",verticalAnchor:"middle"},I)},Eye=function(t){return"cx"in t&&De(t.cx)};function dr(e){var t=e.offset,n=t===void 0?5:t,r=yye(e,dye),i=Xn({offset:n},r),s=i.viewBox,o=i.position,c=i.value,d=i.children,h=i.content,p=i.className,m=p===void 0?"":p,v=i.textBreakAll;if(!s||St(c)&&St(d)&&!P.isValidElement(h)&&!mt(h))return null;if(P.isValidElement(h))return P.cloneElement(h,i);var x;if(mt(h)){if(x=P.createElement(h,i),P.isValidElement(x))return x}else x=wye(i);var w=Eye(s),b=ct(i,!0);if(w&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Sye(i,x,b);var _=w?Nye(i):Cye(i);return J.createElement(bu,ym({className:jt("recharts-label",m)},b,_,{breakAll:v}),x)}dr.displayName="Label";var BU=function(t){var n=t.cx,r=t.cy,i=t.angle,s=t.startAngle,o=t.endAngle,c=t.r,d=t.radius,h=t.innerRadius,p=t.outerRadius,m=t.x,v=t.y,x=t.top,w=t.left,b=t.width,_=t.height,j=t.clockWise,C=t.labelViewBox;if(C)return C;if(De(b)&&De(_)){if(De(m)&&De(v))return{x:m,y:v,width:b,height:_};if(De(x)&&De(w))return{x,y:w,width:b,height:_}}return De(m)&&De(v)?{x:m,y:v,width:0,height:0}:De(n)&&De(r)?{cx:n,cy:r,startAngle:s||i||0,endAngle:o||i||0,innerRadius:h||0,outerRadius:p||d||c||0,clockWise:j}:t.viewBox?t.viewBox:{}},Pye=function(t,n){return t?t===!0?J.createElement(dr,{key:"label-implicit",viewBox:n}):Jn(t)?J.createElement(dr,{key:"label-implicit",viewBox:n,value:t}):P.isValidElement(t)?t.type===dr?P.cloneElement(t,{key:"label-implicit",viewBox:n}):J.createElement(dr,{key:"label-implicit",content:t,viewBox:n}):mt(t)?J.createElement(dr,{key:"label-implicit",content:t,viewBox:n}):nh(t)?J.createElement(dr,ym({viewBox:n},t,{key:"label-implicit"})):null:null},kye=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,s=BU(t),o=ua(i,dr).map(function(d,h){return P.cloneElement(d,{viewBox:n||s,key:"label-".concat(h)})});if(!r)return o;var c=Pye(t.label,n||s);return[c].concat(fye(o))};dr.parseViewBox=BU;dr.renderCallByParent=kye;var tN,u4;function Aye(){if(u4)return tN;u4=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return tN=e,tN}var Oye=Aye();const Tye=Kt(Oye);function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}var Mye=["valueAccessor"],Rye=["data","dataKey","clockWise","id","textBreakAll"];function Iye(e){return Fye(e)||$ye(e)||Dye(e)||Lye()}function Lye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
982In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dye(e,t){if(e){if(typeof e=="string")return xE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xE(e,t)}}function $ye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fye(e){if(Array.isArray(e))return xE(e)}function xE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sx(){return Sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sx.apply(this,arguments)}function d4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d4(Object(n),!0).forEach(function(r){Bye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bye(e,t,n){return t=zye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zye(e){var t=Uye(e,"string");return vm(t)=="symbol"?t:t+""}function Uye(e,t){if(vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h4(e,t){if(e==null)return{};var n=qye(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Hye=function(t){return Array.isArray(t.value)?Tye(t.value):t.value};function vo(e){var t=e.valueAccessor,n=t===void 0?Hye:t,r=h4(e,Mye),i=r.data,s=r.dataKey,o=r.clockWise,c=r.id,d=r.textBreakAll,h=h4(r,Rye);return!i||!i.length?null:J.createElement(Ft,{className:"recharts-label-list"},i.map(function(p,m){var v=St(s)?n(p,m):Qn(p&&p.payload,s),x=St(c)?{}:{id:"".concat(c,"-").concat(m)};return J.createElement(dr,Sx({},ct(p,!0),h,x,{parentViewBox:p.parentViewBox,value:v,textBreakAll:d,viewBox:dr.parseViewBox(St(o)?p:f4(f4({},p),{},{clockWise:o})),key:"label-".concat(m),index:m}))}))}vo.displayName="LabelList";function Wye(e,t){return e?e===!0?J.createElement(vo,{key:"labelList-implicit",data:t}):J.isValidElement(e)||mt(e)?J.createElement(vo,{key:"labelList-implicit",data:t,content:e}):nh(e)?J.createElement(vo,Sx({data:t},e,{key:"labelList-implicit"})):null:null}function Vye(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ua(r,vo).map(function(o,c){return P.cloneElement(o,{data:t,key:"labelList-".concat(c)})});if(!n)return i;var s=Wye(e.label,t);return[s].concat(Iye(i))}vo.renderCallByParent=Vye;function xm(e){"@babel/helpers - typeof";return xm=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},xm(e)}function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bE.apply(this,arguments)}function p4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p4(Object(n),!0).forEach(function(r){Kye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kye(e,t,n){return t=Gye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gye(e){var t=Zye(e,"string");return xm(t)=="symbol"?t:t+""}function Zye(e,t){if(xm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yye=function(t,n){var r=Zr(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},rv=function(t){var n=t.cx,r=t.cy,i=t.radius,s=t.angle,o=t.sign,c=t.isExternal,d=t.cornerRadius,h=t.cornerIsExternal,p=d*(c?1:-1)+i,m=Math.asin(d/p)/jx,v=h?s:s+o*m,x=vn(n,r,p,v),w=vn(n,r,i,v),b=h?s-o*m:s,_=vn(n,r,p*Math.cos(m*jx),b);return{center:x,circleTangency:w,lineTangency:_,theta:m}},zU=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,o=t.startAngle,c=t.endAngle,d=Yye(o,c),h=o+d,p=vn(n,r,s,o),m=vn(n,r,s,h),v="M ".concat(p.x,",").concat(p.y,`
983    A `).concat(s,",").concat(s,`,0,
984    `).concat(+(Math.abs(d)>180),",").concat(+(o>h),`,
985    `).concat(m.x,",").concat(m.y,`
986  `);if(i>0){var x=vn(n,r,i,o),w=vn(n,r,i,h);v+="L ".concat(w.x,",").concat(w.y,`
987            A `).concat(i,",").concat(i,`,0,
988            `).concat(+(Math.abs(d)>180),",").concat(+(o<=h),`,
989            `).concat(x.x,",").concat(x.y," Z")}else v+="L ".concat(n,",").concat(r," Z");return v},Xye=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,o=t.cornerRadius,c=t.forceCornerRadius,d=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,m=Zr(p-h),v=rv({cx:n,cy:r,radius:s,angle:h,sign:m,cornerRadius:o,cornerIsExternal:d}),x=v.circleTangency,w=v.lineTangency,b=v.theta,_=rv({cx:n,cy:r,radius:s,angle:p,sign:-m,cornerRadius:o,cornerIsExternal:d}),j=_.circleTangency,C=_.lineTangency,E=_.theta,A=d?Math.abs(h-p):Math.abs(h-p)-b-E;if(A<0)return c?"M ".concat(w.x,",").concat(w.y,`
990        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
991        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
992      `):zU({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:h,endAngle:p});var k="M ".concat(w.x,",").concat(w.y,`
993    A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(x.x,",").concat(x.y,`
994    A`).concat(s,",").concat(s,",0,").concat(+(A>180),",").concat(+(m<0),",").concat(j.x,",").concat(j.y,`
995    A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(C.x,",").concat(C.y,`
996  `);if(i>0){var M=rv({cx:n,cy:r,radius:i,angle:h,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:d}),I=M.circleTangency,$=M.lineTangency,q=M.theta,V=rv({cx:n,cy:r,radius:i,angle:p,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:d}),H=V.circleTangency,U=V.lineTangency,z=V.theta,Z=d?Math.abs(h-p):Math.abs(h-p)-q-z;if(Z<0&&o===0)return"".concat(k,"L").concat(n,",").concat(r,"Z");k+="L".concat(U.x,",").concat(U.y,`
997      A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(H.x,",").concat(H.y,`
998      A`).concat(i,",").concat(i,",0,").concat(+(Z>180),",").concat(+(m>0),",").concat(I.x,",").concat(I.y,`
999      A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat($.x,",").concat($.y,"Z")}else k+="L".concat(n,",").concat(r,"Z");return k},Qye={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},UU=function(t){var n=m4(m4({},Qye),t),r=n.cx,i=n.cy,s=n.innerRadius,o=n.outerRadius,c=n.cornerRadius,d=n.forceCornerRadius,h=n.cornerIsExternal,p=n.startAngle,m=n.endAngle,v=n.className;if(o<s||p===m)return null;var x=jt("recharts-sector",v),w=o-s,b=Yr(c,w,0,!0),_;return b>0&&Math.abs(p-m)<360?_=Xye({cx:r,cy:i,innerRadius:s,outerRadius:o,cornerRadius:Math.min(b,w/2),forceCornerRadius:d,cornerIsExternal:h,startAngle:p,endAngle:m}):_=zU({cx:r,cy:i,innerRadius:s,outerRadius:o,startAngle:p,endAngle:m}),J.createElement("path",bE({},ct(n,!0),{className:x,d:_,role:"img"}))};function bm(e){"@babel/helpers - typeof";return bm=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},bm(e)}function _E(){return _E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_E.apply(this,arguments)}function g4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function y4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g4(Object(n),!0).forEach(function(r){Jye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jye(e,t,n){return t=eve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eve(e){var t=tve(e,"string");return bm(t)=="symbol"?t:t+""}function tve(e,t){if(bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v4={curveBasisClosed:_ce,curveBasisOpen:wce,curveBasis:bce,curveBumpX:sce,curveBumpY:oce,curveLinearClosed:jce,curveLinear:V0,curveMonotoneX:Sce,curveMonotoneY:Nce,curveNatural:Cce,curveStep:Ece,curveStepAfter:kce,curveStepBefore:Pce},iv=function(t){return t.x===+t.x&&t.y===+t.y},mp=function(t){return t.x},gp=function(t){return t.y},nve=function(t,n){if(mt(t))return t;var r="curve".concat(H0(t));return(r==="curveMonotone"||r==="curveBump")&&n?v4["".concat(r).concat(n==="vertical"?"Y":"X")]:v4[r]||V0},rve=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,s=i===void 0?[]:i,o=t.baseLine,c=t.layout,d=t.connectNulls,h=d===void 0?!1:d,p=nve(r,c),m=h?s.filter(function(b){return iv(b)}):s,v;if(Array.isArray(o)){var x=h?o.filter(function(b){return iv(b)}):o,w=m.map(function(b,_){return y4(y4({},b),{},{base:x[_]})});return c==="vertical"?v=Zy().y(gp).x1(mp).x0(function(b){return b.base.x}):v=Zy().x(mp).y1(gp).y0(function(b){return b.base.y}),v.defined(iv).curve(p),v(w)}return c==="vertical"&&De(o)?v=Zy().y(gp).x1(mp).x0(o):De(o)?v=Zy().x(mp).y1(gp).y0(o):v=B8().x(mp).y(gp),v.defined(iv).curve(p),v(m)},Gd=function(t){var n=t.className,r=t.points,i=t.path,s=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?rve(t):i;return P.createElement("path",_E({},ct(t,!1),Qv(t),{className:jt("recharts-curve",n),d:o,ref:s}))},nN={exports:{}},rN,x4;function ive(){if(x4)return rN;x4=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return rN=e,rN}var iN,b4;function ave(){if(b4)return iN;b4=1;var e=ive();function t(){}function n(){}return n.resetWarningCache=t,iN=function(){function r(o,c,d,h,p,m){if(m!==e){var v=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 v.name="Invariant Violation",v}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},iN}var _4;function sve(){return _4||(_4=1,nN.exports=ave()()),nN.exports}var ove=sve();const Xt=Kt(ove);var lve=Object.getOwnPropertyNames,cve=Object.getOwnPropertySymbols,uve=Object.prototype.hasOwnProperty;function w4(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function av(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var s=i.cache,o=s.get(n),c=s.get(r);if(o&&c)return o===r&&c===n;s.set(n,r),s.set(r,n);var d=e(n,r,i);return s.delete(n),s.delete(r),d}}function j4(e){return lve(e).concat(cve(e))}var dve=Object.hasOwn||(function(e,t){return uve.call(e,t)});function Iu(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var fve="__v",hve="__o",pve="_owner",S4=Object.getOwnPropertyDescriptor,N4=Object.keys;function mve(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function gve(e,t){return Iu(e.getTime(),t.getTime())}function yve(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vve(e,t){return e===t}function C4(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),s=e.entries(),o,c,d=0;(o=s.next())&&!o.done;){for(var h=t.entries(),p=!1,m=0;(c=h.next())&&!c.done;){if(i[m]){m++;continue}var v=o.value,x=c.value;if(n.equals(v[0],x[0],d,m,e,t,n)&&n.equals(v[1],x[1],v[0],x[0],e,t,n)){p=i[m]=!0;break}m++}if(!p)return!1;d++}return!0}var xve=Iu;function bve(e,t,n){var r=N4(e),i=r.length;if(N4(t).length!==i)return!1;for(;i-- >0;)if(!qU(e,t,n,r[i]))return!1;return!0}
999function yp(e,t,n){var r=j4(e),i=r.length;if(j4(t).length!==i)return!1;for(var s,o,c;i-- >0;)if(s=r[i],!qU(e,t,n,s)||(o=S4(e,s),c=S4(t,s),(o||c)&&(!o||!c||o.configurable!==c.configurable||o.enumerable!==c.enumerable||o.writable!==c.writable)))return!1;return!0}function _ve(e,t){return Iu(e.valueOf(),t.valueOf())}function wve(e,t){return e.source===t.source&&e.flags===t.flags}function E4(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),s=e.values(),o,c;(o=s.next())&&!o.done;){for(var d=t.values(),h=!1,p=0;(c=d.next())&&!c.done;){if(!i[p]&&n.equals(o.value,c.value,o.value,c.value,e,t,n)){h=i[p]=!0;break}p++}if(!h)return!1}return!0}function jve(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Sve(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 qU(e,t,n,r){return(r===pve||r===hve||r===fve)&&(e.$$typeof||t.$$typeof)?!0:dve(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Nve="[object Arguments]",Cve="[object Boolean]",Eve="[object Date]",Pve="[object Error]",kve="[object Map]",Ave="[object Number]",Ove="[object Object]",Tve="[object RegExp]",Mve="[object Set]",Rve="[object String]",Ive="[object URL]",Lve=Array.isArray,P4=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,k4=Object.assign,Dve=Object.prototype.toString.call.bind(Object.prototype.toString);function $ve(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,s=e.areMapsEqual,o=e.areNumbersEqual,c=e.areObjectsEqual,d=e.arePrimitiveWrappersEqual,h=e.areRegExpsEqual,p=e.areSetsEqual,m=e.areTypedArraysEqual,v=e.areUrlsEqual;return function(w,b,_){if(w===b)return!0;if(w==null||b==null)return!1;var j=typeof w;if(j!==typeof b)return!1;if(j!=="object")return j==="number"?o(w,b,_):j==="function"?i(w,b,_):!1;var C=w.constructor;if(C!==b.constructor)return!1;if(C===Object)return c(w,b,_);if(Lve(w))return t(w,b,_);if(P4!=null&&P4(w))return m(w,b,_);if(C===Date)return n(w,b,_);if(C===RegExp)return h(w,b,_);if(C===Map)return s(w,b,_);if(C===Set)return p(w,b,_);var E=Dve(w);return E===Eve?n(w,b,_):E===Tve?h(w,b,_):E===kve?s(w,b,_):E===Mve?p(w,b,_):E===Ove?typeof w.then!="function"&&typeof b.then!="function"&&c(w,b,_):E===Ive?v(w,b,_):E===Pve?r(w,b,_):E===Nve?c(w,b,_):E===Cve||E===Ave||E===Rve?d(w,b,_):!1}}function Fve(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?yp:mve,areDatesEqual:gve,areErrorsEqual:yve,areFunctionsEqual:vve,areMapsEqual:r?w4(C4,yp):C4,areNumbersEqual:xve,areObjectsEqual:r?yp:bve,arePrimitiveWrappersEqual:_ve,areRegExpsEqual:wve,areSetsEqual:r?w4(E4,yp):E4,areTypedArraysEqual:r?yp:jve,areUrlsEqual:Sve};if(n&&(i=k4({},i,n(i))),t){var s=av(i.areArraysEqual),o=av(i.areMapsEqual),c=av(i.areObjectsEqual),d=av(i.areSetsEqual);i=k4({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:c,areSetsEqual:d})}return i}function Bve(e){return function(t,n,r,i,s,o,c){return e(t,n,c)}}function zve(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,s=e.strict;if(r)return function(d,h){var p=r(),m=p.cache,v=m===void 0?t?new WeakMap:void 0:m,x=p.meta;return n(d,h,{cache:v,equals:i,meta:x,strict:s})};if(t)return function(d,h){return n(d,h,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(d,h){return n(d,h,o)}}var Uve=Zl();Zl({strict:!0});Zl({circular:!0});Zl({circular:!0,strict:!0});Zl({createInternalComparator:function(){return Iu}});Zl({strict:!0,createInternalComparator:function(){return Iu}});Zl({circular:!0,createInternalComparator:function(){return Iu}});Zl({circular:!0,createInternalComparator:function(){return Iu},strict:!0});function Zl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,s=e.strict,o=s===void 0?!1:s,c=Fve(e),d=$ve(c),h=r?r(d):Bve(d);return zve({circular:n,comparator:d,createState:i,equals:h,strict:o})}function qve(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function A4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(s){n<0&&(n=s),s-n>t?(e(s),n=-1):qve(i)};requestAnimationFrame(r)}function wE(e){"@babel/helpers - typeof";return wE=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},wE(e)}function Hve(e){return Gve(e)||Kve(e)||Vve(e)||Wve()}
vendor: 60,522 bytes, lines 999-1018
999function Wve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1000In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vve(e,t){if(e){if(typeof e=="string")return O4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O4(e,t)}}function O4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gve(e){if(Array.isArray(e))return e}function Zve(){var e={},t=function(){return null},n=!1,r=function i(s){if(!n){if(Array.isArray(s)){if(!s.length)return;var o=s,c=Hve(o),d=c[0],h=c.slice(1);if(typeof d=="number"){A4(i.bind(null,h),d);return}i(d),A4(i.bind(null,h));return}wE(s)==="object"&&(e=s,t(e)),typeof s=="function"&&s()}};return{stop:function(){n=!0},start:function(s){n=!1,r(s)},subscribe:function(s){return t=s,function(){t=function(){return null}}}}}function _m(e){"@babel/helpers - typeof";return _m=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},_m(e)}function T4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function M4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T4(Object(n),!0).forEach(function(r){HU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HU(e,t,n){return t=Yve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yve(e){var t=Xve(e,"string");return _m(t)==="symbol"?t:String(t)}function Xve(e,t){if(_m(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_m(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qve=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(s){return i.includes(s)})})},Jve=function(t){return t},exe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Lp=function(t,n){return Object.keys(n).reduce(function(r,i){return M4(M4({},r),{},HU({},i,t(i,n[i])))},{})},R4=function(t,n,r){return t.map(function(i){return"".concat(exe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function txe(e,t){return ixe(e)||rxe(e,t)||WU(e,t)||nxe()}function nxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1001In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function ixe(e){if(Array.isArray(e))return e}function axe(e){return lxe(e)||oxe(e)||WU(e)||sxe()}function sxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1002In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WU(e,t){if(e){if(typeof e=="string")return jE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jE(e,t)}}function oxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lxe(e){if(Array.isArray(e))return jE(e)}function jE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Nx=1e-4,VU=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},KU=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},I4=function(t,n){return function(r){var i=VU(t,n);return KU(i,r)}},cxe=function(t,n){return function(r){var i=VU(t,n),s=[].concat(axe(i.map(function(o,c){return o*c}).slice(1)),[0]);return KU(s,r)}},L4=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],s=n[1],o=n[2],c=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,s=0,o=1,c=1;break;case"ease":i=.25,s=.1,o=.25,c=1;break;case"ease-in":i=.42,s=0,o=1,c=1;break;case"ease-out":i=.42,s=0,o=.58,c=1;break;case"ease-in-out":i=0,s=0,o=.58,c=1;break;default:{var d=n[0].split("(");if(d[0]==="cubic-bezier"&&d[1].split(")")[0].split(",").length===4){var h=d[1].split(")")[0].split(",").map(function(_){return parseFloat(_)}),p=txe(h,4);i=p[0],s=p[1],o=p[2],c=p[3]}}}var m=I4(i,o),v=I4(s,c),x=cxe(i,o),w=function(j){return j>1?1:j<0?0:j},b=function(j){for(var C=j>1?1:j,E=C,A=0;A<8;++A){var k=m(E)-C,M=x(E);if(Math.abs(k-C)<Nx||M<Nx)return v(E);E=w(E-k/M)}return v(E)};return b.isStepper=!1,b},uxe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,s=i===void 0?8:i,o=t.dt,c=o===void 0?17:o,d=function(p,m,v){var x=-(p-m)*r,w=v*s,b=v+(x-w)*c/1e3,_=v*c/1e3+p;return Math.abs(_-m)<Nx&&Math.abs(b)<Nx?[m,0]:[_,b]};return d.isStepper=!0,d.dt=c,d},dxe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return L4(i);case"spring":return uxe();default:if(i.split("(")[0]==="cubic-bezier")return L4(i)}return typeof i=="function"?i:null};function wm(e){"@babel/helpers - typeof";return wm=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},wm(e)}function D4(e){return pxe(e)||hxe(e)||GU(e)||fxe()}function fxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1003In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pxe(e){if(Array.isArray(e))return NE(e)}function $4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$4(Object(n),!0).forEach(function(r){SE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SE(e,t,n){return t=mxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mxe(e){var t=gxe(e,"string");return wm(t)==="symbol"?t:String(t)}function gxe(e,t){if(wm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yxe(e,t){return bxe(e)||xxe(e,t)||GU(e,t)||vxe()}function vxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1004In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GU(e,t){if(e){if(typeof e=="string")return NE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NE(e,t)}}function NE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function bxe(e){if(Array.isArray(e))return e}var Cx=function(t,n,r){return t+(n-t)*r},CE=function(t){var n=t.from,r=t.to;return n!==r},_xe=function e(t,n,r){var i=Lp(function(s,o){if(CE(o)){var c=t(o.from,o.to,o.velocity),d=yxe(c,2),h=d[0],p=d[1];return br(br({},o),{},{from:h,velocity:p})}return o},n);return r<1?Lp(function(s,o){return CE(o)?br(br({},o),{},{velocity:Cx(o.velocity,i[s].velocity,r),from:Cx(o.from,i[s].from,r)}):o},n):e(t,i,r-1)};const wxe=(function(e,t,n,r,i){var s=Qve(e,t),o=s.reduce(function(_,j){return br(br({},_),{},SE({},j,[e[j],t[j]]))},{}),c=s.reduce(function(_,j){return br(br({},_),{},SE({},j,{from:e[j],velocity:0,to:t[j]}))},{}),d=-1,h,p,m=function(){return null},v=function(){return Lp(function(j,C){return C.from},c)},x=function(){return!Object.values(c).filter(CE).length},w=function(j){h||(h=j);var C=j-h,E=C/n.dt;c=_xe(n,c,E),i(br(br(br({},e),t),v())),h=j,x()||(d=requestAnimationFrame(m))},b=function(j){p||(p=j);var C=(j-p)/r,E=Lp(function(k,M){return Cx.apply(void 0,D4(M).concat([n(C)]))},o);if(i(br(br(br({},e),t),E)),C<1)d=requestAnimationFrame(m);else{var A=Lp(function(k,M){return Cx.apply(void 0,D4(M).concat([n(1)]))},o);i(br(br(br({},e),t),A))}};return m=n.isStepper?w:b,function(){return requestAnimationFrame(m),function(){cancelAnimationFrame(d)}}});function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}var jxe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Sxe(e,t){if(e==null)return{};var n=Nxe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nxe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function aN(e){return kxe(e)||Pxe(e)||Exe(e)||Cxe()}function Cxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1005In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Exe(e,t){if(e){if(typeof e=="string")return EE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EE(e,t)}}function Pxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kxe(e){if(Array.isArray(e))return EE(e)}function EE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F4(Object(n),!0).forEach(function(r){Ep(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ep(e,t,n){return t=ZU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Axe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oxe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZU(r.key),r)}}function Txe(e,t,n){return t&&Oxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZU(e){var t=Mxe(e,"string");return Sf(t)==="symbol"?t:String(t)}function Mxe(e,t){if(Sf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PE(e,t)}function PE(e,t){return PE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PE(e,t)}function Ixe(e){var t=Lxe();return function(){var r=Ex(e),i;if(t){var s=Ex(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return kE(this,i)}}function kE(e,t){if(t&&(Sf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AE(e)}function AE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lxe(){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 Ex(e){return Ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ex(e)}var Ss=(function(e){Rxe(n,e);var t=Ixe(n);function n(r,i){var s;Axe(this,n),s=t.call(this,r,i);var o=s.props,c=o.isActive,d=o.attributeName,h=o.from,p=o.to,m=o.steps,v=o.children,x=o.duration;if(s.handleStyleChange=s.handleStyleChange.bind(AE(s)),s.changeStyle=s.changeStyle.bind(AE(s)),!c||x<=0)return s.state={style:{}},typeof v=="function"&&(s.state={style:p}),kE(s);if(m&&m.length)s.state={style:m[0].style};else if(h){if(typeof v=="function")return s.state={style:h},kE(s);s.state={style:d?Ep({},d,h):h}}else s.state={style:{}};return s}return Txe(n,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,o=i.canBegin;this.mounted=!0,!(!s||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isActive,c=s.canBegin,d=s.attributeName,h=s.shouldReAnimate,p=s.to,m=s.from,v=this.state.style;if(c){if(!o){var x={style:d?Ep({},d,p):p};this.state&&v&&(d&&v[d]!==p||!d&&v!==p)&&this.setState(x);return}if(!(Uve(i.to,p)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=w||h?m:i.to;if(this.state&&v){var _={style:d?Ep({},d,b):b};(d&&v[d]!==b||!d&&v!==b)&&this.setState(_)}this.runAnimation(Pa(Pa({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,o=i.from,c=i.to,d=i.duration,h=i.easing,p=i.begin,m=i.onAnimationEnd,v=i.onAnimationStart,x=wxe(o,c,dxe(h),d,this.changeStyle),w=function(){s.stopJSAnimation=x()};this.manager.start([v,p,w,d,m])}},{key:"runStepAnimation",value:function(i){var s=this,o=i.steps,c=i.begin,d=i.onAnimationStart,h=o[0],p=h.style,m=h.duration,v=m===void 0?0:m,x=function(b,_,j){if(j===0)return b;var C=_.duration,E=_.easing,A=E===void 0?"ease":E,k=_.style,M=_.properties,I=_.onAnimationEnd,$=j>0?o[j-1]:_,q=M||Object.keys(k);if(typeof A=="function"||A==="spring")return[].concat(aN(b),[s.runJSAnimation.bind(s,{from:$.style,to:k,duration:C,easing:A}),C]);var V=R4(q,C,A),H=Pa(Pa(Pa({},$.style),k),{},{transition:V});return[].concat(aN(b),[H,C,I]).filter(Jve)};return this.manager.start([d].concat(aN(o.reduce(x,[p,Math.max(v,c)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Zve());var s=i.begin,o=i.duration,c=i.attributeName,d=i.to,h=i.easing,p=i.onAnimationStart,m=i.onAnimationEnd,v=i.steps,x=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof h=="function"||typeof x=="function"||h==="spring"){this.runJSAnimation(i);return}if(v.length>1){this.runStepAnimation(i);return}var b=c?Ep({},c,d):d,_=R4(Object.keys(b),o,h);w.start([p,s,Pa(Pa({},b),{},{transition:_}),o,m])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var c=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var d=Sxe(i,jxe),h=P.Children.count(s),p=this.state.style;if(typeof s=="function")return s(p);if(!c||h===0||o<=0)return s;var m=function(x){var w=x.props,b=w.style,_=b===void 0?{}:b,j=w.className,C=P.cloneElement(x,Pa(Pa({},d),{},{style:Pa(Pa({},_),p),className:j}));return C};return h===1?m(P.Children.only(s)):J.createElement("div",null,P.Children.map(s,function(v){return m(v)}))}}]),n})(P.PureComponent);Ss.displayName="Animate";Ss.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ss.propTypes={from:Xt.oneOfType([Xt.object,Xt.string]),to:Xt.oneOfType([Xt.object,Xt.string]),attributeName:Xt.string,duration:Xt.number,begin:Xt.number,easing:Xt.oneOfType([Xt.string,Xt.func]),steps:Xt.arrayOf(Xt.shape({duration:Xt.number.isRequired,style:Xt.object.isRequired,easing:Xt.oneOfType([Xt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Xt.func]),properties:Xt.arrayOf("string"),onAnimationEnd:Xt.func})),children:Xt.oneOfType([Xt.node,Xt.func]),isActive:Xt.bool,canBegin:Xt.bool,onAnimationEnd:Xt.func,shouldReAnimate:Xt.bool,onAnimationStart:Xt.func,onAnimationReStart:Xt.func};function jm(e){"@babel/helpers - typeof";return jm=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},jm(e)}function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Px.apply(this,arguments)}function Dxe(e,t){return zxe(e)||Bxe(e,t)||Fxe(e,t)||$xe()}function $xe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1006In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fxe(e,t){if(e){if(typeof e=="string")return B4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B4(e,t)}}function B4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function zxe(e){if(Array.isArray(e))return e}function z4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z4(Object(n),!0).forEach(function(r){Uxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uxe(e,t,n){return t=qxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qxe(e){var t=Hxe(e,"string");return jm(t)=="symbol"?t:t+""}function Hxe(e,t){if(jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var q4=function(t,n,r,i,s){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),c=i>=0?1:-1,d=r>=0?1:-1,h=i>=0&&r>=0||i<0&&r<0?1:0,p;if(o>0&&s instanceof Array){for(var m=[0,0,0,0],v=0,x=4;v<x;v++)m[v]=s[v]>o?o:s[v];p="M".concat(t,",").concat(n+c*m[0]),m[0]>0&&(p+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(h,",").concat(t+d*m[0],",").concat(n)),p+="L ".concat(t+r-d*m[1],",").concat(n),m[1]>0&&(p+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(h,`,
1007        `).concat(t+r,",").concat(n+c*m[1])),p+="L ".concat(t+r,",").concat(n+i-c*m[2]),m[2]>0&&(p+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(h,`,
1008        `).concat(t+r-d*m[2],",").concat(n+i)),p+="L ".concat(t+d*m[3],",").concat(n+i),m[3]>0&&(p+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(h,`,
1009        `).concat(t,",").concat(n+i-c*m[3])),p+="Z"}else if(o>0&&s===+s&&s>0){var w=Math.min(o,s);p="M ".concat(t,",").concat(n+c*w,`
1010            A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+d*w,",").concat(n,`
1011            L `).concat(t+r-d*w,",").concat(n,`
1012            A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+r,",").concat(n+c*w,`
1013            L `).concat(t+r,",").concat(n+i-c*w,`
1014            A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t+r-d*w,",").concat(n+i,`
1015            L `).concat(t+d*w,",").concat(n+i,`
1016            A `).concat(w,",").concat(w,",0,0,").concat(h,",").concat(t,",").concat(n+i-c*w," Z")}else p="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return p},Wxe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,s=n.x,o=n.y,c=n.width,d=n.height;if(Math.abs(c)>0&&Math.abs(d)>0){var h=Math.min(s,s+c),p=Math.max(s,s+c),m=Math.min(o,o+d),v=Math.max(o,o+d);return r>=h&&r<=p&&i>=m&&i<=v}return!1},Vxe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},QP=function(t){var n=U4(U4({},Vxe),t),r=P.useRef(),i=P.useState(-1),s=Dxe(i,2),o=s[0],c=s[1];P.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&c(A)}catch{}},[]);var d=n.x,h=n.y,p=n.width,m=n.height,v=n.radius,x=n.className,w=n.animationEasing,b=n.animationDuration,_=n.animationBegin,j=n.isAnimationActive,C=n.isUpdateAnimationActive;if(d!==+d||h!==+h||p!==+p||m!==+m||p===0||m===0)return null;var E=jt("recharts-rectangle",x);return C?J.createElement(Ss,{canBegin:o>0,from:{width:p,height:m,x:d,y:h},to:{width:p,height:m,x:d,y:h},duration:b,animationEasing:w,isActive:C},function(A){var k=A.width,M=A.height,I=A.x,$=A.y;return J.createElement(Ss,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:_,duration:b,isActive:j,easing:w},J.createElement("path",Px({},ct(n,!0),{className:E,d:q4(I,$,k,M,v),ref:r})))}):J.createElement("path",Px({},ct(n,!0),{className:E,d:q4(d,h,p,m,v)}))},Kxe=["points","className","baseLinePoints","connectNulls"];function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$d.apply(this,arguments)}function Gxe(e,t){if(e==null)return{};var n=Zxe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function H4(e){return Jxe(e)||Qxe(e)||Xxe(e)||Yxe()}function Yxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1017In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xxe(e,t){if(e){if(typeof e=="string")return OE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OE(e,t)}}function Qxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jxe(e){if(Array.isArray(e))return OE(e)}function OE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var W4=function(t){return t&&t.x===+t.x&&t.y===+t.y},e0e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){W4(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),W4(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Dp=function(t,n){var r=e0e(t);n&&(r=[r.reduce(function(s,o){return[].concat(H4(s),H4(o))},[])]);var i=r.map(function(s){return s.reduce(function(o,c,d){return"".concat(o).concat(d===0?"M":"L").concat(c.x,",").concat(c.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},t0e=function(t,n,r){var i=Dp(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Dp(n.reverse(),r).slice(1))},n0e=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,s=t.connectNulls,o=Gxe(t,Kxe);if(!n||!n.length)return null;var c=jt("recharts-polygon",r);if(i&&i.length){var d=o.stroke&&o.stroke!=="none",h=t0e(n,i,s);return J.createElement("g",{className:c},J.createElement("path",$d({},ct(o,!0),{fill:h.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:h})),d?J.createElement("path",$d({},ct(o,!0),{fill:"none",d:Dp(n,s)})):null,d?J.createElement("path",$d({},ct(o,!0),{fill:"none",d:Dp(i,s)})):null)}var p=Dp(n,s);return J.createElement("path",$d({},ct(o,!0),{fill:p.slice(-1)==="Z"?o.fill:"none",className:c,d:p}))};function TE(){return TE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TE.apply(this,arguments)}var lb=function(t){var n=t.cx,r=t.cy,i=t.r,s=t.className,o=jt("recharts-dot",s);return n===+n&&r===+r&&i===+i?P.createElement("circle",TE({},ct(t,!1),Qv(t),{className:o,cx:n,cy:r,r:i})):null};function Sm(e){"@babel/helpers - typeof";return Sm=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},Sm(e)}var r0e=["x","y","top","left","width","height","className"];function ME(){return ME=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ME.apply(this,arguments)}function V4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function i0e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V4(Object(n),!0).forEach(function(r){a0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a0e(e,t,n){return t=s0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s0e(e){var t=o0e(e,"string");return Sm(t)=="symbol"?t:t+""}function o0e(e,t){if(Sm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l0e(e,t){if(e==null)return{};var n=c0e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var u0e=function(t,n,r,i,s,o){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},d0e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,o=t.top,c=o===void 0?0:o,d=t.left,h=d===void 0?0:d,p=t.width,m=p===void 0?0:p,v=t.height,x=v===void 0?0:v,w=t.className,b=l0e(t,r0e),_=i0e({x:r,y:s,top:c,left:h,width:m,height:x},b);return!De(r)||!De(s)||!De(m)||!De(x)||!De(c)||!De(h)?null:J.createElement("path",ME({},ct(_,!0),{className:jt("recharts-cross",w),d:u0e(r,s,m,x,c,h)}))},sN,K4;function f0e(){if(K4)return sN;K4=1;var e=rb(),t=uU(),n=ks();function r(i,s){return i&&i.length?e(i,n(s,2),t):void 0}return sN=r,sN}var h0e=f0e();const p0e=Kt(h0e);var oN,G4;function m0e(){if(G4)return oN;G4=1;var e=rb(),t=ks(),n=dU();function r(i,s){return i&&i.length?e(i,t(s,2),n):void 0}return oN=r,oN}var g0e=m0e();const y0e=Kt(g0e);var v0e=["cx","cy","angle","ticks","axisLine"],x0e=["ticks","tick","angle","tickFormatter","stroke"];function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(this,arguments)}function Z4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z4(Object(n),!0).forEach(function(r){cb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y4(e,t){if(e==null)return{};var n=b0e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XU(r.key),r)}}function w0e(e,t,n){return t&&X4(e.prototype,t),n&&X4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function j0e(e,t,n){return t=kx(t),S0e(e,YU()?Reflect.construct(t,n||[],kx(e).constructor):t.apply(e,n))}function S0e(e,t){if(t&&(Nf(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 YU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YU=function(){return!!e})()}function kx(e){return kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kx(e)}function C0e(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&&RE(e,t)}function RE(e,t){return RE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},RE(e,t)}function cb(e,t,n){return t=XU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XU(e){var t=E0e(e,"string");return Nf(t)=="symbol"?t:t+""}function E0e(e,t){if(Nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ub=(function(e){function t(){return _0e(this,t),j0e(this,t,arguments)}return C0e(t,e),w0e(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,s=this.props,o=s.angle,c=s.cx,d=s.cy;return vn(c,d,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,s=r.cy,o=r.angle,c=r.ticks,d=p0e(c,function(p){return p.coordinate||0}),h=y0e(c,function(p){return p.coordinate||0});return{cx:i,cy:s,startAngle:o,endAngle:o,innerRadius:h.coordinate||0,outerRadius:d.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,s=r.cy,o=r.angle,c=r.ticks,d=r.axisLine,h=Y4(r,v0e),p=c.reduce(function(w,b){return[Math.min(w[0],b.coordinate),Math.max(w[1],b.coordinate)]},[1/0,-1/0]),m=vn(i,s,p[0],o),v=vn(i,s,p[1],o),x=Ac(Ac(Ac({},ct(h,!1)),{},{fill:"none"},ct(d,!1)),{},{x1:m.x,y1:m.y,x2:v.x,y2:v.y});return J.createElement("line",$p({className:"recharts-polar-radius-axis-line"},x))}},{key:"renderTicks",value:function(){var r=this,i=this.props,s=i.ticks,o=i.tick,c=i.angle,d=i.tickFormatter,h=i.stroke,p=Y4(i,x0e),m=this.getTickTextAnchor(),v=ct(p,!1),x=ct(o,!1),w=s.map(function(b,_){var j=r.getTickValueCoord(b),C=Ac(Ac(Ac(Ac({textAnchor:m,transform:"rotate(".concat(90-c,", ").concat(j.x,", ").concat(j.y,")")},v),{},{stroke:"none",fill:h},x),{},{index:_},j),{},{payload:b});return J.createElement(Ft,$p({className:jt("recharts-polar-radius-axis-tick",FU(o)),key:"tick-".concat(b.coordinate)},vu(r.props,b,_)),t.renderTickItem(o,C,d?d(b.value,_):b.value))});return J.createElement(Ft,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var r=this.props,i=r.ticks,s=r.axisLine,o=r.tick;return!i||!i.length?null:J.createElement(Ft,{className:jt("recharts-polar-radius-axis",this.props.className)},s&&this.renderAxisLine(),o&&this.renderTicks(),dr.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,s){var o;return J.isValidElement(r)?o=J.cloneElement(r,i):mt(r)?o=r(i):o=J.createElement(bu,$p({},i,{className:"recharts-polar-radius-axis-tick-value"}),s),o}}])})(P.PureComponent);cb(ub,"displayName","PolarRadiusAxis");cb(ub,"axisType","radiusAxis");cb(ub,"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 Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function Q4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q4(Object(n),!0).forEach(function(r){db(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JU(r.key),r)}}function k0e(e,t,n){return t&&J4(e.prototype,t),n&&J4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A0e(e,t,n){return t=Ax(t),O0e(e,QU()?Reflect.construct(t,n||[],Ax(e).constructor):t.apply(e,n))}function O0e(e,t){if(t&&(Cf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T0e(e)}function T0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QU=function(){return!!e})()}function Ax(e){return Ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ax(e)}function M0e(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&&IE(e,t)}function IE(e,t){return IE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},IE(e,t)}function db(e,t,n){return t=JU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JU(e){var t=R0e(e,"string");return Cf(t)=="symbol"?t:t+""}function R0e(e,t){if(Cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var I0e=Math.PI/180,e5=1e-5,fb=(function(e){function t(){return P0e(this,t),A0e(this,t,arguments)}return M0e(t,e),k0e(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.cx,o=i.cy,c=i.radius,d=i.orientation,h=i.tickSize,p=h||8,m=vn(s,o,c,r.coordinate),v=vn(s,o,c+(d==="inner"?-1:1)*p,r.coordinate);return{x1:m.x,y1:m.y,x2:v.x,y2:v.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,s=Math.cos(-r.coordinate*I0e),o;return s>e5?o=i==="outer"?"start":"end":s<-e5?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,s=r.cy,o=r.radius,c=r.axisLine,d=r.axisLineType,h=Oc(Oc({},ct(this.props,!1)),{},{fill:"none"},ct(c,!1));if(d==="circle")return J.createElement(lb,Fc({className:"recharts-polar-angle-axis-line"},h,{cx:i,cy:s,r:o}));var p=this.props.ticks,m=p.map(function(v){return vn(i,s,o,v.coordinate)});return J.createElement(n0e,Fc({className:"recharts-polar-angle-axis-line"},h,{points:m}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,s=i.ticks,o=i.tick,c=i.tickLine,d=i.tickFormatter,h=i.stroke,p=ct(this.props,!1),m=ct(o,!1),v=Oc(Oc({},p),{},{fill:"none"},ct(c,!1)),x=s.map(function(w,b){var _=r.getTickLineCoord(w),j=r.getTickTextAnchor(w),C=Oc(Oc(Oc({textAnchor:j},p),{},{stroke:"none",fill:h},m),{},{index:b,payload:w,x:_.x2,y:_.y2});return J.createElement(Ft,Fc({className:jt("recharts-polar-angle-axis-tick",FU(o)),key:"tick-".concat(w.coordinate)},vu(r.props,w,b)),c&&J.createElement("line",Fc({className:"recharts-polar-angle-axis-tick-line"},v,_)),o&&t.renderTickItem(o,C,d?d(w.value,b):w.value))});return J.createElement(Ft,{className:"recharts-polar-angle-axis-ticks"},x)}},{key:"render",value:function(){var r=this.props,i=r.ticks,s=r.radius,o=r.axisLine;return s<=0||!i||!i.length?null:J.createElement(Ft,{className:jt("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,s){var o;return J.isValidElement(r)?o=J.cloneElement(r,i):mt(r)?o=r(i):o=J.createElement(bu,Fc({},i,{className:"recharts-polar-angle-axis-tick-value"}),s),o}}])})(P.PureComponent);db(fb,"displayName","PolarAngleAxis");db(fb,"axisType","angleAxis");db(fb,"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 lN,t5;function L0e(){if(t5)return lN;t5=1;var e=cz(),t=e(Object.getPrototypeOf,Object);return lN=t,lN}var cN,n5;function D0e(){if(n5)return cN;n5=1;var e=Po(),t=L0e(),n=ko(),r="[object Object]",i=Function.prototype,s=Object.prototype,o=i.toString,c=s.hasOwnProperty,d=o.call(Object);function h(p){if(!n(p)||e(p)!=r)return!1;var m=t(p);if(m===null)return!0;var v=c.call(m,"constructor")&&m.constructor;return typeof v=="function"&&v instanceof v&&o.call(v)==d}return cN=h,cN}var $0e=D0e();const F0e=Kt($0e);var uN,r5;function B0e(){if(r5)return uN;r5=1;var e=Po(),t=ko(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return uN=r,uN}var z0e=B0e();const U0e=Kt(z0e);function Nm(e){"@babel/helpers - typeof";return Nm=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},Nm(e)}function Ox(){return Ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ox.apply(this,arguments)}function q0e(e,t){return K0e(e)||V0e(e,t)||W0e(e,t)||H0e()}function H0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1018In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W0e(e,t){if(e){if(typeof e=="string")return i5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i5(e,t)}}function i5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V0e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function K0e(e){if(Array.isArray(e))return e}function a5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a5(Object(n),!0).forEach(function(r){G0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G0e(e,t,n){return t=Z0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z0e(e){var t=Y0e(e,"string");return Nm(t)=="symbol"?t:t+""}function Y0e(e,t){if(Nm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var o5=function(t,n,r,i,s){var o=r-i,c;return c="M ".concat(t,",").concat(n),c+="L ".concat(t+r,",").concat(n),c+="L ".concat(t+r-o/2,",").concat(n+s),c+="L ".concat(t+r-o/2-i,",").concat(n+s),c+="L ".concat(t,",").concat(n," Z"),c},X0e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Q0e=function(t){var n=s5(s5({},X0e),t),r=P.useRef(),i=P.useState(-1),s=q0e(i,2),o=s[0],c=s[1];P.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&c(E)}catch{}},[]);var d=n.x,h=n.y,p=n.upperWidth,m=n.lowerWidth,v=n.height,x=n.className,w=n.animationEasing,b=n.animationDuration,_=n.animationBegin,j=n.isUpdateAnimationActive;if(d!==+d||h!==+h||p!==+p||m!==+m||v!==+v||p===0&&m===0||v===0)return null;var C=jt("recharts-trapezoid",x);return j?J.createElement(Ss,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:v,x:d,y:h},to:{upperWidth:p,lowerWidth:m,height:v,x:d,y:h},duration:b,animationEasing:w,isActive:j},function(E){var A=E.upperWidth,k=E.lowerWidth,M=E.height,I=E.x,$=E.y;return J.createElement(Ss,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:_,duration:b,easing:w},J.createElement("path",Ox({},ct(n,!0),{className:C,d:o5(I,$,A,k,M),ref:r})))}):J.createElement("g",null,J.createElement("path",Ox({},ct(n,!0),{className:C,d:o5(d,h,p,m,v)})))},J0e=["option","shapeType","propTransformer","activeClassName","isActive"];function Cm(e){"@babel/helpers - typeof";return Cm=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},Cm(e)}function ebe(e,t){if(e==null)return{};var n=tbe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function l5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l5(Object(n),!0).forEach(function(r){nbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nbe(e,t,n){return t=rbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rbe(e){var t=ibe(e,"string");return Cm(t)=="symbol"?t:t+""}function ibe(e,t){if(Cm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function abe(e,t){return Tx(Tx({},t),e)}function sbe(e,t){return e==="symbols"}function c5(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return J.createElement(QP,n);case"trapezoid":return J.createElement(Q0e,n);case"sector":return J.createElement(UU,n);case"symbols":if(sbe(t))return J.createElement(yP,n);break;default:return null}}function obe(e){return P.isValidElement(e)?e.props:e}function e7(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?abe:r,s=e.activeClassName,o=s===void 0?"recharts-active-shape":s,c=e.isActive,d=ebe(e,J0e),h;if(P.isValidElement(t))h=P.cloneElement(t,Tx(Tx({},d),obe(t)));else if(mt(t))h=t(d);else if(F0e(t)&&!U0e(t)){var p=i(t,d);h=J.createElement(c5,{shapeType:n,elementProps:p})}else{var m=d;h=J.createElement(c5,{shapeType:n,elementProps:m})}return c?J.createElement(Ft,{className:o},h):h}function hb(e,t){return t!=null&&"trapezoids"in e.props}function pb(e,t){return t!=null&&"sectors"in e.props}function Em(e,t){return t!=null&&"points"in e.props}function lbe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,s=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&s}function cbe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function ube(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function dbe(e,t){var n;return hb(e,t)?n=lbe:pb(e,t)?n=cbe:Em(e,t)&&(n=ube),n}function fbe(e,t){var n;return hb(e,t)?n="trapezoids":pb(e,t)?n="sectors":Em(e,t)&&(n="points"),n}function hbe(e,t){if(hb(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(pb(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Em(e,t)?t.payload:{}}function pbe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=fbe(n,t),s=hbe(n,t),o=r.filter(function(d,h){var p=wf(s,d),m=n.props[i].filter(function(w){var b=dbe(n,t);return b(w,t)}),v=n.props[i].indexOf(m[m.length-1]),x=h===v;return p&&x}),c=r.indexOf(o[o.length-1]);return c}var Nv;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 Fd(){return Fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fd.apply(this,arguments)}function u5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u5(Object(n),!0).forEach(function(r){oa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n7(r.key),r)}}function gbe(e,t,n){return t&&d5(e.prototype,t),n&&d5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ybe(e,t,n){return t=Mx(t),vbe(e,t7()?Reflect.construct(t,n||[],Mx(e).constructor):t.apply(e,n))}function vbe(e,t){if(t&&(Ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xbe(e)}function xbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t7=function(){return!!e})()}function Mx(e){return Mx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mx(e)}function bbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LE(e,t)}function LE(e,t){return LE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LE(e,t)}function oa(e,t,n){return t=n7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n7(e){var t=_be(e,"string");return Ef(t)=="symbol"?t:t+""}function _be(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var As=(function(e){function t(n){var r;return mbe(this,t),r=ybe(this,t,[n]),oa(r,"pieRef",null),oa(r,"sectorRefs",[]),oa(r,"id",ih("recharts-pie-")),oa(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),mt(i)&&i()}),oa(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),mt(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return bbe(t,e),gbe(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var s=this.props,o=s.label,c=s.labelLine,d=s.dataKey,h=s.valueKey,p=ct(this.props,!1),m=ct(o,!1),v=ct(c,!1),x=o&&o.offsetRadius||20,w=r.map(function(b,_){var j=(b.startAngle+b.endAngle)/2,C=vn(b.cx,b.cy,b.outerRadius+x,j),E=gn(gn(gn(gn({},p),b),{},{stroke:"none"},m),{},{index:_,textAnchor:t.getTextAnchor(C.x,b.cx)},C),A=gn(gn(gn(gn({},p),b),{},{fill:"none",stroke:b.fill},v),{},{index:_,points:[vn(b.cx,b.cy,b.outerRadius,j),C]}),k=d;return St(d)&&St(h)?k="value":St(d)&&(k=h),J.createElement(Ft,{key:"label-".concat(b.startAngle,"-").concat(b.endAngle,"-").concat(b.midAngle,"-").concat(_)},c&&t.renderLabelLineItem(c,A,"line"),t.renderLabelItem(o,E,Qn(b,k)))});return J.createElement(Ft,{className:"recharts-pie-labels"},w)}},{key:"renderSectorsStatically",value:function(r){var i=this,s=this.props,o=s.activeShape,c=s.blendStroke,d=s.inactiveShape;return r.map(function(h,p){if((h==null?void 0:h.startAngle)===0&&(h==null?void 0:h.endAngle)===0&&r.length!==1)return null;var m=i.isActiveIndex(p),v=d&&i.hasActiveIndex()?d:null,x=m?o:v,w=gn(gn({},h),{},{stroke:c?h.fill:h.stroke,tabIndex:-1});return J.createElement(Ft,Fd({ref:function(_){_&&!i.sectorRefs.includes(_)&&i.sectorRefs.push(_)},tabIndex:-1,className:"recharts-pie-sector"},vu(i.props,h,p),{key:"sector-".concat(h==null?void 0:h.startAngle,"-").concat(h==null?void 0:h.endAngle,"-").concat(h.midAngle,"-").concat(p)}),J.createElement(e7,Fd({option:x,isActive:m,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,s=i.sectors,o=i.isAnimationActive,c=i.animationBegin,d=i.animationDuration,h=i.animationEasing,p=i.animationId,m=this.state,v=m.prevSectors,x=m.prevIsAnimationActive;return J.createElement(Ss,{begin:c,duration:d,isActive:o,easing:h,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(x),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var b=w.t,_=[],j=s&&s[0],C=j.startAngle;return s.forEach(function(E,A){var k=v&&v[A],M=A>0?Di(E,"paddingAngle",0):0;if(k){var I=ui(k.endAngle-k.startAngle,E.endAngle-E.startAngle),$=gn(gn({},E),{},{startAngle:C+M,endAngle:C+I(b)+M});_.push($),C=$.endAngle}else{var q=E.endAngle,V=E.startAngle,H=ui(0,q-V),U=H(b),z=gn(gn({},E),{},{startAngle:C+M,endAngle:C+U+M});_.push(z),C=z.endAngle}}),J.createElement(Ft,null,r.renderSectorsStatically(_))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(s){if(!s.altKey)switch(s.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var c=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[c].focus(),i.setState({sectorToFocus:c});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,s=r.isAnimationActive,o=this.state.prevSectors;return s&&i&&i.length&&(!o||!wf(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,s=i.hide,o=i.sectors,c=i.className,d=i.label,h=i.cx,p=i.cy,m=i.innerRadius,v=i.outerRadius,x=i.isAnimationActive,w=this.state.isAnimationFinished;if(s||!o||!o.length||!De(h)||!De(p)||!De(m)||!De(v))return null;var b=jt("recharts-pie",c);return J.createElement(Ft,{tabIndex:this.props.rootTabIndex,className:b,ref:function(j){r.pieRef=j}},this.renderSectors(),d&&this.renderLabels(o),dr.renderCallByParent(this.props,null,!1),(!x||w)&&vo.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,s){if(J.isValidElement(r))return J.cloneElement(r,i);if(mt(r))return r(i);var o=jt("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return J.createElement(Gd,Fd({},i,{key:s,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,s){if(J.isValidElement(r))return J.cloneElement(r,i);var o=s;if(mt(r)&&(o=r(i),J.isValidElement(o)))return o;var c=jt("recharts-pie-label-text",typeof r!="boolean"&&!mt(r)?r.className:"");return J.createElement(bu,Fd({},i,{alignmentBaseline:"middle",className:c}),o)}}])})(P.PureComponent);Nv=As;oa(As,"displayName","Pie");oa(As,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Tu.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});oa(As,"parseDeltaAngle",function(e,t){var n=Zr(t-e),r=Math.min(Math.abs(t-e),360);return n*r});oa(As,"getRealPieData",function(e){var t=e.data,n=e.children,r=ct(e,!1),i=ua(n,xu);return t&&t.length?t.map(function(s,o){return gn(gn(gn({payload:s},r),s),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(s){return gn(gn({},r),s.props)}):[]});oa(As,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,s=t.height,o=$U(i,s),c=r+Yr(e.cx,i,i/2),d=n+Yr(e.cy,s,s/2),h=Yr(e.innerRadius,o,0),p=Yr(e.outerRadius,o,o*.8),m=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:c,cy:d,innerRadius:h,outerRadius:p,maxRadius:m}});oa(As,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?gn(gn({},t.type.defaultProps),t.props):t.props,i=Nv.getRealPieData(r);if(!i||!i.length)return null;var s=r.cornerRadius,o=r.startAngle,c=r.endAngle,d=r.paddingAngle,h=r.dataKey,p=r.nameKey,m=r.valueKey,v=r.tooltipType,x=Math.abs(r.minAngle),w=Nv.parseCoordinateOfPie(r,n),b=Nv.parseDeltaAngle(o,c),_=Math.abs(b),j=h;St(h)&&St(m)?(La(!1,`Use "dataKey" to specify the value of pie,
1019      the props "valueKey" will be deprecated in 1.1.0`),j="value"):St(h)&&(La(!1,`Use "dataKey" to specify the value of pie,
1020      the props "valueKey" will be deprecated in 1.1.0`),j=m);var C=i.filter(function($){return Qn($,j,0)!==0}).length,E=(_>=360?C:C-1)*d,A=_-C*x-E,k=i.reduce(function($,q){var V=Qn(q,j,0);return $+(De(V)?V:0)},0),M;if(k>0){var I;M=i.map(function($,q){var V=Qn($,j,0),H=Qn($,p,q),U=(De(V)?V:0)/k,z;q?z=I.endAngle+Zr(b)*d*(V!==0?1:0):z=o;var Z=z+Zr(b)*((V!==0?x:0)+U*A),ee=(z+Z)/2,G=(w.innerRadius+w.outerRadius)/2,oe=[{name:H,value:V,payload:$,dataKey:j,type:v}],W=vn(w.cx,w.cy,G,ee);return I=gn(gn(gn({percent:U,cornerRadius:s,name:H,tooltipPayload:oe,midAngle:ee,middleRadius:G,tooltipPosition:W},$),w),{},{value:Qn($,j),startAngle:z,endAngle:Z,payload:$,paddingAngle:Zr(b)*d}),I})}return gn(gn({},w),{},{sectors:M,data:i})});var dN,f5;function wbe(){if(f5)return dN;f5=1;var e=Math.ceil,t=Math.max;function n(r,i,s,o){for(var c=-1,d=t(e((i-r)/(s||1)),0),h=Array(d);d--;)h[o?d:++c]=r,r+=s;return h}return dN=n,dN}var fN,h5;function r7(){if(h5)return fN;h5=1;var e=Nz(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var s=i<0?-1:1;return s*n}return i===i?i:0}return fN=r,fN}var hN,p5;function jbe(){if(p5)return hN;p5=1;var e=wbe(),t=Y0(),n=r7();function r(i){return function(s,o,c){return c&&typeof c!="number"&&t(s,o,c)&&(o=c=void 0),s=n(s),o===void 0?(o=s,s=0):o=n(o),c=c===void 0?s<o?1:-1:n(c),e(s,o,c,i)}}return hN=r,hN}var pN,m5;function Sbe(){if(m5)return pN;m5=1;var e=jbe(),t=e();return pN=t,pN}var Nbe=Sbe();const Rx=Kt(Nbe);function Pm(e){"@babel/helpers - typeof";return Pm=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},Pm(e)}function g5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function y5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g5(Object(n),!0).forEach(function(r){i7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i7(e,t,n){return t=Cbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cbe(e){var t=Ebe(e,"string");return Pm(t)=="symbol"?t:t+""}function Ebe(e,t){if(Pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pbe=["Webkit","Moz","O","ms"],kbe=function(t,n){var r=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=Pbe.reduce(function(s,o){return y5(y5({},s),{},i7({},o+r,n))},{});return i[t]=n,i};function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ix.apply(this,arguments)}function v5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v5(Object(n),!0).forEach(function(r){Ei(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Abe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s7(r.key),r)}}function Obe(e,t,n){return t&&x5(e.prototype,t),n&&x5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tbe(e,t,n){return t=Lx(t),Mbe(e,a7()?Reflect.construct(t,n||[],Lx(e).constructor):t.apply(e,n))}function Mbe(e,t){if(t&&(Pf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rbe(e)}function Rbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a7=function(){return!!e})()}
vendor: 120,051 bytes, lines 1020-1024
1020function Lx(e){return Lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lx(e)}function Ibe(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&&DE(e,t)}function DE(e,t){return DE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DE(e,t)}function Ei(e,t,n){return t=s7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s7(e){var t=Lbe(e,"string");return Pf(t)=="symbol"?t:t+""}function Lbe(e,t){if(Pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Dbe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,s=t.x,o=t.width,c=t.travellerWidth;if(!n||!n.length)return{};var d=n.length,h=Rp().domain(Rx(0,d)).range([s,s+o-c]),p=h.domain().map(function(m){return h(m)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:h(r),endX:h(i),scale:h,scaleValues:p}},b5=function(t){return t.changedTouches&&!!t.changedTouches.length},kf=(function(e){function t(n){var r;return Abe(this,t),r=Tbe(this,t,[n]),Ei(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Ei(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Ei(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,s=i.endIndex,o=i.onDragEnd,c=i.startIndex;o==null||o({endIndex:s,startIndex:c})}),r.detachDragEndListener()}),Ei(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ei(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ei(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ei(r,"handleSlideDragStart",function(i){var s=b5(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Ibe(t,e),Obe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,s=r.endX,o=this.state.scaleValues,c=this.props,d=c.gap,h=c.data,p=h.length-1,m=Math.min(i,s),v=Math.max(i,s),x=t.getIndexInRange(o,m),w=t.getIndexInRange(o,v);return{startIndex:x-x%d,endIndex:w===p?p:w-w%d}}},{key:"getTextOfTick",value:function(r){var i=this.props,s=i.data,o=i.tickFormatter,c=i.dataKey,d=Qn(s[r],c,r);return mt(o)?o(d,r):d}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,s=i.slideMoveStartX,o=i.startX,c=i.endX,d=this.props,h=d.x,p=d.width,m=d.travellerWidth,v=d.startIndex,x=d.endIndex,w=d.onChange,b=r.pageX-s;b>0?b=Math.min(b,h+p-m-c,h+p-m-o):b<0&&(b=Math.max(b,h-o,h-c));var _=this.getIndex({startX:o+b,endX:c+b});(_.startIndex!==v||_.endIndex!==x)&&w&&w(_),this.setState({startX:o+b,endX:c+b,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var s=b5(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,s=i.brushMoveStartX,o=i.movingTravellerId,c=i.endX,d=i.startX,h=this.state[o],p=this.props,m=p.x,v=p.width,x=p.travellerWidth,w=p.onChange,b=p.gap,_=p.data,j={startX:this.state.startX,endX:this.state.endX},C=r.pageX-s;C>0?C=Math.min(C,m+v-x-h):C<0&&(C=Math.max(C,m-h)),j[o]=h+C;var E=this.getIndex(j),A=E.startIndex,k=E.endIndex,M=function(){var $=_.length-1;return o==="startX"&&(c>d?A%b===0:k%b===0)||c<d&&k===$||o==="endX"&&(c>d?k%b===0:A%b===0)||c>d&&k===$};this.setState(Ei(Ei({},o,h+C),"brushMoveStartX",r.pageX),function(){w&&M()&&w(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var s=this,o=this.state,c=o.scaleValues,d=o.startX,h=o.endX,p=this.state[i],m=c.indexOf(p);if(m!==-1){var v=m+r;if(!(v===-1||v>=c.length)){var x=c[v];i==="startX"&&x>=h||i==="endX"&&x<=d||this.setState(Ei({},i,x),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,c=r.height,d=r.fill,h=r.stroke;return J.createElement("rect",{stroke:h,fill:d,x:i,y:s,width:o,height:c})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,c=r.height,d=r.data,h=r.children,p=r.padding,m=P.Children.only(h);return m?J.cloneElement(m,{x:i,y:s,width:o,height:c,margin:p,compact:!0,data:d}):null}},{key:"renderTravellerLayer",value:function(r,i){var s,o,c=this,d=this.props,h=d.y,p=d.travellerWidth,m=d.height,v=d.traveller,x=d.ariaLabel,w=d.data,b=d.startIndex,_=d.endIndex,j=Math.max(r,this.props.x),C=mN(mN({},ct(this.props,!1)),{},{x:j,y:h,width:p,height:m}),E=x||"Min value: ".concat((s=w[b])===null||s===void 0?void 0:s.name,", Max value: ").concat((o=w[_])===null||o===void 0?void 0:o.name);return J.createElement(Ft,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(k){["ArrowLeft","ArrowRight"].includes(k.key)&&(k.preventDefault(),k.stopPropagation(),c.handleTravellerMoveKeyboard(k.key==="ArrowRight"?1:-1,i))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(v,C))}},{key:"renderSlide",value:function(r,i){var s=this.props,o=s.y,c=s.height,d=s.stroke,h=s.travellerWidth,p=Math.min(r,i)+h,m=Math.max(Math.abs(i-r)-h,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:d,fillOpacity:.2,x:p,y:o,width:m,height:c})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,s=r.endIndex,o=r.y,c=r.height,d=r.travellerWidth,h=r.stroke,p=this.state,m=p.startX,v=p.endX,x=5,w={pointerEvents:"none",fill:h};return J.createElement(Ft,{className:"recharts-brush-texts"},J.createElement(bu,Ix({textAnchor:"end",verticalAnchor:"middle",x:Math.min(m,v)-x,y:o+c/2},w),this.getTextOfTick(i)),J.createElement(bu,Ix({textAnchor:"start",verticalAnchor:"middle",x:Math.max(m,v)+d+x,y:o+c/2},w),this.getTextOfTick(s)))}},{key:"render",value:function(){var r=this.props,i=r.data,s=r.className,o=r.children,c=r.x,d=r.y,h=r.width,p=r.height,m=r.alwaysShowText,v=this.state,x=v.startX,w=v.endX,b=v.isTextActive,_=v.isSlideMoving,j=v.isTravellerMoving,C=v.isTravellerFocused;if(!i||!i.length||!De(c)||!De(d)||!De(h)||!De(p)||h<=0||p<=0)return null;var E=jt("recharts-brush",s),A=J.Children.count(o)===1,k=kbe("userSelect","none");return J.createElement(Ft,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(x,w),this.renderTravellerLayer(x,"startX"),this.renderTravellerLayer(w,"endX"),(b||_||j||C||m)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,s=r.y,o=r.width,c=r.height,d=r.stroke,h=Math.floor(s+c/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:i,y:s,width:o,height:c,fill:d,stroke:"none"}),J.createElement("line",{x1:i+1,y1:h,x2:i+o-1,y2:h,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:i+1,y1:h+2,x2:i+o-1,y2:h+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var s;return J.isValidElement(r)?s=J.cloneElement(r,i):mt(r)?s=r(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(r,i){var s=r.data,o=r.width,c=r.x,d=r.travellerWidth,h=r.updateId,p=r.startIndex,m=r.endIndex;if(s!==i.prevData||h!==i.prevUpdateId)return mN({prevData:s,prevTravellerWidth:d,prevUpdateId:h,prevX:c,prevWidth:o},s&&s.length?Dbe({data:s,width:o,x:c,travellerWidth:d,startIndex:p,endIndex:m}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||c!==i.prevX||d!==i.prevTravellerWidth)){i.scale.range([c,c+o-d]);var v=i.scale.domain().map(function(x){return i.scale(x)});return{prevData:s,prevTravellerWidth:d,prevUpdateId:h,prevX:c,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:v}}return null}},{key:"getIndexInRange",value:function(r,i){for(var s=r.length,o=0,c=s-1;c-o>1;){var d=Math.floor((o+c)/2);r[d]>i?c=d:o=d}return i>=r[c]?c:o}}])})(P.PureComponent);Ei(kf,"displayName","Brush");Ei(kf,"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 gN,_5;function $be(){if(_5)return gN;_5=1;var e=SP();function t(n,r){var i;return e(n,function(s,o,c){return i=r(s,o,c),!i}),!!i}return gN=t,gN}var yN,w5;function Fbe(){if(w5)return yN;w5=1;var e=nz(),t=ks(),n=$be(),r=mi(),i=Y0();function s(o,c,d){var h=r(o)?e:n;return d&&i(o,c,d)&&(c=void 0),h(o,t(c,3))}return yN=s,yN}var Bbe=Fbe();const zbe=Kt(Bbe);var ys=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},vN,j5;function Ube(){if(j5)return vN;j5=1;var e=bz();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return vN=t,vN}var xN,S5;function qbe(){if(S5)return xN;S5=1;var e=Ube(),t=vz(),n=ks();function r(i,s){var o={};return s=n(s,3),t(i,function(c,d,h){e(o,d,s(c,d,h))}),o}return xN=r,xN}var Hbe=qbe();const Wbe=Kt(Hbe);var bN,N5;function Vbe(){if(N5)return bN;N5=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return bN=e,bN}var _N,C5;function Kbe(){if(C5)return _N;C5=1;var e=SP();function t(n,r){var i=!0;return e(n,function(s,o,c){return i=!!r(s,o,c),i}),i}return _N=t,_N}var wN,E5;function Gbe(){if(E5)return wN;E5=1;var e=Vbe(),t=Kbe(),n=ks(),r=mi(),i=Y0();function s(o,c,d){var h=r(o)?e:t;return d&&i(o,c,d)&&(c=void 0),h(o,n(c,3))}return wN=s,wN}var Zbe=Gbe();const o7=Kt(Zbe);var Ybe=["x","y"];function km(e){"@babel/helpers - typeof";return km=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},km(e)}function $E(){return $E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$E.apply(this,arguments)}function P5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P5(Object(n),!0).forEach(function(r){Xbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xbe(e,t,n){return t=Qbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qbe(e){var t=Jbe(e,"string");return km(t)=="symbol"?t:t+""}function Jbe(e,t){if(km(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(km(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e_e(e,t){if(e==null)return{};var n=t_e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function n_e(e,t){var n=e.x,r=e.y,i=e_e(e,Ybe),s="".concat(n),o=parseInt(s,10),c="".concat(r),d=parseInt(c,10),h="".concat(t.height||i.height),p=parseInt(h,10),m="".concat(t.width||i.width),v=parseInt(m,10);return vp(vp(vp(vp(vp({},t),i),o?{x:o}:{}),d?{y:d}:{}),{},{height:p,width:v,name:t.name,radius:t.radius})}function k5(e){return J.createElement(e7,$E({shapeType:"rectangle",propTransformer:n_e,activeClassName:"recharts-active-bar"},e))}var r_e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var s=De(r)||Ele(r);return s?t(r,i):(s||wu(),n)}},i_e=["value","background"],l7;function Af(e){"@babel/helpers - typeof";return Af=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},Af(e)}function a_e(e,t){if(e==null)return{};var n=s_e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function s_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dx.apply(this,arguments)}function A5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A5(Object(n),!0).forEach(function(r){Ol(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u7(r.key),r)}}function l_e(e,t,n){return t&&O5(e.prototype,t),n&&O5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c_e(e,t,n){return t=$x(t),u_e(e,c7()?Reflect.construct(t,n||[],$x(e).constructor):t.apply(e,n))}function u_e(e,t){if(t&&(Af(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d_e(e)}function d_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c7=function(){return!!e})()}function $x(e){return $x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$x(e)}function f_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FE(e,t)}function FE(e,t){return FE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FE(e,t)}function Ol(e,t,n){return t=u7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u7(e){var t=h_e(e,"string");return Af(t)=="symbol"?t:t+""}function h_e(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fi=(function(e){function t(){var n;o_e(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=c_e(this,t,[].concat(i)),Ol(n,"state",{isAnimationFinished:!1}),Ol(n,"id",ih("recharts-bar-")),Ol(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),Ol(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return f_e(t,e),l_e(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,s=this.props,o=s.shape,c=s.dataKey,d=s.activeIndex,h=s.activeBar,p=ct(this.props,!1);return r&&r.map(function(m,v){var x=v===d,w=x?h:o,b=Fn(Fn(Fn({},p),m),{},{isActive:x,option:w,index:v,dataKey:c,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return J.createElement(Ft,Dx({className:"recharts-bar-rectangle"},vu(i.props,m,v),{key:"rectangle-".concat(m==null?void 0:m.x,"-").concat(m==null?void 0:m.y,"-").concat(m==null?void 0:m.value,"-").concat(v)}),J.createElement(k5,b))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,s=i.data,o=i.layout,c=i.isAnimationActive,d=i.animationBegin,h=i.animationDuration,p=i.animationEasing,m=i.animationId,v=this.state.prevData;return J.createElement(Ss,{begin:d,duration:h,isActive:c,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var w=x.t,b=s.map(function(_,j){var C=v&&v[j];if(C){var E=ui(C.x,_.x),A=ui(C.y,_.y),k=ui(C.width,_.width),M=ui(C.height,_.height);return Fn(Fn({},_),{},{x:E(w),y:A(w),width:k(w),height:M(w)})}if(o==="horizontal"){var I=ui(0,_.height),$=I(w);return Fn(Fn({},_),{},{y:_.y+_.height-$,height:$})}var q=ui(0,_.width),V=q(w);return Fn(Fn({},_),{},{width:V})});return J.createElement(Ft,null,r.renderRectanglesStatically(b))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,s=r.isAnimationActive,o=this.state.prevData;return s&&i&&i.length&&(!o||!wf(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,s=i.data,o=i.dataKey,c=i.activeIndex,d=ct(this.props.background,!1);return s.map(function(h,p){h.value;var m=h.background,v=a_e(h,i_e);if(!m)return null;var x=Fn(Fn(Fn(Fn(Fn({},v),{},{fill:"#eee"},m),d),vu(r.props,h,p)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:p,className:"recharts-bar-background-rectangle"});return J.createElement(k5,Dx({key:"background-bar-".concat(p),option:r.props.background,isActive:p===c},x))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,o=s.data,c=s.xAxis,d=s.yAxis,h=s.layout,p=s.children,m=ua(p,ob);if(!m)return null;var v=h==="vertical"?o[0].height/2:o[0].width/2,x=function(_,j){var C=Array.isArray(_.value)?_.value[1]:_.value;return{x:_.x,y:_.y,value:C,errorVal:Qn(_,j)}},w={clipPath:r?"url(#clipPath-".concat(i,")"):null};return J.createElement(Ft,w,m.map(function(b){return J.cloneElement(b,{key:"error-bar-".concat(i,"-").concat(b.props.dataKey),data:o,xAxis:c,yAxis:d,layout:h,offset:v,dataPointFormatter:x})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,s=r.data,o=r.className,c=r.xAxis,d=r.yAxis,h=r.left,p=r.top,m=r.width,v=r.height,x=r.isAnimationActive,w=r.background,b=r.id;if(i||!s||!s.length)return null;var _=this.state.isAnimationFinished,j=jt("recharts-bar",o),C=c&&c.allowDataOverflow,E=d&&d.allowDataOverflow,A=C||E,k=St(b)?this.id:b;return J.createElement(Ft,{className:j},C||E?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(k)},J.createElement("rect",{x:C?h:h-m/2,y:E?p:p-v/2,width:C?m:m*2,height:E?v:v*2}))):null,J.createElement(Ft,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(k,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,k),(!x||_)&&vo.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(P.PureComponent);l7=Fi;Ol(Fi,"displayName","Bar");Ol(Fi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Tu.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ol(Fi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,s=e.xAxis,o=e.yAxis,c=e.xAxisTicks,d=e.yAxisTicks,h=e.stackedData,p=e.dataStartIndex,m=e.displayedData,v=e.offset,x=Uge(r,n);if(!x)return null;var w=t.layout,b=n.type.defaultProps,_=b!==void 0?Fn(Fn({},b),n.props):n.props,j=_.dataKey,C=_.children,E=_.minPointSize,A=w==="horizontal"?o:s,k=h?A.scale.domain():null,M=Zge({numericAxis:A}),I=ua(C,xu),$=m.map(function(q,V){var H,U,z,Z,ee,G;h?H=qge(h[p+V],k):(H=Qn(q,j),Array.isArray(H)||(H=[M,H]));var oe=r_e(E,l7.defaultProps.minPointSize)(H[1],V);if(w==="horizontal"){var W,ie=[o.scale(H[0]),o.scale(H[1])],ae=ie[0],K=ie[1];U=n4({axis:s,ticks:c,bandSize:i,offset:x.offset,entry:q,index:V}),z=(W=K??ae)!==null&&W!==void 0?W:void 0,Z=x.size;var ne=ae-K;if(ee=Number.isNaN(ne)?0:ne,G={x:U,y:o.y,width:Z,height:o.height},Math.abs(oe)>0&&Math.abs(ee)<Math.abs(oe)){var ve=Zr(ee||oe)*(Math.abs(oe)-Math.abs(ee));z-=ve,ee+=ve}}else{var je=[s.scale(H[0]),s.scale(H[1])],Y=je[0],he=je[1];if(U=Y,z=n4({axis:o,ticks:d,bandSize:i,offset:x.offset,entry:q,index:V}),Z=he-Y,ee=x.size,G={x:s.x,y:z,width:s.width,height:ee},Math.abs(oe)>0&&Math.abs(Z)<Math.abs(oe)){var fe=Zr(Z||oe)*(Math.abs(oe)-Math.abs(Z));Z+=fe}}return Fn(Fn(Fn({},q),{},{x:U,y:z,width:Z,height:ee,value:h?H:H[1],payload:q,background:G},I&&I[V]&&I[V].props),{},{tooltipPayload:[LU(n,q)],tooltipPosition:{x:U+Z/2,y:z+ee/2}})});return Fn({data:$,layout:w},v)});function Am(e){"@babel/helpers - typeof";return Am=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},Am(e)}function p_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d7(r.key),r)}}function m_e(e,t,n){return t&&T5(e.prototype,t),n&&T5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function M5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M5(Object(n),!0).forEach(function(r){mb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mb(e,t,n){return t=d7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d7(e){var t=g_e(e,"string");return Am(t)=="symbol"?t:t+""}function g_e(e,t){if(Am(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f7=function(t,n,r,i,s){var o=t.width,c=t.height,d=t.layout,h=t.children,p=Object.keys(n),m={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:c-r.bottom,bottomMirror:c-r.bottom},v=!!Pi(h,Fi);return p.reduce(function(x,w){var b=n[w],_=b.orientation,j=b.domain,C=b.padding,E=C===void 0?{}:C,A=b.mirror,k=b.reversed,M="".concat(_).concat(A?"Mirror":""),I,$,q,V,H;if(b.type==="number"&&(b.padding==="gap"||b.padding==="no-gap")){var U=j[1]-j[0],z=1/0,Z=b.categoricalDomain.sort(Ale);if(Z.forEach(function(je,Y){Y>0&&(z=Math.min((je||0)-(Z[Y-1]||0),z))}),Number.isFinite(z)){var ee=z/U,G=b.layout==="vertical"?r.height:r.width;if(b.padding==="gap"&&(I=ee*G/2),b.padding==="no-gap"){var oe=Yr(t.barCategoryGap,ee*G),W=ee*G/2;I=W-oe-(W-oe)/G*oe}}}i==="xAxis"?$=[r.left+(E.left||0)+(I||0),r.left+r.width-(E.right||0)-(I||0)]:i==="yAxis"?$=d==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(I||0),r.top+r.height-(E.bottom||0)-(I||0)]:$=b.range,k&&($=[$[1],$[0]]);var ie=TU(b,s,v),ae=ie.scale,K=ie.realScaleType;ae.domain(j).range($),MU(ae);var ne=RU(ae,Ma(Ma({},b),{},{realScaleType:K}));i==="xAxis"?(H=_==="top"&&!A||_==="bottom"&&A,q=r.left,V=m[M]-H*b.height):i==="yAxis"&&(H=_==="left"&&!A||_==="right"&&A,q=m[M]-H*b.width,V=r.top);var ve=Ma(Ma(Ma({},b),ne),{},{realScaleType:K,x:q,y:V,scale:ae,width:i==="xAxis"?r.width:b.width,height:i==="yAxis"?r.height:b.height});return ve.bandSize=wx(ve,ne),!b.hide&&i==="xAxis"?m[M]+=(H?-1:1)*ve.height:b.hide||(m[M]+=(H?-1:1)*ve.width),Ma(Ma({},x),{},mb({},w,ve))},{})},h7=function(t,n){var r=t.x,i=t.y,s=n.x,o=n.y;return{x:Math.min(r,s),y:Math.min(i,o),width:Math.abs(s-r),height:Math.abs(o-i)}},y_e=function(t){var n=t.x1,r=t.y1,i=t.x2,s=t.y2;return h7({x:n,y:r},{x:i,y:s})},p7=(function(){function e(t){p_e(this,e),this.scale=t}return m_e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,s=r.position;if(n!==void 0){if(s)switch(s){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}default:return this.scale(n)}if(i){var d=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+d}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],s=r[r.length-1];return i<=s?n>=i&&n<=s:n>=s&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();mb(p7,"EPS",1e-4);var JP=function(t){var n=Object.keys(t).reduce(function(r,i){return Ma(Ma({},r),{},mb({},i,p7.create(t[i])))},{});return Ma(Ma({},n),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=s.bandAware,c=s.position;return Wbe(i,function(d,h){return n[h].apply(d,{bandAware:o,position:c})})},isInRange:function(i){return o7(i,function(s,o){return n[o].isInRange(s)})}})};function v_e(e){return(e%180+180)%180}var x_e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=v_e(i),o=s*Math.PI/180,c=Math.atan(r/n),d=o>c&&o<Math.PI-c?r/Math.sin(o):n/Math.cos(o);return Math.abs(d)},jN,R5;function b_e(){if(R5)return jN;R5=1;var e=ks(),t=sg(),n=G0();function r(i){return function(s,o,c){var d=Object(s);if(!t(s)){var h=e(o,3);s=n(s),o=function(m){return h(d[m],m,d)}}var p=i(s,o,c);return p>-1?d[h?s[p]:p]:void 0}}return jN=r,jN}var SN,I5;function __e(){if(I5)return SN;I5=1;var e=r7();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return SN=t,SN}var NN,L5;function w_e(){if(L5)return NN;L5=1;var e=hz(),t=ks(),n=__e(),r=Math.max;function i(s,o,c){var d=s==null?0:s.length;if(!d)return-1;var h=c==null?0:n(c);return h<0&&(h=r(d+h,0)),e(s,t(o,3),h)}return NN=i,NN}var CN,D5;function j_e(){if(D5)return CN;D5=1;var e=b_e(),t=w_e(),n=e(t);return CN=n,CN}var S_e=j_e();const N_e=Kt(S_e);var C_e=k8();const E_e=Kt(C_e);var P_e=E_e(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("")}),ek=P.createContext(void 0),tk=P.createContext(void 0),m7=P.createContext(void 0),g7=P.createContext({}),y7=P.createContext(void 0),v7=P.createContext(0),x7=P.createContext(0),$5=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,s=n.offset,o=t.clipPathId,c=t.children,d=t.width,h=t.height,p=P_e(s);return J.createElement(ek.Provider,{value:r},J.createElement(tk.Provider,{value:i},J.createElement(g7.Provider,{value:s},J.createElement(m7.Provider,{value:p},J.createElement(y7.Provider,{value:o},J.createElement(v7.Provider,{value:h},J.createElement(x7.Provider,{value:d},c)))))))},k_e=function(){return P.useContext(y7)},b7=function(t){var n=P.useContext(ek);n==null&&wu();var r=n[t];return r==null&&wu(),r},A_e=function(){var t=P.useContext(ek);return vl(t)},O_e=function(){var t=P.useContext(tk),n=N_e(t,function(r){return o7(r.domain,Number.isFinite)});return n||vl(t)},_7=function(t){var n=P.useContext(tk);n==null&&wu();var r=n[t];return r==null&&wu(),r},T_e=function(){var t=P.useContext(m7);return t},M_e=function(){return P.useContext(g7)},nk=function(){return P.useContext(x7)},rk=function(){return P.useContext(v7)};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 R_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,j7(r.key),r)}}function L_e(e,t,n){return t&&I_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function D_e(e,t,n){return t=Fx(t),$_e(e,w7()?Reflect.construct(t,n||[],Fx(e).constructor):t.apply(e,n))}function $_e(e,t){if(t&&(Of(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F_e(e)}function F_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w7=function(){return!!e})()}function Fx(e){return Fx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fx(e)}function B_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BE(e,t)}function BE(e,t){return BE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},BE(e,t)}function F5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(n),!0).forEach(function(r){ik(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ik(e,t,n){return t=j7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j7(e){var t=z_e(e,"string");return Of(t)=="symbol"?t:t+""}function z_e(e,t){if(Of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function U_e(e,t){return V_e(e)||W_e(e,t)||H_e(e,t)||q_e()}function q_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1021In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H_e(e,t){if(e){if(typeof e=="string")return z5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z5(e,t)}}function z5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function V_e(e){if(Array.isArray(e))return e}function zE(){return zE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zE.apply(this,arguments)}var K_e=function(t,n){var r;return J.isValidElement(t)?r=J.cloneElement(t,n):mt(t)?r=t(n):r=J.createElement("line",zE({},n,{className:"recharts-reference-line-line"})),r},G_e=function(t,n,r,i,s,o,c,d,h){var p=s.x,m=s.y,v=s.width,x=s.height;if(r){var w=h.y,b=t.y.apply(w,{position:o});if(ys(h,"discard")&&!t.y.isInRange(b))return null;var _=[{x:p+v,y:b},{x:p,y:b}];return d==="left"?_.reverse():_}if(n){var j=h.x,C=t.x.apply(j,{position:o});if(ys(h,"discard")&&!t.x.isInRange(C))return null;var E=[{x:C,y:m+x},{x:C,y:m}];return c==="top"?E.reverse():E}if(i){var A=h.segment,k=A.map(function(M){return t.apply(M,{position:o})});return ys(h,"discard")&&zbe(k,function(M){return!t.isInRange(M)})?null:k}return null};function Z_e(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,s=e.yAxisId,o=e.shape,c=e.className,d=e.alwaysShow,h=k_e(),p=b7(i),m=_7(s),v=T_e();if(!h||!v)return null;La(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=JP({x:p.scale,y:m.scale}),w=Jn(t),b=Jn(n),_=r&&r.length===2,j=G_e(x,w,b,_,v,e.position,p.orientation,m.orientation,e);if(!j)return null;var C=U_e(j,2),E=C[0],A=E.x,k=E.y,M=C[1],I=M.x,$=M.y,q=ys(e,"hidden")?"url(#".concat(h,")"):void 0,V=B5(B5({clipPath:q},ct(e,!0)),{},{x1:A,y1:k,x2:I,y2:$});return J.createElement(Ft,{className:jt("recharts-reference-line",c)},K_e(o,V),dr.renderCallByParent(e,y_e({x1:A,y1:k,x2:I,y2:$})))}var ak=(function(e){function t(){return R_e(this,t),D_e(this,t,arguments)}return B_e(t,e),L_e(t,[{key:"render",value:function(){return J.createElement(Z_e,this.props)}}])})(J.Component);ik(ak,"displayName","ReferenceLine");ik(ak,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function UE(){return UE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UE.apply(this,arguments)}function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function U5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function q5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U5(Object(n),!0).forEach(function(r){gb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,N7(r.key),r)}}function Q_e(e,t,n){return t&&X_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function J_e(e,t,n){return t=Bx(t),ewe(e,S7()?Reflect.construct(t,n||[],Bx(e).constructor):t.apply(e,n))}function ewe(e,t){if(t&&(Tf(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 S7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S7=function(){return!!e})()}function Bx(e){return Bx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bx(e)}function nwe(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&&qE(e,t)}function qE(e,t){return qE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qE(e,t)}function gb(e,t,n){return t=N7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N7(e){var t=rwe(e,"string");return Tf(t)=="symbol"?t:t+""}function rwe(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var iwe=function(t){var n=t.x,r=t.y,i=t.xAxis,s=t.yAxis,o=JP({x:i.scale,y:s.scale}),c=o.apply({x:n,y:r},{bandAware:!0});return ys(t,"discard")&&!o.isInRange(c)?null:c},yb=(function(e){function t(){return Y_e(this,t),J_e(this,t,arguments)}return nwe(t,e),Q_e(t,[{key:"render",value:function(){var r=this.props,i=r.x,s=r.y,o=r.r,c=r.alwaysShow,d=r.clipPathId,h=Jn(i),p=Jn(s);if(La(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!p)return null;var m=iwe(this.props);if(!m)return null;var v=m.x,x=m.y,w=this.props,b=w.shape,_=w.className,j=ys(this.props,"hidden")?"url(#".concat(d,")"):void 0,C=q5(q5({clipPath:j},ct(this.props,!0)),{},{cx:v,cy:x});return J.createElement(Ft,{className:jt("recharts-reference-dot",_)},t.renderDot(b,C),dr.renderCallByParent(this.props,{x:v-o,y:x-o,width:2*o,height:2*o}))}}])})(J.Component);gb(yb,"displayName","ReferenceDot");gb(yb,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});gb(yb,"renderDot",function(e,t){var n;return J.isValidElement(e)?n=J.cloneElement(e,t):mt(e)?n=e(t):n=J.createElement(lb,UE({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HE.apply(this,arguments)}function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function H5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H5(Object(n),!0).forEach(function(r){vb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function awe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function swe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E7(r.key),r)}}function owe(e,t,n){return t&&swe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lwe(e,t,n){return t=zx(t),cwe(e,C7()?Reflect.construct(t,n||[],zx(e).constructor):t.apply(e,n))}function cwe(e,t){if(t&&(Mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uwe(e)}function uwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C7=function(){return!!e})()}function zx(e){return zx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zx(e)}function dwe(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&&WE(e,t)}function WE(e,t){return WE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WE(e,t)}function vb(e,t,n){return t=E7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E7(e){var t=fwe(e,"string");return Mf(t)=="symbol"?t:t+""}function fwe(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hwe=function(t,n,r,i,s){var o=s.x1,c=s.x2,d=s.y1,h=s.y2,p=s.xAxis,m=s.yAxis;if(!p||!m)return null;var v=JP({x:p.scale,y:m.scale}),x={x:t?v.x.apply(o,{position:"start"}):v.x.rangeMin,y:r?v.y.apply(d,{position:"start"}):v.y.rangeMin},w={x:n?v.x.apply(c,{position:"end"}):v.x.rangeMax,y:i?v.y.apply(h,{position:"end"}):v.y.rangeMax};return ys(s,"discard")&&(!v.isInRange(x)||!v.isInRange(w))?null:h7(x,w)},xb=(function(e){function t(){return awe(this,t),lwe(this,t,arguments)}return dwe(t,e),owe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,s=r.x2,o=r.y1,c=r.y2,d=r.className,h=r.alwaysShow,p=r.clipPathId;La(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Jn(i),v=Jn(s),x=Jn(o),w=Jn(c),b=this.props.shape;if(!m&&!v&&!x&&!w&&!b)return null;var _=hwe(m,v,x,w,this.props);if(!_&&!b)return null;var j=ys(this.props,"hidden")?"url(#".concat(p,")"):void 0;return J.createElement(Ft,{className:jt("recharts-reference-area",d)},t.renderRect(b,W5(W5({clipPath:j},ct(this.props,!0)),_)),dr.renderCallByParent(this.props,_))}}])})(J.Component);vb(xb,"displayName","ReferenceArea");vb(xb,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});vb(xb,"renderRect",function(e,t){var n;return J.isValidElement(e)?n=J.cloneElement(e,t):mt(e)?n=e(t):n=J.createElement(QP,HE({},t,{className:"recharts-reference-area-rect"})),n});function P7(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function pwe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return x_e(r,n)}function mwe(e,t,n){var r=n==="width",i=e.x,s=e.y,o=e.width,c=e.height;return t===1?{start:r?i:s,end:r?i+o:s+c}:{start:r?i+o:s+c,end:r?i:s}}function Ux(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var s=n();return e*(t-e*s/2-r)>=0&&e*(t+e*s/2-i)<=0}function gwe(e,t){return P7(e,t+1)}function ywe(e,t,n,r,i){for(var s=(r||[]).slice(),o=t.start,c=t.end,d=0,h=1,p=o,m=function(){var w=r==null?void 0:r[d];if(w===void 0)return{v:P7(r,h)};var b=d,_,j=function(){return _===void 0&&(_=n(w,b)),_},C=w.coordinate,E=d===0||Ux(e,C,j,p,c);E||(d=0,p=o,h+=1),E&&(p=C+e*(j()/2+i),d+=h)},v;h<=s.length;)if(v=m(),v)return v.v;return[]}function Om(e){"@babel/helpers - typeof";return Om=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},Om(e)}function V5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V5(Object(n),!0).forEach(function(r){vwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vwe(e,t,n){return t=xwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xwe(e){var t=bwe(e,"string");return Om(t)=="symbol"?t:t+""}function bwe(e,t){if(Om(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _we(e,t,n,r,i){for(var s=(r||[]).slice(),o=s.length,c=t.start,d=t.end,h=function(v){var x=s[v],w,b=function(){return w===void 0&&(w=n(x,v)),w};if(v===o-1){var _=e*(x.coordinate+e*b()/2-d);s[v]=x=Rr(Rr({},x),{},{tickCoord:_>0?x.coordinate-_*e:x.coordinate})}else s[v]=x=Rr(Rr({},x),{},{tickCoord:x.coordinate});var j=Ux(e,x.tickCoord,b,c,d);j&&(d=x.tickCoord-e*(b()/2+i),s[v]=Rr(Rr({},x),{},{isShow:!0}))},p=o-1;p>=0;p--)h(p);return s}function wwe(e,t,n,r,i,s){var o=(r||[]).slice(),c=o.length,d=t.start,h=t.end;if(s){var p=r[c-1],m=n(p,c-1),v=e*(p.coordinate+e*m/2-h);o[c-1]=p=Rr(Rr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate});var x=Ux(e,p.tickCoord,function(){return m},d,h);x&&(h=p.tickCoord-e*(m/2+i),o[c-1]=Rr(Rr({},p),{},{isShow:!0}))}for(var w=s?c-1:c,b=function(C){var E=o[C],A,k=function(){return A===void 0&&(A=n(E,C)),A};if(C===0){var M=e*(E.coordinate-e*k()/2-d);o[C]=E=Rr(Rr({},E),{},{tickCoord:M<0?E.coordinate-M*e:E.coordinate})}else o[C]=E=Rr(Rr({},E),{},{tickCoord:E.coordinate});var I=Ux(e,E.tickCoord,k,d,h);I&&(d=E.tickCoord+e*(k()/2+i),o[C]=Rr(Rr({},E),{},{isShow:!0}))},_=0;_<w;_++)b(_);return o}function sk(e,t,n){var r=e.tick,i=e.ticks,s=e.viewBox,o=e.minTickGap,c=e.orientation,d=e.interval,h=e.tickFormatter,p=e.unit,m=e.angle;if(!i||!i.length||!r)return[];if(De(d)||Tu.isSsr)return gwe(i,typeof d=="number"&&De(d)?d:0);var v=[],x=c==="top"||c==="bottom"?"width":"height",w=p&&x==="width"?Mp(p,{fontSize:t,letterSpacing:n}):{width:0,height:0},b=function(E,A){var k=mt(h)?h(E.value,A):E.value;return x==="width"?pwe(Mp(k,{fontSize:t,letterSpacing:n}),w,m):Mp(k,{fontSize:t,letterSpacing:n})[x]},_=i.length>=2?Zr(i[1].coordinate-i[0].coordinate):1,j=mwe(s,_,x);return d==="equidistantPreserveStart"?ywe(_,j,b,i,o):(d==="preserveStart"||d==="preserveStartEnd"?v=wwe(_,j,b,i,o,d==="preserveStartEnd"):v=_we(_,j,b,i,o),v.filter(function(C){return C.isShow}))}var jwe=["viewBox"],Swe=["viewBox"],Nwe=["ticks"];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)}function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bd.apply(this,arguments)}function K5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K5(Object(n),!0).forEach(function(r){ok(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EN(e,t){if(e==null)return{};var n=Cwe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ewe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A7(r.key),r)}}function Pwe(e,t,n){return t&&G5(e.prototype,t),n&&G5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kwe(e,t,n){return t=qx(t),Awe(e,k7()?Reflect.construct(t,n||[],qx(e).constructor):t.apply(e,n))}function Awe(e,t){if(t&&(Rf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Owe(e)}function Owe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k7=function(){return!!e})()}function qx(e){return qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qx(e)}function Twe(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&&VE(e,t)}function VE(e,t){return VE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VE(e,t)}function ok(e,t,n){return t=A7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A7(e){var t=Mwe(e,"string");return Rf(t)=="symbol"?t:t+""}function Mwe(e,t){if(Rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ch=(function(e){function t(n){var r;return Ewe(this,t),r=kwe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Twe(t,e),Pwe(t,[{key:"shouldComponentUpdate",value:function(r,i){var s=r.viewBox,o=EN(r,jwe),c=this.props,d=c.viewBox,h=EN(c,Swe);return!Wd(s,d)||!Wd(o,h)||!Wd(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.x,o=i.y,c=i.width,d=i.height,h=i.orientation,p=i.tickSize,m=i.mirror,v=i.tickMargin,x,w,b,_,j,C,E=m?-1:1,A=r.tickSize||p,k=De(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":x=w=r.coordinate,_=o+ +!m*d,b=_-E*A,C=b-E*v,j=k;break;case"left":b=_=r.coordinate,w=s+ +!m*c,x=w-E*A,j=x-E*v,C=k;break;case"right":b=_=r.coordinate,w=s+ +m*c,x=w+E*A,j=x+E*v,C=k;break;default:x=w=r.coordinate,_=o+ +m*d,b=_+E*A,C=b+E*v,j=k;break}return{line:{x1:x,y1:b,x2:w,y2:_},tick:{x:j,y:C}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,o;switch(i){case"left":o=s?"start":"end";break;case"right":o=s?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=s?"start":"end";break;default:o=s?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,c=r.height,d=r.orientation,h=r.mirror,p=r.axisLine,m=Yn(Yn(Yn({},ct(this.props,!1)),ct(p,!1)),{},{fill:"none"});if(d==="top"||d==="bottom"){var v=+(d==="top"&&!h||d==="bottom"&&h);m=Yn(Yn({},m),{},{x1:i,y1:s+v*c,x2:i+o,y2:s+v*c})}else{var x=+(d==="left"&&!h||d==="right"&&h);m=Yn(Yn({},m),{},{x1:i+x*o,y1:s,x2:i+x*o,y2:s+c})}return J.createElement("line",Bd({},m,{className:jt("recharts-cartesian-axis-line",Di(p,"className"))}))}},{key:"renderTicks",value:function(r,i,s){var o=this,c=this.props,d=c.tickLine,h=c.stroke,p=c.tick,m=c.tickFormatter,v=c.unit,x=sk(Yn(Yn({},this.props),{},{ticks:r}),i,s),w=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),_=ct(this.props,!1),j=ct(p,!1),C=Yn(Yn({},_),{},{fill:"none"},ct(d,!1)),E=x.map(function(A,k){var M=o.getTickLineCoord(A),I=M.line,$=M.tick,q=Yn(Yn(Yn(Yn({textAnchor:w,verticalAnchor:b},_),{},{stroke:"none",fill:h},j),$),{},{index:k,payload:A,visibleTicksCount:x.length,tickFormatter:m});return J.createElement(Ft,Bd({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},vu(o.props,A,k)),d&&J.createElement("line",Bd({},C,I,{className:jt("recharts-cartesian-axis-tick-line",Di(d,"className"))})),p&&t.renderTickItem(p,q,"".concat(mt(m)?m(A.value,k):A.value).concat(v||"")))});return J.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,i=this.props,s=i.axisLine,o=i.width,c=i.height,d=i.ticksGenerator,h=i.className,p=i.hide;if(p)return null;var m=this.props,v=m.ticks,x=EN(m,Nwe),w=v;return mt(d)&&(w=v&&v.length>0?d(this.props):d(x)),o<=0||c<=0||!w||!w.length?null:J.createElement(Ft,{className:jt("recharts-cartesian-axis",h),ref:function(_){r.layerReference=_}},s&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),dr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,s){var o,c=jt(i.className,"recharts-cartesian-axis-tick-value");return J.isValidElement(r)?o=J.cloneElement(r,Yn(Yn({},i),{},{className:c})):mt(r)?o=r(Yn(Yn({},i),{},{className:c})):o=J.createElement(bu,Bd({},i,{className:"recharts-cartesian-axis-tick-value"}),s),o}}])})(P.Component);ok(ch,"displayName","CartesianAxis");ok(ch,"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 Rwe=["x1","y1","x2","y2","key"],Iwe=["offset"];function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}function Z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z5(Object(n),!0).forEach(function(r){Lwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lwe(e,t,n){return t=Dwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dwe(e){var t=$we(e,"string");return ju(t)=="symbol"?t:t+""}function $we(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}function Y5(e,t){if(e==null)return{};var n=Fwe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Bwe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,s=t.y,o=t.width,c=t.height,d=t.ry;return J.createElement("rect",{x:i,y:s,ry:d,width:o,height:c,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function O7(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(mt(e))n=e(t);else{var r=t.x1,i=t.y1,s=t.x2,o=t.y2,c=t.key,d=Y5(t,Rwe),h=ct(d,!1);h.offset;var p=Y5(h,Iwe);n=J.createElement("line",Wc({},p,{x1:r,y1:i,x2:s,y2:o,fill:"none",key:c}))}return n}function zwe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,s=e.horizontalPoints;if(!i||!s||!s.length)return null;var o=s.map(function(c,d){var h=Ir(Ir({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(d),index:d});return O7(i,h)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Uwe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,s=e.verticalPoints;if(!i||!s||!s.length)return null;var o=s.map(function(c,d){var h=Ir(Ir({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(d),index:d});return O7(i,h)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function qwe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,s=e.width,o=e.height,c=e.horizontalPoints,d=e.horizontal,h=d===void 0?!0:d;if(!h||!t||!t.length)return null;var p=c.map(function(v){return Math.round(v+i-i)}).sort(function(v,x){return v-x});i!==p[0]&&p.unshift(0);var m=p.map(function(v,x){var w=!p[x+1],b=w?i+o-v:p[x+1]-v;if(b<=0)return null;var _=x%t.length;return J.createElement("rect",{key:"react-".concat(x),y:v,x:r,height:b,width:s,stroke:"none",fill:t[_],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Hwe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,s=e.x,o=e.y,c=e.width,d=e.height,h=e.verticalPoints;if(!n||!r||!r.length)return null;var p=h.map(function(v){return Math.round(v+s-s)}).sort(function(v,x){return v-x});s!==p[0]&&p.unshift(0);var m=p.map(function(v,x){var w=!p[x+1],b=w?s+c-v:p[x+1]-v;if(b<=0)return null;var _=x%r.length;return J.createElement("rect",{key:"react-".concat(x),x:v,y:o,width:b,height:d,stroke:"none",fill:r[_],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Wwe=function(t,n){var r=t.xAxis,i=t.width,s=t.height,o=t.offset;return OU(sk(Ir(Ir(Ir({},ch.defaultProps),r),{},{ticks:fo(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.left,o.left+o.width,n)},Vwe=function(t,n){var r=t.yAxis,i=t.width,s=t.height,o=t.offset;return OU(sk(Ir(Ir(Ir({},ch.defaultProps),r),{},{ticks:fo(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.top,o.top+o.height,n)},Id={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Bl(e){var t,n,r,i,s,o,c=nk(),d=rk(),h=M_e(),p=Ir(Ir({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Id.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Id.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Id.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Id.horizontalFill,vertical:(s=e.vertical)!==null&&s!==void 0?s:Id.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Id.verticalFill,x:De(e.x)?e.x:h.left,y:De(e.y)?e.y:h.top,width:De(e.width)?e.width:h.width,height:De(e.height)?e.height:h.height}),m=p.x,v=p.y,x=p.width,w=p.height,b=p.syncWithTicks,_=p.horizontalValues,j=p.verticalValues,C=A_e(),E=O_e();if(!De(x)||x<=0||!De(w)||w<=0||!De(m)||m!==+m||!De(v)||v!==+v)return null;var A=p.verticalCoordinatesGenerator||Wwe,k=p.horizontalCoordinatesGenerator||Vwe,M=p.horizontalPoints,I=p.verticalPoints;if((!M||!M.length)&&mt(k)){var $=_&&_.length,q=k({yAxis:E?Ir(Ir({},E),{},{ticks:$?_:E.ticks}):void 0,width:c,height:d,offset:h},$?!0:b);La(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ju(q),"]")),Array.isArray(q)&&(M=q)}if((!I||!I.length)&&mt(A)){var V=j&&j.length,H=A({xAxis:C?Ir(Ir({},C),{},{ticks:V?j:C.ticks}):void 0,width:c,height:d,offset:h},V?!0:b);La(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ju(H),"]")),Array.isArray(H)&&(I=H)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(Bwe,{fill:p.fill,fillOpacity:p.fillOpacity,x:p.x,y:p.y,width:p.width,height:p.height,ry:p.ry}),J.createElement(zwe,Wc({},p,{offset:h,horizontalPoints:M,xAxis:C,yAxis:E})),J.createElement(Uwe,Wc({},p,{offset:h,verticalPoints:I,xAxis:C,yAxis:E})),J.createElement(qwe,Wc({},p,{horizontalPoints:M})),J.createElement(Hwe,Wc({},p,{verticalPoints:I})))}Bl.displayName="CartesianGrid";var Kwe=["layout","type","stroke","connectNulls","isRange","ref"],Gwe=["key"],T7;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 M7(e,t){if(e==null)return{};var n=Zwe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}function X5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ml(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X5(Object(n),!0).forEach(function(r){hs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ywe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I7(r.key),r)}}function Xwe(e,t,n){return t&&Q5(e.prototype,t),n&&Q5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qwe(e,t,n){return t=Hx(t),Jwe(e,R7()?Reflect.construct(t,n||[],Hx(e).constructor):t.apply(e,n))}function Jwe(e,t){if(t&&(If(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e1e(e)}function e1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R7=function(){return!!e})()}function Hx(e){return Hx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hx(e)}function t1e(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&&KE(e,t)}function KE(e,t){return KE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},KE(e,t)}function hs(e,t,n){return t=I7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I7(e){var t=n1e(e,"string");return If(t)=="symbol"?t:t+""}function n1e(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yl=(function(e){function t(){var n;Ywe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Qwe(this,t,[].concat(i)),hs(n,"state",{isAnimationFinished:!0}),hs(n,"id",ih("recharts-area-")),hs(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),mt(o)&&o()}),hs(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),mt(o)&&o()}),n}return t1e(t,e),Xwe(t,[{key:"renderDots",value:function(r,i,s){var o=this.props.isAnimationActive,c=this.state.isAnimationFinished;if(o&&!c)return null;var d=this.props,h=d.dot,p=d.points,m=d.dataKey,v=ct(this.props,!1),x=ct(h,!0),w=p.map(function(_,j){var C=ml(ml(ml({key:"dot-".concat(j),r:3},v),x),{},{index:j,cx:_.x,cy:_.y,dataKey:m,value:_.value,payload:_.payload,points:p});return t.renderDotItem(h,C)}),b={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return J.createElement(Ft,Vc({className:"recharts-area-dots"},b),w)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,s=i.baseLine,o=i.points,c=i.strokeWidth,d=o[0].x,h=o[o.length-1].x,p=r*Math.abs(d-h),m=Al(o.map(function(v){return v.y||0}));return De(s)&&typeof s=="number"?m=Math.max(s,m):s&&Array.isArray(s)&&s.length&&(m=Math.max(Al(s.map(function(v){return v.y||0})),m)),De(m)?J.createElement("rect",{x:d<h?d:d-p,y:0,width:p,height:Math.floor(m+(c?parseInt("".concat(c),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,s=i.baseLine,o=i.points,c=i.strokeWidth,d=o[0].y,h=o[o.length-1].y,p=r*Math.abs(d-h),m=Al(o.map(function(v){return v.x||0}));return De(s)&&typeof s=="number"?m=Math.max(s,m):s&&Array.isArray(s)&&s.length&&(m=Math.max(Al(s.map(function(v){return v.x||0})),m)),De(m)?J.createElement("rect",{x:0,y:d<h?d:d-p,width:m+(c?parseInt("".concat(c),10):1),height:Math.floor(p)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,s,o){var c=this.props,d=c.layout,h=c.type,p=c.stroke,m=c.connectNulls,v=c.isRange;c.ref;var x=M7(c,Kwe);return J.createElement(Ft,{clipPath:s?"url(#clipPath-".concat(o,")"):null},J.createElement(Gd,Vc({},ct(x,!0),{points:r,connectNulls:m,type:h,baseLine:i,layout:d,stroke:"none",className:"recharts-area-area"})),p!=="none"&&J.createElement(Gd,Vc({},ct(this.props,!1),{className:"recharts-area-curve",layout:d,type:h,connectNulls:m,fill:"none",points:r})),p!=="none"&&v&&J.createElement(Gd,Vc({},ct(this.props,!1),{className:"recharts-area-curve",layout:d,type:h,connectNulls:m,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var s=this,o=this.props,c=o.points,d=o.baseLine,h=o.isAnimationActive,p=o.animationBegin,m=o.animationDuration,v=o.animationEasing,x=o.animationId,w=this.state,b=w.prevPoints,_=w.prevBaseLine;return J.createElement(Ss,{begin:p,duration:m,isActive:h,easing:v,from:{t:0},to:{t:1},key:"area-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var C=j.t;if(b){var E=b.length/c.length,A=c.map(function($,q){var V=Math.floor(q*E);if(b[V]){var H=b[V],U=ui(H.x,$.x),z=ui(H.y,$.y);return ml(ml({},$),{},{x:U(C),y:z(C)})}return $}),k;if(De(d)&&typeof d=="number"){var M=ui(_,d);k=M(C)}else if(St(d)||rh(d)){var I=ui(_,0);k=I(C)}else k=d.map(function($,q){var V=Math.floor(q*E);if(_[V]){var H=_[V],U=ui(H.x,$.x),z=ui(H.y,$.y);return ml(ml({},$),{},{x:U(C),y:z(C)})}return $});return s.renderAreaStatically(A,k,r,i)}return J.createElement(Ft,null,J.createElement("defs",null,J.createElement("clipPath",{id:"animationClipPath-".concat(i)},s.renderClipRect(C))),J.createElement(Ft,{clipPath:"url(#animationClipPath-".concat(i,")")},s.renderAreaStatically(c,d,r,i)))})}},{key:"renderArea",value:function(r,i){var s=this.props,o=s.points,c=s.baseLine,d=s.isAnimationActive,h=this.state,p=h.prevPoints,m=h.prevBaseLine,v=h.totalLength;return d&&o&&o.length&&(!p&&v>0||!wf(p,o)||!wf(m,c))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,c,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,o=i.dot,c=i.points,d=i.className,h=i.top,p=i.left,m=i.xAxis,v=i.yAxis,x=i.width,w=i.height,b=i.isAnimationActive,_=i.id;if(s||!c||!c.length)return null;var j=this.state.isAnimationFinished,C=c.length===1,E=jt("recharts-area",d),A=m&&m.allowDataOverflow,k=v&&v.allowDataOverflow,M=A||k,I=St(_)?this.id:_,$=(r=ct(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},q=$.r,V=q===void 0?3:q,H=$.strokeWidth,U=H===void 0?2:H,z=Fle(o)?o:{},Z=z.clipDot,ee=Z===void 0?!0:Z,G=V*2+U;return J.createElement(Ft,{className:E},A||k?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(I)},J.createElement("rect",{x:A?p:p-x/2,y:k?h:h-w/2,width:A?x:x*2,height:k?w:w*2})),!ee&&J.createElement("clipPath",{id:"clipPath-dots-".concat(I)},J.createElement("rect",{x:p-G/2,y:h-G/2,width:x+G,height:w+G}))):null,C?null:this.renderArea(M,I),(o||C)&&this.renderDots(M,ee,I),(!b||j)&&vo.renderCallByParent(this.props,c))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(P.PureComponent);T7=Yl;hs(Yl,"displayName","Area");hs(Yl,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Tu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});hs(Yl,"getBaseValue",function(e,t,n,r){var i=e.layout,s=e.baseValue,o=t.props.baseValue,c=o??s;if(De(c)&&typeof c=="number")return c;var d=i==="horizontal"?r:n,h=d.scale.domain();if(d.type==="number"){var p=Math.max(h[0],h[1]),m=Math.min(h[0],h[1]);return c==="dataMin"?m:c==="dataMax"||p<0?p:Math.max(Math.min(h[0],h[1]),0)}return c==="dataMin"?h[0]:c==="dataMax"?h[1]:h[0]});hs(Yl,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,s=e.xAxisTicks,o=e.yAxisTicks,c=e.bandSize,d=e.dataKey,h=e.stackedData,p=e.dataStartIndex,m=e.displayedData,v=e.offset,x=t.layout,w=h&&h.length,b=T7.getBaseValue(t,n,r,i),_=x==="horizontal",j=!1,C=m.map(function(A,k){var M;w?M=h[p+k]:(M=Qn(A,d),Array.isArray(M)?j=!0:M=[b,M]);var I=M[1]==null||w&&Qn(A,d)==null;return _?{x:t4({axis:r,ticks:s,bandSize:c,entry:A,index:k}),y:I?null:i.scale(M[1]),value:M,payload:A}:{x:I?null:r.scale(M[1]),y:t4({axis:i,ticks:o,bandSize:c,entry:A,index:k}),value:M,payload:A}}),E;return w||j?E=C.map(function(A){var k=Array.isArray(A.value)?A.value[0]:null;return _?{x:A.x,y:k!=null&&A.y!=null?i.scale(k):null}:{x:k!=null?r.scale(k):null,y:A.y}}):E=_?i.scale(b):r.scale(b),ml({points:C,baseLine:E,layout:x,isRange:j},v)});hs(Yl,"renderDotItem",function(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(mt(e))n=e(t);else{var r=jt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,s=M7(t,Gwe);n=J.createElement(lb,Vc({},s,{key:i,className:r}))}return n});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 r1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$7(r.key),r)}}function a1e(e,t,n){return t&&i1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function s1e(e,t,n){return t=Wx(t),o1e(e,L7()?Reflect.construct(t,n||[],Wx(e).constructor):t.apply(e,n))}function o1e(e,t){if(t&&(Lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l1e(e)}function l1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L7=function(){return!!e})()}function Wx(e){return Wx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wx(e)}function c1e(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&&GE(e,t)}function GE(e,t){return GE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GE(e,t)}function D7(e,t,n){return t=$7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $7(e){var t=u1e(e,"string");return Lf(t)=="symbol"?t:t+""}function u1e(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ZE(){return ZE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZE.apply(this,arguments)}function d1e(e){var t=e.xAxisId,n=nk(),r=rk(),i=b7(t);return i==null?null:P.createElement(ch,ZE({},i,{className:jt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return fo(o,!0)}}))}var Ba=(function(e){function t(){return r1e(this,t),s1e(this,t,arguments)}return c1e(t,e),a1e(t,[{key:"render",value:function(){return P.createElement(d1e,this.props)}}])})(P.Component);D7(Ba,"displayName","XAxis");D7(Ba,"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 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 f1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,z7(r.key),r)}}function p1e(e,t,n){return t&&h1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function m1e(e,t,n){return t=Vx(t),g1e(e,F7()?Reflect.construct(t,n||[],Vx(e).constructor):t.apply(e,n))}function g1e(e,t){if(t&&(Df(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y1e(e)}function y1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F7=function(){return!!e})()}function Vx(e){return Vx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vx(e)}function v1e(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&&YE(e,t)}function YE(e,t){return YE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YE(e,t)}function B7(e,t,n){return t=z7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z7(e){var t=x1e(e,"string");return Df(t)=="symbol"?t:t+""}function x1e(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function XE(){return XE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XE.apply(this,arguments)}var b1e=function(t){var n=t.yAxisId,r=nk(),i=rk(),s=_7(n);return s==null?null:P.createElement(ch,XE({},s,{className:jt("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(c){return fo(c,!0)}}))},za=(function(e){function t(){return f1e(this,t),m1e(this,t,arguments)}return v1e(t,e),p1e(t,[{key:"render",value:function(){return P.createElement(b1e,this.props)}}])})(P.Component);B7(za,"displayName","YAxis");B7(za,"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 J5(e){return S1e(e)||j1e(e)||w1e(e)||_1e()}function _1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1022In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w1e(e,t){if(e){if(typeof e=="string")return QE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QE(e,t)}}function j1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function S1e(e){if(Array.isArray(e))return QE(e)}function QE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JE=function(t,n,r,i,s){var o=ua(t,ak),c=ua(t,yb),d=[].concat(J5(o),J5(c)),h=ua(t,xb),p="".concat(i,"Id"),m=i[0],v=n;if(d.length&&(v=d.reduce(function(b,_){if(_.props[p]===r&&ys(_.props,"extendDomain")&&De(_.props[m])){var j=_.props[m];return[Math.min(b[0],j),Math.max(b[1],j)]}return b},v)),h.length){var x="".concat(m,"1"),w="".concat(m,"2");v=h.reduce(function(b,_){if(_.props[p]===r&&ys(_.props,"extendDomain")&&De(_.props[x])&&De(_.props[w])){var j=_.props[x],C=_.props[w];return[Math.min(b[0],j,C),Math.max(b[1],j,C)]}return b},v)}return s&&s.length&&(v=s.reduce(function(b,_){return De(_)?[Math.min(b[0],_),Math.max(b[1],_)]:b},v)),v},PN={exports:{}},e3;function N1e(){return e3||(e3=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(d,h,p){this.fn=d,this.context=h,this.once=p||!1}function s(d,h,p,m,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,m||d,v),w=n?n+h:h;return d._events[w]?d._events[w].fn?d._events[w]=[d._events[w],x]:d._events[w].push(x):(d._events[w]=x,d._eventsCount++),d}function o(d,h){--d._eventsCount===0?d._events=new r:delete d._events[h]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],p,m;if(this._eventsCount===0)return h;for(m in p=this._events)t.call(p,m)&&h.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},c.prototype.listeners=function(h){var p=n?n+h:h,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var v=0,x=m.length,w=new Array(x);v<x;v++)w[v]=m[v].fn;return w},c.prototype.listenerCount=function(h){var p=n?n+h:h,m=this._events[p];return m?m.fn?1:m.length:0},c.prototype.emit=function(h,p,m,v,x,w){var b=n?n+h:h;if(!this._events[b])return!1;var _=this._events[b],j=arguments.length,C,E;if(_.fn){switch(_.once&&this.removeListener(h,_.fn,void 0,!0),j){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,p),!0;case 3:return _.fn.call(_.context,p,m),!0;case 4:return _.fn.call(_.context,p,m,v),!0;case 5:return _.fn.call(_.context,p,m,v,x),!0;case 6:return _.fn.call(_.context,p,m,v,x,w),!0}for(E=1,C=new Array(j-1);E<j;E++)C[E-1]=arguments[E];_.fn.apply(_.context,C)}else{var A=_.length,k;for(E=0;E<A;E++)switch(_[E].once&&this.removeListener(h,_[E].fn,void 0,!0),j){case 1:_[E].fn.call(_[E].context);break;case 2:_[E].fn.call(_[E].context,p);break;case 3:_[E].fn.call(_[E].context,p,m);break;case 4:_[E].fn.call(_[E].context,p,m,v);break;default:if(!C)for(k=1,C=new Array(j-1);k<j;k++)C[k-1]=arguments[k];_[E].fn.apply(_[E].context,C)}}return!0},c.prototype.on=function(h,p,m){return s(this,h,p,m,!1)},c.prototype.once=function(h,p,m){return s(this,h,p,m,!0)},c.prototype.removeListener=function(h,p,m,v){var x=n?n+h:h;if(!this._events[x])return this;if(!p)return o(this,x),this;var w=this._events[x];if(w.fn)w.fn===p&&(!v||w.once)&&(!m||w.context===m)&&o(this,x);else{for(var b=0,_=[],j=w.length;b<j;b++)(w[b].fn!==p||v&&!w[b].once||m&&w[b].context!==m)&&_.push(w[b]);_.length?this._events[x]=_.length===1?_[0]:_:o(this,x)}return this},c.prototype.removeAllListeners=function(h){var p;return h?(p=n?n+h:h,this._events[p]&&o(this,p)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(PN)),PN.exports}var C1e=N1e();const E1e=Kt(C1e);var kN=new E1e,AN="recharts.syncMouseEvents";function Tm(e){"@babel/helpers - typeof";return Tm=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},Tm(e)}function P1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,U7(r.key),r)}}function A1e(e,t,n){return t&&k1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ON(e,t,n){return t=U7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U7(e){var t=O1e(e,"string");return Tm(t)=="symbol"?t:t+""}function O1e(e,t){if(Tm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var T1e=(function(){function e(){P1e(this,e),ON(this,"activeIndex",0),ON(this,"coordinateList",[]),ON(this,"layout","horizontal")}return A1e(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,s=i===void 0?null:i,o=n.container,c=o===void 0?null:o,d=n.layout,h=d===void 0?null:d,p=n.offset,m=p===void 0?null:p,v=n.mouseHandlerCallback,x=v===void 0?null:v;this.coordinateList=(r=s??this.coordinateList)!==null&&r!==void 0?r:[],this.container=c??this.container,this.layout=h??this.layout,this.offset=m??this.offset,this.mouseHandlerCallback=x??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),s=i.x,o=i.y,c=i.height,d=this.coordinateList[this.activeIndex].coordinate,h=((n=window)===null||n===void 0?void 0:n.scrollX)||0,p=((r=window)===null||r===void 0?void 0:r.scrollY)||0,m=s+d+h,v=o+this.offset.top+c/2+p;this.mouseHandlerCallback({pageX:m,pageY:v})}}}])})();function M1e(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&De(r)&&De(i))return!0}return!1}function R1e(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function q7(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,s=e.endAngle,o=vn(t,n,r,i),c=vn(t,n,r,s);return{points:[o,c],cx:t,cy:n,radius:r,startAngle:i,endAngle:s}}function I1e(e,t,n){var r,i,s,o;if(e==="horizontal")r=t.x,s=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,s=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var c=t.cx,d=t.cy,h=t.innerRadius,p=t.outerRadius,m=t.angle,v=vn(c,d,h,m),x=vn(c,d,p,m);r=v.x,i=v.y,s=x.x,o=x.y}else return q7(t);return[{x:r,y:i},{x:s,y:o}]}function Mm(e){"@babel/helpers - typeof";return Mm=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},Mm(e)}function t3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t3(Object(n),!0).forEach(function(r){L1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L1e(e,t,n){return t=D1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D1e(e){var t=$1e(e,"string");return Mm(t)=="symbol"?t:t+""}function $1e(e,t){if(Mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F1e(e){var t,n,r=e.element,i=e.tooltipEventType,s=e.isActive,o=e.activeCoordinate,c=e.activePayload,d=e.offset,h=e.activeTooltipIndex,p=e.tooltipAxisBandSize,m=e.layout,v=e.chartName,x=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!x||!s||!o||v!=="ScatterChart"&&i!=="axis")return null;var w,b=Gd;if(v==="ScatterChart")w=o,b=d0e;else if(v==="BarChart")w=R1e(m,o,d,p),b=QP;else if(m==="radial"){var _=q7(o),j=_.cx,C=_.cy,E=_.radius,A=_.startAngle,k=_.endAngle;w={cx:j,cy:C,startAngle:A,endAngle:k,innerRadius:E,outerRadius:E},b=UU}else w={points:I1e(m,o,d)},b=Gd;var M=sv(sv(sv(sv({stroke:"#ccc",pointerEvents:"none"},d),w),ct(x,!1)),{},{payload:c,payloadIndex:h,className:jt("recharts-tooltip-cursor",x.className)});return P.isValidElement(x)?P.cloneElement(x,M):P.createElement(b,M)}var B1e=["item"],z1e=["children","className","width","height","style","compact","title","desc"];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 zd(){return zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zd.apply(this,arguments)}function n3(e,t){return H1e(e)||q1e(e,t)||W7(e,t)||U1e()}function U1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1023In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,c=[],d=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(p){h=!0,i=p}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(h)throw i}}return c}}function H1e(e){if(Array.isArray(e))return e}function r3(e,t){if(e==null)return{};var n=W1e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V7(r.key),r)}}function G1e(e,t,n){return t&&K1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z1e(e,t,n){return t=Kx(t),Y1e(e,H7()?Reflect.construct(t,n||[],Kx(e).constructor):t.apply(e,n))}function Y1e(e,t){if(t&&($f(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X1e(e)}function X1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H7=function(){return!!e})()}function Kx(e){return Kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kx(e)}function Q1e(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&&e2(e,t)}function e2(e,t){return e2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},e2(e,t)}function Ff(e){return tje(e)||eje(e)||W7(e)||J1e()}function J1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1024In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W7(e,t){if(e){if(typeof e=="string")return t2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t2(e,t)}}function eje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tje(e){if(Array.isArray(e))return t2(e)}function t2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i3(Object(n),!0).forEach(function(r){pt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pt(e,t,n){return t=V7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V7(e){var t=nje(e,"string");return $f(t)=="symbol"?t:t+""}function nje(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rje={xAxis:["bottom","top"],yAxis:["left","right"]},ije={width:"100%",height:"100%"},K7={x:0,y:0};function ov(e){return e}var aje=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},sje=function(t,n,r,i){var s=n.find(function(p){return p&&p.index===r});if(s){if(t==="horizontal")return{x:s.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:s.coordinate};if(t==="centric"){var o=s.coordinate,c=i.radius;return Se(Se(Se({},i),vn(i.cx,i.cy,c,o)),{},{angle:o,radius:c})}var d=s.coordinate,h=i.angle;return Se(Se(Se({},i),vn(i.cx,i.cy,d,h)),{},{angle:h,radius:d})}return K7},bb=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,s=n.dataEndIndex,o=(r??[]).reduce(function(c,d){var h=d.props.data;return h&&h.length?[].concat(Ff(c),Ff(h)):c},[]);return o.length>0?o:t&&t.length&&De(i)&&De(s)?t.slice(i,s+1):[]};function G7(e){return e==="number"?[0,"auto"]:void 0}var n2=function(t,n,r,i){var s=t.graphicalItems,o=t.tooltipAxis,c=bb(n,t);return r<0||!s||!s.length||r>=c.length?null:s.reduce(function(d,h){var p,m=(p=h.props.data)!==null&&p!==void 0?p:n;m&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(m=m.slice(t.dataStartIndex,t.dataEndIndex+1));var v;if(o.dataKey&&!o.allowDuplicatedCategory){var x=m===void 0?c:m;v=Xv(x,o.dataKey,i)}else v=m&&m[r]||c[r];return v?[].concat(Ff(d),[LU(h,v)]):d},[])},a3=function(t,n,r,i){var s=i||{x:t.chartX,y:t.chartY},o=aje(s,r),c=t.orderedTooltipTicks,d=t.tooltipAxis,h=t.tooltipTicks,p=Lge(o,c,h,d);if(p>=0&&h){var m=h[p]&&h[p].value,v=n2(t,n,p,m),x=sje(r,c,p,s);return{activeTooltipIndex:p,activeLabel:m,activePayload:v,activeCoordinate:x}}return null},oje=function(t,n){var r=n.axes,i=n.graphicalItems,s=n.axisType,o=n.axisIdKey,c=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,p=t.layout,m=t.children,v=t.stackOffset,x=AU(p,s);return r.reduce(function(w,b){var _,j=b.type.defaultProps!==void 0?Se(Se({},b.type.defaultProps),b.props):b.props,C=j.type,E=j.dataKey,A=j.allowDataOverflow,k=j.allowDuplicatedCategory,M=j.scale,I=j.ticks,$=j.includeHidden,q=j[o];if(w[q])return w;var V=bb(t.data,{graphicalItems:i.filter(function(ne){var ve,je=o in ne.props?ne.props[o]:(ve=ne.type.defaultProps)===null||ve===void 0?void 0:ve[o];return je===q}),dataStartIndex:d,dataEndIndex:h}),H=V.length,U,z,Z;M1e(j.domain,A,C)&&(U=yE(j.domain,null,A),x&&(C==="number"||M!=="auto")&&(Z=Ip(V,E,"category")));var ee=G7(C);if(!U||U.length===0){var G,oe=(G=j.domain)!==null&&G!==void 0?G:ee;if(E){if(U=Ip(V,E,C),C==="category"&&x){var W=kle(U);k&&W?(z=U,U=Rx(0,H)):k||(U=a4(oe,U,b).reduce(function(ne,ve){return ne.indexOf(ve)>=0?ne:[].concat(Ff(ne),[ve])},[]))}else if(C==="category")k?U=U.filter(function(ne){return ne!==""&&!St(ne)}):U=a4(oe,U,b).reduce(function(ne,ve){return ne.indexOf(ve)>=0||ve===""||St(ve)?ne:[].concat(Ff(ne),[ve])},[]);else if(C==="number"){var ie=zge(V,i.filter(function(ne){var ve,je,Y=o in ne.props?ne.props[o]:(ve=ne.type.defaultProps)===null||ve===void 0?void 0:ve[o],he="hide"in ne.props?ne.props.hide:(je=ne.type.defaultProps)===null||je===void 0?void 0:je.hide;return Y===q&&($||!he)}),E,s,p);ie&&(U=ie)}x&&(C==="number"||M!=="auto")&&(Z=Ip(V,E,"category"))}else x?U=Rx(0,H):c&&c[q]&&c[q].hasStack&&C==="number"?U=v==="expand"?[0,1]:IU(c[q].stackGroups,d,h):U=kU(V,i.filter(function(ne){var ve=o in ne.props?ne.props[o]:ne.type.defaultProps[o],je="hide"in ne.props?ne.props.hide:ne.type.defaultProps.hide;return ve===q&&($||!je)}),C,p,!0);if(C==="number")U=JE(m,U,q,s,I),oe&&(U=yE(oe,U,A));else if(C==="category"&&oe){var ae=oe,K=U.every(function(ne){return ae.indexOf(ne)>=0});K&&(U=ae)}}return Se(Se({},w),{},pt({},q,Se(Se({},j),{},{axisType:s,domain:U,categoricalDomain:Z,duplicateDomain:z,originalDomain:(_=j.domain)!==null&&_!==void 0?_:ee,isCategorical:x,layout:p})))},{})},lje=function(t,n){var r=n.graphicalItems,i=n.Axis,s=n.axisType,o=n.axisIdKey,c=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,p=t.layout,m=t.children,v=bb(t.data,{graphicalItems:r,dataStartIndex:d,dataEndIndex:h}),x=v.length,w=AU(p,s),b=-1;return r.reduce(function(_,j){var C=j.type.defaultProps!==void 0?Se(Se({},j.type.defaultProps),j.props):j.props,E=C[o],A=G7("number");if(!_[E]){b++;var k;return w?k=Rx(0,x):c&&c[E]&&c[E].hasStack?(k=IU(c[E].stackGroups,d,h),k=JE(m,k,E,s)):(k=yE(A,kU(v,r.filter(function(M){var I,$,q=o in M.props?M.props[o]:(I=M.type.defaultProps)===null||I===void 0?void 0:I[o],V="hide"in M.props?M.props.hide:($=M.type.defaultProps)===null||$===void 0?void 0:$.hide;return q===E&&!V}),"number",p),i.defaultProps.allowDataOverflow),k=JE(m,k,E,s)),Se(Se({},_),{},pt({},E,Se(Se({axisType:s},i.defaultProps),{},{hide:!0,orientation:Di(rje,"".concat(s,".").concat(b%2),null),domain:k,originalDomain:A,isCategorical:w,layout:p})))}return _},{})},cje=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,s=n.AxisComp,o=n.graphicalItems,c=n.stackGroups,d=n.dataStartIndex,h=n.dataEndIndex,p=t.children,m="".concat(i,"Id"),v=ua(p,s),x={};return v&&v.length?x=oje(t,{axes:v,graphicalItems:o,axisType:i,axisIdKey:m,stackGroups:c,dataStartIndex:d,dataEndIndex:h}):o&&o.length&&(x=lje(t,{Axis:s,graphicalItems:o,axisType:i,axisIdKey:m,stackGroups:c,dataStartIndex:d,dataEndIndex:h})),x},uje=function(t){var n=vl(t),r=fo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:NP(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:wx(n,r)}},s3=function(t){var n=t.children,r=t.defaultShowTooltip,i=Pi(n,kf),s=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},dje=function(t){return!t||!t.length?!1:t.some(function(n){var r=mo(n&&n.type);return r&&r.indexOf("Bar")>=0})},o3=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"}},fje=function(t,n){var r=t.props,i=t.graphicalItems,s=t.xAxisMap,o=s===void 0?{}:s,c=t.yAxisMap,d=c===void 0?{}:c,h=r.width,p=r.height,m=r.children,v=r.margin||{},x=Pi(m,kf),w=Pi(m,iu),b=Object.keys(d).reduce(function(k,M){var I=d[M],$=I.orientation;return!I.mirror&&!I.hide?Se(Se({},k),{},pt({},$,k[$]+I.width)):k},{left:v.left||0,right:v.right||0}),_=Object.keys(o).reduce(function(k,M){var I=o[M],$=I.orientation;return!I.mirror&&!I.hide?Se(Se({},k),{},pt({},$,Di(k,"".concat($))+I.height)):k},{top:v.top||0,bottom:v.bottom||0}),j=Se(Se({},_),b),C=j.bottom;x&&(j.bottom+=x.props.height||kf.defaultProps.height),w&&n&&(j=Fge(j,i,r,n));var E=h-j.left-j.right,A=p-j.top-j.bottom;return Se(Se({brushBottom:C},j),{},{width:Math.max(E,0),height:Math.max(A,0)})},hje=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},lk=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,o=t.validateTooltipEventTypes,c=o===void 0?["axis"]:o,d=t.axisComponents,h=t.legendContent,p=t.formatAxisMap,m=t.defaultProps,v=function(j,C){var E=C.graphicalItems,A=C.stackGroups,k=C.offset,M=C.updateId,I=C.dataStartIndex,$=C.dataEndIndex,q=j.barSize,V=j.layout,H=j.barGap,U=j.barCategoryGap,z=j.maxBarSize,Z=o3(V),ee=Z.numericAxisName,G=Z.cateAxisName,oe=dje(E),W=[];return E.forEach(function(ie,ae){var K=bb(j.data,{graphicalItems:[ie],dataStartIndex:I,dataEndIndex:$}),ne=ie.type.defaultProps!==void 0?Se(Se({},ie.type.defaultProps),ie.props):ie.props,ve=ne.dataKey,je=ne.maxBarSize,Y=ne["".concat(ee,"Id")],he=ne["".concat(G,"Id")],fe={},_e=d.reduce(function(qt,dn){var nn=C["".concat(dn.axisType,"Map")],qe=ne["".concat(dn.axisType,"Id")];nn&&nn[qe]||dn.axisType==="zAxis"||wu();var Oe=nn[qe];return Se(Se({},qt),{},pt(pt({},dn.axisType,Oe),"".concat(dn.axisType,"Ticks"),fo(Oe)))},fe),de=_e[G],we=_e["".concat(G,"Ticks")],ke=A&&A[Y]&&A[Y].hasStack&&Yge(ie,A[Y].stackGroups),re=mo(ie.type).indexOf("Bar")>=0,Re=wx(de,we),ge=[],Be=oe&&Dge({barSize:q,stackGroups:A,totalSize:hje(_e,G)});if(re){var Le,rt,Ct=St(je)?z:je,_t=(Le=(rt=wx(de,we,!0))!==null&&rt!==void 0?rt:Ct)!==null&&Le!==void 0?Le:0;ge=$ge({barGap:H,barCategoryGap:U,bandSize:_t!==Re?_t:Re,sizeList:Be[he],maxBarSize:Ct}),_t!==Re&&(ge=ge.map(function(qt){return Se(Se({},qt),{},{position:Se(Se({},qt.position),{},{offset:qt.position.offset-_t/2})})}))}var Gt=ie&&ie.type&&ie.type.getComposedData;Gt&&W.push({props:Se(Se({},Gt(Se(Se({},_e),{},{displayedData:K,props:j,dataKey:ve,item:ie,bandSize:Re,barPosition:ge,offset:k,stackedData:ke,layout:V,dataStartIndex:I,dataEndIndex:$}))),{},pt(pt(pt({key:ie.key||"item-".concat(ae)},ee,_e[ee]),G,_e[G]),"animationId",M)),childIndex:Ule(ie,j.children),item:ie})}),W},x=function(j,C){var E=j.props,A=j.dataStartIndex,k=j.dataEndIndex,M=j.updateId;if(!xR({props:E}))return null;var I=E.children,$=E.layout,q=E.stackOffset,V=E.data,H=E.reverseStackOrder,U=o3($),z=U.numericAxisName,Z=U.cateAxisName,ee=ua(I,r),G=Gge(V,ee,"".concat(z,"Id"),"".concat(Z,"Id"),q,H),oe=d.reduce(function(ne,ve){var je="".concat(ve.axisType,"Map");return Se(Se({},ne),{},pt({},je,cje(E,Se(Se({},ve),{},{graphicalItems:ee,stackGroups:ve.axisType===z&&G,dataStartIndex:A,dataEndIndex:k}))))},{}),W=fje(Se(Se({},oe),{},{props:E,graphicalItems:ee}),C==null?void 0:C.legendBBox);Object.keys(oe).forEach(function(ne){oe[ne]=p(E,oe[ne],W,ne.replace("Map",""),n)});var ie=oe["".concat(Z,"Map")],ae=uje(ie),K=v(E,Se(Se({},oe),{},{dataStartIndex:A,dataEndIndex:k,updateId:M,graphicalItems:ee,stackGroups:G,offset:W}));return Se(Se({formattedGraphicalItems:K,graphicalItems:ee,offset:W,stackGroups:G},ae),oe)},w=(function(_){function j(C){var E,A,k;return V1e(this,j),k=Z1e(this,j,[C]),pt(k,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),pt(k,"accessibilityManager",new T1e),pt(k,"handleLegendBBoxUpdate",function(M){if(M){var I=k.state,$=I.dataStartIndex,q=I.dataEndIndex,V=I.updateId;k.setState(Se({legendBBox:M},x({props:k.props,dataStartIndex:$,dataEndIndex:q,updateId:V},Se(Se({},k.state),{},{legendBBox:M}))))}}),pt(k,"handleReceiveSyncEvent",function(M,I,$){if(k.props.syncId===M){if($===k.eventEmitterSymbol&&typeof k.props.syncMethod!="function")return;k.applySyncEvent(I)}}),pt(k,"handleBrushChange",function(M){var I=M.startIndex,$=M.endIndex;if(I!==k.state.dataStartIndex||$!==k.state.dataEndIndex){var q=k.state.updateId;k.setState(function(){return Se({dataStartIndex:I,dataEndIndex:$},x({props:k.props,dataStartIndex:I,dataEndIndex:$,updateId:q},k.state))}),k.triggerSyncEvent({dataStartIndex:I,dataEndIndex:$})}}),pt(k,"handleMouseEnter",function(M){var I=k.getMouseInfo(M);if(I){var $=Se(Se({},I),{},{isTooltipActive:!0});k.setState($),k.triggerSyncEvent($);var q=k.props.onMouseEnter;mt(q)&&q($,M)}}),pt(k,"triggeredAfterMouseMove",function(M){var I=k.getMouseInfo(M),$=I?Se(Se({},I),{},{isTooltipActive:!0}):{isTooltipActive:!1};k.setState($),k.triggerSyncEvent($);var q=k.props.onMouseMove;mt(q)&&q($,M)}),pt(k,"handleItemMouseEnter",function(M){k.setState(function(){return{isTooltipActive:!0,activeItem:M,activePayload:M.tooltipPayload,activeCoordinate:M.tooltipPosition||{x:M.cx,y:M.cy}}})}),pt(k,"handleItemMouseLeave",function(){k.setState(function(){return{isTooltipActive:!1}})}),pt(k,"handleMouseMove",function(M){M.persist(),k.throttleTriggeredAfterMouseMove(M)}),pt(k,"handleMouseLeave",function(M){k.throttleTriggeredAfterMouseMove.cancel();var I={isTooltipActive:!1};k.setState(I),k.triggerSyncEvent(I);var $=k.props.onMouseLeave;mt($)&&$(I,M)}),pt(k,"handleOuterEvent",function(M){var I=zle(M),$=Di(k.props,"".concat(I));if(I&&mt($)){var q,V;/.*touch.*/i.test(I)?V=k.getMouseInfo(M.changedTouches[0]):V=k.getMouseInfo(M),$((q=V)!==null&&q!==void 0?q:{},M)}}),pt(k,"handleClick",function(M){var I=k.getMouseInfo(M);if(I){var $=Se(Se({},I),{},{isTooltipActive:!0});k.setState($),k.triggerSyncEvent($);var q=k.props.onClick;mt(q)&&q($,M)}}),pt(k,"handleMouseDown",function(M){var I=k.props.onMouseDown;if(mt(I)){var $=k.getMouseInfo(M);I($,M)}}),pt(k,"handleMouseUp",function(M){var I=k.props.onMouseUp;if(mt(I)){var $=k.getMouseInfo(M);I($,M)}}),pt(k,"handleTouchMove",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&k.throttleTriggeredAfterMouseMove(M.changedTouches[0])}),pt(k,"handleTouchStart",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&k.handleMouseDown(M.changedTouches[0])}),pt(k,"handleTouchEnd",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&k.handleMouseUp(M.changedTouches[0])}),pt(k,"handleDoubleClick",function(M){var I=k.props.onDoubleClick;if(mt(I)){var $=k.getMouseInfo(M);I($,M)}}),pt(k,"handleContextMenu",function(M){var I=k.props.onContextMenu;if(mt(I)){var $=k.getMouseInfo(M);I($,M)}}),pt(k,"triggerSyncEvent",function(M){k.props.syncId!==void 0&&kN.emit(AN,k.props.syncId,M,k.eventEmitterSymbol)}),pt(k,"applySyncEvent",function(M){var I=k.props,$=I.layout,q=I.syncMethod,V=k.state.updateId,H=M.dataStartIndex,U=M.dataEndIndex;if(M.dataStartIndex!==void 0||M.dataEndIndex!==void 0)k.setState(Se({dataStartIndex:H,dataEndIndex:U},x({props:k.props,dataStartIndex:H,dataEndIndex:U,updateId:V},k.state)));else if(M.activeTooltipIndex!==void 0){var z=M.chartX,Z=M.chartY,ee=M.activeTooltipIndex,G=k.state,oe=G.offset,W=G.tooltipTicks;if(!oe)return;if(typeof q=="function")ee=q(W,M);else if(q==="value"){ee=-1;for(var ie=0;ie<W.length;ie++)if(W[ie].value===M.activeLabel){ee=ie;break}}var ae=Se(Se({},oe),{},{x:oe.left,y:oe.top}),K=Math.min(z,ae.x+ae.width),ne=Math.min(Z,ae.y+ae.height),ve=W[ee]&&W[ee].value,je=n2(k.state,k.props.data,ee),Y=W[ee]?{x:$==="horizontal"?W[ee].coordinate:K,y:$==="horizontal"?ne:W[ee].coordinate}:K7;k.setState(Se(Se({},M),{},{activeLabel:ve,activeCoordinate:Y,activePayload:je,activeTooltipIndex:ee}))}else k.setState(M)}),pt(k,"renderCursor",function(M){var I,$=k.state,q=$.isTooltipActive,V=$.activeCoordinate,H=$.activePayload,U=$.offset,z=$.activeTooltipIndex,Z=$.tooltipAxisBandSize,ee=k.getTooltipEventType(),G=(I=M.props.active)!==null&&I!==void 0?I:q,oe=k.props.layout,W=M.key||"_recharts-cursor";return J.createElement(F1e,{key:W,activeCoordinate:V,activePayload:H,activeTooltipIndex:z,chartName:n,element:M,isActive:G,layout:oe,offset:U,tooltipAxisBandSize:Z,tooltipEventType:ee})}),pt(k,"renderPolarAxis",function(M,I,$){var q=Di(M,"type.axisType"),V=Di(k.state,"".concat(q,"Map")),H=M.type.defaultProps,U=H!==void 0?Se(Se({},H),M.props):M.props,z=V&&V[U["".concat(q,"Id")]];return P.cloneElement(M,Se(Se({},z),{},{className:jt(q,z.className),key:M.key||"".concat(I,"-").concat($),ticks:fo(z,!0)}))}),pt(k,"renderPolarGrid",function(M){var I=M.props,$=I.radialLines,q=I.polarAngles,V=I.polarRadius,H=k.state,U=H.radiusAxisMap,z=H.angleAxisMap,Z=vl(U),ee=vl(z),G=ee.cx,oe=ee.cy,W=ee.innerRadius,ie=ee.outerRadius;return P.cloneElement(M,{polarAngles:Array.isArray(q)?q:fo(ee,!0).map(function(ae){return ae.coordinate}),polarRadius:Array.isArray(V)?V:fo(Z,!0).map(function(ae){return ae.coordinate}),cx:G,cy:oe,innerRadius:W,outerRadius:ie,key:M.key||"polar-grid",radialLines:$})}),pt(k,"renderLegend",function(){var M=k.state.formattedGraphicalItems,I=k.props,$=I.children,q=I.width,V=I.height,H=k.props.margin||{},U=q-(H.left||0)-(H.right||0),z=EU({children:$,formattedGraphicalItems:M,legendWidth:U,legendContent:h});if(!z)return null;var Z=z.item,ee=r3(z,B1e);return P.cloneElement(Z,Se(Se({},ee),{},{chartWidth:q,chartHeight:V,margin:H,onBBoxUpdate:k.handleLegendBBoxUpdate}))}),pt(k,"renderTooltip",function(){var M,I=k.props,$=I.children,q=I.accessibilityLayer,V=Pi($,cr);if(!V)return null;var H=k.state,U=H.isTooltipActive,z=H.activeCoordinate,Z=H.activePayload,ee=H.activeLabel,G=H.offset,oe=(M=V.props.active)!==null&&M!==void 0?M:U;return P.cloneElement(V,{viewBox:Se(Se({},G),{},{x:G.left,y:G.top}),active:oe,label:ee,payload:oe?Z:[],coordinate:z,accessibilityLayer:q})}),pt(k,"renderBrush",function(M){var I=k.props,$=I.margin,q=I.data,V=k.state,H=V.offset,U=V.dataStartIndex,z=V.dataEndIndex,Z=V.updateId;return P.cloneElement(M,{key:M.key||"_recharts-brush",onChange:nv(k.handleBrushChange,M.props.onChange),data:q,x:De(M.props.x)?M.props.x:H.left,y:De(M.props.y)?M.props.y:H.top+H.height+H.brushBottom-($.bottom||0),width:De(M.props.width)?M.props.width:H.width,startIndex:U,endIndex:z,updateId:"brush-".concat(Z)})}),pt(k,"renderReferenceElement",function(M,I,$){if(!M)return null;var q=k,V=q.clipPathId,H=k.state,U=H.xAxisMap,z=H.yAxisMap,Z=H.offset,ee=M.type.defaultProps||{},G=M.props,oe=G.xAxisId,W=oe===void 0?ee.xAxisId:oe,ie=G.yAxisId,ae=ie===void 0?ee.yAxisId:ie;return P.cloneElement(M,{key:M.key||"".concat(I,"-").concat($),xAxis:U[W],yAxis:z[ae],viewBox:{x:Z.left,y:Z.top,width:Z.width,height:Z.height},clipPathId:V})}),pt(k,"renderActivePoints",function(M){var I=M.item,$=M.activePoint,q=M.basePoint,V=M.childIndex,H=M.isRange,U=[],z=I.props.key,Z=I.item.type.defaultProps!==void 0?Se(Se({},I.item.type.defaultProps),I.item.props):I.item.props,ee=Z.activeDot,G=Z.dataKey,oe=Se(Se({index:V,dataKey:G,cx:$.x,cy:$.y,r:4,fill:XP(I.item),strokeWidth:2,stroke:"#fff",payload:$.payload,value:$.value},ct(ee,!1)),Qv(ee));return U.push(j.renderActiveDot(ee,oe,"".concat(z,"-activePoint-").concat(V))),q?U.push(j.renderActiveDot(ee,Se(Se({},oe),{},{cx:q.x,cy:q.y}),"".concat(z,"-basePoint-").concat(V))):H&&U.push(null),U}),pt(k,"renderGraphicChild",function(M,I,$){var q=k.filterFormatItem(M,I,$);if(!q)return null;var V=k.getTooltipEventType(),H=k.state,U=H.isTooltipActive,z=H.tooltipAxis,Z=H.activeTooltipIndex,ee=H.activeLabel,G=k.props.children,oe=Pi(G,cr),W=q.props,ie=W.points,ae=W.isRange,K=W.baseLine,ne=q.item.type.defaultProps!==void 0?Se(Se({},q.item.type.defaultProps),q.item.props):q.item.props,ve=ne.activeDot,je=ne.hide,Y=ne.activeBar,he=ne.activeShape,fe=!!(!je&&U&&oe&&(ve||Y||he)),_e={};V!=="axis"&&oe&&oe.props.trigger==="click"?_e={onClick:nv(k.handleItemMouseEnter,M.props.onClick)}:V!=="axis"&&(_e={onMouseLeave:nv(k.handleItemMouseLeave,M.props.onMouseLeave),onMouseEnter:nv(k.handleItemMouseEnter,M.props.onMouseEnter)});var de=P.cloneElement(M,Se(Se({},q.props),_e));function we(dn){return typeof z.dataKey=="function"?z.dataKey(dn.payload):null}if(fe)if(Z>=0){var ke,re;if(z.dataKey&&!z.allowDuplicatedCategory){var Re=typeof z.dataKey=="function"?we:"payload.".concat(z.dataKey.toString());ke=Xv(ie,Re,ee),re=ae&&K&&Xv(K,Re,ee)}else ke=ie==null?void 0:ie[Z],re=ae&&K&&K[Z];if(he||Y){var ge=M.props.activeIndex!==void 0?M.props.activeIndex:Z;return[P.cloneElement(M,Se(Se(Se({},q.props),_e),{},{activeIndex:ge})),null,null]}if(!St(ke))return[de].concat(Ff(k.renderActivePoints({item:q,activePoint:ke,basePoint:re,childIndex:Z,isRange:ae})))}else{var Be,Le=(Be=k.getItemByXY(k.state.activeCoordinate))!==null&&Be!==void 0?Be:{graphicalItem:de},rt=Le.graphicalItem,Ct=rt.item,_t=Ct===void 0?M:Ct,Gt=rt.childIndex,qt=Se(Se(Se({},q.props),_e),{},{activeIndex:Gt});return[P.cloneElement(_t,qt),null,null]}return ae?[de,null,null]:[de,null]}),pt(k,"renderCustomized",function(M,I,$){return P.cloneElement(M,Se(Se({key:"recharts-customized-".concat($)},k.props),k.state))}),pt(k,"renderMap",{CartesianGrid:{handler:ov,once:!0},ReferenceArea:{handler:k.renderReferenceElement},ReferenceLine:{handler:ov},ReferenceDot:{handler:k.renderReferenceElement},XAxis:{handler:ov},YAxis:{handler:ov},Brush:{handler:k.renderBrush,once:!0},Bar:{handler:k.renderGraphicChild},Line:{handler:k.renderGraphicChild},Area:{handler:k.renderGraphicChild},Radar:{handler:k.renderGraphicChild},RadialBar:{handler:k.renderGraphicChild},Scatter:{handler:k.renderGraphicChild},Pie:{handler:k.renderGraphicChild},Funnel:{handler:k.renderGraphicChild},Tooltip:{handler:k.renderCursor,once:!0},PolarGrid:{handler:k.renderPolarGrid,once:!0},PolarAngleAxis:{handler:k.renderPolarAxis},PolarRadiusAxis:{handler:k.renderPolarAxis},Customized:{handler:k.renderCustomized}}),k.clipPathId="".concat((E=C.id)!==null&&E!==void 0?E:ih("recharts"),"-clip"),k.throttleTriggeredAfterMouseMove=Cz(k.triggeredAfterMouseMove,(A=C.throttleDelay)!==null&&A!==void 0?A:1e3/60),k.state={},k}return Q1e(j,_),G1e(j,[{key:"componentDidMount",value:function(){var E,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,A=E.children,k=E.data,M=E.height,I=E.layout,$=Pi(A,cr);if($){var q=$.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var V=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,H=n2(this.state,k,q,V),U=this.state.tooltipTicks[q].coordinate,z=(this.state.offset.top+M)/2,Z=I==="horizontal",ee=Z?{x:U,y:z}:{y:U,x:z},G=this.state.formattedGraphicalItems.find(function(W){var ie=W.item;return ie.type.name==="Scatter"});G&&(ee=Se(Se({},ee),G.props.points[q].tooltipPosition),H=G.props.points[q].tooltipPayload);var oe={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:V,activePayload:H,activeCoordinate:ee};this.setState(oe),this.renderCursor($),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var k,M;this.accessibilityManager.setDetails({offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(M=this.props.margin.top)!==null&&M!==void 0?M:0}})}return null}},{key:"componentDidUpdate",value:function(E){FC([Pi(E.children,cr)],[Pi(this.props.children,cr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Pi(this.props.children,cr);if(E&&typeof E.props.shared=="boolean"){var A=E.props.shared?"axis":"item";return c.indexOf(A)>=0?A:s}return s}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var A=this.container,k=A.getBoundingClientRect(),M=Pfe(k),I={chartX:Math.round(E.pageX-M.left),chartY:Math.round(E.pageY-M.top)},$=k.width/A.offsetWidth||1,q=this.inRange(I.chartX,I.chartY,$);if(!q)return null;var V=this.state,H=V.xAxisMap,U=V.yAxisMap,z=this.getTooltipEventType(),Z=a3(this.state,this.props.data,this.props.layout,q);if(z!=="axis"&&H&&U){var ee=vl(H).scale,G=vl(U).scale,oe=ee&&ee.invert?ee.invert(I.chartX):null,W=G&&G.invert?G.invert(I.chartY):null;return Se(Se({},I),{},{xValue:oe,yValue:W},Z)}return Z?Se(Se({},I),Z):null}},{key:"inRange",value:function(E,A){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=this.props.layout,I=E/k,$=A/k;if(M==="horizontal"||M==="vertical"){var q=this.state.offset,V=I>=q.left&&I<=q.left+q.width&&$>=q.top&&$<=q.top+q.height;return V?{x:I,y:$}:null}var H=this.state,U=H.angleAxisMap,z=H.radiusAxisMap;if(U&&z){var Z=vl(U);return l4({x:I,y:$},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,A=this.getTooltipEventType(),k=Pi(E,cr),M={};k&&A==="axis"&&(k.props.trigger==="click"?M={onClick:this.handleClick}:M={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 I=Qv(this.props,this.handleOuterEvent);return Se(Se({},I),M)}},{key:"addListener",value:function(){kN.on(AN,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){kN.removeListener(AN,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,A,k){for(var M=this.state.formattedGraphicalItems,I=0,$=M.length;I<$;I++){var q=M[I];if(q.item===E||q.props.key===E.key||A===mo(q.item.type)&&k===q.childIndex)return q}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,A=this.state.offset,k=A.left,M=A.top,I=A.height,$=A.width;return J.createElement("defs",null,J.createElement("clipPath",{id:E},J.createElement("rect",{x:k,y:M,height:I,width:$})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(A,k){var M=n3(k,2),I=M[0],$=M[1];return Se(Se({},A),{},pt({},I,$.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(A,k){var M=n3(k,2),I=M[0],$=M[1];return Se(Se({},A),{},pt({},I,$.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[E])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(E){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[E])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(E){var A=this.state,k=A.formattedGraphicalItems,M=A.activeItem;if(k&&k.length)for(var I=0,$=k.length;I<$;I++){var q=k[I],V=q.props,H=q.item,U=H.type.defaultProps!==void 0?Se(Se({},H.type.defaultProps),H.props):H.props,z=mo(H.type);if(z==="Bar"){var Z=(V.data||[]).find(function(W){return Wxe(E,W)}
1024);if(Z)return{graphicalItem:q,payload:Z}}else if(z==="RadialBar"){var ee=(V.data||[]).find(function(W){return l4(E,W)});if(ee)return{graphicalItem:q,payload:ee}}else if(hb(q,M)||pb(q,M)||Em(q,M)){var G=pbe({graphicalItem:q,activeTooltipItem:M,itemData:U.data}),oe=U.activeIndex===void 0?G:U.activeIndex;return{graphicalItem:Se(Se({},q),{},{childIndex:oe}),payload:Em(q,M)?U.data[G]:q.props.data[G]}}}return null}},{key:"render",value:function(){var E=this;if(!xR(this))return null;var A=this.props,k=A.children,M=A.className,I=A.width,$=A.height,q=A.style,V=A.compact,H=A.title,U=A.desc,z=r3(A,z1e),Z=ct(z,!1);if(V)return J.createElement($5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement(zC,zd({},Z,{width:I,height:$,title:H,desc:U}),this.renderClipPath(),_R(k,this.renderMap)));if(this.props.accessibilityLayer){var ee,G;Z.tabIndex=(ee=this.props.tabIndex)!==null&&ee!==void 0?ee:0,Z.role=(G=this.props.role)!==null&&G!==void 0?G:"application",Z.onKeyDown=function(W){E.accessibilityManager.keyboardEvent(W)},Z.onFocus=function(){E.accessibilityManager.focus()}}var oe=this.parseEventsOfWrapper();return J.createElement($5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement("div",zd({className:jt("recharts-wrapper",M),style:Se({position:"relative",cursor:"default",width:I,height:$},q)},oe,{ref:function(ie){E.container=ie}}),J.createElement(zC,zd({},Z,{width:I,height:$,title:H,desc:U,style:ije}),this.renderClipPath(),_R(k,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(P.Component);pt(w,"displayName",n),pt(w,"defaultProps",Se({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},m)),pt(w,"getDerivedStateFromProps",function(_,j){var C=_.dataKey,E=_.data,A=_.children,k=_.width,M=_.height,I=_.layout,$=_.stackOffset,q=_.margin,V=j.dataStartIndex,H=j.dataEndIndex;if(j.updateId===void 0){var U=s3(_);return Se(Se(Se({},U),{},{updateId:0},x(Se(Se({props:_},U),{},{updateId:0}),j)),{},{prevDataKey:C,prevData:E,prevWidth:k,prevHeight:M,prevLayout:I,prevStackOffset:$,prevMargin:q,prevChildren:A})}if(C!==j.prevDataKey||E!==j.prevData||k!==j.prevWidth||M!==j.prevHeight||I!==j.prevLayout||$!==j.prevStackOffset||!Wd(q,j.prevMargin)){var z=s3(_),Z={chartX:j.chartX,chartY:j.chartY,isTooltipActive:j.isTooltipActive},ee=Se(Se({},a3(j,E,I)),{},{updateId:j.updateId+1}),G=Se(Se(Se({},z),Z),ee);return Se(Se(Se({},G),x(Se({props:_},G),j)),{},{prevDataKey:C,prevData:E,prevWidth:k,prevHeight:M,prevLayout:I,prevStackOffset:$,prevMargin:q,prevChildren:A})}if(!FC(A,j.prevChildren)){var oe,W,ie,ae,K=Pi(A,kf),ne=K&&(oe=(W=K.props)===null||W===void 0?void 0:W.startIndex)!==null&&oe!==void 0?oe:V,ve=K&&(ie=(ae=K.props)===null||ae===void 0?void 0:ae.endIndex)!==null&&ie!==void 0?ie:H,je=ne!==V||ve!==H,Y=!St(E),he=Y&&!je?j.updateId:j.updateId+1;return Se(Se({updateId:he},x(Se(Se({props:_},j),{},{updateId:he,dataStartIndex:ne,dataEndIndex:ve}),j)),{},{prevChildren:A,dataStartIndex:ne,dataEndIndex:ve})}return null}),pt(w,"renderActiveDot",function(_,j,C){var E;return P.isValidElement(_)?E=P.cloneElement(_,j):mt(_)?E=_(j):E=J.createElement(lb,j),J.createElement(Ft,{className:"recharts-active-dot",key:C},E)});var b=P.forwardRef(function(j,C){return J.createElement(w,zd({},j,{ref:C}))});return b.displayName=w.displayName,b},Bf=lk({chartName:"BarChart",GraphicalChild:Fi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ba},{axisType:"yAxis",AxisComp:za}],formatAxisMap:f7}),Z7=lk({chartName:"PieChart",GraphicalChild:As,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:fb},{axisType:"radiusAxis",AxisComp:ub}],formatAxisMap:sye,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),pje=lk({chartName:"AreaChart",GraphicalChild:Yl,axisComponents:[{axisType:"xAxis",AxisComp:Ba},{axisType:"yAxis",AxisComp:za}],formatAxisMap:f7});const l3={A:"#10B981",B:"#3B82F6",C:"#F59E0B"},TN={A:"IO Validated",B:"Actor Confirmed",C:"OSINT Captured"};function mje({data:e}){const t=[{name:"Tier A",value:(e==null?void 0:e.A)||0,tier:"A"},{name:"Tier B",value:(e==null?void 0:e.B)||0,tier:"B"},{name:"Tier C",value:(e==null?void 0:e.C)||0,tier:"C"}].filter(r=>r.value>0),n=t.reduce((r,i)=>r+i.value,0);return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsx(nt,{className:"text-lg font-semibold",children:"Data Quality Distribution"})}),a.jsxs($e,{children:[a.jsx("div",{className:"h-[200px]",children:a.jsx(go,{width:"100%",height:"100%",children:a.jsxs(Z7,{children:[a.jsx(As,{data:t,cx:"50%",cy:"50%",innerRadius:50,outerRadius:80,paddingAngle:2,dataKey:"value",children:t.map(r=>a.jsx(xu,{fill:l3[r.tier]},r.tier))}),a.jsx(cr,{formatter:(r,i)=>[r,i],contentStyle:{borderRadius:"8px",border:"none",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"}})]})})}),a.jsx("div",{className:"grid grid-cols-3 gap-2 mt-4",children:[{tier:"A",icon:ha,label:TN.A},{tier:"B",icon:pi,label:TN.B},{tier:"C",icon:i0,label:TN.C}].map(({tier:r,icon:i,label:s})=>a.jsxs("div",{className:"text-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-1 mb-1",children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:l3[r]}}),a.jsxs("span",{className:"text-xs font-medium text-slate-600",children:["Tier ",r]})]}),a.jsx("p",{className:"text-xl font-bold text-slate-900",children:(e==null?void 0:e[r])||0}),a.jsxs("p",{className:"text-xs text-slate-500",children:[n>0?Math.round(((e==null?void 0:e[r])||0)/n*100):0,"%"]})]},r))})]})]})}function gje({data:e}){const t=n=>n>=1e6?`$${(n/1e6).toFixed(1)}M`:n>=1e3?`$${(n/1e3).toFixed(0)}K`:`$${n}`;return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsx(nt,{className:"text-lg font-semibold",children:"Funding Trend"})}),a.jsx($e,{children:a.jsx("div",{className:"h-[300px]",children:a.jsx(go,{width:"100%",height:"100%",children:a.jsxs(pje,{data:e,margin:{top:10,right:10,left:0,bottom:0},children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"colorFunding",x1:"0",y1:"0",x2:"0",y2:"1",children:[a.jsx("stop",{offset:"5%",
1024stopColor:"#10B981",stopOpacity:.3}),a.jsx("stop",{offset:"95%",stopColor:"#10B981",stopOpacity:0})]})}),a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#E2E8F0"}),a.jsx(Ba,{dataKey:"month",tick:{fontSize:12,fill:"#64748B"},tickLine:!1,axisLine:{stroke:"#E2E8F0"}}),a.jsx(za,{tickFormatter:t,tick:{fontSize:12,fill:"#64748B"},tickLine:!1,axisLine:!1}),a.jsx(cr,{formatter:n=>[t(n),"Funding"],contentStyle:{borderRadius:"8px",border:"none",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"}}),a.jsx(Yl,{type:"monotone",dataKey:"amount",stroke:"#10B981",strokeWidth:2,fillOpacity:1,fill:"url(#colorFunding)"})]})})})})]})}function yje({data:e}){return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsx(nt,{className:"text-lg font-semibold",children:"Startups by Sector"})}),a.jsx($e,{children:a.jsx("div",{className:"h-[300px]",children:a.jsx(go,{width:"100%",height:"100%",children:a.jsxs(Bf,{data:e,layout:"vertical",margin:{top:5,right:20,left:60,bottom:5},children:[a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#E2E8F0",horizontal:!1}),a.jsx(Ba,{type:"number",tick:{fontSize:12,fill:"#64748B"}}),a.jsx(za,{dataKey:"sector",type:"category",tick:{fontSize:12,fill:"#64748B"},width:60}),a.jsx(cr,{contentStyle:{borderRadius:"8px",border:"none",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"}}),a.jsx(Fi,{dataKey:"count",fill:"#10B981",radius:[0,4,4,0],name:"Startups"})]})})})})]})}function vje(e,t){const n=P.useRef(t);P.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const xje=1;function bje(e){return Object.freeze({__version:xje,map:e})}function _je(e,t){return Object.freeze({...e,...t})}const Y7=P.createContext(null),X7=Y7.Provider;function ck(){const e=P.useContext(Y7);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function wje(e){function t(n,r){const{instance:i,context:s}=e(n).current;return P.useImperativeHandle(r,()=>i),n.children==null?null:J.createElement(X7,{value:s},n.children)}return P.forwardRef(t)}function jje(e){function t(n,r){const{instance:i}=e(n).current;return P.useImperativeHandle(r,()=>i),null}return P.forwardRef(t)}function Q7(e,t){const n=P.useRef();P.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function uk(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}var Pp={exports:{}};/* @preserve
1025 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
1026 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
1027 */var Sje=Pp.exports,c3;function Nje(){return c3||(c3=1,(function(e,t){(function(n,r){r(t)})(Sje,(function(n){var r="1.9.4";function i(u){var g,S,O,D;for(S=1,O=arguments.length;S<O;S++){D=arguments[S];for(g in D)u[g]=D[g]}return u}var s=Object.create||(function(){function u(){}return function(g){return u.prototype=g,new u}})();function o(u,g){var S=Array.prototype.slice;if(u.bind)return u.bind.apply(u,S.call(arguments,1));var O=S.call(arguments,2);return function(){return u.apply(g,O.length?O.concat(S.call(arguments)):arguments)}}var c=0;function d(u){return"_leaflet_id"in u||(u._leaflet_id=++c),u._leaflet_id}function h(u,g,S){var O,D,B,te;return te=function(){O=!1,D&&(B.apply(S,D),D=!1)},B=function(){O?D=arguments:(u.apply(S,arguments),setTimeout(te,g),O=!0)},B}function p(u,g,S){var O=g[1],D=g[0],B=O-D;return u===O&&S?u:((u-D)%B+B)%B+D}function m(){return!1}function v(u,g){if(g===!1)return u;var S=Math.pow(10,g===void 0?6:g);return Math.round(u*S)/S}function x(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function w(u){return x(u).split(/\s+/)}function b(u,g){Object.prototype.hasOwnProperty.call(u,"options")||(u.options=u.options?s(u.options):{});for(var S in g)u.options[S]=g[S];return u.options}function _(u,g,S){var O=[];for(var D in u)O.push(encodeURIComponent(S?D.toUpperCase():D)+"="+encodeURIComponent(u[D]));return(!g||g.indexOf("?")===-1?"?":"&")+O.join("&")}var j=/\{ *([\w_ -]+) *\}/g;function C(u,g){return u.replace(j,function(S,O){var D=g[O];if(D===void 0)throw new Error("No value provided for variable "+S);return typeof D=="function"&&(D=D(g)),D})}var E=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function A(u,g){for(var S=0;S<u.length;S++)if(u[S]===g)return S;return-1}var k="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function M(u){return window["webkit"+u]||window["moz"+u]||window["ms"+u]}var I=0;function $(u){var g=+new Date,S=Math.max(0,16-(g-I));return I=g+S,window.setTimeout(u,S)}var q=window.requestAnimationFrame||M("RequestAnimationFrame")||$,V=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(u){window.clearTimeout(u)};function H(u,g,S){if(S&&q===$)u.call(g);else return q.call(window,o(u,g))}function U(u){u&&V.call(window,u)}var z={__proto__:null,extend:i,create:s,bind:o,get lastId(){return c},stamp:d,throttle:h,wrapNum:p,falseFn:m,formatNum:v,trim:x,splitWords:w,setOptions:b,getParamString:_,template:C,isArray:E,indexOf:A,emptyImageUrl:k,requestFn:q,cancelFn:V,requestAnimFrame:H,cancelAnimFrame:U};function Z(){}Z.extend=function(u){var g=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},S=g.__super__=this.prototype,O=s(S);O.constructor=g,g.prototype=O;for(var D in this)Object.prototype.hasOwnProperty.call(this,D)&&D!=="prototype"&&D!=="__super__"&&(g[D]=this[D]);return u.statics&&i(g,u.statics),u.includes&&(ee(u.includes),i.apply(null,[O].concat(u.includes))),i(O,u),delete O.statics,delete O.includes,O.options&&(O.options=S.options?s(S.options):{},i(O.options,u.options)),O._initHooks=[],O.callInitHooks=function(){if(!this._initHooksCalled){S.callInitHooks&&S.callInitHooks.call(this),this._initHooksCalled=!0;for(var B=0,te=O._initHooks.length;B<te;B++)O._initHooks[B].call(this)}},g},Z.include=function(u){var g=this.prototype.options;return i(this.prototype,u),u.options&&(this.prototype.options=g,this.mergeOptions(u.options)),this},Z.mergeOptions=function(u){return i(this.prototype.options,u),this},Z.addInitHook=function(u){var g=Array.prototype.slice.call(arguments,1
1027),S=typeof u=="function"?u:function(){this[u].apply(this,g)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(S),this};function ee(u){if(!(typeof L>"u"||!L||!L.Mixin)){u=E(u)?u:[u];for(var g=0;g<u.length;g++)u[g]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var G={on:function(u,g,S){if(typeof u=="object")for(var O in u)this._on(O,u[O],g);else{u=w(u);for(var D=0,B=u.length;D<B;D++)this._on(u[D],g,S)}return this},off:function(u,g,S){if(!arguments.length)delete this._events;else if(typeof u=="object")for(var O in u)this._off(O,u[O],g);else{u=w(u);for(var D=arguments.length===1,B=0,te=u.length;B<te;B++)D?this._off(u[B]):this._off(u[B],g,S)}return this},_on:function(u,g,S,O){if(typeof g!="function"){console.warn("wrong listener type: "+typeof g);return}if(this._listens(u,g,S)===!1){S===this&&(S=void 0);var D={fn:g,ctx:S};O&&(D.once=!0),this._events=this._events||{},this._events[u]=this._events[u]||[],this._events[u].push(D)}},_off:function(u,g,S){var O,D,B;if(this._events&&(O=this._events[u],!!O)){if(arguments.length===1){if(this._firingCount)for(D=0,B=O.length;D<B;D++)O[D].fn=m;delete this._events[u];return}if(typeof g!="function"){console.warn("wrong listener type: "+typeof g);return}var te=this._listens(u,g,S);if(te!==!1){var pe=O[te];this._firingCount&&(pe.fn=m,this._events[u]=O=O.slice()),O.splice(te,1)}}},fire:function(u,g,S){if(!this.listens(u,S))return this;var O=i({},g,{type:u,target:this,sourceTarget:g&&g.sourceTarget||this});if(this._events){var D=this._events[u];if(D){this._firingCount=this._firingCount+1||1;for(var B=0,te=D.length;B<te;B++){var pe=D[B],xe=pe.fn;pe.once&&this.off(u,xe,pe.ctx),xe.call(pe.ctx||this,O)}this._firingCount--}}return S&&this._propagateEvent(O),this},listens:function(u,g,S,O){typeof u!="string"&&console.warn('"string" type argument expected');var D=g;typeof g!="function"&&(O=!!g,D=void 0,S=void 0);var B=this._events&&this._events[u];if(B&&B.length&&this._listens(u,D,S)!==!1)return!0;if(O){for(var te in this._eventParents)if(this._eventParents[te].listens(u,g,S,O))return!0}return!1},_listens:function(u,g,S){if(!this._events)return!1;var O=this._events[u]||[];if(!g)return!!O.length;S===this&&(S=void 0);for(var D=0,B=O.length;D<B;D++)if(O[D].fn===g&&O[D].ctx===S)return D;return!1},once:function(u,g,S){if(typeof u=="object")for(var O in u)this._on(O,u[O],g,!0);else{u=w(u);for(var D=0,B=u.length;D<B;D++)this._on(u[D],g,S,!0)}return this},addEventParent:function(u){return this._eventParents=this._eventParents||{},this._eventParents[d(u)]=u,this},removeEventParent:function(u){return this._eventParents&&delete this._eventParents[d(u)],this},_propagateEvent:function(u){for(var g in this._eventParents)this._eventParents[g].fire(u.type,i({layer:u.target,propagatedFrom:u.target},u),!0)}};G.addEventListener=G.on,G.removeEventListener=G.clearAllEventListeners=G.off,G.addOneTimeEventListener=G.once,G.fireEvent=G.fire,G.hasEventListeners=G.listens;var oe=Z.extend(G);function W(u,g,S){this.x=S?Math.round(u):u,this.y=S?Math.round(g):g}var ie=Math.trunc||function(u){return u>0?Math.floor(u):Math.ceil(u)};W.prototype={clone:function(){return new W(this.x,this.y)},add:function(u){return this.clone()._add(ae(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(ae(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new W(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new W(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ie(this.x),this.y=ie(this.y),this},distanceTo:function(u){u=ae(u);var g=u.x-this.x,S=u.y-this.y;return Math.sqrt(g*g+S*S)},equals:function(u){return u=ae(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=ae(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+v(this.x)+", "+v(this.y)+")"}};function ae(u,g,S){return u instanceof W?u:E(u)?new W(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new W(u.x,u.y):new W(u,g,S)}function K(u,g){if(u)for(var S=g?[u,g]:u,O=0,D=S.length;O<D;O++)this.extend(S[O])}K.prototype={extend:function(u){var g,S;if(!u)return this;if(u instanceof W||typeof u[0]=="number"||"x"in u)g=S=ae(u);else if(u=ne(u),g=u.min,S=u.max,!g||!S)return this;return!this.min&&!this.max?(this.min=g.clone(),this.max=S.clone()):(this.min.x=Math.min(g.x,this.min.x),this.max.x=Math.max(S.x,this.max.x),this.min.y=Math.min(g.y,this.min.y),this.max.y=Math.max(S.y,this.max.y)),this},getCenter:function(u){return ae((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,u)},getBottomLeft:function(){return ae(this.min.x,this.max.y)},getTopRight:function(){return ae(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(u){var g,S;return typeof u[0]=="number"||u instanceof W?u=ae(u):u=ne(u),u instanceof K?(g=u.min,S=u.max):g=S=u,g.x>=this.min.x&&S.x<=this.max.x&&g.y>=this.min.y&&S.y<=this.max.y},intersects:function(u){u=ne(u);var g=this.min,S=this.max,O=u.min,D=u.max,B=D.x>=g.x&&O.x<=S.x,te=D.y>=g.y&&O.y<=S.y;return B&&te},overlaps:function(u){u=ne(u);var g=this.min,S=this.max,O=u.min,D=u.max,B=D.x>g.x&&O.x<S.x,te=D.y>g.y&&O.y<S.y;return B&&te},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var g=this.min,S=this.max,O=Math.abs(g.x-S.x)*u,D=Math.abs(g.y-S.y)*u;return ne(ae(g.x-O,g.y-D),ae(S.x+O,S.y+D))},equals:function(u){return u?(u=ne(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function ne(u,g){return!u||u instanceof K?u:new K(u,g)}function ve(u,g){if(u)for(var S=g?[u,g]:u,O=0,D=S.length;O<D;O++)this.extend(S[O])}ve.prototype={extend:function(u){var g=this._southWest,S=this._northEast,O,D;if(u instanceof Y)O=u,D=u;else if(u instanceof ve){if(O=u._southWest,D=u._northEast,!O||!D)return this}else return u?this.extend(he(u)||je(u)):this;return!g&&!S?(this._southWest=new Y(O.lat,O.lng),this._northEast=new Y(D.lat,D.lng)):(g.lat=Math.min(O.lat,g.lat),g.lng=Math.min(O.lng,g.lng),S.lat=Math.max(D.lat,S.lat),S.lng=Math.max(D.lng,S.lng)),this},pad:function(u){var g=this._southWest,S=this._northEast,O=Math.abs(g.lat-S.lat)*u,D=Math.abs(g.lng-S.lng)*u;return new ve(new Y(g.lat-O,g.lng-D),new Y(S.lat+O,S.lng+D))},getCenter:function(){return new Y((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Y(this.getNorth(),this.getWest())},getSouthEast:function(){return new Y(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
1027,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(u){typeof u[0]=="number"||u instanceof Y||"lat"in u?u=he(u):u=je(u);var g=this._southWest,S=this._northEast,O,D;return u instanceof ve?(O=u.getSouthWest(),D=u.getNorthEast()):O=D=u,O.lat>=g.lat&&D.lat<=S.lat&&O.lng>=g.lng&&D.lng<=S.lng},intersects:function(u){u=je(u);var g=this._southWest,S=this._northEast,O=u.getSouthWest(),D=u.getNorthEast(),B=D.lat>=g.lat&&O.lat<=S.lat,te=D.lng>=g.lng&&O.lng<=S.lng;return B&&te},overlaps:function(u){u=je(u);var g=this._southWest,S=this._northEast,O=u.getSouthWest(),D=u.getNorthEast(),B=D.lat>g.lat&&O.lat<S.lat,te=D.lng>g.lng&&O.lng<S.lng;return B&&te},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,g){return u?(u=je(u),this._southWest.equals(u.getSouthWest(),g)&&this._northEast.equals(u.getNorthEast(),g)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function je(u,g){return u instanceof ve?u:new ve(u,g)}function Y(u,g,S){if(isNaN(u)||isNaN(g))throw new Error("Invalid LatLng object: ("+u+", "+g+")");this.lat=+u,this.lng=+g,S!==void 0&&(this.alt=+S)}Y.prototype={equals:function(u,g){if(!u)return!1;u=he(u);var S=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return S<=(g===void 0?1e-9:g)},toString:function(u){return"LatLng("+v(this.lat,u)+", "+v(this.lng,u)+")"},distanceTo:function(u){return _e.distance(this,he(u))},wrap:function(){return _e.wrapLatLng(this)},toBounds:function(u){var g=180*u/40075017,S=g/Math.cos(Math.PI/180*this.lat);return je([this.lat-g,this.lng-S],[this.lat+g,this.lng+S])},clone:function(){return new Y(this.lat,this.lng,this.alt)}};function he(u,g,S){return u instanceof Y?u:E(u)&&typeof u[0]!="object"?u.length===3?new Y(u[0],u[1],u[2]):u.length===2?new Y(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new Y(u.lat,"lng"in u?u.lng:u.lon,u.alt):g===void 0?null:new Y(u,g,S)}var fe={latLngToPoint:function(u,g){var S=this.projection.project(u),O=this.scale(g);return this.transformation._transform(S,O)},pointToLatLng:function(u,g){var S=this.scale(g),O=this.transformation.untransform(u,S);return this.projection.unproject(O)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var g=this.projection.bounds,S=this.scale(u),O=this.transformation.transform(g.min,S),D=this.transformation.transform(g.max,S);return new K(O,D)},infinite:!1,wrapLatLng:function(u){var g=this.wrapLng?p(u.lng,this.wrapLng,!0):u.lng,S=this.wrapLat?p(u.lat,this.wrapLat,!0):u.lat,O=u.alt;return new Y(S,g,O)},wrapLatLngBounds:function(u){var g=u.getCenter(),S=this.wrapLatLng(g),O=g.lat-S.lat,D=g.lng-S.lng;if(O===0&&D===0)return u;
1027var B=u.getSouthWest(),te=u.getNorthEast(),pe=new Y(B.lat-O,B.lng-D),xe=new Y(te.lat-O,te.lng-D);return new ve(pe,xe)}},_e=i({},fe,{wrapLng:[-180,180],R:6371e3,distance:function(u,g){var S=Math.PI/180,O=u.lat*S,D=g.lat*S,B=Math.sin((g.lat-u.lat)*S/2),te=Math.sin((g.lng-u.lng)*S/2),pe=B*B+Math.cos(O)*Math.cos(D)*te*te,xe=2*Math.atan2(Math.sqrt(pe),Math.sqrt(1-pe));return this.R*xe}}),de=6378137,we={R:de,MAX_LATITUDE:85.0511287798,project:function(u){var g=Math.PI/180,S=this.MAX_LATITUDE,O=Math.max(Math.min(S,u.lat),-S),D=Math.sin(O*g);return new W(this.R*u.lng*g,this.R*Math.log((1+D)/(1-D))/2)},unproject:function(u){var g=180/Math.PI;return new Y((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*g,u.x*g/this.R)},bounds:(function(){var u=de*Math.PI;return new K([-u,-u],[u,u])})()};function ke(u,g,S,O){if(E(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=g,this._c=S,this._d=O}ke.prototype={transform:function(u,g){return this._transform(u.clone(),g)},_transform:function(u,g){return g=g||1,u.x=g*(this._a*u.x+this._b),u.y=g*(this._c*u.y+this._d),u},untransform:function(u,g){return g=g||1,new W((u.x/g-this._b)/this._a,(u.y/g-this._d)/this._c)}};function re(u,g,S,O){return new ke(u,g,S,O)}var Re=i({},_e,{code:"EPSG:3857",projection:we,transformation:(function(){var u=.5/(Math.PI*we.R);return re(u,.5,-u,.5)})()}),ge=i({},Re,{code:"EPSG:900913"});function Be(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function Le(u,g){var S="",O,D,B,te,pe,xe;for(O=0,B=u.length;O<B;O++){for(pe=u[O],D=0,te=pe.length;D<te;D++)xe=pe[D],S+=(D?"L":"M")+xe.x+" "+xe.y;S+=g?at.svg?"z":"x":""}return S||"M0 0"}var rt=document.documentElement.style,Ct="ActiveXObject"in window,_t=Ct&&!document.addEventListener,Gt="msLaunchUri"in navigator&&!("documentMode"in document),qt=Nr("webkit"),dn=Nr("android"),nn=Nr("android 2")||Nr("android 3"),qe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Oe=dn&&Nr("Google")&&qe<537&&!("AudioNode"in window),lt=!!window.opera,Ge=!Gt&&Nr("chrome"),Ue=Nr("gecko")&&!qt&&!lt&&!Ct,Et=!Ge&&Nr("safari"),At=Nr("phantom"),fn="OTransition"in rt,Ln=navigator.platform.indexOf("Win")===0,ga=Ct&&"transition"in rt,Xl="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nn,Ql="MozPerspective"in rt,Oo=!window.L_DISABLE_3D&&(ga||Xl||Ql)&&!fn&&!At,rr=typeof orientation<"u"||Nr("mobile"),Va=rr&&qt,uh=rr&&Xl,$u=!window.PointerEvent&&window.MSPointerEvent,Os=!!(window.PointerEvent||$u),Ts="ontouchstart"in window||!!window.TouchEvent,hg=!window.L_NO_TOUCH&&(Ts||Os),pg=rr&&lt,mg=rr&&Ue,gg=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,yg=(function(){var u=!1;try{var g=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",m,g),window.removeEventListener("testPassiveEventSupport",m,g)}catch{}return u})(),dh=(function(){return!!document.createElement("canvas").getContext})(),Fu=!!(document.createElementNS&&Be("svg").createSVGRect),Jl=!!Fu&&(function(){var u=document.createElement("div");return u.innerHTML="<svg/>",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),fh=!Fu&&(function(){try{var u=document.createElement("div");u.innerHTML='<v:shape adj="1"/>';var g=u.firstChild;return g.style.behavior="url(#default#VML)",g&&typeof g.adj=="object"}catch{return!1}})(),ec=navigator.platform.indexOf("Mac")===0,Eb=navigator.platform.indexOf("Linux")===0;function Nr(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var at={ie:Ct,ielt9:_t,edge:Gt,webkit:qt,android:dn,android23:nn,androidStock:Oe,opera:lt,chrome:Ge,gecko:Ue,safari:Et,phantom:At,opera12:fn,win:Ln,ie3d:ga,webkit3d:Xl,gecko3d:Ql,any3d:Oo,mobile:rr,mobileWebkit:Va,mobileWebkit3d:uh,msPointer:$u,pointer:Os,touch:hg,touchNative:Ts,mobileOpera:pg,mobileGecko:mg,retina:gg,passiveEvents:yg,canvas:dh,svg:Fu,vml:fh,inlineSvg:Jl,mac:ec,linux:Eb},tc=at.msPointer?"MSPointerDown":"pointerdown",Bu=at.msPointer?"MSPointerMove":"pointermove",vg=at.msPointer?"MSPointerUp":"pointerup",xg=at.msPointer?"MSPointerCancel":"pointercancel",hh={touchstart:tc,touchmove:Bu,touchend:vg,touchcancel:xg},Ka={touchstart:Sn,touchmove:zu,touchend:zu,touchcancel:zu},Ms={},ph=!1;function Pb(u,g,S){return g==="touchstart"&&kb(),Ka[g]?(S=Ka[g].bind(this,S),u.addEventListener(hh[g],S,!1),S):(console.warn("wrong event specified:",g),m)}function bg(u,g,S){if(!hh[g]){console.warn("wrong event specified:",g);return}u.removeEventListener(hh[g],S,!1)}function _g(u){Ms[u.pointerId]=u}function wg(u){Ms[u.pointerId]&&(Ms[u.pointerId]=u)}function mh(u){delete Ms[u.pointerId]}function kb(){ph||(document.addEventListener(tc,_g,!0),document.addEventListener(Bu,wg,!0),document.addEventListener(vg,mh,!0),document.addEventListener(xg,mh,!0),ph=!0)}function zu(u,g){if(g.pointerType!==(g.MSPOINTER_TYPE_MOUSE||"mouse")){g.touches=[];for(var S in Ms)g.touches.push(Ms[S]);g.changedTouches=[g],u(g)}}function Sn(u,g){g.MSPOINTER_TYPE_TOUCH&&g.pointerType===g.MSPOINTER_TYPE_TOUCH&&Nn(g),zu(u,g)}function Ab(u){var g={},S,O;for(O in u)S=u[O],g[O]=S&&S.bind?S.bind(u):S;return u=g,g.type="dblclick",g.detail=2,g.isTrusted=!1,g._simulated=!0,g}var gh=200;function jg(u,g){u.addEventListener("dblclick",g);var S=0,O;function D(B){if(B.detail!==1){O=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var te=Ls(B);if(!(te.some(function(xe){return xe instanceof HTMLLabelElement&&xe.attributes.for})&&!te.some(function(xe){return xe instanceof HTMLInputElement||xe instanceof HTMLSelectElement}))){var pe=Date.now();pe-S<=gh?(O++,O===2&&g(Ab(B))):O=1,S=pe}}}return u.addEventListener("click",D),{dblclick:g,simDblclick:D}}function Uu(u,g){u.removeEventListener("dblclick",g.dblclick),u.removeEventListener("click",g.simDblclick)}var yh=Io(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),To=Io(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),nc=To==="webkitTransition"||To==="OTransition"?To+"End":"transitionend";function gi(u){return typeof u=="string"?document.getElementById(u):u}function rc(u,g){var S=u.style[g]||u.currentStyle&&u.currentStyle[g];if((!S||S==="auto")&&document.defaultView){var O=document.defaultView.getComputedStyle(u,null);S=O?O[g]:null}return S==="auto"?null:S}function wt(u,g,S){var O=document.createElement(u);return O.className=g||"",S&&S.appendChild(O),O}function xn(u){var g=u.parentNode;g&&g.removeChild(u)}function qu(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Mo(u){var g=u.parentNode;g&&g.lastChild!==u&&g.appendChild(u)}function ya(u){var g=u.parentNode;g&&g.firstChild!==u&&g.insertBefore(u,g.firstChild)}function Ro(u,g){if(u.classList!==void 0)return u.classList.contains(g);var S=Hu(u);return S.length>0&&new RegExp("(^|\\s)"+g+"(\\s|$)").test(S)}function bt(u,g){if(u.classList!==void 0)for(var S=w(g),O=0,D=S.length;O<D;O++)u.classList.add(S[O]);else if(!Ro(u,g)){var B=Hu(u);vh(u,(B?B+" ":"")+g)}}function hn(u,g){u.classList!==void 0?u.classList.remove(g):vh(u,x((" "+Hu(u)+" ").replace(" "+g+" "," ")))}function vh(u,g){u.className.baseVal===void 0?u.className=g:u.className.baseVal=g}function Hu(u){return u.correspondingElement&&(u=u.correspondingElement),u.className.baseVal===void 0?u.className:u.className.baseVal}function Cr(u,g){"opacity"in u.style?u.style.opacity=g:"filter"in u.style&&Sg(u,g)}function Sg(u,g){var S=!1,O="DXImageTransform.Microsoft.Alpha";try{S=u.filters.item(O)}catch{if(g===1)return}g=Math.round(g*100),S?(S.Enabled=g!==100,S.Opacity=g):u.style.filter+=" progid:"+O+"(opacity="+g+")"}function Io(u){for(var g=document.documentElement.style,S=0;S<u.length;S++)if(u[S]in g)return u[S];return!1}function yi(u,g,S){var O=g||new W(0,0);
1027u.style[yh]=(at.ie3d?"translate("+O.x+"px,"+O.y+"px)":"translate3d("+O.x+"px,"+O.y+"px,0)")+(S?" scale("+S+")":"")}function kn(u,g){u._leaflet_pos=g,at.any3d?yi(u,g):(u.style.left=g.x+"px",u.style.top=g.y+"px")}function va(u){return u._leaflet_pos||new W(0,0)}var Rt,Lo,Wu;if("onselectstart"in document)Rt=function(){gt(window,"selectstart",Nn)},Lo=function(){rn(window,"selectstart",Nn)};else{var Rs=Io(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Rt=function(){if(Rs){var u=document.documentElement.style;Wu=u[Rs],u[Rs]="none"}},Lo=function(){Rs&&(document.documentElement.style[Rs]=Wu,Wu=void 0)}}function Vu(){gt(window,"dragstart",Nn)}function Ku(){rn(window,"dragstart",Nn)}var ic,ac;function Do(u){for(;u.tabIndex===-1;)u=u.parentNode;u.style&&(vi(),ic=u,ac=u.style.outlineStyle,u.style.outlineStyle="none",gt(window,"keydown",vi))}function vi(){ic&&(ic.style.outlineStyle=ac,ic=void 0,ac=void 0,rn(window,"keydown",vi))}function xa(u){do u=u.parentNode;while((!u.offsetWidth||!u.offsetHeight)&&u!==document.body);return u}function Ui(u){var g=u.getBoundingClientRect();return{x:g.width/u.offsetWidth||1,y:g.height/u.offsetHeight||1,boundingClientRect:g}}var sc={__proto__:null,TRANSFORM:yh,TRANSITION:To,TRANSITION_END:nc,get:gi,getStyle:rc,create:wt,remove:xn,empty:qu,toFront:Mo,toBack:ya,hasClass:Ro,addClass:bt,removeClass:hn,setClass:vh,getClass:Hu,setOpacity:Cr,testProp:Io,setTransform:yi,setPosition:kn,getPosition:va,get disableTextSelection(){return Rt},get enableTextSelection(){return Lo},disableImageDrag:Vu,enableImageDrag:Ku,preventOutline:Do,restoreOutline:vi,getSizedParentNode:xa,getScale:Ui};function gt(u,g,S,O){if(g&&typeof g=="object")for(var D in g)bh(u,D,g[D],S);else{g=w(g);for(var B=0,te=g.length;B<te;B++)bh(u,g[B],S,O)}return this}var Wn="_leaflet_events";function rn(u,g,S,O){if(arguments.length===1)xh(u),delete u[Wn];else if(g&&typeof g=="object")for(var D in g)Gu(u,D,g[D],S);else if(g=w(g),arguments.length===2)xh(u,function(pe){return A(g,pe)!==-1});else for(var B=0,te=g.length;B<te;B++)Gu(u,g[B],S,O);return this}function xh(u,g){for(var S in u[Wn]){var O=S.split(/\d/)[0];(!g||g(O))&&Gu(u,O,null,null,S)}}
1027var Is={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function bh(u,g,S,O){var D=g+d(S)+(O?"_"+d(O):"");if(u[Wn]&&u[Wn][D])return this;var B=function(pe){return S.call(O||u,pe||window.event)},te=B;!at.touchNative&&at.pointer&&g.indexOf("touch")===0?B=Pb(u,g,B):at.touch&&g==="dblclick"?B=jg(u,B):"addEventListener"in u?g==="touchstart"||g==="touchmove"||g==="wheel"||g==="mousewheel"?u.addEventListener(Is[g]||g,B,at.passiveEvents?{passive:!1}:!1):g==="mouseenter"||g==="mouseleave"?(B=function(pe){pe=pe||window.event,cc(u,pe)&&te(pe)},u.addEventListener(Is[g],B,!1)):u.addEventListener(g,te,!1):u.attachEvent("on"+g,B),u[Wn]=u[Wn]||{},u[Wn][D]=B}function Gu(u,g,S,O,D){D=D||g+d(S)+(O?"_"+d(O):"");var B=u[Wn]&&u[Wn][D];if(!B)return this;!at.touchNative&&at.pointer&&g.indexOf("touch")===0?bg(u,g,B):at.touch&&g==="dblclick"?Uu(u,B):"removeEventListener"in u?u.removeEventListener(Is[g]||g,B,!1):u.detachEvent("on"+g,B),u[Wn][D]=null}function qi(u){return u.stopPropagation?u.stopPropagation():u.originalEvent?u.originalEvent._stopped=!0:u.cancelBubble=!0,this}function Zu(u){return bh(u,"wheel",qi),this}function oc(u){return gt(u,"mousedown touchstart dblclick contextmenu",qi),u._leaflet_disable_click=!0,this}function Nn(u){return u.preventDefault?u.preventDefault():u.returnValue=!1,this}function xi(u){return Nn(u),qi(u),this}function Ls(u){if(u.composedPath)return u.composedPath();for(var g=[],S=u.target;S;)g.push(S),S=S.parentNode;return g}function lc(u,g){if(!g)return new W(u.clientX,u.clientY);var S=Ui(g),O=S.boundingClientRect;return new W((u.clientX-O.left)/S.x-g.clientLeft,(u.clientY-O.top)/S.y-g.clientTop)}var Ob=at.linux&&at.chrome?window.devicePixelRatio:at.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Ng(u){return at.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/Ob:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function cc(u,g){var S=g.relatedTarget;if(!S)return!0;try{for(;S&&S!==u;)S=S.parentNode}catch{return!1}return S!==u}var Yu={__proto__:null,on:gt,off:rn,stopPropagation:qi,disableScrollPropagation:Zu,disableClickPropagation:oc,preventDefault:Nn,stop:xi,getPropagationPath:Ls,getMousePosition:lc,getWheelDelta:Ng,isExternalTarget:cc,addListener:gt,removeListener:rn},Xu=oe.extend({run:function(u,g,S,O){this.stop(),this._el=u,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(O||.5,.2),this._startPos=va(u),this._offset=g.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=H(this._animate,this),this._step()},_step:function(u){var g=+new Date-this._startTime,S=this._duration*1e3;g<S?this._runFrame(this._easeOut(g/S),u):(this._runFrame(1),this._complete())},_runFrame:function(u,g){var S=this._startPos.add(this._offset.multiplyBy(u));g&&S._round(),kn(this._el,S),this.fire("step")},_complete:function(){U(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),Mt=oe.extend({options:{crs:Re,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,g){g=b(this,g),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),g.maxBounds&&this.setMaxBounds(g.maxBounds),g.zoom!==void 0&&(this._zoom=this._limitZoom(g.zoom)),g.center&&g.zoom!==void 0&&this.setView(he(g.center),g.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=To&&at.any3d&&!at.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),gt(this._proxy,nc,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 5,990 bytes, line 1027
1027,setView:function(u,g,S){if(g=g===void 0?this._zoom:this._limitZoom(g),u=this._limitCenter(he(u),g,this.options.maxBounds),S=S||{},this._stop(),this._loaded&&!S.reset&&S!==!0){S.animate!==void 0&&(S.zoom=i({animate:S.animate},S.zoom),S.pan=i({animate:S.animate,duration:S.duration},S.pan));var O=this._zoom!==g?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,g,S.zoom):this._tryAnimatedPan(u,S.pan);if(O)return clearTimeout(this._sizeTimer),this}return this._resetView(u,g,S.pan&&S.pan.noMoveStart),this},setZoom:function(u,g){return this._loaded?this.setView(this.getCenter(),u,{zoom:g}):(this._zoom=u,this)},zoomIn:function(u,g){return u=u||(at.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,g)},zoomOut:function(u,g){return u=u||(at.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,g)},setZoomAround:function(u,g,S){var O=this.getZoomScale(g),D=this.getSize().divideBy(2),B=u instanceof W?u:this.latLngToContainerPoint(u),te=B.subtract(D).multiplyBy(1-1/O),pe=this.containerPointToLatLng(D.add(te));return this.setView(pe,g,{zoom:S})},_getBoundsCenterZoom:function(u,g){g=g||{},u=u.getBounds?u.getBounds():je(u);var S=ae(g.paddingTopLeft||g.padding||[0,0]),O=ae(g.paddingBottomRight||g.padding||[0,0]),D=this.getBoundsZoom(u,!1,S.add(O));if(D=typeof g.maxZoom=="number"?Math.min(g.maxZoom,D):D,D===1/0)return{center:u.getCenter(),zoom:D};var B=O.subtract(S).divideBy(2),te=this.project(u.getSouthWest(),D),pe=this.project(u.getNorthEast(),D),xe=this.unproject(te.add(pe).divideBy(2).add(B),D);return{center:xe,zoom:D}},fitBounds:function(u,g){if(u=je(u),!u.isValid())throw new Error("Bounds are not valid.");var S=this._getBoundsCenterZoom(u,g);return this.setView(S.center,S.zoom,g)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,g){return this.setView(u,this._zoom,{pan:g})},panBy:function(u,g){if(u=ae(u).round(),g=g||{},!u.x&&!u.y)return this.fire("moveend");if(g.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Xu,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),g.noMoveStart||this.fire("movestart"),g.animate!==!1){bt(this._mapPane,"leaflet-pan-anim");var S=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,S,g.duration||.25,g.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,g,S){if(S=S||{},S.animate===!1||!at.any3d)return this.setView(u,g,S);this._stop();var O=this.project(this.getCenter()),D=this.project(u),B=this.getSize(),te=this._zoom;u=he(u),g=g===void 0?te:g;var pe=Math.max(B.x,B.y),xe=pe*this.getZoomScale(te,g),Ae=D.distanceTo(O)||1,Ve=1.42,ut=Ve*Ve;function Nt(Zt){var Qo=Zt?-1:1,Wb=Zt?xe:pe,Vb=xe*xe-pe*pe+Qo*ut*ut*Ae*Ae,qs=2*Wb*ut*Ae,Hs=Vb/qs,Ws=Math.sqrt(Hs*Hs+1)-Hs,dd=Ws<1e-9?-18:Math.log(Ws);return dd}function Vn(Zt){return(Math.exp(Zt)-Math.exp(-Zt))/2}function Dn(Zt){return(Math.exp(Zt)+Math.exp(-Zt))/2}function qr(Zt){return Vn(Zt)/Dn(Zt)}var Pr=Nt(0);function Yo(Zt){return pe*(Dn(Pr)/Dn(Pr+Ve*Zt))}function zh(Zt){return pe*(Dn(Pr)*qr(Pr+Ve*Zt)-Vn(Pr))/ut}function ts(Zt){return 1-Math.pow(1-Zt,1.5)}var Vg=Date.now(),Us=(Nt(1)-Pr)/Ve,Ki=S.duration?1e3*S.duration:1e3*Us*.8;function Xo(){var Zt=(Date.now()-Vg)/Ki,Qo=ts(Zt)*Us;Zt<=1?(this._flyToFrame=H(Xo,this),this._move(this.unproject(O.add(D.subtract(O).multiplyBy(zh(Qo)/Ae)),te),this.getScaleZoom(pe/Yo(Qo),te),{flyTo:!0})):this._move(u,g)._moveEnd(!0)}return this._moveStart(!0,S.noMoveStart),Xo.call(this),this},flyToBounds:function(u,g){var S=this._getBoundsCenterZoom(u,g);return this.flyTo(S.center,S.zoom,g)},setMaxBounds:function(u){return u=je(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var g=this.options.minZoom;return this.options.minZoom=u,this._loaded&&g!==u&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(u):this},setMaxZoom:function(u){var g=this.options.maxZoom;return this.options.maxZoom=u,this._loaded&&g!==u&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,g){this._enforcingBounds=!0;var S=this.getCenter(),O=this._limitCenter(S,this._zoom,je(u));return S.equals(O)||this.panTo(O,g),this._enforcingBounds=!1,this},panInside:function(u,g){g=g||{};var S=ae(g.paddingTopLeft||g.padding||[0,0]),O=ae(g.paddingBottomRight||g.padding||[0,0]),D=this.project(this.getCenter()),B=this.project(u),te=this.getPixelBounds(),pe=ne([te.min.add(S),te.max.subtract(O)]),xe=pe.getSize();if(!pe.contains(B)){this._enforcingBounds=!0;var Ae=B.subtract(pe.getCenter()),Ve=pe.extend(B).getSize().subtract(xe);D.x+=Ae.x<0?-Ve.x:Ve.x,D.y+=Ae.y<0?-Ve.y:Ve.y,this.panTo(this.unproject(D),g),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var g=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),O=g.divideBy(2).round(),D=S.divideBy(2).round(),B=O.subtract(D);return!B.x&&!B.y?this:(u.animate&&u.pan?this.panBy(B):(u.pan&&this._rawPanBy(B),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:g,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var g=o(this._handleGeolocationResponse,this),S=o(this._handleGeolocationError,this);
1027return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(g,S,u):navigator.geolocation.getCurrentPosition(g,S,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var g=u.code,S=u.message||(g===1?"permission denied":g===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:g,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var g=u.coords.latitude,S=u.coords.longitude,O=new Y(g,S),D=O.toBounds(u.coords.accuracy*2),B=this._locateOptions;if(B.setView){var te=this.getBoundsZoom(D);this.setView(O,B.maxZoom?Math.min(te,B.maxZoom):te)}var pe={latlng:O,bounds:D,timestamp:u.timestamp};for(var xe in u.coords)typeof u.coords[xe]=="number"&&(pe[xe]=u.coords[xe]);this.fire("locationfound",pe)}},addHandler:function(u,g){if(!g)return this;var S=this[u]=new g(this);return this._handlers.push(S),this.options[u]&&S.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),xn(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(U(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)xn(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,g){var S="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),O=wt("div",S,g||this._mapPane);return u&&(this._panes[u]=O),O},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),g=this.unproject(u.getBottomLeft()),S=this.unproject(u.getTopRight());return new ve(g,S)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,g,S){u=je(u),S=ae(S||[0,0]);var O=this.getZoom()||0,D=this.getMinZoom(),B=this.getMaxZoom(),te=u.getNorthWest(),pe=u.getSouthEast(),xe=this.getSize().subtract(S),Ae=ne(this.project(pe,O),this.project(te,O)).getSize(),Ve=at.any3d?this.options.zoomSnap:1,ut=xe.x/Ae.x,Nt=xe.y/Ae.y,Vn=g?Math.max(ut,Nt):Math.min(ut,Nt);return O=this.getScaleZoom(Vn,O),Ve&&(O=Math.round(O/(Ve/100))*(Ve/100),O=g?Math.ceil(O/Ve)*Ve:Math.floor(O/Ve)*Ve),Math.max(D,Math.min(B,O))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new W(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,g){var S=this._getTopLeftPoint(u,g);return new K(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,g){var S=this.options.crs;return g=g===void 0?this._zoom:g,S.scale(u)/S.scale(g)},getScaleZoom:function(u,g){var S=this.options.crs;g=g===void 0?this._zoom:g;var O=S.zoom(u*S.scale(g));return isNaN(O)?1/0:O},project:function(u,g){return g=g===void 0?this._zoom:g,this.options.crs.latLngToPoint(he(u),g)},unproject:function(u,g){return g=g===void 0?this._zoom:g,this.options.crs.pointToLatLng(
1027ae(u),g)},layerPointToLatLng:function(u){var g=ae(u).add(this.getPixelOrigin());return this.unproject(g)},latLngToLayerPoint:function(u){var g=this.project(he(u))._round();return g._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(he(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(je(u))},distance:function(u,g){return this.options.crs.distance(he(u),he(g))},containerPointToLayerPoint:function(u){return ae(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return ae(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var g=this.containerPointToLayerPoint(ae(u));return this.layerPointToLatLng(g)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(he(u)))},mouseEventToContainerPoint:function(u){return lc(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var g=this._container=gi(u);if(g){if(g._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");gt(g,"scroll",this._onScroll,this),this._containerId=d(g)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&at.any3d,bt(u,"leaflet-container"+(at.touch?" leaflet-touch":"")+(at.retina?" leaflet-retina":"")+(at.ielt9?" leaflet-oldie":"")+(at.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var g=rc(u,"position");g!=="absolute"&&g!=="relative"&&g!=="fixed"&&g!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),kn(this._mapPane,new W(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(bt(u.markerPane,"leaflet-zoom-hide"),bt(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,g,S){kn(this._mapPane,new W(0,0));var O=!this._loaded;this._loaded=!0,g=this._limitZoom(g),this.fire("viewprereset");var D=this._zoom!==g;this._moveStart(D,S)._move(u,g)._moveEnd(D),this.fire("viewreset"),O&&this.fire("load")},_moveStart:function(u,g){return u&&this.fire("zoomstart"),g||this.fire("movestart"),this},_move:function(u,g,S,O){g===void 0&&(g=this._zoom);var D=this._zoom!==g;return this._zoom=g,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),O?S&&S.pinch&&this.fire("zoom",S):((D||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return U(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){kn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[d(this._container)]=this;var g=u?rn:gt;g(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&g(window,"resize",this._onResize,this),at.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){U(this._resizeRequest),this._resizeRequest=H(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,g){for(var S=[],O,D=g==="mouseout"||g==="mouseover",B=u.target||u.srcElement,te=!1;B;){if(O=this._targets[d(B)],O&&(g==="click"||g==="preclick")&&this._draggableMoved(O)){te=!0;break}if(O&&O.listens(g,!0)&&(D&&!cc(B,u)||(S.push(O),D))||B===this._container)break;B=B.parentNode}return!S.length&&!te&&!D&&this.listens(g,!0)&&(S=[this]),S},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var g=u.target||u.srcElement;if(!(!this._loaded||g._leaflet_disable_events||u.type==="click"&&this._isCl
1027ickDisabled(g))){var S=u.type;S==="mousedown"&&Do(g),this._fireDOMEvent(u,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,g,S){if(u.type==="click"){var O=i({},u);O.type="preclick",this._fireDOMEvent(O,O.type,S)}var D=this._findEventTargets(u,g);if(S){for(var B=[],te=0;te<S.length;te++)S[te].listens(g,!0)&&B.push(S[te]);D=B.concat(D)}if(D.length){g==="contextmenu"&&Nn(u);var pe=D[0],xe={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Ae=pe.getLatLng&&(!pe._radius||pe._radius<=10);xe.containerPoint=Ae?this.latLngToContainerPoint(pe.getLatLng()):this.mouseEventToContainerPoint(u),xe.layerPoint=this.containerPointToLayerPoint(xe.containerPoint),xe.latlng=Ae?pe.getLatLng():this.layerPointToLatLng(xe.layerPoint)}for(te=0;te<D.length;te++)if(D[te].fire(g,xe,!0),xe.originalEvent._stopped||D[te].options.bubblingMouseEvents===!1&&A(this._mouseEvents,g)!==-1)return}},_draggableMoved:function(u){return u=u.dragging&&u.dragging.enabled()?u:this,u.dragging&&u.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var u=0,g=this._handlers.length;u<g;u++)this._handlers[u].disable()},whenReady:function(u,g){return this._loaded?u.call(g||this,{target:this}):this.on("load",u,g),this},_getMapPanePos:function(){return va(this._mapPane)||new W(0,0)},_moved:function(){var u=this._getMapPanePos();return u&&!u.equals([0,0])},_getTopLeftPoint:function(u,g){var S=u&&g!==void 0?this._getNewPixelOrigin(u,g):this.getPixelOrigin();return S.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(u,g){var S=this.getSize()._divideBy(2);return this.project(u,g)._subtract(S)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(u,g,S){var O=this._getNewPixelOrigin(S,g);return this.project(u,g)._subtract(O)},_latLngBoundsToNewLayerBounds:function(u,g,S){var O=this._getNewPixelOrigin(S,g);
vendor: 12,054 bytes, line 1027
1027return ne([this.project(u.getSouthWest(),g)._subtract(O),this.project(u.getNorthWest(),g)._subtract(O),this.project(u.getSouthEast(),g)._subtract(O),this.project(u.getNorthEast(),g)._subtract(O)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(u){return this.latLngToLayerPoint(u).subtract(this._getCenterLayerPoint())},_limitCenter:function(u,g,S){if(!S)return u;var O=this.project(u,g),D=this.getSize().divideBy(2),B=new K(O.subtract(D),O.add(D)),te=this._getBoundsOffset(B,S,g);return Math.abs(te.x)<=1&&Math.abs(te.y)<=1?u:this.unproject(O.add(te),g)},_limitOffset:function(u,g){if(!g)return u;var S=this.getPixelBounds(),O=new K(S.min.add(u),S.max.add(u));return u.add(this._getBoundsOffset(O,g))},_getBoundsOffset:function(u,g,S){var O=ne(this.project(g.getNorthEast(),S),this.project(g.getSouthWest(),S)),D=O.min.subtract(u.min),B=O.max.subtract(u.max),te=this._rebound(D.x,-B.x),pe=this._rebound(D.y,-B.y);return new W(te,pe)},_rebound:function(u,g){return u+g>0?Math.round(u-g)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(g))},_limitZoom:function(u){var g=this.getMinZoom(),S=this.getMaxZoom(),O=at.any3d?this.options.zoomSnap:1;return O&&(u=Math.round(u/O)*O),Math.max(g,Math.min(S,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){hn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,g){var S=this._getCenterOffset(u)._trunc();return(g&&g.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,g),!0)},_createAnimProxy:function(){var u=this._proxy=wt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(g){var S=yh,O=this._proxy.style[S];yi(this._proxy,this.project(g.center,g.zoom),this.getZoomScale(g.zoom,1)),O===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){xn(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),g=this.getZoom();yi(this._proxy,this.project(u,g),this.getZoomScale(g,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,g,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(g-this._zoom)>this.options.zoomAnimationThreshold)return!1;var O=this.getZoomScale(g),D=this._getCenterOffset(u)._divideBy(1-1/O);return S.animate!==!0&&!this.getSize().contains(D)?!1:(H(function(){this._moveStart(!0,S.noMoveStart||!1)._animateZoom(u,g,!0)},this),!0)},_animateZoom:function(u,g,S,O){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=g,bt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:g,noUpdate:O}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&hn(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ga(u,g){return new Mt(u,g)}var zr=Z.extend({options:{position:"topright"},initialize:function(u){b(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var g=this._map;return g&&g.removeControl(this),this.options.position=u,g&&g.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var g=this._container=this.onAdd(u),S=this.getPosition(),O=u._controlCorners[S];return bt(g,"leaflet-control"),S.indexOf("bottom")!==-1?O.insertBefore(g,O.firstChild):O.appendChild(g),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(xn(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),Za=function(u){return new zr(u)};Mt.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},g="leaflet-",S=this._controlContainer=wt("div",g+"control-container",this._container);function O(D,B){var te=g+D+" "+g+B;u[D+B]=wt("div",te,S)}O("top","left"),O("top","right"),O("bottom","left"),O("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)xn(this._controlCorners[u]);xn(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var _h=zr.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,g,S,O){return S<O?-1:O<S?1:0}},initialize:function(u,g,S){b(this,S),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var O in u)this._addLayer(u[O],O);for(O in g)this._addLayer(g[O],O,!0)},onAdd:function(u){this._initLayout(),this._update(),this._map=u,u.on("zoomend",this._checkDisabledLayers,this);for(var g=0;g<this._layers.length;g++)this._layers[g].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(u){return zr.prototype.addTo.call(this,u),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var u=0;u<this._layers.length;u++)this._layers[u].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(u,g){return this._addLayer(u,g),this._map?this._update():this},addOverlay:function(u,g){return this._addLayer(u,g,!0),this._map?this._update():this},removeLayer:function(u){u.off("add remove",this._onLayerChange,this);var g=this._getLayer(d(u));return g&&this._layers.splice(this._layers.indexOf(g),1),this._map?this._update():this},expand:function(){bt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var u=this._map.getSize().y-(this._container.offsetTop+50);return u<this._section.clientHeight?(bt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=u+"px"):hn(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return hn(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var u="leaflet-control-layers",g=this._container=wt("div",u),S=this.options.collapsed;g.setAttribute("aria-haspopup",!0),oc(g),Zu(g);var O=this._section=wt("section",u+"-list");S&&(this._map.on("click",this.collapse,this),gt(g,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var D=this._layersLink=wt("a",u+"-toggle",g);D.href="#",D.title="Layers",D.setAttribute("role","button"),gt(D,{keydown:function(B){B.keyCode===13&&this._expandSafely()},click:function(B){Nn(B),this._expandSafely()}},this),S||this.expand(),this._baseLayersList=wt("div",u+"-base",O),this._separator=wt("div",u+"-separator",O),this._overlaysList=wt("div",u+"-overlays",O),g.appendChild(O)},_getLayer:function(u){for(var g=0;g<this._layers.length;g++)if(this._layers[g]&&d(this._layers[g].layer)===u)return this._layers[g]},_addLayer:function(u,g,S){this._map&&u.on("add remove",this._onLayerChange,this),this._layers.push({layer:u,name:g,overlay:S}),this.options.sortLayers&&this._layers.sort(o(function(O,D){return this.options.sortFunction(O.layer,D.layer,O.name,D.name)},this)),this.options.autoZIndex&&u.setZIndex&&(this._lastZIndex++,u.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;qu(this._baseLayersList),qu(this._overlaysList),this._layerControlInputs=[];var u,g,S,O,D=0;for(S=0;S<this._layers.length;S++)O=this._layers[S],this._addItem(O),g=g||O.overlay,u=u||!O.overlay,D+=O.overlay?0:1;return this.options.hideSingleBase&&(u=u&&D>1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=g&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var g=this._getLayer(d(u.target)),S=g.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;S&&this._map.fire(S,g)},_createRadioElement:function(u,g){var S='<input type="radio" class="leaflet-control-layers-selector" name="'+u+'"'+(g?' checked="checked"':"")+"/>",O=document.createElement("div");return O.innerHTML=S,O.firstChild},_addItem:function(u){var g=document.createElement("label"),S=this._map.hasLayer(u.layer),O;u.overlay?(O=document.createElement("input"),O.type="checkbox",O.className="leaflet-control-layers-selector",O.defaultChecked=S):O=this._createRadioElement("leaflet-base-layers_"+d(this),S),this._layerControlInputs.push(O),O.layerId=d(u.layer),gt(O,"click",this._onInputClick,this);var D=document.createElement("span");D.innerHTML=" "+u.name;var B=document.createElement("span");g.appendChild(B),B.appendChild(O),B.appendChild(D);var te=u.overlay?this._overlaysList:this._baseLayersList;return te.appendChild(g),this._checkDisabledLayers(),g},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,g,S,O=[],D=[];this._handlingClick=!0;for(var B=u.length-1;B>=0;B--)g=u[B],S=this._getLayer(g.layerId).layer,g.checked?O.push(S):g.checked||D.push(S);for(B=0;B<D.length;B++)this._map.hasLayer(D[B])&&this._map.removeLayer(D[B]);for(B=0;B<O.length;B++)this._map.hasLayer(O[B])||this._map.addLayer(O[B]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var u=this._layerControlInputs,g,S,O=this._map.getZoom(),D=u.length-1;D>=0;D--)g=u[D],S=this._getLayer(g.layerId).layer,g.disabled=S.options.minZoom!==void 0&&O<S.options.minZoom||S.options.maxZoom!==void 0&&O>S.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,gt(u,"click",Nn),this.expand();var g=this;setTimeout(function(){rn(u,"click",Nn),g._preventClick=!1})}}),Qu=function(u,g,S){return new _h(u,g,S)},$o=zr.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(u){var g="leaflet-control-zoom",S=wt("div",g+" leaflet-bar"),O=this.options;return this._zoomInButton=this._createButton(O.zoomInText,O.zoomInTitle,g+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(O.zoomOutText,O.zoomOutTitle,g+"-out",S,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(u.shiftKey?3:1))},_zoomOut:function(u){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,g,S,O,D){var B=wt("a",S,O);return B.innerHTML=u,B.href="#",B.title=g,B.setAttribute("role","button"),B.setAttribute("aria-label",g),oc(B),gt(B,"click",xi),gt(B,"click",D,this),gt(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var u=this._map,g="leaflet-disabled";hn(this._zoomInButton,g),hn(this._zoomOutButton,g),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMin
1027Zoom())&&(bt(this._zoomOutButton,g),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(bt(this._zoomInButton,g),this._zoomInButton.setAttribute("aria-disabled","true"))}});Mt.mergeOptions({zoomControl:!0}),Mt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $o,this.addControl(this.zoomControl))});var Cg=function(u){return new $o(u)},Er=zr.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var g="leaflet-control-scale",S=wt("div",g),O=this.options;return this._addScales(O,g+"-line",S),u.on(O.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),S},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,g,S){u.metric&&(this._mScale=wt("div",g,S)),u.imperial&&(this._iScale=wt("div",g,S))},_update:function(){var u=this._map,g=u.getSize().y/2,S=u.distance(u.containerPointToLatLng([0,g]),u.containerPointToLatLng([this.options.maxWidth,g]));this._updateScales(S)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var g=this._getRoundNum(u),S=g<1e3?g+" m":g/1e3+" km";this._updateScale(this._mScale,S,g/u)},_updateImperial:function(u){var g=u*3.2808399,S,O,D;g>5280?(S=g/5280,O=this._getRoundNum(S),this._updateScale(this._iScale,O+" mi",O/S)):(D=this._getRoundNum(g),this._updateScale(this._iScale,D+" ft",D/g))},_updateScale:function(u,g,S){u.style.width=Math.round(this.options.maxWidth*S)+"px",u.innerHTML=g},_getRoundNum:function(u){var g=Math.pow(10,(Math.floor(u)+"").length-1),S=u/g;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,g*S}}),Fo=function(u){return new Er(u)},wh='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ds=zr.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(at.inlineSvg?wh+" ":"")+"Leaflet</a>"},initialize:function(u){b(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=wt("div","leaflet-control-attribution"),oc(this._container);for(var g in u._layers)u._layers[g].getAttribution&&this.addAttribution(u._layers[g].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var g in this._attributions)this._attributions[g]&&u.push(g);var S=[];this.options.prefix&&S.push(this.options.prefix),u.length&&S.push(u.join(", ")),this._container.innerHTML=S.join(' <span aria-hidden="true">|</span> ')}}});Mt.mergeOptions({attributionControl:!0}),Mt.addInitHook(function(){this.options.attributionControl&&new Ds().addTo(this)});var Tb=function(u){return new Ds(u)};zr.Layers=_h,zr.Zoom=$o,zr.Scale=Er,zr.Attribution=Ds,Za.layers=Qu,Za.zoom=Cg,Za.scale=Fo,Za.attribution=Tb;var Jr=Z.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Jr.addTo=function(u,g){return u.addHandler(g,this),this};var jh={Events:G},Bo=at.touch?"touchstart mousedown":"mousedown",bi=oe.extend({options:{clickTolerance:3},initialize:function(u,g,S,O){b(this,O),this._element=u,this._dragStartTarget=g||u,this._preventOutline=S},enable:function(){this._enabled||(gt(this._dragStartTarget,Bo,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),rn(this._dragStartTarget,Bo,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Ro(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){bi._dragging===this&&this.finishDrag();return}if(!(bi._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(bi._dragging=this,this._preventOutline&&Do(this._element),Vu(),Rt(),!this._moving)){this.fire("down");var g=u.touches?u.touches[0]:u,S=xa(this._element);this._startPoint=new W(g.clientX,g.clientY),this._startPos=va(this._element),this._parentScale=Ui(S);var O=u.type==="mousedown";gt(document,O?"mousemove":"touchmove",this._onMove,this),gt(document,O?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var g=u.touches&&u.touches.length===1?u.touches[0]:u,S=new W(g.clientX,g.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)<this.options.clickTolerance||(S.x/=this._parentScale.x,S.y/=this._parentScale.y,Nn(u),this._moved||(this.fire("dragstart"),this._moved=!0,bt(document.body,"leaflet-dragging"),this._lastTarget=u.target||u.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),bt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(S),this._moving=!0,this._lastEvent=u,this._updatePosition())}},_updatePosition:function(){var u={originalEvent:this._lastEvent};this.fire("predrag",u),kn(this._element,this._newPos),this.fire("drag",u)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(u){hn(document.body,"leaflet-dragging"),this._lastTarget&&(hn(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),rn(document,"mousemove touchmove",this._onMove,this),rn(document,"mouseup touchend touchcancel",this._onUp,this),Ku(),Lo();var g=this._moved&&this._moving;this._moving=!1,bi._dragging=!1,g&&this.fire("dragend",{noInertia:u,distance:this._newPos.distanceTo(this._startPos)})}});function Sh(u,g,S){var O,D=[1,4,2,8],B,te,pe,xe,Ae,Ve,ut,Nt;for(B=0,Ve=u.length;B<Ve;B++)u[B]._code=$s(u[B],g);for(pe=0;pe<4;pe++){for(ut=D[pe],O=[],B=0,Ve=u.length,te=Ve-1;B<Ve;te=B++)xe=u[B],Ae=u[te],xe._code&ut?Ae._code&ut||(Nt=ed(Ae,xe,ut,g,S),Nt._code=$s(Nt,g),O.push(Nt)):(Ae._code&ut&&(Nt=ed(Ae,xe,ut,g,S),Nt._code=$s(Nt,g),O.push(Nt)),O.push(xe));u=O}return u}function Eg(u,g){var S,O,D,B,te,pe,xe,Ae,Ve;if(!u||u.length===0)throw new Error("latlngs not passed");ei(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var ut=he([0,0]),Nt=je(u),Vn=Nt.getNorthWest().distanceTo(Nt.getSouthWest
1027())*Nt.getNorthEast().distanceTo(Nt.getNorthWest());Vn<1700&&(ut=Nh(u));var Dn=u.length,qr=[];for(S=0;S<Dn;S++){var Pr=he(u[S]);qr.push(g.project(he([Pr.lat-ut.lat,Pr.lng-ut.lng])))}for(pe=xe=Ae=0,S=0,O=Dn-1;S<Dn;O=S++)D=qr[S],B=qr[O],te=D.y*B.x-B.y*D.x,xe+=(D.x+B.x)*te,Ae+=(D.y+B.y)*te,pe+=te*3;pe===0?Ve=qr[0]:Ve=[xe/pe,Ae/pe];var Yo=g.unproject(ae(Ve));return he([Yo.lat+ut.lat,Yo.lng+ut.lng])}function Nh(u){for(var g=0,S=0,O=0,D=0;D<u.length;D++){var B=he(u[D]);g+=B.lat,S+=B.lng,O++}return he([g/O,S/O])}var Mb={__proto__:null,clipPolygon:Sh,polygonCenter:Eg,centroid:Nh};function Ju(u,g){if(!g||!u.length)return u.slice();var S=g*g;return u=Lb(u,S),u=Ib(u,S),u}function Pg(u,g,S){return Math.sqrt(Fs(u,g,S,!0))}function Rb(u,g,S){return Fs(u,g,S)}function Ib(u,g){var S=u.length,O=typeof Uint8Array<"u"?Uint8Array:Array,D=new O(S);D[0]=D[S-1]=1,Ch(u,D,g,0,S-1);var B,te=[];for(B=0;B<S;B++)D[B]&&te.push(u[B]);return te}function Ch(u,g,S,O,D){var B=0,te,pe,xe;for(pe=O+1;pe<=D-1;pe++)xe=Fs(u[pe],u[O],u[D],!0),xe>B&&(te=pe,B=xe);B>S&&(g[te]=1,Ch(u,g,S,O,te),Ch(u,g,S,te,D))}function Lb(u,g){for(var S=[u[0]],O=1,D=0,B=u.length;O<B;O++)Db(u[O],u[D])>g&&(S.push(u[O]),D=O);return D<B-1&&S.push(u[B-1]),S}var Eh;function kg(u,g,S,O,D){var B=O?Eh:$s(u,S),te=$s(g,S),pe,xe,Ae;for(Eh=te;;){if(!(B|te))return[u,g];if(B&te)return!1;pe=B||te,xe=ed(u,g,pe,S,D),Ae=$s(xe,S),pe===B?(u=xe,B=Ae):(g=xe,te=Ae)}}function ed(u,g,S,O,D){var B=g.x-u.x,te=g.y-u.y,pe=O.min,xe=O.max,Ae,Ve;return S&8?(Ae=u.x+B*(xe.y-u.y)/te,Ve=xe.y):S&4?(Ae=u.x+B*(pe.y-u.y)/te,Ve=pe.y):S&2?(Ae=xe.x,Ve=u.y+te*(xe.x-u.x)/B):S&1&&(Ae=pe.x,Ve=u.y+te*(pe.x-u.x)/B),new W(Ae,Ve,D)}function $s(u,g){var S=0;return u.x<g.min.x?S|=1:u.x>g.max.x&&(S|=2),u.y<g.min.y?S|=4:u.y>g.max.y&&(S|=8),S}function Db(u,g){var S=g.x-u.x,O=g.y-u.y;return S*S+O*O}function Fs(u,g,S,O){var D=g.x,B=g.y,te=S.x-D,pe=S.y-B,xe=te*te+pe*pe,Ae;return xe>0&&(Ae=((u.x-D)*te+(u.y-B)*pe)/xe,Ae>1?(D=S.x,B=S.y):Ae>0&&(D+=te*Ae,B+=pe*Ae)),te=u.x-D,pe=u.y-B,O?te*te+pe*pe:new W(D,B)}function ei(u){return!E(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function Ag(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ei(u)}function Og(u,g){var S,O,D,B,te,pe,xe,Ae;if(!u||u.length===0)throw new Error("latlngs not passed");ei(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ve=he([0,0]),ut=je(u),Nt=ut.getNorthWest().distanceTo(ut.getSouthWest
1027())*ut.getNorthEast().distanceTo(ut.getNorthWest());Nt<1700&&(Ve=Nh(u));var Vn=u.length,Dn=[];for(S=0;S<Vn;S++){var qr=he(u[S]);Dn.push(g.project(he([qr.lat-Ve.lat,qr.lng-Ve.lng])))}for(S=0,O=0;S<Vn-1;S++)O+=Dn[S].distanceTo(Dn[S+1])/2;if(O===0)Ae=Dn[0];else for(S=0,B=0;S<Vn-1;S++)if(te=Dn[S],pe=Dn[S+1],D=te.distanceTo(pe),B+=D,B>O){xe=(B-O)/D,Ae=[pe.x-xe*(pe.x-te.x),pe.y-xe*(pe.y-te.y)];break}var Pr=g.unproject(ae(Ae));return he([Pr.lat+Ve.lat,Pr.lng+Ve.lng])}var Tg={__proto__:null,simplify:Ju,pointToSegmentDistance:Pg,closestPointOnSegment:Rb,clipSegment:kg,_getEdgeIntersection:ed,_getBitCode:$s,_sqClosestPointOnSegment:Fs,isFlat:ei,_flat:Ag,polylineCenter:Og},Ph={project:function(u){return new W(u.lng,u.lat)},unproject:function(u){return new Y(u.y,u.x)},bounds:new K([-180,-90],[180,90])},kh={R:6378137,R_MINOR:6356752314245179e-9,bounds:new K([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var g=Math.PI/180,S=this.R,O=u.lat*g,D=this.R_MINOR/S,B=Math.sqrt(1-D*D),te=B*Math.sin(O),pe=Math.tan(Math.PI/4-O/2)/Math.pow((1-te)/(1+te),B/2);return O=-S*Math.log(Math.max(pe,1e-10)),new W(u.lng*g*S,O)},unproject:function(u){for(var g=180/Math.PI,S=this.R,O=this.R_MINOR/S,D=Math.sqrt(1-O*O),B=Math.exp(-u.y/S),te=Math.PI/2-2*Math.atan(B),pe=0,xe=.1,Ae;pe<15&&Math.abs(xe)>1e-7;pe++)Ae=D*Math.sin(te),Ae=Math.pow((1-Ae)/(1+Ae),D/2),xe=Math.PI/2-2*Math.atan(B*Ae)-te,te+=xe;return new Y(te*g,u.x*g/S)}},$b={__proto__:null,LonLat:Ph,Mercator:kh,SphericalMercator:we},Fb=i({},_e,{code:"EPSG:3395",projection:kh,transformation:(function(){var u=.5/(Math.PI*kh.R);return re(u,.5,-u,.5)})()}),Mg=i({},_e,{code:"EPSG:4326",projection:Ph,transformation:re(1/180,1,-1/180,.5)}),Bb=i({},fe,{projection:Ph,transformation:re(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,g){var S=g.lng-u.lng,O=g.lat-u.lat;return Math.sqrt(S*S+O*O)},infinite:!0});fe.Earth=_e,fe.EPSG3395=Fb,fe.EPSG3857=Re,fe.EPSG900913=ge,fe.EPSG4326=Mg,fe.Simple=Bb;var _i=oe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[d(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[d(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var g=u.target;if(g.hasLayer(this)){if(this._map=g,this._zoomAnimated=g._zoomAnimated,this.getEvents){var S=this.getEvents();g.on(S,this),this.once("remove",function(){g.off(S,this)},this)}this.onAdd(g),this.fire("add"),g.fire("layeradd",{layer:this})}}});Mt.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var g=d(u);return this._layers[g]?this:(this._layers[g]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var g=d(u);return this._layers[g]?(this._loaded&&u.onRemove(this),delete this._layers[g],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return d(u)in this._layers},eachLayer:function(u,g){for(var S in this._layers)u.call(g,this._layers[S]);return this},_addLayers:function(u){u=u?E(u)?u:[u]:[];for(var g=0,S=u.length;g<S;g++)this.addLayer(u[g])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[d(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var g=d(u);this._zoomBoundLayers[g]&&(delete this._zoomBoundLayers[g],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,g=-1/0,S=this._getZoomSpan();for(var O in this._zoomBoundLayers){var D=this._zoomBoundLayers[O].options;u=D.minZoom===void 0?u:Math.min(u,D.minZoom),g=D.maxZoom===void 0?g:Math.max(g,D.maxZoom)}
vendor: 10,766 bytes, line 1027
1027this._layersMaxZoom=g===-1/0?void 0:g,this._layersMinZoom=u===1/0?void 0:u,S!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Ya=_i.extend({initialize:function(u,g){b(this,g),this._layers={};var S,O;if(u)for(S=0,O=u.length;S<O;S++)this.addLayer(u[S])},addLayer:function(u){var g=this.getLayerId(u);return this._layers[g]=u,this._map&&this._map.addLayer(u),this},removeLayer:function(u){var g=u in this._layers?u:this.getLayerId(u);return this._map&&this._layers[g]&&this._map.removeLayer(this._layers[g]),delete this._layers[g],this},hasLayer:function(u){var g=typeof u=="number"?u:this.getLayerId(u);return g in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(u){var g=Array.prototype.slice.call(arguments,1),S,O;for(S in this._layers)O=this._layers[S],O[u]&&O[u].apply(O,g);return this},onAdd:function(u){this.eachLayer(u.addLayer,u)},onRemove:function(u){this.eachLayer(u.removeLayer,u)},eachLayer:function(u,g){for(var S in this._layers)u.call(g,this._layers[S]);return this},getLayer:function(u){return this._layers[u]},getLayers:function(){var u=[];return this.eachLayer(u.push,u),u},setZIndex:function(u){return this.invoke("setZIndex",u)},getLayerId:function(u){return d(u)}}),uc=function(u,g){return new Ya(u,g)},ba=Ya.extend({addLayer:function(u){return this.hasLayer(u)?this:(u.addEventParent(this),Ya.prototype.addLayer.call(this,u),this.fire("layeradd",{layer:u}))},removeLayer:function(u){return this.hasLayer(u)?(u in this._layers&&(u=this._layers[u]),u.removeEventParent(this),Ya.prototype.removeLayer.call(this,u),this.fire("layerremove",{layer:u})):this},setStyle:function(u){return this.invoke("setStyle",u)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var u=new ve;for(var g in this._layers){var S=this._layers[g];u.extend(S.getBounds?S.getBounds():S.getLatLng())}return u}}),Rg=function(u,g){return new ba(u,g)},Bs=Z.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(u){b(this,u)},createIcon:function(u){return this._createIcon("icon",u)},createShadow:function(u){return this._createIcon("shadow",u)},_createIcon:function(u,g){var S=this._getIconUrl(u);if(!S){if(u==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var O=this._createImg(S,g&&g.tagName==="IMG"?g:null);return this._setIconStyles(O,u),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),O},_setIconStyles:function(u,g){var S=this.options,O=S[g+"Size"];typeof O=="number"&&(O=[O,O]);var D=ae(O),B=ae(g==="shadow"&&S.shadowAnchor||S.iconAnchor||D&&D.divideBy(2,!0));u.className="leaflet-marker-"+g+" "+(S.className||""),B&&(u.style.marginLeft=-B.x+"px",u.style.marginTop=-B.y+"px"),D&&(u.style.width=D.x+"px",u.style.height=D.y+"px")},_createImg:function(u,g){return g=g||document.createElement("img"),g.src=u,g},_getIconUrl:function(u){return at.retina&&this.options[u+"RetinaUrl"]||this.options[u+"Url"]}});function Ig(u){return new Bs(u)}var zo=Bs.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(u){return typeof zo.imagePath!="string"&&(zo.imagePath=this._detectIconPath()),(this.options.imagePath||zo.imagePath)+Bs.prototype._getIconUrl.call(this,u)},_stripUrl:function(u){var g=function(S,O,D){var B=O.exec(S);return B&&B[D]};return u=g(u,/^url\((['"])?(.+)\1\)$/,2),u&&g(u,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var u=wt("div","leaflet-default-icon-path",document.body),g=rc(u,"background-image")||rc(u,"backgroundImage");if(document.body.removeChild(u),g=this._stripUrl(g),g)return g;var S=document.querySelector('link[href$="leaflet.css"]');return S?S.href.substring(0,S.href.length-11-1):""}}),Ah=Jr.extend({initialize:function(u){this._marker=u},addHooks:function(){var u=this._marker._icon;this._draggable||(this._draggable=new bi(u,u,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),bt(u,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&hn(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(u){var g=this._marker,S=g._map,O=this._marker.options.autoPanSpeed,D=this._marker.options.autoPanPadding,B=va(g._icon),te=S.getPixelBounds(),pe=S.getPixelOrigin(),xe=ne(te.min._subtract(pe).add(D),te.max._subtract(pe).subtract(D));if(!xe.contains(B)){var Ae=ae((Math.max(xe.max.x,B.x)-xe.max.x)/(te.max.x-xe.max.x)-(Math.min(xe.min.x,B.x)-xe.min.x)/(te.min.x-xe.min.x),(Math.max(xe.max.y,B.y)-xe.max.y)/(te.max.y-xe.max.y)-(Math.min(xe.min.y,B.y)-xe.min.y)/(te.min.y-xe.min.y)).multiplyBy(O);S.panBy(Ae,{animate:!1}),this._draggable._newPos._add(Ae),this._draggable._startPos._add(Ae),kn(g._icon,this._draggable._newPos),this._onDrag(u),this._panRequest=H(this._adjustPan.bind(this,u))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(u){this._marker.options.autoPan&&(U(this._panRequest),this._panRequest=H(this._adjustPan.bind(this,u)))},_onDrag:function(u){var g=this._marker,S=g._shadow,O=va(g._icon),D=g._map.layerPointToLatLng(O);S&&kn(S,O),g._latlng=D,u.latlng=D,u.oldLatLng=this._oldLatLng,g.fire("move",u).fire("drag",u)},_onDragEnd:function(u){U(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",u)}}),_a=_i.extend({options:{icon:new zo,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(u,g){b(this,g),this._latlng=he(u)},onAdd:function(u){this._zoomAnimated=this._zoomAnimated&&u.options.markerZoomAnimation,this._zoomAnimated&&u.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(u){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&u.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(u){var g=this._latlng;return this._latlng=he(u),this.update(),this.fire("move",{oldLatLng:g,latlng:this._latlng})},setZIndexOffset:function(u){return this.options.zIndexOffset=u,this.update()},getIcon:function(){return this.options.icon},setIcon:function(u){return this.options.icon=u,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var u=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(u)}return this},_initIcon:function(){var u=this.options,g="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),S=u.icon.createIcon(this._icon),O=!1;S!==this._icon&&(this._icon&&this._removeIcon(),O=!0,u.title&&(S.title=u.title),S.tagName==="IMG"&&(S.alt=u.alt||"")),bt(S,g),u.keyboard&&(S.tabIndex="0",S.setAttribute("role","button")),this._icon=S,u.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&gt(S,"focus",this._panOnFocus,this);var D=u.icon.createShadow(this._shadow),B=!1;D!==this._shadow&&(this._removeShadow(),B=!0),D&&(bt(D,g),D.alt=""),this._shadow=D,u.opacity<1&&this._updateOpacity(),O&&this.getPane().appendChild(this._icon),this._initInteraction(),D&&B&&this.getPane(u.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&rn(this._icon,"focus",this._panOnFocus,this),xn(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&xn(this._shadow),this._shadow=null},_setPos:function(u){this._icon&&kn(this._icon,u),this._shadow&&kn(this._shadow,u),this._zIndex=u.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(u){this._icon&&(this._icon.style.zIndex=this._zIndex+u)},_animateZoom:function(u){var g=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center).round();this._setPos(g)},_initInteraction:function(){if(this.options.interactive&&(bt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ah)){var u=this.options.draggable;this.dragging&&(u=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ah(this),u&&this.dragging.enable()}},setOpacity:function(u){return this.options.opacity=u,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var u=this.options.opacity;this._icon&&Cr(this._icon,u),this._shadow&&Cr(this._shadow,u)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var u=this._map;if(u){var g=this.options.icon.options,S=g.iconSize?ae(g.iconSize):ae(0,0),O=g.iconAnchor?ae(g.iconAnchor):ae(0,0);u.panInside(this._latlng,{paddingTopLeft:O,paddingBottomRight:S.subtract(O)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function zb(u,g){return new _a(u,g)}var Xa=_i.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(u){this._renderer=u.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(u){return b(this,u),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&u&&Object.prototype.hasOwnProperty.call(u,"
1027weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),td=Xa.extend({options:{fill:!0,radius:10},initialize:function(u,g){b(this,g),this._latlng=he(u),this._radius=this.options.radius},setLatLng:function(u){var g=this._latlng;return this._latlng=he(u),this.redraw(),this.fire("move",{oldLatLng:g,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(u){return this.options.radius=this._radius=u,this.redraw()},getRadius:function(){return this._radius},setStyle:function(u){var g=u&&u.radius||this._radius;return Xa.prototype.setStyle.call(this,u),this.setRadius(g),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var u=this._radius,g=this._radiusY||u,S=this._clickTolerance(),O=[u+S,g+S];this._pxBounds=new K(this._point.subtract(O),this._point.add(O))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(u){return u.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Lg(u,g){return new td(u,g)}var nd=td.extend({initialize:function(u,g,S){if(typeof g=="number"&&(g=i({},S,{radius:g})),b(this,g),this._latlng=he(u),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(u){return this._mRadius=u,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var u=[this._radius,this._radiusY||this._radius];return new ve(this._map.layerPointToLatLng(this._point.subtract(u)),this._map.layerPointToLatLng(this._point.add(u)))},setStyle:Xa.prototype.setStyle,_project:function(){var u=this._latlng.lng,g=this._latlng.lat,S=this._map,O=S.options.crs;if(O.distance===_e.distance){var D=Math.PI/180,B=this._mRadius/_e.R/D,te=S.project([g+B,u]),pe=S.project([g-B,u]),xe=te.add(pe).divideBy(2),Ae=S.unproject(xe).lat,Ve=Math.acos((Math.cos(B*D)-Math.sin(g*D)*Math.sin(Ae*D))/(Math.cos(g*D)*Math.cos(Ae*D)))/D;(isNaN(Ve)||Ve===0)&&(Ve=B/Math.cos(Math.PI/180*g)),this._point=xe.subtract(S.getPixelOrigin()),this._radius=isNaN(Ve)?0:xe.x-S.project([Ae,u-Ve]).x,this._radiusY=xe.y-te.y}else{var ut=O.unproject(O.project(this._latlng).subtract([this._mRadius,0]));this._point=S.latLngToLayerPoint(this._latlng),this._radius=this._point.x-S.latLngToLayerPoint(ut).x}this._updateBounds()}});function dc(u,g,S){return new nd(u,g,S)}var Ur=Xa.extend({options:{smoothFactor:1,noClip:!1},initialize:function(u,g){b(this,g),this._setLatLngs(u)},getLatLngs:function(){return this._latlngs},setLatLngs:function(u){return this._setLatLngs(u),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(u){for(var g=1/0,S=null,O=Fs,D,B,te=0,pe=this._parts.length;te<pe;te++)for(var xe=this._parts[te],Ae=1,Ve=xe.length;Ae<Ve;Ae++){D=xe[Ae-1],B=xe[Ae];var ut=O(u,D,B,!0);ut<g&&(g=ut,S=O(u,D,B))}return S&&(S.distance=Math.sqrt(g)),S}
1027,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Og(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(u,g){return g=g||this._defaultShape(),u=he(u),g.push(u),this._bounds.extend(u),this.redraw()},_setLatLngs:function(u){this._bounds=new ve,this._latlngs=this._convertLatLngs(u)},_defaultShape:function(){return ei(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(u){for(var g=[],S=ei(u),O=0,D=u.length;O<D;O++)S?(g[O]=he(u[O]),this._bounds.extend(g[O])):g[O]=this._convertLatLngs(u[O]);return g},_project:function(){var u=new K;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,u),this._bounds.isValid()&&u.isValid()&&(this._rawPxBounds=u,this._updateBounds())},_updateBounds:function(){var u=this._clickTolerance(),g=new W(u,u);this._rawPxBounds&&(this._pxBounds=new K([this._rawPxBounds.min.subtract(g),this._rawPxBounds.max.add(g)]))},_projectLatlngs:function(u,g,S){var O=u[0]instanceof Y,D=u.length,B,te;if(O){for(te=[],B=0;B<D;B++)te[B]=this._map.latLngToLayerPoint(u[B]),S.extend(te[B]);g.push(te)}else for(B=0;B<D;B++)this._projectLatlngs(u[B],g,S)},_clipPoints:function(){var u=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}var g=this._parts,S,O,D,B,te,pe,xe;for(S=0,D=0,B=this._rings.length;S<B;S++)for(xe=this._rings[S],O=0,te=xe.length;O<te-1;O++)pe=kg(xe[O],xe[O+1],u,O,!0),pe&&(g[D]=g[D]||[],g[D].push(pe[0]),(pe[1]!==xe[O+1]||O===te-2)&&(g[D].push(pe[1]),D++))}},_simplifyPoints:function(){for(var u=this._parts,g=this.options.smoothFactor,S=0,O=u.length;S<O;S++)u[S]=Ju(u[S],g)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(u,g){var S,O,D,B,te,pe,xe=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(S=0,B=this._parts.length;S<B;S++)for(pe=this._parts[S],O=0,te=pe.length,D=te-1;O<te;D=O++)if(!(!g&&O===0)&&Pg(u,pe[D],pe[O])<=xe)return!0;return!1}});function Ub(u,g){return new Ur(u,g)}Ur._flat=Ag;var wa=Ur.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
1027,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Eg(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(u){var g=Ur.prototype._convertLatLngs.call(this,u),S=g.length;return S>=2&&g[0]instanceof Y&&g[0].equals(g[S-1])&&g.pop(),g},_setLatLngs:function(u){Ur.prototype._setLatLngs.call(this,u),ei(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ei(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,g=this.options.weight,S=new W(g,g);if(u=new K(u.min.subtract(S),u.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var O=0,D=this._rings.length,B;O<D;O++)B=Sh(this._rings[O],u,!0),B.length&&this._parts.push(B)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(u){var g=!1,S,O,D,B,te,pe,xe,Ae;if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(B=0,xe=this._parts.length;B<xe;B++)for(S=this._parts[B],te=0,Ae=S.length,pe=Ae-1;te<Ae;pe=te++)O=S[te],D=S[pe],O.y>u.y!=D.y>u.y&&u.x<(D.x-O.x)*(u.y-O.y)/(D.y-O.y)+O.x&&(g=!g);return g||Ur.prototype._containsPoint.call(this,u,!0)}});function qb(u,g){return new wa(u,g)}var Hi=ba.extend({initialize:function(u,g){b(this,g),this._layers={},u&&this.addData(u)},addData:function(u){var g=E(u)?u:u.features,S,O,D;if(g){for(S=0,O=g.length;S<O;S++)D=g[S],(D.geometries||D.geometry||D.features||D.coordinates)&&this.addData(D);return this}var B=this.options;if(B.filter&&!B.filter(u))return this;var te=Uo(u,B);return te?(te.feature=od(u),te.defaultOptions=te.options,this.resetStyle(te),B.onEachFeature&&B.onEachFeature(u,te),this.addLayer(te)):this},resetStyle:function(u){return u===void 0?this.eachLayer(this.resetStyle,this):(u.options=i({},u.defaultOptions),this._setLayerStyle(u,this.options.style),this)},setStyle:function(u){return this.eachLayer(function(g){this._setLayerStyle(g,u)},this)},_setLayerStyle:function(u,g){u.setStyle&&(typeof g=="function"&&(g=g(u.feature)),u.setStyle(g))}});function Uo(u,g){var S=u.type==="Feature"?u.geometry:u,O=S?S.coordinates:null,D=[],B=g&&g.pointToLayer,te=g&&g.coordsToLatLng||id,pe,xe,Ae,Ve;if(!O&&!S)return null;switch(S.type){case"Point":return pe=te(O),rd(B,u,pe,g);case"MultiPoint":for(Ae=0,Ve=O.length;Ae<Ve;Ae++)pe=te(O[Ae]),D.push(rd(B,u,pe,g));return new ba(D);case"LineString":case"MultiLineString":return xe=fc(O,S.type==="LineString"?0:1,te),new Ur(xe,g);case"Polygon":case"MultiPolygon":return xe=fc(O,S.type==="Polygon"?1:2,te),new wa(xe,g);case"GeometryCollection":for(Ae=0,Ve=S.geometries.length;Ae<Ve;Ae++){var ut=Uo({geometry:S.geometries[Ae],type:"Feature",properties:u.properties},g);ut&&D.push(ut)}return new ba(D);case"FeatureCollection":for(Ae=0,Ve=S.features.length;Ae<Ve;Ae++){var Nt=Uo(S.features[Ae],g);Nt&&D.push(Nt)}return new ba(D);default:throw new Error("Invalid GeoJSON object.")}}function rd(u,g,S,O){return u?u(g,S):new _a(S,O&&O.markersInheritOptions&&O)}function id(u){return new Y(u[1],u[0],u[2])}function fc(u,g,S){for(var O=[],D=0,B=u.length,te;D<B;D++)te=g?fc(u[D],g-1,S):(S||id)(u[D]),O.push(te);return O}function ad(u,g){return u=he(u),u.alt!==void 0?[v(u.lng,g),v(u.lat,g),v(u.alt,g)]:[v(u.lng,g),v(u.lat,g)]}function sd(u,g,S,O){for(var D=[],B=0,te=u.length;B<te;B++)D.push(g?sd(u[B],ei(u[B])?0:g-1,S,O):ad(u[B],O));return!g&&S&&D.length>0&&D.push(D[0].slice()),D}function qo(u,g){return u.feature?i({},u.feature,{geometry:g}):od(g)}function od(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var Oh={toGeoJSON:function(u){return qo(this,{type:"Point",coordinates:ad(this.getLatLng(),u)})}};_a.include(Oh),nd.include(Oh),td.include(Oh),Ur.include({toGeoJSON:function(u){var g=!ei(this._latlngs),S=sd(this._latlngs,g?1:0,!1,u);return qo(this,{type:(g?"Multi":"")+"LineString",coordinates:S})}}),wa.include({toGeoJSON:function(u){var g=!ei(this._latlngs),S=g&&!ei(this._latlngs[0]),O=sd(this._latlngs,S?2:g?1:0,!0,u);return g||(O=[O]),qo(this,{type:(S?"Multi":"")+"Polygon",coordinates:O})}}),Ya.include({toMultiPoint:function(u){var g=[];return this.eachLayer(function(S){g.push(S.toGeoJSON(u).geometry.coordinates)}),qo(this,{type:"MultiPoint",coordinates:g})},toGeoJSON:function(u){var g=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(g==="MultiPoint")return this.toMultiPoint(u);var S=g==="GeometryCollection",O=[];return this.eachLayer(function(D){if(D.toGeoJSON){var B=D.toGeoJSON(u);if(S)O.push(B.geometry);else{var te=od(B);te.type==="FeatureCollection"?O.push.apply(O,te.features):O.push(te)}}}),S?qo(this,{geometries:O,type:"GeometryCollection"}):{type:"FeatureCollection",features:O}}});function Dg(u,g){return new Hi(u,g)}var wi=Dg,Qa=_i.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,g,S){this._url=u,this._bounds=je(g),b(this,S)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(bt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){xn(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Mo(this._image),this},bringToBack:function(){return this._map&&ya(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=je(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",g=this._image=u?this._url:wt("img");if(bt(g,"leaflet-image-layer"),this._zoomAnimated&&bt(g,"leaflet-zoom-animated"),this.options.className&&bt(g,this.options.className),g.onselectstart=m,g.onmousemove=m,g.onload=o(this.fire,this,"load"),g.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(g.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=g.src;return}g.src=this._url,g.alt=this.options.alt},_animateZoom:function(u){var g=this._map.getZoomScale(u.zoom),S=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;yi(this._image,S,g)},_reset:function(){var u=this._image,g=new K(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),S=g.getSize();kn(u,g.min),u.style.width=S.x+"px",u.style.height=S.y+"px"},_updateOpacity:function(){Cr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),$g=function(u,g,S){return new Qa(u,g,S)},Th=Qa.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
vendor: 19,618 bytes, line 1027
1027ine:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",g=this._image=u?this._url:wt("video");if(bt(g,"leaflet-image-layer"),this._zoomAnimated&&bt(g,"leaflet-zoom-animated"),this.options.className&&bt(g,this.options.className),g.onselectstart=m,g.onmousemove=m,g.onloadeddata=o(this.fire,this,"load"),u){for(var S=g.getElementsByTagName("source"),O=[],D=0;D<S.length;D++)O.push(S[D].src);this._url=S.length>0?O:[g.src];return}E(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(g.style,"objectFit")&&(g.style.objectFit="fill"),g.autoplay=!!this.options.autoplay,g.loop=!!this.options.loop,g.muted=!!this.options.muted,g.playsInline=!!this.options.playsInline;for(var B=0;B<this._url.length;B++){var te=wt("source");te.src=this._url[B],g.appendChild(te)}}});function Fg(u,g,S){return new Th(u,g,S)}var Mh=Qa.extend({_initImage:function(){var u=this._image=this._url;bt(u,"leaflet-image-layer"),this._zoomAnimated&&bt(u,"leaflet-zoom-animated"),this.options.className&&bt(u,this.options.className),u.onselectstart=m,u.onmousemove=m}});function Rh(u,g,S){return new Mh(u,g,S)}var Wi=_i.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(u,g){u&&(u instanceof Y||E(u))?(this._latlng=he(u),b(this,g)):(b(this,u),this._source=g),this.options.content&&(this._content=this.options.content)},openOn:function(u){return u=arguments.length?u:this._source._map,u.hasLayer(this)||u.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(u){return this._map?this.close():(arguments.length?this._source=u:u=this._source,this._prepareOpen(),this.openOn(u._map)),this},onAdd:function(u){this._zoomAnimated=u._zoomAnimated,this._container||this._initLayout(),u._fadeAnimated&&Cr(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),u._fadeAnimated&&Cr(this._container,1),this.bringToFront(),this.options.interactive&&(bt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(u){u._fadeAnimated?(Cr(this._container,0),this._removeTimeout=setTimeout(o(xn,void 0,this._container),200)):xn(this._container),this.options.interactive&&(hn(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(u){return this._latlng=he(u),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(u){return this._content=u,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var u={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Mo(this._container),this},bringToBack:function(){return this._map&&ya(this._container),this},_prepareOpen:function(u){var g=this._source;if(!g._map)return!1;if(g instanceof ba){g=null;var S=this._source._layers;for(var O in S)if(S[O]._map){g=S[O];break}if(!g)return!1;this._source=g}if(!u)if(g.getCenter)u=g.getCenter();else if(g.getLatLng)u=g.getLatLng();else if(g.getBounds)u=g.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(u),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var u=this._contentNode,g=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof g=="string")u.innerHTML=g;else{for(;u.hasChildNodes();)u.removeChild(u.firstChild);u.appendChild(g)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var u=this._map.latLngToLayerPoint(this._latlng),g=ae(this.options.offset),S=this._getAnchor();this._zoomAnimated?kn(this._container,u.add(S)):g=g.add(u).add(S);var O=this._containerBottom=-g.y,D=this._containerLeft=-Math.round(this._containerWidth/2)+g.x;this._container.style.bottom=O+"px",this._container.style.left=D+"px"}},_getAnchor:function(){return[0,0]}});Mt.include({_initOverlay:function(u,g,S,O){var D=g;return D instanceof u||(D=new u(O).setContent(g)),S&&D.setLatLng(S),D}}),_i.include({_initOverlay:function(u,g,S,O){var D=S;return D instanceof u?(b(D,O),D._source=this):(D=g&&!O?g:new u(O,this),D.setContent(S)),D}});var ld=Wi.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(u){return u=arguments.length?u:this._source._map,!u.hasLayer(this)&&u._popup&&u._popup.options.autoClose&&u.removeLayer(u._popup),u._popup=this,Wi.prototype.openOn.call(this,u)},onAdd:function(u){Wi.prototype.onAdd.call(this,u),u.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Xa||this._source.on("preclick",qi))},onRemove:function(u){Wi.prototype.onRemove.call(this,u),u.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Xa||this._source.off("preclick",qi))},getEvents:function(){var u=Wi.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(u.preclick=this.close),this.options.keepInView&&(u.moveend=this._adjustPan),u},_initLayout:function(){var u="leaflet-popup",g=this._container=wt("div",u+" "+(this.options.className||"")+" leaflet-zoom-animated"),S=this._wrapper=wt("div",u+"-content-wrapper",g);if(this._contentNode=wt("div",u+"-content",S),oc(g),Zu(this._contentNode),gt(g,"contextmenu",qi),this._tipContainer=wt("div",u+"-tip-container",g),this._tip=wt("div",u+"-tip",this._tipContainer),this.options.closeButton){var O=this._closeButton=wt("a",u+"-close-button",g);O.setAttribute("role","button"),O.setAttribute("aria-label","Close popup"),O.href="#close",O.innerHTML='<span aria-hidden="true">&#215;</span>',gt(O,"click",function(D){Nn(D),this.close()},this)}},_updateLayout:function(){var u=this._contentNode,g=u.style;g.width="",g.whiteSpace="nowrap";var S=u.offsetWidth;S=Math.min(S,this.options.maxWidth),S=Math.max(S,this.options.minWidth),g.width=S+1+"px",g.whiteSpace="",g.height="";var O=u.offsetHeight,D=this.options.maxHeight,B="leaflet-popup-scrolled";D&&O>D?(g.height=D+"px",bt(u,B)):hn(u,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var g=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),S=this._getAnchor();kn(this._container,g.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,g=parseInt(rc(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+g,O=this._containerWidth,D=new W(this._containerLeft,-S-this._containerBottom);D._add(va(this._container));var B=u.layerPointToContainerPoint(D),te=ae(this.options.autoPanPadding),pe=ae(this.options.autoPanPaddingTopLeft||te),xe=ae(this.options.autoPanPaddingBottomRight||te),Ae=u.getSize(),Ve=0,ut=0;B.x+O+xe.x>Ae.x&&(Ve=B.x+O-Ae.x+xe.x),B.x-Ve-pe.x<0&&(Ve=B.x-pe.x),B.y+S+xe.y>Ae.y&&(ut=B.y+S-Ae.y+xe.y),B.y-ut-pe.y<0&&(ut=B.y-pe.y),(Ve||ut)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ve,ut]))}},_getAnchor:function(){return ae(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ho=function(u,g){return new ld(u,g)};Mt.mergeOptions({closePopupOnClick:!0}),Mt.include({openPopup:function(u,g,S){return this._initOverlay(ld,u,g,S).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),_i.include({bindPopup:function(u,g){return this._popup=this._initOverlay(ld,this._popup,u,g),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof ba||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){xi(u);var g=u.layer||u.target;if(this._popup._source===g&&!(g instanceof Xa)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=g,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Wo=Wi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Wi.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Wi.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Wi.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",g=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=wt("div",g),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var g,S,O=this._map,D=this._container,B=O.latLngToContainerPoint(O.getCenter()),te=O.layerPointToContainerPoint(u),pe=this.options.direction,xe=D.offsetWidth,Ae=D.offsetHeight,Ve=ae(this.options.offset),ut=this._getAnchor();pe==="top"?(g=xe/2,S=Ae):pe==="bottom"?(g=xe/2,S=0):pe==="center"?(g=xe/2,S=Ae/2):pe==="right"?(g=0,S=Ae/2):pe==="left"?(g=xe,S=Ae/2):te.x<B.x?(pe="right",g=0,S=Ae/2):(pe="left",g=xe+(Ve.x+ut.x)*2,S=Ae/2),u=u.subtract(ae(g,S,!0)).add(Ve).add(ut),hn(D,"leaflet-tooltip-right"),hn(D,"leaflet-tooltip-left"),hn(D,"leaflet-tooltip-top"),hn(D,"leaflet-tooltip-bottom"),bt(D,"leaflet-tooltip-"+pe),kn(D,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Cr(this._container,u)},_animateZoom:function(u){var g=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(g)},_getAnchor:function(){return ae(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),hc=function(u,g){return new Wo(u,g)};Mt.include({openTooltip:function(u,g,S){return this._initOverlay(Wo,u,g,S).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),_i.include({bindTooltip:function(u,g){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Wo,this._tooltip,u,g),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var g=u?"off":"on",S={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?S.add=this._openTooltip:(S.mouseover=this._openTooltip,S.mouseout=this.closeTooltip,S.click=this._openTooltip,this._map?this._addFocusListeners():S.add=this._addFocusListeners),this._tooltip.options.sticky&&(S.mousemove=this._moveTooltip),this[g](S),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof ba||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var g=typeof u.getElement=="function"&&u.getElement();g&&(gt(g,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),gt(g,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var g=typeof u.getElement=="function"&&u.getElement();g&&g.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var g=this;this._map.once("moveend",function(){g._openOnceFlag=!1,g._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var g=u.latlng,S,O;this._tooltip.options.sticky&&u.originalEvent&&(S=this._map.mouseEventToContainerPoint(u.originalEvent),O=this._map.containerPointToLayerPoint(S),g=this._map.layerPointToLatLng(O)),this._tooltip.setLatLng(g)}});var cd=Bs.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var g=u&&u.tagName==="DIV"?u:document.createElement("div"),S=this.options;if(S.html instanceof Element?(qu(g),g.appendChild(S.html)):g.innerHTML=S.html!==!1?S.html:"",S.bgPos){var O=ae(S.bgPos);g.style.backgroundPosition=-O.x+"px "+-O.y+"px"}return this._setIconStyles(g,"icon"),g},createShadow:function(){return null}});function Bg(u){return new cd(u)}Bs.Default=zo;var Ja=_i.extend({options:{tileSize:256,opacity:1,updateWhenIdle:at.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){b(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),xn(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Mo(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ya(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=h(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof W?u:new W(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var g=this.getPane().children,S=-u(-1/0,1/0),O=0,D=g.length,B;O<D;O++)B=g[O].style.zIndex,g[O]!==this._container&&B&&(S=u(S,+B));isFinite(S)&&(this.options.zIndex=S+u(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!at.ielt9){Cr(this._container,this.options.opacity);var u=+new Date,g=!1,S=!1;for(var O in this._tiles){var D=this._tiles[O];if(!(!D.current||!D.loaded)){var B=Math.min(1,(u-D.loaded)/200);Cr(D.el,B),B<1?g=!0:(D.active?S=!0:this._onOpaqueTile(D),D.active=!0)}}S&&!this._noPrune&&this._pruneTiles(),g&&(U(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this))}},_onOpaqueTile:m,_initContainer:function(){this._container||(this._container=wt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,g=this.options.maxZoom;if(u!==void 0){for(var S in this._levels)S=Number(S),this._levels[S].el.children.length||S===u?(this._levels[S].el.style.zIndex=g-Math.abs(u-S),this._onUpdateLevel(S)):(xn(this._levels[S].el),this._removeTilesAtZoom(S),this._onRemoveLevel(S),delete this._levels[S]);var O=this._levels[u],D=this._map;return O||(O=this._levels[u]={},O.el=wt("div","leaflet-tile-container leaflet-zoom-animated",this._container),O.el.style.zIndex=g,O.origin=D.project(D.unproject(D.getPixelOrigin()),u).round(),O.zoom=u,this._setZoomTransform(O,D.getCenter(),D.getZoom()),m(O.el.offsetWidth),this._onCreateLevel(O)),this._level=O,O}},_onUpdateLevel:m,_onRemoveLevel:m,_onCreateLevel:m,_pruneTiles:function(){if(this._map){var u,g,S=this._map.getZoom();if(S>this.options.maxZoom||S<this.options.minZoom){this._removeAllTiles();return}for(u in this._tiles)g=this._tiles[u],g.retain=g.current;for(u in this._tiles)if(g=this._tiles[u],g.current&&!g.active){var O=g.coords;this._retainParent(O.x,O.y,O.z,O.z-5)||this._retainChildren(O.x,O.y,O.z,O.z+2)}for(u in this._tiles)this._tiles[u].retain||this._removeTile(u)}},_removeTilesAtZoom:function(u){for(var g in this._tiles)this._tiles[g].coords.z===u&&this._removeTile(g)},_removeAllTiles:function(){for(var u in this._tiles)this._removeTile(u)},_invalidateAll:function(){for(var u in this._levels)xn(this._levels[u].el),this._onRemoveLevel(Number(u)),delete this._levels[u];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(u,g,S,O){var D=Math.floor(u/2),B=Math.floor(g/2),te=S-1,pe=new W(+D,+B);pe.z=+te;var xe=this._tileCoordsToKey(pe),Ae=this._tiles[xe];return Ae&&Ae.active?(Ae.retain=!0,!0):(Ae&&Ae.loaded&&(Ae.retain=!0),te>O?this._retainParent(D,B,te,O):!1)},_retainChildren:function(u,g,S,O){for(var D=2*u;D<2*u+2;D++)for(var B=2*g;B<2*g+2;B++){var te=new W(D,B);te.z=S+1;var pe=this._tileCoordsToKey(te),xe=this._tiles[pe];if(xe&&xe.active){xe.retain=!0;continue}else xe&&xe.loaded&&(xe.retain=!0);S+1<O&&this._retainChildren(D,B,S+1,O)}},_resetView:function(u){var g=u&&(u.pinch||u.flyTo);
vendor: 4,491 bytes, line 1027
1027this._setView(this._map.getCenter(),this._map.getZoom(),g,g)},_animateZoom:function(u){this._setView(u.center,u.zoom,!0,u.noUpdate)},_clampZoom:function(u){var g=this.options;return g.minNativeZoom!==void 0&&u<g.minNativeZoom?g.minNativeZoom:g.maxNativeZoom!==void 0&&g.maxNativeZoom<u?g.maxNativeZoom:u},_setView:function(u,g,S,O){var D=Math.round(g);this.options.maxZoom!==void 0&&D>this.options.maxZoom||this.options.minZoom!==void 0&&D<this.options.minZoom?D=void 0:D=this._clampZoom(D);var B=this.options.updateWhenZooming&&D!==this._tileZoom;(!O||B)&&(this._tileZoom=D,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),D!==void 0&&this._update(u),S||this._pruneTiles(),this._noPrune=!!S),this._setZoomTransforms(u,g)},_setZoomTransforms:function(u,g){for(var S in this._levels)this._setZoomTransform(this._levels[S],u,g)},_setZoomTransform:function(u,g,S){var O=this._map.getZoomScale(S,u.zoom),D=u.origin.multiplyBy(O).subtract(this._map._getNewPixelOrigin(g,S)).round();at.any3d?yi(u.el,D,O):kn(u.el,D)},_resetGrid:function(){var u=this._map,g=u.options.crs,S=this._tileSize=this.getTileSize(),O=this._tileZoom,D=this._map.getPixelWorldBounds(this._tileZoom);D&&(this._globalTileRange=this._pxBoundsToTileRange(D)),this._wrapX=g.wrapLng&&!this.options.noWrap&&[Math.floor(u.project([0,g.wrapLng[0]],O).x/S.x),Math.ceil(u.project([0,g.wrapLng[1]],O).x/S.y)],this._wrapY=g.wrapLat&&!this.options.noWrap&&[Math.floor(u.project([g.wrapLat[0],0],O).y/S.x),Math.ceil(u.project([g.wrapLat[1],0],O).y/S.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(u){var g=this._map,S=g._animatingZoom?Math.max(g._animateToZoom,g.getZoom()):g.getZoom(),O=g.getZoomScale(S,this._tileZoom),D=g.project(u,this._tileZoom).floor(),B=g.getSize().divideBy(O*2);return new K(D.subtract(B),D.add(B))},_update:function(u){var g=this._map;if(g){var S=this._clampZoom(g.getZoom());if(u===void 0&&(u=g.getCenter()),this._tileZoom!==void 0){var O=this._getTiledPixelBounds(u),D=this._pxBoundsToTileRange(O),B=D.getCenter(),te=[],pe=this.options.keepBuffer,xe=new K(D.getBottomLeft().subtract([pe,-pe]),D.getTopRight().add([pe,-pe]));if(!(isFinite(D.min.x)&&isFinite(D.min.y)&&isFinite(D.max.x)&&isFinite(D.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Ae in this._tiles){var Ve=this._tiles[Ae].coords;(Ve.z!==this._tileZoom||!xe.contains(new W(Ve.x,Ve.y)))&&(this._tiles[Ae].current=!1)}if(Math.abs(S-this._tileZoom)>1){this._setView(u,S);return}for(var ut=D.min.y;ut<=D.max.y;ut++)for(var Nt=D.min.x;Nt<=D.max.x;Nt++){var Vn=new W(Nt,ut);if(Vn.z=this._tileZoom,!!this._isValidTile(Vn)){var Dn=this._tiles[this._tileCoordsToKey(Vn)];Dn?Dn.current=!0:te.push(Vn)}}if(te.sort(function(Pr,Yo){return Pr.distanceTo(B)-Yo.distanceTo(B)}),te.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var qr=document.createDocumentFragment();for(Nt=0;Nt<te.length;Nt++)this._addTile(te[Nt],qr);this._level.el.appendChild(qr)}}}},_isValidTile:function(u){var g=this._map.options.crs;if(!g.infinite){var S=this._globalTileRange;if(!g.wrapLng&&(u.x<S.min.x||u.x>S.max.x)||!g.wrapLat&&(u.y<S.min.y||u.y>S.max.y))return!1}if(!this.options.bounds)return!0;var O=this._tileCoordsToBounds(u);return je(this.options.bounds).overlaps(O)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var g=this._map,S=this.getTileSize(),O=u.scaleBy(S),D=O.add(S),B=g.unproject(O,u.z),te=g.unproject(D,u.z);return[B,te]},_tileCoordsToBounds:function(u){var g=this._tileCoordsToNwSe(u),S=new ve(g[0],g[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var g=u.split(":"),S=new W(+g[0],+g[1]);return S.z=+g[2],S},_removeTile:function(u){var g=this._tiles[u];g&&(xn(g.el),delete this._tiles[u],this.fire("tileunload",{tile:g.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){bt(u,"leaflet-tile");var g=this.getTileSize();u.style.width=g.x+"px",u.style.height=g.y+"px",u.onselectstart=m,u.onmousemove=m,at.ielt9&&this.options.opacity<1&&Cr(u,this.options.opacity)},_addTile:function(u,g){var S=this._getTilePos(u),O=this._tileCoordsToKey(u),D=this.createTile(this._wrapCoords(u),o(this._tileReady,this,u));this._initTile(D),this.createTile.length<2&&H(o(this._tileReady,this,u,null,D)),kn(D,S),this._tiles[O]={el:D,coords:u,current:!0}
vendor: 6,108 bytes, line 1027
1027,g.appendChild(D),this.fire("tileloadstart",{tile:D,coords:u})},_tileReady:function(u,g,S){g&&this.fire("tileerror",{error:g,tile:S,coords:u});var O=this._tileCoordsToKey(u);S=this._tiles[O],S&&(S.loaded=+new Date,this._map._fadeAnimated?(Cr(S.el,0),U(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),g||(bt(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),at.ielt9||!this._map._fadeAnimated?H(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var g=new W(this._wrapX?p(u.x,this._wrapX):u.x,this._wrapY?p(u.y,this._wrapY):u.y);return g.z=u.z,g},_pxBoundsToTileRange:function(u){var g=this.getTileSize();return new K(u.min.unscaleBy(g).floor(),u.max.unscaleBy(g).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function Vo(u){return new Ja(u)}var es=Ja.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,g){this._url=u,g=b(this,g),g.detectRetina&&at.retina&&g.maxZoom>0?(g.tileSize=Math.floor(g.tileSize/2),g.zoomReverse?(g.zoomOffset--,g.minZoom=Math.min(g.maxZoom,g.minZoom+1)):(g.zoomOffset++,g.maxZoom=Math.max(g.minZoom,g.maxZoom-1)),g.minZoom=Math.max(0,g.minZoom)):g.zoomReverse?g.minZoom=Math.min(g.maxZoom,g.minZoom):g.maxZoom=Math.max(g.minZoom,g.maxZoom),typeof g.subdomains=="string"&&(g.subdomains=g.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,g){return this._url===u&&g===void 0&&(g=!0),this._url=u,g||this.redraw(),this},createTile:function(u,g){var S=document.createElement("img");return gt(S,"load",o(this._tileOnLoad,this,g,S)),gt(S,"error",o(this._tileOnError,this,g,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(u),S},getTileUrl:function(u){var g={r:at.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-u.y;this.options.tms&&(g.y=S),g["-y"]=S}return C(this._url,i(g,this.options))},_tileOnLoad:function(u,g){at.ielt9?setTimeout(o(u,this,null,g),0):u(null,g)},_tileOnError:function(u,g,S){var O=this.options.errorTileUrl;O&&g.getAttribute("src")!==O&&(g.src=O),u(S,g)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,g=this.options.maxZoom,S=this.options.zoomReverse,O=this.options.zoomOffset;return S&&(u=g-u),u+O},_getSubdomain:function(u){var g=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[g]},_abortLoading:function(){var u,g;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(g=this._tiles[u].el,g.onload=m,g.onerror=m,!g.complete)){g.src=k;var S=this._tiles[u].coords;xn(g),delete this._tiles[u],this.fire("tileabort",{tile:g,coords:S})}},_removeTile:function(u){var g=this._tiles[u];if(g)return g.el.setAttribute("src",k),Ja.prototype._removeTile.call(this,u)},_tileReady:function(u,g,S){if(!(!this._map||S&&S.getAttribute("src")===k))return Ja.prototype._tileReady.call(this,u,g,S)}});function Ih(u,g){return new es(u,g)}var pc=es.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,g){this._url=u;var S=i({},this.defaultWmsParams);for(var O in g)O in this.options||(S[O]=g[O]);g=b(this,g);var D=g.detectRetina&&at.retina?2:1,B=this.getTileSize();S.width=B.x*D,S.height=B.y*D,this.wmsParams=S},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var g=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[g]=this._crs.code,es.prototype.onAdd.call(this,u)},getTileUrl:function(u){var g=this._tileCoordsToNwSe(u),S=this._crs,O=ne(S.project(g[0]),S.project(g[1])),D=O.min,B=O.max,te=(this._wmsVersion>=1.3&&this._crs===Mg?[D.y,D.x,B.y,B.x]:[D.x,D.y,B.x,B.y]).join(","),pe=es.prototype.getTileUrl.call(this,u);return pe+_(this.wmsParams,pe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+te},setParams:function(u,g){return i(this.wmsParams,u),g||this.redraw(),this}});function zg(u,g){return new pc(u,g)}es.WMS=pc,Ih.wms=zg;var Vi=_i.extend({options:{padding:.1},initialize:function(u){b(this,u),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),bt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,g){var S=this._map.getZoomScale(g,this._zoom),O=this._map.getSize().multiplyBy(.5+this.options.padding),D=this._map.project(this._center,g),B=O.multiplyBy(-S).add(D).subtract(this._map._getNewPixelOrigin(u,g));at.any3d?yi(this._container,B,S):kn(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,g=this._map.getSize(),S=this._map.containerPointToLayerPoint(g.multiplyBy(-u)).round();
1027this._bounds=new K(S,S.add(g.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Lh=Vi.extend({options:{tolerance:0},getEvents:function(){var u=Vi.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");gt(u,"mousemove",this._onMouseMove,this),gt(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),gt(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){U(this._redrawRequest),delete this._ctx,xn(this._container),rn(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var g in this._layers)u=this._layers[g],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Vi.prototype._update.call(this);var u=this._bounds,g=this._container,S=u.getSize(),O=at.retina?2:1;kn(g,u.min),g.width=O*S.x,g.height=O*S.y,g.style.width=S.x+"px",g.style.height=S.y+"px",at.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Vi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[d(u)]=u;var g=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=g),this._drawLast=g,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var g=u._order,S=g.next,O=g.prev;S?S.prev=O:this._drawLast=O,O?O.next=S:this._drawFirst=S,delete u._order,delete this._layers[d(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var g=u.options.dashArray.split(/[, ]+/),S=[],O,D;for(D=0;D<g.length;D++){if(O=Number(g[D]),isNaN(O))return;S.push(O)}u.options._dashArray=S}else u.options._dashArray=u.options.dashArray},_requestRedraw:function(u){this._map&&(this._extendRedrawBounds(u),this._redrawRequest=this._redrawRequest||H(this._redraw,this))},_extendRedrawBounds:function(u){if(u._pxBounds){var g=(u.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new K,this._redrawBounds.extend(u._pxBounds.min.subtract([g,g])),this._redrawBounds.extend(u._pxBounds.max.add([g,g]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var u=this._redrawBounds;if(u){var g=u.getSize();this._ctx.clearRect(u.min.x,u.min.y,g.x,g.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var u,g=this._redrawBounds;if(this._ctx.save(),g){var S=g.getSize();this._ctx.beginPath(),this._ctx.rect(g.min.x,g.min.y,S.x,S.y),this._ctx.clip()}this._drawing=!0;for(var O=this._drawFirst;O;O=O.next)u=O.layer,(!g||u._pxBounds&&u._pxBounds.intersects(g))&&u._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(u,g){if(this._drawing){var S,O,D,B,te=u._parts,pe=te.length,xe=this._ctx;if(pe){for(xe.beginPath(),S=0;S<pe;S++){for(O=0,D=te[S].length;O<D;O++)B=te[S][O],xe[O?"lineTo":"moveTo"](B.x,B.y);g&&xe.closePath()}this._fillStroke(xe,u)}}},_updateCircle:function(u){if(!(!this._drawing||u._empty())){var g=u._point,S=this._ctx,O=Math.max(Math.round(u._radius),1),D=(Math.max(Math.round(u._radiusY),1)||O)/O;D!==1&&(S.save(),S.scale(1,D)),S.beginPath(),S.arc(g.x,g.y/D,O,0,Math.PI*2,!1),D!==1&&S.restore(),this._fillStroke(S,u)}},_fillStroke:function(u,g){var S=g.options;S.fill&&(u.globalAlpha=S.fillOpacity,u.fillStyle=S.fillColor||S.color,u.fill(S.fillRule||"evenodd")),S.stroke&&S.weight!==0&&(u.setLineDash&&u.setLineDash(g.options&&g.options._dashArray||[]),u.globalAlpha=S.opacity,u.lineWidth=S.weight,u.strokeStyle=S.color,u.lineCap=S.lineCap,u.lineJoin=S.lineJoin,u.stroke())},_onClick:function(u){for(var g=this._map.mouseEventToLayerPoint(u),S,O,D=this._drawFirst;D;D=D.next)S=D.layer,S.options.interactive&&S._containsPoint(g)&&(!(u.type==="click"||u.type==="preclick")||!this._map._draggableMoved(S))&&(O=S);this._fireEvent(O?[O]:!1,u)},_onMouseMove:function(u){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var g=this._map.mouseEventToLayerPoint(u);this._handleMouseHover(u,g)}},_handleMouseOut:function(u){var g=this._hoveredLayer;g&&(hn(this._container,"leaflet-interactive"),this._fireEvent([g],u,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(u,g){if(!this._mouseHoverThrottled){for(var S,O,D=this._drawFirst;D;D=D.next)S=D.layer,S.options.interactive&&S._containsPoint(g)&&(O=S);O!==this._hoveredLayer&&(this._handleMouseOut(u),O&&(bt(this._container,"leaflet-interactive"),this._fireEvent([O],u,"mouseover"),this._hoveredLayer=O)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,u),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(u,g,S){this._map._fireDOMEvent(g,S||g.type,u)},_bringToFront:function(u){var g=u._order;if(g){var S=g.next,O=g.prev;if(S)S.prev=O;else return;O?O.next=S:S&&(this._drawFirst=S),g.prev=this._drawLast,this._drawLast.next=g,g.next=null,this._drawLast=g,this._requestRedraw(u)}},_bringToBack:function(u){var g=u._order;if(g){var S=g.next,O=g.prev;if(O)O.next=S;else return;S?S.prev=O:O&&(this._drawLast=O),g.prev=null,g.next=this._drawFirst,this._drawFirst.prev=g,this._drawFirst=g,this._requestRedraw(u)}}});function Dh(u){return at.canvas?new Lh(u):null}var Ko=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(u){return document.createElement("<lvml:"+u+' class="lvml">')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Ug={_initContainer:function(){this._container=wt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vi.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var g=u._container=Ko("shape");bt(g,"leaflet-vml-shape "+(this.options.className||"")),g.coordsize="1 1",u._path=Ko("path"),g.appendChild(u._path),this._updateStyle(u),this._layers[d(u)]=u},_addPath:function(u){var g=u._container;
vendor: 4,091 bytes, line 1027
1027this._container.appendChild(g),u.options.interactive&&u.addInteractiveTarget(g)},_removePath:function(u){var g=u._container;xn(g),u.removeInteractiveTarget(g),delete this._layers[d(u)]},_updateStyle:function(u){var g=u._stroke,S=u._fill,O=u.options,D=u._container;D.stroked=!!O.stroke,D.filled=!!O.fill,O.stroke?(g||(g=u._stroke=Ko("stroke")),D.appendChild(g),g.weight=O.weight+"px",g.color=O.color,g.opacity=O.opacity,O.dashArray?g.dashStyle=E(O.dashArray)?O.dashArray.join(" "):O.dashArray.replace(/( *, *)/g," "):g.dashStyle="",g.endcap=O.lineCap.replace("butt","flat"),g.joinstyle=O.lineJoin):g&&(D.removeChild(g),u._stroke=null),O.fill?(S||(S=u._fill=Ko("fill")),D.appendChild(S),S.color=O.fillColor||O.color,S.opacity=O.fillOpacity):S&&(D.removeChild(S),u._fill=null)},_updateCircle:function(u){var g=u._point.round(),S=Math.round(u._radius),O=Math.round(u._radiusY||S);this._setPath(u,u._empty()?"M0 0":"AL "+g.x+","+g.y+" "+S+","+O+" 0,"+65535*360)},_setPath:function(u,g){u._path.v=g},_bringToFront:function(u){Mo(u._container)},_bringToBack:function(u){ya(u._container)}},ji=at.vml?Ko:Be,zs=Vi.extend({_initContainer:function(){this._container=ji("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ji("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){xn(this._container),rn(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Vi.prototype._update.call(this);var u=this._bounds,g=u.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(g))&&(this._svgSize=g,S.setAttribute("width",g.x),S.setAttribute("height",g.y)),kn(S,u.min),S.setAttribute("viewBox",[u.min.x,u.min.y,g.x,g.y].join(" ")),this.fire("update")}},_initPath:function(u){var g=u._path=ji("path");u.options.className&&bt(g,u.options.className),u.options.interactive&&bt(g,"leaflet-interactive"),this._updateStyle(u),this._layers[d(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){xn(u._path),u.removeInteractiveTarget(u._path),delete this._layers[d(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var g=u._path,S=u.options;g&&(S.stroke?(g.setAttribute("stroke",S.color),g.setAttribute("stroke-opacity",S.opacity),g.setAttribute("stroke-width",S.weight),g.setAttribute("stroke-linecap",S.lineCap),g.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?g.setAttribute("stroke-dasharray",S.dashArray):g.removeAttribute("stroke-dasharray"),S.dashOffset?g.setAttribute("stroke-dashoffset",S.dashOffset):g.removeAttribute("stroke-dashoffset")):g.setAttribute("stroke","none"),S.fill?(g.setAttribute("fill",S.fillColor||S.color),g.setAttribute("fill-opacity",S.fillOpacity),g.setAttribute("fill-rule",S.fillRule||"evenodd")):g.setAttribute("fill","none"))},_updatePoly:function(u,g){this._setPath(u,Le(u._parts,g))},_updateCircle:function(u){var g=u._point,S=Math.max(Math.round(u._radius),1),O=Math.max(Math.round(u._radiusY),1)||S,D="a"+S+","+O+" 0 1,0 ",B=u._empty()?"M0 0":"M"+(g.x-S)+","+g.y+D+S*2+",0 "+D+-S*2+",0 ";this._setPath(u,B)},_setPath:function(u,g){u._path.setAttribute("d",g)},_bringToFront:function(u){Mo(u._path)},_bringToBack:function(u){ya(u._path)}});at.vml&&zs.include(Ug);function ud(u){return at.svg||at.vml?new zs(u):null}Mt.include({getRenderer:function(u){var g=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return g||(g=this._renderer=this._createRenderer()),this.hasLayer(g)||this.addLayer(g),g},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var g=this._paneRenderers[u];return g===void 0&&(g=this._createRenderer({pane:u}),this._paneRenderers[u]=g),g},_createRenderer:function(u){return this.options.preferCanvas&&Dh(u)||ud(u)}});var qg=wa.extend({initialize:function(u,g){wa.prototype.initialize.call(this,this._boundsToLatLngs(u),g)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))}
vendor: 12,861 bytes, line 1027
1027,_boundsToLatLngs:function(u){return u=je(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function Hb(u,g){return new qg(u,g)}zs.create=ji,zs.pointsToPath=Le,Hi.geometryToLayer=Uo,Hi.coordsToLatLng=id,Hi.coordsToLatLngs=fc,Hi.latLngToCoords=ad,Hi.latLngsToCoords=sd,Hi.getFeature=qo,Hi.asFeature=od,Mt.mergeOptions({boxZoom:!0});var Go=Jr.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){gt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){rn(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){xn(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Rt(),Vu(),this._startPoint=this._map.mouseEventToContainerPoint(u),gt(document,{contextmenu:xi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=wt("div","leaflet-zoom-box",this._container),bt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var g=new K(this._point,this._startPoint),S=g.getSize();kn(this._box,g.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(xn(this._box),hn(this._container,"leaflet-crosshair")),Lo(),Ku(),rn(document,{contextmenu:xi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var g=new ve(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(g).fire("boxzoomend",{boxZoomBounds:g})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Mt.addInitHook("addHandler","boxZoom",Go),Mt.mergeOptions({doubleClickZoom:!0});var Hg=Jr.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var g=this._map,S=g.getZoom(),O=g.options.zoomDelta,D=u.originalEvent.shiftKey?S-O:S+O;g.options.doubleClickZoom==="center"?g.setZoom(D):g.setZoomAround(u.containerPoint,D)}});Mt.addInitHook("addHandler","doubleClickZoom",Hg),Mt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $h=Jr.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new bi(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}bt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){hn(this._map._container,"leaflet-grab"),hn(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var g=je(this._map.options.maxBounds);this._offsetLimit=ne(this._map.latLngToContainerPoint(g.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(g.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var g=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(g),this._prunePositions(g)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),g=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=g.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,g){return u-(u-g)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),g=this._offsetLimit;u.x<g.min.x&&(u.x=this._viscousLimit(u.x,g.min.x)),u.y<g.min.y&&(u.y=this._viscousLimit(u.y,g.min.y)),u.x>g.max.x&&(u.x=this._viscousLimit(u.x,g.max.x)),u.y>g.max.y&&(u.y=this._viscousLimit(u.y,g.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,g=Math.round(u/2),S=this._initialWorldOffset,O=this._draggable._newPos.x,D=(O-g+S)%u+g-S,B=(O+g+S)%u-g-S,te=Math.abs(D+S)<Math.abs(B+S)?D:B;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=te},_onDragEnd:function(u){var g=this._map,S=g.options,O=!S.inertia||u.noInertia||this._times.length<2;if(g.fire("dragend",u),O)g.fire("moveend");else{this._prunePositions(+new Date);var D=this._lastPos.subtract(this._positions[0]),B=(this._lastTime-this._times[0])/1e3,te=S.easeLinearity,pe=D.multiplyBy(te/B),xe=pe.distanceTo([0,0]),Ae=Math.min(S.inertiaMaxSpeed,xe),Ve=pe.multiplyBy(Ae/xe),ut=Ae/(S.inertiaDeceleration*te),Nt=Ve.multiplyBy(-ut/2).round();!Nt.x&&!Nt.y?g.fire("moveend"):(Nt=g._limitOffset(Nt,g.options.maxBounds),H(function(){g.panBy(Nt,{duration:ut,easeLinearity:te,noMoveStart:!0,animate:!0})}))}}});Mt.addInitHook("addHandler","dragging",$h),Mt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Fh=Jr.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(u){this._map=u,this._setPanDelta(u.options.keyboardPanDelta),this._setZoomDelta(u.options.zoomDelta)},addHooks:function(){var u=this._map._container;u.tabIndex<=0&&(u.tabIndex="0"),gt(u,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),rn(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var u=document.body,g=document.documentElement,S=u.scrollTop||g.scrollTop,O=u.scrollLeft||g.scrollLeft;this._map._container.focus(),window.scrollTo(O,S)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(u){var g=this._panKeys={},S=this.keyCodes,O,D;for(O=0,D=S.left.length;O<D;O++)g[S.left[O]]=[-1*u,0];for(O=0,D=S.right.length;O<D;O++)g[S.right[O]]=[u,0];for(O=0,D=S.down.length;O<D;O++)g[S.down[O]]=[0,u];for(O=0,D=S.up.length;O<D;O++)g[S.up[O]]=[0,-1*u]},_setZoomDelta:function(u){var g=this._zoomKeys={},S=this.keyCodes,O,D;for(O=0,D=S.zoomIn.length;O<D;O++)g[S.zoomIn[O]]=u;for(O=0,D=S.zoomOut.length;O<D;O++)g[S.zoomOut[O]]=-u},_addHooks:function(){gt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){rn(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(u){if(!(u.altKey||u.ctrlKey||u.metaKey)){var g=u.keyCode,S=this._map,O;if(g in this._panKeys){if(!S._panAnim||!S._panAnim._inProgress)if(O=this._panKeys[g],u.shiftKey&&(O=ae(O).multiplyBy(3)),S.options.maxBounds&&(O=S._limitOffset(ae(O),S.options.maxBounds)),S.options.worldCopyJump){var D=S.wrapLatLng(S.unproject(S.project(S.getCenter()).add(O)));S.panTo(D)}else S.panBy(O)}else if(g in this._zoomKeys)S.setZoom(S.getZoom()+(u.shiftKey?3:1)*this._zoomKeys[g]);else if(g===27&&S._popup&&S._popup.options.closeOnEscapeKey)S.closePopup();else return;xi(u)}}});Mt.addInitHook("addHandler","keyboard",Fh),Mt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var an=Jr.extend({addHooks:function(){gt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){rn(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(u){var g=Ng(u),S=this._map.options.wheelDebounceTime;this._delta+=g,this._lastMousePos=this._map.mouseEventToContainerPoint(u),this._startTime||(this._startTime=+new Date);var O=Math.max(S-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),O),xi(u)},_performZoom:function(){var u=this._map,g=u.getZoom(),S=this._map.options.zoomSnap||0;u._stop();var O=this._delta/(this._map.options.wheelPxPerZoomLevel*4),D=4*Math.log(2/(1+Math.exp(-Math.abs(O))))/Math.LN2,B=S?Math.ceil(D/S)*S:D,te=u._limitZoom(g+(this._delta>0?B:-B))-g;this._delta=0,this._startTime=null,te&&(u.options.scrollWheelZoom==="center"?u.setZoom(g+te):u.setZoomAround(this._lastMousePos,g+te))}});Mt.addInitHook("addHandler","scrollWheelZoom",an);var Bh=600;Mt.mergeOptions({tapHold:at.touchNative&&at.safari&&at.mobile,tapTolerance:15});var mc=Jr.extend({addHooks:function(){gt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){rn(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var g=u.touches[0];this._startPos=this._newPos=new W(g.clientX,g.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(gt(document,"touchend",Nn),gt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",g))},this),Bh),gt(document,"touchend touchcancel contextmenu",this._cancel,this),gt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){rn(document,"touchend",Nn),rn(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),rn(document,"touchend touchcancel contextmenu",this._cancel,this),rn(document,"touchmove",this._onMove,this)},_onMove:function(u){var g=u.touches[0];this._newPos=new W(g.clientX,g.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,g){var S=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:g.screenX,screenY:g.screenY,clientX:g.clientX,clientY:g.clientY});S._simulated=!0,g.target.dispatchEvent(S)}});Mt.addInitHook("addHandler","tapHold",mc),Mt.mergeOptions({touchZoom:at.touch,bounceAtZoomLimits:!0});var Zo=Jr.extend({addHooks:function(){bt(this._map._container,"leaflet-touch-zoom"),gt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){hn(this._map._container,"leaflet-touch-zoom"),rn(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var g=this._map;if(!(!u.touches||u.touches.length!==2||g._animatingZoom||this._zooming)){var S=g.mouseEventToContainerPoint(u.touches[0]),O=g.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=g.getSize()._divideBy(2),this._startLatLng=g.containerPointToLatLng(this._centerPoint),g.options.touchZoom!=="center"&&(this._pinchStartLatLng=g.containerPointToLatLng(S.add(O)._divideBy(2))),this._startDist=S.distanceTo(O),this._startZoom=g.getZoom(),this._moved=!1,this._zooming=!0,g._stop(),gt(document,"touchmove",this._onTouchMove,this),gt(document,"touchend touchcancel",this._onTouchEnd,this),Nn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var g=this._map,S=g.mouseEventToContainerPoint(u.touches[0]),O=g.mouseEventToContainerPoint(u.touches[1]),D=S.distanceTo(O)/this._startDist;if(this._zoom=g.getScaleZoom(D,this._startZoom),!g.options.bounceAtZoomLimits&&(this._zoom<g.getMinZoom()&&D<1||this._zoom>g.getMaxZoom()&&D>1)&&(this._zoom=g._limitZoom(this._zoom)),g.options.touchZoom==="center"){if(this._center=this._startLatLng,D===1)return}else{var B=S._add(O)._divideBy(2)._subtract(this._centerPoint);if(D===1&&B.x===0&&B.y===0)return;this._center=g.unproject(g.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(g._moveStart(!0,!1),this._moved=!0),U(this._animRequest);var te=o(g._move,g,this._center,this._zoom,{pinch:!0,round:!1},void 0);
1027this._animRequest=H(te,this,!0),Nn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,U(this._animRequest),rn(document,"touchmove",this._onTouchMove,this),rn(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Mt.addInitHook("addHandler","touchZoom",Zo),Mt.BoxZoom=Go,Mt.DoubleClickZoom=Hg,Mt.Drag=$h,Mt.Keyboard=Fh,Mt.ScrollWheelZoom=an,Mt.TapHold=mc,Mt.TouchZoom=Zo,n.Bounds=K,n.Browser=at,n.CRS=fe,n.Canvas=Lh,n.Circle=nd,n.CircleMarker=td,n.Class=Z,n.Control=zr,n.DivIcon=cd,n.DivOverlay=Wi,n.DomEvent=Yu,n.DomUtil=sc,n.Draggable=bi,n.Evented=oe,n.FeatureGroup=ba,n.GeoJSON=Hi,n.GridLayer=Ja,n.Handler=Jr,n.Icon=Bs,n.ImageOverlay=Qa,n.LatLng=Y,n.LatLngBounds=ve,n.Layer=_i,n.LayerGroup=Ya,n.LineUtil=Tg,n.Map=Mt,n.Marker=_a,n.Mixin=jh,n.Path=Xa,n.Point=W,n.PolyUtil=Mb,n.Polygon=wa,n.Polyline=Ur,n.Popup=ld,n.PosAnimation=Xu,n.Projection=$b,n.Rectangle=qg,n.Renderer=Vi,n.SVG=zs,n.SVGOverlay=Mh,n.TileLayer=es,n.Tooltip=Wo,n.Transformation=ke,n.Util=z,n.VideoOverlay=Th,n.bind=o,n.bounds=ne,n.canvas=Dh,n.circle=dc,n.circleMarker=Lg,n.control=Za,n.divIcon=Bg,n.extend=i,n.featureGroup=Rg,n.geoJSON=Dg,n.geoJson=wi,n.gridLayer=Vo,n.icon=Ig,n.imageOverlay=$g,n.latLng=he,n.latLngBounds=je,n.layerGroup=uc,n.map=Ga,n.marker=zb,n.point=ae,n.polygon=qb,n.polyline=Ub,n.popup=Ho,n.rectangle=Hb,n.setOptions=b,n.stamp=d,n.svg=ud,n.svgOverlay=Rh,n.tileLayer=Ih,n.tooltip=hc,n.transformation=re,n.version=r,n.videoOverlay=Fg;var Wg=window.L;n.noConflict=function(){return window.L=Wg,this},window.L=n}))})(Pp,Pp.exports)),Pp.exports}var dk=Nje();function J7(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function e9(e,t){return t==null?function(r,i){const s=P.useRef();return s.current||(s.current=e(r,i)),s}:function(r,i){const s=P.useRef();s.current||(s.current=e(r,i));const o=P.useRef(r),{instance:c}=s.current;return P.useEffect(function(){o.current!==r&&(t(c,r,o.current),o.current=r)},[c,r,i]),s}}function t9(e,t){P.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var s;(s=t.layerContainer)==null||s.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function Cje(e){return function(n){const r=ck(),i=e(uk(n,r),r);return vje(r.map,n.attribution),Q7(i.current,n.eventHandlers),t9(i.current,r),i}}function Eje(e,t){const n=P.useRef();P.useEffect(function(){if(t.pathOptions!==n.current){const i=t.pathOptions??{};e.instance.setStyle(i),n.current=i}},[e,t])}function Pje(e){return function(n){const r=ck(),i=e(uk(n,r),r);return Q7(i.current,n.eventHandlers),t9(i.current,r),Eje(i.current,n),i}}function kje(e,t){const n=e9(e,t),r=Pje(n);return wje(r)}function Aje(e,t){const n=e9(e,t),r=Cje(n);return jje(r)}function Oje(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function Tje(){return ck().map}const Mje=kje(function({data:t,...n},r){const i=new dk.GeoJSON(t,n);return J7(i,_je(r,{overlayContainer:i}))},function(t,n,r){n.style!==r.style&&(n.style==null?t.resetStyle():t.setStyle(n.style))});function r2(){return r2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r2.apply(this,arguments)}function Rje({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:s,placeholder:o,style:c,whenReady:d,zoom:h,...p},m){const[v]=P.useState({className:i,id:s,style:c}),[x,w]=P.useState(null);P.useImperativeHandle(m,()=>(x==null?void 0:x.map)??null,[x]);const b=P.useCallback(j=>{if(j!==null&&x===null){const C=new dk.Map(j,p);n!=null&&h!=null?C.setView(n,h):e!=null&&C.fitBounds(e,t),d!=null&&C.whenReady(d),w(bje(C))}},[]);P.useEffect(()=>()=>{x==null||x.map.remove()},[x]);const _=x?J.createElement(X7,{value:x},r):o??null;return J.createElement("div",r2({},v,{ref:b}),_)}const Ije=P.forwardRef(Rje),Lje=Aje(function({url:t,...n},r){const i=new dk.TileLayer(t,uk(n,r));return J7(i,r)},function(t,n,r){Oje(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),Dje={type:"FeatureCollection",features:[{type:"Feature",properties:{name:"Nairobi",code:"047"}
1027,geometry:{type:"Polygon",coordinates:[[[36.65,-1.18],[37.1,-1.18],[37.1,-1.45],[36.65,-1.45],[36.65,-1.18]]]}},{type:"Feature",properties:{name:"Mombasa",code:"001"},geometry:{type:"Polygon",coordinates:[[[39.5,-3.9],[39.8,-3.9],[39.8,-4.15],[39.5,-4.15],[39.5,-3.9]]]}},{type:"Feature",properties:{name:"Kisumu",code:"042"},geometry:{type:"Polygon",coordinates:[[[34.5,-0],[35.1,-0],[35.1,-.35],[34.5,-.35],[34.5,-0]]]}},{type:"Feature",properties:{name:"Nakuru",code:"032"},geometry:{type:"Polygon",coordinates:[[[35.8,-.1],[36.6,-.1],[36.6,-.7],[35.8,-.7],[35.8,-.1]]]}},{type:"Feature",properties:{name:"Kiambu",code:"022"},geometry:{type:"Polygon",coordinates:[[[36.5,-.9],[37.2,-.9],[37.2,-1.18],[36.5,-1.18],[36.5,-.9]]]}},{type:"Feature",properties:{name:"Machakos",code:"016"},geometry:{type:"Polygon",coordinates:[[[36.9,-1.3],[37.8,-1.3],[37.8,-2],[36.9,-2],[36.9,-1.3]]]}},{type:"Feature",properties:{name:"Kajiado",code:"034"},geometry:{type:"Polygon",coordinates:[[[36.4,-1.5],[37.5,-1.5],[37.5,-2.5],[36.4,-2.5],[36.4,-1.5]]]}},{type:"Feature",properties:{name:"Uasin Gishu",code:"027"},geometry:{type:"Polygon",coordinates:[[[34.9,.3],[35.6,.3],[35.6,.7],[34.9,.7],[34.9,.3]]]}},{type:"Feature",properties:{name:"Kilifi",code:"003"},geometry:{type:"Polygon",coordinates:[[[39.4,-2.8],[40.2,-2.8],[40.2,-3.8],[39.4,-3.8],[39.4,-2.8]]]}},{type:"Feature",properties:{name:"Nyeri",code:"019"},geometry:{type:"Polygon",coordinates:[[[36.7,-.3],[37.3,-.3],[37.3,-.7],[36.7,-.7],[36.7,-.3]]]}},{type:"Feature",properties:{name:"Meru",code:"012"},geometry:{type:"Polygon",coordinates:[[[37.4,-0],[38.2,-0],[38.2,-.5],[37.4,-.5],[37.4,-0]]]}},{type:"Feature",properties:{name:"Kakamega",code:"037"},geometry:{type:"Polygon",coordinates:[[[34.5,.1],[35,.1],[35,.6],[34.5,.6],[34.5,.1]]]}},{type:"Feature",properties:{name:"Eldoret",code:"027"},geometry:{type:"Polygon",coordinates:[[[35.1,.4],[35.4,.4],[35.4,.6],[35.1,.6],[35.1,.4]]]}},{type:"Feature",properties:{name:"Turkana",code:"023"},geometry:{type:"Polygon",coordinates:[[[34.5,2.5],[36.5,2.5],[36.5,4.5],[34.5,4.5],[34.5,2.5]]]}},{type:"Feature",properties:{name:"Garissa",code:"007"},geometry:{type:"Polygon",coordinates:[[[39,-.5],[41,-.5],[41,-2],[39,-2],[39,-.5]]]}},{type:"Feature",properties:{name:"Kwale",code:"002"},geometry:{type:"Polygon",coordinates:[[[38.8,-4],[39.5,-4],[39.5,-4.7],[38.8,-4.7],[38.8,-4]]]}}]},u3={Nairobi:{lat:-1.286389,lng:36.817223},Mombasa:{lat:-4.043477,lng:39.668206},Kisumu:{lat:-.091702,lng:34.767956},Nakuru:{lat:-.303099,lng:36.080026},Kiambu:{lat:-1.046466,lng:36.958885},Machakos:{lat:-1.521666,lng:37.266109},Kajiado:{lat:-1.852618,lng:36.77649},"Uasin Gishu":{lat:.514277,lng:35.269779},Kilifi:{lat:-3.510066,lng:39.909308},Nyeri:{lat:-.420101,lng:36.947474},Meru:{lat:.047318,lng:37.649546},Kakamega:{lat:.283333,lng:34.75},Eldoret:{lat:.520556,lng:35.269722},Turkana:{lat:3.3125,lng:35.565833},Garissa:{lat:-.453611,lng:39.646389},Kwale:{lat:-4.173611,lng:39.4525}};function $je({selectedCounty:e}){const t=Tje();return P.useEffect(()=>{if(e&&u3[e]){const n=u3[e];t.setView([n.lat,n.lng],9,{animate:!0})}else t.setView([.0236,37.9062],6,{animate:!0})},[e,t]),null}function Fje({data:e,startupsByCounty:t,investorsByCounty:n,esosByCounty:r}){const[i,s]=P.useState(null),[o,c]=P.useState(null),d={};(e||[]).forEach(w=>{d[w.county]=w.count});const h=Math.max(...Object.values(d),1),p=w=>{const b=d[w]||0;if(b===0)return"#f1f5f9";const _=b/h;return _>.7?"#059669":_>.4?"#10b981":_>.2?"#34d399":"#6ee7b7"},m=w=>{const b=i===w.properties.name,_=o===w.properties.name;return{fillColor:p(w.properties.name),weight:b?3:_?2:1,opacity:1,color:b?"#047857":_?"#10b981":"#94a3b8",fillOpacity:b?.9:_?.8:.7}},v=(w,b)=>{const _=w.properties.name,j=d[_]||0;b.on({mouseover:C=>{c(_),C.target.setStyle({weight:2,color:"#10b981",fillOpacity:.8})},mouseout:C=>{c(null),i!==_&&C.target.setStyle(m(w))},click:()=>{s(i===_?null:_)}}),b.bindTooltip(`
1028      <div class="font-semibold">${_}</div>
1029      <div class="text-sm">${j} startups</div>
1030    `,{sticky:!0,className:"county-tooltip"})},x=i?{name:i,startups:d[i]||0,investors:(n==null?void 0:n[i])||0,esos:(r==null?void 0:r[i])||0}:null;return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(Cu,{className:"h-5 w-5 text-emerald-600"}),"Geographic Distribution"]})}),a.jsxs($e,{className:"p-0",children:[a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"h-[320px] rounded-b-xl overflow-hidden",children:a.jsxs(Ije,{center:[.0236,37.9062],zoom:6,style:{height:"100%",width:"100%"},zoomControl:!1,attributionControl:!1,children:[a.jsx(Lje,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",maxZoom:19}),a.jsx(Mje,{data:Dje,style:m,onEachFeature:v}),a.jsx($je,{selectedCounty:i})]})}),a.jsxs("div",{className:"absolute bottom-3 left-3 bg-white/95 backdrop-blur-sm rounded-lg p-2 shadow-md text-xs z-[400]",children:[a.jsx("div",{className:"font-medium text-slate-700 mb-1",children:"Startups"}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"w-4 h-3 rounded bg-[#f1f5f9]"}),a.jsx("span",{className:"text-slate-500",children:"0"}),a.jsx("div",{className:"w-4 h-3 rounded bg-[#6ee7b7]"}),a.jsx("div",{className:"w-4 h-3 rounded bg-[#34d399]"}),a.jsx("div",{className:"w-4 h-3 rounded bg-[#10b981]"}),a.jsx("div",{className:"w-4 h-3 rounded bg-[#059669]"}),a.jsxs("span",{className:"text-slate-500",children:[h,"+"]})]})]}),x&&a.jsxs("div",{className:"absolute top-3 right-3 bg-white/95 backdrop-blur-sm rounded-lg p-3 shadow-lg z-[400] min-w-[180px]",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-slate-900",children:x.name}),a.jsx("button",{onClick:()=>s(null),className:"text-slate-400 hover:text-slate-600",children:a.jsx(xo,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-slate-600",children:[a.jsx(er,{className:"h-3.5 w-3.5 text-emerald-600"}),"Startups"]}),a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700",children:x.startups})]}),a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-slate-600",children:[a.jsx(Ri,{className:"h-3.5 w-3.5 text-blue-600"}),"Investors"]}),a.jsx(Ce,{className:"bg-blue-100 text-blue-700",children:x.investors})]}),a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-slate-600",children:[a.jsx(tr,{className:"h-3.5 w-3.5 text-purple-600"}),"ESOs"]}),a.jsx(Ce,{className:"bg-purple-100 text-purple-700",children:x.esos})]})]})]}),o&&!i&&a.jsxs("div",{className:"absolute top-3 right-3 bg-white/95 backdrop-blur-sm rounded-lg px-3 py-2 shadow-md z-[400]",children:[a.jsx("span",{className:"font-medium text-slate-900",children:o}),a.jsxs("span",{className:"text-slate-500 ml-2",children:[d[o]||0," startups"]})]})]}),a.jsxs("div",{className:"p-4 border-t border-slate-100",children:[a.jsx("h4",{className:"text-sm font-medium text-slate-700 mb-2",children:"Top Counties"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:(e||[]).slice(0,5).map(w=>a.jsxs("button",{onClick:()=>s(i===w.county?null:w.county),className:`px-2.5 py-1 rounded-full text-xs font-medium transition-colors ${i===w.county?"bg-emerald-600 text-white":"bg-slate-100 text-slate-700 hover:bg-emerald-100 hover:text-emerald-700"}`,children:[w.county,": ",w.count]},w.county))})]})]}),a.jsx("style",{children:`
1031        .county-tooltip {
1032          background: white !important;
1033          border: none !important;
1034          border-radius: 8px !important;
1035          box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
1036          padding: 8px 12px !important;
1037        }
1038        .leaflet-tooltip-left:before,
1039        .leaflet-tooltip-right:before {
1040          display: none !important;
1041        }
1042      `})]})}const Bje={Funding:zl,Partnership:f2,"Program Launch":Up,"Cohort Launch":tr,Award:Bp,Acquisition:er,Expansion:pr},zje={Funding:"bg-green-100 text-green-600",Partnership:"bg-blue-100 text-blue-600","Program Launch":"bg-purple-100 text-purple-600","Cohort Launch":"bg-indigo-100 text-indigo-600",Award:"bg-amber-100 text-amber-600",A
1042cquisition:"bg-pink-100 text-pink-600",Expansion:"bg-teal-100 text-teal-600"};function Uje({events:e}){return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsx(nt,{className:"text-lg font-semibold",children:"Recent Activity"})}),a.jsx($e,{children:a.jsxs("div",{className:"space-y-4 max-h-[400px] overflow-y-auto pr-2",children:[e==null?void 0:e.map((t,n)=>{const r=Bje[t.event_type]||pr,i=zje[t.event_type]||"bg-slate-100 text-slate-600";return a.jsxs("div",{className:"flex gap-3 p-3 rounded-lg hover:bg-slate-50 transition-colors",children:[a.jsx("div",{className:`w-10 h-10 rounded-xl ${i} flex items-center justify-center flex-shrink-0`,children:a.jsx(r,{className:"h-5 w-5"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("p",{className:"text-sm font-medium text-slate-900 line-clamp-1",children:t.title}),a.jsx(Li,{tier:t.reliability_tier||"C",size:"sm"})]}),a.jsx("p",{className:"text-xs text-slate-500 mt-0.5 line-clamp-2",children:t.summary}),a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsx(Ce,{variant:"outline",className:"text-xs",children:t.event_type}),t.amount_usd&&a.jsxs("span",{className:"text-xs font-medium text-emerald-600",children:["$",(t.amount_usd/1e6).toFixed(1),"M"]}),a.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1 ml-auto",children:[a.jsx(Bn,{className:"h-3 w-3"}),t.event_date?jC(new Date(t.event_date),{addSuffix:!0}):"Recently"]})]})]})]},t.id||n)}),(!e||e.length===0)&&a.jsx("p",{className:"text-sm text-slate-500 text-center py-8",children:"No recent activity"})]})})]})}var fk="Progress",hk=100,[qje]=Bi(fk),[Hje,Wje]=qje(fk),n9=P.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=Vje,...o}=e;(i||i===0)&&!d3(i)&&console.error(Kje(`${i}`,"Progress"));const c=d3(i)?i:hk;r!==null&&!f3(r,c)&&console.error(Gje(`${r}`,"Progress"));const d=f3(r,c)?r:null,h=Gx(d)?s(d,c):void 0;return a.jsx(Hje,{scope:n,value:d,max:c,children:a.jsx(vt.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":Gx(d)?d:void 0,"aria-valuetext":h,role:"progressbar","data-state":a9(d,c),"data-value":d??void 0,"data-max":c,...o,ref:t})})});n9.displayName=fk;var r9="ProgressIndicator",i9=P.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=Wje(r9,n);return a.jsx(vt.div,{"data-state":a9(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});i9.displayName=r9;function Vje(e,t){return`${Math.round(e/t*100)}%`}function a9(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Gx(e){return typeof e=="number"}function d3(e){return Gx(e)&&!isNaN(e)&&e>0}function f3(e,t){return Gx(e)&&!isNaN(e)&&e<=t&&e>=0}function Kje(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${hk}\`.`}function Gje(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1043  - a positive number
1044  - less than the value passed to \`max\` (or ${hk} if no \`max\` prop is set)
1045  - \`null\` or \`undefined\` if the progress is indeterminate.
1046
1047Defaulting to \`null\`.`}var s9=n9,Zje=i9;const i2=P.forwardRef(({className:e,value:t,...n},r)=>a.jsx(s9,{ref:r,className:ze("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:a.jsx(Zje,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));i2.displayName=s9.displayName;function Yje({stats:e}){const t=((e==null?void 0:e.tierA)||0)+((e==null?void 0:e.tierB)||0)+((e==null?void 0:e.tierC)||0),n=t>0?Math.round(((e==null?void 0:e.tierA)||0)/t*100):0,r=t>0?Math.round(((e==null?void 0:e.tierB)||0)/t*100):0;return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsx(nt,{className:"text-lg font-semibold",children:"Verification Health"})}),a.jsxs($e,{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm text-slate-600",children:"Intelligence Officer Validated (Tier A)"}),a.jsxs("span",{className:"text-sm font-semibold text-emerald-600",children:[n,"%"]})]}),a.jsx(i2,{value:n,className:"h-2"})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm text-slate-600",children:"Actor Confirmed (Tier B)"}),a.jsxs("span",{className:"text-sm font-semibold text-blue-600",children:[r,"%"]})]}),a.jsx(i2,{value:r,className:"h-2 [&>div]:bg-blue-500"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 pt-4 border-t",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"flex items-center justify-center gap-1 text-amber-600 mb-1",children:a.jsx(Bn,{className:"h-4 w-4"})}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:(e==null?void 0:e.pendingQueue)||0}),a.jsx("p",{className:"text-xs text-slate-500",children:"Pending"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"flex items-center justify-center gap-1 text-emerald-600 mb-1",children:a.jsx(Un,{className:"h-4 w-4"})}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:(e==null?void 0:e.validatedThisWeek)||0}),a.jsx("p",{className:"text-xs text-slate-500",children:"This Week"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"flex items-center justify-center gap-1 text-slate-400 mb-1",children:a.jsx($i,{className:"h-4 w-4"})}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:(e==null?void 0:e.avgDaysToValidate)||"-"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Avg Days"})]})]})]})]})}function Xje({events:e}){const t=(e||[]).filter(r=>r.event_type==="Funding"&&r.amount_usd).slice(0,5),n=r=>r>=1e6?`$${(r/1e6).toFixed(1)}M`:r>=1e3?`$${(r/1e3).toFixed(0)}K`:`$${r}`;return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(pr,{className:"h-5 w-5 text-emerald-600"}),"Recent Funding Events"]})}),a.jsx($e,{children:t.length===0?a.jsx("p",{className:"text-sm text-slate-500 text-center py-4",children:"No recent funding events"}):a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute left-3 top-2 bottom-2 w-0.5 bg-gradient-to-b from-emerald-500 to-teal-300"}),a.jsx("div",{className:"space-y-4",children:t.map((r,i)=>{var s,o;return a.jsxs("div",{className:"relative pl-8",children:[a.jsx("div",{className:"absolute left-1.5 top-1.5 w-3 h-3 rounded-full bg-emerald-500 ring-4 ring-emerald-50"}),a.jsxs("div",{className:"bg-slate-50 rounded-lg p-3",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-medium text-slate-900 text-sm truncate",children:((o=(s=r.entities_involved)==null?void 0:s[0])==null?void 0:o.entity_name)||r.title}),a.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:r.funding_round||"Funding Round"})]}),a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700 shrink-0",children:n(r.amount_usd)})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs text-slate-500",children:[a.jsx(zl,{className:"h-3 w-3"}),r.event_date?Tt(new Date(r.event_date),"MMM d, yyyy"):"Date unknown"]})]})]},r.id||i)})})]})})]})}function Qje({startups:e,investors:t}){const n=[...e||[]].filter(s=>s.total_funding_usd).sort((s,o)=>(o.total_funding_usd||0)-(s.total_funding_usd||0)).slice(0,5),r=[...t||[]].filter(s=>s.portfolio_count_kenya).sort((s,o)=>(o.portfolio_count_kenya||0)-(s.portfolio_count_kenya||0)).slice(0,5),i=s=>s?s>=1e6?`$${(s/1e6).toFixed(1)}M`:s>=1e3?`$${(s/1e3).toFixed(0)}K`:`$${s}`:"-";return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(r$,{className:"h-5 w-5 text-amber-500"}),"Top Performers"]})}),a.jsx($e,{children:a.jsxs(Ns,{defaultValue:"startups",className:"w-full",children:[a.jsxs(qa,{className:"w-full mb-3",children:[a.jsxs(Ut,{value:"startups",className:"flex-1 gap-1.5",children:[a.jsx(er,{className:"h-3.5 w-3.5"}),"Startups"]}),a.jsxs(Ut,{value:"investors",className:"flex-1 gap-1.5",children:[a.jsx(Ri,{className:"h-3.5 w-3.5"}),"Investors"]})]}),a.jsx(cn,{value:"startups",className:"mt-0",children:n.length===0?a.jsx("p",{className:"text-sm text-slate-500 text-center py-4",children:"No data available"}):a.jsx("div",{className:"space-y-2",children:n.map((s,o)=>a.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-slate-50 transition-colors",children:[a.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold ${o===0?"bg-amber-100 text-amber-700":o===1?"bg-slate-200 text-slate-600":o===2?"bg-orange-100 text-orange-700":"bg-slate-100 text-slate-500"}`,children:o+1}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-medium text-slate-900 text-sm truncate",children:s.name}),a.jsx("p",{className:"text-xs text-slate-500",children:s.sector||"Tech"})]}),a.jsxs(Ce,{variant:"outline",className:"shrink-0 gap-1",children:[a.jsx(zl,{className:"h-3 w-3"}),i(s.total_funding_usd)]})]},s.id))})}),a.jsx(cn,{value:"investors",className:"mt-0",children:r.length===0?a.jsx("p",{className:"text-sm text-slate-500 text-center py-4",children:"No data available"}):a.jsx("div",{className:"space-y-2",children:r.map((s,o)=>a.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-slate-50 transition-colors",children:[a.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold ${o===0?"bg-amber-100 text-amber-700":o===1?"bg-slate-200 text-slate-600":o===2?"bg-orange-100 text-orange-700":"bg-slate-100 text-slate-500"}`,children:o+1}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-medium text-slate-900 text-sm truncate",children:s.name}),a.jsx("p",{className:"text-xs text-slate-500",children:s.investor_type||"Investor"})]}),a.jsxs(Ce,{variant:"outline",className:"shrink-0 gap-1",children:[a.jsx(pr,{className:"h-3 w-3"}),s.portfolio_count_kenya," deals"]}
1047)]},s.id))})})]})})]})}const h3=["Idea","Pre-seed","Seed","Series A","Series B","Series C+","Growth","Mature"];function Jje({startups:e}){const t=P.useMemo(()=>{const n=h3.map(r=>({stage:r,count:0}));return(e||[]).forEach(r=>{if(!r.stage)return;const i=h3.indexOf(r.stage);i>=0&&n[i].count++}),n.filter(r=>r.count>0)},[e]);return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsx(nt,{className:"text-lg font-semibold",children:"Startups by Funding Stage"})}),a.jsx($e,{children:t.length===0?a.jsx("div",{className:"h-[300px] flex items-center justify-center text-sm text-slate-400",children:"No stage data available"}):a.jsx("div",{className:"h-[300px]",children:a.jsx(go,{width:"100%",height:"100%",children:a.jsxs(Bf,{data:t,layout:"vertical",margin:{top:5,right:20,left:60,bottom:5},children:[a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#E2E8F0",horizontal:!1}),a.jsx(Ba,{type:"number",tick:{fontSize:12,fill:"#64748B"},allowDecimals:!1}),a.jsx(za,{dataKey:"stage",type:"category",tick:{fontSize:12,fill:"#64748B"},width:60}),a.jsx(cr,{contentStyle:{borderRadius:"8px",border:"none",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"}}),a.jsx(Fi,{dataKey:"count",fill:"#3B82F6",radius:[0,4,4,0],name:"Startups"})]})})})})]})}function eSe({data:e}){const{unverified:t=0,aiCaptured:n=0,actorConfirmed:r=0,keniaValidated:i=0}=e||{},s=t+n+r+i||1,o=[{label:"Unverified",value:t,icon:Bn,color:"bg-slate-400",bgLight:"bg-slate-100",textColor:"text-slate-600"},{label:"AI Captured",value:n,icon:Un,color:"bg-blue-500",bgLight:"bg-blue-100",textColor:"text-blue-600"},{label:"Actor Confirmed",value:r,icon:i$,color:"bg-amber-500",bgLight:"bg-amber-100",textColor:"text-amber-600"},{label:"Intelligence Officer Validated",value:i,icon:pi,color:"bg-emerald-500",bgLight:"bg-emerald-100",textColor:"text-emerald-600"}];return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(pi,{className:"h-5 w-5 text-emerald-600"}),"Verification Funnel"]})}),a.jsxs($e,{children:[a.jsx("div",{className:"space-y-2 mb-4",children:o.map((c,d)=>{const h=c.value/s*100;return a.jsxs("div",{className:"relative",style:{marginLeft:`${d*7.5}%`,marginRight:`${d*7.5}%`},children:[a.jsxs("div",{className:`${c.bgLight} rounded-lg p-2 transition-all hover:scale-[1.02]`,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(c.icon,{className:`h-4 w-4 ${c.textColor}`}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:c.label})]}),a.jsx("span",{className:`text-sm font-bold ${c.textColor}`,children:c.value})]}),a.jsx("div",{className:"mt-1.5 h-1.5 bg-white/50 rounded-full overflow-hidden",children:a.jsx("div",{className:`h-full ${c.color} rounded-full transition-all duration-500`,style:{width:`${h}%`}})})]}),d<o.length-1&&a.jsx("div",{className:"flex justify-center -mb-1",children:a.jsx("div",{className:"w-0.5 h-2 bg-slate-200"})})]},c.label)})}),a.jsxs("div",{className:"bg-slate-50 rounded-lg p-3 mt-4",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-slate-600",children:"Validation Rate"}),a.jsxs("span",{className:"font-bold text-emerald-600",children:[s>0?(i/s*100).toFixed(1):0,"%"]})]}),a.jsxs("div",{className:"flex items-center justify-between text-sm mt-1",children:[a.jsx("span",{className:"text-slate-600",children:"Total Entities"}),a.jsx("span",{className:"font-medium text-slate-700",children:s})]})]})]})]})}const p3={success:{label:"Success",color:"text-emerald-600 bg-emerald-50",icon:Un},partial:{label:"Partial",color:"text-amber-600 bg-amber-50",icon:$i},failed:{label:"Failed",color:"text-red-600 bg-red-50",icon:$i},never_run:{label:"Never Run",color:"text-slate-500 bg-slate-100",icon:Bn}},tSe={Collector:"text-blue-600",Validator:"text-purple-600",QualityControl:"text-amber-600",Insight:"text-teal-600",Notification:"text-pink-600"};function nSe(){const[e,t]=P.useState([]),[n,r]=P.useState([]),[i,s]=P.useState(!0),[o,c]=P.useState(!1),[d,h]=P.useState(!1);P.useEffect(()=>{p(),Q.auth.me().then(j=>h((j==null?void 0:j.role)==="admin")).catch(()=>{})},[]);const p=async()=>{try{const[j,C]=await Promise.all([Q.entities.Agent.list(),Q.entities.AgentRun.filter({},"-started_at",5)]);t(j),r(C)}catch(j){console.error("Error loading agent data:",j),c(!0)}finally{s(!1)}};if(i)return a.jsxs(Ee,{className:"h-full",children:[a.jsx(tt,{children:a.jsxs(nt,{className:"flex items-center gap-2 text-base",children:[a.jsx(Oi,{className:"h-5 w-5 text-emerald-600"}),"Agent Activity"]})}),a.jsx($e,{className:"flex items-center justify-center py-12",children:a.jsx(ln,{className:"h-6 w-6 text-emerald-600 animate-spin"})})]});if(o||e.length===0)return a.jsxs(Ee,{className:"h-full",children:[a.jsx(tt,{children:a.jsxs(nt,{className:"flex items-center gap-2 text-base",children:[a.jsx(Oi,{className:"h-5 w-5 text-emerald-600"}),"Agent Activity"]})}),a.jsx($e,{children:a.jsx("p",{className:"text-sm text-slate-500",children:"No agent data available yet."})})]});const m=e.filter(j=>j.enabled),v=e.reduce((j,C)=>j+(C.last_run_items_found||0),0),x=e.reduce((j,C)=>j+(C.last_run_items_approved||0),0),b=e.filter(j=>j.last_run_at).map(j=>new Date(j.last_run_at)).sort((j,C)=>C-j)[0],_=n.filter(j=>j.items_found>0).slice(0,3);return a.jsxs(Ee,{className:"h-full",children:[a.jsx(tt,{className:"pb-3",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(nt,{className:"flex items-center gap-2 text-base",children:[a.jsx(Oi,{className:"h-5 w-5 text-emerald-600"}),"Agent Activity"]}),d&&a.jsx(yt,{to:ot("AgentConsole"),children:a.jsxs(Ne,{variant:"ghost",size:"sm",className:"gap-1 text-xs",children:["Console",a.jsx(t0,{className:"h-3 w-3"})]})})]})}),a.jsxs($e,{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-slate-900",children:m.length}),a.jsx("div",{className:"text-xs text-slate-500",children:"Active Agents"})]}),a.jsxs("div",{className:"text-center border-l border-r border-slate-100",children:[a.jsx("div",{className:"text-2xl font-bold text-emerald-600",children:v}),a.jsx("div",{className:"text-xs text-slate-500",children:"Items Found"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-blue-600",children:x}),a.jsx("div",{className:"text-xs text-slate-500",children:"Approved"})]})]}),b&&a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 bg-slate-50 rounded-lg px-3 py-2",children:[a.jsx(Bn,{className:"h-3.5 w-3.5"}),a.jsxs("span",{children:["Last scan: ",jC(b,{addSuffix:!0})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[a.jsx(Jx,{className:"h-3 w-3"}),"Agent Status"]}),e.slice(0,5).map(j=>{const C=j.last_run_status||"never_run",E=p3[C]||p3.never_run,A=E.icon;return a.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx("div",{className:ze("p-1 rounded",E.color),children:a.jsx(A,{className:"h-3 w-3"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-700 truncate",children:j.name}),a.jsx("p",{className:ze("text-xs",tSe[j.agent_type]||"text-slate-500"),children:j.agent_type})]})]}),a.jsx("div",{className:"text-right",children:j.last_run_items_found!==void 0&&j.last_run_items_found!==null?a.jsxs(Ce,{variant:"outline",className:"text-xs",children:[j.last_run_items_found," found"]}
1047):a.jsx(Ce,{variant:"outline",className:"text-xs text-slate-400",children:"No runs"})})]},j.id)})]}),_.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[a.jsx(pr,{className:"h-3 w-3"}),"Recent Findings"]}),_.map(j=>a.jsxs("div",{className:"flex items-start gap-2 bg-emerald-50/50 rounded-lg p-2.5",children:[a.jsx("div",{className:"p-1 rounded bg-emerald-100 mt-0.5",children:a.jsx(pr,{className:"h-3 w-3 text-emerald-600"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("p",{className:"text-sm text-slate-700",children:[a.jsx("span",{className:"font-medium",children:j.agent_name})," found"," ",a.jsx("span",{className:"font-semibold text-emerald-700",children:j.items_found})," items"]}),j.started_at&&a.jsx("p",{className:"text-xs text-slate-400",children:jC(new Date(j.started_at),{addSuffix:!0})})]}),a.jsxs(Ce,{className:"bg-emerald-600 text-white text-xs shrink-0",children:[j.items_approved||0," approved"]})]},j.id))]}),d&&a.jsx(yt,{to:ot("AgentConsole"),children:a.jsxs(Ne,{variant:"outline",className:"w-full text-sm gap-2",children:[a.jsx(Oi,{className:"h-4 w-4"}),"View All Agents"]})})]})]})}function rSe(){const[e,t]=P.useState(""),[n,r]=P.useState(!1),[i,s]=P.useState(!1),o=F$(),{toast:c}=zf();P.useEffect(()=>{let p=!0;return Q.auth.me().then(()=>p&&r(!0)).catch(()=>p&&r(!1)),()=>{p=!1}},[]);const d=p=>{n||(p.preventDefault(),s(!0),c({title:"Search is for registered users only",description:"Please sign in or register to search the ecosystem database.",variant:"destructive"}),setTimeout(()=>{Q.auth.redirectToLogin()},800))},h=p=>{if(p.preventDefault(),!n){s(!0),c({title:"Search is for registered users only",description:"Please sign in or register to search the ecosystem database.",variant:"destructive"}),setTimeout(()=>Q.auth.redirectToLogin(),800);return}e.trim()&&o(ot("Search")+`?q=${encodeURIComponent(e.trim())}`)};return a.jsxs("div",{className:"bg-gradient-to-br from-emerald-600 to-teal-700 rounded-2xl p-6 text-white flex flex-col justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Explore the Ecosystem"}),a.jsx("p",{className:"text-emerald-100 mb-6",children:"Discover Kenya's vibrant innovation landscape with verified data on startups, investors, and ecosystem support organizations."}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[a.jsx(yt,{to:ot("Startups"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(er,{className:"h-4 w-4"}),"Browse Startups"]})}),a.jsx(yt,{to:ot("Investors"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(Ri,{className:"h-4 w-4"}),"Find Investors"]})}),a.jsx(yt,{to:ot("ESOs"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(tr,{className:"h-4 w-4"}),"Discover ESOs"]})}),a.jsx(yt,{to:ot("Search"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(pr,{className:"h-4 w-4"}),"Advanced Search"]})})]}),a.jsxs("form",{onSubmit:h,className:"mb-2",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Wt,{value:e,onChange:p=>{if(!n){d(p);return}t(p.target.value)},onKeyDown:p=>{!n&&p.key!=="Tab"&&p.key!=="Escape"&&d(p)},onFocus:()=>{n||s(!0)},placeholder:"Search startups, investors, ESOs...",className:"w-full h-12 bg-white/95 text-slate-900 placeholder:text-slate-400 border-0 rounded-xl pr-11 text-base shadow-sm"}),a.jsx(hr,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-5 w-5 text-emerald-600"})]}),a.jsxs(Ne,{type:"submit",className:"w-full mt-3 h-11 bg-white text-emerald-700 hover:bg-emerald-50 font-semibold text-base gap-2",children:[a.jsx(hr,{className:"h-5 w-5"}),"Search"]}),i&&!n&&a.jsxs("p",{className:"mt-2 text-sm text-amber-100 flex items-center gap-1.5",children:[a.jsx(Tl,{className:"h-4 w-4"}),"Search is available for registered users only. Redirecting to login..."]})]})]}),a.jsxs("div",{className:"mt-6 pt-6 border-t border-white/20",children:[a.jsx("p",{className:"text-xs text-emerald-100 mb-3 font-medium",children:"Also explore"}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsx(yt,{to:ot("GovInnovation"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(Ti,{className:"h-4 w-4"}),"Gov Innovation"]})}),a.jsx(yt,{to:ot("Events"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(c2,{className:"h-4 w-4"}),"Events"]})}),a.jsx(yt,{to:ot("Insights"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(sa,{className:"h-4 w-4"}),"Insights"]})}),a.jsx(yt,{to:ot("PublicSubmit"),children:a.jsxs(Ne,{variant:"secondary",className:"w-full bg-white/10 hover:bg-white/20 text-white border-0 gap-2",children:[a.jsx(cf,{className:"h-4 w-4"}),"Submit Info"]})})]})]})]})}const iSe="https://media.base44.com/images/public/6984885939cff3c6798f183e/9e05519d9_Gemini_Generated_Image_3.png";function aSe(){return a.jsx(yt,{to:ot("Solutions"),className:"block",children:a.jsx("div",{className:"bg-gradient-to-br from-slate-900 to-slate-800 rounded-2xl overflow-hidden hover:shadow-lg transition-shadow",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 ga
1047p-0 items-stretch",children:[a.jsxs("div",{className:"lg:col-span-3 p-8 lg:p-10 text-white flex flex-col justify-center",children:[a.jsxs("div",{className:"flex items-center gap-2 text-emerald-400 text-sm font-medium mb-3",children:[a.jsx(ca,{className:"h-4 w-4"}),"Custom Intelligence Dashboards"]}),a.jsx("h3",{className:"text-2xl lg:text-3xl font-bold mb-3",children:"Need this for your country or a different domain?"}),a.jsx("p",{className:"text-slate-300 leading-relaxed mb-6 max-w-xl",children:"We deploy the same OSINT engine: automated collection, AI validation, and decision-grade dashboards for any sector: education, welfare, security, crime, agriculture, health, and beyond. Tell us your country and domain, and we'll scope a dashboard built for you."}),a.jsx("div",{children:a.jsxs(Ne,{className:"bg-emerald-600 hover:bg-emerald-700 gap-2",children:["Need a dashboard? ",a.jsx(Lr,{className:"h-4 w-4"})]})})]}),a.jsxs("div",{className:"lg:col-span-2 relative min-h-[220px] lg:min-h-full",children:[a.jsx("img",{src:iSe,alt:"Three-stage intelligence pipeline: collection, processing and dissemination",loading:"lazy",className:"absolute inset-0 w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-slate-900/70 via-slate-900/10 to-transparent lg:from-slate-900/50"})]})]})})})}function sSe(){var m,v,x;const[e,t]=P.useState(!0),[n,r]=P.useState(!1),[i,s]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState({startups:0,investors:0,esos:0,govPrograms:0,govAiCount:0,totalFunding:0,tierDistribution:{A:0,B:0,C:0},verificationHealth:{},sectorData:[],countyData:[],investorsByCounty:{},esosByCounty:{},fundingTrend:[],recentEvents:[],allStartups:[],allInvestors:[],verificationFunnel:{},growthData:{current:{},previous:{}},kpiChanges:{startups:void 0,investors:void 0,esos:void 0,funding:void 0}});P.useEffect(()=>{(async()=>{let w=!1;try{const b=await Q.auth.me();w=(b==null?void 0:b.role)==="admin",s(w)}catch{s(!1)}p(w)})()},[]);const p=async(w=!1)=>{var b;try{const[_,j,C,E,A,k,M,I]=await Promise.all([Q.entities.Startup.list(),Q.entities.Investor.list(),Q.entities.ESO.list(),Q.entities.EcosystemEvent.filter({reliability_tier:"A"},"-event_date",10),Q.entities.GovProgram.list(),Q.entities.Snapshot.list("-snapshot_date",6).catch(()=>[]),Q.entities.AgentRun.list("-started_at",1).catch(()=>[]),Q.entities.VerificationRequest.filter({status:"pending"}).catch(()=>[])]),$=_.filter(Oe=>Dr(Oe,w)),q=j.filter(Oe=>Dr(Oe,w)),V=C.filter(Oe=>Dr(Oe,w)),H=A.filter(Oe=>Dr(Oe,w)),U=E.filter(Oe=>Yv(Oe,w));M.length>0&&M[0].ended_at?c(new Date(M[0].ended_at)):M.length>0&&M[0].started_at&&c(new Date(M[0].started_at));const z=[...$,...q,...V],Z=z.reduce((Oe,lt)=>{const Ge=lt.reliability_tier||"C";return Oe[Ge]=(Oe[Ge]||0)+1,Oe},{A:0,B:0,C:0}),ee=$.reduce((Oe,lt)=>Oe+(lt.total_funding_usd||0),0),G={fintech:"Fintech","digital banking":"Fintech","wealth management":"Fintech","fintech / investment":"Fintech",insurtech:"Fintech","agricultural insurance":"Fintech",agritech:"Agritech",agriculture:"Agritech","agri-tech / climate-tech":"Agritech","climate-smart agriculture":"Agritech",healthtech:"Healthtech",telemedicine:"Healthtech",mhealth:"Healthtech","pharmacy and drug supply chain":"Healthtech","assistive technology":"Healthtech",edtech:"Edtech","digital literacy":"Edtech","technology and education":"Edtech",cleantech:"Cleantech","clean cooking":"Cleantech","solar / wind / storage":"Cleantech","solar / mini-grid":"Cleantech","iot / energy efficiency":"Cleantech","data / energy mgmt":"Cleantech","cleantech / air quality":"Cleantech",logistics:"Logistics",transportation:"Logistics","logistics and surveillance":"Logistics","electric mobility":"Logistics","mobility & transport":"Logistics","electric vehicle":"Logistics","e-commerce":"E-commerce","e-commerce & b2b retail":"E-commerce",saas:"SaaS",software:"SaaS","artificial intelligence":"AI/ML",blockchain:"Blockchain",hardware:"Hardware",tourism:"Tourism","travel tech":"Tourism","hospitality tech":"Tourism",traveltech:"Tourism"},oe=Oe=>G[(Oe||"").toLowerCase().trim()]||"Other",W=$.reduce((Oe,lt)=>{if(lt.sector){const Ge=oe(lt.sector);Oe[Ge]=(Oe[Ge]||0)+1}return Oe},{}),ie=Object.entries(W).map(([Oe,lt])=>({sector:Oe,count:lt})).sort((Oe,lt)=>lt.count-Oe.count).slice(0,12),ae=Oe=>{if(!Oe)return null;const lt=Oe.trim().replace(/\s+County$/i,"").trim();return!lt||/^(undisclosed|rural|nationwide)$/i.test(lt)?null:lt},K={Nairobi:"Nairobi",Mombasa:"Mombasa",Kisumu:"Kisumu",Nakuru:"Nakuru",Eldoret:"Uasin Gishu",Nyeri:"Nyeri",Meru:"Meru",Kakamega:"Kakamega",Machakos:"Machakos",Kajiado:"Kajiado",Kilifi:"Kilifi",Kwale:"Kwale",Garissa:"Garissa",Kitale:"Trans Nzoia",Nanyuki:"Laikipia",Thika:"Kiambu",Malindi:"Kilifi",Lamu:"Lamu",Wajir:"Wajir",Isiolo:"Isiolo",Bungoma:"Bungoma",Busia:"Busia",Siaya:"Siaya",Kericho:"Kericho",Bomet:"Bomet",Kisii:"Kisii",Nyamira:"Nyamira","Homa Bay":"Homa Bay",Migori:"Migori",Turkana:"Turkana","West Pokot":"West Pokot","U
1047asin Gishu":"Uasin Gishu",Nandi:"Nandi",Laikipia:"Laikipia",Vihiga:"Vihiga","Murang'a":"Murang'a",Kiambu:"Kiambu",Kirinyaga:"Kirinyaga",Nyandarua:"Nyandarua",Embu:"Embu","Taita Taveta":"Taita Taveta",Makueni:"Makueni",Marsabit:"Marsabit"},ne=Oe=>{const lt=ae(Oe.county);if(lt)return lt;if(Oe.city){const Ge=Oe.city.trim();return K[Ge]||K[Ge.toLowerCase()]||null}return null},ve=$.reduce((Oe,lt)=>{const Ge=ne(lt);return Ge&&(Oe[Ge]=(Oe[Ge]||0)+1),Oe},{}),je=Object.entries(ve).map(([Oe,lt])=>({county:Oe,count:lt})).sort((Oe,lt)=>lt.count-Oe.count),Y=q.reduce((Oe,lt)=>{const Ue=(lt.kenya_address||lt.headquarters_country||"").split(",").map(At=>At.trim()).filter(Boolean),Et=Ue.length>0?Ue[Ue.length-1]:null;return Et&&Et.toLowerCase()!=="kenya"&&(Oe[Et]=(Oe[Et]||0)+1),Oe},{}),he=V.reduce((Oe,lt)=>{const Ge=ne(lt);return Ge&&(Oe[Ge]=(Oe[Ge]||0)+1),Oe},{});let fe=[];if(k.length>0&&(fe=k.slice().reverse().map(Oe=>{var lt;return{month:Oe.snapshot_date?Tt(new Date(Oe.snapshot_date),"MMM"):"N/A",amount:((lt=Oe.metrics)==null?void 0:lt.total_funding_usd)||0}}).slice(-6)),fe.length===0){const lt=(await Q.entities.EcosystemEvent.filter({event_type:"Funding"},"-event_date",60).catch(()=>[])).filter(Ue=>Yv(Ue,w)),Ge={};lt.forEach(Ue=>{if(Ue.event_date&&Ue.amount_usd){const Et=Tt(new Date(Ue.event_date),"MMM yyyy");Ge[Et]=(Ge[Et]||0)+Ue.amount_usd}}),fe=Object.entries(Ge).slice(-6).map(([Ue,Et])=>({month:Ue.split(" ")[0],amount:Et}))}const _e=new Date;_e.setDate(_e.getDate()-7);const de=z.filter(Oe=>Oe.last_verified_at&&new Date(Oe.last_verified_at)>=_e).length,we=z.filter(Oe=>Oe.created_date&&Oe.last_verified_at&&new Date(Oe.last_verified_at)>=new Date(Oe.created_date)),ke=we.length>0?Math.round(we.reduce((Oe,lt)=>Oe+(new Date(lt.last_verified_at)-new Date(lt.created_date)),0)/we.length/(1e3*60*60*24)):0,re={tierA:Z.A,tierB:Z.B,tierC:Z.C,pendingQueue:I.length,validatedThisWeek:de,avgDaysToValidate:ke},Re=z.reduce((Oe,lt)=>{const Ge=lt.verification_status||"UNVERIFIED";return Ge==="UNVERIFIED"?Oe.unverified++:Ge==="AI_CAPTURED"?Oe.aiCaptured++:Ge==="ACTOR_CONFIRMED"?Oe.actorConfirmed++:Ge==="KENIA_VALIDATED"&&Oe.keniaValidated++,Oe},{unverified:0,aiCaptured:0,actorConfirmed:0,keniaValidated:0}),ge=new Date,Be=new Date(ge.getFullYear(),ge.getMonth(),1),Le=new Date(ge.getFullYear(),ge.getMonth()-1,1),rt=Oe=>{const lt=Oe.filter(Ue=>Ue.created_date&&new Date(Ue.created_date)>=Be).length,Ge=Oe.filter(Ue=>{if(!Ue.created_date)return!1;const Et=new Date(Ue.created_date);return Et>=Le&&Et<Be}).length;return{thisMonth:lt,lastMonth:Ge}},Ct=rt($),_t=rt(q),Gt=rt(V),qt=(Oe,lt)=>lt===0?Oe>0?100:0:Math.round((Oe-lt)/lt*100),dn={startups:Ct.lastMonth>0?qt(Ct.thisMonth,Ct.lastMonth):void 0,investors:_t.lastMonth>0?qt(_t.thisMonth,_t.lastMonth):void 0,esos:Gt.lastMonth>0?qt(Gt.thisMonth,Gt.lastMonth):void 0,funding:void 0},nn=(b=k[0])==null?void 0:b.metrics,qe={current:{startups:$.length,investors:q.length,esos:V.length,funding:ee},previous:{startups:(nn==null?void 0:nn.total_startups)||_.length-Ct.thisMonth,investors:(nn==null?void 0:nn.total_investors)||j.length-_t.thisMonth,esos:(nn==null?void 0:nn.total_esos)||C.length-Gt.thisMonth,funding:(nn==null?void 0:nn.total_funding_usd)||ee}};h({startups:$.length,investors:q.length,esos:V.length,govPrograms:H.length,govAiCount:H.filter(Oe=>Oe.ai_initiatives).length,totalFunding:ee,tierDistribution:Z,verificationHealth:re,sectorData:ie,countyData:je,investorsByCounty:Y,esosByCounty:he,fundingTrend:fe,recentEvents:U,allStartups:$,allInvestors:q,verificationFunnel:Re,growthData:qe,kpiChanges:dn})}catch(_){console.error("Error loading dashboard:",_),r(!0)}finally{t(!1)}};return e?a.jsx("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading dashboard data..."})}):n?a.jsx("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-8 text-center",children:[a.jsx("h2",{className:"text-lg font-semibold text-red-900 mb-2",children:"Couldn't load dashboard data"}),a.jsx("p",{className:"text-sm text-red-700 mb-4",children:"There was a problem reaching the server. Please try again."}),a.jsx(Ne,{onClick:()=>{r(!1),t(!0),p(i)},className:"bg-red-600 hover:bg-red-700",children:"Retry"})]})}):a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500 mb-4 bg-slate-100 rounded-lg px-4 py-2 w-fit",children:[a.jsx(Bn,{className:"h-4 w-4"}),o?a.jsxs("span",{children:["Last data update: ",a.jsx("span",{className:"font-medium text-slate-700",children:Tt(o,"MMM d, yyyy, h:mm a")})]}):a.jsxs("span",{children:["Last data update: ",a.jsx("span",{className:"font-medium text-slate-700",children:"No agent runs yet"})]}),a.jsx("span",{className:"text-slate-300",children:"|"}),a.jsx("span",{children:"Agents run on scheduled workflows automatically"})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-3xl font-bold text-slate-900 tracking-tight",children:"Kenya Innovation Ecosystem"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Independent OSINT intelligence on startups, capital, policy and innovation"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(yt,{to:ot("Insights"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2",children:[a.jsx(qm,{className:"h-4 w-4"}),"View Insights"]})}),a.jsx(yt,{to:ot("Reports"),children:a.jsxs(Ne,{className:"bg-emerald-600 hover:bg-emerald-700 gap-2",children:["Generate Report",a.jsx(Lr,{className:"h-4 w-4"})]})})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[a.jsx(kl,{title:"Total Startups",value:d.startups,change:(m=d.kpiChanges)==null?void 0:m.startups,changeLabel:"vs last month",icon:er,iconColor:"bg-emerald-500"}),a.jsx(kl,{title:"Active Investors",value:d.investors,change:(v=d.kpiChanges)==null?void 0:v.investors,changeLabel:"vs last month",icon:Ri,iconColor:"bg-blue-500"}),a.jsx(kl,{title:"ESOs & Hubs",value:d.esos,change:(x=d.kpiChanges)==null?void 0:x.esos,changeLabel:"vs last month",icon:tr,iconColor:"bg-purple-500"}),a.jsx(kl,{title:"Total Funding",value:d.totalFunding,format:"currency",change:void 0,changeLabel:"tracked to date",icon:zl,iconColor:"bg-
1047amber-500"})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6",children:[a.jsx(yt,{to:ot("GovInnovation"),className:"lg:col-span-2",children:a.jsxs("div",{className:"bg-gradient-to-br from-slate-800 to-slate-900 rounded-2xl p-6 text-white hover:shadow-lg transition-shadow h-full",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-11 h-11 rounded-xl bg-white/10 flex items-center justify-center",children:a.jsx(Ti,{className:"h-6 w-6 text-emerald-400"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Government Innovation & Public Administration"}),a.jsx("p",{className:"text-sm text-slate-300",children:"AI, digital services, and efficiency across ministries & agencies"})]})]}),a.jsx(Lr,{className:"h-5 w-5 text-slate-400"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold",children:d.govPrograms}),a.jsx("p",{className:"text-xs text-slate-400",children:"Institutions tracked"})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-2xl font-bold flex items-center gap-1",children:[a.jsx(lf,{className:"h-4 w-4 text-emerald-400"}),d.govAiCount]}),a.jsx("p",{className:"text-xs text-slate-400",children:"With AI initiatives"})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-2xl font-bold",children:[Math.round(d.govPrograms?d.govAiCount/d.govPrograms*100:0),"%"]}),a.jsx("p",{className:"text-xs text-slate-400",children:"AI adoption rate"})]})]})]})}),a.jsx(yt,{to:ot("PublicSubmit"),children:a.jsxs("div",{className:"bg-gradient-to-br from-emerald-600 to-teal-700 rounded-2xl p-6 text-white hover:shadow-lg transition-shadow h-full flex flex-col justify-between",children:[a.jsxs("div",{children:[a.jsx("div",{className:"w-11 h-11 rounded-xl bg-white/10 flex items-center justify-center mb-4",children:a.jsx(cf,{className:"h-6 w-6 text-white"})}),a.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Help us improve the data"}),a.jsx("p",{className:"text-sm text-emerald-100",children:"Submit a new startup, investor, government program, event, or correction. Or suggest information sources that you think we don't know or aren't covering. Every submission is AI-verified and reviewed by our analysts before publishing."})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-4 text-sm font-medium",children:["Submit info ",a.jsx(Lr,{className:"h-4 w-4"})]})]})})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6",children:[a.jsx("div",{className:"lg:col-span-2",children:a.jsx(gje,{data:d.fundingTrend})}),a.jsx(mje,{data:d.tierDistribution})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6",children:[a.jsx(yje,{data:d.sectorData}),a.jsx("div",{className:i?"":"lg:col-span-2",children:a.jsx(Fje,{data:d.countyData,investorsByCounty:d.investorsByCounty,esosByCounty:d.esosByCounty})}),i&&a.jsx(eSe,{data:d.verificationFunnel})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6",children:[a.jsx(Xje,{events:d.recentEvents}),a.jsx(Qje,{startups:d.allStartups,investors:d.allInvestors}),a.jsx(Jje,{startups:d.allStartups})]}),i&&a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6",children:a.jsx(Yje,{stats:d.verificationHealth})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsx(Uje,{events:d.recentEvents}),a.jsx(nSe,{}),a.jsx(rSe,{})]}),a.jsx("div",{className:"mt-6",children:a.jsx(aSe,{})})]})}function oSe(){var m,v,x,w,b;const[e,t]=P.useState(null),[n,r]=P.useState([]),[i,s]=P.useState(!0),[o,c]=P.useState(!1),h=new URLSearchParams(window.location.search).get("id");P.useEffect(()=>{Q.auth.me().then(_=>c((_==null?void 0:_.role)==="admin")).catch(()=>c(!1)),h&&p()},[h]);const p=async()=>{try{const[_,j]=await Promise.all([Q.entities.Investor.filter({id:h}),Q.entities.Claim.filter({entity_id:h,entity_type:"Investor"})]);_.length>0&&t(_[0]),r(j)}catch(_){console.error("Error loading investor:",_)}finally{s(!1)}};return i?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading investor details..."})}):!e||!Dr(e,o)?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx("p",{className:"text-center text-slate-500",children:"Investor not found"})}):a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs(yt,{to:ot("Investors"),className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[a.jsx(e0,{className:"h-4 w-4"}),"Back to Investors"]}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 mb-8",children:[a.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.logo_url?a.jsx("img",{src:e.logo_url,alt:e.name,className:"w-20 h-20 rounded-2xl object-cover"}):a.jsx("div",{className:"w-20 h-20 rounded-2xl bg-gradient-to-br from-blue-400 to-indigo-500 flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-2xl",children:((m=e.name)==null?void 0:m[0])||"?"})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:e.name}),a.jsx(Li,{tier:e.reliability_tier||"C",showScore:!0,score:e.reliability_score})]}),a.jsx("p",{className:"text-slate-600 mt-2",children:e.description}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-4",children:[e.investor_type&&a.jsx(Ce,{className:"bg-blue-100 text-blue-700",children:e.investor_type}),e.kenya_office&&a.jsx(Ce,{variant:"outline",className:"border-emerald-300 text-emerald-700",children:"Kenya Office"}),a.jsx(gu,{status:e.verification_status,size:"sm"})]})]})]}),a.jsxs("div",{className:"flex gap-4",children:[e.portfolio_count_kenya&&a.jsxs(Ee,{className:"px-4 py-3 bg-blue-50 border-blue-100",children:[a.jsx("p",{className:"text-xs text-blue-600 font-medium",children:"Kenya Portfolio"}),a.jsx("p",{className:"text-xl font-bold text-blue-700",children:e.portfolio_count_kenya})]}),e.total_deployed_kenya_usd&&a.jsxs(Ee,{className:"px-4 py-3 bg-emerald-50 border-emerald-100",children:[a.jsx("p",{className:"text-xs text-emerald-600 font-medium",children:"Deployed in Kenya"}),a.jsxs("p",{className:"text-xl font-bold text-emerald-700",children:["$",(e.total_deployed_kenya_usd/1e6).toFixed(1),"M"]})]})]})]}),a.jsxs(Ns,{defaultValue:"overview",className:"space-y-6",children:[a.jsxs(qa,{children:[a.jsx(Ut,{value:"overview",children:"Overview"}),a.jsx(Ut,{value:"portfolio",children:"Portfolio"}),a.jsxs(Ut,{value:"sources",children:["Sources (",n.length,")"]})]}),a.jsx(cn,{value:"overview",className:"space-y-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Investment Focus"})}
1047),a.jsxs($e,{className:"space-y-4",children:[((v=e.investment_stages)==null?void 0:v.length)>0&&a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Rv,{className:"h-5 w-5 text-slate-400 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Investment Stages"}),a.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.investment_stages.map(_=>a.jsx(Ce,{variant:"outline",className:"text-xs",children:_},_))})]})]}),((x=e.investment_sectors)==null?void 0:x.length)>0&&a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Ri,{className:"h-5 w-5 text-slate-400 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Focus Sectors"}),a.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.investment_sectors.map(_=>a.jsx(Ce,{variant:"secondary",className:"text-xs",children:_},_))})]})]}),(e.ticket_size_min_usd||e.ticket_size_max_usd)&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(zl,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Ticket Size"}),a.jsxs("p",{className:"font-medium",children:["$",e.ticket_size_min_usd?`${(e.ticket_size_min_usd/1e3).toFixed(0)}K`:"?"," - $",e.ticket_size_max_usd?`${(e.ticket_size_max_usd/1e6).toFixed(1)}M`:"?"]})]})]}),e.fund_size_usd&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(pr,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Fund Size"}),a.jsxs("p",{className:"font-medium",children:["$",(e.fund_size_usd/1e6).toFixed(0),"M"]})]})]})]})]}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Contact & Links"})}),a.jsxs($e,{className:"space-y-4",children:[e.headquarters_country&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Cu,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Headquarters"}),a.jsx("p",{className:"font-medium",children:e.headquarters_country})]})]}),e.kenya_address&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(er,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Kenya Office"}),a.jsx("p",{className:"font-medium",children:e.kenya_address})]})]}),e.website&&a.jsxs("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(ou,{className:"h-5 w-5"}),e.website]}),e.linkedin_url&&a.jsxs("a",{href:e.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(zp,{className:"h-5 w-5"}),"LinkedIn"]}),e.contact_email&&a.jsx(Qp,{icon:Nu,value:e.contact_email,label:"Sign in to view email"})]})]}),((w=e.key_partners)==null?void 0:w.length)>0&&a.jsxs(Ee,{className:"lg:col-span-2",children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Key Partners"})}),a.jsx($e,{children:a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.key_partners.map((_,j)=>{var C;return a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-slate-50",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center",children:a.jsx("span",{className:"font-medium text-blue-600",children:((C=_.name)==null?void 0:C[0])||"?"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:_.name}),a.jsx("p",{className:"text-sm text-slate-500",children:_.role})]}),_.linkedin&&a.jsx("a",{href:_.linkedin,target:"_blank",rel:"noopener noreferrer",className:"ml-auto",children:a.jsx(zp,{className:"h-4 w-4 text-blue-600"})})]},j)})})})]})]})}),a.jsx(cn,{value:"portfolio",children:a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Kenya Portfolio Companies"})}),a.jsx($e,{children:((b=e.portfolio_companies)==null?void 0:b.length)>0?a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.portfolio_companies.map((_,j)=>a.jsx("div",{className:"p-3 rounded-lg border bg-white hover:shadow-sm transition-shadow",children:a.jsx("p",{className:"font-medium text-slate-900",children:_})},j))}):a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No portfolio companies listed"})})]})}),a.jsx(cn,{value:"sources",children:a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Data Sources & Claims"})}),a.jsx($e,{children:n.length>0?a.jsx("div",{className:"space-y-3",children:n.map(_=>a.jsxs("div",{className:"p-4 rounded-lg border",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-slate-700",children:[a.jsxs("span",{className:"text-slate-500",children:[_.field_name,":"]})," ",_.field_value]}),_.evidence_snippet&&a.jsxs("p",{className:"text-xs text-slate-500 mt-1 italic",children:['"',_.evidence_snippet,'"']})]}),a.jsx(gu,{status:_.status,size:"sm"})]}),a.jsx("div",{className:"flex items-center gap-3 mt-2 text-xs text-slate-400",children:a.jsx(Li,{tier:_.reliability_tier||"C",size:"sm"})})]},_.id))}):a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No source claims recorded"})})]})})]}),a.jsx(Ee,{className:"mt-8 p-4 bg-slate-50 border-slate-200",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Bn,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("span",{className:"text-slate-500",children:"Last verified: "}),a.jsx("span",{className:"font-medium",children:e.last_verified_at?Tt(new Date(e.last_verified_at),"MMM d, yyyy"):"Never"})]})]}),a.jsxs(Ne,{variant:"outline",className:"gap-2",children:[a.jsx(ur,{className:"h-4 w-4"}),"Suggest an Edit"]})]})})]})}const lSe=["VC Fund","Angel Investor","Angel Network","Corporate VC","Family Office","PE Fund","Impact Investor","DFI","Accelerator","Other"],cSe=[{value:"A",label:"Tier A - IO Validated"}
1047,{value:"B",label:"Tier B - Actor Confirmed"},{value:"C",label:"Tier C - OSINT Captured"}];function uSe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState("grid"),{isSignedIn:o,signIn:c}=D0(),[d,h]=P.useState({search:"",investor_type:"all",stage:"all",tier:"all"}),[p,m]=P.useState(!1);P.useEffect(()=>{Q.auth.me().then(C=>m((C==null?void 0:C.role)==="admin")).catch(()=>m(!1)),v()},[]);const v=async()=>{try{const C=await Q.entities.Investor.list("-reliability_score",100);t(C)}catch(C){console.error("Error loading investors:",C)}finally{r(!1)}},x=(C,E)=>{h(A=>({...A,[C]:E}))},w=()=>{h({search:"",investor_type:"all",stage:"all",tier:"all"})},b=e.filter(C=>{var E,A;if(!Dr(C,p))return!1;if(d.search){const k=d.search.toLowerCase();if(!(((E=C.name)==null?void 0:E.toLowerCase().includes(k))||((A=C.description)==null?void 0:A.toLowerCase().includes(k))))return!1}return!(d.investor_type!=="all"&&C.investor_type!==d.investor_type||d.tier!=="all"&&C.reliability_tier!==d.tier)}),_=()=>{const C=["Name","Type","HQ Country","Kenya Office","Portfolio Count","Tier","Website"],E=b.map(A=>[A.name,A.investor_type,A.headquarters_country,A.kenya_office?"Yes":"No",A.portfolio_count_kenya||"",A.reliability_tier,A.website]);iP(rP(C,E),"kenya-investors.csv")},j=[{header:"Investor",accessor:"name",cell:C=>{var E;return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-400 to-indigo-500 flex items-center justify-center text-white font-medium",children:((E=C.name)==null?void 0:E[0])||"?"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:C.name}),a.jsx("p",{className:"text-xs text-slate-500",children:C.investor_type})]})]})}},{header:"Type",accessor:"investor_type",cell:C=>C.investor_type&&a.jsx(Ce,{variant:"outline",children:C.investor_type})},{header:"HQ",accessor:"headquarters_country",cell:C=>C.headquarters_country||"-"},{header:"Kenya Portfolio",accessor:"portfolio_count_kenya",cell:C=>C.portfolio_count_kenya||"-"},{header:"Tier",accessor:"reliability_tier",cell:C=>a.jsx(Li,{tier:C.reliability_tier||"C",size:"sm"})}];return a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Investors Registry"}),a.jsxs("p",{className:"text-slate-500 mt-1",children:[b.length," investors active in Kenya's ecosystem"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"flex items-center border rounded-lg p-1 bg-slate-100",children:[a.jsx(Ne,{variant:i==="grid"?"secondary":"ghost",size:"sm",onClick:()=>s("grid"),className:"px-3",children:a.jsx(d2,{className:"h-4 w-4"})}),a.jsx(Ne,{variant:i==="list"?"secondary":"ghost",size:"sm",onClick:()=>s("list"),className:"px-3",children:a.jsx(h2,{className:"h-4 w-4"})})]}),o?a.jsxs(Ne,{variant:"outline",onClick:_,className:"gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Export"]}):a.jsxs(Ne,{variant:"outline",onClick:c,className:"gap-2 border-emerald-200 text-emerald-700 hover:bg-emerald-50",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Sign in to Export"]})]})]}),a.jsx("div",{className:"mb-6",children:a.jsx($0,{filters:d,onFilterChange:x,onClear:w,searchPlaceholder:"Search investors...",filterOptions:[{key:"investor_type",label:"Type",options:lSe.map(C=>({value:C,label:C}))},{key:"tier",label:"Tier",options:cSe}]})}),n?a.jsx(Mn,{message:"Loading investors..."}):b.length===0?a.jsx(fr,{icon:Ri,title:"No investors found",description:"Try adjusting your filters or search query",action:w,actionLabel:"Clear Filters"}):i==="grid"?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:b.map(C=>a.jsx(ro,{entity:C,entityType:"Investor",detailPage:"InvestorDetail"},C.id))}):a.jsx(nP,{columns:j,data:b,searchable:!1,pageSize:15})]})}const MN=e=>e?e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`:"$0",Vr=e=>String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),lv=["#10b981","#3b82f6","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#ef4444","#6366f1","#84cc16","#f97316"],dSe=["#10b981","#3b82f6","#cbd5e1"];function fSe(e){var C,E,A,k;const t=e.key_metrics||{},n=(C=e.charts_data)==null?void 0:C.funding_trend,r=e.sector_breakdown||((E=e.funding_summary)==null?void 0:E.by_sector)||{},i=(A=e.charts_data)==null?void 0:A.verification_status,s=Object.entries(r).map(([M,I])=>({name:M,value:I})).sort((M,I)=>I.value-M.value).slice(0,8),o=s.reduce((M,I)=>M+I.value,0)||1,c=((k=n==null?void 0:n.weeks)==null?void 0:k.map(M=>({label:M.week,amount:M.amount||0,deals:M.deals||0}
1047)))||[],d=Math.max(1,...c.map(M=>M.amount)),h=[{label:"Tier A (Verified)",value:t.tier_a_count||0,color:"#10b981"},{label:"Tier B (Confirmed)",value:t.tier_b_count||0,color:"#3b82f6"},{label:"Tier C (Unverified)",value:t.tier_c_count||0,color:"#cbd5e1"}],p=h.reduce((M,I)=>M+I.value,0)||1,m=(t.agent_roster||[]).map(M=>`
1048    <tr>
1049      <td><strong>${Vr(M.name)}</strong></td>
1050      <td><span class="badge-outline">${Vr(M.agent_type)}</span></td>
1051      <td class="muted">${Vr(M.schedule)}</td>
1052      <td class="muted">${Vr(M.last_run_status)}</td>
1053      <td class="muted">${M.last_run_items_found||0}</td>
1054    </tr>`).join(""),v=(e.highlights||[]).map((M,I)=>`
1055    <li>
1056      <span class="num">${I+1}</span>
1057      <span>${Vr(M)}</span>
1058    </li>`).join(""),x=c.map(M=>`
1059    <div class="bar-col">
1060      <div class="bar" style="height:${Math.round(M.amount/d*100)}%"></div>
1061      <div class="bar-val">${MN(M.amount)}</div>
1062      <div class="bar-label">${Vr(M.label)}</div>
1063    </div>`).join(""),w=s.map((M,I)=>{const $=Math.round(M.value/o*100);return`
1064    <div class="seg-row">
1065      <span class="seg-dot" style="background:${lv[I%lv.length]}"></span>
1066      <span class="seg-name">${Vr(M.name)}</span>
1067      <div class="seg-track"><div class="seg-fill" style="width:${$}%;background:${lv[I%lv.length]}"></div></div>
1068      <span class="seg-val">${M.value} (${$}%)</span>
1069    </div>`}).join(""),b=h.map((M,I)=>{const $=Math.round(M.value/p*100);return`
1070    <div class="tier-row">
1071      <div class="tier-head"><span>${M.label}</span><span class="tier-val">${M.value} (${$}%)</span></div>
1072      <div class="tier-track"><div class="tier-fill" style="width:${$}%;background:${M.color}"></div></div>
1073    </div>`}).join(""),_=i?`
1074    <div class="grid-2">
1075      <div class="card">
1076        <h3>By Reliability Tier</h3>
1077        <div class="vbars">
1078          ${["A","B","C"].map((M,I)=>{var V;const $=((V=i.by_tier)==null?void 0:V[M])||0,q=Math.max(1,...Object.values(i.by_tier||{A:1,B:1,C:1}));return`<div class="vbar-col"><div class="vbar" style="height:${Math.round($/q*100)}%;background:${dSe[I]}"></div><div class="vbar-val">${$}</div><div class="vbar-label">Tier ${M}</div></div>`}).join("")}
1079        </div>
1080      </div>
1081      <div class="card">
1082        <h3>Summary</h3>
1083        <div class="kv"><span class="muted">New startups</span><span class="bold">${i.new_startups_count||0}</span></div>
1084        <div class="kv"><span class="muted">Pending verification</span><span class="bold amber">${i.pending_verification||0}</span></div>
1085        <div class="kv"><span class="muted">Validated (Intelligence Officer)</span><span class="bold green">${i.validated||0}</span></div>
1086        <div class="status-chips">${Object.entries(i.by_status||{}).map(([M,I])=>`<span class="chip">${Vr(M)}: ${I}</span>`).join("")}</div>
1087      </div>
1088    </div>`:"",j=(e.uncertain_items||[]).map(M=>`
1089    <div class="unc-row">
1090      <div><div class="bold">${Vr(M.entity_name)}</div><div class="muted small">${Vr(M.issue)}</div></div>
1091      <span class="badge-outline">Tier ${Vr(M.reliability_tier)}</span>
1092    </div>`).join("");return`<!DOCTYPE html>
1093<html lang="en">
1094<head>
1095<meta charset="utf-8">
1096<meta name="viewport" content="width=device-width, initial-scale=1">
1097<title>${Vr(e.title)}</title>
1098<style>
1099  *{box-sizing:border-box;margin:0;padding:0}
1100  body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:#f8f9fa;color:#111827;padding:32px 16px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
1101  .wrap{max-width:1100px;margin:0 auto}
1102  .head{margin-bottom:24px}
1103  .badge{display:inline-block;background:#d1fae5;color:#065f46;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;text-transform:capitalize}
1104  .meta{color:#6b7280;font-size:13px;margin-left:12px}
1105  .title{font-size:28px;font-weight:800;color:#111827;margin-top:10px}
1106  .card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:24px;margin-bottom:20px}
1107  .section-title{font-size:18px;font-weight:700;color:#111827;margin-bottom:14px}
1108  p.body{color:#374151;line-height:1.7;font-size:15px}
1109  .highlights{list-style:none;margin-top:18px}
1110  .highlights li{display:flex;align-items:flex-start;gap:12px;padding:8px 0;color:#374151;font-size:15px;line-height:1.5}
1111  .num{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:#d1fae5;color:#065f46;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700}
1112  .kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}
1113  .kpi{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:18px}
1114  .kpi-label{color:#6b7280;font-size:13px;font-weight:500}
1115  .kpi-val{font-size:26px;font-weight:800;margin-top:6px}
1116  .grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}
1117  .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}
1118  .kv{display:flex;justify-content:space-between;padding:7px 0;font-size:14px}
1119  .muted{color:#6b7280}
1120  .amber{color:#b45309}
1121  .green{color:#047857}
1122  .bold{font-weight:700;color:#111827}
1123  .small{font-size:12px}
1124  .tier-row,.seg-row{margin-bottom:14px}
1125  .tier-head,.seg-row{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin-bottom:6px}
1126  .tier-track,.seg-track{height:8px;background:#f1f5f9;border-radius:999px;overflow:hidden}
1127  .tier-fill,.seg-fill{height:100%;border-radius:999px}
1128  .seg-row{display:flex;align-items:center;gap:10px}
1129  .seg-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}
1130  .seg-name{font-size:14px;color:#374151;min-width:110px}
1131  .seg-track{flex:1}
1132  .seg-val{font-size:13px;font-weight:600;color:#111827;white-space:nowrap}
1133  .bars{display:flex;align-items:flex-end;justify-content:space-around;
1133gap:12px;height:200px;padding:20px 10px 0;border-bottom:1px solid #f1f5f9}
1134  .bar-col{display:flex;flex-direction:column;align-items:center;flex:1;height:100%;justify-content:flex-end}
1135  .bar{width:48px;background:#10b981;border-radius:8px 8px 0 0;min-height:4px}
1136  .bar-val{font-size:11px;font-weight:600;color:#374151;margin-top:6px}
1137  .bar-label{font-size:12px;color:#6b7280;margin-top:2px}
1138  .vbars{display:flex;align-items:flex-end;justify-content:space-around;gap:16px;height:180px;padding:16px 8px 0;border-bottom:1px solid #f1f5f9}
1139  .vbar-col{display:flex;flex-direction:column;align-items:center;flex:1;height:100%;justify-content:flex-end}
1140  .vbar{width:60px;border-radius:8px 8px 0 0;min-height:4px}
1141  .vbar-val{font-size:13px;font-weight:700;margin-top:6px}
1142  .vbar-label{font-size:12px;color:#6b7280}
1143  .status-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
1144  .chip{background:#f1f5f9;border-radius:999px;padding:4px 10px;font-size:12px;color:#475569}
1145  table{width:100%;border-collapse:collapse;font-size:14px}
1146  th{text-align:left;color:#6b7280;font-weight:600;padding:10px 12px;border-bottom:1px solid #e5e7eb}
1147  td{padding:10px 12px;border-bottom:1px solid #f1f5f9}
1148  .badge-outline{display:inline-block;border:1px solid #e5e7eb;border-radius:999px;padding:2px 10px;font-size:12px;color:#475569}
1149  .unc-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #f1f5f9}
1150  .unc-row:last-child{border-bottom:0}
1151  .footer{margin-top:28px;text-align:center;color:#9ca3af;font-size:12px}
1152  @media(max-width:700px){.kpis{grid-template-columns:repeat(2,1fr)}.grid-3,.grid-2{grid-template-columns:1fr}}
1153  @media print{body{background:#fff;padding:0}}
1154</style>
1155</head>
1156<body>
1157<div class="wrap">
1158  <div class="head">
1159    <span class="badge">${Vr(e.report_type)}</span>
1160    <span class="meta">
1160${e.period_start&&e.period_end?`${Tt(new Date(e.period_start),"MMM d")} - ${Tt(new Date(e.period_end),"MMM d, yyyy")}`:""} Generated ${e.generated_at?Tt(new Date(e.generated_at),"MMM d, h:mm a"):""}</span>
1161    <h1 class="title">${Vr(e.title)}</h1>
1162  </div>
1163
1164  <div class="card">
1165    <div class="section-title">Executive Summary</div>
1166    <p class="body">${Vr(e.executive_summary||"No summary available.")}</p>
1167    ${v?`<ul class="highlights">${v}</ul>`:""}
1168  </div>
1169
1170  <div class="kpis">
1171    <div class="kpi"><div class="kpi-label">Startups</div><div class="kpi-val">${t.total_startups||0}</div></div>
1172    <div class="kpi"><div class="kpi-label">Investors</div><div class="kpi-val">${t.total_investors||0}</div></div>
1173    <div class="kpi"><div class="kpi-label">ESOs</div><div class="kpi-val">${t.total_esos||0}</div></div>
1174    <div class="kpi"><div class="kpi-label">Funding Tracked</div><div class="kpi-val">${MN(t.total_funding_usd||0)}</div></div>
1175  </div>
1176
1177  <div class="grid-3">
1178    <div class="card">
1179      <div class="section-title">Reliability Tiers</div>
1180      ${b}
1181    </div>
1182    <div class="card">
1183      <div class="section-title">Government Innovation</div>
1184      <div class="kv"><span class="muted">Institutions tracked</span><span class="bold">${t.total_gov_programs||0}</span></div>
1185      <div class="kv"><span class="muted">With AI initiatives</span><span class="bold green">${t.gov_ai_initiatives||0}</span></div>
1186      <div class="kv"><span class="muted">With online portal</span><span class="bold">${t.gov_online_portals||0}</span></div>
1187      <div class="kv"><span class="muted">Pending public submissions</span><span class="bold amber">${t.pending_public_submissions||0}</span></div>
1188    </div>
1189    <div class="card">
1190      <div class="section-title">Agent Collection (period)</div>
1191      <div class="kv"><span class="muted">Active agents</span><span class="bold">${t.active_agents||0}</span></div>
1192      <div class="kv"><span class="muted">Runs in period</span><span class="bold">${t.agent_runs_period||0}</span></div>
1193      <div class="kv"><span class="muted">Items found</span><span class="bold">${t.agent_items_found||0}</span></div>
1194      <div class="kv"><span class="muted">New entities added</span><span class="bold green">${t.agent_new_entities||0}</span></div>
1195    </div>
1196  </div>
1197
1198  ${c.length>0?`
1199  <div class="grid-2">
1200    <div class="card">
1201      <div class="section-title">Weekly Funding Trend</div>
1202      <div class="bars">${x}</div>
1203      <p class="muted small" style="text-align:center;margin-top:10px">Total period: ${MN((n==null?void 0:n.total_period)||0)} across ${c.reduce((M,I)=>M+I.deals,0)} deals</p>
1204    </div>
1205    <div class="card">
1206      <div class="section-title">Sector Distribution</div>
1207      ${w||'<p class="muted">No sector data.</p>'}
1208    </div>
1209  </div>`:w?`
1210  <div class="card">
1211    <div class="section-title">Sector Distribution</div>
1212    ${w}
1213  </div>`:""}
1214
1215  ${_}
1216
1217  ${m?`
1218  <div class="card">
1219    <div class="section-title">Agent Roster</div>
1220    <table>
1221      <thead><tr><th>Agent</th><th>Type</th><th>Schedule</th><th>Last Run</th><th>Items</th></tr></thead>
1222      <tbody>${m}</tbody>
1223    </table>
1224  </div>`:""}
1225
1226  ${j?`
1227  <div class="card">
1228    <div class="section-title">Entities Needing Verification</div>
1229    ${j}
1230  </div>`:""}
1231
1232  <div class="footer">© ${new Date().getFullYear()} All Rights Reserved To Haim Etkin, Strategic OSINT &amp; Intelligence Integration®</div>
1233</div>
1234</body>
1235</html>`}function o9(e){const t=fSe(e),n=new Blob([t],{type:"text/html;charset=utf-8"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`${e.title.replace(/[^a-z0-9]/gi,"_")}.html`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}function hSe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState(!1),[o,c]=P.useState("weekly"),[d,h]=P.useState(!1),[p,m]=P.useState(!1),[v,x]=P.useState(!1),[w,b]=P.useState(null),[_,j]=P.useState({}),[C,E]=P.useState(!1),A={daily:5,weekly:10,monthly:25,annual:180};P.useEffect(()=>{I(),Q.auth.isAuthenticated().then(async z=>{if(m(z),z)try{const Z=await Q.auth.me();E((Z==null?void 0:Z.role)==="admin")}catch{}x(!0)});const U=new URLSearchParams(window.location.search);U.get("report_paid")==="1"&&U.get("session_id")&&k(U.get("session_id"))},[]);const k=async U=>{var z,Z;try{const ee=await Q.functions.invoke("verifyReportCheckout",{session_id:U});if((z=ee.data)!=null&&z.paid&&((Z=ee.data)!=null&&Z.report_id)){j(oe=>({...oe,[ee.data.report_id]:!0}));const G=new URL(window.location.href);G.searchParams.delete("report_paid"),G.searchParams.delete("session_id"),G.searchParams.delete("report_id"),window.history.replaceState({},"",G.toString())}}catch(ee){console.error("Report payment verification failed:",ee)}},M=async U=>{var z,Z;if(window.self!==window.top){alert("Checkout works only from the published app. Please open the app directly in a new tab to purchase this report.");return}b(U.id);try{const ee=await Q.functions.invoke("createReportCheckout",{report_type:U.report_type,report_id:U.id});(z=ee.data)!=null&&z.url?window.location.href=ee.data.url:alert(((Z=ee.data)==null?void 0:Z.error)||"Unable to start checkout.")}catch(ee){alert("Unable to start checkout. Please try again."),console.error(ee)}finally{b(null)}},I=async()=>{try{const U=await Q.entities.Report.list("-generated_at",50);t(U)}catch(U){console.error("Error loading reports:",U)}finally{r(!1)}},$=async()=>{var U,z,Z,ee;if(!p){Q.auth.redirectToLogin("/Reports");return}s(!0);try{const G=new Date;let oe,W;o==="daily"?(oe=new Date(G),oe.setDate(oe.getDate()-1),W=G):o==="weekly"?(oe=new Date(G),oe.setDate(oe.getDate()-7),W=G):o==="monthly"?(oe=new Date(G),oe.setMonth(oe.getMonth()-1),W=G):(oe=new Date(G.getFullYear(),0,1),W=G);const[ie,ae,K,ne,ve,je,Y,he]=await Promise.all([Q.entities.Startup.list(),Q.entities.Investor.list(),Q.entities.ESO.list(),Q.entities.EcosystemEvent.list("-event_date",20),Q.entities.GovProgram.list(),Q.entities.PublicSubmission.filter({status:"pending"},"-created_date",50),Q.entities.Agent.list().catch(()=>[]),Q.entities.AgentRun.list("-started_at",30).catch(()=>[])]),fe=Y.filter(qe=>qe.enabled),_e=fe.map(qe=>({name:qe.name,agent_type:qe.agent_type,role:qe.role,schedule:qe.schedule_description||qe.schedule_cron||"Manual",last_run_status:qe.last_run_status||"never_run",last_run_items_found:qe.last_run_items_found||0,last_run_at:qe.last_run_at||null})),de=he.filter(qe=>qe.started_at?new Date(qe.started_at)>=oe&&new Date(qe.started_at)<=W:!1),we={total_runs:de.length,total_items_found:de.reduce((qe,Oe)=>qe+(Oe.items_found||0),0),total_items_approved:de.reduce((qe,Oe)=>qe+(Oe.items_approved||0),0),total_new_entities:de.reduce((qe,Oe)=>qe+(Oe.new_entities||0),0),active_agents:fe.length},ke=ie.reduce((qe,Oe)=>qe+(Oe.total_funding_usd||0),0),re={};ie.forEach(qe=>{qe.sector&&(re[qe.sector]=(re[qe.sector]||0)+1)});const Re=Object.entries(re).sort((qe,Oe)=>Oe[1]-qe[1]).slice(0,5).map(([qe,Oe])=>`${qe}: ${Oe} startups`),ge=ie.filter(qe=>qe.reliability_tier==="A").length,Be=ie.filter(qe=>qe.reliability_tier==="B").length,Le=ie.filter(qe=>qe.reliability_tier==="C").length;let rt=[],Ct={},_t={},Gt=[],qt={};
1235if(o==="monthly"){rt=ie.filter(Ge=>{if(!Ge.created_date)return!1;const Ue=new Date(Ge.created_date);return Ue>=oe&&Ue<=W}),Gt=ne.filter(Ge=>{if(!Ge.event_date)return!1;const Ue=new Date(Ge.event_date);return Ue>=oe&&Ue<=W&&Ge.event_type==="Funding"});const qe=[];for(let Ge=3;Ge>=0;Ge--){const Ue=new Date(oe);Ue.setDate(Ue.getDate()+Ge*7);const Et=new Date(Ue);Et.setDate(Et.getDate()+7);const At=Gt.filter(fn=>{const Ln=new Date(fn.event_date);return Ln>=Ue&&Ln<Et}).reduce((fn,Ln)=>fn+(Ln.amount_usd||0),0);qe.push({week:`Week ${4-Ge}`,amount:At,deals:Gt.filter(fn=>{const Ln=new Date(fn.event_date);return Ln>=Ue&&Ln<Et}).length})}Ct={weeks:qe,total_period:Gt.reduce((Ge,Ue)=>Ge+(Ue.amount_usd||0),0)};const Oe=rt.reduce((Ge,Ue)=>{const Et=Ue.verification_status||"UNVERIFIED";return Ge[Et]=(Ge[Et]||0)+1,Ge},{}),lt=rt.reduce((Ge,Ue)=>{const Et=Ue.reliability_tier||"C";return Ge[Et]=(Ge[Et]||0)+1,Ge},{A:0,B:0,C:0});_t={new_startups_count:rt.length,by_status:Oe,by_tier:lt,pending_verification:rt.filter(Ge=>Ge.verification_status==="UNVERIFIED"||Ge.verification_status==="AI_CAPTURED").length,validated:rt.filter(Ge=>Ge.verification_status==="KENIA_VALIDATED").length};try{const[Ge,Ue]=await Promise.all([Q.entities.AgentRun.filter({},"-started_at",50),Q.entities.Agent.list()]),Et=Ge.filter(At=>At.started_at?new Date(At.started_at)>=oe&&new Date(At.started_at)<=W:!1);qt={total_runs:Et.length,total_items_found:Et.reduce((At,fn)=>At+(fn.items_found||0),0),total_items_approved:Et.reduce((At,fn)=>At+(fn.items_approved||0),0),total_new_entities:Et.reduce((At,fn)=>At+(fn.new_entities||0),0),active_agents:Ue.filter(At=>At.enabled).length}}catch(Ge){console.error("Error loading agent data:",Ge)}}const dn=o==="monthly"?`
1236Monthly-specific data:
1237- New startups added this month: ${rt.length}
1238- Funding events this month: ${Gt.length} totaling $${(Ct.total_period/1e6).toFixed(1)}M
1239- Weekly funding breakdown: ${(U=Ct.weeks)==null?void 0:U.map(qe=>`${qe.week}: $${(qe.amount/1e6).toFixed(1)}M (${qe.deals} deals)`).join(", ")}
1240- New startups verification: ${_t.pending_verification} pending, ${_t.validated} validated
1241- New startups by tier: A=${((z=_t.by_tier)==null?void 0:z.A)||0}, B=${((Z=_t.by_tier)==null?void 0:Z.B)||0}, C=${((ee=_t.by_tier)==null?void 0:ee.C)||0}
1242- Agent activity: ${qt.total_runs} runs, ${qt.total_items_found} items found, ${qt.total_new_entities} new entities added
1243- New startups list: ${rt.slice(0,10).map(qe=>`${qe.name} (${qe.sector||"Unknown"})`).join(", ")}`:"",nn=await Q.integrations.Core.InvokeLLM({prompt:`Generate a brief executive summary (2-3 paragraphs) for a ${o} report on Kenya's startup ecosystem.
1244
1245Data:
1246- Total Startups: ${ie.length}
1247- Total Investors: ${ae.length}
1248- Total ESOs: ${K.length}
1249- Total Funding Tracked: $${(ke/1e6).toFixed(1)}M
1250- Top Sectors: ${Re.join(", ")}
1251- Verified (Tier A): ${ge}, Confirmed (Tier B): ${Be}, Unverified (Tier C): ${Le}
1252- Recent Events: ${ne.slice(0,5).map(qe=>qe.title).join("; ")}
1253- Government Innovation Institutions Tracked: ${ve.length}
1254- Gov institutions with AI initiatives: ${ve.filter(qe=>qe.ai_initiatives).length}
1255- Gov institutions with online portal: ${ve.filter(qe=>qe.has_online_portal).length}
1256- Notable gov institutions: ${ve.slice(0,8).map(qe=>qe.name).join(", ")||"None yet"}
1257- Pending public submissions awaiting verification: ${je.length}
1258- Active agents in the period: ${we.active_agents}
1259- Agent runs in the period: ${we.total_runs} (${we.total_items_found} items found, ${we.total_new_entities} new entities added)
1260- Agent roster: ${_e.map(qe=>`${qe.name} (${qe.agent_type})`).join("; ")}
1261${dn}
1262
1263Write a professional summary suitable for government/policy stakeholders. Include funding trends, government innovation/AI adoption, public-submission pipeline, agent collection activity, and verification status analysis.`,response_json_schema:{type:"object",properties:{executive_summary:{type:"string"},highlights:{type:"array",items:{type:"string"}},recommendations:{type:"array",items:{type:"string"}}}}});await Q.entities.Report.create({title:`${o.charAt(0).toUpperCase()+o.slice(1)} Report - ${Tt(G,"MMM d, yyyy")}`,report_type:o,period_start:oe.toISOString().split("T")[0],period_end:W.toISOString().split("T")[0],generated_at:G.toISOString(),generated_by:"system",status:"ready",executive_summary:nn.executive_summary||`This ${o} report covers the Kenya innovation ecosystem.`,highlights:nn.highlights||Re,key_metrics:{total_startups:ie.length,total_investors:ae.length,total_esos:K.length,total_gov_programs:ve.length,gov_ai_initiatives:ve.filter(qe=>qe.ai_initiatives).length,gov_online_portals:ve.filter(qe=>qe.has_online_portal).length,pending_public_submissions:je.length,total_funding_usd:ke,tier_a_count:ge,tier_b_count:Be,tier_c_count:Le,active_agents:we.active_agents,agent_runs_period:we.total_runs,agent_items_found:we.total_items_found,agent_new_entities:we.total_new_entities,agent_roster:_e},funding_summary:{total_usd:ke,by_sector:re,...o==="monthly"?{monthly_funding_usd:Ct.total_peri
1263od||0,funding_events_count:Gt.length,weekly_trend:Ct.weeks||[]}:{}},sector_breakdown:re,...o==="monthly"?{verification_stats:{items_validated:_t.validated||0,pending_count:_t.pending_verification||0,new_startups_count:rt.length,new_startups_by_status:_t.by_status||{},new_startups_by_tier:_t.by_tier||{}},new_entities:{startups:rt.length,new_startup_names:rt.slice(0,20).map(qe=>qe.name)},charts_data:{funding_trend:Ct,verification_status:_t,agent_activity:qt},uncertain_items:rt.filter(qe=>qe.verification_status!=="KENIA_VALIDATED").slice(0,10).map(qe=>({entity_name:qe.name,issue:`Verification status: ${qe.verification_status||"UNVERIFIED"}`,reliability_tier:qe.reliability_tier||"C"}))}:{}}),h(!1),I()}catch(G){console.error("Error generating report:",G)}finally{s(!1)}},q=U=>o9(U),V=U=>{const z={daily:"bg-blue-100 text-blue-700",weekly:"bg-purple-100 text-purple-700",monthly:"bg-emerald-100 text-emerald-700",annual:"bg-amber-100 text-amber-700"};return z[U]||z.weekly},H=U=>U==="ready"?a.jsxs(Ce,{className:"bg-emerald-100 text-emerald-700",children:[a.jsx(Un,{className:"h-3 w-3 mr-1"}),"Ready"]}):U==="generating"?a.jsxs(Ce,{className:"bg-amber-100 text-amber-700",children:[a.jsx(ln,{className:"h-3 w-3 mr-1 animate-spin"}),"Generating"]}):a.jsxs(Ce,{className:"bg-red-100 text-red-700",children:[a.jsx($i,{className:"h-3 w-3 mr-1"}),"Failed"]});return n?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading reports..."})}):a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Reports"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Generate and download ecosystem reports"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(Ne,{variant:"outline",className:"gap-2 border-emerald-200 text-emerald-700 hover:bg-emerald-50",disabled:i||!v||!p,onClick:()=>{c("monthly"),h(!0)},children:[a.jsx(ur,{className:"h-4 w-4"}),"Monthly Summary"]}),a.jsxs(Yf,{open:d,onOpenChange:h,children:[a.jsx(UF,{asChild:!0,children:a.jsxs(Ne,{className:"bg-emerald-600 hover:bg-emerald-700 gap-2",disabled:!v||!p,onClick:()=>{if(!p){Q.auth.redirectToLogin("/Reports");return}h(!0)},children:[a.jsx(Um,{className:"h-4 w-4"}),"Generate Report"]})}),a.jsxs(Pu,{children:[a.jsxs(ku,{children:[a.jsx(Au,{children:"Generate New Report"}),a.jsx(Xf,{children:"Select the report type and time period"})]}),a.jsxs("div",{className:"py-4",children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Report Type"}),a.jsxs(oo,{value:o,onValueChange:c,children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsxs(ds,{children:[a.jsx(Pn,{value:"daily",children:"Daily Report"}),a.jsx(Pn,{value:"weekly",children:"Weekly Report"}),a.jsx(Pn,{value:"monthly",children:"Monthly Report"}),a.jsx(Pn,{value:"annual",children:"Annual Report"})]})]})]}),a.jsxs(tg,{children:[a.jsx(Ne,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),a.jsxs(Ne,{onClick:$,disabled:i,className:"bg-emerald-600 hover:bg-emerald-700",children:[i?a.jsx(ln,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(ur,{className:"h-4 w-4 mr-2"}),"Generate"]})]})]})]})]})]}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-8",children:["daily","weekly","monthly","annual"].map(U=>a.jsx(Ee,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>{c(U),h(!0)},children:a.jsxs($e,{className:"p-4 flex items-center gap-3",children:[a.jsx("div",{className:`w-10 h-10 rounded-lg ${V(U)} flex items-center justify-center`,children:a.jsx(ur,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900 capitalize",children:U}),a.jsx("p",{className:"text-xs text-slate-500",children:"Report"})]})]})},U))}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Generated Reports"})}),a.jsx($e,{children:e.length===0?a.jsx(fr,{icon:ur,title:"No reports yet",description:"Generate your first report to get started"}):a.jsx("div",{className:"divide-y",children:e.map(U=>a.jsxs(yt,{to:ot(`ReportDetail/${U.id}`),className:"py-4 flex items-center justify-between hover:bg-slate-50 rounded-lg px-2 -mx-2 transition-colors group",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:`w-10 h-10 rounded-lg ${V(U.report_type)} flex items-center justify-center`,children:a.jsx(ur,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-slate-900 group-hover:text-emerald-700",children:U.title}),a.jsxs("div",{className:"flex items-center gap-3 mt-1 text-sm text-slate-500",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(ho,{className:"h-3 w-3"}
1263),U.period_start&&U.period_end&&`${Tt(new Date(U.period_start),"MMM d")} - ${Tt(new Date(U.period_end),"MMM d, yyyy")}`]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Bn,{className:"h-3 w-3"}),"Generated ",U.generated_at&&Tt(new Date(U.generated_at),"MMM d, h:mm a")]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[H(U.status),U.status==="ready"&&(p?C||_[U.id]?a.jsxs("div",{className:"flex items-center gap-2",children:[C&&a.jsx(Ce,{className:"bg-slate-900 text-white text-xs",children:"Admin"}),a.jsxs(Ne,{variant:"outline",size:"sm",className:"gap-1 border-emerald-200 text-emerald-700 hover:bg-emerald-50",onClick:()=>q(U),children:[a.jsx(Fr,{className:"h-4 w-4"}),"Download"]})]}):a.jsxs(Ne,{size:"sm",className:"gap-1 bg-emerald-600 hover:bg-emerald-700",disabled:w===U.id,onClick:()=>M(U),children:[w===U.id?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(zN,{className:"h-4 w-4"}),"$",A[U.report_type]||5," · Purchase"]}):v?a.jsxs(Ne,{variant:"outline",size:"sm",className:"gap-1 opacity-70",onClick:()=>Q.auth.redirectToLogin("/Reports"),children:[a.jsx(Tl,{className:"h-4 w-4"}),"Sign in to purchase"]}):null)]})]},U.id))})})]})]})}function pSe(){const[e,t]=P.useState(void 0),[n,r]=P.useState(!1),[i,s]=P.useState(""),[o,c]=P.useState("all"),[d,h]=P.useState(!1),[p,m]=P.useState({startups:[],investors:[],esos:[]}),[v,x]=P.useState(!1);P.useEffect(()=>{Q.auth.me().then(_=>{t(!0),r((_==null?void 0:_.role)==="admin")}).catch(()=>t(!1))},[]);const w=async()=>{if(i.trim()){h(!0),x(!0);try{const _=i.toLowerCase(),[j,C,E]=await Promise.all([Q.entities.Startup.list(),Q.entities.Investor.list(),Q.entities.ESO.list()]),A=q=>{var V,H,U,z;
1263return Dr(q,n)?((V=q.name)==null?void 0:V.toLowerCase().includes(_))||((H=q.description)==null?void 0:H.toLowerCase().includes(_))||((U=q.sector)==null?void 0:U.toLowerCase().includes(_))||((z=q.county)==null?void 0:z.toLowerCase().includes(_)):!1},k=j.filter(A),M=C.filter(A),I=E.filter(A);m({startups:k,investors:M,esos:I});const $=k.length+M.length+I.length;try{await Q.entities.SearchQuery.create({query_text:i.trim(),normalized_query:i.trim().toLowerCase(),results_count:$,has_results:$>0,result_type:o})}catch{}}catch(_){console.error("Search error:",_)}finally{h(!1)}}},b=p.startups.length+p.investors.length+p.esos.length;return e===void 0?a.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:a.jsx(ln,{className:"h-8 w-8 animate-spin text-slate-400"})}):e?a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-2",children:"Search the Ecosystem"}),a.jsx("p",{className:"text-slate-500",children:"Find startups, investors, and support organizations in Kenya"})]}),a.jsxs("div",{className:"max-w-2xl mx-auto mb-8",children:[a.jsxs("div",{className:"relative flex gap-2",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(hr,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-slate-400"}),a.jsx(Wt,{placeholder:"Search by name, sector, location...",value:i,onChange:_=>s(_.target.value),onKeyDown:_=>_.key==="Enter"&&w(),className:"pl-12 pr-10 h-12 text-lg"}),i&&a.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 hover:bg-slate-100 rounded",children:a.jsx(xo,{className:"h-4 w-4 text-slate-400"})})]}),a.jsx(Ne,{onClick:w,disabled:d||!i.trim(),className:"h-12 px-6 bg-emerald-600 hover:bg-emerald-700",children:d?a.jsx(ln,{className:"h-5 w-5 animate-spin"}):"Search"})]}),a.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:["Fintech","Agritech","Healthtech","Nairobi","Series A"].map(_=>a.jsx(Ce,{variant:"outline",className:"cursor-pointer hover:bg-slate-100",onClick:()=>{s(_),setTimeout(w,100)},children:_},_))})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex items-center justify-between mb-6",children:a.jsx("p",{className:"text-slate-600",children:d?"Searching...":a.jsxs(a.Fragment,{children:["Found ",a.jsx("span",{className:"font-semibold text-slate-900",children:b})," results"]})})}),a.jsxs(Ns,{value:o,onValueChange:c,children:[a.jsxs(qa,{className:"mb-6",children:[a.jsxs(Ut,{value:"all",className:"gap-2",children:["All",a.jsx(Ce,{variant:"secondary",className:"ml-1",children:b})]}),a.jsxs(Ut,{value:"startups",className:"gap-2",children:[a.jsx(er,{className:"h-4 w-4"}),"Startups",a.jsx(Ce,{variant:"secondary",className:"ml-1",children:p.startups.length})]}),a.jsxs(Ut,{value:"investors",className:"gap-2",children:[a.jsx(Ri,{className:"h-4 w-4"}),"Investors",a.jsx(Ce,{variant:"secondary",className:"ml-1",children:p.investors.length})]}),a.jsxs(Ut,{value:"esos",className:"gap-2",children:[a.jsx(tr,{className:"h-4 w-4"}),"ESOs",a.jsx(Ce,{variant:"secondary",className:"ml-1",children:p.esos.length})]})]}),a.jsx(cn,{value:"all",children:b===0?a.jsx(fr,{icon:hr,title:"No results found",description:"Try different search terms or filters"}):a.jsxs("div",{className:"space-y-6",children:[p.startups.length>0&&a.jsxs("div",{children:[a.jsxs("h3",{className:"text-lg font-semibold text-slate-900 mb-3 flex items-center gap-2",children:[a.jsx(er,{className:"h-5 w-5 text-emerald-600"}),"Startups (",p.startups.length,")"]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:p.startups.slice(0,4).map(_=>a.jsx(ro,{entity:_,entityType:"Startup",detailPage:"StartupDetail"},_.id))})]}),p.investors.length>0&&a.jsxs("div",{children:[a.jsxs("h3",{className:"text-lg font-semibold text-slate-900 mb-3 flex items-center gap-2",children:[a.jsx(Ri,{className:"h-5 w-5 text-blue-600"}),"Investors (",p.investors.length,")"]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:p.investors.slice(0,4).map(_=>a.jsx(ro,{entity:_,entityType:"Investor",detailPage:"InvestorDetail"},_.id))})]}),p.esos.length>0&&a.jsxs("div",{children:[a.jsxs("h3",{className:"text-lg font-semibold text-slate-900 mb-3 flex items-center gap-2",children:[a.jsx(tr,{className:"h-5 w-5 text-purple-600"}),"ESOs (",p.esos.length,")"]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:p.esos.slice(0,4).map(_=>a.jsx(ro,{entity:_,entityType:"ESO",detailPage:"ESODetail"},_.id))})]})]})}),a.jsx(cn,{value:"startups",children:p.startups.length===0?a.jsx(fr,{icon:er,title:"No startups found"}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:p.startups.map(_=>a.jsx(ro,{entity:_,entityType:"Startup",detailPage:"StartupDetail"},_.id))})}),a.jsx(cn,{value:"investors",children:p.investors.length===0?a.jsx(fr,{icon:Ri,title:"No investors found"}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:p.investors.map(_=>a.jsx(ro,{entity:_,entityType:"Investor",detailPage:"InvestorDetail"},_.id))})}),a.jsx(cn,{value:"esos",children:p.esos.length===0?a.jsx(fr,{icon:tr,title:"No ESOs found"}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:p.esos.map(_=>a.jsx(ro,{entity:_,entityType:"ESO",detailPage:"ESODetail"},_.id))})})]})]}),!v&&a.jsxs("div",{className:"text-center py-12",children:[a.jsx("div",{className:"w-16 h-16 rounded-2xl bg-slate-100 flex items-center justify-center mx-auto mb-4",children:a.jsx(hr,{className:"h-8 w-8 text-slate-400"})}),a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-1",children:"Start your search"}),a.jsx("p",{className:"text-slate-500",children:"Enter a search term to find organizations in Kenya's ecosystem"})]})]}):a.jsxs("div",{className:"max-w-md mx-auto px-4 py-16 text-center",children:[a.jsx("div",{className:"w-16 h-16 rounded-2xl bg-amber-100 flex items-center justify-center mx-auto mb-4",children:a.jsx(i0,{className:"h-8 w-8 text-amber-600"})}),a.jsx("h1",{className:"text-2xl font-bold text-slate-900 mb-2",children:"Sign in to search"}),a.jsx("p",{className:"text-slate-500 mb-6",children:"Search is available to registered users only. Please sign in to find startups, investors, and support organizations in Kenya's ecosystem."}),a.jsx(Ne,{className:"bg-emerald-600 hover:bg-emerald-700",onClick:()=>Q.auth.redirectToLogin("/Search"),children:"Sign In"})]})}function mSe(){var b,_,j,C;const[e,t]=P.useState(null),[n,r]=P.useState([]),[i,s]=P.useState([]),[o,c]=P.useState([]),[d,h]=P.useState(!0),[p,m]=P.useState(!1),x=new URLSearchParams(window.location.search).get("id");P.useEffect(()=>{Q.auth.me().then(E=>m((E==null?void 0:E.role)==="admin")).catch(()=>m(!1)),x&&w()},[x]);const w=async()=>{try{const[E,A,k]=await Promise.all([Q.entities.Startup.filter({id:x}),Q.entities.Claim.filter({entity_id:x,entity_type:"Startup"}),Q.entities.EcosystemEvent.list()]);E.length>0&&t(E[0]),r(A);const M=k.filter(I=>{var $;return($=I.entities_involved)==null?void 0:$.some(q=>q.entity_id===x)});s(M)}catch(E){console.error("Error loading startup:",E)}finally{h(!1)}};return d?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading startup details..."})}):!e||!Dr(e,p)?a.jsx("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx("p",{className:"text-center text-slate-500",children:"Startup not found"})}):a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs(yt,{to:ot("Startups"),className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[a.jsx(e0,{className:"h-4 w-4"}),"Back to Startups"]}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 mb-8",children:[a.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.logo_url?a.jsx("img",{src:e.logo_url,alt:e.name,className:"w-20 h-20 rounded-2xl object-cover"}):a.jsx("div",{className:"w-20 h-20 rounded-2xl bg-gradient-to-br from-emerald-400 to-teal-500 flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-2xl",children:((b=e.name)==null?void 0:b[0])||"?"})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:e.name}),a.jsx(Li,{tier:e.reliability_tier||"C",showScore:!0,score:e.reliability_score})]}),a.jsx("p",{className:"text-slate-600 mt-2",children:e.description}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-4",children:[e.sector&&a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700",children:e.sector}),e.stage&&a.jsx(Ce,{variant:"outline",children:e.stage}),a.jsx(gu,{status:e.verification_status,size:"sm"})]})]})]}),a.jsxs("div",{className:"flex gap-4",children:[e.total_funding_usd&&a.jsxs(Ee,{className:"px-4 py-3 bg-emerald-50 border-emerald-100",children:[a.jsx("p",{className:"text-xs text-emerald-600 font-medium",children:"Total Funding"}),a.jsxs("p",{className:"text-xl font-bold text-emerald-700",children:["$",(e.total_funding_usd/1e6).toFixed(1),"M"]})]}),e.employee_count&&a.jsxs(Ee,{className:"px-4 py-3 bg-blue-50 border-blue-100",children:[a.jsx("p",{className:"text-xs text-blue-600 font-medium",children:"Employees"}),a.jsx("p",{className:"text-xl font-bold text-blue-700",children:e.employee_count})]})]})]}),a.jsxs(Ns,{defaultValue:"overview",className:"space-y-6",children:[a.jsxs(qa,{children:[a.jsx(Ut,{value:"overview",children:"Overview"}),a.jsx(Ut,{value:"funding",children:"Funding & Events"}),a.jsxs(Ut,{value:"sources",children:["Sources (",n.length,")"]})]}),a.jsx(cn,{value:"overview",className:"space-y-6",children:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Company Details"})}),a.jsxs($e,{className:"space-y-4",children:[e.founded_year&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(ho,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Founded"}),a.jsx("p",{className:"font-medium",children:e.founded_year})]})]}),(e.county||e.city)&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Cu,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Location"}),a.jsx("p",{className:"font-medium",children:[e.city,e.county,e.country].filter(
1263Boolean).join(", ")})]})]}),e.employee_range&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(tr,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Team Size"}),a.jsx("p",{className:"font-medium",children:e.employee_range})]})]}),((_=e.sdg_alignment)==null?void 0:_.length)>0&&a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(er,{className:"h-5 w-5 text-slate-400 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"SDG Alignment"}),a.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.sdg_alignment.map(E=>a.jsxs(Ce,{variant:"outline",className:"text-xs",children:["SDG ",E]},E))})]})]})]})]}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Contact & Links"})}),a.jsxs($e,{className:"space-y-4",children:[e.website&&a.jsxs("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(ou,{className:"h-5 w-5"}),e.website]}),e.linkedin_url&&a.jsxs("a",{href:e.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(zp,{className:"h-5 w-5"}),"LinkedIn Profile"]}),e.twitter_url&&a.jsxs("a",{href:e.twitter_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-blue-600 hover:underline",children:[a.jsx(uK,{className:"h-5 w-5"}),"Twitter/X"]}),e.contact_email&&a.jsx(Qp,{icon:Nu,value:e.contact_email,label:"Sign in to view email"}),e.contact_phone&&a.jsx(Qp,{icon:p2,value:e.contact_phone,label:"Sign in to view phone"})]})]}),((j=e.founders)==null?void 0:j.length)>0&&a.jsxs(Ee,{className:"lg:col-span-2",children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Founders"})}),a.jsx($e,{children:a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.founders.map((E,A)=>{var k;return a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-slate-50",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center",children:a.jsx("span",{className:"font-medium text-slate-600",children:((k=E.name)==null?void 0:k[0])||"?"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:E.name}),a.jsx("p",{className:"text-sm text-slate-500",children:E.role})]}),E.linkedin&&a.jsx("a",{href:E.linkedin,target:"_blank",rel:"noopener noreferrer",className:"ml-auto",children:a.jsx(zp,{className:"h-4 w-4 text-blue-600"})})]},A)})})})]})]})}),a.jsxs(cn,{value:"funding",className:"space-y-6",children:[((C=e.investors)==null?void 0:C.length)>0&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Investors"})}),a.jsx($e,{children:a.jsx("div",{className:"flex flex-wrap gap-2",children:e.investors.map((E,A)=>a.jsx(Ce,{variant:"secondary",className:"text-sm",children:E},A))})})]}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Events & Milestones"})}),a.jsx($e,{children:i.length>0?a.jsx("div",{className:"space-y-4",children:i.map(E=>a.jsxs("div",{className:"flex gap-4 p-4 rounded-lg bg-slate-50",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 flex items-center justify-center flex-shrink-0",children:a.jsx(zl,{className:"h-5 w-5 text-emerald-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:E.title}),a.jsx("p",{className:"text-sm text-slate-500 mt-1",children:E.summary}),a.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[E.event_date&&a.jsx("span",{className:"text-xs text-slate-400",children:Tt(new Date(E.event_date),"MMM d, yyyy")}),E.amount_usd&&a.jsxs("span",{className:"text-xs font-medium text-emerald-600",children:["$",(E.amount_usd/1e6).toFixed(1),"M"]}),a.jsx(Li,{tier:E.reliability_tier||"C",size:"sm"})]})]})]},E.id))}):a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No events recorded yet"})})]})]}),a.jsx(cn,{value:"sources",className:"space-y-4",children:a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Data Sources & Claims"})}),a.jsx($e,{children:n.length>0?a.jsx("div",{className:"space-y-3",children:n.map(E=>a.jsxs("div",{className:"p-4 rounded-lg border bg-white",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-slate-700",children:[a.jsxs("span",{className:"text-slate-500",children:[E.field_name,":"]})," ",E.field_value]}),E.evidence_snippet&&a.jsxs("p",{className:"text-xs text-slate-500 mt-1 italic",children:['"',E.evidence_snippet,'"']})]}),a.jsx(gu,{status:E.status,size:"sm"})]}),a.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-slate-400",children:[E.source_url&&a.jsxs("a",{href:E.source_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 hover:underline",children:[a.jsx(Q3,{className:"h-3 w-3"}),"Source"]}),E.extracted_at&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Bn,{className:"h-3 w-3"}),Tt(new Date(E.extracted_at),"MMM d, yyyy")]}),a.jsx(Li,{tier:E.reliability_tier||"C",size:"sm"})]})]},E.id))}):a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No source claims recorded"})})]})})]}),a.jsx(Ee,{className:"mt-8 p-4 bg-slate-50 border-slate-200",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Bn,{className:"h-5 w-5 text-slate-400"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("span",{className:"text-slate-500",children:"Last verified: "}),a.jsx("span",{className:"font-medium",children:e.last_verified_at?Tt(new Date(e.last_verified_at),"MMM d, yyyy"):"Never"})]})]}),a.jsxs(Ne,{variant:"outline",className:"gap-2",children:[a.jsx(ur,{className:"h-4 w-4"}),"Suggest an Edit"]})]})})]})}const gSe=["Fintech","Agritech","Healthtech","Edtech","Cleantech","Logistics","E-commerce","SaaS","Hardware","AI/ML","Blockchain","Tourism","Other"],ySe=["Idea","Pre-seed","Seed","Series A","Series B","Series C+","Growth","Mature"],vSe=[{value:"A",label:"Tier A - IO Validated"}
1263,{value:"B",label:"Tier B - Actor Confirmed"},{value:"C",label:"Tier C - OSINT Captured"}],xSe=["Nairobi","Mombasa","Kisumu","Nakuru","Eldoret","Kiambu","Machakos"];function bSe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState("grid"),{isSignedIn:o,signIn:c}=D0(),[d,h]=P.useState({search:"",sector:"all",stage:"all",tier:"all",county:"all"}),[p,m]=P.useState(!1);P.useEffect(()=>{Q.auth.me().then(C=>m((C==null?void 0:C.role)==="admin")).catch(()=>m(!1)),v()},[]);const v=async()=>{try{const C=await Q.entities.Startup.list("-reliability_score",100);t(C)}catch(C){console.error("Error loading startups:",C)}finally{r(!1)}},x=(C,E)=>{h(A=>({...A,[C]:E}))},w=()=>{h({search:"",sector:"all",stage:"all",tier:"all",county:"all"})},b=e.filter(C=>{var E,A,k;if(!Dr(C,p))return!1;if(d.search){const M=d.search.toLowerCase();if(!(((E=C.name)==null?void 0:E.toLowerCase().includes(M))||((A=C.description)==null?void 0:A.toLowerCase().includes(M))||((k=C.sector)==null?void 0:k.toLowerCase().includes(M))))return!1}return!(d.sector!=="all"&&C.sector!==d.sector||d.stage!=="all"&&C.stage!==d.stage||d.tier!=="all"&&C.reliability_tier!==d.tier||d.county!=="all"&&C.county!==d.county)}),_=()=>{const C=["Name","Sector","Stage","County","Funding (USD)","Tier","Website"],E=b.map(A=>[A.name,A.sector,A.stage,A.county,A.total_funding_usd||"",A.reliability_tier,A.website]);iP(rP(C,E),"kenya-startups.csv")},j=[{header:"Startup",accessor:"name",cell:C=>{var E;return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-emerald-400 to-teal-500 flex items-center justify-center text-white font-medium",children:((E=C.name)==null?void 0:E[0])||"?"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:C.name}),a.jsx("p",{className:"text-xs text-slate-500",children:C.sector})]})]})}},{header:"Stage",accessor:"stage",cell:C=>C.stage&&a.jsx(Ce,{variant:"outline",children:C.stage})},{header:"Location",accessor:"county",cell:C=>C.county||C.city||"-"},{header:"Funding",accessor:"total_funding_usd",cell:C=>C.total_funding_usd?`$${(C.total_funding_usd/1e6).toFixed(1)}M`:"-"},{header:"Tier",accessor:"reliability_tier",cell:C=>a.jsx(Li,{tier:C.reliability_tier||"C",size:"sm"})}];return a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Startups Registry"}),a.jsxs("p",{className:"text-slate-500 mt-1",children:[b.length," verified startups in Kenya's innovation ecosystem"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"flex items-center border rounded-lg p-1 bg-slate-100",children:[a.jsx(Ne,{variant:i==="grid"?"secondary":"ghost",size:"sm",onClick:()=>s("grid"),className:"px-3",children:a.jsx(d2,{className:"h-4 w-4"})}),a.jsx(Ne,{variant:i==="list"?"secondary":"ghost",size:"sm",onClick:()=>s("list"),className:"px-3",children:a.jsx(h2,{className:"h-4 w-4"})})]}),o?a.jsxs(Ne,{variant:"outline",onClick:_,className:"gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Export"]}):a.jsxs(Ne,{variant:"outline",onClick:c,className:"gap-2 border-emerald-200 text-emerald-700 hover:bg-emerald-50",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Sign in to Export"]})]})]}),a.jsx("div",{className:"mb-6",children:a.jsx($0,{filters:d,onFilterChange:x,onClear:w,searchPlaceholder:"Search startups...",filterOptions:[{key:"sector",label:"Sector",options:gSe.map(C=>({value:C,label:C}))},{key:"stage",label:"Stage",options:ySe.map(C=>({value:C,label:C}))},{key:"tier",label:"Tier",options:vSe},{key:"county",label:"County",options:xSe.map(C=>({value:C,label:C}))}]})}),n?a.jsx(Mn,{message:"Loading startups..."}):b.length===0?a.jsx(fr,{icon:er,title:"No startups found",description:"Try adjusting your filters or search query",action:w,actionLabel:"Clear Filters"}):i==="grid"?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:b.map(C=>a.jsx(ro,{entity:C,entityType:"Startup",detailPage:"StartupDetail"},C.id))}):a.jsx(nP,{columns:j,data:b,searchable:!1,pageSize:15})]})}function _Se(){return a.jsx(Jm,{redirectTo:"/VerificationQueue",children:a.jsx(wSe,{})})}function wSe(){const[e,t]=P.useState([]),[n,r]=P.useState([]),[i,s]=P.useState(!0),[o,c]=P.useState("alpha"),[d,h]=P.useState(null),[p,m]=P.useState(""),[v,x]=P.useState(!1);P.useEffect(()=>{w()},[]);const w=async()=>{try{const[I,$]=await Promise.all([Q.entities.VerificationRequest.list("-created_date",100),Q.entities.Claim.filter({status:"PENDING_ALPHA"})]);t(I),r($)}catch(I){console.error("Error loading verification data:",I)}finally{s(!1)}},b=I=>e.filter($=>I==="alpha"?$.request_type==="ALPHA_REVIEW"&&$.status==="pending":I==="actor"?$.request_type==="ACTOR_CONFIRMATION"&&$.status==="pending":I==="kenia"?$.request_type==="KENIA_VALIDATION"&&$.status==="pending":!1),_=async I=>{x(!0);try{await Q.entities.VerificationRequest.update(I.id,{status:"approved",reviewed_at:new Date().toISOString(),review_notes:p});const $=Q.entities[I.entity_type];if($){const q=I.request_type==="KENIA_VALIDATION"?"A":I.request_type==="ACTOR_CONFIRMATION"?"B":"C",V=I.request_type==="KENIA_VALIDATION"?"KENIA_VALIDATED":I.request_type==="ACTOR_CONFIRMATION"?"ACTOR_CONFIRMED":"AI_CAPTURED";await $.update(I.entity_id,{reliability_tier:q,verification_status:V,last_verified_at:new Date().toISOString()})}h(null),m(""),w()}catch($){console.error("Error approving:",$)}finally{x(!1)}},j=async I=>{x(!0);try{await Q.entities.VerificationRequest.update(I.id,{status:"rejected",reviewed_at:new Date().toISOString(),review_notes:p}),h(null),m(""),w()}catch($){console.error("Error rejecting:",$)}finally{x(!1)}},C=I=>{const $={high:"bg-red-100 text-red-700 border-red-200",medium:"bg-amber-100 text-amber-700 border-amber-200",low:"bg-green-100 text-green-700 border-green-200"};return $[I]||$.medium},E=I=>I==="approve"?a.jsx(t$,{className:"h-4 w-4 text-green-600"}):I==="reject"?a.jsx(eK,{className:"h-4 w-4 text-red-600"}):a.jsx($i,{className:"h-4 w-4 text-amber-600"});if(i)return a.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading verification queue..."})});const A=b("alpha"),k=b("actor"),M=b("kenia");return a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsx("div",{className:"flex items-center justify-between mb-6",children:a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Verification Queue"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Review and validate data before publishing"})]})}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6",children:[a.jsx(Ee,{className:"bg-amber-50 border-amber-200",children:a.jsxs($e,{className:"p-4 flex items-center gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-amber-100 flex items-center justify-center",children:a.jsx(Bn,{className:"h-6 w-6 text-amber-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-amber-700",children:A.length}),a.jsx("p",{className:"text-sm text-amber-600",children:"Alpha Review"})]})]})}),a.jsx(Ee,{className:"bg-blue-50 border-blue-200",children:a.jsxs($e,{className:"p-4 flex items-center gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-100 flex items-center justify-center",children:a.jsx(yV,{className:"h-6 w-6 text-blue-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-blue-700",children:k.length}),a.jsx("p",{className:"text-sm text-blue-600",children:"Actor Confirmation"})]})]})}),a.jsx(Ee,{className:"bg-emerald-50 border-emerald-200",children:a.jsxs($e,{className:"p-4 flex items-center gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-emerald-100 flex items-center justify-center",children:a.jsx(Un,{className:"h-6 w-6 text-emerald-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-emerald-700",children:M.length}),a.jsx("p",{className:"text-sm text-emerald-600",children:"Intelligence Officer Final"})]})]})})]}),a.jsxs(Ns,{value:o,onValueChange:c,children:[a.jsxs(qa,{className:"mb-6",children:[a.jsxs(Ut,{value:"alpha",className:"gap-2",children:["Alpha Review",a.jsx(Ce,{variant:"secondary",children:A.length})]}
1263),a.jsxs(Ut,{value:"actor",className:"gap-2",children:["Actor Confirmation",a.jsx(Ce,{variant:"secondary",children:k.length})]}),a.jsxs(Ut,{value:"kenia",className:"gap-2",children:["Intelligence Officer Validation",a.jsx(Ce,{variant:"secondary",children:M.length})]})]}),["alpha","actor","kenia"].map(I=>a.jsx(cn,{value:I,children:b(I).length===0?a.jsx(fr,{icon:Un,title:"Queue is empty",description:"No pending items for this stage"}):a.jsx("div",{className:"space-y-3",children:b(I).map($=>{var q;return a.jsx(Ee,{className:"hover:shadow-md transition-shadow",children:a.jsx($e,{className:"p-4",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900",children:$.entity_name}),a.jsx("p",{className:"text-sm text-slate-500 mt-1",children:$.summary})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ce,{variant:"outline",className:C($.priority),children:$.priority||"medium"}),a.jsx(Ce,{variant:"secondary",children:$.entity_type})]})]}),$.ai_recommendation&&a.jsxs("div",{className:"mt-3 p-3 bg-slate-50 rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[E($.ai_recommendation),a.jsxs("span",{className:"text-sm font-medium text-slate-700",children:["AI Recommends: ",$.ai_recommendation]}),$.ai_confidence&&a.jsxs(Ce,{variant:"outline",className:"text-xs",children:[$.ai_confidence,"% confidence"]})]}),$.ai_rationale&&a.jsx("p",{className:"text-xs text-slate-500",children:$.ai_rationale})]}),((q=$.issues_flagged)==null?void 0:q.length)>0&&a.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:$.issues_flagged.map((V,H)=>a.jsxs(Ce,{variant:"outline",className:"bg-red-50 text-red-700 border-red-200",children:[a.jsx($i,{className:"h-3 w-3 mr-1"}),V.description]},H))}),a.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[a.jsxs("span",{className:"text-xs text-slate-400",children:["Created ",$.created_date?Tt(new Date($.created_date),"MMM d, yyyy"):"recently"]}),$.deadline&&a.jsxs("span",{className:"text-xs text-amber-600",children:["Due: ",Tt(new Date($.deadline),"MMM d")]})]})]}),a.jsx("div",{className:"flex flex-col gap-2",children:a.jsxs(Ne,{size:"sm",variant:"outline",onClick:()=>h($),className:"gap-1",children:[a.jsx(Av,{className:"h-4 w-4"}),"Review"]})})]})})},$.id)})})},I))]}),a.jsx(Yf,{open:!!d,onOpenChange:()=>h(null),children:a.jsxs(Pu,{className:"max-w-lg",children:[a.jsxs(ku,{children:[a.jsxs(Au,{children:["Review: ",d==null?void 0:d.entity_name]}),a.jsx(Xf,{children:d==null?void 0:d.summary})]}),a.jsxs("div",{className:"space-y-4",children:[(d==null?void 0:d.ai_recommendation)&&a.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[E(d.ai_recommendation),a.jsxs("span",{className:"font-medium",children:["AI Recommendation: ",d.ai_recommendation]})]}),a.jsx("p",{className:"text-sm text-slate-600",children:d==null?void 0:d.ai_rationale})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Review Notes (optional)"}),a.jsx(bo,{value:p,onChange:I=>m(I.target.value),placeholder:"Add notes about your decision...",rows:3})]})]}),a.jsxs(tg,{className:"gap-2",children:[a.jsxs(Ne,{variant:"outline",onClick:()=>j(d),disabled:v,className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:[v?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(nu,{className:"h-4 w-4 mr-1"}),"Reject"]}),a.jsxs(Ne,{onClick:()=>_(d),disabled:v,className:"bg-emerald-600 hover:bg-emerald-700",children:[v?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(Un,{className:"h-4 w-4 mr-1"}),"Approve"]})]})]})})]})}var a2=["Enter"," "],jSe=["ArrowDown","PageUp","Home"],l9=["ArrowUp","PageDown","End"],SSe=[...jSe,...l9],NSe={ltr:[...a2,"ArrowRight"],rtl:[...a2,"ArrowLeft"]},CSe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},dg="Menu",[Rm,ESe,PSe]=L2(dg),[Lu,c9]=Bi(dg,[PSe,ql,p0]),_b=ql(),u9=p0(),[kSe,Du]=Lu(dg),[ASe,fg]=Lu(dg),d9=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:s,modal:o=!0}=e,c=_b(t),[d,h]=P.useState(null),p=P.useRef(!1),m=bs(s),v=h0(i);return P.useEffect(()=>{const x=()=>{p.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>p.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),a.jsx(P0,{...c,children:a.jsx(kSe,{scope:t,open:n,onOpenChange:m,content:d,onContentChange:h,children:a.jsx(ASe,{scope:t,onClose:P.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:v,modal:o,children:r})})})};
vendor: 12,901 bytes, line 1263
1263d9.displayName=dg;var OSe="MenuAnchor",pk=P.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=_b(n);return a.jsx(k0,{...i,...r,ref:t})});pk.displayName=OSe;var mk="MenuPortal",[TSe,f9]=Lu(mk,{forceMount:void 0}),h9=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,s=Du(mk,t);return a.jsx(TSe,{scope:t,forceMount:n,children:a.jsx(zi,{present:n||s.open,children:a.jsx(eg,{asChild:!0,container:i,children:r})})})};h9.displayName=mk;var da="MenuContent",[MSe,gk]=Lu(da),p9=P.forwardRef((e,t)=>{const n=f9(da,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=Du(da,e.__scopeMenu),o=fg(da,e.__scopeMenu);return a.jsx(Rm.Provider,{scope:e.__scopeMenu,children:a.jsx(zi,{present:r||s.open,children:a.jsx(Rm.Slot,{scope:e.__scopeMenu,children:o.modal?a.jsx(RSe,{...i,ref:t}):a.jsx(ISe,{...i,ref:t})})})})}),RSe=P.forwardRef((e,t)=>{const n=Du(da,e.__scopeMenu),r=P.useRef(null),i=Bt(t,r);return P.useEffect(()=>{const s=r.current;if(s)return F2(s)},[]),a.jsx(yk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:He(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ISe=P.forwardRef((e,t)=>{const n=Du(da,e.__scopeMenu);return a.jsx(yk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),LSe=du("MenuContent.ScrollLock"),yk=P.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:x,disableOutsideScroll:w,...b}=e,_=Du(da,n),j=fg(da,n),C=_b(n),E=u9(n),A=ESe(n),[k,M]=P.useState(null),I=P.useRef(null),$=Bt(t,I,_.onContentChange),q=P.useRef(0),V=P.useRef(""),H=P.useRef(0),U=P.useRef(null),z=P.useRef("right"),Z=P.useRef(0),ee=w?v0:P.Fragment,G=w?{as:LSe,allowPinchZoom:!0}:void 0,oe=ie=>{var fe,_e;const ae=V.current+ie,K=A().filter(de=>!de.disabled),ne=document.activeElement,ve=(fe=K.find(de=>de.ref.current===ne))==null?void 0:fe.textValue,je=K.map(de=>de.textValue),Y=GSe(je,ae,ve),he=(_e=K.find(de=>de.textValue===Y))==null?void 0:_e.ref.current;(function de(we){V.current=we,window.clearTimeout(q.current),we!==""&&(q.current=window.setTimeout(()=>de(""),1e3))})(ae),he&&setTimeout(()=>he.focus())};P.useEffect(()=>()=>window.clearTimeout(q.current),[]),$2();const W=P.useCallback(ie=>{var K,ne;return z.current===((K=U.current)==null?void 0:K.side)&&YSe(ie,(ne=U.current)==null?void 0:ne.area)},[]);return a.jsx(MSe,{scope:n,searchRef:V,onItemEnter:P.useCallback(ie=>{W(ie)&&ie.preventDefault()},[W]),onItemLeave:P.useCallback(ie=>{var ae;W(ie)||((ae=I.current)==null||ae.focus(),M(null))},[W]),onTriggerLeave:P.useCallback(ie=>{W(ie)&&ie.preventDefault()},[W]),pointerGraceTimerRef:H,onPointerGraceIntentChange:P.useCallback(ie=>{U.current=ie},[]),children:a.jsx(ee,{...G,children:a.jsx(g0,{asChild:!0,trapped:i,onMountAutoFocus:He(s,ie=>{var ae;ie.preventDefault(),(ae=I.current)==null||ae.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:a.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:x,children:a.jsx(X6,{asChild:!0,...E,dir:j.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:M,onEntryFocus:He(d,ie=>{j.isUsingKeyboardRef.current||ie.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(A0,{role:"menu","aria-orientation":"vertical","data-state":A9(_.open),"data-radix-menu-content":"",dir:j.dir,...C,...b,ref:$,style:{outline:"none",...b.style},onKeyDown:He(b.onKeyDown,ie=>{const K=ie.target.closest("[data-radix-menu-content]")===ie.currentTarget,ne=ie.ctrlKey||ie.altKey||ie.metaKey,ve=ie.key.length===1;K&&(ie.key==="Tab"&&ie.preventDefault(),!ne&&ve&&oe(ie.key));const je=I.current;if(ie.target!==je||!SSe.includes(ie.key))return;ie.preventDefault();const he=A().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);l9.includes(ie.key)&&he.reverse(),VSe(he)}),onBlur:He(e.onBlur,ie=>{ie.currentTarget.contains(ie.target)||(window.clearTimeout(q.current),V.current="")}),onPointerMove:He(e.onPointerMove,Im(ie=>{const ae=ie.target,K=Z.current!==ie.clientX;if(ie.currentTarget.contains(ae)&&K){const ne=ie.clientX>Z.current?"right":"left";z.current=ne,Z.current=ie.clientX}}))})})})})})})});p9.displayName=da;var DSe="MenuGroup",vk=P.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(vt.div,{role:"group",...r,ref:t})});vk.displayName=DSe;var $Se="MenuLabel",m9=P.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(vt.div,{...r,ref:t})});m9.displayName=$Se;var Zx="MenuItem",m3="menu.itemSelect",wb=P.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,s=P.useRef(null),o=fg(Zx,e.__scopeMenu),c=gk(Zx,e.__scopeMenu),d=Bt(t,s),h=P.useRef(!1),p=()=>{const m=s.current;if(!n&&m){const v=new CustomEvent(m3,{bubbles:!0,cancelable:!0});m.addEventListener(m3,x=>r==null?void 0:r(x),{once:!0}),F6(m,v),v.defaultPrevented?h.current=!1:o.onClose()}};return a.jsx(g9,{...i,ref:d,disabled:n,onClick:He(e.onClick,p),onPointerDown:m=>{var v;(v=e.onPointerDown)==null||v.call(e,m),h.current=!0},onPointerUp:He(e.onPointerUp,m=>{var v;h.current||(v=m.currentTarget)==null||v.click()}),onKeyDown:He(e.onKeyDown,m=>{const v=c.searchRef.current!=="";n||v&&m.key===" "||a2.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});wb.displayName=Zx;var g9=P.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=e,o=gk(Zx,n),c=u9(n),d=P.useRef(null),h=Bt(t,d),[p,m]=P.useState(!1),[v,x]=P.useState("");return P.useEffect(()=>{const w=d.current;w&&x((w.textContent??"").trim())},[s.children]),a.jsx(Rm.ItemSlot,{scope:n,disabled:r,textValue:i??v,children:a.jsx(Q6,{asChild:!0,...c,focusable:!r,children:a.jsx(vt.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:h,onPointerMove:He(e.onPointerMove,Im(w=>{r?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:He(e.onPointerLeave,Im(w=>o.onItemLeave(w))),onFocus:He(e.onFocus,()=>m(!0)),onBlur:He(e.onBlur,()=>m(!1))})})})}),FSe="MenuCheckboxItem",y9=P.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return a.jsx(w9,{scope:e.__scopeMenu,checked:n,children:a.jsx(wb,{role:"menuitemcheckbox","aria-checked":Yx(n)?"mixed":n,...i,ref:t,"data-state":bk(n),onSelect:He(i.onSelect,()=>r==null?void 0:r(Yx(n)?!0:!n),{checkForDefaultPrevented:!1})})})});y9.displayName=FSe;var v9="MenuRadioGroup",[BSe,zSe]=Lu(v9,{value:void 0,onValueChange:()=>{}}),x9=P.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,s=bs(r);return a.jsx(BSe,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(vk,{...i,ref:t})})});x9.displayName=v9;var b9="MenuRadioItem",_9=P.forwardRef((e,t)=>{const{value:n,...r}=e,i=zSe(b9,e.__scopeMenu),s=n===i.value;return a.jsx(w9,{scope:e.__scopeMenu,checked:s,children:a.jsx(wb,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":bk(s),onSelect:He(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});_9.displayName=b9;var xk="MenuItemIndicator",[w9,USe]=Lu(xk,{checked:!1}),j9=P.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,s=USe(xk,n);return a.jsx(zi,{present:r||Yx(s.checked)||s.checked===!0,children:a.jsx(vt.span,{...i,ref:t,"data-state":bk(s.checked)})})});j9.displayName=xk;var qSe="MenuSeparator",S9=P.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(vt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});S9.displayName=qSe;var HSe="MenuArrow",N9=P.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=_b(n);return a.jsx(O0,{...i,...r,ref:t})});N9.displayName=HSe;var WSe="MenuSub",[$Ee,C9]=Lu(WSe),kp="MenuSubTrigger",E9=P.forwardRef((e,t)=>{const n=Du(kp,e.__scopeMenu),r=fg(kp,e.__scopeMenu),i=C9(kp,e.__scopeMenu),s=gk(kp,e.__scopeMenu),o=P.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,h={__scopeMenu:e.__scopeMenu},p=P.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return P.useEffect(()=>p,[p]),P.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),d(null)}},[c,d]),a.jsx(pk,{asChild:!0,...h,children:a.jsx(g9,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":A9(n.open),...e,ref:d0(t,i.onTriggerChange),onClick:m=>{var v;(v=e.onClick)==null||v.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:He(e.onPointerMove,Im(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:He(e.onPointerLeave,Im(m=>{var x,w;p();const v=(x=n.content)==null?void 0:x.getBoundingClientRect();if(v){const b=(w=n.content)==null?void 0:w.dataset.side,_=b==="right",j=_?-5:5,C=v[_?"left":"right"],E=v[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+j,y:m.clientY},{x:C,y:v.top},{x:E,y:v.top},{x:E,y:v.bottom},{x:C,y:v.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:He(e.onKeyDown,m=>{var x;const v=s.searchRef.current!=="";e.disabled||v&&m.key===" "||NSe[r.dir].includes(m.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),m.preventDefault())})})})});E9.displayName=kp;var P9="MenuSubContent",k9=P.forwardRef((e,t)=>{const n=f9(da,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=Du(da,e.__scopeMenu),o=fg(da,e.__scopeMenu),c=C9(P9,e.__scopeMenu),d=P.useRef(null),h=Bt(t,d);return a.jsx(Rm.Provider,{scope:e.__scopeMenu,children:a.jsx(zi,{present:r||s.open,children:a.jsx(Rm.Slot,{scope:e.__scopeMenu,children:a.jsx(yk,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:h,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var m;o.isUsingKeyboardRef.current&&((m=d.current)==null||m.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:He(e.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:He(e.onEscapeKeyDown,p=>{o.onClose(),p.preventDefault()}),onKeyDown:He(e.onKeyDown,p=>{var x;const m=p.currentTarget.contains(p.target),v=CSe[o.dir].includes(p.key);m&&v&&(s.onOpenChange(!1),(x=c.trigger)==null||x.focus(),p.preventDefault())})})})})})});k9.displayName=P9;function A9(e){return e?"open":"closed"}function Yx(e){return e==="indeterminate"}function bk(e){return Yx(e)?"indeterminate":e?"checked":"unchecked"}function VSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function KSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function GSe(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let o=KSe(e,Math.max(s,0));i.length===1&&(o=o.filter(h=>h!==n));const d=o.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function ZSe(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const c=t[s],d=t[o],h=c.x,p=c.y,m=d.x,v=d.y;p>r!=v>r&&n<(m-h)*(r-p)/(v-p)+h&&(i=!i)}return i}function YSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ZSe(n,t)}function Im(e){return t=>t.pointerType==="mouse"?e(t):void 0}var XSe=d9,QSe=pk,JSe=h9,eNe=p9,tNe=vk,nNe=m9,rNe=wb,iNe=y9,aNe=x9,sNe=_9,oNe=j9,lNe=S9,cNe=N9,uNe=E9,dNe=k9,jb="DropdownMenu",[fNe]=Bi(jb,[c9]),Qr=c9(),[hNe,O9]=fNe(jb),T9=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:o,modal:c=!0}=e,d=Qr(t),h=P.useRef(null),[p,m]=xs({prop:i,defaultProp:s??!1,onChange:o,caller:jb});return a.jsx(hNe,{scope:t,triggerId:Ia(),triggerRef:h,contentId:Ia(),open:p,onOpenChange:m,onOpenToggle:P.useCallback(()=>m(v=>!v),[m]),modal:c,children:a.jsx(XSe,{...d,open:p,onOpenChange:m,dir:r,modal:c,children:n})})};T9.displayName=jb;var M9="DropdownMenuTrigger",R9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,s=O9(M9,n),o=Qr(n);return a.jsx(QSe,{asChild:!0,...o,children:a.jsx(vt.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:d0(t,s.triggerRef),onPointerDown:He(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:He(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});
1263R9.displayName=M9;var pNe="DropdownMenuPortal",I9=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Qr(t);return a.jsx(JSe,{...r,...n})};I9.displayName=pNe;var L9="DropdownMenuContent",D9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=O9(L9,n),s=Qr(n),o=P.useRef(!1);return a.jsx(eNe,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:t,onCloseAutoFocus:He(e.onCloseAutoFocus,c=>{var d;o.current||(d=i.triggerRef.current)==null||d.focus(),o.current=!1,c.preventDefault()}),onInteractOutside:He(e.onInteractOutside,c=>{const d=c.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,p=d.button===2||h;(!i.modal||p)&&(o.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)"}})});D9.displayName=L9;var mNe="DropdownMenuGroup",gNe=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(tNe,{...i,...r,ref:t})});gNe.displayName=mNe;var yNe="DropdownMenuLabel",$9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(nNe,{...i,...r,ref:t})});$9.displayName=yNe;var vNe="DropdownMenuItem",F9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(rNe,{...i,...r,ref:t})});F9.displayName=vNe;var xNe="DropdownMenuCheckboxItem",B9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(iNe,{...i,...r,ref:t})});B9.displayName=xNe;var bNe="DropdownMenuRadioGroup",_Ne=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(aNe,{...i,...r,ref:t})});_Ne.displayName=bNe;var wNe="DropdownMenuRadioItem",z9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(sNe,{...i,...r,ref:t})});z9.displayName=wNe;var jNe="DropdownMenuItemIndicator",U9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(oNe,{...i,...r,ref:t})});U9.displayName=jNe;var SNe="DropdownMenuSeparator",q9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(lNe,{...i,...r,ref:t})});q9.displayName=SNe;var NNe="DropdownMenuArrow",CNe=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(cNe,{...i,...r,ref:t})});CNe.displayName=NNe;var ENe="DropdownMenuSubTrigger",H9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(uNe,{...i,...r,ref:t})});H9.displayName=ENe;var PNe="DropdownMenuSubContent",W9=P.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qr(n);return a.jsx(dNe,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});W9.displayName=PNe;var kNe=T9,ANe=R9,ONe=I9,V9=D9,K9=$9,G9=F9,Z9=B9,Y9=z9,X9=U9,Q9=q9,J9=H9,eq=W9;const RN=kNe,IN=ANe,TNe=P.forwardRef(({className:e,inset:t,children:n,...r},i)=>a.jsxs(J9,{ref:i,className:ze("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,a.jsx(t0,{className:"ml-auto"})]}));TNe.displayName=J9.displayName;const MNe=P.forwardRef(({className:e,...t},n)=>a.jsx(eq,{ref:n,className:ze("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
1263de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));MNe.displayName=eq.displayName;const Cv=P.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(ONe,{children:a.jsx(V9,{ref:r,sideOffset:t,className:ze("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),...n})}));Cv.displayName=V9.displayName;const Ev=P.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(G9,{ref:r,className:ze("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Ev.displayName=G9.displayName;const RNe=P.forwardRef(({className:e,children:t,checked:n,...r},i)=>a.jsxs(Z9,{ref:i,className:ze("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(X9,{children:a.jsx(Su,{className:"h-4 w-4"})})}),t]}));RNe.displayName=Z9.displayName;const INe=P.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Y9,{ref:r,className:ze("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(X9,{children:a.jsx(rW,{className:"h-2 w-2 fill-current"})})}),t]}));INe.displayName=Y9.displayName;const LNe=P.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(K9,{ref:r,className:ze("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));LNe.displayName=K9.displayName;const tq=P.forwardRef(({className:e,...t},n)=>a.jsx(Q9,{ref:n,className:ze("-mx-1 my-1 h-px bg-muted",e),...t}));tq.displayName=Q9.displayName;function DNe({children:e,currentPageName:t}){var b,_;const[n,r]=P.useState(null),[i,s]=P.useState(!0),[o,c]=P.useState(!1),[d,h]=P.useState(0);P.useEffect(()=>{(async()=>{try{const C=await Q.auth.me();r(C)}catch{}s(!1)})()},[]),P.useEffect(()=>{(async()=>{try{const C=await Q.entities.VerificationRequest.filter({status:"pending"});h(C.length)}catch{}})()},[]),P.useEffect(()=>{const C=["AgentConsole","VerificationQueue","DataQuality","UserManagement","AdminSettings","SearchInsights","Coverage"].includes(t);let E=document.querySelector('meta[name="robots"]');const A=E?E.content:null;return C?(E||(E=document.createElement("meta"),E.name="robots",document.head.appendChild(E)),E.content="noindex, nofollow"):E&&(E.content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"),()=>{E&&A!==null&&(E.content=A)}},[t]);const p=(n==null?void 0:n.role)==="admin",m=(n==null?void 0:n.role)==="admin"||(n==null?void 0:n.role)==="analyst",v=[{name:"Dashboard",href:ot("Home"),icon:Y3},{name:"Innovation Pulse",href:ot("ExecutiveDashboard"),icon:Jx},{name:"Startups",href:ot("Startups"),icon:er},{name:"Investors",href:ot("Investors"),icon:Ri},{name:"ESOs",href:ot("ESOs"),icon:tr},{name:"Events",href:ot("Events"),icon:c2},{name:"Gov Innovation",href:ot("GovInnovation"),icon:Ti},{name:"Insights",href:ot("Insights"),icon:sa},{name:"Press Kit",href:ot("PressKit"),icon:ur}],x=[{name:"Verification Queue",href:ot("VerificationQueue"),icon:Un,badge:d},{name:"Data Quality",href:ot("DataQuality"),icon:po},{name:"Reports",href:ot("Reports"),icon:ur}],w=[{name:"Agent Console",href:ot("AgentConsole"),icon:Oi},{name:"Search Insights",href:ot("SearchInsights"),icon:hr},{name:"Users",href:ot("UserManagement"),icon:tr},{name:"Settings",href:ot("AdminSettings"),icon:e$},{name:"Coverage",href:ot("Coverage"),icon:TV}];return a.jsxs("div",{className:"min-h-screen bg-slate-50",children:[a.jsxs("header",{className:"bg-white border-b border-slate-200 sticky top-0 z-50",children:[a.jsx("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex items-center justify-between h-16",children:[a.jsxs(yt,{to:ot("Home"),className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-lg",children:"K"})}),a.jsxs("div",{className:"hidden sm:block",children:[a.jsx("h1",{className:"text-lg font-semibold text-slate-900",children:"Kenya Innovation"}),a.jsx("p",{className:"text-xs text-slate-500 -mt-0.5",children:"Ecosystem"})]})]}),a.jsxs("nav",{className:"hidden lg:flex items-center gap-1",children:[v.map(j=>a.jsx(yt,{to:j.href,className:ze("px-3 py-2 rounded-lg text-sm font-medium transition-colors",t===j.name.replace(" ","")?"bg-emerald-50 text-emerald-700":"text-slate-600 hover:bg-slate-100"),children:j.name},j.name)),m&&a.jsxs(RN,{children:[a.jsx(IN,{asChild:!0,children:a.jsxs(Ne,{variant:"ghost",className:"gap-1 text-sm font-medium text-slate-600",children:["Analyst Tools",a.jsx(kv,{className:"h-4 w-4"}),d>0&&a.jsx(Ce,{className:"ml-1 bg-amber-500 text-white text-xs px-1.5 py-0",children:d})]})}),a.jsx(Cv,{align:"end",className:"w-48",children:x.map(j=>a.jsx(Ev,{asChild:!0,children:a.jsxs(yt,{to:j.href,className:"flex items-center gap-2",children:[a.jsx(j.icon,{className:"h-4 w-4"}),j.name,j.badge>0&&a.jsx(Ce,{className:"ml-auto bg-amber-500 text-white text-xs px-1.5 py-0",children:j.badge})]})},j.name))})]}),p&&a.jsxs(RN,{children:[a.jsx(IN,{asChild:!0,children:a.jsxs(Ne,{variant:"ghost",className:"gap-1 text-sm font-medium text-slate-600",children:["Admin",a.jsx(kv,{className:"h-4 w-4"})]})}),a.jsx(Cv,{align:"end",className:"w-48",children:w.map(j=>a.jsx(Ev,{asChild:!0,children:a.jsxs(yt,{to:j.href,className:"flex items-center gap-2",children:[a.jsx(j.icon,{className:"h-4 w-4"}),j.name]})},j.name))})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(yt,{to:ot("Solutions"),children:a.jsxs(Ne,{className:"gap-2 hidden md:inline-flex bg-slate-900 hover:bg-slate-800",children:[a.jsx(ca,{className:"h-4 w-4"}),"Need a dashboard?"]})}),a.jsx(yt,{to:ot("PublicSubmit"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2 hidden sm:inline-flex border-emerald-200 text-emerald-700 hover:bg-emerald-50",children:[a.jsx(cf,{className:"h-4 w-4"}),"Submit Info"]})}),a.jsx(yt,{to:ot("Search"),children:a.jsx(Ne,{variant:"ghost",size:"icon",className:"text-slate-500",children:a.jsx(hr,{className:"h-5 w-5"})})}),n?a.jsxs(RN,{children:[a.jsx(IN,{asChild:!0,children:a.jsxs(Ne,{variant:"ghost",className:"gap-2",children:[a.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-emerald-400 to-teal-500 flex items-center justify-center",children:a.jsx("span",{className:"text-white text-sm font-medium",children:((b=n.full_name)==null?void 0:b[0])||((_=n.email)==null?void 0:_[0])||"U"})}),a.jsx("span",{className:"hidden sm:inline text-sm font-medium text-slate-700",children:n.full_name||n.email})]})}),a.jsxs(Cv,{align:"end",className:"w-56",children:[a.jsxs("div",{className:"px-2 py-1.5",children:[a.jsx("p",{className:"text-sm font-medium",children:n.full_name||"User"}),a.jsx("p",{className:"text-xs text-slate-500",children:n.email}),a.jsx(Ce,{variant:"outline",className:"mt-1 text-xs",children:n.role||"user"})]}),a.jsx(tq,{}),a.jsxs(Ev,{onClick:()=>Q.auth.logout(),children:[a.jsx(tV,{className:"h-4 w-4 mr-2"}),"Sign out"]})]})]}):a.jsx(Ne,{onClick:()=>Q.auth.redirectToLogin(),className:"bg-emerald-600 hover:bg-emerald-700",children:"Sign In"}),a.jsx(Ne,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>c(!o),children:o?a.jsx(xo,{className:"h-5 w-5"}):a.jsx(uV,{className:"h-5 w-5"})})]})]})}),o&&a.jsx("div",{className:"lg:hidden border-t border-slate-200 bg-white",children:a.jsxs("nav",{className:"px-4 py-3 space-y-1",children:[v.map(j=>a.jsxs(yt,{to:j.href,onClick:()=>c(!1),className:ze("flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium",t===j.name.replace(" ","")?"bg-emerald-50 text-emerald-700":"text-slate-600 hover:bg-slate-100"),children:[a.jsx(j.icon,{className:"h-5 w-5"}),j.name]},j.name)),a.jsxs(yt,{to:ot("PublicSubmit"),onClick:()=>c(!1),className:"flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium text-emerald-700 hover:bg-emerald-50",children:[a.jsx(cf,{className:"h-5 w-5"}),"Submit Info"]}),a.jsxs(yt,{to:ot("Solutions"),onClick:()=>c(!1),className:"flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium text-slate-700 hover:bg-slate-100",children:[a.jsx(ca,{className:"h-5 w-5"}),"Need a dashboard?"]}),m&&a.jsx(a.Fragment,{children:a.jsxs("div",{className:"border-t border-slate-200 my-2 pt-2",children:[a.jsx("p",{className:"px-3 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2",children:"Analyst Tools"}),x.map(j=>a.jsxs(yt,{to:j.href,onClick:()=>c(!1),className:"flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-100",children:[a.jsx(j.icon,{className:"h-5 w-5"}),j.name,j.badge>0&&a.jsx(Ce,{className:"ml-auto bg-amber-500 text-white text-xs",children:j.badge})]},j.name))]})}),p&&a.jsx(a.Fragment,{children:a.jsxs("div",{className:"border-t border-slate-200 my-2 pt-2",children:[a.jsx("p",{className:"px-3 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2",children:"Admin"}),w.map(j=>a.jsxs(yt,{to:j.href,onClick:()=>c(!1),className:"flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-100",children:[a.jsx(j.icon,{className:"h-5 w-5"}),j.name]},j.name))]})})]})})]}),a.jsx("main",{className:"min-h-[calc(100vh-64px)]",children:e}),a.jsx("footer",{className:"bg-white border-t border-slate-200 py-8",children:a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx("div",{className:"mb-4 px-4 py-2.5 bg-amber-50 border border-amber-200 rounded-lg text-center",children:a.jsxs("p",{className:"text-xs text-amber-800",children:[a.jsx("strong",{children:"Independent private OSINT initiative."})," Not an official Government of Kenya platform."]})}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[a.jsxs("div",{children:[a.jsxs("h3",{className:"text-sm font-semibold text-slate-900 mb-2 flex items-center gap-2",children:[a.jsx(ca,{className:"h-4 w-4 text-emerald-600"}),"Need a dashboard for your country or sector?"]}),a.jsx("p",{className:"text-sm text-slate-500 max-w-lg",children:"We deploy the same OSINT intelligence engine: automated collection, AI validation, and decision-grade dashboards for innovation, education, welfare, security, crime, agriculture, and virtually any domain, in any country."})]}),a.jsx("div",{className:"flex md:justify-end items-center",children:a.jsx(yt,{to:ot("Solutions"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2 border-slate-300 hover:bg-slate-50",children:["Need a dashboard? ",a.jsx(Lr,{className:"h-4 w-4"})]})})})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 pt-6 border-t border-slate-100",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[a.jsx(pi,{className:"h-4 w-4"}),"Kenya Innovation Ecosystem"]}),a.jsx(yt,{to:ot("Collaborate"),className:"text-sm text-emerald-700 hover:text-emerald-800 font-medium",children:"Collaborate"}),a.jsx(yt,{to:ot("PressKit"),className:"text-sm text-emerald-700 hover:text-emerald-800 font-medium",children:"Press Kit"}),a.jsx(yt,{to:ot("Terms"),className:"text-sm text-emerald-700 hover:text-emerald-800 font-medium",children:"Terms of Use"})]}),a.jsx("p",{className:"text-sm text-slate-400",children:"©All Rights Reserved To Haim Etkin, Strategic OSINT & Intelligence Integration®  [email protected]"})]})]})})]})}
1263const $Ne={AdminSettings:zee,AgentConsole:noe,DataQuality:roe,ESODetail:koe,ESOs:Ioe,Events:Boe,Home:sSe,InvestorDetail:oSe,Investors:uSe,Reports:hSe,Search:pSe,StartupDetail:mSe,Startups:bSe,VerificationQueue:_Se},nq={mainPage:"Home",Pages:$Ne,Layout:DNe};function FNe(){const e=Wf(),{isAuthenticated:t}=D6(),{Pages:n,mainPage:r}=nq,i=r;return P.useEffect(()=>{const s=e.pathname;let o;if(s==="/"||s==="")o=i;else{const c=s.replace(/^\//,"").split("/")[0];o=Object.keys(n).find(p=>p.toLowerCase()===c.toLowerCase())||null}t&&o&&Q.appLogs.logUserInApp(o).catch(()=>{})},[e,t,n,i]),null}function BNe({}){var i;const t=Wf().pathname.substring(1),{data:n,isFetched:r}=HG({queryKey:["user"],queryFn:async()=>{try{return{user:await Q.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return a.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:a.jsx("div",{className:"max-w-md w-full",children:a.jsxs("div",{className:"text-center space-y-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),a.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),a.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",a.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&a.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),a.jsxs("div",{className:"text-left space-y-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),a.jsx("div",{className:"pt-6",children:a.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[a.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const zNe=()=>a.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:a.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:a.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),a.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),a.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[a.jsx("p",{children:"If you believe this is an error, you can:"}),a.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[a.jsx("li",{children:"Verify you are logged in with the correct account"}),a.jsx("li",{children:"Contact the app administrator for access"}),a.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),g3={Ministry:"bg-blue-100 text-blue-700","State Department":"bg-indigo-100 text-indigo-700",Authority:"bg-emerald-100 text-emerald-700",Agency:"bg-teal-100 text-teal-700",Parastatal:"bg-amber-100 text-amber-700",Regulator:"bg-rose-100 text-rose-700","County Government":"bg-purple-100 text-purple-700","Donor/Development Partner":"bg-cyan-100 text-cyan-700",Other:"bg-slate-100 text-slate-700"};function UNe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState(""),[o,c]=P.useState("all"),[d,h]=P.useState(!1);P.useEffect(()=>{Q.auth.me().then(b=>h((b==null?void 0:b.role)==="admin")).catch(()=>h(!1)),p()},[]);const p=async()=>{try{const b=await Q.entities.GovProgram.list();t(b)}catch(b){console.error("Error loading gov programs:",b)}finally{r(!1)}},m=e.filter(b=>{var C,E,A;if(!Dr(b,d))return!1;const _=!i||((C=b.name)==null?void 0:C.toLowerCase().includes(i.toLowerCase()))||((E=b.description)==null?void 0:E.toLowerCase().includes(i.toLowerCase()))||((A=b.innovation_focus)==null?void 0:A.some(k=>k.toLowerCase().includes(i.toLowerCase()))),j=o==="all"||b.org_type===o;return _&&j}),v=["all",...new Set(e.map(b=>
1263b.org_type).filter(Boolean))],x=e.filter(b=>b.ai_initiatives).length,w=e.filter(b=>b.has_online_portal).length;return n?a.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading government innovation programs..."})}):a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 tracking-tight flex items-center gap-3",children:[a.jsx(Ti,{className:"h-8 w-8 text-emerald-600"}),"Government Innovation & Public Administration"]}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Innovation, AI, and digital-service initiatives across Kenya's ministries, departments, and agencies — internal efficiency and public accessibility."})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6",children:[a.jsx(Ee,{children:a.jsxs($e,{className:"p-5 flex items-center gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500 flex items-center justify-center",children:a.jsx(Ti,{className:"h-6 w-6 text-white"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.length}),a.jsx("p",{className:"text-sm text-slate-500",children:"Institutions tracked"})]})]})}),a.jsx(Ee,{children:a.jsxs($e,{className:"p-5 flex items-center gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-emerald-500 flex items-center justify-center",children:a.jsx(lf,{className:"h-6 w-6 text-white"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:x}),a.jsx("p",{className:"text-sm text-slate-500",children:"With AI initiatives"})]})]})}),a.jsx(Ee,{children:a.jsxs($e,{className:"p-5 flex items-center gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-amber-500 flex items-center justify-center",children:a.jsx(ou,{className:"h-6 w-6 text-white"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:w}),a.jsx("p",{className:"text-sm text-slate-500",children:"With online portal"})]})]})})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-6",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(hr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),a.jsx(Wt,{value:i,onChange:b=>s(b.target.value),placeholder:"Search institutions, AI initiatives, focus areas...",className:"pl-10"})]}),a.jsx("div",{className:"flex gap-2 flex-wrap",children:v.map(b=>a.jsx(Ne,{variant:o===b?"default":"outline",size:"sm",onClick:()=>c(b),className:o===b?"bg-emerald-600 hover:bg-emerald-700":"",children:b==="all"?"All Types":b},b))})]}),m.length===0?a.jsx(fr,{icon:Ti,title:"No government programs yet",description:"Government innovation programs will appear here once the collector agent runs."}):a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:m.map(b=>{var _;return a.jsx(Ee,{className:"hover:shadow-md transition-shadow",children:a.jsxs($e,{className:"p-5",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[b.logo_url?a.jsx("img",{src:b.logo_url,alt:b.name,className:"w-11 h-11 rounded-lg object-cover"}):a.jsx("div",{className:"w-11 h-11 rounded-xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center",children:a.jsx(Ti,{className:"h-5 w-5 text-white"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900 leading-tight",children:b.name}),b.parent_ministry&&a.jsxs("p",{className:"text-xs text-slate-500",children:["Under ",b.parent_ministry]})]})]}),a.jsx(Ce,{className:g3[b.org_type]||g3.Other,children:b.org_type})]}),b.description&&a.jsx("p",{className:"text-sm text-slate-600 mb-3 line-clamp-3",children:b.description}),((_=b.innovation_focus)==null?void 0:_.length)>0&&a.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:b.innovation_focus.slice(0,5).map(j=>a.jsx(Ce,{variant:"outline",className:"text-xs",children:j},j))}),b.ai_initiatives&&a.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-600 mb-3 bg-emerald-50 rounded-lg p-3",children:[a.jsx(lf,{className:"h-4 w-4 text-emerald-600 mt-0.5 shrink-0"}),a.jsx("p",{className:"line-clamp-2",children:b.ai_initiatives})]}),a.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-slate-100",children:[a.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500",children:[b.has_online_portal&&b.portal_url&&a.jsxs("a",{href:b.portal_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-emerald-600 hover:underline",children:[a.jsx(fa,{className:"h-3 w-3"})," Portal"]}),b.website&&a.jsxs("a",{href:b.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-slate-500 hover:underline",children:[a.jsx(ou,{className:"h-3 w-3"})," Website"]}),b.public_accessibility_level&&b.public_accessibility_level!=="Unknown"&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(ha,{className:"h-3 w-3"})," Access: ",b.public_accessibility_level]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Li,{tier:b.reliability_tier}),a.jsx(gu,{status:b.verification_status})]})]})]})},b.id)})})]})}var qNe="Label",rq=P.forwardRef((e,t)=>
1263a.jsx(vt.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));rq.displayName=qNe;var iq=rq;const HNe=zm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qt=P.forwardRef(({className:e,...t},n)=>a.jsx(iq,{ref:n,className:ze(HNe(),e),...t}));Qt.displayName=iq.displayName;function WNe(){const[e,t]=P.useState(!1),[n,r]=P.useState(!1),[i,s]=P.useState({submitter_name:"",submitter_email:"",submitter_role:"Public",category:"New Entity",entity_type:"Startup",entity_name:"",title:"",description:"",source_url:"",contact_info:"",priority:"medium"}),o=(d,h)=>s(p=>({...p,[d]:h})),c=async d=>{d.preventDefault(),t(!0);try{await Q.entities.PublicSubmission.create({...i,status:"pending"}),r(!0),s({submitter_name:"",submitter_email:"",submitter_role:"Public",category:"New Entity",entity_type:"Startup",entity_name:"",title:"",description:"",source_url:"",contact_info:"",priority:"medium"})}catch(h){console.error("Error submitting:",h)}finally{t(!1)}};return n?a.jsx("div",{className:"max-w-2xl mx-auto px-4 py-16",children:a.jsx(Ee,{children:a.jsxs($e,{className:"p-10 text-center",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-emerald-100 flex items-center justify-center mx-auto mb-4",children:a.jsx(Un,{className:"h-8 w-8 text-emerald-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:"Thank you for your submission!"}),a.jsx("p",{className:"text-slate-500 mb-6",children:"Your contribution has been received and queued for AI verification. Our automated agent checks submissions against public sources, scores reliability, and routes verified items to analysts for final approval before publishing."}),a.jsxs(Ne,{onClick:()=>r(!1),className:"bg-emerald-600 hover:bg-emerald-700 gap-2",children:[a.jsx(cf,{className:"h-4 w-4"}),"Submit another"]})]})})}):a.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-8",children:[a.jsxs("div",{className:"mb-6",children:[a.jsxs("h1",{className:"text-2xl font-bold text-slate-900 flex items-center gap-2",children:[a.jsx(cf,{className:"h-6 w-6 text-emerald-600"}),"Submit Ecosystem Information"]}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Help us keep the dashboard accurate. Share a new startup, investor, government program, event, or correction. All submissions are AI-verified and reviewed by our analysts before publishing."})]}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Submission Form"})}),a.jsx($e,{children:a.jsxs("form",{onSubmit:c,className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Your name *"}),a.jsx(Wt,{required:!0,value:i.submitter_name,onChange:d=>o("submitter_name",d.target.value),placeholder:"Jane Doe"})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Email (optional)"}),a.jsx(Wt,{type:"email",value:i.submitter_email,onChange:d=>o("submitter_email",d.target.value),placeholder:"[email protected]"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Your role"}),a.jsxs(oo,{value:i.submitter_role,onValueChange:d=>o("submitter_role",d),children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsx(ds,{children:["Public","Founder","Investor","Government","ESO","Researcher","Student","Other"].map(d=>a.jsx(Pn,{value:d,children:d},d))})]})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Submission type"}),a.jsxs(oo,{value:i.category,onValueChange:d=>o("category",d),children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsx(ds,{children:["New Entity","Update","Event","Correction","Tender","Policy","Program","Other"].map(d=>a.jsx(Pn,{value:d,children:d},d))})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Entity type"}),a.jsxs(oo,{value:i.entity_type,onValueChange:d=>o("entity_type",d),children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsx(ds,{children:["Startup","Investor","ESO","GovProgram","EcosystemEvent","Other"].map(d=>a.jsx(Pn,{value:d,children:d==="GovProgram"?"Government Program":d==="ESO"?"Support Organization":d},d))})]})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Entity / program name"}),a.jsx(Wt,{value:i.entity_name,onChange:d=>o("entity_name",d.target.value),placeholder:"e.g. Konza Technopolis"})]})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Title *"}),a.jsx(Wt,{required:!0,value:i.title,onChange:d=>o("title",d.target.value),placeholder:"Short headline for your submission"})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Description *"}),a.jsx(bo,{required:!0,rows:5,value:i.description,onChange:d=>o("description",d.target.value),placeholder:"Describe the entity, initiative, event, or correction in detail. Include any known facts: sector, stage, location, funding, dates, contacts..."})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Source URL (optional)"}),a.jsx(Wt,{value:i.source_url,onChange:d=>o("source_url",d.target.value),placeholder:"https://..."})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Priority"}),a.jsxs(oo,{value:i.priority,onValueChange:d=>o("priority",d),children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsxs(ds,{children:[a.jsx(Pn,{value:"high",children:"High"}),a.jsx(Pn,{value:"medium",children:"Medium"}),a.jsx(Pn,{value:"low",children:"Low"})]})]})]})]}),a.jsxs("div",{children:[a.jsx(Qt,{className:"mb-1.5 block",children:"Additional contact info (optional)"}),a.jsx(Wt,{value:i.contact_info,onChange:d=>o("contact_info",d.target.value),placeholder:"Phone / social / other contact"})]}),a.jsx("div",{className:"flex justify-end pt-2",children:a.jsxs(Ne,{type:"submit",disabled:e,className:"bg-emerald-600 hover:bg-emerald-700 gap-2",children:[e?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(HN,{className:"h-4 w-4"}),e?"Submitting...":"Submit for review"]})})]})})]})]})}function VNe(){const[e,t]=P.useState(!0),[n,r]=P.useState({startups:0,investors:0,esos:0,govPrograms:0,totalFunding:0,recentEvents:[]});P.useEffect(()=>{i()},[]);const i=async()=>{try{const[o,c,d,h,p]=await Promise.all([Q.entities.Startup.list(),Q.entities.Investor.list(),Q.entities.ESO.list(),Q.entities.GovProgram.list(),Q.entities.EcosystemEvent.filter({reliability_tier:"A"},"-event_date",8)]),m=o.filter(j=>Dr(j,!1)),v=c.filter(j=>Dr(j,!1)),x=d.filter(j=>Dr(j,!1)),w=h.filter(j=>Dr(j,!1)),b=p.filter(j=>Yv(j,!1)),_=m.reduce((j,C)=>j+(C.total_funding_usd||0),0);r({startups:m.length,investors:v.length,esos:x.length,govPrograms:w.length,totalFunding:_,recentEvents:b})}catch(o){console.error("Error loading embed data:",o)}finally{t(!1)}};if(e)return a.jsx("div",{className:"p-6",children:a.jsx(Mn,{message:"Loading ecosystem data..."})});const s=[{label:"Startups",value:n.startups,icon:er,color:"bg-emerald-500"},{label:"Investors",value:n.investors,icon:Ri,color:"bg-blue-500"},{label:"Support Orgs",value:n.esos,icon:tr,color:"bg-purple-500"}
1263,{label:"Gov Programs",value:n.govPrograms,icon:Ti,color:"bg-amber-500"}];return a.jsx("div",{className:"bg-slate-50 min-h-screen p-4 sm:p-6",children:a.jsxs("div",{className:"max-w-[1200px] mx-auto",children:[a.jsxs("div",{className:"mb-5",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-lg",children:"K"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-bold text-slate-900 leading-tight",children:"Kenya Innovation Ecosystem"}),a.jsx("p",{className:"text-xs text-slate-500 -mt-0.5",children:"Live intelligence dashboard"})]})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 bg-white rounded-lg px-3 py-1.5 w-fit border border-slate-200",children:[a.jsx(Bn,{className:"h-3 w-3"}),a.jsxs("span",{children:["Updated: ",Tt(new Date,"MMM d, yyyy, h:mm a")]})]})]}),a.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:s.map(o=>a.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`w-10 h-10 rounded-lg ${o.color} flex items-center justify-center shrink-0`,children:a.jsx(o.icon,{className:"h-5 w-5 text-white"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold text-slate-900 leading-none",children:o.value}),a.jsx("p",{className:"text-xs text-slate-500 mt-1",children:o.label})]})]})},o.label))}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-5",children:[a.jsxs("div",{className:"bg-gradient-to-br from-emerald-600 to-teal-700 rounded-xl p-5 text-white lg:col-span-1",children:[a.jsx(zl,{className:"h-6 w-6 mb-2 text-emerald-100"}),a.jsxs("p",{className:"text-3xl font-bold",children:["$",(n.totalFunding/1e6).toFixed(1),"M"]}),a.jsx("p",{className:"text-emerald-100 text-sm mt-1",children:"Total funding tracked"})]}),a.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5 lg:col-span-2",children:[a.jsxs("h3",{className:"font-semibold text-slate-900 mb-3 flex items-center gap-2",children:[a.jsx(pr,{className:"h-4 w-4 text-emerald-600"}),"Recent Ecosystem Activity"]}),n.recentEvents.length===0?a.jsxs("p",{className:"text-sm text-slate-500 flex items-center gap-2",children:[a.jsx($i,{className:"h-4 w-4"})," No recent verified events yet."]}):a.jsx("div",{className:"space-y-2",children:n.recentEvents.map(o=>a.jsxs("div",{className:"flex items-start gap-3 text-sm",children:[a.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500 mt-1.5 shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-800",children:o.title}),a.jsxs("p",{className:"text-xs text-slate-500",children:[o.event_date?Tt(new Date(o.event_date),"MMM d, yyyy"):""," · ",o.event_type]})]})]},o.id))})]})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400 pt-3 border-t border-slate-200",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(ha,{className:"h-3 w-3"}),"Verified intelligence · Tier A/B/C reliability"]}),a.jsx("span",{children:"© Haim Etkin — Strategic OSINT & Intelligence Integration®"})]})]})})}var LN,Sb="HoverCard",[aq]=Bi(Sb,[ql]),Nb=ql(),[KNe,_k]=aq(Sb),sq=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:s,openDelay:o=700,closeDelay:c=300}=e,d=Nb(t),h=P.useRef(0),p=P.useRef(0),m=P.useRef(!1),v=P.useRef(!1),[x,w]=xs({prop:r,defaultProp:i??!1,onChange:s,caller:Sb}),b=P.useCallback(()=>{clearTimeout(p.current),h.current=window.setTimeout(()=>w(!0),o)},[o,w]),_=P.useCallback(()=>{clearTimeout(h.current),!m.current&&!v.current&&(p.current=window.setTimeout(()=>w(!1),c))},[c,w]),j=P.useCallback(()=>w(!1),[w]);return P.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(p.current)},[]),a.jsx(KNe,{scope:t,open:x,onOpenChange:w,onOpen:b,onClose:_,onDismiss:j,hasSelectionRef:m,isPointerDownOnContentRef:v,children:a.jsx(P0,{...d,children:n})})};sq.displayName=Sb;var oq="HoverCardTrigger",lq=P.forwardRef((e,t)=>
1263{const{__scopeHoverCard:n,...r}=e,i=_k(oq,n),s=Nb(n);return a.jsx(k0,{asChild:!0,...s,children:a.jsx(vt.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:He(e.onPointerEnter,Qx(i.onOpen)),onPointerLeave:He(e.onPointerLeave,Qx(i.onClose)),onFocus:He(e.onFocus,i.onOpen),onBlur:He(e.onBlur,i.onClose),onTouchStart:He(e.onTouchStart,o=>o.preventDefault())})})});lq.displayName=oq;var GNe="HoverCardPortal",[FEe,ZNe]=aq(GNe,{forceMount:void 0}),Xx="HoverCardContent",cq=P.forwardRef((e,t)=>{const n=ZNe(Xx,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,s=_k(Xx,e.__scopeHoverCard);return a.jsx(zi,{present:r||s.open,children:a.jsx(YNe,{"data-state":s.open?"open":"closed",...i,onPointerEnter:He(e.onPointerEnter,Qx(s.onOpen)),onPointerLeave:He(e.onPointerLeave,Qx(s.onClose)),ref:t})})});cq.displayName=Xx;var YNe=P.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,...c}=e,d=_k(Xx,n),h=Nb(n),p=P.useRef(null),m=Bt(t,p),[v,x]=P.useState(!1);return P.useEffect(()=>{if(v){const w=document.body;return LN=w.style.userSelect||w.style.webkitUserSelect,w.style.userSelect="none",w.style.webkitUserSelect="none",()=>{w.style.userSelect=LN,w.style.webkitUserSelect=LN}}},[v]),P.useEffect(()=>{if(p.current){const w=()=>{x(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var _;((_=document.getSelection())==null?void 0:_.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",w),()=>{document.removeEventListener("pointerup",w),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),P.useEffect(()=>{p.current&&JNe(p.current).forEach(b=>b.setAttribute("tabindex","-1"))}),a.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:He(s,w=>{w.preventDefault()}),onDismiss:d.onDismiss,children:a.jsx(A0,{...h,...c,onPointerDown:He(c.onPointerDown,w=>{w.currentTarget.contains(w.target)&&x(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:m,style:{...c.style,userSelect:v?"text":void 0,WebkitUserSelect:v?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),XNe="HoverCardArrow",QNe=P.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Nb(n);return a.jsx(O0,{...i,...r,ref:t})});QNe.displayName=XNe;function Qx(e){return t=>t.pointerType==="touch"?void 0:e()}function JNe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var eCe=sq,tCe=lq,uq=cq;const nCe=eCe,rCe=tCe,dq=P.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>a.jsx(uq,{ref:i,align:t,sideOffset:n,className:ze("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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}));dq.displayName=uq.displayName;const y3={gold:{wrap:"bg-amber-100 text-amber-700 border-amber-300",icon:"text-amber-500"},bronze:{wrap:"bg-orange-100 text-orange-700 border-orange-300",icon:"text-orange-500"},silver:{wrap:"bg-slate-200 text-slate-700 border-slate-400",icon:"text-slate-500"},single:{wrap:"bg-zinc-100 text-zinc-500 border-zinc-300",icon:"text-zinc-400"}},v3=({tier:e,className:t})=>e==="gold"?a.jsx(oV,{className:ze("h-3.5 w-3.5",t)}):e==="bronze"?a.jsx(Bp,{className:ze("h-3.5 w-3.5",t)}):e==="silver"?a.jsx(ha,{className:ze("h-3.5 w-3.5",t)}):a.jsx(eW,{className:ze("h-3.5 w-3.5",t)});function iCe({tier:e="single",count:t=1,sources:n=[],size:r="sm"}){const i=oM[e]||oM.single,s=y3[e]||y3.single,o=a.jsxs("span",{className:ze("inline-flex items-center gap-1 rounded-full border font-medium cursor-help",s.wrap,r==="sm"?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-xs"),children:[a.jsx(v3,{tier:e,className:s.icon}),a.jsx("span",{children:i.label}),a.jsxs("span",{className:"opacity-70",children:["· ",t]})]});return a.jsxs(nCe,{children:[a.jsx(rCe,{asChild:!0,children:o}),a.jsx(dq,{className:"w-72 p-0",align:"start",children:a.jsxs("div",{className:"p-3",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(v3,{tier:e,className:s.icon}),a.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[i.label," corroboration"]})]}),a.jsxs("p",{className:"text-xs text-slate-500 mb-3",children:[i.description,"."]}
1263),n&&n.length>0?a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("p",{className:"text-xs font-medium text-slate-700",children:"Corroborating sources:"}),n.map((c,d)=>a.jsxs("div",{className:"flex items-start gap-1.5 text-xs",children:[a.jsx("span",{className:"text-slate-400 shrink-0",children:"·"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("span",{className:"font-medium text-slate-700",children:c.publisher||"source"}),c.agent_name&&a.jsxs("span",{className:"text-slate-400",children:[" via ",c.agent_name]}),c.url&&a.jsx("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"block text-emerald-600 hover:underline truncate",children:c.url})]})]},d))]}):a.jsx("p",{className:"text-xs text-slate-400",children:"No corroborating sources recorded yet."}),a.jsx("p",{className:"text-[10px] text-slate-400 mt-3 pt-2 border-t border-slate-100",children:"Independent = distinct publisher domains. Mechanical count, not an AI opinion."})]})})]})}const cv=[{key:"all",label:"All Insights",icon:sa,color:"bg-slate-100 text-slate-700"},{key:"exits_ma",label:"Exits & M&A",icon:Hm,color:"bg-rose-100 text-rose-700"},{key:"registry_verification",label:"Registry Verification",icon:ha,color:"bg-emerald-100 text-emerald-700"},{key:"talent",label:"Talent & Employment",icon:tr,color:"bg-blue-100 text-blue-700"},{key:"macro_economic",label:"Macro-Economic",icon:V3,color:"bg-amber-100 text-amber-700"},{key:"capital_markets",label:"Capital Markets",icon:Ti,color:"bg-stone-100 text-stone-700"},{key:"defense_security",label:"Defense & Security",icon:pi,color:"bg-slate-200 text-slate-800"},{key:"agriculture_food",label:"Agriculture & Food",icon:XV,color:"bg-green-100 text-green-700"},{key:"water_sanitation",label:"Water & Sanitation",icon:vW,color:"bg-sky-100 text-sky-700"},{key:"climate_green",label:"Climate & Green",icon:X3,color:"bg-emerald-100 text-emerald-700"},{key:"education",label:"Education & EdTech",icon:u2,color:"bg-indigo-100 text-indigo-700"},{key:"fintech",label:"Fintech",icon:bK,color:"bg-violet-100 text-violet-700"},{key:"health",label:"Health & Healthtech",icon:UN,color:"bg-rose-100 text-rose-700"},{key:"age_tech",label:"AgeTech & Eldercare",icon:AH,color:"bg-fuchsia-100 text-fuchsia-700"},{key:"insurtech",label:"Insurtech",icon:fK,color:"bg-cyan-100 text-cyan-700"},{key:"tourism",label:"Tourism & Travel",icon:cW,color:"bg-teal-100 text-teal-700"},{key:"sustainability",label:"Sustainability & ESG",icon:RV,color:"bg-lime-100 text-lime-700"}
1263,{key:"infrastructure",label:"Construction & Infrastructure",icon:BW,color:"bg-orange-100 text-orange-700"},{key:"wildlife_conservation",label:"Wildlife & Conservation",icon:wV,color:"bg-green-100 text-green-700"}];function aCe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState("all"),[o,c]=P.useState("all");P.useEffect(()=>{d()},[]);const d=async()=>{try{const x=await Q.entities.EcosystemInsight.list("-insight_date",500);t(x)}catch(x){console.error("Error loading insights:",x)}finally{r(!1)}},h=Q2(e).filter(x=>!x.is_merged_duplicate),p=cv.reduce((x,w)=>(x[w.key]=w.key==="all"?h.length:h.filter(b=>b.category===w.key).length,x),{}),m=(i==="all"?h:h.filter(x=>x.category===i)).filter(x=>o==="all"||x.agent_name===o),v=Array.from(new Set(h.map(x=>x.agent_name).filter(Boolean))).sort();return n?a.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading ecosystem insights..."})}):a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"mb-6",children:[a.jsxs("h1",{className:"text-2xl font-bold text-slate-900 flex items-center gap-2",children:[a.jsx(sa,{className:"h-6 w-6 text-amber-500"}),"Ecosystem Insights"]}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Specialized intelligence from the Exits & M&A, Registry Verifier, Talent Tracker, and Macro-Economic agents."})]}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-9 gap-3 mb-8",children:cv.map(x=>{const w=x.icon,b=i===x.key;return a.jsxs("button",{onClick:()=>s(x.key),className:ze("flex items-center gap-3 p-3 rounded-xl border transition-all text-left",b?"border-slate-900 bg-white shadow-sm":"border-slate-200 bg-white hover:border-slate-300"),children:[a.jsx("div",{className:ze("w-9 h-9 rounded-lg flex items-center justify-center shrink-0",x.color),children:a.jsx(w,{className:"h-5 w-5"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-900 truncate",children:x.label}),a.jsxs("p",{className:"text-xs text-slate-500",children:[p[x.key]," items"]})]})]},x.key)})}),v.length>0&&a.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[a.jsx(r0,{className:"h-4 w-4"}),"Agent:"]}),a.jsxs("select",{value:o,onChange:x=>c(x.target.value),className:"border border-slate-200 rounded-lg px-3 py-1.5 text-sm bg-white focus:outline-none focus:border-slate-400 max-w-xs",children:[a.jsxs("option",{value:"all",children:["All Agents (",h.length,")"]}),v.map(x=>a.jsxs("option",{value:x,children:[x," (",h.filter(w=>w.agent_name===x).length,")"]},x))]})]}),m.length===0?a.jsx(fr,{icon:sa,title:"No insights yet",description:"Run the specialized agents from the Agent Console to populate this dashboard."}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:m.map(x=>{const w=cv.find(_=>_.key===x.category)||cv[0],b=(w==null?void 0:w.icon)||sa;return a.jsx(Ee,{className:"hover:shadow-md transition-shadow",children:a.jsxs($e,{className:"p-5",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx("div",{className:ze("w-8 h-8 rounded-lg flex items-center justify-center shrink-0",w.color),children:a.jsx(b,{className:"h-4 w-4"})}),a.jsx("h3",{className:"font-semibold text-slate-900 text-sm leading-tight line-clamp-2",children:x.title})]}),x.corroboration_tier&&x.corroboration_tier!=="single"||x.corroboration_count&&x.corroboration_count>1?a.jsx(iCe,{tier:x.corroboration_tier||"single",count:x.corroboration_count||1,sources:x.corroboration_sources||[]}):null]}),a.jsx("p",{className:"text-sm text-slate-600 mb-3 line-clamp-3",children:x.summary}),x.details&&Object.keys(x.details).length>0&&a.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[x.details.counterparty&&a.jsxs(Ce,{variant:"outline",className:"text-xs",children:["Counterparty: ",x.details.counterparty]}),x.details.amount_usd!=null&&x.details.amount_usd>0&&a.jsxs(Ce,{variant:"outline",className:"text-xs",children:["$",(x.details.amount_usd/1e6).toFixed(1),"M"]}),x.details.value&&a.jsx(Ce,{variant:"outline",className:"text-xs",children:x.details.value}),x.details.affected_count!=null&&x.details.affected_count>0&&a.jsxs(Ce,{variant:"outline",className:"text-xs",children:[x.details.affected_count," affected"]}),x.details.matched_in_db&&a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700 text-xs",children:"Matched in DB"})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"font-medium text-slate-600",children:x.agent_name}),x.insight_date&&a.jsxs("span",{children:["· ",Tt(new Date(x.insight_date),"MMM d, yyyy")]})]}),(()=>{const _=x.source_url;let C=(E=>!!E&&/^https?:\/\//i.test(E))(_)?_:null;if(!C&&x.details){const E=x.details.website;E&&E!=="N/A"&&/^[a-z0-9.-]+\.[a-z]{2,}(\/.*)?$/i.test(E)&&(C=E.startsWith("http")?E:`https://${E}`)}return C?a.jsxs("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-emerald-600 hover:text-emerald-700",children:["Source ",a.jsx(fa,{className:"h-3 w-3"})]}):null})()]})]})},x.id)})})]})}var Cb="Checkbox",[sCe]=Bi(Cb),[oCe,wk]=sCe(Cb);function lCe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:o,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[v,x]=xs({prop:n,defaultProp:i??!1,onChange:d,caller:Cb}),[w,b]=P.useState(null),[_,j]=P.useState(null),C=P.useRef(!1),E=w?!!o||!!w.closest("form"):!0,A={checked:v,disabled:s,setChecked:x,control:w,setControl:b,name:c,form:o,value:p,hasConsumerStoppedPropagationRef:C,required:h,defaultChecked:Dl(i)?!1:i,isFormControl:E,bubbleInput:_,setBubbleInput:j};return a.jsx(oCe,{scope:t,...A,children:cCe(m)?m(A):r})}var fq="CheckboxTrigger",hq=P.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>
1263{const{control:s,value:o,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:v,isFormControl:x,bubbleInput:w}=wk(fq,e),b=Bt(i,p),_=P.useRef(d);return P.useEffect(()=>{const j=s==null?void 0:s.form;if(j){const C=()=>m(_.current);return j.addEventListener("reset",C),()=>j.removeEventListener("reset",C)}},[s,m]),a.jsx(vt.button,{type:"button",role:"checkbox","aria-checked":Dl(d)?"mixed":d,"aria-required":h,"data-state":vq(d),"data-disabled":c?"":void 0,disabled:c,value:o,...r,ref:b,onKeyDown:He(t,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:He(n,j=>{m(C=>Dl(C)?!0:!C),w&&x&&(v.current=j.isPropagationStopped(),v.current||j.stopPropagation())})})});hq.displayName=fq;var jk=P.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:o,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return a.jsx(lCe,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:c,required:o,onCheckedChange:h,name:r,form:p,value:d,internal_do_not_use_render:({isFormControl:v})=>a.jsxs(a.Fragment,{children:[a.jsx(hq,{...m,ref:t,__scopeCheckbox:n}),v&&a.jsx(yq,{__scopeCheckbox:n})]})})});jk.displayName=Cb;var pq="CheckboxIndicator",mq=P.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=wk(pq,n);return a.jsx(zi,{present:r||Dl(s.checked)||s.checked===!0,children:a.jsx(vt.span,{"data-state":vq(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});mq.displayName=pq;var gq="CheckboxBubbleInput",yq=P.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:o,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:v,setBubbleInput:x}=wk(gq,e),w=Bt(n,x),b=R2(s),_=I2(r);P.useEffect(()=>{const C=v;if(!C)return;const E=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(E,"checked").set,M=!i.current;if(b!==s&&k){const I=new Event("click",{bubbles:M});C.indeterminate=Dl(s),k.call(C,Dl(s)?!1:s),C.dispatchEvent(I)}},[v,b,s,i]);const j=P.useRef(Dl(s)?!1:s);return a.jsx(vt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??j.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:w,style:{...t.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});yq.displayName=gq;function cCe(e){return typeof e=="function"}function Dl(e){return e==="indeterminate"}function vq(e){return Dl(e)?"indeterminate":e?"checked":"unchecked"}const xq=P.forwardRef(({className:e,...t},n)=>a.jsx(jk,{ref:n,className:ze("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:a.jsx(mq,{className:ze("flex items-center justify-center text-current"),children:a.jsx(Su,{className:"h-4 w-4"})})}));xq.displayName=jk.displayName;const Tc=[{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/4fa64ba4c_ChatGPTImageAug11202611_12_29PM.png",title:"Strategic Intelligence Command Center",caption:"Multi-screen operational oversight with real-time global monitoring"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/dbd44d3b2_ChatGPTImageAug11202611_13_19PM.png",title:"AI at the Core",caption:"Artificial intelligence integrated into the intelligence workflow"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/9e05519d9_Gemini_Generated_Image_3.png",title:"The Three-Stage Pipeline",caption:"Collection, Processing & Analysis, Dissemination"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/f58a85c61_Gemini_Generated_Image_4.png",title:"Human-Augmented Intelligence",caption:"AI neural networks combined with human judgment"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/9ca089dad_Gemini_Generated_Image_6.png",title:"Truth Scoring: Noise Filtered",caption:"AI agents for data collection with anomaly detection"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/8d250775d_Gemini_Generated_Image_2.png",title:"AI-Driven Validation & Human Contextual Analysis",caption:"Cross-referencing, correlation and validation algorithms"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/cf6b2ac5a_Gemini_Generated_Image_5.png",title:"Big Data, OSINT, Business Intelligence",caption:"Strategic intel and AI integration across multiple domains"},{url:"https://media.base44.com/images/public/6984885939cff3c6798f183e/647bc5045_Gemini_Generated_Image_1.png",title:"Strategic Intelligence Dashboard",caption:"Decision-ready intelligence delivered to leadership"}];function uCe(){const[e,t]=P.useState(null),n=o=>t(o),r=()=>t(null),i=()=>{t(o=>o===0?Tc.length-1:o-1)},s=()=>{t(o=>o===Tc.length-1?0:o+1)};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:Tc.map((o,c)=>a.jsxs("button",{onClick:()=>n(c),className:"group relative aspect-video overflow-hidden rounded-xl bg-slate-900 border border-slate-200 hover:border-emerald-400 transition-all",children:[a.jsx("img",{src:o.url,alt:o.title,loading:"lazy",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex flex-col justify-end p-3",children:a.jsx("p",{className:"text-white text-xs font-semibold leading-tight",children:o.title})}),a.jsx("div",{className:"absolute top-2 right-2 w-7 h-7 rounded-full bg-black/40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx(aV,{className:"h-3.5 w-3.5 text-white"})})]},c))}),e!==null&&a.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:r,children:[a.jsx("button",{onClick:r,className:"absolute top-4 right-4 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:a.jsx(xo,{className:"h-5 w-5 text-white"})}),a.jsx("button",{onClick:o=>{o.stopPropagation(),i()},className:"absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:a.jsx(K3,{className:"h-6 w-6 text-white"})}),a.jsx("button",{onClick:o=>{o.stopPropagation(),s()},className:"absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors",children:a.jsx(t0,{className:"h-6 w-6 text-white"})}),a.jsxs("div",{className:"max-w-5xl w-full",onClick:o=>o.stopPropagation(),children:[a.jsx("img",{src:Tc[e].url,alt:Tc[e].title,className:"w-full max-h-[75vh] object-contain rounded-lg"}),a.jsxs("div",{className:"text-center mt-4",children:[a.jsx("p",{className:"text-white font-semibold",children:Tc[e].title}),a.jsx("p",{className:"text-slate-400 text-sm mt-1",children:Tc[e].caption})]})]})]})]})}const DN={orchestration:"https://media.base44.com/images/public/6984885939cff3c6798f183e/9e05519d9_Gemini_Generated_Image_3.png",humanLayer:"https://media.base44.com/images/public/6984885939cff3c6798f183e/8d250775d_Gemini_Generated_Image_2.png",manifesto:"https://media.base44.com/images/public/6984885939cff3c6798f183e/dbd44d3b2_ChatGPTImageAug11202611_13_19PM.png"},dCe=[{id:"innovation",label:"Innovation & Startups",icon:qm},{id:"education",label:"Education",icon:u2},{id:"welfare",label:"Welfare & Social Services",icon:UN},{id:"security",label:"Security & Defense",icon:pi},{id:"police",label:"Police & Law Enforcement",icon:Mv},{id:"crime",label:"Crime & Justice",icon:Mv},{id:"agriculture",label:"Agriculture & Food",icon:n$},{id:"climate",label:"Climate & Environment",icon:X3},{id:"health",label:"Healthcare & Public Health",icon:UN},{id:"industry",label:"Industry & Manufacturing",icon:Z3}
1263,{id:"transport",label:"Transport & Logistics",icon:lK},{id:"finance",label:"Finance & Economy",icon:H3},{id:"government",label:"Government & Public Admin",icon:er},{id:"tech",label:"Technology & AI",icon:lf}];function fCe(){const[e,t]=P.useState({name:"",email:"",organization:"",role:"",target_country:"",selected_domains:[],custom_domain:"",scope_description:"",message:""}),[n,r]=P.useState(!1),[i,s]=P.useState(!1),[o,c]=P.useState(""),d=p=>{t(m=>({...m,selected_domains:m.selected_domains.includes(p)?m.selected_domains.filter(v=>v!==p):[...m.selected_domains,p]}))},h=async p=>{if(p.preventDefault(),c(""),!e.name||!e.email){c("Please provide your name and email.");return}r(!0);try{await Q.entities.SolutionInquiry.create({...e,selected_domains:e.selected_domains}),s(!0)}catch(m){c((m==null?void 0:m.message)||"Something went wrong. Please try again.")}finally{r(!1)}};return i?a.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:a.jsx(Ee,{className:"text-center",children:a.jsxs($e,{className:"pt-10 pb-10",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-emerald-100 flex items-center justify-center mx-auto mb-6",children:a.jsx(Un,{className:"h-9 w-9 text-emerald-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"Thank you. Inquiry received"}),a.jsx("p",{className:"text-slate-600 mb-6",children:"Our team will review your request and reach out within 1-2 business days to scope your custom intelligence dashboard."}),a.jsx(yt,{to:ot("Home"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2",children:["Back to dashboard ",a.jsx(Lr,{className:"h-4 w-4"})]})})]})})}):a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-10",children:[a.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-14",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 bg-emerald-50 text-emerald-700 px-3 py-1 rounded-full text-sm font-medium mb-5",children:[a.jsx(ca,{className:"h-4 w-4"}),"Strategic OSINT & Intelligence Integration"]}),a.jsxs("h1",{className:"text-4xl sm:text-5xl font-bold text-slate-900 tracking-tight mb-5",children:["One intelligence architecture.",a.jsx("br",{className:"hidden sm:block"})," Multiple missions."]}),a.jsx("p",{className:"text-lg text-slate-600 leading-relaxed",children:"The model behind the Kenya Innovation Ecosystem dashboard is not limited to innovation. We adapt it to almost any operational domain and design the intelligence architecture around your real requirements."})]}),a.jsxs("section",{className:"mb-14",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"The intelligence system in action"}),a.jsx("p",{className:"text-slate-600 mb-6 max-w-3xl",children:"A visual tour of the architecture: from raw data collection through AI-driven filtering, human-augmented analysis, to decision-ready intelligence production."}),a.jsx(uCe,{})]}),a.jsxs("section",{className:"mb-14",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"Adaptable to any operational domain"}),a.jsx("p",{className:"text-slate-600 mb-6 max-w-3xl",children:"Each mission requires a different combination of data sources, AI tools and specialised agents. We adapt the technology to the mission, not the other way around."}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:[{icon:Z3,label:"Industry"},{icon:n$,label:"Agriculture"},{icon:pi,label:"National security"},{icon:Mv,label:"Law enforcement"},{icon:er,label:"Infrastructure"},{icon:VV,label:"Emergency management"},{icon:H3,label:"Economic development"},{icon:qm,label:"Innovation & startups"}].map(p=>a.jsxs("div",{className:"flex items-center gap-3 bg-white border border-slate-200 rounded-xl px-4 py-3",children:[a.jsx(p.icon,{className:"h-5 w-5 text-emerald-600 shrink-0"}),a.jsx("span",{className:"text-sm font-medium text-slate-800",children:p.label})]},p.label))})]}),a.jsxs("section",{className:"mb-14",children:[a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[a.jsxs("div",{children:[a.jsx("div",{className:"w-11 h-11 rounded-xl bg-slate-900 flex items-center justify-center mb-4",children:a.jsx(mO,{className:"h-6 w-6 text-white"})}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"Building a dashboard is only the beginning"}),a.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"The real work is designing a multi-agent intelligence architecture that combines several AI tools - each selected for the mission it performs best. No single AI tool excels at everything. Different tools have different strengths in collection, extraction, verification, analysis and presentation. Knowing how to select and orchestrate them is itself an intelligence discipline."}),a.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"The same applies to agents. Each must receive a precise collection task, defined sources and clear parameters. Tools and agents must be continuously evaluated, refined, retasked, replaced or removed according to the quality of their outputs."}),a.jsx("p",{className:"text-lg font-semibold text-slate-900 leading-relaxed",children:"This calibration never ends."})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{icon:iw,label:"Collection"},{icon:hr,label:"Extraction"},{icon:AW,label:"Verification"},{icon:Av,label:"Analysis"},{icon:aW,label:"Assessment"},{icon:Y3,label:"Presentation"}].map(p=>a.jsxs("div",{className:"flex items-center gap-2.5 bg-slate-50 border border-slate-200 rounded-lg px-3.5 py-3",children:[a.jsx(p.icon,{className:"h-4.5 w-4.5 text-emerald-600 shrink-0"}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:p.label})]},p.label))})]}),a.jsx("div",{className:"mt-8 rounded-xl overflow-hidden border border-slate-200",children:a.jsx("img",{src:DN.orchestration,alt:"Three-stage intelligence pipeline: collection, processing and dissemination",loading:"lazy",className:"w-full h-auto object-cover"})})]}),a.jsx("section",{className:"mb-14",children:a.jsxs(Ee,{className:"border-slate-200 bg-slate-50/60",children:[a.jsx(tt,{children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-11 h-11 rounded-xl bg-emerald-100 flex items-center justify-center",children:a.jsx(Bp,{className:"h-6 w-6 text-emerald-700"})}),a.jsxs("div",{children:[a.jsx(nt,{className:"text-2xl",children:"Above the technology sits the human intelligence layer"}),a.jsx(di,{className:"text-base mt-1",children:"Data must be filtered, verified, cross-referenced and assessed. This requires trained judgment."})]})]})}),a.jsxs($e,{className:"space-y-6",children:[a.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Disinformation can appear precisely at the intersection of seemingly independent sources. Detecting it requires trained judgment that no tool alone can provide. This is where I bring my core value - as an intelligence professional who designs, builds and operates these systems. I also train the people behind them. The core of the discipline is turning raw, scattered information into structured data, and transforming that data into validated intelligence that decision-makers can act on with confidence."}),a.jsx("div",{className:"bg-white border border-slate-200 rounded-lg px-5 py-4",children:a.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Years ago, I delivered an intelligence officers' course in Kenya for battalion- and brigade-level Kenya Army officers. Some later advanced to senior intelligence and command positions, including Chief of Military Intelligence."})}),a.jsx("div",{className:"rounded-xl overflow-hidden border border-slate-200",children:a.jsx("img",{src:DN.humanLayer,alt:"AI-driven validation combined with human contextual analysis",loading:"lazy",className:"w-full h-auto object-cover"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-slate-500 uppercase tracking-wider mb-3",children:"Role-based certification programmes"}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[{icon:pi,label:"Intelligence officers"},{icon:iw,label:"Collection officers"},{icon:Av,label:"Intelligence analysts"},{icon:hr,label:"OSINT specialists"},{icon:lf,label:"System builders and operators"},{icon:i$,label:"Supervisors and decision-makers"}].map(p=>a.jsxs("div",{className:"flex items-center gap-3 bg-white border border-slate-200 rounded-lg px-4 py-3",children:[a.jsx(p.icon,{className:"h-5 w-5 text-emerald-600 shrink-0"}),a.jsx("span",{className:"text-sm font-medium text-slate-800",children:p.label})]},p.label))})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-slate-500 uppercase tracking-wider mb-3",children:"The full intelligence cycle"}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2.5",children:["Requirements definition","Source and AI-tool selection","Agent design and calibration","Collection management","Verification and cross-referencing","Disinformation detection","Analysis and assessment","Dashboard operation","Decision-ready intelligence production"].map((p,m)=>a.jsxs("div",{className:"flex items-center gap-3 bg-white border border-slate-200 rounded-lg px-3.5 py-2.5",children:[a.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-emerald-600 text-white text-xs font-bold shrink-0",children:m+1}),a.jsx("span",{className:"text-sm text-slate-700",children:p})]},p))})]})]})]})}),a.jsxs("section",{className:"mb-14",children:[a.jsxs("div",{className:"max-w-3xl",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"The objective"}),a.jsx("p",{className:"text-lg text-slate-600 leading-relaxed mb-8",children:"It is not simply to deliver a dashboard. It is to build an organisation's independent capability to design, operate, analyse and continuously adapt its own intelligence system."})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[{icon:qN,title:"The architecture",text:"is versatile."},{icon:r0,title:"The methodology",text:"is disciplined."},{icon:Rv,title:"The training",text:"is mission-specific."},{icon:tr,title:"The people",text:"make the system operational."}].map(p=>a.jsx(Ee,{className:"border-slate-200",children:a.jsxs($e,{className:"pt-5",children:[a.jsx(p.icon,{className:"h-6 w-6 text-emerald-600 mb-3"}),a.jsxs("p",{className:"text-slate-900",children:[a.jsx("span",{className:"font-semibold",children:p.title})," ",p.text]})]})},p.title))}),a.jsx("p",{className:"text-slate-600 mt-6 leading-relaxed max-w-3xl",children:"We adapt the technology to the mission. We train and professionally certify the people who build, operate and analyse it."})]}),a.jsx("section",{className:"mb-14",children:a.jsx(Ee,{className:"border-emerald-200 bg-gradient-to-br from-emerald-50 to-teal-50",children:a.jsx($e,{className:"pt-6",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-emerald-700 uppercase tracking-wider mb-1",children:"Explore one application of the model"}),a.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"The Kenya Innovation Ecosystem dashboard"})]}),a.jsx(yt,{to:ot("Home"),children:a.jsxs(Ne,{className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:["View live dashboard ",a.jsx(Lr,{className:"h-4 w-4"})]})})]})})})}),a.jsxs("section",{className:"mb-14",children:[a.jsx("div",{className:"rounded-2xl overflow-hidden border border-slate-800 mb-6",children:a.jsx("img",{src:DN.manifesto,alt:"Intelligence professional integrating AI into the intelligence workflow",loading:"lazy",className:"w-full h-[280px] sm:h-[340px] object-cover"})}),a.jsx("div",{className:"bg-slate-900 rounded-2xl px-8 py-10 text-center",children:a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 ga
1263p-6",children:[{icon:qN,text:"I design the architecture."},{icon:mO,text:"I combine the AI tools."},{icon:iw,text:"I build and calibrate the agents."},{icon:Bp,text:"I train the people."},{icon:Rv,text:"I turn data into decisions."}].map(p=>a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx(p.icon,{className:"h-7 w-7 text-emerald-400"}),a.jsx("p",{className:"text-white font-semibold text-sm sm:text-base",children:p.text})]},p.text))})})]}),a.jsxs("section",{className:"mb-10 text-center max-w-2xl mx-auto",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"Let's talk"}),a.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:"I welcome conversations with governments, security and law-enforcement organisations, innovation agencies, development institutions and industry leaders."}),a.jsx("div",{className:"mt-4",children:a.jsx(yt,{to:ot("Collaborate"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2 border-slate-300 hover:bg-slate-50",children:["Partner, invest, or join us ",a.jsx(Lr,{className:"h-4 w-4"})]})})}),a.jsx("p",{className:"text-sm text-slate-400 mt-4",children:"© Haim Etkin - Strategic OSINT & Intelligence Integration® - [email protected]"})]}),a.jsxs(Ee,{className:"border-slate-200",children:[a.jsxs(tt,{className:"border-b border-slate-100",children:[a.jsx(nt,{className:"text-2xl",children:"Start the conversation"}),a.jsx(di,{children:"Share your mission, country or region, and the domain you want to map. We will get back with a scope and proposal for your intelligence architecture."})]}),a.jsx($e,{className:"pt-6",children:a.jsxs("form",{onSubmit:h,className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"name",children:"Full name *"}),a.jsx(Wt,{id:"name",value:e.name,onChange:p=>t({...e,name:p.target.value}),placeholder:"Jane Doe",required:!0})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"email",children:"Email *"}),a.jsx(Wt,{id:"email",type:"email",value:e.email,onChange:p=>t({...e,email:p.target.value}),placeholder:"[email protected]",required:!0})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"organization",children:"Organization / Agency"}),a.jsx(Wt,{id:"organization",value:e.organization,onChange:p=>t({...e,organization:p.target.value}),placeholder:"Ministry of Agriculture"})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"role",children:"Role / Title"}),a.jsx(Wt,{id:"role",value:e.role,onChange:p=>t({...e,role:p.target.value}),placeholder:"Director of Policy"})]})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs(Qt,{htmlFor:"target_country",className:"flex items-center gap-1.5",children:[a.jsx(Cu,{className:"h-4 w-4"})," Target country / region"]}),a.jsx(Wt,{id:"target_country",value:e.target_country,onChange:p=>t({...e,target_country:p.target.value}),placeholder:"e.g. Ghana, East Africa, Lagos State…"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Qt,{children:"Domain(s) of interest"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Select all that apply, or add your own below."}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2 pt-1",children:dCe.map(p=>{const m=e.selected_domains.includes(p.id);return a.jsxs("label",{className:`flex items-center gap-2.5 rounded-lg border px-3 py-2.5 cursor-pointer transition-colors ${m?"border-emerald-500 bg-emerald-50":"border-slate-200 hover:bg-slate-50"}`,children:[a.jsx(xq,{checked:m,onCheckedChange:()=>d(p.id)}),a.jsx(p.icon,{className:"h-4 w-4 text-slate-600"}),a.jsx("span",{className:"text-sm text-slate-700",children:p.label})]},p.id)})})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"custom_domain",children:"Other domain / sector (free text)"}),a.jsx(Wt,{id:"custom_domain",value:e.custom_domain,onChange:p=>t({...e,custom_domain:p.target.value}),placeholder:"e.g. Water resources, Fisheries, Urban planning, Disaster response…"})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"scope_description",children:"What should the dashboard cover?"}),a.jsx(bo,{id:"scope_description",value:e.scope_description,onChange:p=>t({...e,scope_description:p.target.value}),rows:3,placeholder:"Describe the actors, programs, metrics, or outcomes you want to track."})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs(Qt,{htmlFor:"message",className:"flex items-center gap-1.5",children:[a.jsx(Nu,{className:"h-4 w-4"})," Additional notes"]}),a.jsx(bo,{id:"message",value:e.message,onChange:p=>t({...e,message:p.target.value}),rows:2,placeholder:"Anything else we should know: timeline, stakeholders, existing data sources…"})]}),o&&a.jsx("p",{className:"text-sm text-red-600 bg-red-50 rounded-lg px-3 py-2",children:o}),a.jsx("div",{className:"flex justify-end",children:a.jsxs(Ne,{type:"submit",disabled:n,className:"bg-emerald-600 hover:bg-emerald-700 gap-2",size:"lg",children:[n?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(Lr,{className:"h-4 w-4"}),"Submit inquiry"]})})]})})]})]})}function hCe(){return a.jsx(Jm,{children:a.jsx(pCe,{})})}function pCe(){const{toast:e}=zf(),[t,n]=P.useState([]),[r,i]=P.useState([]),[s,o]=P.useState(null),[c,d]=P.useState(!0);P.useEffect(()=>{(async()=>{try{const[b,_]=await Promise.all([Q.entities.SearchQuery.list("-created_date",500),Q.entities.Agent.list()]);n(b),i(_)}catch(b){console.error("Failed to load search queries",b)}finally{d(!1)}})()},[]);const h=["prostitute","prostitutes","whore","escort","porn","xxx","sex","sexual","nude","naked","hooker","brothel","hookup","massage parlor","gambling","casino","bet","drug","drugs","cocaine","weed","hashish","weapon","weapons","gun","guns","kill","murder","terror","terrorist","fraud","scam","illegal","hacker","hack","stolen","counterfeit","זונות","זונה","סקס","פורנו","זיון","סמים","הימורים","נשק","טרור"],p=w=>{const b=w.toLowerCase();return h.some(_=>b.includes(_))},m=async w=>{const b=`Gap Collector: ${w}`;if(r.find(j=>j.name===b)){e({title:"Agent already exists",description:`An agent for "${w}" already exists in the console.`});return}o(w);
1263try{const j=await Q.entities.Agent.create({name:b,agent_type:"Collector",role:"Auto-generated collector for a recurring search gap",objective:`Discover and capture entities matching the search term "${w}" which currently returns no results. Identify startups, investors, ESOs, and government programs related to this topic across Kenya and create records to fill the data gap.`,target_entity_types:["Startup","Investor","ESO","GovProgram"],source_list:[{url:`https://www.google.com/search?q=${encodeURIComponent(w+" Kenya startup")}`,name:"Google: startups",type:"search",priority:1},{url:`https://www.google.com/search?q=${encodeURIComponent(w+" Kenya investor funding")}`,name:"Google: investors",type:"search",priority:2},{url:`https://www.google.com/search?q=${encodeURIComponent(w+" Kenya hub accelerator")}`,name:"Google: ESOs",type:"search",priority:3},{url:`https://www.google.com/search?q=${encodeURIComponent(w+" Kenya government program")}`,name:"Google: govt",type:"search",priority:4}],enabled:!0,last_run_status:"never_run",config:{auto_generated:!0,source_query:w,trigger:"search_gap_recurring"}});i(C=>[...C,j]),e({title:"Agent created",description:`"${b}" is ready in the Agent Console.`})}catch(j){e({title:"Failed to create agent",description:j.message,variant:"destructive"})}finally{o(null)}},v=P.useMemo(()=>{const w=t.length,_=t.filter($=>!$.has_results).length,j=w?Math.round(_/w*100):0,C={},E={};t.forEach($=>{var V;const q=$.normalized_query||((V=$.query_text)==null?void 0:V.toLowerCase())||"";q&&(C[q]=(C[q]||0)+1,$.has_results||(E[q]=(E[q]||0)+1))});const A=Object.entries(C).map(([$,q])=>({query:$,count:q,gaps:E[$]||0})).sort(($,q)=>q.count-$.count).slice(0,15),k=Object.entries(E).map(([$,q])=>({query:$,count:q})).sort(($,q)=>q.count-$.count).slice(0,15),M=new Date,I=[];for(let $=13;$>=0;$--){const q=yre(M,$),V=Tt(q,"yyyy-MM-dd"),H=t.filter(U=>{var z;return(z=U.created_date)==null?void 0:z.startsWith(V)});I.push({date:Tt(q,"MMM d"),searches:H.length,gaps:H.filter(U=>!U.has_results).length})}return{total:w,gapCount:_,gapRate:j,topSearches:A,topGaps:k,trend:I}},[t]),x=()=>{const w=[["query","results_count","has_results","result_type","created_date"]];t.forEach(C=>{w.push([`"${(C.query_text||"").replace(/"/g,'""')}"`,C.results_count??0,C.has_results?"yes":"no",C.result_type||"all",C.created_date||""])});const b=new Blob([w.map(C=>C.join(",")).join(`
1264`)],{type:"text/csv"}),_=URL.createObjectURL(b),j=document.createElement("a");j.href=_,j.download=`search-insights-${Tt(new Date,"yyyy-MM-dd")}.csv`,j.click(),URL.revokeObjectURL(_)};return c?a.jsx("div",{className:"flex items-center justify-center py-20",children:a.jsx(ln,{className:"h-6 w-6 text-slate-400 animate-spin"})}):a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex items-start justify-between mb-8",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 mb-1 flex items-center gap-3",children:[a.jsx(hr,{className:"h-7 w-7 text-emerald-600"}),"Search Insights"]}),a.jsx("p",{className:"text-slate-500",children:"What users search for reveals demand and data gaps in the ecosystem"})]}),a.jsxs(Ne,{variant:"outline",onClick:x,className:"gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Export CSV"]})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-8",children:[a.jsxs(Ee,{className:"p-5",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-50 flex items-center justify-center",children:a.jsx(hr,{className:"h-5 w-5 text-emerald-600"})}),a.jsx("p",{className:"text-sm text-slate-500",children:"Total Searches"})]}),a.jsx("p",{className:"text-3xl font-bold text-slate-900",children:v.total})]}),a.jsxs(Ee,{className:"p-5",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-50 flex items-center justify-center",children:a.jsx(po,{className:"h-5 w-5 text-amber-600"})}),a.jsx("p",{className:"text-sm text-slate-500",children:"Zero-Result Searches (Gaps)"})]}),a.jsx("p",{className:"text-3xl font-bold text-slate-900",children:v.gapCount}),a.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:[v.gapRate,"% of all searches"]})]}),a.jsxs(Ee,{className:"p-5",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-50 flex items-center justify-center",children:a.jsx(pr,{className:"h-5 w-5 text-blue-600"})}),a.jsx("p",{className:"text-sm text-slate-500",children:"Unique Queries"})]}),a.jsx("p",{className:"text-3xl font-bold text-slate-900",children:v.topSearches.length+v.topGaps.filter(w=>!v.topSearches.find(b=>b.query===w.query)).length})]})]}),a.jsxs(Ee,{className:"p-6 mb-8",children:[a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-1",children:"Search Activity (Last 14 Days)"}),a.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"Daily searches vs. zero-result searches"}),a.jsx(go,{width:"100%",height:260,children:a.jsxs(Bf,{data:v.trend,children:[a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),a.jsx(Ba,{dataKey:"date",tick:{fontSize:12}}),a.jsx(za,{allowDecimals:!1,tick:{fontSize:12}}),a.jsx(cr,{}),a.jsx(Fi,{dataKey:"searches",name:"Searches",fill:"#10b981",radius:[4,4,0,0]}),a.jsx(Fi,{dataKey:"gaps",name:"Zero-result",fill:"#f59e0b",radius:[4,4,0,0]})]})})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(Ee,{className:"p-6",children:[a.jsxs("h3",{className:"text-lg font-semibold text-slate-900 mb-1 flex items-center gap-2",children:[a.jsx(c2,{className:"h-5 w-5 text-emerald-600"}),"Top Searches"]}),a.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"Most searched terms reveal real demand"}),a.jsx("div",{className:"space-y-2",children:v.topSearches.length===0?a.jsx("p",{className:"text-sm text-slate-400 py-8 text-center",children:"No searches yet"}):v.topSearches.map((w,b)=>a.jsxs("div",{className:"flex items-center gap-3 py-2 border-b border-slate-100 last:border-0",children:[a.jsx("span",{className:"w-6 text-sm font-medium text-slate-400",children:b+1}),a.jsx("span",{className:"flex-1 text-sm font-medium text-slate-900 truncate",children:w.query}),w.gaps>0&&a.jsxs(Ce,{variant:"outline",className:"text-amber-700 border-amber-200 bg-amber-50",children:[w.gaps," gaps"]}),a.jsxs(Ce,{variant:"secondary",className:"font-semibold",children:[w.count,"x"]})]},w.query))})]}),a.jsxs(Ee,{className:"p-6",children:[a.jsxs("h3",{className:"text-lg font-semibold text-slate-900 mb-1 flex items-center gap-2",children:[a.jsx(po,{className:"h-5 w-5 text-amber-600"}),"Data Gaps"]}),a.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"Searches with no results: priority targets for new data collection"}),a.jsx("div",{className:"space-y-2",children:v.topGaps.length===0?a.jsx("p",{className:"text-sm text-slate-400 py-8 text-center",children:"No gaps detected"}):v.topGaps.map((w,b)=>{const _=r.some(E=>E.name===`Gap Collector: ${w.query}`),j=p(w.query),C=w.count>=3&&!j;return a.jsxs("div",{className:"flex items-center gap-3 py-2 border-b border-slate-100 last:border-0",children:[a.jsx("span",{className:"w-6 text-sm font-medium text-slate-400",children:b+1}),a.jsx("span",{className:"flex-1 text-sm font-medium text-slate-900 truncate",children:w.query}),a.jsxs(Ce,{className:"bg-amber-500 text-white",children:[w.count,"x missed"]}),j?a.jsxs(Ce,{variant:"outline",className:"text-red-700 border-red-200 bg-red-50 gap-1",children:[a.jsx(po,{className:"h-3 w-3"}),"Flagged"]}):_?a.jsxs(Ce,{variant:"outline",className:"text-emerald-700 border-emerald-200 bg-emerald-50 gap-1",children:[a.jsx(Oi,{className:"h-3 w-3"}),"Agent exists"]}):C?a.jsxs(Ne,{size:"sm",variant:"outline",className:"gap-1 border-emerald-200 text-emerald-700 hover:bg-emerald-50",disabled:s===w.query,onClick:()=>m(w.query),children:[s===w.query?a.jsx(ln,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(Um,{className:"h-3.5 w-3.5"}),"Create Agent"]}):null]},w.query)})})]})]}),a.jsxs(Ee,{className:"p-6 mt-6",children:[a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-4",children:"Recent Searches"}),a.jsx("div",{className:"space-y-1",children:t.slice(0,20).map(w=>a.jsxs("div",{className:"flex items-center gap-3 py-2 border-b border-slate-100 last:border-0 text-sm",children:[a.jsx("span",{className:"flex-1 font-medium text-slate-900 truncate",children:w.query_text}),w.has_results?a.jsxs(Ce,{variant:"secondary",className:"text-emerald-700",children:[w.results_count," results"]}):a.jsx(Ce,{className:"bg-amber-500 text-white",children:"No results"}),a.jsx("span",{className:"text-slate-400 text-xs w-32 text-right",children:w.
1264created_date?Tt(vre(w.created_date),"MMM d, HH:mm"):""})]},w.id))})]})]})}const Fp=e=>String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),mCe=e=>e?e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`:"$0",bq=e=>`<!DOCTYPE html>
1265<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"></head>
1266<body style="margin:0;padding:0;background:#f8f9fa;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:#111827">
1267<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f8f9fa;padding:32px 16px">
1268<tr><td align="center">
1269<table role="presentation" width="600" cellpadding="0" cellspacing="0" style="max-width:600px;width:100%;background:#ffffff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden">
1270  <tr><td style="background:linear-gradient(135deg,#10b981,#0d9488);padding:24px 28px">
1271    <table width="100%"><tr>
1272      <td><span style="display:inline-block;background:rgba(255,255,255,0.2);color:#fff;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:600">KENYA INNOVATION ECOSYSTEM</span></td>
1273      <td align="right"><span style="color:#fff;font-size:12px;opacity:.9">${new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}</span></td>
1274    </tr></table>
1275  </td></tr>
1276  <tr><td style="padding:28px">${e}</td></tr>
1277  <tr><td style="padding:18px 28px;background:#f8fafc;border-top:1px solid #f1f5f9">
1278    <p style="margin:0;color:#94a3b8;font-size:12px;line-height:1.5;text-align:center">
1279      © ${new Date().getFullYear()} All Rights Reserved To Haim Etkin, Strategic OSINT &amp; Intelligence Integration®<br>
1280      You received this email because you are registered on the Kenya Innovation Ecosystem platform.
1281    </p>
1282  </td></tr>
1283</table>
1284</td></tr></table>
1285</body></html>`;function gCe({subject:e,body:t}){const n=String(t||"").split(/\n{2,}/).map(r=>`<p style="margin:0 0 14px;line-height:1.7;color:#374151;font-size:15px">${Fp(r).replace(/\n/g,"<br>")}</p>`).join("");return bq(`
1286    <h1 style="margin:0 0 16px;font-size:24px;font-weight:800;color:#111827">${Fp(e)}</h1>
1287    <p style="margin:0 0 20px;color:#6b7280;font-size:14px">A platform update from the Kenya Innovation Ecosystem team.</p>
1288    <div style="border-left:3px solid #10b981;padding-left:16px">${n}</div>
1289    <p style="margin-top:24px;color:#6b7280;font-size:14px">Visit the platform for the latest data, reports and dashboards.</p>
1290  `)}function yCe(e){const t=e.key_metrics||{},n=(e.highlights||[]).map((c,d)=>`
1291    <tr><td style="padding:8px 0">
1292      <table><tr>
1293        <td valign="top"><span style="display:inline-block;width:24px;height:24px;border-radius:50%;background:#d1fae5;color:#065f46;text-align:center;line-height:24px;font-size:12px;font-weight:700;margin-right:10px">${d+1}</span></td>
1294        <td style="color:#374151;font-size:15px;line-height:1.5">${Fp(c)}</td>
1295      </tr></table>
1296    </td></tr>`).join(""),i=[{label:"Startups",value:t.total_startups||0},{label:"Investors",value:t.total_investors||0},{label:"ESOs",value:t.total_esos||0},{label:"Funding",value:mCe(t.total_funding_usd||0)}].map(c=>`
1297    <td style="width:25%;padding:8px 4px">
1298      <table width="100%" style="background:#f8fafc;border:1px solid #f1f5f9;border-radius:8px">
1299        <tr><td style="padding:14px;text-align:center">
1300          <div style="color:#6b7280;font-size:12px">${c.label}</div>
1301          <div style="font-size:20px;font-weight:800;color:#111827;margin-top:4px">${c.value}</div>
1302        </td></tr>
1303      </table>
1304    </td>`).join(""),s=[["Institutions tracked",t.total_gov_programs||0],["With AI initiatives",t.gov_ai_initiatives||0],["With online portal",t.gov_online_portals||0],["Pending public submissions",t.pending_public_submissions||0]].map(([c,d])=>`
1305    <tr><td style="padding:7px 0;color:#6b7280;font-size:14px">${c}</td><td align="right" style="padding:7px 0;font-weight:700;color:#111827;font-size:14px">${d}</td></tr>`).join(""),o=[["Active agents",t.active_agents||0],["Runs in period",t.agent_runs_period||0],["Items found",t.agent_items_found||0],["New entities added",t.agent_new_entities||0]].map(([c,d])=>`
1306    <tr><td style="padding:7px 0;color:#6b7280;font-size:14px">${c}</td><td align="right" style="padding:7px 0;font-weight:700;color:#111827;font-size:14px">${d}</td></tr>`).join("");return bq(`
1307    <h1 style="margin:0 0 8px;font-size:24px;font-weight:800;color:#111827">${Fp(e.title)}</h1>
1308    <p style="margin:0 0 22px;color:#6b7280;font-size:13px">
1309      ${e.period_start&&e.period_end?`Period: ${e.period_start} to ${e.period_end}`:""}${e.generated_at?` | Generated ${new Date(e.generated_at).toLocaleDateString()}`:""}
1310    </p>
1311    <h2 style="font-size:17px;font-weight:700;color:#111827;margin:0 0 12px;border-bottom:2px solid #10b981;padding-bottom:8px">Executive Summary</h2>
1312    <p style="margin:0 0 18px;line-height:1.7;color:#374151;font-size:15px">${Fp(e.executive_summary||"No summary available.")}</p>
1313    ${n?`<table width="100%" style="margin-bottom:22px">${n}</table>`:""}
1314    <table width="100%" cellpadding="0" cellspacing="0" style="margin-bottom:22px"><tr>${i}</tr></table>
1315    <table width="100%" cellpadding="0" cellspacing="0"><tr>
1316      <td style="width:50%;padding-right:12px;vertical-align:top">
1317        <table width="100%" style="background:#f8fafc;border:1px solid #f1f5f9;border-radius:8px"><tr><td style="padding:16px">
1318          <div style="font-weight:700;color:#111827;font-size:14px;margin-bottom:8px">Government Innovation</div>
1319          <table width="100%">${s}</table>
1320        </td></tr></table>
1321      </td>
1322      <td style="width:50%;padding-left:12px;vertical-align:top">
1323        <table width="100%" style="background:#f8fafc;border:1px solid #f1f5f9;border-radius:8px"><tr><td style="padding:16px">
1324          <div style="font-weight:700;color:#111827;font-size:14px;margin-bottom:8px">Agent Collection</div>
1325          <table width="100%">${o}</table>
1326        </td></tr></table>
1327      </td>
1328    </tr></table>
1329    <table width="100%" style="margin-top:22px;background:#ecfdf5;border-radius:8px"><tr><td style="padding:14px 16px">
1330      <a href="https://kenya-innovation-ecosystem.base44.app" style="color:#065f46;font-weight:600;font-size:14px;text-decoration:none">View full report and interactive dashboard on the platform →</a>
1331    </td></tr></table>
1332  `)}function vCe(){return a.jsx(Jm,{children:a.jsx(xCe,{})})}function xCe(){const{toast:e}=zf(),[t,n]=P.useState([]),[r,i]=P.useState(!0),[s,o]=P.useState(""),[c,d]=P.useState(!1),[h,p]=P.useState("update"),[m,v]=P.useState(""),[x,w]=P.useState(""),[b,_]=P.useState([]),[j,C]=P.useState("monthly"),[E,A]=P.useState(!1),[k,M]=P.useState(!1),I=async(U=j)=>{A(!0);try{const z=await Q.entities.Report.filter({report_type:U,status:"ready"},"-generated_at",20);_(z||[])}catch(z){console.error("Failed to load reports",z)}finally{A(!1)}},$=b[0]||null;P.useEffect(()=>{(async()=>{try{const z=await Q.entities.User.list();n(z)}catch(z){console.error("Failed to load users",z)}finally{i(!1)}})()},[]);const q=t.filter(U=>{var z,Z;return!s||((z=U.full_name)==null?void 0:z.toLowerCase().includes(s.toLowerCase()))||((Z=U.email)==null?void 0:Z.toLowerCase().includes(s.toLowerCase()))}),V=t.filter(U=>U.role==="admin").length,H=async()=>
1332{if(h==="update"&&(!m.trim()||!x.trim())||h==="report"&&!$)return;const U=h==="report"?`Ecosystem Report - ${$.title}`:m.trim(),z=h==="report"?yCe($):gCe({subject:m.trim(),body:x.trim()});M(!0);let Z=0,ee=0;for(const G of t)try{await Q.integrations.Core.SendEmail({to:G.email,subject:U,body:z,from_name:"Kenya Innovation Ecosystem"}),Z++}catch(oe){console.error("Failed to send to",G.email,oe),ee++}M(!1),d(!1),v(""),w(""),_([]),e({title:"Email campaign complete",description:`Sent to ${Z} user${Z===1?"":"s"}${ee?`, ${ee} failed`:""}.`})};return a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-100 flex items-center justify-center",children:a.jsx(tr,{className:"h-5 w-5 text-emerald-700"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Registered Users"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Manage platform users and roles"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 my-6",children:[a.jsxs(Ee,{className:"p-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Total Users"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900 mt-1",children:t.length})]}),a.jsxs(Ee,{className:"p-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Admins"}),a.jsx("p",{className:"text-2xl font-bold text-emerald-700 mt-1",children:V})]}),a.jsxs(Ee,{className:"p-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Regular Users"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900 mt-1",children:t.length-V})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-6",children:[a.jsxs("div",{className:"relative flex-1 max-w-md",children:[a.jsx(hr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),a.jsx(Wt,{placeholder:"Search by name or email...",value:s,onChange:U=>o(U.target.value),className:"pl-9"})]}),a.jsxs(Yf,{open:c,onOpenChange:d,children:[a.jsx(UF,{asChild:!0,children:a.jsxs(Ne,{className:"gap-2 bg-emerald-600 hover:bg-emerald-700",disabled:t.length===0,onClick:()=>{p("update"),d(!0)},children:[a.jsx(HN,{className:"h-4 w-4"}),"Send Update Email"]})}),a.jsxs(Pu,{children:[a.jsx(ku,{children:a.jsxs(Au,{children:["Send to all ",t.length," users"]})}),a.jsxs("div",{className:"space-y-4 py-2",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Qt,{children:"Content type"}),a.jsxs(oo,{value:h,onValueChange:U=>{p(U),U==="report"&&I()},children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsxs(ds,{children:[a.jsx(Pn,{value:"update",children:"Custom update message"}),a.jsx(Pn,{value:"report",children:"Send a report"})]})]})]}),h==="report"&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(Qt,{children:"Report type"}),a.jsxs(oo,{value:j,onValueChange:U=>{C(U),_([]),I(U)},children:[a.jsx(us,{children:a.jsx(lo,{})}),a.jsxs(ds,{children:[a.jsx(Pn,{value:"daily",children:"Daily"}),a.jsx(Pn,{value:"weekly",children:"Weekly"}),a.jsx(Pn,{value:"monthly",children:"Monthly"}),a.jsx(Pn,{value:"annual",children:"Annual"})]})]}),E?a.jsxs("p",{className:"text-xs text-slate-500",children:["Loading latest ",j," report..."]}):$?a.jsxs("div",{className:"rounded-lg border border-emerald-200 bg-emerald-50 p-3 text-sm",children:[a.jsx("p",{className:"font-medium text-emerald-800",children:$.title}),a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[$.period_start," to ",$.period_end]})]}):a.jsx(Ne,{variant:"outline",size:"sm",onClick:I,children:"Reload"}),a.jsxs("p",{className:"text-xs text-slate-400",children:["The most recent ready ",j," report will be sent as a styled HTML email."]})]}),h==="update"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Qt,{htmlFor:"mail-subject",children:"Subject"}),a.jsx(Wt,{id:"mail-subject",value:m,onChange:U=>v(U.target.value),placeholder:"e.g. Platform update - new features available"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Qt,{htmlFor:"mail-body",children:"Message"}),a.jsx(bo,{id:"mail-body",value:x,onChange:U=>w(U.target.value),placeholder:"Type your update message...",rows:6})]})]})]}),a.jsxs(tg,{children:[a.jsx(Ne,{variant:"outline",onClick:()=>d(!1),disabled:k,children:"Cancel"}),a.jsx(Ne,{className:"bg-emerald-600 hover:bg-emerald-700",onClick:H,disabled:h==="update"?!m.trim()||!x.trim()||k:!$||k,children:k?a.jsxs(a.Fragment,{children:[a.jsx(ln,{className:"h-4 w-4 animate-spin mr-2"}),"Sending..."]}):a.jsxs(a.Fragment,{children:[a.jsx(HN,{className:"h-4 w-4 mr-2"}),"Send to all"]})})]})]})]})]}),r?a.jsx("div",{className:"flex justify-center py-12",children:a.jsx(ln,{className:"h-8 w-8 animate-spin text-slate-400"})}):q.length===0?a.jsx(Ee,{className:"p-12 text-center text-slate-500",children:"No users found"}):a.jsx(Ee,{className:"overflow-hidden",children:a.jsx("div",{className:"divide-y divide-slate-100",children:q.map(U=>{var z,Z;return a.jsxs("div",{className:"flex items-center gap-4 p-4 hover:bg-slate-50",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-emerald-400 to-teal-500 flex items-center justify-center text-white font-medium",children:(((z=U.full_name)==null?void 0:z[0])||((Z=U.email)==null?void 0:Z[0])||"U").toUpperCase()}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-slate-900 truncate",children:U.full_name||"Unnamed user"}),a.jsxs("p",{className:"text-sm text-slate-500 flex items-center gap-1 truncate",children:[a.jsx(Nu,{className:"h-3.5 w-3.5"}),U.email]})]}),U.role==="admin"?a.jsxs(Ce,{className:"bg-emerald-600 text-white gap-1",children:[a.jsx(pi,{className:"h-3 w-3"}),"Admin"]}):a.jsx(Ce,{variant:"outline",children:"User"}),a.jsxs("span",{className:"text-xs text-slate-400 hidden sm:block",children:["Joined ",U.created_date?new Date(U.created_date).toLocaleDateString():"-"]})]},U.id)})})})]})}const bCe=["#10b981","#3b82f6","#cbd5e1"],x3=["#10b981","#3b82f6","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#ef4444","#6366f1","#84cc16","#f97316"],$N=e=>e?e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`:"$0";function _Ce({report:e}){var h,p,m,v,x,w,b;const t=(h=e.charts_data)==null?void 0:h.funding_trend,n=e.sector_breakdown||((p=e.funding_summary)==null?void 0:p.by_sector)||{},r=(m=e.charts_data)==null?void 0:m.verification_status,i=Object.entries(n).map(([_,j])=>({name:_,value:j})).sort((_,j)=>j.value-_.value).slice(0,8),s=((v=t==null?void 0:t.weeks)==null?void 0:v.map(_=>({label:_.week,amount:_.amount||0,deals:_.deals||0}
1332)))||[],o=i.length>0,c=s.length>0,d=!!(r!=null&&r.by_tier);return!o&&!c&&!d?null:a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Weekly Funding Trend"})}),a.jsxs($e,{children:[a.jsx(go,{width:"100%",height:280,children:a.jsxs(Bf,{data:s,children:[a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(Ba,{dataKey:"label",tick:{fontSize:12},stroke:"#94a3b8"}),a.jsx(za,{tickFormatter:$N,tick:{fontSize:12},stroke:"#94a3b8"}),a.jsx(cr,{formatter:_=>$N(_),contentStyle:{borderRadius:8,border:"1px solid #e2e8f0"}}),a.jsx(Fi,{dataKey:"amount",fill:"#10b981",radius:[6,6,0,0],name:"Funding"})]})}),a.jsxs("p",{className:"text-xs text-slate-500 mt-2 text-center",children:["Total period: ",$N((t==null?void 0:t.total_period)||0)," across ",s.reduce((_,j)=>_+j.deals,0)," deals"]})]})]}),o&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Sector Distribution"})}),a.jsx($e,{children:a.jsx(go,{width:"100%",height:280,children:a.jsxs(Z7,{children:[a.jsx(As,{data:i,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:90,label:!0,children:i.map((_,j)=>a.jsx(xu,{fill:x3[j%x3.length]},j))}),a.jsx(cr,{contentStyle:{borderRadius:8,border:"1px solid #e2e8f0"}}),a.jsx(iu,{wrapperStyle:{fontSize:12}})]})})})]}),d&&a.jsxs(Ee,{className:"lg:col-span-2",children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"New Startups Verification Breakdown"})}),a.jsx($e,{children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-500 mb-3",children:"By Reliability Tier"}),a.jsx(go,{width:"100%",height:200,children:a.jsxs(Bf,{data:[{tier:"A",count:((x=r.by_tier)==null?void 0:x.A)||0},{tier:"B",count:((w=r.by_tier)==null?void 0:w.B)||0},{tier:"C",count:((b=r.by_tier)==null?void 0:b.C)||0}],children:[a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(Ba,{dataKey:"tier",tick:{fontSize:12},stroke:"#94a3b8"}),a.jsx(za,{tick:{fontSize:12},stroke:"#94a3b8",allowDecimals:!1}),a.jsx(cr,{contentStyle:{borderRadius:8,border:"1px solid #e2e8f0"}}),a.jsx(Fi,{dataKey:"count",radius:[6,6,0,0],children:bCe.map((_,j)=>a.jsx(xu,{fill:_},j))})]})})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-500 mb-3",children:"Summary"}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"New startups"}),a.jsx("span",{className:"font-semibold",children:r.new_startups_count||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Pending verification"}),a.jsx("span",{className:"font-semibold text-amber-700",children:r.pending_verification||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Validated (Intelligence Officer)"}),a.jsx("span",{className:"font-semibold text-emerald-700",children:r.validated||0})]})]}),a.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-100",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"By status"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(r.by_status||{}).map(([_,j])=>a.jsxs("span",{className:"text-xs px-2 py-1 bg-slate-100 rounded-full text-slate-600",children:[_,": ",j]},_))})]})]})]})})]})]})}function wCe({report:e,onDownload:t,isAuthed:n,isAdmin:r,paid:i,purchasing:s,onPurchase:o,onSignIn:c}){var p,m,v;const d=e.key_metrics||{},h=n&&(r||i);return a.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[a.jsx(yt,{to:ot("Reports"),children:a.jsxs(Ne,{variant:"ghost",className:"gap-2 text-slate-600",children:[a.jsx(e0,{className:"h-4 w-4"}),"Back to Reports"]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[e.status==="ready"&&h&&a.jsxs(a.Fragment,{children:[r&&a.jsx(Ce,{className:"bg-slate-900 text-white text-xs",children:"Admin access"}),a.jsxs(Ne,{variant:"outline",className:"gap-2 border-emerald-200 text-emerald-700 hover:bg-emerald-50",onClick:t,children:[a.jsx(Fr,{className:"h-4 w-4"}),"Download"]})]}),e.status==="ready"&&n&&!r&&!i&&a.jsxs(Ne,{className:"gap-2 bg-emerald-600 hover:bg-emerald-700",disabled:s,onClick:o,children:[s?a.jsx(ur,{className:"h-4 w-4 animate-spin"}):a.jsx(ur,{className:"h-4 w-4"}),"Purchase"]}),e.status==="ready"&&!n&&c&&a.jsxs(Ne,{variant:"outline",className:"gap-2 opacity-70",onClick:c,children:[a.jsx(ha,{className:"h-4 w-4"}),"Sign in to purchase"]})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Ce,{className:"capitalize bg-emerald-100 text-emerald-700",children:e.report_type}),a.jsx("span",{className:"text-sm text-slate-500",children:e.period_start&&e.period_end&&`${Tt(ne
1332w Date(e.period_start),"MMM d")} - ${Tt(new Date(e.period_end),"MMM d, yyyy")}`}),a.jsxs("span",{className:"text-sm text-slate-400",children:["Generated ",e.generated_at&&Tt(new Date(e.generated_at),"MMM d, h:mm a")]})]}),a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:e.title})]}),a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Executive Summary"})}),a.jsxs($e,{children:[a.jsx("p",{className:"text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.executive_summary||"No summary available."}),((p=e.highlights)==null?void 0:p.length)>0&&a.jsxs("div",{className:"mt-5",children:[a.jsx("h4",{className:"text-sm font-semibold text-slate-900 mb-3",children:"Highlights"}),a.jsx("ul",{className:"space-y-2",children:e.highlights.map((x,w)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-600",children:[a.jsx("span",{className:"w-5 h-5 rounded-full bg-emerald-100 text-emerald-700 flex items-center justify-center text-xs font-semibold shrink-0 mt-0.5",children:w+1}),a.jsx("span",{children:x})]},w))})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsx(kl,{title:"Startups",value:d.total_startups||0,icon:ur,iconColor:"bg-blue-500"}),a.jsx(kl,{title:"Investors",value:d.total_investors||0,icon:ur,iconColor:"bg-purple-500"}),a.jsx(kl,{title:"ESOs",value:d.total_esos||0,icon:ur,iconColor:"bg-amber-500"}),a.jsx(kl,{title:"Funding Tracked",value:d.total_funding_usd||0,format:"currency",icon:ur,iconColor:"bg-emerald-500"})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[a.jsxs(Ee,{className:"p-5",children:[a.jsx("p",{className:"text-sm font-medium text-slate-500 mb-3",children:"Reliability Tiers"}),a.jsx("div",{className:"space-y-3",children:[{label:"Tier A (Verified)",value:d.tier_a_count||0,color:"bg-emerald-500"},{label:"Tier B (Confirmed)",value:d.tier_b_count||0,color:"bg-blue-500"},{label:"Tier C (Unverified)",value:d.tier_c_count||0,color:"bg-slate-300"}].map(x=>{const w=(d.tier_a_count||0)+(d.tier_b_count||0)+(d.tier_c_count||0)||1,b=Math.round(x.value/w*100);return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between text-sm mb-1",children:[a.jsx("span",{className:"text-slate-600",children:x.label}),a.jsxs("span",{className:"font-semibold text-slate-900",children:[x.value," (",b,"%)"]})]}),a.jsx("div",{className:"h-2 bg-slate-100 rounded-full overflow-hidden",children:a.jsx("div",{className:`h-full ${x.color} rounded-full`,style:{width:`${b}%`}})})]},x.label)})})]}),a.jsxs(Ee,{className:"p-5",children:[a.jsx("p",{className:"text-sm font-medium text-slate-500 mb-3",children:"Government Innovation"}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Institutions tracked"}),a.jsx("span",{className:"font-semibold",children:d.total_gov_programs||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"With AI initiatives"}),a.jsx("span",{className:"font-semibold text-emerald-700",children:d.gov_ai_initiatives||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"With online portal"}),a.jsx("span",{className:"font-semibold text-blue-700",children:d.gov_online_portals||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Pending public submissions"}),a.jsx("span",{className:"font-semibold text-amber-700",children:d.pending_public_submissions||0})]})]})]}),a.jsxs(Ee,{className:"p-5",children:[a.jsxs("p",{className:"text-sm font-medium text-slate-500 mb-3 flex items-center gap-2",children:[a.jsx(Oi,{className:"h-4 w-4 text-emerald-600"}),"Agent Collection (period)"]}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Active agents"}),a.jsx("span",{className:"font-semibold",children:d.active_agents||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Runs in period"}),a.jsx("span",{className:"font-semibold",children:d.agent_runs_period||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Items found"}),a.jsx("span",{className:"font-semibold",children:d.agent_items_found||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"New entities added"}),a.jsx("span",{className:"font-semibold text-emerald-700",children:d.agent_new_entities||0})]})]})]})]}),a.jsx(_Ce,{report:e}),((m=d.agent_roster)==null?void 0:m.length)>0&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Agent Roster"})}),a.jsx($e,{children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"text-left text-slate-500 border-b border-slate-200",children:[a.jsx("th",{className:"py-2 pr-4 font-medium",children:"Agent"}),a.jsx("th",{className:"py-2 pr-4 font-medium",children:"Type"}),a.jsx("th",{className:"py-2 pr-4 font-medium",children:"Schedule"}),a.jsx("th",{className:"py-2 pr-4 font-medium",children:"Last Run"}),a.jsx("th",{className:"py-2 pr-4 font-medium",children:"Items"})]})}),a.jsx("tbody",{children:d.agent_roster.map((x,w)=>a.jsxs("tr",{className:"border-b border-slate-100",children:[a.jsx("td",{className:"py-2 pr-4 font-medium text-slate-900",children:x.name}),a.jsx("td",{className:"py-2 pr-4",children:a.jsx(Ce,{variant:"outline",children:x.agent_type})}),a.jsx("td",{className:"py-2 pr-4 text-slate-500",children:x.schedule}),a.jsx("td",{className:"py-2 pr-4 text-slate-500",children:x.last_run_status}),a.jsx("td",{className:"py-2 pr-4 text-slate-500",children:x.last_run_items_found||0})]},w))})]})})})]}),((v=e.uncertain_items)==null?void 0:v.length)>0&&a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Entities Needing Verification"})}),a.jsx($e,{children:a.jsx("div",{className:"space-y-2",children:e.uncertain_items.map((x,w)=>a.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-100 last:border-0",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:x.entity_name}),a.jsx("p",{className:"text-xs text-slate-500",children:x.issue})]}),a.jsxs(Ce,{variant:"outline",className:"capitalize",children:["Tier ",x.reliability_tier]})]},w))})})]})]})}function jCe(){const{id:e}=wZ(),[t,n]=P.useState(null),[r,i]=P.useState(!0),[s,o]=P.useState(!1),[c,d]=P.useState(!1),[h,p]=P.useState({}),[m,v]=P.useState(!1),[x,w]=P.useState(!1);P.useEffect(()=>{Q.auth.isAuthenticated().then(async E=>{if(o(E),E)try{const A=await Q.auth.me();w((A==null?void 0:A.role)==="admin")}catch{}d(!0)});const C=new URLSearchParams(window.location.search);C.get("report_paid")==="1"&&C.get("session_id")&&b(C.get("session_id")),(async()=>{try{const E=await Q.entities.Report.get(e);n(E)}catch(E){console.error("Failed to load report",E)}finally{i(!1)}})()},[e]);const b=async C=>{var E,A;try{const k=await Q.functions.invoke("verifyReportCheckout",{session_id:C});if((E=k.data)!=null&&E.paid&&((A=k.data)!=null&&A.report_id)){p(I=>({...I,[k.data.report_id]:!0}));const M=new URL(window.location.href);M.searchParams.delete("report_paid"),M.searchParams.delete("session_id"),M.searchParams.delete("report_id"),window.history.replaceState({},"",M.toString())}}catch(k){console.error("Report payment verification failed:",k)}},_=async()=>{var C,E;if(window.self!==window.top){alert("Checkout works only from the published app. Please open the app directly in a new tab to purchase this report.");return}v(!0);try{const A=await Q.functions.invoke("createReportCheckout",{report_type:t.report_type,report_id:t.id});(C=A.data)!=null&&C.url?window.location.href=A.data.url:alert(((E=A.data)==null?void 0:E.error)||"Unable to start checkout.")}catch(A){alert("Unable to start checkout. Please try again."),console.error(A)}finally{v(!1)}},j=()=>o9(t);return r?a.jsx("div",{className:"py-20",children:a.jsx(Mn,{message:"Loading report..."})}):t?a.jsx(wCe,{report:t,isAuthed:s,isAdmin:x,paid:h[t.id],purchasing:m,onPurchase:_,onDownload:j,onSignIn:()=>Q.auth.redirectToLogin(`/ReportDetail/${e}`)}):a.jsx("div",{className:"max-w-md mx-auto py-20 text-center text-slate-500",children:"Report not found."})}const FN="https://media.base44.com/images/public/6984885939cff3c6798f183e/800ff397d_.jpg";function SCe(){const[e,t]=P.useState(!1),n=async r=>{r.preventDefault();try{t(!0);const s=await(await fetch(FN)).blob(),o=URL.createObjectURL(s),c=document.createElement("a");c.href=o,c.download="kenya-innovation-ecosystem-haim-etkin.png",document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(o)}catch{window.open(FN,"_blank")}finally{t(!1)}};return a.jsxs("section",{className:"relative overflow-hidden bg-slate-900 text-white",children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-600/20 via-slate-900 to-teal-600/10"}),a.jsxs("div",{className:"relative max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-16 sm:py-20",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-emerald-500/15 border border-emerald-400/30 text-emerald-300 text-xs font-medium mb-6",children:[a.jsx(pi,{className:"h-3.5 w-3.5"}),"Press & Media Kit"]}),a.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold tracking-tight leading-tight mb-6",children:"Kenya Innovation Ecosystem"}),a.jsx("p",{className:"text-xl sm:text-2xl text-slate-300 max-w-3xl leading-relaxed mb-8",children:"An independent private OSINT intelligence engine mapping Kenya's startup ecosystem: automated collection, AI validation, and decision-grade dashboards for startups, investors, government programs, and universities."}),a.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.jsx(yt,{to:ot("Home"),children:a.jsxs(Ne,{className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:["View Live Dashboard ",a.jsx(Lr,{className:"h-4 w-4"})]})}),a.jsx(yt,{to:ot("Solutions"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2 bg-transparent border-slate-600 text-slate-200 hover:bg-slate-800 hover:text-white",children:[a.jsx(ca,{className:"h-4 w-4"}),"Multi-Country Platform"]})}),a.jsx("a",{href:"https://kenya-innovation-ecosystem.base44.app",target:"_blank",rel:"noopener noreferrer",children:a.jsxs(Ne,{variant:"ghost",className:"gap-2 text-slate-300 hover:bg-slate-800 hover:text-white",children:["Open Public Site ",a.jsx(fa,{className:"h-4 w-4"})]})})]}),a.jsx("div",{className:"mt-12",children:a.jsxs("button",{onClick:n,className:"group block w-full text-left rounded-xl overflow-hidden border border-slate-700 hover:border-emerald-500/60 transition-colors",title:"Click to download - Haim Etkin, all rights reserved",children:[a.jsxs("div",{className:"relative",children:[a.jsx("img",{src:FN,alt:"Haim Etkin with OSINT intelligence dashboard and AI sphere",className:"w-full h-auto object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-slate-900/0 group-hover:bg-slate-900/30 transition-colors flex items-center justify-center",children:a.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-2 px-4 py-2 rounded-full bg-emerald-600 text-white text-sm font-medium",children:[a.jsx(Fr,{className:"h-4 w-4"}),e?"Downloading...":"Click to download"]})})]}),a.jsxs("div",{className:"px-4 py-3 bg-slate-800 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-white",children:"Founder & Platform Visual"}),a.jsx("p",{className:"text-xs text-slate-400",children:"Haim Etkin - All rights reserved"})]}),a.jsx(Fr,{className:"h-5 w-5 text-emerald-400"})]})]})})]})]})}function NCe(){return a.jsx("section",{className:"bg-amber-50 border-y border-amber-200",children:a.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-5",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(i0,{className:"h-5 w-5 text-amber-600 mt-0.5 shrink-0"}),a.jsxs("p",{className:"text-sm text-amber-900 leading-relaxed",children:[a.jsx("strong",{children:"Independent private initiative."})," Kenya Innovation Ecosystem is a privately built OSINT intelligence platform. It is ",a.jsx("strong",{children:"not"})," an official Government of Kenya platform, is not affiliated with any Kenyan government body, and does not represent official government data."]})]})})})}const b3=[{entity:"Startup",icon:er,label:"Startups Tracked",color:"text-emerald-600 bg-emerald-50"},{entity:"Investor",icon:Ri,label:"Investors Mapped",color:"text-blue-600 bg-blue-50"},{entity:"ESO",icon:tr,label:"Support Organizations",color:"text-purple-600 bg-purple-50"},{entity:"GovProgram",icon:Ti,label:"Government Programs",color:"text-amber-600 bg-amber-50"},{entity:"University",icon:u2,label:"Universities",color:"text-rose-600 bg-rose-50"},{entity:"Agent",icon:Oi,label:"Intelligence Agents",color:"text-teal-600 bg-teal-50"}];function CCe(){const[e,t]=P.useState({}),[n,r]=P.useState(!0);return P.useEffect(()=>{(async()=>{const s={};await Promise.all(b3.map(async o=>{try{const c=await Q.entities[o.entity].list("-created_date",500);s[o.entity]=c.length}catch{s[o.entity]=0}})),t(s),r(!1)})()},[]),a.jsxs("section",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-1",children:"Platform at a Glance"}),a.jsx("p",{className:"text-slate-500 mb-8",children:"Live intelligence coverage, updated continuously by automated agents"}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",children:b3.map(i=>a.jsx(Ee,{className:"border-slate-200",children:a.jsxs($e,{className:"p-5 text-center",children:[a.jsx("div",{className:`w-11 h-11 rounded-xl ${i.color} flex items-center justify-center mx-auto mb-3`,children:a.jsx(i.icon,{className:"h-5 w-5"})}),a.jsx("div",{className:"text-3xl font-bold text-slate-900 tabular-nums",children:n?"-":(e[i.entity]||0).toLocaleStr
1332ing()}),a.jsx("div",{className:"text-xs text-slate-500 mt-1",children:i.label})]})},i.entity))})]})}const _3="Kenya Innovation Ecosystem is an independent, private open-source intelligence (OSINT) platform that continuously maps and validates Kenya's startup and innovation landscape. Built on an Israeli-developed intelligence engine, the platform deploys specialized AI agents that automatically collect data from news sites, company registries, LinkedIn, government portals, and donor databases. Each data point passes through a tiered validation pipeline: AI capture, actor confirmation, and intelligence-officer review, producing decision-grade intelligence rated A, B, or C for reliability. The platform covers startups, investors, ecosystem support organizations (ESOs), government innovation programs, and universities, and is expanding to cover the entire African continent. It is an independent initiative, not an official Government of Kenya platform, and is accessible to the public, serving founders, investors, policymakers, researchers, and journalists.",ECe=[{label:"Platform Name",value:"Kenya Innovation Ecosystem"},{label:"Status",value:"Independent private initiative - not an official Government of Kenya platform"},{label:"Technology Origin",value:"Israeli-built OSINT intelligence engine"},{label:"Coverage",value:"Startups, Investors, ESOs, Government Programs, Universities, Events"},{label:"Validation Model",value:"Tiered: AI Captured -> Actor Confirmed -> Officer Validated (A/B/C)"},{label:"Data Sources",value:"News, registries, LinkedIn, government portals, donor databases, public submissions"},{label:"Expansion Vision",value:"Scaling to cover the entire African continent, domain-agnostic"},{label:"Founded By",value:"Haim Etkin, Strategic OSINT & Intelligence Integration"},{label:"Access",value:"Public dashboard, free to browse; reports available for purchase"}];function PCe(){const[e,t]=P.useState(!1),n=()=>{navigator.clipboard.writeText(_3),t(!0),setTimeout(()=>t(!1),2e3)};return a.jsxs("section",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-1",children:"Boilerplate & Fact Sheet"}),a.jsx("p",{className:"text-slate-500 mb-8",children:"Ready-to-use background text for articles and reports"}),a.jsxs(Ee,{className:"border-slate-200 mb-6",children:[a.jsxs(tt,{className:"flex flex-row items-center justify-between",children:[a.jsx(nt,{className:"text-lg",children:"About the Platform (boilerplate)"}),a.jsxs(Ne,{variant:"outline",size:"sm",onClick:n,className:"gap-2",children:[e?a.jsx(Su,{className:"h-4 w-4 text-emerald-600"}):a.jsx(n0,{className:"h-4 w-4"}),e?"Copied":"Copy"]})]}),a.jsx($e,{children:a.jsx("p",{className:"text-slate-700 leading-relaxed text-sm",children:_3})})]}),a.jsxs(Ee,{className:"border-slate-200",children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Fact Sheet"})}),a.jsx($e,{className:"pt-0",children:a.jsx("dl",{className:"divide-y divide-slate-100",children:ECe.map(r=>a.jsxs("div",{className:"py-3 grid grid-cols-1 sm:grid-cols-3 gap-1 sm:gap-4",children:[a.jsx("dt",{className:"text-sm font-medium text-slate-500",children:r.label}),a.jsx("dd",{className:"text-sm text-slate-900 sm:col-span-2",children:r.value})]},r.label))})})]})]})}const kCe=["Kenya was selected as the starting point because it represents one of Africa's most dynamic environments for technology, entrepreneurship and innovation.","Its growing startup ecosystem, strong position in fintech and digital services, expanding investment activity, and increasing interaction between government policy, private capital, entrepreneurship and technology make it a natural place to build and test a new model of innovation intelligence.","But the choice of Kenya goes beyond market size or technological activity.","Kenya and Israel are very different countries, yet they share several characteristics that are highly relevant to innovation. Both have relatively young, ambitious and entrepreneurial societies, with a strong appetite for progress, technological change and practical solutions.","There is in both environments a certain impatience with the status quo: a willingness to experiment, adapt quickly, challenge established models and search for better ways to solve economic and social problems.","In such environments, constraints do not necessarily prevent innovation. They can become catalysts for it.","The choice of Kenya also reflects Haim Etkin's long-standing professional connection with the country. Etkin previously worked in Kenya in the field of strategic intelligence training. Today, his work focuses on the integration of OSINT, artificial intelligence and structured intelligence methodologies to transform fragmented information into actionable economic and strategic intelligence.","This combination of Kenya's entrepreneurial culture, its growing innovation economy and Etkin's longstanding connection with the country made Kenya a natural starting point."];function ACe(){return a.jsx("section",{className:"bg-white border-t border-slate-100",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsxs("div",{className:"flex items-center gap-2 text-emerald-600 mb-3",children:[a.jsx(Cu,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm font-medium uppercase tracking-wide",children:"The Starting Point"})]}),a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"Why Kenya?"}),a.jsx("div",{className:"space-y-4",children:kCe.map((e,t)=>a.jsx("p",{className:"text-slate-700 leading-relaxed",children:e},t))}),a.jsx("p",{className:"mt-6 text-sm text-slate-500 italic",children:"Kenya Innovation Ecosystem is an independent private initiative and is not an official platform of the Government of Kenya."})]})})}const OCe=["Kenya holds a very special place in my heart.","Many years ago, I had the privilege of delivering an intelligence officers' course in Kenya. Some of the officers I worked with later went on to hold very senior positions.","The experience stayed with me.","The people, the energy, the openness, and the sense of possibility I encountered in Kenya left a lasting impression. Over the years, I often thought about returning and finding a meaningful way to contribute again.","In many respects, this platform is connected to that aspiration.","It would be a genuine honor to work alongside Kenyan teams, institutions, innovators and decision-makers, and to contribute practical experience in OSINT, artificial intelligence and intelligence integration to initiatives that can strengthen the country's innovation ecosystem.","I do not see this platform as an endpoint, but as a starting point for dialogue, collaboration and further development.","My hope is that it can create value for Kenya, inspire similar initiatives elsewhere in Africa, and perhaps open the door to meaningful partnerships in the future.","Returning to contribute to Kenya has long been a personal ambition. Building something useful for its innovation ecosystem is one way of beginning to realize that ambition."];function TCe(){return a.jsx("section",{className:"bg-gradient-to-br from-emerald-50 via-white to-teal-50/40 border-t border-slate-100",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsxs("div",{className:"flex items-center gap-2 text-emerald-600 mb-3",children:[a.jsx(AV,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm font-medium uppercase tracking-wide",children:"A word from the founder"})]}),a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"A Personal Note"}),a.jsx("div",{className:"space-y-4",children:OCe.map((e,t)=>a.jsx("p",{className:t===0?"text-lg text-slate-800 leading-relaxed font-medium":"text-slate-700 leading-relaxed",children:e},t))}),a.jsx("p",{className:"mt-8 text-sm font-medium text-slate-900",children:"- Haim Etkin"})]})})}const MCe=["Kenya also has the potential to demonstrate something larger.","The platform is not intended merely to document one national startup ecosystem. It is designed to show how fragmented public information can be transformed into structured, verified and actionable intelligence.","Kenya is therefore the starting point, but it can also serve as an example.","Other African countries can develop their own innovation intelligence infrastru
1332ctures, adapted to their local ecosystems, priorities and challenges. Each country has different strengths, industries, institutions and opportunities, but the underlying principle is universal:"],RCe="You cannot strengthen an innovation ecosystem if you cannot clearly see it, understand it, verify its data and identify its gaps.",ICe=["A country that can map its startups, investors, innovation hubs, government initiatives, funding flows, emerging technologies, geographic clusters and policy environment gains more than a database. It gains a strategic tool for decision-making.","The ambition behind Kenya Innovation Ecosystem is therefore also to inspire others. It demonstrates how OSINT, artificial intelligence, structured research and human analysis can be combined to create a living intelligence layer for an entire innovation ecosystem.","The broader vision, however, extends beyond Kenya: Kenya can be the first case, not the last one.","If this model helps policymakers, investors, entrepreneurs, researchers and innovation leaders see their ecosystem more clearly, it can inspire similar initiatives across Africa and beyond."];function LCe(){return a.jsx("section",{className:"bg-white border-t border-slate-100",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsxs("div",{className:"flex items-center gap-2 text-emerald-600 mb-3",children:[a.jsx(ca,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm font-medium uppercase tracking-wide",children:"What comes next"})]}),a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"From Kenya to a Broader African Vision"}),a.jsx("div",{className:"space-y-4 mb-6",children:MCe.map((e,t)=>a.jsx("p",{className:"text-slate-700 leading-relaxed",children:e},t))}),a.jsx("blockquote",{className:"my-8 pl-4 border-l-4 border-emerald-500",children:a.jsx("p",{className:"text-lg sm:text-xl font-medium text-slate-900 leading-relaxed",children:RCe})}),a.jsx("div",{className:"space-y-4",children:ICe.map((e,t)=>a.jsx("p",{className:"text-slate-700 leading-relaxed",children:e},t))})]})})}const DCe=["Haim Etkin is the founder of Kenya Innovation Ecosystem and the architect behind its underlying OSINT intelligence engine.","His professional background centers on the integration of open-source intelligence (OSINT), artificial intelligence, and structured intelligence methodologies. Over the years, his work has focused on transforming fragmented, publicly available information into actionable economic and strategic intelligence.","Etkin previously worked in Kenya, where he delivered strategic intelligence training to officers who later went on to hold senior positions. That experience shaped a long-standing connection to the country and a desire to contribute to its innovation ecosystem in a meaningful way.","Through Kenya Innovation Ecosystem, Etkin brings together automated data collection, AI-driven validation, and human analysis to build a living intelligence layer that can serve decision-makers across an entire innovation ecosystem."];function $Ce(){return a.jsx("section",{className:"bg-slate-50 border-t border-slate-100",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsxs("div",{className:"flex items-center gap-2 text-emerald-600 mb-3",children:[a.jsx(yK,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm font-medium uppercase tracking-wide",children:"The founder"})]}),a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"About Haim Etkin"}),a.jsxs(Ee,{className:"border-slate-200 p-6 sm:p-8",children:[a.jsx("div",{className:"space-y-4",children:DCe.map((e,t)=>a.jsx("p",{className:"text-slate-700 leading-relaxed",children:e},t))}),a.jsx("p",{className:"mt-6 pt-4 border-t border-slate-100 text-sm text-slate-500",children:"Strategic OSINT & Intelligence Integration"})]})]})})}const BN="https://media.base44.com/images/public/6984885939cff3c6798f183e/bf2c2aa46_ChatGPTImageAug11202611_13_19PM.png",w3="Haim Etkin - All rights reserved";function FCe(){const[e,t]=P.useState(!1),n=async()=>{try{const s=await(await fetch(BN)).blob(),o=URL.createObjectURL(s),c=document.createElement("a");c.href=o,c.download="kenya-innovation-ecosystem-ai.png",document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(o)}catch{window.open(BN,"_blank")}},r=()=>{navigator.clipboard.writeText(w3),t(!0),setTimeout(()=>t(!1),2e3)};return a.jsxs("section",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-1",children:"Downloadable Assets"}),a.jsx("p",{className:"text-slate-500 mb-8",children:"High-resolution imagery for press and editorial use"}),a.jsxs(Ee,{className:"border-slate-200 overflow-hidden",children:[a.jsx(tt,{children:a.jsx(nt,{className:"text-lg",children:"Founder & Platform Visual"})}),a.jsxs($e,{className:"pt-0",children:[a.jsx("div",{className:"rounded-lg overflow-hidden bg-slate-900 mb-4",children:a.jsx("img",{src:BN,alt:"Haim Etkin with OSINT intelligence dashboard and AI sphere representing Kenya Innovation Ecosystem",className:"w-full h-auto object-cover"})}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-900 font-medium",children:w3}),a.jsx("p",{className:"text-xs text-slate-500",children:"Copyright belongs to Haim Etkin. Permitted for editorial and press coverage of the platform."})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(Ne,{onClick:r,variant:"outline",size:"sm",className:"gap-2",children:[e?a.jsx(Su,{className:"h-4 w-4 text-emerald-600"}):a.jsx(Fr,{className:"h-4 w-4"}),e?"Caption copied":"Copy caption"]}),a.jsxs(Ne,{onClick:n,size:"sm",className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(Fr,{className:"h-4 w-4"}),"Download image"]})]})]})]})]})]})}const j3={daily:{label:"Daily",color:"bg-sky-50 text-sky-700 border-sky-200"},weekly:{label:"Weekly",color:"bg-emerald-50 text-emerald-700 border-emerald-200"},monthly:{label:"Monthly",color:"bg-violet-50 text-violet-700 border-violet-200"}
1332,annual:{label:"Annual",color:"bg-amber-50 text-amber-700 border-amber-200"},custom:{label:"Insights",color:"bg-rose-50 text-rose-700 border-rose-200"}};function BCe({report:e}){const t=j3[e.report_type]||j3.custom,n=e.period_end?new Date(e.period_end).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):null;return a.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white overflow-hidden flex flex-col hover:shadow-md transition-shadow",children:[a.jsxs("div",{className:"p-5 border-b border-slate-100 bg-slate-50/60",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs(Ce,{className:t.color+" border",children:[t.label," Report"]}),n&&a.jsxs("span",{className:"flex items-center gap-1 text-xs text-slate-500",children:[a.jsx(ho,{className:"h-3 w-3"}),n]})]}),a.jsx("h3",{className:"font-semibold text-slate-900 leading-snug line-clamp-2",children:e.title})]}),a.jsxs("div",{className:"p-5 flex-1 flex flex-col",children:[a.jsx("ul",{className:"space-y-2 mb-5 flex-1",children:(e.highlights||[]).slice(0,3).map((r,i)=>a.jsxs("li",{className:"flex gap-2 text-sm text-slate-600 leading-relaxed",children:[a.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"•"}),a.jsx("span",{className:"line-clamp-2",children:r})]},i))}),a.jsx(yt,{to:`/ReportDetail/${e.id}`,className:"mt-auto",children:a.jsxs(Ne,{variant:"outline",size:"sm",className:"w-full gap-2 border-slate-300 hover:bg-slate-50",children:["View full report ",a.jsx(Lr,{className:"h-4 w-4"})]})})]})]})}function zCe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0);return P.useEffect(()=>{(async()=>{try{const s=await Q.entities.Report.filter({status:"ready"},"-generated_at",50),o={},c=["custom","monthly","weekly","daily","annual"];s.forEach(h=>{const p=h.report_type||"custom";o[p]||(o[p]=h)});const d=c.map(h=>o[h]).filter(Boolean).slice(0,3);t(d.length?d:s.slice(0,3))}catch{}r(!1)})()},[]),a.jsxs("section",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[a.jsx(ur,{className:"h-7 w-7 text-emerald-600 mt-0.5"}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Report Samples"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Ready-to-cite intelligence briefs generated by the platform's automated agents."})]})]}),n?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mt-8",children:[0,1,2].map(i=>a.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white h-64 animate-pulse",children:[a.jsx("div",{className:"h-20 bg-slate-100"}),a.jsxs("div",{className:"p-5 space-y-3",children:[a.jsx("div",{className:"h-3 bg-slate-100 rounded w-3/4"}),a.jsx("div",{className:"h-3 bg-slate-100 rounded w-full"}),a.jsx("div",{className:"h-3 bg-slate-100 rounded w-2/3"})]})]},i))}):e.length===0?a.jsx("div",{className:"mt-8 rounded-xl border border-dashed border-slate-300 p-10 text-center text-slate-500",children:"Reports are being generated. Please check back shortly."}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mt-8",children:e.map(i=>a.jsx(BCe,{report:i},i.id))}),a.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row items-center justify-between gap-4 rounded-xl bg-slate-900 p-6 text-white",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(pr,{className:"h-6 w-6 text-emerald-400"}),a.jsx("p",{className:"text-sm text-slate-300 max-w-xl",children:"The platform generates daily, weekly, monthly, and custom insight reports automatically. Journalists may quote highlights with attribution to Kenya Innovation Ecosystem."})]}),a.jsx(yt,{to:ot("Reports"),children:a.jsxs(Ne,{className:"gap-2 bg-emerald-600 hover:bg-emerald-700 shrink-0",children:["Browse all reports ",a.jsx(Lr,{className:"h-4 w-4"})]})})]})]})}function UCe(){const[e,t]=P.useState(!1),n="[email protected]",r=()=>{navigator.clipboard.writeText(n),t(!0),setTimeout(()=>t(!1),2e3)};return a.jsx("section",{className:"bg-slate-50 border-t border-slate-200",children:a.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-1",children:"Press Contact"}),a.jsx("p",{className:"text-slate-500 mb-8",children:"For interviews, demos, or additional information"}),a.jsx(Ee,{className:"border-slate-200 mb-6",children:a.jsx($e,{className:"p-6",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Founder & Intelligence Architect"}),a.jsx("p",{className:"text-lg font-semibold text-slate-900",children:"Haim Etkin"}),a.jsx("p",{className:"text-sm text-slate-600",children:"Strategic OSINT & Intelligence Integration"})]}),a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs(Ne,{onClick:r,variant:"outline",className:"gap-2",children:[e?a.jsx(Su,{className:"h-4 w-4 text-emerald-600"}):a.jsx(n0,{className:"h-4 w-4"}),e?"Email copied":n]}),a.jsx("a",{href:`mailto:${n}`,children:a.jsxs(Ne,{className:"gap-2 w-full bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(Nu,{className:"h-4 w-4"}),"Email the founder"]})})]})]})})}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs(Ee,{className:"border-slate-200",children:[a.jsx(tt,{children:a.jsxs(nt,{className:"text-base flex items-center gap-2",children:[a.jsx(ou,{className:"h-4 w-4 text-emerald-600"}),"Public Dashboard"]})}),a.jsxs($e,{className:"pt-0",children:[a.jsx("p",{className:"text-sm text-slate-600 mb-3",children:"Browse the live platform with full data on startups, investors, and government programs."}),a.jsx("a",{href:"https://kenya-innovation-ecosystem.base44.app",target:"_blank",rel:"noopener noreferrer",children:a.jsxs(Ne,{variant:"outline",size:"sm",className:"gap-2",children:["Open dashboard ",a.jsx(fa,{className:"h-3.5 w-3.5"})]})})]})]}),a.jsxs(Ee,{className:"border-slate-200",children:[a.jsx(tt,{children:a.jsxs(nt,{className:"text-base flex items-center gap-2",children:[a.jsx(ou,{className:"h-4 w-4 text-blue-600"}),"Multi-Country Solutions"]})}),a.jsxs($e,{className:"pt-0",children:[a.jsx("p",{className:"text-sm text-slate-600 mb-3",children:"Learn how the same engine deploys for any country or domain: agriculture, security, welfare, and more."}),a.jsx("a",{href:"https://kenya-innovation-ecosystem.base44.app/Solutions",target:"_blank",rel:"noopener noreferrer",children:a.jsxs(Ne,{variant:"outline",size:"sm",className:"gap-2",children:["View Solutions ",a.jsx(fa,{className:"h-3.5 w-3.5"})]})})]})]})]})]})})}function qCe(){return a.jsxs("div",{children:[a.jsx(SCe,{}),a.jsx(NCe,{}),a.jsx(CCe,{}),a.jsx(PCe,{}),a.jsx(ACe,{}),a.jsx(TCe,{}),a.jsx(LCe,{}),a.jsx($Ce,{}),a.jsx(FCe,{}),a.jsx(zCe,{}),a.jsx(UCe,{})]})}const HCe="Coverage & Media Monitor",S3={positive:"bg-emerald-100 text-emerald-700",neutral:"bg-slate-100 text-slate-600",negative:"bg-red-100 text-red-700"},N3={positive:GV,neutral:J3,negative:TW},C3={news:"bg-blue-100 text-blue-700",blog:"bg-purple-100 text-purple-700",social:"bg-pink-100 text-pink-700",report:"bg-amber-100 text-amber-700",directory:"bg-teal-100 text-teal-700",other:"bg-slate-100 text-slate-600"};function WCe(){const[e,t]=P.useState([]),[n,r]=P.useState(!0),[i,s]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState(null),[p,m]=P.useState(!0),[v,x]=P.useState(""),[w,b]=P.useState("all"),[_,j]=P.useState("all"),[C,E]=P.useState("all");P.useEffect(()=>{Q.auth.me().then(z=>h(z)).catch(()=>h(null)).finally(()=>m(!1)),M()},[]);const A=P.useMemo(()=>e.filter(z=>{if(w!=="all"&&z.mention_type!==w||_!=="all"&&z.sentiment!==_||C==="unread"&&z.is_read||C==="read"&&!z.is_read)return!1;if(v){const Z=v.toLowerCase();if(!`${z.title} ${z.publisher||""} ${z.snippet||""} ${z.author||""}`.toLowerCase().includes(Z))return!1}return!0}),[e,w,_,C,v]),k=P.useMemo(()=>({total:e.length,unread:e.filter(z=>!z.is_read).length,positive:e.filter(z=>z.sentiment==="positive").length,last7:e.filter(z=>
1332z.found_at&&Date.now()-new Date(z.found_at).getTime()<7*864e5).length}),[e]);if(p)return a.jsx(Mn,{message:"Checking access..."});if(!d||d.role!=="admin")return a.jsxs("div",{className:"max-w-md mx-auto py-20 px-4 text-center",children:[a.jsx(gO,{className:"h-12 w-12 text-slate-300 mx-auto mb-4"}),a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Admin Access Required"}),a.jsx("p",{className:"text-slate-500 mb-6",children:"Coverage monitoring is restricted to administrators."}),a.jsx(Ne,{onClick:()=>Q.auth.redirectToLogin("/Coverage"),children:"Sign in as admin"})]});async function M(){r(!0);try{const z=await Q.entities.CoverageMention.list("-found_at",100);t(z)}catch(z){console.error("Error loading coverage:",z)}finally{r(!1)}}async function I(){s(!0),c(null);try{const Z=(await Q.entities.Agent.filter({name:HCe}))[0];if(!Z){c({error:"Coverage agent not found. Create it in the Agent Console first."});return}await Q.entities.Agent.update(Z.id,{last_run_at:new Date().toISOString(),last_run_status:"running"});const ee=d8(Z),G=ee?await ee(Z):{items:[],approved:[],newEntities:0};await Q.entities.Agent.update(Z.id,{last_run_status:"success",last_run_items_found:G.items.length,last_run_items_approved:G.itemsApproved||0}),c({found:G.items.length,new:G.newEntities||0,approved:G.itemsApproved||0}),await M()}catch(z){console.error("Scan error:",z),c({error:z.message})}finally{s(!1)}}async function $(z){try{await Q.entities.CoverageMention.update(z.id,{is_read:!z.is_read}),t(Z=>Z.map(ee=>ee.id===z.id?{...ee,is_read:!z.is_read}:ee))}catch(Z){console.error("Toggle read failed:",Z)}}async function q(z){try{await Q.entities.CoverageMention.delete(z.id),t(Z=>Z.filter(ee=>ee.id!==z.id))}catch(Z){console.error("Delete failed:",Z)}}const V=["all","news","blog","social","report","directory","other"],H=["all","positive","neutral","negative"],U=["all","unread","read"];return a.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-2xl font-bold text-slate-900 flex items-center gap-2",children:[a.jsx(gO,{className:"h-6 w-6 text-emerald-600"}),"Coverage & Media Mentions"]}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Press coverage and mentions of the Kenya Innovation Ecosystem platform (admin only)"})]}),a.jsxs(Ne,{onClick:I,disabled:i,className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[i?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(Tv,{className:"h-4 w-4"}),i?"Scanning web...":"Scan Now"]})]}),o&&a.jsx("div",{className:`mb-4 rounded-xl border px-4 py-3 text-sm ${o.error?"bg-red-50 border-red-200 text-red-700":"bg-emerald-50 border-emerald-200 text-emerald-800"}`,children:o.error?`Scan failed: ${o.error}`:`Scan complete: ${o.found} mentions found, ${o.new} new saved${o.new===0?" (no new coverage since last scan)":""}.`}),a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[a.jsx(Ee,{children:a.jsxs($e,{className:"p-4",children:[a.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Total Mentions"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900 mt-1",children:k.total})]})}),a.jsx(Ee,{children:a.jsxs($e,{className:"p-4",children:[a.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Unread"}),a.jsx("p",{className:"text-2xl font-bold text-amber-600 mt-1",children:k.unread})]})}),a.jsx(Ee,{children:a.jsxs($e,{className:"p-4",children:[a.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Positive"}),a.jsx("p",{className:"text-2xl font-bold text-emerald-600 mt-1",children:k.positive})]})}),a.jsx(Ee,{children:a.jsxs($e,{className:"p-4",children:[a.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Found (7 days)"}),a.jsx("p",{className:"text-2xl font-bold text-blue-600 mt-1",children:k.last7})]})})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(hr,{className:"h-4 w-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2"}
1332),a.jsx(Wt,{value:v,onChange:z=>x(z.target.value),placeholder:"Search mentions...",className:"pl-9 w-64"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(r0,{className:"h-4 w-4 text-slate-400"}),V.map(z=>a.jsx(Ne,{size:"sm",variant:w===z?"default":"outline",onClick:()=>b(z),className:"capitalize",children:z},z))]}),a.jsx("div",{className:"flex items-center gap-1",children:H.map(z=>{const Z=N3[z];return a.jsxs(Ne,{size:"sm",variant:_===z?"default":"outline",onClick:()=>j(z),className:"gap-1 capitalize",children:[Z&&a.jsx(Z,{className:"h-3 w-3"}),z]},z)})}),a.jsx("div",{className:"flex items-center gap-1",children:U.map(z=>a.jsx(Ne,{size:"sm",variant:C===z?"default":"outline",onClick:()=>E(z),className:"capitalize",children:z},z))})]}),n?a.jsx(Mn,{message:"Loading coverage..."}):A.length===0?a.jsx(fr,{icon:qW,title:e.length===0?"No coverage tracked yet":"No matches",description:e.length===0?"Run a scan to find press mentions of the platform.":"Try adjusting the filters."}):a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:A.map(z=>{const Z=N3[z.sentiment]||J3;return a.jsx(Ee,{className:z.is_read?"opacity-70":"",children:a.jsxs($e,{className:"p-4",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx(Ce,{className:C3[z.mention_type]||C3.other,children:z.mention_type}),a.jsxs(Ce,{className:S3[z.sentiment]||S3.neutral,children:[a.jsx(Z,{className:"h-3 w-3 mr-1"}),z.sentiment]}),z.confidence==="High"&&a.jsx(Ce,{variant:"outline",className:"text-emerald-700 border-emerald-300",children:"High confidence"}),!z.is_read&&a.jsx(Ce,{className:"bg-amber-100 text-amber-700",children:"New"})]}),a.jsx("span",{className:"text-xs text-slate-400 shrink-0",children:(()=>{const ee=z.published_date?new Date(z.published_date):null,G=z.found_at?new Date(z.found_at):null;return ee&&!isNaN(ee)?Tt(ee,"MMM d, yyyy"):G&&!isNaN(G)?`Found ${Tt(G,"MMM d")}`:""})()})]}),a.jsx("a",{href:z.url,target:"_blank",rel:"noopener noreferrer",className:"block",children:a.jsxs("h3",{className:"font-semibold text-slate-900 hover:text-emerald-700 flex items-center gap-1",children:[z.title,a.jsx(fa,{className:"h-3.5 w-3.5 text-slate-400"})]})}),z.publisher&&a.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:[z.publisher,z.author?` - ${z.author}`:""]}),z.snippet&&a.jsx("p",{className:"text-sm text-slate-600 mt-2 line-clamp-3",children:z.snippet}),a.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t border-slate-100",children:[a.jsx(Ne,{size:"sm",variant:"ghost",onClick:()=>$(z),className:"gap-1",children:z.is_read?a.jsxs(a.Fragment,{children:[a.jsx(wW,{className:"h-3.5 w-3.5"})," Mark unread"]}):a.jsxs(a.Fragment,{children:[a.jsx(Av,{className:"h-3.5 w-3.5"})," Mark read"]})}),a.jsx(Ne,{size:"sm",variant:"ghost",onClick:()=>q(z),className:"gap-1 text-red-600 hover:text-red-700 hover:bg-red-50",children:"Remove"}),a.jsx("a",{href:z.url,target:"_blank",rel:"noopener noreferrer",className:"ml-auto",children:a.jsxs(Ne,{size:"sm",variant:"outline",className:"gap-1",children:[a.jsx(fa,{className:"h-3.5 w-3.5"})," Open"]})})]})]})},z.id)})})]})}function VCe({score:e,breakdown:t}){const n=e>=75?"text-emerald-600":e>=50?"text-amber-600":"text-red-600",r=e>=75?"#10b981":e>=50?"#f59e0b":"#ef4444",i=2*Math.PI*52,s=i-e/100*i,o=[{label:"Data Freshness",value:t.freshness,icon:Jx},{label:"Verification Coverage",value:t.verification,icon:ha},{label:"Coverage Breadth",value:t.coverage,icon:ca},{label:"Agent Health",value:t.agentHealth,icon:Oi}];return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(ha,{className:"h-5 w-5 text-emerald-600"}),"Ecosystem Health Score"]})}),a.jsxs($e,{children:[a.jsxs("div",{className:"flex flex-col items-center mb-5",children:[a.jsxs("div",{className:"relative w-32 h-32",children:[a.jsxs("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 120 120",children:[a.jsx("circle",{cx:"60",cy:"60",r:"52",fill:"none",stroke:"#e2e8f0",strokeWidth:"10"}),a.jsx("circle",{cx:"60",cy:"60",r:"52",fill:"none",stroke:r,strokeWidth:"10",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:s,className:"transition-all duration-700"})]}),a.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[a.jsx("span",{className:`text-3xl font-bold ${n}`,children:e}),a.jsx("span",{className:"text-xs text-slate-400",children:"/ 100"})]})]}),a.jsx("p",{className:"text-xs text-slate-500 mt-2 text-center",children:"Composite of freshness, verification, coverage and agent health"})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:o.map(c=>a.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-slate-50 px-3 py-2",children:[a.jsx(c.icon,{className:"h-4 w-4 text-slate-500 shrink-0"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-xs text-slate-500 truncate",children:c.label}),a.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[c.value,"%"]})]})]},c.label))})]})]})}function KCe({current90:e,prior90:t,deals90:n,topDeals:r}){const i=t>0?Math.round((e-t)/t*100):e>0?100:0,s=i>=0,o=d=>d>=1e6?`$${(d/1e6).toFixed(1)}M`:d>=1e3?`$${(d/1e3).toFixed(0)}K`:`$${d||0}`,c=n>0?e/n:0;return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(jK,{className:"h-5 w-5 text-amber-600"}),"Funding Velocity (90 days)"]})}),a.jsxs($e,{children:[a.jsxs("div",{className:"flex items-end justify-between mb-4",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-3xl font-bold text-slate-900",children:o(e)}),a.jsxs("p",{className:"text-xs text-slate-500",children:["across ",n," deals (avg ",o(c),")"]})]}),a.jsxs("div",{className:`flex items-center gap-1 text-sm font-medium ${s?"text-emerald-600":"text-red-500"}`,children:[s?a.jsx(pr,{className:"h-4 w-4"}):a.jsx(Hm,{className:"h-4 w-4"}),s?"+":"",i,"% vs prior 90d"]}
1332)]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Top recent deals"}),r.length===0?a.jsx("p",{className:"text-sm text-slate-400 py-2 text-center",children:"No funded deals in the last 90 days"}):r.slice(0,4).map((d,h)=>{var p,m;return a.jsxs("div",{className:"flex items-center justify-between gap-2 bg-slate-50 rounded-lg px-3 py-2",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-900 truncate",children:((m=(p=d.entities_involved)==null?void 0:p[0])==null?void 0:m.entity_name)||d.title}),a.jsxs("p",{className:"text-xs text-slate-500",children:[d.funding_round||"Funding"," - ",d.event_date?Tt(new Date(d.event_date),"MMM d"):"N/A"]})]}),a.jsx(Ce,{className:"bg-emerald-100 text-emerald-700 shrink-0",children:o(d.amount_usd)})]},h)})]})]})]})}function GCe({newEntities30:e,sectorMomentum:t,govAiAdoption:n,govPrograms:r}){return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(Up,{className:"h-5 w-5 text-emerald-600"}),"Innovation Pulse"]})}),a.jsxs($e,{children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[a.jsxs("div",{className:"rounded-xl bg-emerald-50 border border-emerald-100 p-3",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-emerald-100 text-emerald-600",children:a.jsx(Up,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:"New entities (30d)"})]}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e})]}),a.jsxs("div",{className:"rounded-xl bg-blue-50 border border-blue-100 p-3",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-100 text-blue-600",children:a.jsx(lf,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:"Gov AI adoption"})]}),a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[n,"%"]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide flex items-center gap-1",children:[a.jsx(qN,{className:"h-3 w-3"})," Sector momentum (30d)"]}),t.length===0?a.jsx("p",{className:"text-sm text-slate-400 py-2 text-center",children:"No new entries this period"}):t.slice(0,5).map(i=>{var s;return a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"text-sm text-slate-700 truncate",children:i.sector}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsx("div",{className:"w-24 h-1.5 bg-slate-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-emerald-500 rounded-full",style:{width:`${Math.min(100,i.count/(((s=t[0])==null?void 0:s.count)||1)*100)}%`}})}),a.jsx("span",{className:"text-sm font-semibold text-slate-900 w-6 text-right",children:i.count})]})]},i.sector)})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-4 pt-3 border-t border-slate-100 text-xs text-slate-500",children:[a.jsx(Ti,{className:"h-3.5 w-3.5"}),r," government institutions tracked"]})]})]})}function ZCe({insights:e,events:t}){const n=[...e.map(r=>({type:"insight",title:r.title,summary:r.summary,date:r.insight_date,category:r.category,url:r.source_url})),...t.map(r=>({type:"event",title:r.title,summary:r.summary,date:r.event_date,category:r.event_type,url:r.source_url}))].sort((r,i)=>new Date(i.date||0)-new Date(r.date||0)).slice(0,6);return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(W3,{className:"h-5 w-5 text-emerald-600"}),"Intelligence Feed"]})}),a.jsx($e,{children:n.length===0?a.jsx("p",{className:"text-sm text-slate-400 py-6 text-center",children:"No recent intelligence captured"}):a.jsx("div",{className:"space-y-3",children:n.map((r,i)=>a.jsxs("div",{className:"border-l-2 border-emerald-200 pl-3 py-1",children:[a.jsx("div",{className:"flex items-start justify-between gap-2",children:a.jsx("h4",{className:"text-sm font-medium text-slate-900",children:r.title})}),a.jsx("p",{className:"text-xs text-slate-500 mt-0.5 line-clamp-2",children:r.summary}),a.jsxs("div",{className:"flex items-center gap-3 mt-1.5 text-xs text-slate-400",children:[a.jsx(Ce,{variant:"outline",className:"text-xs px-1.5 py-0",children:r.category||"general"}),r.date&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(ho,{className:"h-3 w-3"}),Tt(new Date(r.date),"MMM d")]}),r.url&&/^https?:\/\/\S+$/i.test(r.url)&&r.url!=="N/A"&&a.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:text-emerald-600",children:[a.jsx(fa,{className:"h-3 w-3"})," source"]})]})]},i))})})]})}function YCe({openIssues:e,pendingVerifications:t,tierDist:n,staleCount:r,dupCount:i}){const s=n.A+n.B+n.C||1,o=Math.round((n.A+n.B)/s*100),c=[{label:"Open data quality issues",value:e,icon:po,color:e>0?"text-amber-600":"text-emerald-600"},{label:"Pending verifications",value:t,icon:Bn,color:t>0?"text-blue-600":"text-emerald-600"},{label:"Stale records",value:r,icon:po,color:r>10?"text-amber-600":"text-emerald-600"},{label:"Duplicate groups",value:i,icon:RW,color:i>0?"text-amber-600":"text-emerald-600"}];return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsx(tt,{className:"pb-2",children:a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(ha,{className:"h-5 w-5 text-emerald-600"}),"Data Integrity"]})}),a.jsxs($e,{children:[a.jsxs("div",{className:"flex items-center justify-between rounded-xl bg-slate-50 p-3 mb-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500",children:"Verified coverage (Tier A+B)"}),a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[o,"%"]})]}),a.jsxs("div",{className:"flex gap-1.5",children:[a.jsxs(Ce,{className:"bg-emerald-100 text-emerald-700",children:["A: ",n.A]}),a.jsxs(Ce,{className:"bg-blue-100 text-blue-700",children:["B: ",n.B]}),a.jsxs(Ce,{className:"bg-slate-100 text-slate-600",children:["C: ",n.C]})]})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:c.map(d=>a.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-slate-100 px-3 py-2",children:[a.jsx(d.icon,{className:`h-4 w-4 ${d.color} shrink-0`}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500",children:d.label}),a.jsx("p",{className:"text-sm font-semibold text-slate-900",children:d.value})]})]},d.label))})]})]})}const XCe=FF,QCe=BF,_q=P.forwardRef(({className:e,...t},n)=>a.jsx(b0,{className:ze("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));_q.displayName=b0.displayName;const JCe=zm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),wq=P.forwardRef(({side:e="right",className:t,children:n,...r},i)=>a.jsxs(QCe,{children:[a.jsx(_q,{}),a.jsxs(_0,{ref:i,className:ze(JCe({side:e}),t),...r,children:[a.jsxs(zF,{className:"absolute right-4 top-4 roun
1332ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsx(xo,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));wq.displayName=_0.displayName;const jq=({className:e,...t})=>a.jsx("div",{className:ze("flex flex-col space-y-2 text-center sm:text-left",e),...t});jq.displayName="SheetHeader";const Sq=P.forwardRef(({className:e,...t},n)=>a.jsx(w0,{ref:n,className:ze("text-lg font-semibold text-foreground",e),...t}));Sq.displayName=w0.displayName;const Nq=P.forwardRef(({className:e,...t},n)=>a.jsx(j0,{ref:n,className:ze("text-sm text-muted-foreground",e),...t}));Nq.displayName=j0.displayName;const Ud=e=>!e&&e!==0?"-":e>=1e9?`$${(e/1e9).toFixed(1)}B`:e>=1e6?`$${(e/1e6).toFixed(0)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`,eEe=({trend:e})=>e==="up"?a.jsx(pr,{className:"h-4 w-4 text-emerald-600"}):e==="down"?a.jsx(Hm,{className:"h-4 w-4 text-rose-500"}):e==="stable"?a.jsx(Ov,{className:"h-4 w-4 text-slate-400"}):a.jsx(Ov,{className:"h-4 w-4 text-slate-300"}),xp=[{id:"fintech",label:"Fintech",color:"#8b5cf6"}
1332,{id:"infrastructure",label:"Infrastructure",color:"#f59e0b"},{id:"energy",label:"Energy",color:"#f97316"},{id:"health",label:"Health",color:"#f43f5e"},{id:"education",label:"Education",color:"#6366f1"},{id:"agriculture",label:"Agriculture",color:"#22c55e"},{id:"ict_digital",label:"ICT & Digital",color:"#3b82f6"},{id:"manufacturing",label:"Manufacturing",color:"#64748b"},{id:"tourism",label:"Tourism",color:"#14b8a6"},{id:"climate_sustainability",label:"Climate & Sustainability",color:"#10b981"},{id:"wildlife_conservation",label:"Wildlife & Conservation",color:"#84cc16"}],tEe={high:e=>e,medium:e=>e+"cc",low:e=>e+"66",emerging:e=>e+"33",none:()=>"#f1f5f9"},nEe={high:"text-white",medium:"text-white",low:"text-slate-700",emerging:"text-slate-600",none:"text-slate-400"},Pv={high:"High",medium:"Medium",low:"Low",emerging:"Emerging",none:"None"};function rEe({country:e,topic:t}){const n=(e.dimensions||{})[t.id],r=(n==null?void 0:n.level)||"none",i=tEe[r](t.color),[s,o]=P.useState(!1);return a.jsxs("div",{className:"relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[a.jsx("div",{className:`w-full h-9 rounded-md flex items-center justify-center text-[10px] font-medium ${nEe[r]} cursor-default transition-transform hover:scale-105`,style:{backgroundColor:i},title:`${t.label}: ${Pv[r]}${n!=null&&n.funding_usd?" - "+Ud(n.funding_usd):""}${n!=null&&n.note?" - "+n.note:""}`,children:r!=="none"?Pv[r][0]:""}),s&&r!=="none"&&a.jsxs("div",{className:"absolute z-20 bottom-full mb-1 left-1/2 -translate-x-1/2 w-44 p-2 rounded-lg bg-slate-900 text-white text-xs shadow-lg pointer-events-none",children:[a.jsx("p",{className:"font-semibold",children:t.label}),a.jsxs("p",{children:["Level: ",Pv[r]]}),n!=null&&n.funding_usd?a.jsxs("p",{children:["Funding: ",Ud(n.funding_usd)]}):null,n!=null&&n.note?a.jsx("p",{className:"text-slate-300 mt-1 leading-snug",children:n.note}):null]})]})}function iEe(){var p,m,v,x,w;const[e,t]=P.useState(null),[n,r]=P.useState(!0),[i,s]=P.useState(null);P.useEffect(()=>{o()},[]);const o=async()=>{try{const _=(await Q.entities.RegionalBenchmark.list("-benchmark_date",8).catch(()=>[])).filter(Tae);t(_[0]||null)}catch{}r(!1)},c=P.useMemo(()=>e?(e.countries||[]).slice().sort((b,_)=>(_.total_funding_usd||0)-(b.total_funding_usd||0)):[],[e]);if(n)return a.jsx(Mn,{message:"Loading Africa benchmark..."});if(!e)return a.jsxs(Ee,{children:[a.jsxs(tt,{children:[a.jsxs(nt,{className:"flex items-center gap-2",children:[a.jsx(ca,{className:"h-5 w-5 text-emerald-600"})," Africa Regional Benchmark"]}),a.jsx(di,{children:"Kenya vs leading African innovation ecosystems"})]}),a.jsx($e,{children:a.jsx(fr,{icon:ca,title:"No benchmark yet",description:"Run the Regional Benchmarking Agent from the Agent Console to generate a continental comparison."})})]});const d=c.map(b=>({name:b.name,funding:Math.round((b.total_funding_usd||0)/1e6)})),h=b=>/kenya/i.test(b||"");return a.jsxs(Ee,{children:[a.jsx(tt,{children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[a.jsxs("div",{children:[a.jsxs(nt,{className:"flex items-center gap-2",children:[a.jsx(ca,{className:"h-5 w-5 text-emerald-600"})," Africa Regional Benchmark"]}),a.jsxs(di,{children:["Kenya vs leading African innovation ecosystems - ",e.period_label||e.benchmark_date," - ",c.length," countries"]})]}),e.kenya_rank&&a.jsxs(Ce,{className:"bg-emerald-600 text-white gap-1 text-sm py-1",children:[a.jsx(r$,{className:"h-4 w-4"})," Kenya ranks #",e.kenya_rank]})]})}),a.jsxs($e,{children:[e.continental_summary&&a.jsx("p",{className:"text-sm text-slate-600 mb-4 leading-relaxed",children:e.continental_summary}),a.jsx("div",{className:"h-56 mb-6",children:a.jsx(go,{width:"100%",height:"100%",children:a.jsxs(Bf,{data:d,margin:{top:4,right:8,left:-8,bottom:40},children:[a.jsx(Bl,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(Ba,{dataKey:"name",angle:-35,textAnchor:"end",interval:0,tick:{fontSize:11,fill:"#64748b"}}),a.jsx(za,{tick:{fontSize:11,fill:"#64748b"},tickFormatter:b=>`$${b}M`}),a.jsx(cr,{formatter:b=>[Ud(b*1e6),"Funding"],contentStyle:{borderRadius:8,fontSize:12}}),a.jsx(Fi,{dataKey:"funding",radius:[4,4,0,0],children:d.map((b,_)=>a.jsx(xu,{fill:h(b.name)?"#059669":"#cbd5e1"},_))})]})})}),a.jsx("div",{className:"overflow-x-auto -mx-2 mb-6",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"text-left text-xs text-slate-500 border-b border-slate-200",children:[a.jsx("th",{className:"py-2 px-2 font-medium",children:"#"}),a.jsx("th",{className:"py-2 px-2 font-medium",children:"Country"}),a.jsx("th",{className:"py-2 px-2 font-medium text-right",children:"Startups"}),a.jsx("th",{className:"py-2 px-2 font-medium text-right",children:"Funding"}),a.jsx("th",{className:"py-2 px-2 font-medium text-right",children:"Deals"}),a.jsx("th",{className:"py-2 px-2 font-medium text-right",children:"Unicorns"}),a.jsx("th",{className:"py-2 px-2 font-medium text-center",children:"Trend"}),a.jsx("th",{className:"py-2 px-2 font-medium",children:"Top sectors"})]})}),a.jsx("tbody",{children:c.map((b,_)=>{var j;return a.jsxs("tr",{className:`border-b border-slate-100 ${h(b.name)?"bg-emerald-50":""}`,children:[a.jsx("td",{className:"py-2 px-2 text-slate-400",children:_+1}),a.jsx("td",{className:"py-2 px-2 font-medium text-slate-800",children:b.name}),a.jsx("td",{className:"py-2 px-2 text-right text-slate-600",children:((j=b.startup_count)==null?void 0:j.toLocaleStr
1332ing())||"-"}),a.jsx("td",{className:"py-2 px-2 text-right font-semibold text-slate-800",children:Ud(b.total_funding_usd)}),a.jsx("td",{className:"py-2 px-2 text-right text-slate-600",children:b.deals_count||"-"}),a.jsx("td",{className:"py-2 px-2 text-right text-slate-600",children:b.unicorn_count??"-"}),a.jsx("td",{className:"py-2 px-2 text-center",children:a.jsx(eEe,{trend:b.growth_trend})}),a.jsx("td",{className:"py-2 px-2 text-xs text-slate-500",children:(b.top_sectors||[]).slice(0,3).join(", ")})]},b.name+_)})})]})}),a.jsxs("div",{className:"mt-6 pt-4 border-t border-slate-100",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3 flex-wrap gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(aw,{className:"h-4 w-4 text-slate-600"}),a.jsx("h4",{className:"text-sm font-semibold text-slate-800",children:"Investment & Development Dimensions"})]}),a.jsx("p",{className:"text-xs text-slate-400",children:"Hover a cell for detail - click a country for the full breakdown"})]}),a.jsxs("div",{className:"flex flex-wrap gap-3 mb-3 text-xs",children:[xp.map(b=>a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:b.color}}),a.jsx("span",{className:"text-slate-600",children:b.label})]},b.id)),a.jsxs("div",{className:"flex items-center gap-1.5 ml-auto",children:[a.jsx("span",{className:"text-slate-400",children:"Intensity:"}),a.jsx("span",{className:"text-slate-500",children:"High"}),a.jsx("span",{className:"w-3 h-3 rounded-sm bg-slate-800"}),a.jsx("span",{className:"w-3 h-3 rounded-sm bg-slate-500"}),a.jsx("span",{className:"w-3 h-3 rounded-sm bg-slate-300"}),a.jsx("span",{className:"text-slate-500",children:"Low/Emerging"})]})]}),a.jsx("div",{className:"overflow-x-auto -mx-2",children:a.jsxs("table",{className:"w-full border-collapse",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"sticky left-0 bg-white z-10 py-2 px-2 text-left text-xs font-medium text-slate-500 min-w-[120px]",children:"Country"}),xp.map(b=>a.jsx("th",{className:"py-2 px-1 text-center text-[10px] font-medium text-slate-500 min-w-[56px]",title:b.label,children:a.jsxs("div",{className:"flex flex-col items-center gap-1",children:[a.jsx("span",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:b.color}}),a.jsx("span",{className:"truncate max-w-[52px]",children:b.label.split(" ")[0]})]})},b.id)),a.jsx("th",{className:"py-2 px-2 text-center text-xs font-medium text-slate-500",children:"Details"})]})}),a.jsx("tbody",{children:c.map((b,_)=>a.jsxs("tr",{className:h(b.name)?"bg-emerald-50/40":"",children:[a.jsx("td",{className:`sticky left-0 z-10 py-1.5 px-2 text-sm font-medium ${h(b.name)?"bg-emerald-50 text-emerald-800":"bg-white text-slate-800"}`,children:b.name}),xp.map(j=>a.jsx("td",{className:"py-1 px-1",children:a.jsx(rEe,{country:b,topic:j})},j.id)),a.jsx("td",{className:"py-1.5 px-2 text-center",children:a.jsxs(Ne,{variant:"ghost",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>s(b),children:[a.jsx(aw,{className:"h-3 w-3"})," View"]})})]},b.name+_))})]})}),a.jsx("div",{className:"mt-3 p-2.5 rounded-md bg-slate-50 border border-slate-200",children:a.jsxs("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:[a.jsx("strong",{className:"text-slate-600",children:"Disclosure:"})," Source reports are real, verified documents (industry reports from Disrupt Africa, TechCabal, AVCA, etc.) and pass mechanical HTTP validation. The per-cell intensity levels (High / Medium / Low / Emerging) are AI classifications derived from those source reports, not figures quoted directly from them. Treat the matrix as intelligence-grade, source-grounded AI analysis - not as audited primary data."]})})]}),(()=>{const b=(e.source_urls||[]).filter(ws);return b.length===0?null:a.jsxs("div",{className:"mt-4 pt-3 border-t border-slate-100",children:[a.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Sources"}),a.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:b.slice(0,6).map((_,j)=>a.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-emerald-700 hover:underline truncate max-w-[220px]",children:_.replace(/^https?:\/\//,"").slice(0,40)},j))})]})})()]}),a.jsx(XCe,{open:!!i,onOpenChange:b=>!b&&s(null),children:a.jsxs(wq,{className:"w-full sm:max-w-md overflow-y-auto",children:[a.jsxs(jq,{children:[a.jsxs(Sq,{className:"flex items-center gap-2",children:[a.jsx(aw,{className:"h-5 w-5 text-emerald-600"}),i==null?void 0:i.name," - Development Breakdown"]}),a.jsxs(Nq,{children:["Investment and development activity across ",xp.length," dimensions."]})]}),i&&a.jsxs("div",{className:"px-4 pb-6 space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[a.jsxs("div",{className:"p-2 rounded-lg bg-slate-50",children:[a.jsx("p",{className:"text-xs text-slate-500",children:"Total Funding"}),a.jsx("p",{className:"font-semibold text-slate-800",children:Ud(i.total_funding_usd)})]}),a.jsxs("div",{className:"p-2 rounded-lg bg-slate-50",children:[a.jsx("p",{className:"text-xs text-slate-500",children:"Startups"}),a.jsx("p",{className:"font-semibold text-slate-800",children:((p=i.startup_count)==null?void 0:p.toLocaleStr
1332ing())||"-"})]}),a.jsxs("div",{className:"p-2 rounded-lg bg-slate-50",children:[a.jsx("p",{className:"text-xs text-slate-500",children:"Deals"}),a.jsx("p",{className:"font-semibold text-slate-800",children:i.deals_count||"-"})]}),a.jsxs("div",{className:"p-2 rounded-lg bg-slate-50",children:[a.jsx("p",{className:"text-xs text-slate-500",children:"Growth"}),a.jsx("p",{className:"font-semibold text-slate-800 capitalize",children:i.growth_trend||"unknown"})]})]}),(((m=i.flagship_companies)==null?void 0:m.length)>0||((v=i.top_sectors)==null?void 0:v.length)>0)&&a.jsxs("div",{className:"space-y-2",children:[((x=i.top_sectors)==null?void 0:x.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-500 mb-1",children:"Top Sectors"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:i.top_sectors.map((b,_)=>a.jsx(Ce,{variant:"outline",className:"text-xs",children:b},_))})]}),((w=i.flagship_companies)==null?void 0:w.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-500 mb-1",children:"Flagship Companies"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:i.flagship_companies.map((b,_)=>a.jsx(Ce,{className:"text-xs bg-slate-100 text-slate-700",children:b},_))})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-500 mb-2",children:"Dimension Database"}),a.jsx("div",{className:"space-y-1.5",children:xp.map(b=>{const _=(i.dimensions||{})[b.id]||{},j=_.level||"none";return a.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-lg border border-slate-200",children:[a.jsx("span",{className:"w-3 h-3 rounded-sm mt-0.5 shrink-0",style:{backgroundColor:j==="none"?"#f1f5f9":b.color}}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800",children:b.label}),a.jsx(Ce,{variant:"outline",className:`text-xs ${j==="none"?"text-slate-400":"text-slate-700"}`,children:Pv[j]})]}),_.funding_usd?a.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["Funding: ",Ud(_.funding_usd)]}):null,_.note?a.jsx("p",{className:"text-xs text-slate-500 mt-0.5 leading-snug",children:_.note}):null]})]},b.id)})})]}),i.notes&&a.jsxs("div",{className:"p-3 rounded-lg bg-amber-50 border border-amber-200",children:[a.jsx("p",{className:"text-xs font-medium text-amber-700 mb-0.5",children:"Context"}),a.jsx("p",{className:"text-xs text-amber-800",children:i.notes})]})]})]})})]})}const aEe={ipo:"bg-emerald-100 text-emerald-700",rights_issue:"bg-blue-100 text-blue-700",listing:"bg-teal-100 text-teal-700",bond_issue:"bg-indigo-100 text-indigo-700",earnings:"bg-slate-100 text-slate-700",profit_warning:"bg-amber-100 text-amber-700",dividend:"bg-violet-100 text-violet-700",board_change:"bg-slate-100 text-slate-700",share_buyback:"bg-cyan-100 text-cyan-700",suspension:"bg-rose-100 text-rose-700",delisting:"bg-rose-100 text-rose-700"},sEe=e=>!e||e<=0?null:e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${e}`;function oEe(){const[e,t]=P.useState("capital_markets"),[n,r]=P.useState([]),[i,s]=P.useState(!0);P.useEffect(()=>{let h=!0;return(async()=>{try{const[p,m]=await Promise.all([Q.entities.EcosystemInsight.filter({category:"capital_markets"},"-insight_date",50).catch(()=>[]),Q.entities.EcosystemInsight.filter({category:"macro_economic"},"-insight_date",50).catch(()=>[])]);if(!h)return;const v=x=>Q2(x).filter(w=>!w.is_merged_duplicate);r({capital_markets:v(p),macro_economic:v(m)})}catch(p){console.error("CapitalMarketsWidget load error:",p)}finally{h&&s(!1)}})(),()=>{h=!1}},[]);const o=(n.capital_markets||[]).slice(0,6),c=(n.macro_economic||[]).slice(0,6),d=e==="capital_markets"?o:c;return a.jsxs(Ee,{className:"bg-white border-0 shadow-sm",children:[a.jsxs(tt,{className:"pb-3",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs(nt,{className:"text-lg font-semibold flex items-center gap-2",children:[a.jsx(Ti,{className:"h-5 w-5 text-stone-600"}),"Capital Markets & Economic Press"]}),a.jsxs(yt,{to:ot("Insights"),className:"flex items-center gap-1 text-xs text-emerald-600 hover:text-emerald-700 font-medium shrink-0",children:["All insights ",a.jsx(Lr,{className:"h-3 w-3"})]})]}),a.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[a.jsxs("button",{onClick:()=>t("capital_markets"),className:ze("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",e==="capital_markets"?"bg-stone-100 text-stone-800 border border-stone-200":"text-slate-500 hover:bg-slate-50"),children:[a.jsx(Ti,{className:"h-3.5 w-3.5"}),"Capital Markets (",(n.capital_markets||[]).length,")"]}),a.jsxs("button",{onClick:()=>t("macro_economic"),className:ze("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors",e==="macro_economic"?"bg-amber-100 text-amber-800 border border-amber-200":"text-slate-500 hover:bg-slate-50"),children:[a.jsx(V3,{className:"h-3.5 w-3.5"}),"Macro-Economic (",(n.macro_economic||[]).length,")"]})]})]}),a.jsx($e,{children:i?a.jsx("div",{className:"py-8 flex items-center justify-center",children:a.jsx("div",{className:"w-5 h-5 border-2 border-slate-200 border-t-stone-500 rounded-full animate-spin"})}):d.length===0?a.jsxs("p",{className:"text-sm text-slate-400 py-6 text-center",children:["No ",e==="capital_markets"?"exchange disclosures":"economic press stories"," captured yet. Run the Capital Markets / Economic Press agents from the Agent Console."]}):a.jsx("div",{className:"space-y-3",children:d.map(h=>{var x,w,b;const p=(x=h.details)==null?void 0:x.disclosure_type,m=aEe[p]||"bg-slate-100 text-slate-700",v=sEe((w=h.details)==null?void 0:w.amount_usd);return a.jsxs("div",{className:"border-l-2 border-stone-200 pl-3 py-1",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("h4",{className:"text-sm font-medium text-slate-900 leading-tight line-clamp-2",children:h.title}),v&&a.jsx(Ce,{variant:"outline",className:"text-xs shrink-0 font-semibold",children:v})]}),a.jsx("p",{className:"text-xs text-slate-500 mt-0.5 line-clamp-2",children:h.summary}),a.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[p&&a.jsx(Ce,{className:ze("text-xs px-1.5 py-0",m),children:p.replace("_"," ")}),((b=h.details)==null?void 0:b.exchange)&&a.jsx(Ce,{variant:"outline",className:"text-xs px-1.5 py-0",children:h.details.exchange}),h.related_entity_name&&a.jsx("span",{className:"text-xs text-slate-600 font-medium truncate max-w-[140px]",children:h.related_entity_name}),h.insight_date&&a.jsx("span",{className:"text-xs text-slate-400",children:Tt(new Date(h.insight_date),"MMM d")}),h.source_url&&/^https?:\/\//i.test(h.source_url)&&a.jsxs("a",{href:h.source_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-emerald-600 hover:text-emerald-700 ml-auto",children:["source ",a.jsx(fa,{className:"h-3 w-3"})]})]})]}
1332,h.id)})})})]})}function lEe(){const[e,t]=P.useState(!0),[n,r]=P.useState(null);P.useEffect(()=>{i()},[]);const i=async()=>{try{const[s,o,c,d,h,p,m,v,x,w]=await Promise.all([Q.entities.Startup.list().catch(()=>[]),Q.entities.Investor.list().catch(()=>[]),Q.entities.GovProgram.list().catch(()=>[]),Q.entities.GovProgram.list().catch(()=>[]),Q.entities.EcosystemEvent.list("-event_date",200).catch(()=>[]),Q.entities.EcosystemInsight.list("-insight_date",30).catch(()=>[]),Q.entities.DataQualityIssue.filter({status:"open"}).catch(()=>[]),Q.entities.VerificationRequest.filter({status:"pending"}).catch(()=>[]),Q.entities.AgentRun.list("-started_at",30).catch(()=>[]),Q.entities.Agent.list().catch(()=>[])]),b=await Q.entities.RegionalBenchmark.list("-benchmark_date",1).catch(()=>[]),_=new Date,j=90*864e5,C=30*864e5,E=new Date(_-j),A=new Date(_-C),k=new Date(_-180*864e5),M=h.filter(ge=>ge.event_type==="Funding"&&ge.amount_usd&&ge.event_date),I=M.filter(ge=>new Date(ge.event_date)>=E).reduce((ge,Be)=>ge+Be.amount_usd,0),$=M.filter(ge=>{const Be=new Date(ge.event_date);return Be>=new Date(_-180*864e5)&&Be<E}).reduce((ge,Be)=>ge+Be.amount_usd,0),q=M.filter(ge=>new Date(ge.event_date)>=E).length,V=M.filter(ge=>new Date(ge.event_date)>=E).sort((ge,Be)=>Be.amount_usd-ge.amount_usd).slice(0,4),H=[...s,...o,...c],U=H.length||1,z=H.filter(ge=>ge.last_seen_at&&new Date(ge.last_seen_at)>=E).length,Z=Math.round(z/U*100),ee=H.filter(ge=>ge.reliability_tier==="A").length,G=H.filter(ge=>ge.reliability_tier==="B").length,oe=Math.round((ee+G)/U*100),W=new Set(s.map(ge=>ge.sector).filter(Boolean)),ie=Math.round(W.size/12*100),ae=x.filter(ge=>ge.started_at&&new Date(ge.started_at)>=A),K=ae.filter(ge=>ge.status==="success"||ge.status==="partial"),ne=ae.length>0?Math.round(K.length/ae.length*100):0,ve=Math.round((Z+oe+ie+ne)/4),je=H.filter(ge=>ge.created_date&&new Date(ge.created_date)>=A).length,Y=s.filter(ge=>ge.created_date&&new Date(ge.created_date)>=A&&ge.sector).reduce((ge,Be)=>(ge[Be.sector]=(ge[Be.sector]||0)+1,ge),{}),he=Object.entries(Y).map(([ge,Be])=>({sector:ge,count:Be})).sort((ge,Be)=>Be.count-ge.count),fe=d.filter(ge=>ge.ai_initiatives).length,_e=d.length>0?Math.round(fe/d.length*100):0,de=Q2(p).slice(0,8),we=h.filter(ge=>(ge.status==="APPROVED_ALPHA"||ge.status==="APPROVED_ACTOR"||ge.reliability_tier==="A")&&ge.source_url&&/^https?:\/\//i.test(ge.source_url)).slice(0,8),ke={A:ee,B:G,C:H.filter(ge=>ge.reliability_tier==="C").length},re=H.filter(ge=>!ge.last_seen_at||new Date(ge.last_seen_at)<k).length,Re=m.filter(ge=>ge.issue_type==="duplicate").length;r({healthScore:ve,breakdown:{freshness:Z,verification:oe,coverage:ie,agentHealth:ne},funding:{current90:I,prior90:$,deals90:q,topDeals:V},pulse:{newEntities30:je,sectorMomentum:he,govAiAdoption:_e,govPrograms:d.length},intel:{insights:de,events:we},integrity:{openIssues:m.length,pendingVerifications:v.length,tierDist:ke,staleCount:re,dupCount:Re},agents:w.filter(ge=>ge.enabled).length,benchmark:b[0]||null})}catch(s){console.error("Executive dashboard error:",s)}finally{t(!1)}};return e||!n?a.jsx("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsx(Mn,{message:"Loading executive intelligence..."})}):a.jsxs("div",{className:"max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500 mb-2",children:[a.jsx(Jx,{className:"h-4 w-4 text-emerald-600"}),"Executive view - decision-grade summary"]}),a.jsx("h1",{className:"text-3xl font-bold text-slate-900 tracking-tight",children:"Innovation Pulse"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Ecosystem health, funding velocity and intelligence at a glance"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(yt,{to:ot("Home"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2",children:["Full Dashboard ",a.jsx(Lr,{className:"h-4 w-4"})]})}),a.jsx(yt,{to:ot("Reports"),children:a.jsxs(Ne,{className:"bg-emerald-600 hover:bg-emerald-700 gap-2",children:[a.jsx(Fr,{className:"h-4 w-4"})," Get Report"]})})]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6",children:[a.jsx(VCe,{score:n.healthScore,breakdown:n.breakdown}),a.jsx(KCe,{current90:n.funding.current90,prior90:n.funding.prior90,deals90:n.funding.deal
1332s90,topDeals:n.funding.topDeals}),a.jsx(YCe,{openIssues:n.integrity.openIssues,pendingVerifications:n.integrity.pendingVerifications,tierDist:n.integrity.tierDist,staleCount:n.integrity.staleCount,dupCount:n.integrity.dupCount})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsx(GCe,{newEntities30:n.pulse.newEntities30,sectorMomentum:n.pulse.sectorMomentum,govAiAdoption:n.pulse.govAiAdoption,govPrograms:n.pulse.govPrograms}),a.jsx(ZCe,{insights:n.intel.insights,events:n.intel.events})]}),a.jsx("div",{className:"mt-6",children:a.jsx(oEe,{})}),a.jsx("div",{className:"mt-6",children:a.jsx(iEe,{})})]})}const E3=[{id:"partnership",icon:f2,title:"Strategic Partnership",accent:"emerald",description:"Research bodies, media, universities, innovation agencies, development partners and DFIs. We selectively partner with organizations advancing African innovation intelligence.",points:["Data sharing and joint intelligence products","Co-branded reports and benchmark studies","Access to our multi-agent OSINT architecture"]},{id:"investment",icon:pr,title:"Strategic Investment",accent:"blue",description:"We are scaling a proven model with active monetization across the continent. We welcome conversations with strategic investors aligned with our mission.",points:["Active revenue: reports, dashboards, and licenses","Continental scale roadmap from Kenya to all of Africa","Selective, mission-aligned capital only"]},{id:"team",icon:mK,title:"Join the Team",accent:"amber",description:"We are building a specialized team at the intersection of intelligence, AI, and African innovation. If you bring rare judgment and mission focus, we want to hear from you.",points:["OSINT specialists and intelligence analysts","AI agent builders and data engineers","Country and sector research leads"]}],P3={emerald:{iconBg:"bg-emerald-100",iconText:"text-emerald-700",ring:"border-emerald-500 bg-emerald-50",btn:"bg-emerald-600 hover:bg-emerald-700",badge:"bg-emerald-50 text-emerald-700"},blue:{iconBg:"bg-blue-100",iconText:"text-blue-700",ring:"border-blue-500 bg-blue-50",btn:"bg-blue-600 hover:bg-blue-700",badge:"bg-blue-50 text-blue-700"},amber:{iconBg:"bg-amber-100",iconText:"text-amber-700",ring:"border-amber-500 bg-amber-50",btn:"bg-amber-600 hover:bg-amber-700",badge:"bg-amber-50 text-amber-700"}};function cEe(){const[e,t]=P.useState("partnership"),[n,r]=P.useState({name:"",email:"",organization:"",role:"",message:""}),[i,s]=P.useState(!1),[o,c]=P.useState(!1),[d,h]=P.useState(""),p=E3.find(x=>x.id===e),m=P3[p.accent],v=async x=>{if(x.preventDefault(),h(""),!n.name||!n.email){h("Please provide your name and email.");return}s(!0);try{await Q.entities.SolutionInquiry.create({...n,inquiry_type:e,scope_description:n.message}),c(!0)}catch(w){h((w==null?void 0:w.message)||"Something went wrong. Please try again.")}finally{s(!1)}};return o?a.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:a.jsx(Ee,{className:"text-center",children:a.jsxs($e,{className:"pt-10 pb-10",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-emerald-100 flex items-center justify-center mx-auto mb-6",children:a.jsx(Un,{className:"h-9 w-9 text-emerald-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"Thank you. Message received"}),a.jsx("p",{className:"text-slate-600 mb-6",children:"We review every inquiry selectively and will reach out directly if there is a strong strategic fit."}),a.jsx(yt,{to:ot("Home"),children:a.jsxs(Ne,{variant:"outline",className:"gap-2",children:["Back to dashboard ",a.jsx(Lr,{className:"h-4 w-4"})]})})]})})}):a.jsxs("div",{className:"max-w-[1100px] mx-auto px-4 sm:px-6 lg:px-8 py-10",children:[a.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-12",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 bg-slate-900 text-white px-3 py-1 rounded-full text-sm font-medium mb-5",children:[a.jsx(ca,{className:"h-4 w-4"}),"Collaborate"]}),a.jsx("h1",{className:"text-4xl sm:text-5xl font-bold text-slate-900 tracking-tight mb-5",children:"Build African intelligence with us"}),a.jsx("p",{className:"text-lg text-slate-600 leading-relaxed",children:"We selectively partner with organizations, institutions and individuals advancing innovation intelligence across the continent. Three channels, one conversation."})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-10",children:E3.map(x=>{const w=P3[x.accent],b=e===x.id;return a.jsxs("button",{onClick:()=>t(x.id),className:`text-left rounded-xl border p-5 transition-all ${b?w.ring+" ring-1 ring-offset-0":"border-slate-200 bg-white hover:bg-slate-50"}`,children:[a.jsx("div",{className:`w-11 h-11 rounded-xl ${w.iconBg} flex items-center justify-center mb-3`,children:a.jsx(x.icon,{className:`h-6 w-6 ${w.iconText}`})}),a.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-1.5",children:x.title}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:x.description})]},x.id)})}
1332),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[a.jsx("div",{className:"lg:col-span-2",children:a.jsx(Ee,{className:"border-slate-200 h-full",children:a.jsxs($e,{className:"pt-6",children:[a.jsxs("div",{className:`inline-flex items-center gap-2 px-2.5 py-1 rounded-full text-xs font-medium mb-4 ${m.badge}`,children:[a.jsx(p.icon,{className:"h-3.5 w-3.5"}),p.title]}),a.jsx("p",{className:"text-slate-700 leading-relaxed mb-5",children:p.description}),a.jsx("div",{className:"space-y-2.5",children:p.points.map(x=>a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(Un,{className:`h-4.5 w-4.5 shrink-0 mt-0.5 ${m.iconText}`}),a.jsx("span",{className:"text-sm text-slate-700",children:x})]},x))})]})})}),a.jsx("div",{className:"lg:col-span-3",children:a.jsxs(Ee,{className:"border-slate-200",children:[a.jsxs(tt,{className:"border-b border-slate-100",children:[a.jsx(nt,{className:"text-xl",children:"Start the conversation"}),a.jsx(di,{children:"Tell us who you are and how you would like to collaborate. We respond selectively to inquiries with strategic alignment."})]}),a.jsxs($e,{className:"pt-6",children:[a.jsxs("form",{onSubmit:v,className:"space-y-5",children:[a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"name",children:"Full name *"}),a.jsx(Wt,{id:"name",value:n.name,onChange:x=>r({...n,name:x.target.value}),placeholder:"Jane Doe",required:!0})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"email",children:"Email *"}),a.jsx(Wt,{id:"email",type:"email",value:n.email,onChange:x=>r({...n,email:x.target.value}),placeholder:"[email protected]",required:!0})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"organization",children:"Organization"}),a.jsx(Wt,{id:"organization",value:n.organization,onChange:x=>r({...n,organization:x.target.value}),placeholder:"Company, fund, or institution"})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Qt,{htmlFor:"role",children:"Role / Title"}),a.jsx(Wt,{id:"role",value:n.role,onChange:x=>r({...n,role:x.target.value}),placeholder:"Partner, Director, Analyst…"})]})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs(Qt,{htmlFor:"message",className:"flex items-center gap-1.5",children:[a.jsx(Nu,{className:"h-4 w-4"})," Your message *"]}),a.jsx(bo,{id:"message",value:n.message,onChange:x=>r({...n,message:x.target.value}),rows:5,placeholder:e==="partnership"?"Describe the partnership you envision, shared goals, and what you bring to the table.":e==="investment"?"Share your investment thesis, check size, and why this aligns with your portfolio.":"Tell us about your background, what role you see yourself in, and what drives you.",required:!0})]}),d&&a.jsx("p",{className:"text-sm text-red-600 bg-red-50 rounded-lg px-3 py-2",children:d}),a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsxs("p",{className:"text-xs text-slate-400 flex items-center gap-1.5",children:[a.jsx(Tl,{className:"h-3.5 w-3.5"}),"Reviewed privately by the founder"]}),a.jsxs(Ne,{type:"submit",disabled:i,className:`${m.btn} gap-2`,size:"lg",children:[i?a.jsx(ln,{className:"h-4 w-4 animate-spin"}):a.jsx(Lr,{className:"h-4 w-4"}),"Send inquiry"]})]})]}),a.jsxs("div",{className:"mt-6 pt-5 border-t border-slate-100",children:[a.jsx("p",{className:"text-sm text-slate-600 mb-3 text-center",children:"Prefer to reach Haim Etkin directly?"}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[a.jsx("a",{href:"https://wa.me/972523728828",target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:a.jsxs(Ne,{variant:"outline",className:"w-full gap-2 border-emerald-300 text-emerald-700 hover:bg-emerald-50",children:[a.jsx(pV,{className:"h-4 w-4"}),"WhatsApp"]})}),a.jsx("a",{href:"tel:+972523728828",className:"flex-1",children:a.jsxs(Ne,{variant:"outline",className:"w-full gap-2 border-slate-300 hover:bg-slate-50",children:[a.jsx(p2,{className:"h-4 w-4"}),"Call +972-52-372-8828"]})})]}),a.jsx("p",{className:"text-xs text-slate-400 mt-2.5 text-center",children:"Send a personal WhatsApp message to Haim Etkin, or call him on his private mobile +972-52-372-8828"})]})]})]})})]}),a.jsx("div",{className:"mt-10 grid grid-cols-1 sm:grid-cols-3 gap-3",children:[{icon:pi,text:"Independent private OSINT initiative"},{icon:qm,text:"Proven multi-agent intelligence architecture"},{icon:er,text:"Active revenue and continental scale roadmap"}].map(x=>a.jsxs("div",{className:"flex items-center gap-3 bg-white border border-slate-200 rounded-xl px-4 py-3",children:[a.jsx(x.icon,{className:"h-5 w-5 text-slate-600 shrink-0"}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:x.text})]},x.text))})]})}function uEe(){return a.jsx("div",{className:"min-h-[calc(100vh-64px)] bg-slate-50 py-12",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsx("div",{className:"w-14 h-14 roun
1332ded-2xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center mx-auto mb-4",children:a.jsx(Mv,{className:"h-7 w-7 text-white"})}),a.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Terms of Use"}),a.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Last updated: August 15, 2026"})]}),a.jsxs("div",{className:"mb-8 rounded-xl border border-emerald-200 bg-emerald-50 p-5 flex gap-3",children:[a.jsx(Un,{className:"h-5 w-5 text-emerald-600 mt-0.5 shrink-0"}),a.jsxs("p",{className:"text-sm text-emerald-900",children:[a.jsx("strong",{children:"Acceptance of these terms."}),' By browsing, accessing, or using this website and its dashboard ("the Platform"), you acknowledge that you have read, understood, and agree to be bound by these Terms of Use. If you do not agree, please discontinue use of the Platform immediately. Continued use constitutes your ongoing acceptance of these terms.']})]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("section",{className:"bg-white rounded-xl border border-slate-200 p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(ur,{className:"h-5 w-5 text-emerald-600"}),a.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"1. Nature of the Platform"})]}),a.jsxs("p",{className:"text-sm text-slate-600 leading-relaxed",children:["The Kenya Innovation Ecosystem Platform is an independent, private open-source intelligence (OSINT) initiative. It is",a.jsx("strong",{children:" not"})," an official Government of Kenya platform and is not affiliated with, endorsed by, or representing any government body, ministry, or authority. The Platform collects, aggregates, and presents publicly available information about the innovation ecosystem using automated agents and AI-assisted validation. The Platform is an intelligence and research tool, not a certified or authoritative source of record."]})]}),a.jsxs("section",{className:"bg-white rounded-xl border border-slate-200 p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(po,{className:"h-5 w-5 text-amber-500"}),a.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:'2. No Warranty - Information Provided "As-Is"'})]}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:'All information, data, records, insights, benchmarks, and reports available on the Platform are provided on an "as is" and "as available" basis, without any warranties of any kind, express or implied, including but not limited to warranties of accuracy, completeness, reliability, timeliness, or fitness for a particular purpose. Although the Platform applies automated quality gates, source-link validation, and AI validation layers, none of these processes guarantee that the information is free of errors, omissions, or outdated content.'})]}),a.jsxs("section",{className:"bg-white rounded-xl border border-amber-200 p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(pi,{className:"h-5 w-5 text-amber-600"}),a.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"3. User Responsibility to Verify"})]}),a.jsxs("p",{className:"text-sm text-slate-600 leading-relaxed",children:[a.jsx("strong",{children:"You are solely responsible"})," for verifying any information you collect, extract, or derive from the Platform before relying on it or acting upon it. The user bears full responsibility for any decision, action, or inaction taken on the basis of information obtained from the Platform. You must not rely on the Platform's data as a substitute for independent professional, legal, financial, or commercial advice, nor for official or certified records. Independent verification prior to any use is mandatory."]})]}),a.jsxs("section",{className:"bg-white rounded-xl border border-slate-200 p-6 shadow-sm",children:[a.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"4. No Reliance and Limitation of Liability"}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"To the maximum extent permitted by applicable law, the Platform, its operators, contributors, and affiliates shall not be liable for any direct, indirect, incidental, consequential, special, or punitive damages, or any loss of profits, data, business, or reputation, arising out of or in connection with your access to or use of, or inability to use, the Platform or any information contained therein. This includes any decisions made based on insights, benchmarks, funding figures, entity records, or reports published on the Platform."})]}),a.jsxs("section",{className:"bg-white rounded-xl border border-slate-200 p-6 shadow-sm",children:[a.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"5. AI-Generated and OSINT Content"}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"Parts of the Platform's content are generated or classified by artificial intelligence models based on publicly available sources. AI-derived classifications (for example, intensity levels in benchmark matrices) are directional intelligence analysis, not figures quoted directly from source documents. Source-linked records are prioritized for public display, but users should always consult the original sources linked within each record before drawing conclusions."})]}),a.jsxs("section",{className:"bg-white rounded-xl border border-slate-200 p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Tl,{className:"h-5 w-5 text-slate-600"}),a.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"6. Intellectual Property"})]}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"All Rights Reserved to Haim Etkin, Strategic OSINT & Intelligence Integration. The Platform's structure, design, compilation, analytics, and original content are protected by intellectual property laws. Public-source data remains the property of its respective owners and is cited via source links wherever available. Users may not scrape, republish, redistribute, or commercially exploit bulk Platform data without explicit written permission."})]}),a.jsxs("section",{className:"bg-white rounded-xl border border-slate-200 p-6 shadow-sm",children:[a.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"7. 
1332Changes to These Terms"}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:'The Platform reserves the right to update or modify these Terms of Use at any time. The "Last updated" date above will reflect the most recent revision. Your continued use of the Platform following any change constitutes acceptance of the updated terms. It is your responsibility to review this page periodically.'})]})]}),a.jsx("div",{className:"mt-8 rounded-xl bg-slate-900 p-5 text-center",children:a.jsxs("p",{className:"text-sm text-slate-300",children:["Questions about these terms? Contact:",a.jsx("a",{href:"mailto:[email protected]",className:"ml-1 text-emerald-400 hover:text-emerald-300 font-medium",children:"[email protected]"})]})})]})})}const{Pages:Cq,Layout:k3,mainPage:dEe}=nq,Eq=dEe,fEe=Cq[Eq],oi=({children:e,currentPageName:t})=>k3?a.jsx(k3,{currentPageName:t,children:e}):a.jsx(a.Fragment,{children:e}),hEe=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=D6();if(t||e)return a.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:a.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return a.jsx(zNe,{});if(n.type==="auth_required")return r(),null}return a.jsxs($Z,{children:[a.jsx(vr,{path:"/",element:a.jsx(oi,{currentPageName:Eq,children:a.jsx(fEe,{})})}),Object.entries(Cq).map(([i,s])=>a.jsx(vr,{path:`/${i}`,element:a.jsx(oi,{currentPageName:i,children:a.jsx(s,{})})},i)),a.jsx(vr,{path:"/GovInnovation",element:a.jsx(oi,{currentPageName:"GovInnovation",children:a.jsx(UNe,{})})}),a.jsx(vr,{path:"/PublicSubmit",element:a.jsx(oi,{currentPageName:"PublicSubmit",children:a.jsx(WNe,{})})}),a.jsx(vr,{path:"/Embed",element:a.jsx(VNe,{})}),a.jsx(vr,{path:"/Insights",element:a.jsx(oi,{currentPageName:"Insights",children:a.jsx(aCe,{})})}),a.jsx(vr,{path:"/Solutions",element:a.jsx(oi,{currentPageName:"Solutions",children:a.jsx(fCe,{})})}),a.jsx(vr,{path:"/SearchInsights",element:a.jsx(oi,{currentPageName:"SearchInsights",children:a.jsx(hCe,{})})}),a.jsx(vr,{path:"/UserManagement",element:a.jsx(oi,{currentPageName:"UserManagement",children:a.jsx(vCe,{})})}),a.jsx(vr,{path:"/ReportDetail/:id",element:a.jsx(oi,{currentPageName:"ReportDetail",children:a.jsx(jCe,{})})}),a.jsx(vr,{path:"/PressKit",element:a.jsx(oi,{currentPageName:"PressKit",children:a.jsx(qCe,{})})}),a.jsx(vr,{path:"/Coverage",element:a.jsx(oi,{currentPageName:"Coverage",children:a.jsx(WCe,{})})}),a.jsx(vr,{path:"/ExecutiveDashboard",element:a.jsx(oi,{currentPageName:"ExecutiveDashboard",children:a.jsx(lEe,{})})}),a.jsx(vr,{path:"/Collaborate",element:a.jsx(oi,{currentPageName:"Collaborate",children:a.jsx(cEe,{})})}),a.jsx(vr,{path:"/Terms",element:a.jsx(oi,{currentPageName:"Terms",children:a.jsx(uEe,{})})}),a.jsx(vr,{path:"*",element:a.jsx(BNe,{})})]})};function pEe(){return a.jsx(JJ,{children:a.jsxs(TG,{client:WG,children:[a.jsxs(WZ,{children:[a.jsx(FNe,{}),a.jsx(hEe,{})]}),a.jsx(sG,{})]})})}bH.createRoot(document.getElementById("root")).render(a.jsx(pEe,{}));

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.